@ethlete/query 5.4.1 → 5.5.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.
@@ -5,8 +5,15 @@ export declare class QueryField<T> {
5
5
  get control(): import("@angular/forms").FormControl<T | null>;
6
6
  constructor(data: QueryFieldOptions<T>);
7
7
  }
8
+ export interface QueryFormOptions {
9
+ /**
10
+ * A prefix to use for the query parameters. This is useful when you have multiple query forms on the same page.
11
+ */
12
+ queryParamPrefix?: string;
13
+ }
8
14
  export declare class QueryForm<T extends Record<string, QueryField<any>>> {
9
15
  private _fields;
16
+ private _options?;
10
17
  private readonly _destroy$;
11
18
  private readonly _unobserveTrigger$;
12
19
  private readonly _router;
@@ -58,7 +65,7 @@ export declare class QueryForm<T extends Record<string, QueryField<any>>> {
58
65
  } : QueryFormGroupControls<T>;
59
66
  get value(): QueryFormValue<T>;
60
67
  get defaultFormValue(): QueryFormValue<T>;
61
- constructor(_fields: T);
68
+ constructor(_fields: T, _options?: QueryFormOptions | undefined);
62
69
  observe(options?: QueryFormObserveOptions): void;
63
70
  private _handleQueryFormResets;
64
71
  unobserve(): void;
@@ -68,6 +75,7 @@ export declare class QueryForm<T extends Record<string, QueryField<any>>> {
68
75
  setValue(value: QueryFormValue<T>, options?: QueryFormWriteOptions): void;
69
76
  patchValue(value: Partial<QueryFormValue<T>>, options?: QueryFormWriteOptions): void;
70
77
  private _getDefaultValue;
78
+ private _transformKeyToQueryParam;
71
79
  private _isDefaultValue;
72
80
  private _setupFormGroup;
73
81
  private _extractDefaultValues;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@ethlete/query",
3
- "version": "5.4.1",
3
+ "version": "5.5.0",
4
4
  "peerDependencies": {
5
- "@angular/common": "17.1.1",
6
- "@angular/core": "17.1.1",
7
- "@angular/forms": "17.1.1",
8
- "@angular/router": "17.1.1",
5
+ "@angular/common": "17.2.1",
6
+ "@angular/core": "17.2.1",
7
+ "@angular/forms": "17.2.1",
8
+ "@angular/router": "17.2.1",
9
9
  "@ethlete/core": "^4.0.3",
10
10
  "@ethlete/types": "^1.6.2",
11
11
  "rxjs": "^7.8.1"