@ethlete/query 5.5.0 → 5.6.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/CHANGELOG.md +988 -0
- package/esm2022/lib/query-form/query-form.mjs +12 -4
- package/esm2022/lib/query-form/query-form.types.mjs +1 -1
- package/fesm2022/ethlete-query.mjs +11 -3
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/lib/query-form/query-form.d.ts +2 -1
- package/lib/query-form/query-form.types.d.ts +10 -1
- package/package.json +1 -1
|
@@ -38,6 +38,7 @@ export declare class QueryForm<T extends Record<string, QueryField<any>>> {
|
|
|
38
38
|
private readonly _lastFormValue$;
|
|
39
39
|
private readonly _currentFormValue$;
|
|
40
40
|
private get _formValue();
|
|
41
|
+
private get _form();
|
|
41
42
|
private readonly _changes$;
|
|
42
43
|
readonly changes$: import("rxjs").Observable<QueryFormValueEvent<T>>;
|
|
43
44
|
readonly currentValue$: import("rxjs").Observable<QueryFormValue<T>>;
|
|
@@ -66,7 +67,7 @@ export declare class QueryForm<T extends Record<string, QueryField<any>>> {
|
|
|
66
67
|
get value(): QueryFormValue<T>;
|
|
67
68
|
get defaultFormValue(): QueryFormValue<T>;
|
|
68
69
|
constructor(_fields: T, _options?: QueryFormOptions | undefined);
|
|
69
|
-
observe(options?: QueryFormObserveOptions):
|
|
70
|
+
observe(options?: QueryFormObserveOptions): this;
|
|
70
71
|
private _handleQueryFormResets;
|
|
71
72
|
unobserve(): void;
|
|
72
73
|
setFormValueFromUrlQueryParams(options: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormControl } from '@angular/forms';
|
|
1
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
|
2
2
|
import { QueryField } from './query-form';
|
|
3
3
|
export interface QueryFieldOptions<T = unknown> {
|
|
4
4
|
/**
|
|
@@ -82,6 +82,15 @@ export type QueryFormGroupControls<T extends Record<string, QueryField<any>>> =
|
|
|
82
82
|
export type QueryFormValue<T extends Record<string, QueryField<any>>> = {
|
|
83
83
|
[Property in keyof T]: T[Property]['control']['value'];
|
|
84
84
|
};
|
|
85
|
+
export type QueryFormOf<T extends FormGroup> = {
|
|
86
|
+
[K in keyof T['controls']]: QueryField<T['controls'][K]['value']>;
|
|
87
|
+
};
|
|
88
|
+
export interface QueryFormGroup extends FormGroup {
|
|
89
|
+
_setValue: FormGroup['setValue'];
|
|
90
|
+
_patchValue: FormGroup['patchValue'];
|
|
91
|
+
setValue(value: unknown, options?: QueryFormWriteOptions): void;
|
|
92
|
+
patchValue(value: unknown, options?: QueryFormWriteOptions): void;
|
|
93
|
+
}
|
|
85
94
|
export interface QueryFormObserveOptions {
|
|
86
95
|
/**
|
|
87
96
|
* Whether the form value should be synced to the url query params.
|