@acvl/frontend-components 0.0.61 → 0.0.62

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 +74 -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 +74 -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 +329 -28
  46. package/package.json +1 -1
@@ -5,6 +5,8 @@ export interface DeleteConfirmationDialogProps {
5
5
  handleClose: () => void;
6
6
  id?: GridRowId;
7
7
  disableNavBack?: boolean;
8
+ /** Extra callback fired after a successful delete (e.g. close a drawer that has no route to go back to). */
9
+ onSuccess?: () => void;
8
10
  }
9
11
  declare const DeleteConfirmationDialog: (props: DeleteConfirmationDialogProps) => import("react/jsx-runtime").JSX.Element;
10
12
  export default DeleteConfirmationDialog;
@@ -19,6 +19,11 @@ export interface CreateGridAPIProps {
19
19
  extraOptions?: CSVMenuOptionProps[];
20
20
  };
21
21
  navigationOptions?: NavigateOptions;
22
+ /**
23
+ * Overrides the "Manual" option's default behavior (routing to the create page). When
24
+ * provided, the option runs this callback instead of navigating — e.g. to open a drawer.
25
+ */
26
+ onManualCreate?: () => void;
22
27
  }
23
28
  export interface CreateGridWrapperProps extends CreateGridAPIProps {
24
29
  permission: boolean;
@@ -0,0 +1,17 @@
1
+ import type { TypographyProps } from "@mui/material";
2
+ import type { ReactNode } from "react";
3
+ export interface KpiCardProps {
4
+ icon: ReactNode;
5
+ label: string;
6
+ value: ReactNode;
7
+ caption?: string;
8
+ color?: string;
9
+ /** Variante tipográfica del valor. Por defecto `h4`; usa `h5` cuando el valor es
10
+ * largo o hay muchas tarjetas por fila. */
11
+ valueVariant?: TypographyProps["variant"];
12
+ isLoading: boolean;
13
+ }
14
+ /** Tarjeta de KPI: ícono + etiqueta, un valor destacado y una leyenda opcional.
15
+ * Muestra un esqueleto mientras se cargan los datos. */
16
+ declare function KpiCard({ icon, label, value, caption, color, valueVariant, isLoading, }: KpiCardProps): import("react/jsx-runtime").JSX.Element;
17
+ export default KpiCard;
@@ -0,0 +1,24 @@
1
+ import type { SxProps, Theme } from "@mui/material";
2
+ import type { ReactNode } from "react";
3
+ export interface PanelProps {
4
+ /** Ícono a la izquierda del título (típicamente `color="action" fontSize="small"`). */
5
+ icon?: ReactNode;
6
+ /** Título del encabezado. Si se omite (y no hay ícono ni acción), no se renderiza encabezado. */
7
+ title?: ReactNode;
8
+ /** Contenido alineado a la derecha del encabezado (chips, botones, etc.). */
9
+ action?: ReactNode;
10
+ /** Región entre el encabezado y el divisor, p. ej. un `<Tabs>`. */
11
+ tabs?: ReactNode;
12
+ /** Muestra un divisor bajo el encabezado/tabs. Por defecto `true`. */
13
+ divider?: boolean;
14
+ /** Altura del contenedor. Con un número (px) el contenido ocupa el espacio
15
+ * restante y hace scroll; con `"100%"` solo iguala la altura de la columna. */
16
+ height?: number | string;
17
+ /** Estilos adicionales para el `Paper`. */
18
+ sx?: SxProps<Theme>;
19
+ children?: ReactNode;
20
+ }
21
+ /** Contenedor estándar de panel: `Paper` con encabezado (ícono + título + acción),
22
+ * divisor opcional y contenido. Unifica el aspecto de los paneles del dashboard. */
23
+ declare function Panel({ icon, title, action, tabs, divider, height, sx, children }: PanelProps): import("react/jsx-runtime").JSX.Element;
24
+ export default Panel;
@@ -0,0 +1,8 @@
1
+ export interface PollingCountdownChipProps {
2
+ pollingInterval: number;
3
+ isFetching: boolean;
4
+ onRefresh?: () => void;
5
+ }
6
+ /** Chip con cuenta regresiva hasta el próximo refresco de un polling. Al terminar cada
7
+ * fetch reinicia el conteo; opcionalmente refresca al hacer clic. */
8
+ export default function PollingCountdownChip({ pollingInterval, isFetching, onRefresh, }: PollingCountdownChipProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { default as KpiCard, type KpiCardProps } from "./KpiCard";
2
+ export { default as Panel, type PanelProps } from "./Panel";
3
+ export { default as PollingCountdownChip, type PollingCountdownChipProps, } from "./PollingCountdownChip";
@@ -0,0 +1,74 @@
1
+ import { type ReactNode } from "react";
2
+ import { type GridRowId } from "@mui/x-data-grid";
3
+ import { type PageType } from "@v1";
4
+ import { type BaseGridProps } from "@v1/datagrids/Base";
5
+ import { type DetailFormConfig } from "@v2/layout/pages/DetailPage/useDetailForm";
6
+ export interface DrawerGridDrawerConfig {
7
+ /** Shared field layout, used by every mode. Same shape as `DetailPage_v2`'s `form`/`sections`. */
8
+ form: DetailFormConfig["form"];
9
+ sections: DetailFormConfig["sections"];
10
+ permissionsPath?: string;
11
+ /** Panel width. Defaults to the drawer's own default (480). */
12
+ width?: number | string;
13
+ title?: {
14
+ create?: ReactNode;
15
+ record?: ReactNode | ((id: GridRowId) => ReactNode);
16
+ };
17
+ /** Create-mode API (opened by the "Quick create" menu option). */
18
+ create: {
19
+ mutation: any;
20
+ /** Defaults to `"create"`. */
21
+ pageType?: PageType;
22
+ successMessage?: string | ((response: any) => string);
23
+ };
24
+ /** Record-mode API (opened by a row when `rowAction` is `"drawer"`). */
25
+ record: {
26
+ /** Single-record query hook, called with `{ id, ...args(id) }`. */
27
+ query: any;
28
+ mutation: any;
29
+ /** Defaults to `"detail"` (read-only), matching a row-click. Use `"edit"` for an editable drawer. */
30
+ pageType?: PageType;
31
+ successMessage?: string | ((response: any) => string);
32
+ /** Extra query args merged with `{ id }`. */
33
+ args?: (id: GridRowId) => Record<string, any>;
34
+ /** Optional delete mutation. When set and the user has delete permission, a delete button appears in the drawer header. */
35
+ delete?: {
36
+ mutation: any;
37
+ };
38
+ };
39
+ /** Runs after any successful create/edit (e.g. side effects; the grid refetches via RTK tag invalidation). */
40
+ onSaved?: (response: any) => void;
41
+ /** Show the "open full page" button in the drawer header. Defaults to `true`. */
42
+ showOpenFullPage?: boolean;
43
+ labels?: {
44
+ save?: string;
45
+ cancel?: string;
46
+ };
47
+ }
48
+ export interface DrawerGridProps {
49
+ /** Full v1 `Base` grid configuration (pathname, api, dataGridProps, slotProps, ref). */
50
+ grid: BaseGridProps;
51
+ /**
52
+ * How a single row click behaves. `"navigate"` (default) keeps the full-page route;
53
+ * `"drawer"` opens the record drawer instead. Ctrl/Cmd+click always opens the full page
54
+ * in a new tab, and the drawer carries an "open full page" button — so the route stays
55
+ * reachable either way.
56
+ */
57
+ rowAction?: "navigate" | "drawer";
58
+ drawer: DrawerGridDrawerConfig;
59
+ }
60
+ /**
61
+ * A v1 `Base` grid whose rows and create button can open a `DetailFormDrawer_v2` instead of
62
+ * navigating to a full page — without giving up the full-page routes. `rowAction` is a
63
+ * per-grid mode switch: in `"drawer"` mode both a row click and the create menu's "Manual"
64
+ * option open the drawer; in `"navigate"` mode (default) the grid keeps its full-page routes.
65
+ * Ctrl/Cmd+click always opens the full page in a new tab, and the record drawer carries an
66
+ * "open full page" button — so the routes stay reachable either way.
67
+ *
68
+ * The full `Base` grid config goes under `grid` (`{ pathname, api, dataGridProps, slotProps }`),
69
+ * alongside `rowAction` and `drawer`.
70
+ *
71
+ * Composition only: the v1 grid stays drawer-agnostic (its `onRowClick` and `onManualCreate`
72
+ * are generic passthroughs), so the v1→v2 layering is never inverted.
73
+ */
74
+ export default function DrawerGrid({ grid, rowAction, drawer }: DrawerGridProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default as DrawerGrid_v2 } from "./DrawerGrid";
2
+ export type { DrawerGridProps, DrawerGridDrawerConfig } from "./DrawerGrid";
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from "react";
2
+ export interface ConfirmDialogProps {
3
+ open: boolean;
4
+ titulo: string;
5
+ mensaje: ReactNode;
6
+ confirmLabel?: string;
7
+ cancelLabel?: string;
8
+ confirmColor?: "primary" | "secondary" | "error" | "warning" | "info" | "success";
9
+ confirmIcon?: ReactNode;
10
+ isLoading?: boolean;
11
+ onConfirm: () => void;
12
+ onClose: () => void;
13
+ }
14
+ /** Diálogo de confirmación genérico: título, mensaje y un par de acciones. El botón de
15
+ * confirmar puede mostrar estado de carga mientras se resuelve la acción. */
16
+ declare function ConfirmDialog({ open, titulo, mensaje, confirmLabel, cancelLabel, confirmColor, confirmIcon, isLoading, onConfirm, onClose, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element;
17
+ export default ConfirmDialog;
@@ -0,0 +1 @@
1
+ export { default as ConfirmDialog, type ConfirmDialogProps } from "./ConfirmDialog";
@@ -1,3 +1,7 @@
1
+ export * from "./dashboards";
2
+ export * from "./datagrids";
3
+ export * from "./dialogs";
1
4
  export * from "./inputs";
2
5
  export * from "./layout";
3
6
  export * from "./lib";
7
+ export * from "./shared";
@@ -0,0 +1,25 @@
1
+ import { type BoxProps } from "@mui/material";
2
+ import { type DetailFormController } from "./useDetailForm";
3
+ export interface DetailFormProps {
4
+ /** Result of `useDetailForm`. */
5
+ controller: DetailFormController;
6
+ /**
7
+ * `id` of the `<form>` element. External submit buttons (e.g. inside a dialog footer,
8
+ * which live outside the form tree) submit via `<button form={formId} type="submit">`.
9
+ * Defaults to `"formulario"` for parity with `SaveCancelButton`.
10
+ */
11
+ formId?: string;
12
+ /** Persist-tab key for multi-section forms. Defaults to `formId`. */
13
+ storageKey?: string;
14
+ /** Height factor passed to the loading spinner. Defaults to `0.7`. */
15
+ loadingHeight?: number;
16
+ slotProps?: {
17
+ form?: Partial<BoxProps>;
18
+ };
19
+ }
20
+ /**
21
+ * Presentational, chrome-less body of a record form: the `FormProvider`, the `<form>`
22
+ * element and the section/tab render tree — no page layout, no header buttons. Compose it
23
+ * inside a page, dialog or drawer shell that supplies the surrounding chrome.
24
+ */
25
+ export default function DetailForm({ controller, formId, storageKey, loadingHeight, slotProps, }: DetailFormProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,35 @@
1
+ import { type ReactNode } from "react";
2
+ import { type ButtonProps, type DialogContentProps, type DialogProps } from "@mui/material";
3
+ import { type PageType } from "@v1";
4
+ import { type DetailFormApi, type DetailFormConfig } from "./useDetailForm";
5
+ export interface DetailFormDialogProps {
6
+ open: boolean;
7
+ /** Close the dialog. Also invoked after a successful save and on cancel. */
8
+ onClose: () => void;
9
+ title?: ReactNode;
10
+ api: DetailFormApi;
11
+ form: DetailFormConfig["form"];
12
+ sections: DetailFormConfig["sections"];
13
+ /** Defaults to `"create"`. */
14
+ pageType?: PageType;
15
+ permissionsPath?: string;
16
+ /** Runs after a successful mutation, before the dialog closes. Receives the response. */
17
+ onSuccess?: (response: any) => void;
18
+ labels?: {
19
+ save?: string;
20
+ cancel?: string;
21
+ };
22
+ slotProps?: {
23
+ dialog?: Partial<DialogProps>;
24
+ content?: Partial<DialogContentProps>;
25
+ saveButton?: Partial<ButtonProps>;
26
+ cancelButton?: Partial<ButtonProps>;
27
+ };
28
+ }
29
+ /**
30
+ * A record form inside a modal dialog. Reuses the exact same `useDetailForm` engine and
31
+ * `DetailForm` body as `DetailPage_v2` — only the surrounding chrome differs: the header
32
+ * becomes a `DialogTitle` and the buttons move into `DialogActions`. The save button lives
33
+ * outside the `<form>` tree, so it submits via the native `form={formId}` attribute.
34
+ */
35
+ export default function DetailFormDialog({ open, onClose, title, api, form, sections, pageType, permissionsPath, onSuccess, labels, slotProps, }: DetailFormDialogProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,42 @@
1
+ import { type ReactNode } from "react";
2
+ import { type ButtonProps, type DrawerProps } from "@mui/material";
3
+ import { type PageType } from "@v1";
4
+ import { type DetailFormApi, type DetailFormConfig } from "./useDetailForm";
5
+ export interface DetailFormDrawerProps {
6
+ open: boolean;
7
+ /** Close the drawer. Also invoked after a successful save and on cancel. */
8
+ onClose: () => void;
9
+ title?: ReactNode;
10
+ api: DetailFormApi;
11
+ form: DetailFormConfig["form"];
12
+ sections: DetailFormConfig["sections"];
13
+ /** Defaults to `"create"`. */
14
+ pageType?: PageType;
15
+ permissionsPath?: string;
16
+ /** Runs after a successful mutation, before the drawer closes. Receives the response. */
17
+ onSuccess?: (response: any) => void;
18
+ /** Panel width. Defaults to `480`. */
19
+ width?: number | string;
20
+ /** Side the drawer slides in from. Defaults to `"right"`. */
21
+ anchor?: DrawerProps["anchor"];
22
+ labels?: {
23
+ save?: string;
24
+ cancel?: string;
25
+ };
26
+ slots?: {
27
+ /** Extra actions rendered in the header, left of the close button (e.g. "open full page"). */
28
+ headerActions?: ReactNode;
29
+ };
30
+ slotProps?: {
31
+ drawer?: Partial<DrawerProps>;
32
+ saveButton?: Partial<ButtonProps>;
33
+ cancelButton?: Partial<ButtonProps>;
34
+ };
35
+ }
36
+ /**
37
+ * A record form inside a side drawer. Reuses the same `useDetailForm` engine and
38
+ * `DetailForm` body as `DetailPage_v2`; only the chrome differs — a titled header, a
39
+ * scrollable body and a pinned footer holding the actions. The save button sits outside
40
+ * the `<form>`, so it submits via the native `form={formId}` attribute.
41
+ */
42
+ export default function DetailFormDrawer({ open, onClose, title, api, form, sections, pageType, permissionsPath, onSuccess, width, anchor, labels, slots, slotProps, }: DetailFormDrawerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,36 +1,11 @@
1
1
  import { type ReactNode } from "react";
2
- import { type JSONFormProps, type PageType } from "@v1";
2
+ import { type PageType } from "@v1";
3
3
  import { type ButtonProps } from "@mui/material";
4
- import { type SectionProps } from "./Section";
4
+ import { type DetailFormApi, type DetailFormConfig } from "./useDetailForm";
5
5
  export interface DetailPageV2Props {
6
- api: {
7
- data: {
8
- query: any;
9
- args?: any;
10
- skipToken?: boolean;
11
- };
12
- mutate: {
13
- mutation: any;
14
- args?: any;
15
- disable?: boolean;
16
- successMessage?: string | ((response: any) => string);
17
- postAction?: {
18
- after: "create" | "edit" | "both";
19
- type: string;
20
- node: ReactNode;
21
- };
22
- };
23
- delete?: {
24
- mutation: any;
25
- };
26
- };
27
- form: Pick<JSONFormProps, "props" | "type" | "useLabel"> & {
28
- schema: any;
29
- defaultValues: {
30
- [k: string]: any;
31
- };
32
- };
33
- sections: (form: any) => SectionProps[];
6
+ api: DetailFormApi;
7
+ form: DetailFormConfig["form"];
8
+ sections: DetailFormConfig["sections"];
34
9
  pageType: PageType;
35
10
  slots?: {
36
11
  button?: ReactNode;
@@ -0,0 +1,82 @@
1
+ import { type BaseSyntheticEvent, type ReactNode } from "react";
2
+ import { type JSONFormProps, type PageType } from "@v1";
3
+ import { type UseFormReturn } from "react-hook-form";
4
+ import { type SectionProps } from "./Section";
5
+ export type DetailFormStatus = "loading" | "not-found" | "not-allowed" | "ready";
6
+ export interface DetailFormApi {
7
+ data: {
8
+ query: any;
9
+ args?: any;
10
+ skipToken?: boolean;
11
+ };
12
+ mutate: {
13
+ mutation: any;
14
+ args?: any;
15
+ disable?: boolean;
16
+ successMessage?: string | ((response: any) => string);
17
+ postAction?: {
18
+ after: "create" | "edit" | "both";
19
+ type: string;
20
+ node: ReactNode;
21
+ };
22
+ };
23
+ delete?: {
24
+ mutation: any;
25
+ };
26
+ }
27
+ export interface DetailFormConfig {
28
+ api: DetailFormApi;
29
+ form: Pick<JSONFormProps, "props" | "type" | "useLabel"> & {
30
+ schema: any;
31
+ defaultValues: {
32
+ [k: string]: any;
33
+ };
34
+ };
35
+ sections: (form: any) => SectionProps[];
36
+ pageType: PageType;
37
+ /** dot-path prefix where `obj_permissions` live inside the fetched record. */
38
+ permissionsPath?: string;
39
+ /**
40
+ * Fired after a successful mutation (the form has already been reset). Receives the
41
+ * mutation response. A page shell navigates back here; a dialog/drawer closes itself.
42
+ */
43
+ onSuccess?: (response: any) => void;
44
+ /** Fired when the user cancels (the form has already been reset). */
45
+ onCancel?: () => void;
46
+ /** Fired whenever a fresh record is loaded — e.g. to sync a page title. */
47
+ onData?: (data: any) => void;
48
+ }
49
+ export interface DetailFormController {
50
+ /** react-hook-form instance (also exposed via `FormProvider` by `<DetailForm/>`). */
51
+ form: UseFormReturn<any>;
52
+ /** The fetched record. */
53
+ data: any;
54
+ /** High-level state for a shell to branch on. */
55
+ status: DetailFormStatus;
56
+ isLoading: boolean;
57
+ isFetching: boolean;
58
+ /** A mutation is in flight. */
59
+ isSubmitting: boolean;
60
+ canEdit: boolean;
61
+ canDelete: boolean;
62
+ /** Whether the mutate action was disabled via config. */
63
+ mutateDisabled: boolean;
64
+ /** Bound submit handler — wire to `<form onSubmit>`. */
65
+ onSubmit: (e?: BaseSyntheticEvent) => Promise<void>;
66
+ /** Reset the form, then run `config.onCancel`. */
67
+ cancel: () => void;
68
+ /** Node emitted by a successful mutation's `post_action`, or `null`. */
69
+ postActionNode: ReactNode;
70
+ /** Passthroughs consumed by `<DetailForm/>`. */
71
+ sections: (form: any) => SectionProps[];
72
+ pageType: PageType;
73
+ }
74
+ /**
75
+ * Headless engine behind every `v2` record form. Owns the form state, data fetch/reset,
76
+ * permission flags, the mutation + submit pipeline and post-action detection — with zero
77
+ * page chrome and no routing side-effects. Side-effects (navigate, close, title) are
78
+ * injected via `onSuccess`/`onCancel`/`onData`, so the same hook drives a full page, a
79
+ * dialog or a drawer.
80
+ */
81
+ export declare function useDetailForm(config: DetailFormConfig): DetailFormController;
82
+ export default useDetailForm;
@@ -1 +1,10 @@
1
1
  export { default as DetailPage_v2 } from "./DetailPage";
2
+ export type { DetailPageV2Props } from "./DetailPage";
3
+ export { useDetailForm } from "./DetailPage/useDetailForm";
4
+ export type { DetailFormApi, DetailFormConfig, DetailFormController, DetailFormStatus, } from "./DetailPage/useDetailForm";
5
+ export { default as DetailForm_v2 } from "./DetailPage/DetailForm";
6
+ export type { DetailFormProps } from "./DetailPage/DetailForm";
7
+ export { default as DetailFormDialog_v2 } from "./DetailPage/DetailFormDialog";
8
+ export type { DetailFormDialogProps } from "./DetailPage/DetailFormDialog";
9
+ export { default as DetailFormDrawer_v2 } from "./DetailPage/DetailFormDrawer";
10
+ export type { DetailFormDrawerProps } from "./DetailPage/DetailFormDrawer";
@@ -5,7 +5,7 @@ interface MutationHandlerOptions {
5
5
  unwrap: () => Promise<any>;
6
6
  };
7
7
  form?: UseFormReturn<any>;
8
- onSuccess: () => void;
8
+ onSuccess: (response?: any) => void;
9
9
  onValidationError?: () => void;
10
10
  successTitle?: string;
11
11
  successMessage?: string | ((response: any) => string);
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from "react";
2
+ export interface PulseDotProps {
3
+ /** Cuando es `true`, el punto es verde y parpadea; si no, usa `inactiveColor`. */
4
+ active: boolean;
5
+ /** Color cuando no está activo. Por defecto `error.main`. */
6
+ inactiveColor?: string;
7
+ /** Tamaño del punto en px. Por defecto 10. */
8
+ size?: number;
9
+ /** Título opcional; si se pasa, envuelve el punto en un Tooltip. */
10
+ title?: ReactNode;
11
+ }
12
+ /** Punto de estado: verde con animación de parpadeo cuando está activo, de lo
13
+ * contrario un color fijo. Se usa para indicar conexión/actividad en vivo. */
14
+ declare function PulseDot({ active, inactiveColor, size, title }: PulseDotProps): import("react/jsx-runtime").JSX.Element;
15
+ export default PulseDot;
@@ -0,0 +1 @@
1
+ export { default as PulseDot, type PulseDotProps } from "./PulseDot";