componentes-sinco 1.0.24 → 1.0.26

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,743 +29,22 @@ 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
- const mapped = initialFiles.map((file) => {
420
- if ("progress" in file) {
421
- return file;
422
- }
423
- return {
424
- name: file.name,
425
- size: file.size,
426
- type: file.type,
427
- progress: 100,
428
- uploadError: false
429
- };
430
- });
431
- setFiles(mapped);
432
- }
433
- }, [initialFiles]);
434
- const handleDrop = (event2) => {
435
- event2.preventDefault();
436
- setIsDragFile(false);
437
- const filesDropped = event2.dataTransfer.files;
438
- if (filesDropped && filesDropped.length > 0) {
439
- const fakeEvent = {
440
- target: { files: filesDropped }
441
- };
442
- handleUpload(fakeEvent);
443
- }
444
- };
445
- const handleDragOver = (event2) => {
446
- event2.preventDefault();
447
- setIsDragFile(true);
448
- };
449
- const handleDragLeave = (event2) => {
450
- event2.preventDefault();
451
- setIsDragFile(false);
452
- };
453
- const handleUpload = (event2) => {
454
- const newFiles = event2.target.files;
455
- if (!newFiles) return;
456
- const nuevosArchivos = [];
457
- const archivosValidos = [];
458
- Array.from(newFiles).forEach((file) => {
459
- const isDuplicatedFile = files.findIndex(
460
- (e) => e.name === file.name && e.size === file.size
461
- );
462
- const sizeMB = file.size / (1024 * 1024);
463
- if (isDuplicatedFile !== -1) {
464
- setToast({
465
- type: "error",
466
- title: "Archivo duplicado",
467
- listITems: ["No se permiten archivos duplicados."],
468
- seeMore: true,
469
- time: 10
470
- });
471
- return;
472
- }
473
- if (sizeMB > maxSize) {
474
- nuevosArchivos.push({
475
- name: file.name,
476
- size: file.size,
477
- type: file.type,
478
- progress: 0,
479
- uploadError: true
480
- });
481
- setToast({
482
- type: "error",
483
- title: "Carga fallida",
484
- seeMore: true,
485
- listITems: [`El archivo supera el l\xEDmite de ${maxSize}MB.`],
486
- time: 10
487
- });
488
- return;
489
- }
490
- if (fileAccepted && !file.name.match(
491
- new RegExp(
492
- `(${fileAccepted.replace(/\./g, "\\.").replace(/,/g, "|")})$`,
493
- "i"
494
- )
495
- )) {
496
- setToast({
497
- type: "error",
498
- title: "Tipo de archivo no permitido",
499
- listITems: [`El archivo ${file.name} no es un tipo permitido.`],
500
- seeMore: true,
501
- time: 10
502
- });
503
- return;
504
- }
505
- nuevosArchivos.push({
506
- name: file.name,
507
- size: file.size,
508
- type: file.type,
509
- progress: 0,
510
- uploadError: false
511
- });
512
- archivosValidos.push(file);
513
- });
514
- if (nuevosArchivos.length > 0) {
515
- setFiles((prev) => {
516
- const actualizados = [...prev, ...nuevosArchivos];
517
- onChange == null ? void 0 : onChange([
518
- ...archivosValidos,
519
- ...prev.map((f) => new File([], f.name, { type: f.type }))
520
- ]);
521
- return actualizados;
522
- });
523
- }
524
- event2.target.value = "";
525
- };
526
- const deleteFiles = (nameFile) => {
527
- setFiles((prev) => {
528
- const filtered = prev.filter((e) => e.name !== nameFile);
529
- onChange == null ? void 0 : onChange(
530
- filtered.map((f) => new File([], f.name, { type: f.type }))
531
- );
532
- return filtered;
533
- });
534
- };
535
- return /* @__PURE__ */ React4.createElement(Stack3, { spacing: 2 }, toast && /* @__PURE__ */ React4.createElement(SCToastNotification, __spreadValues({}, toast)), /* @__PURE__ */ React4.createElement(
536
- "input",
537
- {
538
- type: "file",
539
- multiple: true,
540
- hidden: true,
541
- ref: inputRef,
542
- onChange: handleUpload
543
- }
544
- ), /* @__PURE__ */ React4.createElement(
545
- Stack3,
546
- {
547
- id: "ZonaAdjuntos",
548
- justifyContent: "center",
549
- alignItems: "center",
550
- bgcolor: "transparent",
551
- padding: compact ? "12px 16px" : "16px 24px",
552
- height: compact ? "56px" : "100%",
553
- flexDirection: compact ? "row" : "column",
554
- gap: 1,
555
- borderRadius: 1,
556
- onClick: () => {
557
- var _a;
558
- return (_a = inputRef.current) == null ? void 0 : _a.click();
559
- },
560
- onDrop: handleDrop,
561
- onDragOver: handleDragOver,
562
- onDragLeave: handleDragLeave,
563
- sx: __spreadValues({
564
- border: error ? (theme) => `1px solid ${theme.palette.error.main}` : (theme) => `1px dashed ${theme.palette.grey[500]}`,
565
- cursor: "pointer",
566
- ":hover": {
567
- backgroundColor: error ? "error.50" : "action.hover"
568
- }
569
- }, sx)
570
- },
571
- onLoading ? /* @__PURE__ */ React4.createElement(
572
- Box3,
573
- {
574
- display: "flex",
575
- alignItems: "center",
576
- justifyContent: "center",
577
- width: "100%",
578
- height: "450px"
579
- },
580
- /* @__PURE__ */ React4.createElement(
581
- CircularProgress,
582
- {
583
- sx: { width: "60px", height: "60px" },
584
- variant: "indeterminate"
585
- }
586
- )
587
- ) : /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
588
- Box3,
589
- {
590
- display: "flex",
591
- bgcolor: error ? "error.50" : "primary.50",
592
- borderRadius: "100%",
593
- p: 1
594
- },
595
- /* @__PURE__ */ React4.createElement(
596
- CloudUploadOutlined,
597
- {
598
- color: error ? "error" : "primary",
599
- fontSize: "medium"
600
- }
601
- )
602
- ), /* @__PURE__ */ React4.createElement(
603
- Stack3,
604
- {
605
- width: "100%",
606
- flexDirection: compact ? "row" : "column",
607
- alignItems: "center",
608
- justifyContent: compact ? "space-between" : "center",
609
- gap: 1
610
- },
611
- /* @__PURE__ */ React4.createElement(
612
- Stack3,
613
- {
614
- flexDirection: "column",
615
- alignItems: compact ? "start" : "center",
616
- gap: 0.5
617
- },
618
- /* @__PURE__ */ React4.createElement(Typography3, { variant: "body2", color: "text.primary" }, "Arrastrar o adjuntar archivos"),
619
- /* @__PURE__ */ React4.createElement(
620
- Typography3,
621
- {
622
- variant: "caption",
623
- color: error ? "error" : "text.secondary",
624
- whiteSpace: "nowrap",
625
- overflow: "hidden",
626
- textOverflow: "ellipsis",
627
- maxWidth: "450px"
628
- },
629
- error ? `${fileAccepted || "DOCX, XML, PNG, JPG"} \u2022 Archivo no soportado` : `${fileAccepted || "DOCX, XML, PNG, JPG"} \u2022 Max. ${maxSize}MB`
630
- )
631
- ),
632
- /* @__PURE__ */ React4.createElement(
633
- Button3,
634
- {
635
- variant: "text",
636
- color: "primary",
637
- size: "small",
638
- startIcon: /* @__PURE__ */ React4.createElement(AttachFileOutlined, { color: "primary", fontSize: "small" })
639
- },
640
- "Adjuntar"
641
- )
642
- ))
643
- ), files.length > 0 && /* @__PURE__ */ React4.createElement(
644
- Stack3,
645
- {
646
- id: "ContenedorArchivosAdjuntos",
647
- width: "100%",
648
- sx: __spreadValues({
649
- overflowY: "auto"
650
- }, files.length > 5 && {
651
- maxHeight: 250
652
- }),
653
- spacing: 1
654
- },
655
- files.map((file) => /* @__PURE__ */ React4.createElement(
656
- Stack3,
657
- {
658
- height: 46,
659
- key: file.name + (file.uploadError ? "_error" : ""),
660
- direction: "row",
661
- alignItems: "center",
662
- justifyContent: "space-between",
663
- gap: 2,
664
- padding: 1,
665
- borderRadius: 1,
666
- sx: {
667
- backgroundColor: file.uploadError ? "error.50" : "transparent",
668
- ":hover": {
669
- backgroundColor: file.uploadError ? "error.100" : "primary.50"
670
- }
671
- }
672
- },
673
- /* @__PURE__ */ React4.createElement(Stack3, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React4.createElement(
674
- UploadFileOutlined,
675
- {
676
- color: file.uploadError ? "error" : "primary",
677
- fontSize: "small"
678
- }
679
- ), /* @__PURE__ */ React4.createElement(Stack3, { width: "100%" }, /* @__PURE__ */ React4.createElement(
680
- Typography3,
681
- {
682
- variant: "body2",
683
- color: "text.primary",
684
- whiteSpace: "nowrap",
685
- overflow: "hidden",
686
- textOverflow: "ellipsis",
687
- maxWidth: "310px"
688
- },
689
- file.name
690
- ), /* @__PURE__ */ React4.createElement(
691
- Typography3,
692
- {
693
- variant: "caption",
694
- color: file.uploadError ? "error" : "text.secondary"
695
- },
696
- 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}`
697
- ))),
698
- /* @__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" }))),
699
- /* @__PURE__ */ React4.createElement(Tooltip, { title: "Eliminar" }, /* @__PURE__ */ React4.createElement(
700
- IconButton3,
701
- {
702
- size: "small",
703
- onClick: () => {
704
- setFileToDelete(file);
705
- setOpenModal(true);
706
- }
707
- },
708
- /* @__PURE__ */ React4.createElement(DeleteOutline, { fontSize: "small", color: "action" })
709
- ))
710
- ))
711
- ), /* @__PURE__ */ React4.createElement(
712
- SCModal,
713
- {
714
- state: "delete",
715
- open: openModal,
716
- setOpen: setOpenModal,
717
- title: "Eliminar archivo",
718
- description: `\xBFEst\xE1s seguro que deseas eliminar "${fileToDelete == null ? void 0 : fileToDelete.name}"?`,
719
- action: [
720
- {
721
- text: "Eliminar",
722
- fn: () => __async(void 0, null, function* () {
723
- if (fileToDelete) {
724
- try {
725
- if (deleteAction) {
726
- yield deleteAction(fileToDelete.name);
727
- }
728
- deleteFiles(fileToDelete.name);
729
- setToast({
730
- title: "Archivo eliminado",
731
- type: "success",
732
- time: 2
733
- });
734
- } catch (error2) {
735
- setToast({
736
- title: "Error al eliminar archivo",
737
- type: "error",
738
- time: 4
739
- });
740
- } finally {
741
- setFileToDelete(null);
742
- setOpenModal(false);
743
- }
744
- }
745
- })
746
- }
747
- ]
748
- }
749
- ));
750
- };
751
32
 
752
33
  // src/Components/Drawer/SCDrawer.tsx
753
- import React11, { useEffect as useEffect10, useRef as useRef3 } from "react";
754
- import { Box as Box9, Drawer, Typography as Typography9, IconButton as IconButton7, Button as Button6, Stack as Stack5, Chip as Chip2 } from "@mui/material";
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";
755
36
  import Grid4 from "@mui/material/Grid2";
756
37
  import CloseIcon from "@mui/icons-material/Close";
757
- import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos";
758
- import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
759
38
 
760
39
  // src/Components/Textfield/SCTextField.tsx
761
- import React5, { useEffect as useEffect5, useState as useState5 } from "react";
762
- import { FormControl, IconButton as IconButton4, InputAdornment, InputLabel, OutlinedInput, FilledInput, Popover, Input, Box as Box4, Typography as Typography4, SvgIcon, Tooltip as Tooltip2 } from "@mui/material";
40
+ import React, { useEffect, useState } from "react";
41
+ import { FormControl, IconButton, InputAdornment, InputLabel, OutlinedInput, FilledInput, Popover, Input, Box, Typography, SvgIcon, Tooltip } from "@mui/material";
763
42
  import Grid from "@mui/material/Grid2";
764
43
  import { Visibility, VisibilityOff, InfoOutlined } from "@mui/icons-material";
765
44
 
766
45
  // src/Components/Textfield/Helpers/validateIcon.tsx
767
46
  import * as Muicon from "@mui/icons-material";
768
- function getIconComponent2(name) {
47
+ function getIconComponent(name) {
769
48
  if (typeof name !== "string") return name;
770
49
  return name in Muicon ? Muicon[name] : void 0;
771
50
  }
@@ -847,13 +126,13 @@ var SCTextField = ({
847
126
  let IconInputStart;
848
127
  let IconInputEnd;
849
128
  let IconTitle;
850
- const [showPassword, setShowPassword] = useState5(false);
851
- const [error, setError] = useState5(false);
852
- const [anchorInfoTitle, setAnchorInfoTitle] = useState5(null);
129
+ const [showPassword, setShowPassword] = useState(false);
130
+ const [error, setError] = useState(false);
131
+ const [anchorInfoTitle, setAnchorInfoTitle] = useState(null);
853
132
  const openInfoTitle = Boolean(anchorInfoTitle);
854
- const [anchorInfoElement, setAnchorInfoElement] = useState5(null);
133
+ const [anchorInfoElement, setAnchorInfoElement] = useState(null);
855
134
  const openInfoElement = Boolean(anchorInfoElement);
856
- useEffect5(() => {
135
+ useEffect(() => {
857
136
  if (error) {
858
137
  setTimeout(() => {
859
138
  setError(false);
@@ -862,14 +141,14 @@ var SCTextField = ({
862
141
  }, [error]);
863
142
  if (iconInputStart) {
864
143
  IconInputStartValidation = getIconValidation(iconInputStart);
865
- IconInputStart = getIconComponent2(iconInputStart);
144
+ IconInputStart = getIconComponent(iconInputStart);
866
145
  }
867
146
  if (iconInputEnd) {
868
147
  IconInputEndValidation = getIconValidation(iconInputEnd);
869
- IconInputEnd = getIconComponent2(iconInputEnd);
148
+ IconInputEnd = getIconComponent(iconInputEnd);
870
149
  }
871
150
  if (iconTitle) {
872
- IconTitle = getIconComponent2(iconTitle);
151
+ IconTitle = getIconComponent(iconTitle);
873
152
  }
874
153
  const handleClickShowPassword = () => setShowPassword((show) => !show);
875
154
  const handleMouseDownPassword = (event2) => {
@@ -903,7 +182,7 @@ var SCTextField = ({
903
182
  const handleCloseInfoElement = () => {
904
183
  setAnchorInfoElement(null);
905
184
  };
906
- 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(
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(
907
186
  InfoOutlined,
908
187
  {
909
188
  color: "action",
@@ -911,7 +190,7 @@ var SCTextField = ({
911
190
  onMouseEnter: (event2) => handleOpenInfoTitle(event2),
912
191
  onMouseLeave: () => handleCloseInfoTitle()
913
192
  }
914
- ), /* @__PURE__ */ React5.createElement(
193
+ ), /* @__PURE__ */ React.createElement(
915
194
  Popover,
916
195
  {
917
196
  sx: {
@@ -933,14 +212,14 @@ var SCTextField = ({
933
212
  },
934
213
  disableRestoreFocus: true
935
214
  },
936
- /* @__PURE__ */ React5.createElement(Typography4, { p: 2 }, infoTitle.text)
937
- )) : /* @__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(
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(
938
217
  InfoOutlined,
939
218
  {
940
219
  color: "action",
941
220
  fontSize: "small"
942
221
  }
943
- ))) : ""), /* @__PURE__ */ React5.createElement(Grid, { container: true, sx: { flexWrap: "nowrap", alignItems: "center" } }, /* @__PURE__ */ React5.createElement(
222
+ ))) : ""), /* @__PURE__ */ React.createElement(Grid, { container: true, sx: { flexWrap: "nowrap", alignItems: "center" } }, /* @__PURE__ */ React.createElement(
944
223
  FormControl,
945
224
  {
946
225
  color,
@@ -949,7 +228,7 @@ var SCTextField = ({
949
228
  variant,
950
229
  sx: { background: background || "transparent", borderRadius: "4px" }
951
230
  },
952
- /* @__PURE__ */ React5.createElement(
231
+ /* @__PURE__ */ React.createElement(
953
232
  InputLabel,
954
233
  {
955
234
  "data-testid": "test-label",
@@ -960,7 +239,7 @@ var SCTextField = ({
960
239
  },
961
240
  label ? label : ""
962
241
  ),
963
- /* @__PURE__ */ React5.createElement(
242
+ /* @__PURE__ */ React.createElement(
964
243
  InputComponent,
965
244
  {
966
245
  size: size ? size : "medium",
@@ -976,17 +255,17 @@ var SCTextField = ({
976
255
  type: !showPassword && format2 === "password" ? "password" : (format2 || "text").toUpperCase() === "INT" || (format2 || "text").toUpperCase() === "DECIMAL" ? "number" : "text",
977
256
  className: format2 === "password" && !showPassword ? "" : "",
978
257
  placeholder,
979
- startAdornment: iconInputStart ? /* @__PURE__ */ React5.createElement(InputAdornment, { position: "start" }, IconInputStartValidation === "text" ? iconInputStart : IconInputStart ? /* @__PURE__ */ React5.createElement(IconInputStart, { fontSize: "small" }) : null) : "",
980
- endAdornment: /* @__PURE__ */ React5.createElement(InputAdornment, { position: "end" }, format2 === "password" ? /* @__PURE__ */ React5.createElement(
981
- IconButton4,
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,
982
261
  {
983
262
  "aria-label": "toggle password visibility",
984
263
  onClick: handleClickShowPassword,
985
264
  onMouseDown: handleMouseDownPassword,
986
265
  edge: "end"
987
266
  },
988
- showPassword ? /* @__PURE__ */ React5.createElement(VisibilityOff, null) : /* @__PURE__ */ React5.createElement(Visibility, null)
989
- ) : iconInputEnd === void 0 && infoElement !== void 0 ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
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(
990
269
  InfoOutlined,
991
270
  {
992
271
  "data-testid": "test-infoElement",
@@ -997,7 +276,7 @@ var SCTextField = ({
997
276
  onMouseEnter: (event2) => handleOpenInfoElement(event2),
998
277
  onMouseLeave: () => handleCloseInfoElement()
999
278
  }
1000
- ), /* @__PURE__ */ React5.createElement(
279
+ ), /* @__PURE__ */ React.createElement(
1001
280
  Popover,
1002
281
  {
1003
282
  sx: {
@@ -1019,69 +298,249 @@ var SCTextField = ({
1019
298
  },
1020
299
  disableRestoreFocus: true
1021
300
  },
1022
- /* @__PURE__ */ React5.createElement(Typography4, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
1023
- )) : /* @__PURE__ */ React5.createElement(Tooltip2, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React5.createElement(
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(
1024
303
  InfoOutlined,
1025
304
  {
1026
305
  color: "action",
1027
306
  fontSize: "small"
1028
307
  }
1029
- ))) : iconInputEnd !== void 0 ? IconInputEndValidation === "text" ? iconInputEnd : IconInputEnd ? /* @__PURE__ */ React5.createElement(IconInputEnd, { fontSize: "small" }) : null : ""),
1030
- label: label ? label + (format2 === "password" && !showPassword ? "" : "") : "",
1031
- autoComplete: format2 === "password" ? "new-password" : "off"
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"
311
+ }
312
+ )
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(
314
+ InfoOutlined,
315
+ {
316
+ "data-testid": "test-infoElement",
317
+ component: "svg",
318
+ sx: { marginLeft: "4px" },
319
+ color: "action",
320
+ fontSize: "small",
321
+ onMouseEnter: (event2) => handleOpenInfoElement(event2),
322
+ onMouseLeave: handleCloseInfoElement
323
+ }
324
+ ), /* @__PURE__ */ React.createElement(
325
+ Popover,
326
+ {
327
+ sx: { pointerEvents: "none" },
328
+ open: openInfoElement,
329
+ anchorEl: anchorInfoElement,
330
+ onClose: handleCloseInfoElement,
331
+ anchorOrigin: {
332
+ vertical: "bottom",
333
+ horizontal: "left"
334
+ },
335
+ transformOrigin: {
336
+ vertical: "top",
337
+ horizontal: "left"
338
+ },
339
+ disableRestoreFocus: true
340
+ },
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(
343
+ InfoOutlined,
344
+ {
345
+ sx: { marginLeft: "4px" },
346
+ color: "action",
347
+ fontSize: "small"
348
+ }
349
+ ))) : ""));
350
+ };
351
+
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
1032
527
  }
1033
528
  )
1034
- ), (iconInputEnd !== void 0 || format2 === "password") && infoElement ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
1035
- InfoOutlined,
1036
- {
1037
- "data-testid": "test-infoElement",
1038
- component: "svg",
1039
- sx: { marginLeft: "4px" },
1040
- color: "action",
1041
- fontSize: "small",
1042
- onMouseEnter: (event2) => handleOpenInfoElement(event2),
1043
- onMouseLeave: handleCloseInfoElement
1044
- }
1045
- ), /* @__PURE__ */ React5.createElement(
1046
- Popover,
1047
- {
1048
- sx: { pointerEvents: "none" },
1049
- open: openInfoElement,
1050
- anchorEl: anchorInfoElement,
1051
- onClose: handleCloseInfoElement,
1052
- anchorOrigin: {
1053
- vertical: "bottom",
1054
- horizontal: "left"
1055
- },
1056
- transformOrigin: {
1057
- vertical: "top",
1058
- horizontal: "left"
1059
- },
1060
- disableRestoreFocus: true
1061
- },
1062
- /* @__PURE__ */ React5.createElement(Typography4, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
1063
- )) : /* @__PURE__ */ React5.createElement(Tooltip2, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React5.createElement(
1064
- InfoOutlined,
1065
- {
1066
- sx: { marginLeft: "4px" },
1067
- color: "action",
1068
- fontSize: "small"
1069
- }
1070
- ))) : ""));
529
+ ));
1071
530
  };
1072
531
 
1073
532
  // src/Components/TextArea/Helpers/validateIcon.tsx
1074
- import * as MuiIcons2 from "@mui/icons-material";
533
+ import * as MuiIcons from "@mui/icons-material";
1075
534
  function getIcon(name) {
1076
- if (!name || !(name in MuiIcons2)) {
535
+ if (!name || !(name in MuiIcons)) {
1077
536
  return null;
1078
537
  }
1079
- return MuiIcons2[name];
538
+ return MuiIcons[name];
1080
539
  }
1081
540
 
1082
541
  // src/Components/TextArea/SCTextArea.tsx
1083
- import React6, { useEffect as useEffect6, useState as useState6 } from "react";
1084
- 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";
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";
1085
544
  import { InfoOutlined as InfoOutlined2 } from "@mui/icons-material";
1086
545
  var SCTextArea = ({
1087
546
  //informativas
@@ -1104,11 +563,11 @@ var SCTextArea = ({
1104
563
  state,
1105
564
  onBlur
1106
565
  }) => {
1107
- const [helperCount, setHelperCount] = useState6(0);
1108
- const [stateError, setStateError] = useState6(false);
1109
- const [anchorInfoTitle, setAnchorInfoTitle] = React6.useState(null);
566
+ const [helperCount, setHelperCount] = useState4(0);
567
+ const [stateError, setStateError] = useState4(false);
568
+ const [anchorInfoTitle, setAnchorInfoTitle] = React3.useState(null);
1110
569
  const openInfoTitle = Boolean(anchorInfoTitle);
1111
- useEffect6(() => {
570
+ useEffect4(() => {
1112
571
  setHelperCount(state == null ? void 0 : state.length);
1113
572
  }, [state]);
1114
573
  const IconTitle = getIcon(iconTitle);
@@ -1130,7 +589,7 @@ var SCTextArea = ({
1130
589
  const handleCloseInfoTitle = () => {
1131
590
  setAnchorInfoTitle(null);
1132
591
  };
1133
- 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(
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(
1134
593
  InfoOutlined2,
1135
594
  {
1136
595
  color: "action",
@@ -1138,7 +597,7 @@ var SCTextArea = ({
1138
597
  onMouseEnter: (event2) => handleOpenInfoTitle(event2),
1139
598
  onMouseLeave: () => handleCloseInfoTitle()
1140
599
  }
1141
- ), /* @__PURE__ */ React6.createElement(
600
+ ), /* @__PURE__ */ React3.createElement(
1142
601
  Popover2,
1143
602
  {
1144
603
  sx: { pointerEvents: "none" },
@@ -1155,14 +614,14 @@ var SCTextArea = ({
1155
614
  },
1156
615
  disableRestoreFocus: true
1157
616
  },
1158
- /* @__PURE__ */ React6.createElement(Typography5, { sx: { p: 2 } }, infoTitle.text)
1159
- )) : /* @__PURE__ */ React6.createElement(Tooltip3, { title: infoTitle.text, placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React6.createElement(
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(
1160
619
  InfoOutlined2,
1161
620
  {
1162
621
  color: "action",
1163
622
  fontSize: "small"
1164
623
  }
1165
- ))) : ""), /* @__PURE__ */ React6.createElement(Stack4, null, /* @__PURE__ */ React6.createElement(
624
+ ))) : ""), /* @__PURE__ */ React3.createElement(Stack2, null, /* @__PURE__ */ React3.createElement(
1166
625
  TextField,
1167
626
  {
1168
627
  required,
@@ -1184,8 +643,8 @@ var SCTextArea = ({
1184
643
  },
1185
644
  autoComplete: "off"
1186
645
  }
1187
- )), /* @__PURE__ */ React6.createElement(Stack4, null, /* @__PURE__ */ React6.createElement(
1188
- Typography5,
646
+ )), /* @__PURE__ */ React3.createElement(Stack2, null, /* @__PURE__ */ React3.createElement(
647
+ Typography3,
1189
648
  {
1190
649
  variant: "caption",
1191
650
  color: "text.secondary",
@@ -1198,8 +657,8 @@ var SCTextArea = ({
1198
657
  };
1199
658
 
1200
659
  // src/Components/SCSelect.tsx
1201
- import React7, { useEffect as useEffect7 } from "react";
1202
- import { InputLabel as InputLabel2, FormControl as FormControl2, MenuItem, SvgIcon as SvgIcon3, ListItemIcon, ListItemText, Box as Box6 } from "@mui/material";
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";
1203
662
  import Select from "@mui/material/Select";
1204
663
  import * as Muicon2 from "@mui/icons-material";
1205
664
  function SCSelect({
@@ -1209,23 +668,25 @@ function SCSelect({
1209
668
  width = "100%",
1210
669
  size = "small",
1211
670
  variant = "outlined",
1212
- background = "white",
671
+ deleteType = "button",
1213
672
  required,
1214
673
  disabled,
674
+ background,
675
+ fnAplicar,
1215
676
  setState,
1216
677
  state
1217
678
  }) {
1218
679
  const labelContent = `<span style="color: red;">* </span>` + label;
1219
- const [prevData, setPrevData] = React7.useState(data);
1220
- const [error, setError] = React7.useState(false);
1221
- useEffect7(() => {
680
+ const [prevData, setPrevData] = React4.useState(data);
681
+ const [error, setError] = React4.useState(false);
682
+ useEffect5(() => {
1222
683
  if (error) {
1223
684
  setTimeout(() => {
1224
685
  setError(false);
1225
686
  }, 1e3);
1226
687
  }
1227
688
  }, [error]);
1228
- useEffect7(() => {
689
+ useEffect5(() => {
1229
690
  let dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
1230
691
  if (dataChangeValidation == false) {
1231
692
  setState({ hiddenValue: "", textValue: "" });
@@ -1259,25 +720,25 @@ function SCSelect({
1259
720
  }
1260
721
  }
1261
722
  };
1262
- return /* @__PURE__ */ React7.createElement(React7.Fragment, null, data && /* @__PURE__ */ React7.createElement(Box6, { sx: { width } }, /* @__PURE__ */ React7.createElement(
723
+ return /* @__PURE__ */ React4.createElement(React4.Fragment, null, data && /* @__PURE__ */ React4.createElement(Box4, { sx: { width } }, /* @__PURE__ */ React4.createElement(
1263
724
  FormControl2,
1264
725
  {
1265
726
  fullWidth: true,
1266
727
  size: size ? size : "medium",
1267
728
  variant
1268
729
  },
1269
- /* @__PURE__ */ React7.createElement(
730
+ /* @__PURE__ */ React4.createElement(
1270
731
  InputLabel2,
1271
732
  {
1272
733
  error
1273
734
  },
1274
- required ? /* @__PURE__ */ React7.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label
735
+ required ? /* @__PURE__ */ React4.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label
1275
736
  ),
1276
- /* @__PURE__ */ React7.createElement(
737
+ /* @__PURE__ */ React4.createElement(
1277
738
  Select,
1278
739
  {
1279
740
  value: Array.isArray(state.hiddenValue) ? state.hiddenValue[0] || "" : state.hiddenValue != "-1" ? state.hiddenValue : "",
1280
- label: required ? /* @__PURE__ */ React7.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
741
+ label: required ? /* @__PURE__ */ React4.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
1281
742
  onChange: handleChange,
1282
743
  onBlur: handleBlur,
1283
744
  variant,
@@ -1286,32 +747,26 @@ function SCSelect({
1286
747
  MenuProps: {
1287
748
  PaperProps: {
1288
749
  sx: {
1289
- maxHeight: "300px",
1290
- minWidth: "100%"
750
+ left: "0px !important"
1291
751
  }
1292
752
  },
1293
- anchorOrigin: {
1294
- vertical: "bottom",
1295
- horizontal: "left"
1296
- },
1297
- transformOrigin: {
1298
- vertical: "top",
1299
- horizontal: "left"
1300
- },
1301
- disableAutoFocusItem: true,
1302
- marginThreshold: 0
753
+ sx: {
754
+ "& .MuiPaper-root": {
755
+ left: "0px !important"
756
+ }
757
+ }
1303
758
  }
1304
759
  },
1305
760
  data.map((option, index) => {
1306
- 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" }));
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" }));
1307
762
  })
1308
763
  )
1309
764
  )));
1310
765
  }
1311
766
 
1312
767
  // src/Components/SCAutocomplete.tsx
1313
- import React8, { useEffect as useEffect8 } from "react";
1314
- 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";
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";
1315
770
  import Grid3 from "@mui/material/Grid2";
1316
771
  import { Search, Clear } from "@mui/icons-material";
1317
772
  import * as Muicon3 from "@mui/icons-material";
@@ -1331,16 +786,17 @@ function SCAutocomplete({
1331
786
  state,
1332
787
  inputChange,
1333
788
  maxCheck
789
+ // Agregar el parámetro maxCheck
1334
790
  }) {
1335
791
  const labelContent = `<span style="color: red;">* </span>` + label;
1336
792
  let group = "";
1337
793
  let isSelected = false;
1338
- const [selectedOptions, setSelectedOptions] = React8.useState([]);
1339
- const [prevData, setPrevData] = React8.useState(data);
1340
- const [originalData, setOriginalData] = React8.useState(data);
1341
- const [inputValue, setInputValue] = React8.useState("");
1342
- const [isUserTyping, setIsUserTyping] = React8.useState(false);
1343
- useEffect8(() => {
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(() => {
1344
800
  const dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
1345
801
  if (!dataChangeValidation && !isUserTyping) {
1346
802
  setState({ hiddenValue: "-1", textValue: "" });
@@ -1351,7 +807,7 @@ function SCAutocomplete({
1351
807
  }
1352
808
  setPrevData(data);
1353
809
  }, [data, isUserTyping]);
1354
- useEffect8(() => {
810
+ useEffect6(() => {
1355
811
  if (typeFormat == "multiselect") {
1356
812
  if (state.hiddenValue != "-1" && Array.isArray(state.hiddenValue)) {
1357
813
  const newSelectedOptions = originalData.filter(
@@ -1361,7 +817,7 @@ function SCAutocomplete({
1361
817
  }
1362
818
  }
1363
819
  }, [state.hiddenValue, originalData, typeFormat]);
1364
- useEffect8(() => {
820
+ useEffect6(() => {
1365
821
  if (inputValue === "") {
1366
822
  setIsUserTyping(false);
1367
823
  }
@@ -1419,12 +875,11 @@ function SCAutocomplete({
1419
875
  const selectedValue = typeFormat === "multiselect" ? selectedOptions : originalData.find(
1420
876
  (item) => getItemValue(item).value === state.hiddenValue
1421
877
  ) || null;
1422
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, data && /* @__PURE__ */ React8.createElement(
878
+ return /* @__PURE__ */ React5.createElement(React5.Fragment, null, data && /* @__PURE__ */ React5.createElement(
1423
879
  Autocomplete,
1424
880
  {
1425
881
  multiple: typeFormat === "multiselect",
1426
882
  clearOnEscape: true,
1427
- noOptionsText: "No se encuentra",
1428
883
  disabled,
1429
884
  options: data,
1430
885
  isOptionEqualToValue: (option, value) => getItemValue(option).value === getItemValue(value).value,
@@ -1446,9 +901,9 @@ function SCAutocomplete({
1446
901
  limitTags: 2,
1447
902
  renderTags: (value, getTagProps) => {
1448
903
  const limit = 2;
1449
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, value.slice(0, limit).map((option, index) => {
904
+ return /* @__PURE__ */ React5.createElement(React5.Fragment, null, value.slice(0, limit).map((option, index) => {
1450
905
  const _a = getTagProps({ index }), { key } = _a, chipProps = __objRest(_a, ["key"]);
1451
- return /* @__PURE__ */ React8.createElement(
906
+ return /* @__PURE__ */ React5.createElement(
1452
907
  Chip,
1453
908
  __spreadProps(__spreadValues({
1454
909
  key,
@@ -1460,7 +915,7 @@ function SCAutocomplete({
1460
915
  style: { maxWidth: 120, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
1461
916
  })
1462
917
  );
1463
- }), value.length > limit && /* @__PURE__ */ React8.createElement(Box7, { sx: { ml: 0.5, fontSize: 13, color: "#666", display: "flex", alignItems: "center" } }, `+${value.length - limit}`));
918
+ }), value.length > limit && /* @__PURE__ */ React5.createElement(Box5, { sx: { ml: 0.5, fontSize: 13, color: "#666", display: "flex", alignItems: "center" } }, `+${value.length - limit}`));
1464
919
  },
1465
920
  renderOption: (props, option) => {
1466
921
  const _a = props, { key } = _a, optionProps = __objRest(_a, ["key"]);
@@ -1478,7 +933,7 @@ function SCAutocomplete({
1478
933
  isValid = group == option[columnGroup];
1479
934
  group = option[columnGroup];
1480
935
  }
1481
- 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(
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(
1482
937
  MenuItem2,
1483
938
  __spreadProps(__spreadValues({}, optionProps), {
1484
939
  disabled: isDisabled,
@@ -1488,8 +943,8 @@ function SCAutocomplete({
1488
943
  opacity: isDisabled ? 0.5 : 1
1489
944
  }
1490
945
  }),
1491
- 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 })) : "",
1492
- typeFormat == "multiselect" ? /* @__PURE__ */ React8.createElement(
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(
1493
948
  Checkbox,
1494
949
  {
1495
950
  checked: isSelected,
@@ -1498,25 +953,25 @@ function SCAutocomplete({
1498
953
  color: "primary"
1499
954
  }
1500
955
  ) : "",
1501
- /* @__PURE__ */ React8.createElement(ListItemText2, { primary: getItemValue(option).text, color: "text.primary" }),
956
+ /* @__PURE__ */ React5.createElement(ListItemText2, { primary: getItemValue(option).text, color: "text.primary" }),
1502
957
  getItemValue(option).component != void 0 ? getItemValue(option).component : ""
1503
958
  )));
1504
959
  },
1505
- renderInput: (params) => /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
960
+ renderInput: (params) => /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
1506
961
  TextField3,
1507
962
  __spreadProps(__spreadValues({}, params), {
1508
- label: required ? /* @__PURE__ */ React8.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
963
+ label: required ? /* @__PURE__ */ React5.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
1509
964
  placeholder: selectedOptions.length == 0 ? "B\xFAsqueda" : "",
1510
965
  InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
1511
- 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" } })))
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" } })))
1512
967
  })
1513
968
  })
1514
969
  )),
1515
970
  slotProps: {
1516
971
  listbox: {
1517
- component: React8.forwardRef(function ListboxComponent(props, ref) {
1518
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
1519
- Box7,
972
+ component: React5.forwardRef(function ListboxComponent(props, ref) {
973
+ return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
974
+ Box5,
1520
975
  __spreadProps(__spreadValues({
1521
976
  ref
1522
977
  }, props), {
@@ -1526,9 +981,9 @@ function SCAutocomplete({
1526
981
  backgroundColor: "white"
1527
982
  }, props.sx)
1528
983
  }),
1529
- 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)) : "",
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)) : "",
1530
985
  props.children,
1531
- deleteType == "button" || fnAplicar ? /* @__PURE__ */ React8.createElement(
986
+ deleteType == "button" || fnAplicar ? /* @__PURE__ */ React5.createElement(
1532
987
  Grid3,
1533
988
  {
1534
989
  container: true,
@@ -1543,8 +998,8 @@ function SCAutocomplete({
1543
998
  justifyContent: "space-between"
1544
999
  }
1545
1000
  },
1546
- deleteType == "button" ? /* @__PURE__ */ React8.createElement(
1547
- Button5,
1001
+ deleteType == "button" ? /* @__PURE__ */ React5.createElement(
1002
+ Button3,
1548
1003
  {
1549
1004
  variant: "text",
1550
1005
  color: "primary",
@@ -1556,8 +1011,8 @@ function SCAutocomplete({
1556
1011
  },
1557
1012
  "Limpiar"
1558
1013
  ) : "",
1559
- fnAplicar && /* @__PURE__ */ React8.createElement(
1560
- Button5,
1014
+ fnAplicar && /* @__PURE__ */ React5.createElement(
1015
+ Button3,
1561
1016
  {
1562
1017
  variant: "contained",
1563
1018
  color: "primary",
@@ -1576,8 +1031,8 @@ function SCAutocomplete({
1576
1031
  }
1577
1032
 
1578
1033
  // src/Components/SCDateRange.tsx
1579
- import React9 from "react";
1580
- import { Box as Box8, InputAdornment as InputAdornment4 } from "@mui/material";
1034
+ import React6 from "react";
1035
+ import { Box as Box6, InputAdornment as InputAdornment4 } from "@mui/material";
1581
1036
  import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
1582
1037
  import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
1583
1038
  import { DateRangePicker } from "@mui/x-date-pickers-pro/DateRangePicker";
@@ -1608,7 +1063,7 @@ var SCDateRange = ({
1608
1063
  ];
1609
1064
  setState(convertedValue);
1610
1065
  };
1611
- return /* @__PURE__ */ React9.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ React9.createElement(Box8, { sx: { width: "100%" } }, /* @__PURE__ */ React9.createElement(
1066
+ return /* @__PURE__ */ React6.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ React6.createElement(Box6, { sx: { width: "100%" } }, /* @__PURE__ */ React6.createElement(
1612
1067
  DateRangePicker,
1613
1068
  {
1614
1069
  value: state,
@@ -1627,7 +1082,7 @@ var SCDateRange = ({
1627
1082
  required,
1628
1083
  error: position === "start" ? isStartEmpty : isEndEmpty,
1629
1084
  InputProps: {
1630
- endAdornment: /* @__PURE__ */ React9.createElement(InputAdornment4, { position: "end" }, /* @__PURE__ */ React9.createElement(
1085
+ endAdornment: /* @__PURE__ */ React6.createElement(InputAdornment4, { position: "end" }, /* @__PURE__ */ React6.createElement(
1631
1086
  EventIcon,
1632
1087
  {
1633
1088
  color: hasError ? "error" : "action",
@@ -1668,81 +1123,29 @@ var getIcon2 = (iconName) => {
1668
1123
  };
1669
1124
 
1670
1125
  // src/Components/Drawer/Helpers/validateInput.tsx
1671
- var validateInputs = (arrayElements, onError, onSuccess, setChipFilters, setTextFilters) => {
1672
- var _a, _b;
1126
+ var validateInputs = (arrayElements, onError, onSuccess) => {
1127
+ var _a;
1673
1128
  let requiredValues = 0;
1674
1129
  let filledValues = 0;
1675
1130
  for (let i = 0; i < arrayElements.length; i++) {
1676
- const element = arrayElements[i];
1677
- const { validation, element: typeElement } = validateTypeElements(element);
1678
- const textValue = ((_a = typeElement.state) == null ? void 0 : _a.textValue) !== void 0 ? String((_b = typeElement.state) == null ? void 0 : _b.textValue) : String(typeElement.state);
1679
- if (typeElement == null ? void 0 : typeElement.required) {
1680
- requiredValues++;
1681
- if (textValue.trim() !== "" && textValue.trim() !== ",") {
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()) !== "") {
1682
1136
  filledValues++;
1683
1137
  }
1684
1138
  }
1685
1139
  }
1686
1140
  if (requiredValues === filledValues) {
1687
1141
  onSuccess();
1688
- setChipFilters(true);
1689
1142
  } else {
1690
1143
  onError({
1691
1144
  type: "error",
1692
1145
  title: "Algunos campos son requeridos",
1693
1146
  time: 10
1694
1147
  });
1695
- setChipFilters(false);
1696
- }
1697
- };
1698
-
1699
- // src/Components/Drawer/Helpers/validateTypeElement.tsx
1700
- import React10 from "react";
1701
- var validateTypeElements = (element) => {
1702
- var _a;
1703
- let validation = "";
1704
- let typeElement = element;
1705
- if (element.type == "textField") {
1706
- validation = "textField";
1707
- typeElement = element;
1708
- } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCtextField") {
1709
- validation = "textField";
1710
- typeElement = element == null ? void 0 : element.component.props;
1711
- } else if (element.type == "textArea") {
1712
- validation = "textArea";
1713
- typeElement = element;
1714
- } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCtextArea") {
1715
- validation = "textArea";
1716
- typeElement = element == null ? void 0 : element.component.props;
1717
- } else if (element.type == "dateRange") {
1718
- validation = "dateRange";
1719
- typeElement = element;
1720
- } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCDateRange") {
1721
- validation = "dateRange";
1722
- typeElement = element == null ? void 0 : element.component.props;
1723
- } else if (element.type == "autocomplete") {
1724
- validation = "autocomplete";
1725
- typeElement = element;
1726
- } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCAutocomplete") {
1727
- validation = "autocomplete";
1728
- typeElement = element == null ? void 0 : element.component.props;
1729
- } else if (element.typeFormat == "multiselect") {
1730
- validation = "multiselect";
1731
- typeElement = element;
1732
- } 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") {
1733
- validation = "multiselect";
1734
- typeElement = element == null ? void 0 : element.component.props;
1735
- } else if (element.type == "select") {
1736
- validation = "select";
1737
- typeElement = element;
1738
- } else if (React10.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCSelect") {
1739
- validation = "select";
1740
- typeElement = element == null ? void 0 : element.component.props;
1741
1148
  }
1742
- return {
1743
- validation,
1744
- element: typeElement
1745
- };
1746
1149
  };
1747
1150
 
1748
1151
  // src/Components/Drawer/SCDrawer.tsx
@@ -1757,42 +1160,16 @@ function SCDrawer({
1757
1160
  anchor = "left",
1758
1161
  width,
1759
1162
  //Funcionales
1760
- open,
1761
- setOpen,
1762
- chipFilters
1163
+ open
1763
1164
  }) {
1764
1165
  var _a, _b;
1765
- const scrollRef = useRef3(null);
1766
- const [drawerOpen, setDrawerOpen] = React11.useState(open);
1767
- const [toast, setToast] = React11.useState(null);
1768
- const [stateChipFilters, setChipFilters] = React11.useState(false);
1769
- const [textFilters, setTextFilters] = React11.useState([]);
1770
- useEffect10(() => {
1771
- if (chipFilters != void 0) {
1772
- if (chipFilters.length > 0) {
1773
- setTextFilters([]);
1774
- inputValidation();
1775
- }
1776
- }
1777
- }, [chipFilters]);
1778
- useEffect10(() => {
1779
- if (open) {
1780
- toggleDrawer(true);
1781
- } else {
1782
- handleDrawerClose();
1783
- }
1784
- }, [open]);
1166
+ const [drawerOpen, setDrawerOpen] = React7.useState(open);
1167
+ const [toast, setToast] = React7.useState(null);
1785
1168
  const handleDrawerClose = () => {
1786
1169
  setDrawerOpen(false);
1787
- if (setOpen) {
1788
- setOpen(false);
1789
- }
1790
1170
  };
1791
1171
  const toggleDrawer = (newOpen) => () => {
1792
1172
  setDrawerOpen(newOpen);
1793
- if (setOpen) {
1794
- setOpen(true);
1795
- }
1796
1173
  };
1797
1174
  const ButtonIcon = getIcon2(buttonDrawer == null ? void 0 : buttonDrawer.icon);
1798
1175
  const setToastWithDelay = (toastContent) => {
@@ -1801,179 +1178,39 @@ function SCDrawer({
1801
1178
  setToast(toastContent);
1802
1179
  }, 10);
1803
1180
  };
1804
- const inputValidation = () => {
1805
- var _a2, _b2, _c, _d;
1806
- if (chipFilters != void 0 && chipFilters.length > 0) {
1807
- if (chipFilters && chipFilters.length > 0) {
1808
- arrayElements.forEach((arrayElement) => {
1809
- var _a3, _b3, _c2;
1810
- const { validation, element: typeElement } = validateTypeElements(arrayElement);
1811
- let currentValue = "";
1812
- if (validation === "dateRange") {
1813
- if (typeElement.state && typeElement.state[0] && typeElement.state[1]) {
1814
- 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")}`;
1815
- }
1816
- } else {
1817
- currentValue = ((_c2 = typeElement.state) == null ? void 0 : _c2.textValue) !== void 0 ? String(typeElement.state.textValue).trim() : String(typeElement.state).trim();
1818
- }
1819
- chipFilters.forEach((chipFilter) => {
1820
- const chipValue = String(chipFilter).trim();
1821
- if (currentValue === chipValue && currentValue !== "" && currentValue !== ",") {
1822
- setTextFilters((prevFilters) => {
1823
- const newFilter = { value: currentValue, arrayElement: typeElement };
1824
- const existingFilterIndex = prevFilters.findIndex(
1825
- (filter) => filter.arrayElement.label === arrayElement.label
1826
- );
1827
- if (existingFilterIndex !== -1) {
1828
- const updatedFilters = [...prevFilters];
1829
- updatedFilters[existingFilterIndex] = newFilter;
1830
- return updatedFilters;
1831
- } else {
1832
- return [...prevFilters, newFilter];
1833
- }
1834
- });
1835
- }
1836
- });
1837
- });
1838
- }
1839
- } else {
1840
- const newFiltersToAdd = [];
1841
- for (let i = 0; i < arrayElements.length; i++) {
1842
- const element = arrayElements[i];
1843
- const { validation, element: typeElement } = validateTypeElements(element);
1844
- const textValue = ((_a2 = typeElement.state) == null ? void 0 : _a2.textValue) !== void 0 ? String((_b2 = typeElement.state) == null ? void 0 : _b2.textValue) : String(typeElement.state);
1845
- if (textValue.trim() !== "" && textValue.trim() !== ",") {
1846
- let newFilter;
1847
- switch (validation) {
1848
- case "dateRange":
1849
- 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")}`;
1850
- newFilter = { value: values, arrayElement: typeElement };
1851
- break;
1852
- default:
1853
- newFilter = { value: textValue, arrayElement: typeElement };
1854
- break;
1855
- }
1856
- const existingFilterByLabel = newFiltersToAdd.find(
1857
- (filter) => filter.arrayElement.label === element.label
1858
- );
1859
- if (existingFilterByLabel) {
1860
- existingFilterByLabel.value = newFilter.value;
1861
- existingFilterByLabel.arrayElement = newFilter.arrayElement;
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: [] });
1862
1196
  } else {
1863
- newFiltersToAdd.push(newFilter);
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: "" });
1864
1199
  }
