componentes-sinco 1.2.5 → 1.2.7
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 +32 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +80 -79
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -215,6 +215,7 @@ interface DrawerProps<T> {
|
|
|
215
215
|
heightDrawer?: number;
|
|
216
216
|
filterSideCard?: any;
|
|
217
217
|
onChipDelete?: (element: any) => void;
|
|
218
|
+
type?: "Drawer" | "Sidecar" | "Swipeable";
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
type ToastType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -241,7 +242,7 @@ declare const ToastProgress: (timeProgress: number) => {
|
|
|
241
242
|
progressToast: number;
|
|
242
243
|
};
|
|
243
244
|
|
|
244
|
-
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, filterSideCard, onChipDelete, }: DrawerProps<T>): React__default.JSX.Element;
|
|
245
|
+
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, filterSideCard, type, onChipDelete, }: DrawerProps<T>): React__default.JSX.Element;
|
|
245
246
|
|
|
246
247
|
type EmptyStateStates = 'create' | 'error' | 'noResult' | 'search';
|
|
247
248
|
type EmptyStateSize = 'small' | 'large';
|
|
@@ -455,7 +456,7 @@ interface SCTextFieldProps {
|
|
|
455
456
|
declare const SCTextField: ({ title, iconTitle, infoTitle, label, placeholder, infoElement, iconInputStart, iconInputEnd, maxLength, variant, format, disabled, required, size, width, color, background, setState, state, onChange, onBlur, onKeyDown, }: SCTextFieldProps) => React__default.JSX.Element;
|
|
456
457
|
|
|
457
458
|
interface SCAccordionProps {
|
|
458
|
-
title?: string;
|
|
459
|
+
title?: string | React__default.ReactNode;
|
|
459
460
|
actions?: React__default.ReactNode;
|
|
460
461
|
children?: any;
|
|
461
462
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -215,6 +215,7 @@ interface DrawerProps<T> {
|
|
|
215
215
|
heightDrawer?: number;
|
|
216
216
|
filterSideCard?: any;
|
|
217
217
|
onChipDelete?: (element: any) => void;
|
|
218
|
+
type?: "Drawer" | "Sidecar" | "Swipeable";
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
type ToastType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -241,7 +242,7 @@ declare const ToastProgress: (timeProgress: number) => {
|
|
|
241
242
|
progressToast: number;
|
|
242
243
|
};
|
|
243
244
|
|
|
244
|
-
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, filterSideCard, onChipDelete, }: DrawerProps<T>): React__default.JSX.Element;
|
|
245
|
+
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, filterSideCard, type, onChipDelete, }: DrawerProps<T>): React__default.JSX.Element;
|
|
245
246
|
|
|
246
247
|
type EmptyStateStates = 'create' | 'error' | 'noResult' | 'search';
|
|
247
248
|
type EmptyStateSize = 'small' | 'large';
|
|
@@ -455,7 +456,7 @@ interface SCTextFieldProps {
|
|
|
455
456
|
declare const SCTextField: ({ title, iconTitle, infoTitle, label, placeholder, infoElement, iconInputStart, iconInputEnd, maxLength, variant, format, disabled, required, size, width, color, background, setState, state, onChange, onBlur, onKeyDown, }: SCTextFieldProps) => React__default.JSX.Element;
|
|
456
457
|
|
|
457
458
|
interface SCAccordionProps {
|
|
458
|
-
title?: string;
|
|
459
|
+
title?: string | React__default.ReactNode;
|
|
459
460
|
actions?: React__default.ReactNode;
|
|
460
461
|
children?: any;
|
|
461
462
|
}
|
package/dist/index.js
CHANGED
|
@@ -1564,7 +1564,24 @@ var useChipFilters = (arrayElements, chipFilters) => {
|
|
|
1564
1564
|
return;
|
|
1565
1565
|
}
|
|
1566
1566
|
arrayElements.forEach((arrayElement) => {
|
|
1567
|
+
var _a;
|
|
1567
1568
|
const { validation, element: typeElement } = validateTypeElements(arrayElement);
|
|
1569
|
+
if (Array.isArray((_a = typeElement.state) == null ? void 0 : _a.textValue)) {
|
|
1570
|
+
chipFilters.forEach((chipFilter) => {
|
|
1571
|
+
const chipValue = String(chipFilter).trim();
|
|
1572
|
+
const isInArray = typeElement.state.textValue.some(
|
|
1573
|
+
(v) => String(v).trim() === chipValue
|
|
1574
|
+
);
|
|
1575
|
+
if (isInArray && chipValue !== "" && chipValue !== ",") {
|
|
1576
|
+
setTextFilters((prev) => {
|
|
1577
|
+
const exists = prev.findIndex((f) => f.value === chipValue) !== -1;
|
|
1578
|
+
if (exists) return prev;
|
|
1579
|
+
return [...prev, { value: chipValue, arrayElement: typeElement }];
|
|
1580
|
+
});
|
|
1581
|
+
}
|
|
1582
|
+
});
|
|
1583
|
+
return;
|
|
1584
|
+
}
|
|
1568
1585
|
const currentValue = getCurrentValue(validation, typeElement);
|
|
1569
1586
|
chipFilters.forEach((chipFilter) => {
|
|
1570
1587
|
const chipValue = String(chipFilter).trim();
|
|
@@ -2932,7 +2949,7 @@ var SCDateRange = ({
|
|
|
2932
2949
|
setState
|
|
2933
2950
|
}) => {
|
|
2934
2951
|
LicenseInfo.setLicenseKey(
|
|
2935
|
-
"
|
|
2952
|
+
"aa892a011e4c240f3cdaf811ecfff54fTz0xMjkyODQsRT0xODEwNDI1NTk5MDAwLFM9cHJvLExNPWFubnVhbCxQVj1RMy0yMDI0LEtWPTI="
|
|
2936
2953
|
);
|
|
2937
2954
|
const isStartEmpty = required && !state[0];
|
|
2938
2955
|
const isEndEmpty = required && !state[1];
|
|
@@ -3247,6 +3264,7 @@ function SCDrawer({
|
|
|
3247
3264
|
chipFilters,
|
|
3248
3265
|
heightDrawer = 456,
|
|
3249
3266
|
filterSideCard,
|
|
3267
|
+
type = "Drawer",
|
|
3250
3268
|
onChipDelete
|
|
3251
3269
|
}) {
|
|
3252
3270
|
const drawerBleeding = heightDrawer;
|
|
@@ -3297,7 +3315,7 @@ function SCDrawer({
|
|
|
3297
3315
|
justifyContent: "flex-start",
|
|
3298
3316
|
flexWrap: "nowrap",
|
|
3299
3317
|
alignItems: "center",
|
|
3300
|
-
sx: { width: "100%"
|
|
3318
|
+
sx: { width: "100%" }
|
|
3301
3319
|
},
|
|
3302
3320
|
shouldShowChips && /* @__PURE__ */ React20.createElement(
|
|
3303
3321
|
ChipFiltersDisplay,
|
|
@@ -3313,26 +3331,26 @@ function SCDrawer({
|
|
|
3313
3331
|
onToggle: toggleDrawer(true)
|
|
3314
3332
|
}
|
|
3315
3333
|
)
|
|
3316
|
-
),
|
|
3334
|
+
), type != "Swipeable" ? /* @__PURE__ */ React20.createElement(
|
|
3317
3335
|
Drawer,
|
|
3318
3336
|
{
|
|
3319
3337
|
open: drawerOpen,
|
|
3320
|
-
onClose:
|
|
3338
|
+
onClose: type == "Sidecar" ? void 0 : toggleDrawer(false),
|
|
3321
3339
|
anchor: anchor != null ? anchor : "left",
|
|
3322
3340
|
sx: {
|
|
3323
3341
|
"& .MuiDrawer-paper": {
|
|
3324
|
-
width:
|
|
3342
|
+
width: type == "Sidecar" ? "100%" : width != null ? width : "450px",
|
|
3325
3343
|
boxSizing: "border-box",
|
|
3326
3344
|
borderRadius: anchor !== "right" ? "0px 4px 4px 0px" : "4px 0px 0px 4px",
|
|
3327
|
-
boxShadow:
|
|
3345
|
+
boxShadow: type == "Sidecar" ? "none !important" : "0px 8px 10px -5px rgba(24, 39, 75, 0.2), 0px 16px 24px 2px rgba(24, 39, 75, 0.14), 0px 6px 30px 5px rgba(24, 39, 75, 0.12)"
|
|
3328
3346
|
},
|
|
3329
3347
|
"&.MuiDrawer-root": {
|
|
3330
|
-
boxShadow:
|
|
3348
|
+
boxShadow: type == "Sidecar" ? "none !important" : "0px 3px 1px -2px rgba(24, 39, 75, 0.20),0px 2px 2px 0px rgba(24, 39, 75, 0.14),0px 1px 5px 0px rgba(24, 39, 75, 0.12)"
|
|
3331
3349
|
}
|
|
3332
3350
|
},
|
|
3333
3351
|
ModalProps: {
|
|
3334
3352
|
keepMounted: true,
|
|
3335
|
-
disablePortal:
|
|
3353
|
+
disablePortal: type == "Sidecar" ? true : false,
|
|
3336
3354
|
slotProps: {
|
|
3337
3355
|
root: {
|
|
3338
3356
|
style: {
|
|
@@ -4468,44 +4486,27 @@ var PageHeader = ({
|
|
|
4468
4486
|
|
|
4469
4487
|
// src/Components/SCAccordion.tsx
|
|
4470
4488
|
import React36, { useState as useState18 } from "react";
|
|
4471
|
-
import {
|
|
4489
|
+
import { Box as Box21, Typography as Typography19, Accordion, AccordionSummary, AccordionDetails } from "@mui/material";
|
|
4472
4490
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
4473
|
-
import ExpandLessIcon from "@mui/icons-material/ExpandLess";
|
|
4474
4491
|
var SCAccordion = ({
|
|
4475
4492
|
title,
|
|
4476
4493
|
actions,
|
|
4477
4494
|
children
|
|
4478
4495
|
}) => {
|
|
4479
4496
|
const [open, setOpen] = useState18(false);
|
|
4480
|
-
return /* @__PURE__ */ React36.createElement(
|
|
4481
|
-
|
|
4497
|
+
return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(Accordion, null, /* @__PURE__ */ React36.createElement(
|
|
4498
|
+
AccordionSummary,
|
|
4482
4499
|
{
|
|
4483
|
-
|
|
4484
|
-
sx: {
|
|
4485
|
-
background: "white",
|
|
4486
|
-
boxShadow: "0px 2px 4px 0px #18274B33",
|
|
4487
|
-
padding: "0px 2px 0px 2px"
|
|
4488
|
-
}
|
|
4500
|
+
expandIcon: /* @__PURE__ */ React36.createElement(ExpandMoreIcon, { fontSize: "small", color: "action" })
|
|
4489
4501
|
},
|
|
4490
|
-
/* @__PURE__ */ React36.createElement(
|
|
4491
|
-
|
|
4492
|
-
{
|
|
4493
|
-
container: true,
|
|
4494
|
-
sx: { alignItems: "center", padding: "12px 16px 12px 16px", cursor: "pointer" },
|
|
4495
|
-
justifyContent: "space-between",
|
|
4496
|
-
onClick: () => setOpen((prev) => !prev)
|
|
4497
|
-
},
|
|
4498
|
-
/* @__PURE__ */ React36.createElement(Grid7, { sx: { textAlign: "left" } }, /* @__PURE__ */ React36.createElement(Typography19, { noWrap: true, variant: "subtitle1", align: "left", color: "text.primary" }, title)),
|
|
4499
|
-
/* @__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" }))))
|
|
4500
|
-
),
|
|
4501
|
-
open && /* @__PURE__ */ React36.createElement(Grid7, { container: true, padding: "12px" }, children)
|
|
4502
|
-
);
|
|
4502
|
+
/* @__PURE__ */ React36.createElement(Box21, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%" } }, typeof title === "string" ? /* @__PURE__ */ React36.createElement(Typography19, { noWrap: true, variant: "body1", color: "text.primary" }, title) : title, actions)
|
|
4503
|
+
), /* @__PURE__ */ React36.createElement(AccordionDetails, { sx: { padding: "12px" } }, children)));
|
|
4503
4504
|
};
|
|
4504
4505
|
|
|
4505
4506
|
// src/Components/SCActivityCalendar.tsx
|
|
4506
4507
|
import React38, { useState as useState20 } from "react";
|
|
4507
|
-
import { Typography as Typography21, IconButton as IconButton13, Box as
|
|
4508
|
-
import
|
|
4508
|
+
import { Typography as Typography21, IconButton as IconButton13, Box as Box23, Badge, Menu as Menu3, MenuItem as MenuItem7, ListItemIcon as ListItemIcon5, Popover as Popover6 } from "@mui/material";
|
|
4509
|
+
import Grid8 from "@mui/material/Grid";
|
|
4509
4510
|
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
4510
4511
|
import { LocalizationProvider as LocalizationProvider2 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
4511
4512
|
import { StaticDatePicker } from "@mui/x-date-pickers/StaticDatePicker";
|
|
@@ -4515,7 +4516,7 @@ import { format, startOfWeek, addDays, isSameDay } from "date-fns";
|
|
|
4515
4516
|
// src/Components/SCListContent.tsx
|
|
4516
4517
|
import React37 from "react";
|
|
4517
4518
|
import { Divider as Divider6, List, ListItemButton, ListItemIcon as ListItemIcon4, ListItemText as ListItemText3, SvgIcon as SvgIcon7 } from "@mui/material";
|
|
4518
|
-
import
|
|
4519
|
+
import Grid7 from "@mui/material/Grid";
|
|
4519
4520
|
import Avatar2 from "@mui/material/Avatar";
|
|
4520
4521
|
import * as Muicon7 from "@mui/icons-material";
|
|
4521
4522
|
var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" }) => {
|
|
@@ -4554,7 +4555,7 @@ var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" })
|
|
|
4554
4555
|
{
|
|
4555
4556
|
sx: { color: option.colorDisabled == true ? "text.disabled" : "default" },
|
|
4556
4557
|
primary: option.title,
|
|
4557
|
-
secondary: /* @__PURE__ */ React37.createElement(
|
|
4558
|
+
secondary: /* @__PURE__ */ React37.createElement(Grid7, { gap: 0.5 }, /* @__PURE__ */ React37.createElement(Grid7, { container: true, gap: 0.5, sx: { color: option.colorDisabled == true ? "text.disabled" : "default" } }, option.subtitle), /* @__PURE__ */ React37.createElement(Grid7, { container: true, gap: 0.5, sx: { color: option.colorDisabled == true ? "text.disabled" : "default" } }, option.description))
|
|
4558
4559
|
}
|
|
4559
4560
|
),
|
|
4560
4561
|
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) : ""
|
|
@@ -4639,8 +4640,8 @@ var SCActivityCalendar = ({
|
|
|
4639
4640
|
setDatosEventos(resultado);
|
|
4640
4641
|
}
|
|
4641
4642
|
};
|
|
4642
|
-
return /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(LocalizationProvider2, { dateAdapter: AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React38.createElement(
|
|
4643
|
-
|
|
4643
|
+
return /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(LocalizationProvider2, { dateAdapter: AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React38.createElement(Box23, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React38.createElement(Box23, { sx: { width: "100%", padding: "0px", background: "transparent" } }, /* @__PURE__ */ React38.createElement(Grid8, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 16px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React38.createElement(Grid8, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React38.createElement(Box23, { 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(
|
|
4644
|
+
Box23,
|
|
4644
4645
|
{
|
|
4645
4646
|
onClick: () => setFecha(dia),
|
|
4646
4647
|
sx: {
|
|
@@ -4653,7 +4654,7 @@ var SCActivityCalendar = ({
|
|
|
4653
4654
|
}
|
|
4654
4655
|
},
|
|
4655
4656
|
/* @__PURE__ */ React38.createElement(Typography21, { sx: { fontSize: "12px !important", color: isSameDay(dia, fecha) ? "white" : "#101840DE" } }, format(dia, "d"))
|
|
4656
|
-
)))), /* @__PURE__ */ React38.createElement(
|
|
4657
|
+
)))), /* @__PURE__ */ React38.createElement(Grid8, { 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(Box23, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React38.createElement(
|
|
4657
4658
|
StaticDatePicker,
|
|
4658
4659
|
{
|
|
4659
4660
|
orientation: "landscape",
|
|
@@ -4678,7 +4679,7 @@ var SCActivityCalendar = ({
|
|
|
4678
4679
|
},
|
|
4679
4680
|
onChange: (newValue) => setFecha(newValue)
|
|
4680
4681
|
}
|
|
4681
|
-
), /* @__PURE__ */ React38.createElement(
|
|
4682
|
+
), /* @__PURE__ */ React38.createElement(Grid8, { 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" : "444px" } }, /* @__PURE__ */ React38.createElement(FilterListIcon, { color: "action" })), /* @__PURE__ */ React38.createElement(
|
|
4682
4683
|
Popover6,
|
|
4683
4684
|
{
|
|
4684
4685
|
open: openPopoverFiltro,
|
|
@@ -4707,19 +4708,19 @@ var SCActivityCalendar = ({
|
|
|
4707
4708
|
/* @__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")),
|
|
4708
4709
|
/* @__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"))
|
|
4709
4710
|
)
|
|
4710
|
-
), /* @__PURE__ */ React38.createElement(
|
|
4711
|
-
|
|
4711
|
+
), /* @__PURE__ */ React38.createElement(Box23, { sx: { boxSizing: "border-box", padding: "0px 16px", width: "100%", height: openCalendar ? "calc(91% - 316px)" : "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(
|
|
4712
|
+
Box23,
|
|
4712
4713
|
{
|
|
4713
4714
|
key: dayIndex
|
|
4714
4715
|
},
|
|
4715
|
-
/* @__PURE__ */ React38.createElement(
|
|
4716
|
+
/* @__PURE__ */ React38.createElement(Grid8, { container: true }, /* @__PURE__ */ React38.createElement(Typography21, { variant: "subtitle1", sx: { color: isSameDay(day, fecha) ? "info.dark" : "text.secondary" } }, day.toLocaleDateString("es-ES", {
|
|
4716
4717
|
day: "numeric"
|
|
4717
4718
|
}), " de ", day.toLocaleDateString("es-ES", {
|
|
4718
4719
|
month: "short"
|
|
4719
4720
|
}), ", ", day.toLocaleDateString("es-ES", {
|
|
4720
4721
|
weekday: "long"
|
|
4721
4722
|
}))),
|
|
4722
|
-
/* @__PURE__ */ React38.createElement(
|
|
4723
|
+
/* @__PURE__ */ React38.createElement(Box23, { sx: {
|
|
4723
4724
|
display: "flex",
|
|
4724
4725
|
flexDirection: "column"
|
|
4725
4726
|
} }, (() => {
|
|
@@ -4737,7 +4738,7 @@ var SCActivityCalendar = ({
|
|
|
4737
4738
|
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 })))),
|
|
4738
4739
|
iconLeftColor: event2.state === "Finalizada" ? "#C7E49D" : "action",
|
|
4739
4740
|
iconLeft: event2.state === "Finalizada" ? "CheckCircle" : event2.state === "Aplazada" ? "EventBusyOutlined" : event2.state === "En progreso" ? "PendingOutlined" : "RadioButtonUnchecked",
|
|
4740
|
-
description: /* @__PURE__ */ React38.createElement(
|
|
4741
|
+
description: /* @__PURE__ */ React38.createElement(Grid8, { display: "flex", flexDirection: "column", alignItems: "flex-start" }, event2.state === "Aplazada" || event2.state === "En progreso" || event2.state === "Auto asignada" ? /* @__PURE__ */ React38.createElement(Grid8, { 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)),
|
|
4741
4742
|
divider: eventosDelDia.length === idx + 1 ? false : true,
|
|
4742
4743
|
colorDisabled: event2.state === "Finalizada" || event2.state === "Aplazada" || event2.state === "En progreso" ? true : false,
|
|
4743
4744
|
fn: fn ? () => fn(event2) : void 0
|
|
@@ -4798,8 +4799,8 @@ var SCAlert = ({
|
|
|
4798
4799
|
|
|
4799
4800
|
// src/Components/SCAppBar.tsx
|
|
4800
4801
|
import React40, { useState as useState21, useEffect as useEffect16 } from "react";
|
|
4801
|
-
import { Menu as Menu4, Box as
|
|
4802
|
-
import
|
|
4802
|
+
import { Menu as Menu4, Box as Box24, Typography as Typography23, MenuItem as MenuItem8, IconButton as IconButton14, Badge as Badge2 } from "@mui/material";
|
|
4803
|
+
import Grid9 from "@mui/material/Grid";
|
|
4803
4804
|
import "dayjs/locale/es";
|
|
4804
4805
|
import MenuIcon from "@mui/icons-material/Menu";
|
|
4805
4806
|
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
|
|
@@ -4836,7 +4837,7 @@ var SCAppBar = ({
|
|
|
4836
4837
|
window.removeEventListener("offline", handleOffline);
|
|
4837
4838
|
};
|
|
4838
4839
|
}, []);
|
|
4839
|
-
return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(
|
|
4840
|
+
return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(Grid9, { sx: { display: "flex", flexDirection: "column" } }, /* @__PURE__ */ React40.createElement(Grid9, { 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(Grid9, { sx: { display: "flex", flexDirection: "row", alignItems: "center" } }, visibleConexion && /* @__PURE__ */ React40.createElement(Grid9, { 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(
|
|
4840
4841
|
Badge2,
|
|
4841
4842
|
{
|
|
4842
4843
|
anchorOrigin: {
|
|
@@ -4868,13 +4869,13 @@ var SCAppBar = ({
|
|
|
4868
4869
|
sx: { zIndex: "2000" }
|
|
4869
4870
|
},
|
|
4870
4871
|
options.map((option, index) => /* @__PURE__ */ React40.createElement(MenuItem8, { onClick: option.fn, disabled: option.disabled, key: index }, /* @__PURE__ */ React40.createElement(Typography23, { variant: "body2" }, option.name)))
|
|
4871
|
-
)))), /* @__PURE__ */ React40.createElement(
|
|
4872
|
+
)))), /* @__PURE__ */ React40.createElement(Box24, { sx: { padding: "8px 16px 0px 16px" } }, contenidoExtra)));
|
|
4872
4873
|
};
|
|
4873
4874
|
|
|
4874
4875
|
// src/Components/SCCalendarSwipeable.tsx
|
|
4875
4876
|
import React41, { useState as useState22 } from "react";
|
|
4876
|
-
import { Typography as Typography24, IconButton as IconButton15, Box as
|
|
4877
|
-
import
|
|
4877
|
+
import { Typography as Typography24, IconButton as IconButton15, Box as Box25 } from "@mui/material";
|
|
4878
|
+
import Grid10 from "@mui/material/Grid";
|
|
4878
4879
|
import { AdapterDateFns as AdapterDateFns2 } from "@mui/x-date-pickers/AdapterDateFns";
|
|
4879
4880
|
import { LocalizationProvider as LocalizationProvider3 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
4880
4881
|
import { StaticDatePicker as StaticDatePicker2 } from "@mui/x-date-pickers/StaticDatePicker";
|
|
@@ -4922,8 +4923,8 @@ var SCCalendarSwipeable = ({
|
|
|
4922
4923
|
// 0 = domingo, 1 = lunes
|
|
4923
4924
|
})
|
|
4924
4925
|
});
|
|
4925
|
-
return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(LocalizationProvider3, { dateAdapter: AdapterDateFns2, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React41.createElement(
|
|
4926
|
-
|
|
4926
|
+
return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(LocalizationProvider3, { dateAdapter: AdapterDateFns2, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React41.createElement(Box25, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React41.createElement(Box25, { sx: { width: "100%", padding: "0px 16px", background: "transparent" } }, /* @__PURE__ */ React41.createElement(Grid10, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React41.createElement(Grid10, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React41.createElement(Box25, { 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(
|
|
4927
|
+
Box25,
|
|
4927
4928
|
{
|
|
4928
4929
|
onClick: () => setFecha(dia),
|
|
4929
4930
|
sx: {
|
|
@@ -4939,7 +4940,7 @@ var SCCalendarSwipeable = ({
|
|
|
4939
4940
|
}
|
|
4940
4941
|
},
|
|
4941
4942
|
/* @__PURE__ */ React41.createElement(Typography24, { sx: { fontSize: "12px !important", color: isSameDay2(dia, fecha) ? "white" : "#101840DE" } }, format2(dia, "d"))
|
|
4942
|
-
)))), /* @__PURE__ */ React41.createElement(
|
|
4943
|
+
)))), /* @__PURE__ */ React41.createElement(Grid10, { container: true, justifyContent: "center" }, /* @__PURE__ */ React41.createElement(IconButton15, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ React41.createElement(KeyboardDoubleArrowDownIcon2, null))))) : /* @__PURE__ */ React41.createElement(Box25, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React41.createElement(
|
|
4943
4944
|
StaticDatePicker2,
|
|
4944
4945
|
{
|
|
4945
4946
|
orientation: "landscape",
|
|
@@ -4964,12 +4965,12 @@ var SCCalendarSwipeable = ({
|
|
|
4964
4965
|
},
|
|
4965
4966
|
onChange: (newValue) => setFecha(newValue)
|
|
4966
4967
|
}
|
|
4967
|
-
), /* @__PURE__ */ React41.createElement(
|
|
4968
|
+
), /* @__PURE__ */ React41.createElement(Grid10, { container: true, justifyContent: "center" }, /* @__PURE__ */ React41.createElement(IconButton15, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React41.createElement(KeyboardDoubleArrowUpIcon2, null))))));
|
|
4968
4969
|
};
|
|
4969
4970
|
|
|
4970
4971
|
// src/Components/SCCard.tsx
|
|
4971
4972
|
import React42 from "react";
|
|
4972
|
-
import { Button as Button18, Box as
|
|
4973
|
+
import { Button as Button18, Box as Box26, SvgIcon as SvgIcon9 } from "@mui/material";
|
|
4973
4974
|
import IconButton16 from "@mui/material/IconButton";
|
|
4974
4975
|
import Card2 from "@mui/material/Card";
|
|
4975
4976
|
import CardHeader from "@mui/material/CardHeader";
|
|
@@ -5003,7 +5004,7 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
5003
5004
|
return /* @__PURE__ */ React42.createElement(Card2, { sx: { width: width || "auto" } }, title && /* @__PURE__ */ React42.createElement(
|
|
5004
5005
|
CardHeader,
|
|
5005
5006
|
{
|
|
5006
|
-
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React42.createElement(
|
|
5007
|
+
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React42.createElement(Box26, { 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,
|
|
5007
5008
|
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,
|
|
5008
5009
|
title,
|
|
5009
5010
|
subheader: subtitle,
|
|
@@ -5550,8 +5551,8 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
|
|
|
5550
5551
|
|
|
5551
5552
|
// src/Components/SCDialog.tsx
|
|
5552
5553
|
import React45, { useEffect as useEffect20, useState as useState26 } from "react";
|
|
5553
|
-
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
|
|
5554
|
-
import
|
|
5554
|
+
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 Box27, SvgIcon as SvgIcon10 } from "@mui/material";
|
|
5555
|
+
import Grid11 from "@mui/material/Grid";
|
|
5555
5556
|
import ToggleButton from "@mui/material/ToggleButton";
|
|
5556
5557
|
import ToggleButtonGroup from "@mui/material/ToggleButtonGroup";
|
|
5557
5558
|
import CloseIcon2 from "@mui/icons-material/Close";
|
|
@@ -5614,7 +5615,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5614
5615
|
}
|
|
5615
5616
|
};
|
|
5616
5617
|
const dialogActions = actions == false ? false : actions != void 0 ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
5617
|
-
content = content != null ? content : { component: /* @__PURE__ */ React45.createElement(
|
|
5618
|
+
content = content != null ? content : { component: /* @__PURE__ */ React45.createElement(Box27, null, " Aqui va el contenido ") };
|
|
5618
5619
|
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(
|
|
5619
5620
|
Dialog4,
|
|
5620
5621
|
{
|
|
@@ -5630,7 +5631,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5630
5631
|
}
|
|
5631
5632
|
}
|
|
5632
5633
|
},
|
|
5633
|
-
title && /* @__PURE__ */ React45.createElement(DialogTitle4, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React45.createElement(
|
|
5634
|
+
title && /* @__PURE__ */ React45.createElement(DialogTitle4, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React45.createElement(Grid11, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, typeView == "web" ? /* @__PURE__ */ React45.createElement(Grid11, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ React45.createElement(Box27, { 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(Grid11, { sx: { width: "98%" } }, /* @__PURE__ */ React45.createElement(Typography26, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), subtitle ? subtitle : "")) : /* @__PURE__ */ React45.createElement(Grid11, { 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(Grid11, { 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 : "") : ""),
|
|
5634
5635
|
/* @__PURE__ */ React45.createElement(
|
|
5635
5636
|
DialogContent4,
|
|
5636
5637
|
{
|
|
@@ -5681,7 +5682,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5681
5682
|
startIcon: dialogActions[0].icon ? /* @__PURE__ */ React45.createElement(SvgIcon10, { fontSize: "small", component: dialogActions[0].icon }) : void 0
|
|
5682
5683
|
},
|
|
5683
5684
|
dialogActions[0].text
|
|
5684
|
-
), /* @__PURE__ */ React45.createElement(
|
|
5685
|
+
), /* @__PURE__ */ React45.createElement(Box27, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
|
|
5685
5686
|
return /* @__PURE__ */ React45.createElement(
|
|
5686
5687
|
Button19,
|
|
5687
5688
|
{
|
|
@@ -5709,7 +5710,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5709
5710
|
},
|
|
5710
5711
|
boton.text
|
|
5711
5712
|
);
|
|
5712
|
-
})) : /* @__PURE__ */ React45.createElement(
|
|
5713
|
+
})) : /* @__PURE__ */ React45.createElement(Box27, { sx: { width: "100%", display: "flex", flexDirection: "row", justifyContent: "center" } }, /* @__PURE__ */ React45.createElement(ToggleButtonGroup, { size: "large", fullWidth: true }, dialogActions.map((boton, index) => {
|
|
5713
5714
|
var _a;
|
|
5714
5715
|
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 }));
|
|
5715
5716
|
})))) : "" : ""
|
|
@@ -5766,8 +5767,8 @@ var SCDownloadExcelTable = ({
|
|
|
5766
5767
|
|
|
5767
5768
|
// src/Components/SCMenu.tsx
|
|
5768
5769
|
import React47 from "react";
|
|
5769
|
-
import { Box as
|
|
5770
|
-
import
|
|
5770
|
+
import { Box as Box28, Typography as Typography27, Paper as Paper5, Divider as Divider8, MenuList as MenuList3, MenuItem as MenuItem9, ListItemIcon as ListItemIcon7, SvgIcon as SvgIcon11 } from "@mui/material";
|
|
5771
|
+
import Grid12 from "@mui/material/Grid";
|
|
5771
5772
|
|
|
5772
5773
|
// src/Components/Hooks/useWindowDimensions.ts
|
|
5773
5774
|
import { useState as useState27, useEffect as useEffect21 } from "react";
|
|
@@ -5833,7 +5834,7 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5833
5834
|
setValue(String(index + 1));
|
|
5834
5835
|
}
|
|
5835
5836
|
};
|
|
5836
|
-
return /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
|
|
5837
|
+
return /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(Grid12, { 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(
|
|
5837
5838
|
MenuItem9,
|
|
5838
5839
|
{
|
|
5839
5840
|
disabled: disable == true ? true : false,
|
|
@@ -5842,8 +5843,8 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5842
5843
|
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
5843
5844
|
},
|
|
5844
5845
|
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 })) : "",
|
|
5845
|
-
/* @__PURE__ */ React47.createElement(
|
|
5846
|
-
), option.divider == true ? /* @__PURE__ */ React47.createElement(Divider8, null) : "")))), /* @__PURE__ */ React47.createElement(
|
|
5846
|
+
/* @__PURE__ */ React47.createElement(Grid12, { 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 })) : "")
|
|
5847
|
+
), option.divider == true ? /* @__PURE__ */ React47.createElement(Divider8, null) : "")))), /* @__PURE__ */ React47.createElement(Grid12, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React47.createElement(Box28, { "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")))));
|
|
5847
5848
|
};
|
|
5848
5849
|
|
|
5849
5850
|
// src/Components/SCSnackBar.tsx
|
|
@@ -5890,7 +5891,7 @@ var SCSnackBar = ({
|
|
|
5890
5891
|
|
|
5891
5892
|
// src/Components/SCTabs.tsx
|
|
5892
5893
|
import React49, { useEffect as useEffect22 } from "react";
|
|
5893
|
-
import { Typography as Typography28, Box as
|
|
5894
|
+
import { Typography as Typography28, Box as Box29, SvgIcon as SvgIcon12, Tab as Tab3, Tabs as Tabs3, Badge as Badge3 } from "@mui/material";
|
|
5894
5895
|
import TabPanel from "@mui/lab/TabPanel";
|
|
5895
5896
|
import TabContext from "@mui/lab/TabContext";
|
|
5896
5897
|
import * as Muicon11 from "@mui/icons-material";
|
|
@@ -5952,7 +5953,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5952
5953
|
setValue(newValue);
|
|
5953
5954
|
}
|
|
5954
5955
|
};
|
|
5955
|
-
return /* @__PURE__ */ React49.createElement(React49.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ React49.createElement(
|
|
5956
|
+
return /* @__PURE__ */ React49.createElement(React49.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ React49.createElement(Box29, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ React49.createElement(TabContext, { value }, /* @__PURE__ */ React49.createElement(
|
|
5956
5957
|
Tabs3,
|
|
5957
5958
|
{
|
|
5958
5959
|
"data-testid": "tab-container",
|
|
@@ -6002,12 +6003,12 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
6002
6003
|
sx: { padding: "16px" }
|
|
6003
6004
|
},
|
|
6004
6005
|
option.page ? option.page : /* @__PURE__ */ React49.createElement(Typography28, null, "No se ha configurado el componente a visualizar ")
|
|
6005
|
-
)))) : /* @__PURE__ */ React49.createElement(
|
|
6006
|
+
)))) : /* @__PURE__ */ React49.createElement(Box29, { sx: { height: "200px" } }, toast && /* @__PURE__ */ React49.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
6006
6007
|
};
|
|
6007
6008
|
|
|
6008
6009
|
// src/Components/SCTime.tsx
|
|
6009
6010
|
import React50, { useState as useState29 } from "react";
|
|
6010
|
-
import { Box as
|
|
6011
|
+
import { Box as Box30, InputAdornment as InputAdornment6, Popover as Popover8, ClickAwayListener as ClickAwayListener3 } from "@mui/material";
|
|
6011
6012
|
import { LocalizationProvider as LocalizationProvider5 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
6012
6013
|
import { AdapterDayjs as AdapterDayjs3 } from "@mui/x-date-pickers/AdapterDayjs";
|
|
6013
6014
|
import dayjs11 from "dayjs";
|
|
@@ -6028,7 +6029,7 @@ var SCTime = ({
|
|
|
6028
6029
|
error = false
|
|
6029
6030
|
}) => {
|
|
6030
6031
|
LicenseInfo3.setLicenseKey(
|
|
6031
|
-
"
|
|
6032
|
+
"aa892a011e4c240f3cdaf811ecfff54fTz0xMjkyODQsRT0xODEwNDI1NTk5MDAwLFM9cHJvLExNPWFubnVhbCxQVj1RMy0yMDI0LEtWPTI="
|
|
6032
6033
|
);
|
|
6033
6034
|
const isTimeEmpty = required && !state;
|
|
6034
6035
|
const hasError = isTimeEmpty || error;
|
|
@@ -6067,7 +6068,7 @@ var SCTime = ({
|
|
|
6067
6068
|
setIsOpenPopover(false);
|
|
6068
6069
|
setAnchorEl(null);
|
|
6069
6070
|
};
|
|
6070
|
-
return /* @__PURE__ */ React50.createElement(LocalizationProvider5, { dateAdapter: AdapterDayjs3 }, /* @__PURE__ */ React50.createElement(
|
|
6071
|
+
return /* @__PURE__ */ React50.createElement(LocalizationProvider5, { dateAdapter: AdapterDayjs3 }, /* @__PURE__ */ React50.createElement(Box30, { sx: { position: "relative", minWidth: "120px", width: width ? `${width}%` : "99%" } }, /* @__PURE__ */ React50.createElement(
|
|
6071
6072
|
TimeField,
|
|
6072
6073
|
{
|
|
6073
6074
|
label,
|
|
@@ -6139,7 +6140,7 @@ var SCTime = ({
|
|
|
6139
6140
|
}
|
|
6140
6141
|
}
|
|
6141
6142
|
},
|
|
6142
|
-
/* @__PURE__ */ React50.createElement(ClickAwayListener3, { onClickAway: handleClose }, /* @__PURE__ */ React50.createElement(
|
|
6143
|
+
/* @__PURE__ */ React50.createElement(ClickAwayListener3, { onClickAway: handleClose }, /* @__PURE__ */ React50.createElement(Box30, { sx: { p: 0 } }, /* @__PURE__ */ React50.createElement(
|
|
6143
6144
|
DigitalClock,
|
|
6144
6145
|
{
|
|
6145
6146
|
value: state,
|
|
@@ -6163,8 +6164,8 @@ var SCTime = ({
|
|
|
6163
6164
|
|
|
6164
6165
|
// src/Components/SCZoom.tsx
|
|
6165
6166
|
import React51, { useState as useState30 } from "react";
|
|
6166
|
-
import { Typography as Typography30, Divider as Divider9, IconButton as IconButton18, Box as
|
|
6167
|
-
import
|
|
6167
|
+
import { Typography as Typography30, Divider as Divider9, IconButton as IconButton18, Box as Box31 } from "@mui/material";
|
|
6168
|
+
import Grid13 from "@mui/material/Grid";
|
|
6168
6169
|
import ZoomOutIcon from "@mui/icons-material/ZoomOut";
|
|
6169
6170
|
import ZoomInIcon from "@mui/icons-material/ZoomIn";
|
|
6170
6171
|
import RotateRightIcon from "@mui/icons-material/RotateRight";
|
|
@@ -6179,8 +6180,8 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6179
6180
|
const handleReset = () => {
|
|
6180
6181
|
setZoom(1);
|
|
6181
6182
|
};
|
|
6182
|
-
return /* @__PURE__ */ React51.createElement(
|
|
6183
|
-
|
|
6183
|
+
return /* @__PURE__ */ React51.createElement(Box31, { style: { width: width || "280px", height: height || "280px" } }, /* @__PURE__ */ React51.createElement(
|
|
6184
|
+
Box31,
|
|
6184
6185
|
{
|
|
6185
6186
|
sx: {
|
|
6186
6187
|
overflow: zoom > 1 ? "auto" : "hidden",
|
|
@@ -6201,7 +6202,7 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6201
6202
|
}
|
|
6202
6203
|
}
|
|
6203
6204
|
)
|
|
6204
|
-
), /* @__PURE__ */ React51.createElement(
|
|
6205
|
+
), /* @__PURE__ */ React51.createElement(Grid13, { 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(Grid13, { 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" }))));
|
|
6205
6206
|
};
|
|
6206
6207
|
|
|
6207
6208
|
// src/Theme/index.ts
|