@ethlete/query 4.6.1 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/index.mjs +2 -1
- package/esm2022/lib/devtools/components/public-api.mjs +2 -0
- package/esm2022/lib/devtools/components/query-devtools/public-api.mjs +2 -0
- package/esm2022/lib/devtools/components/query-devtools/query-devtools.component.mjs +103 -0
- package/esm2022/lib/devtools/index.mjs +2 -0
- package/esm2022/lib/devtools/public-api.mjs +3 -0
- package/esm2022/lib/devtools/utils/index.mjs +2 -0
- package/esm2022/lib/devtools/utils/public-api.mjs +2 -0
- package/esm2022/lib/devtools/utils/query-client.utils.mjs +13 -0
- package/esm2022/lib/query/query.mjs +17 -4
- package/esm2022/lib/query-client/query-client.mjs +1 -1
- package/esm2022/lib/query-client/query-client.types.mjs +1 -1
- package/esm2022/lib/query-store/query-store.mjs +9 -2
- package/fesm2022/ethlete-query.mjs +135 -5
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/devtools/components/public-api.d.ts +1 -0
- package/lib/devtools/components/query-devtools/public-api.d.ts +1 -0
- package/lib/devtools/components/query-devtools/query-devtools.component.d.ts +34 -0
- package/lib/devtools/index.d.ts +1 -0
- package/lib/devtools/public-api.d.ts +2 -0
- package/lib/devtools/utils/index.d.ts +1 -0
- package/lib/devtools/utils/public-api.d.ts +1 -0
- package/lib/devtools/utils/query-client.utils.d.ts +12 -0
- package/lib/query/query.d.ts +6 -2
- package/lib/query-client/query-client.d.ts +0 -1
- package/lib/query-client/query-client.types.d.ts +5 -0
- package/lib/query-store/query-store.d.ts +2 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './query-devtools/public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './query-devtools.component';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TrackByFunction } from '@angular/core';
|
|
2
|
+
import { AnyQuery } from '../../../query';
|
|
3
|
+
import { QueryClientDevtoolsOptions } from '../../utils';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
type QueryDevtoolsSnapLayout = 'full' | 'left' | 'right' | 'bottom' | 'top';
|
|
6
|
+
export declare class QueryDevtoolsComponent {
|
|
7
|
+
protected readonly _destroy$: import("rxjs").Observable<boolean>;
|
|
8
|
+
protected readonly queryClientConfigs: QueryClientDevtoolsOptions[];
|
|
9
|
+
protected readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
10
|
+
protected readonly isTranslucent: import("@angular/core").WritableSignal<boolean>;
|
|
11
|
+
protected readonly snapLayout: import("@angular/core").WritableSignal<QueryDevtoolsSnapLayout>;
|
|
12
|
+
protected showResponse: import("@angular/core").WritableSignal<boolean>;
|
|
13
|
+
protected showRawResponse: import("@angular/core").WritableSignal<boolean>;
|
|
14
|
+
protected readonly selectedClientId: import("@angular/core").WritableSignal<number>;
|
|
15
|
+
protected readonly selectedQueryPath: import("@angular/core").WritableSignal<string | null>;
|
|
16
|
+
protected readonly selectedClientConfig: import("@angular/core").Signal<QueryClientDevtoolsOptions>;
|
|
17
|
+
protected readonly queryStore: import("@angular/core").Signal<import("@ethlete/query").QueryStore>;
|
|
18
|
+
private readonly _queries$;
|
|
19
|
+
protected readonly queries: import("@angular/core").Signal<AnyQuery[] | undefined>;
|
|
20
|
+
protected readonly selectedQuery: import("@angular/core").Signal<AnyQuery | null>;
|
|
21
|
+
constructor();
|
|
22
|
+
protected trackByClient: TrackByFunction<QueryClientDevtoolsOptions>;
|
|
23
|
+
protected trackByQuery: TrackByFunction<AnyQuery>;
|
|
24
|
+
protected toggleOpen(): void;
|
|
25
|
+
protected toggleTranslucent(): void;
|
|
26
|
+
protected toggleShowResponse(): void;
|
|
27
|
+
protected toggleShowRawResponse(): void;
|
|
28
|
+
protected selectSnapLayout(layout: QueryDevtoolsSnapLayout): void;
|
|
29
|
+
protected selectClient(clientId: number): void;
|
|
30
|
+
protected selectQuery(query: AnyQuery): void;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryDevtoolsComponent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QueryDevtoolsComponent, "et-query-devtools", never, {}, {}, never, never, true, never>;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './query-client.utils';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { QueryClient } from '../../query-client';
|
|
3
|
+
export interface QueryClientDevtoolsOptions {
|
|
4
|
+
displayName?: string;
|
|
5
|
+
client: QueryClient;
|
|
6
|
+
}
|
|
7
|
+
export declare const QUERY_CLIENT_DEVTOOLS_TOKEN: InjectionToken<QueryClientDevtoolsOptions[]>;
|
|
8
|
+
export declare const provideQueryClientForDevtools: (queryClient: QueryClientDevtoolsOptions) => {
|
|
9
|
+
provide: InjectionToken<QueryClientDevtoolsOptions[]>;
|
|
10
|
+
useValue: QueryClientDevtoolsOptions;
|
|
11
|
+
multi: boolean;
|
|
12
|
+
};
|
package/lib/query/query.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { BaseArguments, ExecuteQueryOptions, GqlQueryConfig, PollConfig, QueryAu
|
|
|
5
5
|
export declare class Query<Response, Arguments extends BaseArguments | undefined, Route extends RouteType<Arguments>, Store extends EntityStore<unknown>, Data, Id> {
|
|
6
6
|
private _client;
|
|
7
7
|
private _queryConfig;
|
|
8
|
-
private _routeWithParams;
|
|
9
8
|
private _args;
|
|
10
9
|
private _currentId;
|
|
11
10
|
private _pollingSubscription;
|
|
@@ -24,10 +23,15 @@ export declare class Query<Response, Arguments extends BaseArguments | undefined
|
|
|
24
23
|
get rawState(): QueryState<Response>;
|
|
25
24
|
get isExpired(): boolean;
|
|
26
25
|
get isInUse(): boolean;
|
|
26
|
+
get _subscriberCount(): number;
|
|
27
27
|
get isPolling(): boolean;
|
|
28
28
|
get autoRefreshOnConfig(): Readonly<QueryAutoRefreshConfig>;
|
|
29
29
|
get store(): Store | null;
|
|
30
|
-
constructor(_client: QueryClient, _queryConfig: RestQueryConfig<Route, Response, Arguments, Store, Data, Id> | GqlQueryConfig<Route, Response, Arguments, Store, Data, Id>,
|
|
30
|
+
constructor(_client: QueryClient, _queryConfig: RestQueryConfig<Route, Response, Arguments, Store, Data, Id> | GqlQueryConfig<Route, Response, Arguments, Store, Data, Id>,
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
_routeWithParams: Route, _args: Arguments);
|
|
31
35
|
execute(options?: ExecuteQueryOptions): this;
|
|
32
36
|
abort(): this;
|
|
33
37
|
poll(config: PollConfig): this;
|
|
@@ -6,7 +6,6 @@ import { RequestHeaders, RequestHeadersMethodMap } from '../request';
|
|
|
6
6
|
import { QueryClientConfig } from './query-client.types';
|
|
7
7
|
export declare class QueryClient {
|
|
8
8
|
private _clientConfig;
|
|
9
|
-
private readonly _store;
|
|
10
9
|
get config(): QueryClientConfig;
|
|
11
10
|
get authProvider(): AuthProvider | null;
|
|
12
11
|
get authProvider$(): import("rxjs").Observable<AuthProvider | null>;
|
|
@@ -19,6 +19,11 @@ export interface QueryClientConfig {
|
|
|
19
19
|
* Log query state garbage collector runs.
|
|
20
20
|
*/
|
|
21
21
|
queryStateGarbageCollector?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Log if subscriptions are made to queries that are in the `prepared` state.
|
|
24
|
+
* This usually indicates that the `.execute()` method was forgotten.
|
|
25
|
+
*/
|
|
26
|
+
preparedQuerySubscriptions?: boolean;
|
|
22
27
|
};
|
|
23
28
|
/**
|
|
24
29
|
* Request options.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { AnyQuery } from '../query';
|
|
2
2
|
export declare class QueryStore {
|
|
3
3
|
private _config?;
|
|
4
|
-
private readonly _store;
|
|
5
4
|
private _garbageCollector;
|
|
6
5
|
private _isInLowResourceMode;
|
|
7
6
|
private _lastBlurTimestamp;
|
|
7
|
+
private _storeChange$;
|
|
8
|
+
readonly storeChange$: import("rxjs").Observable<string>;
|
|
8
9
|
constructor(_config?: {
|
|
9
10
|
enableChangeLogging?: boolean | undefined;
|
|
10
11
|
enableGarbageCollectorLogging?: boolean | undefined;
|