@sumaris-net/ngx-components 1.15.13 → 1.16.1

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": "1.15.13",
4
+ "version": "1.16.1",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -33,8 +33,9 @@ export declare class PersonService extends BaseEntityService<Person, PersonFilte
33
33
  toEntity?: boolean;
34
34
  }): Promise<LoadResult<Person>>;
35
35
  suggest(value: any, filter?: PersonFilter, sortBy?: string, sortDirection?: SortDirection): Promise<LoadResult<Person>>;
36
- executeImport(progression: BehaviorSubject<number>, opts?: {
36
+ executeImport(filter: Partial<PersonFilter>, opts: {
37
37
  maxProgression?: number;
38
+ progression?: BehaviorSubject<number>;
38
39
  }): Promise<void>;
39
40
  protected asObject(source: Person | any): any;
40
41
  }
@@ -124,6 +124,13 @@ export declare class NetworkService extends StartableService<Peer> {
124
124
  * @protected
125
125
  */
126
126
  protected startRefreshTimer(): void;
127
+ protected getText(path: string, opts?: {
128
+ headers?: HttpHeaders | {
129
+ [header: string]: string | string[];
130
+ };
131
+ responseType?: 'text';
132
+ nocache?: boolean;
133
+ }): Promise<string>;
127
134
  protected get<T>(path: string, opts?: {
128
135
  headers?: HttpHeaders | {
129
136
  [header: string]: string | string[];
@@ -131,6 +138,7 @@ export declare class NetworkService extends StartableService<Peer> {
131
138
  responseType?: 'json';
132
139
  nocache?: boolean;
133
140
  }): Promise<T>;
141
+ protected getUri(path: string): string;
134
142
  protected onDeviceConnectionChanged(connectionType?: string): void;
135
143
  protected resetData(): void;
136
144
  /**
@@ -28,4 +28,5 @@ export declare function getNodeInfo(http: HttpClient, peer: string | Peer, opts?
28
28
  headers?: HttpHeaders | {
29
29
  [header: string]: string | string[];
30
30
  };
31
+ responseType?: 'json';
31
32
  }): Promise<NodeInfo>;
@@ -1,6 +1,18 @@
1
1
  import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
2
2
  export declare class HttpUtils {
3
- static getResource<T>(http: HttpClient, uri: string, opts?: {
3
+ static getText(http: HttpClient, uri: string, opts?: {
4
+ nocache?: boolean;
5
+ headers?: HttpHeaders | {
6
+ [header: string]: string | string[];
7
+ };
8
+ params?: HttpParams | {
9
+ [param: string]: string | string[];
10
+ };
11
+ reportProgress?: boolean;
12
+ responseType?: 'text';
13
+ withCredentials?: boolean;
14
+ }): Promise<string>;
15
+ static getJson<T>(http: HttpClient, uri: string, opts?: {
4
16
  nocache?: boolean;
5
17
  headers?: HttpHeaders | {
6
18
  [header: string]: string | string[];
@@ -1,16 +1,18 @@
1
1
  import { BehaviorSubject, Observable } from 'rxjs';
2
2
  import { LoadResult, LoadResultByPageFn } from './entity-service.class';
3
- export declare type CallableWithProgressionFn<O extends CallableWithProgressionOptions> = (progression: BehaviorSubject<number>, opts?: O) => Promise<void>;
3
+ export declare type CallableWithProgressionFn<O extends CallableWithProgressionOptions> = (opts?: O) => Promise<void>;
4
4
  export interface CallableWithProgressionOptions {
5
5
  maxProgression?: number;
6
+ progression?: BehaviorSubject<number>;
6
7
  [key: string]: any;
7
8
  }
8
9
  export declare class JobUtils {
9
10
  static defers<O extends CallableWithProgressionOptions>(runnableList: CallableWithProgressionFn<O>[], opts?: O): Observable<number>[];
10
11
  static defer<O extends CallableWithProgressionOptions>(runnable: CallableWithProgressionFn<O>, opts?: O): Observable<number>;
11
12
  static run<O extends CallableWithProgressionOptions>(runnable: CallableWithProgressionFn<O>, opts: O): Observable<number>;
12
- static fetchAllPages<T>(loadPageFn: LoadResultByPageFn<T>, progression: BehaviorSubject<number>, opts?: {
13
+ static fetchAllPages<T>(loadPageFn: LoadResultByPageFn<T>, opts?: {
13
14
  maxProgression?: number;
15
+ progression?: BehaviorSubject<number>;
14
16
  onPageLoaded?: (pageResult: LoadResult<T>) => any;
15
17
  logPrefix?: string;
16
18
  fetchSize?: number;