@sumaris-net/ngx-components 2.4.55 → 2.4.57

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": "2.4.55",
4
+ "version": "2.4.57",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -83,4 +83,7 @@ export declare abstract class EntityUtils {
83
83
  static isRemote(entity: IEntity<any, any> | Entity<any, any>): boolean;
84
84
  static isLocalId(id: number): boolean;
85
85
  static isRemoteId(id: number): boolean;
86
+ static getId<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(entity: T): ID;
87
+ static collectById<T extends IEntity<T, ID>, ID = any>(entities: T[]): ID[];
88
+ static arrayDistinctFilterFn<E extends IEntity<any, any>>(item: E, index: number, values: E[]): boolean;
86
89
  }
@@ -63,15 +63,8 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
63
63
  */
64
64
  get error$(): Observable<string>;
65
65
  set error(error: string);
66
- /**
67
- * @deprecated
68
- */
69
- get loading$(): Observable<boolean>;
70
- /**
71
- * @deprecated
72
- */
73
- get saving$(): Observable<boolean>;
74
66
  selection: SelectionModel<TableElement<T>>;
67
+ permanentSelection: SelectionModel<T>;
75
68
  editedRow: TableElement<T>;
76
69
  autocompleteFields: {
77
70
  [key: string]: MatAutocompleteFieldConfig;
@@ -105,6 +98,7 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
105
98
  set filter(value: F);
106
99
  get filter(): F;
107
100
  get empty(): boolean;
101
+ get selectedEntities(): T[];
108
102
  onRefresh: EventEmitter<any>;
109
103
  onOpenRow: EventEmitter<TableElement<T>>;
110
104
  onNewRow: EventEmitter<any>;
@@ -377,6 +371,11 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
377
371
  private listenDatasourceLoading;
378
372
  private startCellValueChanges;
379
373
  private stopCellValueChanges;
374
+ /**
375
+ * Initialize the permanent selection model
376
+ * @protected
377
+ */
378
+ protected initPermanentSelection(): void;
380
379
  static ɵfac: i0.ɵɵFactoryDeclaration<AppTable<any, any, any>, never>;
381
380
  static ɵdir: i0.ɵɵDirectiveDeclaration<AppTable<any, any, any>, never, never, { "settingsId": "settingsId"; "debug": "debug"; "i18nColumnPrefix": "i18nColumnPrefix"; "i18nColumnSuffix": "i18nColumnSuffix"; "autoLoad": "autoLoad"; "readOnly": "readOnly"; "inlineEdition": "inlineEdition"; "focusFirstColumn": "focusFirstColumn"; "confirmBeforeDelete": "confirmBeforeDelete"; "confirmBeforeCancel": "confirmBeforeCancel"; "undoableDeletion": "undoableDeletion"; "saveBeforeDelete": "saveBeforeDelete"; "keepEditedRowOnSave": "keepEditedRowOnSave"; "saveBeforeSort": "saveBeforeSort"; "saveBeforeFilter": "saveBeforeFilter"; "propagateRowError": "propagateRowError"; "defaultSortBy": "defaultSortBy"; "defaultSortDirection": "defaultSortDirection"; "defaultPageSize": "defaultPageSize"; "defaultPageSizeOptions": "defaultPageSizeOptions"; "focusColumn": "focusColumn"; "dataSource": "dataSource"; "filter": "filter"; "disabled": "disabled"; "paginator": "paginator"; }, { "onRefresh": "onRefresh"; "onOpenRow": "onOpenRow"; "onNewRow": "onNewRow"; "onStartEditingRow": "onStartEditingRow"; "onConfirmEditCreateRow": "onConfirmEditCreateRow"; "onCancelOrDeleteRow": "onCancelOrDeleteRow"; "onBeforeDeleteRows": "onBeforeDeleteRows"; "onBeforeCancelRows": "onBeforeCancelRows"; "onBeforeSave": "onBeforeSave"; "onAfterDeletedRows": "onAfterDeletedRows"; "onSort": "onSort"; "onDirty": "onDirty"; "onError": "onError"; }, never, never, false>;
382
381
  }
@@ -1,7 +1,11 @@
1
1
  import { AppTable } from './table.class';
2
2
  import { TableElement } from '@e-is/ngx-material-table';
3
3
  import { AsyncTableElement } from '@e-is/ngx-material-table/src/app/ngx-material-table/async/async-table-element';
4
+ import { IEntity } from '../services/model/entity.model';
4
5
  export declare class AppTableUtils {
5
6
  static waitIdle(table: AppTable<any, any, any>): Promise<any>;
6
7
  static logRowErrors(row: TableElement<any> | AsyncTableElement<any>, logPrefix?: string): void;
8
+ static getEntityId<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(row: TableElement<T> | AsyncTableElement<T>): ID;
9
+ static getEntityIds<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(rows: TableElement<T>[] | AsyncTableElement<T>[]): ID[];
10
+ static getEntities<T extends IEntity<T, ID> = IEntity<any, any>, ID = any>(rows: TableElement<T>[] | AsyncTableElement<T>[]): T[];
7
11
  }