@ethlete/query 6.0.0-next.25 → 6.0.0-next.27
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 +18 -0
- package/fesm2022/ethlete-query.mjs +403 -31
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ethlete-query.d.ts +170 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { DestroyRef, InjectionToken, inject, Injector, EnvironmentInjector, ElementRef, ErrorHandler, createEnvironmentInjector, effect, untracked, signal, linkedSignal, computed, runInInjectionContext, isDevMode, PLATFORM_ID, resource, DOCUMENT, makeEnvironmentProviders, assertInInjectionContext, provideEnvironmentInitializer, ChangeDetectorRef, ViewContainerRef, TemplateRef, Input, Directive, input, Pipe, ViewEncapsulation, Component, NgZone } from '@angular/core';
|
|
3
3
|
import { defineStaticProvider, RuntimeError, clamp, randomId, defineRootProvider, isObject, injectUnsavedChangesCoordinator, injectRoute, getCookie, getDomain, setCookie, deleteCookie, createDestroy, computedTillTruthy, defineProvider, toProvideFn, toInjectFn, nextFrame, injectQueryParams, injectQueryParamChanges, clone, equal, ET_PROPERTY_REMOVED, previousSignalValue } from '@ethlete/core';
|
|
4
|
-
import { filter, Subject, Subscription, defer, throwError, timer, switchMap, tap, retry, catchError, take, of,
|
|
4
|
+
import { filter, Subject, Subscription, defer, throwError, timer, switchMap, tap, retry, catchError, take, of, merge, firstValueFrom, fromEvent, throttleTime, interval, combineLatest, map, Observable, takeUntil, startWith, pairwise, BehaviorSubject, ReplaySubject, shareReplay, skip, takeWhile, EMPTY, withLatestFrom, debounceTime } from 'rxjs';
|
|
5
5
|
import { HttpClient, HttpEventType, HttpErrorResponse, HttpHeaders, HttpStatusCode } from '@angular/common/http';
|
|
6
6
|
import { toObservable, takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
7
7
|
import { getActiveConsumer, setActiveConsumer } from '@angular/core/primitives/signals';
|
|
@@ -103,6 +103,20 @@ const setQueryDevtoolsFormLinksFactory = (fn) => {
|
|
|
103
103
|
* @internal
|
|
104
104
|
*/
|
|
105
105
|
const createQueryDevtoolsFormLinksRecorder = () => formLinksFactory?.() ?? null;
|
|
106
|
+
let overridesFactory = null;
|
|
107
|
+
/**
|
|
108
|
+
* Installs the overrides recorder factory. Called by `provideQueryDevtools()`; nothing else may call it.
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
const setQueryDevtoolsOverridesFactory = (fn) => {
|
|
112
|
+
overridesFactory = fn;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* An overrides recorder for one query, or `null` unless {@link provideQueryDevtools} has been called.
|
|
116
|
+
* Reached only from the provider for the same reason {@link createQueryDevtoolsStatsRecorder} is.
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
119
|
+
const createQueryDevtoolsOverridesRecorder = () => overridesFactory?.() ?? null;
|
|
106
120
|
/** The ids of the query forms read by the args build currently running, or `null` outside of one. */
|
|
107
121
|
let formLinkSink = null;
|
|
108
122
|
/**
|
|
@@ -276,6 +290,10 @@ const QueryRuntimeErrorCode = {
|
|
|
276
290
|
QUERY_SEQUENCE_ALREADY_RUNNING: 900,
|
|
277
291
|
// Legacy interop
|
|
278
292
|
LEGACY_PREPARE_WITHOUT_INJECTION_CONTEXT: 950,
|
|
293
|
+
LEGACY_QUERY_STATE_ALREADY_HAS_KEY: 951,
|
|
294
|
+
LEGACY_QUERY_STATE_DOES_NOT_CONTAIN_KEY: 952,
|
|
295
|
+
LEGACY_QUERY_STATE_CANNOT_TRANSFORM: 953,
|
|
296
|
+
LEGACY_INVALID_BODY: 954,
|
|
279
297
|
};
|
|
280
298
|
const queryFeatureUsedMultipleTimes = (type) => {
|
|
281
299
|
return new RuntimeError(QueryRuntimeErrorCode.QUERY_FEATURE_USED_MULTIPLE_TIMES, `The query feature "${type}()" was used multiple times.`);
|
|
@@ -707,7 +725,10 @@ const withPageResetOnError = (options) => {
|
|
|
707
725
|
const setupQueryState = (options) => {
|
|
708
726
|
const request = signal(null, /* @ts-ignore */
|
|
709
727
|
...(ngDevMode ? [{ debugName: "request" }] : /* istanbul ignore next */ []));
|
|
710
|
-
const rawResponse = linkedSignal(() =>
|
|
728
|
+
const rawResponse = linkedSignal(() => {
|
|
729
|
+
const raw = request()?.response() ?? null;
|
|
730
|
+
return options.devtoolsOverrides ? options.devtoolsOverrides.apply(raw) : raw;
|
|
731
|
+
}, /* @ts-ignore */
|
|
711
732
|
...(ngDevMode ? [{ debugName: "rawResponse" }] : /* istanbul ignore next */ []));
|
|
712
733
|
const response = computed(() => {
|
|
713
734
|
const raw = rawResponse();
|
|
@@ -973,10 +994,12 @@ const createBaseQuery = (options) => {
|
|
|
973
994
|
return runInInjectionContext(deps.injector, () => {
|
|
974
995
|
const devtoolsStats = createQueryDevtoolsStatsRecorder();
|
|
975
996
|
const devtoolsFormLinks = createQueryDevtoolsFormLinksRecorder();
|
|
997
|
+
const devtoolsOverrides = createQueryDevtoolsOverridesRecorder();
|
|
976
998
|
const state = setupQueryState({
|
|
977
999
|
transformResponse: options.creator?.transformResponse,
|
|
978
1000
|
devtoolsStats,
|
|
979
1001
|
devtoolsFormLinks,
|
|
1002
|
+
devtoolsOverrides,
|
|
980
1003
|
});
|
|
981
1004
|
const flags = getQueryFeatureUsage(options);
|
|
982
1005
|
const execute = options.executeFactory({
|
|
@@ -1000,7 +1023,7 @@ const createBaseQuery = (options) => {
|
|
|
1000
1023
|
if (devtoolsStats) {
|
|
1001
1024
|
const statsSubscription = state.events$.subscribe((event) => {
|
|
1002
1025
|
if (event.type === 'error') {
|
|
1003
|
-
devtoolsStats.recordError();
|
|
1026
|
+
devtoolsStats.recordError({ faulted: event.faulted });
|
|
1004
1027
|
}
|
|
1005
1028
|
else if (event.type === HttpEventType.Response) {
|
|
1006
1029
|
devtoolsStats.recordResponse({ headers: event.headers, body: event.body });
|
|
@@ -1021,6 +1044,7 @@ const createBaseQuery = (options) => {
|
|
|
1021
1044
|
clientRef: client,
|
|
1022
1045
|
stats: devtoolsStats,
|
|
1023
1046
|
formLinks: devtoolsFormLinks ?? undefined,
|
|
1047
|
+
overrides: devtoolsOverrides ?? undefined,
|
|
1024
1048
|
route: options.creatorInternals.route ??
|
|
1025
1049
|
options.creator?.route ??
|
|
1026
1050
|
null,
|
|
@@ -1194,17 +1218,15 @@ const createBaseQueryCreator = (config) => {
|
|
|
1194
1218
|
* Route building, query-string serialization and the token clock - shared by the current generation and
|
|
1195
1219
|
* the legacy V2 client, which re-exports them under their original names.
|
|
1196
1220
|
*/
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
const
|
|
1206
|
-
const invalidRouteError = (data) => new QueryError('002', 'The route must start with a slash', data);
|
|
1207
|
-
const pathParamsMissingInRouteFunctionError = (data) => new QueryError('003', 'The route is a function but pathParams are missing', data);
|
|
1221
|
+
// codes 1-99 of the shared 0-999 `@ethlete/query` range - see `query-errors.ts` for the rest
|
|
1222
|
+
const RouteRuntimeErrorCode = {
|
|
1223
|
+
INVALID_BASE_ROUTE: 1,
|
|
1224
|
+
INVALID_ROUTE: 2,
|
|
1225
|
+
PATH_PARAMS_MISSING_IN_ROUTE_FUNCTION: 3,
|
|
1226
|
+
};
|
|
1227
|
+
const invalidBaseRouteError = (data) => new RuntimeError(RouteRuntimeErrorCode.INVALID_BASE_ROUTE, 'The baseRoute must not end with a slash', data);
|
|
1228
|
+
const invalidRouteError = (data) => new RuntimeError(RouteRuntimeErrorCode.INVALID_ROUTE, 'The route must start with a slash', data);
|
|
1229
|
+
const pathParamsMissingInRouteFunctionError = (data) => new RuntimeError(RouteRuntimeErrorCode.PATH_PARAMS_MISSING_IN_ROUTE_FUNCTION, 'The route is a function but pathParams are missing', data);
|
|
1208
1230
|
const isNaN$1 = (value) => typeof value === 'number' && Number.isNaN(value);
|
|
1209
1231
|
const isEmptyString = (value) => typeof value === 'string' && value.trim() === '';
|
|
1210
1232
|
const buildQueryString = (params, config) => {
|
|
@@ -1525,6 +1547,9 @@ const createHttpRequest = (options) => {
|
|
|
1525
1547
|
...(ngDevMode ? [{ debugName: "retryState" }] : /* istanbul ignore next */ []));
|
|
1526
1548
|
const lastDurationMs = signal(null, /* @ts-ignore */
|
|
1527
1549
|
...(ngDevMode ? [{ debugName: "lastDurationMs" }] : /* istanbul ignore next */ []));
|
|
1550
|
+
// Set at the top of every `sendWithFaults` attempt (including unfaulted ones), so it always reflects
|
|
1551
|
+
// whichever attempt most recently settled - not just the first one, or a stale earlier attempt's fault.
|
|
1552
|
+
let lastAttemptFaulted = false;
|
|
1528
1553
|
// NOTE: This must be a plain function, not a `computed`. The freshness check compares against
|
|
1529
1554
|
// `Date.now()`, which is not reactive, so a memoized computed would only ever recompute when
|
|
1530
1555
|
// `expiresIn` changes - once it evaluated to `false` (fresh) it would stay `false` forever, even
|
|
@@ -1573,6 +1598,7 @@ const createHttpRequest = (options) => {
|
|
|
1573
1598
|
method: options.method,
|
|
1574
1599
|
url: options.fullPath,
|
|
1575
1600
|
});
|
|
1601
|
+
lastAttemptFaulted = !!fault && fault.status !== null;
|
|
1576
1602
|
if (!fault)
|
|
1577
1603
|
return send(headers);
|
|
1578
1604
|
const { status } = fault;
|
|
@@ -1685,7 +1711,7 @@ const createHttpRequest = (options) => {
|
|
|
1685
1711
|
error.set(errorRes);
|
|
1686
1712
|
loading.set(null);
|
|
1687
1713
|
lastDurationMs.set(Date.now() - lastExecuteTime());
|
|
1688
|
-
const errorEvent = { type: 'error', error: errorRes };
|
|
1714
|
+
const errorEvent = { type: 'error', error: errorRes, faulted: lastAttemptFaulted };
|
|
1689
1715
|
currentEvent.set(errorEvent);
|
|
1690
1716
|
event$.next(errorEvent);
|
|
1691
1717
|
options.dependencies.ngErrorHandler.handleError(errorRes.raw);
|
|
@@ -3754,6 +3780,13 @@ const createSecureExecuteFactory = (options) => {
|
|
|
3754
3780
|
return currentError?.code === 401;
|
|
3755
3781
|
}), take(1), tap(() => exec(execArgsWithDefaults)))
|
|
3756
3782
|
.subscribe();
|
|
3783
|
+
// `setTokens()` seeds an auth session from outside the query registry (an SSO/OIDC callback, a
|
|
3784
|
+
// native shell) - no query ever runs for `latestExecutedQuery` to report, so a successful token
|
|
3785
|
+
// seed is treated as an auth query that already resolved.
|
|
3786
|
+
if (options.authProvider.executionState()?.type === 'tokenSeed') {
|
|
3787
|
+
authAndExecWhenTokenReady(execArgsWithDefaults);
|
|
3788
|
+
return;
|
|
3789
|
+
}
|
|
3757
3790
|
const latestQuery = options.authProvider.latestExecutedQuery();
|
|
3758
3791
|
const authQuery = latestQuery?.snapshot;
|
|
3759
3792
|
// This might happen if a secure query gets executed while the auth query has just been created.
|
|
@@ -3761,10 +3794,9 @@ const createSecureExecuteFactory = (options) => {
|
|
|
3761
3794
|
const isAuthQueryFreshlyExecuted = authQuery?.lastTimeExecutedAt() === null;
|
|
3762
3795
|
if (!authQuery || authQuery.loading() || isAuthQueryFreshlyExecuted) {
|
|
3763
3796
|
options.state.loading.set({ executeTime: Date.now(), progress: null });
|
|
3764
|
-
|
|
3797
|
+
const latestExecutedQuery$ = toObservable(options.authProvider.latestExecutedQuery, {
|
|
3765
3798
|
injector: options.deps.injector,
|
|
3766
|
-
})
|
|
3767
|
-
.pipe(switchMap((latestQuery) => {
|
|
3799
|
+
}).pipe(switchMap((latestQuery) => {
|
|
3768
3800
|
if (!latestQuery)
|
|
3769
3801
|
return of(null);
|
|
3770
3802
|
const query = latestQuery.snapshot;
|
|
@@ -3778,8 +3810,14 @@ const createSecureExecuteFactory = (options) => {
|
|
|
3778
3810
|
authAndExecWhenTokenReady(execArgsWithDefaults);
|
|
3779
3811
|
}
|
|
3780
3812
|
}));
|
|
3781
|
-
}))
|
|
3782
|
-
|
|
3813
|
+
}));
|
|
3814
|
+
// A `setTokens()` call that lands while this is already waiting (e.g. the SSO redirect
|
|
3815
|
+
// resolves after this secure query mounted) never touches `latestExecutedQuery` either -
|
|
3816
|
+
// wake up on `executionState` becoming a token seed too.
|
|
3817
|
+
const tokenSeed$ = toObservable(options.authProvider.executionState, {
|
|
3818
|
+
injector: options.deps.injector,
|
|
3819
|
+
}).pipe(filter((state) => state?.type === 'tokenSeed'), take(1), tap(() => authAndExecWhenTokenReady(execArgsWithDefaults)));
|
|
3820
|
+
authQuerySubscription = merge(latestExecutedQuery$, tokenSeed$).subscribe();
|
|
3783
3821
|
}
|
|
3784
3822
|
else if (authQuery.response()) {
|
|
3785
3823
|
authAndExecWhenTokenReady(execArgsWithDefaults);
|
|
@@ -4230,7 +4268,7 @@ const deriveExecutionStateType = (builder, triggeredBy) => {
|
|
|
4230
4268
|
return 'revocation';
|
|
4231
4269
|
return builder.key;
|
|
4232
4270
|
};
|
|
4233
|
-
const setupBearerQueryRegistry = (builders, injector, latestExecutedQuery, latestNonInternalQuery,
|
|
4271
|
+
const setupBearerQueryRegistry = (builders, injector, latestExecutedQuery, latestNonInternalQuery, applyTokens, executionState) => {
|
|
4234
4272
|
const queries = {};
|
|
4235
4273
|
const querySnapshots = new Map();
|
|
4236
4274
|
for (const builder of builders) {
|
|
@@ -4248,7 +4286,7 @@ const setupBearerQueryRegistry = (builders, injector, latestExecutedQuery, lates
|
|
|
4248
4286
|
if (response && !loading && !error) {
|
|
4249
4287
|
try {
|
|
4250
4288
|
const tokens = extractTokens(response);
|
|
4251
|
-
|
|
4289
|
+
applyTokens(tokens.accessToken, tokens.refreshToken);
|
|
4252
4290
|
}
|
|
4253
4291
|
catch (extractError) {
|
|
4254
4292
|
if (isDevMode()) {
|
|
@@ -4381,12 +4419,19 @@ const createBearerAuthProviderImpl = (config) => {
|
|
|
4381
4419
|
...(ngDevMode ? [{ debugName: "latestNonInternalQuery" }] : /* istanbul ignore next */ []));
|
|
4382
4420
|
const executionState = signal(null, /* @ts-ignore */
|
|
4383
4421
|
...(ngDevMode ? [{ debugName: "executionState" }] : /* istanbul ignore next */ []));
|
|
4384
|
-
const
|
|
4422
|
+
const applyTokens = (access, refresh) => {
|
|
4385
4423
|
accessToken.set(access);
|
|
4386
4424
|
refreshToken.set(refresh);
|
|
4387
4425
|
afterTokenRefresh$.next();
|
|
4388
4426
|
};
|
|
4389
|
-
|
|
4427
|
+
// Public entry point only - a query-driven login already reports its own, more specific
|
|
4428
|
+
// executionState (e.g. `{ type: 'login', state: 'success' }`) via setupBearerQueryRegistry's
|
|
4429
|
+
// execute(), so that internal path calls applyTokens directly to avoid stomping it with this.
|
|
4430
|
+
const setTokens = (access, refresh) => {
|
|
4431
|
+
applyTokens(access, refresh);
|
|
4432
|
+
executionState.set({ type: 'tokenSeed', state: 'success' });
|
|
4433
|
+
};
|
|
4434
|
+
const { queries } = setupBearerQueryRegistry(config.queries, injector, latestExecutedQuery, latestNonInternalQuery, applyTokens, executionState);
|
|
4390
4435
|
const logout = () => {
|
|
4391
4436
|
accessToken.set(null);
|
|
4392
4437
|
refreshToken.set(null);
|
|
@@ -5415,6 +5460,325 @@ const createQueryDevtoolsFormLinks = () => {
|
|
|
5415
5460
|
};
|
|
5416
5461
|
};
|
|
5417
5462
|
|
|
5463
|
+
const pathsEqual = (a, b) => a.length === b.length && a.every((step, index) => step === b[index]);
|
|
5464
|
+
/**
|
|
5465
|
+
* Walks `path` into `root`, stopping as soon as a step's container doesn't exist. An empty path
|
|
5466
|
+
* resolves to `root` itself, which is how an op targets the response's top-level value.
|
|
5467
|
+
*/
|
|
5468
|
+
const resolvePath = (root, path) => {
|
|
5469
|
+
if (path.length === 0)
|
|
5470
|
+
return { ok: true, exists: true, value: root };
|
|
5471
|
+
let current = root;
|
|
5472
|
+
for (let index = 0; index < path.length - 1; index++) {
|
|
5473
|
+
if (current === null || typeof current !== 'object')
|
|
5474
|
+
return { ok: false };
|
|
5475
|
+
const step = path[index];
|
|
5476
|
+
const container = current;
|
|
5477
|
+
if (!(step in container))
|
|
5478
|
+
return { ok: false };
|
|
5479
|
+
current = container[step];
|
|
5480
|
+
}
|
|
5481
|
+
if (current === null || typeof current !== 'object')
|
|
5482
|
+
return { ok: false };
|
|
5483
|
+
const key = path[path.length - 1];
|
|
5484
|
+
const container = current;
|
|
5485
|
+
const exists = key in container;
|
|
5486
|
+
return { ok: true, exists, value: exists ? container[key] : undefined };
|
|
5487
|
+
};
|
|
5488
|
+
/**
|
|
5489
|
+
* Returns a copy of `root` with `value` written at `path`, cloning only the containers along the way -
|
|
5490
|
+
* every sibling branch keeps its original reference. The final path segment does not need to already
|
|
5491
|
+
* exist (a `set` can add a new key); every segment before it does.
|
|
5492
|
+
*/
|
|
5493
|
+
const withValueAtPath = (root, path, value) => {
|
|
5494
|
+
if (path.length === 0)
|
|
5495
|
+
return value;
|
|
5496
|
+
const [head, ...rest] = path;
|
|
5497
|
+
if (Array.isArray(root)) {
|
|
5498
|
+
const next = [...root];
|
|
5499
|
+
next[head] = withValueAtPath(root[head], rest, value);
|
|
5500
|
+
return next;
|
|
5501
|
+
}
|
|
5502
|
+
const container = root && typeof root === 'object' ? root : {};
|
|
5503
|
+
return { ...container, [head]: withValueAtPath(container[head], rest, value) };
|
|
5504
|
+
};
|
|
5505
|
+
const IDENTITY_KEY_PATTERNS = [/^id$/i, /(^|[a-z])Id$/, /^uuid$/i, /^key$/i];
|
|
5506
|
+
const isIdentityKey = (key) => IDENTITY_KEY_PATTERNS.some((pattern) => pattern.test(key));
|
|
5507
|
+
/** Whether every sibling in `array` that has `key` holds a distinct string/number value for it. */
|
|
5508
|
+
const isSiblingUniqueKey = (array, key) => {
|
|
5509
|
+
const seen = new Set();
|
|
5510
|
+
for (const item of array) {
|
|
5511
|
+
const value = item?.[key];
|
|
5512
|
+
if (value === undefined)
|
|
5513
|
+
continue;
|
|
5514
|
+
if (typeof value !== 'string' && typeof value !== 'number')
|
|
5515
|
+
return false;
|
|
5516
|
+
if (seen.has(value))
|
|
5517
|
+
return false;
|
|
5518
|
+
seen.add(value);
|
|
5519
|
+
}
|
|
5520
|
+
return seen.size > 0;
|
|
5521
|
+
};
|
|
5522
|
+
const nextNumericId = (array, key) => {
|
|
5523
|
+
let max = -Infinity;
|
|
5524
|
+
for (const item of array) {
|
|
5525
|
+
const value = item?.[key];
|
|
5526
|
+
if (typeof value === 'number' && value > max)
|
|
5527
|
+
max = value;
|
|
5528
|
+
}
|
|
5529
|
+
return Number.isFinite(max) ? max + 1 : 1;
|
|
5530
|
+
};
|
|
5531
|
+
const nextStringId = (array, key, base) => {
|
|
5532
|
+
const existing = new Set(array.map((item) => item?.[key]));
|
|
5533
|
+
let suffix = 1;
|
|
5534
|
+
while (existing.has(`${base}-copy-${suffix}`))
|
|
5535
|
+
suffix++;
|
|
5536
|
+
return `${base}-copy-${suffix}`;
|
|
5537
|
+
};
|
|
5538
|
+
/**
|
|
5539
|
+
* Clones `item` (a plain object array element) with every identity-shaped field replaced by a fresh
|
|
5540
|
+
* value, so a duplicated row never collides with the one it was copied from. A field counts as identity
|
|
5541
|
+
* when its key looks like one (`id`, `fooId`, `uuid`, `key`) or every sibling in `siblings` holds a
|
|
5542
|
+
* distinct value for it - without this, `track` bindings and detail-by-id lookups can't tell the copy
|
|
5543
|
+
* from the original.
|
|
5544
|
+
*/
|
|
5545
|
+
const smartDuplicateArrayItem = (item, siblings) => {
|
|
5546
|
+
if (!item || typeof item !== 'object' || Array.isArray(item))
|
|
5547
|
+
return item;
|
|
5548
|
+
const source = item;
|
|
5549
|
+
const result = { ...source };
|
|
5550
|
+
for (const key of Object.keys(source)) {
|
|
5551
|
+
const value = source[key];
|
|
5552
|
+
if (!isIdentityKey(key) && !isSiblingUniqueKey(siblings, key))
|
|
5553
|
+
continue;
|
|
5554
|
+
if (typeof value === 'number')
|
|
5555
|
+
result[key] = nextNumericId(siblings, key);
|
|
5556
|
+
else if (typeof value === 'string')
|
|
5557
|
+
result[key] = nextStringId(siblings, key, value);
|
|
5558
|
+
}
|
|
5559
|
+
return result;
|
|
5560
|
+
};
|
|
5561
|
+
const duplicateOneArrayItem = (array, index) => {
|
|
5562
|
+
const copy = smartDuplicateArrayItem(array[index], array);
|
|
5563
|
+
const next = [...array];
|
|
5564
|
+
next.splice(index + 1, 0, copy);
|
|
5565
|
+
return next;
|
|
5566
|
+
};
|
|
5567
|
+
const duplicateWholeArray = (array) => {
|
|
5568
|
+
let result = [...array];
|
|
5569
|
+
for (const item of array)
|
|
5570
|
+
result = [...result, smartDuplicateArrayItem(item, result)];
|
|
5571
|
+
return result;
|
|
5572
|
+
};
|
|
5573
|
+
/**
|
|
5574
|
+
* Whether `value` structurally matches one of the pagination shapes shrink/extend know how to resize -
|
|
5575
|
+
* an `items` array plus a recognized combination of total/page/limit counters. Exported so the panel's
|
|
5576
|
+
* menu can offer shrink/extend only where it would actually apply.
|
|
5577
|
+
*/
|
|
5578
|
+
const detectPaginationShape = (value) => {
|
|
5579
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
5580
|
+
return null;
|
|
5581
|
+
const obj = value;
|
|
5582
|
+
if (!Array.isArray(obj['items']))
|
|
5583
|
+
return null;
|
|
5584
|
+
const hasNumbers = (...keys) => keys.every((key) => typeof obj[key] === 'number');
|
|
5585
|
+
if (hasNumbers('totalHits', 'currentPage', 'totalPageCount', 'itemsPerPage'))
|
|
5586
|
+
return 'gg-like';
|
|
5587
|
+
if (hasNumbers('totalHits', 'currentPage', 'totalPages', 'limit'))
|
|
5588
|
+
return 'dyn-like';
|
|
5589
|
+
if (hasNumbers('totalPages', 'totalHits', 'currentPage', 'itemsPerPage'))
|
|
5590
|
+
return 'normalized';
|
|
5591
|
+
if (hasNumbers('limit', 'skip', 'total'))
|
|
5592
|
+
return 'contentful-gql-like';
|
|
5593
|
+
return null;
|
|
5594
|
+
};
|
|
5595
|
+
const DATE_KEY_PATTERN = /date|At$|Timestamp/i;
|
|
5596
|
+
const ISO_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:?\d{2})?)?$/;
|
|
5597
|
+
/**
|
|
5598
|
+
* Whether a leaf is offered date presets instead of string presets: its key looks date-shaped
|
|
5599
|
+
* (`date`, `fooAt`, `fooTimestamp`) and its value round-trips through `Date.parse`, or the value
|
|
5600
|
+
* itself matches an ISO-8601 date/datetime pattern regardless of what its key is called. Exported so
|
|
5601
|
+
* the panel's menu can decide which preset list to show without duplicating the check.
|
|
5602
|
+
*/
|
|
5603
|
+
const isDateShapedLeaf = (key, value) => {
|
|
5604
|
+
if (typeof value !== 'string')
|
|
5605
|
+
return false;
|
|
5606
|
+
if (typeof key === 'string' && DATE_KEY_PATTERN.test(key) && !Number.isNaN(Date.parse(value)))
|
|
5607
|
+
return true;
|
|
5608
|
+
return ISO_DATE_PATTERN.test(value);
|
|
5609
|
+
};
|
|
5610
|
+
/**
|
|
5611
|
+
* Every path under `value` (relative to it, not absolute) whose leaf is of `kind` - the paths a "fill
|
|
5612
|
+
* recursively" menu action turns into one `set`-family op each. Exported so the panel's menu builds the
|
|
5613
|
+
* op list with the exact same walk the docs describe, rather than a second, possibly-drifted one.
|
|
5614
|
+
*/
|
|
5615
|
+
const collectLeafPaths = (value, kind) => {
|
|
5616
|
+
const paths = [];
|
|
5617
|
+
const walk = (node, path) => {
|
|
5618
|
+
if (Array.isArray(node)) {
|
|
5619
|
+
node.forEach((item, index) => walk(item, [...path, index]));
|
|
5620
|
+
return;
|
|
5621
|
+
}
|
|
5622
|
+
if (node && typeof node === 'object') {
|
|
5623
|
+
for (const [key, child] of Object.entries(node))
|
|
5624
|
+
walk(child, [...path, key]);
|
|
5625
|
+
return;
|
|
5626
|
+
}
|
|
5627
|
+
if (typeof node === kind)
|
|
5628
|
+
paths.push(path);
|
|
5629
|
+
};
|
|
5630
|
+
walk(value, []);
|
|
5631
|
+
return paths;
|
|
5632
|
+
};
|
|
5633
|
+
const resizePagination = (value, shape, mode, amount) => {
|
|
5634
|
+
const items = value['items'];
|
|
5635
|
+
let nextItems;
|
|
5636
|
+
if (mode === 'shrink') {
|
|
5637
|
+
nextItems = items.slice(0, Math.max(0, items.length - amount));
|
|
5638
|
+
}
|
|
5639
|
+
else if (items.length === 0) {
|
|
5640
|
+
// Nothing to clone a new item from - degrade to a no-op rather than inventing data out of thin air.
|
|
5641
|
+
nextItems = items;
|
|
5642
|
+
}
|
|
5643
|
+
else {
|
|
5644
|
+
nextItems = items;
|
|
5645
|
+
for (let i = 0; i < amount; i++) {
|
|
5646
|
+
nextItems = [...nextItems, smartDuplicateArrayItem(items[i % items.length], nextItems)];
|
|
5647
|
+
}
|
|
5648
|
+
}
|
|
5649
|
+
const delta = nextItems.length - items.length;
|
|
5650
|
+
const result = { ...value, items: nextItems };
|
|
5651
|
+
if (shape === 'gg-like') {
|
|
5652
|
+
result['totalHits'] = value['totalHits'] + delta;
|
|
5653
|
+
result['totalPageCount'] = Math.max(1, Math.ceil(result['totalHits'] / (value['itemsPerPage'] || 1)));
|
|
5654
|
+
}
|
|
5655
|
+
else if (shape === 'dyn-like') {
|
|
5656
|
+
result['totalHits'] = value['totalHits'] + delta;
|
|
5657
|
+
result['totalPages'] = Math.max(1, Math.ceil(result['totalHits'] / (value['limit'] || 1)));
|
|
5658
|
+
}
|
|
5659
|
+
else if (shape === 'normalized') {
|
|
5660
|
+
result['totalHits'] = value['totalHits'] + delta;
|
|
5661
|
+
result['totalPages'] = Math.max(1, Math.ceil(result['totalHits'] / (value['itemsPerPage'] || 1)));
|
|
5662
|
+
}
|
|
5663
|
+
else {
|
|
5664
|
+
result['total'] = value['total'] + delta;
|
|
5665
|
+
}
|
|
5666
|
+
return result;
|
|
5667
|
+
};
|
|
5668
|
+
const STRING_PRESETS = {
|
|
5669
|
+
short: 'Ab',
|
|
5670
|
+
long: /* @__PURE__ */ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt. '.repeat(4),
|
|
5671
|
+
unicode: 'مرحبا بالعالم 👋 日本語テスト 🎉 Ñoño',
|
|
5672
|
+
};
|
|
5673
|
+
const stringPresetValue = (preset, custom) => preset === 'custom' ? (custom ?? '') : STRING_PRESETS[preset];
|
|
5674
|
+
const NUMBER_PRESETS = {
|
|
5675
|
+
zero: 0,
|
|
5676
|
+
negative: -1,
|
|
5677
|
+
huge: Number.MAX_SAFE_INTEGER,
|
|
5678
|
+
};
|
|
5679
|
+
const numberPresetValue = (preset, custom) => preset === 'custom' ? (custom ?? 0) : NUMBER_PRESETS[preset];
|
|
5680
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
5681
|
+
/** `invalid` is deliberately unparseable - "the API sent a date my code can't parse" is a real bug class. */
|
|
5682
|
+
const datePresetValue = (preset) => {
|
|
5683
|
+
switch (preset) {
|
|
5684
|
+
case 'now':
|
|
5685
|
+
return new Date().toISOString();
|
|
5686
|
+
case 'plusDay':
|
|
5687
|
+
return new Date(Date.now() + DAY_MS).toISOString();
|
|
5688
|
+
case 'minusDay':
|
|
5689
|
+
return new Date(Date.now() - DAY_MS).toISOString();
|
|
5690
|
+
case 'farFuture':
|
|
5691
|
+
return new Date('2099-01-01T00:00:00.000Z').toISOString();
|
|
5692
|
+
case 'farPast':
|
|
5693
|
+
return new Date(0).toISOString();
|
|
5694
|
+
case 'invalid':
|
|
5695
|
+
return 'not-a-date';
|
|
5696
|
+
}
|
|
5697
|
+
};
|
|
5698
|
+
const applyOp = (root, op) => {
|
|
5699
|
+
if (op.type === 'reset')
|
|
5700
|
+
return { root, ok: true };
|
|
5701
|
+
const resolution = resolvePath(root, op.path);
|
|
5702
|
+
if (!resolution.ok)
|
|
5703
|
+
return { root, ok: false };
|
|
5704
|
+
switch (op.type) {
|
|
5705
|
+
case 'set':
|
|
5706
|
+
return { root: withValueAtPath(root, op.path, op.value), ok: true };
|
|
5707
|
+
case 'booleanFlip':
|
|
5708
|
+
if (!resolution.exists || typeof resolution.value !== 'boolean')
|
|
5709
|
+
return { root, ok: false };
|
|
5710
|
+
return { root: withValueAtPath(root, op.path, !resolution.value), ok: true };
|
|
5711
|
+
case 'stringPreset':
|
|
5712
|
+
if (!resolution.exists)
|
|
5713
|
+
return { root, ok: false };
|
|
5714
|
+
return { root: withValueAtPath(root, op.path, stringPresetValue(op.preset, op.custom)), ok: true };
|
|
5715
|
+
case 'numberPreset':
|
|
5716
|
+
if (!resolution.exists)
|
|
5717
|
+
return { root, ok: false };
|
|
5718
|
+
return { root: withValueAtPath(root, op.path, numberPresetValue(op.preset, op.custom)), ok: true };
|
|
5719
|
+
case 'datePreset':
|
|
5720
|
+
if (!resolution.exists)
|
|
5721
|
+
return { root, ok: false };
|
|
5722
|
+
return { root: withValueAtPath(root, op.path, datePresetValue(op.preset)), ok: true };
|
|
5723
|
+
case 'duplicateArrayItem':
|
|
5724
|
+
if (!Array.isArray(resolution.value) || op.index < 0 || op.index >= resolution.value.length) {
|
|
5725
|
+
return { root, ok: false };
|
|
5726
|
+
}
|
|
5727
|
+
return { root: withValueAtPath(root, op.path, duplicateOneArrayItem(resolution.value, op.index)), ok: true };
|
|
5728
|
+
case 'duplicateArray':
|
|
5729
|
+
if (!Array.isArray(resolution.value))
|
|
5730
|
+
return { root, ok: false };
|
|
5731
|
+
return { root: withValueAtPath(root, op.path, duplicateWholeArray(resolution.value)), ok: true };
|
|
5732
|
+
case 'paginationResize': {
|
|
5733
|
+
const shape = detectPaginationShape(resolution.value);
|
|
5734
|
+
if (!shape)
|
|
5735
|
+
return { root, ok: false };
|
|
5736
|
+
return {
|
|
5737
|
+
root: withValueAtPath(root, op.path, resizePagination(resolution.value, shape, op.mode, op.amount)),
|
|
5738
|
+
ok: true,
|
|
5739
|
+
};
|
|
5740
|
+
}
|
|
5741
|
+
}
|
|
5742
|
+
};
|
|
5743
|
+
/**
|
|
5744
|
+
* Replays `entries` against `raw`, in order, and reports which ones no longer resolve. Shared by the
|
|
5745
|
+
* pipeline (which only needs {@link value}) and the panel's menu (which previews a value and marks stale
|
|
5746
|
+
* ops before arming a new one) - one implementation, so the two cannot drift.
|
|
5747
|
+
*/
|
|
5748
|
+
const applyQueryDevtoolsOverrides = (entries, raw) => {
|
|
5749
|
+
let root = raw;
|
|
5750
|
+
const staleIds = [];
|
|
5751
|
+
for (const entry of entries) {
|
|
5752
|
+
const applied = applyOp(root, entry.op);
|
|
5753
|
+
root = applied.root;
|
|
5754
|
+
if (!applied.ok)
|
|
5755
|
+
staleIds.push(entry.id);
|
|
5756
|
+
}
|
|
5757
|
+
return { value: root, staleIds };
|
|
5758
|
+
};
|
|
5759
|
+
/**
|
|
5760
|
+
* Accumulates the response overrides armed on one query, for the devtools panel. Only ever created
|
|
5761
|
+
* while {@link provideQueryDevtools} is installed - like {@link createQueryDevtoolsStats}, an app
|
|
5762
|
+
* without devtools pays nothing for it.
|
|
5763
|
+
* @internal
|
|
5764
|
+
*/
|
|
5765
|
+
const createQueryDevtoolsOverrides = () => {
|
|
5766
|
+
const list = signal([], /* @ts-ignore */
|
|
5767
|
+
...(ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []));
|
|
5768
|
+
let counter = 0;
|
|
5769
|
+
const arm = (op) => {
|
|
5770
|
+
if (op.type === 'reset') {
|
|
5771
|
+
list.update((current) => current.filter((entry) => !pathsEqual(entry.op.path, op.path)));
|
|
5772
|
+
return;
|
|
5773
|
+
}
|
|
5774
|
+
list.update((current) => [...current, { id: `override-${++counter}`, op }]);
|
|
5775
|
+
};
|
|
5776
|
+
const clear = (id) => list.update((current) => current.filter((entry) => entry.id !== id));
|
|
5777
|
+
const clearAll = () => list.set([]);
|
|
5778
|
+
const apply = (raw) => applyQueryDevtoolsOverrides(list(), raw).value;
|
|
5779
|
+
return { list: list.asReadonly(), arm, clear, clearAll, apply };
|
|
5780
|
+
};
|
|
5781
|
+
|
|
5418
5782
|
const EMPTY_STATS = {
|
|
5419
5783
|
executions: 0,
|
|
5420
5784
|
requests: 0,
|
|
@@ -5428,6 +5792,7 @@ const EMPTY_STATS = {
|
|
|
5428
5792
|
lastResponseAt: null,
|
|
5429
5793
|
lastDurationMs: null,
|
|
5430
5794
|
totalDurationMs: 0,
|
|
5795
|
+
lastResponseWasFaulted: false,
|
|
5431
5796
|
};
|
|
5432
5797
|
const textEncoder = typeof TextEncoder === 'function' ? /* @__PURE__ */ new TextEncoder() : null;
|
|
5433
5798
|
const byteLengthOf = (text) => textEncoder?.encode(text).length ?? text.length;
|
|
@@ -5572,6 +5937,7 @@ const createQueryDevtoolsStats = () => {
|
|
|
5572
5937
|
lastResponseAt: now,
|
|
5573
5938
|
lastDurationMs: duration,
|
|
5574
5939
|
totalDurationMs: current.totalDurationMs + (duration ?? 0),
|
|
5940
|
+
lastResponseWasFaulted: false,
|
|
5575
5941
|
}));
|
|
5576
5942
|
endRun({
|
|
5577
5943
|
endedAt: now,
|
|
@@ -5581,8 +5947,12 @@ const createQueryDevtoolsStats = () => {
|
|
|
5581
5947
|
hasResponse: true,
|
|
5582
5948
|
});
|
|
5583
5949
|
};
|
|
5584
|
-
const recordError = () => {
|
|
5585
|
-
stats.update((current) => ({
|
|
5950
|
+
const recordError = (options) => {
|
|
5951
|
+
stats.update((current) => ({
|
|
5952
|
+
...current,
|
|
5953
|
+
errors: current.errors + 1,
|
|
5954
|
+
lastResponseWasFaulted: options?.faulted ?? false,
|
|
5955
|
+
}));
|
|
5586
5956
|
endRun({ endedAt: Date.now(), status: 'error', receivedBytes: 0, response: null, hasResponse: false });
|
|
5587
5957
|
};
|
|
5588
5958
|
const recordRetry = ({ attempt }) => {
|
|
@@ -5762,6 +6132,7 @@ const registerEntry = (registration) => {
|
|
|
5762
6132
|
createdAt: Date.now(),
|
|
5763
6133
|
stats: registration.stats,
|
|
5764
6134
|
formLinks: registration.formLinks,
|
|
6135
|
+
overrides: registration.overrides,
|
|
5765
6136
|
};
|
|
5766
6137
|
entries.update((list) => [...list, fullEntry]);
|
|
5767
6138
|
return () => entries.update((list) => list.filter((e) => e.id !== fullEntry.id));
|
|
@@ -5785,6 +6156,7 @@ const provideQueryDevtools = () => {
|
|
|
5785
6156
|
setQueryDevtoolsRegistrar(registerEntry);
|
|
5786
6157
|
setQueryDevtoolsStatsFactory(createQueryDevtoolsStats);
|
|
5787
6158
|
setQueryDevtoolsFormLinksFactory(createQueryDevtoolsFormLinks);
|
|
6159
|
+
setQueryDevtoolsOverridesFactory(createQueryDevtoolsOverrides);
|
|
5788
6160
|
setQueryDevtoolsFaultResolver(resolveQueryDevtoolsFaultForAttempt);
|
|
5789
6161
|
if (!isDevMode()) {
|
|
5790
6162
|
console.warn('You are using the Query Devtools in production mode. This increases the size of your bundle and should only be used for development purposes.');
|
|
@@ -9536,19 +9908,19 @@ const removeFrom = (store, { where, id }) => {
|
|
|
9536
9908
|
/**
|
|
9537
9909
|
* @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.
|
|
9538
9910
|
*/
|
|
9539
|
-
const queryStateAlreadyHasKeyError = (data) => new
|
|
9911
|
+
const queryStateAlreadyHasKeyError = (data) => new RuntimeError(QueryRuntimeErrorCode.LEGACY_QUERY_STATE_ALREADY_HAS_KEY, 'The query state already contains the provided key', data);
|
|
9540
9912
|
/**
|
|
9541
9913
|
* @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.
|
|
9542
9914
|
*/
|
|
9543
|
-
const queryStateDoesNotContainKeyError = (data) => new
|
|
9915
|
+
const queryStateDoesNotContainKeyError = (data) => new RuntimeError(QueryRuntimeErrorCode.LEGACY_QUERY_STATE_DOES_NOT_CONTAIN_KEY, 'The query state does not contain the provided key', data);
|
|
9544
9916
|
/**
|
|
9545
9917
|
* @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.
|
|
9546
9918
|
*/
|
|
9547
|
-
const queryStateCannotTransformError = (data) => new
|
|
9919
|
+
const queryStateCannotTransformError = (data) => new RuntimeError(QueryRuntimeErrorCode.LEGACY_QUERY_STATE_CANNOT_TRANSFORM, 'The query state cannot be transformed because it is not loading', data);
|
|
9548
9920
|
/**
|
|
9549
9921
|
* @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.
|
|
9550
9922
|
*/
|
|
9551
|
-
const invalidBodyError = (data) => new
|
|
9923
|
+
const invalidBodyError = (data) => new RuntimeError(QueryRuntimeErrorCode.LEGACY_INVALID_BODY, 'The body is not valid or upsupported', data);
|
|
9552
9924
|
|
|
9553
9925
|
/**
|
|
9554
9926
|
* Binds a query-backed async validator to a signal-forms field, adapting a **legacy v2**
|
|
@@ -11307,5 +11679,5 @@ const createWebSocketClient = (options) => {
|
|
|
11307
11679
|
* Generated bundle index. Do not edit.
|
|
11308
11680
|
*/
|
|
11309
11681
|
|
|
11310
|
-
export { BasicAuthProvider, BearerAuthFeatureType, BooleanArrayQueryField, CLEAR_QUERY_ARGS, 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_UNUSED_ENTRIES, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, QUERY_DEVTOOLS_FAULT_STATUSES, QUERY_PERSISTENCE_STORE_VERSION, QUERY_SYNC_PROTOCOL_VERSION, QueryClientFeatureType, QueryDevtoolsComponent, QueryDirective,
|
|
11682
|
+
export { BasicAuthProvider, BearerAuthFeatureType, BooleanArrayQueryField, CLEAR_QUERY_ARGS, 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_UNUSED_ENTRIES, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, QUERY_DEVTOOLS_FAULT_STATUSES, QUERY_PERSISTENCE_STORE_VERSION, QUERY_SYNC_PROTOCOL_VERSION, QueryClientFeatureType, QueryDevtoolsComponent, QueryDirective, QueryFeatureType, QueryField, QueryForm, QueryFormSignals, QueryRuntimeErrorCode, QueryShortNamePipe, QueryStore, SERVER_ERROR_KIND, SERVER_VIOLATION_ERROR_KIND, SPEED_BUFFER_TIME_IN_MS, SearchQueryField, SortQueryField, StringArrayQueryField, V2BearerAuthProvider, V2Query, V2QueryClient, V2QueryCreator, addQueryContainerHandling, applyQueryDevtoolsOverrides, applyQueryFeatures, authExtractTokensResponseMissingAccessToken, authExtractTokensResponseMissingRefreshToken, authExtractTokensResponseNotObject, authProviderFeatureUsedMultipleTimes, booleanArrayQueryField, buildQueryCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, castQueryCreatorTypes, circularQueryDependency, circularQueryDependencyChecker, clearQueryDevtoolsFaults, collectLeafPaths, collectQueryFormLinks, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, consumeSuppressQueryStackDevtools, contentfulGqlLikePaginationAdapter, createBaseQuery, createBaseQueryCreator, createBearerAuthProvider, createDeleteQuery, createExecuteFn, createGetQuery, createGqlExecuteFn, createGqlMutationViaGet, createGqlMutationViaPost, createGqlQuery, createGqlQueryCreator, createGqlQueryViaGet, createGqlQueryViaPost, createHttpRequest, createIndexedDbQueryPersistenceAdapter, createInfinityQueryConfig, createLegacyQueryCreator, createNoopQueryPersistenceAdapter, createPagedQueryStack, createPatchQuery, createPersistentAuthFeature, createPostQuery, createPutQuery, createQuery, createQueryClient, createQueryCollection, createQueryCollectionSignal, createQueryCollectionSubject, createQueryContext, createQueryCreator, createQueryDevtoolsFormLinks, createQueryDevtoolsFormLinksRecorder, createQueryDevtoolsOverrides, createQueryDevtoolsOverridesRecorder, createQueryDevtoolsStats, createQueryDevtoolsStatsRecorder, createQueryErrorResponse, createQueryFeature, createQueryForm, createQueryInvalidationFilter, createQueryKeyLockManager, createQueryObject, createQueryPersistenceEngine, createQueryRepository, createQuerySnapshotFn, createQueryStack, createQuerySyncEngine, createQuerySyncTransport, createSecureDeleteQuery, createSecureExecuteFactory, createSecureExecuteFn, createSecureGetQuery, createSecureGqlExecuteFn, createSecureGqlMutationViaGet, createSecureGqlMutationViaPost, createSecureGqlQuery, createSecureGqlQueryCreator, createSecureGqlQueryViaGet, createSecureGqlQueryViaPost, createSecurePatchQuery, createSecurePostQuery, createSecurePutQuery, createSecureQuery, createSecureQueryCreator, createTrackingFeature, createWebSocketClient, dateArrayQueryField, dateQueryField, decryptBearer, deepFreeze, def, describeQueryDevtoolsFeatures, detectContentTypeHeader, detectPaginationShape, dynLikePaginationAdapter, effectComputed, emptyQueryArgs, ethletePaginationAdapter, executeUntilSettled, extractExpiresInSeconds, extractFormViolations, extractHtmlErrorMessage, extractQuery, fakePaginationAdapter, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, formatQueryDevtoolsDuration, getBearerAuthProviderName, getDefaultHeaders, getQueryClientName, getQueryFeatureUsage, getResponseUrl, ggLikePaginationAdapter, gql, gqlDataPropertyMissingInResponse, hasHeader, htmlErrorPayload, htmlQueryErrorParser, ignoreAutoRefresh, injectInfinityQueryResponseDelay, injectQueryContext, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, invalidStateInsideSecureExecuteFactory, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCreateGqlQueryOptions, isCustomHeaderAuthProvider, isDateShapedLeaf, isEmptyString, isGqlQueryConfig, isHtmlErrorPayload, isLegacyQuery, isNaN$1 as isNaN, isPageOutOfRangeError, isQuery, isQueryCollection, isQueryDevtoolsEnabled, isQueryDevtoolsFaultArmed, isQueryDevtoolsFaultInjectionEnabled, isQueryErrorResponse, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyListError, isSymfonyPagerfantaOutOfRangeError, isUnderInvalidatedUrl, legacyPrepareFallbackInjector, legacyPrepareWithoutInjectionContext, mapToPaginated, mapViolationsToFormErrors, maybeExecute, measureQueryDevtoolsPayload, mergeHeaders, nestedEffect, noteQueryFormRead, numberArrayQueryField, pagedQueryStackNextPageCalledWithoutPreviousPage, pagedQueryStackPageBiggerThanTotalPages, pagedQueryStackPreviousPageCalledButAlreadyAtFirstPage, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, parseHttpErrorCodeToMessageDe, parseHttpErrorCodeToMessageEn, parseHttpErrorCodeToTitleDe, parseHttpErrorCodeToTitleEn, parseQueryRoute, pathParamsMissingInRouteFunctionError, provideInfinityQueryResponseDelay, provideLegacyPrepareFallback, provideQueryClientForDevtools, provideQueryDevtools, queryArrayComputed, queryClientFeatureUsedMultipleTimes, queryComputed, queryComputedTillTruthy, queryDevtoolsEntries, queryDevtoolsFaults, queryDevtoolsFnDetail, queryErrorMessage, queryErrorMessages, queryExecute, queryFeatureUsedMultipleTimes, queryField, querySequence, querySequenceAlreadyRunning, queryStackTotalQueriesAndExpectedQueriesMismatch, queryStackWithArgsUsed, queryStackWithResponseUpdateUsed, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, queryStateErrorSignal, queryStateLoadingSignal, queryStateResponseSignal, queryStateSignal, registerQueryDevtoolsEntry, registerQueryErrorParser, removeFrom, request, resetExecuteState, resetPageOnError, resolveInvalidationUrl, resolveQueryDevtoolsFault, resolveQueryDevtoolsFaultForAttempt, runDefaultQueryRetry, runQueryErrorParsers, searchQueryField, serializeBody, setDefaultQueryRetryFn, setQueryDevtoolsFault, setQueryDevtoolsFaultResolver, setQueryDevtoolsFormLinksFactory, setQueryDevtoolsOverridesFactory, setQueryDevtoolsRegistrar, setQueryDevtoolsStatsFactory, setupQueryDependencies, setupQueryExecuteState, setupQueryState, shouldAutoExecuteGqlQuery, shouldAutoExecuteQuery, shouldCacheQuery, shouldRetryRequest, silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent, skipPaginationPageParamCalculator, smartDuplicateArrayItem, sortQueryField, splitQueryConfig, stringArrayQueryField, stringifyQueryRouteParts, sumQueryDevtoolsStats, suppressNextQueryStackDevtools, switchQueryCollectionState, switchQueryState, symfonyQueryErrorParser, takeUntilResponse, toQuerySignal, toQuerySubject, tokensNotAvailableInsideAuthAndExec, transformArrayResponse, transformExecStateToQueryState, transformGql, transformMethod, transformPaginatedResponse, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray, uncacheableRequestHasAllowCacheParam, uncacheableRequestHasCacheKeyParam, unwrapQuerySyncMessage, v2BuildQueryCacheKey, v2ExtractExpiresInSeconds, v2ShouldCacheQuery, v2ShouldRetryRequest, validateWithQuery, validateWithV2Query, withArgs, withArgsQueryFeatureMissingButRouteIsFunction, withAuthenticationQuery, withAutoRefresh, withAutoRefreshUsedInManualQuery, withAutoRefreshUsedOnUnsupportedHttpMethod, withBearerAuthMultiTabSync, withDefaultRetry, withErrorHandling, withEthleteApiErrors, withHtmlErrorParsing, withInactivityLogout, withLogging, withMultiTabSync, withPageResetOnError, withPersistentAuth, withPolling, withPollingUsedOnUnsupportedHttpMethod, withQueryPersistence, withRefreshQuery, withResponseUpdate, withSuccessHandling, withSymfonyErrors, withTokenExpirationWarning, withTokenRevocation, withTracking, wrapAsObservableSignal, wrapQuerySyncMessage };
|
|
11311
11683
|
//# sourceMappingURL=ethlete-query.mjs.map
|