@acvl/frontend-components 0.0.61 → 0.0.63

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.
Files changed (46) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/src/components/v1/buttons/DeleteButton/DeleteConfirmationDialog.d.ts +2 -0
  4. package/dist/cjs/types/src/components/v1/datagrids/wrappers/CreateGridWrapper.d.ts +5 -0
  5. package/dist/cjs/types/src/components/v2/dashboards/KpiCard.d.ts +17 -0
  6. package/dist/cjs/types/src/components/v2/dashboards/Panel.d.ts +24 -0
  7. package/dist/cjs/types/src/components/v2/dashboards/PollingCountdownChip.d.ts +8 -0
  8. package/dist/cjs/types/src/components/v2/dashboards/index.d.ts +3 -0
  9. package/dist/cjs/types/src/components/v2/datagrids/DrawerGrid/index.d.ts +66 -0
  10. package/dist/cjs/types/src/components/v2/datagrids/index.d.ts +2 -0
  11. package/dist/cjs/types/src/components/v2/dialogs/ConfirmDialog.d.ts +17 -0
  12. package/dist/cjs/types/src/components/v2/dialogs/index.d.ts +1 -0
  13. package/dist/cjs/types/src/components/v2/index.d.ts +4 -0
  14. package/dist/cjs/types/src/components/v2/layout/pages/DetailPage/DetailForm.d.ts +25 -0
  15. package/dist/cjs/types/src/components/v2/layout/pages/DetailPage/DetailFormDialog.d.ts +35 -0
  16. package/dist/cjs/types/src/components/v2/layout/pages/DetailPage/DetailFormDrawer.d.ts +42 -0
  17. package/dist/cjs/types/src/components/v2/layout/pages/DetailPage/index.d.ts +5 -30
  18. package/dist/cjs/types/src/components/v2/layout/pages/DetailPage/useDetailForm.d.ts +82 -0
  19. package/dist/cjs/types/src/components/v2/layout/pages/index.d.ts +9 -0
  20. package/dist/cjs/types/src/components/v2/lib/hooks/useMutationHandler.d.ts +1 -1
  21. package/dist/cjs/types/src/components/v2/shared/PulseDot.d.ts +15 -0
  22. package/dist/cjs/types/src/components/v2/shared/index.d.ts +1 -0
  23. package/dist/esm/index.js +1 -1
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/types/src/components/v1/buttons/DeleteButton/DeleteConfirmationDialog.d.ts +2 -0
  26. package/dist/esm/types/src/components/v1/datagrids/wrappers/CreateGridWrapper.d.ts +5 -0
  27. package/dist/esm/types/src/components/v2/dashboards/KpiCard.d.ts +17 -0
  28. package/dist/esm/types/src/components/v2/dashboards/Panel.d.ts +24 -0
  29. package/dist/esm/types/src/components/v2/dashboards/PollingCountdownChip.d.ts +8 -0
  30. package/dist/esm/types/src/components/v2/dashboards/index.d.ts +3 -0
  31. package/dist/esm/types/src/components/v2/datagrids/DrawerGrid/index.d.ts +66 -0
  32. package/dist/esm/types/src/components/v2/datagrids/index.d.ts +2 -0
  33. package/dist/esm/types/src/components/v2/dialogs/ConfirmDialog.d.ts +17 -0
  34. package/dist/esm/types/src/components/v2/dialogs/index.d.ts +1 -0
  35. package/dist/esm/types/src/components/v2/index.d.ts +4 -0
  36. package/dist/esm/types/src/components/v2/layout/pages/DetailPage/DetailForm.d.ts +25 -0
  37. package/dist/esm/types/src/components/v2/layout/pages/DetailPage/DetailFormDialog.d.ts +35 -0
  38. package/dist/esm/types/src/components/v2/layout/pages/DetailPage/DetailFormDrawer.d.ts +42 -0
  39. package/dist/esm/types/src/components/v2/layout/pages/DetailPage/index.d.ts +5 -30
  40. package/dist/esm/types/src/components/v2/layout/pages/DetailPage/useDetailForm.d.ts +82 -0
  41. package/dist/esm/types/src/components/v2/layout/pages/index.d.ts +9 -0
  42. package/dist/esm/types/src/components/v2/lib/hooks/useMutationHandler.d.ts +1 -1
  43. package/dist/esm/types/src/components/v2/shared/PulseDot.d.ts +15 -0
  44. package/dist/esm/types/src/components/v2/shared/index.d.ts +1 -0
  45. package/dist/index.d.ts +321 -28
  46. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _mui_material from '@mui/material';
