@esfaenza/forms-and-validations 11.2.149-beta1 → 11.2.149-beta2
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/bundles/esfaenza-forms-and-validations.umd.js +143 -76
- package/bundles/esfaenza-forms-and-validations.umd.js.map +1 -1
- package/esfaenza-forms-and-validations.d.ts +7 -6
- package/esfaenza-forms-and-validations.metadata.json +1 -1
- package/esm2015/esfaenza-forms-and-validations.js +8 -7
- package/esm2015/lib/forms/base-form-control.js +32 -45
- package/esm2015/lib/forms/form-input/form-input.component.js +25 -8
- package/esm2015/lib/forms/form-input-new/form-input.component.js +66 -0
- package/esm2015/lib/forms-and-validations.module.js +8 -3
- package/fesm2015/esfaenza-forms-and-validations.js +116 -51
- package/fesm2015/esfaenza-forms-and-validations.js.map +1 -1
- package/lib/forms/base-form-control.d.ts +6 -22
- package/lib/forms/form-input/form-input.component.d.ts +9 -1
- package/lib/forms/form-input-new/form-input.component.d.ts +21 -0
- package/package.json +1 -1
|
@@ -144,20 +144,6 @@ export declare abstract class BaseFormControl implements ControlValueAccessor {
|
|
|
144
144
|
* Elemento HTML rappresentante l'Input
|
|
145
145
|
*/
|
|
146
146
|
htmlInput: ElementRef;
|
|
147
|
-
/** val-qualcosa che fa effettivamente da input, o eventualmente il singolo input in casi particolari (es checkbox) */
|
|
148
|
-
protected validationControl: NgModel;
|
|
149
|
-
/**
|
|
150
|
-
* Query sull'elemento 'baseInput' che funziona in ambiente statico
|
|
151
|
-
*
|
|
152
|
-
* @param {NgModel} comp Elemento HTML marcato con "#baseInput"
|
|
153
|
-
*/
|
|
154
|
-
set baseInput(comp: NgModel);
|
|
155
|
-
/**
|
|
156
|
-
* Query sull'elemento 'baseInput' che funziona in ambiente dinamico
|
|
157
|
-
*
|
|
158
|
-
* @param {NgModel} comp Elemento HTML marcato con "#baseInput"
|
|
159
|
-
*/
|
|
160
|
-
set baseInput_static(comp: NgModel);
|
|
161
147
|
/** Evento chiamato alla modifica del valore collegato a questo campo */
|
|
162
148
|
inputChange: EventEmitter<ChangeEvent>;
|
|
163
149
|
/** Evento chiamato al focus del campo di testo/combo/quelcheè, riemitta l'evento originale Javascript */
|
|
@@ -204,7 +190,7 @@ export declare abstract class BaseFormControl implements ControlValueAccessor {
|
|
|
204
190
|
*/
|
|
205
191
|
ngOnDestroy(): void;
|
|
206
192
|
/** Elabora i validatori iniettati e capisce se il valore è obbligatorio o meno */
|
|
207
|
-
|
|
193
|
+
doCheckRequiredValidator(): void;
|
|
208
194
|
/** @ignore */
|
|
209
195
|
ngAfterViewInit(): void;
|
|
210
196
|
/** Helper che collega la funzione di reset del controllo form al controllo di validazione sottostante */
|
|
@@ -215,19 +201,17 @@ export declare abstract class BaseFormControl implements ControlValueAccessor {
|
|
|
215
201
|
registerOnChange(fn: any): void;
|
|
216
202
|
/** @ignore */
|
|
217
203
|
registerOnTouched(fn: any): void;
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
*/
|
|
223
|
-
registerBaseInput(comp: NgModel): void;
|
|
204
|
+
protected validationControl: NgModel;
|
|
205
|
+
set baseInput(comp: NgModel);
|
|
206
|
+
set baseInput_static(comp: NgModel);
|
|
207
|
+
doRegisterBaseInput(baseInput: NgModel): void;
|
|
224
208
|
registerForm(ngForm: NgForm): void;
|
|
225
209
|
/**
|
|
226
210
|
* Aggiorna il valore e la validità dell'input sottostante. Non viene chiamato per input nativi come le checkbox
|
|
227
211
|
*
|
|
228
212
|
* @param {boolean} forcedValue Forza l'aggiornamento anche se non è un input nativo (input nativo = checkbox, ad esempio)
|
|
229
213
|
*/
|
|
230
|
-
|
|
214
|
+
doUpdateValidityForNativeInput(forcedValue?: boolean): void;
|
|
231
215
|
/**
|
|
232
216
|
* @ignore
|
|
233
217
|
* Classico "spara fuori". Mantengo lo stesso nome dell'evento dei <val-*> (inputChange) per retrocompatibilità.
|
|
@@ -4,7 +4,7 @@ import { BaseFormControl } from "../base-form-control";
|
|
|
4
4
|
import { AccessControlService, ComponentContext } from '@esfaenza/access-control';
|
|
5
5
|
import { ChangeDetectorRef } from "@angular/core";
|
|
6
6
|
/** Semplice componente di Input testuale, con eventuale prefisso/suffisso */
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class FormInputComponentOLD extends BaseFormControl implements ControlValueAccessor {
|
|
8
8
|
/** Indica se l'input relativo è di tipo Password */
|
|
9
9
|
Password: boolean;
|
|
10
10
|
/** Delegato per l'esecuzione di un'operazione al click del suffisso */
|
|
@@ -29,4 +29,12 @@ export declare class FormInputComponent extends BaseFormControl implements Contr
|
|
|
29
29
|
onNotNullValueSet(): void;
|
|
30
30
|
ShowPassword: boolean;
|
|
31
31
|
onShowHidePassword(event: any): void;
|
|
32
|
+
/**
|
|
33
|
+
* @ignore
|
|
34
|
+
*/
|
|
35
|
+
ngOnInit(): void;
|
|
36
|
+
/**
|
|
37
|
+
* @ignore
|
|
38
|
+
*/
|
|
39
|
+
ngOnDestroy(): void;
|
|
32
40
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import { ControlValueAccessor, NgControl } from "@angular/forms";
|
|
3
|
+
import { BaseFormControl } from "../base-form-control";
|
|
4
|
+
import { AccessControlService, ComponentContext } from '@esfaenza/access-control';
|
|
5
|
+
import { ChangeDetectorRef } from "@angular/core";
|
|
6
|
+
export declare class FormInputComponent extends BaseFormControl implements ControlValueAccessor {
|
|
7
|
+
Password: boolean;
|
|
8
|
+
onSuffixAction: EventEmitter<void>;
|
|
9
|
+
onPrefixAction: EventEmitter<void>;
|
|
10
|
+
suffix: any;
|
|
11
|
+
prefix: any;
|
|
12
|
+
HasSuffix: boolean;
|
|
13
|
+
HasPrefix: boolean;
|
|
14
|
+
constructor(cdr: ChangeDetectorRef, ngControl: NgControl, _validators: Array<any>, ac: AccessControlService, AppContext: ComponentContext, ACO_CUSTOMKEY: string, FAV_DEBUG_MODE: boolean);
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
writeValue(obj: any): void;
|
|
18
|
+
ngAfterContentInit(): void;
|
|
19
|
+
onNotNullValueSet(): void;
|
|
20
|
+
onBlur(): void;
|
|
21
|
+
}
|