@sumaris-net/ngx-components 18.22.13 → 18.22.14
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/doc/changelog.md +4 -0
- package/esm2022/public_api.mjs +2 -1
- package/esm2022/src/app/shared/observables.mjs +8 -4
- package/esm2022/src/app/shared/services/startable-observable-service.class.mjs +36 -10
- package/esm2022/src/app/shared/services/startable-service.class.mjs +20 -9
- package/fesm2022/sumaris-net.ngx-components.mjs +56 -16
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/src/app/shared/inputs.d.ts +1 -1
- package/src/app/shared/observables.d.ts +2 -0
- package/src/app/shared/services/startable-observable-service.class.d.ts +16 -1
- package/src/app/shared/services/startable-service.class.d.ts +2 -1
- package/src/assets/manifest.json +1 -1
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -115,6 +115,7 @@ export * from './src/app/shared/debug/debug-service.class';
|
|
|
115
115
|
export * from './src/app/shared/types';
|
|
116
116
|
export * from './src/app/shared/dates';
|
|
117
117
|
export * from './src/app/shared/functions';
|
|
118
|
+
export * from './src/app/shared/focusable';
|
|
118
119
|
export * from './src/app/shared/regexps';
|
|
119
120
|
export * from './src/app/shared/services';
|
|
120
121
|
export * from './src/app/shared/forms';
|
|
@@ -17,7 +17,7 @@ export interface InputElement extends FocusableElement {
|
|
|
17
17
|
}
|
|
18
18
|
export declare function isInputElement(object: any): object is InputElement;
|
|
19
19
|
export declare function asInputElement<T = any>(object: ElementRef<T>): InputElement | undefined;
|
|
20
|
-
export declare function tabindexComparator(a: InputElement, b: InputElement):
|
|
20
|
+
export declare function tabindexComparator(a: InputElement, b: InputElement): 0 | 1 | -1;
|
|
21
21
|
export interface CanGainFocusOptions {
|
|
22
22
|
minTabindex?: number;
|
|
23
23
|
maxTabindex?: number;
|
|
@@ -12,12 +12,14 @@ export declare interface WaitForOptions extends FirstOptions {
|
|
|
12
12
|
export declare function filterNotNil<T = any>(obs: Observable<T>): Observable<T>;
|
|
13
13
|
export declare function filterTrue(obs: Observable<boolean>): Observable<boolean>;
|
|
14
14
|
export declare function filterFalse(obs: Observable<boolean>): Observable<boolean>;
|
|
15
|
+
export declare function decorateWithTakeUntil<T = any>(obs: Observable<T>, opts?: FirstOptions): Observable<T>;
|
|
15
16
|
export declare function firstNotNil<T = any>(obs: Observable<T>, opts?: FirstOptions): Observable<T>;
|
|
16
17
|
export declare function firstTrue<T = void>(obs: Observable<boolean>, opts?: FirstOptions, result?: T): Observable<T>;
|
|
17
18
|
export declare function firstFalse<T = void>(obs: Observable<boolean>, opts?: FirstOptions, result?: T): Observable<T>;
|
|
18
19
|
export declare function firstTruePromise(obs: Observable<boolean>, opts?: FirstOptions): Promise<void>;
|
|
19
20
|
export declare function firstFalsePromise(obs: Observable<boolean>, opts?: FirstOptions): Promise<void>;
|
|
20
21
|
export declare function firstNotNilPromise<T = any>(obs: Observable<T>, opts?: FirstOptions): Promise<T>;
|
|
22
|
+
export declare function firstPromise<T = any>(obs: Observable<T>, opts?: FirstOptions): Promise<T>;
|
|
21
23
|
export declare function chainPromises<T = any>(defers: (() => Promise<any>)[]): Promise<T[]>;
|
|
22
24
|
/**
|
|
23
25
|
* Wait form a predicate return true. This need to implement AppFormUtils.waitWhilePending(), AppFormUtils.waitIdle()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BehaviorSubject, Subject, Subscription } from 'rxjs';
|
|
2
2
|
import { IStartableService } from './startable-service.class';
|
|
3
|
+
import { FirstOptions } from '../observables';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* Same as StartableService, but with a dataSubject instead of a simple 'data' property
|
|
@@ -17,8 +18,22 @@ export declare abstract class StartableObservableService<T = any, O = any> imple
|
|
|
17
18
|
protected constructor(prerequisiteService?: {
|
|
18
19
|
ready: () => Promise<any>;
|
|
19
20
|
});
|
|
21
|
+
/**
|
|
22
|
+
* Initiates the startup process for the service. If the service is already started,
|
|
23
|
+
* it returns the existing data or ensures that the start process executes correctly.
|
|
24
|
+
*
|
|
25
|
+
* @param {O} [opts] - Optional configuration or parameters for the startup process.
|
|
26
|
+
* @return {Promise<T>} A promise that resolves with the service's initialized data, or null if an error occurs during the startup.
|
|
27
|
+
*/
|
|
20
28
|
start(opts?: O): Promise<T>;
|
|
21
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Prepares the service to be ready, ensuring any required setup or initialization is complete.
|
|
31
|
+
* This method will wait until the service is started, either directly or via a promise, before resolving.
|
|
32
|
+
*
|
|
33
|
+
* @param {FirstOptions} [opts] - Optional configuration options that may affect the readiness of the service.
|
|
34
|
+
* @return {Promise<T>} A promise that resolves with the service's data once it is ready.
|
|
35
|
+
*/
|
|
36
|
+
ready(opts?: FirstOptions): Promise<T>;
|
|
22
37
|
stop(): Promise<void>;
|
|
23
38
|
restart(opts?: O): Promise<T>;
|
|
24
39
|
get started(): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Subject, Subscription } from 'rxjs';
|
|
2
|
+
import { FirstOptions } from '../observables';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export interface IStartableService<T = any> {
|
|
4
5
|
started: boolean;
|
|
@@ -21,7 +22,7 @@ export declare abstract class StartableService<T = any, O = any> implements ISta
|
|
|
21
22
|
ready: () => Promise<any>;
|
|
22
23
|
});
|
|
23
24
|
start(opts?: O): Promise<T>;
|
|
24
|
-
ready(): Promise<T>;
|
|
25
|
+
ready(opts?: FirstOptions): Promise<T>;
|
|
25
26
|
stop(): Promise<void>;
|
|
26
27
|
restart(opts?: O): Promise<T>;
|
|
27
28
|
get started(): boolean;
|
package/src/assets/manifest.json
CHANGED
|
@@ -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.22.
|
|
5
|
+
"version": "18.22.14",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|