2
- import { ButtonProps, ButtonGroupProps, IconButtonProps, MenuItemProps, AlertProps, BoxProps, AutocompleteProps, SliderProps, SwitchProps, GridProps, DrawerProps, MenuProps, PaletteColorOptions, TextFieldProps as TextFieldProps$1, InputBaseProps } from '@mui/material';
2
+ import { ButtonProps, ButtonGroupProps, IconButtonProps, MenuItemProps, AlertProps, BoxProps, AutocompleteProps, SliderProps, SwitchProps, GridProps, DrawerProps, MenuProps, PaletteColorOptions, TypographyProps, SxProps, Theme, TextFieldProps as TextFieldProps$1, InputBaseProps, DialogProps, DialogContentProps } from '@mui/material';
3
3
  import * as React from 'react';
4
- import React__default, { ReactNode, Dispatch, SetStateAction, JSX, RefObject, FC, JSXElementConstructor, ElementType } from 'react';
4
+ import React__default, { ReactNode, Dispatch, SetStateAction, JSX, RefObject, FC, BaseSyntheticEvent, JSXElementConstructor, ElementType } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { GridRowId, GridRowSelectionModel, GridSortModel, GridFilterModel, GridRowModesModel, GridRenderEditCellParams, GridToolbarProps, DataGridProps as DataGridProps$1 } from '@mui/x-data-grid';
7
7
  import { DataGridProps, GridBaseColDef } from '@mui/x-data-grid/internals';
@@ -16,10 +16,10 @@ import * as redux from 'redux';
16
16
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
17
17
  import * as _emotion_styled from '@emotion/styled';
18
18
  import * as _mui_system from '@mui/system';
19
+ import { UseFormReturn } from 'react-hook-form';
19
20
  import { Breadcrumb, PageHeaderProps, Navigation, Branding, Session, Authentication, DashboardHeaderProps } from '@toolpad/core';
20
21
  import { SidebarFooterProps } from '@toolpad/core/DashboardLayout';
21
- import { Theme, CSSObject } from '@mui/material/styles';
22
- import { UseFormReturn } from 'react-hook-form';
22
+ import { Theme as Theme$1, CSSObject } from '@mui/material/styles';
23
23
 
24
24
  interface NormalOrIconProps {
25
25
  buttonProps: ButtonProps;
@@ -35,6 +35,8 @@ interface DeleteConfirmationDialogProps {
35
35
  handleClose: () => void;
36
36
  id?: GridRowId;
37
37
  disableNavBack?: boolean;
38
+ /** Extra callback fired after a successful delete (e.g. close a drawer that has no route to go back to). */
39
+ onSuccess?: () => void;
38
40
  }
39
41
  declare const DeleteConfirmationDialog: (props: DeleteConfirmationDialogProps) => react_jsx_runtime.JSX.Element;
40
42
 
@@ -269,6 +271,11 @@ interface CreateGridAPIProps {
269
271
  extraOptions?: CSVMenuOptionProps[];
270
272
  };
271
273
  navigationOptions?: NavigateOptions;
274
+ /**
275
+ * Overrides the "Manual" option's default behavior (routing to the create page). When
276
+ * provided, the option runs this callback instead of navigating — e.g. to open a drawer.
277
+ */
278
+ onManualCreate?: () => void;
272
279
  }
273
280
 
