@sumaris-net/ngx-components 2.7.0 → 2.7.1-rc2
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/esm2022/src/app/admin/users/users.mjs +2 -2
- package/esm2022/src/app/core/account/token.table.mjs +1 -1
- package/esm2022/src/app/core/form/properties/properties.table.mjs +1 -1
- package/esm2022/src/app/core/form/text-popover/text-popover.component.mjs +4 -4
- package/esm2022/src/app/core/table/testing/table.testing.mjs +1 -1
- package/esm2022/src/app/core/table/testing/table2.testing.mjs +1 -1
- package/esm2022/src/app/shared/debug/debug.component.mjs +1 -1
- package/esm2022/src/app/shared/material/text/testing/text-form.testing.mjs +27 -18
- package/esm2022/src/app/shared/material/text/text-form.component.mjs +83 -13
- package/fesm2022/sumaris-net.ngx-components.mjs +140 -62
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/material/text/testing/text-form.testing.d.ts +10 -4
- package/src/app/shared/material/text/text-form.component.d.ts +20 -7
package/package.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { AfterViewInit } from '@angular/core';
|
|
2
|
-
import { Validators } from '@angular/forms';
|
|
2
|
+
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
|
|
3
3
|
import { TextForm } from '../text-form.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class TextFormTestingPage implements AfterViewInit {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
protected formBuilder: UntypedFormBuilder;
|
|
7
|
+
standaloneTextForm1: TextForm;
|
|
8
|
+
standaloneTextForm2: TextForm;
|
|
9
|
+
form: UntypedFormGroup;
|
|
9
10
|
protected readonly Validators: typeof Validators;
|
|
11
|
+
stringify: {
|
|
12
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
13
|
+
(value: any, replacer?: (string | number)[], space?: string | number): string;
|
|
14
|
+
};
|
|
15
|
+
constructor(formBuilder: UntypedFormBuilder);
|
|
10
16
|
ngAfterViewInit(): void;
|
|
11
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextFormTestingPage, never>;
|
|
12
18
|
static ɵcmp: i0.ɵɵComponentDeclaration<TextFormTestingPage, "text-form-testing", never, {}, {}, never, never, false, never>;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, EventEmitter, Injector, OnInit } from '@angular/core';
|
|
2
|
-
import { UntypedFormBuilder, UntypedFormControl, ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { ControlValueAccessor, FormGroupDirective, UntypedFormBuilder, UntypedFormControl, ValidatorFn } from '@angular/forms';
|
|
3
3
|
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
4
4
|
import { AppForm } from '../../../core/form/form.class';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class TextForm extends AppForm<{
|
|
7
7
|
text: string;
|
|
8
|
-
}> implements OnInit {
|
|
8
|
+
}> implements OnInit, ControlValueAccessor {
|
|
9
9
|
protected injector: Injector;
|
|
10
10
|
protected cd: ChangeDetectorRef;
|
|
11
11
|
protected formBuilder: UntypedFormBuilder;
|
|
12
|
+
private formGroupDir;
|
|
12
13
|
showError: boolean;
|
|
13
14
|
placeholder: string;
|
|
14
15
|
multiline: boolean;
|
|
@@ -16,17 +17,29 @@ export declare class TextForm extends AppForm<{
|
|
|
16
17
|
maxLength: number;
|
|
17
18
|
autofocus: boolean;
|
|
18
19
|
validator: ValidatorFn;
|
|
20
|
+
standalone: boolean;
|
|
21
|
+
formControl: UntypedFormControl;
|
|
22
|
+
formControlName: string;
|
|
19
23
|
textAreaChanges: EventEmitter<string>;
|
|
20
24
|
textArea: ElementRef;
|
|
21
25
|
textInput: ElementRef;
|
|
22
26
|
autosizeDirective: CdkTextareaAutosize;
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
textControl: UntypedFormControl;
|
|
28
|
+
private _onChangeCallback;
|
|
29
|
+
private _onTouchedCallback;
|
|
30
|
+
constructor(injector: Injector, cd: ChangeDetectorRef, formBuilder: UntypedFormBuilder, formGroupDir: FormGroupDirective);
|
|
25
31
|
ngOnInit(): void;
|
|
26
|
-
textAreaChanged(event: KeyboardEvent): void;
|
|
27
32
|
containerResize(): void;
|
|
28
33
|
focusInput(): void;
|
|
34
|
+
registerOnChange(fn: any): void;
|
|
35
|
+
registerOnTouched(fn: any): void;
|
|
36
|
+
setDisabledState(isDisabled: boolean): void;
|
|
37
|
+
writeValue(value: any): void;
|
|
29
38
|
protected markForCheck(): void;
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
protected checkIfTouched(opts?: {
|
|
40
|
+
emitEvent?: boolean;
|
|
41
|
+
}): void;
|
|
42
|
+
private textFormValueChanged;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextForm, [null, null, null, { optional: true; }]>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextForm, "app-text-form", never, { "showError": { "alias": "showError"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "autoHeight": { "alias": "autoHeight"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "validator": { "alias": "validator"; "required": false; }; "standalone": { "alias": "standalone"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; }, { "textAreaChanges": "textAreaChanges"; }, never, ["[matError]"], false, never>;
|
|
32
45
|
}
|