frontend-plus-react 0.6.0 → 0.7.0

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.js CHANGED
@@ -317,7 +317,7 @@ var useApiCallWithoutSnackbar = () => {
317
317
  };
318
318
 
319
319
  // src/components/grid/GenericDataGrid.tsx
320
- import { CircularProgress as CircularProgress4, Typography as Typography10, Box as Box12, Alert as Alert2, useTheme as useTheme4, Dialog as Dialog4 } from "@mui/material";
320
+ import { CircularProgress as CircularProgress4, Typography as Typography11, Box as Box13, Alert as Alert2, useTheme as useTheme4, Dialog as Dialog5 } from "@mui/material";
321
321
 
322
322
  // src/store/index.ts
323
323
  import { configureStore, combineReducers } from "@reduxjs/toolkit";
@@ -1377,7 +1377,7 @@ function BotonDetalle({ row, rowId, detailTable, deshabilitado }) {
1377
1377
  const { abiertos, alternarDetalle } = useDetallesGrilla();
1378
1378
  if (!cumpleCondicion(detailTable.condition, row)) return /* @__PURE__ */ jsx5("div", { className: "fpr-boton-detalle" });
1379
1379
  const abierto = abiertos.has(claveDetalle(rowId, detailTable));
1380
- const titulo = deshabilitado ? "Grab\xE1 la fila para ver sus detalles" : `${detailTable.label || detailTable.abr}${abierto ? " (replegar)" : ""} \u2014 Ctrl+click: en otra pesta\xF1a`;
1380
+ const titulo = deshabilitado ? "Grab\xE1 la fila para ver sus detalles" : "";
1381
1381
  return /* @__PURE__ */ jsx5(Tooltip, { title: titulo, children: /* @__PURE__ */ jsx5("span", { className: "fpr-boton-detalle", children: /* @__PURE__ */ jsx5(
1382
1382
  IconButton,
1383
1383
  {
@@ -1813,7 +1813,8 @@ var useGridMenu = ({
1813
1813
  callApi,
1814
1814
  resetSorting,
1815
1815
  triggerImport,
1816
- triggerExport
1816
+ triggerExport,
1817
+ abrirColumnas
1817
1818
  }) => {
1818
1819
  const { showSuccess, showError, showWarning } = useSnackbar();
1819
1820
  const menuOptions = useMemo4(() => {
@@ -1849,7 +1850,7 @@ var useGridMenu = ({
1849
1850
  label: "ocultar o mostrar columnas",
1850
1851
  icon: React4.createElement(VisibilityOffIcon),
1851
1852
  handler: async () => {
1852
- console.log("Ocultar/mostrar columnas");
1853
+ abrirColumnas?.();
1853
1854
  },
1854
1855
  visible: true
1855
1856
  });
@@ -1898,7 +1899,7 @@ var useGridMenu = ({
1898
1899
  visible: true
1899
1900
  });
1900
1901
  return options;
1901
- }, [tableDefinition, tableName, fixedFields, setTableData, callApi, resetSorting, triggerImport, triggerExport, showSuccess, showError, showWarning]);
1902
+ }, [tableDefinition, tableName, fixedFields, setTableData, callApi, resetSorting, triggerImport, triggerExport, abrirColumnas, showSuccess, showError, showWarning]);
1902
1903
  return { menuOptions };
1903
1904
  };
1904
1905
 
@@ -1969,7 +1970,7 @@ var useVistaGrilla = () => useContext3(VistaGrillaContext);
1969
1970
 
1970
1971
  // src/components/grid/renderers/headerCellRenderers.tsx
1971
1972
  import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
1972
- var defaultColumnHeaderCellRenderer = (props, fieldDef) => {
1973
+ var defaultColumnHeaderCellRenderer = (props, fieldDef, ocultarColumna) => {
1973
1974
  const { column, sortDirection, priority } = props;
1974
1975
  const isPrimaryKey = fieldDef.isPk;
1975
1976
  const sorted = sortDirection !== void 0;
@@ -1984,6 +1985,11 @@ var defaultColumnHeaderCellRenderer = (props, fieldDef) => {
1984
1985
  return /* @__PURE__ */ jsxs5(
1985
1986
  Box3,
1986
1987
  {
1988
+ onClickCapture: (e) => {
1989
+ if (!e.altKey || !ocultarColumna) return;
1990
+ e.stopPropagation();
1991
+ ocultarColumna(fieldDef.name);
1992
+ },
1987
1993
  sx: {
1988
1994
  display: "flex",
1989
1995
  alignItems: "center",
@@ -3290,6 +3296,14 @@ var allColumnsEditCellRenderer = (props, allColumns) => {
3290
3296
  }
3291
3297
  };
3292
3298
 
3299
+ // src/utils/columnasOcultas.ts
3300
+ function columnasOcultasIniciales(tableDefinition) {
3301
+ return Array.from(new Set(tableDefinition.hiddenColumns ?? []));
3302
+ }
3303
+ function campoDibujable(field) {
3304
+ return field.visible !== false;
3305
+ }
3306
+
3293
3307
  // src/hooks/grid/useGridColumns.ts
3294
3308
  var estimateTextWidth = (text) => text.length * 8 + 16;
3295
3309
  var calcularAnchosDeColumnas = (tableDefinition, filas) => {
@@ -3327,6 +3341,8 @@ var useGridColumns = ({
3327
3341
  tableDefinition,
3328
3342
  anchosCalculados,
3329
3343
  fixedFields,
3344
+ columnasOcultas,
3345
+ ocultarColumna,
3330
3346
  primaryKey,
3331
3347
  setTableData,
3332
3348
  handleKeyPressInEditor,
@@ -3340,7 +3356,7 @@ var useGridColumns = ({
3340
3356
  const columns = useMemo8(() => {
3341
3357
  if (!tableDefinition) return [];
3342
3358
  const fieldsToShow = tableDefinition.fields.filter((field) => {
3343
- return !columnaOcultaPorFixedField(fixedFields, field.name) && field.visible !== false;
3359
+ return campoDibujable(field) && !columnaOcultaPorFixedField(fixedFields, field.name) && !columnasOcultas.has(field.name);
3344
3360
  });
3345
3361
  const defaultColumns = fieldsToShow.map((fieldDef) => {
3346
3362
  const isFixedField = valorFijoDe(fixedFields, fieldDef.name) !== void 0;
@@ -3365,7 +3381,7 @@ var useGridColumns = ({
3365
3381
  registrarEditor,
3366
3382
  width: colWidth,
3367
3383
  minWidth: 40,
3368
- renderHeaderCell: (props) => defaultColumnHeaderCellRenderer(props, fieldDef),
3384
+ renderHeaderCell: (props) => defaultColumnHeaderCellRenderer(props, fieldDef, ocultarColumna),
3369
3385
  renderSummaryCell: (props) => defaultColumnSummaryCellRenderer(props, fixedFields)
3370
3386
  };
3371
3387
  return column;
@@ -3428,7 +3444,7 @@ var useGridColumns = ({
3428
3444
  renderEditCell: (props) => allColumnsEditCellRenderer(props, allColumns),
3429
3445
  renderCell: (props) => allColumnsCellRenderer(props)
3430
3446
  }));
3431
- }, [tableDefinition, anchosCalculados, fixedFields, primaryKey, setTableData, handleKeyPressInEditor, registrarEditor, handleDeleteRow, handleAddRow, handleVerticalEditRow, toggleFilterVisibility, abrirOpcionesDeGrilla]);
3447
+ }, [tableDefinition, anchosCalculados, fixedFields, columnasOcultas, ocultarColumna, primaryKey, setTableData, handleKeyPressInEditor, registrarEditor, handleDeleteRow, handleAddRow, handleVerticalEditRow, toggleFilterVisibility, abrirOpcionesDeGrilla]);
3432
3448
  return { columns };
3433
3449
  };
3434
3450
 
@@ -3604,6 +3620,7 @@ var ExportDialog = ({
3604
3620
  open,
3605
3621
  onClose,
3606
3622
  tableDefinition,
3623
+ columnasOcultas,
3607
3624
  tableData,
3608
3625
  filteredRows,
3609
3626
  username = "anonymous"
@@ -3634,8 +3651,7 @@ var ExportDialog = ({
3634
3651
  };
3635
3652
  const executeExport = async () => {
3636
3653
  const fieldsDef2Export = tableDefinition.fields.filter((fieldDef) => {
3637
- const isVisible = fieldDef.visible !== false;
3638
- return (fieldDef.inTable !== false || options.fromOtherTables) && isVisible && (fieldDef.editable !== false || options.readOnly || tableDefinition.primaryKey?.includes(fieldDef.name)) && (isVisible || options.hiddens);
3654
+ return (fieldDef.inTable !== false || options.fromOtherTables) && campoDibujable(fieldDef) && (fieldDef.editable !== false || options.readOnly || tableDefinition.primaryKey?.includes(fieldDef.name)) && (!columnasOcultas.has(fieldDef.name) || options.hiddens);
3639
3655
  });
3640
3656
  if (format === "xlsx") {
3641
3657
  await excelExport(fieldsDef2Export);
@@ -3799,26 +3815,46 @@ var ExportDialog = ({
3799
3815
  ] });
3800
3816
  };
3801
3817
 
3818
+ // src/components/grid/DialogoDeColumnas.tsx
3819
+ import { Box as Box11, Button as Button7, Dialog as Dialog4, DialogActions as DialogActions4, DialogContent as DialogContent4, DialogTitle as DialogTitle4, List as List3, ListItemButton as ListItemButton3, ListItemText as ListItemText2, Typography as Typography9 } from "@mui/material";
3820
+ import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
3821
+ var DialogoDeColumnas = ({ open, onClose, columnas, ocultas, alternarColumna }) => {
3822
+ const lista = (titulo, nombres, idDeLista) => /* @__PURE__ */ jsxs16(Box11, { sx: { flex: 1, minWidth: 0 }, children: [
3823
+ /* @__PURE__ */ jsx21(Typography9, { variant: "subtitle2", sx: { mb: 1 }, children: titulo }),
3824
+ /* @__PURE__ */ jsx21(List3, { dense: true, "data-testid": idDeLista, sx: { maxHeight: 360, overflow: "auto", border: 1, borderColor: "divider", borderRadius: 1 }, children: nombres.map((nombre) => /* @__PURE__ */ jsx21(ListItemButton3, { onClick: () => alternarColumna(nombre), children: /* @__PURE__ */ jsx21(ListItemText2, { primary: nombre }) }, nombre)) })
3825
+ ] });
3826
+ return /* @__PURE__ */ jsxs16(Dialog4, { open, onClose, maxWidth: "sm", fullWidth: true, children: [
3827
+ /* @__PURE__ */ jsx21(DialogTitle4, { children: "Ocultar o mostrar columnas" }),
3828
+ /* @__PURE__ */ jsx21(DialogContent4, { children: /* @__PURE__ */ jsxs16(Box11, { sx: { display: "flex", gap: 2, pt: 1 }, children: [
3829
+ lista("Columnas mostradas", columnas.filter((nombre) => !ocultas.has(nombre)), "columnas-mostradas"),
3830
+ lista("Columnas ocultas", columnas.filter((nombre) => ocultas.has(nombre)), "columnas-ocultas")
3831
+ ] }) }),
3832
+ /* @__PURE__ */ jsx21(DialogActions4, { children: /* @__PURE__ */ jsx21(Button7, { onClick: onClose, children: "Cerrar" }) })
3833
+ ] });
3834
+ };
3835
+
3802
3836
  // src/pages/VerticalEditorPage.tsx
3803
3837
  import { useState as useState15, useCallback as useCallback11, useMemo as useMemo9, useRef as useRef6 } from "react";
3804
3838
  import {
3805
- DialogTitle as DialogTitle4,
3806
- DialogContent as DialogContent4,
3807
- DialogActions as DialogActions4,
3808
- Button as Button7,
3839
+ DialogTitle as DialogTitle5,
3840
+ DialogContent as DialogContent5,
3841
+ DialogActions as DialogActions5,
3842
+ Button as Button8,
3809
3843
  Alert,
3810
- Box as Box11,
3844
+ Box as Box12,
3811
3845
  CircularProgress as CircularProgress3,
3812
3846
  IconButton as IconButton5,
3813
- Typography as Typography9
3847
+ Typography as Typography10
3814
3848
  } from "@mui/material";
3815
3849
  import CloseIcon from "@mui/icons-material/Close";
3816
- import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
3850
+ import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
3851
+ var SIN_OCULTAS = /* @__PURE__ */ new Set();
3817
3852
  var VerticalEditorPage = ({
3818
3853
  tableName,
3819
3854
  tableDefinition,
3820
3855
  initialData,
3821
3856
  fixedFields,
3857
+ columnasOcultas = SIN_OCULTAS,
3822
3858
  isNewRow = false,
3823
3859
  onSaveSuccess,
3824
3860
  onClose
@@ -3940,21 +3976,21 @@ var VerticalEditorPage = ({
3940
3976
  tableDefinition,
3941
3977
  onSaveSuccess
3942
3978
  ]);
3943
- return /* @__PURE__ */ jsxs16(Box11, { sx: { p: 2, display: "flex", flexDirection: "column", height: "100%" }, children: [
3944
- /* @__PURE__ */ jsxs16(DialogTitle4, { sx: { px: 0, pt: 0, display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
3945
- /* @__PURE__ */ jsxs16(Typography9, { component: "div", variant: "h6", children: [
3979
+ return /* @__PURE__ */ jsxs17(Box12, { sx: { p: 2, display: "flex", flexDirection: "column", height: "100%" }, children: [
3980
+ /* @__PURE__ */ jsxs17(DialogTitle5, { sx: { px: 0, pt: 0, display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
3981
+ /* @__PURE__ */ jsxs17(Typography10, { component: "div", variant: "h6", children: [
3946
3982
  isNewRow ? "Nuevo Registro" : "Editar Registro",
3947
3983
  " - ",
3948
3984
  tableDefinition.title || tableName
3949
3985
  ] }),
3950
- /* @__PURE__ */ jsx21(IconButton5, { onClick: onClose, size: "small", edge: "end", children: /* @__PURE__ */ jsx21(CloseIcon, {}) })
3986
+ /* @__PURE__ */ jsx22(IconButton5, { onClick: onClose, size: "small", edge: "end", children: /* @__PURE__ */ jsx22(CloseIcon, {}) })
3951
3987
  ] }),
3952
- /* @__PURE__ */ jsxs16(DialogContent4, { dividers: true, sx: { px: 2, flexGrow: 1, py: 1 }, children: [
3953
- globalError && /* @__PURE__ */ jsx21(Alert, { severity: "error", sx: { mb: 2 }, children: globalError }),
3954
- /* @__PURE__ */ jsx21(Box11, { sx: { display: "flex", flexDirection: "column", gap: 0.5 }, children: tableDefinition.fields.map((field) => {
3988
+ /* @__PURE__ */ jsxs17(DialogContent5, { dividers: true, sx: { px: 2, flexGrow: 1, py: 1 }, children: [
3989
+ globalError && /* @__PURE__ */ jsx22(Alert, { severity: "error", sx: { mb: 2 }, children: globalError }),
3990
+ /* @__PURE__ */ jsx22(Box12, { sx: { display: "flex", flexDirection: "column", gap: 0.5 }, children: tableDefinition.fields.filter((field) => campoDibujable(field) && !columnasOcultas.has(field.name)).map((field) => {
3955
3991
  const isFixed = fixedFields?.some((ff) => ff.fieldName === field.name);
3956
3992
  const isMandatory = field.nullable === false || tableDefinition.primaryKey.includes(field.name);
3957
- return /* @__PURE__ */ jsx21(Box11, { sx: { width: "100%", maxWidth: "100%" }, children: /* @__PURE__ */ jsx21(
3993
+ return /* @__PURE__ */ jsx22(Box12, { sx: { width: "100%", maxWidth: "100%" }, children: /* @__PURE__ */ jsx22(
3958
3994
  TypedField,
3959
3995
  {
3960
3996
  fieldDef: field,
@@ -3968,12 +4004,12 @@ var VerticalEditorPage = ({
3968
4004
  ) }, field.name);
3969
4005
  }) })
3970
4006
  ] }),
3971
- /* @__PURE__ */ jsxs16(DialogActions4, { sx: { px: 0, pb: 0, pt: 2, justifyContent: "space-between", alignItems: "center" }, children: [
3972
- /* @__PURE__ */ jsxs16(Box11, { children: [
3973
- isSaving && /* @__PURE__ */ jsx21(CircularProgress3, { size: 20, sx: { ml: 2 } }),
3974
- /* @__PURE__ */ jsx21("span", { style: { marginLeft: 10, fontSize: "0.8rem", color: "#666" }, children: isSaving ? "Guardando..." : "Cambios auto-guardados" })
4007
+ /* @__PURE__ */ jsxs17(DialogActions5, { sx: { px: 0, pb: 0, pt: 2, justifyContent: "space-between", alignItems: "center" }, children: [
4008
+ /* @__PURE__ */ jsxs17(Box12, { children: [
4009
+ isSaving && /* @__PURE__ */ jsx22(CircularProgress3, { size: 20, sx: { ml: 2 } }),
4010
+ /* @__PURE__ */ jsx22("span", { style: { marginLeft: 10, fontSize: "0.8rem", color: "#666" }, children: isSaving ? "Guardando..." : "Cambios auto-guardados" })
3975
4011
  ] }),
3976
- /* @__PURE__ */ jsx21(Button7, { variant: "outlined", onClick: onClose, children: "Cerrar" })
4012
+ /* @__PURE__ */ jsx22(Button8, { variant: "outlined", onClick: onClose, children: "Cerrar" })
3977
4013
  ] })
3978
4014
  ] });
3979
4015
  };
@@ -4050,7 +4086,7 @@ var baseDelBundler = import.meta.env?.BASE_URL ?? "/";
4050
4086
  var rutaBase = baseDelBundler.replace(/\/+$/, "");
4051
4087
 
4052
4088
  // src/components/grid/GenericDataGrid.tsx
4053
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
4089
+ import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
4054
4090
  var SUMMARY_ROW_HEIGHT = 35;
4055
4091
  var FILTER_ROW_HEIGHT = 35;
4056
4092
  var HEADER_ROW_HEIGHT = 30;
@@ -4082,8 +4118,8 @@ var StaticAncestorGrid = ({ ancestor, index, fieldsToHide }) => {
4082
4118
  name: field.label || cambiarGuionesBajosPorEspacios(field.name),
4083
4119
  width: 150,
4084
4120
  editable: false,
4085
- renderHeaderCell: () => /* @__PURE__ */ jsx22(Box12, { sx: { p: 0.5, height: "100%", display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx22(
4086
- Typography10,
4121
+ renderHeaderCell: () => /* @__PURE__ */ jsx23(Box13, { sx: { p: 0.5, height: "100%", display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx23(
4122
+ Typography11,
4087
4123
  {
4088
4124
  variant: "caption",
4089
4125
  sx: {
@@ -4094,11 +4130,11 @@ var StaticAncestorGrid = ({ ancestor, index, fieldsToHide }) => {
4094
4130
  children: field.label || cambiarGuionesBajosPorEspacios(field.name)
4095
4131
  }
4096
4132
  ) }),
4097
- renderCell: (props) => /* @__PURE__ */ jsx22(Box12, { sx: { px: 1, height: "100%", display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx22(Typography10, { variant: "body2", sx: { fontSize: "0.875rem" }, noWrap: true, children: String(props.row[field.name] ?? "") }) })
4133
+ renderCell: (props) => /* @__PURE__ */ jsx23(Box13, { sx: { px: 1, height: "100%", display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx23(Typography11, { variant: "body2", sx: { fontSize: "0.875rem" }, noWrap: true, children: String(props.row[field.name] ?? "") }) })
4098
4134
  };
4099
4135
  });
4100
4136
  }, [tableDefinition, fieldsToHide]);
4101
- return /* @__PURE__ */ jsxs17(Box12, { sx: {
4137
+ return /* @__PURE__ */ jsxs18(Box13, { sx: {
4102
4138
  mb: 1.5,
4103
4139
  ml: index * 4,
4104
4140
  // El primer ancestro (index 0) no tiene margen, los siguientes sí
@@ -4109,7 +4145,7 @@ var StaticAncestorGrid = ({ ancestor, index, fieldsToHide }) => {
4109
4145
  boxShadow: theme.shadows[1],
4110
4146
  bgcolor: "background.paper"
4111
4147
  }, children: [
4112
- /* @__PURE__ */ jsx22(Box12, { sx: {
4148
+ /* @__PURE__ */ jsx23(Box13, { sx: {
4113
4149
  bgcolor: "primary.main",
4114
4150
  color: "primary.contrastText",
4115
4151
  px: 1.5,
@@ -4120,8 +4156,8 @@ var StaticAncestorGrid = ({ ancestor, index, fieldsToHide }) => {
4120
4156
  alignItems: "center",
4121
4157
  fontWeight: "bold",
4122
4158
  gap: 1
4123
- }, children: /* @__PURE__ */ jsx22(Typography10, { variant: "subtitle2", component: "div", children: cambiarGuionesBajosPorEspacios(ancestor.tableName) }) }),
4124
- /* @__PURE__ */ jsx22(
4159
+ }, children: /* @__PURE__ */ jsx23(Typography11, { variant: "subtitle2", component: "div", children: cambiarGuionesBajosPorEspacios(ancestor.tableName) }) }),
4160
+ /* @__PURE__ */ jsx23(
4125
4161
  DataGrid,
4126
4162
  {
4127
4163
  className: "rdg-light",
@@ -4171,6 +4207,12 @@ var GenericDataGrid = ({
4171
4207
  const [cargandoInicial, setCargandoInicial] = useState16(!guardada);
4172
4208
  const [errorDeCarga, setErrorDeCarga] = useState16(null);
4173
4209
  const [anchosCalculados, setAnchosCalculados] = useState16(() => guardada?.anchosCalculados ?? /* @__PURE__ */ new Map());
4210
+ const [columnasOcultas, setColumnasOcultas] = useState16(() => guardada?.columnasOcultas ?? []);
4211
+ const [openDialogoDeColumnas, setOpenDialogoDeColumnas] = useState16(false);
4212
+ const conjuntoDeOcultas = useMemo10(() => new Set(columnasOcultas), [columnasOcultas]);
4213
+ const ocultarColumna = useCallback12((columna) => setColumnasOcultas((anteriores) => anteriores.includes(columna) ? anteriores : [...anteriores, columna]), []);
4214
+ const alternarColumna = useCallback12((columna) => setColumnasOcultas((anteriores) => anteriores.includes(columna) ? anteriores.filter((oculta) => oculta !== columna) : [...anteriores, columna]), []);
4215
+ const abrirDialogoDeColumnas = useCallback12(() => setOpenDialogoDeColumnas(true), []);
4174
4216
  const [detallesAbiertos, setDetallesAbiertos] = useState16(guardada?.detallesAbiertos ?? []);
4175
4217
  const [altosDetalle, setAltosDetalle] = useState16(() => guardada?.altosDetalle ?? /* @__PURE__ */ new Map());
4176
4218
  const [anchosDetalle, setAnchosDetalle] = useState16(() => /* @__PURE__ */ new Map());
@@ -4365,6 +4407,7 @@ var GenericDataGrid = ({
4365
4407
  setTableDefinition(definition);
4366
4408
  setSortColumns(getInitialSortColumns(definition));
4367
4409
  setAnchosCalculados(calcularAnchosDeColumnas(definition, data));
4410
+ setColumnasOcultas(columnasOcultasIniciales(definition));
4368
4411
  setTableData(data);
4369
4412
  const filasDeFiltros = parametros.filterColumns ?? aFiltrosIniciales(definition.filterColumns);
4370
4413
  if (filasDeFiltros.length > 1) console.warn(`'${tableName}': varias filas de filtros (alternativas) todav\xEDa no est\xE1n soportadas; se aplica la primera`);
@@ -4387,8 +4430,8 @@ var GenericDataGrid = ({
4387
4430
  }, [tableName, claveFixedFields, fixedFields, claveParametros, parametros, showError, callApi, getInitialSortColumns, setSortColumns, aplicarFiltrosIniciales, guardada]);
4388
4431
  useEffect6(() => {
4389
4432
  if (!claveCache || !tableDefinition || cargandoInicial) return;
4390
- cache.set(claveCache, { tableDefinition, tableData, anchosCalculados, sortColumns, detallesAbiertos, altosDetalle });
4391
- }, [cache, claveCache, tableDefinition, tableData, anchosCalculados, sortColumns, detallesAbiertos, altosDetalle, cargandoInicial]);
4433
+ cache.set(claveCache, { tableDefinition, tableData, anchosCalculados, columnasOcultas, sortColumns, detallesAbiertos, altosDetalle });
4434
+ }, [cache, claveCache, tableDefinition, tableData, anchosCalculados, columnasOcultas, sortColumns, detallesAbiertos, altosDetalle, cargandoInicial]);
4392
4435
  useEffect6(() => {
4393
4436
  let timer = null;
4394
4437
  const desuscribir = estadoGrilla.suscribir(() => {
@@ -4427,7 +4470,8 @@ var GenericDataGrid = ({
4427
4470
  callApi,
4428
4471
  resetSorting: tableDefinition ? resetSortingDeLaTabla : void 0,
4429
4472
  triggerImport: abrirImportacion,
4430
- triggerExport: abrirExportacion
4473
+ triggerExport: abrirExportacion,
4474
+ abrirColumnas: abrirDialogoDeColumnas
4431
4475
  });
4432
4476
  const abrirOpcionesDeGrilla = useCallback12((anchorEl) => {
4433
4477
  setDataGridOptionsAnchorEl(anchorEl);
@@ -4441,6 +4485,8 @@ var GenericDataGrid = ({
4441
4485
  tableDefinition,
4442
4486
  anchosCalculados,
4443
4487
  fixedFields,
4488
+ columnasOcultas: conjuntoDeOcultas,
4489
+ ocultarColumna,
4444
4490
  primaryKey,
4445
4491
  setTableData,
4446
4492
  handleKeyPressInEditor,
@@ -4514,13 +4560,13 @@ var GenericDataGrid = ({
4514
4560
  }, [altoMaximoDetalleEfectivo]);
4515
4561
  const renderDetalle = useCallback12((fila) => {
4516
4562
  const { detailTable } = fila;
4517
- return /* @__PURE__ */ jsx22(
4563
+ return /* @__PURE__ */ jsx23(
4518
4564
  "div",
4519
4565
  {
4520
4566
  className: "fpr-detalle",
4521
4567
  style: { maxWidth: anchoVisible ? anchoVisible - 2 : void 0 },
4522
4568
  onKeyDown: (e) => e.stopPropagation(),
4523
- children: detailTable.table ? /* @__PURE__ */ jsx22(
4569
+ children: detailTable.table ? /* @__PURE__ */ jsx23(
4524
4570
  GenericDataGrid,
4525
4571
  {
4526
4572
  tableName: detailTable.table,
@@ -4533,7 +4579,7 @@ var GenericDataGrid = ({
4533
4579
  onOpenDetail,
4534
4580
  ancestors: tableDefinition ? [...ancestors, { tableName: tableDefinition.name, row: fila.filaPadre, tableDefinition, fixedFields: fila.fixedFields }] : ancestors
4535
4581
  }
4536
- ) : detailTable.wScreen ? /* @__PURE__ */ jsx22(
4582
+ ) : detailTable.wScreen ? /* @__PURE__ */ jsx23(
4537
4583
  DetalleWScreen,
4538
4584
  {
4539
4585
  fila,
@@ -4541,7 +4587,7 @@ var GenericDataGrid = ({
4541
4587
  onAlto: (alto) => cambiarAltoDetalle(fila.clave, alto),
4542
4588
  onAncho: (ancho) => cambiarAnchoDetalle(fila.clave, ancho)
4543
4589
  }
4544
- ) : /* @__PURE__ */ jsxs17(Alert2, { severity: "warning", children: [
4590
+ ) : /* @__PURE__ */ jsxs18(Alert2, { severity: "warning", children: [
4545
4591
  "El detalle '",
4546
4592
  detailTable.abr,
4547
4593
  "' no tiene ni tabla ni wScreen."
@@ -4587,19 +4633,19 @@ var GenericDataGrid = ({
4587
4633
  };
4588
4634
  const fallBackMessage = getFallBackMessage();
4589
4635
  if (cargandoInicial) {
4590
- return /* @__PURE__ */ jsxs17(Box12, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "200px", children: [
4591
- /* @__PURE__ */ jsx22(CircularProgress4, {}),
4592
- /* @__PURE__ */ jsx22(Typography10, { variant: "h6", sx: { ml: 2 }, children: "Cargando tabla..." })
4636
+ return /* @__PURE__ */ jsxs18(Box13, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "200px", children: [
4637
+ /* @__PURE__ */ jsx23(CircularProgress4, {}),
4638
+ /* @__PURE__ */ jsx23(Typography11, { variant: "h6", sx: { ml: 2 }, children: "Cargando tabla..." })
4593
4639
  ] });
4594
4640
  }
4595
4641
  if (errorDeCarga) {
4596
- return /* @__PURE__ */ jsx22(Box12, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "200px", children: /* @__PURE__ */ jsx22(Alert2, { severity: "error", children: errorDeCarga }) });
4642
+ return /* @__PURE__ */ jsx23(Box13, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "200px", children: /* @__PURE__ */ jsx23(Alert2, { severity: "error", children: errorDeCarga }) });
4597
4643
  }
4598
4644
  if (!tableDefinition) {
4599
- return /* @__PURE__ */ jsx22(Box12, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "200px", children: /* @__PURE__ */ jsx22(Alert2, { severity: "warning", children: "No se pudo cargar la definici\xF3n de la tabla." }) });
4645
+ return /* @__PURE__ */ jsx23(Box13, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "200px", children: /* @__PURE__ */ jsx23(Alert2, { severity: "warning", children: "No se pudo cargar la definici\xF3n de la tabla." }) });
4600
4646
  }
4601
- return /* @__PURE__ */ jsx22(CacheGrillasContext.Provider, { value: cache, children: /* @__PURE__ */ jsxs17(Box12, { sx: { pt: anidada ? 0 : 2, display: "flex", flexDirection: "column", height: "100%", boxSizing: "border-box", width: anchoContenido ?? void 0, maxWidth: "100%" }, children: [
4602
- !anidada && ancestors.length > 0 && /* @__PURE__ */ jsx22(Box12, { sx: { px: 2, pt: 0, pb: 1, display: "flex", flexDirection: "column" }, children: ancestors.map((ancestor, index) => /* @__PURE__ */ jsx22(
4647
+ return /* @__PURE__ */ jsx23(CacheGrillasContext.Provider, { value: cache, children: /* @__PURE__ */ jsxs18(Box13, { sx: { pt: anidada ? 0 : 2, display: "flex", flexDirection: "column", height: "100%", boxSizing: "border-box", width: anchoContenido ?? void 0, maxWidth: "100%" }, children: [
4648
+ !anidada && ancestors.length > 0 && /* @__PURE__ */ jsx23(Box13, { sx: { px: 2, pt: 0, pb: 1, display: "flex", flexDirection: "column" }, children: ancestors.map((ancestor, index) => /* @__PURE__ */ jsx23(
4603
4649
  StaticAncestorGrid,
4604
4650
  {
4605
4651
  ancestor,
@@ -4608,8 +4654,8 @@ var GenericDataGrid = ({
4608
4654
  },
4609
4655
  index
4610
4656
  )) }),
4611
- /* @__PURE__ */ jsxs17(
4612
- Box12,
4657
+ /* @__PURE__ */ jsxs18(
4658
+ Box13,
4613
4659
  {
4614
4660
  sx: {
4615
4661
  backgroundColor: theme.palette.primary.main,
@@ -4631,17 +4677,17 @@ var GenericDataGrid = ({
4631
4677
  gap: 1
4632
4678
  },
4633
4679
  children: [
4634
- /* @__PURE__ */ jsxs17(Typography10, { variant: "subtitle2", component: "div", children: [
4680
+ /* @__PURE__ */ jsxs18(Typography11, { variant: "subtitle2", component: "div", children: [
4635
4681
  titulo ?? cambiarGuionesBajosPorEspacios(tableDefinition.title || tableDefinition.name),
4636
4682
  " - ",
4637
4683
  filteredRows.length === tableData.length ? `${tableData.length} registros` : `${filteredRows.length} (F)`
4638
4684
  ] }),
4639
- loading && /* @__PURE__ */ jsx22(CircularProgress4, { size: 14, color: "inherit" })
4685
+ loading && /* @__PURE__ */ jsx23(CircularProgress4, { size: 14, color: "inherit" })
4640
4686
  ]
4641
4687
  }
4642
4688
  ),
4643
- /* @__PURE__ */ jsxs17(
4644
- Box12,
4689
+ /* @__PURE__ */ jsxs18(
4690
+ Box13,
4645
4691
  {
4646
4692
  sx: {
4647
4693
  // Una grilla anidada se acota con px (el alto que le dio la de arriba, o el de una wScreen): una wScreen
@@ -4659,7 +4705,7 @@ var GenericDataGrid = ({
4659
4705
  pb: anidada ? 0 : 3
4660
4706
  },
4661
4707
  children: [
4662
- /* @__PURE__ */ jsx22(EstadoGrillaContext.Provider, { value: estadoGrilla, children: /* @__PURE__ */ jsx22(VistaGrillaContext.Provider, { value: vistaGrilla, children: /* @__PURE__ */ jsx22(DetallesGrillaContext.Provider, { value: detallesGrilla, children: /* @__PURE__ */ jsx22(
4708
+ /* @__PURE__ */ jsx23(EstadoGrillaContext.Provider, { value: estadoGrilla, children: /* @__PURE__ */ jsx23(VistaGrillaContext.Provider, { value: vistaGrilla, children: /* @__PURE__ */ jsx23(DetallesGrillaContext.Provider, { value: detallesGrilla, children: /* @__PURE__ */ jsx23(
4663
4709
  DataGrid,
4664
4710
  {
4665
4711
  className: "rdg-light",
@@ -4689,8 +4735,8 @@ var GenericDataGrid = ({
4689
4735
  onCellKeyDown: handleCellKeyDown
4690
4736
  }
4691
4737
  ) }) }) }),
4692
- fallBackMessage && /* @__PURE__ */ jsx22(
4693
- Box12,
4738
+ fallBackMessage && /* @__PURE__ */ jsx23(
4739
+ Box13,
4694
4740
  {
4695
4741
  sx: {
4696
4742
  position: "absolute",
@@ -4706,24 +4752,35 @@ var GenericDataGrid = ({
4706
4752
  zIndex: tableData.length === 0 ? 10 : 1
4707
4753
  // Mantenemos el zIndex superior para el estado vacío total
4708
4754
  },
4709
- children: /* @__PURE__ */ jsx22(Typography10, { variant: "body2", color: "textSecondary", children: fallBackMessage })
4755
+ children: /* @__PURE__ */ jsx23(Typography11, { variant: "body2", color: "textSecondary", children: fallBackMessage })
4710
4756
  }
4711
4757
  )
4712
4758
  ]
4713
4759
  }
4714
4760
  ),
4715
- /* @__PURE__ */ jsx22(
4761
+ /* @__PURE__ */ jsx23(
4716
4762
  ExportDialog,
4717
4763
  {
4718
4764
  open: openExportDialog,
4719
4765
  onClose: () => setOpenExportDialog(false),
4720
4766
  tableDefinition,
4767
+ columnasOcultas: conjuntoDeOcultas,
4721
4768
  tableData,
4722
4769
  filteredRows,
4723
4770
  username: usuario || "anonymous"
4724
4771
  }
4725
4772
  ),
4726
- /* @__PURE__ */ jsx22(
4773
+ /* @__PURE__ */ jsx23(
4774
+ DialogoDeColumnas,
4775
+ {
4776
+ open: openDialogoDeColumnas,
4777
+ onClose: () => setOpenDialogoDeColumnas(false),
4778
+ columnas: (tableDefinition?.fields ?? []).filter(campoDibujable).map((field) => field.name).filter((nombre) => !columnaOcultaPorFixedField(fixedFields, nombre)),
4779
+ ocultas: conjuntoDeOcultas,
4780
+ alternarColumna
4781
+ }
4782
+ ),
4783
+ /* @__PURE__ */ jsx23(
4727
4784
  ConfirmDialog,
4728
4785
  {
4729
4786
  open: openConfirmDialog,
@@ -4732,7 +4789,7 @@ var GenericDataGrid = ({
4732
4789
  message: rowToDelete && rowToDelete[NEW_ROW_INDICATOR] ? `\xBFEst\xE1s seguro de que quieres eliminar esta nueva fila (ID: ${getPrimaryKeyValues(rowToDelete, primaryKey)}) localmente?` : rowToDelete ? `\xBFEst\xE1s seguro de que quieres eliminar la fila con ID: ${getPrimaryKeyValues(rowToDelete, primaryKey)} de la base de datos? Esta acci\xF3n es irreversible.` : "\xBFEst\xE1s seguro de que quieres eliminar este registro? Esta acci\xF3n es irreversible."
4733
4790
  }
4734
4791
  ),
4735
- /* @__PURE__ */ jsx22(
4792
+ /* @__PURE__ */ jsx23(
4736
4793
  DataGridOptionsDialog,
4737
4794
  {
4738
4795
  open: openDataGridOptions,
@@ -4741,7 +4798,7 @@ var GenericDataGrid = ({
4741
4798
  anchorEl: dataGridOptionsAnchorEl
4742
4799
  }
4743
4800
  ),
4744
- /* @__PURE__ */ jsx22(
4801
+ /* @__PURE__ */ jsx23(
4745
4802
  ImportDialog,
4746
4803
  {
4747
4804
  open: openImportDialog,
@@ -4750,20 +4807,21 @@ var GenericDataGrid = ({
4750
4807
  loading
4751
4808
  }
4752
4809
  ),
4753
- /* @__PURE__ */ jsx22(
4754
- Dialog4,
4810
+ /* @__PURE__ */ jsx23(
4811
+ Dialog5,
4755
4812
  {
4756
4813
  open: openVerticalEditDialog,
4757
4814
  onClose: () => setOpenVerticalEditDialog(false),
4758
4815
  maxWidth: "sm",
4759
4816
  fullWidth: true,
4760
- children: rowToEditVertical && /* @__PURE__ */ jsx22(
4817
+ children: rowToEditVertical && /* @__PURE__ */ jsx23(
4761
4818
  VerticalEditorPage,
4762
4819
  {
4763
4820
  tableName,
4764
4821
  tableDefinition,
4765
4822
  initialData: rowToEditVertical,
4766
4823
  fixedFields,
4824
+ columnasOcultas: conjuntoDeOcultas,
4767
4825
  isNewRow: !!rowToEditVertical[NEW_ROW_INDICATOR],
4768
4826
  onSaveSuccess: (savedRow, isNewItem) => {
4769
4827
  setRowToEditVertical(savedRow);
@@ -4802,7 +4860,7 @@ var GenericDataGrid = ({
4802
4860
  )
4803
4861
  }
4804
4862
  ),
4805
- contenidoDeCelda && /* @__PURE__ */ jsx22(VentanaDeTexto, { anclaje: contenidoDeCelda.anclaje, texto: contenidoDeCelda.texto, editable: false, onAceptar: cerrarContenidoDeCelda, onCerrar: cerrarContenidoDeCelda })
4863
+ contenidoDeCelda && /* @__PURE__ */ jsx23(VentanaDeTexto, { anclaje: contenidoDeCelda.anclaje, texto: contenidoDeCelda.texto, editable: false, onAceptar: cerrarContenidoDeCelda, onCerrar: cerrarContenidoDeCelda })
4806
4864
  ] }) });
4807
4865
  };
4808
4866
  var GenericDataGrid_default = GenericDataGrid;
@@ -4815,11 +4873,11 @@ import { BrowserRouter, Routes, Route, useLocation as useLocation8, Navigate as
4815
4873
  import { useEffect as useEffect9 } from "react";
4816
4874
  import { Outlet } from "react-router-dom";
4817
4875
  import {
4818
- Box as Box14,
4876
+ Box as Box15,
4819
4877
  AppBar,
4820
4878
  Toolbar,
4821
- Typography as Typography12,
4822
- Button as Button8,
4879
+ Typography as Typography13,
4880
+ Button as Button9,
4823
4881
  Drawer,
4824
4882
  CssBaseline,
4825
4883
  IconButton as IconButton6,
@@ -4831,7 +4889,7 @@ import {
4831
4889
  import { createContext as createContext4, useContext as useContext5, useState as useState17, useEffect as useEffect7, useCallback as useCallback13, useMemo as useMemo11, useRef as useRef8 } from "react";
4832
4890
  import { useLocation, useNavigate } from "react-router-dom";
4833
4891
  import { useSelector as useSelector2, useDispatch as useDispatch2 } from "react-redux";
4834
- import { jsx as jsx23 } from "react/jsx-runtime";
4892
+ import { jsx as jsx24 } from "react/jsx-runtime";
4835
4893
  var AuthContext = createContext4(void 0);
4836
4894
  var useApp = () => {
4837
4895
  const context = useContext5(AuthContext);
@@ -4925,7 +4983,7 @@ var AppProvider = ({ children, publicPaths = [] }) => {
4925
4983
  setShowSessionExpiredMessage,
4926
4984
  handleExpiredSessionRedirect
4927
4985
  ]);
4928
- return /* @__PURE__ */ jsx23(AuthContext.Provider, { value: authContextValue, children });
4986
+ return /* @__PURE__ */ jsx24(AuthContext.Provider, { value: authContextValue, children });
4929
4987
  };
4930
4988
 
4931
4989
  // src/components/MainLayout.tsx
@@ -4935,7 +4993,7 @@ import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
4935
4993
 
4936
4994
  // src/components/SideMenu.tsx
4937
4995
  import React19, { useEffect as useEffect8 } from "react";
4938
- import { List as List3, ListItem, ListItemButton as ListItemButton3, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2, Divider as Divider2, Box as Box13, Typography as Typography11, Collapse } from "@mui/material";
4996
+ import { List as List4, ListItem, ListItemButton as ListItemButton4, ListItemIcon as ListItemIcon2, ListItemText as ListItemText3, Divider as Divider2, Box as Box14, Typography as Typography12, Collapse } from "@mui/material";
4939
4997
  import ExpandLess from "@mui/icons-material/ExpandLess";
4940
4998
  import ExpandMore from "@mui/icons-material/ExpandMore";
4941
4999
  import TableChartIcon from "@mui/icons-material/TableChart";
@@ -4949,12 +5007,43 @@ import { useNavigate as useNavigate2, useLocation as useLocation2 } from "react-
4949
5007
  import { blue, orange, teal, red, grey } from "@mui/material/colors";
4950
5008
 
4951
5009
  // src/utils/menuInicial.ts
4952
- function rutaDeItemDeMenu(item) {
5010
+ function rutaDeTablaDeMenu(camino) {
5011
+ return `/menu/${camino.map(encodeURIComponent).join("/")}`;
5012
+ }
5013
+ function gruposDeItem(menu, item) {
5014
+ for (const candidato of menu) {
5015
+ if (candidato === item) return [];
5016
+ if (candidato.menuType === "menu") {
5017
+ const grupos = gruposDeItem(candidato.menuContent, item);
5018
+ if (grupos) return [candidato.name, ...grupos];
5019
+ }
5020
+ }
5021
+ return void 0;
5022
+ }
5023
+ function itemDeCamino(menu, camino) {
5024
+ const [nombre, ...resto] = camino;
5025
+ const item = menu.find((candidato) => candidato.name === nombre && candidato.menuType === (resto.length ? "menu" : "table"));
5026
+ return item && resto.length ? itemDeCamino(item.menuContent, resto) : item;
5027
+ }
5028
+ function primeraTablaConNombre(menu, nombre) {
5029
+ for (const item of menu) {
5030
+ if (item.menuType === "table" && item.name === nombre) return item;
5031
+ const encontrado = item.menuType === "menu" ? primeraTablaConNombre(item.menuContent, nombre) : void 0;
5032
+ if (encontrado) return encontrado;
5033
+ }
5034
+ return void 0;
5035
+ }
5036
+ function itemDeRuta(menu, camino) {
5037
+ if (camino.length === 0) return void 0;
5038
+ const item = itemDeCamino(menu, camino) ?? primeraTablaConNombre(menu, camino[camino.length - 1]);
5039
+ return item;
5040
+ }
5041
+ function rutaDeItemDeMenu(item, grupos = []) {
4953
5042
  if (item.menuType === "table") {
4954
5043
  const consulta = new URLSearchParams();
4955
5044
  if (item.td) consulta.append("td", JSON.stringify(item.td));
4956
5045
  if (item.fc) consulta.append("fc", JSON.stringify(item.fc));
4957
- return `/menu/${item.name}${consulta.size ? `?${consulta.toString()}` : ""}`;
5046
+ return `${rutaDeTablaDeMenu([...grupos, item.name])}${consulta.size ? `?${consulta.toString()}` : ""}`;
4958
5047
  }
4959
5048
  if (item.menuType === "proc") return `/procedures/${item.name}`;
4960
5049
  if (wScreens[item.menuType] !== void 0) return `/wScreens/${item.menuType}`;
@@ -4968,8 +5057,8 @@ function itemInicial(menu) {
4968
5057
  }
4969
5058
 
4970
5059
  // src/components/SideMenu.tsx
4971
- import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
4972
- var MenuListItem = ({ item, level, onMenuItemClick }) => {
5060
+ import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
5061
+ var MenuListItem = ({ item, level, grupos = [], onMenuItemClick }) => {
4973
5062
  const navigate = useNavigate2();
4974
5063
  const location = useLocation2();
4975
5064
  const open = useSubMenuOpenState(item.name);
@@ -4978,7 +5067,7 @@ var MenuListItem = ({ item, level, onMenuItemClick }) => {
4978
5067
  if (item.menuType === "menu") {
4979
5068
  dispatch(toggleSubMenu(item.name));
4980
5069
  } else {
4981
- navigate(rutaDeItemDeMenu(item));
5070
+ navigate(rutaDeItemDeMenu(item, grupos));
4982
5071
  if (onMenuItemClick) {
4983
5072
  onMenuItemClick();
4984
5073
  }
@@ -4987,17 +5076,17 @@ var MenuListItem = ({ item, level, onMenuItemClick }) => {
4987
5076
  const getIcon = (item2) => {
4988
5077
  switch (item2.menuType) {
4989
5078
  case "table":
4990
- return /* @__PURE__ */ jsx24(TableChartIcon, { sx: { color: blue[700] } });
5079
+ return /* @__PURE__ */ jsx25(TableChartIcon, { sx: { color: blue[700] } });
4991
5080
  case "proc":
4992
- return /* @__PURE__ */ jsx24(DnsIcon, { sx: { color: teal[700] } });
5081
+ return /* @__PURE__ */ jsx25(DnsIcon, { sx: { color: teal[700] } });
4993
5082
  case "menu":
4994
- return /* @__PURE__ */ jsx24(FolderIcon, { sx: { color: orange[800] } });
5083
+ return /* @__PURE__ */ jsx25(FolderIcon, { sx: { color: orange[800] } });
4995
5084
  default:
4996
5085
  const WScreenComponent = wScreens[item2.menuType];
4997
5086
  if (WScreenComponent !== void 0) {
4998
- return /* @__PURE__ */ jsx24(DesktopWindowsIcon, { sx: { color: grey[700] } });
5087
+ return /* @__PURE__ */ jsx25(DesktopWindowsIcon, { sx: { color: grey[700] } });
4999
5088
  }
5000
- return /* @__PURE__ */ jsx24(WarningAmberIcon3, { sx: { color: red[500] } });
5089
+ return /* @__PURE__ */ jsx25(WarningAmberIcon3, { sx: { color: red[500] } });
5001
5090
  }
5002
5091
  };
5003
5092
  const currentPath = location.pathname;
@@ -5005,7 +5094,7 @@ var MenuListItem = ({ item, level, onMenuItemClick }) => {
5005
5094
  const pathParts = currentPath.split("/");
5006
5095
  const urlTableName = pathParts[1] === "table" ? pathParts[2] : null;
5007
5096
  if (item.menuType === "table") {
5008
- isSelected = currentPath === `/menu/${item.name}` || urlTableName === (item.table || item.name);
5097
+ isSelected = currentPath === rutaDeTablaDeMenu([...grupos, item.name]) || urlTableName === (item.table || item.name);
5009
5098
  } else if (item.menuType === "proc") {
5010
5099
  isSelected = currentPath === `/procedures/${item.name}`;
5011
5100
  } else if (item.menuType !== "menu") {
@@ -5017,25 +5106,26 @@ var MenuListItem = ({ item, level, onMenuItemClick }) => {
5017
5106
  itemRef.current.scrollIntoView({ behavior: "smooth", block: "nearest" });
5018
5107
  }
5019
5108
  }, [isSelected]);
5020
- return /* @__PURE__ */ jsxs18("div", { ref: itemRef, children: [
5021
- /* @__PURE__ */ jsxs18(
5022
- ListItemButton3,
5109
+ return /* @__PURE__ */ jsxs19("div", { ref: itemRef, children: [
5110
+ /* @__PURE__ */ jsxs19(
5111
+ ListItemButton4,
5023
5112
  {
5024
5113
  onClick: handleClick,
5025
5114
  sx: { pl: level * 2 },
5026
5115
  selected: isSelected,
5027
5116
  children: [
5028
- /* @__PURE__ */ jsx24(ListItemIcon2, { sx: { minWidth: "38px" }, children: getIcon(item) }),
5029
- /* @__PURE__ */ jsx24(ListItemText2, { primary: item.label || item.name }),
5030
- item.menuType === "menu" ? open ? /* @__PURE__ */ jsx24(ExpandLess, {}) : /* @__PURE__ */ jsx24(ExpandMore, {}) : null
5117
+ /* @__PURE__ */ jsx25(ListItemIcon2, { sx: { minWidth: "38px" }, children: getIcon(item) }),
5118
+ /* @__PURE__ */ jsx25(ListItemText3, { primary: item.label || item.name }),
5119
+ item.menuType === "menu" ? open ? /* @__PURE__ */ jsx25(ExpandLess, {}) : /* @__PURE__ */ jsx25(ExpandMore, {}) : null
5031
5120
  ]
5032
5121
  }
5033
5122
  ),
5034
- item.menuType === "menu" && /* @__PURE__ */ jsx24(Collapse, { in: open, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsx24(List3, { component: "div", disablePadding: true, children: item.menuContent.map((subItem) => /* @__PURE__ */ jsx24(
5123
+ item.menuType === "menu" && /* @__PURE__ */ jsx25(Collapse, { in: open, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsx25(List4, { component: "div", disablePadding: true, children: item.menuContent.map((subItem) => /* @__PURE__ */ jsx25(
5035
5124
  MenuListItem,
5036
5125
  {
5037
5126
  item: subItem,
5038
5127
  level: level + 1,
5128
+ grupos: [...grupos, item.name],
5039
5129
  onMenuItemClick
5040
5130
  },
5041
5131
  subItem.name
@@ -5055,7 +5145,7 @@ var SideMenu = ({ onMenuItemClick }) => {
5055
5145
  dispatch(setAllSubMenusOpen(!isMostlyOpen));
5056
5146
  };
5057
5147
  if (!clientContext || !clientContext.menu) {
5058
- return /* @__PURE__ */ jsx24(Box13, { sx: { p: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx24(Typography11, { variant: "body2", color: "text.secondary", children: "Cargando men\xFA..." }) });
5148
+ return /* @__PURE__ */ jsx25(Box14, { sx: { p: 2, textAlign: "center" }, children: /* @__PURE__ */ jsx25(Typography12, { variant: "body2", color: "text.secondary", children: "Cargando men\xFA..." }) });
5059
5149
  }
5060
5150
  useEffect8(() => {
5061
5151
  if (!clientContext?.menu) return;
@@ -5065,7 +5155,7 @@ var SideMenu = ({ onMenuItemClick }) => {
5065
5155
  for (const item of items) {
5066
5156
  let matches = false;
5067
5157
  if (item.menuType === "table") {
5068
- matches = targetPath === `/menu/${item.name}` || urlTableName === (item.table || item.name);
5158
+ matches = targetPath === rutaDeTablaDeMenu([...parentNames, item.name]) || urlTableName === (item.table || item.name);
5069
5159
  } else if (item.menuType === "proc") {
5070
5160
  matches = targetPath === `/procedures/${item.name}`;
5071
5161
  } else if (item.menuType !== "menu") {
@@ -5086,13 +5176,13 @@ var SideMenu = ({ onMenuItemClick }) => {
5086
5176
  };
5087
5177
  expandParents(clientContext.menu, location.pathname);
5088
5178
  }, [location.pathname, clientContext, dispatch]);
5089
- return /* @__PURE__ */ jsxs18(Box13, { sx: { width: "100%", flexShrink: 0 }, children: [
5090
- clientContext.menu.some((item) => item.menuType === "menu") && /* @__PURE__ */ jsx24(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs18(ListItemButton3, { onClick: handleToggleAllSubMenus, children: [
5091
- /* @__PURE__ */ jsx24(ListItemIcon2, { sx: { minWidth: "38px" }, children: isMostlyOpen ? /* @__PURE__ */ jsx24(UnfoldLessIcon, {}) : /* @__PURE__ */ jsx24(UnfoldMoreIcon, {}) }),
5092
- /* @__PURE__ */ jsx24(ListItemText2, { primary: isMostlyOpen ? "colapsar " : "expandir" })
5179
+ return /* @__PURE__ */ jsxs19(Box14, { sx: { width: "100%", flexShrink: 0 }, children: [
5180
+ clientContext.menu.some((item) => item.menuType === "menu") && /* @__PURE__ */ jsx25(ListItem, { disablePadding: true, children: /* @__PURE__ */ jsxs19(ListItemButton4, { onClick: handleToggleAllSubMenus, children: [
5181
+ /* @__PURE__ */ jsx25(ListItemIcon2, { sx: { minWidth: "38px" }, children: isMostlyOpen ? /* @__PURE__ */ jsx25(UnfoldLessIcon, {}) : /* @__PURE__ */ jsx25(UnfoldMoreIcon, {}) }),
5182
+ /* @__PURE__ */ jsx25(ListItemText3, { primary: isMostlyOpen ? "colapsar " : "expandir" })
5093
5183
  ] }) }),
5094
- /* @__PURE__ */ jsx24(Divider2, {}),
5095
- /* @__PURE__ */ jsx24(List3, { children: clientContext.menu.map((menuItem) => /* @__PURE__ */ jsx24(
5184
+ /* @__PURE__ */ jsx25(Divider2, {}),
5185
+ /* @__PURE__ */ jsx25(List4, { children: clientContext.menu.map((menuItem) => /* @__PURE__ */ jsx25(
5096
5186
  MenuListItem,
5097
5187
  {
5098
5188
  item: menuItem,
@@ -5134,7 +5224,7 @@ var useLogout = () => {
5134
5224
  var useLogout_default = useLogout;
5135
5225
 
5136
5226
  // src/components/MainLayout.tsx
5137
- import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
5227
+ import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
5138
5228
  var drawerWidth = 240;
5139
5229
  var MainLayout = () => {
5140
5230
  const { clientContext } = useApp();
@@ -5157,11 +5247,11 @@ var MainLayout = () => {
5157
5247
  }
5158
5248
  };
5159
5249
  if (!clientContext) {
5160
- return /* @__PURE__ */ jsx25(Box14, { sx: { display: "flex", justifyContent: "center", alignItems: "center", height: "100vh" }, children: /* @__PURE__ */ jsx25(Typography12, { children: "Cargando dise\xF1o de la aplicaci\xF3n..." }) });
5250
+ return /* @__PURE__ */ jsx26(Box15, { sx: { display: "flex", justifyContent: "center", alignItems: "center", height: "100vh" }, children: /* @__PURE__ */ jsx26(Typography13, { children: "Cargando dise\xF1o de la aplicaci\xF3n..." }) });
5161
5251
  }
5162
- return /* @__PURE__ */ jsxs19(Box14, { sx: { display: "flex", height: "100vh" }, children: [
5163
- /* @__PURE__ */ jsx25(CssBaseline, {}),
5164
- /* @__PURE__ */ jsx25(
5252
+ return /* @__PURE__ */ jsxs20(Box15, { sx: { display: "flex", height: "100vh" }, children: [
5253
+ /* @__PURE__ */ jsx26(CssBaseline, {}),
5254
+ /* @__PURE__ */ jsx26(
5165
5255
  AppBar,
5166
5256
  {
5167
5257
  position: "fixed",
@@ -5180,8 +5270,8 @@ var MainLayout = () => {
5180
5270
  })
5181
5271
  }
5182
5272
  },
5183
- children: /* @__PURE__ */ jsxs19(Toolbar, { children: [
5184
- /* @__PURE__ */ jsx25(
5273
+ children: /* @__PURE__ */ jsxs20(Toolbar, { children: [
5274
+ /* @__PURE__ */ jsx26(
5185
5275
  IconButton6,
5186
5276
  {
5187
5277
  color: "inherit",
@@ -5191,10 +5281,10 @@ var MainLayout = () => {
5191
5281
  sx: {
5192
5282
  marginRight: 2
5193
5283
  },
5194
- children: isDrawerOpen ? /* @__PURE__ */ jsx25(ChevronLeftIcon, {}) : /* @__PURE__ */ jsx25(MenuIcon, {})
5284
+ children: isDrawerOpen ? /* @__PURE__ */ jsx26(ChevronLeftIcon, {}) : /* @__PURE__ */ jsx26(MenuIcon, {})
5195
5285
  }
5196
5286
  ),
5197
- !isDrawerOpen && /* @__PURE__ */ jsx25(
5287
+ !isDrawerOpen && /* @__PURE__ */ jsx26(
5198
5288
  "img",
5199
5289
  {
5200
5290
  src: `${envConfig.backendUrl}/img/logo-128.png`,
@@ -5202,21 +5292,21 @@ var MainLayout = () => {
5202
5292
  style: { height: "32px", marginRight: "12px", objectFit: "contain" }
5203
5293
  }
5204
5294
  ),
5205
- /* @__PURE__ */ jsx25(Typography12, { variant: "h6", noWrap: true, component: "div", sx: { flexGrow: 1 }, children: isDrawerOpen ? "" : clientContext.config.title }),
5206
- /* @__PURE__ */ jsx25(Typography12, { variant: "subtitle1", component: "div", sx: { mr: 2 }, children: clientContext.username }),
5207
- /* @__PURE__ */ jsx25(
5208
- Button8,
5295
+ /* @__PURE__ */ jsx26(Typography13, { variant: "h6", noWrap: true, component: "div", sx: { flexGrow: 1 }, children: isDrawerOpen ? "" : clientContext.config.title }),
5296
+ /* @__PURE__ */ jsx26(Typography13, { variant: "subtitle1", component: "div", sx: { mr: 2 }, children: clientContext.username }),
5297
+ /* @__PURE__ */ jsx26(
5298
+ Button9,
5209
5299
  {
5210
5300
  color: "inherit",
5211
5301
  onClick: logout,
5212
- startIcon: /* @__PURE__ */ jsx25(LogoutIcon, {}),
5302
+ startIcon: /* @__PURE__ */ jsx26(LogoutIcon, {}),
5213
5303
  children: "Salir"
5214
5304
  }
5215
5305
  )
5216
5306
  ] })
5217
5307
  }
5218
5308
  ),
5219
- /* @__PURE__ */ jsxs19(
5309
+ /* @__PURE__ */ jsxs20(
5220
5310
  Drawer,
5221
5311
  {
5222
5312
  variant: "persistent",
@@ -5233,7 +5323,7 @@ var MainLayout = () => {
5233
5323
  }
5234
5324
  },
5235
5325
  children: [
5236
- /* @__PURE__ */ jsxs19(
5326
+ /* @__PURE__ */ jsxs20(
5237
5327
  Toolbar,
5238
5328
  {
5239
5329
  sx: {
@@ -5246,7 +5336,7 @@ var MainLayout = () => {
5246
5336
  gap: 1.5
5247
5337
  },
5248
5338
  children: [
5249
- /* @__PURE__ */ jsx25(
5339
+ /* @__PURE__ */ jsx26(
5250
5340
  "img",
5251
5341
  {
5252
5342
  src: `${envConfig.backendUrl}/img/logo-128.png`,
@@ -5254,16 +5344,16 @@ var MainLayout = () => {
5254
5344
  style: { height: "32px", objectFit: "contain" }
5255
5345
  }
5256
5346
  ),
5257
- /* @__PURE__ */ jsx25(Typography12, { variant: "h6", sx: { fontWeight: "bold" }, children: clientContext.config.title })
5347
+ /* @__PURE__ */ jsx26(Typography13, { variant: "h6", sx: { fontWeight: "bold" }, children: clientContext.config.title })
5258
5348
  ]
5259
5349
  }
5260
5350
  ),
5261
- /* @__PURE__ */ jsx25(SideMenu_default, { onMenuItemClick: handleDrawerCloseMobile })
5351
+ /* @__PURE__ */ jsx26(SideMenu_default, { onMenuItemClick: handleDrawerCloseMobile })
5262
5352
  ]
5263
5353
  }
5264
5354
  ),
5265
- /* @__PURE__ */ jsxs19(
5266
- Box14,
5355
+ /* @__PURE__ */ jsxs20(
5356
+ Box15,
5267
5357
  {
5268
5358
  component: "main",
5269
5359
  sx: {
@@ -5289,8 +5379,8 @@ var MainLayout = () => {
5289
5379
  width: isDrawerOpen ? `calc(100% - ${drawerWidth}px)` : "100%"
5290
5380
  },
5291
5381
  children: [
5292
- /* @__PURE__ */ jsx25(Toolbar, {}),
5293
- /* @__PURE__ */ jsx25(Box14, { sx: { flex: 1, minHeight: 0, overflowY: "auto", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx25(Outlet, {}) })
5382
+ /* @__PURE__ */ jsx26(Toolbar, {}),
5383
+ /* @__PURE__ */ jsx26(Box15, { sx: { flex: 1, minHeight: 0, overflowY: "auto", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx26(Outlet, {}) })
5294
5384
  ]
5295
5385
  }
5296
5386
  )
@@ -5299,8 +5389,8 @@ var MainLayout = () => {
5299
5389
  var MainLayout_default = MainLayout;
5300
5390
 
5301
5391
  // src/components/SessionExpiredMessage.tsx
5302
- import { Box as Box15, Typography as Typography13, Button as Button9, Modal } from "@mui/material";
5303
- import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
5392
+ import { Box as Box16, Typography as Typography14, Button as Button10, Modal } from "@mui/material";
5393
+ import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
5304
5394
  var style = {
5305
5395
  position: "absolute",
5306
5396
  top: "50%",
@@ -5319,7 +5409,7 @@ var SessionExpiredMessage = () => {
5319
5409
  const handleClose = () => {
5320
5410
  handleExpiredSessionRedirect();
5321
5411
  };
5322
- return /* @__PURE__ */ jsx26(
5412
+ return /* @__PURE__ */ jsx27(
5323
5413
  Modal,
5324
5414
  {
5325
5415
  open: showSessionExpiredMessage,
@@ -5339,10 +5429,10 @@ var SessionExpiredMessage = () => {
5339
5429
  }
5340
5430
  }
5341
5431
  },
5342
- children: /* @__PURE__ */ jsxs20(Box15, { sx: style, children: [
5343
- /* @__PURE__ */ jsx26(Typography13, { id: "session-expired-modal-title", variant: "h6", component: "h2", gutterBottom: true, children: "\xA1Sesi\xF3n Expirada!" }),
5344
- /* @__PURE__ */ jsx26(Typography13, { id: "session-expired-modal-description", sx: { mt: 2, mb: 3 }, children: "Tu sesi\xF3n ha expirado por inactividad o por seguridad. Por favor, inicia sesi\xF3n de nuevo." }),
5345
- /* @__PURE__ */ jsx26(Button9, { variant: "contained", color: "primary", onClick: handleClose, children: "Ir al Login" })
5432
+ children: /* @__PURE__ */ jsxs21(Box16, { sx: style, children: [
5433
+ /* @__PURE__ */ jsx27(Typography14, { id: "session-expired-modal-title", variant: "h6", component: "h2", gutterBottom: true, children: "\xA1Sesi\xF3n Expirada!" }),
5434
+ /* @__PURE__ */ jsx27(Typography14, { id: "session-expired-modal-description", sx: { mt: 2, mb: 3 }, children: "Tu sesi\xF3n ha expirado por inactividad o por seguridad. Por favor, inicia sesi\xF3n de nuevo." }),
5435
+ /* @__PURE__ */ jsx27(Button10, { variant: "contained", color: "primary", onClick: handleClose, children: "Ir al Login" })
5346
5436
  ] })
5347
5437
  }
5348
5438
  );
@@ -5351,24 +5441,24 @@ var SessionExpiredMessage_default = SessionExpiredMessage;
5351
5441
 
5352
5442
  // src/pages/PantallaInicial.tsx
5353
5443
  import { Navigate } from "react-router-dom";
5354
- import { jsx as jsx27 } from "react/jsx-runtime";
5444
+ import { jsx as jsx28 } from "react/jsx-runtime";
5355
5445
  var PantallaInicial = () => {
5356
5446
  const { clientContext } = useApp();
5357
5447
  const item = clientContext.menu ? itemInicial(clientContext.menu) : void 0;
5358
- return item ? /* @__PURE__ */ jsx27(Navigate, { to: rutaDeItemDeMenu(item), replace: true }) : null;
5448
+ return item && clientContext.menu ? /* @__PURE__ */ jsx28(Navigate, { to: rutaDeItemDeMenu(item, gruposDeItem(clientContext.menu, item)), replace: true }) : null;
5359
5449
  };
5360
5450
  var PantallaInicial_default = PantallaInicial;
5361
5451
 
5362
5452
  // src/pages/LogoutPage.tsx
5363
5453
  import { useEffect as useEffect10 } from "react";
5364
- import { Box as Box16, Typography as Typography14, CircularProgress as CircularProgress5 } from "@mui/material";
5365
- import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
5454
+ import { Box as Box17, Typography as Typography15, CircularProgress as CircularProgress5 } from "@mui/material";
5455
+ import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
5366
5456
  var LogoutPage = () => {
5367
5457
  const logout = useLogout_default();
5368
5458
  useEffect10(() => {
5369
5459
  logout();
5370
5460
  }, [logout]);
5371
- return /* @__PURE__ */ jsxs21(Box16, { sx: {
5461
+ return /* @__PURE__ */ jsxs22(Box17, { sx: {
5372
5462
  display: "flex",
5373
5463
  flexDirection: "column",
5374
5464
  justifyContent: "center",
@@ -5376,20 +5466,20 @@ var LogoutPage = () => {
5376
5466
  height: "100vh",
5377
5467
  textAlign: "center"
5378
5468
  }, children: [
5379
- /* @__PURE__ */ jsx28(CircularProgress5, { size: 60 }),
5380
- /* @__PURE__ */ jsx28(Typography14, { variant: "h6", sx: { mt: 2 }, children: "Cerrando sesi\xF3n..." })
5469
+ /* @__PURE__ */ jsx29(CircularProgress5, { size: 60 }),
5470
+ /* @__PURE__ */ jsx29(Typography15, { variant: "h6", sx: { mt: 2 }, children: "Cerrando sesi\xF3n..." })
5381
5471
  ] });
5382
5472
  };
5383
5473
  var LogoutPage_default = LogoutPage;
5384
5474
 
5385
5475
  // src/pages/LoginPage.tsx
5386
5476
  import { useState as useState18 } from "react";
5387
- import { Button as Button10, TextField as TextField2, Typography as Typography15, Alert as Alert3, AlertTitle, Box as Box17, CircularProgress as CircularProgress6 } from "@mui/material";
5477
+ import { Button as Button11, TextField as TextField2, Typography as Typography16, Alert as Alert3, AlertTitle, Box as Box18, CircularProgress as CircularProgress6 } from "@mui/material";
5388
5478
  import { useForm, Controller } from "react-hook-form";
5389
5479
  import { zodResolver } from "@hookform/resolvers/zod";
5390
5480
  import * as z from "zod";
5391
5481
  import { useDispatch as useDispatch4 } from "react-redux";
5392
- import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
5482
+ import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
5393
5483
  var loginSchema = z.object({
5394
5484
  username: z.string().min(1, "El usuario es requerido"),
5395
5485
  // Añadir validación básica
@@ -5443,16 +5533,16 @@ var LoginPage = () => {
5443
5533
  setIsSubmitting(false);
5444
5534
  }
5445
5535
  };
5446
- return /* @__PURE__ */ jsx29(
5447
- Box17,
5536
+ return /* @__PURE__ */ jsx30(
5537
+ Box18,
5448
5538
  {
5449
5539
  display: "flex",
5450
5540
  alignItems: "center",
5451
5541
  justifyContent: "center",
5452
5542
  minHeight: "100vh",
5453
5543
  bgcolor: "#f5f5f5",
5454
- children: /* @__PURE__ */ jsxs22(
5455
- Box17,
5544
+ children: /* @__PURE__ */ jsxs23(
5545
+ Box18,
5456
5546
  {
5457
5547
  width: "100%",
5458
5548
  maxWidth: "400px",
@@ -5461,7 +5551,7 @@ var LoginPage = () => {
5461
5551
  borderRadius: 8,
5462
5552
  boxShadow: 3,
5463
5553
  children: [
5464
- /* @__PURE__ */ jsx29(Box17, { sx: { display: "flex", justifyContent: "center", mb: 3 }, children: /* @__PURE__ */ jsx29(
5554
+ /* @__PURE__ */ jsx30(Box18, { sx: { display: "flex", justifyContent: "center", mb: 3 }, children: /* @__PURE__ */ jsx30(
5465
5555
  "img",
5466
5556
  {
5467
5557
  src: `${envConfig.backendUrl}/img/login-logo-icon.png`,
@@ -5469,16 +5559,16 @@ var LoginPage = () => {
5469
5559
  style: { height: "192px", maxWidth: "100%", objectFit: "contain" }
5470
5560
  }
5471
5561
  ) }),
5472
- /* @__PURE__ */ jsx29(Typography15, { variant: "h5", align: "center", gutterBottom: true, sx: { fontWeight: "bold", color: "primary.main" }, children: "Iniciar Sesi\xF3n" }),
5473
- /* @__PURE__ */ jsxs22("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
5474
- /* @__PURE__ */ jsxs22("div", { children: [
5475
- /* @__PURE__ */ jsx29("label", { htmlFor: "username", children: /* @__PURE__ */ jsx29(Typography15, { variant: "subtitle1", component: "div", sx: { fontWeight: "medium" }, children: "Usuario" }) }),
5476
- /* @__PURE__ */ jsx29(
5562
+ /* @__PURE__ */ jsx30(Typography16, { variant: "h5", align: "center", gutterBottom: true, sx: { fontWeight: "bold", color: "primary.main" }, children: "Iniciar Sesi\xF3n" }),
5563
+ /* @__PURE__ */ jsxs23("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
5564
+ /* @__PURE__ */ jsxs23("div", { children: [
5565
+ /* @__PURE__ */ jsx30("label", { htmlFor: "username", children: /* @__PURE__ */ jsx30(Typography16, { variant: "subtitle1", component: "div", sx: { fontWeight: "medium" }, children: "Usuario" }) }),
5566
+ /* @__PURE__ */ jsx30(
5477
5567
  Controller,
5478
5568
  {
5479
5569
  name: "username",
5480
5570
  control,
5481
- render: ({ field }) => /* @__PURE__ */ jsx29(
5571
+ render: ({ field }) => /* @__PURE__ */ jsx30(
5482
5572
  TextField2,
5483
5573
  {
5484
5574
  ...field,
@@ -5494,14 +5584,14 @@ var LoginPage = () => {
5494
5584
  }
5495
5585
  )
5496
5586
  ] }),
5497
- /* @__PURE__ */ jsxs22("div", { children: [
5498
- /* @__PURE__ */ jsx29("label", { htmlFor: "password", children: /* @__PURE__ */ jsx29(Typography15, { variant: "subtitle1", component: "div", sx: { fontWeight: "medium" }, children: "Contrase\xF1a" }) }),
5499
- /* @__PURE__ */ jsx29(
5587
+ /* @__PURE__ */ jsxs23("div", { children: [
5588
+ /* @__PURE__ */ jsx30("label", { htmlFor: "password", children: /* @__PURE__ */ jsx30(Typography16, { variant: "subtitle1", component: "div", sx: { fontWeight: "medium" }, children: "Contrase\xF1a" }) }),
5589
+ /* @__PURE__ */ jsx30(
5500
5590
  Controller,
5501
5591
  {
5502
5592
  name: "password",
5503
5593
  control,
5504
- render: ({ field }) => /* @__PURE__ */ jsx29(
5594
+ render: ({ field }) => /* @__PURE__ */ jsx30(
5505
5595
  TextField2,
5506
5596
  {
5507
5597
  ...field,
@@ -5517,14 +5607,14 @@ var LoginPage = () => {
5517
5607
  }
5518
5608
  )
5519
5609
  ] }),
5520
- /* @__PURE__ */ jsx29(Button10, { type: "submit", fullWidth: true, variant: "contained", color: "primary", disabled: isSubmitting, sx: { mt: 2 }, children: isSubmitting ? /* @__PURE__ */ jsxs22(Fragment5, { children: [
5521
- /* @__PURE__ */ jsx29(CircularProgress6, { size: 20, sx: { mr: 1 } }),
5610
+ /* @__PURE__ */ jsx30(Button11, { type: "submit", fullWidth: true, variant: "contained", color: "primary", disabled: isSubmitting, sx: { mt: 2 }, children: isSubmitting ? /* @__PURE__ */ jsxs23(Fragment5, { children: [
5611
+ /* @__PURE__ */ jsx30(CircularProgress6, { size: 20, sx: { mr: 1 } }),
5522
5612
  "Iniciando sesi\xF3n..."
5523
5613
  ] }) : "Iniciar Sesi\xF3n" })
5524
5614
  ] }),
5525
- loginError && /* @__PURE__ */ jsxs22(Alert3, { severity: "error", sx: { mt: 2, maxHeight: "200px" }, children: [
5615
+ loginError && /* @__PURE__ */ jsxs23(Alert3, { severity: "error", sx: { mt: 2, maxHeight: "200px" }, children: [
5526
5616
  " ",
5527
- /* @__PURE__ */ jsx29(AlertTitle, { children: "Error" }),
5617
+ /* @__PURE__ */ jsx30(AlertTitle, { children: "Error" }),
5528
5618
  loginError
5529
5619
  ] })
5530
5620
  ]
@@ -5540,7 +5630,7 @@ import React23, { useState as useState19, useCallback as useCallback15, useMemo
5540
5630
  import { useParams } from "react-router-dom";
5541
5631
  import {
5542
5632
  TextField as TextField3,
5543
- Button as Button11,
5633
+ Button as Button12,
5544
5634
  FormControl as FormControl3,
5545
5635
  InputLabel as InputLabel2,
5546
5636
  Select as Select2,
@@ -5548,8 +5638,8 @@ import {
5548
5638
  Checkbox as Checkbox3,
5549
5639
  FormControlLabel as FormControlLabel3,
5550
5640
  FormHelperText as FormHelperText2,
5551
- Typography as Typography17,
5552
- Box as Box19,
5641
+ Typography as Typography18,
5642
+ Box as Box20,
5553
5643
  CircularProgress as CircularProgress7,
5554
5644
  Alert as Alert4,
5555
5645
  Divider as Divider3,
@@ -5557,14 +5647,14 @@ import {
5557
5647
  } from "@mui/material";
5558
5648
 
5559
5649
  // src/pages/procedure-results/SuccessDisplay.tsx
5560
- import { Box as Box18, Typography as Typography16, Paper as Paper3 } from "@mui/material";
5561
- import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
5650
+ import { Box as Box19, Typography as Typography17, Paper as Paper3 } from "@mui/material";
5651
+ import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
5562
5652
  var SuccessDisplay = ({ data }) => {
5563
- return /* @__PURE__ */ jsxs23(Paper3, { elevation: 2, sx: { p: 2, mt: 2, bgcolor: "success.light", color: "success.contrastText" }, children: [
5564
- /* @__PURE__ */ jsx30(Typography16, { variant: "h6", sx: { fontSize: "1rem", mb: 1 }, children: "\xA1Operaci\xF3n Exitosa!" }),
5565
- /* @__PURE__ */ jsx30(Typography16, { variant: "body2", sx: { fontSize: "0.85rem" }, children: "Detalles del resultado:" }),
5566
- /* @__PURE__ */ jsx30(Box18, { sx: { bgcolor: "success.dark", p: 1, borderRadius: 1, mt: 1, overflowX: "auto" }, children: /* @__PURE__ */ jsx30("pre", { style: { margin: 0, fontSize: "0.75rem", color: "white" }, children: JSON.stringify(data, null, 2) }) }),
5567
- /* @__PURE__ */ jsx30(Typography16, { variant: "body2", sx: { fontSize: "0.8rem", mt: 1 }, children: "Puedes revisar los detalles anteriores o cerrar este mensaje." })
5653
+ return /* @__PURE__ */ jsxs24(Paper3, { elevation: 2, sx: { p: 2, mt: 2, bgcolor: "success.light", color: "success.contrastText" }, children: [
5654
+ /* @__PURE__ */ jsx31(Typography17, { variant: "h6", sx: { fontSize: "1rem", mb: 1 }, children: "\xA1Operaci\xF3n Exitosa!" }),
5655
+ /* @__PURE__ */ jsx31(Typography17, { variant: "body2", sx: { fontSize: "0.85rem" }, children: "Detalles del resultado:" }),
5656
+ /* @__PURE__ */ jsx31(Box19, { sx: { bgcolor: "success.dark", p: 1, borderRadius: 1, mt: 1, overflowX: "auto" }, children: /* @__PURE__ */ jsx31("pre", { style: { margin: 0, fontSize: "0.75rem", color: "white" }, children: JSON.stringify(data, null, 2) }) }),
5657
+ /* @__PURE__ */ jsx31(Typography17, { variant: "body2", sx: { fontSize: "0.8rem", mt: 1 }, children: "Puedes revisar los detalles anteriores o cerrar este mensaje." })
5568
5658
  ] });
5569
5659
  };
5570
5660
  var SuccessDisplay_default = SuccessDisplay;
@@ -5578,7 +5668,7 @@ var extendResultsOk = (newComponents) => {
5578
5668
  };
5579
5669
 
5580
5670
  // src/components/ProcedureForm.tsx
5581
- import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
5671
+ import { jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
5582
5672
  var ProcedureForm = () => {
5583
5673
  const { procedureName } = useParams();
5584
5674
  const { clientContext } = useApp();
@@ -5793,9 +5883,9 @@ var ProcedureForm = () => {
5793
5883
  sx: { fontSize: "0.8rem" }
5794
5884
  };
5795
5885
  if (param.options && param.options.length > 0) {
5796
- return /* @__PURE__ */ jsxs24(FormControl3, { fullWidth: true, margin: "dense", size: "small", error: hasError, required: commonProps.required, children: [
5797
- /* @__PURE__ */ jsx31(InputLabel2, { id: `${param.name}-label`, sx: { fontSize: "0.8rem" }, children: param.label || param.name }),
5798
- /* @__PURE__ */ jsxs24(
5886
+ return /* @__PURE__ */ jsxs25(FormControl3, { fullWidth: true, margin: "dense", size: "small", error: hasError, required: commonProps.required, children: [
5887
+ /* @__PURE__ */ jsx32(InputLabel2, { id: `${param.name}-label`, sx: { fontSize: "0.8rem" }, children: param.label || param.name }),
5888
+ /* @__PURE__ */ jsxs25(
5799
5889
  Select2,
5800
5890
  {
5801
5891
  labelId: `${param.name}-label`,
@@ -5806,14 +5896,14 @@ var ProcedureForm = () => {
5806
5896
  label: param.label || param.name,
5807
5897
  disabled: apiLoading,
5808
5898
  sx: { fontSize: "0.8rem" },
5809
- renderValue: (selected) => /* @__PURE__ */ jsx31(Typography17, { sx: { fontSize: "0.8rem" }, children: selected }),
5899
+ renderValue: (selected) => /* @__PURE__ */ jsx32(Typography18, { sx: { fontSize: "0.8rem" }, children: selected }),
5810
5900
  children: [
5811
- (!commonProps.required || formValues[param.name] === "") && /* @__PURE__ */ jsx31(MenuItem2, { value: "", sx: { fontSize: "0.8rem" }, children: /* @__PURE__ */ jsx31("em", { children: "Seleccione..." }) }),
5812
- param.options.map((option) => /* @__PURE__ */ jsx31(MenuItem2, { value: option, sx: { fontSize: "0.8rem" }, children: option }, option))
5901
+ (!commonProps.required || formValues[param.name] === "") && /* @__PURE__ */ jsx32(MenuItem2, { value: "", sx: { fontSize: "0.8rem" }, children: /* @__PURE__ */ jsx32("em", { children: "Seleccione..." }) }),
5902
+ param.options.map((option) => /* @__PURE__ */ jsx32(MenuItem2, { value: option, sx: { fontSize: "0.8rem" }, children: option }, option))
5813
5903
  ]
5814
5904
  }
5815
5905
  ),
5816
- (param.description || errorMessage) && /* @__PURE__ */ jsx31(FormHelperText2, { sx: { fontSize: "0.7rem" }, children: errorMessage || param.description })
5906
+ (param.description || errorMessage) && /* @__PURE__ */ jsx32(FormHelperText2, { sx: { fontSize: "0.7rem" }, children: errorMessage || param.description })
5817
5907
  ] });
5818
5908
  }
5819
5909
  switch (param.typeName) {
@@ -5822,18 +5912,18 @@ var ProcedureForm = () => {
5822
5912
  case "tsrange":
5823
5913
  case "time_range":
5824
5914
  case "daterange":
5825
- return /* @__PURE__ */ jsx31(TextField3, { type: "text", value: formValues[param.name] || "", ...commonProps });
5915
+ return /* @__PURE__ */ jsx32(TextField3, { type: "text", value: formValues[param.name] || "", ...commonProps });
5826
5916
  case "decimal":
5827
5917
  case "double":
5828
- return /* @__PURE__ */ jsx31(TextField3, { type: "number", inputProps: { step: "any", style: { fontSize: "0.8rem" } }, value: formValues[param.name] || "", ...commonProps });
5918
+ return /* @__PURE__ */ jsx32(TextField3, { type: "number", inputProps: { step: "any", style: { fontSize: "0.8rem" } }, value: formValues[param.name] || "", ...commonProps });
5829
5919
  case "integer":
5830
5920
  case "bigint":
5831
- return /* @__PURE__ */ jsx31(TextField3, { type: "number", inputProps: { step: "1", style: { fontSize: "0.8rem" } }, value: formValues[param.name] || "", ...commonProps });
5921
+ return /* @__PURE__ */ jsx32(TextField3, { type: "number", inputProps: { step: "1", style: { fontSize: "0.8rem" } }, value: formValues[param.name] || "", ...commonProps });
5832
5922
  case "boolean":
5833
- return /* @__PURE__ */ jsx31(
5923
+ return /* @__PURE__ */ jsx32(
5834
5924
  FormControlLabel3,
5835
5925
  {
5836
- control: /* @__PURE__ */ jsx31(
5926
+ control: /* @__PURE__ */ jsx32(
5837
5927
  Checkbox3,
5838
5928
  {
5839
5929
  checked: !!formValues[param.name],
@@ -5844,21 +5934,21 @@ var ProcedureForm = () => {
5844
5934
  size: "small"
5845
5935
  }
5846
5936
  ),
5847
- label: /* @__PURE__ */ jsx31(Typography17, { sx: { fontSize: "0.8rem", color: hasError ? "error.main" : "inherit" }, children: param.label || param.name }),
5937
+ label: /* @__PURE__ */ jsx32(Typography18, { sx: { fontSize: "0.8rem", color: hasError ? "error.main" : "inherit" }, children: param.label || param.name }),
5848
5938
  sx: { mt: 1, mb: 0 }
5849
5939
  }
5850
5940
  );
5851
5941
  case "date":
5852
5942
  case "timestamp":
5853
5943
  case "time":
5854
- return /* @__PURE__ */ jsx31(TextField3, { type: param.typeName === "date" ? "date" : param.typeName === "timestamp" ? "datetime-local" : "time", value: formValues[param.name] || "", ...commonProps, InputLabelProps: { shrink: true, sx: { fontSize: "0.8rem" } } });
5944
+ return /* @__PURE__ */ jsx32(TextField3, { type: param.typeName === "date" ? "date" : param.typeName === "timestamp" ? "datetime-local" : "time", value: formValues[param.name] || "", ...commonProps, InputLabelProps: { shrink: true, sx: { fontSize: "0.8rem" } } });
5855
5945
  case "jsonb":
5856
5946
  case "jsona":
5857
- return /* @__PURE__ */ jsx31(TextField3, { multiline: true, rows: 5, value: formValues[param.name] || "", ...commonProps, InputProps: { sx: { fontSize: "0.8rem" } } });
5947
+ return /* @__PURE__ */ jsx32(TextField3, { multiline: true, rows: 5, value: formValues[param.name] || "", ...commonProps, InputProps: { sx: { fontSize: "0.8rem" } } });
5858
5948
  case "bytea":
5859
- return /* @__PURE__ */ jsxs24(FormControl3, { fullWidth: true, margin: "dense", error: hasError, required: commonProps.required, children: [
5860
- /* @__PURE__ */ jsx31(Typography17, { variant: "body2", color: "textSecondary", component: "label", htmlFor: param.name, sx: { fontSize: "0.8rem", color: hasError ? "error.main" : "text.secondary" }, children: param.label || param.name }),
5861
- /* @__PURE__ */ jsx31(
5949
+ return /* @__PURE__ */ jsxs25(FormControl3, { fullWidth: true, margin: "dense", error: hasError, required: commonProps.required, children: [
5950
+ /* @__PURE__ */ jsx32(Typography18, { variant: "body2", color: "textSecondary", component: "label", htmlFor: param.name, sx: { fontSize: "0.8rem", color: hasError ? "error.main" : "text.secondary" }, children: param.label || param.name }),
5951
+ /* @__PURE__ */ jsx32(
5862
5952
  "input",
5863
5953
  {
5864
5954
  type: "file",
@@ -5872,34 +5962,34 @@ var ProcedureForm = () => {
5872
5962
  style: { padding: "6px 0", fontSize: "0.8rem" }
5873
5963
  }
5874
5964
  ),
5875
- (param.description || errorMessage) && /* @__PURE__ */ jsx31(FormHelperText2, { sx: { fontSize: "0.7rem" }, children: errorMessage || param.description })
5965
+ (param.description || errorMessage) && /* @__PURE__ */ jsx32(FormHelperText2, { sx: { fontSize: "0.7rem" }, children: errorMessage || param.description })
5876
5966
  ] });
5877
5967
  default:
5878
- return /* @__PURE__ */ jsx31(TextField3, { type: "text", value: formValues[param.name] || "", ...commonProps });
5968
+ return /* @__PURE__ */ jsx32(TextField3, { type: "text", value: formValues[param.name] || "", ...commonProps });
5879
5969
  }
5880
5970
  }, [formValues, handleChange, apiLoading, validationErrors]);
5881
5971
  const ResultDisplayContent = useMemo12(() => {
5882
5972
  if (!procedureResultData || !procedure?.resultOk) return null;
5883
5973
  const ComponentToRender = resultsOk[procedure.resultOk];
5884
5974
  if (ComponentToRender) {
5885
- return /* @__PURE__ */ jsx31(ComponentToRender, { data: procedureResultData });
5975
+ return /* @__PURE__ */ jsx32(ComponentToRender, { data: procedureResultData });
5886
5976
  } else {
5887
- return /* @__PURE__ */ jsxs24(Paper4, { elevation: 2, sx: { p: 2, mt: 0, bgcolor: "warning.light" }, children: [
5888
- /* @__PURE__ */ jsxs24(Typography17, { variant: "h6", sx: { fontSize: "1rem", mb: 1 }, children: [
5977
+ return /* @__PURE__ */ jsxs25(Paper4, { elevation: 2, sx: { p: 2, mt: 0, bgcolor: "warning.light" }, children: [
5978
+ /* @__PURE__ */ jsxs25(Typography18, { variant: "h6", sx: { fontSize: "1rem", mb: 1 }, children: [
5889
5979
  "el componente para resolver el resultOk: '",
5890
5980
  procedure.resultOk,
5891
5981
  "' definido en el procedure no existe o no est\xE1 mapeado."
5892
5982
  ] }),
5893
- /* @__PURE__ */ jsx31(Box19, { sx: {
5983
+ /* @__PURE__ */ jsx32(Box20, { sx: {
5894
5984
  bgcolor: "warning.dark",
5895
5985
  p: 1,
5896
5986
  borderRadius: 1
5897
- }, children: /* @__PURE__ */ jsx31("pre", { style: { margin: 0, fontSize: "0.75rem", color: "white" }, children: JSON.stringify(procedureResultData, null, 2) }) })
5987
+ }, children: /* @__PURE__ */ jsx32("pre", { style: { margin: 0, fontSize: "0.75rem", color: "white" }, children: JSON.stringify(procedureResultData, null, 2) }) })
5898
5988
  ] });
5899
5989
  }
5900
5990
  }, [procedureResultData, procedure]);
5901
5991
  if (!procedure) {
5902
- return /* @__PURE__ */ jsxs24(Box19, { sx: {
5992
+ return /* @__PURE__ */ jsxs25(Box20, { sx: {
5903
5993
  p: 2,
5904
5994
  width: "100%",
5905
5995
  boxSizing: "border-box",
@@ -5909,13 +5999,13 @@ var ProcedureForm = () => {
5909
5999
  boxShadow: 3,
5910
6000
  textAlign: "center"
5911
6001
  }, children: [
5912
- /* @__PURE__ */ jsx31(CircularProgress7, { sx: { mb: 2 } }),
5913
- /* @__PURE__ */ jsx31(Typography17, { variant: "h6", color: "text.secondary", children: "Cargando procedimiento o no encontrado..." })
6002
+ /* @__PURE__ */ jsx32(CircularProgress7, { sx: { mb: 2 } }),
6003
+ /* @__PURE__ */ jsx32(Typography18, { variant: "h6", color: "text.secondary", children: "Cargando procedimiento o no encontrado..." })
5914
6004
  ] });
5915
6005
  }
5916
6006
  return (
5917
6007
  // Esta es la Box más externa que ahora controlará el scroll
5918
- /* @__PURE__ */ jsxs24(Box19, { sx: {
6008
+ /* @__PURE__ */ jsxs25(Box20, { sx: {
5919
6009
  p: 2,
5920
6010
  ml: 1,
5921
6011
  mt: 2,
@@ -5932,17 +6022,17 @@ var ProcedureForm = () => {
5932
6022
  overflowX: "hidden"
5933
6023
  // Oculta el scroll horizontal si no es necesario para el contenedor principal
5934
6024
  }, children: [
5935
- /* @__PURE__ */ jsx31(Typography17, { variant: "h5", component: "h2", gutterBottom: true, align: "left", children: cambiarGuionesBajosPorEspacios(procedure.proceedLabel || procedure.action) }),
5936
- Object.values(validationErrors).some((err) => err !== null) && /* @__PURE__ */ jsxs24(Alert4, { severity: "error", sx: { mb: 2, fontSize: "0.8rem" }, children: [
6025
+ /* @__PURE__ */ jsx32(Typography18, { variant: "h5", component: "h2", gutterBottom: true, align: "left", children: cambiarGuionesBajosPorEspacios(procedure.proceedLabel || procedure.action) }),
6026
+ Object.values(validationErrors).some((err) => err !== null) && /* @__PURE__ */ jsxs25(Alert4, { severity: "error", sx: { mb: 2, fontSize: "0.8rem" }, children: [
5937
6027
  "Por favor, corrige los errores en el formulario antes de enviar.",
5938
- /* @__PURE__ */ jsx31("ul", { children: Object.values(validationErrors).map((err, idx) => err && /* @__PURE__ */ jsx31("li", { children: err }, idx)) })
6028
+ /* @__PURE__ */ jsx32("ul", { children: Object.values(validationErrors).map((err, idx) => err && /* @__PURE__ */ jsx32("li", { children: err }, idx)) })
5939
6029
  ] }),
5940
- !Object.values(validationErrors).some((err) => err !== null) && apiError && /* @__PURE__ */ jsx31(Alert4, { severity: "error", sx: { mb: 2, fontSize: "0.8rem" }, children: apiError.message }),
5941
- !Object.values(validationErrors).some((err) => err !== null) && !apiError && successMessage && /* @__PURE__ */ jsx31(Alert4, { severity: "success", sx: { mb: 2, fontSize: "0.8rem" }, children: successMessage }),
5942
- /* @__PURE__ */ jsxs24("form", { onSubmit: handleSubmit, children: [
5943
- procedure.parameters.map((param) => /* @__PURE__ */ jsx31("div", { children: renderInputField(param) }, param.name)),
5944
- /* @__PURE__ */ jsx31(
5945
- Button11,
6030
+ !Object.values(validationErrors).some((err) => err !== null) && apiError && /* @__PURE__ */ jsx32(Alert4, { severity: "error", sx: { mb: 2, fontSize: "0.8rem" }, children: apiError.message }),
6031
+ !Object.values(validationErrors).some((err) => err !== null) && !apiError && successMessage && /* @__PURE__ */ jsx32(Alert4, { severity: "success", sx: { mb: 2, fontSize: "0.8rem" }, children: successMessage }),
6032
+ /* @__PURE__ */ jsxs25("form", { onSubmit: handleSubmit, children: [
6033
+ procedure.parameters.map((param) => /* @__PURE__ */ jsx32("div", { children: renderInputField(param) }, param.name)),
6034
+ /* @__PURE__ */ jsx32(
6035
+ Button12,
5946
6036
  {
5947
6037
  type: "submit",
5948
6038
  variant: "contained",
@@ -5950,20 +6040,20 @@ var ProcedureForm = () => {
5950
6040
  disabled: apiLoading || Object.values(validationErrors).some((err) => err !== null),
5951
6041
  sx: { mt: 2 },
5952
6042
  size: "medium",
5953
- startIcon: apiLoading ? /* @__PURE__ */ jsx31(CircularProgress7, { size: 20, color: "inherit" }) : null,
6043
+ startIcon: apiLoading ? /* @__PURE__ */ jsx32(CircularProgress7, { size: 20, color: "inherit" }) : null,
5954
6044
  children: apiLoading ? "Ejecutando..." : procedure.proceedLabel || "Ejecutar"
5955
6045
  }
5956
6046
  )
5957
6047
  ] }),
5958
- ResultDisplayContent && /* @__PURE__ */ jsxs24(Box19, { sx: { mt: 2 }, children: [
6048
+ ResultDisplayContent && /* @__PURE__ */ jsxs25(Box20, { sx: { mt: 2 }, children: [
5959
6049
  " ",
5960
6050
  ResultDisplayContent
5961
6051
  ] }),
5962
- executionLog.length > 0 && /* @__PURE__ */ jsxs24(Box19, { sx: { mt: 3 }, children: [
5963
- /* @__PURE__ */ jsx31(Divider3, { sx: { mb: 2 } }),
5964
- /* @__PURE__ */ jsx31(Typography17, { variant: "h6", gutterBottom: true, sx: { fontSize: "0.9rem" }, children: "Registro de Ejecuci\xF3n" }),
5965
- /* @__PURE__ */ jsx31(
5966
- Box19,
6052
+ executionLog.length > 0 && /* @__PURE__ */ jsxs25(Box20, { sx: { mt: 3 }, children: [
6053
+ /* @__PURE__ */ jsx32(Divider3, { sx: { mb: 2 } }),
6054
+ /* @__PURE__ */ jsx32(Typography18, { variant: "h6", gutterBottom: true, sx: { fontSize: "0.9rem" }, children: "Registro de Ejecuci\xF3n" }),
6055
+ /* @__PURE__ */ jsx32(
6056
+ Box20,
5967
6057
  {
5968
6058
  sx: {
5969
6059
  bgcolor: "grey.100",
@@ -5976,8 +6066,8 @@ var ProcedureForm = () => {
5976
6066
  fontSize: "0.75rem",
5977
6067
  whiteSpace: "pre-wrap"
5978
6068
  },
5979
- children: executionLog.map((log, index) => /* @__PURE__ */ jsx31(
5980
- Typography17,
6069
+ children: executionLog.map((log, index) => /* @__PURE__ */ jsx32(
6070
+ Typography18,
5981
6071
  {
5982
6072
  component: "pre",
5983
6073
  sx: {
@@ -6004,7 +6094,7 @@ import { PersistGate } from "redux-persist/integration/react";
6004
6094
  // src/components/PrivateRoute.tsx
6005
6095
  import { useEffect as useEffect11 } from "react";
6006
6096
  import { Navigate as Navigate2, useLocation as useLocation3 } from "react-router-dom";
6007
- import { Fragment as Fragment6, jsx as jsx32 } from "react/jsx-runtime";
6097
+ import { Fragment as Fragment6, jsx as jsx33 } from "react/jsx-runtime";
6008
6098
  var PrivateRoute = ({ children }) => {
6009
6099
  const location = useLocation3();
6010
6100
  const dispatch = useAppDispatch();
@@ -6028,14 +6118,14 @@ var PrivateRoute = ({ children }) => {
6028
6118
  }, [isAuthenticated, isLoadingAuth, location, dispatch, clientContextStatus]);
6029
6119
  if (isLoadingAuth) {
6030
6120
  console.log(`[PrivateRoute] Returning loading state...`);
6031
- return /* @__PURE__ */ jsx32("p", { children: "Verificando autenticaci\xF3n..." });
6121
+ return /* @__PURE__ */ jsx33("p", { children: "Verificando autenticaci\xF3n..." });
6032
6122
  }
6033
6123
  if (!isAuthenticated) {
6034
6124
  console.log(`[PrivateRoute] User not authenticated, navigating to /login`);
6035
- return /* @__PURE__ */ jsx32(Navigate2, { to: "/login", replace: true });
6125
+ return /* @__PURE__ */ jsx33(Navigate2, { to: "/login", replace: true });
6036
6126
  }
6037
6127
  console.log(`[PrivateRoute] User authenticated, rendering children.`);
6038
- return /* @__PURE__ */ jsx32(Fragment6, { children });
6128
+ return /* @__PURE__ */ jsx33(Fragment6, { children });
6039
6129
  };
6040
6130
  var PrivateRoute_default = PrivateRoute;
6041
6131
 
@@ -6075,9 +6165,9 @@ var InitialRedirectHandler_default = InitialRedirectHandler;
6075
6165
  // src/pages/GenericDataGridPage.tsx
6076
6166
  import React26, { useState as useState20, useCallback as useCallback16, useMemo as useMemo13 } from "react";
6077
6167
  import { useParams as useParams2, useLocation as useLocation5 } from "react-router-dom";
6078
- import { Box as Box20, Alert as Alert5, Typography as Typography18, Tabs, Tab, IconButton as IconButton7 } from "@mui/material";
6168
+ import { Box as Box21, Alert as Alert5, Typography as Typography19, Tabs, Tab, IconButton as IconButton7 } from "@mui/material";
6079
6169
  import CloseIcon2 from "@mui/icons-material/Close";
6080
- import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
6170
+ import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
6081
6171
  var GenericDataGridPage = ({
6082
6172
  initialTableName,
6083
6173
  initialFixedFields = [],
@@ -6128,26 +6218,26 @@ var GenericDataGridPage = ({
6128
6218
  else if (activeTabIdx === index) setActiveTabIdx(index - 1);
6129
6219
  };
6130
6220
  if (!effectiveTableName) {
6131
- return /* @__PURE__ */ jsx33(Box20, { p: 3, children: /* @__PURE__ */ jsx33(Alert5, { severity: "error", children: "No se especific\xF3 una tabla." }) });
6221
+ return /* @__PURE__ */ jsx34(Box21, { p: 3, children: /* @__PURE__ */ jsx34(Alert5, { severity: "error", children: "No se especific\xF3 una tabla." }) });
6132
6222
  }
6133
- return /* @__PURE__ */ jsxs25(Box20, { sx: { width: "100%", height: "calc(100vh - 64px)", display: "flex", flexDirection: "column" }, children: [
6134
- /* @__PURE__ */ jsx33(Box20, { sx: { borderBottom: 1, borderColor: "divider", bgcolor: "background.paper" }, children: /* @__PURE__ */ jsx33(Tabs, { value: activeTabIdx, onChange: (_, v) => setActiveTabIdx(v), variant: "scrollable", children: tabs.map((tab, index) => /* @__PURE__ */ jsx33(
6223
+ return /* @__PURE__ */ jsxs26(Box21, { sx: { width: "100%", height: "calc(100vh - 64px)", display: "flex", flexDirection: "column" }, children: [
6224
+ /* @__PURE__ */ jsx34(Box21, { sx: { borderBottom: 1, borderColor: "divider", bgcolor: "background.paper" }, children: /* @__PURE__ */ jsx34(Tabs, { value: activeTabIdx, onChange: (_, v) => setActiveTabIdx(v), variant: "scrollable", children: tabs.map((tab, index) => /* @__PURE__ */ jsx34(
6135
6225
  Tab,
6136
6226
  {
6137
- label: /* @__PURE__ */ jsxs25(Box20, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6138
- /* @__PURE__ */ jsx33(Typography18, { variant: "caption", sx: { fontWeight: "bold" }, children: tab.label }),
6139
- index !== 0 && /* @__PURE__ */ jsx33(IconButton7, { size: "small", onClick: (e) => handleCloseTab(index, e), children: /* @__PURE__ */ jsx33(CloseIcon2, { fontSize: "inherit" }) })
6227
+ label: /* @__PURE__ */ jsxs26(Box21, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
6228
+ /* @__PURE__ */ jsx34(Typography19, { variant: "caption", sx: { fontWeight: "bold" }, children: tab.label }),
6229
+ index !== 0 && /* @__PURE__ */ jsx34(IconButton7, { size: "small", onClick: (e) => handleCloseTab(index, e), children: /* @__PURE__ */ jsx34(CloseIcon2, { fontSize: "inherit" }) })
6140
6230
  ] })
6141
6231
  },
6142
6232
  tab.id
6143
6233
  )) }) }),
6144
- tabs.map((tab, index) => /* @__PURE__ */ jsx33(
6145
- Box20,
6234
+ tabs.map((tab, index) => /* @__PURE__ */ jsx34(
6235
+ Box21,
6146
6236
  {
6147
6237
  role: "tabpanel",
6148
6238
  hidden: activeTabIdx !== index,
6149
6239
  sx: { flexGrow: 1, display: activeTabIdx === index ? "flex" : "none", flexDirection: "column", overflow: "hidden" },
6150
- children: /* @__PURE__ */ jsx33(
6240
+ children: /* @__PURE__ */ jsx34(
6151
6241
  GenericDataGrid_default,
6152
6242
  {
6153
6243
  tableName: tab.tableName,
@@ -6170,42 +6260,30 @@ var GenericDataGridPage_default = GenericDataGridPage;
6170
6260
  // src/pages/PantallaDeRuta.tsx
6171
6261
  import { useMemo as useMemo14 } from "react";
6172
6262
  import { useSearchParams } from "react-router-dom";
6173
- import { Box as Box21 } from "@mui/material";
6174
- import { jsx as jsx34 } from "react/jsx-runtime";
6263
+ import { Box as Box22 } from "@mui/material";
6264
+ import { jsx as jsx35 } from "react/jsx-runtime";
6175
6265
  var PantallaDeRuta = ({ screenName }) => {
6176
6266
  const [busqueda] = useSearchParams();
6177
6267
  const params = useMemo14(() => Object.fromEntries(busqueda.entries()), [busqueda]);
6178
6268
  const Pantalla = wScreens[screenName];
6179
- return /* @__PURE__ */ jsx34(Box21, { sx: { pt: 3, pl: 4 }, children: Pantalla ? /* @__PURE__ */ jsx34(Pantalla, { screenName, params }) : /* @__PURE__ */ jsx34(FallbackWScreen, { screenName }) });
6269
+ return /* @__PURE__ */ jsx35(Box22, { sx: { pt: 3, pl: 4 }, children: Pantalla ? /* @__PURE__ */ jsx35(Pantalla, { screenName, params }) : /* @__PURE__ */ jsx35(FallbackWScreen, { screenName }) });
6180
6270
  };
6181
6271
 
6182
6272
  // src/pages/MenuTablePage.tsx
6183
6273
  import { useMemo as useMemo15 } from "react";
6184
6274
  import { useLocation as useLocation6, useParams as useParams3 } from "react-router-dom";
6185
- import { Box as Box22, Alert as Alert6, Typography as Typography19 } from "@mui/material";
6186
- import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
6275
+ import { Box as Box23, Alert as Alert6, Typography as Typography20 } from "@mui/material";
6276
+ import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
6187
6277
  var MenuTablePage = () => {
6188
- const { menuName } = useParams3();
6278
+ const { "*": menuName } = useParams3();
6189
6279
  const { clientContext } = useApp();
6190
6280
  const { search } = useLocation6();
6191
- const findMenuItem = (items, nameToFind) => {
6192
- for (const item of items) {
6193
- if (item.name === nameToFind && item.menuType === "table") {
6194
- return item;
6195
- }
6196
- if (item.menuType === "menu" && item.menuContent) {
6197
- const found = findMenuItem(item.menuContent, nameToFind);
6198
- if (found) return found;
6199
- }
6200
- }
6201
- return void 0;
6202
- };
6203
6281
  const { currentTableName, currentFixedFields, parametros } = useMemo15(() => {
6204
6282
  let tableName = void 0;
6205
6283
  let fixedFields = [];
6206
6284
  let parametros2 = {};
6207
6285
  if (menuName && clientContext && clientContext.menu) {
6208
- const menuItem = findMenuItem(clientContext.menu, menuName);
6286
+ const menuItem = itemDeRuta(clientContext.menu, menuName.split("/").filter((tramo) => tramo !== ""));
6209
6287
  if (menuItem) {
6210
6288
  tableName = menuItem.table || menuItem.name;
6211
6289
  parametros2 = parametrosDeTabla(menuItem, search);
@@ -6221,12 +6299,12 @@ var MenuTablePage = () => {
6221
6299
  };
6222
6300
  }, [menuName, clientContext, search]);
6223
6301
  if (!currentTableName) {
6224
- return /* @__PURE__ */ jsx35(Box22, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "200px", children: /* @__PURE__ */ jsxs26(Alert6, { severity: "error", children: [
6225
- /* @__PURE__ */ jsx35(Typography19, { variant: "h6", children: "Error: No se pudo cargar la informaci\xF3n de la tabla." }),
6226
- /* @__PURE__ */ jsx35(Typography19, { variant: "body1", children: "Verifique la configuraci\xF3n del men\xFA o el nombre de la tabla en la URL." })
6302
+ return /* @__PURE__ */ jsx36(Box23, { display: "flex", justifyContent: "center", alignItems: "center", minHeight: "200px", children: /* @__PURE__ */ jsxs27(Alert6, { severity: "error", children: [
6303
+ /* @__PURE__ */ jsx36(Typography20, { variant: "h6", children: "Error: No se pudo cargar la informaci\xF3n de la tabla." }),
6304
+ /* @__PURE__ */ jsx36(Typography20, { variant: "body1", children: "Verifique la configuraci\xF3n del men\xFA o el nombre de la tabla en la URL." })
6227
6305
  ] }) });
6228
6306
  }
6229
- return /* @__PURE__ */ jsx35(
6307
+ return /* @__PURE__ */ jsx36(
6230
6308
  GenericDataGridPage_default,
6231
6309
  {
6232
6310
  initialTableName: currentTableName,
@@ -6240,7 +6318,7 @@ var MenuTablePage_default = MenuTablePage;
6240
6318
  // src/puente/PantallaBP.tsx
6241
6319
  import { useEffect as useEffect15, useRef as useRef10, useState as useState21 } from "react";
6242
6320
  import { Navigate as Navigate3, useLocation as useLocation7, useParams as useParams4 } from "react-router-dom";
6243
- import { Alert as Alert7, Box as Box24, CircularProgress as CircularProgress8 } from "@mui/material";
6321
+ import { Alert as Alert7, Box as Box25, CircularProgress as CircularProgress8 } from "@mui/material";
6244
6322
 
6245
6323
  // src/puente/clienteBP.ts
6246
6324
  function extraerRecursos(html) {
@@ -6330,8 +6408,8 @@ async function cargarSinMemoria(urlBackend) {
6330
6408
 
6331
6409
  // src/puente/ConsolaBP.tsx
6332
6410
  import { useEffect as useEffect14 } from "react";
6333
- import { Box as Box23 } from "@mui/material";
6334
- import { jsx as jsx36 } from "react/jsx-runtime";
6411
+ import { Box as Box24 } from "@mui/material";
6412
+ import { jsx as jsx37 } from "react/jsx-runtime";
6335
6413
  var MARGEN_DE_REPETIDO_MS = 1e3;
6336
6414
  function descartarRepetidos(consola, agregados, ahora) {
6337
6415
  for (const nodo of agregados) {
@@ -6353,8 +6431,8 @@ var ConsolaBP = () => {
6353
6431
  observador.observe(consola, { childList: true });
6354
6432
  return () => observador.disconnect();
6355
6433
  }, []);
6356
- return /* @__PURE__ */ jsx36(
6357
- Box23,
6434
+ return /* @__PURE__ */ jsx37(
6435
+ Box24,
6358
6436
  {
6359
6437
  id: "mini-console",
6360
6438
  sx: (tema) => ({
@@ -6450,7 +6528,7 @@ var habilitarPuenteBP = () => {
6450
6528
  var puenteBPHabilitado = () => habilitado;
6451
6529
 
6452
6530
  // src/puente/PantallaBP.tsx
6453
- import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
6531
+ import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
6454
6532
  function buscarItemDeMenu(items, tipo) {
6455
6533
  for (const item of items) {
6456
6534
  if (item.menuType === tipo) return item;
@@ -6499,14 +6577,14 @@ var PantallaBP = ({ nombre, direccion }) => {
6499
6577
  elemento.replaceChildren();
6500
6578
  };
6501
6579
  }, [nombre, direccion, menu]);
6502
- if (noExiste) return /* @__PURE__ */ jsx37(FallbackWScreen, { screenName: nombre });
6580
+ if (noExiste) return /* @__PURE__ */ jsx38(FallbackWScreen, { screenName: nombre });
6503
6581
  return (
6504
6582
  // el indicador de carga flota: si ocupara lugar, el contenido de backend-plus empezaría más abajo mientras carga y subiría al terminar
6505
- /* @__PURE__ */ jsxs27(Box24, { sx: { position: "relative" }, children: [
6506
- cargando && /* @__PURE__ */ jsx37(CircularProgress8, { size: 24, sx: { position: "absolute", top: 16, left: 16 } }),
6507
- error && /* @__PURE__ */ jsx37(Alert7, { severity: "error", sx: { m: 2 }, children: error }),
6508
- /* @__PURE__ */ jsx37("div", { id: "main_layout", ref: contenedor }),
6509
- /* @__PURE__ */ jsx37(ConsolaBP, {})
6583
+ /* @__PURE__ */ jsxs28(Box25, { sx: { position: "relative" }, children: [
6584
+ cargando && /* @__PURE__ */ jsx38(CircularProgress8, { size: 24, sx: { position: "absolute", top: 16, left: 16 } }),
6585
+ error && /* @__PURE__ */ jsx38(Alert7, { severity: "error", sx: { m: 2 }, children: error }),
6586
+ /* @__PURE__ */ jsx38("div", { id: "main_layout", ref: contenedor }),
6587
+ /* @__PURE__ */ jsx38(ConsolaBP, {})
6510
6588
  ] })
6511
6589
  );
6512
6590
  };
@@ -6514,28 +6592,28 @@ var PantallaDeRespaldo = () => {
6514
6592
  const { screenName = "" } = useParams4();
6515
6593
  const { search } = useLocation7();
6516
6594
  if (!puenteBPHabilitado()) {
6517
- return /* @__PURE__ */ jsx37(Box24, { sx: { p: 3 }, children: /* @__PURE__ */ jsx37(FallbackWScreen, { screenName }) });
6595
+ return /* @__PURE__ */ jsx38(Box25, { sx: { p: 3 }, children: /* @__PURE__ */ jsx38(FallbackWScreen, { screenName }) });
6518
6596
  }
6519
- return /* @__PURE__ */ jsx37(Navigate3, { to: rutaDePantallaBP(screenName, search), replace: true });
6597
+ return /* @__PURE__ */ jsx38(Navigate3, { to: rutaDePantallaBP(screenName, search), replace: true });
6520
6598
  };
6521
6599
  var PaginaBP = () => {
6522
6600
  const { hash, search } = useLocation7();
6523
6601
  const direccion = hash || search;
6524
6602
  const nombre = new URLSearchParams(direccion.replace(/^[#?]/, "")).get("w");
6525
- if (!puenteBPHabilitado()) return /* @__PURE__ */ jsx37(Navigate3, { to: "/", replace: true });
6526
- if (!nombre) return /* @__PURE__ */ jsx37(Box24, { sx: { p: 3 }, children: /* @__PURE__ */ jsxs27(Alert7, { severity: "warning", children: [
6603
+ if (!puenteBPHabilitado()) return /* @__PURE__ */ jsx38(Navigate3, { to: "/", replace: true });
6604
+ if (!nombre) return /* @__PURE__ */ jsx38(Box25, { sx: { p: 3 }, children: /* @__PURE__ */ jsxs28(Alert7, { severity: "warning", children: [
6527
6605
  "Falta la pantalla de backend-plus (",
6528
- /* @__PURE__ */ jsx37("code", { children: "#w=..." }),
6606
+ /* @__PURE__ */ jsx38("code", { children: "#w=..." }),
6529
6607
  ")."
6530
6608
  ] }) });
6531
- return /* @__PURE__ */ jsx37(PantallaBP, { nombre, direccion }, nombre);
6609
+ return /* @__PURE__ */ jsx38(PantallaBP, { nombre, direccion }, nombre);
6532
6610
  };
6533
6611
 
6534
6612
  // src/puente/GrillaBP.tsx
6535
6613
  import { useEffect as useEffect16, useRef as useRef11, useState as useState22 } from "react";
6536
6614
  import { useParams as useParams5 } from "react-router-dom";
6537
- import { Alert as Alert8, Box as Box25, CircularProgress as CircularProgress9 } from "@mui/material";
6538
- import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
6615
+ import { Alert as Alert8, Box as Box26, CircularProgress as CircularProgress9 } from "@mui/material";
6616
+ import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
6539
6617
  var GrillaBP = ({ tabla, fixedFields }) => {
6540
6618
  const contenedor = useRef11(null);
6541
6619
  const [cargando, setCargando] = useState22(true);
@@ -6564,17 +6642,17 @@ var GrillaBP = ({ tabla, fixedFields }) => {
6564
6642
  }, [tabla, clave]);
6565
6643
  return (
6566
6644
  // el indicador de carga flota: si ocupara lugar, el contenido de backend-plus empezaría más abajo mientras carga y subiría al terminar
6567
- /* @__PURE__ */ jsxs28(Box25, { sx: { position: "relative" }, children: [
6568
- cargando && /* @__PURE__ */ jsx38(CircularProgress9, { size: 24, sx: { position: "absolute", top: 16, left: 16 } }),
6569
- error && /* @__PURE__ */ jsx38(Alert8, { severity: "error", sx: { m: 2 }, children: error }),
6570
- /* @__PURE__ */ jsx38("div", { ref: contenedor }),
6571
- /* @__PURE__ */ jsx38(ConsolaBP, {})
6645
+ /* @__PURE__ */ jsxs29(Box26, { sx: { position: "relative" }, children: [
6646
+ cargando && /* @__PURE__ */ jsx39(CircularProgress9, { size: 24, sx: { position: "absolute", top: 16, left: 16 } }),
6647
+ error && /* @__PURE__ */ jsx39(Alert8, { severity: "error", sx: { m: 2 }, children: error }),
6648
+ /* @__PURE__ */ jsx39("div", { ref: contenedor }),
6649
+ /* @__PURE__ */ jsx39(ConsolaBP, {})
6572
6650
  ] })
6573
6651
  );
6574
6652
  };
6575
6653
  var PaginaGrillaBP = () => {
6576
6654
  const { tableName = "" } = useParams5();
6577
- return /* @__PURE__ */ jsx38(GrillaBP, { tabla: tableName }, tableName);
6655
+ return /* @__PURE__ */ jsx39(GrillaBP, { tabla: tableName }, tableName);
6578
6656
  };
6579
6657
 
6580
6658
  // src/puente/CapturaBP.tsx
@@ -6631,7 +6709,7 @@ var CapturaBP = () => {
6631
6709
 
6632
6710
  // src/App.tsx
6633
6711
  import typeStore6 from "type-store";
6634
- import { Fragment as Fragment7, jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
6712
+ import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
6635
6713
  var LocationTracker = () => {
6636
6714
  const location = useLocation8();
6637
6715
  const dispatch = useAppDispatch();
@@ -6641,45 +6719,45 @@ var LocationTracker = () => {
6641
6719
  return null;
6642
6720
  };
6643
6721
  function FrontendPlusReactRoutes({ myRoutes, myUnloggedRoutes, layout: Layout = MainLayout_default, unloggedLayout: UnloggedLayout }) {
6644
- return /* @__PURE__ */ jsxs29(Fragment7, { children: [
6645
- /* @__PURE__ */ jsx39(InitialRedirectHandler_default, {}),
6646
- puenteBPHabilitado() && /* @__PURE__ */ jsx39(CapturaBP, {}),
6647
- /* @__PURE__ */ jsxs29(Routes, { children: [
6648
- /* @__PURE__ */ jsxs29(Route, { element: UnloggedLayout ? /* @__PURE__ */ jsx39(UnloggedLayout, {}) : /* @__PURE__ */ jsx39(Outlet2, {}), children: [
6649
- /* @__PURE__ */ jsx39(Route, { path: "/login", element: /* @__PURE__ */ jsx39(LoginPage_default, {}) }),
6650
- /* @__PURE__ */ jsx39(Route, { path: "/logout", element: /* @__PURE__ */ jsx39(LogoutPage_default, {}) }),
6722
+ return /* @__PURE__ */ jsxs30(Fragment7, { children: [
6723
+ /* @__PURE__ */ jsx40(InitialRedirectHandler_default, {}),
6724
+ puenteBPHabilitado() && /* @__PURE__ */ jsx40(CapturaBP, {}),
6725
+ /* @__PURE__ */ jsxs30(Routes, { children: [
6726
+ /* @__PURE__ */ jsxs30(Route, { element: UnloggedLayout ? /* @__PURE__ */ jsx40(UnloggedLayout, {}) : /* @__PURE__ */ jsx40(Outlet2, {}), children: [
6727
+ /* @__PURE__ */ jsx40(Route, { path: "/login", element: /* @__PURE__ */ jsx40(LoginPage_default, {}) }),
6728
+ /* @__PURE__ */ jsx40(Route, { path: "/logout", element: /* @__PURE__ */ jsx40(LogoutPage_default, {}) }),
6651
6729
  myUnloggedRoutes
6652
6730
  ] }),
6653
- /* @__PURE__ */ jsxs29(Route, { element: /* @__PURE__ */ jsx39(PrivateRoute_default, { children: /* @__PURE__ */ jsx39(Layout, {}) }), children: [
6654
- /* @__PURE__ */ jsx39(Route, { path: "/", element: /* @__PURE__ */ jsx39(PantallaInicial_default, {}) }),
6655
- /* @__PURE__ */ jsx39(Route, { path: "/table/:tableName", element: /* @__PURE__ */ jsx39(GenericDataGridPage_default, {}) }),
6656
- /* @__PURE__ */ jsx39(Route, { path: "/menu/:menuName", element: /* @__PURE__ */ jsx39(MenuTablePage_default, {}) }),
6657
- /* @__PURE__ */ jsx39(Route, { path: "/procedures/:procedureName", element: /* @__PURE__ */ jsx39(ProcedureForm_default, {}) }),
6658
- Object.keys(wScreens).map((screenName) => /* @__PURE__ */ jsx39(
6731
+ /* @__PURE__ */ jsxs30(Route, { element: /* @__PURE__ */ jsx40(PrivateRoute_default, { children: /* @__PURE__ */ jsx40(Layout, {}) }), children: [
6732
+ /* @__PURE__ */ jsx40(Route, { path: "/", element: /* @__PURE__ */ jsx40(PantallaInicial_default, {}) }),
6733
+ /* @__PURE__ */ jsx40(Route, { path: "/table/:tableName", element: /* @__PURE__ */ jsx40(GenericDataGridPage_default, {}) }),
6734
+ /* @__PURE__ */ jsx40(Route, { path: "/menu/*", element: /* @__PURE__ */ jsx40(MenuTablePage_default, {}) }),
6735
+ /* @__PURE__ */ jsx40(Route, { path: "/procedures/:procedureName", element: /* @__PURE__ */ jsx40(ProcedureForm_default, {}) }),
6736
+ Object.keys(wScreens).map((screenName) => /* @__PURE__ */ jsx40(
6659
6737
  Route,
6660
6738
  {
6661
6739
  path: `/wScreens/${screenName}`,
6662
- element: /* @__PURE__ */ jsx39(PantallaDeRuta, { screenName })
6740
+ element: /* @__PURE__ */ jsx40(PantallaDeRuta, { screenName })
6663
6741
  },
6664
6742
  screenName
6665
6743
  )),
6666
- /* @__PURE__ */ jsx39(Route, { path: "/wScreens-fallback/:screenName", element: /* @__PURE__ */ jsx39(PantallaDeRespaldo, {}) }),
6667
- puenteBPHabilitado() && /* @__PURE__ */ jsx39(Route, { path: "/bp/menu", element: /* @__PURE__ */ jsx39(PaginaBP, {}) }),
6668
- puenteBPHabilitado() && /* @__PURE__ */ jsx39(Route, { path: "/bp/table/:tableName", element: /* @__PURE__ */ jsx39(PaginaGrillaBP, {}) }),
6744
+ /* @__PURE__ */ jsx40(Route, { path: "/wScreens-fallback/:screenName", element: /* @__PURE__ */ jsx40(PantallaDeRespaldo, {}) }),
6745
+ puenteBPHabilitado() && /* @__PURE__ */ jsx40(Route, { path: "/bp/menu", element: /* @__PURE__ */ jsx40(PaginaBP, {}) }),
6746
+ puenteBPHabilitado() && /* @__PURE__ */ jsx40(Route, { path: "/bp/table/:tableName", element: /* @__PURE__ */ jsx40(PaginaGrillaBP, {}) }),
6669
6747
  myRoutes,
6670
- /* @__PURE__ */ jsx39(Route, { path: "*", element: /* @__PURE__ */ jsx39("div", { style: { marginTop: "20px", marginLeft: "10px" }, children: "404 - Recurso No Encontrado" }) })
6748
+ /* @__PURE__ */ jsx40(Route, { path: "*", element: /* @__PURE__ */ jsx40("div", { style: { marginTop: "20px", marginLeft: "10px" }, children: "404 - Recurso No Encontrado" }) })
6671
6749
  ] }),
6672
- /* @__PURE__ */ jsx39(Route, { path: "*", element: /* @__PURE__ */ jsx39(Navigate4, { to: "/", replace: true }) })
6750
+ /* @__PURE__ */ jsx40(Route, { path: "*", element: /* @__PURE__ */ jsx40(Navigate4, { to: "/", replace: true }) })
6673
6751
  ] })
6674
6752
  ] });
6675
6753
  }
6676
6754
  var FrontendPlusProviders = ({ children, publicPaths }) => {
6677
- return /* @__PURE__ */ jsx39(Provider, { store, children: /* @__PURE__ */ jsx39(PersistGate, { loading: null, persistor, children: /* @__PURE__ */ jsxs29(BrowserRouter, { basename: rutaBase, children: [
6678
- /* @__PURE__ */ jsx39(LocationTracker, {}),
6755
+ return /* @__PURE__ */ jsx40(Provider, { store, children: /* @__PURE__ */ jsx40(PersistGate, { loading: null, persistor, children: /* @__PURE__ */ jsxs30(BrowserRouter, { basename: rutaBase, children: [
6756
+ /* @__PURE__ */ jsx40(LocationTracker, {}),
6679
6757
  " ",
6680
- /* @__PURE__ */ jsx39(AppProvider, { publicPaths, children: /* @__PURE__ */ jsxs29(SnackbarProvider, { children: [
6758
+ /* @__PURE__ */ jsx40(AppProvider, { publicPaths, children: /* @__PURE__ */ jsxs30(SnackbarProvider, { children: [
6681
6759
  children,
6682
- /* @__PURE__ */ jsx39(SessionExpiredMessage_default, {})
6760
+ /* @__PURE__ */ jsx40(SessionExpiredMessage_default, {})
6683
6761
  ] }) })
6684
6762
  ] }) }) });
6685
6763
  };
@@ -6723,7 +6801,7 @@ var App = ({
6723
6801
  const extracted = extractPathsFromRoutes(myUnloggedRoutes);
6724
6802
  return ["/login", "/logout", ...extracted];
6725
6803
  }, [myUnloggedRoutes]);
6726
- return /* @__PURE__ */ jsx39(FrontendPlusProviders, { publicPaths: safePaths, children: /* @__PURE__ */ jsx39(
6804
+ return /* @__PURE__ */ jsx40(FrontendPlusProviders, { publicPaths: safePaths, children: /* @__PURE__ */ jsx40(
6727
6805
  FrontendPlusReactRoutes,
6728
6806
  {
6729
6807
  myRoutes,