easy-forms-core 1.3.4 → 1.4.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/dist/easy-form.d.ts +37 -2
- package/dist/easy-form.js +194 -34
- package/dist/easy-form.js.map +1 -1
- package/dist/index.d.ts +38 -3
- package/dist/index.js +217 -57
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tipos de campos soportados
|
|
3
3
|
*/
|
|
4
|
-
type FieldType = 'text' | 'email' | 'number' | 'password' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'switch' | 'date' | 'file' | 'array' | 'group' | 'row' | 'custom' | 'quantity' | 'accordion-select' | 'image-grid-select' | 'otp' | 'file-drop' | 'map' | 'rating' | 'slider' | 'colorpicker' | 'markdown' | 'autocomplete-tags';
|
|
4
|
+
type FieldType = 'text' | 'email' | 'number' | 'password' | 'textarea' | 'select' | 'checkbox' | 'radio' | 'switch' | 'date' | 'file' | 'array' | 'group' | 'row' | 'custom' | 'quantity' | 'accordion-select' | 'image-grid-select' | 'otp' | 'file-drop' | 'map' | 'rating' | 'slider' | 'colorpicker' | 'markdown' | 'autocomplete-tags' | 'chip-select' | 'image-file-crop';
|
|
5
5
|
/**
|
|
6
6
|
* Tipos de validaciones soportadas
|
|
7
7
|
*/
|
|
@@ -298,6 +298,41 @@ interface AutocompleteTagsField extends BaseField {
|
|
|
298
298
|
/** Mínimo de caracteres para mostrar sugerencias (default: 0) */
|
|
299
299
|
minChars?: number;
|
|
300
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* Campo chip select (selección múltiple en chips/badges)
|
|
303
|
+
*/
|
|
304
|
+
interface ChipSelectField extends BaseField {
|
|
305
|
+
type: 'chip-select';
|
|
306
|
+
/** Opciones disponibles */
|
|
307
|
+
options: Array<{
|
|
308
|
+
label: string;
|
|
309
|
+
value: any;
|
|
310
|
+
} | string>;
|
|
311
|
+
/** Máximo número de selecciones (opcional, sin límite por defecto) */
|
|
312
|
+
max?: number;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Campo de imagen con cropping
|
|
316
|
+
*/
|
|
317
|
+
interface ImageFileCropField extends BaseField {
|
|
318
|
+
type: 'image-file-crop';
|
|
319
|
+
/** Tipos de imagen aceptados (default: image/*) */
|
|
320
|
+
accept?: string;
|
|
321
|
+
/** Ratio de aspecto para el crop (ej: 1 para cuadrado, 1.5, 16/9 como número) */
|
|
322
|
+
ratio?: number;
|
|
323
|
+
/** Radio del borde redondeado en porcentaje (0-50) */
|
|
324
|
+
rounded?: number;
|
|
325
|
+
/** Tamaño máximo del archivo en MB */
|
|
326
|
+
maxSize?: number;
|
|
327
|
+
/** Calidad de la imagen de salida (0-1) */
|
|
328
|
+
quality?: number;
|
|
329
|
+
/** Ancho objetivo de salida en pixels */
|
|
330
|
+
width?: number;
|
|
331
|
+
/** Alto objetivo de salida en pixels */
|
|
332
|
+
height?: number;
|
|
333
|
+
/** Ancho máximo del componente en la UI (ej: '300px', '100%') */
|
|
334
|
+
maxWidth?: string;
|
|
335
|
+
}
|
|
301
336
|
/**
|
|
302
337
|
* Campo array
|
|
303
338
|
*/
|
|
@@ -386,7 +421,7 @@ interface OTPField extends BaseField {
|
|
|
386
421
|
/**
|
|
387
422
|
* Unión de todos los tipos de campos
|
|
388
423
|
*/
|
|
389
|
-
type Field = TextField | PasswordField | NumberField | TextareaField | SelectField | CheckboxField | RadioField | SwitchField | DateField | FileField | FileDropField | MapField | RatingField | SliderField | ColorpickerField | ArrayField | GroupField | RowField | CustomField | QuantityField | AccordionSelectField | ImageGridSelectField | OTPField | MarkdownField | AutocompleteTagsField;
|
|
424
|
+
type Field = TextField | PasswordField | NumberField | TextareaField | SelectField | CheckboxField | RadioField | SwitchField | DateField | FileField | FileDropField | MapField | RatingField | SliderField | ColorpickerField | ArrayField | GroupField | RowField | CustomField | QuantityField | AccordionSelectField | ImageGridSelectField | OTPField | MarkdownField | AutocompleteTagsField | ChipSelectField | ImageFileCropField;
|
|
390
425
|
/**
|
|
391
426
|
* Estilos visuales del stepper
|
|
392
427
|
*/
|
|
@@ -1482,4 +1517,4 @@ declare class EasyFormBuilder {
|
|
|
1482
1517
|
}
|
|
1483
1518
|
declare function createFormSchema(options?: EasyFormBuilderOptions): FormSchema;
|
|
1484
1519
|
|
|
1485
|
-
export { type AccordionSelectField, type ArrayField, AttemptsLock, type AttemptsLockOptions, type AutocompleteTagsField, type BaseField, type BaseValidation, type ChangeEventDetail, type CheckboxField, type ColorpickerField, type ComponentRegistry, ConditionEngine, type ConditionOperator, type CustomComponent, type CustomField, type CustomMask, type CustomValidation, type DateField, EasyForm, EasyFormBuilder, type EmailValidation, type ErrorEventDetail, type Field, type FieldCondition, type FieldDependencies, type FieldType, type FileDropField, type FileField, type FormColors, type FormSchema, type FormState, type FormTheme, type GroupField, INJECTION_VALIDATION_MESSAGE, type ImageGridSelectField, type LabelPosition, type MapField, type MarkdownField, type MaskConfig, MaskEngine, type MaxLengthValidation, type MaxValidation, type MinLengthValidation, type MinValidation, type NoInjectionValidation, type NumberField, type OTPField, PREDEFINED_MASKS, type PasswordField, type PatternValidation, type PersistenceConfig, type PredefinedMask, type QuantityField, type RadioField, type RatingField, type RequiredValidation, type RowField, SchemaParser, type SelectField, type SliderField, type SlotContent, StateManager, type Step, type StepChangeEventDetail, type StepStyle, type SubmitButtonConfig, type SubmitEventDetail, type SwitchField, type TemplateName, type TextField, type TextareaField, type TimeoutEventDetail, type Validation, ValidationEngine, type ValidationType, type WizardState, attributeValue, containsInjection, createFormSchema, createInput, extendTemplate, generateId, getAvailableTemplates, getColors, getCustomComponent, getNestedValue, getPredefinedMask, getTemplate, getThemeStyles, isSafeFromInjection, isValidEmail, parseAttributeValue, registerComponent, registerComponents, sanitizeId, setNestedValue, templates };
|
|
1520
|
+
export { type AccordionSelectField, type ArrayField, AttemptsLock, type AttemptsLockOptions, type AutocompleteTagsField, type BaseField, type BaseValidation, type ChangeEventDetail, type CheckboxField, type ChipSelectField, type ColorpickerField, type ComponentRegistry, ConditionEngine, type ConditionOperator, type CustomComponent, type CustomField, type CustomMask, type CustomValidation, type DateField, EasyForm, EasyFormBuilder, type EmailValidation, type ErrorEventDetail, type Field, type FieldCondition, type FieldDependencies, type FieldType, type FileDropField, type FileField, type FormColors, type FormSchema, type FormState, type FormTheme, type GroupField, INJECTION_VALIDATION_MESSAGE, type ImageFileCropField, type ImageGridSelectField, type LabelPosition, type MapField, type MarkdownField, type MaskConfig, MaskEngine, type MaxLengthValidation, type MaxValidation, type MinLengthValidation, type MinValidation, type NoInjectionValidation, type NumberField, type OTPField, PREDEFINED_MASKS, type PasswordField, type PatternValidation, type PersistenceConfig, type PredefinedMask, type QuantityField, type RadioField, type RatingField, type RequiredValidation, type RowField, SchemaParser, type SelectField, type SliderField, type SlotContent, StateManager, type Step, type StepChangeEventDetail, type StepStyle, type SubmitButtonConfig, type SubmitEventDetail, type SwitchField, type TemplateName, type TextField, type TextareaField, type TimeoutEventDetail, type Validation, ValidationEngine, type ValidationType, type WizardState, attributeValue, containsInjection, createFormSchema, createInput, extendTemplate, generateId, getAvailableTemplates, getColors, getCustomComponent, getNestedValue, getPredefinedMask, getTemplate, getThemeStyles, isSafeFromInjection, isValidEmail, parseAttributeValue, registerComponent, registerComponents, sanitizeId, setNestedValue, templates };
|