componentes-sinco 1.1.45 → 1.2.1
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 +234 -185
- 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 +206 -158
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2535,6 +2535,7 @@ function SCAutocomplete({
|
|
|
2535
2535
|
) || null;
|
|
2536
2536
|
const [open, setOpen] = React15.useState(false);
|
|
2537
2537
|
const componentClickActiveRef = React15.useRef(false);
|
|
2538
|
+
const listboxScrollRef = React15.useRef(null);
|
|
2538
2539
|
const containerRef = React15.useRef(null);
|
|
2539
2540
|
const [chipLimit, setChipLimit] = React15.useState(2);
|
|
2540
2541
|
const outsideChipsMeasureRef = React15.useRef(null);
|
|
@@ -2700,12 +2701,18 @@ function SCAutocomplete({
|
|
|
2700
2701
|
event2.defaultMuiPrevented = true;
|
|
2701
2702
|
},
|
|
2702
2703
|
onClick: (event2) => {
|
|
2703
|
-
var _a2;
|
|
2704
|
+
var _a2, _b, _c;
|
|
2704
2705
|
event2.preventDefault();
|
|
2705
2706
|
event2.stopPropagation();
|
|
2706
2707
|
event2.defaultMuiPrevented = true;
|
|
2707
|
-
(_a2 =
|
|
2708
|
+
const savedScroll = (_b = (_a2 = listboxScrollRef.current) == null ? void 0 : _a2.scrollTop) != null ? _b : 0;
|
|
2709
|
+
(_c = item.onComponentClick) == null ? void 0 : _c.call(item, event2, option);
|
|
2708
2710
|
setOpen(true);
|
|
2711
|
+
requestAnimationFrame(() => {
|
|
2712
|
+
if (listboxScrollRef.current) {
|
|
2713
|
+
listboxScrollRef.current.scrollTop = savedScroll;
|
|
2714
|
+
}
|
|
2715
|
+
});
|
|
2709
2716
|
setTimeout(() => {
|
|
2710
2717
|
componentClickActiveRef.current = false;
|
|
2711
2718
|
}, 200);
|
|
@@ -2746,7 +2753,11 @@ function SCAutocomplete({
|
|
|
2746
2753
|
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
|
|
2747
2754
|
Box11,
|
|
2748
2755
|
__spreadProps(__spreadValues({
|
|
2749
|
-
ref
|
|
2756
|
+
ref: (node) => {
|
|
2757
|
+
listboxScrollRef.current = node;
|
|
2758
|
+
if (typeof ref === "function") ref(node);
|
|
2759
|
+
else if (ref) ref.current = node;
|
|
2760
|
+
}
|
|
2750
2761
|
}, props), {
|
|
2751
2762
|
sx: __spreadValues({
|
|
2752
2763
|
position: "relative",
|
|
@@ -4430,10 +4441,46 @@ var PageHeader = ({
|
|
|
4430
4441
|
), fixed && /* @__PURE__ */ React35.createElement(Stack13, { sx: { height: 48 } }));
|
|
4431
4442
|
};
|
|
4432
4443
|
|
|
4444
|
+
// src/Components/SCAccordion.tsx
|
|
4445
|
+
import React36, { useState as useState17 } from "react";
|
|
4446
|
+
import { Grid as Grid7, Typography as Typography19 } from "@mui/material";
|
|
4447
|
+
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
4448
|
+
import ExpandLessIcon from "@mui/icons-material/ExpandLess";
|
|
4449
|
+
var SCAccordion = ({
|
|
4450
|
+
title,
|
|
4451
|
+
actions,
|
|
4452
|
+
children
|
|
4453
|
+
}) => {
|
|
4454
|
+
const [open, setOpen] = useState17(false);
|
|
4455
|
+
return /* @__PURE__ */ React36.createElement(
|
|
4456
|
+
Grid7,
|
|
4457
|
+
{
|
|
4458
|
+
flexDirection: "column",
|
|
4459
|
+
sx: {
|
|
4460
|
+
background: "white",
|
|
4461
|
+
boxShadow: "0px 2px 4px 0px #18274B33",
|
|
4462
|
+
padding: "0px 2px 0px 2px"
|
|
4463
|
+
}
|
|
4464
|
+
},
|
|
4465
|
+
/* @__PURE__ */ React36.createElement(
|
|
4466
|
+
Grid7,
|
|
4467
|
+
{
|
|
4468
|
+
container: true,
|
|
4469
|
+
sx: { alignItems: "center", padding: "12px 16px 12px 16px", cursor: "pointer" },
|
|
4470
|
+
justifyContent: "space-between",
|
|
4471
|
+
onClick: () => setOpen((prev) => !prev)
|
|
4472
|
+
},
|
|
4473
|
+
/* @__PURE__ */ React36.createElement(Grid7, { sx: { textAlign: "left" } }, /* @__PURE__ */ React36.createElement(Typography19, { noWrap: true, variant: "subtitle1", align: "left", color: "text.primary" }, title)),
|
|
4474
|
+
/* @__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" }))))
|
|
4475
|
+
),
|
|
4476
|
+
open && /* @__PURE__ */ React36.createElement(Grid7, { container: true, padding: "12px" }, children)
|
|
4477
|
+
);
|
|
4478
|
+
};
|
|
4479
|
+
|
|
4433
4480
|
// src/Components/SCActivityCalendar.tsx
|
|
4434
|
-
import
|
|
4435
|
-
import { Typography as
|
|
4436
|
-
import
|
|
4481
|
+
import React38, { useState as useState19 } from "react";
|
|
4482
|
+
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";
|
|
4483
|
+
import Grid9 from "@mui/material/Grid";
|
|
4437
4484
|
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
4438
4485
|
import { LocalizationProvider as LocalizationProvider2 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
4439
4486
|
import { StaticDatePicker } from "@mui/x-date-pickers/StaticDatePicker";
|
|
@@ -4441,14 +4488,14 @@ import { es } from "date-fns/locale";
|
|
|
4441
4488
|
import { format, startOfWeek, addDays, isSameDay } from "date-fns";
|
|
4442
4489
|
|
|
4443
4490
|
// src/Components/SCListContent.tsx
|
|
4444
|
-
import
|
|
4491
|
+
import React37 from "react";
|
|
4445
4492
|
import { Divider as Divider6, List, ListItemButton, ListItemIcon as ListItemIcon4, ListItemText as ListItemText3, SvgIcon as SvgIcon7 } from "@mui/material";
|
|
4446
|
-
import
|
|
4493
|
+
import Grid8 from "@mui/material/Grid";
|
|
4447
4494
|
import Avatar2 from "@mui/material/Avatar";
|
|
4448
4495
|
import * as Muicon7 from "@mui/icons-material";
|
|
4449
4496
|
var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" }) => {
|
|
4450
|
-
const [selectedIndex, setSelectedIndex] =
|
|
4451
|
-
const [value, setValue] =
|
|
4497
|
+
const [selectedIndex, setSelectedIndex] = React37.useState("1");
|
|
4498
|
+
const [value, setValue] = React37.useState("1");
|
|
4452
4499
|
options.map(function(option, index, array) {
|
|
4453
4500
|
if (option == null ? void 0 : option.iconLeft) {
|
|
4454
4501
|
if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
|
|
@@ -4467,26 +4514,26 @@ var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" })
|
|
|
4467
4514
|
}
|
|
4468
4515
|
}
|
|
4469
4516
|
});
|
|
4470
|
-
return /* @__PURE__ */
|
|
4517
|
+
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
4518
|
var _a, _b;
|
|
4472
|
-
return /* @__PURE__ */
|
|
4519
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, { key: index }, /* @__PURE__ */ React37.createElement(
|
|
4473
4520
|
ListItemButton,
|
|
4474
4521
|
{
|
|
4475
4522
|
disabled: option.disable,
|
|
4476
4523
|
onClick: option.fn,
|
|
4477
4524
|
sx: { gap: 1, padding: iconLeftType == "Icon" ? "8px 8px" : "8px 8px 8px 0px" }
|
|
4478
4525
|
},
|
|
4479
|
-
option.iconLeft ? iconLeftType == "Icon" ? /* @__PURE__ */
|
|
4480
|
-
/* @__PURE__ */
|
|
4526
|
+
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) : "",
|
|
4527
|
+
/* @__PURE__ */ React37.createElement(
|
|
4481
4528
|
ListItemText3,
|
|
4482
4529
|
{
|
|
4483
4530
|
sx: { color: option.colorDisabled == true ? "text.disabled" : "default" },
|
|
4484
4531
|
primary: option.title,
|
|
4485
|
-
secondary: /* @__PURE__ */
|
|
4532
|
+
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
4533
|
}
|
|
4487
4534
|
),
|
|
4488
|
-
option.iconRight ? iconRightType == "Icon" ? /* @__PURE__ */
|
|
4489
|
-
), option.divider == true ? /* @__PURE__ */
|
|
4535
|
+
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) : ""
|
|
4536
|
+
), option.divider == true ? /* @__PURE__ */ React37.createElement(Divider6, null) : "");
|
|
4490
4537
|
})));
|
|
4491
4538
|
};
|
|
4492
4539
|
|
|
@@ -4512,22 +4559,22 @@ var SCActivityCalendar = ({
|
|
|
4512
4559
|
configRangeHour
|
|
4513
4560
|
}) => {
|
|
4514
4561
|
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] =
|
|
4562
|
+
const [fecha, setFecha] = useState19(/* @__PURE__ */ new Date());
|
|
4563
|
+
const [fechaSeleccionada, setFechaSeleccionada] = useState19();
|
|
4564
|
+
const [stateVal, setstateVal] = React38.useState(/* @__PURE__ */ new Date());
|
|
4565
|
+
const [openCalendar, setOpenCalendar] = React38.useState(false);
|
|
4566
|
+
const [anchorPopoverFiltro, setAnchorPopoverFiltro] = useState19(null);
|
|
4567
|
+
const [datosEventos, setDatosEventos] = React38.useState(events);
|
|
4521
4568
|
const openPopoverFiltro = Boolean(anchorPopoverFiltro);
|
|
4522
4569
|
const hoy = /* @__PURE__ */ new Date();
|
|
4523
4570
|
const inicioSemana = startOfWeek(fecha, { weekStartsOn: 0 });
|
|
4524
4571
|
const diasSemana = Array.from({ length: 7 }, (_, i) => addDays(inicioSemana, i));
|
|
4525
|
-
|
|
4572
|
+
React38.useEffect(() => {
|
|
4526
4573
|
if (fecha != null) {
|
|
4527
4574
|
handleConvertFecha(fecha);
|
|
4528
4575
|
}
|
|
4529
4576
|
}, [fecha]);
|
|
4530
|
-
|
|
4577
|
+
React38.useEffect(() => {
|
|
4531
4578
|
if (events != null) {
|
|
4532
4579
|
setDatosEventos(events);
|
|
4533
4580
|
}
|
|
@@ -4567,7 +4614,7 @@ var SCActivityCalendar = ({
|
|
|
4567
4614
|
setDatosEventos(resultado);
|
|
4568
4615
|
}
|
|
4569
4616
|
};
|
|
4570
|
-
return /* @__PURE__ */
|
|
4617
|
+
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
4618
|
Box22,
|
|
4572
4619
|
{
|
|
4573
4620
|
onClick: () => setFecha(dia),
|
|
@@ -4580,8 +4627,8 @@ var SCActivityCalendar = ({
|
|
|
4580
4627
|
position: "relative"
|
|
4581
4628
|
}
|
|
4582
4629
|
},
|
|
4583
|
-
/* @__PURE__ */
|
|
4584
|
-
)))), /* @__PURE__ */
|
|
4630
|
+
/* @__PURE__ */ React38.createElement(Typography21, { sx: { fontSize: "12px !important", color: isSameDay(dia, fecha) ? "white" : "#101840DE" } }, format(dia, "d"))
|
|
4631
|
+
)))), /* @__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
4632
|
StaticDatePicker,
|
|
4586
4633
|
{
|
|
4587
4634
|
orientation: "landscape",
|
|
@@ -4606,7 +4653,7 @@ var SCActivityCalendar = ({
|
|
|
4606
4653
|
},
|
|
4607
4654
|
onChange: (newValue) => setFecha(newValue)
|
|
4608
4655
|
}
|
|
4609
|
-
), /* @__PURE__ */
|
|
4656
|
+
), /* @__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
4657
|
Popover6,
|
|
4611
4658
|
{
|
|
4612
4659
|
open: openPopoverFiltro,
|
|
@@ -4617,7 +4664,7 @@ var SCActivityCalendar = ({
|
|
|
4617
4664
|
horizontal: "right"
|
|
4618
4665
|
}
|
|
4619
4666
|
},
|
|
4620
|
-
/* @__PURE__ */
|
|
4667
|
+
/* @__PURE__ */ React38.createElement(
|
|
4621
4668
|
Menu3,
|
|
4622
4669
|
{
|
|
4623
4670
|
id: "basic-menu",
|
|
@@ -4630,24 +4677,24 @@ var SCActivityCalendar = ({
|
|
|
4630
4677
|
}
|
|
4631
4678
|
}
|
|
4632
4679
|
},
|
|
4633
|
-
/* @__PURE__ */
|
|
4634
|
-
/* @__PURE__ */
|
|
4635
|
-
/* @__PURE__ */
|
|
4636
|
-
/* @__PURE__ */
|
|
4680
|
+
/* @__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")),
|
|
4681
|
+
/* @__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")),
|
|
4682
|
+
/* @__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")),
|
|
4683
|
+
/* @__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
4684
|
)
|
|
4638
|
-
), /* @__PURE__ */
|
|
4685
|
+
), /* @__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
4686
|
Box22,
|
|
4640
4687
|
{
|
|
4641
4688
|
key: dayIndex
|
|
4642
4689
|
},
|
|
4643
|
-
/* @__PURE__ */
|
|
4690
|
+
/* @__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
4691
|
day: "numeric"
|
|
4645
4692
|
}), " de ", day.toLocaleDateString("es-ES", {
|
|
4646
4693
|
month: "short"
|
|
4647
4694
|
}), ", ", day.toLocaleDateString("es-ES", {
|
|
4648
4695
|
weekday: "long"
|
|
4649
4696
|
}))),
|
|
4650
|
-
/* @__PURE__ */
|
|
4697
|
+
/* @__PURE__ */ React38.createElement(Box22, { sx: {
|
|
4651
4698
|
display: "flex",
|
|
4652
4699
|
flexDirection: "column"
|
|
4653
4700
|
} }, (() => {
|
|
@@ -4656,16 +4703,16 @@ var SCActivityCalendar = ({
|
|
|
4656
4703
|
(event2) => (/* @__PURE__ */ new Date(event2.date + "T00:00:00")).toDateString() === day.toDateString()
|
|
4657
4704
|
);
|
|
4658
4705
|
if (eventosDelDia.length > 0) {
|
|
4659
|
-
return eventosDelDia.map((event2, idx) => /* @__PURE__ */
|
|
4706
|
+
return eventosDelDia.map((event2, idx) => /* @__PURE__ */ React38.createElement(
|
|
4660
4707
|
SCListContent,
|
|
4661
4708
|
{
|
|
4662
4709
|
key: idx,
|
|
4663
4710
|
options: [{
|
|
4664
4711
|
title: event2.activityDescription,
|
|
4665
|
-
subtitle: /* @__PURE__ */
|
|
4712
|
+
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
4713
|
iconLeftColor: event2.state === "Finalizada" ? "#C7E49D" : "action",
|
|
4667
4714
|
iconLeft: event2.state === "Finalizada" ? "CheckCircle" : event2.state === "Aplazada" ? "EventBusyOutlined" : event2.state === "En progreso" ? "PendingOutlined" : "RadioButtonUnchecked",
|
|
4668
|
-
description: /* @__PURE__ */
|
|
4715
|
+
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
4716
|
divider: eventosDelDia.length === idx + 1 ? false : true,
|
|
4670
4717
|
colorDisabled: event2.state === "Finalizada" || event2.state === "Aplazada" || event2.state === "En progreso" ? true : false,
|
|
4671
4718
|
fn: fn ? () => fn(event2) : void 0
|
|
@@ -4673,7 +4720,7 @@ var SCActivityCalendar = ({
|
|
|
4673
4720
|
}
|
|
4674
4721
|
));
|
|
4675
4722
|
} else {
|
|
4676
|
-
return /* @__PURE__ */
|
|
4723
|
+
return /* @__PURE__ */ React38.createElement(
|
|
4677
4724
|
SCListContent,
|
|
4678
4725
|
{
|
|
4679
4726
|
options: [{
|
|
@@ -4689,8 +4736,8 @@ var SCActivityCalendar = ({
|
|
|
4689
4736
|
};
|
|
4690
4737
|
|
|
4691
4738
|
// src/Components/SCAlert.tsx
|
|
4692
|
-
import
|
|
4693
|
-
import { Alert, AlertTitle, Typography as
|
|
4739
|
+
import React39 from "react";
|
|
4740
|
+
import { Alert, AlertTitle, Typography as Typography22 } from "@mui/material";
|
|
4694
4741
|
var SCAlert = ({
|
|
4695
4742
|
title,
|
|
4696
4743
|
subtitle,
|
|
@@ -4704,7 +4751,7 @@ var SCAlert = ({
|
|
|
4704
4751
|
const handleClose = (event2) => {
|
|
4705
4752
|
setOpenState(false);
|
|
4706
4753
|
};
|
|
4707
|
-
return /* @__PURE__ */
|
|
4754
|
+
return /* @__PURE__ */ React39.createElement(React39.Fragment, null, openState && /* @__PURE__ */ React39.createElement(
|
|
4708
4755
|
Alert,
|
|
4709
4756
|
__spreadProps(__spreadValues({
|
|
4710
4757
|
severity,
|
|
@@ -4719,15 +4766,15 @@ var SCAlert = ({
|
|
|
4719
4766
|
}
|
|
4720
4767
|
})
|
|
4721
4768
|
}),
|
|
4722
|
-
/* @__PURE__ */
|
|
4723
|
-
subtitle ? /* @__PURE__ */
|
|
4769
|
+
/* @__PURE__ */ React39.createElement(AlertTitle, null, title),
|
|
4770
|
+
subtitle ? /* @__PURE__ */ React39.createElement(Typography22, { variant: "body3" }, subtitle) : null
|
|
4724
4771
|
));
|
|
4725
4772
|
};
|
|
4726
4773
|
|
|
4727
4774
|
// src/Components/SCAppBar.tsx
|
|
4728
|
-
import
|
|
4729
|
-
import { Menu as Menu4, Box as Box23, Typography as
|
|
4730
|
-
import
|
|
4775
|
+
import React40, { useState as useState20, useEffect as useEffect15 } from "react";
|
|
4776
|
+
import { Menu as Menu4, Box as Box23, Typography as Typography23, MenuItem as MenuItem8, IconButton as IconButton14, Badge as Badge2 } from "@mui/material";
|
|
4777
|
+
import Grid10 from "@mui/material/Grid";
|
|
4731
4778
|
import "dayjs/locale/es";
|
|
4732
4779
|
import MenuIcon from "@mui/icons-material/Menu";
|
|
4733
4780
|
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
|
|
@@ -4741,8 +4788,8 @@ var SCAppBar = ({
|
|
|
4741
4788
|
visibleConexion = true,
|
|
4742
4789
|
visibleMenu = true
|
|
4743
4790
|
}) => {
|
|
4744
|
-
const [isOnline, setIsOnline] =
|
|
4745
|
-
const [anchorEl, setAnchorEl] =
|
|
4791
|
+
const [isOnline, setIsOnline] = useState20(window.navigator.onLine);
|
|
4792
|
+
const [anchorEl, setAnchorEl] = useState20(null);
|
|
4746
4793
|
const openMenu = Boolean(anchorEl);
|
|
4747
4794
|
const handleMenuClick = (event2) => {
|
|
4748
4795
|
setAnchorEl(event2.currentTarget);
|
|
@@ -4764,7 +4811,7 @@ var SCAppBar = ({
|
|
|
4764
4811
|
window.removeEventListener("offline", handleOffline);
|
|
4765
4812
|
};
|
|
4766
4813
|
}, []);
|
|
4767
|
-
return /* @__PURE__ */
|
|
4814
|
+
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
4815
|
Badge2,
|
|
4769
4816
|
{
|
|
4770
4817
|
anchorOrigin: {
|
|
@@ -4779,7 +4826,7 @@ var SCAppBar = ({
|
|
|
4779
4826
|
},
|
|
4780
4827
|
color: isOnline ? "success" : "error"
|
|
4781
4828
|
}
|
|
4782
|
-
), /* @__PURE__ */
|
|
4829
|
+
), /* @__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
4830
|
Menu4,
|
|
4784
4831
|
{
|
|
4785
4832
|
anchorEl,
|
|
@@ -4795,14 +4842,14 @@ var SCAppBar = ({
|
|
|
4795
4842
|
},
|
|
4796
4843
|
sx: { zIndex: "2000" }
|
|
4797
4844
|
},
|
|
4798
|
-
options.map((option, index) => /* @__PURE__ */
|
|
4799
|
-
)))), /* @__PURE__ */
|
|
4845
|
+
options.map((option, index) => /* @__PURE__ */ React40.createElement(MenuItem8, { onClick: option.fn, disabled: option.disabled, key: index }, /* @__PURE__ */ React40.createElement(Typography23, { variant: "body2" }, option.name)))
|
|
4846
|
+
)))), /* @__PURE__ */ React40.createElement(Box23, { sx: { padding: "8px 16px 0px 16px" } }, contenidoExtra)));
|
|
4800
4847
|
};
|
|
4801
4848
|
|
|
4802
4849
|
// src/Components/SCCalendarSwipeable.tsx
|
|
4803
|
-
import
|
|
4804
|
-
import { Typography as
|
|
4805
|
-
import
|
|
4850
|
+
import React41, { useState as useState21 } from "react";
|
|
4851
|
+
import { Typography as Typography24, IconButton as IconButton15, Box as Box24 } from "@mui/material";
|
|
4852
|
+
import Grid11 from "@mui/material/Grid";
|
|
4806
4853
|
import { AdapterDateFns as AdapterDateFns2 } from "@mui/x-date-pickers/AdapterDateFns";
|
|
4807
4854
|
import { LocalizationProvider as LocalizationProvider3 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
4808
4855
|
import { StaticDatePicker as StaticDatePicker2 } from "@mui/x-date-pickers/StaticDatePicker";
|
|
@@ -4819,14 +4866,14 @@ var SCCalendarSwipeable = ({
|
|
|
4819
4866
|
state
|
|
4820
4867
|
}) => {
|
|
4821
4868
|
let convertFecha;
|
|
4822
|
-
const [fecha, setFecha] =
|
|
4823
|
-
const [fechaSeleccionada, setFechaSeleccionada] =
|
|
4824
|
-
const [stateVal, setstateVal] =
|
|
4825
|
-
const [openCalendar, setOpenCalendar] =
|
|
4869
|
+
const [fecha, setFecha] = useState21(/* @__PURE__ */ new Date());
|
|
4870
|
+
const [fechaSeleccionada, setFechaSeleccionada] = useState21();
|
|
4871
|
+
const [stateVal, setstateVal] = React41.useState(/* @__PURE__ */ new Date());
|
|
4872
|
+
const [openCalendar, setOpenCalendar] = React41.useState(false);
|
|
4826
4873
|
const hoy = /* @__PURE__ */ new Date();
|
|
4827
4874
|
const inicioSemana = startOfWeek2(fecha, { weekStartsOn: 0 });
|
|
4828
4875
|
const diasSemana = Array.from({ length: 7 }, (_, i) => addDays2(inicioSemana, i));
|
|
4829
|
-
|
|
4876
|
+
React41.useEffect(() => {
|
|
4830
4877
|
if (fecha != null) {
|
|
4831
4878
|
handleConvertFecha(fecha);
|
|
4832
4879
|
}
|
|
@@ -4850,7 +4897,7 @@ var SCCalendarSwipeable = ({
|
|
|
4850
4897
|
// 0 = domingo, 1 = lunes
|
|
4851
4898
|
})
|
|
4852
4899
|
});
|
|
4853
|
-
return /* @__PURE__ */
|
|
4900
|
+
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
4901
|
Box24,
|
|
4855
4902
|
{
|
|
4856
4903
|
onClick: () => setFecha(dia),
|
|
@@ -4866,8 +4913,8 @@ var SCCalendarSwipeable = ({
|
|
|
4866
4913
|
//height: '36px',
|
|
4867
4914
|
}
|
|
4868
4915
|
},
|
|
4869
|
-
/* @__PURE__ */
|
|
4870
|
-
)))), /* @__PURE__ */
|
|
4916
|
+
/* @__PURE__ */ React41.createElement(Typography24, { sx: { fontSize: "12px !important", color: isSameDay2(dia, fecha) ? "white" : "#101840DE" } }, format2(dia, "d"))
|
|
4917
|
+
)))), /* @__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
4918
|
StaticDatePicker2,
|
|
4872
4919
|
{
|
|
4873
4920
|
orientation: "landscape",
|
|
@@ -4892,11 +4939,11 @@ var SCCalendarSwipeable = ({
|
|
|
4892
4939
|
},
|
|
4893
4940
|
onChange: (newValue) => setFecha(newValue)
|
|
4894
4941
|
}
|
|
4895
|
-
), /* @__PURE__ */
|
|
4942
|
+
), /* @__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
4943
|
};
|
|
4897
4944
|
|
|
4898
4945
|
// src/Components/SCCard.tsx
|
|
4899
|
-
import
|
|
4946
|
+
import React42 from "react";
|
|
4900
4947
|
import { Button as Button18, Box as Box25, SvgIcon as SvgIcon9 } from "@mui/material";
|
|
4901
4948
|
import IconButton16 from "@mui/material/IconButton";
|
|
4902
4949
|
import Card2 from "@mui/material/Card";
|
|
@@ -4905,15 +4952,15 @@ import CardMedia from "@mui/material/CardMedia";
|
|
|
4905
4952
|
import CardContent2 from "@mui/material/CardContent";
|
|
4906
4953
|
import CardActions from "@mui/material/CardActions";
|
|
4907
4954
|
import Collapse2 from "@mui/material/Collapse";
|
|
4908
|
-
import
|
|
4955
|
+
import ExpandMoreIcon2 from "@mui/icons-material/ExpandMore";
|
|
4909
4956
|
import * as Muicon8 from "@mui/icons-material";
|
|
4910
4957
|
var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
|
|
4911
4958
|
let iconTitleValidation = "";
|
|
4912
4959
|
let IconTitle;
|
|
4913
|
-
const [expanded, setExpanded] =
|
|
4960
|
+
const [expanded, setExpanded] = React42.useState(false);
|
|
4914
4961
|
if (iconTitle) {
|
|
4915
4962
|
if (Muicon8[iconTitle] == void 0) {
|
|
4916
|
-
if (iconTitle &&
|
|
4963
|
+
if (iconTitle && React42.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
4917
4964
|
iconTitleValidation = "image";
|
|
4918
4965
|
IconTitle = iconTitle;
|
|
4919
4966
|
} else {
|
|
@@ -4928,11 +4975,11 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
4928
4975
|
const handleExpandClick = () => {
|
|
4929
4976
|
setExpanded(!expanded);
|
|
4930
4977
|
};
|
|
4931
|
-
return /* @__PURE__ */
|
|
4978
|
+
return /* @__PURE__ */ React42.createElement(Card2, { sx: { width: width || "auto" } }, title && /* @__PURE__ */ React42.createElement(
|
|
4932
4979
|
CardHeader,
|
|
4933
4980
|
{
|
|
4934
|
-
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */
|
|
4935
|
-
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */
|
|
4981
|
+
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,
|
|
4982
|
+
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
4983
|
title,
|
|
4937
4984
|
subheader: subtitle,
|
|
4938
4985
|
sx: {
|
|
@@ -4951,14 +4998,14 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
4951
4998
|
}
|
|
4952
4999
|
}
|
|
4953
5000
|
}
|
|
4954
|
-
), image && /* @__PURE__ */
|
|
5001
|
+
), image && /* @__PURE__ */ React42.createElement(
|
|
4955
5002
|
CardMedia,
|
|
4956
5003
|
{
|
|
4957
5004
|
component: "img",
|
|
4958
5005
|
height: "194",
|
|
4959
5006
|
image
|
|
4960
5007
|
}
|
|
4961
|
-
), content && /* @__PURE__ */
|
|
5008
|
+
), 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
5009
|
Button18,
|
|
4963
5010
|
{
|
|
4964
5011
|
key: index,
|
|
@@ -4969,11 +5016,11 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
4969
5016
|
disabled: action.disabled || false
|
|
4970
5017
|
},
|
|
4971
5018
|
action.text
|
|
4972
|
-
)) : ""), expand && /* @__PURE__ */
|
|
5019
|
+
)) : ""), expand && /* @__PURE__ */ React42.createElement(Collapse2, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React42.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, expand.content)));
|
|
4973
5020
|
};
|
|
4974
5021
|
|
|
4975
5022
|
// src/Components/SCDataGrid.tsx
|
|
4976
|
-
import
|
|
5023
|
+
import React43, { useEffect as useEffect18, useState as useState23 } from "react";
|
|
4977
5024
|
import { DataGridPro, useGridApiRef } from "@mui/x-data-grid-pro";
|
|
4978
5025
|
import { LicenseInfo as LicenseInfo2 } from "@mui/x-license";
|
|
4979
5026
|
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
@@ -5064,7 +5111,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5064
5111
|
label = label;
|
|
5065
5112
|
}
|
|
5066
5113
|
}
|
|
5067
|
-
return /* @__PURE__ */
|
|
5114
|
+
return /* @__PURE__ */ React43.createElement(
|
|
5068
5115
|
"div",
|
|
5069
5116
|
{
|
|
5070
5117
|
style: {
|
|
@@ -5081,7 +5128,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5081
5128
|
fontWeight: params.rowNode.type == "group" ? "400" : "300"
|
|
5082
5129
|
}
|
|
5083
5130
|
},
|
|
5084
|
-
params.rowNode.type === "group" && /* @__PURE__ */
|
|
5131
|
+
params.rowNode.type === "group" && /* @__PURE__ */ React43.createElement(
|
|
5085
5132
|
"span",
|
|
5086
5133
|
{
|
|
5087
5134
|
style: {
|
|
@@ -5094,7 +5141,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5094
5141
|
params.api.setRowChildrenExpansion(params.id, !params.rowNode.childrenExpanded);
|
|
5095
5142
|
}
|
|
5096
5143
|
},
|
|
5097
|
-
params.rowNode.childrenExpanded ? /* @__PURE__ */
|
|
5144
|
+
params.rowNode.childrenExpanded ? /* @__PURE__ */ React43.createElement(KeyboardArrowUpIcon, { fontSize: "small", color: "action" }) : /* @__PURE__ */ React43.createElement(KeyboardArrowDownIcon, { fontSize: "small", color: "action" })
|
|
5098
5145
|
),
|
|
5099
5146
|
label
|
|
5100
5147
|
);
|
|
@@ -5136,10 +5183,10 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5136
5183
|
let styleRowHeight = density == "compact" ? 32 : density == "standard" ? 28 : density == "comfortable" ? 31 : 32;
|
|
5137
5184
|
let rows = rowsTable ? rowsTable : validationTreeData != false ? parseInt(data.length.toString()) : data.length < 10 ? parseInt(data.length.toString()) : 10;
|
|
5138
5185
|
let validationGroupingColDef = groupingColDefs || {};
|
|
5139
|
-
const [groupDataLenght, setGroupDataLengh] =
|
|
5140
|
-
const [pageSize, setPageSize] =
|
|
5141
|
-
const [arrayRows, setArrayRows] =
|
|
5142
|
-
const [selectionModel, setSelectionModel] =
|
|
5186
|
+
const [groupDataLenght, setGroupDataLengh] = useState23(0);
|
|
5187
|
+
const [pageSize, setPageSize] = useState23(rows);
|
|
5188
|
+
const [arrayRows, setArrayRows] = useState23([]);
|
|
5189
|
+
const [selectionModel, setSelectionModel] = useState23([]);
|
|
5143
5190
|
useEffect18(() => {
|
|
5144
5191
|
var _a;
|
|
5145
5192
|
if (setSelectedRow) {
|
|
@@ -5241,7 +5288,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5241
5288
|
apiRef.current.setColumnVisibilityModel(columnVisibilityModel);
|
|
5242
5289
|
}
|
|
5243
5290
|
}, [columnVisibilityModel, apiRef]);
|
|
5244
|
-
return /* @__PURE__ */
|
|
5291
|
+
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
5292
|
DataGridPro,
|
|
5246
5293
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
5247
5294
|
getRowId,
|
|
@@ -5402,13 +5449,13 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5402
5449
|
})
|
|
5403
5450
|
))));
|
|
5404
5451
|
}
|
|
5405
|
-
var SCDataGrid =
|
|
5452
|
+
var SCDataGrid = React43.memo(SCDataGridInitial, (prevProps, nextProps) => {
|
|
5406
5453
|
const isEqual = prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight;
|
|
5407
5454
|
return isEqual;
|
|
5408
5455
|
});
|
|
5409
5456
|
|
|
5410
5457
|
// src/Components/SCDatePicker.tsx
|
|
5411
|
-
import
|
|
5458
|
+
import React44 from "react";
|
|
5412
5459
|
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
|
|
5413
5460
|
import "dayjs/locale/es";
|
|
5414
5461
|
import dayjs10 from "dayjs";
|
|
@@ -5417,7 +5464,7 @@ import { LocalizationProvider as LocalizationProvider4 } from "@mui/x-date-picke
|
|
|
5417
5464
|
import { AdapterDayjs as AdapterDayjs2 } from "@mui/x-date-pickers/AdapterDayjs";
|
|
5418
5465
|
import InsertInvitationOutlinedIcon2 from "@mui/icons-material/InsertInvitationOutlined";
|
|
5419
5466
|
var SCDatePicker = ({ label, required, disabled, background, state, setState, width, minDate, maxDate }) => {
|
|
5420
|
-
return /* @__PURE__ */
|
|
5467
|
+
return /* @__PURE__ */ React44.createElement(LocalizationProvider4, { dateAdapter: AdapterDayjs2, adapterLocale: "es" }, /* @__PURE__ */ React44.createElement(
|
|
5421
5468
|
DatePicker,
|
|
5422
5469
|
{
|
|
5423
5470
|
disabled,
|
|
@@ -5473,9 +5520,9 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
|
|
|
5473
5520
|
};
|
|
5474
5521
|
|
|
5475
5522
|
// src/Components/SCDialog.tsx
|
|
5476
|
-
import
|
|
5477
|
-
import { Button as Button19, Typography as
|
|
5478
|
-
import
|
|
5523
|
+
import React45, { useEffect as useEffect19, useState as useState25 } from "react";
|
|
5524
|
+
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";
|
|
5525
|
+
import Grid12 from "@mui/material/Grid";
|
|
5479
5526
|
import ToggleButton from "@mui/material/ToggleButton";
|
|
5480
5527
|
import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
|
|
5481
5528
|
import CloseIcon2 from "@mui/icons-material/Close";
|
|
@@ -5485,7 +5532,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5485
5532
|
let iconTitleValidation = "";
|
|
5486
5533
|
let IconTitle;
|
|
5487
5534
|
let ButtonIcon;
|
|
5488
|
-
const [open, setOpen] =
|
|
5535
|
+
const [open, setOpen] = useState25(show);
|
|
5489
5536
|
useEffect19(() => {
|
|
5490
5537
|
if (show) {
|
|
5491
5538
|
handleOpen();
|
|
@@ -5538,8 +5585,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5538
5585
|
}
|
|
5539
5586
|
};
|
|
5540
5587
|
const dialogActions = actions == false ? false : actions != void 0 ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
5541
|
-
content = content != null ? content : { component: /* @__PURE__ */
|
|
5542
|
-
return /* @__PURE__ */
|
|
5588
|
+
content = content != null ? content : { component: /* @__PURE__ */ React45.createElement(Box26, null, " Aqui va el contenido ") };
|
|
5589
|
+
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
5590
|
Dialog4,
|
|
5544
5591
|
{
|
|
5545
5592
|
fullScreen: typeView === "mobile" ? true : false,
|
|
@@ -5554,8 +5601,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5554
5601
|
}
|
|
5555
5602
|
}
|
|
5556
5603
|
},
|
|
5557
|
-
title && /* @__PURE__ */
|
|
5558
|
-
/* @__PURE__ */
|
|
5604
|
+
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 : "") : ""),
|
|
5605
|
+
/* @__PURE__ */ React45.createElement(
|
|
5559
5606
|
DialogContent4,
|
|
5560
5607
|
{
|
|
5561
5608
|
"data-testid": "dialog-content",
|
|
@@ -5584,7 +5631,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5584
5631
|
})
|
|
5585
5632
|
}
|
|
5586
5633
|
},
|
|
5587
|
-
content.url ? /* @__PURE__ */
|
|
5634
|
+
content.url ? /* @__PURE__ */ React45.createElement(
|
|
5588
5635
|
"iframe",
|
|
5589
5636
|
{
|
|
5590
5637
|
style: { border: "none", minWidth: "100%", minHeight: "100%" },
|
|
@@ -5594,7 +5641,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5594
5641
|
}
|
|
5595
5642
|
) : content.component
|
|
5596
5643
|
),
|
|
5597
|
-
dialogActions != void 0 && dialogActions != false ? Array.isArray(dialogActions) && (dialogActions == null ? void 0 : dialogActions.length) > 0 ? /* @__PURE__ */
|
|
5644
|
+
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
5645
|
Button19,
|
|
5599
5646
|
{
|
|
5600
5647
|
variant: "text",
|
|
@@ -5602,11 +5649,11 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5602
5649
|
size: "small",
|
|
5603
5650
|
onClick: dialogActions[0].fn,
|
|
5604
5651
|
disabled: dialogActions[0].disabled || false,
|
|
5605
|
-
startIcon: dialogActions[0].icon ? /* @__PURE__ */
|
|
5652
|
+
startIcon: dialogActions[0].icon ? /* @__PURE__ */ React45.createElement(SvgIcon10, { fontSize: "small", component: dialogActions[0].icon }) : void 0
|
|
5606
5653
|
},
|
|
5607
5654
|
dialogActions[0].text
|
|
5608
|
-
), /* @__PURE__ */
|
|
5609
|
-
return /* @__PURE__ */
|
|
5655
|
+
), /* @__PURE__ */ React45.createElement(Box26, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
|
|
5656
|
+
return /* @__PURE__ */ React45.createElement(
|
|
5610
5657
|
Button19,
|
|
5611
5658
|
{
|
|
5612
5659
|
key: index + 1,
|
|
@@ -5615,12 +5662,12 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5615
5662
|
size: "small",
|
|
5616
5663
|
onClick: boton.fn,
|
|
5617
5664
|
disabled: boton.disabled || false,
|
|
5618
|
-
startIcon: boton.icon ? /* @__PURE__ */
|
|
5665
|
+
startIcon: boton.icon ? /* @__PURE__ */ React45.createElement(SvgIcon10, { fontSize: "small", component: boton.icon }) : void 0
|
|
5619
5666
|
},
|
|
5620
5667
|
boton.text
|
|
5621
5668
|
);
|
|
5622
5669
|
}))) : dialogActions.map((boton, index) => {
|
|
5623
|
-
return /* @__PURE__ */
|
|
5670
|
+
return /* @__PURE__ */ React45.createElement(
|
|
5624
5671
|
Button19,
|
|
5625
5672
|
{
|
|
5626
5673
|
key: index,
|
|
@@ -5629,19 +5676,19 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5629
5676
|
size: "small",
|
|
5630
5677
|
onClick: boton.fn,
|
|
5631
5678
|
disabled: boton.disabled || false,
|
|
5632
|
-
startIcon: boton.icon ? /* @__PURE__ */
|
|
5679
|
+
startIcon: boton.icon ? /* @__PURE__ */ React45.createElement(SvgIcon10, { fontSize: "small", component: boton.icon }) : void 0
|
|
5633
5680
|
},
|
|
5634
5681
|
boton.text
|
|
5635
5682
|
);
|
|
5636
|
-
})) : /* @__PURE__ */
|
|
5683
|
+
})) : /* @__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
5684
|
var _a;
|
|
5638
|
-
return /* @__PURE__ */
|
|
5685
|
+
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
5686
|
})))) : "" : ""
|
|
5640
5687
|
)));
|
|
5641
5688
|
};
|
|
5642
5689
|
|
|
5643
5690
|
// src/Components/SCDownloadExcelTable.tsx
|
|
5644
|
-
import
|
|
5691
|
+
import React46 from "react";
|
|
5645
5692
|
import { Button as Button20 } from "@mui/material";
|
|
5646
5693
|
import FileDownloadOutlinedIcon2 from "@mui/icons-material/FileDownloadOutlined";
|
|
5647
5694
|
import * as XLSX from "xlsx";
|
|
@@ -5674,11 +5721,11 @@ var SCDownloadExcelTable = ({
|
|
|
5674
5721
|
XLSX.utils.book_append_sheet(workbook, worksheet, "Hoja1");
|
|
5675
5722
|
XLSX.writeFile(workbook, `${fileName}.xlsx`);
|
|
5676
5723
|
};
|
|
5677
|
-
return /* @__PURE__ */
|
|
5724
|
+
return /* @__PURE__ */ React46.createElement(
|
|
5678
5725
|
Button20,
|
|
5679
5726
|
{
|
|
5680
5727
|
onClick: descargaExcel,
|
|
5681
|
-
startIcon: /* @__PURE__ */
|
|
5728
|
+
startIcon: /* @__PURE__ */ React46.createElement(FileDownloadOutlinedIcon2, null),
|
|
5682
5729
|
size: (downloadButton == null ? void 0 : downloadButton.size) || "small",
|
|
5683
5730
|
color: (downloadButton == null ? void 0 : downloadButton.color) || "primary",
|
|
5684
5731
|
variant: (downloadButton == null ? void 0 : downloadButton.variant) || "text",
|
|
@@ -5689,12 +5736,12 @@ var SCDownloadExcelTable = ({
|
|
|
5689
5736
|
};
|
|
5690
5737
|
|
|
5691
5738
|
// src/Components/SCMenu.tsx
|
|
5692
|
-
import
|
|
5693
|
-
import { Box as Box27, Typography as
|
|
5694
|
-
import
|
|
5739
|
+
import React47 from "react";
|
|
5740
|
+
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";
|
|
5741
|
+
import Grid13 from "@mui/material/Grid";
|
|
5695
5742
|
|
|
5696
5743
|
// src/Components/Hooks/useWindowDimensions.ts
|
|
5697
|
-
import { useState as
|
|
5744
|
+
import { useState as useState26, useEffect as useEffect20 } from "react";
|
|
5698
5745
|
function getWindowDimensions() {
|
|
5699
5746
|
const { innerWidth: width, innerHeight: height } = window;
|
|
5700
5747
|
return {
|
|
@@ -5703,7 +5750,7 @@ function getWindowDimensions() {
|
|
|
5703
5750
|
};
|
|
5704
5751
|
}
|
|
5705
5752
|
function useWindowDimensions() {
|
|
5706
|
-
const [windowDimensions, setWindowDimensions] =
|
|
5753
|
+
const [windowDimensions, setWindowDimensions] = useState26(getWindowDimensions());
|
|
5707
5754
|
useEffect20(() => {
|
|
5708
5755
|
function handleResize() {
|
|
5709
5756
|
setWindowDimensions(getWindowDimensions());
|
|
@@ -5722,12 +5769,12 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5722
5769
|
const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
|
|
5723
5770
|
const widthContainer = menuSize + pageSize;
|
|
5724
5771
|
let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
5725
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5726
|
-
const [value, setValue] =
|
|
5727
|
-
|
|
5772
|
+
const [selectedIndex, setSelectedIndex] = React47.useState("1");
|
|
5773
|
+
const [value, setValue] = React47.useState("1");
|
|
5774
|
+
React47.useEffect(() => {
|
|
5728
5775
|
heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
5729
5776
|
}, [height]);
|
|
5730
|
-
|
|
5777
|
+
React47.useEffect(() => {
|
|
5731
5778
|
if (defaultOption) {
|
|
5732
5779
|
handleClickMenusItem(event, void 0);
|
|
5733
5780
|
}
|
|
@@ -5757,7 +5804,7 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5757
5804
|
setValue(String(index + 1));
|
|
5758
5805
|
}
|
|
5759
5806
|
};
|
|
5760
|
-
return /* @__PURE__ */
|
|
5807
|
+
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
5808
|
MenuItem9,
|
|
5762
5809
|
{
|
|
5763
5810
|
disabled: disable == true ? true : false,
|
|
@@ -5765,13 +5812,13 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5765
5812
|
selected: String(index + 1) === selectedIndex,
|
|
5766
5813
|
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
5767
5814
|
},
|
|
5768
|
-
option.iconLeft ? /* @__PURE__ */
|
|
5769
|
-
/* @__PURE__ */
|
|
5770
|
-
), option.divider == true ? /* @__PURE__ */
|
|
5815
|
+
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 })) : "",
|
|
5816
|
+
/* @__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 })) : "")
|
|
5817
|
+
), 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
5818
|
};
|
|
5772
5819
|
|
|
5773
5820
|
// src/Components/SCSnackBar.tsx
|
|
5774
|
-
import
|
|
5821
|
+
import React48 from "react";
|
|
5775
5822
|
import MuiAlert from "@mui/material/Alert";
|
|
5776
5823
|
import "dayjs/locale/es";
|
|
5777
5824
|
import Snackbar from "@mui/material/Snackbar";
|
|
@@ -5792,7 +5839,7 @@ var SCSnackBar = ({
|
|
|
5792
5839
|
}
|
|
5793
5840
|
setOpenState(false);
|
|
5794
5841
|
};
|
|
5795
|
-
return /* @__PURE__ */
|
|
5842
|
+
return /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(
|
|
5796
5843
|
Snackbar,
|
|
5797
5844
|
__spreadProps(__spreadValues({
|
|
5798
5845
|
anchorOrigin: { vertical: posicionVertical, horizontal: posicionHorizontal },
|
|
@@ -5801,7 +5848,7 @@ var SCSnackBar = ({
|
|
|
5801
5848
|
}, close ? { onClose: handleClose } : {}), {
|
|
5802
5849
|
sx: { zIndex: 2e3 }
|
|
5803
5850
|
}),
|
|
5804
|
-
/* @__PURE__ */
|
|
5851
|
+
/* @__PURE__ */ React48.createElement(
|
|
5805
5852
|
MuiAlert,
|
|
5806
5853
|
__spreadProps(__spreadValues({}, close ? { onClose: handleClose } : {}), {
|
|
5807
5854
|
severity: type,
|
|
@@ -5813,19 +5860,19 @@ var SCSnackBar = ({
|
|
|
5813
5860
|
};
|
|
5814
5861
|
|
|
5815
5862
|
// src/Components/SCTabs.tsx
|
|
5816
|
-
import
|
|
5817
|
-
import { Typography as
|
|
5863
|
+
import React49, { useEffect as useEffect21 } from "react";
|
|
5864
|
+
import { Typography as Typography28, Box as Box28, SvgIcon as SvgIcon12, Tab as Tab3, Tabs as Tabs3, Badge as Badge3 } from "@mui/material";
|
|
5818
5865
|
import TabPanel from "@mui/lab/TabPanel";
|
|
5819
5866
|
import TabContext from "@mui/lab/TabContext";
|
|
5820
5867
|
import * as Muicon11 from "@mui/icons-material";
|
|
5821
5868
|
var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
|
|
5822
|
-
const [toast, setToast] =
|
|
5869
|
+
const [toast, setToast] = React49.useState(null);
|
|
5823
5870
|
let i = 0;
|
|
5824
5871
|
let j = 0;
|
|
5825
5872
|
let k = 0;
|
|
5826
5873
|
let l = 0;
|
|
5827
5874
|
let validateTypeIcon = true;
|
|
5828
|
-
const [value, setValue] =
|
|
5875
|
+
const [value, setValue] = React49.useState("1");
|
|
5829
5876
|
useEffect21(() => {
|
|
5830
5877
|
if (defaultOption) {
|
|
5831
5878
|
handleChange(event, void 0);
|
|
@@ -5876,7 +5923,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5876
5923
|
setValue(newValue);
|
|
5877
5924
|
}
|
|
5878
5925
|
};
|
|
5879
|
-
return /* @__PURE__ */
|
|
5926
|
+
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
5927
|
Tabs3,
|
|
5881
5928
|
{
|
|
5882
5929
|
"data-testid": "tab-container",
|
|
@@ -5890,7 +5937,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5890
5937
|
orientation: orientation || "horizontal",
|
|
5891
5938
|
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
5892
5939
|
},
|
|
5893
|
-
options.map((option) => /* @__PURE__ */
|
|
5940
|
+
options.map((option) => /* @__PURE__ */ React49.createElement(
|
|
5894
5941
|
Tab3,
|
|
5895
5942
|
{
|
|
5896
5943
|
"data-testid": "tab-item",
|
|
@@ -5899,7 +5946,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5899
5946
|
label: option.name || "",
|
|
5900
5947
|
disabled: option.disabled || false,
|
|
5901
5948
|
iconPosition: iconPosition || "end",
|
|
5902
|
-
icon: typeIcon == "badge" ? /* @__PURE__ */
|
|
5949
|
+
icon: typeIcon == "badge" ? /* @__PURE__ */ React49.createElement(
|
|
5903
5950
|
Badge3,
|
|
5904
5951
|
{
|
|
5905
5952
|
sx: {
|
|
@@ -5914,23 +5961,23 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5914
5961
|
badgeContent: option.iconOrBadge,
|
|
5915
5962
|
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
5916
5963
|
}
|
|
5917
|
-
) : typeIcon == "icon" ? /* @__PURE__ */
|
|
5964
|
+
) : 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
5965
|
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
5919
5966
|
}
|
|
5920
5967
|
))
|
|
5921
|
-
), children, options.map((option) => /* @__PURE__ */
|
|
5968
|
+
), children, options.map((option) => /* @__PURE__ */ React49.createElement(
|
|
5922
5969
|
TabPanel,
|
|
5923
5970
|
{
|
|
5924
5971
|
key: k = k + 1,
|
|
5925
5972
|
value: String(l = l + 1),
|
|
5926
5973
|
sx: { padding: "16px" }
|
|
5927
5974
|
},
|
|
5928
|
-
option.page ? option.page : /* @__PURE__ */
|
|
5929
|
-
)))) : /* @__PURE__ */
|
|
5975
|
+
option.page ? option.page : /* @__PURE__ */ React49.createElement(Typography28, null, "No se ha configurado el componente a visualizar ")
|
|
5976
|
+
)))) : /* @__PURE__ */ React49.createElement(Box28, { sx: { height: "200px" } }, toast && /* @__PURE__ */ React49.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
5930
5977
|
};
|
|
5931
5978
|
|
|
5932
5979
|
// src/Components/SCTime.tsx
|
|
5933
|
-
import
|
|
5980
|
+
import React50, { useState as useState28 } from "react";
|
|
5934
5981
|
import { Box as Box29, InputAdornment as InputAdornment6, Popover as Popover8, ClickAwayListener as ClickAwayListener3 } from "@mui/material";
|
|
5935
5982
|
import { LocalizationProvider as LocalizationProvider5 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
5936
5983
|
import { AdapterDayjs as AdapterDayjs3 } from "@mui/x-date-pickers/AdapterDayjs";
|
|
@@ -5956,10 +6003,10 @@ var SCTime = ({
|
|
|
5956
6003
|
);
|
|
5957
6004
|
const isTimeEmpty = required && !state;
|
|
5958
6005
|
const hasError = isTimeEmpty || error;
|
|
5959
|
-
const [anchorEl, setAnchorEl] =
|
|
5960
|
-
const [isOpenPopover, setIsOpenPopover] =
|
|
5961
|
-
const [popoverPlacement, setPopoverPlacement] =
|
|
5962
|
-
const [popoverWidth, setPopoverWidth] =
|
|
6006
|
+
const [anchorEl, setAnchorEl] = useState28(null);
|
|
6007
|
+
const [isOpenPopover, setIsOpenPopover] = useState28(false);
|
|
6008
|
+
const [popoverPlacement, setPopoverPlacement] = useState28("bottom");
|
|
6009
|
+
const [popoverWidth, setPopoverWidth] = useState28(void 0);
|
|
5963
6010
|
const detectPlacement = (element) => {
|
|
5964
6011
|
const rect = element.getBoundingClientRect();
|
|
5965
6012
|
const windowHeight = window.innerHeight;
|
|
@@ -5991,7 +6038,7 @@ var SCTime = ({
|
|
|
5991
6038
|
setIsOpenPopover(false);
|
|
5992
6039
|
setAnchorEl(null);
|
|
5993
6040
|
};
|
|
5994
|
-
return /* @__PURE__ */
|
|
6041
|
+
return /* @__PURE__ */ React50.createElement(LocalizationProvider5, { dateAdapter: AdapterDayjs3 }, /* @__PURE__ */ React50.createElement(Box29, { sx: { position: "relative", minWidth: "120px", width: width ? `${width}%` : "99%" } }, /* @__PURE__ */ React50.createElement(
|
|
5995
6042
|
TimeField,
|
|
5996
6043
|
{
|
|
5997
6044
|
label,
|
|
@@ -6003,7 +6050,7 @@ var SCTime = ({
|
|
|
6003
6050
|
slotProps: {
|
|
6004
6051
|
textField: {
|
|
6005
6052
|
InputProps: {
|
|
6006
|
-
endAdornment: /* @__PURE__ */
|
|
6053
|
+
endAdornment: /* @__PURE__ */ React50.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React50.createElement(
|
|
6007
6054
|
AccessTimeIcon,
|
|
6008
6055
|
{
|
|
6009
6056
|
color: disabled ? "disabled" : "action",
|
|
@@ -6032,7 +6079,7 @@ var SCTime = ({
|
|
|
6032
6079
|
}
|
|
6033
6080
|
}
|
|
6034
6081
|
}
|
|
6035
|
-
), /* @__PURE__ */
|
|
6082
|
+
), /* @__PURE__ */ React50.createElement(
|
|
6036
6083
|
Popover8,
|
|
6037
6084
|
{
|
|
6038
6085
|
open: isOpenPopover,
|
|
@@ -6063,7 +6110,7 @@ var SCTime = ({
|
|
|
6063
6110
|
}
|
|
6064
6111
|
}
|
|
6065
6112
|
},
|
|
6066
|
-
/* @__PURE__ */
|
|
6113
|
+
/* @__PURE__ */ React50.createElement(ClickAwayListener3, { onClickAway: handleClose }, /* @__PURE__ */ React50.createElement(Box29, { sx: { p: 0 } }, /* @__PURE__ */ React50.createElement(
|
|
6067
6114
|
DigitalClock,
|
|
6068
6115
|
{
|
|
6069
6116
|
value: state,
|
|
@@ -6086,14 +6133,14 @@ var SCTime = ({
|
|
|
6086
6133
|
};
|
|
6087
6134
|
|
|
6088
6135
|
// src/Components/SCZoom.tsx
|
|
6089
|
-
import
|
|
6090
|
-
import { Typography as
|
|
6091
|
-
import
|
|
6136
|
+
import React51, { useState as useState29 } from "react";
|
|
6137
|
+
import { Typography as Typography30, Divider as Divider9, IconButton as IconButton18, Box as Box30 } from "@mui/material";
|
|
6138
|
+
import Grid14 from "@mui/material/Grid";
|
|
6092
6139
|
import ZoomOutIcon from "@mui/icons-material/ZoomOut";
|
|
6093
6140
|
import ZoomInIcon from "@mui/icons-material/ZoomIn";
|
|
6094
6141
|
import RotateRightIcon from "@mui/icons-material/RotateRight";
|
|
6095
6142
|
var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
6096
|
-
const [zoom, setZoom] =
|
|
6143
|
+
const [zoom, setZoom] = useState29(1);
|
|
6097
6144
|
const handleZoomIn = () => {
|
|
6098
6145
|
setZoom((prev) => Math.min(prev + 0.2, 3));
|
|
6099
6146
|
};
|
|
@@ -6103,7 +6150,7 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6103
6150
|
const handleReset = () => {
|
|
6104
6151
|
setZoom(1);
|
|
6105
6152
|
};
|
|
6106
|
-
return /* @__PURE__ */
|
|
6153
|
+
return /* @__PURE__ */ React51.createElement(Box30, { style: { width: width || "280px", height: height || "280px" } }, /* @__PURE__ */ React51.createElement(
|
|
6107
6154
|
Box30,
|
|
6108
6155
|
{
|
|
6109
6156
|
sx: {
|
|
@@ -6113,7 +6160,7 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6113
6160
|
height: height || "340px"
|
|
6114
6161
|
}
|
|
6115
6162
|
},
|
|
6116
|
-
/* @__PURE__ */
|
|
6163
|
+
/* @__PURE__ */ React51.createElement(
|
|
6117
6164
|
"img",
|
|
6118
6165
|
{
|
|
6119
6166
|
src: image,
|
|
@@ -6125,14 +6172,14 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6125
6172
|
}
|
|
6126
6173
|
}
|
|
6127
6174
|
)
|
|
6128
|
-
), /* @__PURE__ */
|
|
6175
|
+
), /* @__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
6176
|
};
|
|
6130
6177
|
|
|
6131
6178
|
// src/Theme/index.ts
|
|
6132
6179
|
import { createTheme } from "@mui/material/styles";
|
|
6133
6180
|
|
|
6134
6181
|
// src/Theme/components.ts
|
|
6135
|
-
import
|
|
6182
|
+
import React52 from "react";
|
|
6136
6183
|
import {
|
|
6137
6184
|
InfoRounded as InfoRounded2,
|
|
6138
6185
|
CheckCircleRounded as CheckCircleRounded2,
|
|
@@ -6836,10 +6883,10 @@ var components = {
|
|
|
6836
6883
|
MuiAlert: {
|
|
6837
6884
|
defaultProps: {
|
|
6838
6885
|
iconMapping: {
|
|
6839
|
-
success:
|
|
6840
|
-
error:
|
|
6841
|
-
warning:
|
|
6842
|
-
info:
|
|
6886
|
+
success: React52.createElement(CheckCircleRounded2),
|
|
6887
|
+
error: React52.createElement(ErrorRounded2),
|
|
6888
|
+
warning: React52.createElement(WarningRounded2),
|
|
6889
|
+
info: React52.createElement(InfoRounded2)
|
|
6843
6890
|
}
|
|
6844
6891
|
},
|
|
6845
6892
|
variants: [
|
|
@@ -7890,6 +7937,7 @@ export {
|
|
|
7890
7937
|
FooterAction,
|
|
7891
7938
|
MultiSelect,
|
|
7892
7939
|
PageHeader,
|
|
7940
|
+
SCAccordion,
|
|
7893
7941
|
SCActivityCalendar,
|
|
7894
7942
|
SCAlert,
|
|
7895
7943
|
SCAppBar,
|