easy-forms-core 1.5.4 → 1.5.5
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/dist/easy-form.d.ts +4 -0
- package/dist/easy-form.js +330 -107
- package/dist/easy-form.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +304 -81
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -594,6 +594,8 @@ type CustomComponent = (props: {
|
|
|
594
594
|
error?: string;
|
|
595
595
|
onChange: (value: any) => void;
|
|
596
596
|
onBlur: () => void;
|
|
597
|
+
/** True cuando el campo es válido y debe mostrarse feedback verde (si está habilitado en el form) */
|
|
598
|
+
showValidFeedback?: boolean;
|
|
597
599
|
}) => HTMLElement | null;
|
|
598
600
|
/**
|
|
599
601
|
* Registro de componentes personalizados
|
|
@@ -774,6 +776,8 @@ declare class EasyForm extends BrowserHTMLElement {
|
|
|
774
776
|
* Maneja el cambio de un campo
|
|
775
777
|
*/
|
|
776
778
|
private handleFieldChange;
|
|
779
|
+
/** Feedback verde en campos válidos (activo salvo `show-valid-feedback="false"`) */
|
|
780
|
+
private isValidFeedbackEnabled;
|
|
777
781
|
private dependencyRenderTimeout;
|
|
778
782
|
/**
|
|
779
783
|
* Re-renderiza un campo array cuando se añaden o eliminan ítems.
|
|
@@ -1100,6 +1104,10 @@ declare class StateManager {
|
|
|
1100
1104
|
* Marca un campo como touched
|
|
1101
1105
|
*/
|
|
1102
1106
|
setTouched(fieldName: string): void;
|
|
1107
|
+
/**
|
|
1108
|
+
* Indica si el campo fue marcado como touched (interactuado)
|
|
1109
|
+
*/
|
|
1110
|
+
isTouched(fieldName: string): boolean;
|
|
1103
1111
|
/**
|
|
1104
1112
|
* Obtiene los errores de un campo
|
|
1105
1113
|
*/
|
|
@@ -1458,7 +1466,7 @@ declare function sanitizeId(str: string): string;
|
|
|
1458
1466
|
/**
|
|
1459
1467
|
* Factory para crear inputs
|
|
1460
1468
|
*/
|
|
1461
|
-
declare function createInput(field: Field, value: any, error: string | undefined, onChange: (value: any) => void, onBlur: () => void): HTMLElement;
|
|
1469
|
+
declare function createInput(field: Field, value: any, error: string | undefined, onChange: (value: any) => void, onBlur: () => void, showValidFeedback?: boolean): HTMLElement;
|
|
1462
1470
|
/**
|
|
1463
1471
|
* Registra un componente personalizado
|
|
1464
1472
|
*/
|