274
281
  interface BaseGridProps {
@@ -974,6 +981,52 @@ declare module '@mui/material/styles' {
974
981
  }
975
982
  declare const theme: () => _mui_material.Theme;
976
983
 
984
+ interface KpiCardProps {
985
+ icon: ReactNode;
986
+ label: string;
987
+ value: ReactNode;
988
+ caption?: string;
989
+ color?: string;
990
+ /** Variante tipográfica del valor. Por defecto `h4`; usa `h5` cuando el valor es
991
+ * largo o hay muchas tarjetas por fila. */
992
+ valueVariant?: TypographyProps["variant"];
993
+ isLoading: boolean;
994
+ }
995
+ /** Tarjeta de KPI: ícono + etiqueta, un valor destacado y una leyenda opcional.
996
+ * Muestra un esqueleto mientras se cargan los datos. */
997
+ declare function KpiCard({ icon, label, value, caption, color, valueVariant, isLoading, }: KpiCardProps): react_jsx_runtime.JSX.Element;
998
+
999
+ interface PanelProps {
1000
+ /** Ícono a la izquierda del título (típicamente `color="action" fontSize="small"`). */
1001
+ icon?: ReactNode;
1002
+ /** Título del encabezado. Si se omite (y no hay ícono ni acción), no se renderiza encabezado. */
1003
+ title?: ReactNode;
1004
+ /** Contenido alineado a la derecha del encabezado (chips, botones, etc.). */
1005
+ action?: ReactNode;
1006
+ /** Región entre el encabezado y el divisor, p. ej. un `<Tabs>`. */
1007
+ tabs?: ReactNode;
1008
+ /** Muestra un divisor bajo el encabezado/tabs. Por defecto `true`. */
1009
+ divider?: boolean;
1010
+ /** Altura del contenedor. Con un número (px) el contenido ocupa el espacio
1011
+ * restante y hace scroll; con `"100%"` solo iguala la altura de la columna. */
1012
+ height?: number | string;
1013
+ /** Estilos adicionales para el `Paper`. */
1014
+ sx?: SxProps<Theme>;
1015
+ children?: ReactNode;
1016
+ }
1017
+ /** Contenedor estándar de panel: `Paper` con encabezado (ícono + título + acción),
1018
+ * divisor opcional y contenido. Unifica el aspecto de los paneles del dashboard. */
1019
+ declare function Panel({ icon, title, action, tabs, divider, height, sx, children }: PanelProps): react_jsx_runtime.JSX.Element;
1020
+
1021
+ interface PollingCountdownChipProps {
1022
+ pollingInterval: number;
1023
+ isFetching: boolean;
1024
+ onRefresh?: () => void;
1025
+ }
1026
+ /** Chip con cuenta regresiva hasta el próximo refresco de un polling. Al terminar cada
1027
+ * fetch reinicia el conteo; opcionalmente refresca al hacer clic. */
1028
+ declare function PollingCountdownChip({ pollingInterval, isFetching, onRefresh, }: PollingCountdownChipProps): react_jsx_runtime.JSX.Element;
1029
+
977
1030
  /**
978
1031
  * Datos que recibe el renderizado de detalle de un input. Es un subconjunto de
979
1032
  * `FieldProps` (los campos que necesita la vista de solo lectura), más un
@@ -1175,28 +1228,30 @@ interface SectionProps extends Partial<Omit<MyTab, "children">> {
1175
1228
  data?: any;
1176
1229
  }
1177
1230
 
1178
- interface DetailPageV2Props {
1179
- api: {
1180
- data: {
1181
- query: any;
1182
- args?: any;
1183
- skipToken?: boolean;
1184
- };
1185
- mutate: {
1186
- mutation: any;
1187
- args?: any;
1188
- disable?: boolean;
1189
- successMessage?: string | ((response: any) => string);
1190
- postAction?: {
1191
- after: "create" | "edit" | "both";
1192
- type: string;
1193
- node: ReactNode;
1194
- };
1195
- };
1196
- delete?: {
1197
- mutation: any;
1231
+ type DetailFormStatus = "loading" | "not-found" | "not-allowed" | "ready";
1232
+ interface DetailFormApi {
1233
+ data: {
1234
+ query: any;
1235
+ args?: any;
1236
+ skipToken?: boolean;
1237
+ };
1238
+ mutate: {
1239
+ mutation: any;
1240
+ args?: any;
1241
+ disable?: boolean;
1242
+ successMessage?: string | ((response: any) => string);
1243
+ postAction?: {
1244
+ after: "create" | "edit" | "both";
1245
+ type: string;
1246
+ node: ReactNode;
1198
1247
  };
1199
1248
  };
1249
+ delete?: {
1250
+ mutation: any;
1251
+ };
1252
+ }
1253
+ interface DetailFormConfig {
1254
+ api: DetailFormApi;
1200
1255
  form: Pick<JSONFormProps, "props" | "type" | "useLabel"> & {
1201
1256
  schema: any;
1202
1257
  defaultValues: {
@@ -1205,6 +1260,135 @@ interface DetailPageV2Props {
1205
1260
  };
1206
1261
  sections: (form: any) => SectionProps[];
1207
1262
  pageType: PageType;
1263
+ /** dot-path prefix where `obj_permissions` live inside the fetched record. */
1264
+ permissionsPath?: string;
1265
+ /**
1266
+ * Fired after a successful mutation (the form has already been reset). Receives the
1267
+ * mutation response. A page shell navigates back here; a dialog/drawer closes itself.
1268
+ */
1269
+ onSuccess?: (response: any) => void;
1270
+ /** Fired when the user cancels (the form has already been reset). */
1271
+ onCancel?: () => void;
1272
+ /** Fired whenever a fresh record is loaded — e.g. to sync a page title. */
1273
+ onData?: (data: any) => void;
1274
+ }
1275
+ interface DetailFormController {
1276
+ /** react-hook-form instance (also exposed via `FormProvider` by `<DetailForm/>`). */
1277
+ form: UseFormReturn<any>;
1278
+ /** The fetched record. */
1279
+ data: any;
1280
+ /** High-level state for a shell to branch on. */
1281
+ status: DetailFormStatus;
1282
+ isLoading: boolean;
1283
+ isFetching: boolean;
1284
+ /** A mutation is in flight. */
1285
+ isSubmitting: boolean;
1286
+ canEdit: boolean;
1287
+ canDelete: boolean;
1288
+ /** Whether the mutate action was disabled via config. */
1289
+ mutateDisabled: boolean;
1290
+ /** Bound submit handler — wire to `<form onSubmit>`. */
1291
+ onSubmit: (e?: BaseSyntheticEvent) => Promise<void>;
1292
+ /** Reset the form, then run `config.onCancel`. */
1293
+ cancel: () => void;
1294
+ /** Node emitted by a successful mutation's `post_action`, or `null`. */
1295
+ postActionNode: ReactNode;
1296
+ /** Passthroughs consumed by `<DetailForm/>`. */
1297
+ sections: (form: any) => SectionProps[];
1298
+ pageType: PageType;
1299
+ }
1300
+ /**
1301
+ * Headless engine behind every `v2` record form. Owns the form state, data fetch/reset,
1302
+ * permission flags, the mutation + submit pipeline and post-action detection — with zero
1303
+ * page chrome and no routing side-effects. Side-effects (navigate, close, title) are
1304
+ * injected via `onSuccess`/`onCancel`/`onData`, so the same hook drives a full page, a
1305
+ * dialog or a drawer.
1306
+ */
1307
+ declare function useDetailForm(config: DetailFormConfig): DetailFormController;
1308
+
1309
+ interface DrawerGridDrawerConfig {
1310
+ /** Shared field layout, used by every mode. Same shape as `DetailPage_v2`'s `form`/`sections`. */
1311
+ form: DetailFormConfig["form"];
1312
+ sections: DetailFormConfig["sections"];
1313
+ permissionsPath?: string;
1314
+ /** Panel width. Defaults to the drawer's own default (480). */
1315
+ width?: number | string;
1316
+ title?: {
1317
+ create?: ReactNode;
1318
+ record?: ReactNode | ((id: GridRowId) => ReactNode);
1319
+ };
1320
+ /** Create-mode API (opened by the "Quick create" menu option). */
1321
+ create: {
1322
+ mutation: any;
1323
+ /** Defaults to `"create"`. */
1324
+ pageType?: PageType;
1325
+ successMessage?: string | ((response: any) => string);
1326
+ };
1327
+ /** Record-mode API (opened by a row click). */
1328
+ record: {
1329
+ /** Single-record query hook, called with `{ id, ...args(id) }`. */
1330
+ query: any;
1331
+ mutation: any;
1332
+ /** Defaults to `"detail"` (read-only), matching a row-click. Use `"edit"` for an editable drawer. */
1333
+ pageType?: PageType;
1334
+ successMessage?: string | ((response: any) => string);
1335
+ /** Extra query args merged with `{ id }`. */
1336
+ args?: (id: GridRowId) => Record<string, any>;
1337
+ /** Optional delete mutation. When set and the user has delete permission, a delete button appears in the drawer header. */
1338
+ delete?: {
1339
+ mutation: any;
1340
+ };
1341
+ };
1342
+ /** Runs after any successful create/edit (e.g. side effects; the grid refetches via RTK tag invalidation). */
1343
+ onSaved?: (response: any) => void;
1344
+ /** Show the "open full page" button in the drawer header. Defaults to `true`. */
1345
+ showOpenFullPage?: boolean;
1346
+ labels?: {
1347
+ save?: string;
1348
+ cancel?: string;
1349
+ };
1350
+ }
1351
+ interface DrawerGridProps {
1352
+ /** Full v1 `Base` grid configuration (pathname, api, dataGridProps, slotProps, ref). */
1353
+ grid: BaseGridProps;
1354
+ drawer: DrawerGridDrawerConfig;
1355
+ }
1356
+ /**
1357
+ * A v1 `Base` grid whose rows and create button open a `DetailFormDrawer_v2` instead of
1358
+ * navigating to a full page — without giving up the full-page routes. A row click and the
1359
+ * create menu's "Manual" option both open the drawer; Ctrl/Cmd+click still opens the full
1360
+ * page in a new tab, and the record drawer carries an "open full page" button — so the
1361
+ * routes stay reachable either way.
1362
+ *
1363
+ * The full `Base` grid config goes under `grid` (`{ pathname, api, dataGridProps, slotProps }`),
1364
+ * alongside `drawer`.
1365
+ *
1366
+ * Composition only: the v1 grid stays drawer-agnostic (its `onRowClick` and `onManualCreate`
1367
+ * are generic passthroughs), so the v1→v2 layering is never inverted.
1368
+ */
1369
+ declare function DrawerGrid({ grid, drawer }: DrawerGridProps): react_jsx_runtime.JSX.Element;
1370
+
1371
+ interface ConfirmDialogProps {
1372
+ open: boolean;
1373
+ titulo: string;
1374
+ mensaje: ReactNode;
1375
+ confirmLabel?: string;
1376
+ cancelLabel?: string;
1377
+ confirmColor?: "primary" | "secondary" | "error" | "warning" | "info" | "success";
1378
+ confirmIcon?: ReactNode;
1379
+ isLoading?: boolean;
1380
+ onConfirm: () => void;
1381
+ onClose: () => void;
1382
+ }
1383
+ /** Diálogo de confirmación genérico: título, mensaje y un par de acciones. El botón de
1384
+ * confirmar puede mostrar estado de carga mientras se resuelve la acción. */
1385
+ declare function ConfirmDialog({ open, titulo, mensaje, confirmLabel, cancelLabel, confirmColor, confirmIcon, isLoading, onConfirm, onClose, }: ConfirmDialogProps): react_jsx_runtime.JSX.Element;
1386
+
1387
+ interface DetailPageV2Props {
1388
+ api: DetailFormApi;
1389
+ form: DetailFormConfig["form"];
1390
+ sections: DetailFormConfig["sections"];
1391
+ pageType: PageType;
1208
1392
  slots?: {
1209
1393
  button?: ReactNode;
1210
1394
  extraButtons?: {
@@ -1236,6 +1420,101 @@ interface DetailPageV2Props {
1236
1420
  }
1237
1421
  declare function DetailPage(props: DetailPageV2Props): react_jsx_runtime.JSX.Element;
1238
1422
 
1423
+ interface DetailFormProps {
1424
+ /** Result of `useDetailForm`. */
1425
+ controller: DetailFormController;
1426
+ /**
1427
+ * `id` of the `<form>` element. External submit buttons (e.g. inside a dialog footer,
1428
+ * which live outside the form tree) submit via `<button form={formId} type="submit">`.
1429
+ * Defaults to `"formulario"` for parity with `SaveCancelButton`.
1430
+ */
1431
+ formId?: string;
1432
+ /** Persist-tab key for multi-section forms. Defaults to `formId`. */
1433
+ storageKey?: string;
1434
+ /** Height factor passed to the loading spinner. Defaults to `0.7`. */
1435
+ loadingHeight?: number;
1436
+ slotProps?: {
1437
+ form?: Partial<BoxProps>;
1438
+ };
1439
+ }
1440
+ /**
1441
+ * Presentational, chrome-less body of a record form: the `FormProvider`, the `<form>`
1442
+ * element and the section/tab render tree — no page layout, no header buttons. Compose it
1443
+ * inside a page, dialog or drawer shell that supplies the surrounding chrome.
1444
+ */
1445
+ declare function DetailForm({ controller, formId, storageKey, loadingHeight, slotProps, }: DetailFormProps): react_jsx_runtime.JSX.Element;
1446
+
1447
+ interface DetailFormDialogProps {
1448
+ open: boolean;
1449
+ /** Close the dialog. Also invoked after a successful save and on cancel. */
1450
+ onClose: () => void;
1451
+ title?: ReactNode;
1452
+ api: DetailFormApi;
1453
+ form: DetailFormConfig["form"];
1454
+ sections: DetailFormConfig["sections"];
1455
+ /** Defaults to `"create"`. */
1456
+ pageType?: PageType;
1457
+ permissionsPath?: string;
1458
+ /** Runs after a successful mutation, before the dialog closes. Receives the response. */
1459
+ onSuccess?: (response: any) => void;
1460
+ labels?: {
1461
+ save?: string;
1462
+ cancel?: string;
1463
+ };
1464
+ slotProps?: {
1465
+ dialog?: Partial<DialogProps>;
1466
+ content?: Partial<DialogContentProps>;
1467
+ saveButton?: Partial<ButtonProps>;
1468
+ cancelButton?: Partial<ButtonProps>;
1469
+ };
1470
+ }
1471
+ /**
1472
+ * A record form inside a modal dialog. Reuses the exact same `useDetailForm` engine and
1473
+ * `DetailForm` body as `DetailPage_v2` — only the surrounding chrome differs: the header
1474
+ * becomes a `DialogTitle` and the buttons move into `DialogActions`. The save button lives
1475
+ * outside the `<form>` tree, so it submits via the native `form={formId}` attribute.
1476
+ */
1477
+ declare function DetailFormDialog({ open, onClose, title, api, form, sections, pageType, permissionsPath, onSuccess, labels, slotProps, }: DetailFormDialogProps): react_jsx_runtime.JSX.Element;
1478
+
1479
+ interface DetailFormDrawerProps {
1480
+ open: boolean;
1481
+ /** Close the drawer. Also invoked after a successful save and on cancel. */
1482
+ onClose: () => void;
1483
+ title?: ReactNode;
1484
+ api: DetailFormApi;
1485
+ form: DetailFormConfig["form"];
1486
+ sections: DetailFormConfig["sections"];
1487
+ /** Defaults to `"create"`. */
1488
+ pageType?: PageType;
1489
+ permissionsPath?: string;
1490
+ /** Runs after a successful mutation, before the drawer closes. Receives the response. */
1491
+ onSuccess?: (response: any) => void;
1492
+ /** Panel width. Defaults to `480`. */
1493
+ width?: number | string;
1494
+ /** Side the drawer slides in from. Defaults to `"right"`. */
1495
+ anchor?: DrawerProps["anchor"];
1496
+ labels?: {
1497
+ save?: string;
1498
+ cancel?: string;
1499
+ };
1500
+ slots?: {
1501
+ /** Extra actions rendered in the header, left of the close button (e.g. "open full page"). */
1502
+ headerActions?: ReactNode;
1503
+ };
1504
+ slotProps?: {
1505
+ drawer?: Partial<DrawerProps>;
1506
+ saveButton?: Partial<ButtonProps>;
1507
+ cancelButton?: Partial<ButtonProps>;
1508
+ };
1509
+ }
1510
+ /**
1511
+ * A record form inside a side drawer. Reuses the same `useDetailForm` engine and
1512
+ * `DetailForm` body as `DetailPage_v2`; only the chrome differs — a titled header, a
1513
+ * scrollable body and a pinned footer holding the actions. The save button sits outside
1514
+ * the `<form>`, so it submits via the native `form={formId}` attribute.
1515
+ */
1516
+ declare function DetailFormDrawer({ open, onClose, title, api, form, sections, pageType, permissionsPath, onSuccess, width, anchor, labels, slots, slotProps, }: DetailFormDrawerProps): react_jsx_runtime.JSX.Element;
1517
+
1239
1518
  /**
1240
1519
  * Encabezado por defecto del `PageContainer`: resuelve título y breadcrumbs a
1241
1520
  * partir de `useActivePage`, con soporte para páginas "sueltas" (rutas que ya no
@@ -1280,7 +1559,7 @@ interface MainLayoutProps {
1280
1559
  /** Handlers de inicio/cierre de sesión. */
1281
1560
  authentication?: Authentication;
1282
1561
  /** Tema MUI ya construido. Por defecto el tema de la librería. */
1283
- theme?: Theme;
1562
+ theme?: Theme$1;
1284
1563
  /** Páginas fuera de la navegación cuyo título/breadcrumbs debe resolver el `PageHeader`. */
1285
1564
  detachedPages?: DetachedPage[];
1286
1565
  /** Sufijo del `document.title` (ej. "Embarques" => "Título | Embarques"). */
@@ -1348,7 +1627,7 @@ interface MutationHandlerOptions {
1348
1627
  unwrap: () => Promise<any>;
1349
1628
  };
1350
1629
  form?: UseFormReturn<any>;
1351
- onSuccess: () => void;
1630
+ onSuccess: (response?: any) => void;
1352
1631
  onValidationError?: () => void;
1353
1632
  successTitle?: string;
1354
1633
  successMessage?: string | ((response: any) => string);
@@ -1366,5 +1645,19 @@ declare const useMutationHandler: ({ mutationFn, form, onSuccess, onValidationEr
1366
1645
 
1367
1646
  declare const useHasPermission_v2: (path?: string) => boolean;
1368
1647
 
1369
- export { APIContext, APIProvider, ActiveCell, ActiveIcon, Base, ButtonWithDrawer, CSVUpload, ContentLayout, ControlledAddressAutocomplete, ControlledAmountWithCurrency, ControlledDate$1 as ControlledDate, ControlledDate as ControlledDate_v2, ControlledDropdown, ControlledFileField$1 as ControlledFileField, ControlledFileField as ControlledFileField_v2, FileUploadBox as ControlledFileUploadBox, ControlledNumber, ControlledPhoneNumber, ControlledSelect$1 as ControlledSelect, ControlledSelect as ControlledSelect_v2, ControlledSlider as ControlledSimpleSlider, ControlledSlider$1 as ControlledSlider, ControlledSwitch, ControlledText, ControlledTimePicker, ControlledToggleButtons, CoverPage, CreateButtonBase, CreateButtonWithMenuOptions, CrudDropdown, CustomNoRows, DeleteButton, DeleteConfirmationDialog, DetailPage$1 as DetailPage, DetailPage as DetailPage_v2, EditButton, ExportCSV, ExtraButtons, HistorialDrawer, ListPage, Loadable, LoadingComponent, Logo, MainDrawer, MainLayout, MenuItemWithLoading, ModuleCard, MoreOptions, MyGridEditSingleSelect, NavigationContext, NavigationProvider, NormalOrIcon, NotAllowed, NotFound, ObjectProgressStack, SaveCancelButton, StatusBadge, StyledMenu, Tabs, Transitions, UncontrolledText, changeTitle, closeProgressSnack, deleteColumn, editColumn, filterQuery, formParser, _default as headerReducer, manualCacheRefresh, mergeSettings, openProgressSnack, query, renderEditCellWithErrorTooltip, setErrors, _default$1 as snackProgressReducer, tags, theme, updateProgressSnackData, useAPI, useHasPermission, useHasPermission_v2, useKeyboardShortcut, useMutationHandler, useNavigation, valueLabel };
1370
- export type { APIcontextProps, AddressValue, ComoOpcionesProps, ControlledInput, CustomToolbarProps, DeleteGridColumnsProps, DetachedPage, DetailRenderProps, EditGridColumnsProps, EditReadOnlyFields, FieldFilter, FieldProps$1 as FieldProps, FieldValidationProps, GridArgs, GridColDefPropsOverrides, JSONFormProps, JSONParserProps, KeyboardShortcut, MainLayoutPageHeaderProps, MainLayoutProps, MainLayoutSidebarFooterProps, MyDataGridProps, MyGridFilterModel, MyTab, MyTabProps, PageType, ProgressStatusProps };
1648
+ interface PulseDotProps {
1649
+ /** Cuando es `true`, el punto es verde y parpadea; si no, usa `inactiveColor`. */
1650
+ active: boolean;
1651
+ /** Color cuando no está activo. Por defecto `error.main`. */
1652
+ inactiveColor?: string;
1653
+ /** Tamaño del punto en px. Por defecto 10. */
1654
+ size?: number;
1655
+ /** Título opcional; si se pasa, envuelve el punto en un Tooltip. */
1656
+ title?: ReactNode;
1657
+ }
1658
+ /** Punto de estado: verde con animación de parpadeo cuando está activo, de lo
1659
+ * contrario un color fijo. Se usa para indicar conexión/actividad en vivo. */
1660
+ declare function PulseDot({ active, inactiveColor, size, title }: PulseDotProps): react_jsx_runtime.JSX.Element;
1661
+
1662
+ export { APIContext, APIProvider, ActiveCell, ActiveIcon, Base, ButtonWithDrawer, CSVUpload, ConfirmDialog, ContentLayout, ControlledAddressAutocomplete, ControlledAmountWithCurrency, ControlledDate$1 as ControlledDate, ControlledDate as ControlledDate_v2, ControlledDropdown, ControlledFileField$1 as ControlledFileField, ControlledFileField as ControlledFileField_v2, FileUploadBox as ControlledFileUploadBox, ControlledNumber, ControlledPhoneNumber, ControlledSelect$1 as ControlledSelect, ControlledSelect as ControlledSelect_v2, ControlledSlider as ControlledSimpleSlider, ControlledSlider$1 as ControlledSlider, ControlledSwitch, ControlledText, ControlledTimePicker, ControlledToggleButtons, CoverPage, CreateButtonBase, CreateButtonWithMenuOptions, CrudDropdown, CustomNoRows, DeleteButton, DeleteConfirmationDialog, DetailFormDialog as DetailFormDialog_v2, DetailFormDrawer as DetailFormDrawer_v2, DetailForm as DetailForm_v2, DetailPage$1 as DetailPage, DetailPage as DetailPage_v2, DrawerGrid as DrawerGrid_v2, EditButton, ExportCSV, ExtraButtons, HistorialDrawer, KpiCard, ListPage, Loadable, LoadingComponent, Logo, MainDrawer, MainLayout, MenuItemWithLoading, ModuleCard, MoreOptions, MyGridEditSingleSelect, NavigationContext, NavigationProvider, NormalOrIcon, NotAllowed, NotFound, ObjectProgressStack, Panel, PollingCountdownChip, PulseDot, SaveCancelButton, StatusBadge, StyledMenu, Tabs, Transitions, UncontrolledText, changeTitle, closeProgressSnack, deleteColumn, editColumn, filterQuery, formParser, _default as headerReducer, manualCacheRefresh, mergeSettings, openProgressSnack, query, renderEditCellWithErrorTooltip, setErrors, _default$1 as snackProgressReducer, tags, theme, updateProgressSnackData, useAPI, useDetailForm, useHasPermission, useHasPermission_v2, useKeyboardShortcut, useMutationHandler, useNavigation, valueLabel };
1663
+ export type { APIcontextProps, AddressValue, ComoOpcionesProps, ConfirmDialogProps, ControlledInput, CustomToolbarProps, DeleteGridColumnsProps, DetachedPage, DetailFormApi, DetailFormConfig, DetailFormController, DetailFormDialogProps, DetailFormDrawerProps, DetailFormProps, DetailFormStatus, DetailPageV2Props, DetailRenderProps, DrawerGridDrawerConfig, DrawerGridProps, EditGridColumnsProps, EditReadOnlyFields, FieldFilter, FieldProps$1 as FieldProps, FieldValidationProps, GridArgs, GridColDefPropsOverrides, JSONFormProps, JSONParserProps, KeyboardShortcut, KpiCardProps, MainLayoutPageHeaderProps, MainLayoutProps, MainLayoutSidebarFooterProps, MyDataGridProps, MyGridFilterModel, MyTab, MyTabProps, PageType, PanelProps, PollingCountdownChipProps, ProgressStatusProps, PulseDotProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acvl/frontend-components",
3
- "version": "0.0.61",
3
+ "version": "0.0.63",
4
4
  "description": "Component library for ACV frontend projects.",
5
5
  "homepage": "https://github.com/ACV-Logistics/acv-frontend-components#readme",
6
6
  "access": "public",