componentes-sinco 1.2.1 → 1.2.2
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 +18 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3650,14 +3650,14 @@ var clampEventToVisibleRange = (event2, currentDate, startHour, endHour) => {
|
|
|
3650
3650
|
|
|
3651
3651
|
// src/Components/Calendario/Views/MonthView.tsx
|
|
3652
3652
|
dayjs5.extend(localeData);
|
|
3653
|
-
var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEventClick, onEventHover }) => {
|
|
3653
|
+
var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEventClick, onEventHover, seeDays = false }) => {
|
|
3654
3654
|
const noEvents = events.length === 0;
|
|
3655
3655
|
const days = getMonthDays(currentDate);
|
|
3656
3656
|
const weekDays = Array.from({ length: 7 }, (_, i) => dayjs5().day(i));
|
|
3657
3657
|
const [openDrawer, setOpenDrawer] = React28.useState(false);
|
|
3658
3658
|
const [selectedDay, setSelectedDay] = React28.useState(null);
|
|
3659
3659
|
const [selectedEvents, setSelectedEvents] = React28.useState([]);
|
|
3660
|
-
return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(Box16, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ React28.createElement(Box16, { minWidth: CALENDAR_CONSTANTS.MIN_WIDTH }, /* @__PURE__ */ React28.createElement(Box16, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ React28.createElement(Box16, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ React28.createElement(Typography14, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ React28.createElement(Box16, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ React28.createElement(CircularProgress2, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) :
|
|
3660
|
+
return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(Box16, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ React28.createElement(Box16, { minWidth: CALENDAR_CONSTANTS.MIN_WIDTH }, /* @__PURE__ */ React28.createElement(Box16, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ React28.createElement(Box16, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ React28.createElement(Typography14, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ React28.createElement(Box16, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ React28.createElement(CircularProgress2, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : seeDays == false ? /* @__PURE__ */ React28.createElement(
|
|
3661
3661
|
EmptyState,
|
|
3662
3662
|
{
|
|
3663
3663
|
containerHeight: "calc(100vh - 130px)",
|
|
@@ -3665,7 +3665,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3665
3665
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3666
3666
|
icon: /* @__PURE__ */ React28.createElement(LogoCalendario, null)
|
|
3667
3667
|
}
|
|
3668
|
-
) : /* @__PURE__ */ React28.createElement(Box16, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5 }, days.map((day) => {
|
|
3668
|
+
) : seeDays == true ? /* @__PURE__ */ React28.createElement(Box16, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5 }, days.map((day) => {
|
|
3669
3669
|
const dayEvents = filterEventsForDay(events, day);
|
|
3670
3670
|
const isCurrentMonth = day.month() === currentDate.month();
|
|
3671
3671
|
return /* @__PURE__ */ React28.createElement(
|
|
@@ -3756,7 +3756,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3756
3756
|
)
|
|
3757
3757
|
)
|
|
3758
3758
|
);
|
|
3759
|
-
})))), selectedDay && /* @__PURE__ */ React28.createElement(
|
|
3759
|
+
})) : null)), selectedDay && /* @__PURE__ */ React28.createElement(
|
|
3760
3760
|
SCDrawer,
|
|
3761
3761
|
{
|
|
3762
3762
|
width: CALENDAR_CONSTANTS.DRAWER_WIDTH,
|
|
@@ -3797,7 +3797,8 @@ var WeekView = ({
|
|
|
3797
3797
|
onEventClick,
|
|
3798
3798
|
onEventHover,
|
|
3799
3799
|
startHour = 0,
|
|
3800
|
-
endHour = 23
|
|
3800
|
+
endHour = 23,
|
|
3801
|
+
seeDays = false
|
|
3801
3802
|
}) => {
|
|
3802
3803
|
const noEvents = events.length === 0;
|
|
3803
3804
|
const todayString = dayjs6().format("YYYY-MM-DD");
|
|
@@ -3841,7 +3842,7 @@ var WeekView = ({
|
|
|
3841
3842
|
/* @__PURE__ */ React29.createElement(Typography15, { variant: "h6", color: "text.primary" }, day.format("D")),
|
|
3842
3843
|
/* @__PURE__ */ React29.createElement(Typography15, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
|
|
3843
3844
|
);
|
|
3844
|
-
})), isLoading ? /* @__PURE__ */ React29.createElement(Box17, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React29.createElement(CircularProgress3, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading &&
|
|
3845
|
+
})), isLoading ? /* @__PURE__ */ React29.createElement(Box17, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React29.createElement(CircularProgress3, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && seeDays == false ? /* @__PURE__ */ React29.createElement(
|
|
3845
3846
|
EmptyState,
|
|
3846
3847
|
{
|
|
3847
3848
|
containerHeight: "calc(100vh - 130px)",
|
|
@@ -3934,12 +3935,13 @@ var DayView = ({
|
|
|
3934
3935
|
onEventClick,
|
|
3935
3936
|
onEventHover,
|
|
3936
3937
|
startHour = CALENDAR_CONSTANTS.DEFAULT_START_HOUR,
|
|
3937
|
-
endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR
|
|
3938
|
+
endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR,
|
|
3939
|
+
seeDays
|
|
3938
3940
|
}) => {
|
|
3939
3941
|
const hours = Array.from({ length: endHour - startHour + 1 }, (_, i) => startHour + i);
|
|
3940
3942
|
const dayEvents = filterEventsForDay(events, currentDate);
|
|
3941
3943
|
const noEvents = events.length === 0;
|
|
3942
|
-
return /* @__PURE__ */ React30.createElement(Box18, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React30.createElement(Box18, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ React30.createElement(Box18, { width: CALENDAR_CONSTANTS.SIDEBAR_WIDTH, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ React30.createElement(Box18, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ React30.createElement(Typography16, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ React30.createElement(Typography16, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ React30.createElement(Box18, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ React30.createElement(CircularProgress4, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) :
|
|
3944
|
+
return /* @__PURE__ */ React30.createElement(Box18, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React30.createElement(Box18, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ React30.createElement(Box18, { width: CALENDAR_CONSTANTS.SIDEBAR_WIDTH, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ React30.createElement(Box18, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ React30.createElement(Typography16, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ React30.createElement(Typography16, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ React30.createElement(Box18, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ React30.createElement(CircularProgress4, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : seeDays == false ? /* @__PURE__ */ React30.createElement(
|
|
3943
3945
|
EmptyState,
|
|
3944
3946
|
{
|
|
3945
3947
|
containerHeight: "calc(100vh - 140px)",
|
|
@@ -4054,7 +4056,8 @@ var Calendar = ({
|
|
|
4054
4056
|
toolbar,
|
|
4055
4057
|
isLoading = false,
|
|
4056
4058
|
startHour = CALENDAR_CONSTANTS.DEFAULT_START_HOUR,
|
|
4057
|
-
endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR
|
|
4059
|
+
endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR,
|
|
4060
|
+
seeDays = false
|
|
4058
4061
|
}) => {
|
|
4059
4062
|
const [view, setView] = useState14(initialView);
|
|
4060
4063
|
const { currentDate, navigateDate } = useCalendarNavigation(dayjs9(), onDateChange);
|
|
@@ -4103,7 +4106,8 @@ var Calendar = ({
|
|
|
4103
4106
|
onDayClick,
|
|
4104
4107
|
onMoreClick,
|
|
4105
4108
|
onEventClick,
|
|
4106
|
-
onEventHover
|
|
4109
|
+
onEventHover,
|
|
4110
|
+
seeDays
|
|
4107
4111
|
}
|
|
4108
4112
|
), view === "week" && /* @__PURE__ */ React31.createElement(
|
|
4109
4113
|
WeekView,
|
|
@@ -4115,7 +4119,8 @@ var Calendar = ({
|
|
|
4115
4119
|
onEventClick,
|
|
4116
4120
|
onEventHover,
|
|
4117
4121
|
startHour,
|
|
4118
|
-
endHour
|
|
4122
|
+
endHour,
|
|
4123
|
+
seeDays
|
|
4119
4124
|
}
|
|
4120
4125
|
), view === "day" && /* @__PURE__ */ React31.createElement(
|
|
4121
4126
|
DayView,
|
|
@@ -4125,7 +4130,8 @@ var Calendar = ({
|
|
|
4125
4130
|
onEventClick,
|
|
4126
4131
|
onEventHover,
|
|
4127
4132
|
startHour,
|
|
4128
|
-
endHour
|
|
4133
|
+
endHour,
|
|
4134
|
+
seeDays
|
|
4129
4135
|
}
|
|
4130
4136
|
)));
|
|
4131
4137
|
};
|