componentes-sinco 1.1.44 → 1.2.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.cjs +220 -182
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +192 -155
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4430,10 +4430,46 @@ var PageHeader = ({
|
|
|
4430
4430
|
), fixed && /* @__PURE__ */ React35.createElement(Stack13, { sx: { height: 48 } }));
|
|
4431
4431
|
};
|
|
4432
4432
|
|
|
4433
|
+
// src/Components/SCAccordion.tsx
|
|
4434
|
+
import React36, { useState as useState17 } from "react";
|
|
4435
|
+
import { Grid as Grid7, Typography as Typography19 } from "@mui/material";
|
|
4436
|
+
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
4437
|
+
import ExpandLessIcon from "@mui/icons-material/ExpandLess";
|
|
4438
|
+
var SCAccordion = ({
|
|
4439
|
+
title,
|
|
4440
|
+
actions,
|
|
4441
|
+
children
|
|
4442
|
+
}) => {
|
|
4443
|
+
const [open, setOpen] = useState17(false);
|
|
4444
|
+
return /* @__PURE__ */ React36.createElement(
|
|
4445
|
+
Grid7,
|
|
4446
|
+
{
|
|
4447
|
+
flexDirection: "column",
|
|
4448
|
+
sx: {
|
|
4449
|
+
background: "white",
|
|
4450
|
+
boxShadow: "0px 2px 4px 0px #18274B33",
|
|
4451
|
+
padding: "0px 2px 0px 2px"
|
|
4452
|
+
}
|
|
4453
|
+
},
|
|
4454
|
+
/* @__PURE__ */ React36.createElement(
|
|
4455
|
+
Grid7,
|
|
4456
|
+
{
|
|
4457
|
+
container: true,
|
|
4458
|
+
sx: { alignItems: "center", padding: "12px 16px 12px 16px", cursor: "pointer" },
|
|
4459
|
+
justifyContent: "space-between",
|
|
4460
|
+
onClick: () => setOpen((prev) => !prev)
|
|
4461
|
+
},
|
|
4462
|
+
/* @__PURE__ */ React36.createElement(Grid7, { sx: { textAlign: "left" } }, /* @__PURE__ */ React36.createElement(Typography19, { noWrap: true, variant: "subtitle1", align: "left", color: "text.primary" }, title)),
|
|
4463
|
+
/* @__PURE__ */ React36.createElement(Grid7, null, /* @__PURE__ */ React36.createElement(Grid7, { container: true, justifyContent: "flex-end", alignItems: "center", gap: 1 }, actions, /* @__PURE__ */ React36.createElement(Grid7, { color: "#3975ac", sx: { textAlign: "right" } }, open ? /* @__PURE__ */ React36.createElement(ExpandLessIcon, { fontSize: "small", color: "action" }) : /* @__PURE__ */ React36.createElement(ExpandMoreIcon, { fontSize: "small", color: "action" }))))
|
|
4464
|
+
),
|
|
4465
|
+
open && /* @__PURE__ */ React36.createElement(Grid7, { container: true, padding: "12px" }, children)
|
|
4466
|
+
);
|
|
4467
|
+
};
|
|
4468
|
+
|
|
4433
4469
|
// src/Components/SCActivityCalendar.tsx
|
|
4434
|
-
import
|
|
4435
|
-
import { Typography as
|
|
4436
|
-
import
|
|
4470
|
+
import React38, { useState as useState19 } from "react";
|
|
4471
|
+
import { Typography as Typography21, IconButton as IconButton13, Box as Box22, Badge, Menu as Menu3, MenuItem as MenuItem7, ListItemIcon as ListItemIcon5, Popover as Popover6 } from "@mui/material";
|
|
4472
|
+
import Grid9 from "@mui/material/Grid";
|
|
4437
4473
|
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
4438
4474
|
import { LocalizationProvider as LocalizationProvider2 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
4439
4475
|
import { StaticDatePicker } from "@mui/x-date-pickers/StaticDatePicker";
|
|
@@ -4441,14 +4477,14 @@ import { es } from "date-fns/locale";
|
|
|
4441
4477
|
import { format, startOfWeek, addDays, isSameDay } from "date-fns";
|
|
4442
4478
|
|
|
4443
4479
|
// src/Components/SCListContent.tsx
|
|
4444
|
-
import
|
|
4480
|
+
import React37 from "react";
|
|
4445
4481
|
import { Divider as Divider6, List, ListItemButton, ListItemIcon as ListItemIcon4, ListItemText as ListItemText3, SvgIcon as SvgIcon7 } from "@mui/material";
|
|
4446
|
-
import
|
|
4482
|
+
import Grid8 from "@mui/material/Grid";
|
|
4447
4483
|
import Avatar2 from "@mui/material/Avatar";
|
|
4448
4484
|
import * as Muicon7 from "@mui/icons-material";
|
|
4449
4485
|
var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" }) => {
|
|
4450
|
-
const [selectedIndex, setSelectedIndex] =
|
|
4451
|
-
const [value, setValue] =
|
|
4486
|
+
const [selectedIndex, setSelectedIndex] = React37.useState("1");
|
|
4487
|
+
const [value, setValue] = React37.useState("1");
|
|
4452
4488
|
options.map(function(option, index, array) {
|
|
4453
4489
|
if (option == null ? void 0 : option.iconLeft) {
|
|
4454
4490
|
if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
|
|
@@ -4467,26 +4503,26 @@ var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" })
|
|
|
4467
4503
|
}
|
|
4468
4504
|
}
|
|
4469
4505
|
});
|
|
4470
|
-
return /* @__PURE__ */
|
|
4506
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(List, { sx: { width: "100%", bgcolor: "background.paper", padding: "0px !important" } }, options.map((option, index) => {
|
|
4471
4507
|
var _a, _b;
|
|
4472
|
-
return /* @__PURE__ */
|
|
4508
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, { key: index }, /* @__PURE__ */ React37.createElement(
|
|
4473
4509
|
ListItemButton,
|
|
4474
4510
|
{
|
|
4475
4511
|
disabled: option.disable,
|
|
4476
4512
|
onClick: option.fn,
|
|
4477
4513
|
sx: { gap: 1, padding: iconLeftType == "Icon" ? "8px 8px" : "8px 8px 8px 0px" }
|
|
4478
4514
|
},
|
|
4479
|
-
option.iconLeft ? iconLeftType == "Icon" ? /* @__PURE__ */
|
|
4480
|
-
/* @__PURE__ */
|
|
4515
|
+
option.iconLeft ? iconLeftType == "Icon" ? /* @__PURE__ */ React37.createElement(ListItemIcon4, { sx: { minWidth: "0px !important" } }, /* @__PURE__ */ React37.createElement(SvgIcon7, { fontSize: "small", sx: { color: option.iconLeftColor || "action" }, component: option.iconLeft })) : /* @__PURE__ */ React37.createElement(Avatar2, { sx: { width: 25, height: 25, fontSize: "11px", bgcolor: option.iconLeftColor ? `${option.iconLeftColor}.main` : "default" } }, ((_a = option.iconLeft) == null ? void 0 : _a.type) != void 0 ? /* @__PURE__ */ React37.createElement(SvgIcon7, { fontSize: "small", component: option.iconLeft }) : option.iconLeft) : "",
|
|
4516
|
+
/* @__PURE__ */ React37.createElement(
|
|
4481
4517
|
ListItemText3,
|
|
4482
4518
|
{
|
|
4483
4519
|
sx: { color: option.colorDisabled == true ? "text.disabled" : "default" },
|
|
4484
4520
|
primary: option.title,
|
|
4485
|
-
secondary: /* @__PURE__ */
|
|
4521
|
+
secondary: /* @__PURE__ */ React37.createElement(Grid8, { gap: 0.5 }, /* @__PURE__ */ React37.createElement(Grid8, { container: true, gap: 0.5, sx: { color: option.colorDisabled == true ? "text.disabled" : "default" } }, option.subtitle), /* @__PURE__ */ React37.createElement(Grid8, { container: true, gap: 0.5, sx: { color: option.colorDisabled == true ? "text.disabled" : "default" } }, option.description))
|
|
4486
4522
|
}
|
|
4487
4523
|
),
|
|
4488
|
-
option.iconRight ? iconRightType == "Icon" ? /* @__PURE__ */
|
|
4489
|
-
), option.divider == true ? /* @__PURE__ */
|
|
4524
|
+
option.iconRight ? iconRightType == "Icon" ? /* @__PURE__ */ React37.createElement(ListItemIcon4, { sx: { minWidth: "0px !important", marginRight: "8px" } }, /* @__PURE__ */ React37.createElement(SvgIcon7, { fontSize: "small", sx: { color: option.iconRightColor || "action" }, component: option.iconRight })) : /* @__PURE__ */ React37.createElement(Avatar2, { variant: "circular", sx: { width: 20, height: 20 } }, ((_b = option.iconRight) == null ? void 0 : _b.type) != void 0 ? /* @__PURE__ */ React37.createElement(SvgIcon7, { fontSize: "small", color: option.iconRightColor || "action", component: option.iconRight }) : option.iconRight) : ""
|
|
4525
|
+
), option.divider == true ? /* @__PURE__ */ React37.createElement(Divider6, null) : "");
|
|
4490
4526
|
})));
|
|
4491
4527
|
};
|
|
4492
4528
|
|
|
@@ -4512,22 +4548,22 @@ var SCActivityCalendar = ({
|
|
|
4512
4548
|
configRangeHour
|
|
4513
4549
|
}) => {
|
|
4514
4550
|
let convertFecha;
|
|
4515
|
-
const [fecha, setFecha] =
|
|
4516
|
-
const [fechaSeleccionada, setFechaSeleccionada] =
|
|
4517
|
-
const [stateVal, setstateVal] =
|
|
4518
|
-
const [openCalendar, setOpenCalendar] =
|
|
4519
|
-
const [anchorPopoverFiltro, setAnchorPopoverFiltro] =
|
|
4520
|
-
const [datosEventos, setDatosEventos] =
|
|
4551
|
+
const [fecha, setFecha] = useState19(/* @__PURE__ */ new Date());
|
|
4552
|
+
const [fechaSeleccionada, setFechaSeleccionada] = useState19();
|
|
4553
|
+
const [stateVal, setstateVal] = React38.useState(/* @__PURE__ */ new Date());
|
|
4554
|
+
const [openCalendar, setOpenCalendar] = React38.useState(false);
|
|
4555
|
+
const [anchorPopoverFiltro, setAnchorPopoverFiltro] = useState19(null);
|
|
4556
|
+
const [datosEventos, setDatosEventos] = React38.useState(events);
|
|
4521
4557
|
const openPopoverFiltro = Boolean(anchorPopoverFiltro);
|
|
4522
4558
|
const hoy = /* @__PURE__ */ new Date();
|
|
4523
4559
|
const inicioSemana = startOfWeek(fecha, { weekStartsOn: 0 });
|
|
4524
4560
|
const diasSemana = Array.from({ length: 7 }, (_, i) => addDays(inicioSemana, i));
|
|
4525
|
-
|
|
4561
|
+
React38.useEffect(() => {
|
|
4526
4562
|
if (fecha != null) {
|
|
4527
4563
|
handleConvertFecha(fecha);
|
|
4528
4564
|
}
|
|
4529
4565
|
}, [fecha]);
|
|
4530
|
-
|
|
4566
|
+
React38.useEffect(() => {
|
|
4531
4567
|
if (events != null) {
|
|
4532
4568
|
setDatosEventos(events);
|
|
4533
4569
|
}
|
|
@@ -4567,7 +4603,7 @@ var SCActivityCalendar = ({
|
|
|
4567
4603
|
setDatosEventos(resultado);
|
|
4568
4604
|
}
|
|
4569
4605
|
};
|
|
4570
|
-
return /* @__PURE__ */
|
|
4606
|
+
return /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(LocalizationProvider2, { dateAdapter: AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React38.createElement(Box22, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React38.createElement(Box22, { sx: { width: "100%", padding: "0px", background: "transparent" } }, /* @__PURE__ */ React38.createElement(Grid9, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 16px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React38.createElement(Grid9, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React38.createElement(Box22, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React38.createElement(Typography21, { sx: { fontSize: "12px !important", color: "#10184099" } }, format(dia, "EEEE", { locale: es }).charAt(0).toUpperCase())), /* @__PURE__ */ React38.createElement(
|
|
4571
4607
|
Box22,
|
|
4572
4608
|
{
|
|
4573
4609
|
onClick: () => setFecha(dia),
|
|
@@ -4580,8 +4616,8 @@ var SCActivityCalendar = ({
|
|
|
4580
4616
|
position: "relative"
|
|
4581
4617
|
}
|
|
4582
4618
|
},
|
|
4583
|
-
/* @__PURE__ */
|
|
4584
|
-
)))), /* @__PURE__ */
|
|
4619
|
+
/* @__PURE__ */ React38.createElement(Typography21, { sx: { fontSize: "12px !important", color: isSameDay(dia, fecha) ? "white" : "#101840DE" } }, format(dia, "d"))
|
|
4620
|
+
)))), /* @__PURE__ */ React38.createElement(Grid9, { container: true, justifyContent: "center" }, /* @__PURE__ */ React38.createElement(IconButton13, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ React38.createElement(KeyboardDoubleArrowDownIcon, { color: "action" }))))) : /* @__PURE__ */ React38.createElement(Box22, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React38.createElement(
|
|
4585
4621
|
StaticDatePicker,
|
|
4586
4622
|
{
|
|
4587
4623
|
orientation: "landscape",
|
|
@@ -4606,7 +4642,7 @@ var SCActivityCalendar = ({
|
|
|
4606
4642
|
},
|
|
4607
4643
|
onChange: (newValue) => setFecha(newValue)
|
|
4608
4644
|
}
|
|
4609
|
-
), /* @__PURE__ */
|
|
4645
|
+
), /* @__PURE__ */ React38.createElement(Grid9, { container: true, justifyContent: "center" }, /* @__PURE__ */ React38.createElement(IconButton13, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React38.createElement(KeyboardDoubleArrowUpIcon, { color: "action" }))))), /* @__PURE__ */ React38.createElement(IconButton13, { onClick: handleClickPopoverFiltro, sx: { position: "fixed", right: "calc(100% - 96%)", top: openCalendar == false ? "220px" : "380px" } }, /* @__PURE__ */ React38.createElement(FilterListIcon, { color: "action" })), /* @__PURE__ */ React38.createElement(
|
|
4610
4646
|
Popover6,
|
|
4611
4647
|
{
|
|
4612
4648
|
open: openPopoverFiltro,
|
|
@@ -4617,7 +4653,7 @@ var SCActivityCalendar = ({
|
|
|
4617
4653
|
horizontal: "right"
|
|
4618
4654
|
}
|
|
4619
4655
|
},
|
|
4620
|
-
/* @__PURE__ */
|
|
4656
|
+
/* @__PURE__ */ React38.createElement(
|
|
4621
4657
|
Menu3,
|
|
4622
4658
|
{
|
|
4623
4659
|
id: "basic-menu",
|
|
@@ -4630,24 +4666,24 @@ var SCActivityCalendar = ({
|
|
|
4630
4666
|
}
|
|
4631
4667
|
}
|
|
4632
4668
|
},
|
|
4633
|
-
/* @__PURE__ */
|
|
4634
|
-
/* @__PURE__ */
|
|
4635
|
-
/* @__PURE__ */
|
|
4636
|
-
/* @__PURE__ */
|
|
4669
|
+
/* @__PURE__ */ React38.createElement(MenuItem7, { onClick: (event2) => filtrarActividad(event2, "Todo") }, /* @__PURE__ */ React38.createElement(ListItemIcon5, null, /* @__PURE__ */ React38.createElement(CalendarMonthOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React38.createElement(Typography21, { variant: "inherit" }, "Ver todo")),
|
|
4670
|
+
/* @__PURE__ */ React38.createElement(MenuItem7, { onClick: (event2) => filtrarActividad(event2, "Finalizada") }, /* @__PURE__ */ React38.createElement(ListItemIcon5, null, /* @__PURE__ */ React38.createElement(CheckCircleOutlineOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React38.createElement(Typography21, { variant: "inherit" }, "Ver finalizadas")),
|
|
4671
|
+
/* @__PURE__ */ React38.createElement(MenuItem7, { onClick: (event2) => filtrarActividad(event2, "Aplazada") }, /* @__PURE__ */ React38.createElement(ListItemIcon5, null, /* @__PURE__ */ React38.createElement(EventBusyOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React38.createElement(Typography21, { variant: "inherit" }, "Ver aplazadas")),
|
|
4672
|
+
/* @__PURE__ */ React38.createElement(MenuItem7, { onClick: (event2) => filtrarActividad(event2, "En progreso") }, /* @__PURE__ */ React38.createElement(ListItemIcon5, null, /* @__PURE__ */ React38.createElement(PendingOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React38.createElement(Typography21, { variant: "inherit" }, "Ver en progreso"))
|
|
4637
4673
|
)
|
|
4638
|
-
), /* @__PURE__ */
|
|
4674
|
+
), /* @__PURE__ */ React38.createElement(Box22, { sx: { boxSizing: "border-box", padding: "0px 16px", width: "100%", height: openCalendar ? "calc(91% - 260px)" : "calc(91% - 100px)", background: "white", display: "flex", flexDirection: "column", overflowY: "auto", gap: "8px", scrollSnapType: "x mandatory", paddingBottom: "10px" } }, diasSemana.map((day, dayIndex) => /* @__PURE__ */ React38.createElement(
|
|
4639
4675
|
Box22,
|
|
4640
4676
|
{
|
|
4641
4677
|
key: dayIndex
|
|
4642
4678
|
},
|
|
4643
|
-
/* @__PURE__ */
|
|
4679
|
+
/* @__PURE__ */ React38.createElement(Grid9, { container: true }, /* @__PURE__ */ React38.createElement(Typography21, { variant: "subtitle1", sx: { color: isSameDay(day, fecha) ? "info.dark" : "text.secondary" } }, day.toLocaleDateString("es-ES", {
|
|
4644
4680
|
day: "numeric"
|
|
4645
4681
|
}), " de ", day.toLocaleDateString("es-ES", {
|
|
4646
4682
|
month: "short"
|
|
4647
4683
|
}), ", ", day.toLocaleDateString("es-ES", {
|
|
4648
4684
|
weekday: "long"
|
|
4649
4685
|
}))),
|
|
4650
|
-
/* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ React38.createElement(Box22, { sx: {
|
|
4651
4687
|
display: "flex",
|
|
4652
4688
|
flexDirection: "column"
|
|
4653
4689
|
} }, (() => {
|
|
@@ -4656,16 +4692,16 @@ var SCActivityCalendar = ({
|
|
|
4656
4692
|
(event2) => (/* @__PURE__ */ new Date(event2.date + "T00:00:00")).toDateString() === day.toDateString()
|
|
4657
4693
|
);
|
|
4658
4694
|
if (eventosDelDia.length > 0) {
|
|
4659
|
-
return eventosDelDia.map((event2, idx) => /* @__PURE__ */
|
|
4695
|
+
return eventosDelDia.map((event2, idx) => /* @__PURE__ */ React38.createElement(
|
|
4660
4696
|
SCListContent,
|
|
4661
4697
|
{
|
|
4662
4698
|
key: idx,
|
|
4663
4699
|
options: [{
|
|
4664
4700
|
title: event2.activityDescription,
|
|
4665
|
-
subtitle: /* @__PURE__ */
|
|
4701
|
+
subtitle: /* @__PURE__ */ React38.createElement(React38.Fragment, null, configRangeHour && (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).getHours() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[0])).getHours() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).getHours() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[1])).getHours() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).getMinutes() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[0])).getMinutes() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).getMinutes() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[1])).getMinutes() ? /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(Typography21, { variant: "body2" }, "Todo el dia"), /* @__PURE__ */ React38.createElement(LightModeOutlinedIcon, { fontSize: "small" })) : /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(Typography21, { variant: "body2" }, (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })), /* @__PURE__ */ React38.createElement(ArrowForwardIcon, { fontSize: "small" }), /* @__PURE__ */ React38.createElement(Typography21, { variant: "body2" }, (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })))),
|
|
4666
4702
|
iconLeftColor: event2.state === "Finalizada" ? "#C7E49D" : "action",
|
|
4667
4703
|
iconLeft: event2.state === "Finalizada" ? "CheckCircle" : event2.state === "Aplazada" ? "EventBusyOutlined" : event2.state === "En progreso" ? "PendingOutlined" : "RadioButtonUnchecked",
|
|
4668
|
-
description: /* @__PURE__ */
|
|
4704
|
+
description: /* @__PURE__ */ React38.createElement(Grid9, { display: "flex", flexDirection: "column", alignItems: "flex-start" }, event2.state === "Aplazada" || event2.state === "En progreso" || event2.state === "Auto asignada" ? /* @__PURE__ */ React38.createElement(Grid9, { display: "flex", flexDirection: "row", alignItems: "center", gap: 0.5, sx: { marginLeft: "7px" } }, /* @__PURE__ */ React38.createElement(Badge, { variant: "dot", badgeContent: "", sx: { display: "flex", alignItems: "center", "& .MuiBadge-badge": { top: "50%", transform: "translateY(-50%)" }, color: "action" } }), /* @__PURE__ */ React38.createElement(Typography21, { variant: "body2" }, event2.state == "Auto asignada" ? "Adicional" : event2.state)) : null, /* @__PURE__ */ React38.createElement(Typography21, { variant: "body1" }, event2.equipmentDescription)),
|
|
4669
4705
|
divider: eventosDelDia.length === idx + 1 ? false : true,
|
|
4670
4706
|
colorDisabled: event2.state === "Finalizada" || event2.state === "Aplazada" || event2.state === "En progreso" ? true : false,
|
|
4671
4707
|
fn: fn ? () => fn(event2) : void 0
|
|
@@ -4673,7 +4709,7 @@ var SCActivityCalendar = ({
|
|
|
4673
4709
|
}
|
|
4674
4710
|
));
|
|
4675
4711
|
} else {
|
|
4676
|
-
return /* @__PURE__ */
|
|
4712
|
+
return /* @__PURE__ */ React38.createElement(
|
|
4677
4713
|
SCListContent,
|
|
4678
4714
|
{
|
|
4679
4715
|
options: [{
|
|
@@ -4689,8 +4725,8 @@ var SCActivityCalendar = ({
|
|
|
4689
4725
|
};
|
|
4690
4726
|
|
|
4691
4727
|
// src/Components/SCAlert.tsx
|
|
4692
|
-
import
|
|
4693
|
-
import { Alert, AlertTitle, Typography as
|
|
4728
|
+
import React39 from "react";
|
|
4729
|
+
import { Alert, AlertTitle, Typography as Typography22 } from "@mui/material";
|
|
4694
4730
|
var SCAlert = ({
|
|
4695
4731
|
title,
|
|
4696
4732
|
subtitle,
|
|
@@ -4704,7 +4740,7 @@ var SCAlert = ({
|
|
|
4704
4740
|
const handleClose = (event2) => {
|
|
4705
4741
|
setOpenState(false);
|
|
4706
4742
|
};
|
|
4707
|
-
return /* @__PURE__ */
|
|
4743
|
+
return /* @__PURE__ */ React39.createElement(React39.Fragment, null, openState && /* @__PURE__ */ React39.createElement(
|
|
4708
4744
|
Alert,
|
|
4709
4745
|
__spreadProps(__spreadValues({
|
|
4710
4746
|
severity,
|
|
@@ -4719,15 +4755,15 @@ var SCAlert = ({
|
|
|
4719
4755
|
}
|
|
4720
4756
|
})
|
|
4721
4757
|
}),
|
|
4722
|
-
/* @__PURE__ */
|
|
4723
|
-
subtitle ? /* @__PURE__ */
|
|
4758
|
+
/* @__PURE__ */ React39.createElement(AlertTitle, null, title),
|
|
4759
|
+
subtitle ? /* @__PURE__ */ React39.createElement(Typography22, { variant: "body3" }, subtitle) : null
|
|
4724
4760
|
));
|
|
4725
4761
|
};
|
|
4726
4762
|
|
|
4727
4763
|
// src/Components/SCAppBar.tsx
|
|
4728
|
-
import
|
|
4729
|
-
import { Menu as Menu4, Box as Box23, Typography as
|
|
4730
|
-
import
|
|
4764
|
+
import React40, { useState as useState20, useEffect as useEffect15 } from "react";
|
|
4765
|
+
import { Menu as Menu4, Box as Box23, Typography as Typography23, MenuItem as MenuItem8, IconButton as IconButton14, Badge as Badge2 } from "@mui/material";
|
|
4766
|
+
import Grid10 from "@mui/material/Grid";
|
|
4731
4767
|
import "dayjs/locale/es";
|
|
4732
4768
|
import MenuIcon from "@mui/icons-material/Menu";
|
|
4733
4769
|
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
|
|
@@ -4741,8 +4777,8 @@ var SCAppBar = ({
|
|
|
4741
4777
|
visibleConexion = true,
|
|
4742
4778
|
visibleMenu = true
|
|
4743
4779
|
}) => {
|
|
4744
|
-
const [isOnline, setIsOnline] =
|
|
4745
|
-
const [anchorEl, setAnchorEl] =
|
|
4780
|
+
const [isOnline, setIsOnline] = useState20(window.navigator.onLine);
|
|
4781
|
+
const [anchorEl, setAnchorEl] = useState20(null);
|
|
4746
4782
|
const openMenu = Boolean(anchorEl);
|
|
4747
4783
|
const handleMenuClick = (event2) => {
|
|
4748
4784
|
setAnchorEl(event2.currentTarget);
|
|
@@ -4764,7 +4800,7 @@ var SCAppBar = ({
|
|
|
4764
4800
|
window.removeEventListener("offline", handleOffline);
|
|
4765
4801
|
};
|
|
4766
4802
|
}, []);
|
|
4767
|
-
return /* @__PURE__ */
|
|
4803
|
+
return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(Grid10, { sx: { display: "flex", flexDirection: "column" } }, /* @__PURE__ */ React40.createElement(Grid10, { size: 12, sx: { display: "flex", flexDirection: "row", alignItems: "center", background, padding: "0px 16px", justifyContent: "space-between" } }, visibleVolver && /* @__PURE__ */ React40.createElement(IconButton14, { size: "medium", onClick: fnVolver }, /* @__PURE__ */ React40.createElement(ArrowBackIcon, { color: "action" })), /* @__PURE__ */ React40.createElement(Grid10, { sx: { display: "flex", flexDirection: "row", alignItems: "center" } }, visibleConexion && /* @__PURE__ */ React40.createElement(Grid10, { sx: { display: "flex", flexDirection: "row", alignItems: "center" } }, isOnline ? /* @__PURE__ */ React40.createElement(Wifi, { color: "action", sx: { marginRight: "8px" } }) : /* @__PURE__ */ React40.createElement(WifiOff, { color: "action", sx: { marginRight: "8px" } }), /* @__PURE__ */ React40.createElement(
|
|
4768
4804
|
Badge2,
|
|
4769
4805
|
{
|
|
4770
4806
|
anchorOrigin: {
|
|
@@ -4779,7 +4815,7 @@ var SCAppBar = ({
|
|
|
4779
4815
|
},
|
|
4780
4816
|
color: isOnline ? "success" : "error"
|
|
4781
4817
|
}
|
|
4782
|
-
), /* @__PURE__ */
|
|
4818
|
+
), /* @__PURE__ */ React40.createElement(Typography23, { variant: "caption", color: "text.secondary" }, isOnline ? "Online" : "Offline")), visibleMenu && /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(IconButton14, { size: "medium", onClick: handleMenuClick }, /* @__PURE__ */ React40.createElement(MenuIcon, { color: "action" })), /* @__PURE__ */ React40.createElement(
|
|
4783
4819
|
Menu4,
|
|
4784
4820
|
{
|
|
4785
4821
|
anchorEl,
|
|
@@ -4795,14 +4831,14 @@ var SCAppBar = ({
|
|
|
4795
4831
|
},
|
|
4796
4832
|
sx: { zIndex: "2000" }
|
|
4797
4833
|
},
|
|
4798
|
-
options.map((option, index) => /* @__PURE__ */
|
|
4799
|
-
)))), /* @__PURE__ */
|
|
4834
|
+
options.map((option, index) => /* @__PURE__ */ React40.createElement(MenuItem8, { onClick: option.fn, disabled: option.disabled, key: index }, /* @__PURE__ */ React40.createElement(Typography23, { variant: "body2" }, option.name)))
|
|
4835
|
+
)))), /* @__PURE__ */ React40.createElement(Box23, { sx: { padding: "8px 16px 0px 16px" } }, contenidoExtra)));
|
|
4800
4836
|
};
|
|
4801
4837
|
|
|
4802
4838
|
// src/Components/SCCalendarSwipeable.tsx
|
|
4803
|
-
import
|
|
4804
|
-
import { Typography as
|
|
4805
|
-
import
|
|
4839
|
+
import React41, { useState as useState21 } from "react";
|
|
4840
|
+
import { Typography as Typography24, IconButton as IconButton15, Box as Box24 } from "@mui/material";
|
|
4841
|
+
import Grid11 from "@mui/material/Grid";
|
|
4806
4842
|
import { AdapterDateFns as AdapterDateFns2 } from "@mui/x-date-pickers/AdapterDateFns";
|
|
4807
4843
|
import { LocalizationProvider as LocalizationProvider3 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
4808
4844
|
import { StaticDatePicker as StaticDatePicker2 } from "@mui/x-date-pickers/StaticDatePicker";
|
|
@@ -4819,14 +4855,14 @@ var SCCalendarSwipeable = ({
|
|
|
4819
4855
|
state
|
|
4820
4856
|
}) => {
|
|
4821
4857
|
let convertFecha;
|
|
4822
|
-
const [fecha, setFecha] =
|
|
4823
|
-
const [fechaSeleccionada, setFechaSeleccionada] =
|
|
4824
|
-
const [stateVal, setstateVal] =
|
|
4825
|
-
const [openCalendar, setOpenCalendar] =
|
|
4858
|
+
const [fecha, setFecha] = useState21(/* @__PURE__ */ new Date());
|
|
4859
|
+
const [fechaSeleccionada, setFechaSeleccionada] = useState21();
|
|
4860
|
+
const [stateVal, setstateVal] = React41.useState(/* @__PURE__ */ new Date());
|
|
4861
|
+
const [openCalendar, setOpenCalendar] = React41.useState(false);
|
|
4826
4862
|
const hoy = /* @__PURE__ */ new Date();
|
|
4827
4863
|
const inicioSemana = startOfWeek2(fecha, { weekStartsOn: 0 });
|
|
4828
4864
|
const diasSemana = Array.from({ length: 7 }, (_, i) => addDays2(inicioSemana, i));
|
|
4829
|
-
|
|
4865
|
+
React41.useEffect(() => {
|
|
4830
4866
|
if (fecha != null) {
|
|
4831
4867
|
handleConvertFecha(fecha);
|
|
4832
4868
|
}
|
|
@@ -4850,7 +4886,7 @@ var SCCalendarSwipeable = ({
|
|
|
4850
4886
|
// 0 = domingo, 1 = lunes
|
|
4851
4887
|
})
|
|
4852
4888
|
});
|
|
4853
|
-
return /* @__PURE__ */
|
|
4889
|
+
return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(LocalizationProvider3, { dateAdapter: AdapterDateFns2, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React41.createElement(Box24, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React41.createElement(Box24, { sx: { width: "100%", padding: "0px 16px", background: "transparent" } }, /* @__PURE__ */ React41.createElement(Grid11, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React41.createElement(Grid11, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React41.createElement(Box24, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React41.createElement(Typography24, { sx: { fontSize: "12px !important", color: "#10184099" } }, format2(dia, "EEEE", { locale: es2 }).charAt(0).toUpperCase())), /* @__PURE__ */ React41.createElement(
|
|
4854
4890
|
Box24,
|
|
4855
4891
|
{
|
|
4856
4892
|
onClick: () => setFecha(dia),
|
|
@@ -4866,8 +4902,8 @@ var SCCalendarSwipeable = ({
|
|
|
4866
4902
|
//height: '36px',
|
|
4867
4903
|
}
|
|
4868
4904
|
},
|
|
4869
|
-
/* @__PURE__ */
|
|
4870
|
-
)))), /* @__PURE__ */
|
|
4905
|
+
/* @__PURE__ */ React41.createElement(Typography24, { sx: { fontSize: "12px !important", color: isSameDay2(dia, fecha) ? "white" : "#101840DE" } }, format2(dia, "d"))
|
|
4906
|
+
)))), /* @__PURE__ */ React41.createElement(Grid11, { container: true, justifyContent: "center" }, /* @__PURE__ */ React41.createElement(IconButton15, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ React41.createElement(KeyboardDoubleArrowDownIcon2, null))))) : /* @__PURE__ */ React41.createElement(Box24, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React41.createElement(
|
|
4871
4907
|
StaticDatePicker2,
|
|
4872
4908
|
{
|
|
4873
4909
|
orientation: "landscape",
|
|
@@ -4892,11 +4928,11 @@ var SCCalendarSwipeable = ({
|
|
|
4892
4928
|
},
|
|
4893
4929
|
onChange: (newValue) => setFecha(newValue)
|
|
4894
4930
|
}
|
|
4895
|
-
), /* @__PURE__ */
|
|
4931
|
+
), /* @__PURE__ */ React41.createElement(Grid11, { container: true, justifyContent: "center" }, /* @__PURE__ */ React41.createElement(IconButton15, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React41.createElement(KeyboardDoubleArrowUpIcon2, null))))));
|
|
4896
4932
|
};
|
|
4897
4933
|
|
|
4898
4934
|
// src/Components/SCCard.tsx
|
|
4899
|
-
import
|
|
4935
|
+
import React42 from "react";
|
|
4900
4936
|
import { Button as Button18, Box as Box25, SvgIcon as SvgIcon9 } from "@mui/material";
|
|
4901
4937
|
import IconButton16 from "@mui/material/IconButton";
|
|
4902
4938
|
import Card2 from "@mui/material/Card";
|
|
@@ -4905,15 +4941,15 @@ import CardMedia from "@mui/material/CardMedia";
|
|
|
4905
4941
|
import CardContent2 from "@mui/material/CardContent";
|
|
4906
4942
|
import CardActions from "@mui/material/CardActions";
|
|
4907
4943
|
import Collapse2 from "@mui/material/Collapse";
|
|
4908
|
-
import
|
|
4944
|
+
import ExpandMoreIcon2 from "@mui/icons-material/ExpandMore";
|
|
4909
4945
|
import * as Muicon8 from "@mui/icons-material";
|
|
4910
4946
|
var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
|
|
4911
4947
|
let iconTitleValidation = "";
|
|
4912
4948
|
let IconTitle;
|
|
4913
|
-
const [expanded, setExpanded] =
|
|
4949
|
+
const [expanded, setExpanded] = React42.useState(false);
|
|
4914
4950
|
if (iconTitle) {
|
|
4915
4951
|
if (Muicon8[iconTitle] == void 0) {
|
|
4916
|
-
if (iconTitle &&
|
|
4952
|
+
if (iconTitle && React42.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
4917
4953
|
iconTitleValidation = "image";
|
|
4918
4954
|
IconTitle = iconTitle;
|
|
4919
4955
|
} else {
|
|
@@ -4928,11 +4964,11 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
4928
4964
|
const handleExpandClick = () => {
|
|
4929
4965
|
setExpanded(!expanded);
|
|
4930
4966
|
};
|
|
4931
|
-
return /* @__PURE__ */
|
|
4967
|
+
return /* @__PURE__ */ React42.createElement(Card2, { sx: { width: width || "auto" } }, title && /* @__PURE__ */ React42.createElement(
|
|
4932
4968
|
CardHeader,
|
|
4933
4969
|
{
|
|
4934
|
-
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */
|
|
4935
|
-
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */
|
|
4970
|
+
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React42.createElement(Box25, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React42.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React42.createElement(SvgIcon9, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
|
|
4971
|
+
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React42.createElement(Button18, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React42.createElement(IconButton16, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React42.createElement(ExpandMoreIcon2, { fontSize: "small" })) : actionsTitle,
|
|
4936
4972
|
title,
|
|
4937
4973
|
subheader: subtitle,
|
|
4938
4974
|
sx: {
|
|
@@ -4951,14 +4987,14 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
4951
4987
|
}
|
|
4952
4988
|
}
|
|
4953
4989
|
}
|
|
4954
|
-
), image && /* @__PURE__ */
|
|
4990
|
+
), image && /* @__PURE__ */ React42.createElement(
|
|
4955
4991
|
CardMedia,
|
|
4956
4992
|
{
|
|
4957
4993
|
component: "img",
|
|
4958
4994
|
height: "194",
|
|
4959
4995
|
image
|
|
4960
4996
|
}
|
|
4961
|
-
), content && /* @__PURE__ */
|
|
4997
|
+
), content && /* @__PURE__ */ React42.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ React42.createElement(CardActions, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React42.createElement(Button18, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React42.createElement(IconButton16, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ React42.createElement(ExpandMoreIcon2, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ React42.createElement(
|
|
4962
4998
|
Button18,
|
|
4963
4999
|
{
|
|
4964
5000
|
key: index,
|
|
@@ -4969,11 +5005,11 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
4969
5005
|
disabled: action.disabled || false
|
|
4970
5006
|
},
|
|
4971
5007
|
action.text
|
|
4972
|
-
)) : ""), expand && /* @__PURE__ */
|
|
5008
|
+
)) : ""), expand && /* @__PURE__ */ React42.createElement(Collapse2, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React42.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, expand.content)));
|
|
4973
5009
|
};
|
|
4974
5010
|
|
|
4975
5011
|
// src/Components/SCDataGrid.tsx
|
|
4976
|
-
import
|
|
5012
|
+
import React43, { useEffect as useEffect18, useState as useState23 } from "react";
|
|
4977
5013
|
import { DataGridPro, useGridApiRef } from "@mui/x-data-grid-pro";
|
|
4978
5014
|
import { LicenseInfo as LicenseInfo2 } from "@mui/x-license";
|
|
4979
5015
|
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
@@ -5064,7 +5100,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5064
5100
|
label = label;
|
|
5065
5101
|
}
|
|
5066
5102
|
}
|
|
5067
|
-
return /* @__PURE__ */
|
|
5103
|
+
return /* @__PURE__ */ React43.createElement(
|
|
5068
5104
|
"div",
|
|
5069
5105
|
{
|
|
5070
5106
|
style: {
|
|
@@ -5081,7 +5117,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5081
5117
|
fontWeight: params.rowNode.type == "group" ? "400" : "300"
|
|
5082
5118
|
}
|
|
5083
5119
|
},
|
|
5084
|
-
params.rowNode.type === "group" && /* @__PURE__ */
|
|
5120
|
+
params.rowNode.type === "group" && /* @__PURE__ */ React43.createElement(
|
|
5085
5121
|
"span",
|
|
5086
5122
|
{
|
|
5087
5123
|
style: {
|
|
@@ -5094,7 +5130,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5094
5130
|
params.api.setRowChildrenExpansion(params.id, !params.rowNode.childrenExpanded);
|
|
5095
5131
|
}
|
|
5096
5132
|
},
|
|
5097
|
-
params.rowNode.childrenExpanded ? /* @__PURE__ */
|
|
5133
|
+
params.rowNode.childrenExpanded ? /* @__PURE__ */ React43.createElement(KeyboardArrowUpIcon, { fontSize: "small", color: "action" }) : /* @__PURE__ */ React43.createElement(KeyboardArrowDownIcon, { fontSize: "small", color: "action" })
|
|
5098
5134
|
),
|
|
5099
5135
|
label
|
|
5100
5136
|
);
|
|
@@ -5136,10 +5172,10 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5136
5172
|
let styleRowHeight = density == "compact" ? 32 : density == "standard" ? 28 : density == "comfortable" ? 31 : 32;
|
|
5137
5173
|
let rows = rowsTable ? rowsTable : validationTreeData != false ? parseInt(data.length.toString()) : data.length < 10 ? parseInt(data.length.toString()) : 10;
|
|
5138
5174
|
let validationGroupingColDef = groupingColDefs || {};
|
|
5139
|
-
const [groupDataLenght, setGroupDataLengh] =
|
|
5140
|
-
const [pageSize, setPageSize] =
|
|
5141
|
-
const [arrayRows, setArrayRows] =
|
|
5142
|
-
const [selectionModel, setSelectionModel] =
|
|
5175
|
+
const [groupDataLenght, setGroupDataLengh] = useState23(0);
|
|
5176
|
+
const [pageSize, setPageSize] = useState23(rows);
|
|
5177
|
+
const [arrayRows, setArrayRows] = useState23([]);
|
|
5178
|
+
const [selectionModel, setSelectionModel] = useState23([]);
|
|
5143
5179
|
useEffect18(() => {
|
|
5144
5180
|
var _a;
|
|
5145
5181
|
if (setSelectedRow) {
|
|
@@ -5241,7 +5277,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5241
5277
|
apiRef.current.setColumnVisibilityModel(columnVisibilityModel);
|
|
5242
5278
|
}
|
|
5243
5279
|
}, [columnVisibilityModel, apiRef]);
|
|
5244
|
-
return /* @__PURE__ */
|
|
5280
|
+
return /* @__PURE__ */ React43.createElement(React43.Fragment, null, data && /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ React43.createElement(
|
|
5245
5281
|
DataGridPro,
|
|
5246
5282
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
5247
5283
|
getRowId,
|
|
@@ -5402,13 +5438,13 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5402
5438
|
})
|
|
5403
5439
|
))));
|
|
5404
5440
|
}
|
|
5405
|
-
var SCDataGrid =
|
|
5441
|
+
var SCDataGrid = React43.memo(SCDataGridInitial, (prevProps, nextProps) => {
|
|
5406
5442
|
const isEqual = prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight;
|
|
5407
5443
|
return isEqual;
|
|
5408
5444
|
});
|
|
5409
5445
|
|
|
5410
5446
|
// src/Components/SCDatePicker.tsx
|
|
5411
|
-
import
|
|
5447
|
+
import React44 from "react";
|
|
5412
5448
|
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
|
|
5413
5449
|
import "dayjs/locale/es";
|
|
5414
5450
|
import dayjs10 from "dayjs";
|
|
@@ -5417,7 +5453,7 @@ import { LocalizationProvider as LocalizationProvider4 } from "@mui/x-date-picke
|
|
|
5417
5453
|
import { AdapterDayjs as AdapterDayjs2 } from "@mui/x-date-pickers/AdapterDayjs";
|
|
5418
5454
|
import InsertInvitationOutlinedIcon2 from "@mui/icons-material/InsertInvitationOutlined";
|
|
5419
5455
|
var SCDatePicker = ({ label, required, disabled, background, state, setState, width, minDate, maxDate }) => {
|
|
5420
|
-
return /* @__PURE__ */
|
|
5456
|
+
return /* @__PURE__ */ React44.createElement(LocalizationProvider4, { dateAdapter: AdapterDayjs2, adapterLocale: "es" }, /* @__PURE__ */ React44.createElement(
|
|
5421
5457
|
DatePicker,
|
|
5422
5458
|
{
|
|
5423
5459
|
disabled,
|
|
@@ -5473,9 +5509,9 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
|
|
|
5473
5509
|
};
|
|
5474
5510
|
|
|
5475
5511
|
// src/Components/SCDialog.tsx
|
|
5476
|
-
import
|
|
5477
|
-
import { Button as Button19, Typography as
|
|
5478
|
-
import
|
|
5512
|
+
import React45, { useEffect as useEffect19, useState as useState25 } from "react";
|
|
5513
|
+
import { Button as Button19, Typography as Typography26, Modal as Modal5, Dialog as Dialog4, DialogActions as DialogActions4, DialogContent as DialogContent4, DialogTitle as DialogTitle4, IconButton as IconButton17, Tooltip as Tooltip8, Box as Box26, SvgIcon as SvgIcon10 } from "@mui/material";
|
|
5514
|
+
import Grid12 from "@mui/material/Grid";
|
|
5479
5515
|
import ToggleButton from "@mui/material/ToggleButton";
|
|
5480
5516
|
import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
|
|
5481
5517
|
import CloseIcon2 from "@mui/icons-material/Close";
|
|
@@ -5485,7 +5521,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5485
5521
|
let iconTitleValidation = "";
|
|
5486
5522
|
let IconTitle;
|
|
5487
5523
|
let ButtonIcon;
|
|
5488
|
-
const [open, setOpen] =
|
|
5524
|
+
const [open, setOpen] = useState25(show);
|
|
5489
5525
|
useEffect19(() => {
|
|
5490
5526
|
if (show) {
|
|
5491
5527
|
handleOpen();
|
|
@@ -5538,8 +5574,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5538
5574
|
}
|
|
5539
5575
|
};
|
|
5540
5576
|
const dialogActions = actions == false ? false : actions != void 0 ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
5541
|
-
content = content != null ? content : { component: /* @__PURE__ */
|
|
5542
|
-
return /* @__PURE__ */
|
|
5577
|
+
content = content != null ? content : { component: /* @__PURE__ */ React45.createElement(Box26, null, " Aqui va el contenido ") };
|
|
5578
|
+
return /* @__PURE__ */ React45.createElement("div", null, buttonDialog ? /* @__PURE__ */ React45.createElement(React45.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React45.createElement(Tooltip8, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React45.createElement(Button19, { size: "small", color: buttonDialog.color != void 0 ? buttonDialog.color : "primary", variant: (buttonDialog == null ? void 0 : buttonDialog.variant) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.variant : "text", startIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "left" ? /* @__PURE__ */ React45.createElement(ButtonIcon, null) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React45.createElement(ButtonIcon, null) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React45.createElement(IconButton17, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React45.createElement(SvgIcon10, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React45.createElement(Modal5, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React45.createElement(
|
|
5543
5579
|
Dialog4,
|
|
5544
5580
|
{
|
|
5545
5581
|
fullScreen: typeView === "mobile" ? true : false,
|
|
@@ -5554,8 +5590,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5554
5590
|
}
|
|
5555
5591
|
}
|
|
5556
5592
|
},
|
|
5557
|
-
title && /* @__PURE__ */
|
|
5558
|
-
/* @__PURE__ */
|
|
5593
|
+
title && /* @__PURE__ */ React45.createElement(DialogTitle4, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React45.createElement(Grid12, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, typeView == "web" ? /* @__PURE__ */ React45.createElement(Grid12, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ React45.createElement(Box26, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React45.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React45.createElement(SvgIcon10, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ React45.createElement(Grid12, { sx: { width: "98%" } }, /* @__PURE__ */ React45.createElement(Typography26, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), subtitle ? subtitle : "")) : /* @__PURE__ */ React45.createElement(Grid12, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }), disableClose != true ? /* @__PURE__ */ React45.createElement(IconButton17, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ React45.createElement(CloseIcon2, { color: "action" })) : ""), typeView == "mobile" ? /* @__PURE__ */ React45.createElement(Grid12, { sx: { display: "flex", flexDirection: "column", padding: "12px 0px 4px 0px" }, gap: 1.5 }, /* @__PURE__ */ React45.createElement(Typography26, { color: "text.primary", variant: "h5" }, title ? title : ""), subtitle ? subtitle : "") : ""),
|
|
5594
|
+
/* @__PURE__ */ React45.createElement(
|
|
5559
5595
|
DialogContent4,
|
|
5560
5596
|
{
|
|
5561
5597
|
"data-testid": "dialog-content",
|
|
@@ -5584,7 +5620,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5584
5620
|
})
|
|
5585
5621
|
}
|
|
5586
5622
|
},
|
|
5587
|
-
content.url ? /* @__PURE__ */
|
|
5623
|
+
content.url ? /* @__PURE__ */ React45.createElement(
|
|
5588
5624
|
"iframe",
|
|
5589
5625
|
{
|
|
5590
5626
|
style: { border: "none", minWidth: "100%", minHeight: "100%" },
|
|
@@ -5594,7 +5630,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5594
5630
|
}
|
|
5595
5631
|
) : content.component
|
|
5596
5632
|
),
|
|
5597
|
-
dialogActions != void 0 && dialogActions != false ? Array.isArray(dialogActions) && (dialogActions == null ? void 0 : dialogActions.length) > 0 ? /* @__PURE__ */
|
|
5633
|
+
dialogActions != void 0 && dialogActions != false ? Array.isArray(dialogActions) && (dialogActions == null ? void 0 : dialogActions.length) > 0 ? /* @__PURE__ */ React45.createElement(DialogActions4, { sx: { zIndex: 1200, gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, typeView !== "mobile" ? /* @__PURE__ */ React45.createElement(React45.Fragment, null, dialogActions.length >= 3 ? /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement(
|
|
5598
5634
|
Button19,
|
|
5599
5635
|
{
|
|
5600
5636
|
variant: "text",
|
|
@@ -5602,11 +5638,11 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5602
5638
|
size: "small",
|
|
5603
5639
|
onClick: dialogActions[0].fn,
|
|
5604
5640
|
disabled: dialogActions[0].disabled || false,
|
|
5605
|
-
startIcon: dialogActions[0].icon ? /* @__PURE__ */
|
|
5641
|
+
startIcon: dialogActions[0].icon ? /* @__PURE__ */ React45.createElement(SvgIcon10, { fontSize: "small", component: dialogActions[0].icon }) : void 0
|
|
5606
5642
|
},
|
|
5607
5643
|
dialogActions[0].text
|
|
5608
|
-
), /* @__PURE__ */
|
|
5609
|
-
return /* @__PURE__ */
|
|
5644
|
+
), /* @__PURE__ */ React45.createElement(Box26, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
|
|
5645
|
+
return /* @__PURE__ */ React45.createElement(
|
|
5610
5646
|
Button19,
|
|
5611
5647
|
{
|
|
5612
5648
|
key: index + 1,
|
|
@@ -5615,12 +5651,12 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5615
5651
|
size: "small",
|
|
5616
5652
|
onClick: boton.fn,
|
|
5617
5653
|
disabled: boton.disabled || false,
|
|
5618
|
-
startIcon: boton.icon ? /* @__PURE__ */
|
|
5654
|
+
startIcon: boton.icon ? /* @__PURE__ */ React45.createElement(SvgIcon10, { fontSize: "small", component: boton.icon }) : void 0
|
|
5619
5655
|
},
|
|
5620
5656
|
boton.text
|
|
5621
5657
|
);
|
|
5622
5658
|
}))) : dialogActions.map((boton, index) => {
|
|
5623
|
-
return /* @__PURE__ */
|
|
5659
|
+
return /* @__PURE__ */ React45.createElement(
|
|
5624
5660
|
Button19,
|
|
5625
5661
|
{
|
|
5626
5662
|
key: index,
|
|
@@ -5629,19 +5665,19 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5629
5665
|
size: "small",
|
|
5630
5666
|
onClick: boton.fn,
|
|
5631
5667
|
disabled: boton.disabled || false,
|
|
5632
|
-
startIcon: boton.icon ? /* @__PURE__ */
|
|
5668
|
+
startIcon: boton.icon ? /* @__PURE__ */ React45.createElement(SvgIcon10, { fontSize: "small", component: boton.icon }) : void 0
|
|
5633
5669
|
},
|
|
5634
5670
|
boton.text
|
|
5635
5671
|
);
|
|
5636
|
-
})) : /* @__PURE__ */
|
|
5672
|
+
})) : /* @__PURE__ */ React45.createElement(Box26, { sx: { width: "100%", display: "flex", flexDirection: "row", justifyContent: "center" } }, /* @__PURE__ */ React45.createElement(ToggleButtonGroup, { size: "large", fullWidth: true }, dialogActions.map((boton, index) => {
|
|
5637
5673
|
var _a;
|
|
5638
|
-
return /* @__PURE__ */
|
|
5674
|
+
return /* @__PURE__ */ React45.createElement(ToggleButton, { sx: { color: "primary.main" }, disabled: boton.disabled || false, fullWidth: boton.text ? true : false, size: "medium", value: "text", onClick: boton.fn }, (_a = boton.text) != null ? _a : /* @__PURE__ */ React45.createElement(SvgIcon10, { fontSize: "small", component: boton.icon }));
|
|
5639
5675
|
})))) : "" : ""
|
|
5640
5676
|
)));
|
|
5641
5677
|
};
|
|
5642
5678
|
|
|
5643
5679
|
// src/Components/SCDownloadExcelTable.tsx
|
|
5644
|
-
import
|
|
5680
|
+
import React46 from "react";
|
|
5645
5681
|
import { Button as Button20 } from "@mui/material";
|
|
5646
5682
|
import FileDownloadOutlinedIcon2 from "@mui/icons-material/FileDownloadOutlined";
|
|
5647
5683
|
import * as XLSX from "xlsx";
|
|
@@ -5674,11 +5710,11 @@ var SCDownloadExcelTable = ({
|
|
|
5674
5710
|
XLSX.utils.book_append_sheet(workbook, worksheet, "Hoja1");
|
|
5675
5711
|
XLSX.writeFile(workbook, `${fileName}.xlsx`);
|
|
5676
5712
|
};
|
|
5677
|
-
return /* @__PURE__ */
|
|
5713
|
+
return /* @__PURE__ */ React46.createElement(
|
|
5678
5714
|
Button20,
|
|
5679
5715
|
{
|
|
5680
5716
|
onClick: descargaExcel,
|
|
5681
|
-
startIcon: /* @__PURE__ */
|
|
5717
|
+
startIcon: /* @__PURE__ */ React46.createElement(FileDownloadOutlinedIcon2, null),
|
|
5682
5718
|
size: (downloadButton == null ? void 0 : downloadButton.size) || "small",
|
|
5683
5719
|
color: (downloadButton == null ? void 0 : downloadButton.color) || "primary",
|
|
5684
5720
|
variant: (downloadButton == null ? void 0 : downloadButton.variant) || "text",
|
|
@@ -5689,12 +5725,12 @@ var SCDownloadExcelTable = ({
|
|
|
5689
5725
|
};
|
|
5690
5726
|
|
|
5691
5727
|
// src/Components/SCMenu.tsx
|
|
5692
|
-
import
|
|
5693
|
-
import { Box as Box27, Typography as
|
|
5694
|
-
import
|
|
5728
|
+
import React47 from "react";
|
|
5729
|
+
import { Box as Box27, Typography as Typography27, Paper as Paper5, Divider as Divider8, MenuList as MenuList3, MenuItem as MenuItem9, ListItemIcon as ListItemIcon7, SvgIcon as SvgIcon11 } from "@mui/material";
|
|
5730
|
+
import Grid13 from "@mui/material/Grid";
|
|
5695
5731
|
|
|
5696
5732
|
// src/Components/Hooks/useWindowDimensions.ts
|
|
5697
|
-
import { useState as
|
|
5733
|
+
import { useState as useState26, useEffect as useEffect20 } from "react";
|
|
5698
5734
|
function getWindowDimensions() {
|
|
5699
5735
|
const { innerWidth: width, innerHeight: height } = window;
|
|
5700
5736
|
return {
|
|
@@ -5703,7 +5739,7 @@ function getWindowDimensions() {
|
|
|
5703
5739
|
};
|
|
5704
5740
|
}
|
|
5705
5741
|
function useWindowDimensions() {
|
|
5706
|
-
const [windowDimensions, setWindowDimensions] =
|
|
5742
|
+
const [windowDimensions, setWindowDimensions] = useState26(getWindowDimensions());
|
|
5707
5743
|
useEffect20(() => {
|
|
5708
5744
|
function handleResize() {
|
|
5709
5745
|
setWindowDimensions(getWindowDimensions());
|
|
@@ -5722,12 +5758,12 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5722
5758
|
const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
|
|
5723
5759
|
const widthContainer = menuSize + pageSize;
|
|
5724
5760
|
let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
5725
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5726
|
-
const [value, setValue] =
|
|
5727
|
-
|
|
5761
|
+
const [selectedIndex, setSelectedIndex] = React47.useState("1");
|
|
5762
|
+
const [value, setValue] = React47.useState("1");
|
|
5763
|
+
React47.useEffect(() => {
|
|
5728
5764
|
heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
5729
5765
|
}, [height]);
|
|
5730
|
-
|
|
5766
|
+
React47.useEffect(() => {
|
|
5731
5767
|
if (defaultOption) {
|
|
5732
5768
|
handleClickMenusItem(event, void 0);
|
|
5733
5769
|
}
|
|
@@ -5757,7 +5793,7 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5757
5793
|
setValue(String(index + 1));
|
|
5758
5794
|
}
|
|
5759
5795
|
};
|
|
5760
|
-
return /* @__PURE__ */
|
|
5796
|
+
return /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(Grid13, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ React47.createElement(Paper5, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ React47.createElement(MenuList3, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
|
|
5761
5797
|
MenuItem9,
|
|
5762
5798
|
{
|
|
5763
5799
|
disabled: disable == true ? true : false,
|
|
@@ -5765,13 +5801,13 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5765
5801
|
selected: String(index + 1) === selectedIndex,
|
|
5766
5802
|
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
5767
5803
|
},
|
|
5768
|
-
option.iconLeft ? /* @__PURE__ */
|
|
5769
|
-
/* @__PURE__ */
|
|
5770
|
-
), option.divider == true ? /* @__PURE__ */
|
|
5804
|
+
option.iconLeft ? /* @__PURE__ */ React47.createElement(ListItemIcon7, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React47.createElement(SvgIcon11, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
5805
|
+
/* @__PURE__ */ React47.createElement(Grid13, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React47.createElement(Typography27, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React47.createElement(ListItemIcon7, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React47.createElement(SvgIcon11, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
5806
|
+
), option.divider == true ? /* @__PURE__ */ React47.createElement(Divider8, null) : "")))), /* @__PURE__ */ React47.createElement(Grid13, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React47.createElement(Box27, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React47.createElement(Typography27, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
5771
5807
|
};
|
|
5772
5808
|
|
|
5773
5809
|
// src/Components/SCSnackBar.tsx
|
|
5774
|
-
import
|
|
5810
|
+
import React48 from "react";
|
|
5775
5811
|
import MuiAlert from "@mui/material/Alert";
|
|
5776
5812
|
import "dayjs/locale/es";
|
|
5777
5813
|
import Snackbar from "@mui/material/Snackbar";
|
|
@@ -5792,7 +5828,7 @@ var SCSnackBar = ({
|
|
|
5792
5828
|
}
|
|
5793
5829
|
setOpenState(false);
|
|
5794
5830
|
};
|
|
5795
|
-
return /* @__PURE__ */
|
|
5831
|
+
return /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(
|
|
5796
5832
|
Snackbar,
|
|
5797
5833
|
__spreadProps(__spreadValues({
|
|
5798
5834
|
anchorOrigin: { vertical: posicionVertical, horizontal: posicionHorizontal },
|
|
@@ -5801,7 +5837,7 @@ var SCSnackBar = ({
|
|
|
5801
5837
|
}, close ? { onClose: handleClose } : {}), {
|
|
5802
5838
|
sx: { zIndex: 2e3 }
|
|
5803
5839
|
}),
|
|
5804
|
-
/* @__PURE__ */
|
|
5840
|
+
/* @__PURE__ */ React48.createElement(
|
|
5805
5841
|
MuiAlert,
|
|
5806
5842
|
__spreadProps(__spreadValues({}, close ? { onClose: handleClose } : {}), {
|
|
5807
5843
|
severity: type,
|
|
@@ -5813,19 +5849,19 @@ var SCSnackBar = ({
|
|
|
5813
5849
|
};
|
|
5814
5850
|
|
|
5815
5851
|
// src/Components/SCTabs.tsx
|
|
5816
|
-
import
|
|
5817
|
-
import { Typography as
|
|
5852
|
+
import React49, { useEffect as useEffect21 } from "react";
|
|
5853
|
+
import { Typography as Typography28, Box as Box28, SvgIcon as SvgIcon12, Tab as Tab3, Tabs as Tabs3, Badge as Badge3 } from "@mui/material";
|
|
5818
5854
|
import TabPanel from "@mui/lab/TabPanel";
|
|
5819
5855
|
import TabContext from "@mui/lab/TabContext";
|
|
5820
5856
|
import * as Muicon11 from "@mui/icons-material";
|
|
5821
5857
|
var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
|
|
5822
|
-
const [toast, setToast] =
|
|
5858
|
+
const [toast, setToast] = React49.useState(null);
|
|
5823
5859
|
let i = 0;
|
|
5824
5860
|
let j = 0;
|
|
5825
5861
|
let k = 0;
|
|
5826
5862
|
let l = 0;
|
|
5827
5863
|
let validateTypeIcon = true;
|
|
5828
|
-
const [value, setValue] =
|
|
5864
|
+
const [value, setValue] = React49.useState("1");
|
|
5829
5865
|
useEffect21(() => {
|
|
5830
5866
|
if (defaultOption) {
|
|
5831
5867
|
handleChange(event, void 0);
|
|
@@ -5876,7 +5912,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5876
5912
|
setValue(newValue);
|
|
5877
5913
|
}
|
|
5878
5914
|
};
|
|
5879
|
-
return /* @__PURE__ */
|
|
5915
|
+
return /* @__PURE__ */ React49.createElement(React49.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ React49.createElement(Box28, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ React49.createElement(TabContext, { value }, /* @__PURE__ */ React49.createElement(
|
|
5880
5916
|
Tabs3,
|
|
5881
5917
|
{
|
|
5882
5918
|
"data-testid": "tab-container",
|
|
@@ -5890,7 +5926,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5890
5926
|
orientation: orientation || "horizontal",
|
|
5891
5927
|
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
5892
5928
|
},
|
|
5893
|
-
options.map((option) => /* @__PURE__ */
|
|
5929
|
+
options.map((option) => /* @__PURE__ */ React49.createElement(
|
|
5894
5930
|
Tab3,
|
|
5895
5931
|
{
|
|
5896
5932
|
"data-testid": "tab-item",
|
|
@@ -5899,7 +5935,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5899
5935
|
label: option.name || "",
|
|
5900
5936
|
disabled: option.disabled || false,
|
|
5901
5937
|
iconPosition: iconPosition || "end",
|
|
5902
|
-
icon: typeIcon == "badge" ? /* @__PURE__ */
|
|
5938
|
+
icon: typeIcon == "badge" ? /* @__PURE__ */ React49.createElement(
|
|
5903
5939
|
Badge3,
|
|
5904
5940
|
{
|
|
5905
5941
|
sx: {
|
|
@@ -5914,23 +5950,23 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5914
5950
|
badgeContent: option.iconOrBadge,
|
|
5915
5951
|
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
5916
5952
|
}
|
|
5917
|
-
) : typeIcon == "icon" ? /* @__PURE__ */
|
|
5953
|
+
) : typeIcon == "icon" ? /* @__PURE__ */ React49.createElement(SvgIcon12, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
|
|
5918
5954
|
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
5919
5955
|
}
|
|
5920
5956
|
))
|
|
5921
|
-
), children, options.map((option) => /* @__PURE__ */
|
|
5957
|
+
), children, options.map((option) => /* @__PURE__ */ React49.createElement(
|
|
5922
5958
|
TabPanel,
|
|
5923
5959
|
{
|
|
5924
5960
|
key: k = k + 1,
|
|
5925
5961
|
value: String(l = l + 1),
|
|
5926
5962
|
sx: { padding: "16px" }
|
|
5927
5963
|
},
|
|
5928
|
-
option.page ? option.page : /* @__PURE__ */
|
|
5929
|
-
)))) : /* @__PURE__ */
|
|
5964
|
+
option.page ? option.page : /* @__PURE__ */ React49.createElement(Typography28, null, "No se ha configurado el componente a visualizar ")
|
|
5965
|
+
)))) : /* @__PURE__ */ React49.createElement(Box28, { sx: { height: "200px" } }, toast && /* @__PURE__ */ React49.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
5930
5966
|
};
|
|
5931
5967
|
|
|
5932
5968
|
// src/Components/SCTime.tsx
|
|
5933
|
-
import
|
|
5969
|
+
import React50, { useState as useState28 } from "react";
|
|
5934
5970
|
import { Box as Box29, InputAdornment as InputAdornment6, Popover as Popover8, ClickAwayListener as ClickAwayListener3 } from "@mui/material";
|
|
5935
5971
|
import { LocalizationProvider as LocalizationProvider5 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
5936
5972
|
import { AdapterDayjs as AdapterDayjs3 } from "@mui/x-date-pickers/AdapterDayjs";
|
|
@@ -5956,10 +5992,10 @@ var SCTime = ({
|
|
|
5956
5992
|
);
|
|
5957
5993
|
const isTimeEmpty = required && !state;
|
|
5958
5994
|
const hasError = isTimeEmpty || error;
|
|
5959
|
-
const [anchorEl, setAnchorEl] =
|
|
5960
|
-
const [isOpenPopover, setIsOpenPopover] =
|
|
5961
|
-
const [popoverPlacement, setPopoverPlacement] =
|
|
5962
|
-
const [popoverWidth, setPopoverWidth] =
|
|
5995
|
+
const [anchorEl, setAnchorEl] = useState28(null);
|
|
5996
|
+
const [isOpenPopover, setIsOpenPopover] = useState28(false);
|
|
5997
|
+
const [popoverPlacement, setPopoverPlacement] = useState28("bottom");
|
|
5998
|
+
const [popoverWidth, setPopoverWidth] = useState28(void 0);
|
|
5963
5999
|
const detectPlacement = (element) => {
|
|
5964
6000
|
const rect = element.getBoundingClientRect();
|
|
5965
6001
|
const windowHeight = window.innerHeight;
|
|
@@ -5991,7 +6027,7 @@ var SCTime = ({
|
|
|
5991
6027
|
setIsOpenPopover(false);
|
|
5992
6028
|
setAnchorEl(null);
|
|
5993
6029
|
};
|
|
5994
|
-
return /* @__PURE__ */
|
|
6030
|
+
return /* @__PURE__ */ React50.createElement(LocalizationProvider5, { dateAdapter: AdapterDayjs3 }, /* @__PURE__ */ React50.createElement(Box29, { sx: { position: "relative", minWidth: "120px", width: width ? `${width}%` : "99%" } }, /* @__PURE__ */ React50.createElement(
|
|
5995
6031
|
TimeField,
|
|
5996
6032
|
{
|
|
5997
6033
|
label,
|
|
@@ -6003,7 +6039,7 @@ var SCTime = ({
|
|
|
6003
6039
|
slotProps: {
|
|
6004
6040
|
textField: {
|
|
6005
6041
|
InputProps: {
|
|
6006
|
-
endAdornment: /* @__PURE__ */
|
|
6042
|
+
endAdornment: /* @__PURE__ */ React50.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React50.createElement(
|
|
6007
6043
|
AccessTimeIcon,
|
|
6008
6044
|
{
|
|
6009
6045
|
color: disabled ? "disabled" : "action",
|
|
@@ -6032,7 +6068,7 @@ var SCTime = ({
|
|
|
6032
6068
|
}
|
|
6033
6069
|
}
|
|
6034
6070
|
}
|
|
6035
|
-
), /* @__PURE__ */
|
|
6071
|
+
), /* @__PURE__ */ React50.createElement(
|
|
6036
6072
|
Popover8,
|
|
6037
6073
|
{
|
|
6038
6074
|
open: isOpenPopover,
|
|
@@ -6063,7 +6099,7 @@ var SCTime = ({
|
|
|
6063
6099
|
}
|
|
6064
6100
|
}
|
|
6065
6101
|
},
|
|
6066
|
-
/* @__PURE__ */
|
|
6102
|
+
/* @__PURE__ */ React50.createElement(ClickAwayListener3, { onClickAway: handleClose }, /* @__PURE__ */ React50.createElement(Box29, { sx: { p: 0 } }, /* @__PURE__ */ React50.createElement(
|
|
6067
6103
|
DigitalClock,
|
|
6068
6104
|
{
|
|
6069
6105
|
value: state,
|
|
@@ -6086,14 +6122,14 @@ var SCTime = ({
|
|
|
6086
6122
|
};
|
|
6087
6123
|
|
|
6088
6124
|
// src/Components/SCZoom.tsx
|
|
6089
|
-
import
|
|
6090
|
-
import { Typography as
|
|
6091
|
-
import
|
|
6125
|
+
import React51, { useState as useState29 } from "react";
|
|
6126
|
+
import { Typography as Typography30, Divider as Divider9, IconButton as IconButton18, Box as Box30 } from "@mui/material";
|
|
6127
|
+
import Grid14 from "@mui/material/Grid";
|
|
6092
6128
|
import ZoomOutIcon from "@mui/icons-material/ZoomOut";
|
|
6093
6129
|
import ZoomInIcon from "@mui/icons-material/ZoomIn";
|
|
6094
6130
|
import RotateRightIcon from "@mui/icons-material/RotateRight";
|
|
6095
6131
|
var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
6096
|
-
const [zoom, setZoom] =
|
|
6132
|
+
const [zoom, setZoom] = useState29(1);
|
|
6097
6133
|
const handleZoomIn = () => {
|
|
6098
6134
|
setZoom((prev) => Math.min(prev + 0.2, 3));
|
|
6099
6135
|
};
|
|
@@ -6103,7 +6139,7 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6103
6139
|
const handleReset = () => {
|
|
6104
6140
|
setZoom(1);
|
|
6105
6141
|
};
|
|
6106
|
-
return /* @__PURE__ */
|
|
6142
|
+
return /* @__PURE__ */ React51.createElement(Box30, { style: { width: width || "280px", height: height || "280px" } }, /* @__PURE__ */ React51.createElement(
|
|
6107
6143
|
Box30,
|
|
6108
6144
|
{
|
|
6109
6145
|
sx: {
|
|
@@ -6113,7 +6149,7 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6113
6149
|
height: height || "340px"
|
|
6114
6150
|
}
|
|
6115
6151
|
},
|
|
6116
|
-
/* @__PURE__ */
|
|
6152
|
+
/* @__PURE__ */ React51.createElement(
|
|
6117
6153
|
"img",
|
|
6118
6154
|
{
|
|
6119
6155
|
src: image,
|
|
@@ -6125,14 +6161,14 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6125
6161
|
}
|
|
6126
6162
|
}
|
|
6127
6163
|
)
|
|
6128
|
-
), /* @__PURE__ */
|
|
6164
|
+
), /* @__PURE__ */ React51.createElement(Grid14, { container: true, flexWrap: "nowrap", alignItems: "center", gap: 1, sx: { position: "relative", bottom: bottom != null ? bottom : `calc(100% - 87%)`, left: left != null ? left : `calc(100% - 72%)`, zIndex: 1, width: "147px", borderRadius: "4px", padding: "4px 12px", border: bottom ? "0px" : "1px solid #0000001F", background: "white", boxShadow: bottom ? "" : "2px 3px 5px 0px #18274B33" } }, /* @__PURE__ */ React51.createElement(Grid14, { container: true, alignItems: "center", justifyContent: "center", flexWrap: "nowrap", gap: 0.5, sx: { width: "84px" } }, /* @__PURE__ */ React51.createElement(IconButton18, { onClick: handleZoomOut, disabled: zoom <= 0.5, size: "small" }, /* @__PURE__ */ React51.createElement(ZoomOutIcon, { color: "action", fontSize: "small" })), /* @__PURE__ */ React51.createElement(Typography30, { variant: "body2", color: "textSecondary" }, Math.round(zoom * 100), "%"), /* @__PURE__ */ React51.createElement(IconButton18, { onClick: handleZoomIn, disabled: zoom >= 3, color: "primary", size: "small" }, /* @__PURE__ */ React51.createElement(ZoomInIcon, { color: "action", fontSize: "small" }))), /* @__PURE__ */ React51.createElement(Divider9, { orientation: "vertical", sx: { width: "1px", height: "16px" } }), /* @__PURE__ */ React51.createElement(IconButton18, { onClick: handleReset, color: "primary", size: "small" }, /* @__PURE__ */ React51.createElement(RotateRightIcon, { color: "action", fontSize: "small" }))));
|
|
6129
6165
|
};
|
|
6130
6166
|
|
|
6131
6167
|
// src/Theme/index.ts
|
|
6132
6168
|
import { createTheme } from "@mui/material/styles";
|
|
6133
6169
|
|
|
6134
6170
|
// src/Theme/components.ts
|
|
6135
|
-
import
|
|
6171
|
+
import React52 from "react";
|
|
6136
6172
|
import {
|
|
6137
6173
|
InfoRounded as InfoRounded2,
|
|
6138
6174
|
CheckCircleRounded as CheckCircleRounded2,
|
|
@@ -6836,10 +6872,10 @@ var components = {
|
|
|
6836
6872
|
MuiAlert: {
|
|
6837
6873
|
defaultProps: {
|
|
6838
6874
|
iconMapping: {
|
|
6839
|
-
success:
|
|
6840
|
-
error:
|
|
6841
|
-
warning:
|
|
6842
|
-
info:
|
|
6875
|
+
success: React52.createElement(CheckCircleRounded2),
|
|
6876
|
+
error: React52.createElement(ErrorRounded2),
|
|
6877
|
+
warning: React52.createElement(WarningRounded2),
|
|
6878
|
+
info: React52.createElement(InfoRounded2)
|
|
6843
6879
|
}
|
|
6844
6880
|
},
|
|
6845
6881
|
variants: [
|
|
@@ -7890,6 +7926,7 @@ export {
|
|
|
7890
7926
|
FooterAction,
|
|
7891
7927
|
MultiSelect,
|
|
7892
7928
|
PageHeader,
|
|
7929
|
+
SCAccordion,
|
|
7893
7930
|
SCActivityCalendar,
|
|
7894
7931
|
SCAlert,
|
|
7895
7932
|
SCAppBar,
|