1865
1200
  }
1866
1201
  }
1867
- setTextFilters((prevFilters) => {
1868
- let updatedFilters = [...prevFilters];
1869
- newFiltersToAdd.forEach((newFilter) => {
1870
- const existingFilterIndex = updatedFilters.findIndex(
1871
- (filter) => filter.arrayElement.label === newFilter.arrayElement.label
1872
- );
1873
- if (existingFilterIndex !== -1) {
1874
- updatedFilters[existingFilterIndex] = newFilter;
1875
- } else {
1876
- updatedFilters.push(newFilter);
1877
- }
1878
- });
1879
- return updatedFilters;
1880
- });
1881
- validateInputs(arrayElements, setToastWithDelay, handleDrawerClose, setChipFilters, setTextFilters);
1882
- }
1883
- };
1884
- const resetElementByType = (originalElement, validation, typeElement) => {
1885
- let defaultValue;
1886
- switch (validation) {
1887
- case "textField":
1888
- case "textArea":
1889
- defaultValue = "";
1890
- break;
1891
- case "dateRange":
1892
- defaultValue = [null, null];
1893
- break;
1894
- case "multiselect":
1895
- defaultValue = { hiddenValue: [], textValue: [] };
1896
- break;
1897
- default:
1898
- defaultValue = { hiddenValue: "-1", textValue: "" };
1899
- }
1900
- if (typeElement.setState) {
1901
- typeElement.setState(defaultValue);
1902
- }
1903
- };
1904
- const cleanFilters = () => {
1905
- arrayElements.forEach((element) => {
1906
- const { validation, element: typeElement } = validateTypeElements(element);
1907
- if (typeElement.setState) {
1908
- resetElementByType(element, validation, typeElement);
1909
- }
1910
- });
1911
- setTextFilters([]);
1912
- };
1913
- const deleteFilter = (element) => {
1914
- const { validation, element: typeElement } = validateTypeElements(element);
1915
- if (typeElement.setState && shouldShowChips == true) {
1916
- resetElementByType(element, validation, typeElement);
1917
- setTextFilters(
1918
- (prevFilters) => prevFilters.filter((filter) => filter.arrayElement.label !== element.label)
1919
- );
1920
- }
1921
- };
1922
- const scroll = (offset) => {
1923
- if (scrollRef.current) {
1924
- scrollRef.current.scrollLeft += offset;
1925
- }
1926
- };
1927
- const hasActiveFilters = () => {
1928
- return arrayElements.some((arrayElement) => {
1929
- const { validation, element: typeElement } = validateTypeElements(arrayElement);
1930
- if (typeElement.state.textValue !== void 0) {
1931
- return String(typeElement.state.textValue).trim() !== "";
1932
- } else if (validation === "dateRange") {
1933
- return typeElement.state && typeElement.state[0] !== null && typeElement.state[1] !== null;
1934
- } else {
1935
- return String(typeElement.state).trim() !== "" && String(typeElement.state).trim() !== ",";
1936
- }
1937
1202
  });
1938
1203
  };
