@ethlete/query 6.0.0-next.50 → 6.0.0-next.52
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/CHANGELOG.md +41 -0
- package/fesm2022/ethlete-query-ngrx-toolkit.mjs +321 -0
- package/fesm2022/ethlete-query-ngrx-toolkit.mjs.map +1 -0
- package/fesm2022/ethlete-query.mjs +359 -139
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/generators/generators.json +5 -0
- package/generators/migrate-from-ngrx-toolkit/args-assignability.js +140 -0
- package/generators/migrate-from-ngrx-toolkit/consumers.js +453 -0
- package/generators/migrate-from-ngrx-toolkit/creators.js +301 -0
- package/generators/migrate-from-ngrx-toolkit/facade.js +295 -0
- package/generators/migrate-from-ngrx-toolkit/feature.js +513 -0
- package/generators/migrate-from-ngrx-toolkit/migration.js +139 -0
- package/generators/migrate-from-ngrx-toolkit/report.js +154 -0
- package/generators/migrate-from-ngrx-toolkit/schema.json +42 -0
- package/generators/migrate-from-ngrx-toolkit/store-removal.js +633 -0
- package/generators/migrate-from-ngrx-toolkit/ts-edits.js +128 -0
- package/generators/migrate-query-opt-in-features/migration.js +10 -9
- package/generators/migrate-to-query-v3/auth-provider-scaffold.js +29 -2
- package/generators/migrate-to-query-v3/cleanup-migration.js +22 -1
- package/generators/migrate-to-query-v3/legacy-query-creator-migration.js +39 -2
- package/generators/migrate-to-query-v3/migration.js +2 -1
- package/generators/migrate-to-query-v3/module-graph.js +2 -0
- package/generators/migrate-to-query-v3/query-client-migration.js +71 -2
- package/generators/migrate-to-query-v3/shared.js +27 -0
- package/generators/prep-for-query-v3/migration.js +83 -1
- package/migrations/query-field-default-types.md +43 -0
- package/migrations/search-query-field-string.md +43 -0
- package/migrations.json +16 -0
- package/package.json +5 -1
- package/types/ethlete-query-ngrx-toolkit.d.ts +143 -0
- package/types/ethlete-query.d.ts +129 -34
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ApplicationRef, untracked, effect, Injector, runInInjectionContext, DestroyRef, computed, InjectionToken, EnvironmentInjector, ElementRef, ErrorHandler, createEnvironmentInjector, signal, linkedSignal, isDevMode, PLATFORM_ID, resource, DOCUMENT, VERSION, provideEnvironmentInitializer, afterNextRender, makeEnvironmentProviders, assertInInjectionContext, ChangeDetectorRef, ViewContainerRef, TemplateRef, Input, Directive, input, Pipe, ViewEncapsulation, Component, NgZone } from '@angular/core';
|
|
2
|
+
import { inject, ApplicationRef, untracked, effect, Injector, runInInjectionContext, DestroyRef, computed, InjectionToken, EnvironmentInjector, ElementRef, ErrorHandler, createEnvironmentInjector, signal, linkedSignal, isDevMode, PLATFORM_ID, resource, DOCUMENT, VERSION, provideEnvironmentInitializer, CSP_NONCE, afterNextRender, makeEnvironmentProviders, assertInInjectionContext, ChangeDetectorRef, ViewContainerRef, TemplateRef, Input, Directive, input, Pipe, ViewEncapsulation, Component, NgZone } from '@angular/core';
|
|
3
3
|
import { UrlTree, Router, RedirectCommand, ActivatedRoute } from '@angular/router';
|
|
4
|
-
import { Observable, defer, from, filter, Subject, Subscription, throwError, of, timer, switchMap, tap, retry, catchError, EMPTY as EMPTY$1, take, takeUntil, finalize, mergeMap, toArray, map, race, NEVER, merge, takeWhile, firstValueFrom, concatMap, fromEvent, throttleTime, interval, startWith, pairwise, BehaviorSubject, combineLatest, ReplaySubject, distinctUntilChanged, shareReplay, withLatestFrom, debounceTime } from 'rxjs';
|
|
4
|
+
import { Observable, defer, from, filter, Subject, Subscription, throwError, of, timer, switchMap, tap, retry, catchError, EMPTY as EMPTY$1, take, takeUntil, finalize, mergeMap, toArray, map, race, NEVER, merge, takeWhile, defaultIfEmpty, firstValueFrom, concatMap, fromEvent, throttleTime, interval, startWith, pairwise, BehaviorSubject, combineLatest, ReplaySubject, distinctUntilChanged, shareReplay, withLatestFrom, debounceTime } from 'rxjs';
|
|
5
5
|
import { defineStaticProvider, RuntimeError, clamp, randomId, defineRootProvider, isObject, injectUnsavedChangesCoordinator, injectRoute, getCookie, setCookie, deleteCookie, CORE_VERSION, createDestroy, computedTillTruthy, defineProvider, toProvideFn, toInjectFn, nextFrame, injectQueryParams, injectQueryParamChanges, clone, equal, ET_PROPERTY_REMOVED, previousSignalValue } from '@ethlete/core';
|
|
6
|
-
import {
|
|
6
|
+
import { getActiveConsumer, setActiveConsumer, SIGNAL, createWatch } from '@angular/core/primitives/signals';
|
|
7
|
+
import { HttpClient, HttpErrorResponse, HttpEventType, HttpHeaders, HttpContextToken, HttpContext, HttpResponse, HttpStatusCode } from '@angular/common/http';
|
|
7
8
|
import { toObservable, takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
8
|
-
import { getActiveConsumer, setActiveConsumer, SIGNAL } from '@angular/core/primitives/signals';
|
|
9
9
|
import { isPlatformBrowser, NgClass, AsyncPipe, JsonPipe } from '@angular/common';
|
|
10
10
|
import { validateAsync, form } from '@angular/forms/signals';
|
|
11
11
|
import * as i1 from '@angular/forms';
|
|
@@ -468,7 +468,7 @@ const wrapAsObservableSignal = (source, defaultInjector) => {
|
|
|
468
468
|
const existing = overrides.get(injector);
|
|
469
469
|
if (existing)
|
|
470
470
|
return existing;
|
|
471
|
-
const override$ = toObservable(source, { injector }).pipe(takeUntilDestroyed(defaultInjector.get(DestroyRef)));
|
|
471
|
+
const override$ = untracked(() => toObservable(source, { injector }).pipe(takeUntilDestroyed(defaultInjector.get(DestroyRef))));
|
|
472
472
|
overrides.set(injector, override$);
|
|
473
473
|
return override$;
|
|
474
474
|
};
|
|
@@ -532,6 +532,7 @@ const setupQueryDependencies = (options) => {
|
|
|
532
532
|
const QueryRuntimeErrorCode = {
|
|
533
533
|
// Query
|
|
534
534
|
QUERY_FEATURE_USED_MULTIPLE_TIMES: 0,
|
|
535
|
+
QUERY_CREATED_IN_REACTIVE_CONTEXT: 1,
|
|
535
536
|
// Query features
|
|
536
537
|
WITH_ARGS_QUERY_FEATURE_MISSING_BUT_ROUTE_IS_FUNCTION: 100,
|
|
537
538
|
WITH_POLLING_USED_ON_UNSUPPORTED_HTTP_METHOD: 101,
|
|
@@ -580,8 +581,11 @@ const QueryRuntimeErrorCode = {
|
|
|
580
581
|
const queryFeatureUsedMultipleTimes = (type) => {
|
|
581
582
|
return new RuntimeError(QueryRuntimeErrorCode.QUERY_FEATURE_USED_MULTIPLE_TIMES, `The query feature "${type}()" was used multiple times.`);
|
|
582
583
|
};
|
|
584
|
+
const queryCreatedInReactiveContext = () => {
|
|
585
|
+
return new RuntimeError(QueryRuntimeErrorCode.QUERY_CREATED_IN_REACTIVE_CONTEXT, `A query was created inside a reactive context (a computed, an effect or a template). Every re-run would create another query that lives until its injector is destroyed. Create the query in a field initializer or constructor and change its args instead.`);
|
|
586
|
+
};
|
|
583
587
|
const withArgsQueryFeatureMissingButRouteIsFunction = () => {
|
|
584
|
-
return new RuntimeError(QueryRuntimeErrorCode.WITH_ARGS_QUERY_FEATURE_MISSING_BUT_ROUTE_IS_FUNCTION, `This queries route is a function, but a "withArgs()" feature is missing.`);
|
|
588
|
+
return new RuntimeError(QueryRuntimeErrorCode.WITH_ARGS_QUERY_FEATURE_MISSING_BUT_ROUTE_IS_FUNCTION, `This queries route is a function, but a "withArgs()" feature is missing. Mutations need one too: create the query with "withArgs(() => ({ body: form.value() }))", then call ".execute()". The "silenceMissingWithArgsFeatureError" config is an escape hatch for args that only exist at call time.`);
|
|
585
589
|
};
|
|
586
590
|
const withPollingUsedOnUnsupportedHttpMethod = (method) => {
|
|
587
591
|
return new RuntimeError(QueryRuntimeErrorCode.WITH_POLLING_USED_ON_UNSUPPORTED_HTTP_METHOD, `This is a "${method}" request, "withPolling()" is only supported for GET, HEAD, OPTIONS requests and GQL queries.`);
|
|
@@ -757,8 +761,8 @@ const createQueryFeature = (config) => {
|
|
|
757
761
|
* A query feature that allows you to set the arguments of the query.
|
|
758
762
|
* The arguments are read within a computed function, so you can use reactive values.
|
|
759
763
|
*
|
|
760
|
-
* Return `null` to park the query:
|
|
761
|
-
* pause until args are set again.
|
|
764
|
+
* Return `null` to park the query: it is reset (`response()` and `executionState()` become `null`),
|
|
765
|
+
* and polling and auto refresh pause until args are set again.
|
|
762
766
|
*
|
|
763
767
|
* Changing arguments will automatically trigger a new execution of the query if it is eligible for auto execution (e.g. a GET request).
|
|
764
768
|
*/
|
|
@@ -774,10 +778,16 @@ const withArgs = (args) => {
|
|
|
774
778
|
// Trigger (auto-)execution whenever the resolved args change.
|
|
775
779
|
nestedEffect(() => {
|
|
776
780
|
const currArgsNow = context.state.args();
|
|
777
|
-
if (currArgsNow === null)
|
|
781
|
+
if (currArgsNow === null) {
|
|
782
|
+
untracked(() => {
|
|
783
|
+
if (context.state.subtle.request() !== null || context.state.loading() !== null)
|
|
784
|
+
context.execute.reset();
|
|
785
|
+
});
|
|
778
786
|
return;
|
|
787
|
+
}
|
|
779
788
|
untracked(() => {
|
|
780
|
-
|
|
789
|
+
const guard = context.state.subtle.autoExecuteGuard();
|
|
790
|
+
if (context.flags.shouldAutoExecute && (guard === null || guard()))
|
|
781
791
|
context.execute({ args: currArgsNow });
|
|
782
792
|
});
|
|
783
793
|
}, { injector: context.deps.injector });
|
|
@@ -805,6 +815,7 @@ const withPolling = (options) => {
|
|
|
805
815
|
{ label: 'interval', value: formatQueryDevtoolsDuration(untracked(() => readPollingInterval(options.interval))) },
|
|
806
816
|
{ label: 'execute initially', value: options.executeInitially ? 'yes' : 'no' },
|
|
807
817
|
...(options.pauseWhileHidden ? [{ label: 'pause while hidden', value: 'yes' }] : []),
|
|
818
|
+
...(options.enabled ? [{ label: 'enabled', value: untracked(options.enabled) ? 'yes' : 'no' }] : []),
|
|
808
819
|
...(options.refetchOnFocus ? [{ label: 'refetch on focus', value: 'yes' }] : []),
|
|
809
820
|
...(options.refetchOnReconnect ? [{ label: 'refetch on reconnect', value: 'yes' }] : []),
|
|
810
821
|
],
|
|
@@ -850,7 +861,8 @@ const withPolling = (options) => {
|
|
|
850
861
|
});
|
|
851
862
|
}
|
|
852
863
|
const currentInterval = () => untracked(() => readPollingInterval(options.interval));
|
|
853
|
-
const
|
|
864
|
+
const isEnabled = () => (options.enabled ? untracked(options.enabled) : true);
|
|
865
|
+
const isPaused = () => (options.pauseWhileHidden === true && document.hidden) || !isEnabled();
|
|
854
866
|
const stop = () => {
|
|
855
867
|
if (intervalId !== null)
|
|
856
868
|
clearInterval(intervalId);
|
|
@@ -865,7 +877,7 @@ const withPolling = (options) => {
|
|
|
865
877
|
// mid-flight needs no restart and `executeInitially`/interval semantics stay identical.
|
|
866
878
|
if (hold && !hold.isHolder())
|
|
867
879
|
return;
|
|
868
|
-
context.execute({ args: currentArgs });
|
|
880
|
+
context.execute({ args: currentArgs, options: { triggeredBy: 'polling' } });
|
|
869
881
|
};
|
|
870
882
|
const schedule = (firstDelay) => {
|
|
871
883
|
stop();
|
|
@@ -898,7 +910,7 @@ const withPolling = (options) => {
|
|
|
898
910
|
if (isPaused())
|
|
899
911
|
lastTickAt -= currentInterval();
|
|
900
912
|
else if (!hold || hold.isHolder())
|
|
901
|
-
context.execute({ args });
|
|
913
|
+
context.execute({ args, options: { triggeredBy: 'polling' } });
|
|
902
914
|
}
|
|
903
915
|
schedule(currentInterval());
|
|
904
916
|
});
|
|
@@ -914,21 +926,29 @@ const withPolling = (options) => {
|
|
|
914
926
|
});
|
|
915
927
|
}, { injector: context.deps.injector });
|
|
916
928
|
}
|
|
929
|
+
const resumeOrStop = () => {
|
|
930
|
+
if (!active)
|
|
931
|
+
return;
|
|
932
|
+
if (isPaused()) {
|
|
933
|
+
stop();
|
|
934
|
+
}
|
|
935
|
+
else if (intervalId === null && timeoutId === null) {
|
|
936
|
+
schedule(remainingDelay());
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
if (options.enabled) {
|
|
940
|
+
const enabled = options.enabled;
|
|
941
|
+
nestedEffect(() => {
|
|
942
|
+
enabled();
|
|
943
|
+
untracked(resumeOrStop);
|
|
944
|
+
}, { injector: context.deps.injector });
|
|
945
|
+
}
|
|
917
946
|
const listen = (target, type, listener) => {
|
|
918
947
|
target.addEventListener(type, listener);
|
|
919
948
|
context.deps.destroyRef.onDestroy(() => target.removeEventListener(type, listener));
|
|
920
949
|
};
|
|
921
950
|
if (options.pauseWhileHidden) {
|
|
922
|
-
listen(document, 'visibilitychange',
|
|
923
|
-
if (!active)
|
|
924
|
-
return;
|
|
925
|
-
if (document.hidden) {
|
|
926
|
-
stop();
|
|
927
|
-
}
|
|
928
|
-
else if (intervalId === null && timeoutId === null) {
|
|
929
|
-
schedule(remainingDelay());
|
|
930
|
-
}
|
|
931
|
-
});
|
|
951
|
+
listen(document, 'visibilitychange', resumeOrStop);
|
|
932
952
|
}
|
|
933
953
|
const refetchNow = () => {
|
|
934
954
|
if (!active || isPaused())
|
|
@@ -976,6 +996,7 @@ const withLongPolling = (options) => {
|
|
|
976
996
|
type: QueryFeatureType.WITH_LONG_POLLING,
|
|
977
997
|
devtools: () => [
|
|
978
998
|
{ label: 'delay', value: formatQueryDevtoolsDuration(options.delay ?? DEFAULT_LONG_POLLING_DELAY) },
|
|
999
|
+
...(options.enabled ? [{ label: 'enabled', value: untracked(options.enabled) ? 'yes' : 'no' }] : []),
|
|
979
1000
|
...queryDevtoolsFnDetail(options.nextArgs, 'nextArgs'),
|
|
980
1001
|
],
|
|
981
1002
|
fn: (context) => {
|
|
@@ -992,16 +1013,31 @@ const withLongPolling = (options) => {
|
|
|
992
1013
|
context.state.subtle.defaultRunOptions.set({ keepUnusedFor: 0 });
|
|
993
1014
|
let timeoutId = null;
|
|
994
1015
|
let consecutiveErrors = 0;
|
|
995
|
-
|
|
1016
|
+
let nextRound = null;
|
|
1017
|
+
const isEnabled = () => (options.enabled ? untracked(options.enabled) : true);
|
|
1018
|
+
if (options.enabled)
|
|
1019
|
+
context.state.subtle.autoExecuteGuard.set(isEnabled);
|
|
1020
|
+
const clearTimer = () => {
|
|
996
1021
|
if (timeoutId !== null)
|
|
997
1022
|
clearTimeout(timeoutId);
|
|
998
1023
|
timeoutId = null;
|
|
999
1024
|
};
|
|
1025
|
+
const stop = () => {
|
|
1026
|
+
clearTimer();
|
|
1027
|
+
nextRound = null;
|
|
1028
|
+
};
|
|
1029
|
+
const runRound = (args) => {
|
|
1030
|
+
nextRound = null;
|
|
1031
|
+
context.execute({ args, options: { triggeredBy: 'long-polling' } });
|
|
1032
|
+
};
|
|
1000
1033
|
const schedule = (args, wait) => {
|
|
1001
|
-
|
|
1034
|
+
clearTimer();
|
|
1035
|
+
nextRound = { args };
|
|
1036
|
+
if (!isEnabled())
|
|
1037
|
+
return;
|
|
1002
1038
|
timeoutId = setTimeout(() => {
|
|
1003
1039
|
timeoutId = null;
|
|
1004
|
-
|
|
1040
|
+
runRound(args);
|
|
1005
1041
|
}, wait);
|
|
1006
1042
|
};
|
|
1007
1043
|
// The chain never writes `state.args`, so what a round was sent with lives on the request itself -
|
|
@@ -1036,12 +1072,35 @@ const withLongPolling = (options) => {
|
|
|
1036
1072
|
const hasChanged = hasSeenArgs && args !== seenArgs;
|
|
1037
1073
|
hasSeenArgs = true;
|
|
1038
1074
|
seenArgs = args;
|
|
1039
|
-
if (
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1075
|
+
if (hasChanged) {
|
|
1076
|
+
consecutiveErrors = 0;
|
|
1077
|
+
stop();
|
|
1078
|
+
}
|
|
1079
|
+
const autoStarts = context.flags.shouldAutoExecute && (args !== null || !context.flags.hasWithArgsFeature);
|
|
1080
|
+
if (autoStarts && !isEnabled() && nextRound === null)
|
|
1081
|
+
nextRound = { args };
|
|
1043
1082
|
});
|
|
1044
1083
|
}, { injector: context.deps.injector });
|
|
1084
|
+
if (options.enabled) {
|
|
1085
|
+
const enabled = options.enabled;
|
|
1086
|
+
nestedEffect(() => {
|
|
1087
|
+
const on = enabled();
|
|
1088
|
+
untracked(() => {
|
|
1089
|
+
if (!on) {
|
|
1090
|
+
if (timeoutId !== null)
|
|
1091
|
+
return clearTimer();
|
|
1092
|
+
const request = context.state.subtle.request();
|
|
1093
|
+
if (!request?.loading())
|
|
1094
|
+
return;
|
|
1095
|
+
nextRound = { args: request.args };
|
|
1096
|
+
request.subtle.abort();
|
|
1097
|
+
}
|
|
1098
|
+
else if (nextRound !== null && timeoutId === null) {
|
|
1099
|
+
runRound(nextRound.args);
|
|
1100
|
+
}
|
|
1101
|
+
});
|
|
1102
|
+
}, { injector: context.deps.injector });
|
|
1103
|
+
}
|
|
1045
1104
|
context.deps.destroyRef.onDestroy(stop);
|
|
1046
1105
|
},
|
|
1047
1106
|
});
|
|
@@ -1100,6 +1159,7 @@ const withAutoRefresh = (options) => {
|
|
|
1100
1159
|
devtools: () => [
|
|
1101
1160
|
{ label: 'signals', value: String(options.onSignalChanges.length) },
|
|
1102
1161
|
...(options.ignoreOnlyManualExecution ? [{ label: 'ignores manual only', value: 'yes' }] : []),
|
|
1162
|
+
...(options.enabled ? [{ label: 'enabled', value: untracked(options.enabled) ? 'yes' : 'no' }] : []),
|
|
1103
1163
|
],
|
|
1104
1164
|
fn: (context) => {
|
|
1105
1165
|
if (!context.flags.shouldAutoExecuteMethod) {
|
|
@@ -1113,12 +1173,14 @@ const withAutoRefresh = (options) => {
|
|
|
1113
1173
|
signal();
|
|
1114
1174
|
}
|
|
1115
1175
|
untracked(() => {
|
|
1176
|
+
if (options.enabled && !options.enabled())
|
|
1177
|
+
return;
|
|
1116
1178
|
const args = context.state.args();
|
|
1117
1179
|
// Don't start polling if the query doesn't have args.
|
|
1118
1180
|
// It should have args because a withArgs feature is present.
|
|
1119
1181
|
if (args === null && context.flags.hasWithArgsFeature)
|
|
1120
1182
|
return;
|
|
1121
|
-
context.execute({ args });
|
|
1183
|
+
context.execute({ args, options: { triggeredBy: 'auto-refresh' } });
|
|
1122
1184
|
});
|
|
1123
1185
|
}, { injector: context.deps.injector });
|
|
1124
1186
|
},
|
|
@@ -1402,11 +1464,19 @@ const neverRetry = () => ({ retry: false });
|
|
|
1402
1464
|
const setupQueryState = (options) => {
|
|
1403
1465
|
const request = signal(null, /* @ts-ignore */
|
|
1404
1466
|
...(ngDevMode ? [{ debugName: "request" }] : /* istanbul ignore next */ []));
|
|
1405
|
-
const rawResponse = linkedSignal(() => {
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1467
|
+
const rawResponse = linkedSignal({ ...(ngDevMode ? { debugName: "rawResponse" } : /* istanbul ignore next */ {}), source: () => {
|
|
1468
|
+
const current = request();
|
|
1469
|
+
const raw = current?.response() ?? null;
|
|
1470
|
+
return {
|
|
1471
|
+
request: current,
|
|
1472
|
+
raw: options.devtoolsOverrides ? options.devtoolsOverrides.apply(raw) : raw,
|
|
1473
|
+
settled: current?.currentEvent()?.type === HttpEventType.Response,
|
|
1474
|
+
};
|
|
1475
|
+
},
|
|
1476
|
+
computation: (current, previous) => {
|
|
1477
|
+
const carriesPrevious = options.keepPreviousResponse && current.request !== null && current.raw === null && !current.settled;
|
|
1478
|
+
return carriesPrevious ? (previous?.value ?? null) : current.raw;
|
|
1479
|
+
} });
|
|
1410
1480
|
const transformed = computed(() => {
|
|
1411
1481
|
const raw = rawResponse();
|
|
1412
1482
|
if (raw === null)
|
|
@@ -1457,6 +1527,8 @@ const setupQueryState = (options) => {
|
|
|
1457
1527
|
};
|
|
1458
1528
|
const defaultRunOptions = signal(null, /* @ts-ignore */
|
|
1459
1529
|
...(ngDevMode ? [{ debugName: "defaultRunOptions" }] : /* istanbul ignore next */ []));
|
|
1530
|
+
const autoExecuteGuard = signal(null, /* @ts-ignore */
|
|
1531
|
+
...(ngDevMode ? [{ debugName: "autoExecuteGuard" }] : /* istanbul ignore next */ []));
|
|
1460
1532
|
options.destroyRef?.onDestroy(() => {
|
|
1461
1533
|
requestEventsSubscription.unsubscribe();
|
|
1462
1534
|
requestEvents$.complete();
|
|
@@ -1526,6 +1598,7 @@ const setupQueryState = (options) => {
|
|
|
1526
1598
|
bindRequestEvents,
|
|
1527
1599
|
unbindRequestEvents,
|
|
1528
1600
|
defaultRunOptions,
|
|
1601
|
+
autoExecuteGuard,
|
|
1529
1602
|
setArgsSource,
|
|
1530
1603
|
devtoolsStats: options.devtoolsStats ?? null,
|
|
1531
1604
|
devtoolsFormLinks: options.devtoolsFormLinks ?? null,
|
|
@@ -1539,15 +1612,17 @@ const createCancelledError = () => createQueryErrorResponse(new HttpErrorRespons
|
|
|
1539
1612
|
const createQuerySnapshotFn = (options) => {
|
|
1540
1613
|
const { state } = options;
|
|
1541
1614
|
const context = injectQueryContext();
|
|
1542
|
-
const snapshotFn = () => {
|
|
1615
|
+
const snapshotFn = () => untracked(() => {
|
|
1543
1616
|
const snapshotState = setupQueryState({});
|
|
1544
1617
|
const isAlive = signal(true, /* @ts-ignore */
|
|
1545
1618
|
...(ngDevMode ? [{ debugName: "isAlive" }] : /* istanbul ignore next */ []));
|
|
1546
1619
|
let cancelSubscription = Subscription.EMPTY;
|
|
1620
|
+
let abortSubscription = Subscription.EMPTY;
|
|
1547
1621
|
let unregisterScopeListener = null;
|
|
1548
1622
|
const settle = () => {
|
|
1549
1623
|
killEffectRef.destroy();
|
|
1550
1624
|
cancelSubscription.unsubscribe();
|
|
1625
|
+
abortSubscription.unsubscribe();
|
|
1551
1626
|
unregisterScopeListener?.();
|
|
1552
1627
|
isAlive.set(false);
|
|
1553
1628
|
};
|
|
@@ -1587,6 +1662,16 @@ const createQuerySnapshotFn = (options) => {
|
|
|
1587
1662
|
snapshotState.error.set(createCancelledError());
|
|
1588
1663
|
settle();
|
|
1589
1664
|
});
|
|
1665
|
+
const abort = () => untracked(() => {
|
|
1666
|
+
if (!isAlive())
|
|
1667
|
+
return;
|
|
1668
|
+
snapshotState.loading.set(null);
|
|
1669
|
+
snapshotState.latestHttpEvent.set(CANCEL_EVENT);
|
|
1670
|
+
snapshotState.rawResponse.set(null);
|
|
1671
|
+
snapshotState.error.set(null);
|
|
1672
|
+
settle();
|
|
1673
|
+
});
|
|
1674
|
+
abortSubscription = options.execute.aborted$.subscribe(abort);
|
|
1590
1675
|
cancelSubscription = state.events$
|
|
1591
1676
|
.pipe(filter((event) => event.type === 'cancel'))
|
|
1592
1677
|
.subscribe(cancel);
|
|
@@ -1607,7 +1692,7 @@ const createQuerySnapshotFn = (options) => {
|
|
|
1607
1692
|
executionState: wrapAsObservableSignal(snapshotState.executionState, context.deps.injector),
|
|
1608
1693
|
};
|
|
1609
1694
|
return snapshot;
|
|
1610
|
-
};
|
|
1695
|
+
});
|
|
1611
1696
|
return snapshotFn;
|
|
1612
1697
|
};
|
|
1613
1698
|
|
|
@@ -1659,9 +1744,12 @@ const applyQueryFeatures = (features, context) => {
|
|
|
1659
1744
|
feature.fn(context);
|
|
1660
1745
|
}
|
|
1661
1746
|
};
|
|
1662
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1663
1747
|
const maybeExecute = (options) => {
|
|
1664
|
-
|
|
1748
|
+
const guard = options.state.subtle.autoExecuteGuard();
|
|
1749
|
+
if (options.flags.shouldAutoExecute &&
|
|
1750
|
+
!options.flags.hasRouteFunction &&
|
|
1751
|
+
!options.flags.hasWithArgsFeature &&
|
|
1752
|
+
(guard === null || guard())) {
|
|
1665
1753
|
options.execute();
|
|
1666
1754
|
}
|
|
1667
1755
|
};
|
|
@@ -1710,6 +1798,7 @@ const createQueryObject = (options) => {
|
|
|
1710
1798
|
id: wrappedId,
|
|
1711
1799
|
createSnapshot,
|
|
1712
1800
|
reset: execute.reset,
|
|
1801
|
+
abort: execute.abort,
|
|
1713
1802
|
asReadonly,
|
|
1714
1803
|
executionState: wrappedExecutionState,
|
|
1715
1804
|
subtle: {
|
|
@@ -1735,14 +1824,15 @@ const createBaseQuery = (options) => {
|
|
|
1735
1824
|
const devtoolsStats = createQueryDevtoolsStatsRecorder();
|
|
1736
1825
|
const devtoolsFormLinks = createQueryDevtoolsFormLinksRecorder();
|
|
1737
1826
|
const devtoolsOverrides = createQueryDevtoolsOverridesRecorder();
|
|
1827
|
+
const flags = getQueryFeatureUsage(options);
|
|
1738
1828
|
const state = setupQueryState({
|
|
1739
1829
|
transformResponse: options.creator?.transformResponse,
|
|
1740
1830
|
destroyRef: deps.destroyRef,
|
|
1831
|
+
keepPreviousResponse: options.queryConfig.keepPreviousResponse ?? flags.shouldAutoExecuteMethod,
|
|
1741
1832
|
devtoolsStats,
|
|
1742
1833
|
devtoolsFormLinks,
|
|
1743
1834
|
devtoolsOverrides,
|
|
1744
1835
|
});
|
|
1745
|
-
const flags = getQueryFeatureUsage(options);
|
|
1746
1836
|
const execute = options.executeFactory({
|
|
1747
1837
|
deps,
|
|
1748
1838
|
state,
|
|
@@ -1757,7 +1847,7 @@ const createBaseQuery = (options) => {
|
|
|
1757
1847
|
deps,
|
|
1758
1848
|
};
|
|
1759
1849
|
applyQueryFeatures(options.features, featureFnContext);
|
|
1760
|
-
maybeExecute({ execute, flags });
|
|
1850
|
+
maybeExecute({ execute, flags, state });
|
|
1761
1851
|
const query = createQueryObject({ state, execute, deps });
|
|
1762
1852
|
// Only ever non-null while the devtools are installed, so this whole block - the entry and the
|
|
1763
1853
|
// per-response payload measuring behind it - is dead code in an app without them.
|
|
@@ -1810,6 +1900,43 @@ const createBaseQuery = (options) => {
|
|
|
1810
1900
|
});
|
|
1811
1901
|
};
|
|
1812
1902
|
|
|
1903
|
+
const createQueryExecutionAborter = (state) => {
|
|
1904
|
+
const read = () => ({
|
|
1905
|
+
rawResponse: state.rawResponse(),
|
|
1906
|
+
error: state.error(),
|
|
1907
|
+
latestHttpEvent: state.latestHttpEvent(),
|
|
1908
|
+
});
|
|
1909
|
+
let settled = untracked(read);
|
|
1910
|
+
const aborted$ = new Subject();
|
|
1911
|
+
const capture = () => untracked(() => {
|
|
1912
|
+
if (state.loading() === null)
|
|
1913
|
+
settled = read();
|
|
1914
|
+
});
|
|
1915
|
+
// Executions the query did not start itself (a refresh, an invalidation) re-run the bound request
|
|
1916
|
+
// without passing through `capture`.
|
|
1917
|
+
state.events$
|
|
1918
|
+
.pipe(filter((event) => event.type === HttpEventType.Response || event.type === 'error'))
|
|
1919
|
+
.subscribe(capture);
|
|
1920
|
+
const abort = (cancelPending) => untracked(() => {
|
|
1921
|
+
const wasLoading = state.loading() !== null;
|
|
1922
|
+
const request = state.subtle.request();
|
|
1923
|
+
const isRequestActive = !!request?.loading();
|
|
1924
|
+
if (!wasLoading && !isRequestActive)
|
|
1925
|
+
return false;
|
|
1926
|
+
cancelPending?.();
|
|
1927
|
+
aborted$.next();
|
|
1928
|
+
request?.subtle.abort();
|
|
1929
|
+
// `state.error` is derived from `state.rawResponse`, so a write to the response resets an
|
|
1930
|
+
// error set before it. Restore the response first.
|
|
1931
|
+
state.rawResponse.set(settled.rawResponse);
|
|
1932
|
+
state.error.set(settled.error);
|
|
1933
|
+
state.latestHttpEvent.set(settled.latestHttpEvent);
|
|
1934
|
+
state.loading.set(null);
|
|
1935
|
+
return true;
|
|
1936
|
+
});
|
|
1937
|
+
return { capture, abort, aborted$: aborted$.asObservable() };
|
|
1938
|
+
};
|
|
1939
|
+
|
|
1813
1940
|
/** Resolves a {@link QueryHeadersInput} to `HttpHeaders`, or `undefined` when none is given. */
|
|
1814
1941
|
const resolveQueryHeaders = (input) => {
|
|
1815
1942
|
const headers = typeof input === 'function' ? input() : input;
|
|
@@ -1977,13 +2104,17 @@ const circularQueryDependencyChecker = () => {
|
|
|
1977
2104
|
const createExecuteFn = (executeOptions) => {
|
|
1978
2105
|
const executeState = setupQueryExecuteState();
|
|
1979
2106
|
const circularChecker = circularQueryDependencyChecker();
|
|
1980
|
-
const
|
|
1981
|
-
const
|
|
2107
|
+
const aborter = createQueryExecutionAborter(executeOptions.state);
|
|
2108
|
+
const reset = () => untracked(() => resetExecuteState({ executeState, executeOptions }));
|
|
2109
|
+
const exec = (executeArgs) => untracked(() => {
|
|
1982
2110
|
const { args = executeOptions.state.args(), options } = executeArgs ?? {};
|
|
1983
2111
|
circularChecker.check(args);
|
|
2112
|
+
aborter.capture();
|
|
1984
2113
|
queryExecute({ executeOptions, executeState, args, options });
|
|
1985
|
-
};
|
|
2114
|
+
});
|
|
1986
2115
|
exec['reset'] = reset;
|
|
2116
|
+
exec['abort'] = () => aborter.abort();
|
|
2117
|
+
exec['aborted$'] = aborter.aborted$;
|
|
1987
2118
|
exec['currentRepositoryKey'] = executeState.previousKey.asReadonly();
|
|
1988
2119
|
return exec;
|
|
1989
2120
|
};
|
|
@@ -2032,6 +2163,8 @@ const createQueryCreator = (options, internals) => createBaseQueryCreator({
|
|
|
2032
2163
|
|
|
2033
2164
|
const createBaseQueryCreator = (config) => {
|
|
2034
2165
|
function queryCreator(...args) {
|
|
2166
|
+
if (getActiveConsumer() !== null)
|
|
2167
|
+
throw queryCreatedInReactiveContext();
|
|
2035
2168
|
const { features, queryConfig } = splitQueryConfig(args);
|
|
2036
2169
|
return config.queryFactory({
|
|
2037
2170
|
creator: config.options,
|
|
@@ -2183,6 +2316,12 @@ const decryptBearer$1 = (token) => {
|
|
|
2183
2316
|
}
|
|
2184
2317
|
};
|
|
2185
2318
|
|
|
2319
|
+
/**
|
|
2320
|
+
* `true` on every request `@ethlete/query` sends through `HttpClient`, so an app interceptor can skip
|
|
2321
|
+
* query requests: `if (req.context.get(IS_QUERY_REQUEST)) return next(req);`.
|
|
2322
|
+
*/
|
|
2323
|
+
const IS_QUERY_REQUEST = /* @__PURE__ */ new HttpContextToken(() => false);
|
|
2324
|
+
|
|
2186
2325
|
const SPEED_BUFFER_TIME_IN_MS = 2000;
|
|
2187
2326
|
/**
|
|
2188
2327
|
* The `statusText` of a response the devtools served instead of sending the request. It is what a log, a
|
|
@@ -2249,6 +2388,7 @@ const createHttpRequest = (options) => {
|
|
|
2249
2388
|
transferCache: clientOptions?.transferCache,
|
|
2250
2389
|
responseType: clientOptions?.responseType || 'json',
|
|
2251
2390
|
headers,
|
|
2391
|
+
context: new HttpContext().set(IS_QUERY_REQUEST, true),
|
|
2252
2392
|
});
|
|
2253
2393
|
/**
|
|
2254
2394
|
* Wraps the request in the fault the devtools have armed for this client, if any.
|
|
@@ -2649,18 +2789,18 @@ const createQueryStack = (options) => {
|
|
|
2649
2789
|
const responses = queries().map((q) => q.response());
|
|
2650
2790
|
return transform?.(responses) ?? responses;
|
|
2651
2791
|
});
|
|
2652
|
-
const execute = (options) => {
|
|
2792
|
+
const execute = (options) => untracked(() => {
|
|
2653
2793
|
for (const query of queries()) {
|
|
2654
2794
|
query.execute({ options: { allowCache: options?.allowCache } });
|
|
2655
2795
|
}
|
|
2656
|
-
};
|
|
2657
|
-
const retryFailed = () => {
|
|
2796
|
+
});
|
|
2797
|
+
const retryFailed = () => untracked(() => {
|
|
2658
2798
|
for (const query of queries()) {
|
|
2659
2799
|
if (query.error()) {
|
|
2660
2800
|
query.execute({ options: { allowCache: false } });
|
|
2661
2801
|
}
|
|
2662
2802
|
}
|
|
2663
|
-
};
|
|
2803
|
+
});
|
|
2664
2804
|
const stack = {
|
|
2665
2805
|
queries: queries.asReadonly(),
|
|
2666
2806
|
lastQuery: lastQuery.asReadonly(),
|
|
@@ -2923,7 +3063,7 @@ const createPagedQueryStack = (options) => {
|
|
|
2923
3063
|
return stack.queries().length === 1 && !!stack.lastQuery()?.loading();
|
|
2924
3064
|
}, /* @ts-ignore */
|
|
2925
3065
|
...(ngDevMode ? [{ debugName: "isFirstLoad" }] : /* istanbul ignore next */ []));
|
|
2926
|
-
const execute = (options) => {
|
|
3066
|
+
const execute = (options) => untracked(() => {
|
|
2927
3067
|
const whereFn = options?.where;
|
|
2928
3068
|
if (whereFn) {
|
|
2929
3069
|
const queriesToExecute = new Set();
|
|
@@ -2960,7 +3100,7 @@ const createPagedQueryStack = (options) => {
|
|
|
2960
3100
|
else {
|
|
2961
3101
|
stack.execute({ allowCache: options?.allowCache });
|
|
2962
3102
|
}
|
|
2963
|
-
};
|
|
3103
|
+
});
|
|
2964
3104
|
const pagedQuery = {
|
|
2965
3105
|
maxPagination,
|
|
2966
3106
|
minPagination,
|
|
@@ -4939,6 +5079,7 @@ const EXPIRED_TOKEN_WAIT_MS = 5000;
|
|
|
4939
5079
|
const createSecureExecuteFactory = (options) => {
|
|
4940
5080
|
const executeState = setupQueryExecuteState();
|
|
4941
5081
|
const circularChecker = circularQueryDependencyChecker();
|
|
5082
|
+
const aborter = createQueryExecutionAborter(options.state);
|
|
4942
5083
|
let authQuerySubscription = Subscription.EMPTY;
|
|
4943
5084
|
let tokenRefreshSubscription = Subscription.EMPTY;
|
|
4944
5085
|
let tokenWaitSubscription = Subscription.EMPTY;
|
|
@@ -4948,7 +5089,7 @@ const createSecureExecuteFactory = (options) => {
|
|
|
4948
5089
|
/** The access token the last request went out with - what the 401 retry below compares against. */
|
|
4949
5090
|
let lastRequestedWithToken = null;
|
|
4950
5091
|
const error$ = toObservable(options.state.error, { injector: options.deps.injector });
|
|
4951
|
-
const
|
|
5092
|
+
const cancelPending = () => {
|
|
4952
5093
|
authQuerySubscription.unsubscribe();
|
|
4953
5094
|
authQuerySubscription = Subscription.EMPTY;
|
|
4954
5095
|
tokenRefreshSubscription.unsubscribe();
|
|
@@ -4957,6 +5098,9 @@ const createSecureExecuteFactory = (options) => {
|
|
|
4957
5098
|
tokenWaitSubscription = Subscription.EMPTY;
|
|
4958
5099
|
sessionRestartSubscription.unsubscribe();
|
|
4959
5100
|
sessionRestartSubscription = Subscription.EMPTY;
|
|
5101
|
+
};
|
|
5102
|
+
const reset = () => {
|
|
5103
|
+
cancelPending();
|
|
4960
5104
|
resetExecuteState({
|
|
4961
5105
|
executeState,
|
|
4962
5106
|
executeOptions: { deps: options.deps, state: options.state },
|
|
@@ -5057,14 +5201,8 @@ const createSecureExecuteFactory = (options) => {
|
|
|
5057
5201
|
circularChecker.check(execArgsWithDefaults.args);
|
|
5058
5202
|
hasExecuted = true;
|
|
5059
5203
|
lastExecuteArgs = execArgsWithDefaults;
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
tokenRefreshSubscription.unsubscribe();
|
|
5063
|
-
tokenRefreshSubscription = Subscription.EMPTY;
|
|
5064
|
-
tokenWaitSubscription.unsubscribe();
|
|
5065
|
-
tokenWaitSubscription = Subscription.EMPTY;
|
|
5066
|
-
sessionRestartSubscription.unsubscribe();
|
|
5067
|
-
sessionRestartSubscription = Subscription.EMPTY;
|
|
5204
|
+
cancelPending();
|
|
5205
|
+
aborter.capture();
|
|
5068
5206
|
// Retrying with the token that just produced the 401 would 401 again, and that 401 asks for
|
|
5069
5207
|
// another refresh - an endless refresh/retry loop for as long as the server keeps handing out
|
|
5070
5208
|
// tokens it rejects. A refresh that did not change the access token is therefore not a reason to
|
|
@@ -5134,9 +5272,12 @@ const createSecureExecuteFactory = (options) => {
|
|
|
5134
5272
|
throw invalidStateInsideSecureExecuteFactory();
|
|
5135
5273
|
}
|
|
5136
5274
|
};
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5275
|
+
const untrackedExec = (executeArgs) => untracked(() => exec(executeArgs));
|
|
5276
|
+
untrackedExec['reset'] = () => untracked(reset);
|
|
5277
|
+
untrackedExec['abort'] = () => aborter.abort(cancelPending);
|
|
5278
|
+
untrackedExec['aborted$'] = aborter.aborted$;
|
|
5279
|
+
untrackedExec['currentRepositoryKey'] = executeState.previousKey.asReadonly();
|
|
5280
|
+
return untrackedExec;
|
|
5140
5281
|
};
|
|
5141
5282
|
|
|
5142
5283
|
const createSecureExecuteFn = (executeOptions) => {
|
|
@@ -5207,26 +5348,40 @@ const createPatchQuery = /* @__PURE__ */ createQueryTemplate('PATCH');
|
|
|
5207
5348
|
/** A query creator that creates a secure PATCH query (requires authentication) */
|
|
5208
5349
|
const createSecurePatchQuery = /* @__PURE__ */ createSecureQueryTemplate('PATCH');
|
|
5209
5350
|
|
|
5351
|
+
const isAbortedSnapshot = (snapshot) => snapshot.latestHttpEvent()?.type === 'cancel' && snapshot.error() === null;
|
|
5352
|
+
const executeAndSettle$ = (query, executeArgs, emitAborted) => defer(() => {
|
|
5353
|
+
query.execute(executeArgs);
|
|
5354
|
+
const snapshot = query.createSnapshot();
|
|
5355
|
+
return snapshot.isAlive.asObservable().pipe(filter((isAlive) => !isAlive), take(1),
|
|
5356
|
+
// The stream completes without emitting when the query's injector is torn down mid-execution.
|
|
5357
|
+
defaultIfEmpty(false), map(() => snapshot), filter((settled) => emitAborted || !untracked(() => isAbortedSnapshot(settled))), finalize(() => untracked(() => {
|
|
5358
|
+
if (snapshot.isAlive())
|
|
5359
|
+
query.abort();
|
|
5360
|
+
})));
|
|
5361
|
+
});
|
|
5210
5362
|
/**
|
|
5211
|
-
* Executes the query and
|
|
5212
|
-
*
|
|
5213
|
-
* `response()` / `error()` you read
|
|
5363
|
+
* Executes the query on subscribe and emits once that execution has settled (response or error
|
|
5364
|
+
* received), then completes. Cold: nothing is sent until it is subscribed to. The emitted snapshot is
|
|
5365
|
+
* frozen to that execution, so a later execution can't swap the `response()` / `error()` you read.
|
|
5214
5366
|
*
|
|
5215
|
-
*
|
|
5216
|
-
* `
|
|
5367
|
+
* Unsubscribing before it settles aborts the execution like `query.abort()`, the way unsubscribing
|
|
5368
|
+
* from `HttpClient` cancels its request. An execution stopped by `query.abort()` completes the stream
|
|
5369
|
+
* without a value.
|
|
5217
5370
|
*
|
|
5218
5371
|
* A cancelled execution settles too - the entry was evicted, unbound by a logout, or the scope that
|
|
5219
5372
|
* owns the query was destroyed. The snapshot then reports the execution as a failure whose error
|
|
5220
5373
|
* says the request was cancelled, and its `latestHttpEvent()` is `{ type: 'cancel' }`.
|
|
5221
5374
|
*/
|
|
5222
|
-
const executeUntilSettled =
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
}
|
|
5375
|
+
const executeUntilSettled$ = (query, executeArgs) => executeAndSettle$(query, executeArgs, false);
|
|
5376
|
+
/**
|
|
5377
|
+
* The Promise form of {@link executeUntilSettled$}, for APIs that require an `async` function - e.g. a
|
|
5378
|
+
* signal-forms `submit()` action mapping server violations onto the form via
|
|
5379
|
+
* `mapViolationsToFormErrors`. Executes immediately. Prefer {@link executeUntilSettled$} in RxJS code.
|
|
5380
|
+
*
|
|
5381
|
+
* An execution stopped by `query.abort()` resolves with a snapshot that has no response, no error, a
|
|
5382
|
+
* `null` `executionState()` and `latestHttpEvent()` `{ type: 'cancel' }`.
|
|
5383
|
+
*/
|
|
5384
|
+
const executeUntilSettled = (query, executeArgs) => firstValueFrom(executeAndSettle$(query, executeArgs, true));
|
|
5230
5385
|
|
|
5231
5386
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5232
5387
|
const createSequenceState = () => ({
|
|
@@ -5726,7 +5881,7 @@ const setupBearerQueryRegistry = (builders, context) => {
|
|
|
5726
5881
|
// entry and a repository binding holding the request and response bodies - creating one per login
|
|
5727
5882
|
// attempt or token refresh grows all of that for as long as the tab lives.
|
|
5728
5883
|
let query = null;
|
|
5729
|
-
const execute = (args, options) => {
|
|
5884
|
+
const execute = (args, options) => untracked(() => {
|
|
5730
5885
|
query ??= builder.config.queryCreator({ onlyManualExecution: true, injector });
|
|
5731
5886
|
query.execute({ args, options });
|
|
5732
5887
|
const snapshot = query.createSnapshot();
|
|
@@ -5745,7 +5900,7 @@ const setupBearerQueryRegistry = (builders, context) => {
|
|
|
5745
5900
|
currentExecution.set({ id: isRevocation ? null : ++latestExecutionId, type: stateType, snapshot });
|
|
5746
5901
|
querySnapshot.set(snapshot);
|
|
5747
5902
|
return snapshot;
|
|
5748
|
-
};
|
|
5903
|
+
});
|
|
5749
5904
|
queries[builder.key] = {
|
|
5750
5905
|
execute,
|
|
5751
5906
|
snapshot: querySnapshot.asReadonly(),
|
|
@@ -8332,16 +8487,20 @@ let envState = null;
|
|
|
8332
8487
|
let authState = null;
|
|
8333
8488
|
/** What the pill on the page renders, or `null` while there is none. */
|
|
8334
8489
|
let renderedKey = null;
|
|
8490
|
+
let providedNonce = null;
|
|
8491
|
+
/** Until the application provides `CSP_NONCE`, falls back to where Angular's own default reads it from. */
|
|
8492
|
+
const nonceOf = (doc) => providedNonce ?? doc.body?.querySelector('[ngCspNonce]')?.getAttribute('ngCspNonce') ?? null;
|
|
8335
8493
|
/**
|
|
8336
8494
|
* Everything the pill renders, as one string. Every access-token rotation syncs the session pill
|
|
8337
8495
|
* again, and a rebuild would close an open dropdown under whoever opened it - so a sync that renders
|
|
8338
8496
|
* the same thing must leave the DOM alone. Whatever `render()` reads has to be in here. The callbacks
|
|
8339
8497
|
* are not: they are new objects on every sync, and they read their own state when they run.
|
|
8340
8498
|
*/
|
|
8341
|
-
const keyOf$1 = (switches, rows, collapsed) => JSON.stringify([
|
|
8499
|
+
const keyOf$1 = (switches, rows, collapsed, nonce) => JSON.stringify([
|
|
8342
8500
|
switches,
|
|
8343
8501
|
rows.map(({ name, current, tabLocal, options }) => [name, current, tabLocal, options]),
|
|
8344
8502
|
collapsed,
|
|
8503
|
+
nonce,
|
|
8345
8504
|
]);
|
|
8346
8505
|
const buildAuthRow = (doc, row) => {
|
|
8347
8506
|
const pill = doc.createElement('div');
|
|
@@ -8421,9 +8580,10 @@ const render = (doc) => {
|
|
|
8421
8580
|
const production = switches.some((apiSwitch) => resolvedEnvOf(apiSwitch, storedOf(apiSwitch))?.production === true);
|
|
8422
8581
|
// A production pick unfolds the pills whatever is stored: the warning is the point of the pill.
|
|
8423
8582
|
const collapsed = !production && readCollapsed();
|
|
8583
|
+
const nonce = nonceOf(doc);
|
|
8424
8584
|
const paints = (switches.length > 0 || rows.length > 0) && queryDevtoolsPillsAllowed();
|
|
8425
8585
|
const key = paints
|
|
8426
|
-
? keyOf$1(switches.map((apiSwitch) => [apiSwitch, storedOf(apiSwitch)]), rows, collapsed)
|
|
8586
|
+
? keyOf$1(switches.map((apiSwitch) => [apiSwitch, storedOf(apiSwitch)]), rows, collapsed, nonce)
|
|
8427
8587
|
: null;
|
|
8428
8588
|
const painted = doc.getElementById(HOST_ID);
|
|
8429
8589
|
if (painted && key !== null && key === renderedKey)
|
|
@@ -8438,6 +8598,8 @@ const render = (doc) => {
|
|
|
8438
8598
|
// host application's page and must be as isolated from its global CSS (resets, Tailwind) as possible.
|
|
8439
8599
|
const shadow = host.attachShadow({ mode: 'open' });
|
|
8440
8600
|
const style = doc.createElement('style');
|
|
8601
|
+
if (nonce)
|
|
8602
|
+
style.setAttribute('nonce', nonce);
|
|
8441
8603
|
style.textContent = STYLE;
|
|
8442
8604
|
shadow.append(style);
|
|
8443
8605
|
if (collapsed)
|
|
@@ -8486,6 +8648,14 @@ const renderPills = () => {
|
|
|
8486
8648
|
else
|
|
8487
8649
|
doc.addEventListener('DOMContentLoaded', () => render(doc), { once: true });
|
|
8488
8650
|
};
|
|
8651
|
+
/**
|
|
8652
|
+
* Hands the pills the application's `CSP_NONCE`, so their stylesheet passes a strict `style-src`.
|
|
8653
|
+
* @internal
|
|
8654
|
+
*/
|
|
8655
|
+
const setQueryDevtoolsPillNonce = (nonce) => {
|
|
8656
|
+
providedNonce = nonce;
|
|
8657
|
+
renderPills();
|
|
8658
|
+
};
|
|
8489
8659
|
/**
|
|
8490
8660
|
* Declares the API env part of the pill. Called by `setQueryDevtoolsApiEnvs()`.
|
|
8491
8661
|
* @internal
|
|
@@ -10512,7 +10682,7 @@ const armQueryDevtoolsOverrideTransfer = (recorder, ops) => {
|
|
|
10512
10682
|
|
|
10513
10683
|
// Generated from package.json by tools/scripts/generate-version.js - do not edit.
|
|
10514
10684
|
/** The version of `@ethlete/query` this build was cut from. */
|
|
10515
|
-
const QUERY_VERSION = '6.0.0-next.
|
|
10685
|
+
const QUERY_VERSION = '6.0.0-next.52';
|
|
10516
10686
|
|
|
10517
10687
|
/** How deep a schema is expanded before a nested branch is given up on. */
|
|
10518
10688
|
const MAX_DEPTH = 12;
|
|
@@ -11795,6 +11965,7 @@ const ONE_TIME_OPTIONS = ['about', 'apiEnvs', 'authAccounts', 'responseHistory',
|
|
|
11795
11965
|
// repeating timer, so it is never stable and the pills would never go.
|
|
11796
11966
|
const settleThePillsOnFirstRender = () => provideEnvironmentInitializer(() => {
|
|
11797
11967
|
const destroyRef = inject(DestroyRef);
|
|
11968
|
+
setQueryDevtoolsPillNonce(inject(CSP_NONCE, { optional: true }));
|
|
11798
11969
|
afterNextRender(() => {
|
|
11799
11970
|
const settle = setTimeout(markQueryDevtoolsAppSettled, PILL_SETTLE_GRACE_MS);
|
|
11800
11971
|
destroyRef.onDestroy(() => clearTimeout(settle));
|
|
@@ -11913,6 +12084,7 @@ const gql = (strings, ...values) => {
|
|
|
11913
12084
|
const createGqlExecuteFn = (executeOptions) => {
|
|
11914
12085
|
const executeState = setupQueryExecuteState();
|
|
11915
12086
|
const circularChecker = circularQueryDependencyChecker();
|
|
12087
|
+
const aborter = createQueryExecutionAborter(executeOptions.state);
|
|
11916
12088
|
const reset = () => resetExecuteState({ executeState, executeOptions });
|
|
11917
12089
|
const exec = (executeArgs) => {
|
|
11918
12090
|
const { args = executeOptions.state.args(), options } = executeArgs ?? {};
|
|
@@ -11946,6 +12118,7 @@ const createGqlExecuteFn = (executeOptions) => {
|
|
|
11946
12118
|
queryConfig: executeOptions.queryConfig,
|
|
11947
12119
|
state: executeOptions.state,
|
|
11948
12120
|
};
|
|
12121
|
+
aborter.capture();
|
|
11949
12122
|
queryExecute({
|
|
11950
12123
|
executeOptions: normalizedOpts,
|
|
11951
12124
|
executeState,
|
|
@@ -11955,6 +12128,8 @@ const createGqlExecuteFn = (executeOptions) => {
|
|
|
11955
12128
|
});
|
|
11956
12129
|
};
|
|
11957
12130
|
exec['reset'] = reset;
|
|
12131
|
+
exec['abort'] = () => aborter.abort();
|
|
12132
|
+
exec['aborted$'] = aborter.aborted$;
|
|
11958
12133
|
exec['currentRepositoryKey'] = executeState.previousKey.asReadonly();
|
|
11959
12134
|
return exec;
|
|
11960
12135
|
};
|
|
@@ -12684,24 +12859,39 @@ function toQuerySignal(source, options) {
|
|
|
12684
12859
|
* @deprecated Part of the legacy (v2) query system. Migrate to the current query API - see https://ethlete-sdk-docs.web.app/query/migrating-from-v2, and run `nx g @ethlete/query:migrate-to-query-v3` to rewrite the mechanical parts. Intent to remove in v7.
|
|
12685
12860
|
*/
|
|
12686
12861
|
function effectComputed(computation, injector) {
|
|
12687
|
-
|
|
12688
|
-
try {
|
|
12689
|
-
initialData = runInInjectionContext(injector, () => computation());
|
|
12690
|
-
}
|
|
12691
|
-
catch {
|
|
12692
|
-
// Ignore errors in the initial computation
|
|
12693
|
-
// Angular might throw an error if required inputs are read but not available yet
|
|
12694
|
-
}
|
|
12695
|
-
const lastResult = signal(initialData, /* @ts-ignore */
|
|
12862
|
+
const lastResult = signal(null, /* @ts-ignore */
|
|
12696
12863
|
...(ngDevMode ? [{ debugName: "lastResult" }] : /* istanbul ignore next */ []));
|
|
12697
|
-
|
|
12864
|
+
const rerun = signal(0, /* @ts-ignore */
|
|
12865
|
+
...(ngDevMode ? [{ debugName: "rerun" }] : /* istanbul ignore next */ []));
|
|
12866
|
+
const createComputationWatch = () => createWatch(() => {
|
|
12698
12867
|
const data = runInInjectionContext(injector, () => computation());
|
|
12699
12868
|
untracked(() => {
|
|
12700
12869
|
if (data === lastResult())
|
|
12701
12870
|
return;
|
|
12702
12871
|
lastResult.set(data);
|
|
12703
12872
|
});
|
|
12873
|
+
}, () => rerun.update((count) => count + 1), true);
|
|
12874
|
+
let watch = createComputationWatch();
|
|
12875
|
+
let initialRunFailed = false;
|
|
12876
|
+
try {
|
|
12877
|
+
watch.run();
|
|
12878
|
+
}
|
|
12879
|
+
catch {
|
|
12880
|
+
// Angular throws for a required input read before it is set; the effect's first run retries.
|
|
12881
|
+
initialRunFailed = true;
|
|
12882
|
+
}
|
|
12883
|
+
effect(() => {
|
|
12884
|
+
rerun();
|
|
12885
|
+
untracked(() => {
|
|
12886
|
+
if (initialRunFailed) {
|
|
12887
|
+
initialRunFailed = false;
|
|
12888
|
+
watch.destroy();
|
|
12889
|
+
watch = createComputationWatch();
|
|
12890
|
+
}
|
|
12891
|
+
watch.run();
|
|
12892
|
+
});
|
|
12704
12893
|
}, { injector });
|
|
12894
|
+
injector.get(DestroyRef).onDestroy(() => watch.destroy());
|
|
12705
12895
|
return lastResult.asReadonly();
|
|
12706
12896
|
}
|
|
12707
12897
|
/**
|
|
@@ -12722,7 +12912,13 @@ function queryComputed(computation, options) {
|
|
|
12722
12912
|
*/
|
|
12723
12913
|
function queryComputedTillTruthy(computation, options) {
|
|
12724
12914
|
const injector = options?.injector ?? inject(Injector);
|
|
12725
|
-
|
|
12915
|
+
let first = null;
|
|
12916
|
+
const c = computedTillTruthy(effectComputed(() => {
|
|
12917
|
+
if (first)
|
|
12918
|
+
return first;
|
|
12919
|
+
first = computation() || null;
|
|
12920
|
+
return first;
|
|
12921
|
+
}, injector));
|
|
12726
12922
|
const obs = toObservable(c, options);
|
|
12727
12923
|
addQueryContainerHandling(obs, () => c(), options);
|
|
12728
12924
|
return c;
|
|
@@ -13352,6 +13548,8 @@ class LegacyQuery {
|
|
|
13352
13548
|
this._isPollingPaused = false;
|
|
13353
13549
|
this.isDestroyed = false;
|
|
13354
13550
|
this._triggeredVia = 'program';
|
|
13551
|
+
this._lastExecuteCalledAt = 0;
|
|
13552
|
+
this._ownLoadExecuteTime = null;
|
|
13355
13553
|
this._wasAborted = false;
|
|
13356
13554
|
if (this._isInert) {
|
|
13357
13555
|
this.state$ = of(transformExecStateToQueryState(null));
|
|
@@ -13397,12 +13595,25 @@ class LegacyQuery {
|
|
|
13397
13595
|
* never run. The abort flag is the only thing that tells the two apart.
|
|
13398
13596
|
*/
|
|
13399
13597
|
toQueryState(execState) {
|
|
13400
|
-
const state = transformExecStateToQueryState(execState, this.
|
|
13598
|
+
const state = transformExecStateToQueryState(execState, this.triggerOf(execState));
|
|
13401
13599
|
if (execState || !this._wasAborted) {
|
|
13402
13600
|
return state;
|
|
13403
13601
|
}
|
|
13404
13602
|
return { type: QueryStateType.Cancelled, meta: state.meta };
|
|
13405
13603
|
}
|
|
13604
|
+
/**
|
|
13605
|
+
* A load this wrapper did not start - a `refreshQueriesInUse()`, an invalidation - reports as `auto`, the way
|
|
13606
|
+
* v2 reported its background refreshes.
|
|
13607
|
+
*/
|
|
13608
|
+
triggerOf(execState) {
|
|
13609
|
+
if (execState?.type !== 'loading')
|
|
13610
|
+
return this._triggeredVia;
|
|
13611
|
+
const { executeTime } = execState.loading;
|
|
13612
|
+
if (this._ownLoadExecuteTime === null && executeTime >= this._lastExecuteCalledAt) {
|
|
13613
|
+
this._ownLoadExecuteTime = executeTime;
|
|
13614
|
+
}
|
|
13615
|
+
return executeTime === this._ownLoadExecuteTime ? this._triggeredVia : 'auto';
|
|
13616
|
+
}
|
|
13406
13617
|
get isExpired() {
|
|
13407
13618
|
return this.newQuery.subtle.request()?.isStale();
|
|
13408
13619
|
}
|
|
@@ -13459,11 +13670,16 @@ class LegacyQuery {
|
|
|
13459
13670
|
}
|
|
13460
13671
|
this._triggeredVia = options._triggeredVia ?? 'program';
|
|
13461
13672
|
this._wasAborted = false;
|
|
13673
|
+
this._lastExecuteCalledAt = Date.now();
|
|
13674
|
+
this._ownLoadExecuteTime = null;
|
|
13462
13675
|
untracked(() =>
|
|
13463
13676
|
// v2 had a single `skipCache` for every method, so this cannot tell whether the underlying request is
|
|
13464
13677
|
// cacheable. The creator is built with `silenceUncacheableAllowCacheError`, which makes `allowCache` inert
|
|
13465
13678
|
// on a mutation instead of throwing ET301.
|
|
13466
13679
|
this.newQuery.execute({ args: this._arguments, options: { allowCache: options.skipCache !== true } }));
|
|
13680
|
+
const started = untracked(this.newQuery.executionState);
|
|
13681
|
+
if (started?.type === 'loading')
|
|
13682
|
+
this._ownLoadExecuteTime = started.loading.executeTime;
|
|
13467
13683
|
return this;
|
|
13468
13684
|
}
|
|
13469
13685
|
abort() {
|
|
@@ -13611,6 +13827,7 @@ const createInertQuery = () => {
|
|
|
13611
13827
|
execute: noop,
|
|
13612
13828
|
createSnapshot,
|
|
13613
13829
|
reset: noop,
|
|
13830
|
+
abort: () => false,
|
|
13614
13831
|
asReadonly: () => ({ ...base, createSnapshot }),
|
|
13615
13832
|
subtle: {
|
|
13616
13833
|
destroy: noop,
|
|
@@ -15018,7 +15235,6 @@ class InfinityQueryDirective {
|
|
|
15018
15235
|
this.cdr = inject(ChangeDetectorRef);
|
|
15019
15236
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
15020
15237
|
this.mainTemplateRef = inject((TemplateRef));
|
|
15021
|
-
this.errorHandler = inject(ErrorHandler);
|
|
15022
15238
|
this.injector = inject(Injector);
|
|
15023
15239
|
this.infinityQueryResponseDelay = injectInfinityQueryResponseDelay({ host: true });
|
|
15024
15240
|
this._data$ = new BehaviorSubject([]);
|
|
@@ -15082,9 +15298,6 @@ class InfinityQueryDirective {
|
|
|
15082
15298
|
this.viewContext.loading = false;
|
|
15083
15299
|
this.viewContext.error = state.error;
|
|
15084
15300
|
this.viewContext.isFirstLoad = false;
|
|
15085
|
-
if (isLegacyQuery(currentQuery)) {
|
|
15086
|
-
this.errorHandler.handleError(state.error.httpErrorResponse);
|
|
15087
|
-
}
|
|
15088
15301
|
}
|
|
15089
15302
|
else if (isQueryStateSuccess(state)) {
|
|
15090
15303
|
this.viewContext.loading = false;
|
|
@@ -15226,7 +15439,6 @@ class QueryDirective {
|
|
|
15226
15439
|
return true;
|
|
15227
15440
|
}
|
|
15228
15441
|
constructor() {
|
|
15229
|
-
this.errorHandler = inject(ErrorHandler);
|
|
15230
15442
|
this.cdr = inject(ChangeDetectorRef);
|
|
15231
15443
|
this.viewContext = {
|
|
15232
15444
|
$implicit: null,
|
|
@@ -15289,9 +15501,6 @@ class QueryDirective {
|
|
|
15289
15501
|
}
|
|
15290
15502
|
if (isQueryStateFailure(state)) {
|
|
15291
15503
|
this.viewContext.error = state.error;
|
|
15292
|
-
if (isLegacyQuery(extractQuery(this.query()))) {
|
|
15293
|
-
this.errorHandler.handleError(state.error.httpErrorResponse);
|
|
15294
|
-
}
|
|
15295
15504
|
}
|
|
15296
15505
|
else {
|
|
15297
15506
|
this.viewContext.error = null;
|
|
@@ -16658,6 +16867,7 @@ class QueryForm {
|
|
|
16658
16867
|
}), takeUntil(this.destroy$), takeUntil(this.unobserveTrigger$))
|
|
16659
16868
|
.subscribe();
|
|
16660
16869
|
let changedFieldsInLastResetLoop = [];
|
|
16870
|
+
let fieldsResetInResetLoop = new Set();
|
|
16661
16871
|
let currentUniqueChangedFields = [];
|
|
16662
16872
|
this.currentFormValue$
|
|
16663
16873
|
.pipe(map((currentValue) => {
|
|
@@ -16669,9 +16879,10 @@ class QueryForm {
|
|
|
16669
16879
|
if (options?.writeToQueryParams !== false) {
|
|
16670
16880
|
this._syncViaUrlQueryParams(currentValue, options?.replaceUrl);
|
|
16671
16881
|
}
|
|
16672
|
-
const
|
|
16673
|
-
?
|
|
16882
|
+
const resetFields = this.skipNextResets
|
|
16883
|
+
? []
|
|
16674
16884
|
: this._handleQueryFormResets(previousValue ?? null, currentValue);
|
|
16885
|
+
const didResetValues = resetFields.length > 0;
|
|
16675
16886
|
this.skipNextResets = false;
|
|
16676
16887
|
this.skipNextResetsFor = undefined;
|
|
16677
16888
|
const changedFields = Object.keys(currentValue).filter((key) => !equal(previousValue?.[key], currentValue[key]));
|
|
@@ -16682,8 +16893,11 @@ class QueryForm {
|
|
|
16682
16893
|
if (didResetValues) {
|
|
16683
16894
|
this.didValueChanges$.next(true);
|
|
16684
16895
|
changedFieldsInLastResetLoop = changedFields;
|
|
16896
|
+
resetFields.forEach((key) => fieldsResetInResetLoop.add(key));
|
|
16685
16897
|
}
|
|
16686
|
-
currentUniqueChangedFields = [...new Set(changedFields)];
|
|
16898
|
+
currentUniqueChangedFields = [...new Set(changedFields)].filter((key) => !fieldsResetInResetLoop.has(key));
|
|
16899
|
+
if (!didResetValues)
|
|
16900
|
+
fieldsResetInResetLoop = new Set();
|
|
16687
16901
|
}), switchMap(({ currentValue, previousValue }) => {
|
|
16688
16902
|
const skipDebounce = this.skipNextDebounce;
|
|
16689
16903
|
this.skipNextDebounce = false;
|
|
@@ -16708,6 +16922,8 @@ class QueryForm {
|
|
|
16708
16922
|
}), tap(({ currentValue, previousValue }) => {
|
|
16709
16923
|
if (changedFieldsInLastResetLoop.length)
|
|
16710
16924
|
return;
|
|
16925
|
+
if (equal(this._changes$.value.currentValue, currentValue))
|
|
16926
|
+
return;
|
|
16711
16927
|
this._changes$.next({
|
|
16712
16928
|
previousValue: previousValue ?? null,
|
|
16713
16929
|
currentValue: currentValue,
|
|
@@ -16843,7 +17059,7 @@ class QueryForm {
|
|
|
16843
17059
|
return this.form;
|
|
16844
17060
|
}
|
|
16845
17061
|
_handleQueryFormResets(previousValue, currentValue) {
|
|
16846
|
-
|
|
17062
|
+
const resetFields = [];
|
|
16847
17063
|
for (const formFieldKey in this._fields) {
|
|
16848
17064
|
const field = this._fields[formFieldKey];
|
|
16849
17065
|
if (!field)
|
|
@@ -16868,12 +17084,12 @@ class QueryForm {
|
|
|
16868
17084
|
continue;
|
|
16869
17085
|
}
|
|
16870
17086
|
this.form.controls[formFieldKey].setValue(defaultValueForKeyToReset);
|
|
16871
|
-
|
|
17087
|
+
resetFields.push(formFieldKey);
|
|
16872
17088
|
break;
|
|
16873
17089
|
}
|
|
16874
17090
|
}
|
|
16875
17091
|
}
|
|
16876
|
-
return
|
|
17092
|
+
return resetFields;
|
|
16877
17093
|
}
|
|
16878
17094
|
getDefaultValue(key) {
|
|
16879
17095
|
const val = this.defaultValues[key];
|
|
@@ -17062,20 +17278,16 @@ const buildDefaults = (fields) => {
|
|
|
17062
17278
|
};
|
|
17063
17279
|
const MAX_RESET_PASSES = 10;
|
|
17064
17280
|
const changedKeysBetween = (previous, current) => Object.keys(current).filter((key) => !equal(previous?.[key], current[key]));
|
|
17065
|
-
/**
|
|
17281
|
+
/** Reads a URL string into the type of the field's default; `null` means the default's type cannot hold it. */
|
|
17066
17282
|
const autoCoerce = (raw, defaultValue) => {
|
|
17067
17283
|
if (typeof raw !== 'string')
|
|
17068
17284
|
return raw;
|
|
17069
17285
|
if (Array.isArray(defaultValue))
|
|
17070
17286
|
return [raw];
|
|
17071
|
-
|
|
17072
|
-
const looksNumeric = raw.trim() === raw && !/^-?0\d/.test(raw) && !raw.endsWith('.') && !isNaN(Number(raw));
|
|
17073
|
-
if (defaultIsNumber || (looksNumeric && raw !== '')) {
|
|
17287
|
+
if (typeof defaultValue === 'number')
|
|
17074
17288
|
return transformToNumber(raw);
|
|
17075
|
-
|
|
17076
|
-
|
|
17077
|
-
return transformToBoolean(raw);
|
|
17078
|
-
}
|
|
17289
|
+
if (typeof defaultValue === 'boolean')
|
|
17290
|
+
return raw === 'true' ? true : raw === 'false' ? false : null;
|
|
17079
17291
|
return raw;
|
|
17080
17292
|
};
|
|
17081
17293
|
/** Shortest-debounce-wins; `null` means commit immediately. */
|
|
@@ -17721,34 +17933,32 @@ const normalizeConfig = (config) => {
|
|
|
17721
17933
|
isResetBy: isResetBy === undefined ? undefined : Array.isArray(isResetBy) ? isResetBy : [isResetBy],
|
|
17722
17934
|
};
|
|
17723
17935
|
};
|
|
17936
|
+
function queryField(config) {
|
|
17937
|
+
return {
|
|
17938
|
+
defaultValue: null,
|
|
17939
|
+
...normalizeConfig(config),
|
|
17940
|
+
};
|
|
17941
|
+
}
|
|
17724
17942
|
/**
|
|
17725
|
-
* A
|
|
17726
|
-
*
|
|
17727
|
-
*
|
|
17728
|
-
* @example
|
|
17729
|
-
* queryField<number>({ defaultValue: 1, isResetBy: ['search'] })
|
|
17730
|
-
*/
|
|
17731
|
-
const queryField = (config) => ({
|
|
17732
|
-
defaultValue: null,
|
|
17733
|
-
...normalizeConfig(config),
|
|
17734
|
-
});
|
|
17735
|
-
/**
|
|
17736
|
-
* A debounced free-text search field. Debounces typing by 300ms but applies
|
|
17737
|
-
* clearing immediately (`disableDebounceIfFalsy`). Reads the URL value back as the raw string.
|
|
17943
|
+
* A debounced free-text search field, typed `string` like every text control; `''` is empty and writes no
|
|
17944
|
+
* URL param. Debounces typing by 300ms but applies clearing immediately (`disableDebounceIfFalsy`). Not counted
|
|
17945
|
+
* by `activeFilterCount`, whatever its key.
|
|
17738
17946
|
*/
|
|
17739
17947
|
const searchQueryField = (config) => ({
|
|
17740
|
-
defaultValue:
|
|
17948
|
+
defaultValue: '',
|
|
17741
17949
|
debounce: 300,
|
|
17742
17950
|
disableDebounceIfFalsy: true,
|
|
17743
|
-
|
|
17951
|
+
skipInFilterCount: true,
|
|
17952
|
+
queryParamToValue: (raw) => (typeof raw === 'string' ? raw : ''),
|
|
17744
17953
|
...normalizeConfig(config),
|
|
17745
17954
|
});
|
|
17746
17955
|
/**
|
|
17747
|
-
* A sort field serialized as `"active:direction"` (e.g. `"name:asc"`).
|
|
17748
|
-
*
|
|
17956
|
+
* A sort field serialized as `"active:direction"` (e.g. `"name:asc"`). Not counted by `activeFilterCount`,
|
|
17957
|
+
* whatever its key.
|
|
17749
17958
|
*/
|
|
17750
17959
|
const sortQueryField = (config) => ({
|
|
17751
17960
|
defaultValue: null,
|
|
17961
|
+
skipInFilterCount: true,
|
|
17752
17962
|
queryParamToValue: transformToSort,
|
|
17753
17963
|
valueToQueryParam: transformToSortQueryParam,
|
|
17754
17964
|
...normalizeConfig(config),
|
|
@@ -17771,12 +17981,22 @@ const booleanArrayQueryField = (config) => ({
|
|
|
17771
17981
|
queryParamToValue: transformToBooleanArray,
|
|
17772
17982
|
...normalizeConfig(config),
|
|
17773
17983
|
});
|
|
17774
|
-
|
|
17775
|
-
|
|
17776
|
-
|
|
17777
|
-
|
|
17778
|
-
|
|
17779
|
-
|
|
17984
|
+
function dateQueryField(config) {
|
|
17985
|
+
if (config?.as === 'string') {
|
|
17986
|
+
const { as: _as, ...rest } = config;
|
|
17987
|
+
return {
|
|
17988
|
+
defaultValue: null,
|
|
17989
|
+
queryParamToValue: (raw) => (typeof raw === 'string' && raw !== '' ? raw : null),
|
|
17990
|
+
...normalizeConfig(rest),
|
|
17991
|
+
};
|
|
17992
|
+
}
|
|
17993
|
+
const { as: _as, ...rest } = config ?? {};
|
|
17994
|
+
return {
|
|
17995
|
+
defaultValue: null,
|
|
17996
|
+
queryParamToValue: transformToDate,
|
|
17997
|
+
...normalizeConfig(rest),
|
|
17998
|
+
};
|
|
17999
|
+
}
|
|
17780
18000
|
/** A field holding a list of dates. */
|
|
17781
18001
|
const dateArrayQueryField = (config) => ({
|
|
17782
18002
|
defaultValue: null,
|
|
@@ -18013,5 +18233,5 @@ const createWebSocketClient = (options) => {
|
|
|
18013
18233
|
* Generated bundle index. Do not edit.
|
|
18014
18234
|
*/
|
|
18015
18235
|
|
|
18016
|
-
export { AuthBearerRefreshStrategy, BasicAuthProvider, BearerAuthFeatureType, BooleanArrayQueryField, CustomHeaderAuthProvider, DEFAULT_KEEP_UNUSED_FOR, DEFAULT_QUERY_PERSISTENCE_MAX_AGE, DEFAULT_QUERY_PERSISTENCE_MAX_ENTRIES, DEFAULT_QUERY_PERSISTENCE_VERSION, DEFAULT_QUERY_PERSISTENCE_WRITE_DELAY, DateArrayQueryField, DateQueryField, EMPTY_QUERY_DEVTOOLS_FAULT, EntityStore, IGNORED_FILTER_COUNT_FIELDS, INFINITY_QUERY_TOKEN, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, LegacyQuery, LegacyQueryCreator, MAX_QUERY_BATCH_TOMBSTONES, MAX_QUERY_DEVTOOLS_TOMBSTONES, MAX_UNUSED_ENTRIES, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, QUERY_DEVTOOLS_FAULT_STATUSES, QUERY_DEVTOOLS_TOKEN_TTL_LIMIT, QUERY_PERSISTENCE_STORE_VERSION, QUERY_SYNC_PROTOCOL_VERSION, QUERY_VERSION, QueryClientFeatureType, QueryDevtoolsComponent, QueryDirective, QueryFeatureType, QueryField, QueryForm, QueryRuntimeErrorCode, QueryShortNamePipe, QueryStateType, QueryStore, SERVER_ERROR_KIND, SERVER_VIOLATION_ERROR_KIND, SPEED_BUFFER_TIME_IN_MS, SearchQueryField, SortQueryField, StringArrayQueryField, V2BearerAuthProvider, V2Query, V2QueryClient, V2QueryCreator, addQueryContainerHandling, addQueryDevtoolsAuthAccount, applyQueryDevtoolsOverrides, applyQueryDevtoolsTokenTtl, applyQueryFeatures, armAllQueryDevtoolsMocks, armQueryDevtoolsMock, armQueryDevtoolsOverrideTransfer, authExtractTokensResponseMissingAccessToken, authExtractTokensResponseMissingRefreshToken, authExtractTokensResponseNotObject, authProviderFeatureUsedMultipleTimes, booleanArrayQueryField, buildQueryCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, canOverrideQueryDevtoolsTokenTtl, castQueryCreatorTypes, circularQueryDependency, circularQueryDependencyChecker, clearQueryDevtoolsArmedMocks, clearQueryDevtoolsAuthCredentials, clearQueryDevtoolsAuthSessions, clearQueryDevtoolsFaults, clearQueryDevtoolsMockStore, clearQueryDevtoolsOverrideStore, clearQueryDevtoolsStore, clearQueryDevtoolsTokenTtl, clearQueryDevtoolsTombstones, clearRestoredQueryDevtoolsOverrides, collectLeafPaths, collectQueryDevtoolsSchemaComponents, collectQueryFormLinks, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, consumeSuppressQueryStackDevtools, contentfulGqlLikePaginationAdapter, countUnresolvedQueryDevtoolsOverrides, createAuthGuard, createBaseQuery, createBaseQueryCreator, createBearerAuthProvider, createDefaultRetryFn, createDeleteQuery, createExecuteFn, createGetQuery, createGqlExecuteFn, createGqlMutationViaGet, createGqlMutationViaPost, createGqlQuery, createGqlQueryCreator, createGqlQueryViaGet, createGqlQueryViaPost, createHeadQuery, createHttpRequest, createIndexedDbQueryPersistenceAdapter, createInfinityQueryConfig, createLegacyQueryCreator, createNoopQueryPersistenceAdapter, createOptionsQuery, createPagedQueryStack, createPatchQuery, createPersistentAuthFeature, createPostQuery, createPutQuery, createQuery, createQueryBatch, createQueryClient, createQueryCollection, createQueryCollectionSignal, createQueryCollectionSubject, createQueryContext, createQueryCreator, createQueryDevtoolsFormLinks, createQueryDevtoolsFormLinksRecorder, createQueryDevtoolsOverrides, createQueryDevtoolsOverridesRecorder, createQueryDevtoolsStats, createQueryDevtoolsStatsRecorder, createQueryErrorResponse, createQueryFeature, createQueryInvalidationFilter, createQueryKeyLockManager, createQueryObject, createQueryPersistenceEngine, createQueryRepository, createQuerySnapshotFn, createQueryStack, createQuerySubmission, createQuerySyncEngine, createQuerySyncTransport, createSecureDeleteQuery, createSecureExecuteFactory, createSecureExecuteFn, createSecureGetQuery, createSecureGqlExecuteFn, createSecureGqlMutationViaGet, createSecureGqlMutationViaPost, createSecureGqlQuery, createSecureGqlQueryCreator, createSecureGqlQueryViaGet, createSecureGqlQueryViaPost, createSecureHeadQuery, createSecureOptionsQuery, createSecurePatchQuery, createSecurePostQuery, createSecurePutQuery, createSecureQuery, createSecureQueryCreator, createTrackingFeature, createWebSocketClient, currentQueryDevtoolsBatch, dateArrayQueryField, dateQueryField, decryptBearer, deepFreeze, def, defineQueryForm, deleteQueryDevtoolsMock, describeQueryDevtoolsFeatures, detectContentTypeHeader, detectPaginationShape, dynLikePaginationAdapter, effectComputed, emptyQueryArgs, ethletePaginationAdapter, executeUntilSettled, extractExpiresInSeconds, extractFormViolations, extractHtmlErrorMessage, extractQuery, fakePaginationAdapter, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, forgetQueryDevtoolsAuthSession, forgetQueryDevtoolsAuthSessionsFor, formatQueryDevtoolsDuration, generateQueryDevtoolsNumberPreset, generateQueryDevtoolsSampleNumber, generateQueryDevtoolsStringPreset, getBearerAuthProviderName, getDefaultHeaders, getQueryClientName, getQueryFeatureUsage, getResponseUrl, ggLikePaginationAdapter, gql, gqlDataPropertyMissingInResponse, gqlErrorsInResponse, gqlTransformerFor, hasHeader, hasQueryDevtoolsOverridesAtPath, htmlErrorPayload, htmlQueryErrorParser, ignoreAutoRefresh, initQueryDevtoolsAuthSessions, initQueryDevtoolsFaults, initQueryDevtoolsMocks, initQueryDevtoolsOverridePersistence, initQueryDevtoolsSettings, injectInfinityQueryResponseDelay, injectQueryContext, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, invalidStateInsideSecureExecuteFactory, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCreateGqlQueryOptions, isCustomHeaderAuthProvider, isDateShapedLeaf, isEmptyString, isGqlQueryConfig, isHtmlErrorPayload, isIdempotentQueryMethod, isLegacyQuery, isNaN$1 as isNaN, isPageOutOfRangeError, isQuery, isQueryCollection, isQueryDevtoolsEnabled, isQueryDevtoolsFaultArmed, isQueryDevtoolsRepositoryLive, isQueryDevtoolsRequestInterceptionEnabled, isQueryErrorResponse, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyListError, isSymfonyPagerfantaOutOfRangeError, isUnderInvalidatedUrl, legacyPrepareFallbackInjector, legacyPrepareWithoutInjectionContext, loadQueryDevtoolsSchema, loginQueryDevtoolsAuthAccount, logoutQueryDevtoolsAuthSession, mapToPaginated, mapViolationsToFormErrors, matchesQueryDevtoolsMockPattern, matchesQueryDevtoolsMockQuery, maybeExecute, measureQueryDevtoolsPayload, mergeHeaders, nestedEffect, noteQueryFormRead, noteQueryFormReads, numberArrayQueryField, pagedQueryStackNextPageCalledWithoutPreviousPage, pagedQueryStackPageBiggerThanTotalPages, pagedQueryStackPreviousPageCalledButAlreadyAtFirstPage, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, parseHttpErrorCodeToMessageDe, parseHttpErrorCodeToMessageEn, parseHttpErrorCodeToTitleDe, parseHttpErrorCodeToTitleEn, parseQueryDevtoolsOverrideTransfer, parseQueryRoute, patchQueryDevtoolsTokenPayload, pathParamsMissingInRouteFunctionError, provideInfinityQueryResponseDelay, provideLegacyPrepareFallback, provideQueryClientForDevtools, provideQueryDevtools, queryArrayComputed, queryBatchAlreadyRunning, queryBatchWithArgsUsed, queryClientFeatureUsedMultipleTimes, queryComputed, queryComputedTillTruthy, queryDevtoolsAbout, queryDevtoolsAllowsLocalAuthSessions, queryDevtoolsApiEnvIds, queryDevtoolsApiEnvIsProduction, queryDevtoolsApiEnvScope, queryDevtoolsApiEnvValues, queryDevtoolsApiEnvs, queryDevtoolsArmedMocks, queryDevtoolsArmedMocksRestored, queryDevtoolsAuthAccountsFor, queryDevtoolsAuthActive, queryDevtoolsAuthFieldsFor, queryDevtoolsAuthOtherScopeCount, queryDevtoolsAuthProviders, queryDevtoolsAuthSessions, queryDevtoolsAuthSessionsFor, queryDevtoolsAuthTabLocal, queryDevtoolsEntries, queryDevtoolsFaults, queryDevtoolsFaultsRestored, queryDevtoolsFnDetail, queryDevtoolsMockId, queryDevtoolsMocks, queryDevtoolsOverridePersistence, queryDevtoolsRequestPath, queryDevtoolsResponseHistory, queryDevtoolsRestoredOverridesScope, queryDevtoolsSchemaNames, queryDevtoolsSchemaRoutes, queryDevtoolsSchemaState, queryDevtoolsSettings, queryDevtoolsStorage, queryDevtoolsTokenTtls, queryErrorMessage, queryErrorMessages, queryExecute, queryExecutedAfterDestroyMessage, queryFeatureUsedMultipleTimes, queryField, querySequence, querySequenceAlreadyRunning, queryStackWithArgsUsed, queryStackWithResponseUpdateUsed, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, queryStateErrorSignal, queryStateLoadingSignal, queryStateResponseSignal, queryStateSignal, readQueryDevtoolsAuthSeed, readQueryDevtoolsAuthSeedFor, readQueryDevtoolsStore, registerEthleteVersion, registerLiveQueryDevtoolsRepository, registerQueryDevtoolsAuthProvider, registerQueryDevtoolsEntry, registerQueryErrorParser, releaseQueryDevtoolsOverridePersistence, removeFrom, removeQueryDevtoolsAuthAccount, renameQueryDevtoolsAuthSession, request, resetExecuteState, resetPageOnError, resolveInvalidationUrl, resolveQueryDevtoolsFault, resolveQueryDevtoolsFaultForAttempt, resolveQueryDevtoolsMock, resolveQueryDevtoolsMockForAttempt, resolveQueryHeaders, restoredQueryDevtoolsOverrides, runDefaultQueryRetry, runInQueryDevtoolsBatch, runQueryErrorParsers, saveQueryDevtoolsMock, searchQueryField, seedQueryDevtoolsSchemaBody, seedQueryDevtoolsSchemaRoute, serializeBody, serializeQueryDevtoolsOverrideTransfer, setDefaultQueryRetryFn, setQueryDevtoolsApiEnv, setQueryDevtoolsApiEnvs, setQueryDevtoolsAppInfo, setQueryDevtoolsArmedMocksScope, setQueryDevtoolsAuthCredentials, setQueryDevtoolsAuthProviderRegistrar, setQueryDevtoolsAuthSeedReader, setQueryDevtoolsAuthTabLocal, setQueryDevtoolsFault, setQueryDevtoolsFaultResolver, setQueryDevtoolsFaultsScope, setQueryDevtoolsFormLinksFactory, setQueryDevtoolsMockResolver, setQueryDevtoolsOverridePersistence, setQueryDevtoolsOverridesFactory, setQueryDevtoolsOverridesScope, setQueryDevtoolsRegistrar, setQueryDevtoolsResponseHistory, setQueryDevtoolsSchemaLoader, setQueryDevtoolsSettings, setQueryDevtoolsStatsFactory, setQueryDevtoolsTokenPayloadPatcher, setQueryDevtoolsTokenTtl, setQueryDevtoolsUiMounted, setupQueryDependencies, setupQueryExecuteState, setupQueryState, shouldAutoExecuteGqlQuery, shouldAutoExecuteQuery, shouldCacheQuery, shouldRetryRequest, silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent, skipPaginationPageParamCalculator, smartDuplicateArrayItem, snapshotQueryDevtoolsHandle, sortQueryField, splitQueryConfig, stringArrayQueryField, stringifyQueryRouteParts, sumQueryDevtoolsStats, suppressNextQueryStackDevtools, switchQueryCollectionState, switchQueryDevtoolsAuthSession, switchQueryState, symfonyQueryErrorParser, takeUntilResponse, toQuerySignal, toQuerySubject, tokensNotAvailableInsideAuthAndExec, tombstoneOf, trackQueryDevtoolsAuthProvider, transformArrayResponse, transformExecStateToQueryState, transformGql, transformMethod, transformPaginatedResponse, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray, uncacheableRequestHasAllowCacheParam, uncacheableRequestHasCacheKeyParam, unwrapGqlResponseWithErrors, unwrapQuerySyncMessage, v2BuildQueryCacheKey, v2ExtractExpiresInSeconds, v2ShouldCacheQuery, v2ShouldRetryRequest, validateWithQuery, validateWithV2Query, withArgs, withArgsQueryFeatureMissingButRouteIsFunction, withAuthenticationQuery, withAutoRefresh, withAutoRefreshUsedInManualQuery, withAutoRefreshUsedOnUnsupportedHttpMethod, withBearerAuthMultiTabSync, withDefaultRetry, withErrorHandling, withEthleteApiErrors, withHtmlErrorParsing, withInactivityLogout, withLogging, withLongPolling, withLongPollingUsedOnUnsupportedHttpMethod, withLongPollingUsedWithPolling, withMultiTabSync, withPageResetOnError, withPersistentAuth, withPolling, withPollingUsedOnUnsupportedHttpMethod, withQueryDevtoolsOverridePersistence, withQueryPersistence, withRefreshQuery, withResponseUpdate, withSuccessHandling, withSymfonyErrors, withTokenExpirationWarning, withTokenRevocation, withTracking, wrapAsObservableSignal, wrapQuerySyncMessage, writeQueryDevtoolsStore };
|
|
18236
|
+
export { AuthBearerRefreshStrategy, BasicAuthProvider, BearerAuthFeatureType, BooleanArrayQueryField, CustomHeaderAuthProvider, DEFAULT_KEEP_UNUSED_FOR, DEFAULT_QUERY_PERSISTENCE_MAX_AGE, DEFAULT_QUERY_PERSISTENCE_MAX_ENTRIES, DEFAULT_QUERY_PERSISTENCE_VERSION, DEFAULT_QUERY_PERSISTENCE_WRITE_DELAY, DateArrayQueryField, DateQueryField, EMPTY_QUERY_DEVTOOLS_FAULT, EntityStore, IGNORED_FILTER_COUNT_FIELDS, INFINITY_QUERY_TOKEN, IS_QUERY_REQUEST, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, LegacyQuery, LegacyQueryCreator, MAX_QUERY_BATCH_TOMBSTONES, MAX_QUERY_DEVTOOLS_TOMBSTONES, MAX_UNUSED_ENTRIES, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, QUERY_DEVTOOLS_FAULT_STATUSES, QUERY_DEVTOOLS_TOKEN_TTL_LIMIT, QUERY_PERSISTENCE_STORE_VERSION, QUERY_SYNC_PROTOCOL_VERSION, QUERY_VERSION, QueryClientFeatureType, QueryDevtoolsComponent, QueryDirective, QueryFeatureType, QueryField, QueryForm, QueryRuntimeErrorCode, QueryShortNamePipe, QueryStateType, QueryStore, SERVER_ERROR_KIND, SERVER_VIOLATION_ERROR_KIND, SPEED_BUFFER_TIME_IN_MS, SearchQueryField, SortQueryField, StringArrayQueryField, V2BearerAuthProvider, V2Query, V2QueryClient, V2QueryCreator, addQueryContainerHandling, addQueryDevtoolsAuthAccount, applyQueryDevtoolsOverrides, applyQueryDevtoolsTokenTtl, applyQueryFeatures, armAllQueryDevtoolsMocks, armQueryDevtoolsMock, armQueryDevtoolsOverrideTransfer, authExtractTokensResponseMissingAccessToken, authExtractTokensResponseMissingRefreshToken, authExtractTokensResponseNotObject, authProviderFeatureUsedMultipleTimes, booleanArrayQueryField, buildQueryCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, canOverrideQueryDevtoolsTokenTtl, castQueryCreatorTypes, circularQueryDependency, circularQueryDependencyChecker, clearQueryDevtoolsArmedMocks, clearQueryDevtoolsAuthCredentials, clearQueryDevtoolsAuthSessions, clearQueryDevtoolsFaults, clearQueryDevtoolsMockStore, clearQueryDevtoolsOverrideStore, clearQueryDevtoolsStore, clearQueryDevtoolsTokenTtl, clearQueryDevtoolsTombstones, clearRestoredQueryDevtoolsOverrides, collectLeafPaths, collectQueryDevtoolsSchemaComponents, collectQueryFormLinks, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, consumeSuppressQueryStackDevtools, contentfulGqlLikePaginationAdapter, countUnresolvedQueryDevtoolsOverrides, createAuthGuard, createBaseQuery, createBaseQueryCreator, createBearerAuthProvider, createDefaultRetryFn, createDeleteQuery, createExecuteFn, createGetQuery, createGqlExecuteFn, createGqlMutationViaGet, createGqlMutationViaPost, createGqlQuery, createGqlQueryCreator, createGqlQueryViaGet, createGqlQueryViaPost, createHeadQuery, createHttpRequest, createIndexedDbQueryPersistenceAdapter, createInfinityQueryConfig, createLegacyQueryCreator, createNoopQueryPersistenceAdapter, createOptionsQuery, createPagedQueryStack, createPatchQuery, createPersistentAuthFeature, createPostQuery, createPutQuery, createQuery, createQueryBatch, createQueryClient, createQueryCollection, createQueryCollectionSignal, createQueryCollectionSubject, createQueryContext, createQueryCreator, createQueryDevtoolsFormLinks, createQueryDevtoolsFormLinksRecorder, createQueryDevtoolsOverrides, createQueryDevtoolsOverridesRecorder, createQueryDevtoolsStats, createQueryDevtoolsStatsRecorder, createQueryErrorResponse, createQueryFeature, createQueryInvalidationFilter, createQueryKeyLockManager, createQueryObject, createQueryPersistenceEngine, createQueryRepository, createQuerySnapshotFn, createQueryStack, createQuerySubmission, createQuerySyncEngine, createQuerySyncTransport, createSecureDeleteQuery, createSecureExecuteFactory, createSecureExecuteFn, createSecureGetQuery, createSecureGqlExecuteFn, createSecureGqlMutationViaGet, createSecureGqlMutationViaPost, createSecureGqlQuery, createSecureGqlQueryCreator, createSecureGqlQueryViaGet, createSecureGqlQueryViaPost, createSecureHeadQuery, createSecureOptionsQuery, createSecurePatchQuery, createSecurePostQuery, createSecurePutQuery, createSecureQuery, createSecureQueryCreator, createTrackingFeature, createWebSocketClient, currentQueryDevtoolsBatch, dateArrayQueryField, dateQueryField, decryptBearer, deepFreeze, def, defineQueryForm, deleteQueryDevtoolsMock, describeQueryDevtoolsFeatures, detectContentTypeHeader, detectPaginationShape, dynLikePaginationAdapter, effectComputed, emptyQueryArgs, ethletePaginationAdapter, executeUntilSettled, executeUntilSettled$, extractExpiresInSeconds, extractFormViolations, extractHtmlErrorMessage, extractQuery, fakePaginationAdapter, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, forgetQueryDevtoolsAuthSession, forgetQueryDevtoolsAuthSessionsFor, formatQueryDevtoolsDuration, generateQueryDevtoolsNumberPreset, generateQueryDevtoolsSampleNumber, generateQueryDevtoolsStringPreset, getBearerAuthProviderName, getDefaultHeaders, getQueryClientName, getQueryFeatureUsage, getResponseUrl, ggLikePaginationAdapter, gql, gqlDataPropertyMissingInResponse, gqlErrorsInResponse, gqlTransformerFor, hasHeader, hasQueryDevtoolsOverridesAtPath, htmlErrorPayload, htmlQueryErrorParser, ignoreAutoRefresh, initQueryDevtoolsAuthSessions, initQueryDevtoolsFaults, initQueryDevtoolsMocks, initQueryDevtoolsOverridePersistence, initQueryDevtoolsSettings, injectInfinityQueryResponseDelay, injectQueryContext, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, invalidStateInsideSecureExecuteFactory, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCreateGqlQueryOptions, isCustomHeaderAuthProvider, isDateShapedLeaf, isEmptyString, isGqlQueryConfig, isHtmlErrorPayload, isIdempotentQueryMethod, isLegacyQuery, isNaN$1 as isNaN, isPageOutOfRangeError, isQuery, isQueryCollection, isQueryDevtoolsEnabled, isQueryDevtoolsFaultArmed, isQueryDevtoolsRepositoryLive, isQueryDevtoolsRequestInterceptionEnabled, isQueryErrorResponse, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyListError, isSymfonyPagerfantaOutOfRangeError, isUnderInvalidatedUrl, legacyPrepareFallbackInjector, legacyPrepareWithoutInjectionContext, loadQueryDevtoolsSchema, loginQueryDevtoolsAuthAccount, logoutQueryDevtoolsAuthSession, mapToPaginated, mapViolationsToFormErrors, matchesQueryDevtoolsMockPattern, matchesQueryDevtoolsMockQuery, maybeExecute, measureQueryDevtoolsPayload, mergeHeaders, nestedEffect, noteQueryFormRead, noteQueryFormReads, numberArrayQueryField, pagedQueryStackNextPageCalledWithoutPreviousPage, pagedQueryStackPageBiggerThanTotalPages, pagedQueryStackPreviousPageCalledButAlreadyAtFirstPage, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, parseHttpErrorCodeToMessageDe, parseHttpErrorCodeToMessageEn, parseHttpErrorCodeToTitleDe, parseHttpErrorCodeToTitleEn, parseQueryDevtoolsOverrideTransfer, parseQueryRoute, patchQueryDevtoolsTokenPayload, pathParamsMissingInRouteFunctionError, provideInfinityQueryResponseDelay, provideLegacyPrepareFallback, provideQueryClientForDevtools, provideQueryDevtools, queryArrayComputed, queryBatchAlreadyRunning, queryBatchWithArgsUsed, queryClientFeatureUsedMultipleTimes, queryComputed, queryComputedTillTruthy, queryCreatedInReactiveContext, queryDevtoolsAbout, queryDevtoolsAllowsLocalAuthSessions, queryDevtoolsApiEnvIds, queryDevtoolsApiEnvIsProduction, queryDevtoolsApiEnvScope, queryDevtoolsApiEnvValues, queryDevtoolsApiEnvs, queryDevtoolsArmedMocks, queryDevtoolsArmedMocksRestored, queryDevtoolsAuthAccountsFor, queryDevtoolsAuthActive, queryDevtoolsAuthFieldsFor, queryDevtoolsAuthOtherScopeCount, queryDevtoolsAuthProviders, queryDevtoolsAuthSessions, queryDevtoolsAuthSessionsFor, queryDevtoolsAuthTabLocal, queryDevtoolsEntries, queryDevtoolsFaults, queryDevtoolsFaultsRestored, queryDevtoolsFnDetail, queryDevtoolsMockId, queryDevtoolsMocks, queryDevtoolsOverridePersistence, queryDevtoolsRequestPath, queryDevtoolsResponseHistory, queryDevtoolsRestoredOverridesScope, queryDevtoolsSchemaNames, queryDevtoolsSchemaRoutes, queryDevtoolsSchemaState, queryDevtoolsSettings, queryDevtoolsStorage, queryDevtoolsTokenTtls, queryErrorMessage, queryErrorMessages, queryExecute, queryExecutedAfterDestroyMessage, queryFeatureUsedMultipleTimes, queryField, querySequence, querySequenceAlreadyRunning, queryStackWithArgsUsed, queryStackWithResponseUpdateUsed, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, queryStateErrorSignal, queryStateLoadingSignal, queryStateResponseSignal, queryStateSignal, readQueryDevtoolsAuthSeed, readQueryDevtoolsAuthSeedFor, readQueryDevtoolsStore, registerEthleteVersion, registerLiveQueryDevtoolsRepository, registerQueryDevtoolsAuthProvider, registerQueryDevtoolsEntry, registerQueryErrorParser, releaseQueryDevtoolsOverridePersistence, removeFrom, removeQueryDevtoolsAuthAccount, renameQueryDevtoolsAuthSession, request, resetExecuteState, resetPageOnError, resolveInvalidationUrl, resolveQueryDevtoolsFault, resolveQueryDevtoolsFaultForAttempt, resolveQueryDevtoolsMock, resolveQueryDevtoolsMockForAttempt, resolveQueryHeaders, restoredQueryDevtoolsOverrides, runDefaultQueryRetry, runInQueryDevtoolsBatch, runQueryErrorParsers, saveQueryDevtoolsMock, searchQueryField, seedQueryDevtoolsSchemaBody, seedQueryDevtoolsSchemaRoute, serializeBody, serializeQueryDevtoolsOverrideTransfer, setDefaultQueryRetryFn, setQueryDevtoolsApiEnv, setQueryDevtoolsApiEnvs, setQueryDevtoolsAppInfo, setQueryDevtoolsArmedMocksScope, setQueryDevtoolsAuthCredentials, setQueryDevtoolsAuthProviderRegistrar, setQueryDevtoolsAuthSeedReader, setQueryDevtoolsAuthTabLocal, setQueryDevtoolsFault, setQueryDevtoolsFaultResolver, setQueryDevtoolsFaultsScope, setQueryDevtoolsFormLinksFactory, setQueryDevtoolsMockResolver, setQueryDevtoolsOverridePersistence, setQueryDevtoolsOverridesFactory, setQueryDevtoolsOverridesScope, setQueryDevtoolsRegistrar, setQueryDevtoolsResponseHistory, setQueryDevtoolsSchemaLoader, setQueryDevtoolsSettings, setQueryDevtoolsStatsFactory, setQueryDevtoolsTokenPayloadPatcher, setQueryDevtoolsTokenTtl, setQueryDevtoolsUiMounted, setupQueryDependencies, setupQueryExecuteState, setupQueryState, shouldAutoExecuteGqlQuery, shouldAutoExecuteQuery, shouldCacheQuery, shouldRetryRequest, silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent, skipPaginationPageParamCalculator, smartDuplicateArrayItem, snapshotQueryDevtoolsHandle, sortQueryField, splitQueryConfig, stringArrayQueryField, stringifyQueryRouteParts, sumQueryDevtoolsStats, suppressNextQueryStackDevtools, switchQueryCollectionState, switchQueryDevtoolsAuthSession, switchQueryState, symfonyQueryErrorParser, takeUntilResponse, toQuerySignal, toQuerySubject, tokensNotAvailableInsideAuthAndExec, tombstoneOf, trackQueryDevtoolsAuthProvider, transformArrayResponse, transformExecStateToQueryState, transformGql, transformMethod, transformPaginatedResponse, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray, uncacheableRequestHasAllowCacheParam, uncacheableRequestHasCacheKeyParam, unwrapGqlResponseWithErrors, unwrapQuerySyncMessage, v2BuildQueryCacheKey, v2ExtractExpiresInSeconds, v2ShouldCacheQuery, v2ShouldRetryRequest, validateWithQuery, validateWithV2Query, withArgs, withArgsQueryFeatureMissingButRouteIsFunction, withAuthenticationQuery, withAutoRefresh, withAutoRefreshUsedInManualQuery, withAutoRefreshUsedOnUnsupportedHttpMethod, withBearerAuthMultiTabSync, withDefaultRetry, withErrorHandling, withEthleteApiErrors, withHtmlErrorParsing, withInactivityLogout, withLogging, withLongPolling, withLongPollingUsedOnUnsupportedHttpMethod, withLongPollingUsedWithPolling, withMultiTabSync, withPageResetOnError, withPersistentAuth, withPolling, withPollingUsedOnUnsupportedHttpMethod, withQueryDevtoolsOverridePersistence, withQueryPersistence, withRefreshQuery, withResponseUpdate, withSuccessHandling, withSymfonyErrors, withTokenExpirationWarning, withTokenRevocation, withTracking, wrapAsObservableSignal, wrapQuerySyncMessage, writeQueryDevtoolsStore };
|
|
18017
18237
|
//# sourceMappingURL=ethlete-query.mjs.map
|