@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/bundles/sumaris-net.ngx-components.umd.js +105 -62
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +3 -0
- package/esm2015/src/app/admin/services/person.service.js +5 -9
- package/esm2015/src/app/core/services/network.service.js +28 -19
- package/esm2015/src/app/core/services/network.utils.js +2 -2
- package/esm2015/src/app/shared/http/http.utils.js +31 -9
- package/esm2015/src/app/shared/services/job.utils.js +28 -21
- package/fesm2015/sumaris-net.ngx-components.js +88 -53
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/admin/services/person.service.d.ts +2 -1
- package/src/app/core/services/network.service.d.ts +8 -0
- package/src/app/core/services/network.utils.d.ts +1 -0
- package/src/app/shared/http/http.utils.d.ts +13 -1
- package/src/app/shared/services/job.utils.d.ts +4 -2
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/package.json
CHANGED
|
@@ -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(
|
|
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
|
/**
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
2
2
|
export declare class HttpUtils {
|
|
3
|
-
static
|
|
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> = (
|
|
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>,
|
|
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;
|