@ethlete/query 0.1.0-next.3 → 0.1.0-next.4
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/esm2020/lib/directives/infinity-query.directive.mjs +11 -2
- package/esm2020/lib/query-form/query-form.types.mjs +1 -1
- package/fesm2015/ethlete-query.mjs +9 -0
- package/fesm2015/ethlete-query.mjs.map +1 -1
- package/fesm2020/ethlete-query.mjs +9 -0
- package/fesm2020/ethlete-query.mjs.map +1 -1
- package/lib/directives/infinity-query.directive.d.ts +3 -0
- package/lib/query-form/query-form.types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -34,10 +34,14 @@ export interface QueryFieldOptions<T = unknown> {
|
|
|
34
34
|
* - `transformToBooleanArray`
|
|
35
35
|
* - `transformToDate` (expects a string in the default js format)
|
|
36
36
|
* - `transformToDateArray` (expects strings in the default js format)
|
|
37
|
+
* - `transformToSort` (expects a string in the format `field:direction`)
|
|
37
38
|
*/
|
|
38
39
|
queryParamToValueTransformFn?: (val: unknown) => T | null;
|
|
39
40
|
/**
|
|
40
41
|
* A function that transforms the value of the field to a value that can be appended to the url query params.
|
|
42
|
+
*
|
|
43
|
+
* The following common transformations are already implemented:
|
|
44
|
+
* - `transformToSortQueryParam` (returns an object containing `field` and `direction` properties)
|
|
41
45
|
*/
|
|
42
46
|
valueToQueryParamTransformFn?: (val: T | null) => unknown;
|
|
43
47
|
}
|