@ethlete/query 4.10.0 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/auth/auth-provider.types.mjs +1 -1
- package/esm2022/lib/auth/bearer-auth-provider.mjs +17 -7
- package/esm2022/lib/devtools/components/query-devtools/query-devtools.component.mjs +3 -3
- package/esm2022/lib/devtools/pipes/query-short-name.pipe.mjs +3 -3
- package/esm2022/lib/directives/infinity-query-trigger.directive.mjs +3 -3
- package/esm2022/lib/directives/infinity-query.directive.mjs +3 -3
- package/esm2022/lib/directives/query.directive.mjs +3 -3
- package/esm2022/lib/query-form/query-form.mjs +93 -76
- package/fesm2022/ethlete-query.mjs +217 -191
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/lib/auth/auth-provider.types.d.ts +18 -0
- package/lib/auth/bearer-auth-provider.d.ts +2 -0
- package/lib/query-form/query-form.d.ts +8 -28
- package/package.json +2 -2
|
@@ -56,6 +56,24 @@ export interface BearerRefreshConfig<T extends AnyQueryCreator> {
|
|
|
56
56
|
* The cookie name where the refresh token is stored
|
|
57
57
|
*/
|
|
58
58
|
cookieName?: string;
|
|
59
|
+
/**
|
|
60
|
+
* The domain of the cookie. If not set, the current origin will be used.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* "https://example.com" -> "example.com"
|
|
64
|
+
* "https://sub.example.com" -> "example.com"
|
|
65
|
+
*/
|
|
66
|
+
cookieDomain?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The days until the cookie expires
|
|
69
|
+
* @default 30
|
|
70
|
+
*/
|
|
71
|
+
cookieExpiresInDays?: number;
|
|
72
|
+
/**
|
|
73
|
+
* The path of the cookie
|
|
74
|
+
* @default '/'
|
|
75
|
+
*/
|
|
76
|
+
cookiePath?: string;
|
|
59
77
|
/**
|
|
60
78
|
* Enable or disable the cookie
|
|
61
79
|
* @default true
|
|
@@ -1,27 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { QueryFieldOptions, QueryFormGroupControls, QueryFormObserveOptions, QueryFormValue } from './query-form.types';
|
|
3
|
-
export declare class QueryFormGroup<T extends {
|
|
4
|
-
[K in keyof T]: AbstractControl<any, any>;
|
|
5
|
-
} = any> extends FormGroup<T> {
|
|
6
|
-
patchValue(value: 0 extends 1 & T ? {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
} : Partial<{
|
|
9
|
-
[K in keyof T]: ɵValue<T[K]>;
|
|
10
|
-
}>, options?: {
|
|
11
|
-
onlySelf?: boolean | undefined;
|
|
12
|
-
emitEvent?: boolean | undefined;
|
|
13
|
-
} | undefined): void;
|
|
14
|
-
}
|
|
1
|
+
import { FormGroup } from '@angular/forms';
|
|
2
|
+
import { QueryFieldOptions, QueryFormGroupControls, QueryFormObserveOptions, QueryFormValue, QueryFormValueEvent } from './query-form.types';
|
|
15
3
|
export declare class QueryField<T> {
|
|
16
4
|
data: QueryFieldOptions<T>;
|
|
17
|
-
changes$: import("rxjs").Observable<T | null>;
|
|
18
5
|
get control(): import("@angular/forms").FormControl<T | null>;
|
|
19
|
-
private _currentDebounceTimeout;
|
|
20
6
|
constructor(data: QueryFieldOptions<T>);
|
|
21
|
-
setValue(value: T | null, options?: {
|
|
22
|
-
skipDebounce?: boolean;
|
|
23
|
-
}): void;
|
|
24
|
-
private _setupChangesObservable;
|
|
25
7
|
}
|
|
26
8
|
export declare class QueryForm<T extends Record<string, QueryField<any>>> {
|
|
27
9
|
private _fields;
|
|
@@ -32,18 +14,16 @@ export declare class QueryForm<T extends Record<string, QueryField<any>>> {
|
|
|
32
14
|
private readonly _defaultValues;
|
|
33
15
|
private readonly _routerStateService;
|
|
34
16
|
private readonly _zone;
|
|
17
|
+
private readonly _didValueChanges$;
|
|
35
18
|
private _isObserving;
|
|
36
|
-
readonly form:
|
|
19
|
+
readonly form: FormGroup<QueryFormGroupControls<T>>;
|
|
37
20
|
private readonly _lastFormValue$;
|
|
38
21
|
private readonly _currentFormValue$;
|
|
39
22
|
private get _formValue();
|
|
40
23
|
private readonly _changes$;
|
|
41
|
-
readonly changes$: import("rxjs").Observable<
|
|
42
|
-
previousValue: QueryFormValue<T> | null;
|
|
43
|
-
currentValue: QueryFormValue<T>;
|
|
44
|
-
}>;
|
|
24
|
+
readonly changes$: import("rxjs").Observable<QueryFormValueEvent<T>>;
|
|
45
25
|
get controls(): 0 extends 1 & QueryFormGroupControls<T> ? {
|
|
46
|
-
[key: string]: AbstractControl<any, any>;
|
|
26
|
+
[key: string]: import("@angular/forms").AbstractControl<any, any>;
|
|
47
27
|
} : QueryFormGroupControls<T>;
|
|
48
28
|
get value(): QueryFormValue<T>;
|
|
49
29
|
constructor(_fields: T);
|
|
@@ -52,11 +32,11 @@ export declare class QueryForm<T extends Record<string, QueryField<any>>> {
|
|
|
52
32
|
unobserve(): void;
|
|
53
33
|
setFormValueFromUrlQueryParams(options: {
|
|
54
34
|
queryParams: Record<string, unknown>;
|
|
55
|
-
|
|
56
|
-
}): void;
|
|
35
|
+
}): boolean;
|
|
57
36
|
private _getDefaultValue;
|
|
58
37
|
private _isDefaultValue;
|
|
59
38
|
private _setupFormGroup;
|
|
60
39
|
private _extractDefaultValues;
|
|
61
40
|
private _syncViaUrlQueryParams;
|
|
41
|
+
private _handleFormChange;
|
|
62
42
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/query",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"tslib": "^2.5.0"
|
|
6
6
|
},
|
|
7
7
|
"peerDependencies": {
|
|
8
8
|
"@angular/common": "^15.2.1 || ^16.0.0",
|
|
9
9
|
"@angular/core": "^15.2.1 || ^16.0.0",
|
|
10
|
-
"@ethlete/core": "3.
|
|
10
|
+
"@ethlete/core": "3.4.0"
|
|
11
11
|
},
|
|
12
12
|
"module": "fesm2022/ethlete-query.mjs",
|
|
13
13
|
"typings": "index.d.ts",
|