@sumaris-net/ngx-components 18.23.71 → 18.24.0

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.23.71",
4
+ "version": "18.24.0",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -8,6 +8,7 @@ import { CanLeave, CanSave, IAppForm, IAppFormGetter } from '../form.utils';
8
8
  import { ShowToastOptions } from '../../../shared/toast/toasts';
9
9
  import { ToolbarToken } from '../../../shared/toolbar/toolbar';
10
10
  import { AppFormContainer, IAppFormContainer } from '../form-container.class';
11
+ import { FormGroup } from '@angular/forms';
11
12
  import * as i0 from "@angular/core";
12
13
  export interface IAppEditor<T> extends IAppFormContainer<T>, CanSave, CanLeave {
13
14
  save(event?: Event, options?: any): Promise<boolean>;
@@ -41,17 +42,17 @@ export declare abstract class AppEditor<T = any, ID = number, O = any> extends A
41
42
  * @deprecated Use addForm(path, form)
42
43
  * @param form
43
44
  */
44
- addChildForm(form: IAppForm | IAppFormGetter): void;
45
+ addChildForm(form: IAppForm | FormGroup | IAppFormGetter): void;
45
46
  /**
46
47
  * @deprecated Use addForms()
47
48
  * @param forms
48
49
  */
49
- addChildForms(forms: (IAppForm | IAppFormGetter)[]): void;
50
+ addChildForms(forms: (IAppForm | FormGroup | IAppFormGetter)[]): void;
50
51
  /**
51
52
  * @deprecated Use removeForm()
52
53
  * @param form
53
54
  */
54
- removeChildForm(form: IAppForm | IAppFormGetter): IAppForm | IAppFormGetter;
55
+ removeChildForm(form: IAppForm | FormGroup | IAppFormGetter): IAppForm | IAppFormGetter;
55
56
  markAsSaving(opts?: {
56
57
  emitEvent?: boolean;
57
58
  }): void;
@@ -5,7 +5,7 @@ import { WaitForOptions } from '../../shared/observables';
5
5
  import { AppTable } from '../table/table.class';
6
6
  import { AppForm } from './form.class';
7
7
  import { AppEditor } from './entity/editor.class';
8
- import { AbstractControl } from '@angular/forms';
8
+ import { AbstractControl, FormGroup } from '@angular/forms';
9
9
  import { AppAsyncTable } from '../table/async-table.class';
10
10
  import * as i0 from "@angular/core";
11
11
  export interface IAppFormContainer<T = any> extends IAppForm<T> {
@@ -54,9 +54,9 @@ export declare abstract class AppFormContainer<T = any> implements IAppFormConta
54
54
  protected constructor();
55
55
  ngOnInit(): void;
56
56
  ngOnDestroy(): void;
57
- addForm(path: string, form?: IAppForm | IAppFormGetter): void;
58
- addForms(forms: (IAppForm | IAppFormGetter)[]): void;
59
- removeForm(form: string | IAppForm | IAppFormGetter): IAppForm | IAppFormGetter;
57
+ addForm(path: string, form?: FormGroup | IAppForm | IAppFormGetter): void;
58
+ addForms(forms: (IAppForm | FormGroup | IAppFormGetter)[]): void;
59
+ removeForm(form: string | IAppForm | FormGroup | IAppFormGetter): IAppForm | IAppFormGetter;
60
60
  disable(opts?: {
61
61
  onlySelf?: boolean;
62
62
  emitEvent?: boolean;
@@ -55,7 +55,7 @@ export declare class AppForm<T> implements IAppForm<T>, OnInit, OnDestroy, IForm
55
55
  get form(): UntypedFormGroup;
56
56
  onCancel: EventEmitter<any>;
57
57
  onSubmit: EventEmitter<any>;
58
- constructor(injector: Injector, form?: UntypedFormGroup);
58
+ constructor(formOrInjector?: Injector | UntypedFormGroup, form?: UntypedFormGroup);
59
59
  ngOnInit(): void;
60
60
  ngOnDestroy(): void;
61
61
  cancel(): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { AbstractControl } from '@angular/forms';
2
2
  import { filterNumberInput, selectInputContent, selectInputContentFromEvent } from '../../shared/inputs';
3
3
  import { WaitForOptions } from '../../shared/observables';
4
- import { addValueInArray, clearValueInArray, copyEntity2Form, disableAndClearControl, disableAndClearControls, disableControl, disableControls, enableControl, enableControls, filterFormErrors, filterFormErrorsByPath, filterFormErrorsByPrefix, getControlFromPath, getFormErrors, getFormValueFromEntity, logFormErrors, markAllAsTouched, markAsUntouched, removeValueInArray, resizeArray, setControlEnabled, setControlsEnabled, setControlRequired, setFormErrors, updateValueAndValidity, waitIdle, waitWhilePending, adaptValueToControl } from '../../shared/forms';
4
+ import { adaptValueToControl, addValueInArray, clearValueInArray, copyEntity2Form, disableAndClearControl, disableAndClearControls, disableControl, disableControls, enableControl, enableControls, filterFormErrors, filterFormErrorsByPath, filterFormErrorsByPrefix, getControlFromPath, getFormErrors, getFormValueFromEntity, logFormErrors, markAllAsTouched, markAsUntouched, removeValueInArray, resizeArray, setControlEnabled, setControlRequired, setControlsEnabled, setFormErrors, updateValueAndValidity, waitIdle, waitWhilePending } from '../../shared/forms';
5
5
  export type IAppFormGetter = () => IAppForm;
6
6
  export declare interface OnReady {
7
7
  ngOnReady(): any;
@@ -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.23.71",
5
+ "version": "18.24.0",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{