componentes-sinco 1.0.26 → 1.0.27

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.js CHANGED
@@ -29,22 +29,731 @@ var __objRest = (source, exclude) => {
29
29
  }
30
30
  return target;
31
31
  };
32
+ var __async = (__this, __arguments, generator) => {
33
+ return new Promise((resolve, reject) => {
34
+ var fulfilled = (value) => {
35
+ try {
36
+ step(generator.next(value));
37
+ } catch (e) {
38
+ reject(e);
39
+ }
40
+ };
41
+ var rejected = (value) => {
42
+ try {
43
+ step(generator.throw(value));
44
+ } catch (e) {
45
+ reject(e);
46
+ }
47
+ };
48
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
49
+ step((generator = generator.apply(__this, __arguments)).next());
50
+ });
51
+ };
52
+
53
+ // src/Components/Adjuntar/Adjuntar.tsx
54
+ import React4, { useEffect as useEffect4, useRef, useState as useState4 } from "react";
55
+ import { Box as Box3, Button as Button3, CircularProgress, IconButton as IconButton3, Stack as Stack3, Tooltip, Typography as Typography3 } from "@mui/material";
56
+ import { CloudUploadOutlined, AttachFileOutlined, DeleteOutline, UploadFileOutlined, FileDownload } from "@mui/icons-material";
57
+
58
+ // src/Components/ToastNotification/SCToastNotification.tsx
59
+ import React, { useEffect as useEffect2, useState as useState2 } from "react";
60
+ import { Stack, LinearProgress, Divider, Box, Typography, IconButton, Button } from "@mui/material";
61
+ import { Close, InfoRounded, CheckCircleRounded, WarningRounded, ErrorRounded, KeyboardArrowDown, KeyboardArrowUp } from "@mui/icons-material";
62
+
63
+ // src/Components/ToastNotification/useProgress.ts
64
+ import { useEffect, useState } from "react";
65
+ var useProgress = (timeProgress, lote) => {
66
+ const [progress, setProgress] = useState(0);
67
+ useEffect(() => {
68
+ const interval = setInterval(() => {
69
+ setProgress((prev) => {
70
+ if (prev >= 100) {
71
+ clearInterval(interval);
72
+ }
73
+ if (lote) {
74
+ const nextProgress = prev + lote;
75
+ return nextProgress <= 100 ? nextProgress : 100;
76
+ } else {
77
+ return prev + 1;
78
+ }
79
+ });
80
+ }, timeProgress * 10);
81
+ return () => {
82
+ clearInterval(interval);
83
+ };
84
+ }, [timeProgress, lote]);
85
+ return {
86
+ progress
87
+ };
88
+ };
89
+ var ToastProgress = (timeProgress) => {
90
+ const [progress, setProgress] = useState(100);
91
+ useEffect(() => {
92
+ const interval = setInterval(() => {
93
+ setProgress((prev) => {
94
+ if (prev <= 0) {
95
+ clearInterval(interval);
96
+ }
97
+ return prev - 1;
98
+ });
99
+ }, timeProgress * 10);
100
+ return () => {
101
+ clearInterval(interval);
102
+ };
103
+ }, [timeProgress]);
104
+ return {
105
+ progressToast: progress
106
+ };
107
+ };
108
+
109
+ // src/Components/ToastNotification/SCToastNotification.tsx
110
+ var SCToastNotification = (toast) => {
111
+ var _a;
112
+ const [stateOptions, setStateOptions] = useState2(true);
113
+ const [stateToast, setStateToast] = useState2(true);
114
+ const timeProgress = toast.time || 10;
115
+ const { progress } = useProgress(timeProgress);
116
+ const toastColorConfig = toast.type || "info";
117
+ const toastIconOption = {
118
+ success: /* @__PURE__ */ React.createElement(CheckCircleRounded, { color: "success" }),
119
+ error: /* @__PURE__ */ React.createElement(ErrorRounded, { color: "error" }),
120
+ warning: /* @__PURE__ */ React.createElement(WarningRounded, { color: "warning" }),
121
+ info: /* @__PURE__ */ React.createElement(InfoRounded, { color: "info" })
122
+ };
123
+ const acciones = [...toast.actions || [{ text: "Action", fn: () => {
124
+ alert("");
125
+ } }, { text: "Consultar", fn: () => {
126
+ } }]];
127
+ const ToastIconConfig = toastIconOption[toast.type];
128
+ const closeToast = () => {
129
+ setStateToast(false);
130
+ };
131
+ const toggleToastOptions = () => {
132
+ setStateOptions((prevShowOptions) => !prevShowOptions);
133
+ };
134
+ useEffect2(() => {
135
+ progress >= 100 && setStateToast(false);
136
+ }, [progress]);
137
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, stateToast && /* @__PURE__ */ React.createElement(
138
+ Stack,
139
+ {
140
+ position: "fixed",
141
+ zIndex: 1400,
142
+ right: 16,
143
+ top: 16,
144
+ width: 370,
145
+ sx: {
146
+ boxShadow: (theme) => theme.shadows[8]
147
+ }
148
+ },
149
+ /* @__PURE__ */ React.createElement(
150
+ Box,
151
+ {
152
+ padding: 1.5,
153
+ gap: 1.5,
154
+ display: "flex",
155
+ alignItems: "center",
156
+ sx: {
157
+ backgroundColor: {
158
+ success: "success.50",
159
+ error: "error.50",
160
+ warning: "warning.50",
161
+ info: "info.50"
162
+ }[toastColorConfig]
163
+ }
164
+ },
165
+ /* @__PURE__ */ React.createElement(
166
+ Stack,
167
+ {
168
+ p: 1,
169
+ gap: 1,
170
+ borderRadius: 50,
171
+ bgcolor: {
172
+ success: "success.100",
173
+ error: "error.100",
174
+ warning: "warning.100",
175
+ info: "info.100"
176
+ }[(_a = toast.type) != null ? _a : "info"]
177
+ },
178
+ /* @__PURE__ */ React.createElement(Stack, null, ToastIconConfig)
179
+ ),
180
+ /* @__PURE__ */ React.createElement(Divider, { orientation: "vertical", flexItem: true }),
181
+ /* @__PURE__ */ React.createElement(Stack, { width: 285 }, /* @__PURE__ */ React.createElement(
182
+ Stack,
183
+ {
184
+ justifyContent: "space-between",
185
+ flexDirection: "row",
186
+ alignItems: "center"
187
+ },
188
+ /* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2", color: "text.primary" }, toast.title),
189
+ /* @__PURE__ */ React.createElement(
190
+ IconButton,
191
+ {
192
+ size: "small",
193
+ "data-testid": "close-icon",
194
+ onClick: closeToast
195
+ },
196
+ /* @__PURE__ */ React.createElement(Close, { fontSize: "small" })
197
+ )
198
+ ), /* @__PURE__ */ React.createElement(Stack, { gap: 0.5 }, /* @__PURE__ */ React.createElement(Typography, { color: "text.primary", variant: "body2" }, toast.subtitle), !stateOptions && toast.listITems && toast.listITems.length > 0 && /* @__PURE__ */ React.createElement(Stack, null, toast.listITems.map((element, i) => /* @__PURE__ */ React.createElement(Typography, { variant: "caption", key: i }, "\u2022 ", element)))), /* @__PURE__ */ React.createElement(Stack, { justifyContent: "flex-end", flexDirection: "row", gap: 0.5 }, toast.actions && toast.actions.length > 0 && /* @__PURE__ */ React.createElement(Stack, { flexDirection: "row", gap: 0.5 }, toast.actions.map((button, index) => /* @__PURE__ */ React.createElement(
199
+ Button,
200
+ {
201
+ key: index,
202
+ color: toast.type === "info" ? "info" : toast.type === "success" ? "success" : toast.type === "error" ? "error" : "warning",
203
+ variant: "text",
204
+ onClick: button.fn,
205
+ disabled: button.disabled || false,
206
+ size: "small"
207
+ },
208
+ button.text.charAt(0).toUpperCase() + button.text.slice(1).toLowerCase()
209
+ ))), toast.seeMore && /* @__PURE__ */ React.createElement(
210
+ Button,
211
+ {
212
+ onClick: toggleToastOptions,
213
+ size: "small",
214
+ variant: "text",
215
+ color: toastColorConfig
216
+ },
217
+ stateOptions ? "Ver m\xE1s" : "Ver menos",
218
+ stateOptions ? /* @__PURE__ */ React.createElement(KeyboardArrowDown, null) : /* @__PURE__ */ React.createElement(KeyboardArrowUp, null)
219
+ )))
220
+ ),
221
+ /* @__PURE__ */ React.createElement(
222
+ LinearProgress,
223
+ {
224
+ sx: {
225
+ ".MuiLinearProgress-bar": {
226
+ transition: "0.1s linear !important",
227
+ transform: "scaleX(-1)"
228
+ }
229
+ },
230
+ color: toastColorConfig,
231
+ variant: "determinate",
232
+ value: 100 - progress
233
+ }
234
+ )
235
+ ));
236
+ };
237
+
238
+ // src/Components/Modal/Helpers/Data.tsx
239
+ import React2 from "react";
240
+ import { Info, Warning } from "@mui/icons-material";
241
+ var modalStateConfig = {
242
+ info: {
243
+ color: "info",
244
+ defaultDescription: "Se [sincronizar\xE1n] los datos trabajados en modo offline y se [subir\xE1n] a los servidores.",
245
+ icon: /* @__PURE__ */ React2.createElement(Info, { color: "info", fontSize: "medium" })
246
+ },
247
+ delete: {
248
+ color: "delete",
249
+ defaultDescription: "[Elemento espec\xEDfico] [dejar\xE1 de existir en todos los lugares donde est\xE9 en uso]. Esta acci\xF3n es irreversible.",
250
+ icon: /* @__PURE__ */ React2.createElement(Info, { color: "error", fontSize: "medium" })
251
+ },
252
+ warning: {
253
+ color: "warning",
254
+ defaultDescription: "Se descartar\xE1 la [creaci\xF3n] y los cambios se perder\xE1n.",
255
+ icon: /* @__PURE__ */ React2.createElement(Warning, { color: "warning", fontSize: "medium" })
256
+ }
257
+ };
258
+
259
+ // src/Components/Modal/Helpers/Utils.tsx
260
+ import * as MuiIcons from "@mui/icons-material";
261
+ import { FilterListOutlined } from "@mui/icons-material";
262
+ var getIconComponent = (iconName) => {
263
+ return iconName && MuiIcons[iconName] ? MuiIcons[iconName] : FilterListOutlined;
264
+ };
265
+ var getModalColor = (state) => {
266
+ var _a;
267
+ const colors = {
268
+ info: "info.100",
269
+ delete: "error.100",
270
+ warning: "warning.100"
271
+ };
272
+ return (_a = colors[state]) != null ? _a : "warning.100";
273
+ };
274
+ var getButtonColor = (state) => {
275
+ var _a;
276
+ const colorMap = {
277
+ info: "info",
278
+ delete: "error",
279
+ warning: "warning"
280
+ };
281
+ return (_a = colorMap[state]) != null ? _a : "info";
282
+ };
283
+
284
+ // src/Components/Modal/SCModal.tsx
285
+ import React3, { useCallback, useMemo, useState as useState3 } from "react";
286
+ import { Modal, Box as Box2, Typography as Typography2, IconButton as IconButton2, Button as Button2, Stack as Stack2 } from "@mui/material";
287
+ import { Close as Close2 } from "@mui/icons-material";
288
+
289
+ // src/generales/capitalize.tsx
290
+ function capitalize(text) {
291
+ return text.charAt(0).toUpperCase() + text.slice(1);
292
+ }
293
+
294
+ // src/Components/Modal/SCModal.tsx
295
+ var SCModal = ({
296
+ buttonModal,
297
+ state = "info",
298
+ open,
299
+ setOpen,
300
+ title,
301
+ description,
302
+ action
303
+ }) => {
304
+ var _a, _b, _c, _d, _e;
305
+ const [internalOpen, setInternalOpen] = useState3(open != null ? open : false);
306
+ const isControlled = Boolean(setOpen);
307
+ const modalOpen = isControlled ? open != null ? open : false : internalOpen;
308
+ const setModalOpen = isControlled ? setOpen : setInternalOpen;
309
+ const handleToggle = useCallback(() => setModalOpen((prev) => !prev), [setModalOpen]);
310
+ const handleClose = useCallback(() => setModalOpen(false), [setModalOpen]);
311
+ const Icon = useMemo(() => getIconComponent(buttonModal == null ? void 0 : buttonModal.icon), [buttonModal == null ? void 0 : buttonModal.icon]);
312
+ const prevAction = useMemo(
313
+ () => action != null ? action : [
314
+ { text: "Cancelar", fn: handleClose },
315
+ { text: "Consultar", fn: () => {
316
+ } }
317
+ ],
318
+ [action, handleClose]
319
+ );
320
+ const { icon, defaultDescription } = modalStateConfig[state];
321
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, buttonModal && /* @__PURE__ */ React3.createElement(
322
+ Button2,
323
+ {
324
+ "data-testid": "test-buttonModal",
325
+ color: (_a = buttonModal == null ? void 0 : buttonModal.color) != null ? _a : "primary",
326
+ onClick: handleToggle,
327
+ variant: (_b = buttonModal == null ? void 0 : buttonModal.variant) != null ? _b : "text",
328
+ size: (_c = buttonModal == null ? void 0 : buttonModal.size) != null ? _c : "small",
329
+ startIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "left" && /* @__PURE__ */ React3.createElement(Icon, null),
330
+ endIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "right" && /* @__PURE__ */ React3.createElement(Icon, null)
331
+ },
332
+ capitalize((_d = buttonModal == null ? void 0 : buttonModal.text) != null ? _d : "filtrar")
333
+ ), /* @__PURE__ */ React3.createElement(Modal, { open: modalOpen, onClose: handleClose, sx: { boxShadow: 8 } }, /* @__PURE__ */ React3.createElement(
334
+ Box2,
335
+ {
336
+ sx: {
337
+ position: "absolute",
338
+ top: "50%",
339
+ left: "50%",
340
+ transform: "translate(-50%, -50%)",
341
+ width: 400,
342
+ bgcolor: "background.paper",
343
+ borderRadius: 1,
344
+ boxShadow: 24
345
+ }
346
+ },
347
+ /* @__PURE__ */ React3.createElement(Stack2, { direction: "row", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React3.createElement(Stack2, { direction: "row", alignItems: "center", p: 1, gap: 1.5 }, /* @__PURE__ */ React3.createElement(
348
+ Box2,
349
+ {
350
+ display: "flex",
351
+ justifyContent: "center",
352
+ alignItems: "center",
353
+ borderRadius: "50%",
354
+ height: 36,
355
+ width: 36,
356
+ bgcolor: getModalColor(state)
357
+ },
358
+ icon
359
+ ), /* @__PURE__ */ React3.createElement(Typography2, { variant: "h6", color: "text.primary" }, title)), /* @__PURE__ */ React3.createElement(IconButton2, { onClick: handleClose, "data-testid": "test-buttonClose" }, /* @__PURE__ */ React3.createElement(Close2, { color: "action" }))),
360
+ /* @__PURE__ */ React3.createElement(Stack2, { py: 1, px: 3, gap: 1.5 }, /* @__PURE__ */ React3.createElement(Typography2, { variant: "body1" }, description || defaultDescription)),
361
+ action && /* @__PURE__ */ React3.createElement(
362
+ Stack2,
363
+ {
364
+ id: "Action",
365
+ direction: "row",
366
+ gap: 1,
367
+ p: 1,
368
+ justifyContent: "end",
369
+ bgcolor: "grey.50",
370
+ sx: { borderRadius: 1 }
371
+ },
372
+ /* @__PURE__ */ React3.createElement(
373
+ Button2,
374
+ {
375
+ color: "inherit",
376
+ variant: "text",
377
+ onClick: handleClose,
378
+ size: "small"
379
+ },
380
+ capitalize("cancelar")
381
+ ),
382
+ /* @__PURE__ */ React3.createElement(
383
+ Button2,
384
+ {
385
+ "data-testid": "test-aceptar",
386
+ color: getButtonColor(state),
387
+ variant: "contained",
388
+ onClick: (_e = action[0]) == null ? void 0 : _e.fn,
389
+ disabled: false,
390
+ size: "small"
391
+ },
392
+ capitalize(action[0].text)
393
+ )
394
+ )
395
+ )));
396
+ };
397
+
398
+ // src/Components/Adjuntar/Adjuntar.tsx
399
+ var Attachment = ({
400
+ sx,
401
+ compact,
402
+ error,
403
+ maxSize = 400,
404
+ fileAccepted = "",
405
+ onLoading,
406
+ onChange,
407
+ downloadAction,
408
+ deleteAction,
409
+ initialFiles = []
410
+ }) => {
411
+ const [files, setFiles] = useState4([]);
412
+ const [fileToDelete, setFileToDelete] = useState4(null);
413
+ const [toast, setToast] = useState4(null);
414
+ const [openModal, setOpenModal] = useState4(false);
415
+ const [isDragFile, setIsDragFile] = useState4(false);
416
+ const inputRef = useRef(null);
417
+ useEffect4(() => {
418
+ if (initialFiles && initialFiles.length > 0) {
419
+ setFiles(initialFiles);
420
+ }
421
+ }, []);
422
+ const handleDrop = (event2) => {
423
+ event2.preventDefault();
424
+ setIsDragFile(false);
425
+ const filesDropped = event2.dataTransfer.files;
426
+ if (filesDropped && filesDropped.length > 0) {
427
+ const fakeEvent = {
428
+ target: { files: filesDropped }
429
+ };
430
+ handleUpload(fakeEvent);
431
+ }
432
+ };
433
+ const handleDragOver = (event2) => {
434
+ event2.preventDefault();
435
+ setIsDragFile(true);
436
+ };
437
+ const handleDragLeave = (event2) => {
438
+ event2.preventDefault();
439
+ setIsDragFile(false);
440
+ };
441
+ const handleUpload = (event2) => {
442
+ const newFiles = event2.target.files;
443
+ if (!newFiles) return;
444
+ const nuevosArchivos = [];
445
+ const archivosValidos = [];
446
+ Array.from(newFiles).forEach((file) => {
447
+ const isDuplicatedFile = files.findIndex(
448
+ (e) => e.name === file.name && e.size === file.size
449
+ );
450
+ const sizeMB = file.size / (1024 * 1024);
451
+ if (isDuplicatedFile !== -1) {
452
+ setToast({
453
+ type: "error",
454
+ title: "Archivo duplicado",
455
+ listITems: ["No se permiten archivos duplicados."],
456
+ seeMore: true,
457
+ time: 10
458
+ });
459
+ return;
460
+ }
461
+ if (sizeMB > maxSize) {
462
+ nuevosArchivos.push({
463
+ name: file.name,
464
+ size: file.size,
465
+ type: file.type,
466
+ progress: 0,
467
+ uploadError: true
468
+ });
469
+ setToast({
470
+ type: "error",
471
+ title: "Carga fallida",
472
+ seeMore: true,
473
+ listITems: [`El archivo supera el l\xEDmite de ${maxSize}MB.`],
474
+ time: 10
475
+ });
476
+ return;
477
+ }
478
+ if (fileAccepted && !file.name.match(
479
+ new RegExp(
480
+ `(${fileAccepted.replace(/\./g, "\\.").replace(/,/g, "|")})$`,
481
+ "i"
482
+ )
483
+ )) {
484
+ setToast({
485
+ type: "error",
486
+ title: "Tipo de archivo no permitido",
487
+ listITems: [`El archivo ${file.name} no es un tipo permitido.`],
488
+ seeMore: true,
489
+ time: 10
490
+ });
491
+ return;
492
+ }
493
+ nuevosArchivos.push({
494
+ name: file.name,
495
+ size: file.size,
496
+ type: file.type,
497
+ progress: 0,
498
+ uploadError: false
499
+ });
500
+ archivosValidos.push(file);
501
+ });
502
+ if (nuevosArchivos.length > 0) {
503
+ setFiles((prev) => {
504
+ const actualizados = [...prev, ...nuevosArchivos];
505
+ onChange == null ? void 0 : onChange([
506
+ ...archivosValidos,
507
+ ...prev.map((f) => new File([], f.name, { type: f.type }))
508
+ ]);
509
+ return actualizados;
510
+ });
511
+ }
512
+ event2.target.value = "";
513
+ };
514
+ const deleteFiles = (nameFile) => {
515
+ setFiles((prev) => {
516
+ const filtered = prev.filter((e) => e.name !== nameFile);
517
+ onChange == null ? void 0 : onChange(
518
+ filtered.map((f) => new File([], f.name, { type: f.type }))
519
+ );
520
+ return filtered;
521
+ });
522
+ };
523
+ return /* @__PURE__ */ React4.createElement(Stack3, { spacing: 2 }, toast && /* @__PURE__ */ React4.createElement(SCToastNotification, __spreadValues({}, toast)), /* @__PURE__ */ React4.createElement(
524
+ "input",
525
+ {
526
+ type: "file",
527
+ multiple: true,
528
+ hidden: true,
529
+ ref: inputRef,
530
+ onChange: handleUpload
531
+ }
532
+ ), /* @__PURE__ */ React4.createElement(
533
+ Stack3,
534
+ {
535
+ id: "ZonaAdjuntos",
536
+ justifyContent: "center",
537
+ alignItems: "center",
538
+ bgcolor: "transparent",
539
+ padding: compact ? "12px 16px" : "16px 24px",
540
+ height: compact ? "56px" : "100%",
541
+ flexDirection: compact ? "row" : "column",
542
+ gap: 1,
543
+ borderRadius: 1,
544
+ onClick: () => {
545
+ var _a;
546
+ return (_a = inputRef.current) == null ? void 0 : _a.click();
547
+ },
548
+ onDrop: handleDrop,
549
+ onDragOver: handleDragOver,
550
+ onDragLeave: handleDragLeave,
551
+ sx: __spreadValues({
552
+ border: error ? (theme) => `1px solid ${theme.palette.error.main}` : (theme) => `1px dashed ${theme.palette.grey[500]}`,
553
+ cursor: "pointer",
554
+ ":hover": {
555
+ backgroundColor: error ? "error.50" : "action.hover"
556
+ }
557
+ }, sx)
558
+ },
559
+ onLoading ? /* @__PURE__ */ React4.createElement(
560
+ Box3,
561
+ {
562
+ display: "flex",
563
+ alignItems: "center",
564
+ justifyContent: "center",
565
+ width: "100%",
566
+ height: "450px"
567
+ },
568
+ /* @__PURE__ */ React4.createElement(
569
+ CircularProgress,
570
+ {
571
+ sx: { width: "60px", height: "60px" },
572
+ variant: "indeterminate"
573
+ }
574
+ )
575
+ ) : /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
576
+ Box3,
577
+ {
578
+ display: "flex",
579
+ bgcolor: error ? "error.50" : "primary.50",
580
+ borderRadius: "100%",
581
+ p: 1
582
+ },
583
+ /* @__PURE__ */ React4.createElement(
584
+ CloudUploadOutlined,
585
+ {
586
+ color: error ? "error" : "primary",
587
+ fontSize: "medium"
588
+ }
589
+ )
590
+ ), /* @__PURE__ */ React4.createElement(
591
+ Stack3,
592
+ {
593
+ width: "100%",
594
+ flexDirection: compact ? "row" : "column",
595
+ alignItems: "center",
596
+ justifyContent: compact ? "space-between" : "center",
597
+ gap: 1
598
+ },
599
+ /* @__PURE__ */ React4.createElement(
600
+ Stack3,
601
+ {
602
+ flexDirection: "column",
603
+ alignItems: compact ? "start" : "center",
604
+ gap: 0.5
605
+ },
606
+ /* @__PURE__ */ React4.createElement(Typography3, { variant: "body2", color: "text.primary" }, "Arrastrar o adjuntar archivos"),
607
+ /* @__PURE__ */ React4.createElement(
608
+ Typography3,
609
+ {
610
+ variant: "caption",
611
+ color: error ? "error" : "text.secondary",
612
+ whiteSpace: "nowrap",
613
+ overflow: "hidden",
614
+ textOverflow: "ellipsis",
615
+ maxWidth: "450px"
616
+ },
617
+ error ? `${fileAccepted || "DOCX, XML, PNG, JPG"} \u2022 Archivo no soportado` : `${fileAccepted || "DOCX, XML, PNG, JPG"} \u2022 Max. ${maxSize}MB`
618
+ )
619
+ ),
620
+ /* @__PURE__ */ React4.createElement(
621
+ Button3,
622
+ {
623
+ variant: "text",
624
+ color: "primary",
625
+ size: "small",
626
+ startIcon: /* @__PURE__ */ React4.createElement(AttachFileOutlined, { color: "primary", fontSize: "small" })
627
+ },
628
+ "Adjuntar"
629
+ )
630
+ ))
631
+ ), files.length > 0 && /* @__PURE__ */ React4.createElement(
632
+ Stack3,
633
+ {
634
+ id: "ContenedorArchivosAdjuntos",
635
+ width: "100%",
636
+ sx: __spreadValues({
637
+ overflowY: "auto"
638
+ }, files.length > 5 && {
639
+ maxHeight: 250
640
+ }),
641
+ spacing: 1
642
+ },
643
+ files.map((file) => /* @__PURE__ */ React4.createElement(
644
+ Stack3,
645
+ {
646
+ height: 46,
647
+ key: file.name + (file.uploadError ? "_error" : ""),
648
+ direction: "row",
649
+ alignItems: "center",
650
+ justifyContent: "space-between",
651
+ gap: 2,
652
+ padding: 1,
653
+ borderRadius: 1,
654
+ sx: {
655
+ backgroundColor: file.uploadError ? "error.50" : "transparent",
656
+ ":hover": {
657
+ backgroundColor: file.uploadError ? "error.100" : "primary.50"
658
+ }
659
+ }
660
+ },
661
+ /* @__PURE__ */ React4.createElement(Stack3, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(
662
+ UploadFileOutlined,
663
+ {
664
+ color: file.uploadError ? "error" : "primary",
665
+ fontSize: "small"
666
+ }
667
+ ), /* @__PURE__ */ React4.createElement(Stack3, { width: "100%" }, /* @__PURE__ */ React4.createElement(
668
+ Typography3,
669
+ {
670
+ variant: "body2",
671
+ color: "text.primary",
672
+ whiteSpace: "nowrap",
673
+ overflow: "hidden",
674
+ textOverflow: "ellipsis",
675
+ maxWidth: "310px"
676
+ },
677
+ file.name
678
+ ), /* @__PURE__ */ React4.createElement(
679
+ Typography3,
680
+ {
681
+ variant: "caption",
682
+ color: file.uploadError ? "error" : "text.secondary"
683
+ },
684
+ file.uploadError && file.size / (1024 * 1024) > maxSize ? "Archivo super\xF3 el l\xEDmite \u2022 Carga fallida" : file.uploadError ? "Archivo duplicado o inv\xE1lido \u2022 Carga fallida" : `${(file.size / (1024 * 1024)).toFixed(2)}MB \u2022 ${file.type}`
685
+ ))),
686
+ /* @__PURE__ */ React4.createElement(Tooltip, { title: "Descargar" }, /* @__PURE__ */ React4.createElement(IconButton3, { size: "small", onClick: () => downloadAction == null ? void 0 : downloadAction(file.name) }, /* @__PURE__ */ React4.createElement(FileDownload, { fontSize: "small", color: "action" }))),
687
+ /* @__PURE__ */ React4.createElement(Tooltip, { title: "Eliminar" }, /* @__PURE__ */ React4.createElement(
688
+ IconButton3,
689
+ {
690
+ size: "small",
691
+ onClick: () => {
692
+ setFileToDelete(file);
693
+ setOpenModal(true);
694
+ }
695
+ },
696
+ /* @__PURE__ */ React4.createElement(DeleteOutline, { fontSize: "small", color: "action" })
697
+ ))
698
+ ))
699
+ ), /* @__PURE__ */ React4.createElement(
700
+ SCModal,
701
+ {
702
+ state: "delete",
703
+ open: openModal,
704
+ setOpen: setOpenModal,
705
+ title: "Eliminar archivo",
706
+ description: `\xBFEst\xE1s seguro que deseas eliminar "${fileToDelete == null ? void 0 : fileToDelete.name}"?`,
707
+ action: [
708
+ {
709
+ text: "Eliminar",
710
+ fn: () => __async(void 0, null, function* () {
711
+ if (fileToDelete) {
712
+ try {
713
+ if (deleteAction) {
714
+ yield deleteAction(fileToDelete.name);
715
+ }
716
+ deleteFiles(fileToDelete.name);
717
+ setToast({
718
+ title: "Archivo eliminado",
719
+ type: "success",
720
+ time: 2
721
+ });
722
+ } catch (error2) {
723
+ setToast({
724
+ title: "Error al eliminar archivo",
725
+ type: "error",
726
+ time: 2
727
+ });
728
+ } finally {
729
+ setFileToDelete(null);
730
+ setOpenModal(false);
731
+ }
732
+ }
733
+ })
734
+ }
735
+ ]
736
+ }
737
+ ));
738
+ };
32
739
 
33
740
  // src/Components/Drawer/SCDrawer.tsx
34
- import React7 from "react";
35
- import { Box as Box7, Drawer, Typography as Typography7, IconButton as IconButton5, Button as Button4, Stack as Stack3, Chip as Chip2 } from "@mui/material";
741
+ import React11, { useEffect as useEffect10, useRef as useRef3 } from "react";
742
+ import { Box as Box9, Drawer, Typography as Typography9, IconButton as IconButton7, Button as Button6, Stack as Stack5, Chip as Chip2 } from "@mui/material";
36
743
  import Grid4 from "@mui/material/Grid2";
37
744
  import CloseIcon from "@mui/icons-material/Close";
745
+ import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos";
746
+ import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
38
747
 
39
748
  // src/Components/Textfield/SCTextField.tsx
40
- import React, { useEffect, useState } from "react";
41
- import { FormControl, IconButton, InputAdornment, InputLabel, OutlinedInput, FilledInput, Popover, Input, Box, Typography, SvgIcon, Tooltip } from "@mui/material";
749
+ import React5, { useEffect as useEffect5, useState as useState5 } from "react";
750
+ import { FormControl, IconButton as IconButton4, InputAdornment, InputLabel, OutlinedInput, FilledInput, Popover, Input, Box as Box4, Typography as Typography4, SvgIcon, Tooltip as Tooltip2 } from "@mui/material";
42
751
  import Grid from "@mui/material/Grid2";
43
752
  import { Visibility, VisibilityOff, InfoOutlined } from "@mui/icons-material";
44
753
 
45
754
  // src/Components/Textfield/Helpers/validateIcon.tsx
46
755
  import * as Muicon from "@mui/icons-material";
