easy-forms-core 1.0.4 → 1.0.6
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 +50 -2
- package/dist/easy-form.js +745 -5
- package/dist/easy-form.js.map +1 -1
- package/dist/index.d.ts +51 -3
- package/dist/index.js +745 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/easy-form.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';
|
|
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';
|
|
5
5
|
/**
|
|
6
6
|
* Tipos de validaciones soportadas
|
|
7
7
|
*/
|
|
@@ -222,10 +222,57 @@ interface CustomField extends BaseField {
|
|
|
222
222
|
type: 'custom';
|
|
223
223
|
component: string;
|
|
224
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* Campo de cantidad (quantity)
|
|
227
|
+
*/
|
|
228
|
+
interface QuantityField extends BaseField {
|
|
229
|
+
type: 'quantity';
|
|
230
|
+
min?: number;
|
|
231
|
+
max?: number;
|
|
232
|
+
step?: number;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Campo select en acordeón
|
|
236
|
+
*/
|
|
237
|
+
interface AccordionSelectField extends BaseField {
|
|
238
|
+
type: 'accordion-select';
|
|
239
|
+
options: Array<{
|
|
240
|
+
label: string;
|
|
241
|
+
value: any;
|
|
242
|
+
description?: string;
|
|
243
|
+
content?: string | HTMLElement;
|
|
244
|
+
} | string>;
|
|
245
|
+
multiple?: boolean;
|
|
246
|
+
autoExpand?: boolean;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Campo select de imágenes en cuadrícula
|
|
250
|
+
*/
|
|
251
|
+
interface ImageGridSelectField extends BaseField {
|
|
252
|
+
type: 'image-grid-select';
|
|
253
|
+
options: Array<{
|
|
254
|
+
label: string;
|
|
255
|
+
value: any;
|
|
256
|
+
image?: string;
|
|
257
|
+
description?: string;
|
|
258
|
+
} | string>;
|
|
259
|
+
multiple?: boolean;
|
|
260
|
+
columns?: number;
|
|
261
|
+
imageSize?: 'small' | 'medium' | 'large';
|
|
262
|
+
gap?: string;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Campo OTP (código de un solo uso)
|
|
266
|
+
*/
|
|
267
|
+
interface OTPField extends BaseField {
|
|
268
|
+
type: 'otp';
|
|
269
|
+
length?: number;
|
|
270
|
+
numeric?: boolean;
|
|
271
|
+
}
|
|
225
272
|
/**
|
|
226
273
|
* Unión de todos los tipos de campos
|
|
227
274
|
*/
|
|
228
|
-
type Field = TextField | NumberField | TextareaField | SelectField | CheckboxField | RadioField | SwitchField | DateField | FileField | ArrayField | GroupField | RowField | CustomField;
|
|
275
|
+
type Field = TextField | NumberField | TextareaField | SelectField | CheckboxField | RadioField | SwitchField | DateField | FileField | ArrayField | GroupField | RowField | CustomField | QuantityField | AccordionSelectField | ImageGridSelectField | OTPField;
|
|
229
276
|
/**
|
|
230
277
|
* Step para formularios wizard
|
|
231
278
|
*/
|
|
@@ -247,6 +294,7 @@ interface FormColors {
|
|
|
247
294
|
error?: string;
|
|
248
295
|
success?: string;
|
|
249
296
|
text?: string;
|
|
297
|
+
labelColor?: string;
|
|
250
298
|
border?: string;
|
|
251
299
|
background?: string;
|
|
252
300
|
}
|