@onecx/angular-accelerator 5.14.0 → 5.15.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/index.d.ts CHANGED
@@ -44,3 +44,4 @@ export * from './lib/utils/primeicon.utils';
44
44
  export * from './lib/utils/translate.combined.loader';
45
45
  export * from './lib/utils/create-remote-component-translate-loader.utils';
46
46
  export * from './lib/utils/enum-to-dropdown-options.utils';
47
+ export * from './lib/utils/criteria.utils';
@@ -0,0 +1,18 @@
1
+ import { QueryList } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { Calendar } from 'primeng/calendar';
4
+ export type hasShowTimeFunction = (key: string) => boolean;
5
+ /**
6
+ * removeNullValues: whether to remove entries from the search criteria where the value is null
7
+ */
8
+ export interface BuildSearchCriteriaParameters {
9
+ removeNullValues: boolean;
10
+ }
11
+ /**
12
+ * Safely builds the search criteria based on form values
13
+ * @param formValues the form values to use
14
+ * @param calendars a list of primeng calendars of the form (use `@ViewChildren(Calendar) calendars!: QueryList<Calendar>;`)
15
+ * @param parameters {@link BuildSearchCriteriaParameters} to use when building the search criteria
16
+ * @returns the search criteria as a partial of T (T = type of the search criteria)
17
+ */
18
+ export declare function buildSearchCriteria<T>(formValues: FormGroup<any>, calendars: QueryList<Calendar>, { removeNullValues }: BuildSearchCriteriaParameters): Partial<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onecx/angular-accelerator",
3
- "version": "5.14.0",
3
+ "version": "5.15.0",
4
4
  "license": "Apache-2.0",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^18.0.5",