47
- function getIconComponent(name) {
756
+ function getIconComponent2(name) {
48
757
  if (typeof name !== "string") return name;
49
758
  return name in Muicon ? Muicon[name] : void 0;
50
759
  }
@@ -56,13 +765,13 @@ function getIconValidation(name) {
56
765
  }
57
766
 
58
767
  // src/Components/Textfield/Helpers/validateKeyDown.tsx
59
- function validateKeyDown(event2, format2) {
768
+ function validateKeyDown(event2, format3) {
60
769
  const key = event2.key;
61
770
  const target = event2.target;
62
- if (format2 === "int" && !/^[0-9]$/.test(key)) {
771
+ if (format3 === "int" && !/^[0-9]$/.test(key)) {
63
772
  event2.preventDefault();
64
773
  }
65
- if (format2 === "decimal" && (target.value === "" && key === "." || key === "-" || key === "+")) {
774
+ if (format3 === "decimal" && (target.value === "" && key === "." || key === "-" || key === "+")) {
66
775
  event2.preventDefault();
67
776
  }
68
777
  if (target.type === "text") {
@@ -101,7 +810,7 @@ var SCTextField = ({
101
810
  maxLength,
102
811
  //Apariencia
103
812
  variant = "outlined",
104
- format: format2,
813
+ format: format3,
105
814
  disabled,
106
815
  required,
107
816
  size,
@@ -126,13 +835,13 @@ var SCTextField = ({
126
835
  let IconInputStart;
127
836
  let IconInputEnd;
128
837
  let IconTitle;
129
- const [showPassword, setShowPassword] = useState(false);
130
- const [error, setError] = useState(false);
131
- const [anchorInfoTitle, setAnchorInfoTitle] = useState(null);
838
+ const [showPassword, setShowPassword] = useState5(false);
839
+ const [error, setError] = useState5(false);
840
+ const [anchorInfoTitle, setAnchorInfoTitle] = useState5(null);
132
841
  const openInfoTitle = Boolean(anchorInfoTitle);
133
- const [anchorInfoElement, setAnchorInfoElement] = useState(null);
842
+ const [anchorInfoElement, setAnchorInfoElement] = useState5(null);
134
843
  const openInfoElement = Boolean(anchorInfoElement);
135
- useEffect(() => {
844
+ useEffect5(() => {
136
845
  if (error) {
137
846
  setTimeout(() => {
138
847
  setError(false);
@@ -141,21 +850,21 @@ var SCTextField = ({
141
850
  }, [error]);
142
851
  if (iconInputStart) {
143
852
  IconInputStartValidation = getIconValidation(iconInputStart);
144
- IconInputStart = getIconComponent(iconInputStart);
853
+ IconInputStart = getIconComponent2(iconInputStart);
145
854
  }
146
855
  if (iconInputEnd) {
147
856
  IconInputEndValidation = getIconValidation(iconInputEnd);
148
- IconInputEnd = getIconComponent(iconInputEnd);
857
+ IconInputEnd = getIconComponent2(iconInputEnd);
149
858
  }
150
859
  if (iconTitle) {
151
- IconTitle = getIconComponent(iconTitle);
860
+ IconTitle = getIconComponent2(iconTitle);
152
861
  }
153
862
  const handleClickShowPassword = () => setShowPassword((show) => !show);
154
863
  const handleMouseDownPassword = (event2) => {
155
864
  event2.preventDefault();
156
865
  };
157
866
  const handleKeyDown = (event2) => {
158
- validateKeyDown(event2, format2);
867
+ validateKeyDown(event2, format3);
159
868
  if (onKeyDown) onKeyDown(event2);
160
869
  };
161
870
  const handleInputChange = (event2) => {
@@ -182,7 +891,7 @@ var SCTextField = ({
182
891
  const handleCloseInfoElement = () => {
183
892
  setAnchorInfoElement(null);
184
893
  };
185
- return /* @__PURE__ */ React.createElement(Box, { sx: { width } }, /* @__PURE__ */ React.createElement(Grid, { container: true, alignItems: "center", mb: 1.25, gap: 0.5 }, iconTitle && IconTitle ? /* @__PURE__ */ React.createElement(SvgIcon, { color: "action", fontSize: "small", component: IconTitle }) : "", title ? /* @__PURE__ */ React.createElement(Typography, { mx: 0.5, variant: "subtitle2", color: "text.secondary" }, title) : "", infoTitle ? /* @__PURE__ */ React.createElement(React.Fragment, null, infoTitle.component === "popover" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
894
+ return /* @__PURE__ */ React5.createElement(Box4, { sx: { width } }, /* @__PURE__ */ React5.createElement(Grid, { container: true, alignItems: "center", mb: 1.25, gap: 0.5 }, iconTitle && IconTitle ? /* @__PURE__ */ React5.createElement(SvgIcon, { color: "action", fontSize: "small", component: IconTitle }) : "", title ? /* @__PURE__ */ React5.createElement(Typography4, { mx: 0.5, variant: "subtitle2", color: "text.secondary" }, title) : "", infoTitle ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, infoTitle.component === "popover" ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
186
895
  InfoOutlined,
187
896
  {
188
897
  color: "action",
@@ -190,7 +899,7 @@ var SCTextField = ({
190
899
  onMouseEnter: (event2) => handleOpenInfoTitle(event2),
191
900
  onMouseLeave: () => handleCloseInfoTitle()
192
901
  }
193
- ), /* @__PURE__ */ React.createElement(
902
+ ), /* @__PURE__ */ React5.createElement(
194
903
  Popover,
195
904
  {
196
905
  sx: {
@@ -212,14 +921,14 @@ var SCTextField = ({
212
921
  },
213
922
  disableRestoreFocus: true
214
923
  },
215
- /* @__PURE__ */ React.createElement(Typography, { p: 2 }, infoTitle.text)
216
- )) : /* @__PURE__ */ React.createElement(Tooltip, { title: infoTitle.text, "data-testid": "test-infoTitle", placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React.createElement(
924
+ /* @__PURE__ */ React5.createElement(Typography4, { p: 2 }, infoTitle.text)
925
+ )) : /* @__PURE__ */ React5.createElement(Tooltip2, { title: infoTitle.text, "data-testid": "test-infoTitle", placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React5.createElement(
217
926
  InfoOutlined,
218
927
  {
219
928
  color: "action",
220
929
  fontSize: "small"
221
930
  }
222
- ))) : ""), /* @__PURE__ */ React.createElement(Grid, { container: true, sx: { flexWrap: "nowrap", alignItems: "center" } }, /* @__PURE__ */ React.createElement(
931
+ ))) : ""), /* @__PURE__ */ React5.createElement(Grid, { container: true, sx: { flexWrap: "nowrap", alignItems: "center" } }, /* @__PURE__ */ React5.createElement(
223
932
  FormControl,
224
933
  {
225
934
  color,
@@ -228,7 +937,7 @@ var SCTextField = ({
228
937
  variant,
229
938
  sx: { background: background || "transparent", borderRadius: "4px" }
230
939
  },
231
- /* @__PURE__ */ React.createElement(
940
+ /* @__PURE__ */ React5.createElement(
232
941
  InputLabel,
233
942
  {
234
943
  "data-testid": "test-label",
@@ -239,7 +948,7 @@ var SCTextField = ({
239
948
  },
240
949
  label ? label : ""
241
950
  ),
242
- /* @__PURE__ */ React.createElement(
951
+ /* @__PURE__ */ React5.createElement(
243
952
  InputComponent,
244
953
  {
245
954
  size: size ? size : "medium",
@@ -252,20 +961,20 @@ var SCTextField = ({
252
961
  onChange: handleInputChange,
253
962
  onBlur: handleBlur,
254
963
  inputProps: { maxLength: maxLength ? maxLength : 50 },
255
- type: !showPassword && format2 === "password" ? "password" : (format2 || "text").toUpperCase() === "INT" || (format2 || "text").toUpperCase() === "DECIMAL" ? "number" : "text",
256
- className: format2 === "password" && !showPassword ? "" : "",
964
+ type: !showPassword && format3 === "password" ? "password" : (format3 || "text").toUpperCase() === "INT" || (format3 || "text").toUpperCase() === "DECIMAL" ? "number" : "text",
965
+ className: format3 === "password" && !showPassword ? "" : "",
257
966
  placeholder,
258
- startAdornment: iconInputStart ? /* @__PURE__ */ React.createElement(InputAdornment, { position: "start" }, IconInputStartValidation === "text" ? iconInputStart : IconInputStart ? /* @__PURE__ */ React.createElement(IconInputStart, { fontSize: "small" }) : null) : "",
259
- endAdornment: /* @__PURE__ */ React.createElement(InputAdornment, { position: "end" }, format2 === "password" ? /* @__PURE__ */ React.createElement(
260
- IconButton,
967
+ startAdornment: iconInputStart ? /* @__PURE__ */ React5.createElement(InputAdornment, { position: "start" }, IconInputStartValidation === "text" ? iconInputStart : IconInputStart ? /* @__PURE__ */ React5.createElement(IconInputStart, { fontSize: "small" }) : null) : "",
968
+ endAdornment: /* @__PURE__ */ React5.createElement(InputAdornment, { position: "end" }, format3 === "password" ? /* @__PURE__ */ React5.createElement(
969
+ IconButton4,
261
970
  {
262
971
  "aria-label": "toggle password visibility",
263
972
  onClick: handleClickShowPassword,
264
973
  onMouseDown: handleMouseDownPassword,
265
974
  edge: "end"
266
975
  },
267
- showPassword ? /* @__PURE__ */ React.createElement(VisibilityOff, null) : /* @__PURE__ */ React.createElement(Visibility, null)
268
- ) : iconInputEnd === void 0 && infoElement !== void 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
976
+ showPassword ? /* @__PURE__ */ React5.createElement(VisibilityOff, null) : /* @__PURE__ */ React5.createElement(Visibility, null)
977
+ ) : iconInputEnd === void 0 && infoElement !== void 0 ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
269
978
  InfoOutlined,
270
979
  {
271
980
  "data-testid": "test-infoElement",
@@ -276,7 +985,7 @@ var SCTextField = ({
276
985
  onMouseEnter: (event2) => handleOpenInfoElement(event2),
277
986
  onMouseLeave: () => handleCloseInfoElement()
278
987
  }
279
- ), /* @__PURE__ */ React.createElement(
988
+ ), /* @__PURE__ */ React5.createElement(
280
989
  Popover,
281
990
  {
282
991
  sx: {
@@ -298,19 +1007,19 @@ var SCTextField = ({
298
1007
  },
299
1008
  disableRestoreFocus: true
300
1009
  },
301
- /* @__PURE__ */ React.createElement(Typography, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
302
- )) : /* @__PURE__ */ React.createElement(Tooltip, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React.createElement(
1010
+ /* @__PURE__ */ React5.createElement(Typography4, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
1011
+ )) : /* @__PURE__ */ React5.createElement(Tooltip2, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React5.createElement(
303
1012
  InfoOutlined,
304
1013
  {
305
1014
  color: "action",
306
1015
  fontSize: "small"
307
1016
  }
308
- ))) : iconInputEnd !== void 0 ? IconInputEndValidation === "text" ? iconInputEnd : IconInputEnd ? /* @__PURE__ */ React.createElement(IconInputEnd, { fontSize: "small" }) : null : ""),
309
- label: label ? label + (format2 === "password" && !showPassword ? "" : "") : "",
310
- autoComplete: format2 === "password" ? "new-password" : "off"
1017
+ ))) : iconInputEnd !== void 0 ? IconInputEndValidation === "text" ? iconInputEnd : IconInputEnd ? /* @__PURE__ */ React5.createElement(IconInputEnd, { fontSize: "small" }) : null : ""),
1018
+ label: label ? label + (format3 === "password" && !showPassword ? "" : "") : "",
1019
+ autoComplete: format3 === "password" ? "new-password" : "off"
311
1020
  }
312
1021
  )
313
- ), (iconInputEnd !== void 0 || format2 === "password") && infoElement ? /* @__PURE__ */ React.createElement(React.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
1022
+ ), (iconInputEnd !== void 0 || format3 === "password") && infoElement ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
314
1023
  InfoOutlined,
315
1024
  {
316
1025
  "data-testid": "test-infoElement",
@@ -321,7 +1030,7 @@ var SCTextField = ({
321
1030
  onMouseEnter: (event2) => handleOpenInfoElement(event2),
322
1031
  onMouseLeave: handleCloseInfoElement
323
1032
  }
324
- ), /* @__PURE__ */ React.createElement(
1033
+ ), /* @__PURE__ */ React5.createElement(
325
1034
  Popover,
326
1035
  {
327
1036
  sx: { pointerEvents: "none" },
@@ -338,8 +1047,8 @@ var SCTextField = ({
338
1047
  },
339
1048
  disableRestoreFocus: true
340
1049
  },
341
- /* @__PURE__ */ React.createElement(Typography, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
342
- )) : /* @__PURE__ */ React.createElement(Tooltip, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React.createElement(
1050
+ /* @__PURE__ */ React5.createElement(Typography4, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
1051
+ )) : /* @__PURE__ */ React5.createElement(Tooltip2, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React5.createElement(
343
1052
  InfoOutlined,
344
1053
  {
345
1054
  sx: { marginLeft: "4px" },
@@ -349,198 +1058,18 @@ var SCTextField = ({
349
1058
  ))) : ""));
350
1059
  };
351
1060
 
352
- // src/Components/ToastNotification/SCToastNotification.tsx
353
- import React2, { useEffect as useEffect3, useState as useState3 } from "react";
354
- import { Stack, LinearProgress, Divider, Box as Box2, Typography as Typography2, IconButton as IconButton2, Button } from "@mui/material";
355
- import { Close, InfoRounded, CheckCircleRounded, WarningRounded, ErrorRounded, KeyboardArrowDown, KeyboardArrowUp } from "@mui/icons-material";
356
-
357
- // src/Components/ToastNotification/useProgress.ts
358
- import { useEffect as useEffect2, useState as useState2 } from "react";
359
- var useProgress = (timeProgress, lote) => {
360
- const [progress, setProgress] = useState2(0);
361
- useEffect2(() => {
362
- const interval = setInterval(() => {
363
- setProgress((prev) => {
364
- if (prev >= 100) {
365
- clearInterval(interval);
366
- }
367
- if (lote) {
368
- const nextProgress = prev + lote;
369
- return nextProgress <= 100 ? nextProgress : 100;
370
- } else {
371
- return prev + 1;
372
- }
373
- });
374
- }, timeProgress * 10);
375
- return () => {
376
- clearInterval(interval);
377
- };
378
- }, [timeProgress, lote]);
379
- return {
380
- progress
381
- };
382
- };
383
- var ToastProgress = (timeProgress) => {
384
- const [progress, setProgress] = useState2(100);
385
- useEffect2(() => {
386
- const interval = setInterval(() => {
387
- setProgress((prev) => {
388
- if (prev <= 0) {
389
- clearInterval(interval);
390
- }
391
- return prev - 1;
392
- });
393
- }, timeProgress * 10);
394
- return () => {
395
- clearInterval(interval);
396
- };
397
- }, [timeProgress]);
398
- return {
399
- progressToast: progress
400
- };
401
- };
402
-
403
- // src/Components/ToastNotification/SCToastNotification.tsx
404
- var SCToastNotification = (toast) => {
405
- var _a;
406
- const [stateOptions, setStateOptions] = useState3(true);
407
- const [stateToast, setStateToast] = useState3(true);
408
- const timeProgress = toast.time || 10;
409
- const { progress } = useProgress(timeProgress);
410
- const toastColorConfig = toast.type || "info";
411
- const toastIconOption = {
412
- success: /* @__PURE__ */ React2.createElement(CheckCircleRounded, { color: "success" }),
413
- error: /* @__PURE__ */ React2.createElement(ErrorRounded, { color: "error" }),
414
- warning: /* @__PURE__ */ React2.createElement(WarningRounded, { color: "warning" }),
415
- info: /* @__PURE__ */ React2.createElement(InfoRounded, { color: "info" })
416
- };
417
- const acciones = [...toast.actions || [{ text: "Action", fn: () => {
418
- alert("");
419
- } }, { text: "Consultar", fn: () => {
420
- } }]];
421
- const ToastIconConfig = toastIconOption[toast.type];
422
- const closeToast = () => {
423
- setStateToast(false);
424
- };
425
- const toggleToastOptions = () => {
426
- setStateOptions((prevShowOptions) => !prevShowOptions);
427
- };
428
- useEffect3(() => {
429
- progress >= 100 && setStateToast(false);
430
- }, [progress]);
431
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, stateToast && /* @__PURE__ */ React2.createElement(
432
- Stack,
433
- {
434
- position: "fixed",
435
- zIndex: 1400,
436
- right: 16,
437
- top: 16,
438
- width: 370,
439
- sx: {
440
- boxShadow: (theme) => theme.shadows[8]
441
- }
442
- },
443
- /* @__PURE__ */ React2.createElement(
444
- Box2,
445
- {
446
- padding: 1.5,
447
- gap: 1.5,
448
- display: "flex",
449
- alignItems: "center",
450
- sx: {
451
- backgroundColor: {
452
- success: "success.50",
453
- error: "error.50",
454
- warning: "warning.50",
455
- info: "info.50"
456
- }[toastColorConfig]
457
- }
458
- },
459
- /* @__PURE__ */ React2.createElement(
460
- Stack,
461
- {
462
- p: 1,
463
- gap: 1,
464
- borderRadius: 50,
465
- bgcolor: {
466
- success: "success.100",
467
- error: "error.100",
468
- warning: "warning.100",
469
- info: "info.100"
470
- }[(_a = toast.type) != null ? _a : "info"]
471
- },
472
- /* @__PURE__ */ React2.createElement(Stack, null, ToastIconConfig)
473
- ),
474
- /* @__PURE__ */ React2.createElement(Divider, { orientation: "vertical", flexItem: true }),
475
- /* @__PURE__ */ React2.createElement(Stack, { width: 285 }, /* @__PURE__ */ React2.createElement(
476
- Stack,
477
- {
478
- justifyContent: "space-between",
479
- flexDirection: "row",
480
- alignItems: "center"
481
- },
482
- /* @__PURE__ */ React2.createElement(Typography2, { variant: "subtitle2", color: "text.primary" }, toast.title),
483
- /* @__PURE__ */ React2.createElement(
484
- IconButton2,
485
- {
486
- size: "small",
487
- "data-testid": "close-icon",
488
- onClick: closeToast
489
- },
490
- /* @__PURE__ */ React2.createElement(Close, { fontSize: "small" })
491
- )
492
- ), /* @__PURE__ */ React2.createElement(Stack, { gap: 0.5 }, /* @__PURE__ */ React2.createElement(Typography2, { color: "text.primary", variant: "body2" }, toast.subtitle), !stateOptions && toast.listITems && toast.listITems.length > 0 && /* @__PURE__ */ React2.createElement(Stack, null, toast.listITems.map((element, i) => /* @__PURE__ */ React2.createElement(Typography2, { variant: "caption", key: i }, "\u2022 ", element)))), /* @__PURE__ */ React2.createElement(Stack, { justifyContent: "flex-end", flexDirection: "row", gap: 0.5 }, toast.actions && toast.actions.length > 0 && /* @__PURE__ */ React2.createElement(Stack, { flexDirection: "row", gap: 0.5 }, toast.actions.map((button, index) => /* @__PURE__ */ React2.createElement(
493
- Button,
494
- {
495
- key: index,
496
- color: toast.type === "info" ? "info" : toast.type === "success" ? "success" : toast.type === "error" ? "error" : "warning",
497
- variant: "text",
498
- onClick: button.fn,
499
- disabled: button.disabled || false,
500
- size: "small"
501
- },
502
- button.text.charAt(0).toUpperCase() + button.text.slice(1).toLowerCase()
503
- ))), toast.seeMore && /* @__PURE__ */ React2.createElement(
504
- Button,
505
- {
506
- onClick: toggleToastOptions,
507
- size: "small",
508
- variant: "text",
509
- color: toastColorConfig
510
- },
511
- stateOptions ? "Ver m\xE1s" : "Ver menos",
512
- stateOptions ? /* @__PURE__ */ React2.createElement(KeyboardArrowDown, null) : /* @__PURE__ */ React2.createElement(KeyboardArrowUp, null)
513
- )))
514
- ),
515
- /* @__PURE__ */ React2.createElement(
516
- LinearProgress,
517
- {
518
- sx: {
519
- ".MuiLinearProgress-bar": {
520
- transition: "0.1s linear !important",
521
- transform: "scaleX(-1)"
522
- }
523
- },
524
- color: toastColorConfig,
525
- variant: "determinate",
526
- value: 100 - progress
527
- }
528
- )
529
- ));
530
- };
531
-
532
1061
  // src/Components/TextArea/Helpers/validateIcon.tsx
533
- import * as MuiIcons from "@mui/icons-material";
1062
+ import * as MuiIcons2 from "@mui/icons-material";
534
1063
  function getIcon(name) {
535
- if (!name || !(name in MuiIcons)) {
1064
+ if (!name || !(name in MuiIcons2)) {
536
1065
  return null;
537
1066
  }
538
- return MuiIcons[name];
1067
+ return MuiIcons2[name];
539
1068
  }
540
1069
 
541
1070
  // src/Components/TextArea/SCTextArea.tsx
542
- import React3, { useEffect as useEffect4, useState as useState4 } from "react";
543
- import { Typography as Typography3, Stack as Stack2, TextField, Box as Box3, Popover as Popover2, Tooltip as Tooltip2, SvgIcon as SvgIcon2, Grid as Grid2 } from "@mui/material";
1071
+ import React6, { useEffect as useEffect6, useState as useState6 } from "react";
1072
+ import { Typography as Typography5, Stack as Stack4, TextField, Box as Box5, Popover as Popover2, Tooltip as Tooltip3, SvgIcon as SvgIcon2, Grid as Grid2 } from "@mui/material";
544
1073
  import { InfoOutlined as InfoOutlined2 } from "@mui/icons-material";
545
1074
  var SCTextArea = ({
546
1075
  //informativas
@@ -563,11 +1092,11 @@ var SCTextArea = ({
563
1092
  state,
564
1093
  onBlur
565
1094
  }) => {
566
- const [helperCount, setHelperCount] = useState4(0);
567
- const [stateError, setStateError] = useState4(false);
568
- const [anchorInfoTitle, setAnchorInfoTitle] = React3.useState(null);
1095
+ const [helperCount, setHelperCount] = useState6(0);
1096
+ const [stateError, setStateError] = useState6(false);
1097
+ const [anchorInfoTitle, setAnchorInfoTitle] = React6.useState(null);
569
1098
  const openInfoTitle = Boolean(anchorInfoTitle);
570
- useEffect4(() => {
1099
+ useEffect6(() => {
571
1100
  setHelperCount(state == null ? void 0 : state.length);
572
1101
  }, [state]);
573
1102
  const IconTitle = getIcon(iconTitle);
@@ -589,7 +1118,7 @@ var SCTextArea = ({
589
1118
  const handleCloseInfoTitle = () => {
590
1119
  setAnchorInfoTitle(null);
591
1120
  };
592
- return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(Box3, { sx: { width } }, /* @__PURE__ */ React3.createElement(Grid2, { container: true, sx: { alignItems: "center" }, gap: 0.5 }, iconTitle && IconTitle && /* @__PURE__ */ React3.createElement(SvgIcon2, { color: "action", fontSize: "small", component: IconTitle }), title && /* @__PURE__ */ React3.createElement(Typography3, { color: colorTitle || "text.secondary", variant: "subtitle2" }, title), infoTitle ? /* @__PURE__ */ React3.createElement(React3.Fragment, null, infoTitle.component === "popover" ? /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
1121
+ return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(Box5, { sx: { width } }, /* @__PURE__ */ React6.createElement(Grid2, { container: true, sx: { alignItems: "center" }, gap: 0.5 }, iconTitle && IconTitle && /* @__PURE__ */ React6.createElement(SvgIcon2, { color: "action", fontSize: "small", component: IconTitle }), title && /* @__PURE__ */ React6.createElement(Typography5, { color: colorTitle || "text.secondary", variant: "subtitle2" }, title), infoTitle ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, infoTitle.component === "popover" ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
593
1122
  InfoOutlined2,
594
1123
  {
595
1124
  color: "action",
@@ -597,7 +1126,7 @@ var SCTextArea = ({
597
1126
  onMouseEnter: (event2) => handleOpenInfoTitle(event2),
598
1127
  onMouseLeave: () => handleCloseInfoTitle()
599
1128
  }
600
- ), /* @__PURE__ */ React3.createElement(
1129
+ ), /* @__PURE__ */ React6.createElement(
601
1130
  Popover2,
602
1131
  {
603
1132
  sx: { pointerEvents: "none" },
@@ -614,14 +1143,14 @@ var SCTextArea = ({
614
1143
  },
615
1144
  disableRestoreFocus: true
616
1145
  },
617
- /* @__PURE__ */ React3.createElement(Typography3, { sx: { p: 2 } }, infoTitle.text)
618
- )) : /* @__PURE__ */ React3.createElement(Tooltip2, { title: infoTitle.text, placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React3.createElement(
1146
+ /* @__PURE__ */ React6.createElement(Typography5, { sx: { p: 2 } }, infoTitle.text)
1147
+ )) : /* @__PURE__ */ React6.createElement(Tooltip3, { title: infoTitle.text, placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React6.createElement(
619
1148
  InfoOutlined2,
620
1149
  {
621
1150
  color: "action",
622
1151
  fontSize: "small"
623
1152
  }
624
- ))) : ""), /* @__PURE__ */ React3.createElement(Stack2, null, /* @__PURE__ */ React3.createElement(
1153
+ ))) : ""), /* @__PURE__ */ React6.createElement(Stack4, null, /* @__PURE__ */ React6.createElement(
625
1154
  TextField,
626
1155
  {
627
1156
  required,
@@ -643,8 +1172,8 @@ var SCTextArea = ({
643
1172
  },
644
1173
  autoComplete: "off"
645
1174
  }
646
- )), /* @__PURE__ */ React3.createElement(Stack2, null, /* @__PURE__ */ React3.createElement(
647
- Typography3,
1175
+ )), /* @__PURE__ */ React6.createElement(Stack4, null, /* @__PURE__ */ React6.createElement(
1176
+ Typography5,
648
1177
  {
649
1178
  variant: "caption",
650
1179
  color: "text.secondary",
@@ -657,8 +1186,8 @@ var SCTextArea = ({
657
1186
  };
658
1187
 
659
1188
  // src/Components/SCSelect.tsx
660
- import React4, { useEffect as useEffect5 } from "react";
661
- import { InputLabel as InputLabel2, FormControl as FormControl2, MenuItem, SvgIcon as SvgIcon3, ListItemIcon, ListItemText, Box as Box4 } from "@mui/material";
1189
+ import React7, { useEffect as useEffect7 } from "react";
1190
+ import { InputLabel as InputLabel2, FormControl as FormControl2, MenuItem, SvgIcon as SvgIcon3, ListItemIcon, ListItemText, Box as Box6 } from "@mui/material";
662
1191
  import Select from "@mui/material/Select";
663
1192
  import * as Muicon2 from "@mui/icons-material";
664
1193
  function SCSelect({
@@ -668,25 +1197,23 @@ function SCSelect({
668
1197
  width = "100%",
669
1198
  size = "small",
670
1199
  variant = "outlined",
671
- deleteType = "button",
1200
+ background = "white",
672
1201
  required,
673
1202
  disabled,
674
- background,
675
- fnAplicar,
676
1203
  setState,
677
1204
  state
678
1205
  }) {
679
1206
  const labelContent = `<span style="color: red;">* </span>` + label;
680
- const [prevData, setPrevData] = React4.useState(data);
681
- const [error, setError] = React4.useState(false);
682
- useEffect5(() => {
1207
+ const [prevData, setPrevData] = React7.useState(data);
1208
+ const [error, setError] = React7.useState(false);
1209
+ useEffect7(() => {
683
1210
  if (error) {
684
1211
  setTimeout(() => {
685
1212
  setError(false);
686
1213
  }, 1e3);
687
1214
  }
688
1215
  }, [error]);
689
- useEffect5(() => {
1216
+ useEffect7(() => {
690
1217
  let dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
691
1218
  if (dataChangeValidation == false) {
692
1219
  setState({ hiddenValue: "", textValue: "" });
@@ -720,25 +1247,25 @@ function SCSelect({
720
1247
  }
721
1248
  }
722
1249
  };
723
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, data && /* @__PURE__ */ React4.createElement(Box4, { sx: { width } }, /* @__PURE__ */ React4.createElement(
1250
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, data && /* @__PURE__ */ React7.createElement(Box6, { sx: { width } }, /* @__PURE__ */ React7.createElement(
724
1251
  FormControl2,
725
1252
  {
726
1253
  fullWidth: true,
727
1254
  size: size ? size : "medium",
728
1255
  variant
729
1256
  },
730
- /* @__PURE__ */ React4.createElement(
1257
+ /* @__PURE__ */ React7.createElement(
731
1258
  InputLabel2,
732
1259
  {
733
1260
  error
734
1261
  },
735
- required ? /* @__PURE__ */ React4.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label
1262
+ required ? /* @__PURE__ */ React7.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label
736
1263
  ),
737
- /* @__PURE__ */ React4.createElement(
1264
+ /* @__PURE__ */ React7.createElement(
738
1265
  Select,
739
1266
  {
740
1267
  value: Array.isArray(state.hiddenValue) ? state.hiddenValue[0] || "" : state.hiddenValue != "-1" ? state.hiddenValue : "",
741
- label: required ? /* @__PURE__ */ React4.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
1268
+ label: required ? /* @__PURE__ */ React7.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
742
1269
  onChange: handleChange,
743
1270
  onBlur: handleBlur,
744
1271
  variant,
@@ -747,26 +1274,32 @@ function SCSelect({
747
1274
  MenuProps: {
748
1275
  PaperProps: {
749
1276
  sx: {
750
- left: "0px !important"
1277
+ maxHeight: "300px",
1278
+ minWidth: "100%"
751
1279
  }
752
1280
  },
753
- sx: {
754
- "& .MuiPaper-root": {
755
- left: "0px !important"
756
- }
757
- }
1281
+ anchorOrigin: {
1282
+ vertical: "bottom",
1283
+ horizontal: "left"
1284
+ },
1285
+ transformOrigin: {
1286
+ vertical: "top",
1287
+ horizontal: "left"
1288
+ },
1289
+ disableAutoFocusItem: true,
1290
+ marginThreshold: 0
758
1291
  }
759
1292
  },
760
1293
  data.map((option, index) => {
761
- return /* @__PURE__ */ React4.createElement(MenuItem, { key: index, value: getItemValue(option).value }, getItemValue(option).icon != void 0 ? /* @__PURE__ */ React4.createElement(ListItemIcon, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ React4.createElement(SvgIcon3, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "", /* @__PURE__ */ React4.createElement(ListItemText, { primary: getItemValue(option).text, color: "text.primary" }));
1294
+ return /* @__PURE__ */ React7.createElement(MenuItem, { key: index, value: getItemValue(option).value }, getItemValue(option).icon != void 0 ? /* @__PURE__ */ React7.createElement(ListItemIcon, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ React7.createElement(SvgIcon3, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "", /* @__PURE__ */ React7.createElement(ListItemText, { primary: getItemValue(option).text, color: "text.primary" }));
762
1295
  })
763
1296
  )
764
1297
  )));
765
1298
  }
766
1299
 
767
1300
  // src/Components/SCAutocomplete.tsx
768
- import React5, { useEffect as useEffect6 } from "react";
769
- import { Autocomplete, Checkbox, InputAdornment as InputAdornment3, MenuItem as MenuItem2, TextField as TextField3, Typography as Typography5, SvgIcon as SvgIcon4, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2, Divider as Divider3, FormControlLabel as FormControlLabel2, IconButton as IconButton4, Chip, Box as Box5, Button as Button3 } from "@mui/material";
1301
+ import React8, { useEffect as useEffect8 } from "react";
1302
+ import { Autocomplete, Checkbox, InputAdornment as InputAdornment3, MenuItem as MenuItem2, TextField as TextField3, Typography as Typography7, SvgIcon as SvgIcon4, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2, Divider as Divider3, FormControlLabel as FormControlLabel2, IconButton as IconButton6, Chip, Box as Box7, Button as Button5 } from "@mui/material";
770
1303
  import Grid3 from "@mui/material/Grid2";
771
1304
  import { Search, Clear } from "@mui/icons-material";
772
1305
  import * as Muicon3 from "@mui/icons-material";
@@ -786,17 +1319,16 @@ function SCAutocomplete({
786
1319
  state,
787
1320
  inputChange,
788
1321
  maxCheck
789
- // Agregar el parámetro maxCheck
790
1322
  }) {
791
1323
  const labelContent = `<span style="color: red;">* </span>` + label;
792
1324
  let group = "";
793
1325
  let isSelected = false;
794
- const [selectedOptions, setSelectedOptions] = React5.useState([]);
795
- const [prevData, setPrevData] = React5.useState(data);
796
- const [originalData, setOriginalData] = React5.useState(data);
797
- const [inputValue, setInputValue] = React5.useState("");
798
- const [isUserTyping, setIsUserTyping] = React5.useState(false);
799
- useEffect6(() => {
1326
+ const [selectedOptions, setSelectedOptions] = React8.useState([]);
1327
+ const [prevData, setPrevData] = React8.useState(data);
1328
+ const [originalData, setOriginalData] = React8.useState(data);
1329
+ const [inputValue, setInputValue] = React8.useState("");
1330
+ const [isUserTyping, setIsUserTyping] = React8.useState(false);
1331
+ useEffect8(() => {
800
1332
  const dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
801
1333
  if (!dataChangeValidation && !isUserTyping) {
802
1334
  setState({ hiddenValue: "-1", textValue: "" });
@@ -807,7 +1339,7 @@ function SCAutocomplete({
807
1339
  }
808
1340
  setPrevData(data);
809
1341
  }, [data, isUserTyping]);
810
- useEffect6(() => {
1342
+ useEffect8(() => {
811
1343
  if (typeFormat == "multiselect") {
812
1344
  if (state.hiddenValue != "-1" && Array.isArray(state.hiddenValue)) {
813
1345
  const newSelectedOptions = originalData.filter(
@@ -817,7 +1349,7 @@ function SCAutocomplete({
817
1349
  }
818
1350
  }
819
1351
  }, [state.hiddenValue, originalData, typeFormat]);
820
- useEffect6(() => {
1352
+ useEffect8(() => {
821
1353
  if (inputValue === "") {
822
1354
  setIsUserTyping(false);
823
1355
  }
@@ -875,11 +1407,12 @@ function SCAutocomplete({
875
1407
  const selectedValue = typeFormat === "multiselect" ? selectedOptions : originalData.find(
876
1408
  (item) => getItemValue(item).value === state.hiddenValue
877
1409
  ) || null;
878
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, data && /* @__PURE__ */ React5.createElement(
1410
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, data && /* @__PURE__ */ React8.createElement(
879
1411
  Autocomplete,
880
1412
  {
881
1413
  multiple: typeFormat === "multiselect",
882
1414
  clearOnEscape: true,
1415
+ noOptionsText: "No se encuentra",
883
1416
  disabled,
884
1417
  options: data,
885
1418
  isOptionEqualToValue: (option, value) => getItemValue(option).value === getItemValue(value).value,
@@ -901,9 +1434,9 @@ function SCAutocomplete({
901
1434
  limitTags: 2,
902
1435
  renderTags: (value, getTagProps) => {
903
1436
  const limit = 2;
904
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, value.slice(0, limit).map((option, index) => {
1437
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, value.slice(0, limit).map((option, index) => {
905
1438
  const _a = getTagProps({ index }), { key } = _a, chipProps = __objRest(_a, ["key"]);
906
- return /* @__PURE__ */ React5.createElement(
1439
+ return /* @__PURE__ */ React8.createElement(
907
1440
  Chip,
908
1441
  __spreadProps(__spreadValues({
909
1442
  key,
@@ -915,7 +1448,7 @@ function SCAutocomplete({
915
1448
  style: { maxWidth: 120, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
916
1449
  })
917
1450
  );
918
- }), value.length > limit && /* @__PURE__ */ React5.createElement(Box5, { sx: { ml: 0.5, fontSize: 13, color: "#666", display: "flex", alignItems: "center" } }, `+${value.length - limit}`));
1451
+ }), value.length > limit && /* @__PURE__ */ React8.createElement(Box7, { sx: { ml: 0.5, fontSize: 13, color: "#666", display: "flex", alignItems: "center" } }, `+${value.length - limit}`));
919
1452
  },
920
1453
  renderOption: (props, option) => {
921
1454
  const _a = props, { key } = _a, optionProps = __objRest(_a, ["key"]);
@@ -933,7 +1466,7 @@ function SCAutocomplete({
933
1466
  isValid = group == option[columnGroup];
934
1467
  group = option[columnGroup];
935
1468
  }
936
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(React5.Fragment, { key }, columnGroup ? !isValid ? /* @__PURE__ */ React5.createElement(Typography5, { color: "text.secondary", sx: { margin: "7px 16px !important", fontSize: "13px !important" } }, option[columnGroup]) : "" : "", /* @__PURE__ */ React5.createElement(
1469
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(React8.Fragment, { key }, columnGroup ? !isValid ? /* @__PURE__ */ React8.createElement(Typography7, { color: "text.secondary", sx: { margin: "7px 16px !important", fontSize: "13px !important" } }, option[columnGroup]) : "" : "", /* @__PURE__ */ React8.createElement(
937
1470
  MenuItem2,
938
1471
  __spreadProps(__spreadValues({}, optionProps), {
939
1472
  disabled: isDisabled,
@@ -943,8 +1476,8 @@ function SCAutocomplete({
943
1476
  opacity: isDisabled ? 0.5 : 1
944
1477
  }
945
1478
  }),
946
- typeFormat != "multiselect" && getItemValue(option).icon != void 0 ? /* @__PURE__ */ React5.createElement(ListItemIcon2, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ React5.createElement(SvgIcon4, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "",
947
- typeFormat == "multiselect" ? /* @__PURE__ */ React5.createElement(
1479
+ typeFormat != "multiselect" && getItemValue(option).icon != void 0 ? /* @__PURE__ */ React8.createElement(ListItemIcon2, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ React8.createElement(SvgIcon4, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "",
1480
+ typeFormat == "multiselect" ? /* @__PURE__ */ React8.createElement(
948
1481
  Checkbox,
949
1482
  {
950
1483
  checked: isSelected,
@@ -953,25 +1486,25 @@ function SCAutocomplete({
953
1486
  color: "primary"
954
1487
  }
955
1488
  ) : "",
956
- /* @__PURE__ */ React5.createElement(ListItemText2, { primary: getItemValue(option).text, color: "text.primary" }),
1489
+ /* @__PURE__ */ React8.createElement(ListItemText2, { primary: getItemValue(option).text, color: "text.primary" }),
957
1490
  getItemValue(option).component != void 0 ? getItemValue(option).component : ""
958
1491
  )));
959
1492
  },
960
- renderInput: (params) => /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
1493
+ renderInput: (params) => /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
961
1494
  TextField3,
962
1495
  __spreadProps(__spreadValues({}, params), {
963
- label: required ? /* @__PURE__ */ React5.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
1496
+ label: required ? /* @__PURE__ */ React8.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
964
1497
  placeholder: selectedOptions.length == 0 ? "B\xFAsqueda" : "",
965
1498
  InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
966
- endAdornment: /* @__PURE__ */ React5.createElement(React5.Fragment, null, deleteType == "icon" && (state.hiddenValue.toString() != "-1" && state.hiddenValue.toString() != "") ? /* @__PURE__ */ React5.createElement(IconButton4, { size: "small", onClick: cleanOptions, sx: { marginLeft: "auto", textAlign: "right", padding: "0px" } }, /* @__PURE__ */ React5.createElement(Clear, { fontSize: "small" })) : "", /* @__PURE__ */ React5.createElement(InputAdornment3, { style: { zIndex: 1, position: "relative" }, position: "end" }, /* @__PURE__ */ React5.createElement(Search, { fontSize: "small", color: "action", style: { cursor: "pointer" } })))
1499
+ endAdornment: /* @__PURE__ */ React8.createElement(React8.Fragment, null, deleteType == "icon" && (state.hiddenValue.toString() != "-1" && state.hiddenValue.toString() != "") ? /* @__PURE__ */ React8.createElement(IconButton6, { size: "small", onClick: cleanOptions, sx: { marginLeft: "auto", textAlign: "right", padding: "0px" } }, /* @__PURE__ */ React8.createElement(Clear, { fontSize: "small" })) : "", /* @__PURE__ */ React8.createElement(InputAdornment3, { style: { zIndex: 1, position: "relative" }, position: "end" }, /* @__PURE__ */ React8.createElement(Search, { fontSize: "small", color: "action", style: { cursor: "pointer" } })))
967
1500
  })
968
1501
  })
969
1502
  )),
970
1503
  slotProps: {
971
1504
  listbox: {
972
- component: React5.forwardRef(function ListboxComponent(props, ref) {
973
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
974
- Box5,
1505
+ component: React8.forwardRef(function ListboxComponent(props, ref) {
1506
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
1507
+ Box7,
975
1508
  __spreadProps(__spreadValues({
976
1509
  ref
977
1510
  }, props), {
@@ -981,9 +1514,9 @@ function SCAutocomplete({
981
1514
  backgroundColor: "white"
982
1515
  }, props.sx)
983
1516
  }),
984
- checkMassive && typeFormat == "multiselect" ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(FormControlLabel2, { control: /* @__PURE__ */ React5.createElement(Checkbox, { checked: allSelected, indeterminate: selectedOptions.length > 0 && selectedOptions.length < data.length, onChange: handleCheckAll, color: "primary" }), label: "Todos los items", sx: { marginLeft: "0px !important", marginRight: "0px !important", padding: "7px 16px" } }), /* @__PURE__ */ React5.createElement(Divider3, null)) : "",
1517
+ checkMassive && typeFormat == "multiselect" ? /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(FormControlLabel2, { control: /* @__PURE__ */ React8.createElement(Checkbox, { checked: allSelected, indeterminate: selectedOptions.length > 0 && selectedOptions.length < data.length, onChange: handleCheckAll, color: "primary" }), label: "Todos los items", sx: { marginLeft: "0px !important", marginRight: "0px !important", padding: "7px 16px" } }), /* @__PURE__ */ React8.createElement(Divider3, null)) : "",
985
1518
  props.children,
986
- deleteType == "button" || fnAplicar ? /* @__PURE__ */ React5.createElement(
1519
+ deleteType == "button" || fnAplicar ? /* @__PURE__ */ React8.createElement(
987
1520
  Grid3,
988
1521
  {
989
1522
  container: true,
@@ -998,8 +1531,8 @@ function SCAutocomplete({
998
1531
  justifyContent: "space-between"
999
1532
  }
1000
1533
  },
1001
- deleteType == "button" ? /* @__PURE__ */ React5.createElement(
1002
- Button3,
1534
+ deleteType == "button" ? /* @__PURE__ */ React8.createElement(
1535
+ Button5,
1003
1536
  {
1004
1537
  variant: "text",
1005
1538
  color: "primary",
@@ -1011,8 +1544,8 @@ function SCAutocomplete({
1011
1544
  },
1012
1545
  "Limpiar"
1013
1546
  ) : "",
1014
- fnAplicar && /* @__PURE__ */ React5.createElement(
1015
- Button3,
1547
+ fnAplicar && /* @__PURE__ */ React8.createElement(
1548
+ Button5,
1016
1549
  {
1017
1550
  variant: "contained",
1018
1551
  color: "primary",
@@ -1031,8 +1564,8 @@ function SCAutocomplete({
1031
1564
  }
1032
1565
 
1033
1566
  // src/Components/SCDateRange.tsx
1034
- import React6 from "react";
1035
- import { Box as Box6, InputAdornment as InputAdornment4 } from "@mui/material";
1567
+ import React9 from "react";
1568
+ import { Box as Box8, InputAdornment as InputAdornment4 } from "@mui/material";
1036
1569
  import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
1037
1570
  import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
1038
1571
  import { DateRangePicker } from "@mui/x-date-pickers-pro/DateRangePicker";
@@ -1063,7 +1596,7 @@ var SCDateRange = ({
1063
1596
  ];
1064
1597
  setState(convertedValue);
1065
1598
  };
1066
- return /* @__PURE__ */ React6.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ React6.createElement(Box6, { sx: { width: "100%" } }, /* @__PURE__ */ React6.createElement(
1599
+ return /* @__PURE__ */ React9.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ React9.createElement(Box8, { sx: { width: "100%" } }, /* @__PURE__ */ React9.createElement(
1067
1600
  DateRangePicker,
1068
1601
  {
1069
1602
  value: state,
@@ -1082,7 +1615,7 @@ var SCDateRange = ({
1082
1615
  required,
1083
1616
  error: position === "start" ? isStartEmpty : isEndEmpty,
1084
1617
  InputProps: {
1085
- endAdornment: /* @__PURE__ */ React6.createElement(InputAdornment4, { position: "end" }, /* @__PURE__ */ React6.createElement(
1618
+ endAdornment: /* @__PURE__ */ React9.createElement(InputAdornment4, { position: "end" }, /* @__PURE__ */ React9.createElement(
1086
1619
  EventIcon,
1087
1620
  {
1088
1621
  color: hasError ? "error" : "action",
@@ -1123,29 +1656,81 @@ var getIcon2 = (iconName) => {
1123
1656
  };
1124
1657
 
1125
1658
  // src/Components/Drawer/Helpers/validateInput.tsx
1126
- var validateInputs = (arrayElements, onError, onSuccess) => {
1127
- var _a;
1659
+ var validateInputs = (arrayElements, onError, onSuccess, setChipFilters, setTextFilters) => {
1660
+ var _a, _b;
1128
1661
  let requiredValues = 0;
1129
1662
  let filledValues = 0;
1130
1663
  for (let i = 0; i < arrayElements.length; i++) {
1131
- if (arrayElements[i].component === void 0) {
1132
- if (arrayElements[i].required) {
1133
- requiredValues++;
1134
- }
1135
- if (arrayElements[i].required && ((_a = arrayElements[i].state) == null ? void 0 : _a.trim()) !== "") {
1664
+ const element = arrayElements[i];
1665
+ const { validation, element: typeElement } = validateTypeElements(element);
1666
+ const textValue = ((_a = typeElement.state) == null ? void 0 : _a.textValue) !== void 0 ? String((_b = typeElement.state) == null ? void 0 : _b.textValue) : String(typeElement.state);
1667
+ if (typeElement == null ? void 0 : typeElement.required) {
1668
+ requiredValues++;
1669
+ if (textValue.trim() !== "" && textValue.trim() !== ",") {
1136
1670
  filledValues++;
1137
1671
  }
1138
1672
  }
1139
1673
  }
1140
1674
  if (requiredValues === filledValues) {
1141
1675
  onSuccess();
1676
+ setChipFilters(true);
1142
1677
  } else {
1143
1678
  onError({
1144
1679
  type: "error",
1145
1680
  title: "Algunos campos son requeridos",
1146
1681
  time: 10
1147
1682
  });
1683
+ setChipFilters(false);
1684
+ }
1685
+ };
1686
+
1687
+ // src/Components/Drawer/Helpers/validateTypeElement.tsx
1688
+ import React10 from "react";
1689
+ var validateTypeElements = (element) => {
1690
+ var _a;
1691
+ let validation = "";
1692
+ let typeElement = element;
1693
+ if (element.type == "textField") {
1694
+ validation = "textField";
1695
+ typeElement = element;
1696
+ } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCtextField") {
1697
+ validation = "textField";
1698
+ typeElement = element == null ? void 0 : element.component.props;
1699
+ } else if (element.type == "textArea") {
1700
+ validation = "textArea";
1701
+ typeElement = element;
1702
+ } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCtextArea") {
1703
+ validation = "textArea";
1704
+ typeElement = element == null ? void 0 : element.component.props;
1705
+ } else if (element.type == "dateRange") {
1706
+ validation = "dateRange";
1707
+ typeElement = element;
1708
+ } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCDateRange") {
1709
+ validation = "dateRange";
1710
+ typeElement = element == null ? void 0 : element.component.props;
1711
+ } else if (element.type == "autocomplete") {
1712
+ validation = "autocomplete";
1713
+ typeElement = element;
1714
+ } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCAutocomplete") {
1715
+ validation = "autocomplete";
1716
+ typeElement = element == null ? void 0 : element.component.props;
1717
+ } else if (element.typeFormat == "multiselect") {
1718
+ validation = "multiselect";
1719
+ typeElement = element;
1720
+ } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.props && ((_a = element == null ? void 0 : element.component) == null ? void 0 : _a.props).typeFormat == "multiselect") {
1721
+ validation = "multiselect";
1722
+ typeElement = element == null ? void 0 : element.component.props;
1723
+ } else if (element.type == "select") {
1724
+ validation = "select";
1725
+ typeElement = element;
1726
+ } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCSelect") {
1727
+ validation = "select";
1728
+ typeElement = element == null ? void 0 : element.component.props;
1148
1729
  }
1730
+ return {
1731
+ validation,
1732
+ element: typeElement
1733
+ };
1149
1734
  };
1150
1735
 
1151
1736
  // src/Components/Drawer/SCDrawer.tsx
@@ -1160,16 +1745,42 @@ function SCDrawer({
1160
1745
  anchor = "left",
1161
1746
  width,
1162
1747
  //Funcionales
1163
- open
1748
+ open,
1749
+ setOpen,
1750
+ chipFilters
1164
1751
  }) {
1165
1752
  var _a, _b;
1166
- const [drawerOpen, setDrawerOpen] = React7.useState(open);
1167
- const [toast, setToast] = React7.useState(null);
1753
+ const scrollRef = useRef3(null);
1754
+ const [drawerOpen, setDrawerOpen] = React11.useState(open);
1755
+ const [toast, setToast] = React11.useState(null);
1756
+ const [stateChipFilters, setChipFilters] = React11.useState(false);
1757
+ const [textFilters, setTextFilters] = React11.useState([]);
1758
+ useEffect10(() => {
1759
+ if (chipFilters != void 0) {
1760
+ if (chipFilters.length > 0) {
1761
+ setTextFilters([]);
1762
+ inputValidation();
1763
+ }
1764
+ }
1765
+ }, [chipFilters]);
1766
+ useEffect10(() => {
1767
+ if (open) {
1768
+ toggleDrawer(true);
1769
+ } else {
1770
+ handleDrawerClose();
1771
+ }
1772
+ }, [open]);
1168
1773
  const handleDrawerClose = () => {
1169
1774
  setDrawerOpen(false);
1775
+ if (setOpen) {
1776
+ setOpen(false);
1777
+ }
1170
1778
  };
1171
1779
  const toggleDrawer = (newOpen) => () => {
1172
1780
  setDrawerOpen(newOpen);
1781
+ if (setOpen) {
1782
+ setOpen(true);
1783
+ }
1173
1784
  };
1174
1785
  const ButtonIcon = getIcon2(buttonDrawer == null ? void 0 : buttonDrawer.icon);
1175
1786
  const setToastWithDelay = (toastContent) => {
@@ -1178,39 +1789,179 @@ function SCDrawer({
1178
1789
  setToast(toastContent);
1179
1790
  }, 10);
1180
1791
  };
1181
- const inputValidation = () => validateInputs(arrayElements, setToastWithDelay, handleDrawerClose);
1182
- const clean = () => {
1183
- arrayElements.forEach((element, index) => {
1184
- var _a2, _b2, _c, _d, _e, _f, _g, _h;
1185
- if (element.setState || React7.isValidElement(element == null ? void 0 : element.component) && ((_a2 = element.component.props) == null ? void 0 : _a2.setState)) {
1186
- if (element.type === "textField" || React7.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name === "SCtextField" || (element.type === "textArea" || React7.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name === "SCtextArea")) {
1187
- element.setState != void 0 ? element.setState("") : null;
1188
- React7.isValidElement(element == null ? void 0 : element.component) && ((_b2 = element.component.props) == null ? void 0 : _b2.setState) && ((_d = (_c = element == null ? void 0 : element.component) == null ? void 0 : _c.props) == null ? void 0 : _d.setState(""));
1189
- } else if (element.type === "dateRange" || React7.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name === "SCDateRange") {
1190
- element.setState != void 0 ? element.setState([null, null]) : null;
1191
- React7.isValidElement(element == null ? void 0 : element.component) && typeof ((_e = element.component.props) == null ? void 0 : _e.setState) === "function" && element.component.props.setState([null, null]);
1192
- } else {
1193
- if (element.type == "autocomplete" || React7.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name === "SCAutocomplete" || (element.typeFormat == "multiselect" || React7.isValidElement(element == null ? void 0 : element.component) && element.component.props && ((_f = element == null ? void 0 : element.component) == null ? void 0 : _f.props).typeFormat == "multiselect")) {
1194
- element.setState != void 0 ? element.setState({ hiddenValue: [], textValue: [] }) : null;
1195
- React7.isValidElement(element == null ? void 0 : element.component) && typeof ((_g = element.component.props) == null ? void 0 : _g.setState) === "function" && element.component.props.setState({ hiddenValue: [], textValue: [] });
1792
+ const inputValidation = () => {
1793
+ var _a2, _b2, _c, _d;
1794
+ if (chipFilters != void 0 && chipFilters.length > 0) {
1795
+ if (chipFilters && chipFilters.length > 0) {
1796
+ arrayElements.forEach((arrayElement) => {
1797
+ var _a3, _b3, _c2;
1798
+ const { validation, element: typeElement } = validateTypeElements(arrayElement);
1799
+ let currentValue = "";
1800
+ if (validation === "dateRange") {
1801
+ if (typeElement.state && typeElement.state[0] && typeElement.state[1]) {
1802
+ currentValue = `${(_a3 = typeElement.state[0]) == null ? void 0 : _a3.format("DD/MM/YYYY")} - ${(_b3 = typeElement.state[1]) == null ? void 0 : _b3.format("DD/MM/YYYY")}`;
1803
+ }
1804
+ } else {
1805
+ currentValue = ((_c2 = typeElement.state) == null ? void 0 : _c2.textValue) !== void 0 ? String(typeElement.state.textValue).trim() : String(typeElement.state).trim();
1806
+ }
1807
+ chipFilters.forEach((chipFilter) => {
1808
+ const chipValue = String(chipFilter).trim();
1809
+ if (currentValue === chipValue && currentValue !== "" && currentValue !== ",") {
1810
+ setTextFilters((prevFilters) => {
1811
+ const newFilter = { value: currentValue, arrayElement: typeElement };
1812
+ const existingFilterIndex = prevFilters.findIndex(
1813
+ (filter) => filter.arrayElement.label === arrayElement.label
1814
+ );
1815
+ if (existingFilterIndex !== -1) {
1816
+ const updatedFilters = [...prevFilters];
1817
+ updatedFilters[existingFilterIndex] = newFilter;
1818
+ return updatedFilters;
1819
+ } else {
1820
+ return [...prevFilters, newFilter];
1821
+ }
1822
+ });
1823
+ }
1824
+ });
1825
+ });
1826
+ }
1827
+ } else {
1828
+ const newFiltersToAdd = [];
1829
+ for (let i = 0; i < arrayElements.length; i++) {
1830
+ const element = arrayElements[i];
1831
+ const { validation, element: typeElement } = validateTypeElements(element);
1832
+ const textValue = ((_a2 = typeElement.state) == null ? void 0 : _a2.textValue) !== void 0 ? String((_b2 = typeElement.state) == null ? void 0 : _b2.textValue) : String(typeElement.state);
1833
+ if (textValue.trim() !== "" && textValue.trim() !== ",") {
1834
+ let newFilter;
1835
+ switch (validation) {
1836
+ case "dateRange":
1837
+ const values = `${(_c = typeElement.state[0]) == null ? void 0 : _c.format("DD/MM/YYYY")} - ${(_d = typeElement.state[1]) == null ? void 0 : _d.format("DD/MM/YYYY")}`;
1838
+ newFilter = { value: values, arrayElement: typeElement };
1839
+ break;
1840
+ default:
1841
+ newFilter = { value: textValue, arrayElement: typeElement };
1842
+ break;
1843
+ }
1844
+ const existingFilterByLabel = newFiltersToAdd.find(
1845
+ (filter) => filter.arrayElement.label === element.label
1846
+ );
1847
+ if (existingFilterByLabel) {
1848
+ existingFilterByLabel.value = newFilter.value;
1849
+ existingFilterByLabel.arrayElement = newFilter.arrayElement;
1196
1850
  } else {
1197
- element.setState != void 0 ? element.setState({ hiddenValue: "-1", textValue: "" }) : null;
1198
- React7.isValidElement(element == null ? void 0 : element.component) && typeof ((_h = element.component.props) == null ? void 0 : _h.setState) === "function" && element.component.props.setState({ hiddenValue: "-1", textValue: "" });
1851
+ newFiltersToAdd.push(newFilter);
1199
1852
  }
1200
1853
  }
1201
1854
  }
1855
+ setTextFilters((prevFilters) => {
1856
+ let updatedFilters = [...prevFilters];
1857
+ newFiltersToAdd.forEach((newFilter) => {
1858
+ const existingFilterIndex = updatedFilters.findIndex(
1859
+ (filter) => filter.arrayElement.label === newFilter.arrayElement.label
1860
+ );
1861
+ if (existingFilterIndex !== -1) {
1862
+ updatedFilters[existingFilterIndex] = newFilter;
1863
+ } else {
1864
+ updatedFilters.push(newFilter);
1865
+ }
1866
+ });
1867
+ return updatedFilters;
1868
+ });
1869
+ validateInputs(arrayElements, setToastWithDelay, handleDrawerClose, setChipFilters, setTextFilters);
1870
+ }
1871
+ };
1872
+ const resetElementByType = (originalElement, validation, typeElement) => {
1873
+ let defaultValue;
1874
+ switch (validation) {
1875
+ case "textField":
1876
+ case "textArea":
1877
+ defaultValue = "";
1878
+ break;
1879
+ case "dateRange":
1880
+ defaultValue = [null, null];
1881
+ break;
1882
+ case "multiselect":
1883
+ defaultValue = { hiddenValue: [], textValue: [] };
1884
+ break;
1885
+ default:
1886
+ defaultValue = { hiddenValue: "-1", textValue: "" };
1887
+ }
1888
+ if (typeElement.setState) {
1889
+ typeElement.setState(defaultValue);
1890
+ }
1891
+ };
1892
+ const cleanFilters = () => {
1893
+ arrayElements.forEach((element) => {
1894
+ const { validation, element: typeElement } = validateTypeElements(element);
1895
+ if (typeElement.setState) {
1896
+ resetElementByType(element, validation, typeElement);
1897
+ }
1898
+ });
1899
+ setTextFilters([]);
1900
+ };
1901
+ const deleteFilter = (element) => {
1902
+ const { validation, element: typeElement } = validateTypeElements(element);
1903
+ if (typeElement.setState && shouldShowChips == true) {
1904
+ resetElementByType(element, validation, typeElement);
1905
+ setTextFilters(
1906
+ (prevFilters) => prevFilters.filter((filter) => filter.arrayElement.label !== element.label)
1907
+ );
1908
+ }
1909
+ };
1910
+ const scroll = (offset) => {
1911
+ if (scrollRef.current) {
1912
+ scrollRef.current.scrollLeft += offset;
1913
+ }
1914
+ };
1915
+ const hasActiveFilters = () => {
1916
+ return arrayElements.some((arrayElement) => {
1917
+ const { validation, element: typeElement } = validateTypeElements(arrayElement);
1918
+ if (typeElement.state.textValue !== void 0) {
1919
+ return String(typeElement.state.textValue).trim() !== "";
1920
+ } else if (validation === "dateRange") {
1921
+ return typeElement.state && typeElement.state[0] !== null && typeElement.state[1] !== null;
1922
+ } else {
1923
+ return String(typeElement.state).trim() !== "" && String(typeElement.state).trim() !== ",";
1924
+ }
1202
1925
  });
1203
1926
  };
1204
- const actionsA = actions == false ? false : actions != void 0 ? actions : [{ text: "Aplicar filtros", fn: inputValidation }, { text: "Limpiar filtros", fn: clean }];
1205
- return /* @__PURE__ */ React7.createElement(React7.Fragment, null, toast && /* @__PURE__ */ React7.createElement(SCToastNotification, __spreadValues({}, toast)), (buttonDrawer == null ? void 0 : buttonDrawer.type) == "chip" ? /* @__PURE__ */ React7.createElement(
1927
+ const shouldShowChips = chipFilters != void 0 && chipFilters.length > 0 ? true : stateChipFilters === true && hasActiveFilters();
1928
+ const actionsA = actions == false ? false : actions != void 0 ? actions : [{ text: "Aplicar filtros", fn: inputValidation }, { text: "Limpiar filtros", fn: cleanFilters }];
1929
+ return /* @__PURE__ */ React11.createElement(React11.Fragment, null, toast && /* @__PURE__ */ React11.createElement(SCToastNotification, __spreadValues({}, toast)), /* @__PURE__ */ React11.createElement(Grid4, { container: true, justifyContent: "flex-start", flexWrap: "nowrap", alignItems: "center", sx: { width: "100%" } }, shouldShowChips && /* @__PURE__ */ React11.createElement(Box9, { display: "flex", alignItems: "center", sx: { maxWidth: "78%" } }, /* @__PURE__ */ React11.createElement(IconButton7, { onClick: () => scroll(-150), size: "small" }, /* @__PURE__ */ React11.createElement(ArrowBackIosIcon, { fontSize: "small" })), /* @__PURE__ */ React11.createElement(
1930
+ Box9,
1931
+ {
1932
+ ref: scrollRef,
1933
+ gap: 0.3,
1934
+ sx: {
1935
+ display: "flex",
1936
+ overflowX: "auto",
1937
+ scrollBehavior: "smooth",
1938
+ "&::-webkit-scrollbar": { display: "none" }
1939
+ }
1940
+ },
1941
+ textFilters == null ? void 0 : textFilters.map((chipData, index) => /* @__PURE__ */ React11.createElement(
1942
+ Chip2,
1943
+ __spreadProps(__spreadValues({
1944
+ key: index,
1945
+ label: chipData.value
1946
+ }, chipData.arrayElement.required == false || chipData.arrayElement.required == void 0 ? { onDelete: () => deleteFilter(chipData.arrayElement) } : {}), {
1947
+ color: "default",
1948
+ variant: "filled",
1949
+ size: "small",
1950
+ sx: {
1951
+ flexShrink: 0,
1952
+ minWidth: "auto"
1953
+ }
1954
+ })
1955
+ ))
1956
+ ), /* @__PURE__ */ React11.createElement(IconButton7, { onClick: () => scroll(150), size: "small" }, /* @__PURE__ */ React11.createElement(ArrowForwardIosIcon, { fontSize: "small" }))), (buttonDrawer == null ? void 0 : buttonDrawer.type) == "chip" ? /* @__PURE__ */ React11.createElement(
1206
1957
  Chip2,
1207
1958
  __spreadProps(__spreadValues({
1208
1959
  onClick: toggleDrawer(true),
1209
1960
  color: buttonDrawer == null ? void 0 : buttonDrawer.color,
1210
1961
  variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) == "contained" ? "filled" : "outlined",
1211
1962
  label: (_a = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _a : "",
1212
- icon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : void 0,
1213
- deleteIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : void 0
1963
+ icon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" && ButtonIcon ? /* @__PURE__ */ React11.createElement(ButtonIcon, { fontSize: "small" }) : void 0,
1964
+ deleteIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React11.createElement(ButtonIcon, { fontSize: "small" }) : void 0
1214
1965
  }, (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? { onDelete: () => {
1215
1966
  } } : {}), {
1216
1967
  sx: {
@@ -1220,8 +1971,8 @@ function SCDrawer({
1220
1971
  textTransform: "capitalize"
1221
1972
  }
1222
1973
  })
1223
- ) : /* @__PURE__ */ React7.createElement(
1224
- Button4,
1974
+ ) : /* @__PURE__ */ React11.createElement(
1975
+ Button6,
1225
1976
  {
1226
1977
  "data-testid": "test-buttonDrawer",
1227
1978
  sx: { textTransform: "capitalize" },
@@ -1229,11 +1980,11 @@ function SCDrawer({
1229
1980
  onClick: toggleDrawer(true),
1230
1981
  size: "small",
1231
1982
  variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) != void 0 ? buttonDrawer == null ? void 0 : buttonDrawer.variant : "text",
1232
- startIcon: ((buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" || !(buttonDrawer == null ? void 0 : buttonDrawer.iconPosition)) && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : null,
1233
- endIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : null
1983
+ startIcon: ((buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" || !(buttonDrawer == null ? void 0 : buttonDrawer.iconPosition)) && ButtonIcon ? /* @__PURE__ */ React11.createElement(ButtonIcon, { fontSize: "small" }) : null,
1984
+ endIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React11.createElement(ButtonIcon, { fontSize: "small" }) : null
1234
1985
  },
1235
1986
  (_b = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _b : ""
1236
- ), /* @__PURE__ */ React7.createElement(
1987
+ )), /* @__PURE__ */ React11.createElement(
1237
1988
  Drawer,
1238
1989
  {
1239
1990
  open: drawerOpen,
@@ -1247,15 +1998,15 @@ function SCDrawer({
1247
1998
  }
1248
1999
  }
1249
2000
  },
1250
- /* @__PURE__ */ React7.createElement(Stack3, { flexDirection: "column", height: "100%" }, /* @__PURE__ */ React7.createElement(Grid4, { container: true, sx: { backgroundColor: "primary.50", alignItems: "center", height: "42px", textAlign: "left", padding: "8px 12px", justifyContent: "space-between", alignContent: "center" } }, /* @__PURE__ */ React7.createElement(Typography7, { variant: "h6", color: colorTitle || "text.primary" }, title != null ? title : "Personaliza tu b\xFAsqueda"), /* @__PURE__ */ React7.createElement(IconButton5, { onClick: handleDrawerClose }, /* @__PURE__ */ React7.createElement(CloseIcon, { "data-testid": "test-button-close", sx: { color: "text.primary" } }))), /* @__PURE__ */ React7.createElement(Stack3, { alignItems: "flex-start", height: "100%", gap: "16px", flex: 1, overflow: "auto", padding: "16px" }, arrayElements == null ? void 0 : arrayElements.map((arrayElement, index) => {
2001
+ /* @__PURE__ */ React11.createElement(Stack5, { flexDirection: "column", height: "100%" }, /* @__PURE__ */ React11.createElement(Grid4, { container: true, sx: { backgroundColor: "primary.50", alignItems: "center", height: "42px", textAlign: "left", padding: "8px 12px", justifyContent: "space-between", alignContent: "center" } }, /* @__PURE__ */ React11.createElement(Typography9, { variant: "h6", color: colorTitle || "text.primary" }, title != null ? title : "Personaliza tu b\xFAsqueda"), /* @__PURE__ */ React11.createElement(IconButton7, { onClick: handleDrawerClose }, /* @__PURE__ */ React11.createElement(CloseIcon, { "data-testid": "test-button-close", sx: { color: "text.primary" } }))), /* @__PURE__ */ React11.createElement(Stack5, { alignItems: "flex-start", height: "100%", gap: "16px", flex: 1, overflow: "auto", padding: "16px" }, arrayElements == null ? void 0 : arrayElements.map((arrayElement, index) => {
1251
2002
  var _a2, _b2, _c, _d, _e, _f;
1252
- return /* @__PURE__ */ React7.createElement(
1253
- Box7,
2003
+ return /* @__PURE__ */ React11.createElement(
2004
+ Box9,
1254
2005
  {
1255
2006
  key: `Stack_${(_a2 = arrayElement.type) != null ? _a2 : ""} ${(_b2 = arrayElement.label) != null ? _b2 : ""}${index}`,
1256
2007
  sx: { width: "100%" }
1257
2008
  },
1258
- arrayElement.component ? /* @__PURE__ */ React7.createElement(Stack3, { direction: "row", alignItems: "left", gap: 1 }, arrayElement.component) : arrayElement.type === "textField" ? /* @__PURE__ */ React7.createElement(
2009
+ arrayElement.component ? /* @__PURE__ */ React11.createElement(Stack5, { direction: "row", alignItems: "left", gap: 1 }, arrayElement.component) : arrayElement.type === "textField" ? /* @__PURE__ */ React11.createElement(
1259
2010
  SCTextField,
1260
2011
  {
1261
2012
  title: arrayElement.title,
@@ -1281,7 +2032,7 @@ function SCDrawer({
1281
2032
  onBlur: arrayElement.onBlur,
1282
2033
  onKeyDown: arrayElement.onKeyDown
1283
2034
  }
1284
- ) : arrayElement.type === "textArea" ? /* @__PURE__ */ React7.createElement(
2035
+ ) : arrayElement.type === "textArea" ? /* @__PURE__ */ React11.createElement(
1285
2036
  SCTextArea,
1286
2037
  {
1287
2038
  title: arrayElement.title,
@@ -1300,7 +2051,7 @@ function SCDrawer({
1300
2051
  state: arrayElement.state || "",
1301
2052
  onBlur: arrayElement.onBlur
1302
2053
  }
1303
- ) : arrayElement.type === "autocomplete" ? /* @__PURE__ */ React7.createElement(
2054
+ ) : arrayElement.type === "autocomplete" ? /* @__PURE__ */ React11.createElement(
1304
2055
  SCAutocomplete,
1305
2056
  {
1306
2057
  label: arrayElement.label,
@@ -1318,7 +2069,7 @@ function SCDrawer({
1318
2069
  state: arrayElement.state || "",
1319
2070
  inputChange: arrayElement.inputChange
1320
2071
  }
1321
- ) : arrayElement.type === "select" ? /* @__PURE__ */ React7.createElement(
2072
+ ) : arrayElement.type === "select" ? /* @__PURE__ */ React11.createElement(
1322
2073
  SCSelect,
1323
2074
  {
1324
2075
  label: arrayElement.label,
@@ -1327,7 +2078,6 @@ function SCDrawer({
1327
2078
  width: arrayElement.width,
1328
2079
  size: arrayElement.size,
1329
2080
  variant: arrayElement.variant,
1330
- deleteType: arrayElement.deleteType,
1331
2081
  required: arrayElement.required,
1332
2082
  disabled: arrayElement.disabled,
1333
2083
  background: arrayElement.background,
@@ -1335,7 +2085,7 @@ function SCDrawer({
1335
2085
  setState: arrayElement.setState,
1336
2086
  state: arrayElement.state || ""
1337
2087
  }
1338
- ) : arrayElement.type === "dateRange" ? /* @__PURE__ */ React7.createElement(
2088
+ ) : arrayElement.type === "dateRange" ? /* @__PURE__ */ React11.createElement(
1339
2089
  SCDateRange,
1340
2090
  {
1341
2091
  labelDateInitial: arrayElement.labelDateInitial,
@@ -1348,7 +2098,7 @@ function SCDrawer({
1348
2098
  }
1349
2099
  ) : null
1350
2100
  );
1351
- })), actionsA != void 0 && actionsA != false ? Array.isArray(actionsA) && (actionsA == null ? void 0 : actionsA.length) > 0 ? /* @__PURE__ */ React7.createElement(
2101
+ })), actionsA != void 0 && actionsA != false ? Array.isArray(actionsA) && (actionsA == null ? void 0 : actionsA.length) > 0 ? /* @__PURE__ */ React11.createElement(
1352
2102
  Grid4,
1353
2103
  {
1354
2104
  sx: { borderTop: 1, borderColor: "#1018403B" },
@@ -1360,8 +2110,8 @@ function SCDrawer({
1360
2110
  justifyContent: actionsA.length > 1 ? "space-between" : !anchor && anchor != "right" ? "flex-end" : "flex-start",
1361
2111
  flexDirection: anchor != "right" ? "row-reverse" : "row"
1362
2112
  },
1363
- actionsA.map((btn, index) => /* @__PURE__ */ React7.createElement(
1364
- Button4,
2113
+ actionsA.map((btn, index) => /* @__PURE__ */ React11.createElement(
2114
+ Button6,
1365
2115
  {
1366
2116
  key: index,
1367
2117
  variant: index === 0 || actionsA.length < 2 ? "contained" : "text",
@@ -1377,207 +2127,61 @@ function SCDrawer({
1377
2127
  }
1378
2128
 
1379
2129
  // src/Components/FooterAction/FooterAction.tsx
1380
- import React8 from "react";
1381
- import { AppBar, Toolbar, Box as Box8, Typography as Typography8 } from "@mui/material";
2130
+ import React12 from "react";
2131
+ import { AppBar, Toolbar, Box as Box10, Typography as Typography10 } from "@mui/material";
1382
2132
  var FooterAction = ({
1383
2133
  leftContent,
1384
2134
  rightContent,
1385
2135
  label,
1386
2136
  variant
1387
2137
  }) => {
1388
- return /* @__PURE__ */ React8.createElement(
2138
+ return /* @__PURE__ */ React12.createElement(
1389
2139
  AppBar,
1390
2140
  {
1391
2141
  color: "inherit",
1392
2142
  sx: { position: variant == "float" ? "relative" : "fixed", left: 0, right: "auto", width: "100%", top: "auto", bottom: 0 }
1393
2143
  },
1394
- /* @__PURE__ */ React8.createElement(
2144
+ /* @__PURE__ */ React12.createElement(
1395
2145
  Toolbar,
1396
2146
  {
1397
2147
  id: "footer-toolbar",
1398
2148
  sx: { gap: 1.5, minHeight: "50px !important" }
1399
2149
  },
1400
2150
  leftContent,
1401
- /* @__PURE__ */ React8.createElement(Box8, { flexGrow: 1 }),
1402
- label && /* @__PURE__ */ React8.createElement(Typography8, { variant: "body2", color: "text.secondary" }, label),
2151
+ /* @__PURE__ */ React12.createElement(Box10, { flexGrow: 1 }),
2152
+ label && /* @__PURE__ */ React12.createElement(Typography10, { variant: "body2", color: "text.secondary" }, label),
1403
2153
  rightContent
1404
2154
  )
1405
2155
  );
1406
2156
  };
1407
2157
 
1408
- // src/Components/Modal/Helpers/Data.tsx
1409
- import React9 from "react";
1410
- import { Info, Warning } from "@mui/icons-material";
1411
- var modalStateConfig = {
1412
- info: {
1413
- color: "info",
1414
- defaultDescription: "Se [sincronizar\xE1n] los datos trabajados en modo offline y se [subir\xE1n] a los servidores.",
1415
- icon: /* @__PURE__ */ React9.createElement(Info, { color: "info", fontSize: "medium" })
1416
- },
1417
- delete: {
1418
- color: "delete",
1419
- defaultDescription: "[Elemento espec\xEDfico] [dejar\xE1 de existir en todos los lugares donde est\xE9 en uso]. Esta acci\xF3n es irreversible.",
1420
- icon: /* @__PURE__ */ React9.createElement(Info, { color: "error", fontSize: "medium" })
1421
- },
1422
- warning: {
1423
- color: "warning",
1424
- defaultDescription: "Se descartar\xE1 la [creaci\xF3n] y los cambios se perder\xE1n.",
1425
- icon: /* @__PURE__ */ React9.createElement(Warning, { color: "warning", fontSize: "medium" })
1426
- }
1427
- };
1428
-
1429
- // src/Components/Modal/Helpers/Utils.tsx
1430
- import * as MuiIcons2 from "@mui/icons-material";
1431
- import { FilterListOutlined } from "@mui/icons-material";
1432
- var getIconComponent2 = (iconName) => {
1433
- return iconName && MuiIcons2[iconName] ? MuiIcons2[iconName] : FilterListOutlined;
1434
- };
1435
- var getModalColor = (state) => {
1436
- var _a;
1437
- const colors = {
1438
- info: "info.100",
1439
- delete: "error.100",
1440
- warning: "warning.100"
1441
- };
1442
- return (_a = colors[state]) != null ? _a : "warning.100";
1443
- };
1444
- var getButtonColor = (state) => {
1445
- var _a;
1446
- const colorMap = {
1447
- info: "info",
1448
- delete: "error",
1449
- warning: "warning"
1450
- };
1451
- return (_a = colorMap[state]) != null ? _a : "info";
1452
- };
1453
-
1454
- // src/Components/Modal/SCModal.tsx
1455
- import React10, { useCallback, useEffect as useEffect7, useMemo, useState as useState5 } from "react";
1456
- import { Modal, Box as Box9, Typography as Typography9, IconButton as IconButton6, Button as Button5, Stack as Stack4 } from "@mui/material";
1457
- import { Close as Close2 } from "@mui/icons-material";
1458
-
1459
- // src/generales/capitalize.tsx
1460
- function capitalize(text) {
1461
- return text.charAt(0).toUpperCase() + text.slice(1);
1462
- }
1463
-
1464
- // src/Components/Modal/SCModal.tsx
1465
- var SCModal = ({
1466
- buttonModal,
1467
- state = "info",
1468
- open,
1469
- title,
1470
- description,
1471
- action
1472
- }) => {
1473
- var _a, _b, _c, _d, _e;
1474
- const [openModal, setOpenModal] = useState5(open != null ? open : false);
1475
- useEffect7(() => {
1476
- if (open !== void 0) {
1477
- setOpenModal(open);
1478
- }
1479
- }, [open]);
1480
- const Icon = useMemo(() => getIconComponent2(buttonModal == null ? void 0 : buttonModal.icon), [buttonModal == null ? void 0 : buttonModal.icon]);
1481
- const handleClose = useCallback(() => setOpenModal(false), []);
1482
- const toggleModal = (newOpen) => () => setOpenModal(newOpen);
1483
- const prevAction = useMemo(
1484
- () => action != null ? action : [{ text: "Cancelar", fn: handleClose }, { text: "Consultar", fn: () => {
1485
- } }],
1486
- [action, handleClose]
1487
- );
1488
- const { icon, defaultDescription } = modalStateConfig[state];
1489
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
1490
- Button5,
1491
- {
1492
- "data-testid": "test-buttonModal",
1493
- color: (_a = buttonModal == null ? void 0 : buttonModal.color) != null ? _a : "primary",
1494
- onClick: toggleModal(true),
1495
- variant: (_b = buttonModal == null ? void 0 : buttonModal.variant) != null ? _b : "text",
1496
- size: (_c = buttonModal == null ? void 0 : buttonModal.size) != null ? _c : "small",
1497
- startIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "left" && /* @__PURE__ */ React10.createElement(Icon, null),
1498
- endIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "right" && /* @__PURE__ */ React10.createElement(Icon, null)
1499
- },
1500
- capitalize((_d = buttonModal == null ? void 0 : buttonModal.text) != null ? _d : "filtrar")
1501
- ), /* @__PURE__ */ React10.createElement(Modal, { open: openModal, onClose: toggleModal(false), sx: { boxShadow: 8 } }, /* @__PURE__ */ React10.createElement(
1502
- Box9,
1503
- {
1504
- sx: {
1505
- position: "absolute",
1506
- top: "50%",
1507
- left: "50%",
1508
- transform: "translate(-50%, -50%)",
1509
- width: 400,
1510
- bgcolor: "background.paper",
1511
- borderRadius: 1,
1512
- boxShadow: 24
1513
- }
1514
- },
1515
- /* @__PURE__ */ React10.createElement(Stack4, { direction: "row", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React10.createElement(Stack4, { direction: "row", alignItems: "center", p: 1, gap: 1.5 }, /* @__PURE__ */ React10.createElement(Box9, { display: "flex", justifyContent: "center", alignItems: "center", borderRadius: "50%", height: 36, width: 36, bgcolor: getModalColor(state) }, icon), /* @__PURE__ */ React10.createElement(Typography9, { variant: "h6", color: "text.primary" }, title)), /* @__PURE__ */ React10.createElement(IconButton6, { onClick: toggleModal(false), "data-testid": "test-buttonClose" }, /* @__PURE__ */ React10.createElement(Close2, { color: "action" }))),
1516
- /* @__PURE__ */ React10.createElement(Stack4, { py: 1, px: 3, gap: 1.5 }, /* @__PURE__ */ React10.createElement(Typography9, { variant: "body1" }, description || defaultDescription)),
1517
- action && /* @__PURE__ */ React10.createElement(
1518
- Stack4,
1519
- {
1520
- id: "Action",
1521
- direction: "row",
1522
- gap: 1,
1523
- p: 1,
1524
- justifyContent: "end",
1525
- bgcolor: "grey.50",
1526
- sx: { borderRadius: 1 }
1527
- },
1528
- /* @__PURE__ */ React10.createElement(
1529
- Button5,
1530
- {
1531
- color: "inherit",
1532
- variant: "text",
1533
- onClick: handleClose,
1534
- size: "small"
1535
- },
1536
- capitalize("cancelar")
1537
- ),
1538
- /* @__PURE__ */ React10.createElement(
1539
- Button5,
1540
- {
1541
- "data-testid": "test-aceptar",
1542
- color: getButtonColor(state),
1543
- variant: "contained",
1544
- onClick: (_e = action[0]) == null ? void 0 : _e.fn,
1545
- disabled: false,
1546
- size: "small"
1547
- },
1548
- capitalize(action[0].text)
1549
- )
1550
- )
1551
- )));
1552
- };
1553
-
1554
2158
  // src/Components/MultiSelect/MultiSelect.tsx
1555
- import React11, { useEffect as useEffect8, useMemo as useMemo3 } from "react";
1556
- import { Button as Button6, Checkbox as Checkbox2, FormControl as FormControl3, InputAdornment as InputAdornment5, ListItemIcon as ListItemIcon3, MenuItem as MenuItem3, Popover as Popover3, Stack as Stack5, TextField as TextField4 } from "@mui/material";
2159
+ import React13, { useEffect as useEffect11, useMemo as useMemo5 } from "react";
2160
+ import { Button as Button7, Checkbox as Checkbox2, FormControl as FormControl3, InputAdornment as InputAdornment5, ListItemIcon as ListItemIcon3, MenuItem as MenuItem3, Popover as Popover3, Stack as Stack6, TextField as TextField4 } from "@mui/material";
1557
2161
  import { SearchOutlined } from "@mui/icons-material";
1558
2162
 
1559
2163
  // src/Components/MultiSelect/helpers/useHandlers.tsx
1560
- import { useCallback as useCallback2, useState as useState6 } from "react";
2164
+ import { useCallback as useCallback4, useState as useState7 } from "react";
1561
2165
  function useMultiSelectHandlers() {
1562
- const [anchorEl, setAnchorEl] = useState6(null);
1563
- const [open, setOpen] = useState6(false);
1564
- const [selectedItems, setSelectedItems] = useState6([]);
1565
- const [filterValue, setFilterValue] = useState6("");
1566
- const handleOpen = useCallback2((e) => {
2166
+ const [anchorEl, setAnchorEl] = useState7(null);
2167
+ const [open, setOpen] = useState7(false);
2168
+ const [selectedItems, setSelectedItems] = useState7([]);
2169
+ const [filterValue, setFilterValue] = useState7("");
2170
+ const handleOpen = useCallback4((e) => {
1567
2171
  setAnchorEl(e.currentTarget);
1568
2172
  setOpen(true);
1569
2173
  }, []);
1570
- const handleClose = useCallback2(() => {
2174
+ const handleClose = useCallback4(() => {
1571
2175
  setAnchorEl(null);
1572
2176
  setOpen(false);
1573
2177
  }, []);
1574
- const handleFilterChange = useCallback2(
2178
+ const handleFilterChange = useCallback4(
1575
2179
  (e) => {
1576
2180
  setFilterValue(e.target.value);
1577
2181
  },
1578
2182
  []
1579
2183
  );
1580
- const handleCheckboxToggle = useCallback2((item) => {
2184
+ const handleCheckboxToggle = useCallback4((item) => {
1581
2185
  setSelectedItems(
1582
2186
  (prev) => prev.includes(item) ? prev.filter((i) => i !== item) : [...prev, item]
1583
2187
  );
@@ -1604,15 +2208,15 @@ function getIconMultiSelect(name) {
1604
2208
  }
1605
2209
 
1606
2210
  // src/Components/MultiSelect/helpers/useFilteredItems.tsx
1607
- import { useMemo as useMemo2 } from "react";
2211
+ import { useMemo as useMemo4 } from "react";
1608
2212
  function useFilteredItems(items, filterValue, getItemLabel, selectedItems) {
1609
- const filteredItems = useMemo2(
2213
+ const filteredItems = useMemo4(
1610
2214
  () => items.filter(
1611
2215
  (item) => getItemLabel(item).toLowerCase().includes(filterValue.toLowerCase())
1612
2216
  ),
1613
2217
  [items, filterValue, getItemLabel]
1614
2218
  );
1615
- const sortedItems = useMemo2(() => {
2219
+ const sortedItems = useMemo4(() => {
1616
2220
  return [
1617
2221
  ...filteredItems.filter((item) => selectedItems.includes(item)),
1618
2222
  ...filteredItems.filter((item) => !selectedItems.includes(item))
@@ -1646,16 +2250,16 @@ function MultiSelect({
1646
2250
  handleCheckboxToggle,
1647
2251
  setOpen
1648
2252
  } = useMultiSelectHandlers();
1649
- useEffect8(() => {
2253
+ useEffect11(() => {
1650
2254
  if (open !== void 0) {
1651
2255
  setOpen(open);
1652
2256
  }
1653
2257
  }, [open, setOpen]);
1654
- useEffect8(() => {
2258
+ useEffect11(() => {
1655
2259
  setSelectedItems([]);
1656
2260
  }, [items, setSelectedItems]);
1657
2261
  const { filteredItems, sortedItems } = useFilteredItems(items, filterValue, getItemLabel, selectedItems);
1658
- const Icon = useMemo3(() => {
2262
+ const Icon = useMemo5(() => {
1659
2263
  var _a2;
1660
2264
  return getIconMultiSelect((_a2 = button == null ? void 0 : button.icon) != null ? _a2 : "FilterListOutlined");
1661
2265
  }, [button == null ? void 0 : button.icon]);
@@ -1669,19 +2273,19 @@ function MultiSelect({
1669
2273
  { text: "Aplicar", fn: () => {
1670
2274
  } }
1671
2275
  ];
1672
- return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
1673
- Button6,
2276
+ return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
2277
+ Button7,
1674
2278
  {
1675
2279
  "test-id": "multiselect-button",
1676
2280
  color: (_a = button == null ? void 0 : button.color) != null ? _a : "primary",
1677
2281
  onClick: handleOpen,
1678
2282
  variant: (_b = button == null ? void 0 : button.variant) != null ? _b : "text",
1679
2283
  size: "small",
1680
- startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */ React11.createElement(Icon, null) : null,
1681
- endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */ React11.createElement(Icon, null) : null
2284
+ startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */ React13.createElement(Icon, null) : null,
2285
+ endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */ React13.createElement(Icon, null) : null
1682
2286
  },
1683
2287
  capitalize(textButton != null ? textButton : "MultiSelect")
1684
- ), /* @__PURE__ */ React11.createElement(
2288
+ ), /* @__PURE__ */ React13.createElement(
1685
2289
  Popover3,
1686
2290
  {
1687
2291
  elevation: 8,
@@ -1690,7 +2294,7 @@ function MultiSelect({
1690
2294
  open: openMultiselect,
1691
2295
  onClose: () => setOpen(false)
1692
2296
  },
1693
- /* @__PURE__ */ React11.createElement(Stack5, { minWidth: "320px", "data-testid": "multiselect-container", bgcolor: "white", boxShadow: 3, borderRadius: 1 }, /* @__PURE__ */ React11.createElement(Stack5, { py: 1, px: 2 }, topPanel != null ? topPanel : /* @__PURE__ */ React11.createElement(FormControl3, { fullWidth: true, size: "small" }, /* @__PURE__ */ React11.createElement(
2297
+ /* @__PURE__ */ React13.createElement(Stack6, { minWidth: "320px", "data-testid": "multiselect-container", bgcolor: "white", boxShadow: 3, borderRadius: 1 }, /* @__PURE__ */ React13.createElement(Stack6, { py: 1, px: 2 }, topPanel != null ? topPanel : /* @__PURE__ */ React13.createElement(FormControl3, { fullWidth: true, size: "small" }, /* @__PURE__ */ React13.createElement(
1694
2298
  TextField4,
1695
2299
  {
1696
2300
  "data-testid": "multiselect-input",
@@ -1702,18 +2306,18 @@ function MultiSelect({
1702
2306
  onChange: handleFilterChange,
1703
2307
  slotProps: {
1704
2308
  input: {
1705
- endAdornment: /* @__PURE__ */ React11.createElement(InputAdornment5, { position: "end" }, /* @__PURE__ */ React11.createElement(SearchOutlined, { fontSize: "small" }))
2309
+ endAdornment: /* @__PURE__ */ React13.createElement(InputAdornment5, { position: "end" }, /* @__PURE__ */ React13.createElement(SearchOutlined, { fontSize: "small" }))
1706
2310
  }
1707
2311
  }
1708
2312
  }
1709
- ))), /* @__PURE__ */ React11.createElement(Stack5, { maxHeight: "300px", overflow: "auto" }, selectAll && /* @__PURE__ */ React11.createElement(MenuItem3, { dense, onClick: handleSelectAll }, /* @__PURE__ */ React11.createElement(ListItemIcon3, null, /* @__PURE__ */ React11.createElement(Checkbox2, { checked: allSelected, color: "primary" })), "Todos los items"), sortedItems.length > 0 ? sortedItems.map((item) => /* @__PURE__ */ React11.createElement(
2313
+ ))), /* @__PURE__ */ React13.createElement(Stack6, { maxHeight: "300px", overflow: "auto" }, selectAll && /* @__PURE__ */ React13.createElement(MenuItem3, { dense, onClick: handleSelectAll }, /* @__PURE__ */ React13.createElement(ListItemIcon3, null, /* @__PURE__ */ React13.createElement(Checkbox2, { checked: allSelected, color: "primary" })), "Todos los items"), sortedItems.length > 0 ? sortedItems.map((item) => /* @__PURE__ */ React13.createElement(
1710
2314
  MenuItem3,
1711
2315
  {
1712
2316
  key: getItemLabel(item),
1713
2317
  dense,
1714
2318
  onClick: () => handleCheckboxToggle(item)
1715
2319
  },
1716
- /* @__PURE__ */ React11.createElement(ListItemIcon3, null, /* @__PURE__ */ React11.createElement(
2320
+ /* @__PURE__ */ React13.createElement(ListItemIcon3, null, /* @__PURE__ */ React13.createElement(
1717
2321
  Checkbox2,
1718
2322
  {
1719
2323
  checked: selectedItems.includes(item),
@@ -1721,10 +2325,10 @@ function MultiSelect({
1721
2325
  }
1722
2326
  )),
1723
2327
  getItemLabel(item)
1724
- )) : /* @__PURE__ */ React11.createElement(MenuItem3, { disabled: true }, "No se encontraron resultados")), /* @__PURE__ */ React11.createElement(Stack5, { direction: "row", gap: 1, p: 1, justifyContent: "space-between", bgcolor: "grey.50" }, resolvedActions.map((button2, index) => {
2328
+ )) : /* @__PURE__ */ React13.createElement(MenuItem3, { disabled: true }, "No se encontraron resultados")), /* @__PURE__ */ React13.createElement(Stack6, { direction: "row", gap: 1, p: 1, justifyContent: "space-between", bgcolor: "grey.50" }, resolvedActions.map((button2, index) => {
1725
2329
  var _a2;
1726
- return /* @__PURE__ */ React11.createElement(
1727
- Button6,
2330
+ return /* @__PURE__ */ React13.createElement(
2331
+ Button7,
1728
2332
  {
1729
2333
  key: index,
1730
2334
  variant: index === 0 || resolvedActions.length < 2 ? "text" : "contained",
@@ -1739,8 +2343,8 @@ function MultiSelect({
1739
2343
  }
1740
2344
 
1741
2345
  // src/Components/PageHeader/PageHeader.tsx
1742
- import React12 from "react";
1743
- import { Stack as Stack6, Typography as Typography10 } from "@mui/material";
2346
+ import React14 from "react";
2347
+ import { Stack as Stack7, Typography as Typography11 } from "@mui/material";
1744
2348
  var PageHeader = ({
1745
2349
  title,
1746
2350
  subtitle,
@@ -1749,8 +2353,8 @@ var PageHeader = ({
1749
2353
  fixed,
1750
2354
  shadow = true
1751
2355
  }) => {
1752
- return /* @__PURE__ */ React12.createElement(
1753
- Stack6,
2356
+ return /* @__PURE__ */ React14.createElement(
2357
+ Stack7,
1754
2358
  {
1755
2359
  "data-testid": "main-container",
1756
2360
  justifyContent: "center",
@@ -1761,13 +2365,13 @@ var PageHeader = ({
1761
2365
  zIndex: 10,
1762
2366
  sx: { boxShadow: shadow ? (theme) => theme.shadows[1] : "none" }
1763
2367
  },
1764
- /* @__PURE__ */ React12.createElement(Stack6, { "data-testid": "page-header-content", height: 40, px: 3, pl: buttonBack ? 1 : 3, direction: "row", alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React12.createElement(Stack6, { id: "left-section", direction: "row", alignItems: "center", gap: 1 }, buttonBack, /* @__PURE__ */ React12.createElement(Stack6, { id: "text-section", gap: 0.5 }, /* @__PURE__ */ React12.createElement(Typography10, { "data-testid": "page-header-title", variant: "h6", color: "text.primary" }, title), subtitle && /* @__PURE__ */ React12.createElement(Typography10, { "data-testid": "page-header-subtitle", variant: "caption", color: "text.primary" }, subtitle))), actions && /* @__PURE__ */ React12.createElement(Stack6, { id: "right-actions", direction: "row", alignItems: "center", gap: 1 }, actions))
2368
+ /* @__PURE__ */ React14.createElement(Stack7, { "data-testid": "page-header-content", height: 40, px: 3, pl: buttonBack ? 1 : 3, direction: "row", alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React14.createElement(Stack7, { id: "left-section", direction: "row", alignItems: "center", gap: 1 }, buttonBack, /* @__PURE__ */ React14.createElement(Stack7, { id: "text-section", gap: 0.5 }, /* @__PURE__ */ React14.createElement(Typography11, { "data-testid": "page-header-title", variant: "h6", color: "text.primary" }, title), subtitle && /* @__PURE__ */ React14.createElement(Typography11, { "data-testid": "page-header-subtitle", variant: "caption", color: "text.primary" }, subtitle))), actions && /* @__PURE__ */ React14.createElement(Stack7, { id: "right-actions", direction: "row", alignItems: "center", gap: 1 }, actions))
1765
2369
  );
1766
2370
  };
1767
2371
 
1768
2372
  // src/Components/SCCalendarSwipeable.tsx
1769
- import React13, { useState as useState7 } from "react";
1770
- import { Typography as Typography11, IconButton as IconButton7, Box as Box10 } from "@mui/material";
2373
+ import React15, { useState as useState8 } from "react";
2374
+ import { Typography as Typography12, IconButton as IconButton8, Box as Box11 } from "@mui/material";
1771
2375
  import Grid5 from "@mui/material/Grid2";
1772
2376
  import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
1773
2377
  import { LocalizationProvider as LocalizationProvider2 } from "@mui/x-date-pickers/LocalizationProvider";
@@ -1785,14 +2389,14 @@ var SCCalendarSwipeable = ({
1785
2389
  state
1786
2390
  }) => {
1787
2391
  let convertFecha;
1788
- const [fecha, setFecha] = useState7(/* @__PURE__ */ new Date());
1789
- const [fechaSeleccionada, setFechaSeleccionada] = useState7();
1790
- const [stateVal, setstateVal] = React13.useState(/* @__PURE__ */ new Date());
1791
- const [openCalendar, setOpenCalendar] = React13.useState(false);
2392
+ const [fecha, setFecha] = useState8(/* @__PURE__ */ new Date());
2393
+ const [fechaSeleccionada, setFechaSeleccionada] = useState8();
2394
+ const [stateVal, setstateVal] = React15.useState(/* @__PURE__ */ new Date());
2395
+ const [openCalendar, setOpenCalendar] = React15.useState(false);
1792
2396
  const hoy = /* @__PURE__ */ new Date();
1793
2397
  const inicioSemana = startOfWeek(fecha, { weekStartsOn: 0 });
1794
2398
  const diasSemana = Array.from({ length: 7 }, (_, i) => addDays(inicioSemana, i));
1795
- React13.useEffect(() => {
2399
+ React15.useEffect(() => {
1796
2400
  if (fecha != null) {
1797
2401
  handleConvertFecha(fecha);
1798
2402
  }
@@ -1811,12 +2415,8 @@ var SCCalendarSwipeable = ({
1811
2415
  setOpenCalendar(newOpen);
1812
2416
  };
1813
2417
  const locale = __spreadValues({}, es);
1814
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(LocalizationProvider2, { dateAdapter: AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React13.createElement(Box10, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React13.createElement(Box10, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ React13.createElement(Grid5, { container: true, gap: 0.5, sx: {
1815
- justifyContent: "space-between",
1816
- padding: "12px 0px",
1817
- background: "transparent"
1818
- } }, diasSemana.map((dia) => /* @__PURE__ */ React13.createElement(Grid5, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React13.createElement(Box10, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React13.createElement(Typography11, { sx: { fontSize: "12px !important", color: "#10184099" } }, format(dia, "EEEE", { locale: es }).charAt(0).toUpperCase())), /* @__PURE__ */ React13.createElement(
1819
- Box10,
2418
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(LocalizationProvider2, { dateAdapter: AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React15.createElement(Box11, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React15.createElement(Box11, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ React15.createElement(Grid5, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React15.createElement(Grid5, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React15.createElement(Box11, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React15.createElement(Typography12, { sx: { fontSize: "12px !important", color: "#10184099" } }, format(dia, "EEEE", { locale: es }).charAt(0).toUpperCase())), /* @__PURE__ */ React15.createElement(
2419
+ Box11,
1820
2420
  {
1821
2421
  onClick: () => setFecha(dia),
1822
2422
  sx: {
@@ -1831,8 +2431,8 @@ var SCCalendarSwipeable = ({
1831
2431
  //height: '36px',
1832
2432
  }
1833
2433
  },
1834
- /* @__PURE__ */ React13.createElement(Typography11, { sx: { fontSize: "12px !important", color: isSameDay(dia, fecha) ? "white" : "#101840DE" } }, format(dia, "d"))
1835
- )))), /* @__PURE__ */ React13.createElement(Grid5, { container: true, justifyContent: "center" }, /* @__PURE__ */ React13.createElement(IconButton7, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ React13.createElement(KeyboardDoubleArrowDownIcon, null))))) : /* @__PURE__ */ React13.createElement(Box10, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React13.createElement(
2434
+ /* @__PURE__ */ React15.createElement(Typography12, { sx: { fontSize: "12px !important", color: isSameDay(dia, fecha) ? "white" : "#101840DE" } }, format(dia, "d"))
2435
+ )))), /* @__PURE__ */ React15.createElement(Grid5, { container: true, justifyContent: "center" }, /* @__PURE__ */ React15.createElement(IconButton8, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ React15.createElement(KeyboardDoubleArrowDownIcon, null))))) : /* @__PURE__ */ React15.createElement(Box11, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React15.createElement(
1836
2436
  StaticDatePicker,
1837
2437
  {
1838
2438
  orientation: "landscape",
@@ -1842,17 +2442,17 @@ var SCCalendarSwipeable = ({
1842
2442
  sx: { fontSize: "12px !important", height: "300px !important", background: background ? background : "white", "& .MuiDayCalendar-header": { justifyContent: "space-between" }, "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" }, "& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" }, "& .MuiPickersDay-root": { fontSize: "12px !important" }, "& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" } },
1843
2443
  onChange: (newValue) => setFecha(newValue)
1844
2444
  }
1845
- ), /* @__PURE__ */ React13.createElement(Grid5, { container: true, justifyContent: "center" }, /* @__PURE__ */ React13.createElement(IconButton7, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React13.createElement(KeyboardDoubleArrowUpIcon, null))))));
2445
+ ), /* @__PURE__ */ React15.createElement(Grid5, { container: true, justifyContent: "center" }, /* @__PURE__ */ React15.createElement(IconButton8, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React15.createElement(KeyboardDoubleArrowUpIcon, null))))));
1846
2446
  };
1847
2447
 
1848
2448
  // src/Components/SCDataGrid.tsx
1849
- import React14, { useEffect as useEffect10, useState as useState8 } from "react";
2449
+ import React16, { useEffect as useEffect13, useState as useState9 } from "react";
1850
2450
  import { DataGridPro, useGridApiRef } from "@mui/x-data-grid-pro";
1851
2451
  import { LicenseInfo as LicenseInfo2 } from "@mui/x-license-pro";
1852
2452
  import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
1853
2453
  import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
1854
2454
  import { useTheme } from "@mui/material/styles";
1855
- var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }) => {
2455
+ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }) {
1856
2456
  LicenseInfo2.setLicenseKey(
1857
2457
  "77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
1858
2458
  );
@@ -1863,45 +2463,80 @@ var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelec
1863
2463
  return Math.floor(Math.random() * 1e6);
1864
2464
  }
1865
2465
  const getTreeDataPaths = (row) => {
2466
+ var _a, _b, _c;
2467
+ const group1Value = groupColumns && ((_a = groupColumns(row)) == null ? void 0 : _a.valueGroup1);
2468
+ const group2Value = groupColumns && ((_b = groupColumns(row)) == null ? void 0 : _b.valueGroup2);
2469
+ const fieldValue = groupColumns && ((_c = groupColumns(row)) == null ? void 0 : _c.fieldFirstColumn);
1866
2470
  return [
1867
- row[groupColumns[0].split("[")[1].split("]")[0].trim()],
1868
- ...groupColumns.length > 2 ? [row[groupColumns[1].split("[")[1].split("]")[0].trim()]] : [],
1869
- `${row[groupColumns[groupColumns.length - 1].split("[")[1].split("]")[0].trim()].toString()}/${generateRandomId()}`
2471
+ String(group1Value || ""),
2472
+ ...group2Value ? [String(group2Value)] : [],
2473
+ `${String(fieldValue || "")}/${generateRandomId()}`
1870
2474
  ];
1871
2475
  };
1872
2476
  const groupingColDefs = {
1873
2477
  field: "grouping",
1874
- headerName: groupColumns != void 0 ? groupColumns[groupColumns.length - 1].split("[").length == 2 ? groupColumns[groupColumns.length - 1].split("[")[0].trim() : "Agrupador" : "",
2478
+ headerName: groupColumns ? groupColumns(data[0]).headerNameFirstColumn : "Agrupador",
1875
2479
  renderCell: (params) => {
1876
- var _a;
2480
+ var _a, _b;
1877
2481
  let label = params.value.toString().includes("/") ? params.value.split("/")[0].toString() : params.value.toString();
1878
- const maxDepth = groupColumns ? groupColumns.length - 2 : 0;
1879
- if (groupColumns != void 0) {
2482
+ let maxDepth = 0;
2483
+ if (groupColumns && data.length > 0) {
2484
+ const sampleItem = groupColumns(data[0]);
2485
+ if (sampleItem.valueGroup1) maxDepth++;
2486
+ if (sampleItem.valueGroup2) maxDepth++;
2487
+ maxDepth = Math.max(0, maxDepth - 1);
2488
+ }
2489
+ if (groupColumns) {
1880
2490
  if (params.rowNode.depth === 0) {
1881
- const textBegin = groupColumns[0] ? groupColumns[0].split("[")[0].trim() : "";
1882
- const textEnd = groupColumns[0] ? groupColumns[0].split("]")[1].trim() : "";
1883
- const labelGrouping1 = `${textBegin} ${label} ${textEnd}`;
1884
- const fieldGrouping1 = groupColumns[0].split("[")[1].split("]")[0].trim();
1885
- const fieldGrouping2 = groupColumns[1].split("[")[1].split("]")[0].trim();
1886
- const subgroup1 = arrayRows.filter((r) => r[fieldGrouping1].toString() === label).map((r) => r[fieldGrouping2]);
2491
+ let customLabel = label;
2492
+ if (groupColumns) {
2493
+ const originalItem = data.find(
2494
+ (item) => {
2495
+ var _a2;
2496
+ return String((_a2 = groupColumns(item)) == null ? void 0 : _a2.valueGroup1) === label;
2497
+ }
2498
+ );
2499
+ if (originalItem) {
2500
+ const itemValue = groupColumns(originalItem);
2501
+ customLabel = itemValue.textGroup1 || label;
2502
+ }
2503
+ }
2504
+ const subgroup1 = arrayRows.filter((r) => {
2505
+ var _a2;
2506
+ return groupColumns && String((_a2 = groupColumns(r)) == null ? void 0 : _a2.valueGroup1) === label;
2507
+ }).map((r) => {
2508
+ var _a2;
2509
+ return groupColumns && String((_a2 = groupColumns(r)) == null ? void 0 : _a2.valueGroup2);
2510
+ });
1887
2511
  const groupedDataLength1 = subgroup1.filter((valor, indiceActual, arreglo) => arreglo.indexOf(valor) === indiceActual);
1888
- label = `${labelGrouping1} (${groupedDataLength1.length})`;
1889
- } else if (groupColumns.length > 2 && params.rowNode.depth === 1) {
1890
- const labelGrouping1 = (_a = params.api.getRowNode(params.rowNode.parent)) == null ? void 0 : _a.groupingKey;
1891
- const textBegin = groupColumns[1] ? groupColumns[1].split("[")[0] : "";
1892
- const textEnd = groupColumns[1] ? groupColumns[1].split("]")[1].trim() : "";
1893
- const labelGrouping2 = `${textBegin} ${label} ${textEnd}`;
1894
- const fieldGrouping1 = groupColumns[0].split("[")[1].split("]")[0].trim();
1895
- const fieldGrouping2 = groupColumns[1].split("[")[1].split("]")[0].trim();
2512
+ label = `${customLabel} (${groupedDataLength1.length})`;
2513
+ } else if (((_a = groupColumns(data[0])) == null ? void 0 : _a.valueGroup2) && params.rowNode.depth === 1) {
2514
+ const labelGrouping1 = (_b = params.api.getRowNode(params.rowNode.parent)) == null ? void 0 : _b.groupingKey.toString();
2515
+ let customLabel = label;
2516
+ if (groupColumns) {
2517
+ const originalItem = data.find(
2518
+ (item) => {
2519
+ var _a2;
2520
+ return String((_a2 = groupColumns(item)) == null ? void 0 : _a2.valueGroup2) === label;
2521
+ }
2522
+ );
2523
+ if (originalItem) {
2524
+ const itemValue = groupColumns(originalItem);
2525
+ customLabel = itemValue.textGroup2 || label;
2526
+ }
2527
+ }
1896
2528
  const groupedDataLength2 = arrayRows.filter(
1897
- (r) => r[fieldGrouping1] === labelGrouping1 && r[fieldGrouping2] === label
2529
+ (r) => {
2530
+ var _a2, _b2;
2531
+ return groupColumns && String((_a2 = groupColumns(r)) == null ? void 0 : _a2.valueGroup1) === labelGrouping1 && groupColumns && String((_b2 = groupColumns(r)) == null ? void 0 : _b2.valueGroup2) === label;
2532
+ }
1898
2533
  ).length;
1899
- label = `${labelGrouping2} (${groupedDataLength2})`;
2534
+ label = `${customLabel} (${groupedDataLength2})`;
1900
2535
  } else {
1901
2536
  label = label;
1902
2537
  }
1903
2538
  }
1904
- return /* @__PURE__ */ React14.createElement(
2539
+ return /* @__PURE__ */ React16.createElement(
1905
2540
  "div",
1906
2541
  {
1907
2542
  style: {
@@ -1918,7 +2553,7 @@ var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelec
1918
2553
  fontWeight: params.rowNode.type == "group" ? "400" : "300"
1919
2554
  }
1920
2555
  },
1921
- params.rowNode.type === "group" && /* @__PURE__ */ React14.createElement(
2556
+ params.rowNode.type === "group" && /* @__PURE__ */ React16.createElement(
1922
2557
  "span",
1923
2558
  {
1924
2559
  style: {
@@ -1931,25 +2566,32 @@ var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelec
1931
2566
  params.api.setRowChildrenExpansion(params.id, !params.rowNode.childrenExpanded);
1932
2567
  }
1933
2568
  },
1934
- params.rowNode.childrenExpanded ? /* @__PURE__ */ React14.createElement(KeyboardArrowUpIcon, { fontSize: "small", color: "action" }) : /* @__PURE__ */ React14.createElement(KeyboardArrowDownIcon, { fontSize: "small", color: "action" })
2569
+ params.rowNode.childrenExpanded ? /* @__PURE__ */ React16.createElement(KeyboardArrowUpIcon, { fontSize: "small", color: "action" }) : /* @__PURE__ */ React16.createElement(KeyboardArrowDownIcon, { fontSize: "small", color: "action" })
1935
2570
  ),
1936
2571
  label
1937
2572
  );
1938
2573
  },
1939
2574
  colSpan: (params) => {
2575
+ var _a, _b;
1940
2576
  const value = String(params);
1941
- const fieldGrouping1 = groupColumns[0].split("[")[1].split("]")[0].trim();
1942
- const fieldGrouping2 = groupColumns.length > 2 ? groupColumns[1].split("[")[1].split("]")[0].trim() : void 0;
2577
+ const fieldGrouping1 = groupColumns ? (_a = groupColumns(data[0])) == null ? void 0 : _a.valueGroup1 : void 0;
2578
+ const fieldGrouping2 = groupColumns ? (_b = groupColumns(data[0])) == null ? void 0 : _b.valueGroup2 : void 0;
1943
2579
  let agrupado1 = false;
1944
2580
  let agrupado2 = false;
1945
2581
  if (fieldGrouping1 != void 0) {
1946
2582
  agrupado1 = arrayRows.some(
1947
- (row) => String(row[fieldGrouping1]) === value
2583
+ (row) => {
2584
+ var _a2;
2585
+ return groupColumns && String((_a2 = groupColumns(row)) == null ? void 0 : _a2.valueGroup1) === value;
2586
+ }
1948
2587
  );
1949
2588
  }
1950
2589
  if (fieldGrouping2 != void 0) {
1951
2590
  agrupado2 = arrayRows.some(
1952
- (row) => String(row[fieldGrouping2]) === value
2591
+ (row) => {
2592
+ var _a2;
2593
+ return groupColumns && String((_a2 = groupColumns(row)) == null ? void 0 : _a2.valueGroup2) === value;
2594
+ }
1953
2595
  );
1954
2596
  }
1955
2597
  if (agrupado1 || agrupado2) {
@@ -1966,11 +2608,11 @@ var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelec
1966
2608
  let styleRowHeight = density == "compact" ? 32 : density == "standard" ? 28 : density == "comfortable" ? 36 : 32;
1967
2609
  let rows = rowsTable ? rowsTable : validationTreeData != false ? parseInt(data.length.toString()) : data.length < 10 ? parseInt(data.length.toString()) : 10;
1968
2610
  let validationGroupingColDef = groupingColDefs || {};
1969
- const [groupDataLenght, setGroupDataLengh] = useState8(0);
1970
- const [pageSize, setPageSize] = useState8(rows);
1971
- const [arrayRows, setArrayRows] = useState8([]);
1972
- const [selectionModel, setSelectionModel] = useState8([]);
1973
- useEffect10(() => {
2611
+ const [groupDataLenght, setGroupDataLengh] = useState9(0);
2612
+ const [pageSize, setPageSize] = useState9(rows);
2613
+ const [arrayRows, setArrayRows] = useState9([]);
2614
+ const [selectionModel, setSelectionModel] = useState9([]);
2615
+ useEffect13(() => {
1974
2616
  if ((data == null ? void 0 : data.length) > 0) {
1975
2617
  dataConvertRows(data, void 0);
1976
2618
  }
@@ -2026,7 +2668,7 @@ var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelec
2026
2668
  setSelectionModel([...newSelection]);
2027
2669
  }
2028
2670
  };
2029
- return /* @__PURE__ */ React14.createElement(React14.Fragment, null, data && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ React14.createElement(
2671
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, data && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ React16.createElement(
2030
2672
  DataGridPro,
2031
2673
  {
2032
2674
  apiRef,
@@ -2060,7 +2702,6 @@ var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelec
2060
2702
  },
2061
2703
  sx: {
2062
2704
  maxHeight: maxHeight ? `${maxHeight}px` : "none",
2063
- //overflow: 'auto',
2064
2705
  "& .MuiDataGrid-filler": {
2065
2706
  display: "none !important"
2066
2707
  },
@@ -2090,42 +2731,54 @@ var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelec
2090
2731
  }
2091
2732
  }
2092
2733
  ))));
2093
- };
2094
- var SCDataGrid = React14.memo(SCDataGridInitial, (prevProps, nextProps) => {
2095
- const isEqual = prevProps.data === nextProps.data && prevProps.columns === nextProps.columns && prevProps.groupColumns === nextProps.groupColumns && prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight && prevProps.density === nextProps.density;
2734
+ }
2735
+ var SCDataGrid = React16.memo(SCDataGridInitial, (prevProps, nextProps) => {
2736
+ const isEqual = prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight && prevProps.density === nextProps.density;
2096
2737
  return isEqual;
2097
2738
  });
2098
2739
 
2099
2740
  // src/Components/EmptyState/EmptyState.tsx
2100
- import React15 from "react";
2101
- import { Button as Button8, Stack as Stack7, Typography as Typography12 } from "@mui/material";
2741
+ import React21 from "react";
2742
+ import { Button as Button9, Stack as Stack8, Typography as Typography13 } from "@mui/material";
2102
2743
 
2103
- // src/assets/ImgEmptyState/create.svg
2104
- var create_default = "./create-KZGO2OZA.svg";
2744
+ // src/assets/ImgEmptyState/create.tsx
2745
+ import React17 from "react";
2746
+ var Create = () => {
2747
+ return /* @__PURE__ */ React17.createElement("svg", { width: "45", height: "41", viewBox: "0 0 45 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React17.createElement("g", { "clip-path": "url(#clip0_1283_39624)" }, /* @__PURE__ */ React17.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M44.4956 13.1869C44.4386 13.8714 43.8367 14.3801 43.1514 14.3231L39.9978 14.0608C39.3124 14.0038 38.8032 13.4027 38.8602 12.7182C38.9173 12.0336 39.5191 11.525 40.2044 11.582L43.3581 11.8443C44.0434 11.9013 44.5527 12.5024 44.4956 13.1869Z", fill: "#CED1D4" }), /* @__PURE__ */ React17.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M41.0393 1.01388C41.4429 1.57002 41.3187 2.34766 40.7619 2.75078L38.099 4.6787C37.5423 5.08182 36.7637 4.95777 36.3601 4.40163C35.9565 3.84548 36.0807 3.06785 36.6375 2.66473L39.3004 0.736804C39.8572 0.333685 40.6357 0.457736 41.0393 1.01388Z", fill: "#CED1D4" }), /* @__PURE__ */ React17.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M36.6656 21.2361C36.1755 21.7179 36.1692 22.5054 36.6515 22.9949L38.9584 25.3363C39.4408 25.8258 40.2291 25.8321 40.7193 25.3503C41.2094 24.8685 41.2157 24.0811 40.7333 23.5915L38.4264 21.2502C37.9441 20.7606 37.1557 20.7543 36.6656 21.2361Z", fill: "#CED1D4" }), /* @__PURE__ */ React17.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.504365 13.1869C0.561439 13.8714 1.16326 14.3801 1.84856 14.323L5.00224 14.0607C5.68755 14.0037 6.19683 13.4026 6.13976 12.7181C6.08268 12.0336 5.48087 11.5249 4.79556 11.5819L1.64188 11.8442C0.956574 11.9012 0.447291 12.5023 0.504365 13.1869Z", fill: "#CED1D4" }), /* @__PURE__ */ React17.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.95913 1.01431C3.55554 1.57046 3.67974 2.34809 4.23653 2.75121L6.8994 4.67914C7.45619 5.08225 8.23473 4.9582 8.63832 4.40206C9.04191 3.84592 8.91771 3.06828 8.36092 2.66516L5.69805 0.737237C5.14126 0.334118 4.36272 0.458169 3.95913 1.01431Z", fill: "#CED1D4" }), /* @__PURE__ */ React17.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.33389 21.236C8.82403 21.7178 8.83033 22.5053 8.34796 22.9949L6.04107 25.3362C5.5587 25.8257 4.77034 25.832 4.28021 25.3502C3.79008 24.8684 3.78378 24.081 4.26614 23.5914L6.57304 21.2501C7.0554 20.7605 7.84376 20.7542 8.33389 21.236Z", fill: "#CED1D4" }), /* @__PURE__ */ React17.createElement("path", { d: "M19.1448 37.3573H25.5804L25.1621 38.889C25.0636 39.2498 24.7356 39.5 24.3613 39.5H20.3638C19.9895 39.5 19.6615 39.2498 19.563 38.889L19.1448 37.3573Z", fill: "#CED1D4" }), /* @__PURE__ */ React17.createElement("path", { d: "M17.6534 35.3665C17.5381 34.8487 17.9326 34.3575 18.4637 34.3575H26.3983C26.9294 34.3575 27.3239 34.8487 27.2087 35.3665L26.9829 36.3814C26.8563 36.9504 26.351 37.3553 25.7674 37.3553H19.0946C18.511 37.3553 18.0057 36.9504 17.8791 36.3814L17.6534 35.3665Z", fill: "#CED1D4" }), /* @__PURE__ */ React17.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.85423 13.9906C8.85423 6.60807 14.935 0.652473 22.3998 0.652473C29.8646 0.652473 35.9455 6.60807 35.9455 13.9906C35.9455 17.6153 34.4759 20.9015 32.0983 23.3022C31.9627 23.4392 31.8257 23.5745 31.6935 23.7052L31.6917 23.707C30.7961 24.5922 30.1385 25.2699 29.8494 26.1116C29.7242 26.4761 29.6012 27.1915 29.4988 28.0885C29.4002 28.9527 29.3306 29.8872 29.2854 30.6281C29.2099 31.864 28.1896 32.8547 26.9266 32.8547H17.8731C16.6101 32.8547 15.5898 31.864 15.5143 30.6281C15.469 29.8872 15.3995 28.9527 15.3009 28.0885C15.1985 27.1915 15.0755 26.4761 14.9503 26.1116C14.6612 25.2699 14.0036 24.5922 13.108 23.707L13.106 23.7051C12.9739 23.5744 12.837 23.4391 12.7014 23.3022C10.3238 20.9015 8.85423 17.6153 8.85423 13.9906ZM22.3998 2.85676C16.1214 2.85676 11.0611 7.85765 11.0611 13.9906C11.0611 17.0068 12.2813 19.7437 14.2703 21.752C14.3969 21.8798 14.526 22.0075 14.6602 22.1401C14.6831 22.1627 14.7062 22.1855 14.7294 22.2085C15.5402 23.0091 16.5655 24.0215 17.0377 25.3961C17.2505 26.0156 17.3925 26.9534 17.4936 27.8388C17.5983 28.757 17.6707 29.7342 17.7171 30.4939C17.723 30.59 17.8001 30.6504 17.8731 30.6504H26.9266C26.9996 30.6504 27.0767 30.59 27.0826 30.4939C27.129 29.7342 27.2013 28.757 27.3061 27.8388C27.4072 26.9534 27.5492 26.0156 27.762 25.3961C28.2342 24.0215 29.2594 23.0091 30.0702 22.2085C30.0935 22.1855 30.1166 22.1627 30.1395 22.1401C30.2737 22.0075 30.4028 21.8798 30.5294 21.752C32.5184 19.7437 33.7386 17.0068 33.7386 13.9906C33.7386 7.85765 28.6783 2.85676 22.3998 2.85676Z", fill: "#B9BDC1" })), /* @__PURE__ */ React17.createElement("defs", null, /* @__PURE__ */ React17.createElement("clipPath", { id: "clip0_1283_39624" }, /* @__PURE__ */ React17.createElement("rect", { width: "44", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
2748
+ };
2105
2749
 
2106
- // src/assets/ImgEmptyState/error.svg
2107
- var error_default = "./error-RUCZUXDN.svg";
2750
+ // src/assets/ImgEmptyState/empty.tsx
2751
+ import React18 from "react";
2752
+ var Empty = () => {
2753
+ return /* @__PURE__ */ React18.createElement("svg", { width: "41", height: "41", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React18.createElement("g", { "clip-path": "url(#clip0_1283_39626)" }, /* @__PURE__ */ React18.createElement("path", { d: "M36.1351 20.9955C25.1396 25.3151 16.1875 30.5689 11.8186 30.9221L14.7134 35.4696L36.1351 20.9955Z", fill: "#CED1D4" }), /* @__PURE__ */ React18.createElement("path", { d: "M37.4531 24.9937C39.7468 28.137 42.9751 35.0522 37.4531 35.3441C34.9101 35.4058 31.3306 32.981 37.4531 24.9937Z", fill: "#CED1D4" }), /* @__PURE__ */ React18.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M25.6074 1.30001C25.1055 0.501016 24.051 0.26003 23.2522 0.761943L19.6474 3.02673C17.5114 2.68138 14.5326 2.642 12.1799 3.71891C10.8937 4.30766 9.75284 5.25155 9.09396 6.68863C8.65845 7.63849 8.46029 8.74589 8.52317 10.0159L1.2996 14.5543C0.500747 15.0562 0.260156 16.1108 0.762045 16.9098L12.7907 36.0589C13.2926 36.8579 14.3471 37.0989 15.1459 36.597L37.0985 22.8046C37.8973 22.3027 38.1379 21.2481 37.636 20.4491L25.6074 1.30001ZM2.79326 16.1347L8.88857 12.3051C8.91842 12.3953 8.95405 12.4868 8.99634 12.5777C9.70948 14.1097 11.2554 15.9861 13.7088 16.7327C16.2084 17.4934 19.3887 17.0049 23.1824 14.2981L23.3709 14.1636L22.1324 12.4273L21.9439 12.5618C18.5121 15.0104 16.0132 15.2048 14.3292 14.6924C12.5992 14.1659 11.458 12.8132 10.9295 11.6778C10.9197 11.6569 10.9072 11.6225 10.8968 11.5772C10.8595 11.4156 10.8267 11.2584 10.7981 11.1054L24.0275 2.79363L35.6048 21.2243L14.3706 34.5653L2.79326 16.1347ZM13.0675 5.65821C14.0932 5.18871 15.3429 4.98089 16.5902 4.94754L10.716 8.63821C10.7826 8.23367 10.8925 7.88269 11.0323 7.57786C11.4327 6.70447 12.1364 6.08441 13.0675 5.65821Z", fill: "#B9BDC1" }), /* @__PURE__ */ React18.createElement("path", { d: "M24.3482 14.3207C24.0493 15.6305 22.7454 16.4497 21.4358 16.1505C20.1262 15.8513 19.3069 14.547 19.6058 13.2372C19.9047 11.9274 21.2086 11.1082 22.5182 11.4074C23.8278 11.7066 24.6471 13.011 24.3482 14.3207Z", fill: "#CED1D4" })), /* @__PURE__ */ React18.createElement("defs", null, /* @__PURE__ */ React18.createElement("clipPath", { id: "clip0_1283_39626" }, /* @__PURE__ */ React18.createElement("rect", { width: "40", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
2754
+ };
2108
2755
 
2109
- // src/assets/ImgEmptyState/empty.svg
2110
- var empty_default = "./empty-3NEKE7WO.svg";
2756
+ // src/assets/ImgEmptyState/error.tsx
2757
+ import React19 from "react";
2758
+ var Error2 = () => {
2759
+ return /* @__PURE__ */ React19.createElement("svg", { width: "41", height: "41", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React19.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.8035 3.2925C17.0304 3.2925 16.358 3.82772 16.1913 4.58349L14.0944 13.8188C13.8625 14.8535 14.6474 15.8412 15.7066 15.8412H25.4175C26.4764 15.8412 27.2677 14.8538 27.0297 13.8185L24.9328 4.58323C24.7608 3.82996 24.0975 3.29514 23.3264 3.2925H17.8035ZM15.9436 13.9945L17.9555 5.13336L23.1745 5.12121L25.1863 13.9945H15.9436Z", fill: "#B9BDC1" }), /* @__PURE__ */ React19.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.5449 28.1551C10.7717 28.1551 10.0993 28.6904 9.93264 29.4462L8.54048 35.6049C8.46109 35.7863 8.54048 35.6049 8.46109 35.7863H5.42145C4.91308 35.7863 4.50096 36.1984 4.50096 36.7068C4.50096 37.2152 4.91308 37.6273 5.42145 37.6273H35.5795C36.0879 37.6273 36.5 37.2152 36.5 36.7068C36.5 36.1984 36.0879 35.7863 35.5795 35.7863H32.595C32.5443 35.6284 32.5801 35.745 32.5443 35.5928L31.1121 29.4342C30.9394 28.6844 30.2672 28.1551 29.5 28.1551H11.5449ZM10.3781 35.7863L11.6854 29.9961H29.3426L30.6891 35.7863H10.3781Z", fill: "#B9BDC1" }), /* @__PURE__ */ React19.createElement("path", { d: "M13.7368 17.4381H28.0252C28.2486 17.4381 28.4434 17.5928 28.495 17.8162L30.271 25.9114C30.334 26.2094 30.1106 26.4901 29.8012 26.4901H11.6743C11.3649 26.4901 11.1358 26.1979 11.2102 25.8943L13.2727 17.799C13.3243 17.587 13.519 17.4381 13.7368 17.4381Z", fill: "#CED1D4" }));
2760
+ };
2111
2761
 
2112
- // src/assets/ImgEmptyState/search.svg
2113
- var search_default = "./search-OKSCVF2W.svg";
2762
+ // src/assets/ImgEmptyState/search.tsx
2763
+ import React20 from "react";
2764
+ var Search2 = () => {
2765
+ return /* @__PURE__ */ React20.createElement("svg", { width: "41", height: "41", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React20.createElement("g", { "clip-path": "url(#clip0_1283_39628)" }, /* @__PURE__ */ React20.createElement("path", { d: "M29.421 4.71198C28.943 2.92749 30.0021 1.09315 31.7865 0.61487C33.5709 0.136592 35.405 1.19549 35.883 2.97998L40.3853 19.7878C40.8633 21.5723 39.8042 23.4066 38.0198 23.8849C36.2354 24.3632 34.4013 23.3043 33.9233 21.5198L29.421 4.71198Z", fill: "#CED1D4" }), /* @__PURE__ */ React20.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.607749 18.613C0.158895 16.9369 1.15336 15.2141 2.82895 14.7649C4.50454 14.3157 6.22674 15.3102 6.67559 16.9862L8.06043 22.1573C8.50928 23.8333 7.51482 25.5561 5.83923 26.0054C4.16364 26.4546 2.44144 25.46 1.99259 23.784L0.607749 18.613ZM3.41576 16.9561C2.95002 17.0809 2.67359 17.5598 2.79836 18.0257L4.18319 23.1967C4.30796 23.6626 4.78667 23.939 5.25242 23.8142C5.71816 23.6893 5.99459 23.2104 5.86982 22.7445L4.48499 17.5735C4.36022 17.1076 3.88151 16.8312 3.41576 16.9561Z", fill: "#B9BDC1" }), /* @__PURE__ */ React20.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M18.0672 23.7222C17.6115 24.3518 16.9814 24.8602 16.2239 25.1659L23.5692 38.9314C23.929 39.6056 23.6742 40.4438 23.0003 40.8037C22.3263 41.1635 21.4883 40.9087 21.1286 40.2346L14.2002 27.2506L6.15159 39.7788C5.73857 40.4217 4.88273 40.6079 4.24003 40.1948C3.59732 39.7816 3.41113 38.9255 3.82416 38.2826L12.4422 24.8681C11.8201 24.4937 11.2926 23.9601 10.9267 23.3057L6.9728 23.4848C6.43282 23.5092 5.94855 23.1546 5.80865 22.6324L4.48764 17.7008C4.34775 17.1786 4.5899 16.6293 5.06976 16.3804L11.2775 13.1606L11.2169 12.934C11.0764 12.4095 11.3213 11.8581 11.8046 11.6107L26.5904 4.04383C26.8999 3.88542 27.2644 3.87542 27.5822 4.01662C27.8999 4.15781 28.1369 4.43508 28.2269 4.77102L32.7303 21.5831C32.8203 21.9191 32.7537 22.2777 32.5491 22.5589C32.3445 22.8401 32.0238 23.0137 31.6766 23.0314L18.0672 23.7222ZM17.9643 23.1894C18.1495 22.8739 18.2903 22.5322 18.3806 22.1748C18.4139 22.0434 18.4403 21.9098 18.4596 21.7746C18.4048 22.1588 18.2927 22.5298 18.1297 22.876C18.0793 22.983 18.0241 23.0876 17.9643 23.1894ZM18.8739 21.375L30.1375 20.8032L26.3713 6.7432L13.6819 13.2372L14.6854 16.9834C16.5391 17.0063 18.2272 18.2517 18.7306 20.1311C18.8421 20.5473 18.8877 20.9656 18.8739 21.375ZM12.4612 17.5793C11.2373 18.3061 10.4581 19.6082 10.3898 21.0243L7.79324 21.142L6.95134 17.999L11.8877 15.4386L12.4612 17.5793ZM15.1332 23.1064C16.1692 22.8287 16.784 21.7635 16.5064 20.7272C16.2288 19.6909 15.164 19.0759 14.128 19.3536C13.092 19.6313 12.4772 20.6965 12.7547 21.7328C12.9527 22.4718 13.5511 22.9972 14.2553 23.1365C14.2923 23.1351 14.3294 23.1351 14.3667 23.1366C14.4569 23.1402 14.5456 23.1526 14.6318 23.1732C14.797 23.173 14.9652 23.1515 15.1332 23.1064Z", fill: "#B9BDC1" })), /* @__PURE__ */ React20.createElement("defs", null, /* @__PURE__ */ React20.createElement("clipPath", { id: "clip0_1283_39628" }, /* @__PURE__ */ React20.createElement("rect", { width: "40", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
2766
+ };
2114
2767
 
2115
2768
  // src/Components/EmptyState/EmptyState.tsx
2116
2769
  var EmptyStateImageUrls = {
2117
- create: create_default,
2118
- error: error_default,
2119
- noResult: empty_default,
2120
- search: search_default
2770
+ create: /* @__PURE__ */ React21.createElement(Create, null),
2771
+ error: /* @__PURE__ */ React21.createElement(Error2, null),
2772
+ noResult: /* @__PURE__ */ React21.createElement(Empty, null),
2773
+ search: /* @__PURE__ */ React21.createElement(Search2, null)
2121
2774
  };
2122
2775
  var DefaultIcon = ({
2123
2776
  state = "create",
2124
2777
  size = "large"
2125
2778
  }) => {
2126
- const imageUrl = EmptyStateImageUrls[state];
2779
+ const Icon = EmptyStateImageUrls[state];
2127
2780
  const iconSize = size === "small" ? { width: "40px", height: "40px" } : { width: "60px", height: "60px" };
2128
- return /* @__PURE__ */ React15.createElement("img", { src: imageUrl, alt: state, style: iconSize });
2781
+ return /* @__PURE__ */ React21.createElement("div", null, Icon);
2129
2782
  };
2130
2783
  var EmptyState = ({
2131
2784
  state = "create",
@@ -2134,12 +2787,12 @@ var EmptyState = ({
2134
2787
  subtitle,
2135
2788
  actions,
2136
2789
  containerHeight = "100vh",
2137
- icon = /* @__PURE__ */ React15.createElement(DefaultIcon, { state, size })
2790
+ icon = /* @__PURE__ */ React21.createElement(DefaultIcon, { state, size })
2138
2791
  }) => {
2139
2792
  const titleVariant = size === "small" ? "subtitle2" : "h6";
2140
2793
  const subtitleVariant = size === "small" ? "caption" : "body1";
2141
- return /* @__PURE__ */ React15.createElement(
2142
- Stack7,
2794
+ return /* @__PURE__ */ React21.createElement(
2795
+ Stack8,
2143
2796
  {
2144
2797
  alignItems: "center",
2145
2798
  justifyContent: "center",
@@ -2147,17 +2800,17 @@ var EmptyState = ({
2147
2800
  height: containerHeight,
2148
2801
  "data-testid": "empty-state-container"
2149
2802
  },
2150
- icon && /* @__PURE__ */ React15.createElement(Stack7, null, icon),
2151
- /* @__PURE__ */ React15.createElement(Stack7, { gap: 0.5 }, /* @__PURE__ */ React15.createElement(Typography12, { color: "text.primary", variant: titleVariant, textAlign: "center" }, title), subtitle && /* @__PURE__ */ React15.createElement(
2152
- Typography12,
2803
+ icon && /* @__PURE__ */ React21.createElement(Stack8, null, icon),
2804
+ /* @__PURE__ */ React21.createElement(Stack8, { gap: 0.5 }, /* @__PURE__ */ React21.createElement(Typography13, { color: "text.primary", variant: titleVariant, textAlign: "center" }, title), subtitle && /* @__PURE__ */ React21.createElement(
2805
+ Typography13,
2153
2806
  {
2154
2807
  variant: subtitleVariant,
2155
2808
  textAlign: "center",
2156
2809
  color: "text.secondary"
2157
2810
  },
2158
2811
  subtitle
2159
- ), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */ React15.createElement(
2160
- Stack7,
2812
+ ), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */ React21.createElement(
2813
+ Stack8,
2161
2814
  {
2162
2815
  direction: "row",
2163
2816
  spacing: 2,
@@ -2166,15 +2819,15 @@ var EmptyState = ({
2166
2819
  },
2167
2820
  actions.map((action, index) => {
2168
2821
  var _a, _b, _c, _d;
2169
- return /* @__PURE__ */ React15.createElement(
2170
- Button8,
2822
+ return /* @__PURE__ */ React21.createElement(
2823
+ Button9,
2171
2824
  {
2172
2825
  key: index,
2173
2826
  color: (_a = action.color) != null ? _a : "primary",
2174
2827
  variant: (_b = action.variant) != null ? _b : "text",
2175
2828
  size: (_c = action.size) != null ? _c : "small",
2176
- startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */ React15.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
2177
- endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */ React15.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
2829
+ startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */ React21.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
2830
+ endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */ React21.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
2178
2831
  onClick: action.onClick
2179
2832
  },
2180
2833
  capitalize((_d = action.text) != null ? _d : "action")
@@ -2185,8 +2838,8 @@ var EmptyState = ({
2185
2838
  };
2186
2839
 
2187
2840
  // src/Components/SCDialog.tsx
2188
- import React16, { useEffect as useEffect11, useState as useState9 } from "react";
2189
- import { Button as Button9, Typography as Typography13, Modal as Modal2, Dialog, DialogActions, DialogContent, DialogTitle, IconButton as IconButton8, Tooltip as Tooltip3, Box as Box11, SvgIcon as SvgIcon5 } from "@mui/material";
2841
+ import React22, { useEffect as useEffect14, useState as useState10 } from "react";
2842
+ import { Button as Button10, Typography as Typography14, Modal as Modal2, Dialog, DialogActions, DialogContent, DialogTitle, IconButton as IconButton9, Tooltip as Tooltip4, Box as Box12, SvgIcon as SvgIcon5 } from "@mui/material";
2190
2843
  import Grid6 from "@mui/material/Grid2";
2191
2844
  import CloseIcon2 from "@mui/icons-material/Close";
2192
2845
  import * as Muicon5 from "@mui/icons-material";
@@ -2195,8 +2848,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2195
2848
  let iconTitleValidation = "";
2196
2849
  let IconTitle;
2197
2850
  let ButtonIcon;
2198
- const [open, setOpen] = useState9(show);
2199
- useEffect11(() => {
2851
+ const [open, setOpen] = useState10(show);
2852
+ useEffect14(() => {
2200
2853
  if (show) {
2201
2854
  handleOpen();
2202
2855
  } else {
@@ -2221,7 +2874,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2221
2874
  });
2222
2875
  if (iconTitle) {
2223
2876
  if (Muicon5[iconTitle] == void 0) {
2224
- if (iconTitle && React16.isValidElement(iconTitle) && iconTitle.type == void 0) {
2877
+ if (iconTitle && React22.isValidElement(iconTitle) && iconTitle.type == void 0) {
2225
2878
  iconTitleValidation = "image";
2226
2879
  IconTitle = iconTitle;
2227
2880
  } else {
@@ -2246,8 +2899,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2246
2899
  }
2247
2900
  };
2248
2901
  const dialogActions = actions != null ? actions : [{ text: "Cerrar", fn: handleClose }];
2249
- content = content != null ? content : { component: /* @__PURE__ */ React16.createElement(Box11, null, " Aqui va el contenido ") };
2250
- return /* @__PURE__ */ React16.createElement("div", null, buttonDialog ? /* @__PURE__ */ React16.createElement(React16.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React16.createElement(Tooltip3, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React16.createElement(Button9, { 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__ */ React16.createElement(ButtonIcon, { color: buttonDialog.color != void 0 ? buttonDialog.color : "primary" }) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React16.createElement(ButtonIcon, { color: buttonDialog.color != void 0 ? buttonDialog.color : "primary" }) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React16.createElement(IconButton8, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React16.createElement(Modal2, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React16.createElement(
2902
+ content = content != null ? content : { component: /* @__PURE__ */ React22.createElement(Box12, null, " Aqui va el contenido ") };
2903
+ return /* @__PURE__ */ React22.createElement("div", null, buttonDialog ? /* @__PURE__ */ React22.createElement(React22.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React22.createElement(Tooltip4, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React22.createElement(Button10, { 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__ */ React22.createElement(ButtonIcon, null) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React22.createElement(ButtonIcon, null) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React22.createElement(IconButton9, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React22.createElement(SvgIcon5, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React22.createElement(Modal2, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React22.createElement(
2251
2904
  Dialog,
2252
2905
  {
2253
2906
  "data-testid": "dialog-element",
@@ -2261,8 +2914,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2261
2914
  }
2262
2915
  }
2263
2916
  },
2264
- title && /* @__PURE__ */ React16.createElement(DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React16.createElement(Grid6, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, /* @__PURE__ */ React16.createElement(Grid6, { container: true, size: 11, sx: { alignItems: "center" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ React16.createElement(Box11, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React16.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React16.createElement(SvgIcon5, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ React16.createElement(Grid6, null, /* @__PURE__ */ React16.createElement(Typography13, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), /* @__PURE__ */ React16.createElement(Typography13, { color: "text.secondary", variant: "body2", gutterBottom: true }, subtitle ? subtitle : ""))), disableClose != true ? /* @__PURE__ */ React16.createElement(IconButton8, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ React16.createElement(CloseIcon2, null)) : "")),
2265
- /* @__PURE__ */ React16.createElement(
2917
+ title && /* @__PURE__ */ React22.createElement(DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React22.createElement(Grid6, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, /* @__PURE__ */ React22.createElement(Grid6, { container: true, size: 11, sx: { alignItems: "center" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ React22.createElement(Box12, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React22.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React22.createElement(SvgIcon5, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ React22.createElement(Grid6, null, /* @__PURE__ */ React22.createElement(Typography14, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), /* @__PURE__ */ React22.createElement(Typography14, { color: "text.secondary", variant: "body2", gutterBottom: true }, subtitle ? subtitle : ""))), disableClose != true ? /* @__PURE__ */ React22.createElement(IconButton9, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ React22.createElement(CloseIcon2, null)) : "")),
2918
+ /* @__PURE__ */ React22.createElement(
2266
2919
  DialogContent,
2267
2920
  {
2268
2921
  "data-testid": "dialog-content",
@@ -2290,7 +2943,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2290
2943
  }
2291
2944
  }
2292
2945
  },
2293
- content.url ? /* @__PURE__ */ React16.createElement(
2946
+ content.url ? /* @__PURE__ */ React22.createElement(
2294
2947
  "iframe",
2295
2948
  {
2296
2949
  style: { border: "none", minWidth: "100%", minHeight: "100%" },
@@ -2300,20 +2953,20 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2300
2953
  }
2301
2954
  ) : content.component
2302
2955
  ),
2303
- dialogActions.length > 0 ? /* @__PURE__ */ React16.createElement(DialogActions, { sx: { gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, dialogActions.length >= 3 ? /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
2304
- Button9,
2956
+ dialogActions.length > 0 ? /* @__PURE__ */ React22.createElement(DialogActions, { sx: { gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, dialogActions.length >= 3 ? /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(
2957
+ Button10,
2305
2958
  {
2306
2959
  variant: "text",
2307
2960
  color: dialogActions[0].color || "primary",
2308
2961
  size: "small",
2309
2962
  onClick: dialogActions[0].fn,
2310
2963
  disabled: dialogActions[0].disabled || false,
2311
- startIcon: dialogActions[0].icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: dialogActions[0].icon }) : void 0
2964
+ startIcon: dialogActions[0].icon ? /* @__PURE__ */ React22.createElement(SvgIcon5, { fontSize: "small", component: dialogActions[0].icon }) : void 0
2312
2965
  },
2313
2966
  dialogActions[0].text
2314
- ), /* @__PURE__ */ React16.createElement(Box11, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
2315
- return /* @__PURE__ */ React16.createElement(
2316
- Button9,
2967
+ ), /* @__PURE__ */ React22.createElement(Box12, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
2968
+ return /* @__PURE__ */ React22.createElement(
2969
+ Button10,
2317
2970
  {
2318
2971
  key: index + 1,
2319
2972
  variant: index === dialogActions.length - 2 ? "contained" : "text",
@@ -2321,13 +2974,13 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2321
2974
  size: "small",
2322
2975
  onClick: boton.fn,
2323
2976
  disabled: boton.disabled || false,
2324
- startIcon: boton.icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
2977
+ startIcon: boton.icon ? /* @__PURE__ */ React22.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
2325
2978
  },
2326
2979
  boton.text
2327
2980
  );
2328
2981
  }))) : dialogActions.map((boton, index) => {
2329
- return /* @__PURE__ */ React16.createElement(
2330
- Button9,
2982
+ return /* @__PURE__ */ React22.createElement(
2983
+ Button10,
2331
2984
  {
2332
2985
  key: index,
2333
2986
  variant: index === dialogActions.length - 1 ? "contained" : "text",
@@ -2335,7 +2988,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2335
2988
  size: "small",
2336
2989
  onClick: boton.fn,
2337
2990
  disabled: boton.disabled || false,
2338
- startIcon: boton.icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
2991
+ startIcon: boton.icon ? /* @__PURE__ */ React22.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
2339
2992
  },
2340
2993
  boton.text
2341
2994
  );
@@ -2343,13 +2996,55 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2343
2996
  )));
2344
2997
  };
2345
2998
 
2346
- // src/Components/SCMenu.tsx
2347
- import React17 from "react";
2348
- import { Box as Box12, Typography as Typography14, Paper, Divider as Divider4, MenuList, MenuItem as MenuItem4, ListItemIcon as ListItemIcon4, SvgIcon as SvgIcon6 } from "@mui/material";
2999
+ // src/Components/SCListContent.tsx
3000
+ import React23 from "react";
3001
+ import { Divider as Divider4, List, ListItemButton, ListItemIcon as ListItemIcon4, ListItemText as ListItemText3, SvgIcon as SvgIcon6 } from "@mui/material";
2349
3002
  import Grid7 from "@mui/material/Grid2";
3003
+ import * as Muicon6 from "@mui/icons-material";
3004
+ var SCListContent = ({ options }) => {
3005
+ const [selectedIndex, setSelectedIndex] = React23.useState("1");
3006
+ const [value, setValue] = React23.useState("1");
3007
+ options.map(function(option, index, array) {
3008
+ if (option == null ? void 0 : option.iconLeft) {
3009
+ if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
3010
+ option.iconLeft = Muicon6[option == null ? void 0 : option.iconLeft];
3011
+ } else {
3012
+ option;
3013
+ }
3014
+ }
3015
+ if (option == null ? void 0 : option.iconRight) {
3016
+ if ((option == null ? void 0 : option.iconRight.type) == void 0) {
3017
+ option.iconRight = Muicon6[option == null ? void 0 : option.iconRight];
3018
+ } else {
3019
+ option;
3020
+ }
3021
+ }
3022
+ });
3023
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(List, { sx: { width: "100%", maxWidth: 360, bgcolor: "background.paper", padding: "0px !important" } }, options.map((option, index) => /* @__PURE__ */ React23.createElement(React23.Fragment, { key: index }, /* @__PURE__ */ React23.createElement(
3024
+ ListItemButton,
3025
+ {
3026
+ disabled: option.disable,
3027
+ onClick: option.fn
3028
+ },
3029
+ option.iconLeft ? /* @__PURE__ */ React23.createElement(ListItemIcon4, { sx: { minWidth: "30px !important" } }, /* @__PURE__ */ React23.createElement(SvgIcon6, { fontSize: "small", color: option.iconLeftColor || "action", component: option.iconLeft })) : "",
3030
+ /* @__PURE__ */ React23.createElement(
3031
+ ListItemText3,
3032
+ {
3033
+ primary: option.title,
3034
+ secondary: /* @__PURE__ */ React23.createElement(Grid7, { gap: 0.5 }, /* @__PURE__ */ React23.createElement(Grid7, { container: true, gap: 0.5 }, option.subtitle), /* @__PURE__ */ React23.createElement(Grid7, { container: true, gap: 0.5 }, option.description))
3035
+ }
3036
+ ),
3037
+ option.iconRight ? /* @__PURE__ */ React23.createElement(ListItemIcon4, { sx: { minWidth: "0px !important" } }, /* @__PURE__ */ React23.createElement(SvgIcon6, { fontSize: "small", color: option.iconRightColor || "action", component: option.iconRight })) : ""
3038
+ ), option.divider == true ? /* @__PURE__ */ React23.createElement(Divider4, null) : ""))));
3039
+ };
3040
+
3041
+ // src/Components/SCMenu.tsx
3042
+ import React24 from "react";
3043
+ import { Box as Box14, Typography as Typography16, Paper as Paper2, Divider as Divider5, MenuList as MenuList2, MenuItem as MenuItem5, ListItemIcon as ListItemIcon5, SvgIcon as SvgIcon7 } from "@mui/material";
3044
+ import Grid8 from "@mui/material/Grid2";
2350
3045
 
2351
3046
  // src/Components/Hooks/useWindowDimensions.ts
2352
- import { useState as useState10, useEffect as useEffect12 } from "react";
3047
+ import { useState as useState12, useEffect as useEffect16 } from "react";
2353
3048
  function getWindowDimensions() {
2354
3049
  const { innerWidth: width, innerHeight: height } = window;
2355
3050
  return {
@@ -2358,8 +3053,8 @@ function getWindowDimensions() {
2358
3053
  };
2359
3054
  }
2360
3055
  function useWindowDimensions() {
2361
- const [windowDimensions, setWindowDimensions] = useState10(getWindowDimensions());
2362
- useEffect12(() => {
3056
+ const [windowDimensions, setWindowDimensions] = useState12(getWindowDimensions());
3057
+ useEffect16(() => {
2363
3058
  function handleResize() {
2364
3059
  setWindowDimensions(getWindowDimensions());
2365
3060
  }
@@ -2370,19 +3065,19 @@ function useWindowDimensions() {
2370
3065
  }
2371
3066
 
2372
3067
  // src/Components/SCMenu.tsx
2373
- import * as Muicon6 from "@mui/icons-material";
3068
+ import * as Muicon7 from "@mui/icons-material";
2374
3069
  var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu, widthPage }) => {
2375
3070
  const { height, width } = useWindowDimensions();
2376
3071
  const menuSize = widthMenu ? parseInt(widthMenu) : 284;
2377
3072
  const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
2378
3073
  const widthContainer = menuSize + pageSize;
2379
3074
  let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
2380
- const [selectedIndex, setSelectedIndex] = React17.useState("1");
2381
- const [value, setValue] = React17.useState("1");
2382
- React17.useEffect(() => {
3075
+ const [selectedIndex, setSelectedIndex] = React24.useState("1");
3076
+ const [value, setValue] = React24.useState("1");
3077
+ React24.useEffect(() => {
2383
3078
  heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
2384
3079
  }, [height]);
2385
- React17.useEffect(() => {
3080
+ React24.useEffect(() => {
2386
3081
  if (defaultOption) {
2387
3082
  handleClickMenusItem(event, void 0);
2388
3083
  }
@@ -2390,14 +3085,14 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
2390
3085
  options.map(function(option, index, array) {
2391
3086
  if (option == null ? void 0 : option.iconLeft) {
2392
3087
  if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
2393
- option.iconLeft = Muicon6[option == null ? void 0 : option.iconLeft];
3088
+ option.iconLeft = Muicon7[option == null ? void 0 : option.iconLeft];
2394
3089
  } else {
2395
3090
  option;
2396
3091
  }
2397
3092
  }
2398
3093
  if (option == null ? void 0 : option.iconRight) {
2399
3094
  if ((option == null ? void 0 : option.iconRight.type) == void 0) {
2400
- option.iconRight = Muicon6[option == null ? void 0 : option.iconRight];
3095
+ option.iconRight = Muicon7[option == null ? void 0 : option.iconRight];
2401
3096
  } else {
2402
3097
  option;
2403
3098
  }
@@ -2412,34 +3107,34 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
2412
3107
  setValue(String(index + 1));
2413
3108
  }
2414
3109
  };
2415
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Grid7, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ React17.createElement(Paper, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ React17.createElement(MenuList, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
2416
- MenuItem4,
3110
+ return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(Grid8, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ React24.createElement(Paper2, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ React24.createElement(MenuList2, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(
3111
+ MenuItem5,
2417
3112
  {
2418
3113
  disabled: disable == true ? true : false,
2419
3114
  key: index,
2420
3115
  selected: String(index + 1) === selectedIndex,
2421
3116
  onClick: (event2) => handleClickMenusItem(event2, index)
2422
3117
  },
2423
- option.iconLeft ? /* @__PURE__ */ React17.createElement(ListItemIcon4, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React17.createElement(SvgIcon6, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
2424
- /* @__PURE__ */ React17.createElement(Grid7, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React17.createElement(Typography14, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React17.createElement(ListItemIcon4, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React17.createElement(SvgIcon6, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
2425
- ), option.divider == true ? /* @__PURE__ */ React17.createElement(Divider4, null) : "")))), /* @__PURE__ */ React17.createElement(Grid7, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React17.createElement(Box12, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React17.createElement(Typography14, { color: "error" }, "No se ha configurado el componente a visualizar")))));
3118
+ option.iconLeft ? /* @__PURE__ */ React24.createElement(ListItemIcon5, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React24.createElement(SvgIcon7, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
3119
+ /* @__PURE__ */ React24.createElement(Grid8, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React24.createElement(Typography16, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React24.createElement(ListItemIcon5, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React24.createElement(SvgIcon7, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
3120
+ ), option.divider == true ? /* @__PURE__ */ React24.createElement(Divider5, null) : "")))), /* @__PURE__ */ React24.createElement(Grid8, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React24.createElement(Box14, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React24.createElement(Typography16, { color: "error" }, "No se ha configurado el componente a visualizar")))));
2426
3121
  };
2427
3122
 
2428
3123
  // src/Components/SCTabs.tsx
2429
- import React18, { useEffect as useEffect13 } from "react";
2430
- import { Typography as Typography15, Box as Box13, SvgIcon as SvgIcon7, Tab, Tabs, Badge } from "@mui/material";
3124
+ import React25, { useEffect as useEffect17 } from "react";
3125
+ import { Typography as Typography17, Box as Box15, SvgIcon as SvgIcon8, Tab as Tab2, Tabs as Tabs2, Badge } from "@mui/material";
2431
3126
  import TabPanel from "@mui/lab/TabPanel";
2432
3127
  import TabContext from "@mui/lab/TabContext";
2433
- import * as Muicon7 from "@mui/icons-material";
3128
+ import * as Muicon8 from "@mui/icons-material";
2434
3129
  var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
2435
- const [toast, setToast] = React18.useState(null);
3130
+ const [toast, setToast] = React25.useState(null);
2436
3131
  let i = 0;
2437
3132
  let j = 0;
2438
3133
  let k = 0;
2439
3134
  let l = 0;
2440
3135
  let validateTypeIcon = true;
2441
- const [value, setValue] = React18.useState("1");
2442
- useEffect13(() => {
3136
+ const [value, setValue] = React25.useState("1");
3137
+ useEffect17(() => {
2443
3138
  if (defaultOption) {
2444
3139
  handleChange(event, void 0);
2445
3140
  }
@@ -2448,9 +3143,9 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
2448
3143
  const optionsLength = options.length;
2449
3144
  if (option == null ? void 0 : option.iconOrBadge) {
2450
3145
  if (typeIcon == "icon") {
2451
- if ((option == null ? void 0 : option.iconOrBadge) in Muicon7 == true) {
3146
+ if ((option == null ? void 0 : option.iconOrBadge) in Muicon8 == true) {
2452
3147
  validateTypeIcon = true;
2453
- option.iconOrBadge = Muicon7[option == null ? void 0 : option.iconOrBadge];
3148
+ option.iconOrBadge = Muicon8[option == null ? void 0 : option.iconOrBadge];
2454
3149
  } else {
2455
3150
  validateTypeIcon = false;
2456
3151
  setTimeout(() => {
@@ -2464,7 +3159,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
2464
3159
  return;
2465
3160
  }
2466
3161
  } else if (typeIcon == "badge") {
2467
- if ((option == null ? void 0 : option.iconOrBadge) in Muicon7 == false) {
3162
+ if ((option == null ? void 0 : option.iconOrBadge) in Muicon8 == false) {
2468
3163
  validateTypeIcon = true;
2469
3164
  option;
2470
3165
  } else {
@@ -2489,8 +3184,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
2489
3184
  setValue(newValue);
2490
3185
  }
2491
3186
  };
2492
- return /* @__PURE__ */ React18.createElement(React18.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ React18.createElement(Box13, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ React18.createElement(TabContext, { value }, /* @__PURE__ */ React18.createElement(
2493
- Tabs,
3187
+ return /* @__PURE__ */ React25.createElement(React25.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ React25.createElement(Box15, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ React25.createElement(TabContext, { value }, /* @__PURE__ */ React25.createElement(
3188
+ Tabs2,
2494
3189
  {
2495
3190
  "data-testid": "tab-container",
2496
3191
  value,
@@ -2503,8 +3198,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
2503
3198
  orientation: orientation || "horizontal",
2504
3199
  sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
2505
3200
  },
2506
- options.map((option) => /* @__PURE__ */ React18.createElement(
2507
- Tab,
3201
+ options.map((option) => /* @__PURE__ */ React25.createElement(
3202
+ Tab2,
2508
3203
  {
2509
3204
  "data-testid": "tab-item",
2510
3205
  value: String(i = i + 1),
@@ -2512,7 +3207,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
2512
3207
  label: option.name || "",
2513
3208
  disabled: option.disabled || false,
2514
3209
  iconPosition: iconPosition || "end",
2515
- icon: typeIcon == "badge" ? /* @__PURE__ */ React18.createElement(
3210
+ icon: typeIcon == "badge" ? /* @__PURE__ */ React25.createElement(
2516
3211
  Badge,
2517
3212
  {
2518
3213
  sx: {
@@ -2527,33 +3222,38 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
2527
3222
  badgeContent: option.iconOrBadge,
2528
3223
  color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
2529
3224
  }
2530
- ) : typeIcon == "icon" ? /* @__PURE__ */ React18.createElement(SvgIcon7, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
3225
+ ) : typeIcon == "icon" ? /* @__PURE__ */ React25.createElement(SvgIcon8, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
2531
3226
  sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
2532
3227
  }
2533
3228
  ))
2534
- ), children, options.map((option) => /* @__PURE__ */ React18.createElement(
3229
+ ), children, options.map((option) => /* @__PURE__ */ React25.createElement(
2535
3230
  TabPanel,
2536
3231
  {
2537
3232
  key: k = k + 1,
2538
3233
  value: String(l = l + 1),
2539
3234
  sx: { padding: "16px" }
2540
3235
  },
2541
- option.page ? option.page : /* @__PURE__ */ React18.createElement(Typography15, null, "No se ha configurado el componente a visualizar ")
2542
- )))) : /* @__PURE__ */ React18.createElement(Box13, { sx: { height: "200px" } }, toast && /* @__PURE__ */ React18.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
3236
+ option.page ? option.page : /* @__PURE__ */ React25.createElement(Typography17, null, "No se ha configurado el componente a visualizar ")
3237
+ )))) : /* @__PURE__ */ React25.createElement(Box15, { sx: { height: "200px" } }, toast && /* @__PURE__ */ React25.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
2543
3238
  };
2544
3239
 
2545
3240
  // src/Components/Calendario/Calendar.tsx
2546
- import React24, { useState as useState12 } from "react";
2547
- import { Box as Box19 } from "@mui/material";
2548
- import dayjs7 from "dayjs";
3241
+ import React32, { useEffect as useEffect18, useState as useState14 } from "react";
3242
+ import { Box as Box21, CircularProgress as CircularProgress5 } from "@mui/material";
2549
3243
 
2550
3244
  // src/Components/Calendario/CalendarToolbar.tsx
2551
- import React19, { useState as useState11 } from "react";
3245
+ import React26, { useState as useState13 } from "react";
2552
3246
  import { ChevronLeft, ChevronRight, KeyboardArrowDown as KeyboardArrowDown2, LightModeOutlined } from "@mui/icons-material";
2553
- import { Box as Box14, Chip as Chip3, IconButton as IconButton9, Menu, MenuItem as MenuItem5, Stack as Stack8, Typography as Typography16 } from "@mui/material";
3247
+ import { Box as Box16, Chip as Chip4, IconButton as IconButton11, Menu, MenuItem as MenuItem6, Stack as Stack10, Typography as Typography18 } from "@mui/material";
2554
3248
  import dayjs2 from "dayjs";
3249
+ import updateLocale from "dayjs/plugin/updateLocale";
2555
3250
  import "dayjs/locale/es";
2556
3251
  dayjs2.locale("es");
3252
+ dayjs2.extend(updateLocale);
3253
+ dayjs2.updateLocale("en", {
3254
+ weekStart: 0
3255
+ // 0 = domingo
3256
+ });
2557
3257
  var CalendarToolbar = ({
2558
3258
  labelDate,
2559
3259
  view,
@@ -2561,7 +3261,7 @@ var CalendarToolbar = ({
2561
3261
  onNavigate,
2562
3262
  children
2563
3263
  }) => {
2564
- const [anchorEl, setAnchorEl] = useState11(null);
3264
+ const [anchorEl, setAnchorEl] = useState13(null);
2565
3265
  const open = Boolean(anchorEl);
2566
3266
  const handleMenuOpen = (event2) => {
2567
3267
  setAnchorEl(event2.currentTarget);
@@ -2574,23 +3274,25 @@ var CalendarToolbar = ({
2574
3274
  handleMenuClose();
2575
3275
  };
2576
3276
  const getFormattedDate = () => {
3277
+ const sunday = labelDate.day(0);
2577
3278
  if (view === "month") {
2578
- return labelDate.format("MMMM YYYY");
3279
+ const textMonth = labelDate.format("MMMM YYYY");
3280
+ return textMonth.charAt(0).toUpperCase() + textMonth.slice(1);
2579
3281
  }
2580
3282
  if (view === "week") {
2581
- return `${labelDate.startOf("week").add(1, "day").format("DD MMM")} - ${labelDate.endOf("week").format("DD MMM YYYY")}`;
3283
+ return `${labelDate.startOf("week").format("DD MMM")} - ${labelDate.endOf("week").format("DD MMM YYYY")}`;
2582
3284
  }
2583
3285
  return labelDate.format(" DD MMMM YYYY");
2584
3286
  };
2585
- return /* @__PURE__ */ React19.createElement(Stack8, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 0.5, px: 1, py: 0.5 }, /* @__PURE__ */ React19.createElement(Box14, null, /* @__PURE__ */ React19.createElement(
2586
- Chip3,
3287
+ return /* @__PURE__ */ React26.createElement(Stack10, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 0.5, px: 1, py: 0.5 }, /* @__PURE__ */ React26.createElement(Box16, null, /* @__PURE__ */ React26.createElement(
3288
+ Chip4,
2587
3289
  {
2588
3290
  label: "Hoy",
2589
- icon: /* @__PURE__ */ React19.createElement(LightModeOutlined, { fontSize: "small" }),
3291
+ icon: /* @__PURE__ */ React26.createElement(LightModeOutlined, { fontSize: "small" }),
2590
3292
  color: "primary",
2591
3293
  onClick: () => onNavigate("TODAY")
2592
3294
  }
2593
- )), /* @__PURE__ */ React19.createElement(Stack8, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React19.createElement(IconButton9, { "aria-label": "Anterior", onClick: () => onNavigate("PREV"), size: "small", color: "primary" }, /* @__PURE__ */ React19.createElement(ChevronLeft, { fontSize: "small" })), /* @__PURE__ */ React19.createElement(IconButton9, { "aria-label": "Siguiente", onClick: () => onNavigate("NEXT"), size: "small", color: "primary" }, /* @__PURE__ */ React19.createElement(ChevronRight, { fontSize: "small" })), /* @__PURE__ */ React19.createElement(Typography16, { variant: "h6", color: "primary", "data-testid": "currentDate" }, getFormattedDate()), /* @__PURE__ */ React19.createElement(IconButton9, { onClick: handleMenuOpen, size: "small", color: "primary", "aria-label": "Cambiar vista" }, /* @__PURE__ */ React19.createElement(KeyboardArrowDown2, { fontSize: "small" })), /* @__PURE__ */ React19.createElement(
3295
+ )), /* @__PURE__ */ React26.createElement(Stack10, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React26.createElement(IconButton11, { "aria-label": "Anterior", onClick: () => onNavigate("PREV"), size: "small", color: "primary" }, /* @__PURE__ */ React26.createElement(ChevronLeft, { fontSize: "small" })), /* @__PURE__ */ React26.createElement(IconButton11, { "aria-label": "Siguiente", onClick: () => onNavigate("NEXT"), size: "small", color: "primary" }, /* @__PURE__ */ React26.createElement(ChevronRight, { fontSize: "small" })), /* @__PURE__ */ React26.createElement(Typography18, { variant: "h6", color: "primary", "data-testid": "currentDate" }, getFormattedDate()), /* @__PURE__ */ React26.createElement(IconButton11, { onClick: handleMenuOpen, size: "small", color: "primary", "aria-label": "Cambiar vista" }, /* @__PURE__ */ React26.createElement(KeyboardArrowDown2, { fontSize: "small" })), /* @__PURE__ */ React26.createElement(
2594
3296
  Menu,
2595
3297
  {
2596
3298
  anchorEl,
@@ -2599,15 +3301,15 @@ var CalendarToolbar = ({
2599
3301
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
2600
3302
  transformOrigin: { vertical: "top", horizontal: "center" }
2601
3303
  },
2602
- /* @__PURE__ */ React19.createElement(MenuItem5, { onClick: () => handleViewChange("month") }, "Mes"),
2603
- /* @__PURE__ */ React19.createElement(MenuItem5, { onClick: () => handleViewChange("week") }, "Semana"),
2604
- /* @__PURE__ */ React19.createElement(MenuItem5, { onClick: () => handleViewChange("day") }, "D\xEDa")
2605
- )), children ? /* @__PURE__ */ React19.createElement(Box14, null, children) : /* @__PURE__ */ React19.createElement(Box14, { width: "24px" }), " ");
3304
+ /* @__PURE__ */ React26.createElement(MenuItem6, { onClick: () => handleViewChange("month") }, "Mes"),
3305
+ /* @__PURE__ */ React26.createElement(MenuItem6, { onClick: () => handleViewChange("week") }, "Semana"),
3306
+ /* @__PURE__ */ React26.createElement(MenuItem6, { onClick: () => handleViewChange("day") }, "D\xEDa")
3307
+ )), children ? /* @__PURE__ */ React26.createElement(Box16, null, children) : /* @__PURE__ */ React26.createElement(Box16, { width: "24px" }), " ");
2606
3308
  };
2607
3309
 
2608
3310
  // src/Components/Calendario/Views/MonthView.tsx
2609
- import React21 from "react";
2610
- import { Box as Box16, Typography as Typography18, IconButton as IconButton10, Paper as Paper2, Tooltip as Tooltip4, Stack as Stack10, Divider as Divider6 } from "@mui/material";
3311
+ import React29 from "react";
3312
+ import { Box as Box18, Typography as Typography20, IconButton as IconButton12, Paper as Paper3, Tooltip as Tooltip6, Stack as Stack12, Divider as Divider7, CircularProgress as CircularProgress2 } from "@mui/material";
2611
3313
  import AddIcon from "@mui/icons-material/Add";
2612
3314
  import dayjs4 from "dayjs";
2613
3315
  import localeData from "dayjs/plugin/localeData";
@@ -2633,21 +3335,32 @@ var stateColors = {
2633
3335
  Asignada: "warning.main",
2634
3336
  Finalizado: "primary.main",
2635
3337
  Vencida: "error.main",
2636
- EnProgreso: "success.main"
3338
+ EnProgreso: "success.main",
3339
+ Aplazada: "grey.400",
3340
+ Generada: "secondary.main"
2637
3341
  };
2638
3342
 
2639
3343
  // src/Components/Calendario/Event.tsx
2640
- import React20 from "react";
2641
- import { Box as Box15, Stack as Stack9, Typography as Typography17, Divider as Divider5 } from "@mui/material";
2642
- var CalendarEventCard = ({ event: event2, color, sx, onClick }) => {
2643
- return /* @__PURE__ */ React20.createElement(
2644
- Stack9,
3344
+ import React27 from "react";
3345
+ import { Box as Box17, Stack as Stack11, Typography as Typography19, Divider as Divider6, Popover as Popover5 } from "@mui/material";
3346
+ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
3347
+ const [anchorEl, setAnchorEl] = React27.useState(null);
3348
+ const handlePopoverOpen = (event3) => {
3349
+ setAnchorEl(event3.currentTarget);
3350
+ };
3351
+ const handlePopoverClose = () => {
3352
+ setAnchorEl(null);
3353
+ };
3354
+ const open = Boolean(anchorEl);
3355
+ return /* @__PURE__ */ React27.createElement(
3356
+ Stack11,
2645
3357
  {
2646
3358
  direction: "row",
2647
3359
  padding: 0.5,
2648
3360
  borderRadius: 0.5,
2649
3361
  alignItems: "flex-start",
2650
3362
  minHeight: "20px",
3363
+ onMouseOver: () => onHover == null ? void 0 : onHover(event2),
2651
3364
  onClick: (e) => {
2652
3365
  e.stopPropagation();
2653
3366
  onClick == null ? void 0 : onClick(event2);
@@ -2660,8 +3373,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick }) => {
2660
3373
  cursor: onClick ? "pointer" : "default"
2661
3374
  }, sx)
2662
3375
  },
2663
- /* @__PURE__ */ React20.createElement(
2664
- Divider5,
3376
+ /* @__PURE__ */ React27.createElement(
3377
+ Divider6,
2665
3378
  {
2666
3379
  orientation: "vertical",
2667
3380
  flexItem: true,
@@ -2672,8 +3385,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick }) => {
2672
3385
  }
2673
3386
  }
2674
3387
  ),
2675
- /* @__PURE__ */ React20.createElement(
2676
- Box15,
3388
+ /* @__PURE__ */ React27.createElement(
3389
+ Box17,
2677
3390
  {
2678
3391
  px: 1,
2679
3392
  py: 0.5,
@@ -2682,8 +3395,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick }) => {
2682
3395
  display: "flex",
2683
3396
  alignItems: "center"
2684
3397
  },
2685
- /* @__PURE__ */ React20.createElement(
2686
- Typography17,
3398
+ /* @__PURE__ */ React27.createElement(
3399
+ Typography19,
2687
3400
  {
2688
3401
  color: "text.primary",
2689
3402
  variant: "caption",
@@ -2692,30 +3405,66 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick }) => {
2692
3405
  overflow: "hidden",
2693
3406
  textOverflow: "ellipsis",
2694
3407
  whiteSpace: "nowrap"
2695
- }
3408
+ },
3409
+ onMouseEnter: handlePopoverOpen,
3410
+ onMouseLeave: handlePopoverClose
3411
+ },
3412
+ event2.title.charAt(0).toUpperCase() + event2.title.slice(1).toLowerCase()
3413
+ ),
3414
+ /* @__PURE__ */ React27.createElement(
3415
+ Popover5,
3416
+ {
3417
+ id: "mouse-over-popover",
3418
+ sx: { pointerEvents: "none" },
3419
+ open,
3420
+ anchorEl,
3421
+ anchorOrigin: {
3422
+ vertical: "top",
3423
+ horizontal: "right"
3424
+ },
3425
+ transformOrigin: {
3426
+ vertical: "bottom",
3427
+ horizontal: "right"
3428
+ },
3429
+ onClose: handlePopoverClose,
3430
+ disableRestoreFocus: true
2696
3431
  },
2697
- capitalize(event2.title)
3432
+ onHover ? onHover(event2) : " "
2698
3433
  )
2699
3434
  )
2700
3435
  );
2701
3436
  };
2702
3437
 
3438
+ // src/assets/LogoCalendario.tsx
3439
+ import React28 from "react";
3440
+ var LogoCalendario = () => {
3441
+ return /* @__PURE__ */ React28.createElement("svg", { width: "60", height: "61", viewBox: "0 0 60 61", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React28.createElement("g", { "clip-path": "url(#clip0_5353_24891)" }, /* @__PURE__ */ React28.createElement("path", { fillRule: "evenodd", clipRule: "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__ */ React28.createElement("path", { fillRule: "evenodd", clipRule: "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__ */ React28.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__ */ React28.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__ */ React28.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__ */ React28.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__ */ React28.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__ */ React28.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__ */ React28.createElement("defs", null, /* @__PURE__ */ React28.createElement("clipPath", { id: "clip0_5353_24891" }, /* @__PURE__ */ React28.createElement("rect", { width: "60", height: "60", fill: "white", transform: "translate(0 0.5)" }))));
3442
+ };
3443
+
2703
3444
  // src/Components/Calendario/Views/MonthView.tsx
2704
3445
  dayjs4.extend(localeData);
2705
3446
  dayjs4.extend(isBetween);
2706
- var MonthView = ({ events, onDayClick, onMoreClick, currentDate, onEventClick }) => {
3447
+ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEventClick, onEventHover }) => {
3448
+ const noEvents = events.length === 0;
2707
3449
  const days = getMonthDays(currentDate);
2708
3450
  const weekDays = Array.from({ length: 7 }, (_, i) => dayjs4().day(i));
2709
- const [openDrawer, setOpenDrawer] = React21.useState(false);
2710
- const [selectedDay, setSelectedDay] = React21.useState(null);
2711
- const [selectedEvents, setSelectedEvents] = React21.useState([]);
2712
- return /* @__PURE__ */ React21.createElement(Box16, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ React21.createElement(Box16, { minWidth: "1050px" }, /* @__PURE__ */ React21.createElement(Box16, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ React21.createElement(Box16, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ React21.createElement(Typography18, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), /* @__PURE__ */ React21.createElement(Box16, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5 }, days.map((day) => {
3451
+ const [openDrawer, setOpenDrawer] = React29.useState(false);
3452
+ const [selectedDay, setSelectedDay] = React29.useState(null);
3453
+ const [selectedEvents, setSelectedEvents] = React29.useState([]);
3454
+ return /* @__PURE__ */ React29.createElement(Box18, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ React29.createElement(Box18, { minWidth: "1050px" }, /* @__PURE__ */ React29.createElement(Box18, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ React29.createElement(Box18, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ React29.createElement(Typography20, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ React29.createElement(Box18, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React29.createElement(CircularProgress2, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ React29.createElement(
3455
+ EmptyState,
3456
+ {
3457
+ title: "Inicia la gesti\xF3n de las actividades",
3458
+ subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
3459
+ icon: /* @__PURE__ */ React29.createElement(LogoCalendario, null)
3460
+ }
3461
+ ) : /* @__PURE__ */ React29.createElement(Box18, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5 }, days.map((day) => {
2713
3462
  const dayEvents = events.filter(
2714
3463
  (e) => day.isBetween(e.start.startOf("day"), e.end.endOf("day"), null, "[]")
2715
3464
  );
2716
3465
  const isCurrentMonth = day.month() === currentDate.month();
2717
- return /* @__PURE__ */ React21.createElement(
2718
- Paper2,
3466
+ return /* @__PURE__ */ React29.createElement(
3467
+ Paper3,
2719
3468
  {
2720
3469
  key: day.toString(),
2721
3470
  onClick: () => onDayClick == null ? void 0 : onDayClick(day),
@@ -2731,8 +3480,8 @@ var MonthView = ({ events, onDayClick, onMoreClick, currentDate, onEventClick })
2731
3480
  overflow: "hidden"
2732
3481
  }
2733
3482
  },
2734
- /* @__PURE__ */ React21.createElement(Box16, { p: 1, flexShrink: 0 }, /* @__PURE__ */ React21.createElement(Box16, { display: "flex", alignItems: "center", justifyContent: "flex-start" }, /* @__PURE__ */ React21.createElement(
2735
- Box16,
3483
+ /* @__PURE__ */ React29.createElement(Box18, { p: 1, flexShrink: 0 }, /* @__PURE__ */ React29.createElement(Box18, { display: "flex", alignItems: "center", justifyContent: "flex-start" }, /* @__PURE__ */ React29.createElement(
3484
+ Box18,
2736
3485
  {
2737
3486
  sx: {
2738
3487
  width: 24,
@@ -2744,16 +3493,16 @@ var MonthView = ({ events, onDayClick, onMoreClick, currentDate, onEventClick })
2744
3493
  justifyContent: "center"
2745
3494
  }
2746
3495
  },
2747
- /* @__PURE__ */ React21.createElement(
2748
- Typography18,
3496
+ /* @__PURE__ */ React29.createElement(
3497
+ Typography20,
2749
3498
  {
2750
3499
  variant: "body2",
2751
3500
  sx: { color: isToday(day) ? "white" : "text.secondary" }
2752
3501
  },
2753
3502
  day.date()
2754
3503
  )
2755
- ), dayEvents.length > 2 && /* @__PURE__ */ React21.createElement(Tooltip4, { title: "M\xE1s eventos" }, /* @__PURE__ */ React21.createElement(
2756
- IconButton10,
3504
+ ), dayEvents.length > 2 && /* @__PURE__ */ React29.createElement(Tooltip6, { title: "M\xE1s eventos" }, /* @__PURE__ */ React29.createElement(
3505
+ IconButton12,
2757
3506
  {
2758
3507
  color: "primary",
2759
3508
  size: "small",
@@ -2764,64 +3513,46 @@ var MonthView = ({ events, onDayClick, onMoreClick, currentDate, onEventClick })
2764
3513
  setSelectedEvents(dayEvents);
2765
3514
  }
2766
3515
  },
2767
- /* @__PURE__ */ React21.createElement(AddIcon, { fontSize: "small" })
3516
+ /* @__PURE__ */ React29.createElement(AddIcon, { fontSize: "small" })
2768
3517
  )))),
2769
- /* @__PURE__ */ React21.createElement(Box16, { display: "flex", flexDirection: "column", gap: 0.5, p: 1, pt: 0, overflow: "hidden" }, dayEvents.slice(0, 2).map((event2) => /* @__PURE__ */ React21.createElement(
3518
+ /* @__PURE__ */ React29.createElement(Box18, { display: "flex", flexDirection: "column", gap: 0.5, p: 1, pt: 0, overflow: "hidden" }, dayEvents.slice(0, 2).map((event2) => /* @__PURE__ */ React29.createElement(
2770
3519
  CalendarEventCard,
2771
3520
  {
2772
3521
  key: `${event2.id}-${day.toString()}`,
2773
3522
  event: event2,
2774
3523
  color: stateColors[event2.state],
2775
- onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day)
3524
+ onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
3525
+ onHover: onEventHover
2776
3526
  }
2777
3527
  ))),
2778
- dayEvents.length > 2 && /* @__PURE__ */ React21.createElement(Stack10, { justifyContent: "flex-end", px: 1, pb: 0.5, onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React21.createElement(
2779
- SCDrawer,
3528
+ dayEvents.length > 2 && /* @__PURE__ */ React29.createElement(
3529
+ Stack12,
2780
3530
  {
2781
- width: "350px",
2782
- title: day.format("DD [de] MMMM YYYY"),
2783
- open: openDrawer,
2784
- buttonDrawer: { text: `+ ${dayEvents.length}` },
2785
- anchor: "right",
2786
- actions: false,
2787
- arrayElements: [{
2788
- component: (() => {
2789
- const [first, ...rest] = dayEvents;
2790
- return /* @__PURE__ */ React21.createElement(Box16, { display: "flex", width: "100%", flexDirection: "column", height: "100%", pr: 1.5 }, /* @__PURE__ */ React21.createElement(Typography18, { width: "100%", color: "text.secondary" }, " Proximo evento "), first && /* @__PURE__ */ React21.createElement(Box16, { p: 1, pb: 1, width: "100%" }, /* @__PURE__ */ React21.createElement(
2791
- CalendarEventCard,
2792
- {
2793
- event: first,
2794
- color: stateColors[first.state],
2795
- onClick: () => onEventClick == null ? void 0 : onEventClick(first, day),
2796
- sx: {
2797
- whiteSpace: "normal",
2798
- "& .MuiTypography-root": {
2799
- whiteSpace: "normal",
2800
- overflow: "visible",
2801
- textOverflow: "unset"
2802
- }
2803
- }
2804
- }
2805
- )), /* @__PURE__ */ React21.createElement(Divider6, { flexItem: true, sx: { width: "100%" } }), /* @__PURE__ */ React21.createElement(Typography18, { width: "100%", py: 1, color: "text.secondary" }, " Eventos restantes "), /* @__PURE__ */ React21.createElement(
2806
- Box16,
2807
- {
2808
- width: "100%",
2809
- height: "100%",
2810
- flex: 1,
2811
- overflow: "auto",
2812
- p: 1,
2813
- pt: 1,
2814
- display: "flex",
2815
- flexDirection: "column",
2816
- gap: 1.5
2817
- },
2818
- rest.map((event2) => /* @__PURE__ */ React21.createElement(
3531
+ justifyItems: "center",
3532
+ px: 1,
3533
+ pb: 0.5,
3534
+ onClick: (e) => e.stopPropagation(),
3535
+ sx: { "& .MuiButtonBase-root": { width: "100%" } }
3536
+ },
3537
+ /* @__PURE__ */ React29.createElement(
3538
+ SCDrawer,
3539
+ {
3540
+ width: "350px",
3541
+ title: day.format("DD [de] MMMM YYYY"),
3542
+ open: openDrawer,
3543
+ buttonDrawer: { text: `+ ${dayEvents.length}` },
3544
+ anchor: "right",
3545
+ actions: false,
3546
+ arrayElements: [{
3547
+ component: (() => {
3548
+ const [first, ...rest] = dayEvents;
3549
+ return /* @__PURE__ */ React29.createElement(Box18, { display: "flex", width: "100%", flexDirection: "column", height: "100%", pr: 1.5 }, /* @__PURE__ */ React29.createElement(Typography20, { width: "100%", color: "text.secondary" }, " Proximo evento "), first && /* @__PURE__ */ React29.createElement(Box18, { p: 1, pb: 1, width: "100%" }, /* @__PURE__ */ React29.createElement(
2819
3550
  CalendarEventCard,
2820
3551
  {
2821
- key: `${event2.id}-${day.toString()}`,
2822
- event: event2,
2823
- color: stateColors[event2.state],
2824
- onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
3552
+ event: first,
3553
+ color: stateColors[first.state],
3554
+ onClick: () => onEventClick == null ? void 0 : onEventClick(first, day),
3555
+ onHover: onEventHover,
2825
3556
  sx: {
2826
3557
  whiteSpace: "normal",
2827
3558
  "& .MuiTypography-root": {
@@ -2831,26 +3562,68 @@ var MonthView = ({ events, onDayClick, onMoreClick, currentDate, onEventClick })
2831
3562
  }
2832
3563
  }
2833
3564
  }
2834
- ))
2835
- ));
2836
- })()
2837
- }]
2838
- }
2839
- ))
3565
+ )), /* @__PURE__ */ React29.createElement(Divider7, { flexItem: true, sx: { width: "100%" } }), /* @__PURE__ */ React29.createElement(Typography20, { width: "100%", py: 1, color: "text.secondary" }, " Eventos restantes "), /* @__PURE__ */ React29.createElement(
3566
+ Box18,
3567
+ {
3568
+ width: "100%",
3569
+ height: "100%",
3570
+ flex: 1,
3571
+ overflow: "auto",
3572
+ p: 1,
3573
+ pt: 1,
3574
+ display: "flex",
3575
+ flexDirection: "column",
3576
+ gap: 1.5
3577
+ },
3578
+ rest.map((event2) => /* @__PURE__ */ React29.createElement(
3579
+ CalendarEventCard,
3580
+ {
3581
+ key: `${event2.id}-${day.toString()}`,
3582
+ event: event2,
3583
+ color: stateColors[event2.state],
3584
+ onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
3585
+ onHover: onEventHover,
3586
+ sx: {
3587
+ whiteSpace: "normal",
3588
+ "& .MuiTypography-root": {
3589
+ whiteSpace: "normal",
3590
+ overflow: "visible",
3591
+ textOverflow: "unset"
3592
+ }
3593
+ }
3594
+ }
3595
+ ))
3596
+ ));
3597
+ })()
3598
+ }]
3599
+ }
3600
+ )
3601
+ )
2840
3602
  );
2841
3603
  }))));
2842
3604
  };
2843
3605
 
2844
3606
  // src/Components/Calendario/Views/WeekView.tsx
2845
- import React22 from "react";
2846
- import { Box as Box17, Typography as Typography19 } from "@mui/material";
3607
+ import React30 from "react";
3608
+ import { Box as Box19, CircularProgress as CircularProgress3, Typography as Typography21 } from "@mui/material";
2847
3609
  import dayjs5 from "dayjs";
2848
3610
  import localeData2 from "dayjs/plugin/localeData";
2849
3611
  dayjs5.extend(localeData2);
2850
- var WeekView = ({ events, currentDate, onDayClick, onEventClick }) => {
2851
- const startOfWeek2 = currentDate.startOf("week");
2852
- const days = Array.from({ length: 7 }, (_, i) => startOfWeek2.add(i, "day"));
2853
- const hours2 = Array.from({ length: 24 }, (_, i) => i);
3612
+ var WeekView = ({
3613
+ events,
3614
+ currentDate,
3615
+ isLoading,
3616
+ onDayClick,
3617
+ onEventClick,
3618
+ onEventHover,
3619
+ startHour = 0,
3620
+ endHour = 23
3621
+ }) => {
3622
+ const noEvents = events.length === 0;
3623
+ const todayString = dayjs5().format("YYYY-MM-DD");
3624
+ const startOfWeek3 = currentDate.startOf("week");
3625
+ const days = Array.from({ length: 7 }, (_, i) => startOfWeek3.add(i, "day"));
3626
+ const hours = Array.from({ length: endHour - startHour + 1 }, (_, i) => startHour + i);
2854
3627
  const getCellBorderType = (cellHour, dayEvents) => {
2855
3628
  for (const event2 of dayEvents) {
2856
3629
  const start = event2.start.hour() + event2.start.minute() / 60;
@@ -2858,8 +3631,7 @@ var WeekView = ({ events, currentDate, onDayClick, onEventClick }) => {
2858
3631
  const cellStart = cellHour;
2859
3632
  const cellEnd = cellHour + 1;
2860
3633
  if (cellEnd > start && cellStart < end) {
2861
- if (Math.abs(cellStart - start) < 0.01 && Math.abs(cellEnd - end) < 0.01)
2862
- return "full";
3634
+ if (Math.abs(cellStart - start) < 0.01 && Math.abs(cellEnd - end) < 0.01) return "full";
2863
3635
  if (Math.abs(cellStart - start) < 0.01) return "start";
2864
3636
  if (Math.abs(cellEnd - end) < 0.01) return "end";
2865
3637
  return "middle";
@@ -2867,92 +3639,122 @@ var WeekView = ({ events, currentDate, onDayClick, onEventClick }) => {
2867
3639
  }
2868
3640
  return "none";
2869
3641
  };
2870
- return /* @__PURE__ */ React22.createElement(Box17, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React22.createElement(Box17, { display: "flex", bgcolor: "background.default" }, /* @__PURE__ */ React22.createElement(Box17, { width: 45, bgcolor: "background.default" }), days.map((day) => /* @__PURE__ */ React22.createElement(
2871
- Box17,
2872
- {
2873
- key: day.toString(),
2874
- height: 40,
2875
- flex: 1,
2876
- pl: 0.5,
2877
- textAlign: "center",
2878
- display: "flex",
2879
- flexDirection: "column",
2880
- justifyContent: "center",
2881
- alignItems: "flex-start"
2882
- },
2883
- /* @__PURE__ */ React22.createElement(Typography19, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
2884
- ))), /* @__PURE__ */ React22.createElement(Box17, { display: "flex", flex: 1 }, /* @__PURE__ */ React22.createElement(Box17, { width: 45, bgcolor: "background.default" }, hours2.map((h) => /* @__PURE__ */ React22.createElement(
2885
- Box17,
2886
- {
2887
- key: h,
2888
- height: 60,
2889
- textAlign: "right",
2890
- pr: 1,
2891
- borderTop: "1px solid",
2892
- borderColor: "divider"
2893
- },
2894
- /* @__PURE__ */ React22.createElement(Typography19, { variant: "caption", color: "text.secondary" }, dayjs5().hour(h).format("h A"))
2895
- ))), days.map((day) => {
2896
- const dayEvents = events.filter(
2897
- (event2) => day.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
2898
- );
2899
- return /* @__PURE__ */ React22.createElement(
2900
- Box17,
3642
+ return /* @__PURE__ */ React30.createElement(Box19, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React30.createElement(Box19, { display: "flex", bgcolor: "transparent" }, /* @__PURE__ */ React30.createElement(Box19, { width: 45, bgcolor: "transparent" }), days.map((day) => {
3643
+ const isToday2 = day.format("YYYY-MM-DD") === todayString;
3644
+ return /* @__PURE__ */ React30.createElement(
3645
+ Box19,
2901
3646
  {
2902
3647
  key: day.toString(),
3648
+ height: 40,
2903
3649
  flex: 1,
2904
- borderLeft: "1px solid",
2905
- borderColor: "divider",
2906
- position: "relative",
2907
- "data-testid": `week-day-column-${day.format("YYYY-MM-DD")}`,
2908
- onClick: () => onDayClick == null ? void 0 : onDayClick(day)
3650
+ pl: 0.5,
3651
+ textAlign: "center",
3652
+ display: "flex",
3653
+ flexDirection: "column",
3654
+ justifyContent: "center",
3655
+ alignItems: "flex-start",
3656
+ bgcolor: isToday2 ? "primary.100" : "transparent",
3657
+ borderRadius: isToday2 ? "6px 6px 0 0" : "0",
3658
+ borderBottom: isToday2 ? 2 : 0,
3659
+ borderColor: isToday2 ? "primary.main" : "transparent"
2909
3660
  },
2910
- hours2.map((hourIdx) => {
2911
- const borderType = getCellBorderType(hourIdx, dayEvents);
2912
- return /* @__PURE__ */ React22.createElement(
2913
- Box17,
2914
- {
2915
- key: hourIdx,
2916
- height: 60,
2917
- borderTop: "1px solid",
2918
- borderColor: borderType === "start" || borderType === "full" || borderType === "none" ? "divider" : "transparent",
2919
- borderBottom: borderType === "end" || borderType === "full" ? "1px solid divider" : void 0
2920
- }
2921
- );
2922
- }),
2923
- dayEvents.map((event2) => {
2924
- const eventStart = day.isSame(event2.start, "day") ? event2.start : day.startOf("day").hour(0).minute(0);
2925
- const eventEnd = day.isSame(event2.end, "day") ? event2.end : day.endOf("day").hour(23).minute(59);
2926
- const startMinutes = eventStart.hour() * 60 + eventStart.minute();
2927
- const durationMinutes = eventEnd.diff(eventStart, "minute");
2928
- return /* @__PURE__ */ React22.createElement(
2929
- CalendarEventCard,
2930
- {
2931
- key: `${event2.id}-${day.toString()}`,
2932
- event: event2,
2933
- color: stateColors[event2.state],
2934
- onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
2935
- sx: {
2936
- position: "absolute",
2937
- top: `${startMinutes + 15}px`,
2938
- left: 4,
2939
- right: 4,
2940
- cursor: "pointer",
2941
- height: "auto"
2942
- }
2943
- }
2944
- );
2945
- })
3661
+ /* @__PURE__ */ React30.createElement(Typography21, { variant: "h6", color: "text.primary" }, day.format("D")),
3662
+ /* @__PURE__ */ React30.createElement(Typography21, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
2946
3663
  );
2947
- })));
3664
+ })), isLoading ? /* @__PURE__ */ React30.createElement(Box19, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React30.createElement(CircularProgress3, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ React30.createElement(
3665
+ EmptyState,
3666
+ {
3667
+ title: "Inicia la gesti\xF3n de las actividades",
3668
+ subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
3669
+ icon: /* @__PURE__ */ React30.createElement(LogoCalendario, null)
3670
+ }
3671
+ ) : (
3672
+ // Grid de horas y eventos
3673
+ /* @__PURE__ */ React30.createElement(Box19, { display: "flex", flex: 1 }, /* @__PURE__ */ React30.createElement(Box19, { width: 45, bgcolor: "transparent" }, hours.map((h) => /* @__PURE__ */ React30.createElement(
3674
+ Box19,
3675
+ {
3676
+ key: h,
3677
+ height: 60,
3678
+ textAlign: "right",
3679
+ pr: 1,
3680
+ borderColor: "divider"
3681
+ },
3682
+ /* @__PURE__ */ React30.createElement(Typography21, { variant: "caption", color: "text.secondary" }, dayjs5().hour(h).format("h A"))
3683
+ ))), days.map((day) => {
3684
+ const dayEvents = events.filter(
3685
+ (event2) => day.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
3686
+ ).filter((event2) => {
3687
+ const startsInRange = event2.start.hour() >= startHour && event2.start.hour() <= endHour;
3688
+ const endsInRange = event2.end.hour() >= startHour && event2.end.hour() <= endHour;
3689
+ return startsInRange || endsInRange;
3690
+ }).sort((a, b) => a.start.valueOf() - b.start.valueOf());
3691
+ return /* @__PURE__ */ React30.createElement(
3692
+ Box19,
3693
+ {
3694
+ key: day.toString(),
3695
+ flex: 1,
3696
+ borderLeft: "1px solid",
3697
+ borderColor: "divider",
3698
+ position: "relative",
3699
+ "data-testid": `week-day-column-${day.format("YYYY-MM-DD")}`,
3700
+ onClick: () => onDayClick == null ? void 0 : onDayClick(day)
3701
+ },
3702
+ hours.map((hourIdx) => {
3703
+ const borderType = getCellBorderType(hourIdx, dayEvents);
3704
+ return /* @__PURE__ */ React30.createElement(
3705
+ Box19,
3706
+ {
3707
+ key: hourIdx,
3708
+ height: 60,
3709
+ borderTop: "1px solid",
3710
+ borderColor: borderType === "start" || borderType === "full" || borderType === "none" ? "divider" : "transparent",
3711
+ borderBottom: borderType === "end" || borderType === "full" ? "1px solid divider" : void 0
3712
+ }
3713
+ );
3714
+ }),
3715
+ dayEvents.map((event2) => {
3716
+ const eventStart = day.isSame(event2.start, "day") ? event2.start : day.startOf("day").hour(startHour).minute(0);
3717
+ const eventEnd = day.isSame(event2.end, "day") ? event2.end : day.endOf("day").hour(endHour).minute(59);
3718
+ const startMinutes = (eventStart.hour() - startHour) * 60 + eventStart.minute();
3719
+ const durationMinutes = eventEnd.diff(eventStart, "minute");
3720
+ return /* @__PURE__ */ React30.createElement(
3721
+ CalendarEventCard,
3722
+ {
3723
+ key: `${event2.id}-${day.toString()}`,
3724
+ event: event2,
3725
+ color: stateColors[event2.state],
3726
+ onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
3727
+ onHover: onEventHover,
3728
+ sx: {
3729
+ position: "absolute",
3730
+ top: `${startMinutes}px`,
3731
+ left: 4,
3732
+ right: 4,
3733
+ cursor: "pointer",
3734
+ height: `${durationMinutes}px`
3735
+ }
3736
+ }
3737
+ );
3738
+ })
3739
+ );
3740
+ }))
3741
+ ));
2948
3742
  };
2949
3743
 
2950
3744
  // src/Components/Calendario/Views/DayView.tsx
2951
- import React23 from "react";
2952
- import { Box as Box18, Typography as Typography20 } from "@mui/material";
3745
+ import React31 from "react";
3746
+ import { Box as Box20, CircularProgress as CircularProgress4, Typography as Typography22 } from "@mui/material";
2953
3747
  import dayjs6 from "dayjs";
2954
- var hours = Array.from({ length: 24 }, (_, i) => i);
2955
- var DayView = ({ events, currentDate, onEventClick }) => {
3748
+ var DayView = ({
3749
+ events,
3750
+ currentDate,
3751
+ isLoading,
3752
+ onEventClick,
3753
+ onEventHover,
3754
+ startHour = 0,
3755
+ endHour = 24
3756
+ }) => {
3757
+ const hours = Array.from({ length: endHour - startHour + 1 }, (_, i) => startHour + i);
2956
3758
  const getCellBorderType = (cellHour, dayEvents2) => {
2957
3759
  for (const event2 of dayEvents2) {
2958
3760
  const start = event2.start.hour() + event2.start.minute() / 60;
@@ -2960,8 +3762,7 @@ var DayView = ({ events, currentDate, onEventClick }) => {
2960
3762
  const cellStart = cellHour;
2961
3763
  const cellEnd = cellHour + 1;
2962
3764
  if (cellEnd > start && cellStart < end) {
2963
- if (Math.abs(cellStart - start) < 0.01 && Math.abs(cellEnd - end) < 0.01)
2964
- return "full";
3765
+ if (Math.abs(cellStart - start) < 0.01 && Math.abs(cellEnd - end) < 0.01) return "full";
2965
3766
  if (Math.abs(cellStart - start) < 0.01) return "start";
2966
3767
  if (Math.abs(cellEnd - end) < 0.01) return "end";
2967
3768
  return "middle";
@@ -2972,21 +3773,16 @@ var DayView = ({ events, currentDate, onEventClick }) => {
2972
3773
  const dayEvents = events.filter(
2973
3774
  (event2) => currentDate.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
2974
3775
  );
2975
- return /* @__PURE__ */ React23.createElement(Box18, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React23.createElement(Box18, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ React23.createElement(Box18, { width: 47, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ React23.createElement(
2976
- Box18,
3776
+ const noEvents = events.length === 0;
3777
+ return /* @__PURE__ */ React31.createElement(Box20, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React31.createElement(Box20, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ React31.createElement(Box20, { width: 47, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ React31.createElement(Box20, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ React31.createElement(Typography22, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ React31.createElement(Typography22, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ React31.createElement(Box20, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React31.createElement(CircularProgress4, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : noEvents ? /* @__PURE__ */ React31.createElement(
3778
+ EmptyState,
2977
3779
  {
2978
- flex: 1,
2979
- display: "flex",
2980
- flexDirection: "column",
2981
- textAlign: "start",
2982
- gap: 0.5,
2983
- py: 1,
2984
- bgcolor: "primary.50"
2985
- },
2986
- /* @__PURE__ */ React23.createElement(Typography20, { variant: "h6", color: "text.secondary" }, currentDate.format("D")),
2987
- /* @__PURE__ */ React23.createElement(Typography20, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd"))
2988
- )), /* @__PURE__ */ React23.createElement(Box18, { display: "flex", flex: 1 }, /* @__PURE__ */ React23.createElement(Box18, { width: 47, bgcolor: "background.default" }, hours.map((h) => /* @__PURE__ */ React23.createElement(
2989
- Box18,
3780
+ title: "Inicia la gesti\xF3n de las actividades",
3781
+ subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
3782
+ icon: /* @__PURE__ */ React31.createElement(LogoCalendario, null)
3783
+ }
3784
+ ) : /* @__PURE__ */ React31.createElement(Box20, { display: "flex", flex: 1 }, /* @__PURE__ */ React31.createElement(Box20, { width: 47, bgcolor: "background.default" }, hours.map((h) => /* @__PURE__ */ React31.createElement(
3785
+ Box20,
2990
3786
  {
2991
3787
  key: h,
2992
3788
  height: 60,
@@ -2996,11 +3792,11 @@ var DayView = ({ events, currentDate, onEventClick }) => {
2996
3792
  borderRight: "1px solid",
2997
3793
  borderColor: "divider"
2998
3794
  },
2999
- /* @__PURE__ */ React23.createElement(Typography20, { variant: "caption", color: "text.secondary" }, dayjs6().hour(h).format("h A"))
3000
- ))), /* @__PURE__ */ React23.createElement(Box18, { flex: 1, position: "relative" }, hours.map((hourIdx) => {
3795
+ /* @__PURE__ */ React31.createElement(Typography22, { variant: "caption", color: "text.secondary" }, dayjs6().hour(h).format("h A"))
3796
+ ))), /* @__PURE__ */ React31.createElement(Box20, { flex: 1, position: "relative" }, hours.map((hourIdx) => {
3001
3797
  const borderType = getCellBorderType(hourIdx, dayEvents);
3002
- return /* @__PURE__ */ React23.createElement(
3003
- Box18,
3798
+ return /* @__PURE__ */ React31.createElement(
3799
+ Box20,
3004
3800
  {
3005
3801
  key: hourIdx,
3006
3802
  height: 60,
@@ -3010,20 +3806,26 @@ var DayView = ({ events, currentDate, onEventClick }) => {
3010
3806
  }
3011
3807
  );
3012
3808
  }), dayEvents.map((event2) => {
3013
- const eventStart = currentDate.isSame(event2.start, "day") ? event2.start : currentDate.startOf("day").hour(0).minute(0);
3014
- const eventEnd = currentDate.isSame(event2.end, "day") ? event2.end : currentDate.endOf("day").hour(23).minute(59);
3015
- const startMinutes = eventStart.hour() * 60 + eventStart.minute();
3016
- const durationMinutes = eventEnd.diff(eventStart, "minute");
3017
- return /* @__PURE__ */ React23.createElement(
3809
+ const eventStart = currentDate.isSame(event2.start, "day") ? event2.start : currentDate.startOf("day");
3810
+ const eventEnd = currentDate.isSame(event2.end, "day") ? event2.end : currentDate.endOf("day");
3811
+ const minStart = currentDate.hour(startHour).minute(0);
3812
+ const maxEnd = currentDate.hour(endHour).minute(0);
3813
+ const clampedStart = eventStart.isBefore(minStart) ? minStart : eventStart;
3814
+ const clampedEnd = eventEnd.isAfter(maxEnd) ? maxEnd : eventEnd;
3815
+ const startMinutes = (clampedStart.hour() - startHour) * 60 + clampedStart.minute();
3816
+ const durationMinutes = clampedEnd.diff(clampedStart, "minute");
3817
+ return /* @__PURE__ */ React31.createElement(
3018
3818
  CalendarEventCard,
3019
3819
  {
3020
3820
  key: `${event2.id}-${currentDate.toString()}`,
3021
3821
  event: event2,
3022
3822
  color: stateColors[event2.state],
3023
- onClick: () => onEventClick == null ? void 0 : onEventClick(event2),
3823
+ onClick: () => onEventClick == null ? void 0 : onEventClick(event2, currentDate),
3824
+ onHover: onEventHover,
3024
3825
  sx: {
3025
3826
  position: "absolute",
3026
- top: `${startMinutes + 15}px`,
3827
+ top: `${startMinutes}px`,
3828
+ height: `${durationMinutes}px`,
3027
3829
  left: 4,
3028
3830
  right: 4
3029
3831
  }
@@ -3033,17 +3835,27 @@ var DayView = ({ events, currentDate, onEventClick }) => {
3033
3835
  };
3034
3836
 
3035
3837
  // src/Components/Calendario/Calendar.tsx
3838
+ import dayjs7 from "dayjs";
3036
3839
  var Calendar = ({
3037
3840
  events,
3038
3841
  onDayClick,
3039
3842
  onMoreClick,
3040
3843
  onEventClick,
3844
+ onEventHover,
3845
+ onDateChange,
3041
3846
  view: initialView = "month",
3042
3847
  onViewChange,
3043
- toolbar
3848
+ toolbar,
3849
+ isLoading = false,
3850
+ startHour = 0,
3851
+ // <- valor por defecto
3852
+ endHour = 23
3044
3853
  }) => {
3045
- const [view, setView] = useState12(initialView);
3046
- const [currentDate, setCurrentDate] = useState12(dayjs7());
3854
+ const [view, setView] = useState14(initialView);
3855
+ const [currentDate, setCurrentDate] = useState14(dayjs7());
3856
+ useEffect18(() => {
3857
+ onDateChange == null ? void 0 : onDateChange(currentDate);
3858
+ }, []);
3047
3859
  const handleViewChange = (newView) => {
3048
3860
  setView(newView);
3049
3861
  onViewChange == null ? void 0 : onViewChange(newView);
@@ -3051,12 +3863,19 @@ var Calendar = ({
3051
3863
  const handleNavigate = (action) => {
3052
3864
  let newDate = currentDate;
3053
3865
  const unit = view === "month" ? "month" : "day";
3054
- if (action === "PREV") newDate = currentDate.subtract(1, unit);
3055
- else if (action === "NEXT") newDate = currentDate.add(1, unit);
3056
- else if (action === "TODAY") newDate = dayjs7();
3866
+ if (action === "PREV") {
3867
+ if (view === "day") newDate = currentDate.subtract(1, "day");
3868
+ if (view === "week") newDate = currentDate.subtract(1, "week");
3869
+ if (view === "month") newDate = currentDate.subtract(1, "month");
3870
+ } else if (action === "NEXT") {
3871
+ if (view === "day") newDate = currentDate.add(1, "day");
3872
+ if (view === "week") newDate = currentDate.add(1, "week");
3873
+ if (view === "month") newDate = currentDate.add(1, "month");
3874
+ } else if (action === "TODAY") newDate = dayjs7();
3057
3875
  setCurrentDate(newDate);
3876
+ onDateChange == null ? void 0 : onDateChange(newDate);
3058
3877
  };
3059
- return /* @__PURE__ */ React24.createElement(Box19, null, /* @__PURE__ */ React24.createElement(
3878
+ return /* @__PURE__ */ React32.createElement(Box21, null, /* @__PURE__ */ React32.createElement(
3060
3879
  CalendarToolbar,
3061
3880
  {
3062
3881
  labelDate: currentDate,
@@ -3065,39 +3884,416 @@ var Calendar = ({
3065
3884
  onNavigate: handleNavigate
3066
3885
  },
3067
3886
  toolbar
3068
- ), view === "month" && /* @__PURE__ */ React24.createElement(
3887
+ ), isLoading ? /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(Box21, null, /* @__PURE__ */ React32.createElement(
3888
+ Box21,
3889
+ {
3890
+ display: "flex",
3891
+ justifyContent: "center",
3892
+ alignItems: "center",
3893
+ height: "400px"
3894
+ },
3895
+ /* @__PURE__ */ React32.createElement(CircularProgress5, { variant: "indeterminate" })
3896
+ ))) : /* @__PURE__ */ React32.createElement(React32.Fragment, null, view === "month" && /* @__PURE__ */ React32.createElement(
3069
3897
  MonthView,
3070
3898
  {
3071
3899
  events,
3900
+ currentDate,
3072
3901
  onDayClick,
3073
3902
  onMoreClick,
3074
3903
  onEventClick,
3075
- currentDate
3904
+ onEventHover
3076
3905
  }
3077
- ), view === "week" && /* @__PURE__ */ React24.createElement(
3906
+ ), view === "week" && /* @__PURE__ */ React32.createElement(
3078
3907
  WeekView,
3079
3908
  {
3080
3909
  events,
3081
3910
  currentDate,
3082
3911
  onDayClick,
3083
3912
  onMoreClick,
3084
- onEventClick
3913
+ onEventClick,
3914
+ onEventHover,
3915
+ startHour,
3916
+ endHour
3085
3917
  }
3086
- ), view === "day" && /* @__PURE__ */ React24.createElement(
3918
+ ), view === "day" && /* @__PURE__ */ React32.createElement(
3087
3919
  DayView,
3088
3920
  {
3089
3921
  events,
3090
3922
  currentDate,
3091
- onEventClick
3923
+ onEventClick,
3924
+ onEventHover,
3925
+ startHour,
3926
+ endHour
3092
3927
  }
3093
- ));
3928
+ )));
3929
+ };
3930
+
3931
+ // src/Components/SCTime.tsx
3932
+ import React33, { useState as useState15 } from "react";
3933
+ import { Box as Box22, InputAdornment as InputAdornment6, Popover as Popover6, ClickAwayListener as ClickAwayListener2 } from "@mui/material";
3934
+ import { LocalizationProvider as LocalizationProvider3 } from "@mui/x-date-pickers/LocalizationProvider";
3935
+ import { AdapterDayjs as AdapterDayjs2 } from "@mui/x-date-pickers/AdapterDayjs";
3936
+ import dayjs8 from "dayjs";
3937
+ import "dayjs/locale/es";
3938
+ import { LicenseInfo as LicenseInfo3 } from "@mui/x-license-pro";
3939
+ import AccessTimeIcon from "@mui/icons-material/AccessTime";
3940
+ import { TimeField } from "@mui/x-date-pickers/TimeField";
3941
+ import { DigitalClock } from "@mui/x-date-pickers/DigitalClock";
3942
+ var SCTime = ({
3943
+ label = "Hora",
3944
+ required = false,
3945
+ disabled = false,
3946
+ background = "transparent",
3947
+ timeStep = 5,
3948
+ state,
3949
+ setState
3950
+ }) => {
3951
+ LicenseInfo3.setLicenseKey(
3952
+ "77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
3953
+ );
3954
+ const isTimeEmpty = required && !state;
3955
+ const hasError = isTimeEmpty;
3956
+ const [anchorEl, setAnchorEl] = useState15(null);
3957
+ const [isOpenPopover, setIsOpenPopover] = useState15(false);
3958
+ const [popoverPlacement, setPopoverPlacement] = useState15("bottom");
3959
+ const detectPlacement = (element) => {
3960
+ const rect = element.getBoundingClientRect();
3961
+ const windowHeight = window.innerHeight;
3962
+ const spaceBelow = windowHeight - rect.bottom;
3963
+ const spaceAbove = rect.top;
3964
+ const popoverHeight = 300;
3965
+ if (spaceBelow < popoverHeight && spaceAbove > spaceBelow) {
3966
+ setPopoverPlacement("top");
3967
+ } else {
3968
+ setPopoverPlacement("bottom");
3969
+ }
3970
+ };
3971
+ const handleTimeFieldClick = (event2) => {
3972
+ if (!disabled) {
3973
+ const target = event2.currentTarget;
3974
+ setAnchorEl(target);
3975
+ detectPlacement(target);
3976
+ setIsOpenPopover(true);
3977
+ }
3978
+ };
3979
+ const handleTimeChange = (newValue) => {
3980
+ const dayjsValue = newValue ? dayjs8(newValue) : null;
3981
+ setState(dayjsValue);
3982
+ setIsOpenPopover(false);
3983
+ setAnchorEl(null);
3984
+ };
3985
+ const handleClose = () => {
3986
+ setIsOpenPopover(false);
3987
+ setAnchorEl(null);
3988
+ };
3989
+ return /* @__PURE__ */ React33.createElement(LocalizationProvider3, { dateAdapter: AdapterDayjs2 }, /* @__PURE__ */ React33.createElement(Box22, { sx: { position: "relative", width: "120px" } }, /* @__PURE__ */ React33.createElement(
3990
+ TimeField,
3991
+ {
3992
+ label,
3993
+ value: state,
3994
+ disabled,
3995
+ required,
3996
+ error: hasError,
3997
+ onClick: handleTimeFieldClick,
3998
+ slotProps: {
3999
+ textField: {
4000
+ InputProps: {
4001
+ endAdornment: /* @__PURE__ */ React33.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React33.createElement(
4002
+ AccessTimeIcon,
4003
+ {
4004
+ color: disabled ? "disabled" : "action",
4005
+ sx: { cursor: disabled ? "default" : "pointer" },
4006
+ fontSize: "small"
4007
+ }
4008
+ )),
4009
+ sx: {
4010
+ backgroundColor: background,
4011
+ padding: "8px 12px",
4012
+ cursor: disabled ? "default" : "pointer",
4013
+ "& input": {
4014
+ cursor: disabled ? "default" : "pointer"
4015
+ }
4016
+ }
4017
+ }
4018
+ }
4019
+ },
4020
+ sx: {
4021
+ width: "100%",
4022
+ "& .MuiInputBase-input": {
4023
+ cursor: disabled ? "default" : "pointer"
4024
+ },
4025
+ "& .MuiPickersSectionList-root": {
4026
+ padding: "0px !important"
4027
+ }
4028
+ }
4029
+ }
4030
+ ), /* @__PURE__ */ React33.createElement(
4031
+ Popover6,
4032
+ {
4033
+ open: isOpenPopover,
4034
+ anchorEl,
4035
+ onClose: handleClose,
4036
+ anchorOrigin: {
4037
+ vertical: popoverPlacement === "top" ? "top" : "bottom",
4038
+ horizontal: "left"
4039
+ },
4040
+ transformOrigin: {
4041
+ vertical: popoverPlacement === "top" ? "bottom" : "top",
4042
+ horizontal: "left"
4043
+ },
4044
+ marginThreshold: 0,
4045
+ disableScrollLock: true,
4046
+ slotProps: {
4047
+ paper: {
4048
+ sx: {
4049
+ boxShadow: "0px 4px 20px rgba(0, 0, 0, 0.1)",
4050
+ borderRadius: 1,
4051
+ border: "1px solid #e0e0e0",
4052
+ maxHeight: "300px",
4053
+ overflow: "visible"
4054
+ }
4055
+ }
4056
+ }
4057
+ },
4058
+ /* @__PURE__ */ React33.createElement(ClickAwayListener2, { onClickAway: handleClose }, /* @__PURE__ */ React33.createElement(Box22, { sx: { p: 0 } }, /* @__PURE__ */ React33.createElement(
4059
+ DigitalClock,
4060
+ {
4061
+ value: state,
4062
+ onChange: handleTimeChange,
4063
+ timeStep,
4064
+ sx: {
4065
+ "& .MuiList-root": {
4066
+ maxHeight: "250px",
4067
+ overflow: "auto"
4068
+ },
4069
+ "& .MuiMenuItem-root": {
4070
+ fontSize: "0.875rem",
4071
+ py: 0.5
4072
+ }
4073
+ }
4074
+ }
4075
+ )))
4076
+ )));
4077
+ };
4078
+
4079
+ // src/Components/SCCard.tsx
4080
+ import React34 from "react";
4081
+ import { Button as Button13, Box as Box23, SvgIcon as SvgIcon9 } from "@mui/material";
4082
+ import IconButton13 from "@mui/material/IconButton";
4083
+ import Card from "@mui/material/Card";
4084
+ import CardHeader from "@mui/material/CardHeader";
4085
+ import CardMedia from "@mui/material/CardMedia";
4086
+ import CardContent from "@mui/material/CardContent";
4087
+ import CardActions from "@mui/material/CardActions";
4088
+ import Collapse from "@mui/material/Collapse";
4089
+ import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
4090
+ import * as Muicon9 from "@mui/icons-material";
4091
+ var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
4092
+ let iconTitleValidation = "";
4093
+ let IconTitle;
4094
+ const [expanded, setExpanded] = React34.useState(false);
4095
+ if (iconTitle) {
4096
+ if (Muicon9[iconTitle] == void 0) {
4097
+ if (iconTitle && React34.isValidElement(iconTitle) && iconTitle.type == void 0) {
4098
+ iconTitleValidation = "image";
4099
+ IconTitle = iconTitle;
4100
+ } else {
4101
+ iconTitleValidation = "icon";
4102
+ IconTitle = iconTitle;
4103
+ }
4104
+ } else {
4105
+ iconTitleValidation = "icon";
4106
+ IconTitle = Muicon9[iconTitle];
4107
+ }
4108
+ }
4109
+ const handleExpandClick = () => {
4110
+ setExpanded(!expanded);
4111
+ };
4112
+ return /* @__PURE__ */ React34.createElement(Card, { sx: { maxWidth: 345 } }, title && /* @__PURE__ */ React34.createElement(
4113
+ CardHeader,
4114
+ {
4115
+ avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React34.createElement(Box23, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React34.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React34.createElement(SvgIcon9, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
4116
+ action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React34.createElement(Button13, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React34.createElement(IconButton13, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React34.createElement(ExpandMoreIcon, { fontSize: "small" })) : actionsTitle,
4117
+ title,
4118
+ subheader: subtitle,
4119
+ sx: {
4120
+ "& .MuiCardHeader-title": {
4121
+ fontSize: "14px",
4122
+ color: "text.primary"
4123
+ },
4124
+ "& .MuiCardHeader-subheader": {
4125
+ fontSize: "13px",
4126
+ color: "text.secondary"
4127
+ },
4128
+ "& .MuiCardHeader-action": {
4129
+ height: "40px !important",
4130
+ display: "flex",
4131
+ alignItems: "center"
4132
+ }
4133
+ }
4134
+ }
4135
+ ), image && /* @__PURE__ */ React34.createElement(
4136
+ CardMedia,
4137
+ {
4138
+ component: "img",
4139
+ height: "194",
4140
+ image
4141
+ }
4142
+ ), content && /* @__PURE__ */ React34.createElement(CardContent, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ React34.createElement(CardActions, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React34.createElement(Button13, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React34.createElement(IconButton13, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ React34.createElement(ExpandMoreIcon, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ React34.createElement(
4143
+ Button13,
4144
+ {
4145
+ key: index,
4146
+ size: "small",
4147
+ color: action.color || "primary",
4148
+ variant: action.variant || "text",
4149
+ onClick: action.fn,
4150
+ disabled: action.disabled || false
4151
+ },
4152
+ action.text
4153
+ )) : ""), expand && /* @__PURE__ */ React34.createElement(Collapse, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React34.createElement(CardContent, { sx: { padding: "8px 16px !important" } }, expand.content)));
4154
+ };
4155
+
4156
+ // src/Components/SCActivityCalendar.tsx
4157
+ import React35, { useState as useState17 } from "react";
4158
+ import { Typography as Typography25, IconButton as IconButton14, Box as Box24, Badge as Badge2 } from "@mui/material";
4159
+ import Grid9 from "@mui/material/Grid2";
4160
+ import { AdapterDateFns as AdapterDateFns2 } from "@mui/x-date-pickers/AdapterDateFns";
4161
+ import { LocalizationProvider as LocalizationProvider4 } from "@mui/x-date-pickers/LocalizationProvider";
4162
+ import { StaticDatePicker as StaticDatePicker2 } from "@mui/x-date-pickers/StaticDatePicker";
4163
+ import { es as es2 } from "date-fns/locale";
4164
+ import { format as format2, startOfWeek as startOfWeek2, addDays as addDays2, isSameDay as isSameDay2 } from "date-fns";
4165
+ import KeyboardDoubleArrowDownIcon2 from "@mui/icons-material/KeyboardDoubleArrowDown";
4166
+ import KeyboardDoubleArrowUpIcon2 from "@mui/icons-material/KeyboardDoubleArrowUp";
4167
+ import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
4168
+ import LightModeOutlinedIcon from "@mui/icons-material/LightModeOutlined";
4169
+ var SCActivityCalendar = ({
4170
+ //informativas
4171
+ //apariencia
4172
+ background,
4173
+ //funcionales
4174
+ setState,
4175
+ state,
4176
+ events,
4177
+ fn,
4178
+ configRangeHour
4179
+ }) => {
4180
+ let convertFecha;
4181
+ const [fecha, setFecha] = useState17(/* @__PURE__ */ new Date());
4182
+ const [fechaSeleccionada, setFechaSeleccionada] = useState17();
4183
+ const [stateVal, setstateVal] = React35.useState(/* @__PURE__ */ new Date());
4184
+ const [openCalendar, setOpenCalendar] = React35.useState(false);
4185
+ const hoy = /* @__PURE__ */ new Date();
4186
+ const inicioSemana = startOfWeek2(fecha, { weekStartsOn: 0 });
4187
+ const diasSemana = Array.from({ length: 7 }, (_, i) => addDays2(inicioSemana, i));
4188
+ React35.useEffect(() => {
4189
+ if (fecha != null) {
4190
+ handleConvertFecha(fecha);
4191
+ }
4192
+ }, [fecha]);
4193
+ const handleConvertFecha = (fecha2) => {
4194
+ if (fecha2) {
4195
+ let day = (fecha2.getDate() < 10 ? "0" : "") + fecha2.getDate();
4196
+ let month = (fecha2.getMonth() + 1 < 10 ? "0" : "") + (fecha2.getMonth() + 1);
4197
+ let year = fecha2.getFullYear();
4198
+ convertFecha = day + "/" + month + "/" + year;
4199
+ setState(convertFecha);
4200
+ setFecha(fecha2);
4201
+ }
4202
+ };
4203
+ const toggleCalendar = (newOpen) => () => {
4204
+ setOpenCalendar(newOpen);
4205
+ };
4206
+ const locale = __spreadProps(__spreadValues({}, es2), {
4207
+ options: {
4208
+ weekStartsOn: 0
4209
+ // 0 para domingo, 1 para lunes, etc.
4210
+ }
4211
+ });
4212
+ return /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(LocalizationProvider4, { dateAdapter: AdapterDateFns2, adapterLocale: es2 }, openCalendar == false ? /* @__PURE__ */ React35.createElement(Box24, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React35.createElement(Box24, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ React35.createElement(Grid9, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React35.createElement(Grid9, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React35.createElement(Box24, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React35.createElement(Typography25, { sx: { fontSize: "12px !important", color: "#10184099" } }, format2(dia, "EEEE", { locale: es2 }).charAt(0).toUpperCase())), /* @__PURE__ */ React35.createElement(
4213
+ Box24,
4214
+ {
4215
+ onClick: () => setFecha(dia),
4216
+ sx: {
4217
+ padding: "10px",
4218
+ textAlign: "center",
4219
+ backgroundColor: isSameDay2(dia, fecha) ? "#2063a0" : "transparent",
4220
+ cursor: "pointer",
4221
+ borderRadius: "50%",
4222
+ //border: '1px solid lightgray',
4223
+ position: "relative"
4224
+ //width: '36px',
4225
+ //height: '36px',
4226
+ }
4227
+ },
4228
+ /* @__PURE__ */ React35.createElement(Typography25, { sx: { fontSize: "12px !important", color: isSameDay2(dia, fecha) ? "white" : "#101840DE" } }, format2(dia, "d"))
4229
+ )))), /* @__PURE__ */ React35.createElement(Grid9, { container: true, justifyContent: "center" }, /* @__PURE__ */ React35.createElement(IconButton14, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ React35.createElement(KeyboardDoubleArrowDownIcon2, { color: "action" }))))) : /* @__PURE__ */ React35.createElement(Box24, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React35.createElement(
4230
+ StaticDatePicker2,
4231
+ {
4232
+ orientation: "landscape",
4233
+ openTo: "day",
4234
+ value: fecha,
4235
+ slotProps: { toolbar: { hidden: true }, actionBar: { actions: [] } },
4236
+ sx: { fontSize: "12px !important", height: "300px !important", background: background ? background : "white", "& .MuiDayCalendar-header": { justifyContent: "space-between" }, "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" }, "& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" }, "& .MuiPickersDay-root": { fontSize: "12px !important" }, "& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" } },
4237
+ onChange: (newValue) => setFecha(newValue)
4238
+ }
4239
+ ), /* @__PURE__ */ React35.createElement(Grid9, { container: true, justifyContent: "center" }, /* @__PURE__ */ React35.createElement(IconButton14, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React35.createElement(KeyboardDoubleArrowUpIcon2, { color: "action" }))))), /* @__PURE__ */ React35.createElement(Box24, { sx: { width: "100%", height: openCalendar ? "calc(91% - 300px)" : "calc(91% - 100px)", background: "white", display: "flex", flexDirection: "column", overflowY: "auto", gap: "8px", scrollSnapType: "x mandatory", paddingBottom: "10px" } }, diasSemana.map((day, dayIndex) => /* @__PURE__ */ React35.createElement(
4240
+ Box24,
4241
+ {
4242
+ key: dayIndex
4243
+ },
4244
+ /* @__PURE__ */ React35.createElement(Grid9, { container: true }, /* @__PURE__ */ React35.createElement(Typography25, { variant: "subtitle1", sx: { color: isSameDay2(day, fecha) ? "info.dark" : "text.secondary" } }, day.toLocaleDateString("es-ES", {
4245
+ day: "numeric"
4246
+ }), " de ", day.toLocaleDateString("es-ES", {
4247
+ month: "short"
4248
+ }), ", ", day.toLocaleDateString("es-ES", {
4249
+ weekday: "long"
4250
+ }))),
4251
+ /* @__PURE__ */ React35.createElement(Box24, { sx: {
4252
+ display: "flex",
4253
+ flexDirection: "column"
4254
+ } }, (() => {
4255
+ const esDomingo = day.getDay() === 0;
4256
+ const eventosDelDia = events.filter(
4257
+ (event2) => new Date(event2.date).toDateString() === day.toDateString()
4258
+ );
4259
+ if (eventosDelDia.length > 0) {
4260
+ return eventosDelDia.map((event2, idx) => /* @__PURE__ */ React35.createElement(
4261
+ SCListContent,
4262
+ {
4263
+ key: idx,
4264
+ options: [{
4265
+ title: event2.description,
4266
+ subtitle: /* @__PURE__ */ React35.createElement(React35.Fragment, null, configRangeHour && new Date(event2.date.replace("00:00:00", event2.startTime)).getHours() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[0])).getHours() && new Date(event2.date.replace("00:00:00", event2.finalTime)).getHours() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[1])).getHours() && new Date(event2.date.replace("00:00:00", event2.startTime)).getMinutes() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[0])).getMinutes() && new Date(event2.date.replace("00:00:00", event2.finalTime)).getMinutes() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[1])).getMinutes() ? /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(Typography25, null, "Todo el dia"), /* @__PURE__ */ React35.createElement(LightModeOutlinedIcon, { fontSize: "small" })) : /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(Typography25, null, new Date(event2.date.replace("00:00:00", event2.startTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })), /* @__PURE__ */ React35.createElement(ArrowForwardIcon, { fontSize: "small" }), /* @__PURE__ */ React35.createElement(Typography25, null, new Date(event2.date.replace("00:00:00", event2.finalTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })))),
4267
+ iconLeftColor: event2.state === "Finalizada" ? "success" : "action",
4268
+ iconLeft: event2.state === "Finalizada" ? "CheckCircle" : event2.state === "Aplazada" ? "EventBusyOutlined" : event2.state === "En progreso" ? "PendingOutlined" : "RadioButtonUnchecked",
4269
+ description: /* @__PURE__ */ React35.createElement(React35.Fragment, null, event2.state === "Aplazada" || event2.state === "En progreso" || event2.state === "Auto asignada" ? /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(Badge2, { variant: "dot", badgeContent: "", sx: { display: "flex", alignItems: "center", "& .MuiBadge-badge": { top: "50%", transform: "translateY(-50%)" }, color: "action" } }), /* @__PURE__ */ React35.createElement(Typography25, null, event2.state == "Auto asignada" ? "Adicional" : event2.state)) : null),
4270
+ divider: eventosDelDia.length === idx + 1 ? false : true,
4271
+ disable: event2.state === "Finalizada" || event2.state === "Aplazada" || event2.state === "En progreso" ? true : false,
4272
+ fn: fn ? () => fn(event2) : void 0
4273
+ }]
4274
+ }
4275
+ ));
4276
+ } else {
4277
+ return /* @__PURE__ */ React35.createElement(
4278
+ SCListContent,
4279
+ {
4280
+ options: [{
4281
+ title: esDomingo == true ? "No disponible" : "No hay actividades asignadas",
4282
+ iconLeft: esDomingo == true ? "BlockOutlined" : "HandymanOutlined",
4283
+ disable: true
4284
+ }]
4285
+ }
4286
+ );
4287
+ }
4288
+ })())
4289
+ ))));
3094
4290
  };
3095
4291
 
3096
4292
  // src/Theme/index.ts
3097
4293
  import { createTheme } from "@mui/material/styles";
3098
4294
 
3099
4295
  // src/Theme/components.ts
3100
- import React25 from "react";
4296
+ import React36 from "react";
3101
4297
  import {
3102
4298
  InfoRounded as InfoRounded2,
3103
4299
  CheckCircleRounded as CheckCircleRounded2,
@@ -3800,10 +4996,10 @@ var components = {
3800
4996
  MuiAlert: {
3801
4997
  defaultProps: {
3802
4998
  iconMapping: {
3803
- success: React25.createElement(CheckCircleRounded2),
3804
- error: React25.createElement(ErrorRounded2),
3805
- warning: React25.createElement(WarningRounded2),
3806
- info: React25.createElement(InfoRounded2)
4999
+ success: React36.createElement(CheckCircleRounded2),
5000
+ error: React36.createElement(ErrorRounded2),
5001
+ warning: React36.createElement(WarningRounded2),
5002
+ info: React36.createElement(InfoRounded2)
3807
5003
  }
3808
5004
  },
3809
5005
  variants: [
@@ -4844,31 +6040,36 @@ var ADCSincoTheme = createTheme(__spreadValues({}, ADCTheme));
4844
6040
  export {
4845
6041
  ADCSincoTheme,
4846
6042
  AdproSincoTheme,
6043
+ Attachment,
4847
6044
  Calendar,
4848
6045
  EmptyState,
4849
6046
  FooterAction,
4850
6047
  MultiSelect,
4851
6048
  PageHeader,
6049
+ SCActivityCalendar,
4852
6050
  SCAutocomplete,
4853
6051
  SCCalendarSwipeable,
6052
+ SCCard,
4854
6053
  SCDataGrid,
4855
6054
  SCDataGridInitial,
4856
6055
  SCDateRange,
4857
6056
  SCDialog,
4858
6057
  SCDrawer,
6058
+ SCListContent,
4859
6059
  SCMenu,
4860
6060
  SCModal,
4861
6061
  SCSelect,
4862
6062
  SCTabs,
4863
6063
  SCTextArea,
4864
6064
  SCTextField,
6065
+ SCTime,
4865
6066
  SCToastNotification,
4866
6067
  SincoTheme,
4867
6068
  ToastProgress,
4868
6069
  capitalize,
4869
6070
  getButtonColor,
4870
6071
  getIcon,
4871
- getIconComponent2 as getIconComponent,
6072
+ getIconComponent,
4872
6073
  getIconMultiSelect,
4873
6074
  getModalColor,
4874
6075
  modalStateConfig,