@ethlete/query 5.15.1 → 5.16.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/CHANGELOG.md +14 -0
- 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 +13 -2
- package/esm2022/lib/query-form/query-form.types.mjs +1 -1
- package/fesm2022/ethlete-query.mjs +27 -16
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/lib/query-form/query-form.d.ts +3 -1
- package/lib/query-form/query-form.types.d.ts +8 -1
- package/package.json +5 -5
|
@@ -78,7 +78,9 @@ export declare class QueryForm<T extends Record<string, QueryField<any>>> {
|
|
|
78
78
|
patchValue(value: Partial<QueryFormValue<T>>, options?: QueryFormWriteOptions): void;
|
|
79
79
|
resetFieldToDefault(key: keyof QueryFormValue<T>, options?: QueryFormWriteOptions): void;
|
|
80
80
|
resetFieldsToDefault(keys: (keyof QueryFormValue<T>)[], options?: QueryFormWriteOptions): void;
|
|
81
|
-
resetAllFieldsToDefault(options?: QueryFormWriteOptions
|
|
81
|
+
resetAllFieldsToDefault(options?: QueryFormWriteOptions & {
|
|
82
|
+
skipFields?: (keyof QueryFormValue<T>)[];
|
|
83
|
+
}): void;
|
|
82
84
|
private _getDefaultValue;
|
|
83
85
|
private _transformKeyToQueryParam;
|
|
84
86
|
private _isDefaultValue;
|
|
@@ -25,7 +25,7 @@ export interface QueryFieldOptions<T = unknown> {
|
|
|
25
25
|
* Append the field's value to the url.
|
|
26
26
|
*
|
|
27
27
|
* The field wont be appended to the url if one of the following is true:
|
|
28
|
-
* - It is the default value
|
|
28
|
+
* - It is the default value and `appendDefaultValueToUrl` is `false`
|
|
29
29
|
* - It is an empty string
|
|
30
30
|
* - It is `null`
|
|
31
31
|
* - It is `undefined`
|
|
@@ -33,6 +33,13 @@ export interface QueryFieldOptions<T = unknown> {
|
|
|
33
33
|
* @default true
|
|
34
34
|
*/
|
|
35
35
|
appendToUrl?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Append the field's value to the url even if it is the default value.
|
|
38
|
+
* Will be ignored if `appendToUrl` is `false`.
|
|
39
|
+
*
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
appendDefaultValueToUrl?: boolean;
|
|
36
43
|
/**
|
|
37
44
|
* Reset the field's value to the default value if one or more of the specified fields are changed.
|
|
38
45
|
*
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/query",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.16.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "18.0.
|
|
6
|
-
"@angular/core": "18.0.
|
|
7
|
-
"@angular/forms": "18.0.
|
|
8
|
-
"@angular/router": "18.0.
|
|
5
|
+
"@angular/common": "18.0.6",
|
|
6
|
+
"@angular/core": "18.0.6",
|
|
7
|
+
"@angular/forms": "18.0.6",
|
|
8
|
+
"@angular/router": "18.0.6",
|
|
9
9
|
"@ethlete/core": "^4.0.3",
|
|
10
10
|
"@ethlete/types": "^1.6.2",
|
|
11
11
|
"rxjs": "^7.8.1"
|