@sumaris-net/ngx-components 0.13.9 → 0.13.13

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": "0.13.9",
4
+ "version": "0.13.13",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -85,7 +85,7 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
85
85
  emitEvent?: boolean;
86
86
  openTabIndex?: number;
87
87
  updateRoute?: boolean;
88
- }): void;
88
+ }): Promise<void>;
89
89
  /**
90
90
  * Enable or disable state
91
91
  */
@@ -115,11 +115,12 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
115
115
  setError(err: any): void;
116
116
  protected abstract registerForms(): any;
117
117
  protected abstract computeTitle(data: T): Promise<string>;
118
- protected abstract setValue(data: T): any;
118
+ protected abstract setValue(data: T): Promise<void> | void;
119
119
  protected abstract get form(): FormGroup;
120
120
  protected abstract getFirstInvalidTabIndex(): number;
121
121
  protected abstract canUserWrite(data: T): boolean;
122
122
  unload(): Promise<void>;
123
+ protected onBeforeEntityLoad(): Promise<void>;
123
124
  protected onNewEntity(data: T, options?: EntityServiceLoadOptions): Promise<void>;
124
125
  protected onEntityLoaded(data: T, options?: EntityServiceLoadOptions): Promise<void>;
125
126
  protected onEntitySaved(data: T): Promise<void>;
@@ -14,6 +14,7 @@ export interface BaseEntityGraphqlQueries {
14
14
  load?: any;
15
15
  loadAll: any;
16
16
  loadAllWithTotal?: any;
17
+ countAll?: any;
17
18
  }
18
19
  export interface BaseEntityGraphqlMutations {
19
20
  save?: any;
@@ -73,6 +74,7 @@ export declare abstract class BaseEntityService<T extends Entity<T, ID>, F exten
73
74
  debug?: boolean;
74
75
  withTotal?: boolean;
75
76
  }): Promise<LoadResult<T>>;
77
+ countAll(filter?: Partial<F>, opts?: LO): Promise<number>;
76
78
  saveAll(entities: T[], opts?: EntitySaveOptions): Promise<T[]>;
77
79
  /**
78
80
  * Save a referential entity
@@ -84,11 +84,11 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
84
84
  isRateLimitReached: boolean;
85
85
  selection: SelectionModel<TableElement<T>>;
86
86
  editedRow: TableElement<T>;
87
- settingsId: string;
88
87
  autocompleteFields: {
89
88
  [key: string]: MatAutocompleteFieldConfig;
90
89
  };
91
90
  mobile: boolean;
91
+ settingsId: string;
92
92
  debug: boolean;
93
93
  i18nColumnPrefix: string;
94
94
  i18nColumnSuffix: string;
@@ -4,6 +4,7 @@ export declare function isNilOrBlank<T>(obj: T | null | undefined): boolean;
4
4
  export declare function isNotNil<T>(obj: T | null | undefined): boolean;
5
5
  export declare function isNotNilOrBlank<T>(obj: T | null | undefined): boolean;
6
6
  export declare function isNotNilOrNaN<T>(obj: T | null | undefined): boolean;
7
+ export declare function isNilOrNaN<T>(obj: T | null | undefined): boolean;
7
8
  export declare function isNotEmptyArray<T>(obj: T[] | null | undefined): boolean;
8
9
  export declare function firstArrayValue<T>(obj: T[] | null | undefined): T | undefined;
9
10
  export declare function isEmptyArray<T>(obj: T[] | null | undefined): boolean;