@ethlete/query 4.13.0 → 4.14.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.
@@ -33,10 +33,26 @@ export declare class QueryForm<T extends Record<string, QueryField<any>>> {
33
33
  private get _formValue();
34
34
  private readonly _changes$;
35
35
  readonly changes$: import("rxjs").Observable<QueryFormValueEvent<T>>;
36
+ /**
37
+ * The number of active filters.
38
+ *
39
+ * Excludes the following fields by default:
40
+ * - `page`
41
+ * - `skip`
42
+ * - `take`
43
+ * - `limit`
44
+ * - `sort`
45
+ * - `sortBy`
46
+ * - `sortOrder`
47
+ * - `query`
48
+ * - `search`
49
+ */
50
+ readonly activeFilterCount$: import("rxjs").Observable<number>;
36
51
  get controls(): 0 extends 1 & QueryFormGroupControls<T> ? {
37
52
  [key: string]: import("@angular/forms").AbstractControl<any, any>;
38
53
  } : QueryFormGroupControls<T>;
39
54
  get value(): QueryFormValue<T>;
55
+ get defaultFormValue(): QueryFormValue<T>;
40
56
  constructor(_fields: T);
41
57
  observe(options?: QueryFormObserveOptions): void;
42
58
  private _handleQueryFormResets;
@@ -36,6 +36,22 @@ export interface QueryFieldOptions<T = unknown> {
36
36
  * ['limit', 'query', 'search']
37
37
  */
38
38
  isResetBy?: string | string[];
39
+ /**
40
+ * Whether the field should change the count of current active filters.
41
+ *
42
+ * Will be `true` for these common fields:
43
+ * - `page`
44
+ * - `skip`
45
+ * - `take`
46
+ * - `limit`
47
+ * - `sort`
48
+ * - `sortBy`
49
+ * - `sortOrder`
50
+ * - `query`
51
+ * - `search`
52
+ * @default false
53
+ */
54
+ skipInFilterCount?: boolean;
39
55
  /**
40
56
  * A function that transforms the the value gotten from the url query params to a value required by the field.
41
57
  * E.g. for a number field, the value from the url query params is a string, but the field requires a number.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@ethlete/query",
3
- "version": "4.13.0",
3
+ "version": "4.14.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.4.0"
10
+ "@ethlete/core": "3.7.0"
11
11
  },
12
12
  "module": "fesm2022/ethlete-query.mjs",
13
13
  "typings": "index.d.ts",