@dipusevilla/componentes-iu 1.1.14 → 1.1.15
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/index.cjs.js +65 -65
- package/dist/index.css +1 -1
- package/dist/index.es.js +12708 -12265
- package/dist/index.umd.js +109 -109
- package/dist/types/editor/components/TableColumnsConfigModal.d.ts +10 -0
- package/dist/types/editor/dnd/renderField.d.ts +1 -0
- package/dist/types/editor/dnd/useFormRendererDeps.d.ts +1 -0
- package/dist/types/editor/utils/fieldKinds.d.ts +1 -1
- package/dist/types/types/FormTypes.d.ts +9 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TableColumn } from '../../types/FormTypes';
|
|
3
|
+
interface TableColumnsConfigModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
initialColumns: TableColumn[];
|
|
7
|
+
onConfirm: (columns: TableColumn[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const TableColumnsConfigModal: React.FC<TableColumnsConfigModalProps>;
|
|
10
|
+
export {};
|
|
@@ -22,6 +22,7 @@ export type RenderFieldDeps = {
|
|
|
22
22
|
translateFn: (key: string | undefined, fallback?: string) => string;
|
|
23
23
|
onUpdateField?: (name: string, patch: any) => void;
|
|
24
24
|
isDesignMode?: boolean;
|
|
25
|
+
systemContext?: Record<string, any>;
|
|
25
26
|
};
|
|
26
27
|
export declare function renderFieldFactory(deps: RenderFieldDeps): (item: string | FieldSchema | ButtonField | InputGroupField) => React.ReactNode;
|
|
27
28
|
export {};
|
|
@@ -19,5 +19,6 @@ export declare function useFormRendererDeps(schema: FormSchema, externalResolver
|
|
|
19
19
|
evalContainer: (container: RuleContainer | undefined, whenDisabled: boolean) => boolean;
|
|
20
20
|
registry: Record<string, unknown> | undefined;
|
|
21
21
|
layout: import("../../types/FormTypes").LayoutNode[];
|
|
22
|
+
systemContext: Record<string, unknown>;
|
|
22
23
|
};
|
|
23
24
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type FieldKind = "text" | "number" | "email" | "password" | "tel" | "url" | "textarea" | "select" | "checkbox" | "optionGroup" | "date" | "file" | "search" | "inputGroup" | "section-layout" | "tabs-layout" | "array" | "button" | "iban" | "dni";
|
|
1
|
+
export type FieldKind = "text" | "number" | "email" | "password" | "tel" | "url" | "textarea" | "select" | "checkbox" | "optionGroup" | "date" | "file" | "search" | "inputGroup" | "section-layout" | "tabs-layout" | "array" | "button" | "iban" | "dni" | "table";
|
|
2
2
|
/** Colores (variables del tema) por tipo de componente */
|
|
3
3
|
export declare const KIND_COLOR_VAR: Record<string, string>;
|
|
4
4
|
export declare function getKindColor(kind?: string): string;
|
|
@@ -65,7 +65,7 @@ export type Condition = {
|
|
|
65
65
|
/**
|
|
66
66
|
* Tipo de campo atómico admitido.
|
|
67
67
|
*/
|
|
68
|
-
export type FieldType = "text" | "email" | "url" | "tel" | "number" | "password" | "select" | "date" | "optionGroup" | "button" | "textarea" | "file" | "inputGroup" | "checkbox" | "search" | "array" | "iban" | "dni";
|
|
68
|
+
export type FieldType = "text" | "email" | "url" | "tel" | "number" | "password" | "select" | "date" | "optionGroup" | "button" | "textarea" | "file" | "inputGroup" | "checkbox" | "search" | "array" | "iban" | "dni" | "table";
|
|
69
69
|
type FormCtx = {
|
|
70
70
|
getValues: UseFormGetValues<any>;
|
|
71
71
|
watch: UseFormWatch<any>;
|
|
@@ -202,6 +202,14 @@ export interface FieldSchema {
|
|
|
202
202
|
asyncValidation?: AsyncValidationConfig;
|
|
203
203
|
/** Valores por defecto sincrónicos. */
|
|
204
204
|
defaultValue?: Record<string, unknown>;
|
|
205
|
+
/** Configuración de columnas para el tipo 'table'. */
|
|
206
|
+
columns?: TableColumn[];
|
|
207
|
+
}
|
|
208
|
+
export interface TableColumn {
|
|
209
|
+
header: string;
|
|
210
|
+
accessor: string;
|
|
211
|
+
width?: string;
|
|
212
|
+
sortable?: boolean;
|
|
205
213
|
}
|
|
206
214
|
/**
|
|
207
215
|
* Campo de tipo botón.
|