componentes-sinco 1.1.29 → 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 +38 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +53 -36
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3516,7 +3516,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3516
3516
|
const [openDrawer, setOpenDrawer] = import_react32.default.useState(false);
|
|
3517
3517
|
const [selectedDay, setSelectedDay] = import_react32.default.useState(null);
|
|
3518
3518
|
const [selectedEvents, setSelectedEvents] = import_react32.default.useState([]);
|
|
3519
|
-
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(
|
|
3520
3520
|
EmptyState,
|
|
3521
3521
|
{
|
|
3522
3522
|
containerHeight: "calc(100vh - 130px)",
|
|
@@ -3599,30 +3599,47 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3599
3599
|
sx: { "& .MuiButtonBase-root": { width: "100%" } }
|
|
3600
3600
|
},
|
|
3601
3601
|
/* @__PURE__ */ import_react32.default.createElement(
|
|
3602
|
-
|
|
3602
|
+
import_material21.Button,
|
|
3603
3603
|
{
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
day,
|
|
3616
|
-
onEventClick,
|
|
3617
|
-
onEventHover
|
|
3618
|
-
}
|
|
3619
|
-
)
|
|
3620
|
-
}]
|
|
3621
|
-
}
|
|
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}`
|
|
3622
3615
|
)
|
|
3623
3616
|
)
|
|
3624
3617
|
);
|
|
3625
|
-
}))))
|
|
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
|
+
));
|
|
3626
3643
|
};
|
|
3627
3644
|
|
|
3628
3645
|
// src/Components/Calendario/Views/WeekView.tsx
|