@sumaris-net/ngx-components 18.12.9 → 18.12.11

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "18.12.9",
4
+ "version": "18.12.11",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -1,7 +1,7 @@
1
1
  import { IEntity } from './entity.model';
2
2
  import { EntityFilter } from './filter.model';
3
3
  import { FilterFn } from '../../../shared/types';
4
- export declare interface ITreeItemEntity<T extends IEntity<T, ID>, ID = number> extends IEntity<T, ID> {
4
+ export declare interface ITreeItemEntity<T extends IEntity<T, ID>, ID = number> {
5
5
  parentId: ID;
6
6
  parent: T;
7
7
  children: T[];
@@ -57,5 +57,5 @@ export declare class TreeItemEntityUtils {
57
57
  * @param {new () => T} [dataType] - An optional class constructor used to shape the objects within the tree.
58
58
  * @return {T[] | undefined} An array of root elements representing the tree structure, or undefined if the input is empty.
59
59
  */
60
- static fromObjectArrayAsTrees<T extends ITreeItemEntity<any>>(sources: T[], dataType?: new () => T): T[];
60
+ static fromObjectArrayAsTrees<T extends ITreeItemEntity<T> & IEntity<T>>(sources: T[], dataType?: new () => T): T[];
61
61
  }
@@ -25,17 +25,18 @@ export declare class EntitiesAsyncTableDataSource<T extends IEntity<T, ID>, F =
25
25
  private readonly _entityName;
26
26
  protected _debug: boolean;
27
27
  protected _creating: boolean;
28
- protected _saving: boolean;
29
28
  protected _fetchMoreFn: FetchMoreFn<LoadResult<T>>;
30
29
  protected _waitingNetworkResult: boolean;
31
30
  protected _stopWatchSubject: Subject<void>;
32
31
  loadingSubject: BehaviorSubject<boolean>;
32
+ savingSubject: BehaviorSubject<boolean>;
33
33
  get watchAllOptions(): WO;
34
34
  set watchAllOptions(value: WO);
35
35
  get saveAllOptions(): SO;
36
36
  set saveAllOptions(value: SO);
37
37
  get loaded(): boolean;
38
38
  get loading(): boolean;
39
+ get saving(): boolean;
39
40
  /**
40
41
  * Creates a new TableDataSource instance, that can be used as datasource of `@angular/cdk` data-table.
41
42
  *
@@ -95,6 +96,8 @@ export declare class EntitiesAsyncTableDataSource<T extends IEntity<T, ID>, F =
95
96
  }): Promise<boolean>;
96
97
  markAsLoading(): void;
97
98
  markAsLoaded(): void;
99
+ markAsSaving(): void;
100
+ markAsSaved(): void;
98
101
  static ɵfac: i0.ɵɵFactoryDeclaration<EntitiesAsyncTableDataSource<any, any, any, any, any, any, any, any>, never>;
99
102
  static ɵdir: i0.ɵɵDirectiveDeclaration<EntitiesAsyncTableDataSource<any, any, any, any, any, any, any, any>, never, never, {}, {}, never, never, false, never>;
100
103
  }
@@ -26,17 +26,18 @@ export declare class EntitiesTableDataSource<T extends IEntity<T, ID>, F = any,
26
26
  private readonly _entityName;
27
27
  protected _debug: boolean;
28
28
  protected _creating: boolean;
29
- protected _saving: boolean;
30
29
  protected _fetchMoreFn: FetchMoreFn<LoadResult<T>>;
31
30
  protected _waitingNetworkResult: boolean;
32
31
  protected _stopWatchSubject: Subject<void>;
33
32
  loadingSubject: BehaviorSubject<boolean>;
33
+ savingSubject: BehaviorSubject<boolean>;
34
34
  get watchAllOptions(): WO;
35
35
  set watchAllOptions(value: WO);
36
36
  get saveAllOptions(): SO;
37
37
  set saveAllOptions(value: SO);
38
38
  get loaded(): boolean;
39
39
  get loading(): boolean;
40
+ get saving(): boolean;
40
41
  /**
41
42
  * Creates a new TableDataSource instance, that can be used as datasource of `@angular/cdk` data-table.
42
43
  *
@@ -47,10 +48,6 @@ export declare class EntitiesTableDataSource<T extends IEntity<T, ID>, F = any,
47
48
  */
48
49
  constructor(dataType: new () => T, dataService: IEntitiesService<T, F, WO>, validatorService?: V, options?: C);
49
50
  ngOnDestroy(): void;
50
- /**
51
- * @deprecated use disconnect
52
- */
53
- close(): void;
54
51
  watchAll(offset: number, size: number, sortBy?: string, sortDirection?: SortDirection, filter?: Partial<F>): Observable<LoadResult<T>>;
55
52
  protected updateDatasourceFromRows(rows: R[]): void;
56
53
  save(): Promise<boolean>;
@@ -98,6 +95,8 @@ export declare class EntitiesTableDataSource<T extends IEntity<T, ID>, F = any,
98
95
  }): Promise<boolean>;
99
96
  markAsLoading(): void;
100
97
  markAsLoaded(): void;
98
+ markAsSaving(): void;
99
+ markAsSaved(): void;
101
100
  static ɵfac: i0.ɵɵFactoryDeclaration<EntitiesTableDataSource<any, any, any, any, any, any, any, any>, never>;
102
101
  static ɵdir: i0.ɵɵDirectiveDeclaration<EntitiesTableDataSource<any, any, any, any, any, any, any, any>, never, never, {}, {}, never, never, false, never>;
103
102
  }
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "18.12.9",
5
+ "version": "18.12.11",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{