1939
- const shouldShowChips = chipFilters != void 0 && chipFilters.length > 0 ? true : stateChipFilters === true && hasActiveFilters();
1940
- const actionsA = actions == false ? false : actions != void 0 ? actions : [{ text: "Aplicar filtros", fn: inputValidation }, { text: "Limpiar filtros", fn: cleanFilters }];
1941
- 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(
1942
- Box9,
1943
- {
1944
- ref: scrollRef,
1945
- gap: 0.3,
1946
- sx: {
1947
- display: "flex",
1948
- overflowX: "auto",
1949
- scrollBehavior: "smooth",
1950
- "&::-webkit-scrollbar": { display: "none" }
1951
- }
1952
- },
1953
- textFilters == null ? void 0 : textFilters.map((chipData, index) => /* @__PURE__ */ React11.createElement(
1954
- Chip2,
1955
- __spreadProps(__spreadValues({
1956
- key: index,
1957
- label: chipData.value
1958
- }, chipData.arrayElement.required == false || chipData.arrayElement.required == void 0 ? { onDelete: () => deleteFilter(chipData.arrayElement) } : {}), {
1959
- color: "default",
1960
- variant: "filled",
1961
- size: "small",
1962
- sx: {
1963
- flexShrink: 0,
1964
- minWidth: "auto"
1965
- }
1966
- })
1967
- ))
1968
- ), /* @__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(
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(
1969
1206
  Chip2,
1970
1207
  __spreadProps(__spreadValues({
1971
1208
  onClick: toggleDrawer(true),
1972
1209
  color: buttonDrawer == null ? void 0 : buttonDrawer.color,
1973
1210
  variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) == "contained" ? "filled" : "outlined",
1974
1211
  label: (_a = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _a : "",
1975
- icon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" && ButtonIcon ? /* @__PURE__ */ React11.createElement(ButtonIcon, { fontSize: "small" }) : void 0,
1976
- deleteIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React11.createElement(ButtonIcon, { fontSize: "small" }) : void 0
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
1977
1214
  }, (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? { onDelete: () => {
1978
1215
  } } : {}), {
1979
1216
  sx: {
@@ -1983,8 +1220,8 @@ function SCDrawer({
1983
1220
  textTransform: "capitalize"
1984
1221
  }
1985
1222
  })
1986
- ) : /* @__PURE__ */ React11.createElement(
1987
- Button6,
1223
+ ) : /* @__PURE__ */ React7.createElement(
1224
+ Button4,
1988
1225
  {
1989
1226
  "data-testid": "test-buttonDrawer",
1990
1227
  sx: { textTransform: "capitalize" },
@@ -1992,11 +1229,11 @@ function SCDrawer({
1992
1229
  onClick: toggleDrawer(true),
1993
1230
  size: "small",
1994
1231
  variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) != void 0 ? buttonDrawer == null ? void 0 : buttonDrawer.variant : "text",
1995
- startIcon: ((buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" || !(buttonDrawer == null ? void 0 : buttonDrawer.iconPosition)) && ButtonIcon ? /* @__PURE__ */ React11.createElement(ButtonIcon, { fontSize: "small" }) : null,
1996
- endIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React11.createElement(ButtonIcon, { fontSize: "small" }) : null
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
1997
1234
  },
1998
1235
  (_b = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _b : ""
1999
- )), /* @__PURE__ */ React11.createElement(
1236
+ ), /* @__PURE__ */ React7.createElement(
2000
1237
  Drawer,
2001
1238
  {
2002
1239
  open: drawerOpen,
@@ -2010,15 +1247,15 @@ function SCDrawer({
2010
1247
  }
2011
1248
  }
2012
1249
  },
2013
- /* @__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) => {
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) => {
2014
1251
  var _a2, _b2, _c, _d, _e, _f;
2015
- return /* @__PURE__ */ React11.createElement(
2016
- Box9,
1252
+ return /* @__PURE__ */ React7.createElement(
1253
+ Box7,
2017
1254
  {
2018
1255
  key: `Stack_${(_a2 = arrayElement.type) != null ? _a2 : ""} ${(_b2 = arrayElement.label) != null ? _b2 : ""}${index}`,
2019
1256
  sx: { width: "100%" }
2020
1257
  },
2021
- arrayElement.component ? /* @__PURE__ */ React11.createElement(Stack5, { direction: "row", alignItems: "left", gap: 1 }, arrayElement.component) : arrayElement.type === "textField" ? /* @__PURE__ */ React11.createElement(
1258
+ arrayElement.component ? /* @__PURE__ */ React7.createElement(Stack3, { direction: "row", alignItems: "left", gap: 1 }, arrayElement.component) : arrayElement.type === "textField" ? /* @__PURE__ */ React7.createElement(
2022
1259
  SCTextField,
2023
1260
  {
2024
1261
  title: arrayElement.title,
@@ -2044,7 +1281,7 @@ function SCDrawer({
2044
1281
  onBlur: arrayElement.onBlur,
2045
1282
  onKeyDown: arrayElement.onKeyDown
2046
1283
  }
2047
- ) : arrayElement.type === "textArea" ? /* @__PURE__ */ React11.createElement(
1284
+ ) : arrayElement.type === "textArea" ? /* @__PURE__ */ React7.createElement(
2048
1285
  SCTextArea,
2049
1286
  {
2050
1287
  title: arrayElement.title,
@@ -2063,7 +1300,7 @@ function SCDrawer({
2063
1300
  state: arrayElement.state || "",
2064
1301
  onBlur: arrayElement.onBlur
2065
1302
  }
2066
- ) : arrayElement.type === "autocomplete" ? /* @__PURE__ */ React11.createElement(
1303
+ ) : arrayElement.type === "autocomplete" ? /* @__PURE__ */ React7.createElement(
2067
1304
  SCAutocomplete,
2068
1305
  {
2069
1306
  label: arrayElement.label,
@@ -2081,7 +1318,7 @@ function SCDrawer({
2081
1318
  state: arrayElement.state || "",
2082
1319
  inputChange: arrayElement.inputChange
2083
1320
  }
2084
- ) : arrayElement.type === "select" ? /* @__PURE__ */ React11.createElement(
1321
+ ) : arrayElement.type === "select" ? /* @__PURE__ */ React7.createElement(
2085
1322
  SCSelect,
2086
1323
  {
2087
1324
  label: arrayElement.label,
@@ -2090,6 +1327,7 @@ function SCDrawer({
2090
1327
  width: arrayElement.width,
2091
1328
  size: arrayElement.size,
2092
1329
  variant: arrayElement.variant,
1330
+ deleteType: arrayElement.deleteType,
2093
1331
  required: arrayElement.required,
2094
1332
  disabled: arrayElement.disabled,
2095
1333
  background: arrayElement.background,
@@ -2097,7 +1335,7 @@ function SCDrawer({
2097
1335
  setState: arrayElement.setState,
2098
1336
  state: arrayElement.state || ""
2099
1337
  }
2100
- ) : arrayElement.type === "dateRange" ? /* @__PURE__ */ React11.createElement(
1338
+ ) : arrayElement.type === "dateRange" ? /* @__PURE__ */ React7.createElement(
2101
1339
  SCDateRange,
2102
1340
  {
2103
1341
  labelDateInitial: arrayElement.labelDateInitial,
@@ -2110,7 +1348,7 @@ function SCDrawer({
2110
1348
  }
2111
1349
  ) : null
2112
1350
  );
2113
- })), actionsA != void 0 && actionsA != false ? Array.isArray(actionsA) && (actionsA == null ? void 0 : actionsA.length) > 0 ? /* @__PURE__ */ React11.createElement(
1351
+ })), actionsA != void 0 && actionsA != false ? Array.isArray(actionsA) && (actionsA == null ? void 0 : actionsA.length) > 0 ? /* @__PURE__ */ React7.createElement(
2114
1352
  Grid4,
2115
1353
  {
2116
1354
  sx: { borderTop: 1, borderColor: "#1018403B" },
@@ -2122,8 +1360,8 @@ function SCDrawer({
2122
1360
  justifyContent: actionsA.length > 1 ? "space-between" : !anchor && anchor != "right" ? "flex-end" : "flex-start",
2123
1361
  flexDirection: anchor != "right" ? "row-reverse" : "row"
2124
1362
  },
2125
- actionsA.map((btn, index) => /* @__PURE__ */ React11.createElement(
2126
- Button6,
1363
+ actionsA.map((btn, index) => /* @__PURE__ */ React7.createElement(
1364
+ Button4,
2127
1365
  {
2128
1366
  key: index,
2129
1367
  variant: index === 0 || actionsA.length < 2 ? "contained" : "text",
@@ -2139,61 +1377,207 @@ function SCDrawer({
2139
1377
  }
2140
1378
 
2141
1379
  // src/Components/FooterAction/FooterAction.tsx
2142
- import React12 from "react";
2143
- import { AppBar, Toolbar, Box as Box10, Typography as Typography10 } from "@mui/material";
1380
+ import React8 from "react";
1381
+ import { AppBar, Toolbar, Box as Box8, Typography as Typography8 } from "@mui/material";
2144
1382
  var FooterAction = ({
2145
1383
  leftContent,
2146
1384
  rightContent,
2147
1385
  label,
2148
1386
  variant
2149
1387
  }) => {
2150
- return /* @__PURE__ */ React12.createElement(
1388
+ return /* @__PURE__ */ React8.createElement(
2151
1389
  AppBar,
2152
1390
  {
2153
1391
  color: "inherit",
2154
1392
  sx: { position: variant == "float" ? "relative" : "fixed", left: 0, right: "auto", width: "100%", top: "auto", bottom: 0 }
2155
1393
  },
2156
- /* @__PURE__ */ React12.createElement(
1394
+ /* @__PURE__ */ React8.createElement(
2157
1395
  Toolbar,
2158
1396
  {
2159
1397
  id: "footer-toolbar",
2160
1398
  sx: { gap: 1.5, minHeight: "50px !important" }
2161
1399
  },
2162
1400
  leftContent,
2163
- /* @__PURE__ */ React12.createElement(Box10, { flexGrow: 1 }),
2164
- label && /* @__PURE__ */ React12.createElement(Typography10, { variant: "body2", color: "text.secondary" }, label),
1401
+ /* @__PURE__ */ React8.createElement(Box8, { flexGrow: 1 }),
1402
+ label && /* @__PURE__ */ React8.createElement(Typography8, { variant: "body2", color: "text.secondary" }, label),
2165
1403
  rightContent
2166
1404
  )
2167
- );
1405
+ );
1406
+ };
1407
+
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
+ )));
2168
1552
  };
2169
1553
 
2170
1554
  // src/Components/MultiSelect/MultiSelect.tsx
2171
- import React13, { useEffect as useEffect11, useMemo as useMemo5 } from "react";
2172
- 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";
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";
2173
1557
  import { SearchOutlined } from "@mui/icons-material";
2174
1558
 
2175
1559
  // src/Components/MultiSelect/helpers/useHandlers.tsx
2176
- import { useCallback as useCallback4, useState as useState7 } from "react";
1560
+ import { useCallback as useCallback2, useState as useState6 } from "react";
2177
1561
  function useMultiSelectHandlers() {
2178
- const [anchorEl, setAnchorEl] = useState7(null);
2179
- const [open, setOpen] = useState7(false);
2180
- const [selectedItems, setSelectedItems] = useState7([]);
2181
- const [filterValue, setFilterValue] = useState7("");
2182
- const handleOpen = useCallback4((e) => {
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) => {
2183
1567
  setAnchorEl(e.currentTarget);
2184
1568
  setOpen(true);
2185
1569
  }, []);
2186
- const handleClose = useCallback4(() => {
1570
+ const handleClose = useCallback2(() => {
2187
1571
  setAnchorEl(null);
2188
1572
  setOpen(false);
2189
1573
  }, []);
2190
- const handleFilterChange = useCallback4(
1574
+ const handleFilterChange = useCallback2(
2191
1575
  (e) => {
2192
1576
  setFilterValue(e.target.value);
2193
1577
  },
2194
1578
  []
2195
1579
  );
2196
- const handleCheckboxToggle = useCallback4((item) => {
1580
+ const handleCheckboxToggle = useCallback2((item) => {
2197
1581
  setSelectedItems(
2198
1582
  (prev) => prev.includes(item) ? prev.filter((i) => i !== item) : [...prev, item]
2199
1583
  );
@@ -2220,15 +1604,15 @@ function getIconMultiSelect(name) {
2220
1604
  }
2221
1605
 
2222
1606
  // src/Components/MultiSelect/helpers/useFilteredItems.tsx
2223
- import { useMemo as useMemo4 } from "react";
1607
+ import { useMemo as useMemo2 } from "react";
2224
1608
  function useFilteredItems(items, filterValue, getItemLabel, selectedItems) {
2225
- const filteredItems = useMemo4(
1609
+ const filteredItems = useMemo2(
2226
1610
  () => items.filter(
2227
1611
  (item) => getItemLabel(item).toLowerCase().includes(filterValue.toLowerCase())
2228
1612
  ),
2229
1613
  [items, filterValue, getItemLabel]
2230
1614
  );
2231
- const sortedItems = useMemo4(() => {
1615
+ const sortedItems = useMemo2(() => {
2232
1616
  return [
2233
1617
  ...filteredItems.filter((item) => selectedItems.includes(item)),
2234
1618
  ...filteredItems.filter((item) => !selectedItems.includes(item))
@@ -2262,16 +1646,16 @@ function MultiSelect({
2262
1646
  handleCheckboxToggle,
2263
1647
  setOpen
2264
1648
  } = useMultiSelectHandlers();
2265
- useEffect11(() => {
1649
+ useEffect8(() => {
2266
1650
  if (open !== void 0) {
2267
1651
  setOpen(open);
2268
1652
  }
2269
1653
  }, [open, setOpen]);
2270
- useEffect11(() => {
1654
+ useEffect8(() => {
2271
1655
  setSelectedItems([]);
2272
1656
  }, [items, setSelectedItems]);
2273
1657
  const { filteredItems, sortedItems } = useFilteredItems(items, filterValue, getItemLabel, selectedItems);
2274
- const Icon = useMemo5(() => {
1658
+ const Icon = useMemo3(() => {
2275
1659
  var _a2;
2276
1660
  return getIconMultiSelect((_a2 = button == null ? void 0 : button.icon) != null ? _a2 : "FilterListOutlined");
2277
1661
  }, [button == null ? void 0 : button.icon]);
@@ -2285,19 +1669,19 @@ function MultiSelect({
2285
1669
  { text: "Aplicar", fn: () => {
2286
1670
  } }
2287
1671
  ];
2288
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
2289
- Button7,
1672
+ return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
1673
+ Button6,
2290
1674
  {
2291
1675
  "test-id": "multiselect-button",
2292
1676
  color: (_a = button == null ? void 0 : button.color) != null ? _a : "primary",
2293
1677
  onClick: handleOpen,
2294
1678
  variant: (_b = button == null ? void 0 : button.variant) != null ? _b : "text",
2295
1679
  size: "small",
2296
- startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */ React13.createElement(Icon, null) : null,
2297
- endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */ React13.createElement(Icon, null) : null
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
2298
1682
  },
2299
1683
  capitalize(textButton != null ? textButton : "MultiSelect")
2300
- ), /* @__PURE__ */ React13.createElement(
1684
+ ), /* @__PURE__ */ React11.createElement(
2301
1685
  Popover3,
2302
1686
  {
2303
1687
  elevation: 8,
@@ -2306,7 +1690,7 @@ function MultiSelect({
2306
1690
  open: openMultiselect,
2307
1691
  onClose: () => setOpen(false)
2308
1692
  },
2309
- /* @__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(
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(
2310
1694
  TextField4,
2311
1695
  {
2312
1696
  "data-testid": "multiselect-input",
@@ -2318,18 +1702,18 @@ function MultiSelect({
2318
1702
  onChange: handleFilterChange,
2319
1703
  slotProps: {
2320
1704
  input: {
2321
- endAdornment: /* @__PURE__ */ React13.createElement(InputAdornment5, { position: "end" }, /* @__PURE__ */ React13.createElement(SearchOutlined, { fontSize: "small" }))
1705
+ endAdornment: /* @__PURE__ */ React11.createElement(InputAdornment5, { position: "end" }, /* @__PURE__ */ React11.createElement(SearchOutlined, { fontSize: "small" }))
2322
1706
  }
2323
1707
  }
2324
1708
  }
2325
- ))), /* @__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(
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(
2326
1710
  MenuItem3,
2327
1711
  {
2328
1712
  key: getItemLabel(item),
2329
1713
  dense,
2330
1714
  onClick: () => handleCheckboxToggle(item)
2331
1715
  },
2332
- /* @__PURE__ */ React13.createElement(ListItemIcon3, null, /* @__PURE__ */ React13.createElement(
1716
+ /* @__PURE__ */ React11.createElement(ListItemIcon3, null, /* @__PURE__ */ React11.createElement(
2333
1717
  Checkbox2,
2334
1718
  {
2335
1719
  checked: selectedItems.includes(item),
@@ -2337,10 +1721,10 @@ function MultiSelect({
2337
1721
  }
2338
1722
  )),
2339
1723
  getItemLabel(item)
2340
- )) : /* @__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) => {
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) => {
2341
1725
  var _a2;
2342
- return /* @__PURE__ */ React13.createElement(
2343
- Button7,
1726
+ return /* @__PURE__ */ React11.createElement(
1727
+ Button6,
2344
1728
  {
2345
1729
  key: index,
2346
1730
  variant: index === 0 || resolvedActions.length < 2 ? "text" : "contained",
@@ -2355,8 +1739,8 @@ function MultiSelect({
2355
1739
  }
2356
1740
 
2357
1741
  // src/Components/PageHeader/PageHeader.tsx
2358
- import React14 from "react";
2359
- import { Stack as Stack7, Typography as Typography11 } from "@mui/material";
1742
+ import React12 from "react";
1743
+ import { Stack as Stack6, Typography as Typography10 } from "@mui/material";
2360
1744
  var PageHeader = ({
2361
1745
  title,
2362
1746
  subtitle,
@@ -2365,8 +1749,8 @@ var PageHeader = ({
2365
1749
  fixed,
2366
1750
  shadow = true
2367
1751
  }) => {
2368
- return /* @__PURE__ */ React14.createElement(
2369
- Stack7,
1752
+ return /* @__PURE__ */ React12.createElement(
1753
+ Stack6,
2370
1754
  {
2371
1755
  "data-testid": "main-container",
2372
1756
  justifyContent: "center",
@@ -2377,13 +1761,13 @@ var PageHeader = ({
2377
1761
  zIndex: 10,
2378
1762
  sx: { boxShadow: shadow ? (theme) => theme.shadows[1] : "none" }
2379
1763
  },
2380
- /* @__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))
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))
2381
1765
  );
2382
1766
  };
2383
1767
 
2384
1768
  // src/Components/SCCalendarSwipeable.tsx
2385
- import React15, { useState as useState8 } from "react";
2386
- import { Typography as Typography12, IconButton as IconButton8, Box as Box11 } from "@mui/material";
1769
+ import React13, { useState as useState7 } from "react";
1770
+ import { Typography as Typography11, IconButton as IconButton7, Box as Box10 } from "@mui/material";
2387
1771
  import Grid5 from "@mui/material/Grid2";
2388
1772
  import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
2389
1773
  import { LocalizationProvider as LocalizationProvider2 } from "@mui/x-date-pickers/LocalizationProvider";
@@ -2401,14 +1785,14 @@ var SCCalendarSwipeable = ({
2401
1785
  state
2402
1786
  }) => {
2403
1787
  let convertFecha;
2404
- const [fecha, setFecha] = useState8(/* @__PURE__ */ new Date());
2405
- const [fechaSeleccionada, setFechaSeleccionada] = useState8();
2406
- const [stateVal, setstateVal] = React15.useState(/* @__PURE__ */ new Date());
2407
- const [openCalendar, setOpenCalendar] = React15.useState(false);
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);
2408
1792
  const hoy = /* @__PURE__ */ new Date();
2409
1793
  const inicioSemana = startOfWeek(fecha, { weekStartsOn: 0 });
2410
1794
  const diasSemana = Array.from({ length: 7 }, (_, i) => addDays(inicioSemana, i));
2411
- React15.useEffect(() => {
1795
+ React13.useEffect(() => {
2412
1796
  if (fecha != null) {
2413
1797
  handleConvertFecha(fecha);
2414
1798
  }
@@ -2427,12 +1811,12 @@ var SCCalendarSwipeable = ({
2427
1811
  setOpenCalendar(newOpen);
2428
1812
  };
2429
1813
  const locale = __spreadValues({}, es);
2430
- 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: {
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: {
2431
1815
  justifyContent: "space-between",
2432
1816
  padding: "12px 0px",
2433
1817
  background: "transparent"
2434
- } }, 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(
2435
- Box11,
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,
2436
1820
  {
2437
1821
  onClick: () => setFecha(dia),
2438
1822
  sx: {
@@ -2447,8 +1831,8 @@ var SCCalendarSwipeable = ({
2447
1831
  //height: '36px',
2448
1832
  }
2449
1833
  },
2450
- /* @__PURE__ */ React15.createElement(Typography12, { sx: { fontSize: "12px !important", color: isSameDay(dia, fecha) ? "white" : "#101840DE" } }, format(dia, "d"))
2451
- )))), /* @__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(
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(
2452
1836
  StaticDatePicker,
2453
1837
  {
2454
1838
  orientation: "landscape",
@@ -2458,17 +1842,17 @@ var SCCalendarSwipeable = ({
2458
1842
  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" } },
2459
1843
  onChange: (newValue) => setFecha(newValue)
2460
1844
  }
2461
- ), /* @__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))))));
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))))));
2462
1846
  };
2463
1847
 
2464
1848
  // src/Components/SCDataGrid.tsx
2465
- import React16, { useEffect as useEffect13, useState as useState9 } from "react";
1849
+ import React14, { useEffect as useEffect10, useState as useState8 } from "react";
2466
1850
  import { DataGridPro, useGridApiRef } from "@mui/x-data-grid-pro";
2467
1851
  import { LicenseInfo as LicenseInfo2 } from "@mui/x-license-pro";
2468
1852
  import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
2469
1853
  import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
2470
1854
  import { useTheme } from "@mui/material/styles";
2471
- function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }) {
1855
+ var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }) => {
2472
1856
  LicenseInfo2.setLicenseKey(
2473
1857
  "77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
2474
1858
  );
@@ -2479,80 +1863,45 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2479
1863
  return Math.floor(Math.random() * 1e6);
2480
1864
  }
2481
1865
  const getTreeDataPaths = (row) => {
2482
- var _a, _b, _c;
2483
- const group1Value = groupColumns && ((_a = groupColumns(row)) == null ? void 0 : _a.valueGroup1);
2484
- const group2Value = groupColumns && ((_b = groupColumns(row)) == null ? void 0 : _b.valueGroup2);
2485
- const fieldValue = groupColumns && ((_c = groupColumns(row)) == null ? void 0 : _c.fieldFirstColumn);
2486
1866
  return [
2487
- String(group1Value || ""),
2488
- ...group2Value ? [String(group2Value)] : [],
2489
- `${String(fieldValue || "")}/${generateRandomId()}`
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()}`
2490
1870
  ];
2491
1871
  };
2492
1872
  const groupingColDefs = {
2493
1873
  field: "grouping",
2494
- headerName: groupColumns ? groupColumns(data[0]).headerNameFirstColumn : "Agrupador",
1874
+ headerName: groupColumns != void 0 ? groupColumns[groupColumns.length - 1].split("[").length == 2 ? groupColumns[groupColumns.length - 1].split("[")[0].trim() : "Agrupador" : "",
2495
1875
  renderCell: (params) => {
2496
- var _a, _b;
1876
+ var _a;
2497
1877
  let label = params.value.toString().includes("/") ? params.value.split("/")[0].toString() : params.value.toString();
2498
- let maxDepth = 0;
2499
- if (groupColumns && data.length > 0) {
2500
- const sampleItem = groupColumns(data[0]);
2501
- if (sampleItem.valueGroup1) maxDepth++;
2502
- if (sampleItem.valueGroup2) maxDepth++;
2503
- maxDepth = Math.max(0, maxDepth - 1);
2504
- }
2505
- if (groupColumns) {
1878
+ const maxDepth = groupColumns ? groupColumns.length - 2 : 0;
1879
+ if (groupColumns != void 0) {
2506
1880
  if (params.rowNode.depth === 0) {
2507
- let customLabel = label;
2508
- if (groupColumns) {
2509
- const originalItem = data.find(
2510
- (item) => {
2511
- var _a2;
2512
- return String((_a2 = groupColumns(item)) == null ? void 0 : _a2.valueGroup1) === label;
2513
- }
2514
- );
2515
- if (originalItem) {
2516
- const itemValue = groupColumns(originalItem);
2517
- customLabel = itemValue.textGroup1 || label;
2518
- }
2519
- }
2520
- const subgroup1 = arrayRows.filter((r) => {
2521
- var _a2;
2522
- return groupColumns && String((_a2 = groupColumns(r)) == null ? void 0 : _a2.valueGroup1) === label;
2523
- }).map((r) => {
2524
- var _a2;
2525
- return groupColumns && String((_a2 = groupColumns(r)) == null ? void 0 : _a2.valueGroup2);
2526
- });
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]);
2527
1887
  const groupedDataLength1 = subgroup1.filter((valor, indiceActual, arreglo) => arreglo.indexOf(valor) === indiceActual);
2528
- label = `${customLabel} (${groupedDataLength1.length})`;
2529
- } else if (((_a = groupColumns(data[0])) == null ? void 0 : _a.valueGroup2) && params.rowNode.depth === 1) {
2530
- const labelGrouping1 = (_b = params.api.getRowNode(params.rowNode.parent)) == null ? void 0 : _b.groupingKey.toString();
2531
- let customLabel = label;
2532
- if (groupColumns) {
2533
- const originalItem = data.find(
2534
- (item) => {
2535
- var _a2;
2536
- return String((_a2 = groupColumns(item)) == null ? void 0 : _a2.valueGroup2) === label;
2537
- }
2538
- );
2539
- if (originalItem) {
2540
- const itemValue = groupColumns(originalItem);
2541
- customLabel = itemValue.textGroup2 || label;
2542
- }
2543
- }
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();
2544
1896
  const groupedDataLength2 = arrayRows.filter(
2545
- (r) => {
2546
- var _a2, _b2;
2547
- return groupColumns && String((_a2 = groupColumns(r)) == null ? void 0 : _a2.valueGroup1) === labelGrouping1 && groupColumns && String((_b2 = groupColumns(r)) == null ? void 0 : _b2.valueGroup2) === label;
2548
- }
1897
+ (r) => r[fieldGrouping1] === labelGrouping1 && r[fieldGrouping2] === label
2549
1898
  ).length;
2550
- label = `${customLabel} (${groupedDataLength2})`;
1899
+ label = `${labelGrouping2} (${groupedDataLength2})`;
2551
1900
  } else {
2552
1901
  label = label;
2553
1902
  }
2554
1903
  }
2555
- return /* @__PURE__ */ React16.createElement(
1904
+ return /* @__PURE__ */ React14.createElement(
2556
1905
  "div",
2557
1906
  {
2558
1907
  style: {
@@ -2569,7 +1918,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2569
1918
  fontWeight: params.rowNode.type == "group" ? "400" : "300"
2570
1919
  }
2571
1920
  },
2572
- params.rowNode.type === "group" && /* @__PURE__ */ React16.createElement(
1921
+ params.rowNode.type === "group" && /* @__PURE__ */ React14.createElement(
2573
1922
  "span",
2574
1923
  {
2575
1924
  style: {
@@ -2582,32 +1931,25 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2582
1931
  params.api.setRowChildrenExpansion(params.id, !params.rowNode.childrenExpanded);
2583
1932
  }
2584
1933
  },
2585
- params.rowNode.childrenExpanded ? /* @__PURE__ */ React16.createElement(KeyboardArrowUpIcon, { fontSize: "small", color: "action" }) : /* @__PURE__ */ React16.createElement(KeyboardArrowDownIcon, { fontSize: "small", color: "action" })
1934
+ params.rowNode.childrenExpanded ? /* @__PURE__ */ React14.createElement(KeyboardArrowUpIcon, { fontSize: "small", color: "action" }) : /* @__PURE__ */ React14.createElement(KeyboardArrowDownIcon, { fontSize: "small", color: "action" })
2586
1935
  ),
2587
1936
  label
2588
1937
  );
2589
1938
  },
2590
1939
  colSpan: (params) => {
2591
- var _a, _b;
2592
1940
  const value = String(params);
2593
- const fieldGrouping1 = groupColumns ? (_a = groupColumns(data[0])) == null ? void 0 : _a.valueGroup1 : void 0;
2594
- const fieldGrouping2 = groupColumns ? (_b = groupColumns(data[0])) == null ? void 0 : _b.valueGroup2 : void 0;
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;
2595
1943
  let agrupado1 = false;
2596
1944
  let agrupado2 = false;
2597
1945
  if (fieldGrouping1 != void 0) {
2598
1946
  agrupado1 = arrayRows.some(
2599
- (row) => {
2600
- var _a2;
2601
- return groupColumns && String((_a2 = groupColumns(row)) == null ? void 0 : _a2.valueGroup1) === value;
2602
- }
1947
+ (row) => String(row[fieldGrouping1]) === value
2603
1948
  );
2604
1949
  }
2605
1950
  if (fieldGrouping2 != void 0) {
2606
1951
  agrupado2 = arrayRows.some(
2607
- (row) => {
2608
- var _a2;
2609
- return groupColumns && String((_a2 = groupColumns(row)) == null ? void 0 : _a2.valueGroup2) === value;
2610
- }
1952
+ (row) => String(row[fieldGrouping2]) === value
2611
1953
  );
2612
1954
  }
2613
1955
  if (agrupado1 || agrupado2) {
@@ -2624,11 +1966,11 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2624
1966
  let styleRowHeight = density == "compact" ? 32 : density == "standard" ? 28 : density == "comfortable" ? 36 : 32;
2625
1967
  let rows = rowsTable ? rowsTable : validationTreeData != false ? parseInt(data.length.toString()) : data.length < 10 ? parseInt(data.length.toString()) : 10;
2626
1968
  let validationGroupingColDef = groupingColDefs || {};
2627
- const [groupDataLenght, setGroupDataLengh] = useState9(0);
2628
- const [pageSize, setPageSize] = useState9(rows);
2629
- const [arrayRows, setArrayRows] = useState9([]);
2630
- const [selectionModel, setSelectionModel] = useState9([]);
2631
- useEffect13(() => {
1969
+ const [groupDataLenght, setGroupDataLengh] = useState8(0);
1970
+ const [pageSize, setPageSize] = useState8(rows);
1971
+ const [arrayRows, setArrayRows] = useState8([]);
1972
+ const [selectionModel, setSelectionModel] = useState8([]);
1973
+ useEffect10(() => {
2632
1974
  if ((data == null ? void 0 : data.length) > 0) {
2633
1975
  dataConvertRows(data, void 0);
2634
1976
  }
@@ -2684,7 +2026,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2684
2026
  setSelectionModel([...newSelection]);
2685
2027
  }
2686
2028
  };
2687
- 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(
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(
2688
2030
  DataGridPro,
2689
2031
  {
2690
2032
  apiRef,
@@ -2718,6 +2060,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2718
2060
  },
2719
2061
  sx: {
2720
2062
  maxHeight: maxHeight ? `${maxHeight}px` : "none",
2063
+ //overflow: 'auto',
2721
2064
  "& .MuiDataGrid-filler": {
2722
2065
  display: "none !important"
2723
2066
  },
@@ -2747,54 +2090,42 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2747
2090
  }
2748
2091
  }
2749
2092
  ))));
2750
- }
2751
- var SCDataGrid = React16.memo(SCDataGridInitial, (prevProps, nextProps) => {
2752
- const isEqual = prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight && prevProps.density === nextProps.density;
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;
2753
2096
  return isEqual;
2754
2097
  });
2755
2098
 
2756
2099
  // src/Components/EmptyState/EmptyState.tsx
2757
- import React21 from "react";
2758
- import { Button as Button9, Stack as Stack8, Typography as Typography13 } from "@mui/material";
2100
+ import React15 from "react";
2101
+ import { Button as Button8, Stack as Stack7, Typography as Typography12 } from "@mui/material";
2759
2102
 
2760
- // src/assets/ImgEmptyState/create.tsx
2761
- import React17 from "react";
2762
- var Create = () => {
2763
- 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)" }))));
2764
- };
2103
+ // src/assets/ImgEmptyState/create.svg
2104
+ var create_default = "./create-KZGO2OZA.svg";
2765
2105
 
2766
- // src/assets/ImgEmptyState/empty.tsx
2767
- import React18 from "react";
2768
- var Empty = () => {
2769
- 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)" }))));
2770
- };
2106
+ // src/assets/ImgEmptyState/error.svg
2107
+ var error_default = "./error-RUCZUXDN.svg";
2771
2108
 
2772
- // src/assets/ImgEmptyState/error.tsx
2773
- import React19 from "react";
2774
- var Error2 = () => {
2775
- 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" }));
2776
- };
2109
+ // src/assets/ImgEmptyState/empty.svg
2110
+ var empty_default = "./empty-3NEKE7WO.svg";
2777
2111
 
2778
- // src/assets/ImgEmptyState/search.tsx
2779
- import React20 from "react";
2780
- var Search2 = () => {
2781
- 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)" }))));
2782
- };
2112
+ // src/assets/ImgEmptyState/search.svg
2113
+ var search_default = "./search-OKSCVF2W.svg";
2783
2114
 
2784
2115
  // src/Components/EmptyState/EmptyState.tsx
2785
2116
  var EmptyStateImageUrls = {
2786
- create: /* @__PURE__ */ React21.createElement(Create, null),
2787
- error: /* @__PURE__ */ React21.createElement(Error2, null),
2788
- noResult: /* @__PURE__ */ React21.createElement(Empty, null),
2789
- search: /* @__PURE__ */ React21.createElement(Search2, null)
2117
+ create: create_default,
2118
+ error: error_default,
2119
+ noResult: empty_default,
2120
+ search: search_default
2790
2121
  };
2791
2122
  var DefaultIcon = ({
2792
2123
  state = "create",
2793
2124
  size = "large"
2794
2125
  }) => {
2795
- const Icon = EmptyStateImageUrls[state];
2126
+ const imageUrl = EmptyStateImageUrls[state];
2796
2127
  const iconSize = size === "small" ? { width: "40px", height: "40px" } : { width: "60px", height: "60px" };
2797
- return /* @__PURE__ */ React21.createElement("div", null, Icon);
2128
+ return /* @__PURE__ */ React15.createElement("img", { src: imageUrl, alt: state, style: iconSize });
2798
2129
  };
2799
2130
  var EmptyState = ({
2800
2131
  state = "create",
@@ -2803,12 +2134,12 @@ var EmptyState = ({
2803
2134
  subtitle,
2804
2135
  actions,
2805
2136
  containerHeight = "100vh",
2806
- icon = /* @__PURE__ */ React21.createElement(DefaultIcon, { state, size })
2137
+ icon = /* @__PURE__ */ React15.createElement(DefaultIcon, { state, size })
2807
2138
  }) => {
2808
2139
  const titleVariant = size === "small" ? "subtitle2" : "h6";
2809
2140
  const subtitleVariant = size === "small" ? "caption" : "body1";
2810
- return /* @__PURE__ */ React21.createElement(
2811
- Stack8,
2141
+ return /* @__PURE__ */ React15.createElement(
2142
+ Stack7,
2812
2143
  {
2813
2144
  alignItems: "center",
2814
2145
  justifyContent: "center",
@@ -2816,17 +2147,17 @@ var EmptyState = ({
2816
2147
  height: containerHeight,
2817
2148
  "data-testid": "empty-state-container"
2818
2149
  },
2819
- icon && /* @__PURE__ */ React21.createElement(Stack8, null, icon),
2820
- /* @__PURE__ */ React21.createElement(Stack8, { gap: 0.5 }, /* @__PURE__ */ React21.createElement(Typography13, { color: "text.primary", variant: titleVariant, textAlign: "center" }, title), subtitle && /* @__PURE__ */ React21.createElement(
2821
- Typography13,
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,
2822
2153
  {
2823
2154
  variant: subtitleVariant,
2824
2155
  textAlign: "center",
2825
2156
  color: "text.secondary"
2826
2157
  },
2827
2158
  subtitle
2828
- ), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */ React21.createElement(
2829
- Stack8,
2159
+ ), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */ React15.createElement(
2160
+ Stack7,
2830
2161
  {
2831
2162
  direction: "row",
2832
2163
  spacing: 2,
@@ -2835,15 +2166,15 @@ var EmptyState = ({
2835
2166
  },
2836
2167
  actions.map((action, index) => {
2837
2168
  var _a, _b, _c, _d;
2838
- return /* @__PURE__ */ React21.createElement(
2839
- Button9,
2169
+ return /* @__PURE__ */ React15.createElement(
2170
+ Button8,
2840
2171
  {
2841
2172
  key: index,
2842
2173
  color: (_a = action.color) != null ? _a : "primary",
2843
2174
  variant: (_b = action.variant) != null ? _b : "text",
2844
2175
  size: (_c = action.size) != null ? _c : "small",
2845
- startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */ React21.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
2846
- endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */ React21.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
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,
2847
2178
  onClick: action.onClick
2848
2179
  },
2849
2180
  capitalize((_d = action.text) != null ? _d : "action")
@@ -2854,8 +2185,8 @@ var EmptyState = ({
2854
2185
  };
2855
2186
 
2856
2187
  // src/Components/SCDialog.tsx
2857
- import React22, { useEffect as useEffect14, useState as useState10 } from "react";
2858
- 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";
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";
2859
2190
  import Grid6 from "@mui/material/Grid2";
2860
2191
  import CloseIcon2 from "@mui/icons-material/Close";
2861
2192
  import * as Muicon5 from "@mui/icons-material";
@@ -2864,8 +2195,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2864
2195
  let iconTitleValidation = "";
2865
2196
  let IconTitle;
2866
2197
  let ButtonIcon;
2867
- const [open, setOpen] = useState10(show);
2868
- useEffect14(() => {
2198
+ const [open, setOpen] = useState9(show);
2199
+ useEffect11(() => {
2869
2200
  if (show) {
2870
2201
  handleOpen();
2871
2202
  } else {
@@ -2890,7 +2221,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2890
2221
  });
2891
2222
  if (iconTitle) {
2892
2223
  if (Muicon5[iconTitle] == void 0) {
2893
- if (iconTitle && React22.isValidElement(iconTitle) && iconTitle.type == void 0) {
2224
+ if (iconTitle && React16.isValidElement(iconTitle) && iconTitle.type == void 0) {
2894
2225
  iconTitleValidation = "image";
2895
2226
  IconTitle = iconTitle;
2896
2227
  } else {
@@ -2915,8 +2246,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2915
2246
  }
2916
2247
  };
2917
2248
  const dialogActions = actions != null ? actions : [{ text: "Cerrar", fn: handleClose }];
2918
- content = content != null ? content : { component: /* @__PURE__ */ React22.createElement(Box12, null, " Aqui va el contenido ") };
2919
- 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(
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(
2920
2251
  Dialog,
2921
2252
  {
2922
2253
  "data-testid": "dialog-element",
@@ -2930,8 +2261,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2930
2261
  }
2931
2262
  }
2932
2263
  },
2933
- 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)) : "")),
2934
- /* @__PURE__ */ React22.createElement(
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(
2935
2266
  DialogContent,
2936
2267
  {
2937
2268
  "data-testid": "dialog-content",
@@ -2959,7 +2290,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2959
2290
  }
2960
2291
  }
2961
2292
  },
2962
- content.url ? /* @__PURE__ */ React22.createElement(
2293
+ content.url ? /* @__PURE__ */ React16.createElement(
2963
2294
  "iframe",
2964
2295
  {
2965
2296
  style: { border: "none", minWidth: "100%", minHeight: "100%" },
@@ -2969,20 +2300,20 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2969
2300
  }
2970
2301
  ) : content.component
2971
2302
  ),
2972
- 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(
2973
- Button10,
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,
2974
2305
  {
2975
2306
  variant: "text",
2976
2307
  color: dialogActions[0].color || "primary",
2977
2308
  size: "small",
2978
2309
  onClick: dialogActions[0].fn,
2979
2310
  disabled: dialogActions[0].disabled || false,
2980
- startIcon: dialogActions[0].icon ? /* @__PURE__ */ React22.createElement(SvgIcon5, { fontSize: "small", component: dialogActions[0].icon }) : void 0
2311
+ startIcon: dialogActions[0].icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: dialogActions[0].icon }) : void 0
2981
2312
  },
2982
2313
  dialogActions[0].text
2983
- ), /* @__PURE__ */ React22.createElement(Box12, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
2984
- return /* @__PURE__ */ React22.createElement(
2985
- Button10,
2314
+ ), /* @__PURE__ */ React16.createElement(Box11, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
2315
+ return /* @__PURE__ */ React16.createElement(
2316
+ Button9,
2986
2317
  {
2987
2318
  key: index + 1,
2988
2319
  variant: index === dialogActions.length - 2 ? "contained" : "text",
@@ -2990,13 +2321,13 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
2990
2321
  size: "small",
2991
2322
  onClick: boton.fn,
2992
2323
  disabled: boton.disabled || false,
2993
- startIcon: boton.icon ? /* @__PURE__ */ React22.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
2324
+ startIcon: boton.icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
2994
2325
  },
2995
2326
  boton.text
2996
2327
  );
2997
2328
  }))) : dialogActions.map((boton, index) => {
2998
- return /* @__PURE__ */ React22.createElement(
2999
- Button10,
2329
+ return /* @__PURE__ */ React16.createElement(
2330
+ Button9,
3000
2331
  {
3001
2332
  key: index,
3002
2333
  variant: index === dialogActions.length - 1 ? "contained" : "text",
@@ -3004,7 +2335,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
3004
2335
  size: "small",
3005
2336
  onClick: boton.fn,
3006
2337
  disabled: boton.disabled || false,
3007
- startIcon: boton.icon ? /* @__PURE__ */ React22.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
2338
+ startIcon: boton.icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
3008
2339
  },
3009
2340
  boton.text
3010
2341
  );
@@ -3013,12 +2344,12 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
3013
2344
  };
3014
2345
 
3015
2346
  // src/Components/SCMenu.tsx
3016
- import React23 from "react";
3017
- import { Box as Box13, Typography as Typography15, Paper, Divider as Divider4, MenuList, MenuItem as MenuItem4, ListItemIcon as ListItemIcon4, SvgIcon as SvgIcon6 } from "@mui/material";
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";
3018
2349
  import Grid7 from "@mui/material/Grid2";
3019
2350
 
3020
2351
  // src/Components/Hooks/useWindowDimensions.ts
3021
- import { useState as useState11, useEffect as useEffect15 } from "react";
2352
+ import { useState as useState10, useEffect as useEffect12 } from "react";
3022
2353
  function getWindowDimensions() {
3023
2354
  const { innerWidth: width, innerHeight: height } = window;
3024
2355
  return {
@@ -3027,8 +2358,8 @@ function getWindowDimensions() {
3027
2358
  };
3028
2359
  }
3029
2360
  function useWindowDimensions() {
3030
- const [windowDimensions, setWindowDimensions] = useState11(getWindowDimensions());
3031
- useEffect15(() => {
2361
+ const [windowDimensions, setWindowDimensions] = useState10(getWindowDimensions());
2362
+ useEffect12(() => {
3032
2363
  function handleResize() {
3033
2364
  setWindowDimensions(getWindowDimensions());
3034
2365
  }
@@ -3046,12 +2377,12 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
3046
2377
  const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
3047
2378
  const widthContainer = menuSize + pageSize;
3048
2379
  let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
3049
- const [selectedIndex, setSelectedIndex] = React23.useState("1");
3050
- const [value, setValue] = React23.useState("1");
3051
- React23.useEffect(() => {
2380
+ const [selectedIndex, setSelectedIndex] = React17.useState("1");
2381
+ const [value, setValue] = React17.useState("1");
2382
+ React17.useEffect(() => {
3052
2383
  heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
3053
2384
  }, [height]);
3054
- React23.useEffect(() => {
2385
+ React17.useEffect(() => {
3055
2386
  if (defaultOption) {
3056
2387
  handleClickMenusItem(event, void 0);
3057
2388
  }
@@ -3081,7 +2412,7 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
3081
2412
  setValue(String(index + 1));
3082
2413
  }
3083
2414
  };
3084
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(Grid7, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ React23.createElement(Paper, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ React23.createElement(MenuList, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
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(
3085
2416
  MenuItem4,
3086
2417
  {
3087
2418
  disabled: disable == true ? true : false,
@@ -3089,26 +2420,26 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
3089
2420
  selected: String(index + 1) === selectedIndex,
3090
2421
  onClick: (event2) => handleClickMenusItem(event2, index)
3091
2422
  },
3092
- option.iconLeft ? /* @__PURE__ */ React23.createElement(ListItemIcon4, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React23.createElement(SvgIcon6, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
3093
- /* @__PURE__ */ React23.createElement(Grid7, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React23.createElement(Typography15, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React23.createElement(ListItemIcon4, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React23.createElement(SvgIcon6, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
3094
- ), option.divider == true ? /* @__PURE__ */ React23.createElement(Divider4, null) : "")))), /* @__PURE__ */ React23.createElement(Grid7, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React23.createElement(Box13, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React23.createElement(Typography15, { color: "error" }, "No se ha configurado el componente a visualizar")))));
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")))));
3095
2426
  };
3096
2427
 
3097
2428
  // src/Components/SCTabs.tsx
3098
- import React24, { useEffect as useEffect16 } from "react";
3099
- import { Typography as Typography16, Box as Box14, SvgIcon as SvgIcon7, Tab, Tabs, Badge } from "@mui/material";
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";
3100
2431
  import TabPanel from "@mui/lab/TabPanel";
3101
2432
  import TabContext from "@mui/lab/TabContext";
3102
2433
  import * as Muicon7 from "@mui/icons-material";
3103
2434
  var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
3104
- const [toast, setToast] = React24.useState(null);
2435
+ const [toast, setToast] = React18.useState(null);
3105
2436
  let i = 0;
3106
2437
  let j = 0;
3107
2438
  let k = 0;
3108
2439
  let l = 0;
3109
2440
  let validateTypeIcon = true;
3110
- const [value, setValue] = React24.useState("1");
3111
- useEffect16(() => {
2441
+ const [value, setValue] = React18.useState("1");
2442
+ useEffect13(() => {
3112
2443
  if (defaultOption) {
3113
2444
  handleChange(event, void 0);
3114
2445
  }
@@ -3158,7 +2489,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
3158
2489
  setValue(newValue);
3159
2490
  }
3160
2491
  };
3161
- return /* @__PURE__ */ React24.createElement(React24.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ React24.createElement(Box14, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ React24.createElement(TabContext, { value }, /* @__PURE__ */ React24.createElement(
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(
3162
2493
  Tabs,
3163
2494
  {
3164
2495
  "data-testid": "tab-container",
@@ -3172,7 +2503,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
3172
2503
  orientation: orientation || "horizontal",
3173
2504
  sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
3174
2505
  },
3175
- options.map((option) => /* @__PURE__ */ React24.createElement(
2506
+ options.map((option) => /* @__PURE__ */ React18.createElement(
3176
2507
  Tab,
3177
2508
  {
3178
2509
  "data-testid": "tab-item",
@@ -3181,7 +2512,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
3181
2512
  label: option.name || "",
3182
2513
  disabled: option.disabled || false,
3183
2514
  iconPosition: iconPosition || "end",
3184
- icon: typeIcon == "badge" ? /* @__PURE__ */ React24.createElement(
2515
+ icon: typeIcon == "badge" ? /* @__PURE__ */ React18.createElement(
3185
2516
  Badge,
3186
2517
  {
3187
2518
  sx: {
@@ -3196,38 +2527,33 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
3196
2527
  badgeContent: option.iconOrBadge,
3197
2528
  color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
3198
2529
  }
3199
- ) : typeIcon == "icon" ? /* @__PURE__ */ React24.createElement(SvgIcon7, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
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" } }) : "",
3200
2531
  sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
3201
2532
  }
3202
2533
  ))
3203
- ), children, options.map((option) => /* @__PURE__ */ React24.createElement(
2534
+ ), children, options.map((option) => /* @__PURE__ */ React18.createElement(
3204
2535
  TabPanel,
3205
2536
  {
3206
2537
  key: k = k + 1,
3207
2538
  value: String(l = l + 1),
3208
2539
  sx: { padding: "16px" }
3209
2540
  },
3210
- option.page ? option.page : /* @__PURE__ */ React24.createElement(Typography16, null, "No se ha configurado el componente a visualizar ")
3211
- )))) : /* @__PURE__ */ React24.createElement(Box14, { sx: { height: "200px" } }, toast && /* @__PURE__ */ React24.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
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))));
3212
2543
  };
3213
2544
 
3214
2545
  // src/Components/Calendario/Calendar.tsx
3215
- import React31, { useState as useState13 } from "react";
3216
- import { Box as Box20, CircularProgress as CircularProgress5 } from "@mui/material";
2546
+ import React24, { useState as useState12 } from "react";
2547
+ import { Box as Box19 } from "@mui/material";
2548
+ import dayjs7 from "dayjs";
3217
2549
 
3218
2550
  // src/Components/Calendario/CalendarToolbar.tsx
3219
- import React25, { useState as useState12 } from "react";
2551
+ import React19, { useState as useState11 } from "react";
3220
2552
  import { ChevronLeft, ChevronRight, KeyboardArrowDown as KeyboardArrowDown2, LightModeOutlined } from "@mui/icons-material";
3221
- import { Box as Box15, Chip as Chip3, IconButton as IconButton10, Menu, MenuItem as MenuItem5, Stack as Stack9, Typography as Typography17 } from "@mui/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";
3222
2554
  import dayjs2 from "dayjs";
3223
- import updateLocale from "dayjs/plugin/updateLocale";
3224
2555
  import "dayjs/locale/es";
3225
2556
  dayjs2.locale("es");
3226
- dayjs2.extend(updateLocale);
3227
- dayjs2.updateLocale("en", {
3228
- weekStart: 0
3229
- // 0 = domingo
3230
- });
3231
2557
  var CalendarToolbar = ({
3232
2558
  labelDate,
3233
2559
  view,
@@ -3235,7 +2561,7 @@ var CalendarToolbar = ({
3235
2561
  onNavigate,
3236
2562
  children
3237
2563
  }) => {
3238
- const [anchorEl, setAnchorEl] = useState12(null);
2564
+ const [anchorEl, setAnchorEl] = useState11(null);
3239
2565
  const open = Boolean(anchorEl);
3240
2566
  const handleMenuOpen = (event2) => {
3241
2567
  setAnchorEl(event2.currentTarget);
@@ -3248,25 +2574,23 @@ var CalendarToolbar = ({
3248
2574
  handleMenuClose();
3249
2575
  };
3250
2576
  const getFormattedDate = () => {
3251
- const sunday = labelDate.day(0);
3252
2577
  if (view === "month") {
3253
- const textMonth = labelDate.format("MMMM YYYY");
3254
- return textMonth.charAt(0).toUpperCase() + textMonth.slice(1);
2578
+ return labelDate.format("MMMM YYYY");
3255
2579
  }
3256
2580
  if (view === "week") {
3257
- return `${labelDate.startOf("week").format("DD MMM")} - ${labelDate.endOf("week").format("DD MMM YYYY")}`;
2581
+ return `${labelDate.startOf("week").add(1, "day").format("DD MMM")} - ${labelDate.endOf("week").format("DD MMM YYYY")}`;
3258
2582
  }
3259
2583
  return labelDate.format(" DD MMMM YYYY");
3260
2584
  };
3261
- return /* @__PURE__ */ React25.createElement(Stack9, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 0.5, px: 1, py: 0.5 }, /* @__PURE__ */ React25.createElement(Box15, null, /* @__PURE__ */ React25.createElement(
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(
3262
2586
  Chip3,
3263
2587
  {
3264
2588
  label: "Hoy",
3265
- icon: /* @__PURE__ */ React25.createElement(LightModeOutlined, { fontSize: "small" }),
2589
+ icon: /* @__PURE__ */ React19.createElement(LightModeOutlined, { fontSize: "small" }),
3266
2590
  color: "primary",
3267
2591
  onClick: () => onNavigate("TODAY")
3268
2592
  }
3269
- )), /* @__PURE__ */ React25.createElement(Stack9, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React25.createElement(IconButton10, { "aria-label": "Anterior", onClick: () => onNavigate("PREV"), size: "small", color: "primary" }, /* @__PURE__ */ React25.createElement(ChevronLeft, { fontSize: "small" })), /* @__PURE__ */ React25.createElement(IconButton10, { "aria-label": "Siguiente", onClick: () => onNavigate("NEXT"), size: "small", color: "primary" }, /* @__PURE__ */ React25.createElement(ChevronRight, { fontSize: "small" })), /* @__PURE__ */ React25.createElement(Typography17, { variant: "h6", color: "primary", "data-testid": "currentDate" }, getFormattedDate()), /* @__PURE__ */ React25.createElement(IconButton10, { onClick: handleMenuOpen, size: "small", color: "primary", "aria-label": "Cambiar vista" }, /* @__PURE__ */ React25.createElement(KeyboardArrowDown2, { fontSize: "small" })), /* @__PURE__ */ React25.createElement(
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(
3270
2594
  Menu,
3271
2595
  {
3272
2596
  anchorEl,
@@ -3275,15 +2599,15 @@ var CalendarToolbar = ({
3275
2599
  anchorOrigin: { vertical: "bottom", horizontal: "center" },
3276
2600
  transformOrigin: { vertical: "top", horizontal: "center" }
3277
2601
  },
3278
- /* @__PURE__ */ React25.createElement(MenuItem5, { onClick: () => handleViewChange("month") }, "Mes"),
3279
- /* @__PURE__ */ React25.createElement(MenuItem5, { onClick: () => handleViewChange("week") }, "Semana"),
3280
- /* @__PURE__ */ React25.createElement(MenuItem5, { onClick: () => handleViewChange("day") }, "D\xEDa")
3281
- )), children ? /* @__PURE__ */ React25.createElement(Box15, null, children) : /* @__PURE__ */ React25.createElement(Box15, { width: "24px" }), " ");
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" }), " ");
3282
2606
  };
3283
2607
 
3284
2608
  // src/Components/Calendario/Views/MonthView.tsx
3285
- import React28 from "react";
3286
- import { Box as Box17, Typography as Typography19, IconButton as IconButton11, Paper as Paper2, Tooltip as Tooltip6, Stack as Stack11, Divider as Divider6, CircularProgress as CircularProgress2 } from "@mui/material";
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";
3287
2611
  import AddIcon from "@mui/icons-material/Add";
3288
2612
  import dayjs4 from "dayjs";
3289
2613
  import localeData from "dayjs/plugin/localeData";
@@ -3309,32 +2633,21 @@ var stateColors = {
3309
2633
  Asignada: "warning.main",
3310
2634
  Finalizado: "primary.main",
3311
2635
  Vencida: "error.main",
3312
- EnProgreso: "success.main",
3313
- Aplazada: "grey.400",
3314
- Generada: "secondary.main"
2636
+ EnProgreso: "success.main"
3315
2637
  };
3316
2638
 
3317
2639
  // src/Components/Calendario/Event.tsx
3318
- import React26 from "react";
3319
- import { Box as Box16, Stack as Stack10, Typography as Typography18, Divider as Divider5, Popover as Popover4 } from "@mui/material";
3320
- var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
3321
- const [anchorEl, setAnchorEl] = React26.useState(null);
3322
- const handlePopoverOpen = (event3) => {
3323
- setAnchorEl(event3.currentTarget);
3324
- };
3325
- const handlePopoverClose = () => {
3326
- setAnchorEl(null);
3327
- };
3328
- const open = Boolean(anchorEl);
3329
- return /* @__PURE__ */ React26.createElement(
3330
- Stack10,
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,
3331
2645
  {
3332
2646
  direction: "row",
3333
2647
  padding: 0.5,
3334
2648
  borderRadius: 0.5,
3335
2649
  alignItems: "flex-start",
3336
2650
  minHeight: "20px",
3337
- onMouseOver: () => onHover == null ? void 0 : onHover(event2),
3338
2651
  onClick: (e) => {
3339
2652
  e.stopPropagation();
3340
2653
  onClick == null ? void 0 : onClick(event2);
@@ -3347,7 +2660,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
3347
2660
  cursor: onClick ? "pointer" : "default"
3348
2661
  }, sx)
3349
2662
  },
3350
- /* @__PURE__ */ React26.createElement(
2663
+ /* @__PURE__ */ React20.createElement(
3351
2664
  Divider5,
3352
2665
  {
3353
2666
  orientation: "vertical",
@@ -3359,8 +2672,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
3359
2672
  }
3360
2673
  }
3361
2674
  ),
3362
- /* @__PURE__ */ React26.createElement(
3363
- Box16,
2675
+ /* @__PURE__ */ React20.createElement(
2676
+ Box15,
3364
2677
  {
3365
2678
  px: 1,
3366
2679
  py: 0.5,
@@ -3369,8 +2682,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
3369
2682
  display: "flex",
3370
2683
  alignItems: "center"
3371
2684
  },
3372
- /* @__PURE__ */ React26.createElement(
3373
- Typography18,
2685
+ /* @__PURE__ */ React20.createElement(
2686
+ Typography17,
3374
2687
  {
3375
2688
  color: "text.primary",
3376
2689
  variant: "caption",
@@ -3379,65 +2692,29 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
3379
2692
  overflow: "hidden",
3380
2693
  textOverflow: "ellipsis",
3381
2694
  whiteSpace: "nowrap"
3382
- },
3383
- onMouseEnter: handlePopoverOpen,
3384
- onMouseLeave: handlePopoverClose
3385
- },
3386
- event2.title.charAt(0).toUpperCase() + event2.title.slice(1).toLowerCase()
3387
- ),
3388
- /* @__PURE__ */ React26.createElement(
3389
- Popover4,
3390
- {
3391
- id: "mouse-over-popover",
3392
- sx: { pointerEvents: "none" },
3393
- open,
3394
- anchorEl,
3395
- anchorOrigin: {
3396
- vertical: "top",
3397
- horizontal: "right"
3398
- },
3399
- transformOrigin: {
3400
- vertical: "bottom",
3401
- horizontal: "right"
3402
- },
3403
- onClose: handlePopoverClose,
3404
- disableRestoreFocus: true
2695
+ }
3405
2696
  },
3406
- onHover ? onHover(event2) : " "
2697
+ capitalize(event2.title)
3407
2698
  )
3408
2699
  )
3409
2700
  );
3410
2701
  };
3411
2702
 
3412
- // src/assets/LogoCalendario.tsx
3413
- import React27 from "react";
3414
- var LogoCalendario = () => {
3415
- return /* @__PURE__ */ React27.createElement("svg", { width: "60", height: "61", viewBox: "0 0 60 61", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React27.createElement("g", { "clip-path": "url(#clip0_5353_24891)" }, /* @__PURE__ */ React27.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__ */ React27.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__ */ React27.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__ */ React27.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__ */ React27.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__ */ React27.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__ */ React27.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__ */ React27.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__ */ React27.createElement("defs", null, /* @__PURE__ */ React27.createElement("clipPath", { id: "clip0_5353_24891" }, /* @__PURE__ */ React27.createElement("rect", { width: "60", height: "60", fill: "white", transform: "translate(0 0.5)" }))));
3416
- };
3417
-
3418
2703
  // src/Components/Calendario/Views/MonthView.tsx
3419
2704
  dayjs4.extend(localeData);
3420
2705
  dayjs4.extend(isBetween);
3421
- var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEventClick, onEventHover }) => {
3422
- const noEvents = events.length === 0;
2706
+ var MonthView = ({ events, onDayClick, onMoreClick, currentDate, onEventClick }) => {
3423
2707
  const days = getMonthDays(currentDate);
3424
2708
  const weekDays = Array.from({ length: 7 }, (_, i) => dayjs4().day(i));
3425
- const [openDrawer, setOpenDrawer] = React28.useState(false);
3426
- const [selectedDay, setSelectedDay] = React28.useState(null);
3427
- const [selectedEvents, setSelectedEvents] = React28.useState([]);
3428
- return /* @__PURE__ */ React28.createElement(Box17, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ React28.createElement(Box17, { minWidth: "1050px" }, /* @__PURE__ */ React28.createElement(Box17, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ React28.createElement(Box17, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ React28.createElement(Typography19, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ React28.createElement(Box17, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React28.createElement(CircularProgress2, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ React28.createElement(
3429
- EmptyState,
3430
- {
3431
- title: "Inicia la gesti\xF3n de las actividades",
3432
- subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
3433
- icon: /* @__PURE__ */ React28.createElement(LogoCalendario, null)
3434
- }
3435
- ) : /* @__PURE__ */ React28.createElement(Box17, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5 }, days.map((day) => {
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) => {
3436
2713
  const dayEvents = events.filter(
3437
2714
  (e) => day.isBetween(e.start.startOf("day"), e.end.endOf("day"), null, "[]")
3438
2715
  );
3439
2716
  const isCurrentMonth = day.month() === currentDate.month();
3440
- return /* @__PURE__ */ React28.createElement(
2717
+ return /* @__PURE__ */ React21.createElement(
3441
2718
  Paper2,
3442
2719
  {
3443
2720
  key: day.toString(),
@@ -3454,8 +2731,8 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
3454
2731
  overflow: "hidden"
3455
2732
  }
3456
2733
  },
3457
- /* @__PURE__ */ React28.createElement(Box17, { p: 1, flexShrink: 0 }, /* @__PURE__ */ React28.createElement(Box17, { display: "flex", alignItems: "center", justifyContent: "flex-start" }, /* @__PURE__ */ React28.createElement(
3458
- Box17,
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,
3459
2736
  {
3460
2737
  sx: {
3461
2738
  width: 24,
@@ -3467,16 +2744,16 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
3467
2744
  justifyContent: "center"
3468
2745
  }
3469
2746
  },
3470
- /* @__PURE__ */ React28.createElement(
3471
- Typography19,
2747
+ /* @__PURE__ */ React21.createElement(
2748
+ Typography18,
3472
2749
  {
3473
2750
  variant: "body2",
3474
2751
  sx: { color: isToday(day) ? "white" : "text.secondary" }
3475
2752
  },
3476
2753
  day.date()
3477
2754
  )
3478
- ), dayEvents.length > 2 && /* @__PURE__ */ React28.createElement(Tooltip6, { title: "M\xE1s eventos" }, /* @__PURE__ */ React28.createElement(
3479
- IconButton11,
2755
+ ), dayEvents.length > 2 && /* @__PURE__ */ React21.createElement(Tooltip4, { title: "M\xE1s eventos" }, /* @__PURE__ */ React21.createElement(
2756
+ IconButton10,
3480
2757
  {
3481
2758
  color: "primary",
3482
2759
  size: "small",
@@ -3487,46 +2764,64 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
3487
2764
  setSelectedEvents(dayEvents);
3488
2765
  }
3489
2766
  },
3490
- /* @__PURE__ */ React28.createElement(AddIcon, { fontSize: "small" })
2767
+ /* @__PURE__ */ React21.createElement(AddIcon, { fontSize: "small" })
3491
2768
  )))),
3492
- /* @__PURE__ */ React28.createElement(Box17, { display: "flex", flexDirection: "column", gap: 0.5, p: 1, pt: 0, overflow: "hidden" }, dayEvents.slice(0, 2).map((event2) => /* @__PURE__ */ React28.createElement(
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(
3493
2770
  CalendarEventCard,
3494
2771
  {
3495
2772
  key: `${event2.id}-${day.toString()}`,
3496
2773
  event: event2,
3497
2774
  color: stateColors[event2.state],
3498
- onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
3499
- onHover: onEventHover
2775
+ onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day)
3500
2776
  }
3501
2777
  ))),
3502
- dayEvents.length > 2 && /* @__PURE__ */ React28.createElement(
3503
- Stack11,
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,
3504
2780
  {
3505
- justifyItems: "center",
3506
- px: 1,
3507
- pb: 0.5,
3508
- onClick: (e) => e.stopPropagation(),
3509
- sx: { "& .MuiButtonBase-root": { width: "100%" } }
3510
- },
3511
- /* @__PURE__ */ React28.createElement(
3512
- SCDrawer,
3513
- {
3514
- width: "350px",
3515
- title: day.format("DD [de] MMMM YYYY"),
3516
- open: openDrawer,
3517
- buttonDrawer: { text: `+ ${dayEvents.length}` },
3518
- anchor: "right",
3519
- actions: false,
3520
- arrayElements: [{
3521
- component: (() => {
3522
- const [first, ...rest] = dayEvents;
3523
- return /* @__PURE__ */ React28.createElement(Box17, { display: "flex", width: "100%", flexDirection: "column", height: "100%", pr: 1.5 }, /* @__PURE__ */ React28.createElement(Typography19, { width: "100%", color: "text.secondary" }, " Proximo evento "), first && /* @__PURE__ */ React28.createElement(Box17, { p: 1, pb: 1, width: "100%" }, /* @__PURE__ */ React28.createElement(
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(
3524
2819
  CalendarEventCard,
3525
2820
  {
3526
- event: first,
3527
- color: stateColors[first.state],
3528
- onClick: () => onEventClick == null ? void 0 : onEventClick(first, day),
3529
- onHover: onEventHover,
2821
+ key: `${event2.id}-${day.toString()}`,
2822
+ event: event2,
2823
+ color: stateColors[event2.state],
2824
+ onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
3530
2825
  sx: {
3531
2826
  whiteSpace: "normal",
3532
2827
  "& .MuiTypography-root": {
@@ -3536,68 +2831,26 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
3536
2831
  }
3537
2832
  }
3538
2833
  }
3539
- )), /* @__PURE__ */ React28.createElement(Divider6, { flexItem: true, sx: { width: "100%" } }), /* @__PURE__ */ React28.createElement(Typography19, { width: "100%", py: 1, color: "text.secondary" }, " Eventos restantes "), /* @__PURE__ */ React28.createElement(
3540
- Box17,
3541
- {
3542
- width: "100%",
3543
- height: "100%",
3544
- flex: 1,
3545
- overflow: "auto",
3546
- p: 1,
3547
- pt: 1,
3548
- display: "flex",
3549
- flexDirection: "column",
3550
- gap: 1.5
3551
- },
3552
- rest.map((event2) => /* @__PURE__ */ React28.createElement(
3553
- CalendarEventCard,
3554
- {
3555
- key: `${event2.id}-${day.toString()}`,
3556
- event: event2,
3557
- color: stateColors[event2.state],
3558
- onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
3559
- onHover: onEventHover,
3560
- sx: {
3561
- whiteSpace: "normal",
3562
- "& .MuiTypography-root": {
3563
- whiteSpace: "normal",
3564
- overflow: "visible",
3565
- textOverflow: "unset"
3566
- }
3567
- }
3568
- }
3569
- ))
3570
- ));
3571
- })()
3572
- }]
3573
- }
3574
- )
3575
- )
2834
+ ))
2835
+ ));
2836
+ })()
2837
+ }]
2838
+ }
2839
+ ))
3576
2840
  );
3577
2841
  }))));
3578
2842
  };
3579
2843
 
3580
2844
  // src/Components/Calendario/Views/WeekView.tsx
3581
- import React29 from "react";
3582
- import { Box as Box18, CircularProgress as CircularProgress3, Typography as Typography20 } from "@mui/material";
2845
+ import React22 from "react";
2846
+ import { Box as Box17, Typography as Typography19 } from "@mui/material";
3583
2847
  import dayjs5 from "dayjs";
3584
2848
  import localeData2 from "dayjs/plugin/localeData";
3585
2849
  dayjs5.extend(localeData2);
3586
- var WeekView = ({
3587
- events,
3588
- currentDate,
3589
- isLoading,
3590
- onDayClick,
3591
- onEventClick,
3592
- onEventHover,
3593
- startHour = 0,
3594
- endHour = 23
3595
- }) => {
3596
- const noEvents = events.length === 0;
3597
- const todayString = dayjs5().format("YYYY-MM-DD");
2850
+ var WeekView = ({ events, currentDate, onDayClick, onEventClick }) => {
3598
2851
  const startOfWeek2 = currentDate.startOf("week");
3599
2852
  const days = Array.from({ length: 7 }, (_, i) => startOfWeek2.add(i, "day"));
3600
- const hours = Array.from({ length: endHour - startHour + 1 }, (_, i) => startHour + i);
2853
+ const hours2 = Array.from({ length: 24 }, (_, i) => i);
3601
2854
  const getCellBorderType = (cellHour, dayEvents) => {
3602
2855
  for (const event2 of dayEvents) {
3603
2856
  const start = event2.start.hour() + event2.start.minute() / 60;
@@ -3605,7 +2858,8 @@ var WeekView = ({
3605
2858
  const cellStart = cellHour;
3606
2859
  const cellEnd = cellHour + 1;
3607
2860
  if (cellEnd > start && cellStart < end) {
3608
- if (Math.abs(cellStart - start) < 0.01 && Math.abs(cellEnd - end) < 0.01) return "full";
2861
+ if (Math.abs(cellStart - start) < 0.01 && Math.abs(cellEnd - end) < 0.01)
2862
+ return "full";
3609
2863
  if (Math.abs(cellStart - start) < 0.01) return "start";
3610
2864
  if (Math.abs(cellEnd - end) < 0.01) return "end";
3611
2865
  return "middle";
@@ -3613,122 +2867,92 @@ var WeekView = ({
3613
2867
  }
3614
2868
  return "none";
3615
2869
  };
3616
- return /* @__PURE__ */ React29.createElement(Box18, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React29.createElement(Box18, { display: "flex", bgcolor: "transparent" }, /* @__PURE__ */ React29.createElement(Box18, { width: 45, bgcolor: "transparent" }), days.map((day) => {
3617
- const isToday2 = day.format("YYYY-MM-DD") === todayString;
3618
- return /* @__PURE__ */ React29.createElement(
3619
- Box18,
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,
3620
2901
  {
3621
2902
  key: day.toString(),
3622
- height: 40,
3623
2903
  flex: 1,
3624
- pl: 0.5,
3625
- textAlign: "center",
3626
- display: "flex",
3627
- flexDirection: "column",
3628
- justifyContent: "center",
3629
- alignItems: "flex-start",
3630
- bgcolor: isToday2 ? "primary.100" : "transparent",
3631
- borderRadius: isToday2 ? "6px 6px 0 0" : "0",
3632
- borderBottom: isToday2 ? 2 : 0,
3633
- borderColor: isToday2 ? "primary.main" : "transparent"
3634
- },
3635
- /* @__PURE__ */ React29.createElement(Typography20, { variant: "h6", color: "text.primary" }, day.format("D")),
3636
- /* @__PURE__ */ React29.createElement(Typography20, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
3637
- );
3638
- })), isLoading ? /* @__PURE__ */ React29.createElement(Box18, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React29.createElement(CircularProgress3, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ React29.createElement(
3639
- EmptyState,
3640
- {
3641
- title: "Inicia la gesti\xF3n de las actividades",
3642
- subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
3643
- icon: /* @__PURE__ */ React29.createElement(LogoCalendario, null)
3644
- }
3645
- ) : (
3646
- // Grid de horas y eventos
3647
- /* @__PURE__ */ React29.createElement(Box18, { display: "flex", flex: 1 }, /* @__PURE__ */ React29.createElement(Box18, { width: 45, bgcolor: "transparent" }, hours.map((h) => /* @__PURE__ */ React29.createElement(
3648
- Box18,
3649
- {
3650
- key: h,
3651
- height: 60,
3652
- textAlign: "right",
3653
- pr: 1,
3654
- borderColor: "divider"
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)
3655
2909
  },
3656
- /* @__PURE__ */ React29.createElement(Typography20, { variant: "caption", color: "text.secondary" }, dayjs5().hour(h).format("h A"))
3657
- ))), days.map((day) => {
3658
- const dayEvents = events.filter(
3659
- (event2) => day.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
3660
- ).filter((event2) => {
3661
- const startsInRange = event2.start.hour() >= startHour && event2.start.hour() <= endHour;
3662
- const endsInRange = event2.end.hour() >= startHour && event2.end.hour() <= endHour;
3663
- return startsInRange || endsInRange;
3664
- }).sort((a, b) => a.start.valueOf() - b.start.valueOf());
3665
- return /* @__PURE__ */ React29.createElement(
3666
- Box18,
3667
- {
3668
- key: day.toString(),
3669
- flex: 1,
3670
- borderLeft: "1px solid",
3671
- borderColor: "divider",
3672
- position: "relative",
3673
- "data-testid": `week-day-column-${day.format("YYYY-MM-DD")}`,
3674
- onClick: () => onDayClick == null ? void 0 : onDayClick(day)
3675
- },
3676
- hours.map((hourIdx) => {
3677
- const borderType = getCellBorderType(hourIdx, dayEvents);
3678
- return /* @__PURE__ */ React29.createElement(
3679
- Box18,
3680
- {
3681
- key: hourIdx,
3682
- height: 60,
3683
- borderTop: "1px solid",
3684
- borderColor: borderType === "start" || borderType === "full" || borderType === "none" ? "divider" : "transparent",
3685
- borderBottom: borderType === "end" || borderType === "full" ? "1px solid divider" : void 0
3686
- }
3687
- );
3688
- }),
3689
- dayEvents.map((event2) => {
3690
- const eventStart = day.isSame(event2.start, "day") ? event2.start : day.startOf("day").hour(startHour).minute(0);
3691
- const eventEnd = day.isSame(event2.end, "day") ? event2.end : day.endOf("day").hour(endHour).minute(59);
3692
- const startMinutes = (eventStart.hour() - startHour) * 60 + eventStart.minute();
3693
- const durationMinutes = eventEnd.diff(eventStart, "minute");
3694
- return /* @__PURE__ */ React29.createElement(
3695
- CalendarEventCard,
3696
- {
3697
- key: `${event2.id}-${day.toString()}`,
3698
- event: event2,
3699
- color: stateColors[event2.state],
3700
- onClick: () => onEventClick == null ? void 0 : onEventClick(event2, day),
3701
- onHover: onEventHover,
3702
- sx: {
3703
- position: "absolute",
3704
- top: `${startMinutes}px`,
3705
- left: 4,
3706
- right: 4,
3707
- cursor: "pointer",
3708
- height: `${durationMinutes}px`
3709
- }
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"
3710
2942
  }
3711
- );
3712
- })
3713
- );
3714
- }))
3715
- ));
2943
+ }
2944
+ );
2945
+ })
2946
+ );
2947
+ })));
3716
2948
  };
3717
2949
 
3718
2950
  // src/Components/Calendario/Views/DayView.tsx
3719
- import React30 from "react";
3720
- import { Box as Box19, CircularProgress as CircularProgress4, Typography as Typography21 } from "@mui/material";
2951
+ import React23 from "react";
2952
+ import { Box as Box18, Typography as Typography20 } from "@mui/material";
3721
2953
  import dayjs6 from "dayjs";
3722
- var DayView = ({
3723
- events,
3724
- currentDate,
3725
- isLoading,
3726
- onEventClick,
3727
- onEventHover,
3728
- startHour = 0,
3729
- endHour = 24
3730
- }) => {
3731
- const hours = Array.from({ length: endHour - startHour + 1 }, (_, i) => startHour + i);
2954
+ var hours = Array.from({ length: 24 }, (_, i) => i);
2955
+ var DayView = ({ events, currentDate, onEventClick }) => {
3732
2956
  const getCellBorderType = (cellHour, dayEvents2) => {
3733
2957
  for (const event2 of dayEvents2) {
3734
2958
  const start = event2.start.hour() + event2.start.minute() / 60;
@@ -3736,7 +2960,8 @@ var DayView = ({
3736
2960
  const cellStart = cellHour;
3737
2961
  const cellEnd = cellHour + 1;
3738
2962
  if (cellEnd > start && cellStart < end) {
3739
- if (Math.abs(cellStart - start) < 0.01 && Math.abs(cellEnd - end) < 0.01) return "full";
2963
+ if (Math.abs(cellStart - start) < 0.01 && Math.abs(cellEnd - end) < 0.01)
2964
+ return "full";
3740
2965
  if (Math.abs(cellStart - start) < 0.01) return "start";
3741
2966
  if (Math.abs(cellEnd - end) < 0.01) return "end";
3742
2967
  return "middle";
@@ -3747,16 +2972,21 @@ var DayView = ({
3747
2972
  const dayEvents = events.filter(
3748
2973
  (event2) => currentDate.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
3749
2974
  );
3750
- const noEvents = events.length === 0;
3751
- return /* @__PURE__ */ React30.createElement(Box19, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React30.createElement(Box19, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ React30.createElement(Box19, { width: 47, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ React30.createElement(Box19, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ React30.createElement(Typography21, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ React30.createElement(Typography21, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ React30.createElement(Box19, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React30.createElement(CircularProgress4, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : noEvents ? /* @__PURE__ */ React30.createElement(
3752
- EmptyState,
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,
3753
2977
  {
3754
- title: "Inicia la gesti\xF3n de las actividades",
3755
- subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
3756
- icon: /* @__PURE__ */ React30.createElement(LogoCalendario, null)
3757
- }
3758
- ) : /* @__PURE__ */ React30.createElement(Box19, { display: "flex", flex: 1 }, /* @__PURE__ */ React30.createElement(Box19, { width: 47, bgcolor: "background.default" }, hours.map((h) => /* @__PURE__ */ React30.createElement(
3759
- Box19,
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,
3760
2990
  {
3761
2991
  key: h,
3762
2992
  height: 60,
@@ -3766,11 +2996,11 @@ var DayView = ({
3766
2996
  borderRight: "1px solid",
3767
2997
  borderColor: "divider"
3768
2998
  },
3769
- /* @__PURE__ */ React30.createElement(Typography21, { variant: "caption", color: "text.secondary" }, dayjs6().hour(h).format("h A"))
3770
- ))), /* @__PURE__ */ React30.createElement(Box19, { flex: 1, position: "relative" }, hours.map((hourIdx) => {
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) => {
3771
3001
  const borderType = getCellBorderType(hourIdx, dayEvents);
3772
- return /* @__PURE__ */ React30.createElement(
3773
- Box19,
3002
+ return /* @__PURE__ */ React23.createElement(
3003
+ Box18,
3774
3004
  {
3775
3005
  key: hourIdx,
3776
3006
  height: 60,
@@ -3780,26 +3010,20 @@ var DayView = ({
3780
3010
  }
3781
3011
  );
3782
3012
  }), dayEvents.map((event2) => {
3783
- const eventStart = currentDate.isSame(event2.start, "day") ? event2.start : currentDate.startOf("day");
3784
- const eventEnd = currentDate.isSame(event2.end, "day") ? event2.end : currentDate.endOf("day");
3785
- const minStart = currentDate.hour(startHour).minute(0);
3786
- const maxEnd = currentDate.hour(endHour).minute(0);
3787
- const clampedStart = eventStart.isBefore(minStart) ? minStart : eventStart;
3788
- const clampedEnd = eventEnd.isAfter(maxEnd) ? maxEnd : eventEnd;
3789
- const startMinutes = (clampedStart.hour() - startHour) * 60 + clampedStart.minute();
3790
- const durationMinutes = clampedEnd.diff(clampedStart, "minute");
3791
- return /* @__PURE__ */ React30.createElement(
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(
3792
3018
  CalendarEventCard,
3793
3019
  {
3794
3020
  key: `${event2.id}-${currentDate.toString()}`,
3795
3021
  event: event2,
3796
3022
  color: stateColors[event2.state],
3797
- onClick: () => onEventClick == null ? void 0 : onEventClick(event2, currentDate),
3798
- onHover: onEventHover,
3023
+ onClick: () => onEventClick == null ? void 0 : onEventClick(event2),
3799
3024
  sx: {
3800
3025
  position: "absolute",
3801
- top: `${startMinutes}px`,
3802
- height: `${durationMinutes}px`,
3026
+ top: `${startMinutes + 15}px`,
3803
3027
  left: 4,
3804
3028
  right: 4
3805
3029
  }
@@ -3809,23 +3033,17 @@ var DayView = ({
3809
3033
  };
3810
3034
 
3811
3035
  // src/Components/Calendario/Calendar.tsx
3812
- import dayjs7 from "dayjs";
3813
3036
  var Calendar = ({
3814
3037
  events,
3815
3038
  onDayClick,
3816
3039
  onMoreClick,
3817
3040
  onEventClick,
3818
- onEventHover,
3819
3041
  view: initialView = "month",
3820
3042
  onViewChange,
3821
- toolbar,
3822
- isLoading = false,
3823
- startHour = 0,
3824
- // <- valor por defecto
3825
- endHour = 23
3043
+ toolbar
3826
3044
  }) => {
3827
- const [view, setView] = useState13(initialView);
3828
- const [currentDate, setCurrentDate] = useState13(dayjs7());
3045
+ const [view, setView] = useState12(initialView);
3046
+ const [currentDate, setCurrentDate] = useState12(dayjs7());
3829
3047
  const handleViewChange = (newView) => {
3830
3048
  setView(newView);
3831
3049
  onViewChange == null ? void 0 : onViewChange(newView);
@@ -3833,18 +3051,12 @@ var Calendar = ({
3833
3051
  const handleNavigate = (action) => {
3834
3052
  let newDate = currentDate;
3835
3053
  const unit = view === "month" ? "month" : "day";
3836
- if (action === "PREV") {
3837
- if (view === "day") newDate = currentDate.subtract(1, "day");
3838
- if (view === "week") newDate = currentDate.subtract(1, "week");
3839
- if (view === "month") newDate = currentDate.subtract(1, "month");
3840
- } else if (action === "NEXT") {
3841
- if (view === "day") newDate = currentDate.add(1, "day");
3842
- if (view === "week") newDate = currentDate.add(1, "week");
3843
- if (view === "month") newDate = currentDate.add(1, "month");
3844
- } else if (action === "TODAY") newDate = dayjs7();
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();
3845
3057
  setCurrentDate(newDate);
3846
3058
  };
3847
- return /* @__PURE__ */ React31.createElement(Box20, null, /* @__PURE__ */ React31.createElement(
3059
+ return /* @__PURE__ */ React24.createElement(Box19, null, /* @__PURE__ */ React24.createElement(
3848
3060
  CalendarToolbar,
3849
3061
  {
3850
3062
  labelDate: currentDate,
@@ -3853,280 +3065,39 @@ var Calendar = ({
3853
3065
  onNavigate: handleNavigate
3854
3066
  },
3855
3067
  toolbar
3856
- ), isLoading ? /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(Box20, null, /* @__PURE__ */ React31.createElement(
3857
- Box20,
3858
- {
3859
- display: "flex",
3860
- justifyContent: "center",
3861
- alignItems: "center",
3862
- height: "400px"
3863
- },
3864
- /* @__PURE__ */ React31.createElement(CircularProgress5, { variant: "indeterminate" })
3865
- ))) : /* @__PURE__ */ React31.createElement(React31.Fragment, null, view === "month" && /* @__PURE__ */ React31.createElement(
3068
+ ), view === "month" && /* @__PURE__ */ React24.createElement(
3866
3069
  MonthView,
3867
3070
  {
3868
3071
  events,
3869
- currentDate,
3870
3072
  onDayClick,
3871
3073
  onMoreClick,
3872
3074
  onEventClick,
3873
- onEventHover
3075
+ currentDate
3874
3076
  }
3875
- ), view === "week" && /* @__PURE__ */ React31.createElement(
3077
+ ), view === "week" && /* @__PURE__ */ React24.createElement(
3876
3078
  WeekView,
3877
3079
  {
3878
3080
  events,
3879
3081
  currentDate,
3880
3082
  onDayClick,
3881
3083
  onMoreClick,
3882
- onEventClick,
3883
- onEventHover,
3884
- startHour,
3885
- endHour
3084
+ onEventClick
3886
3085
  }
3887
- ), view === "day" && /* @__PURE__ */ React31.createElement(
3086
+ ), view === "day" && /* @__PURE__ */ React24.createElement(
3888
3087
  DayView,
3889
3088
  {
3890
3089
  events,
3891
3090
  currentDate,
3892
- onEventClick,
3893
- onEventHover,
3894
- startHour,
3895
- endHour
3896
- }
3897
- )));
3898
- };
3899
-
3900
- // src/Components/SCTime.tsx
3901
- import React32, { useState as useState14 } from "react";
3902
- import { Box as Box21, InputAdornment as InputAdornment6, Popover as Popover5, ClickAwayListener } from "@mui/material";
3903
- import { LocalizationProvider as LocalizationProvider3 } from "@mui/x-date-pickers/LocalizationProvider";
3904
- import { AdapterDayjs as AdapterDayjs2 } from "@mui/x-date-pickers/AdapterDayjs";
3905
- import dayjs8 from "dayjs";
3906
- import "dayjs/locale/es";
3907
- import { LicenseInfo as LicenseInfo3 } from "@mui/x-license-pro";
3908
- import AccessTimeIcon from "@mui/icons-material/AccessTime";
3909
- import { TimeField } from "@mui/x-date-pickers/TimeField";
3910
- import { DigitalClock } from "@mui/x-date-pickers/DigitalClock";
3911
- var SCTime = ({
3912
- label = "Hora",
3913
- required = false,
3914
- disabled = false,
3915
- background = "transparent",
3916
- timeStep = 5,
3917
- state,
3918
- setState
3919
- }) => {
3920
- LicenseInfo3.setLicenseKey(
3921
- "77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
3922
- );
3923
- const isTimeEmpty = required && !state;
3924
- const hasError = isTimeEmpty;
3925
- const [anchorEl, setAnchorEl] = useState14(null);
3926
- const [isOpenPopover, setIsOpenPopover] = useState14(false);
3927
- const [popoverPlacement, setPopoverPlacement] = useState14("bottom");
3928
- const detectPlacement = (element) => {
3929
- const rect = element.getBoundingClientRect();
3930
- const windowHeight = window.innerHeight;
3931
- const spaceBelow = windowHeight - rect.bottom;
3932
- const spaceAbove = rect.top;
3933
- const popoverHeight = 300;
3934
- if (spaceBelow < popoverHeight && spaceAbove > spaceBelow) {
3935
- setPopoverPlacement("top");
3936
- } else {
3937
- setPopoverPlacement("bottom");
3938
- }
3939
- };
3940
- const handleTimeFieldClick = (event2) => {
3941
- if (!disabled) {
3942
- const target = event2.currentTarget;
3943
- setAnchorEl(target);
3944
- detectPlacement(target);
3945
- setIsOpenPopover(true);
3946
- }
3947
- };
3948
- const handleTimeChange = (newValue) => {
3949
- const dayjsValue = newValue ? dayjs8(newValue) : null;
3950
- setState(dayjsValue);
3951
- setIsOpenPopover(false);
3952
- setAnchorEl(null);
3953
- };
3954
- const handleClose = () => {
3955
- setIsOpenPopover(false);
3956
- setAnchorEl(null);
3957
- };
3958
- return /* @__PURE__ */ React32.createElement(LocalizationProvider3, { dateAdapter: AdapterDayjs2 }, /* @__PURE__ */ React32.createElement(Box21, { sx: { position: "relative", width: "120px" } }, /* @__PURE__ */ React32.createElement(
3959
- TimeField,
3960
- {
3961
- label,
3962
- value: state,
3963
- disabled,
3964
- required,
3965
- error: hasError,
3966
- onClick: handleTimeFieldClick,
3967
- slotProps: {
3968
- textField: {
3969
- InputProps: {
3970
- endAdornment: /* @__PURE__ */ React32.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React32.createElement(
3971
- AccessTimeIcon,
3972
- {
3973
- color: disabled ? "disabled" : "action",
3974
- sx: { cursor: disabled ? "default" : "pointer" },
3975
- fontSize: "small"
3976
- }
3977
- )),
3978
- sx: {
3979
- backgroundColor: background,
3980
- padding: "8px 12px",
3981
- cursor: disabled ? "default" : "pointer",
3982
- "& input": {
3983
- cursor: disabled ? "default" : "pointer"
3984
- }
3985
- }
3986
- }
3987
- }
3988
- },
3989
- sx: {
3990
- width: "100%",
3991
- "& .MuiInputBase-input": {
3992
- cursor: disabled ? "default" : "pointer"
3993
- },
3994
- "& .MuiPickersSectionList-root": {
3995
- padding: "0px !important"
3996
- }
3997
- }
3998
- }
3999
- ), /* @__PURE__ */ React32.createElement(
4000
- Popover5,
4001
- {
4002
- open: isOpenPopover,
4003
- anchorEl,
4004
- onClose: handleClose,
4005
- anchorOrigin: {
4006
- vertical: popoverPlacement === "top" ? "top" : "bottom",
4007
- horizontal: "left"
4008
- },
4009
- transformOrigin: {
4010
- vertical: popoverPlacement === "top" ? "bottom" : "top",
4011
- horizontal: "left"
4012
- },
4013
- marginThreshold: 0,
4014
- disableScrollLock: true,
4015
- slotProps: {
4016
- paper: {
4017
- sx: {
4018
- boxShadow: "0px 4px 20px rgba(0, 0, 0, 0.1)",
4019
- borderRadius: 1,
4020
- border: "1px solid #e0e0e0",
4021
- maxHeight: "300px",
4022
- overflow: "visible"
4023
- }
4024
- }
4025
- }
4026
- },
4027
- /* @__PURE__ */ React32.createElement(ClickAwayListener, { onClickAway: handleClose }, /* @__PURE__ */ React32.createElement(Box21, { sx: { p: 0 } }, /* @__PURE__ */ React32.createElement(
4028
- DigitalClock,
4029
- {
4030
- value: state,
4031
- onChange: handleTimeChange,
4032
- timeStep,
4033
- sx: {
4034
- "& .MuiList-root": {
4035
- maxHeight: "250px",
4036
- overflow: "auto"
4037
- },
4038
- "& .MuiMenuItem-root": {
4039
- fontSize: "0.875rem",
4040
- py: 0.5
4041
- }
4042
- }
4043
- }
4044
- )))
4045
- )));
4046
- };
4047
-
4048
- // src/Components/SCCard.tsx
4049
- import React33 from "react";
4050
- import { Button as Button12, Box as Box22, SvgIcon as SvgIcon8 } from "@mui/material";
4051
- import IconButton12 from "@mui/material/IconButton";
4052
- import Card from "@mui/material/Card";
4053
- import CardHeader from "@mui/material/CardHeader";
4054
- import CardMedia from "@mui/material/CardMedia";
4055
- import CardContent from "@mui/material/CardContent";
4056
- import CardActions from "@mui/material/CardActions";
4057
- import Collapse from "@mui/material/Collapse";
4058
- import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
4059
- import * as Muicon8 from "@mui/icons-material";
4060
- var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
4061
- let iconTitleValidation = "";
4062
- let IconTitle;
4063
- const [expanded, setExpanded] = React33.useState(false);
4064
- if (iconTitle) {
4065
- if (Muicon8[iconTitle] == void 0) {
4066
- if (iconTitle && React33.isValidElement(iconTitle) && iconTitle.type == void 0) {
4067
- iconTitleValidation = "image";
4068
- IconTitle = iconTitle;
4069
- } else {
4070
- iconTitleValidation = "icon";
4071
- IconTitle = iconTitle;
4072
- }
4073
- } else {
4074
- iconTitleValidation = "icon";
4075
- IconTitle = Muicon8[iconTitle];
4076
- }
4077
- }
4078
- const handleExpandClick = () => {
4079
- setExpanded(!expanded);
4080
- };
4081
- return /* @__PURE__ */ React33.createElement(Card, { sx: { maxWidth: 345 } }, title && /* @__PURE__ */ React33.createElement(
4082
- CardHeader,
4083
- {
4084
- avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React33.createElement(Box22, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React33.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React33.createElement(SvgIcon8, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
4085
- action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React33.createElement(Button12, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React33.createElement(IconButton12, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React33.createElement(ExpandMoreIcon, { fontSize: "small" })) : actionsTitle,
4086
- title,
4087
- subheader: subtitle,
4088
- sx: {
4089
- "& .MuiCardHeader-title": {
4090
- fontSize: "14px",
4091
- color: "text.primary"
4092
- },
4093
- "& .MuiCardHeader-subheader": {
4094
- fontSize: "13px",
4095
- color: "text.secondary"
4096
- },
4097
- "& .MuiCardHeader-action": {
4098
- height: "40px !important",
4099
- display: "flex",
4100
- alignItems: "center"
4101
- }
4102
- }
4103
- }
4104
- ), image && /* @__PURE__ */ React33.createElement(
4105
- CardMedia,
4106
- {
4107
- component: "img",
4108
- height: "194",
4109
- image
3091
+ onEventClick
4110
3092
  }
4111
- ), content && /* @__PURE__ */ React33.createElement(CardContent, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ React33.createElement(CardActions, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ React33.createElement(Button12, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ React33.createElement(IconButton12, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ React33.createElement(ExpandMoreIcon, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ React33.createElement(
4112
- Button12,
4113
- {
4114
- key: index,
4115
- size: "small",
4116
- color: action.color || "primary",
4117
- variant: action.variant || "text",
4118
- onClick: action.fn,
4119
- disabled: action.disabled || false
4120
- },
4121
- action.text
4122
- )) : ""), expand && /* @__PURE__ */ React33.createElement(Collapse, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React33.createElement(CardContent, { sx: { padding: "8px 16px !important" } }, expand.content)));
3093
+ ));
4123
3094
  };
4124
3095
 
4125
3096
  // src/Theme/index.ts
4126
3097
  import { createTheme } from "@mui/material/styles";
4127
3098
 
4128
3099
  // src/Theme/components.ts
4129
- import React34 from "react";
3100
+ import React25 from "react";
4130
3101
  import {
4131
3102
  InfoRounded as InfoRounded2,
4132
3103
  CheckCircleRounded as CheckCircleRounded2,
@@ -4829,10 +3800,10 @@ var components = {
4829
3800
  MuiAlert: {
4830
3801
  defaultProps: {
4831
3802
  iconMapping: {
4832
- success: React34.createElement(CheckCircleRounded2),
4833
- error: React34.createElement(ErrorRounded2),
4834
- warning: React34.createElement(WarningRounded2),
4835
- info: React34.createElement(InfoRounded2)
3803
+ success: React25.createElement(CheckCircleRounded2),
3804
+ error: React25.createElement(ErrorRounded2),
3805
+ warning: React25.createElement(WarningRounded2),
3806
+ info: React25.createElement(InfoRounded2)
4836
3807
  }
4837
3808
  },
4838
3809
  variants: [
@@ -5873,7 +4844,6 @@ var ADCSincoTheme = createTheme(__spreadValues({}, ADCTheme));
5873
4844
  export {
5874
4845
  ADCSincoTheme,
5875
4846
  AdproSincoTheme,
5876
- Attachment,
5877
4847
  Calendar,
5878
4848
  EmptyState,
5879
4849
  FooterAction,
@@ -5881,7 +4851,6 @@ export {
5881
4851
  PageHeader,
5882
4852
  SCAutocomplete,
5883
4853
  SCCalendarSwipeable,
5884
- SCCard,
5885
4854
  SCDataGrid,
5886
4855
  SCDataGridInitial,
5887
4856
  SCDateRange,
@@ -5893,14 +4862,13 @@ export {
5893
4862
  SCTabs,
5894
4863
  SCTextArea,
5895
4864
  SCTextField,
5896
- SCTime,
5897
4865
  SCToastNotification,
5898
4866
  SincoTheme,
5899
4867
  ToastProgress,
5900
4868
  capitalize,
5901
4869
  getButtonColor,
5902
4870
  getIcon,
5903
- getIconComponent,
4871
+ getIconComponent2 as getIconComponent,
5904
4872
  getIconMultiSelect,
5905
4873
  getModalColor,
5906
4874
  modalStateConfig,