componentes-sinco 1.0.8 → 1.0.10-rc.0
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 +201 -99
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +195 -94
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -68,6 +68,7 @@ __export(src_exports, {
|
|
|
68
68
|
PageHeader: () => PageHeader,
|
|
69
69
|
SCAutocomplete: () => SCAutocomplete,
|
|
70
70
|
SCCalendarSwipeable: () => SCCalendarSwipeable,
|
|
71
|
+
SCCard: () => SCCard,
|
|
71
72
|
SCDataGrid: () => SCDataGrid,
|
|
72
73
|
SCDataGridInitial: () => SCDataGridInitial,
|
|
73
74
|
SCDateRange: () => SCDateRange,
|
|
@@ -2870,7 +2871,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
2870
2871
|
};
|
|
2871
2872
|
|
|
2872
2873
|
// src/Components/Calendario/Calendar.tsx
|
|
2873
|
-
var
|
|
2874
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
2874
2875
|
var import_material22 = require("@mui/material");
|
|
2875
2876
|
|
|
2876
2877
|
// src/Components/Calendario/CalendarToolbar.tsx
|
|
@@ -2907,7 +2908,6 @@ var CalendarToolbar = ({
|
|
|
2907
2908
|
};
|
|
2908
2909
|
const getFormattedDate = () => {
|
|
2909
2910
|
const sunday = labelDate.day(0);
|
|
2910
|
-
const saturday = sunday.add(6, "day");
|
|
2911
2911
|
if (view === "month") {
|
|
2912
2912
|
const textMonth = labelDate.format("MMMM YYYY");
|
|
2913
2913
|
return textMonth.charAt(0).toUpperCase() + textMonth.slice(1);
|
|
@@ -3042,7 +3042,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3042
3042
|
onMouseEnter: handlePopoverOpen,
|
|
3043
3043
|
onMouseLeave: handlePopoverClose
|
|
3044
3044
|
},
|
|
3045
|
-
|
|
3045
|
+
event2.title.charAt(0).toUpperCase() + event2.title.slice(1).toLowerCase()
|
|
3046
3046
|
),
|
|
3047
3047
|
/* @__PURE__ */ import_react25.default.createElement(
|
|
3048
3048
|
import_material18.Popover,
|
|
@@ -3062,7 +3062,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3062
3062
|
onClose: handlePopoverClose,
|
|
3063
3063
|
disableRestoreFocus: true
|
|
3064
3064
|
},
|
|
3065
|
-
onHover ? onHover(event2) :
|
|
3065
|
+
onHover ? onHover(event2) : " "
|
|
3066
3066
|
)
|
|
3067
3067
|
)
|
|
3068
3068
|
);
|
|
@@ -3155,54 +3155,33 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3155
3155
|
onHover: onEventHover
|
|
3156
3156
|
}
|
|
3157
3157
|
))),
|
|
3158
|
-
dayEvents.length > 2 && /* @__PURE__ */ import_react26.default.createElement(
|
|
3159
|
-
|
|
3158
|
+
dayEvents.length > 2 && /* @__PURE__ */ import_react26.default.createElement(
|
|
3159
|
+
import_material19.Stack,
|
|
3160
3160
|
{
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
overflow: "visible",
|
|
3181
|
-
textOverflow: "unset"
|
|
3182
|
-
}
|
|
3183
|
-
}
|
|
3184
|
-
}
|
|
3185
|
-
)), /* @__PURE__ */ import_react26.default.createElement(import_material19.Divider, { flexItem: true, sx: { width: "100%" } }), /* @__PURE__ */ import_react26.default.createElement(import_material19.Typography, { width: "100%", py: 1, color: "text.secondary" }, " Eventos restantes "), /* @__PURE__ */ import_react26.default.createElement(
|
|
3186
|
-
import_material19.Box,
|
|
3187
|
-
{
|
|
3188
|
-
width: "100%",
|
|
3189
|
-
height: "100%",
|
|
3190
|
-
flex: 1,
|
|
3191
|
-
overflow: "auto",
|
|
3192
|
-
p: 1,
|
|
3193
|
-
pt: 1,
|
|
3194
|
-
display: "flex",
|
|
3195
|
-
flexDirection: "column",
|
|
3196
|
-
gap: 1.5
|
|
3197
|
-
},
|
|
3198
|
-
rest.map((event2) => /* @__PURE__ */ import_react26.default.createElement(
|
|
3161
|
+
justifyItems: "center",
|
|
3162
|
+
px: 1,
|
|
3163
|
+
pb: 0.5,
|
|
3164
|
+
onClick: (e) => e.stopPropagation(),
|
|
3165
|
+
sx: { "& .MuiButtonBase-root": { width: "100%" } }
|
|
3166
|
+
},
|
|
3167
|
+
/* @__PURE__ */ import_react26.default.createElement(
|
|
3168
|
+
SCDrawer,
|
|
3169
|
+
{
|
|
3170
|
+
width: "350px",
|
|
3171
|
+
title: day.format("DD [de] MMMM YYYY"),
|
|
3172
|
+
open: openDrawer,
|
|
3173
|
+
buttonDrawer: { text: `+ ${dayEvents.length}` },
|
|
3174
|
+
anchor: "right",
|
|
3175
|
+
actions: false,
|
|
3176
|
+
arrayElements: [{
|
|
3177
|
+
component: (() => {
|
|
3178
|
+
const [first, ...rest] = dayEvents;
|
|
3179
|
+
return /* @__PURE__ */ import_react26.default.createElement(import_material19.Box, { display: "flex", width: "100%", flexDirection: "column", height: "100%", pr: 1.5 }, /* @__PURE__ */ import_react26.default.createElement(import_material19.Typography, { width: "100%", color: "text.secondary" }, " Proximo evento "), first && /* @__PURE__ */ import_react26.default.createElement(import_material19.Box, { p: 1, pb: 1, width: "100%" }, /* @__PURE__ */ import_react26.default.createElement(
|
|
3199
3180
|
CalendarEventCard,
|
|
3200
3181
|
{
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
|
|
3205
|
-
onHover: onEventHover,
|
|
3182
|
+
event: first,
|
|
3183
|
+
color: stateColors[first.state],
|
|
3184
|
+
onClick: () => onEventClick == null ? void 0 : onEventClick(first, day),
|
|
3206
3185
|
sx: {
|
|
3207
3186
|
whiteSpace: "normal",
|
|
3208
3187
|
"& .MuiTypography-root": {
|
|
@@ -3212,21 +3191,60 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3212
3191
|
}
|
|
3213
3192
|
}
|
|
3214
3193
|
}
|
|
3215
|
-
))
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3194
|
+
)), /* @__PURE__ */ import_react26.default.createElement(import_material19.Divider, { flexItem: true, sx: { width: "100%" } }), /* @__PURE__ */ import_react26.default.createElement(import_material19.Typography, { width: "100%", py: 1, color: "text.secondary" }, " Eventos restantes "), /* @__PURE__ */ import_react26.default.createElement(
|
|
3195
|
+
import_material19.Box,
|
|
3196
|
+
{
|
|
3197
|
+
width: "100%",
|
|
3198
|
+
height: "100%",
|
|
3199
|
+
flex: 1,
|
|
3200
|
+
overflow: "auto",
|
|
3201
|
+
p: 1,
|
|
3202
|
+
pt: 1,
|
|
3203
|
+
display: "flex",
|
|
3204
|
+
flexDirection: "column",
|
|
3205
|
+
gap: 1.5
|
|
3206
|
+
},
|
|
3207
|
+
rest.map((event2) => /* @__PURE__ */ import_react26.default.createElement(
|
|
3208
|
+
CalendarEventCard,
|
|
3209
|
+
{
|
|
3210
|
+
key: `${event2.id}-${day.toString()}`,
|
|
3211
|
+
event: event2,
|
|
3212
|
+
color: stateColors[event2.state],
|
|
3213
|
+
onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
|
|
3214
|
+
onHover: onEventHover,
|
|
3215
|
+
sx: {
|
|
3216
|
+
whiteSpace: "normal",
|
|
3217
|
+
"& .MuiTypography-root": {
|
|
3218
|
+
whiteSpace: "normal",
|
|
3219
|
+
overflow: "visible",
|
|
3220
|
+
textOverflow: "unset"
|
|
3221
|
+
}
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
))
|
|
3225
|
+
));
|
|
3226
|
+
})()
|
|
3227
|
+
}]
|
|
3228
|
+
}
|
|
3229
|
+
)
|
|
3230
|
+
)
|
|
3221
3231
|
);
|
|
3222
3232
|
}))));
|
|
3223
3233
|
};
|
|
3224
3234
|
|
|
3225
3235
|
// src/Components/Calendario/Views/WeekView.tsx
|
|
3226
|
-
var
|
|
3236
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
3227
3237
|
var import_material20 = require("@mui/material");
|
|
3228
3238
|
var import_dayjs5 = __toESM(require("dayjs"), 1);
|
|
3229
3239
|
var import_localeData2 = __toESM(require("dayjs/plugin/localeData"), 1);
|
|
3240
|
+
|
|
3241
|
+
// src/assets/LogoCalendario.tsx
|
|
3242
|
+
var import_react27 = __toESM(require("react"), 1);
|
|
3243
|
+
var LogoCalendario = () => {
|
|
3244
|
+
return /* @__PURE__ */ import_react27.default.createElement("svg", { width: "60", height: "61", viewBox: "0 0 60 61", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react27.default.createElement("g", { "clip-path": "url(#clip0_5353_24891)" }, /* @__PURE__ */ import_react27.default.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M40.7361 11.1589C39.7792 11.1589 39.0106 11.9722 39.0106 12.9661V15.4375H20.0309V12.9661C20.0309 11.964 19.2545 11.1589 18.3055 11.1589C17.3487 11.1589 16.5801 11.9722 16.5801 12.9661V15.4375H12.8819C12.0652 15.4375 11.4038 16.0918 11.4038 16.8998V20.6551C11.4038 21.463 12.0652 22.1174 12.8819 22.1174H46.8383C47.655 22.1174 48.3165 21.463 48.3165 20.6551V16.8998C48.3165 16.0918 47.655 15.4375 46.8383 15.4375H42.4615V12.9661C42.4615 11.964 41.6851 11.1589 40.7361 11.1589ZM19.4827 19.2049C19.6528 19.1343 19.7361 19.006 19.7724 18.8352C19.6916 18.9714 19.594 19.0957 19.4827 19.2049Z", fill: "#00BCD4" }), /* @__PURE__ */ import_react27.default.createElement("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14.2037 25.8653C13.7579 25.8653 13.425 26.2168 13.425 26.6093V47.3669C13.425 47.7595 13.7579 48.1109 14.2037 48.1109H46.0004C46.4782 48.1109 46.8656 47.7236 46.8656 47.2458V26.6093C46.8656 26.2168 46.5327 25.8653 46.087 25.8653H14.2037ZM11.6948 26.6093C11.6948 25.2255 12.8384 24.135 14.2037 24.135H46.087C47.4522 24.135 48.5959 25.2255 48.5959 26.6093V47.2458C48.5959 48.6792 47.4339 49.8412 46.0004 49.8412H14.2037C12.8384 49.8412 11.6948 48.7508 11.6948 47.3669V26.6093Z", fill: "#6392BD" }), /* @__PURE__ */ import_react27.default.createElement("path", { d: "M19.481 30.9138C19.481 30.5164 20.1155 30.1903 20.9058 30.1903C21.6894 30.1903 22.3305 30.5131 22.3305 30.9138V32.8862C22.3305 33.2836 21.6894 33.6097 20.9058 33.6097C20.1222 33.6097 19.481 33.2869 19.481 32.8862V30.9138Z", fill: "#6392BD" }), /* @__PURE__ */ import_react27.default.createElement("path", { d: "M30.0242 30.1903C29.2339 30.1903 28.5995 30.5164 28.5995 30.9138V32.8862C28.5995 33.2869 29.2406 33.6097 30.0242 33.6097C30.8079 33.6097 31.449 33.2836 31.449 32.8862V30.9138C31.449 30.5131 30.8079 30.1903 30.0242 30.1903Z", fill: "#6392BD" }), /* @__PURE__ */ import_react27.default.createElement("path", { d: "M37.7179 30.9138C37.7179 30.5164 38.3524 30.1903 39.1427 30.1903C39.608 30.1903 40.022 30.3038 40.2825 30.4797C40.3515 30.5276 40.4116 30.5788 40.4561 30.6344C40.5274 30.7201 40.5675 30.8147 40.5675 30.9138V32.8862C40.5675 33.2836 39.9263 33.6097 39.1427 33.6097C38.3591 33.6097 37.7179 33.2869 37.7179 32.8862V30.9138Z", fill: "#6392BD" }), /* @__PURE__ */ import_react27.default.createElement("path", { d: "M20.9058 39.8787C20.1155 39.8787 19.481 40.2048 19.481 40.6022V42.5746C19.481 42.687 19.5322 42.7927 19.6213 42.8874C19.7036 42.9731 19.8172 43.0499 19.9552 43.1122C20.2068 43.228 20.5407 43.2981 20.9058 43.2981C21.6894 43.2981 22.3305 42.972 22.3305 42.5746V40.6022C22.3305 40.2015 21.6894 39.8787 20.9058 39.8787Z", fill: "#6392BD" }), /* @__PURE__ */ import_react27.default.createElement("path", { d: "M29.524 39.9477C29.7087 39.9032 29.9158 39.8787 30.1339 39.8787C30.9176 39.8787 31.5587 40.2015 31.5587 40.6022V42.5746C31.5587 42.972 30.9176 43.2981 30.1339 43.2981C29.3503 43.2981 28.7092 42.9753 28.7092 42.5746V40.6022C28.7092 40.315 29.0409 40.0646 29.524 39.9477Z", fill: "#6392BD" }), /* @__PURE__ */ import_react27.default.createElement("path", { d: "M38.5141 39.9482C38.6989 39.9037 38.9059 39.8792 39.1241 39.8792C39.9077 39.8792 40.5488 40.202 40.5488 40.6027V42.5751C40.5488 42.9725 39.9077 43.2986 39.1241 43.2986C38.3405 43.2986 37.6993 42.9758 37.6993 42.5751V40.6027C37.6993 40.3155 38.031 40.0651 38.5141 39.9482Z", fill: "#6392BD" })), /* @__PURE__ */ import_react27.default.createElement("defs", null, /* @__PURE__ */ import_react27.default.createElement("clipPath", { id: "clip0_5353_24891" }, /* @__PURE__ */ import_react27.default.createElement("rect", { width: "60", height: "60", fill: "white", transform: "translate(0 0.5)" }))));
|
|
3245
|
+
};
|
|
3246
|
+
|
|
3247
|
+
// src/Components/Calendario/Views/WeekView.tsx
|
|
3230
3248
|
import_dayjs5.default.extend(import_localeData2.default);
|
|
3231
3249
|
var WeekView = ({
|
|
3232
3250
|
events,
|
|
@@ -3258,9 +3276,9 @@ var WeekView = ({
|
|
|
3258
3276
|
}
|
|
3259
3277
|
return "none";
|
|
3260
3278
|
};
|
|
3261
|
-
return /* @__PURE__ */
|
|
3279
|
+
return /* @__PURE__ */ import_react28.default.createElement(import_material20.Box, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react28.default.createElement(import_material20.Box, { display: "flex", bgcolor: "transparent" }, /* @__PURE__ */ import_react28.default.createElement(import_material20.Box, { width: 45, bgcolor: "transparent" }), days.map((day) => {
|
|
3262
3280
|
const isToday2 = day.format("YYYY-MM-DD") === todayString;
|
|
3263
|
-
return /* @__PURE__ */
|
|
3281
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
|
3264
3282
|
import_material20.Box,
|
|
3265
3283
|
{
|
|
3266
3284
|
key: day.toString(),
|
|
@@ -3277,19 +3295,19 @@ var WeekView = ({
|
|
|
3277
3295
|
borderBottom: isToday2 ? 2 : 0,
|
|
3278
3296
|
borderColor: isToday2 ? "primary.main" : "transparent"
|
|
3279
3297
|
},
|
|
3280
|
-
/* @__PURE__ */
|
|
3281
|
-
/* @__PURE__ */
|
|
3298
|
+
/* @__PURE__ */ import_react28.default.createElement(import_material20.Typography, { variant: "h6", color: "text.primary" }, day.format("D")),
|
|
3299
|
+
/* @__PURE__ */ import_react28.default.createElement(import_material20.Typography, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
|
|
3282
3300
|
);
|
|
3283
|
-
})), isLoading ? /* @__PURE__ */
|
|
3301
|
+
})), isLoading ? /* @__PURE__ */ import_react28.default.createElement(import_material20.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react28.default.createElement(import_material20.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ import_react28.default.createElement(
|
|
3284
3302
|
EmptyState,
|
|
3285
3303
|
{
|
|
3286
3304
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3287
3305
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3288
|
-
icon: /* @__PURE__ */
|
|
3306
|
+
icon: /* @__PURE__ */ import_react28.default.createElement(LogoCalendario, null)
|
|
3289
3307
|
}
|
|
3290
3308
|
) : (
|
|
3291
3309
|
// Grid de horas y eventos
|
|
3292
|
-
/* @__PURE__ */
|
|
3310
|
+
/* @__PURE__ */ import_react28.default.createElement(import_material20.Box, { display: "flex", flex: 1 }, /* @__PURE__ */ import_react28.default.createElement(import_material20.Box, { width: 45, bgcolor: "transparent" }, hours.map((h) => /* @__PURE__ */ import_react28.default.createElement(
|
|
3293
3311
|
import_material20.Box,
|
|
3294
3312
|
{
|
|
3295
3313
|
key: h,
|
|
@@ -3298,7 +3316,7 @@ var WeekView = ({
|
|
|
3298
3316
|
pr: 1,
|
|
3299
3317
|
borderColor: "divider"
|
|
3300
3318
|
},
|
|
3301
|
-
/* @__PURE__ */
|
|
3319
|
+
/* @__PURE__ */ import_react28.default.createElement(import_material20.Typography, { variant: "caption", color: "text.secondary" }, (0, import_dayjs5.default)().hour(h).format("h A"))
|
|
3302
3320
|
))), days.map((day) => {
|
|
3303
3321
|
const dayEvents = events.filter(
|
|
3304
3322
|
(event2) => day.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
|
|
@@ -3307,7 +3325,7 @@ var WeekView = ({
|
|
|
3307
3325
|
const endsInRange = event2.end.hour() >= startHour && event2.end.hour() <= endHour;
|
|
3308
3326
|
return startsInRange || endsInRange;
|
|
3309
3327
|
}).sort((a, b) => a.start.valueOf() - b.start.valueOf());
|
|
3310
|
-
return /* @__PURE__ */
|
|
3328
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
|
3311
3329
|
import_material20.Box,
|
|
3312
3330
|
{
|
|
3313
3331
|
key: day.toString(),
|
|
@@ -3320,7 +3338,7 @@ var WeekView = ({
|
|
|
3320
3338
|
},
|
|
3321
3339
|
hours.map((hourIdx) => {
|
|
3322
3340
|
const borderType = getCellBorderType(hourIdx, dayEvents);
|
|
3323
|
-
return /* @__PURE__ */
|
|
3341
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
|
3324
3342
|
import_material20.Box,
|
|
3325
3343
|
{
|
|
3326
3344
|
key: hourIdx,
|
|
@@ -3336,7 +3354,7 @@ var WeekView = ({
|
|
|
3336
3354
|
const eventEnd = day.isSame(event2.end, "day") ? event2.end : day.endOf("day").hour(endHour).minute(59);
|
|
3337
3355
|
const startMinutes = (eventStart.hour() - startHour) * 60 + eventStart.minute();
|
|
3338
3356
|
const durationMinutes = eventEnd.diff(eventStart, "minute");
|
|
3339
|
-
return /* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ import_react28.default.createElement(
|
|
3340
3358
|
CalendarEventCard,
|
|
3341
3359
|
{
|
|
3342
3360
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3361,7 +3379,7 @@ var WeekView = ({
|
|
|
3361
3379
|
};
|
|
3362
3380
|
|
|
3363
3381
|
// src/Components/Calendario/Views/DayView.tsx
|
|
3364
|
-
var
|
|
3382
|
+
var import_react29 = __toESM(require("react"), 1);
|
|
3365
3383
|
var import_material21 = require("@mui/material");
|
|
3366
3384
|
var import_dayjs6 = __toESM(require("dayjs"), 1);
|
|
3367
3385
|
var DayView = ({
|
|
@@ -3393,14 +3411,14 @@ var DayView = ({
|
|
|
3393
3411
|
(event2) => currentDate.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
|
|
3394
3412
|
);
|
|
3395
3413
|
const noEvents = events.length === 0;
|
|
3396
|
-
return /* @__PURE__ */
|
|
3414
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_material21.Box, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react29.default.createElement(import_material21.Box, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ import_react29.default.createElement(import_material21.Box, { width: 47, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ import_react29.default.createElement(import_material21.Box, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ import_react29.default.createElement(import_material21.Typography, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ import_react29.default.createElement(import_material21.Typography, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ import_react29.default.createElement(import_material21.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react29.default.createElement(import_material21.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : noEvents ? /* @__PURE__ */ import_react29.default.createElement(
|
|
3397
3415
|
EmptyState,
|
|
3398
3416
|
{
|
|
3399
3417
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3400
3418
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3401
|
-
icon: /* @__PURE__ */
|
|
3419
|
+
icon: /* @__PURE__ */ import_react29.default.createElement("img", { src: Icon_Scheduler_default, alt: "icon_calendario", style: { width: 60, height: 60 } })
|
|
3402
3420
|
}
|
|
3403
|
-
) : /* @__PURE__ */
|
|
3421
|
+
) : /* @__PURE__ */ import_react29.default.createElement(import_material21.Box, { display: "flex", flex: 1 }, /* @__PURE__ */ import_react29.default.createElement(import_material21.Box, { width: 47, bgcolor: "background.default" }, hours.map((h) => /* @__PURE__ */ import_react29.default.createElement(
|
|
3404
3422
|
import_material21.Box,
|
|
3405
3423
|
{
|
|
3406
3424
|
key: h,
|
|
@@ -3411,10 +3429,10 @@ var DayView = ({
|
|
|
3411
3429
|
borderRight: "1px solid",
|
|
3412
3430
|
borderColor: "divider"
|
|
3413
3431
|
},
|
|
3414
|
-
/* @__PURE__ */
|
|
3415
|
-
))), /* @__PURE__ */
|
|
3432
|
+
/* @__PURE__ */ import_react29.default.createElement(import_material21.Typography, { variant: "caption", color: "text.secondary" }, (0, import_dayjs6.default)().hour(h).format("h A"))
|
|
3433
|
+
))), /* @__PURE__ */ import_react29.default.createElement(import_material21.Box, { flex: 1, position: "relative" }, hours.map((hourIdx) => {
|
|
3416
3434
|
const borderType = getCellBorderType(hourIdx, dayEvents);
|
|
3417
|
-
return /* @__PURE__ */
|
|
3435
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
|
3418
3436
|
import_material21.Box,
|
|
3419
3437
|
{
|
|
3420
3438
|
key: hourIdx,
|
|
@@ -3433,7 +3451,7 @@ var DayView = ({
|
|
|
3433
3451
|
const clampedEnd = eventEnd.isAfter(maxEnd) ? maxEnd : eventEnd;
|
|
3434
3452
|
const startMinutes = (clampedStart.hour() - startHour) * 60 + clampedStart.minute();
|
|
3435
3453
|
const durationMinutes = clampedEnd.diff(clampedStart, "minute");
|
|
3436
|
-
return /* @__PURE__ */
|
|
3454
|
+
return /* @__PURE__ */ import_react29.default.createElement(
|
|
3437
3455
|
CalendarEventCard,
|
|
3438
3456
|
{
|
|
3439
3457
|
key: `${event2.id}-${currentDate.toString()}`,
|
|
@@ -3469,8 +3487,8 @@ var Calendar = ({
|
|
|
3469
3487
|
// <- valor por defecto
|
|
3470
3488
|
endHour = 23
|
|
3471
3489
|
}) => {
|
|
3472
|
-
const [view, setView] = (0,
|
|
3473
|
-
const [currentDate, setCurrentDate] = (0,
|
|
3490
|
+
const [view, setView] = (0, import_react30.useState)(initialView);
|
|
3491
|
+
const [currentDate, setCurrentDate] = (0, import_react30.useState)((0, import_dayjs7.default)());
|
|
3474
3492
|
const handleViewChange = (newView) => {
|
|
3475
3493
|
setView(newView);
|
|
3476
3494
|
onViewChange == null ? void 0 : onViewChange(newView);
|
|
@@ -3478,12 +3496,18 @@ var Calendar = ({
|
|
|
3478
3496
|
const handleNavigate = (action) => {
|
|
3479
3497
|
let newDate = currentDate;
|
|
3480
3498
|
const unit = view === "month" ? "month" : "day";
|
|
3481
|
-
if (action === "PREV")
|
|
3482
|
-
|
|
3483
|
-
|
|
3499
|
+
if (action === "PREV") {
|
|
3500
|
+
if (view === "day") newDate = currentDate.subtract(1, "day");
|
|
3501
|
+
if (view === "week") newDate = currentDate.subtract(1, "week");
|
|
3502
|
+
if (view === "month") newDate = currentDate.subtract(1, "month");
|
|
3503
|
+
} else if (action === "NEXT") {
|
|
3504
|
+
if (view === "day") newDate = currentDate.add(1, "day");
|
|
3505
|
+
if (view === "week") newDate = currentDate.add(1, "week");
|
|
3506
|
+
if (view === "month") newDate = currentDate.add(1, "month");
|
|
3507
|
+
} else if (action === "TODAY") newDate = (0, import_dayjs7.default)();
|
|
3484
3508
|
setCurrentDate(newDate);
|
|
3485
3509
|
};
|
|
3486
|
-
return /* @__PURE__ */
|
|
3510
|
+
return /* @__PURE__ */ import_react30.default.createElement(import_material22.Box, null, /* @__PURE__ */ import_react30.default.createElement(
|
|
3487
3511
|
CalendarToolbar,
|
|
3488
3512
|
{
|
|
3489
3513
|
labelDate: currentDate,
|
|
@@ -3492,7 +3516,7 @@ var Calendar = ({
|
|
|
3492
3516
|
onNavigate: handleNavigate
|
|
3493
3517
|
},
|
|
3494
3518
|
toolbar
|
|
3495
|
-
), isLoading ? /* @__PURE__ */
|
|
3519
|
+
), isLoading ? /* @__PURE__ */ import_react30.default.createElement(import_react30.default.Fragment, null, /* @__PURE__ */ import_react30.default.createElement(import_material22.Box, null, /* @__PURE__ */ import_react30.default.createElement(
|
|
3496
3520
|
import_material22.Box,
|
|
3497
3521
|
{
|
|
3498
3522
|
display: "flex",
|
|
@@ -3500,8 +3524,8 @@ var Calendar = ({
|
|
|
3500
3524
|
alignItems: "center",
|
|
3501
3525
|
height: "400px"
|
|
3502
3526
|
},
|
|
3503
|
-
/* @__PURE__ */
|
|
3504
|
-
))) : /* @__PURE__ */
|
|
3527
|
+
/* @__PURE__ */ import_react30.default.createElement(import_material22.CircularProgress, { variant: "indeterminate" })
|
|
3528
|
+
))) : /* @__PURE__ */ import_react30.default.createElement(import_react30.default.Fragment, null, view === "month" && /* @__PURE__ */ import_react30.default.createElement(
|
|
3505
3529
|
MonthView,
|
|
3506
3530
|
{
|
|
3507
3531
|
events,
|
|
@@ -3511,7 +3535,7 @@ var Calendar = ({
|
|
|
3511
3535
|
onEventClick,
|
|
3512
3536
|
onEventHover
|
|
3513
3537
|
}
|
|
3514
|
-
), view === "week" && /* @__PURE__ */
|
|
3538
|
+
), view === "week" && /* @__PURE__ */ import_react30.default.createElement(
|
|
3515
3539
|
WeekView,
|
|
3516
3540
|
{
|
|
3517
3541
|
events,
|
|
@@ -3523,7 +3547,7 @@ var Calendar = ({
|
|
|
3523
3547
|
startHour,
|
|
3524
3548
|
endHour
|
|
3525
3549
|
}
|
|
3526
|
-
), view === "day" && /* @__PURE__ */
|
|
3550
|
+
), view === "day" && /* @__PURE__ */ import_react30.default.createElement(
|
|
3527
3551
|
DayView,
|
|
3528
3552
|
{
|
|
3529
3553
|
events,
|
|
@@ -3537,7 +3561,7 @@ var Calendar = ({
|
|
|
3537
3561
|
};
|
|
3538
3562
|
|
|
3539
3563
|
// src/Components/SCTime.tsx
|
|
3540
|
-
var
|
|
3564
|
+
var import_react31 = __toESM(require("react"), 1);
|
|
3541
3565
|
var import_material23 = require("@mui/material");
|
|
3542
3566
|
var import_LocalizationProvider3 = require("@mui/x-date-pickers/LocalizationProvider");
|
|
3543
3567
|
var import_AdapterDayjs2 = require("@mui/x-date-pickers/AdapterDayjs");
|
|
@@ -3561,9 +3585,9 @@ var SCTime = ({
|
|
|
3561
3585
|
);
|
|
3562
3586
|
const isTimeEmpty = required && !state;
|
|
3563
3587
|
const hasError = isTimeEmpty;
|
|
3564
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
3565
|
-
const [isOpenPopover, setIsOpenPopover] = (0,
|
|
3566
|
-
const [popoverPlacement, setPopoverPlacement] = (0,
|
|
3588
|
+
const [anchorEl, setAnchorEl] = (0, import_react31.useState)(null);
|
|
3589
|
+
const [isOpenPopover, setIsOpenPopover] = (0, import_react31.useState)(false);
|
|
3590
|
+
const [popoverPlacement, setPopoverPlacement] = (0, import_react31.useState)("bottom");
|
|
3567
3591
|
const detectPlacement = (element) => {
|
|
3568
3592
|
const rect = element.getBoundingClientRect();
|
|
3569
3593
|
const windowHeight = window.innerHeight;
|
|
@@ -3594,7 +3618,7 @@ var SCTime = ({
|
|
|
3594
3618
|
setIsOpenPopover(false);
|
|
3595
3619
|
setAnchorEl(null);
|
|
3596
3620
|
};
|
|
3597
|
-
return /* @__PURE__ */
|
|
3621
|
+
return /* @__PURE__ */ import_react31.default.createElement(import_LocalizationProvider3.LocalizationProvider, { dateAdapter: import_AdapterDayjs2.AdapterDayjs }, /* @__PURE__ */ import_react31.default.createElement(import_material23.Box, { sx: { position: "relative", width: "120px" } }, /* @__PURE__ */ import_react31.default.createElement(
|
|
3598
3622
|
import_TimeField.TimeField,
|
|
3599
3623
|
{
|
|
3600
3624
|
label,
|
|
@@ -3606,7 +3630,7 @@ var SCTime = ({
|
|
|
3606
3630
|
slotProps: {
|
|
3607
3631
|
textField: {
|
|
3608
3632
|
InputProps: {
|
|
3609
|
-
endAdornment: /* @__PURE__ */
|
|
3633
|
+
endAdornment: /* @__PURE__ */ import_react31.default.createElement(import_material23.InputAdornment, { position: "end" }, /* @__PURE__ */ import_react31.default.createElement(
|
|
3610
3634
|
import_AccessTime.default,
|
|
3611
3635
|
{
|
|
3612
3636
|
color: disabled ? "disabled" : "action",
|
|
@@ -3635,7 +3659,7 @@ var SCTime = ({
|
|
|
3635
3659
|
}
|
|
3636
3660
|
}
|
|
3637
3661
|
}
|
|
3638
|
-
), /* @__PURE__ */
|
|
3662
|
+
), /* @__PURE__ */ import_react31.default.createElement(
|
|
3639
3663
|
import_material23.Popover,
|
|
3640
3664
|
{
|
|
3641
3665
|
open: isOpenPopover,
|
|
@@ -3663,7 +3687,7 @@ var SCTime = ({
|
|
|
3663
3687
|
}
|
|
3664
3688
|
}
|
|
3665
3689
|
},
|
|
3666
|
-
/* @__PURE__ */
|
|
3690
|
+
/* @__PURE__ */ import_react31.default.createElement(import_material23.ClickAwayListener, { onClickAway: handleClose }, /* @__PURE__ */ import_react31.default.createElement(import_material23.Box, { sx: { p: 0 } }, /* @__PURE__ */ import_react31.default.createElement(
|
|
3667
3691
|
import_DigitalClock.DigitalClock,
|
|
3668
3692
|
{
|
|
3669
3693
|
value: state,
|
|
@@ -3684,11 +3708,88 @@ var SCTime = ({
|
|
|
3684
3708
|
)));
|
|
3685
3709
|
};
|
|
3686
3710
|
|
|
3711
|
+
// src/Components/SCCard.tsx
|
|
3712
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
3713
|
+
var import_material24 = require("@mui/material");
|
|
3714
|
+
var import_IconButton = __toESM(require("@mui/material/IconButton"), 1);
|
|
3715
|
+
var import_Card = __toESM(require("@mui/material/Card"), 1);
|
|
3716
|
+
var import_CardHeader = __toESM(require("@mui/material/CardHeader"), 1);
|
|
3717
|
+
var import_CardMedia = __toESM(require("@mui/material/CardMedia"), 1);
|
|
3718
|
+
var import_CardContent = __toESM(require("@mui/material/CardContent"), 1);
|
|
3719
|
+
var import_CardActions = __toESM(require("@mui/material/CardActions"), 1);
|
|
3720
|
+
var import_Collapse = __toESM(require("@mui/material/Collapse"), 1);
|
|
3721
|
+
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"), 1);
|
|
3722
|
+
var Muicon8 = __toESM(require("@mui/icons-material"), 1);
|
|
3723
|
+
var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
|
|
3724
|
+
let iconTitleValidation = "";
|
|
3725
|
+
let IconTitle;
|
|
3726
|
+
const [expanded, setExpanded] = import_react32.default.useState(false);
|
|
3727
|
+
if (iconTitle) {
|
|
3728
|
+
if (Muicon8[iconTitle] == void 0) {
|
|
3729
|
+
if (iconTitle && import_react32.default.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
3730
|
+
iconTitleValidation = "image";
|
|
3731
|
+
IconTitle = iconTitle;
|
|
3732
|
+
} else {
|
|
3733
|
+
iconTitleValidation = "icon";
|
|
3734
|
+
IconTitle = iconTitle;
|
|
3735
|
+
}
|
|
3736
|
+
} else {
|
|
3737
|
+
iconTitleValidation = "icon";
|
|
3738
|
+
IconTitle = Muicon8[iconTitle];
|
|
3739
|
+
}
|
|
3740
|
+
}
|
|
3741
|
+
const handleExpandClick = () => {
|
|
3742
|
+
setExpanded(!expanded);
|
|
3743
|
+
};
|
|
3744
|
+
return /* @__PURE__ */ import_react32.default.createElement(import_Card.default, { sx: { maxWidth: 345 } }, title && /* @__PURE__ */ import_react32.default.createElement(
|
|
3745
|
+
import_CardHeader.default,
|
|
3746
|
+
{
|
|
3747
|
+
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ import_react32.default.createElement(import_material24.Box, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ import_react32.default.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ import_react32.default.createElement(import_material24.SvgIcon, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
|
|
3748
|
+
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ import_react32.default.createElement(import_material24.Button, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ import_react32.default.createElement(import_IconButton.default, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ import_react32.default.createElement(import_ExpandMore.default, { fontSize: "small" })) : actionsTitle,
|
|
3749
|
+
title,
|
|
3750
|
+
subheader: subtitle,
|
|
3751
|
+
sx: {
|
|
3752
|
+
"& .MuiCardHeader-title": {
|
|
3753
|
+
fontSize: "14px",
|
|
3754
|
+
color: "text.primary"
|
|
3755
|
+
},
|
|
3756
|
+
"& .MuiCardHeader-subheader": {
|
|
3757
|
+
fontSize: "13px",
|
|
3758
|
+
color: "text.secondary"
|
|
3759
|
+
},
|
|
3760
|
+
"& .MuiCardHeader-action": {
|
|
3761
|
+
height: "40px !important",
|
|
3762
|
+
display: "flex",
|
|
3763
|
+
alignItems: "center"
|
|
3764
|
+
}
|
|
3765
|
+
}
|
|
3766
|
+
}
|
|
3767
|
+
), image && /* @__PURE__ */ import_react32.default.createElement(
|
|
3768
|
+
import_CardMedia.default,
|
|
3769
|
+
{
|
|
3770
|
+
component: "img",
|
|
3771
|
+
height: "194",
|
|
3772
|
+
image
|
|
3773
|
+
}
|
|
3774
|
+
), content && /* @__PURE__ */ import_react32.default.createElement(import_CardContent.default, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ import_react32.default.createElement(import_CardActions.default, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ import_react32.default.createElement(import_material24.Button, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ import_react32.default.createElement(import_IconButton.default, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ import_react32.default.createElement(import_ExpandMore.default, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ import_react32.default.createElement(
|
|
3775
|
+
import_material24.Button,
|
|
3776
|
+
{
|
|
3777
|
+
key: index,
|
|
3778
|
+
size: "small",
|
|
3779
|
+
color: action.color || "primary",
|
|
3780
|
+
variant: action.variant || "text",
|
|
3781
|
+
onClick: action.fn,
|
|
3782
|
+
disabled: action.disabled || false
|
|
3783
|
+
},
|
|
3784
|
+
action.text
|
|
3785
|
+
)) : ""), expand && /* @__PURE__ */ import_react32.default.createElement(import_Collapse.default, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ import_react32.default.createElement(import_CardContent.default, { sx: { padding: "8px 16px !important" } }, expand.content)));
|
|
3786
|
+
};
|
|
3787
|
+
|
|
3687
3788
|
// src/Theme/index.ts
|
|
3688
3789
|
var import_styles3 = require("@mui/material/styles");
|
|
3689
3790
|
|
|
3690
3791
|
// src/Theme/components.ts
|
|
3691
|
-
var
|
|
3792
|
+
var import_react33 = __toESM(require("react"), 1);
|
|
3692
3793
|
var import_icons_material11 = require("@mui/icons-material");
|
|
3693
3794
|
var components = {
|
|
3694
3795
|
MuiSelect: {
|
|
@@ -4386,10 +4487,10 @@ var components = {
|
|
|
4386
4487
|
MuiAlert: {
|
|
4387
4488
|
defaultProps: {
|
|
4388
4489
|
iconMapping: {
|
|
4389
|
-
success:
|
|
4390
|
-
error:
|
|
4391
|
-
warning:
|
|
4392
|
-
info:
|
|
4490
|
+
success: import_react33.default.createElement(import_icons_material11.CheckCircleRounded),
|
|
4491
|
+
error: import_react33.default.createElement(import_icons_material11.ErrorRounded),
|
|
4492
|
+
warning: import_react33.default.createElement(import_icons_material11.WarningRounded),
|
|
4493
|
+
info: import_react33.default.createElement(import_icons_material11.InfoRounded)
|
|
4393
4494
|
}
|
|
4394
4495
|
},
|
|
4395
4496
|
variants: [
|
|
@@ -5438,6 +5539,7 @@ var ADCSincoTheme = (0, import_styles3.createTheme)(__spreadValues({}, ADCTheme)
|
|
|
5438
5539
|
PageHeader,
|
|
5439
5540
|
SCAutocomplete,
|
|
5440
5541
|
SCCalendarSwipeable,
|
|
5542
|
+
SCCard,
|
|
5441
5543
|
SCDataGrid,
|
|
5442
5544
|
SCDataGridInitial,
|
|
5443
5545
|
SCDateRange,
|