@sumaris-net/ngx-components 18.22.12 → 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "18.22.12",
4
+ "version": "18.22.14",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
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';
@@ -129,6 +129,9 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
129
129
  get pending(): boolean;
130
130
  get touched(): boolean;
131
131
  get untouched(): boolean;
132
+ get loading(): boolean;
133
+ get loaded(): boolean;
134
+ get saving(): boolean;
132
135
  disable(opts?: {
133
136
  onlySelf?: boolean;
134
137
  emitEvent?: boolean;
@@ -181,8 +184,6 @@ export declare abstract class AppAsyncTable<T extends IEntity<T, ID>, F = any, I
181
184
  markAsNotReady(opts?: {
182
185
  emitEvent?: boolean;
183
186
  }): void;
184
- get loading(): boolean;
185
- get loaded(): boolean;
186
187
  enableSort(): void;
187
188
  disableSort(): void;
188
189
  set pageSize(value: number);
@@ -134,6 +134,9 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
134
134
  get pending(): boolean;
135
135
  get touched(): boolean;
136
136
  get untouched(): boolean;
137
+ get loading(): boolean;
138
+ get loaded(): boolean;
139
+ get saving(): boolean;
137
140
  disable(opts?: {
138
141
  onlySelf?: boolean;
139
142
  emitEvent?: boolean;
@@ -186,8 +189,6 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
186
189
  markAsNotReady(opts?: {
187
190
  emitEvent?: boolean;
188
191
  }): void;
189
- get loading(): boolean;
190
- get loaded(): boolean;
191
192
  enableSort(): void;
192
193
  disableSort(): void;
193
194
  set pageSize(value: 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
- ready(): Promise<T>;
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;
@@ -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.12",
5
+ "version": "18.22.14",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{