@sumaris-net/ngx-components 0.27.4 → 0.27.8

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.27.4",
4
+ "version": "0.27.8",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -141,7 +141,7 @@ export declare abstract class AppEntityEditor<T extends Entity<T, ID>, S extends
141
141
  protected onEntitySaved(data: T): Promise<void>;
142
142
  protected onEntityDeleted(data: T): Promise<void>;
143
143
  protected computeUsageMode(data: T): UsageMode;
144
- protected waitWhilePending(opts?: WaitForOptions): Promise<boolean>;
144
+ protected waitWhilePending(opts?: WaitForOptions): Promise<void>;
145
145
  protected getValue(): Promise<T>;
146
146
  protected getJsonValueToSave(): Promise<any>;
147
147
  /**
@@ -15,8 +15,8 @@ export declare abstract class AppForm<T> implements IAppForm, OnInit, OnDestroy,
15
15
  protected settings: LocalSettingsService;
16
16
  protected errorTranslator: FormErrorTranslator;
17
17
  protected _enable: boolean;
18
- protected _loading: boolean;
19
18
  protected _$ready: BehaviorSubject<boolean>;
19
+ protected _loading: boolean;
20
20
  protected i18nFieldPrefix: string;
21
21
  private _subscription;
22
22
  private _form;
@@ -98,12 +98,12 @@ export declare abstract class AppForm<T> implements IAppForm, OnInit, OnDestroy,
98
98
  * Wait form is ready
99
99
  * @param opts
100
100
  */
101
- ready(opts?: WaitForOptions): Promise<boolean>;
101
+ ready(opts?: WaitForOptions): Promise<void>;
102
102
  /**
103
103
  * Wait form is idle (not loading)
104
104
  * @param opts
105
105
  */
106
- waitIdle(opts?: WaitForOptions): Promise<boolean>;
106
+ waitIdle(opts?: WaitForOptions): Promise<void>;
107
107
  updateValueAndValidity(opts?: {
108
108
  onlySelf?: boolean;
109
109
  emitEvent?: boolean;
@@ -3,6 +3,9 @@ import { Entity } from '../services/model/entity.model';
3
3
  import { filterNumberInput, selectInputContent } from '../../shared/inputs';
4
4
  import { WaitForOptions } from '../../shared/observables';
5
5
  export declare type IAppFormGetter = () => IAppForm;
6
+ export declare interface OnReady {
7
+ ngOnReady(): any;
8
+ }
6
9
  export interface IAppForm {
7
10
  invalid: boolean;
8
11
  valid: boolean;
@@ -13,7 +16,8 @@ export interface IAppForm {
13
16
  disabled: boolean;
14
17
  empty?: boolean;
15
18
  loading?: boolean;
16
- ready(): Promise<any>;
19
+ ready(): Promise<void>;
20
+ waitIdle(opts?: WaitForOptions): Promise<any>;
17
21
  disable(opts?: {
18
22
  onlySelf?: boolean;
19
23
  emitEvent?: boolean;
@@ -125,6 +129,7 @@ export declare class AppFormProvider<F extends IAppForm = IAppForm> implements I
125
129
  get pending(): boolean;
126
130
  get loading(): boolean;
127
131
  ready(): Promise<any>;
132
+ waitIdle(opts?: WaitForOptions): Promise<any>;
128
133
  disable(opts?: {
129
134
  onlySelf?: boolean;
130
135
  emitEvent?: boolean;
@@ -265,7 +270,7 @@ export declare function markAsUntouched(form: FormGroup, opts?: {
265
270
  */
266
271
  export declare function waitWhilePending<T extends IAppForm | {
267
272
  pending: boolean;
268
- }>(form: T, opts?: WaitForOptions): Promise<boolean>;
273
+ }>(form: T, opts?: WaitForOptions): Promise<void>;
269
274
  /**
270
275
  * Wait form is idle (not loading). This need to implement IAppForm.loading
271
276
  * @param form
@@ -273,7 +278,7 @@ export declare function waitWhilePending<T extends IAppForm | {
273
278
  */
274
279
  export declare function waitIdle<T extends IAppForm | {
275
280
  loading: boolean;
276
- }>(form: T, opts?: WaitForOptions): Promise<boolean>;
281
+ }>(form: T, opts?: WaitForOptions): Promise<void>;
277
282
  export declare function isControlHasInput(controls: {
278
283
  [key: string]: AbstractControl;
279
284
  }, controlName: string): boolean;
@@ -17,6 +17,7 @@ import { TranslateService } from '@ngx-translate/core';
17
17
  import { PlatformService } from '../services/platform.service';
18
18
  import { MatAutocompleteConfigHolder, MatAutocompleteFieldAddOptions, MatAutocompleteFieldConfig } from '../../shared/material/autocomplete/material.autocomplete';
19
19
  import { CompletableEvent } from '../../shared/events';
20
+ import { WaitForOptions } from '../../shared/observables';
20
21
  import { ShowToastOptions } from '../../shared/toasts';
21
22
  import { CdkColumnDef } from '@angular/cdk/table';
22
23
  import { LoadResult } from '../../shared/services/entity-service.class';
@@ -290,8 +291,8 @@ export declare abstract class AppTable<T extends IEntity<T, ID>, F = any, ID = n
290
291
  selectRowByData(data: T): Promise<boolean>;
291
292
  clickRow(event: UIEvent | undefined, row: TableElement<T>): boolean;
292
293
  moveRow(id: number, direction: number): void;
293
- ready(): Promise<any>;
294
- waitIdle(): Promise<any>;
294
+ ready(): Promise<void>;
295
+ waitIdle(opts?: WaitForOptions): Promise<void>;
295
296
  openSelectColumnsModal(event?: Event): Promise<any>;
296
297
  trackByFn(index: number, row: TableElement<T>): number;
297
298
  doRefresh(event?: CompletableEvent): void;
@@ -18,4 +18,4 @@ export declare interface WaitForOptions {
18
18
  * @param predicate
19
19
  * @param opts
20
20
  */
21
- export declare function waitFor(predicate: Predicate<void>, opts?: WaitForOptions): Promise<boolean>;
21
+ export declare function waitFor(predicate: Predicate<void>, opts?: WaitForOptions): Promise<void>;