@sfperusacdev/sf-ui 0.1.23 → 0.1.24
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/sf-ui.css +1 -1
- package/dist/sf-ui.js +1375 -1215
- package/dist/sf-ui.js.map +1 -1
- package/dist/sf-ui.umd.cjs +7 -7
- package/dist/sf-ui.umd.cjs.map +1 -1
- package/dist/types/src/components/icons/AppsGridIcon.d.ts +9 -0
- package/dist/types/src/components/icons/index.d.ts +2 -0
- package/dist/types/src/components/layout/AppShell.d.ts +8 -0
- package/dist/types/src/components/table/CustomTable.d.ts +29 -3
- package/dist/types/src/components/table/CustomTable.detail.test.d.ts +1 -0
- package/dist/types/src/components/table/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type AppsGridIconProps = {
|
|
2
|
+
className?: string;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Lanzador de aplicaciones: cuadrícula de 9 puntos (3×3), el patrón que la
|
|
6
|
+
* gente reconoce como "ver todos los módulos". No usar `FiGrid` para esto:
|
|
7
|
+
* es una cuadrícula de 2×2 y se lee como "cambiar de vista", no como launcher.
|
|
8
|
+
*/
|
|
9
|
+
export declare const AppsGridIcon: ({ className }: AppsGridIconProps) => import("react").JSX.Element;
|
|
@@ -10,6 +10,11 @@ export type AppShellNavItem = {
|
|
|
10
10
|
* submenú largo sin cabeceras de sección. Se ignora en el primer item.
|
|
11
11
|
*/
|
|
12
12
|
dividerBefore?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Oculta el item sin sacarlo del árbol de navegación: útil para features
|
|
15
|
+
* detrás de bandera o permiso, donde la definición del menú es estática.
|
|
16
|
+
*/
|
|
17
|
+
hidden?: boolean;
|
|
13
18
|
};
|
|
14
19
|
export type AppShellCategory = {
|
|
15
20
|
id: string;
|
|
@@ -44,6 +49,9 @@ export type AppShellModuleLauncher = {
|
|
|
44
49
|
items: AppShellModuleLauncherItem[];
|
|
45
50
|
title?: string;
|
|
46
51
|
subtitle?: string;
|
|
52
|
+
/** Ícono del botón que abre el lanzador. Por defecto, la cuadrícula de 9 puntos. */
|
|
53
|
+
triggerIcon?: ReactNode;
|
|
54
|
+
ariaLabel?: string;
|
|
47
55
|
};
|
|
48
56
|
export type AppShellUserMenu = {
|
|
49
57
|
fullName: string;
|
|
@@ -19,7 +19,28 @@ type CustomColumn<TData> = {
|
|
|
19
19
|
enableHiding?: boolean;
|
|
20
20
|
size?: number;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Configuración de las filas de detalle expandibles (master-detail).
|
|
24
|
+
*
|
|
25
|
+
* Se puede usar de dos maneras excluyentes:
|
|
26
|
+
* - `render`: contenido libre bajo la fila padre (tiene prioridad si se define).
|
|
27
|
+
* - `getRows` + `columns`: sub-tabla renderizada con el propio `CustomTable` en modo `embedded`.
|
|
28
|
+
*/
|
|
29
|
+
type CustomTableDetail<TData, TDetail extends Record<string, unknown> = Record<string, unknown>> = {
|
|
30
|
+
/** Render libre del detalle. Si se define, ignora `getRows`/`columns`. */
|
|
31
|
+
render?: (row: TData) => ReactNode;
|
|
32
|
+
/** Filas hijas de la fila padre; se muestran en una sub-tabla. */
|
|
33
|
+
getRows?: (row: TData) => TDetail[];
|
|
34
|
+
/** Columnas de la sub-tabla de detalle. Requerido cuando se usa `getRows`. */
|
|
35
|
+
columns?: CustomColumn<TDetail>[];
|
|
36
|
+
/** Estado inicial del detalle: booleano global o predicado por fila. Por defecto `false`. */
|
|
37
|
+
defaultExpanded?: boolean | ((row: TData) => boolean);
|
|
38
|
+
/** Deshabilita el chevron para filas sin detalle. Por defecto todas son expandibles. */
|
|
39
|
+
isExpandable?: (row: TData) => boolean;
|
|
40
|
+
/** Mensaje de la sub-tabla cuando no hay filas hijas. */
|
|
41
|
+
emptyMessage?: string;
|
|
42
|
+
};
|
|
43
|
+
type CustomTableProps<TData extends Record<string, unknown>, TDetail extends Record<string, unknown> = Record<string, unknown>> = {
|
|
23
44
|
id?: string;
|
|
24
45
|
stateStore?: AsyncStateStore;
|
|
25
46
|
data: TData[];
|
|
@@ -77,7 +98,12 @@ type CustomTableProps<TData extends Record<string, unknown>> = {
|
|
|
77
98
|
headerVariant?: TableHeaderVariant;
|
|
78
99
|
/** Oculta título, toolbar y chrome exterior — para uso dentro de ExpandableTableSection u otros contenedores. */
|
|
79
100
|
embedded?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Filas de detalle expandibles (master-detail). Agrega una columna de chevron al inicio
|
|
103
|
+
* y, al expandir, inserta una fila con el detalle debajo de la fila padre.
|
|
104
|
+
*/
|
|
105
|
+
detail?: CustomTableDetail<TData, TDetail>;
|
|
80
106
|
controller?: CustomTableController<TData>;
|
|
81
107
|
};
|
|
82
|
-
export declare function CustomTable<TData extends Record<string, unknown>>({ id, stateStore, data, columns, grouping, defaultGrouping, enableGrouping, enableSorting, enableFiltering, enablePagination, pageSize, fillParentHeight, maxBodyHeightPx, className, emptyMessage, title, subtitle, sidePanel, onGroupingChange, toolbarSlot, belowToolbarSlot, loading, loadingMessage, isFetching, error, onRetry, onRefresh, onRowClick, enableRowSelection, getRowActions, getBulkActions, bulkActionsSlot, onSelectionChange, headerVariant, embedded, controller, }: CustomTableProps<TData>): import("react").JSX.Element;
|
|
83
|
-
export type { CustomColumn, CustomTableProps, TableAggregation };
|
|
108
|
+
export declare function CustomTable<TData extends Record<string, unknown>, TDetail extends Record<string, unknown> = Record<string, unknown>>({ id, stateStore, data, columns, grouping, defaultGrouping, enableGrouping, enableSorting, enableFiltering, enablePagination, pageSize, fillParentHeight, maxBodyHeightPx, className, emptyMessage, title, subtitle, sidePanel, onGroupingChange, toolbarSlot, belowToolbarSlot, loading, loadingMessage, isFetching, error, onRetry, onRefresh, onRowClick, enableRowSelection, getRowActions, getBulkActions, bulkActionsSlot, onSelectionChange, headerVariant, embedded, detail, controller, }: CustomTableProps<TData, TDetail>): import("react").JSX.Element;
|
|
109
|
+
export type { CustomColumn, CustomTableDetail, CustomTableProps, TableAggregation };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CustomTable } from './CustomTable';
|
|
2
|
-
export type { CustomColumn, CustomTableProps, TableHeaderVariant } from './CustomTable';
|
|
2
|
+
export type { CustomColumn, CustomTableDetail, CustomTableProps, TableHeaderVariant } from './CustomTable';
|
|
3
3
|
export { AsyncCustomTable } from './AsyncCustomTable';
|
|
4
4
|
export type { AsyncCustomTableProps } from './AsyncCustomTable';
|
|
5
5
|
export { PaginationRangeInput } from './PaginationRangeInput';
|
package/package.json
CHANGED