@dataclouder/ngx-core 0.1.27 → 0.1.30

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.
@@ -1,4 +1,4 @@
1
- import { FormGroup } from '@angular/forms';
1
+ import { FormArray, FormGroup } from '@angular/forms';
2
2
  import { ActivatedRoute, Router } from '@angular/router';
3
3
  import { EntityCommunicationService } from '../../services/entity-cominication.service';
4
4
  import * as i0 from "@angular/core";
@@ -7,12 +7,17 @@ export declare abstract class EntityBaseFormComponent<T extends {
7
7
  }> {
8
8
  protected route: ActivatedRoute;
9
9
  protected router: Router;
10
+ toastService: import("@dataclouder/ngx-core").ToastAlertsAbstractService;
10
11
  entity: import("@angular/core").WritableSignal<T>;
11
12
  entityId: import("@angular/core").Signal<string>;
12
13
  abstract form: FormGroup;
13
14
  protected abstract entityCommunicationService: EntityCommunicationService<T>;
14
15
  protected abstract patchForm(entity: T): void;
15
16
  save(): Promise<T | undefined>;
17
+ getDirtyValues(form: FormGroup | FormArray): {
18
+ [key: string]: unknown;
19
+ };
20
+ saveDirtyValues(): Promise<T>;
16
21
  private loadEntityEffect;
17
22
  static ɵfac: i0.ɵɵFactoryDeclaration<EntityBaseFormComponent<any>, never>;
18
23
  static ɵdir: i0.ɵɵDirectiveDeclaration<EntityBaseFormComponent<any>, never, never, {}, {}, never, never, true, never>;
@@ -1,17 +1,21 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
2
3
  import { availibleFilters, FiltersConfig, ICustomFilter, SortOption, ListFilterBarOptions } from '../../models/filter.models';
3
4
  import { MenuItem } from 'primeng/api';
4
5
  import { OnActionEvent } from '../../models/pagination.abstract';
5
6
  import * as i0 from "@angular/core";
6
- export declare class DCFilterBarComponent implements OnInit {
7
+ export declare class DCFilterBarComponent implements OnInit, OnChanges {
8
+ private readonly fb;
7
9
  readonly items: import("@angular/core").InputSignal<MenuItem[]>;
8
10
  readonly options: import("@angular/core").InputSignal<ListFilterBarOptions>;
9
11
  customFilters: ICustomFilter[];
10
12
  readonly onFilterAction: import("@angular/core").OutputEmitterRef<any>;
11
13
  readonly onChangeSort: import("@angular/core").OutputEmitterRef<any>;
12
14
  readonly onNew: import("@angular/core").OutputEmitterRef<any>;
13
- customFilterModels: any[];
15
+ customFiltersForm: FormGroup;
14
16
  ngOnInit(): void;
17
+ ngOnChanges(changes: SimpleChanges): void;
18
+ private buildCustomFiltersForm;
15
19
  availibleFilters: {
16
20
  name: string;
17
21
  code: string;
@@ -30,8 +30,13 @@ export declare const sortTypes: ({
30
30
  })[];
31
31
  export interface ICustomFilter {
32
32
  name: string;
33
+ field: string;
33
34
  type: 'string' | 'number' | 'boolean' | 'date' | 'select';
34
- options?: any[];
35
+ options?: {
36
+ label: string;
37
+ value: any;
38
+ }[];
39
+ defaultValue?: any;
35
40
  }
36
41
  export interface FiltersConfig {
37
42
  page?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-core",
3
- "version": "0.1.27",
3
+ "version": "0.1.30",
4
4
  "description": "Angular core components library for DataClouder applications, only for internal use",
5
5
  "author": {
6
6
  "name": "dataclouder",