componentes-sinco 1.1.28 → 1.1.30
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 +52 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -10
- package/dist/index.d.ts +5 -10
- package/dist/index.js +68 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -632,7 +632,8 @@ var Attachment = ({
|
|
|
632
632
|
cursor: "pointer",
|
|
633
633
|
transition: "all 0.2s ease-in-out",
|
|
634
634
|
":hover": {
|
|
635
|
-
|
|
635
|
+
border: "1px dashed #2063A080",
|
|
636
|
+
backgroundColor: error ? "#D143430A" : "#2063A00A"
|
|
636
637
|
}
|
|
637
638
|
}, sx)
|
|
638
639
|
},
|
|
@@ -1314,13 +1315,15 @@ var CalendarToolbar = ({
|
|
|
1314
1315
|
}
|
|
1315
1316
|
return labelDate.format(" DD MMMM YYYY");
|
|
1316
1317
|
};
|
|
1317
|
-
return /* @__PURE__ */ import_react8.default.createElement(import_material6.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap:
|
|
1318
|
+
return /* @__PURE__ */ import_react8.default.createElement(import_material6.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 1.5 }, /* @__PURE__ */ import_react8.default.createElement(import_material6.Stack, { direction: "row", alignItems: "center", justifyContent: "flex-start", gap: 1.5 }, /* @__PURE__ */ import_react8.default.createElement(import_material6.Box, null, /* @__PURE__ */ import_react8.default.createElement(
|
|
1318
1319
|
import_material6.Chip,
|
|
1319
1320
|
{
|
|
1321
|
+
size: "medium",
|
|
1320
1322
|
label: "Hoy",
|
|
1321
|
-
icon: /* @__PURE__ */ import_react8.default.createElement(import_icons_material8.
|
|
1323
|
+
icon: /* @__PURE__ */ import_react8.default.createElement(import_icons_material8.EventOutlined, { fontSize: "small" }),
|
|
1322
1324
|
color: "primary",
|
|
1323
|
-
onClick: () => onNavigate("TODAY")
|
|
1325
|
+
onClick: () => onNavigate("TODAY"),
|
|
1326
|
+
variant: "standard"
|
|
1324
1327
|
}
|
|
1325
1328
|
)), /* @__PURE__ */ import_react8.default.createElement(import_material6.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ import_react8.default.createElement(import_material6.IconButton, { "aria-label": "Anterior", onClick: () => onNavigate("PREV"), size: "small", color: "primary" }, /* @__PURE__ */ import_react8.default.createElement(import_icons_material8.ChevronLeft, { fontSize: "small" })), /* @__PURE__ */ import_react8.default.createElement(import_material6.IconButton, { "aria-label": "Siguiente", onClick: () => onNavigate("NEXT"), size: "small", color: "primary" }, /* @__PURE__ */ import_react8.default.createElement(import_icons_material8.ChevronRight, { fontSize: "small" })), /* @__PURE__ */ import_react8.default.createElement(import_material6.Typography, { variant: "h6", color: "primary", "data-testid": "currentDate" }, getFormattedDate()), /* @__PURE__ */ import_react8.default.createElement(import_material6.IconButton, { onClick: handleMenuOpen, size: "small", color: "primary", "aria-label": "Cambiar vista" }, /* @__PURE__ */ import_react8.default.createElement(import_icons_material8.KeyboardArrowDown, { fontSize: "small" })), /* @__PURE__ */ import_react8.default.createElement(
|
|
1326
1329
|
import_material6.Menu,
|
|
@@ -1334,7 +1337,7 @@ var CalendarToolbar = ({
|
|
|
1334
1337
|
/* @__PURE__ */ import_react8.default.createElement(import_material6.MenuItem, { onClick: () => handleViewChange("month") }, "Mes"),
|
|
1335
1338
|
/* @__PURE__ */ import_react8.default.createElement(import_material6.MenuItem, { onClick: () => handleViewChange("week") }, "Semana"),
|
|
1336
1339
|
/* @__PURE__ */ import_react8.default.createElement(import_material6.MenuItem, { onClick: () => handleViewChange("day") }, "D\xEDa")
|
|
1337
|
-
)), children ? /* @__PURE__ */ import_react8.default.createElement(import_material6.Box, null, children) : /* @__PURE__ */ import_react8.default.createElement(import_material6.Box, { width: "24px" }), " ");
|
|
1340
|
+
))), children ? /* @__PURE__ */ import_react8.default.createElement(import_material6.Box, null, children) : /* @__PURE__ */ import_react8.default.createElement(import_material6.Box, { width: "24px" }), " ");
|
|
1338
1341
|
};
|
|
1339
1342
|
|
|
1340
1343
|
// src/Components/Calendario/Views/MonthView.tsx
|
|
@@ -3513,10 +3516,10 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3513
3516
|
const [openDrawer, setOpenDrawer] = import_react32.default.useState(false);
|
|
3514
3517
|
const [selectedDay, setSelectedDay] = import_react32.default.useState(null);
|
|
3515
3518
|
const [selectedEvents, setSelectedEvents] = import_react32.default.useState([]);
|
|
3516
|
-
return /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { minWidth: CALENDAR_CONSTANTS.MIN_WIDTH }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Typography, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ import_react32.default.createElement(import_material21.CircularProgress, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ import_react32.default.createElement(
|
|
3519
|
+
return /* @__PURE__ */ import_react32.default.createElement(import_react32.default.Fragment, null, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { minWidth: CALENDAR_CONSTANTS.MIN_WIDTH }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ import_react32.default.createElement(import_material21.Typography, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ import_react32.default.createElement(import_material21.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ import_react32.default.createElement(import_material21.CircularProgress, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ import_react32.default.createElement(
|
|
3517
3520
|
EmptyState,
|
|
3518
3521
|
{
|
|
3519
|
-
containerHeight: "
|
|
3522
|
+
containerHeight: "calc(100vh - 130px)",
|
|
3520
3523
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3521
3524
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3522
3525
|
icon: /* @__PURE__ */ import_react32.default.createElement(LogoCalendario, null)
|
|
@@ -3596,30 +3599,47 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3596
3599
|
sx: { "& .MuiButtonBase-root": { width: "100%" } }
|
|
3597
3600
|
},
|
|
3598
3601
|
/* @__PURE__ */ import_react32.default.createElement(
|
|
3599
|
-
|
|
3602
|
+
import_material21.Button,
|
|
3600
3603
|
{
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
day,
|
|
3613
|
-
onEventClick,
|
|
3614
|
-
onEventHover
|
|
3615
|
-
}
|
|
3616
|
-
)
|
|
3617
|
-
}]
|
|
3618
|
-
}
|
|
3604
|
+
size: "small",
|
|
3605
|
+
variant: "text",
|
|
3606
|
+
sx: { textTransform: "capitalize" },
|
|
3607
|
+
onClick: (e) => {
|
|
3608
|
+
e.stopPropagation();
|
|
3609
|
+
setSelectedDay(day);
|
|
3610
|
+
setSelectedEvents(dayEvents);
|
|
3611
|
+
setOpenDrawer(true);
|
|
3612
|
+
}
|
|
3613
|
+
},
|
|
3614
|
+
`+ ${dayEvents.length}`
|
|
3619
3615
|
)
|
|
3620
3616
|
)
|
|
3621
3617
|
);
|
|
3622
|
-
}))))
|
|
3618
|
+
})))), selectedDay && /* @__PURE__ */ import_react32.default.createElement(
|
|
3619
|
+
SCDrawer,
|
|
3620
|
+
{
|
|
3621
|
+
width: CALENDAR_CONSTANTS.DRAWER_WIDTH,
|
|
3622
|
+
title: selectedDay.format("DD [de] MMMM YYYY"),
|
|
3623
|
+
open: openDrawer,
|
|
3624
|
+
setOpen: (value) => {
|
|
3625
|
+
setOpenDrawer(value);
|
|
3626
|
+
if (!value) setSelectedDay(null);
|
|
3627
|
+
},
|
|
3628
|
+
anchor: "right",
|
|
3629
|
+
actions: false,
|
|
3630
|
+
arrayElements: [{
|
|
3631
|
+
component: /* @__PURE__ */ import_react32.default.createElement(
|
|
3632
|
+
DayEventsList,
|
|
3633
|
+
{
|
|
3634
|
+
events: selectedEvents,
|
|
3635
|
+
day: selectedDay,
|
|
3636
|
+
onEventClick,
|
|
3637
|
+
onEventHover
|
|
3638
|
+
}
|
|
3639
|
+
)
|
|
3640
|
+
}]
|
|
3641
|
+
}
|
|
3642
|
+
));
|
|
3623
3643
|
};
|
|
3624
3644
|
|
|
3625
3645
|
// src/Components/Calendario/Views/WeekView.tsx
|
|
@@ -3683,7 +3703,7 @@ var WeekView = ({
|
|
|
3683
3703
|
})), isLoading ? /* @__PURE__ */ import_react33.default.createElement(import_material22.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react33.default.createElement(import_material22.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ import_react33.default.createElement(
|
|
3684
3704
|
EmptyState,
|
|
3685
3705
|
{
|
|
3686
|
-
containerHeight: "
|
|
3706
|
+
containerHeight: "calc(100vh - 130px)",
|
|
3687
3707
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3688
3708
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3689
3709
|
icon: /* @__PURE__ */ import_react33.default.createElement(LogoCalendario, null)
|
|
@@ -3724,6 +3744,7 @@ var WeekView = ({
|
|
|
3724
3744
|
return /* @__PURE__ */ import_react33.default.createElement(
|
|
3725
3745
|
import_material22.Box,
|
|
3726
3746
|
{
|
|
3747
|
+
sx: { "&:hover": { bgcolor: "primary.50" } },
|
|
3727
3748
|
key: hourIdx,
|
|
3728
3749
|
height: 60,
|
|
3729
3750
|
borderTop: "1px solid",
|
|
@@ -3780,7 +3801,7 @@ var DayView = ({
|
|
|
3780
3801
|
return /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { width: CALENDAR_CONSTANTS.SIDEBAR_WIDTH, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ import_react34.default.createElement(import_material23.Typography, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ import_react34.default.createElement(import_material23.Typography, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ import_react34.default.createElement(import_material23.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ import_react34.default.createElement(import_material23.CircularProgress, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : noEvents ? /* @__PURE__ */ import_react34.default.createElement(
|
|
3781
3802
|
EmptyState,
|
|
3782
3803
|
{
|
|
3783
|
-
containerHeight: "
|
|
3804
|
+
containerHeight: "calc(100vh - 140px)",
|
|
3784
3805
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3785
3806
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3786
3807
|
icon: /* @__PURE__ */ import_react34.default.createElement(LogoCalendario, null)
|
|
@@ -3802,6 +3823,7 @@ var DayView = ({
|
|
|
3802
3823
|
return /* @__PURE__ */ import_react34.default.createElement(
|
|
3803
3824
|
import_material23.Box,
|
|
3804
3825
|
{
|
|
3826
|
+
sx: { "&:hover": { bgcolor: "primary.50" } },
|
|
3805
3827
|
key: hourIdx,
|
|
3806
3828
|
height: CALENDAR_CONSTANTS.DAY_HEIGHT,
|
|
3807
3829
|
borderTop: "1px solid",
|
|
@@ -5897,7 +5919,7 @@ var import_Grid11 = __toESM(require("@mui/material/Grid"), 1);
|
|
|
5897
5919
|
var import_ZoomOut = __toESM(require("@mui/icons-material/ZoomOut"), 1);
|
|
5898
5920
|
var import_ZoomIn = __toESM(require("@mui/icons-material/ZoomIn"), 1);
|
|
5899
5921
|
var import_RotateRight = __toESM(require("@mui/icons-material/RotateRight"), 1);
|
|
5900
|
-
var SCZoom = ({
|
|
5922
|
+
var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
5901
5923
|
const [zoom, setZoom] = (0, import_react57.useState)(1);
|
|
5902
5924
|
const handleZoomIn = () => {
|
|
5903
5925
|
setZoom((prev) => Math.min(prev + 0.2, 3));
|