componentes-sinco 1.2.9 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +828 -866
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +721 -759
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51,187 +51,49 @@ var __async = (__this, __arguments, generator) => {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
// src/Components/Adjuntar/Adjuntar.tsx
|
|
54
|
-
import React4, { useEffect
|
|
55
|
-
import { Box as
|
|
54
|
+
import React4, { useEffect, useRef, useState as useState3 } from "react";
|
|
55
|
+
import { Box as Box2, Button as Button2, CircularProgress, IconButton as IconButton2, Stack as Stack2, Tooltip, Typography as Typography2, SvgIcon } from "@mui/material";
|
|
56
56
|
import { CloudUploadOutlined, AttachFileOutlined, DeleteOutline, UploadFileOutlined, FileDownload } from "@mui/icons-material";
|
|
57
57
|
import * as Muicon from "@mui/icons-material";
|
|
58
58
|
|
|
59
|
-
// src/Components/
|
|
60
|
-
import React
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});
|
|
81
|
-
}, timeProgress * 10);
|
|
82
|
-
return () => {
|
|
83
|
-
clearInterval(interval);
|
|
84
|
-
};
|
|
85
|
-
}, [timeProgress, lote]);
|
|
86
|
-
return {
|
|
87
|
-
progress
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
var ToastProgress = (timeProgress) => {
|
|
91
|
-
const [progress, setProgress] = useState(100);
|
|
92
|
-
useEffect(() => {
|
|
93
|
-
const interval = setInterval(() => {
|
|
94
|
-
setProgress((prev) => {
|
|
95
|
-
if (prev <= 0) {
|
|
96
|
-
clearInterval(interval);
|
|
97
|
-
}
|
|
98
|
-
return prev - 1;
|
|
99
|
-
});
|
|
100
|
-
}, timeProgress * 10);
|
|
101
|
-
return () => {
|
|
102
|
-
clearInterval(interval);
|
|
103
|
-
};
|
|
104
|
-
}, [timeProgress]);
|
|
105
|
-
return {
|
|
106
|
-
progressToast: progress
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// src/Components/ToastNotification/SCToastNotification.tsx
|
|
111
|
-
var SCToastNotification = (toast) => {
|
|
112
|
-
var _a;
|
|
113
|
-
const [stateOptions, setStateOptions] = useState2(true);
|
|
114
|
-
const [stateToast, setStateToast] = useState2(true);
|
|
115
|
-
const timeProgress = toast.time || 10;
|
|
116
|
-
const { progress } = useProgress(timeProgress);
|
|
117
|
-
const toastColorConfig = toast.type || "info";
|
|
118
|
-
const toastIconOption = {
|
|
119
|
-
success: /* @__PURE__ */ React.createElement(CheckCircleRounded, { color: "success" }),
|
|
120
|
-
error: /* @__PURE__ */ React.createElement(ErrorRounded, { color: "error" }),
|
|
121
|
-
warning: /* @__PURE__ */ React.createElement(WarningRounded, { color: "warning" }),
|
|
122
|
-
info: /* @__PURE__ */ React.createElement(InfoRounded, { color: "info" })
|
|
123
|
-
};
|
|
124
|
-
const acciones = [...toast.actions || [{ text: "Action", fn: () => {
|
|
125
|
-
alert("");
|
|
126
|
-
} }, { text: "Consultar", fn: () => {
|
|
127
|
-
} }]];
|
|
128
|
-
const ToastIconConfig = toastIconOption[toast.type];
|
|
129
|
-
const closeToast = () => {
|
|
130
|
-
setStateToast(false);
|
|
131
|
-
};
|
|
132
|
-
const toggleToastOptions = () => {
|
|
133
|
-
setStateOptions((prevShowOptions) => !prevShowOptions);
|
|
59
|
+
// src/Components/SCSnackBar.tsx
|
|
60
|
+
import React from "react";
|
|
61
|
+
import MuiAlert from "@mui/material/Alert";
|
|
62
|
+
import "dayjs/locale/es";
|
|
63
|
+
import Snackbar from "@mui/material/Snackbar";
|
|
64
|
+
var SCSnackBar = ({
|
|
65
|
+
type = "success",
|
|
66
|
+
close = true,
|
|
67
|
+
openState,
|
|
68
|
+
setOpenState,
|
|
69
|
+
mensaje,
|
|
70
|
+
duration = 3e3,
|
|
71
|
+
position = "Center"
|
|
72
|
+
}) => {
|
|
73
|
+
const posicionVertical = position == "Center" ? "bottom" : position.split("-")[1] == "Up" ? "top" : "bottom";
|
|
74
|
+
const posicionHorizontal = position == "Center" ? "center" : position.split("-")[0] == "Left" ? "left" : "right";
|
|
75
|
+
const handleClose = (event2, reason) => {
|
|
76
|
+
if (reason === "clickaway") {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
setOpenState(false);
|
|
134
80
|
};
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
zIndex:
|
|
143
|
-
|
|
144
|
-
top: 16,
|
|
145
|
-
width: 370,
|
|
146
|
-
sx: {
|
|
147
|
-
boxShadow: (theme) => theme.shadows[8]
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
/* @__PURE__ */ React.createElement(
|
|
151
|
-
Box,
|
|
152
|
-
{
|
|
153
|
-
padding: 1.5,
|
|
154
|
-
gap: 1.5,
|
|
155
|
-
display: "flex",
|
|
156
|
-
alignItems: "center",
|
|
157
|
-
sx: {
|
|
158
|
-
backgroundColor: {
|
|
159
|
-
success: "success.50",
|
|
160
|
-
error: "error.50",
|
|
161
|
-
warning: "warning.50",
|
|
162
|
-
info: "info.50"
|
|
163
|
-
}[toastColorConfig]
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
/* @__PURE__ */ React.createElement(
|
|
167
|
-
Stack,
|
|
168
|
-
{
|
|
169
|
-
p: 1,
|
|
170
|
-
gap: 1,
|
|
171
|
-
borderRadius: 50,
|
|
172
|
-
bgcolor: {
|
|
173
|
-
success: "success.100",
|
|
174
|
-
error: "error.100",
|
|
175
|
-
warning: "warning.100",
|
|
176
|
-
info: "info.100"
|
|
177
|
-
}[(_a = toast.type) != null ? _a : "info"]
|
|
178
|
-
},
|
|
179
|
-
/* @__PURE__ */ React.createElement(Stack, null, ToastIconConfig)
|
|
180
|
-
),
|
|
181
|
-
/* @__PURE__ */ React.createElement(Divider, { orientation: "vertical", flexItem: true }),
|
|
182
|
-
/* @__PURE__ */ React.createElement(Stack, { width: 285 }, /* @__PURE__ */ React.createElement(
|
|
183
|
-
Stack,
|
|
184
|
-
{
|
|
185
|
-
justifyContent: "space-between",
|
|
186
|
-
flexDirection: "row",
|
|
187
|
-
alignItems: "center"
|
|
188
|
-
},
|
|
189
|
-
/* @__PURE__ */ React.createElement(Typography, { variant: "subtitle2", color: "text.primary" }, toast.title),
|
|
190
|
-
/* @__PURE__ */ React.createElement(
|
|
191
|
-
IconButton,
|
|
192
|
-
{
|
|
193
|
-
size: "small",
|
|
194
|
-
"data-testid": "close-icon",
|
|
195
|
-
onClick: closeToast
|
|
196
|
-
},
|
|
197
|
-
/* @__PURE__ */ React.createElement(Close, { fontSize: "small" })
|
|
198
|
-
)
|
|
199
|
-
), /* @__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(
|
|
200
|
-
Button,
|
|
201
|
-
{
|
|
202
|
-
key: index,
|
|
203
|
-
color: toast.type === "info" ? "info" : toast.type === "success" ? "success" : toast.type === "error" ? "error" : "warning",
|
|
204
|
-
variant: "text",
|
|
205
|
-
onClick: button.fn,
|
|
206
|
-
disabled: button.disabled || false,
|
|
207
|
-
size: "small"
|
|
208
|
-
},
|
|
209
|
-
button.text.charAt(0).toUpperCase() + button.text.slice(1).toLowerCase()
|
|
210
|
-
))), toast.seeMore && /* @__PURE__ */ React.createElement(
|
|
211
|
-
Button,
|
|
212
|
-
{
|
|
213
|
-
onClick: toggleToastOptions,
|
|
214
|
-
size: "small",
|
|
215
|
-
variant: "text",
|
|
216
|
-
color: toastColorConfig
|
|
217
|
-
},
|
|
218
|
-
stateOptions ? "Ver m\xE1s" : "Ver menos",
|
|
219
|
-
stateOptions ? /* @__PURE__ */ React.createElement(KeyboardArrowDown, null) : /* @__PURE__ */ React.createElement(KeyboardArrowUp, null)
|
|
220
|
-
)))
|
|
221
|
-
),
|
|
81
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
82
|
+
Snackbar,
|
|
83
|
+
__spreadProps(__spreadValues({
|
|
84
|
+
anchorOrigin: { vertical: posicionVertical, horizontal: posicionHorizontal },
|
|
85
|
+
open: openState,
|
|
86
|
+
autoHideDuration: duration
|
|
87
|
+
}, close ? { onClose: handleClose } : {}), {
|
|
88
|
+
sx: { zIndex: 2e3 }
|
|
89
|
+
}),
|
|
222
90
|
/* @__PURE__ */ React.createElement(
|
|
223
|
-
|
|
224
|
-
{
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
color: toastColorConfig,
|
|
232
|
-
variant: "determinate",
|
|
233
|
-
value: 100 - progress
|
|
234
|
-
}
|
|
91
|
+
MuiAlert,
|
|
92
|
+
__spreadProps(__spreadValues({}, close ? { onClose: handleClose } : {}), {
|
|
93
|
+
severity: type,
|
|
94
|
+
sx: { backgroundColor: type == "success" ? "success.50" : type == "error" ? "#F9E8E8" : type == "warning" ? "#FFF0E0" : "#E6F3F8" }
|
|
95
|
+
}),
|
|
96
|
+
mensaje
|
|
235
97
|
)
|
|
236
98
|
));
|
|
237
99
|
};
|
|
@@ -283,9 +145,9 @@ var getButtonColor = (state) => {
|
|
|
283
145
|
};
|
|
284
146
|
|
|
285
147
|
// src/Components/Modal/SCModal.tsx
|
|
286
|
-
import React3, { useCallback, useMemo, useState as
|
|
287
|
-
import { Modal, Box
|
|
288
|
-
import { Close
|
|
148
|
+
import React3, { useCallback, useMemo, useState as useState2 } from "react";
|
|
149
|
+
import { Modal, Box, Typography, IconButton, Button, Stack } from "@mui/material";
|
|
150
|
+
import { Close } from "@mui/icons-material";
|
|
289
151
|
|
|
290
152
|
// src/generales/capitalize.tsx
|
|
291
153
|
function capitalize(text) {
|
|
@@ -303,7 +165,7 @@ var SCModal = ({
|
|
|
303
165
|
action
|
|
304
166
|
}) => {
|
|
305
167
|
var _a, _b, _c, _d, _e;
|
|
306
|
-
const [internalOpen, setInternalOpen] =
|
|
168
|
+
const [internalOpen, setInternalOpen] = useState2(open != null ? open : false);
|
|
307
169
|
const isControlled = Boolean(setOpen);
|
|
308
170
|
const modalOpen = isControlled ? open != null ? open : false : internalOpen;
|
|
309
171
|
const setModalOpen = isControlled ? setOpen : setInternalOpen;
|
|
@@ -312,7 +174,7 @@ var SCModal = ({
|
|
|
312
174
|
const Icon = useMemo(() => getIconComponent(buttonModal == null ? void 0 : buttonModal.icon), [buttonModal == null ? void 0 : buttonModal.icon]);
|
|
313
175
|
const { icon, defaultDescription } = modalStateConfig[state];
|
|
314
176
|
return /* @__PURE__ */ React3.createElement(React3.Fragment, null, buttonModal && /* @__PURE__ */ React3.createElement(
|
|
315
|
-
|
|
177
|
+
Button,
|
|
316
178
|
{
|
|
317
179
|
"data-testid": "test-buttonModal",
|
|
318
180
|
color: (_a = buttonModal == null ? void 0 : buttonModal.color) != null ? _a : "primary",
|
|
@@ -324,7 +186,7 @@ var SCModal = ({
|
|
|
324
186
|
},
|
|
325
187
|
capitalize((_d = buttonModal == null ? void 0 : buttonModal.text) != null ? _d : "filtrar")
|
|
326
188
|
), /* @__PURE__ */ React3.createElement(Modal, { open: modalOpen, onClose: handleClose, sx: { boxShadow: 8 } }, /* @__PURE__ */ React3.createElement(
|
|
327
|
-
|
|
189
|
+
Box,
|
|
328
190
|
{
|
|
329
191
|
sx: {
|
|
330
192
|
position: "absolute",
|
|
@@ -337,8 +199,8 @@ var SCModal = ({
|
|
|
337
199
|
boxShadow: 24
|
|
338
200
|
}
|
|
339
201
|
},
|
|
340
|
-
/* @__PURE__ */ React3.createElement(
|
|
341
|
-
|
|
202
|
+
/* @__PURE__ */ React3.createElement(Stack, { direction: "row", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React3.createElement(Stack, { direction: "row", alignItems: "center", p: 1, gap: 1.5 }, /* @__PURE__ */ React3.createElement(
|
|
203
|
+
Box,
|
|
342
204
|
{
|
|
343
205
|
display: "flex",
|
|
344
206
|
justifyContent: "center",
|
|
@@ -349,10 +211,10 @@ var SCModal = ({
|
|
|
349
211
|
bgcolor: getModalColor(state)
|
|
350
212
|
},
|
|
351
213
|
icon
|
|
352
|
-
), /* @__PURE__ */ React3.createElement(
|
|
353
|
-
/* @__PURE__ */ React3.createElement(
|
|
214
|
+
), /* @__PURE__ */ React3.createElement(Typography, { variant: "h6", color: "text.primary" }, title)), /* @__PURE__ */ React3.createElement(IconButton, { onClick: handleClose, "data-testid": "test-buttonClose" }, /* @__PURE__ */ React3.createElement(Close, { color: "action" }))),
|
|
215
|
+
/* @__PURE__ */ React3.createElement(Stack, { py: 1, px: 3, gap: 1.5 }, /* @__PURE__ */ React3.createElement(Typography, { variant: "body1" }, description || defaultDescription)),
|
|
354
216
|
action && /* @__PURE__ */ React3.createElement(
|
|
355
|
-
|
|
217
|
+
Stack,
|
|
356
218
|
{
|
|
357
219
|
id: "Action",
|
|
358
220
|
direction: "row",
|
|
@@ -363,7 +225,7 @@ var SCModal = ({
|
|
|
363
225
|
sx: { borderRadius: 1 }
|
|
364
226
|
},
|
|
365
227
|
/* @__PURE__ */ React3.createElement(
|
|
366
|
-
|
|
228
|
+
Button,
|
|
367
229
|
{
|
|
368
230
|
color: "inherit",
|
|
369
231
|
variant: "text",
|
|
@@ -373,7 +235,7 @@ var SCModal = ({
|
|
|
373
235
|
capitalize("cancelar")
|
|
374
236
|
),
|
|
375
237
|
/* @__PURE__ */ React3.createElement(
|
|
376
|
-
|
|
238
|
+
Button,
|
|
377
239
|
{
|
|
378
240
|
"data-testid": "test-aceptar",
|
|
379
241
|
color: getButtonColor(state),
|
|
@@ -403,11 +265,11 @@ var Attachment = ({
|
|
|
403
265
|
iconFileItem,
|
|
404
266
|
view = "button"
|
|
405
267
|
}) => {
|
|
406
|
-
const [files, setFiles] =
|
|
407
|
-
const [fileToDelete, setFileToDelete] =
|
|
408
|
-
const [toast, setToast] =
|
|
409
|
-
const [openModal, setOpenModal] =
|
|
410
|
-
const [isDragFile, setIsDragFile] =
|
|
268
|
+
const [files, setFiles] = useState3([]);
|
|
269
|
+
const [fileToDelete, setFileToDelete] = useState3(null);
|
|
270
|
+
const [toast, setToast] = useState3({ open: false, mensaje: "", type: "success" });
|
|
271
|
+
const [openModal, setOpenModal] = useState3(false);
|
|
272
|
+
const [isDragFile, setIsDragFile] = useState3(false);
|
|
411
273
|
const inputRef = useRef(null);
|
|
412
274
|
let IconFileItem;
|
|
413
275
|
if (iconFileItem) {
|
|
@@ -417,7 +279,7 @@ var Attachment = ({
|
|
|
417
279
|
IconFileItem = Muicon[iconFileItem];
|
|
418
280
|
}
|
|
419
281
|
}
|
|
420
|
-
|
|
282
|
+
useEffect(() => {
|
|
421
283
|
if (initialFiles && initialFiles.length > 0) {
|
|
422
284
|
setFiles(initialFiles);
|
|
423
285
|
}
|
|
@@ -452,13 +314,7 @@ var Attachment = ({
|
|
|
452
314
|
);
|
|
453
315
|
const sizeMB = file.size / (1024 * 1024);
|
|
454
316
|
if (isDuplicateFile) {
|
|
455
|
-
setToast({
|
|
456
|
-
type: "error",
|
|
457
|
-
title: "Archivo duplicado",
|
|
458
|
-
listITems: [`El archivo "${file.name}" ya existe.`],
|
|
459
|
-
seeMore: true,
|
|
460
|
-
time: 5
|
|
461
|
-
});
|
|
317
|
+
setToast({ open: true, type: "error", mensaje: `Archivo duplicado: El archivo "${file.name}" ya existe.` });
|
|
462
318
|
return;
|
|
463
319
|
}
|
|
464
320
|
if (sizeMB > maxSize) {
|
|
@@ -469,13 +325,7 @@ var Attachment = ({
|
|
|
469
325
|
progress: 0,
|
|
470
326
|
uploadError: true
|
|
471
327
|
});
|
|
472
|
-
setToast({
|
|
473
|
-
type: "error",
|
|
474
|
-
title: "Carga fallida",
|
|
475
|
-
seeMore: true,
|
|
476
|
-
listITems: [`El archivo "${file.name}" supera el l\xEDmite de ${maxSize}MB.`],
|
|
477
|
-
time: 5
|
|
478
|
-
});
|
|
328
|
+
setToast({ open: true, type: "error", mensaje: `Carga fallida: El archivo "${file.name}" supera el l\xEDmite de ${maxSize}MB.` });
|
|
479
329
|
return;
|
|
480
330
|
}
|
|
481
331
|
if (fileAccepted && !file.name.match(
|
|
@@ -484,13 +334,7 @@ var Attachment = ({
|
|
|
484
334
|
"i"
|
|
485
335
|
)
|
|
486
336
|
)) {
|
|
487
|
-
setToast({
|
|
488
|
-
type: "error",
|
|
489
|
-
title: "Tipo de archivo no permitido",
|
|
490
|
-
listITems: [`El archivo "${file.name}" no es un tipo permitido.`],
|
|
491
|
-
seeMore: true,
|
|
492
|
-
time: 5
|
|
493
|
-
});
|
|
337
|
+
setToast({ open: true, type: "error", mensaje: `Tipo de archivo no permitido: El archivo "${file.name}" no es un tipo permitido.` });
|
|
494
338
|
return;
|
|
495
339
|
}
|
|
496
340
|
nuevosArchivos.push({
|
|
@@ -525,7 +369,17 @@ var Attachment = ({
|
|
|
525
369
|
return filteredFiles;
|
|
526
370
|
});
|
|
527
371
|
};
|
|
528
|
-
return /* @__PURE__ */ React4.createElement(
|
|
372
|
+
return /* @__PURE__ */ React4.createElement(Stack2, { spacing: 2, display: "flex", flexDirection: "column", gap: 1 }, /* @__PURE__ */ React4.createElement(
|
|
373
|
+
SCSnackBar,
|
|
374
|
+
{
|
|
375
|
+
openState: toast.open,
|
|
376
|
+
setOpenState: (v) => setToast((prev) => __spreadProps(__spreadValues({}, prev), { open: v })),
|
|
377
|
+
mensaje: toast.mensaje,
|
|
378
|
+
type: toast.type,
|
|
379
|
+
duration: 5e3,
|
|
380
|
+
position: "Center"
|
|
381
|
+
}
|
|
382
|
+
), /* @__PURE__ */ React4.createElement(
|
|
529
383
|
"input",
|
|
530
384
|
{
|
|
531
385
|
type: "file",
|
|
@@ -535,7 +389,7 @@ var Attachment = ({
|
|
|
535
389
|
onChange: handleUpload
|
|
536
390
|
}
|
|
537
391
|
), view === "button" && /* @__PURE__ */ React4.createElement(
|
|
538
|
-
|
|
392
|
+
Stack2,
|
|
539
393
|
{
|
|
540
394
|
"data-testid": "ZonaAdjuntos",
|
|
541
395
|
id: "ZonaAdjuntos",
|
|
@@ -565,7 +419,7 @@ var Attachment = ({
|
|
|
565
419
|
}, sx)
|
|
566
420
|
},
|
|
567
421
|
onLoading ? /* @__PURE__ */ React4.createElement(
|
|
568
|
-
|
|
422
|
+
Box2,
|
|
569
423
|
{
|
|
570
424
|
display: "flex",
|
|
571
425
|
alignItems: "center",
|
|
@@ -581,7 +435,7 @@ var Attachment = ({
|
|
|
581
435
|
}
|
|
582
436
|
)
|
|
583
437
|
) : /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
|
|
584
|
-
|
|
438
|
+
Box2,
|
|
585
439
|
{
|
|
586
440
|
display: "flex",
|
|
587
441
|
bgcolor: error ? "error.50" : "primary.50",
|
|
@@ -596,7 +450,7 @@ var Attachment = ({
|
|
|
596
450
|
}
|
|
597
451
|
)
|
|
598
452
|
), /* @__PURE__ */ React4.createElement(
|
|
599
|
-
|
|
453
|
+
Stack2,
|
|
600
454
|
{
|
|
601
455
|
width: "100%",
|
|
602
456
|
flexDirection: compact ? "row" : "column",
|
|
@@ -605,15 +459,15 @@ var Attachment = ({
|
|
|
605
459
|
gap: 1
|
|
606
460
|
},
|
|
607
461
|
/* @__PURE__ */ React4.createElement(
|
|
608
|
-
|
|
462
|
+
Stack2,
|
|
609
463
|
{
|
|
610
464
|
flexDirection: "column",
|
|
611
465
|
alignItems: compact ? "start" : "center",
|
|
612
466
|
gap: 0.5
|
|
613
467
|
},
|
|
614
|
-
/* @__PURE__ */ React4.createElement(
|
|
468
|
+
/* @__PURE__ */ React4.createElement(Typography2, { variant: "body2", color: "text.primary" }, "Arrastrar o adjuntar archivos"),
|
|
615
469
|
/* @__PURE__ */ React4.createElement(
|
|
616
|
-
|
|
470
|
+
Typography2,
|
|
617
471
|
{
|
|
618
472
|
variant: "caption",
|
|
619
473
|
color: error ? "error" : "text.secondary",
|
|
@@ -626,7 +480,7 @@ var Attachment = ({
|
|
|
626
480
|
)
|
|
627
481
|
),
|
|
628
482
|
/* @__PURE__ */ React4.createElement(
|
|
629
|
-
|
|
483
|
+
Button2,
|
|
630
484
|
{
|
|
631
485
|
variant: "text",
|
|
632
486
|
color: "primary",
|
|
@@ -637,7 +491,7 @@ var Attachment = ({
|
|
|
637
491
|
)
|
|
638
492
|
))
|
|
639
493
|
), files.length > 0 && /* @__PURE__ */ React4.createElement(
|
|
640
|
-
|
|
494
|
+
Stack2,
|
|
641
495
|
{
|
|
642
496
|
"data-testid": "ContenedorArchivosAdjuntos",
|
|
643
497
|
id: "ContenedorArchivosAdjuntos",
|
|
@@ -651,7 +505,7 @@ var Attachment = ({
|
|
|
651
505
|
spacing: 1
|
|
652
506
|
},
|
|
653
507
|
files.map((file) => /* @__PURE__ */ React4.createElement(
|
|
654
|
-
|
|
508
|
+
Stack2,
|
|
655
509
|
{
|
|
656
510
|
height: 46,
|
|
657
511
|
key: file.name + (file.uploadError ? "_error" : ""),
|
|
@@ -668,14 +522,14 @@ var Attachment = ({
|
|
|
668
522
|
}
|
|
669
523
|
}
|
|
670
524
|
},
|
|
671
|
-
/* @__PURE__ */ React4.createElement(
|
|
525
|
+
/* @__PURE__ */ React4.createElement(Stack2, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, iconFileItem ? /* @__PURE__ */ React4.createElement(SvgIcon, { color: file.uploadError ? "error" : "primary", fontSize: "small", component: IconFileItem }) : /* @__PURE__ */ React4.createElement(
|
|
672
526
|
UploadFileOutlined,
|
|
673
527
|
{
|
|
674
528
|
color: file.uploadError ? "error" : "primary",
|
|
675
529
|
fontSize: "small"
|
|
676
530
|
}
|
|
677
|
-
), /* @__PURE__ */ React4.createElement(
|
|
678
|
-
|
|
531
|
+
), /* @__PURE__ */ React4.createElement(Stack2, { width: "100%" }, /* @__PURE__ */ React4.createElement(
|
|
532
|
+
Typography2,
|
|
679
533
|
{
|
|
680
534
|
variant: "body2",
|
|
681
535
|
color: "text.primary",
|
|
@@ -686,7 +540,7 @@ var Attachment = ({
|
|
|
686
540
|
},
|
|
687
541
|
file.name
|
|
688
542
|
), /* @__PURE__ */ React4.createElement(
|
|
689
|
-
|
|
543
|
+
Typography2,
|
|
690
544
|
{
|
|
691
545
|
variant: "caption",
|
|
692
546
|
color: file.uploadError ? "error" : "text.secondary"
|
|
@@ -694,7 +548,7 @@ var Attachment = ({
|
|
|
694
548
|
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}`
|
|
695
549
|
))),
|
|
696
550
|
/* @__PURE__ */ React4.createElement(Tooltip, { title: "Descargar" }, /* @__PURE__ */ React4.createElement(
|
|
697
|
-
|
|
551
|
+
IconButton2,
|
|
698
552
|
{
|
|
699
553
|
size: "small",
|
|
700
554
|
onClick: () => downloadAction == null ? void 0 : downloadAction(file.name),
|
|
@@ -704,7 +558,7 @@ var Attachment = ({
|
|
|
704
558
|
/* @__PURE__ */ React4.createElement(FileDownload, { fontSize: "small", color: "action" })
|
|
705
559
|
)),
|
|
706
560
|
view === "button" && /* @__PURE__ */ React4.createElement(Tooltip, { title: "Eliminar" }, /* @__PURE__ */ React4.createElement(
|
|
707
|
-
|
|
561
|
+
IconButton2,
|
|
708
562
|
{
|
|
709
563
|
size: "small",
|
|
710
564
|
onClick: () => {
|
|
@@ -734,19 +588,9 @@ var Attachment = ({
|
|
|
734
588
|
yield deleteAction(fileToDelete.name);
|
|
735
589
|
}
|
|
736
590
|
deleteFiles(fileToDelete.name);
|
|
737
|
-
setToast({
|
|
738
|
-
title: "Archivo eliminado",
|
|
739
|
-
type: "success",
|
|
740
|
-
listITems: [`El archivo "${fileToDelete.name}" fue eliminado exitosamente.`],
|
|
741
|
-
time: 3
|
|
742
|
-
});
|
|
591
|
+
setToast({ open: true, type: "success", mensaje: `El archivo "${fileToDelete.name}" fue eliminado exitosamente.` });
|
|
743
592
|
} catch (error2) {
|
|
744
|
-
setToast({
|
|
745
|
-
title: "Error al eliminar archivo",
|
|
746
|
-
type: "error",
|
|
747
|
-
listITems: [`No se pudo eliminar el archivo "${fileToDelete.name}".`],
|
|
748
|
-
time: 5
|
|
749
|
-
});
|
|
593
|
+
setToast({ open: true, type: "error", mensaje: `No se pudo eliminar el archivo "${fileToDelete.name}".` });
|
|
750
594
|
} finally {
|
|
751
595
|
setFileToDelete(null);
|
|
752
596
|
setOpenModal(false);
|
|
@@ -760,12 +604,12 @@ var Attachment = ({
|
|
|
760
604
|
};
|
|
761
605
|
|
|
762
606
|
// src/Components/Adjuntar/mobile/AdjuntarMobile.tsx
|
|
763
|
-
import
|
|
607
|
+
import React19, { useEffect as useEffect11, useRef as useRef3, useState as useState13, useCallback as useCallback2 } from "react";
|
|
764
608
|
import Webcam from "react-webcam";
|
|
765
609
|
|
|
766
610
|
// src/Components/Adjuntar/mobile/components/button.tsx
|
|
767
611
|
import React5, { useMemo as useMemo2 } from "react";
|
|
768
|
-
import { Button as
|
|
612
|
+
import { Button as Button3 } from "@mui/material";
|
|
769
613
|
|
|
770
614
|
// src/Components/Adjuntar/mobile/components/Utils.tsx
|
|
771
615
|
import * as MuiIcons2 from "@mui/icons-material";
|
|
@@ -796,7 +640,7 @@ var AttachmentButton = ({ buttonAttachment, open, setOpen }) => {
|
|
|
796
640
|
);
|
|
797
641
|
if (!buttonAttachment) return null;
|
|
798
642
|
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, buttonAttachment && /* @__PURE__ */ React5.createElement(
|
|
799
|
-
|
|
643
|
+
Button3,
|
|
800
644
|
{
|
|
801
645
|
"data-testid": "test-buttonModal",
|
|
802
646
|
color: (_a = buttonAttachment == null ? void 0 : buttonAttachment.color) != null ? _a : "primary",
|
|
@@ -822,10 +666,190 @@ import FileDownloadOutlinedIcon from "@mui/icons-material/FileDownloadOutlined";
|
|
|
822
666
|
import * as Muicon6 from "@mui/icons-material";
|
|
823
667
|
|
|
824
668
|
// src/Components/Drawer/SCDrawer.tsx
|
|
825
|
-
import
|
|
669
|
+
import React18 from "react";
|
|
826
670
|
import { Drawer, Stack as Stack6, SwipeableDrawer, Box as Box11, Button as Button9 } from "@mui/material";
|
|
827
671
|
import Grid6 from "@mui/material/Grid";
|
|
828
672
|
|
|
673
|
+
// src/Components/ToastNotification/SCToastNotification.tsx
|
|
674
|
+
import React6, { useEffect as useEffect3, useState as useState5 } from "react";
|
|
675
|
+
import { Stack as Stack3, LinearProgress, Divider, Box as Box3, Typography as Typography3, IconButton as IconButton3, Button as Button4 } from "@mui/material";
|
|
676
|
+
import { Close as Close2, InfoRounded, CheckCircleRounded, WarningRounded, ErrorRounded, KeyboardArrowDown, KeyboardArrowUp } from "@mui/icons-material";
|
|
677
|
+
|
|
678
|
+
// src/Components/ToastNotification/useProgress.ts
|
|
679
|
+
import { useEffect as useEffect2, useState as useState4 } from "react";
|
|
680
|
+
var useProgress = (timeProgress, lote) => {
|
|
681
|
+
const [progress, setProgress] = useState4(0);
|
|
682
|
+
useEffect2(() => {
|
|
683
|
+
const interval = setInterval(() => {
|
|
684
|
+
setProgress((prev) => {
|
|
685
|
+
if (prev >= 100) {
|
|
686
|
+
clearInterval(interval);
|
|
687
|
+
}
|
|
688
|
+
if (lote) {
|
|
689
|
+
const nextProgress = prev + lote;
|
|
690
|
+
return nextProgress <= 100 ? nextProgress : 100;
|
|
691
|
+
} else {
|
|
692
|
+
return prev + 1;
|
|
693
|
+
}
|
|
694
|
+
});
|
|
695
|
+
}, timeProgress * 10);
|
|
696
|
+
return () => {
|
|
697
|
+
clearInterval(interval);
|
|
698
|
+
};
|
|
699
|
+
}, [timeProgress, lote]);
|
|
700
|
+
return {
|
|
701
|
+
progress
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
var ToastProgress = (timeProgress) => {
|
|
705
|
+
const [progress, setProgress] = useState4(100);
|
|
706
|
+
useEffect2(() => {
|
|
707
|
+
const interval = setInterval(() => {
|
|
708
|
+
setProgress((prev) => {
|
|
709
|
+
if (prev <= 0) {
|
|
710
|
+
clearInterval(interval);
|
|
711
|
+
}
|
|
712
|
+
return prev - 1;
|
|
713
|
+
});
|
|
714
|
+
}, timeProgress * 10);
|
|
715
|
+
return () => {
|
|
716
|
+
clearInterval(interval);
|
|
717
|
+
};
|
|
718
|
+
}, [timeProgress]);
|
|
719
|
+
return {
|
|
720
|
+
progressToast: progress
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
|
|
724
|
+
// src/Components/ToastNotification/SCToastNotification.tsx
|
|
725
|
+
var SCToastNotification = (toast) => {
|
|
726
|
+
var _a;
|
|
727
|
+
const [stateOptions, setStateOptions] = useState5(true);
|
|
728
|
+
const [stateToast, setStateToast] = useState5(true);
|
|
729
|
+
const timeProgress = toast.time || 10;
|
|
730
|
+
const { progress } = useProgress(timeProgress);
|
|
731
|
+
const toastColorConfig = toast.type || "info";
|
|
732
|
+
const toastIconOption = {
|
|
733
|
+
success: /* @__PURE__ */ React6.createElement(CheckCircleRounded, { color: "success" }),
|
|
734
|
+
error: /* @__PURE__ */ React6.createElement(ErrorRounded, { color: "error" }),
|
|
735
|
+
warning: /* @__PURE__ */ React6.createElement(WarningRounded, { color: "warning" }),
|
|
736
|
+
info: /* @__PURE__ */ React6.createElement(InfoRounded, { color: "info" })
|
|
737
|
+
};
|
|
738
|
+
const acciones = [...toast.actions || [{ text: "Action", fn: () => {
|
|
739
|
+
alert("");
|
|
740
|
+
} }, { text: "Consultar", fn: () => {
|
|
741
|
+
} }]];
|
|
742
|
+
const ToastIconConfig = toastIconOption[toast.type];
|
|
743
|
+
const closeToast = () => {
|
|
744
|
+
setStateToast(false);
|
|
745
|
+
};
|
|
746
|
+
const toggleToastOptions = () => {
|
|
747
|
+
setStateOptions((prevShowOptions) => !prevShowOptions);
|
|
748
|
+
};
|
|
749
|
+
useEffect3(() => {
|
|
750
|
+
progress >= 100 && setStateToast(false);
|
|
751
|
+
}, [progress]);
|
|
752
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, stateToast && /* @__PURE__ */ React6.createElement(
|
|
753
|
+
Stack3,
|
|
754
|
+
{
|
|
755
|
+
position: "fixed",
|
|
756
|
+
zIndex: 1400,
|
|
757
|
+
right: 16,
|
|
758
|
+
top: 16,
|
|
759
|
+
width: 370,
|
|
760
|
+
sx: {
|
|
761
|
+
boxShadow: (theme) => theme.shadows[8]
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
/* @__PURE__ */ React6.createElement(
|
|
765
|
+
Box3,
|
|
766
|
+
{
|
|
767
|
+
padding: 1.5,
|
|
768
|
+
gap: 1.5,
|
|
769
|
+
display: "flex",
|
|
770
|
+
alignItems: "center",
|
|
771
|
+
sx: {
|
|
772
|
+
backgroundColor: {
|
|
773
|
+
success: "success.50",
|
|
774
|
+
error: "error.50",
|
|
775
|
+
warning: "warning.50",
|
|
776
|
+
info: "info.50"
|
|
777
|
+
}[toastColorConfig]
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
/* @__PURE__ */ React6.createElement(
|
|
781
|
+
Stack3,
|
|
782
|
+
{
|
|
783
|
+
p: 1,
|
|
784
|
+
gap: 1,
|
|
785
|
+
borderRadius: 50,
|
|
786
|
+
bgcolor: {
|
|
787
|
+
success: "success.100",
|
|
788
|
+
error: "error.100",
|
|
789
|
+
warning: "warning.100",
|
|
790
|
+
info: "info.100"
|
|
791
|
+
}[(_a = toast.type) != null ? _a : "info"]
|
|
792
|
+
},
|
|
793
|
+
/* @__PURE__ */ React6.createElement(Stack3, null, ToastIconConfig)
|
|
794
|
+
),
|
|
795
|
+
/* @__PURE__ */ React6.createElement(Divider, { orientation: "vertical", flexItem: true }),
|
|
796
|
+
/* @__PURE__ */ React6.createElement(Stack3, { width: 285 }, /* @__PURE__ */ React6.createElement(
|
|
797
|
+
Stack3,
|
|
798
|
+
{
|
|
799
|
+
justifyContent: "space-between",
|
|
800
|
+
flexDirection: "row",
|
|
801
|
+
alignItems: "center"
|
|
802
|
+
},
|
|
803
|
+
/* @__PURE__ */ React6.createElement(Typography3, { variant: "subtitle2", color: "text.primary" }, toast.title),
|
|
804
|
+
/* @__PURE__ */ React6.createElement(
|
|
805
|
+
IconButton3,
|
|
806
|
+
{
|
|
807
|
+
size: "small",
|
|
808
|
+
"data-testid": "close-icon",
|
|
809
|
+
onClick: closeToast
|
|
810
|
+
},
|
|
811
|
+
/* @__PURE__ */ React6.createElement(Close2, { fontSize: "small" })
|
|
812
|
+
)
|
|
813
|
+
), /* @__PURE__ */ React6.createElement(Stack3, { gap: 0.5 }, /* @__PURE__ */ React6.createElement(Typography3, { color: "text.primary", variant: "body2" }, toast.subtitle), !stateOptions && toast.listITems && toast.listITems.length > 0 && /* @__PURE__ */ React6.createElement(Stack3, null, toast.listITems.map((element, i) => /* @__PURE__ */ React6.createElement(Typography3, { variant: "caption", key: i }, "\u2022 ", element)))), /* @__PURE__ */ React6.createElement(Stack3, { justifyContent: "flex-end", flexDirection: "row", gap: 0.5 }, toast.actions && toast.actions.length > 0 && /* @__PURE__ */ React6.createElement(Stack3, { flexDirection: "row", gap: 0.5 }, toast.actions.map((button, index) => /* @__PURE__ */ React6.createElement(
|
|
814
|
+
Button4,
|
|
815
|
+
{
|
|
816
|
+
key: index,
|
|
817
|
+
color: toast.type === "info" ? "info" : toast.type === "success" ? "success" : toast.type === "error" ? "error" : "warning",
|
|
818
|
+
variant: "text",
|
|
819
|
+
onClick: button.fn,
|
|
820
|
+
disabled: button.disabled || false,
|
|
821
|
+
size: "small"
|
|
822
|
+
},
|
|
823
|
+
button.text.charAt(0).toUpperCase() + button.text.slice(1).toLowerCase()
|
|
824
|
+
))), toast.seeMore && /* @__PURE__ */ React6.createElement(
|
|
825
|
+
Button4,
|
|
826
|
+
{
|
|
827
|
+
onClick: toggleToastOptions,
|
|
828
|
+
size: "small",
|
|
829
|
+
variant: "text",
|
|
830
|
+
color: toastColorConfig
|
|
831
|
+
},
|
|
832
|
+
stateOptions ? "Ver m\xE1s" : "Ver menos",
|
|
833
|
+
stateOptions ? /* @__PURE__ */ React6.createElement(KeyboardArrowDown, null) : /* @__PURE__ */ React6.createElement(KeyboardArrowUp, null)
|
|
834
|
+
)))
|
|
835
|
+
),
|
|
836
|
+
/* @__PURE__ */ React6.createElement(
|
|
837
|
+
LinearProgress,
|
|
838
|
+
{
|
|
839
|
+
sx: {
|
|
840
|
+
".MuiLinearProgress-bar": {
|
|
841
|
+
transition: "0.1s linear !important",
|
|
842
|
+
transform: "scaleX(-1)"
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
color: toastColorConfig,
|
|
846
|
+
variant: "determinate",
|
|
847
|
+
value: 100 - progress
|
|
848
|
+
}
|
|
849
|
+
)
|
|
850
|
+
));
|
|
851
|
+
};
|
|
852
|
+
|
|
829
853
|
// src/Components/Drawer/Helpers/Utils.tsx
|
|
830
854
|
import * as Muicon2 from "@mui/icons-material";
|
|
831
855
|
var getIcon = (iconName) => {
|
|
@@ -865,7 +889,7 @@ var validateInputs = (arrayElements, onError, onSuccess, setChipFilters, setText
|
|
|
865
889
|
};
|
|
866
890
|
|
|
867
891
|
// src/Components/Drawer/Helpers/validateTypeElement.tsx
|
|
868
|
-
import
|
|
892
|
+
import React7 from "react";
|
|
869
893
|
var COMPONENT_NAME_MAP = {
|
|
870
894
|
SCtextField: "textField",
|
|
871
895
|
SCtextArea: "textArea",
|
|
@@ -888,12 +912,12 @@ var isKnownComponent = (node) => {
|
|
|
888
912
|
};
|
|
889
913
|
var findInTree = (node) => {
|
|
890
914
|
var _a;
|
|
891
|
-
if (!
|
|
915
|
+
if (!React7.isValidElement(node)) return null;
|
|
892
916
|
if (isKnownComponent(node)) return node;
|
|
893
917
|
const children = (_a = node.props) == null ? void 0 : _a.children;
|
|
894
918
|
if (!children) return null;
|
|
895
|
-
for (const child of
|
|
896
|
-
if (
|
|
919
|
+
for (const child of React7.Children.toArray(children)) {
|
|
920
|
+
if (React7.isValidElement(child)) {
|
|
897
921
|
const found = findInTree(child);
|
|
898
922
|
if (found) return found;
|
|
899
923
|
}
|
|
@@ -916,11 +940,11 @@ var validateTypeElements = (element) => {
|
|
|
916
940
|
} else if (element.typeFormat === "multiselect") {
|
|
917
941
|
validation = "multiselect";
|
|
918
942
|
typeElement = element;
|
|
919
|
-
} else if (
|
|
943
|
+
} else if (React7.isValidElement(element == null ? void 0 : element.component) && isKnownComponent(element.component)) {
|
|
920
944
|
const node = element.component;
|
|
921
945
|
validation = resolveValidation(node);
|
|
922
946
|
typeElement = node.props;
|
|
923
|
-
} else if (
|
|
947
|
+
} else if (React7.isValidElement(element == null ? void 0 : element.component)) {
|
|
924
948
|
const found = findInTree(element.component);
|
|
925
949
|
if (found) {
|
|
926
950
|
validation = resolveValidation(found);
|
|
@@ -931,9 +955,9 @@ var validateTypeElements = (element) => {
|
|
|
931
955
|
};
|
|
932
956
|
|
|
933
957
|
// src/Components/Drawer/hooks/useDrawerState.ts
|
|
934
|
-
import { useState as
|
|
958
|
+
import { useState as useState6, useEffect as useEffect4 } from "react";
|
|
935
959
|
var useDrawerState = ({ open, setOpen }) => {
|
|
936
|
-
const [drawerOpen, setDrawerOpen] =
|
|
960
|
+
const [drawerOpen, setDrawerOpen] = useState6(open || false);
|
|
937
961
|
useEffect4(() => {
|
|
938
962
|
if (open !== void 0) {
|
|
939
963
|
setDrawerOpen(open);
|
|
@@ -963,10 +987,10 @@ var useDrawerState = ({ open, setOpen }) => {
|
|
|
963
987
|
};
|
|
964
988
|
|
|
965
989
|
// src/Components/Drawer/hooks/useChipFilters.ts
|
|
966
|
-
import { useState as
|
|
990
|
+
import { useState as useState7, useEffect as useEffect5 } from "react";
|
|
967
991
|
var useChipFilters = (arrayElements, chipFilters) => {
|
|
968
|
-
const [stateChipFilters, setChipFilters] =
|
|
969
|
-
const [textFilters, setTextFilters] =
|
|
992
|
+
const [stateChipFilters, setChipFilters] = useState7(false);
|
|
993
|
+
const [textFilters, setTextFilters] = useState7([]);
|
|
970
994
|
useEffect5(() => {
|
|
971
995
|
if (chipFilters == null ? void 0 : chipFilters.length) {
|
|
972
996
|
setTextFilters([]);
|
|
@@ -1098,9 +1122,9 @@ var useChipFilters = (arrayElements, chipFilters) => {
|
|
|
1098
1122
|
};
|
|
1099
1123
|
|
|
1100
1124
|
// src/Components/Drawer/hooks/useToast.ts
|
|
1101
|
-
import { useState as
|
|
1125
|
+
import { useState as useState8 } from "react";
|
|
1102
1126
|
var useToast = () => {
|
|
1103
|
-
const [toast, setToast] =
|
|
1127
|
+
const [toast, setToast] = useState8(null);
|
|
1104
1128
|
const setToastWithDelay = (toastContent) => {
|
|
1105
1129
|
setToast(null);
|
|
1106
1130
|
setTimeout(() => {
|
|
@@ -1160,7 +1184,7 @@ var deleteFilter = (element, shouldShowChips, setTextFilters) => {
|
|
|
1160
1184
|
};
|
|
1161
1185
|
|
|
1162
1186
|
// src/Components/Drawer/components/DrawerButton.tsx
|
|
1163
|
-
import
|
|
1187
|
+
import React8 from "react";
|
|
1164
1188
|
import { Button as Button5, Chip } from "@mui/material";
|
|
1165
1189
|
var DrawerButton = ({
|
|
1166
1190
|
buttonDrawer,
|
|
@@ -1169,7 +1193,7 @@ var DrawerButton = ({
|
|
|
1169
1193
|
var _a, _b, _c;
|
|
1170
1194
|
const ButtonIcon = getIcon(buttonDrawer == null ? void 0 : buttonDrawer.icon);
|
|
1171
1195
|
if ((buttonDrawer == null ? void 0 : buttonDrawer.type) === "chip") {
|
|
1172
|
-
return /* @__PURE__ */
|
|
1196
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1173
1197
|
Chip,
|
|
1174
1198
|
__spreadProps(__spreadValues({
|
|
1175
1199
|
onClick: onToggle,
|
|
@@ -1177,8 +1201,8 @@ var DrawerButton = ({
|
|
|
1177
1201
|
color: buttonDrawer == null ? void 0 : buttonDrawer.color,
|
|
1178
1202
|
variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) === "contained" ? "filled" : "outlined",
|
|
1179
1203
|
label: (_a = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _a : "",
|
|
1180
|
-
icon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" && ButtonIcon ? /* @__PURE__ */
|
|
1181
|
-
deleteIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */
|
|
1204
|
+
icon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" && ButtonIcon ? /* @__PURE__ */ React8.createElement(ButtonIcon, { fontSize: "small" }) : void 0,
|
|
1205
|
+
deleteIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React8.createElement(ButtonIcon, { fontSize: "small" }) : void 0
|
|
1182
1206
|
}, (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? { onDelete: () => {
|
|
1183
1207
|
} } : {}), {
|
|
1184
1208
|
sx: {
|
|
@@ -1190,7 +1214,7 @@ var DrawerButton = ({
|
|
|
1190
1214
|
})
|
|
1191
1215
|
);
|
|
1192
1216
|
}
|
|
1193
|
-
return /* @__PURE__ */
|
|
1217
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1194
1218
|
Button5,
|
|
1195
1219
|
{
|
|
1196
1220
|
"data-testid": "test-buttonDrawer",
|
|
@@ -1199,15 +1223,15 @@ var DrawerButton = ({
|
|
|
1199
1223
|
onClick: onToggle,
|
|
1200
1224
|
size: "small",
|
|
1201
1225
|
variant: (_b = buttonDrawer == null ? void 0 : buttonDrawer.variant) != null ? _b : "text",
|
|
1202
|
-
startIcon: ((buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" || !(buttonDrawer == null ? void 0 : buttonDrawer.iconPosition)) && ButtonIcon ? /* @__PURE__ */
|
|
1203
|
-
endIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */
|
|
1226
|
+
startIcon: ((buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" || !(buttonDrawer == null ? void 0 : buttonDrawer.iconPosition)) && ButtonIcon ? /* @__PURE__ */ React8.createElement(ButtonIcon, { fontSize: "small" }) : null,
|
|
1227
|
+
endIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React8.createElement(ButtonIcon, { fontSize: "small" }) : null
|
|
1204
1228
|
},
|
|
1205
1229
|
(_c = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _c : ""
|
|
1206
1230
|
);
|
|
1207
1231
|
};
|
|
1208
1232
|
|
|
1209
1233
|
// src/Components/Drawer/components/ChipFiltersDisplay.tsx
|
|
1210
|
-
import
|
|
1234
|
+
import React9, { useRef as useRef2, useState as useState9, useEffect as useEffect6 } from "react";
|
|
1211
1235
|
import { Box as Box4, IconButton as IconButton4, Chip as Chip2 } from "@mui/material";
|
|
1212
1236
|
import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
|
|
1213
1237
|
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
|
|
@@ -1216,7 +1240,7 @@ var ChipFiltersDisplay = ({
|
|
|
1216
1240
|
onDeleteFilter
|
|
1217
1241
|
}) => {
|
|
1218
1242
|
const scrollRef = useRef2(null);
|
|
1219
|
-
const [hasOverflow, setHasOverflow] =
|
|
1243
|
+
const [hasOverflow, setHasOverflow] = useState9(false);
|
|
1220
1244
|
useEffect6(() => {
|
|
1221
1245
|
const el = scrollRef.current;
|
|
1222
1246
|
if (!el) return;
|
|
@@ -1231,7 +1255,7 @@ var ChipFiltersDisplay = ({
|
|
|
1231
1255
|
scrollRef.current.scrollLeft += offset;
|
|
1232
1256
|
}
|
|
1233
1257
|
};
|
|
1234
|
-
return /* @__PURE__ */
|
|
1258
|
+
return /* @__PURE__ */ React9.createElement(React9.Fragment, null, (textFilters == null ? void 0 : textFilters.length) > 0 && /* @__PURE__ */ React9.createElement(Box4, { display: "flex", alignItems: "center", sx: { maxWidth: "78%" } }, hasOverflow && /* @__PURE__ */ React9.createElement(IconButton4, { onClick: () => scroll(-150), size: "small" }, /* @__PURE__ */ React9.createElement(ChevronLeftIcon, { fontSize: "small", color: "action" })), /* @__PURE__ */ React9.createElement(
|
|
1235
1259
|
Box4,
|
|
1236
1260
|
{
|
|
1237
1261
|
ref: scrollRef,
|
|
@@ -1243,7 +1267,7 @@ var ChipFiltersDisplay = ({
|
|
|
1243
1267
|
"&::-webkit-scrollbar": { display: "none" }
|
|
1244
1268
|
}
|
|
1245
1269
|
},
|
|
1246
|
-
textFilters == null ? void 0 : textFilters.map((chipData, index) => /* @__PURE__ */
|
|
1270
|
+
textFilters == null ? void 0 : textFilters.map((chipData, index) => /* @__PURE__ */ React9.createElement(
|
|
1247
1271
|
Chip2,
|
|
1248
1272
|
__spreadProps(__spreadValues({
|
|
1249
1273
|
key: index,
|
|
@@ -1258,15 +1282,15 @@ var ChipFiltersDisplay = ({
|
|
|
1258
1282
|
}
|
|
1259
1283
|
})
|
|
1260
1284
|
))
|
|
1261
|
-
), hasOverflow && /* @__PURE__ */
|
|
1285
|
+
), hasOverflow && /* @__PURE__ */ React9.createElement(IconButton4, { onClick: () => scroll(150), size: "small" }, /* @__PURE__ */ React9.createElement(ChevronRightIcon, { fontSize: "small", color: "action" }))));
|
|
1262
1286
|
};
|
|
1263
1287
|
|
|
1264
1288
|
// src/Components/Drawer/components/DrawerContent.tsx
|
|
1265
|
-
import
|
|
1289
|
+
import React15 from "react";
|
|
1266
1290
|
import { Box as Box10, Stack as Stack5 } from "@mui/material";
|
|
1267
1291
|
|
|
1268
1292
|
// src/Components/Textfield/SCTextField.tsx
|
|
1269
|
-
import
|
|
1293
|
+
import React10, { useEffect as useEffect7, useState as useState10 } from "react";
|
|
1270
1294
|
import { FormControl, IconButton as IconButton5, InputAdornment, InputLabel, OutlinedInput, FilledInput, Popover, Input, Box as Box5, Typography as Typography4, SvgIcon as SvgIcon2, Tooltip as Tooltip2 } from "@mui/material";
|
|
1271
1295
|
import Grid from "@mui/material/Grid";
|
|
1272
1296
|
import { Visibility, VisibilityOff, InfoOutlined } from "@mui/icons-material";
|
|
@@ -1355,11 +1379,11 @@ var SCTextField = ({
|
|
|
1355
1379
|
let IconInputStart;
|
|
1356
1380
|
let IconInputEnd;
|
|
1357
1381
|
let IconTitle;
|
|
1358
|
-
const [showPassword, setShowPassword] =
|
|
1359
|
-
const [error, setError] =
|
|
1360
|
-
const [anchorInfoTitle, setAnchorInfoTitle] =
|
|
1382
|
+
const [showPassword, setShowPassword] = useState10(false);
|
|
1383
|
+
const [error, setError] = useState10(false);
|
|
1384
|
+
const [anchorInfoTitle, setAnchorInfoTitle] = useState10(null);
|
|
1361
1385
|
const openInfoTitle = Boolean(anchorInfoTitle);
|
|
1362
|
-
const [anchorInfoElement, setAnchorInfoElement] =
|
|
1386
|
+
const [anchorInfoElement, setAnchorInfoElement] = useState10(null);
|
|
1363
1387
|
const openInfoElement = Boolean(anchorInfoElement);
|
|
1364
1388
|
useEffect7(() => {
|
|
1365
1389
|
if (error) {
|
|
@@ -1411,7 +1435,7 @@ var SCTextField = ({
|
|
|
1411
1435
|
const handleCloseInfoElement = () => {
|
|
1412
1436
|
setAnchorInfoElement(null);
|
|
1413
1437
|
};
|
|
1414
|
-
return /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ React10.createElement(Box5, { sx: { width } }, /* @__PURE__ */ React10.createElement(Grid, { container: true, alignItems: "center", gap: 0.5 }, iconTitle && IconTitle ? /* @__PURE__ */ React10.createElement(SvgIcon2, { color: "action", fontSize: "small", component: IconTitle }) : "", title ? /* @__PURE__ */ React10.createElement(Typography4, { mx: 0.5, variant: "subtitle2", color: "text.secondary", sx: { marginBottom: "10px" } }, title) : "", infoTitle ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, infoTitle.component === "popover" ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
|
|
1415
1439
|
InfoOutlined,
|
|
1416
1440
|
{
|
|
1417
1441
|
color: "action",
|
|
@@ -1419,7 +1443,7 @@ var SCTextField = ({
|
|
|
1419
1443
|
onMouseEnter: (event2) => handleOpenInfoTitle(event2),
|
|
1420
1444
|
onMouseLeave: () => handleCloseInfoTitle()
|
|
1421
1445
|
}
|
|
1422
|
-
), /* @__PURE__ */
|
|
1446
|
+
), /* @__PURE__ */ React10.createElement(
|
|
1423
1447
|
Popover,
|
|
1424
1448
|
{
|
|
1425
1449
|
sx: {
|
|
@@ -1441,14 +1465,14 @@ var SCTextField = ({
|
|
|
1441
1465
|
},
|
|
1442
1466
|
disableRestoreFocus: true
|
|
1443
1467
|
},
|
|
1444
|
-
/* @__PURE__ */
|
|
1445
|
-
)) : /* @__PURE__ */
|
|
1468
|
+
/* @__PURE__ */ React10.createElement(Typography4, { p: 2 }, infoTitle.text)
|
|
1469
|
+
)) : /* @__PURE__ */ React10.createElement(Tooltip2, { title: infoTitle.text, "data-testid": "test-infoTitle", placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React10.createElement(
|
|
1446
1470
|
InfoOutlined,
|
|
1447
1471
|
{
|
|
1448
1472
|
color: "action",
|
|
1449
1473
|
fontSize: "small"
|
|
1450
1474
|
}
|
|
1451
|
-
))) : ""), /* @__PURE__ */
|
|
1475
|
+
))) : ""), /* @__PURE__ */ React10.createElement(Grid, { container: true, sx: { flexWrap: "nowrap", alignItems: "center" } }, /* @__PURE__ */ React10.createElement(
|
|
1452
1476
|
FormControl,
|
|
1453
1477
|
{
|
|
1454
1478
|
color,
|
|
@@ -1463,7 +1487,7 @@ var SCTextField = ({
|
|
|
1463
1487
|
}
|
|
1464
1488
|
}
|
|
1465
1489
|
},
|
|
1466
|
-
/* @__PURE__ */
|
|
1490
|
+
/* @__PURE__ */ React10.createElement(
|
|
1467
1491
|
InputLabel,
|
|
1468
1492
|
{
|
|
1469
1493
|
"data-testid": "test-label",
|
|
@@ -1480,7 +1504,7 @@ var SCTextField = ({
|
|
|
1480
1504
|
},
|
|
1481
1505
|
label ? label : ""
|
|
1482
1506
|
),
|
|
1483
|
-
/* @__PURE__ */
|
|
1507
|
+
/* @__PURE__ */ React10.createElement(
|
|
1484
1508
|
InputComponent,
|
|
1485
1509
|
{
|
|
1486
1510
|
size: size ? size : "medium",
|
|
@@ -1496,8 +1520,8 @@ var SCTextField = ({
|
|
|
1496
1520
|
type: !showPassword && format3 === "password" ? "password" : (format3 || "text").toUpperCase() === "INT" || (format3 || "text").toUpperCase() === "DECIMAL" ? "number" : "text",
|
|
1497
1521
|
className: format3 === "password" && !showPassword ? "" : "",
|
|
1498
1522
|
placeholder,
|
|
1499
|
-
startAdornment: iconInputStart ? /* @__PURE__ */
|
|
1500
|
-
endAdornment: /* @__PURE__ */
|
|
1523
|
+
startAdornment: iconInputStart ? /* @__PURE__ */ React10.createElement(InputAdornment, { position: "start" }, IconInputStartValidation === "text" ? iconInputStart : IconInputStart ? /* @__PURE__ */ React10.createElement(IconInputStart, { fontSize: "small" }) : null) : "",
|
|
1524
|
+
endAdornment: /* @__PURE__ */ React10.createElement(InputAdornment, { position: "end" }, format3 === "password" ? /* @__PURE__ */ React10.createElement(
|
|
1501
1525
|
IconButton5,
|
|
1502
1526
|
{
|
|
1503
1527
|
"aria-label": "toggle password visibility",
|
|
@@ -1505,8 +1529,8 @@ var SCTextField = ({
|
|
|
1505
1529
|
onMouseDown: handleMouseDownPassword,
|
|
1506
1530
|
edge: "end"
|
|
1507
1531
|
},
|
|
1508
|
-
showPassword ? /* @__PURE__ */
|
|
1509
|
-
) : iconInputEnd === void 0 && infoElement !== void 0 ? /* @__PURE__ */
|
|
1532
|
+
showPassword ? /* @__PURE__ */ React10.createElement(VisibilityOff, null) : /* @__PURE__ */ React10.createElement(Visibility, null)
|
|
1533
|
+
) : iconInputEnd === void 0 && infoElement !== void 0 ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
|
|
1510
1534
|
InfoOutlined,
|
|
1511
1535
|
{
|
|
1512
1536
|
"data-testid": "test-infoElement",
|
|
@@ -1517,7 +1541,7 @@ var SCTextField = ({
|
|
|
1517
1541
|
onMouseEnter: (event2) => handleOpenInfoElement(event2),
|
|
1518
1542
|
onMouseLeave: () => handleCloseInfoElement()
|
|
1519
1543
|
}
|
|
1520
|
-
), /* @__PURE__ */
|
|
1544
|
+
), /* @__PURE__ */ React10.createElement(
|
|
1521
1545
|
Popover,
|
|
1522
1546
|
{
|
|
1523
1547
|
sx: {
|
|
@@ -1539,19 +1563,19 @@ var SCTextField = ({
|
|
|
1539
1563
|
},
|
|
1540
1564
|
disableRestoreFocus: true
|
|
1541
1565
|
},
|
|
1542
|
-
/* @__PURE__ */
|
|
1543
|
-
)) : /* @__PURE__ */
|
|
1566
|
+
/* @__PURE__ */ React10.createElement(Typography4, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
|
|
1567
|
+
)) : /* @__PURE__ */ React10.createElement(Tooltip2, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React10.createElement(
|
|
1544
1568
|
InfoOutlined,
|
|
1545
1569
|
{
|
|
1546
1570
|
color: "action",
|
|
1547
1571
|
fontSize: "small"
|
|
1548
1572
|
}
|
|
1549
|
-
))) : iconInputEnd !== void 0 ? IconInputEndValidation === "text" ? iconInputEnd : IconInputEnd ? /* @__PURE__ */
|
|
1573
|
+
))) : iconInputEnd !== void 0 ? IconInputEndValidation === "text" ? iconInputEnd : IconInputEnd ? /* @__PURE__ */ React10.createElement(IconInputEnd, { fontSize: "small" }) : null : ""),
|
|
1550
1574
|
label: label ? label + (format3 === "password" && !showPassword ? "" : "") : "",
|
|
1551
1575
|
autoComplete: format3 === "password" ? "new-password" : "off"
|
|
1552
1576
|
}
|
|
1553
1577
|
)
|
|
1554
|
-
), (iconInputEnd !== void 0 || format3 === "password") && infoElement ? /* @__PURE__ */
|
|
1578
|
+
), (iconInputEnd !== void 0 || format3 === "password") && infoElement ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
|
|
1555
1579
|
InfoOutlined,
|
|
1556
1580
|
{
|
|
1557
1581
|
"data-testid": "test-infoElement",
|
|
@@ -1562,7 +1586,7 @@ var SCTextField = ({
|
|
|
1562
1586
|
onMouseEnter: (event2) => handleOpenInfoElement(event2),
|
|
1563
1587
|
onMouseLeave: handleCloseInfoElement
|
|
1564
1588
|
}
|
|
1565
|
-
), /* @__PURE__ */
|
|
1589
|
+
), /* @__PURE__ */ React10.createElement(
|
|
1566
1590
|
Popover,
|
|
1567
1591
|
{
|
|
1568
1592
|
sx: { pointerEvents: "none" },
|
|
@@ -1579,8 +1603,8 @@ var SCTextField = ({
|
|
|
1579
1603
|
},
|
|
1580
1604
|
disableRestoreFocus: true
|
|
1581
1605
|
},
|
|
1582
|
-
/* @__PURE__ */
|
|
1583
|
-
)) : /* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ React10.createElement(Typography4, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
|
|
1607
|
+
)) : /* @__PURE__ */ React10.createElement(Tooltip2, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React10.createElement(
|
|
1584
1608
|
InfoOutlined,
|
|
1585
1609
|
{
|
|
1586
1610
|
sx: { marginLeft: "4px" },
|
|
@@ -1600,7 +1624,7 @@ function getIcon2(name) {
|
|
|
1600
1624
|
}
|
|
1601
1625
|
|
|
1602
1626
|
// src/Components/TextArea/SCTextArea.tsx
|
|
1603
|
-
import
|
|
1627
|
+
import React11, { useEffect as useEffect8, useState as useState11 } from "react";
|
|
1604
1628
|
import { Typography as Typography5, Stack as Stack4, TextField, Box as Box6, Popover as Popover2, Tooltip as Tooltip3, SvgIcon as SvgIcon3, Grid as Grid2 } from "@mui/material";
|
|
1605
1629
|
import { InfoOutlined as InfoOutlined2 } from "@mui/icons-material";
|
|
1606
1630
|
var SCTextArea = ({
|
|
@@ -1624,9 +1648,9 @@ var SCTextArea = ({
|
|
|
1624
1648
|
state,
|
|
1625
1649
|
onBlur
|
|
1626
1650
|
}) => {
|
|
1627
|
-
const [helperCount, setHelperCount] =
|
|
1628
|
-
const [stateError, setStateError] =
|
|
1629
|
-
const [anchorInfoTitle, setAnchorInfoTitle] =
|
|
1651
|
+
const [helperCount, setHelperCount] = useState11(0);
|
|
1652
|
+
const [stateError, setStateError] = useState11(false);
|
|
1653
|
+
const [anchorInfoTitle, setAnchorInfoTitle] = React11.useState(null);
|
|
1630
1654
|
const openInfoTitle = Boolean(anchorInfoTitle);
|
|
1631
1655
|
useEffect8(() => {
|
|
1632
1656
|
setHelperCount(state == null ? void 0 : state.length);
|
|
@@ -1650,7 +1674,7 @@ var SCTextArea = ({
|
|
|
1650
1674
|
const handleCloseInfoTitle = () => {
|
|
1651
1675
|
setAnchorInfoTitle(null);
|
|
1652
1676
|
};
|
|
1653
|
-
return /* @__PURE__ */
|
|
1677
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(Box6, { sx: { width } }, /* @__PURE__ */ React11.createElement(Grid2, { container: true, sx: { alignItems: "center" }, gap: 0.5 }, iconTitle && IconTitle && /* @__PURE__ */ React11.createElement(SvgIcon3, { color: "action", fontSize: "small", component: IconTitle }), title && /* @__PURE__ */ React11.createElement(Typography5, { color: colorTitle || "text.secondary", variant: "subtitle2" }, title), infoTitle ? /* @__PURE__ */ React11.createElement(React11.Fragment, null, infoTitle.component === "popover" ? /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
|
|
1654
1678
|
InfoOutlined2,
|
|
1655
1679
|
{
|
|
1656
1680
|
color: "action",
|
|
@@ -1658,7 +1682,7 @@ var SCTextArea = ({
|
|
|
1658
1682
|
onMouseEnter: (event2) => handleOpenInfoTitle(event2),
|
|
1659
1683
|
onMouseLeave: () => handleCloseInfoTitle()
|
|
1660
1684
|
}
|
|
1661
|
-
), /* @__PURE__ */
|
|
1685
|
+
), /* @__PURE__ */ React11.createElement(
|
|
1662
1686
|
Popover2,
|
|
1663
1687
|
{
|
|
1664
1688
|
sx: { pointerEvents: "none" },
|
|
@@ -1675,14 +1699,14 @@ var SCTextArea = ({
|
|
|
1675
1699
|
},
|
|
1676
1700
|
disableRestoreFocus: true
|
|
1677
1701
|
},
|
|
1678
|
-
/* @__PURE__ */
|
|
1679
|
-
)) : /* @__PURE__ */
|
|
1702
|
+
/* @__PURE__ */ React11.createElement(Typography5, { sx: { p: 2 } }, infoTitle.text)
|
|
1703
|
+
)) : /* @__PURE__ */ React11.createElement(Tooltip3, { title: infoTitle.text, placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React11.createElement(
|
|
1680
1704
|
InfoOutlined2,
|
|
1681
1705
|
{
|
|
1682
1706
|
color: "action",
|
|
1683
1707
|
fontSize: "small"
|
|
1684
1708
|
}
|
|
1685
|
-
))) : ""), /* @__PURE__ */
|
|
1709
|
+
))) : ""), /* @__PURE__ */ React11.createElement(Stack4, null, /* @__PURE__ */ React11.createElement(
|
|
1686
1710
|
TextField,
|
|
1687
1711
|
{
|
|
1688
1712
|
required,
|
|
@@ -1707,7 +1731,7 @@ var SCTextArea = ({
|
|
|
1707
1731
|
shrink: true
|
|
1708
1732
|
}
|
|
1709
1733
|
}
|
|
1710
|
-
)), /* @__PURE__ */
|
|
1734
|
+
)), /* @__PURE__ */ React11.createElement(Stack4, null, /* @__PURE__ */ React11.createElement(
|
|
1711
1735
|
Typography5,
|
|
1712
1736
|
{
|
|
1713
1737
|
variant: "caption",
|
|
@@ -1721,7 +1745,7 @@ var SCTextArea = ({
|
|
|
1721
1745
|
};
|
|
1722
1746
|
|
|
1723
1747
|
// src/Components/SCSelect.tsx
|
|
1724
|
-
import
|
|
1748
|
+
import React12, { useEffect as useEffect9 } from "react";
|
|
1725
1749
|
import { InputLabel as InputLabel2, FormControl as FormControl2, MenuItem, SvgIcon as SvgIcon4, ListItemIcon, ListItemText, Box as Box7 } from "@mui/material";
|
|
1726
1750
|
import Select from "@mui/material/Select";
|
|
1727
1751
|
import * as Muicon4 from "@mui/icons-material";
|
|
@@ -1739,8 +1763,10 @@ function SCSelect({
|
|
|
1739
1763
|
state
|
|
1740
1764
|
}) {
|
|
1741
1765
|
const labelContent = `<span style="color: red;">* </span>` + label;
|
|
1742
|
-
const [prevData, setPrevData] =
|
|
1743
|
-
const [error, setError] =
|
|
1766
|
+
const [prevData, setPrevData] = React12.useState(data);
|
|
1767
|
+
const [error, setError] = React12.useState(false);
|
|
1768
|
+
const [placement, setPlacement] = React12.useState("bottom");
|
|
1769
|
+
const containerRef = React12.useRef(null);
|
|
1744
1770
|
useEffect9(() => {
|
|
1745
1771
|
if (error) {
|
|
1746
1772
|
setTimeout(() => {
|
|
@@ -1769,6 +1795,14 @@ function SCSelect({
|
|
|
1769
1795
|
const isError = !currentValue && !!required;
|
|
1770
1796
|
setError(Boolean(isError));
|
|
1771
1797
|
};
|
|
1798
|
+
const handleOpen = () => {
|
|
1799
|
+
if (containerRef.current) {
|
|
1800
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
1801
|
+
const spaceBelow = window.innerHeight - rect.bottom;
|
|
1802
|
+
const estimatedMenuHeight = Math.min(300, data.length * 36 + 16);
|
|
1803
|
+
setPlacement(spaceBelow < estimatedMenuHeight ? "top" : "bottom");
|
|
1804
|
+
}
|
|
1805
|
+
};
|
|
1772
1806
|
const handleChange = (event2) => {
|
|
1773
1807
|
const selectedValue = event2.target.value;
|
|
1774
1808
|
if (selectedValue) {
|
|
@@ -1782,7 +1816,7 @@ function SCSelect({
|
|
|
1782
1816
|
}
|
|
1783
1817
|
}
|
|
1784
1818
|
};
|
|
1785
|
-
return /* @__PURE__ */
|
|
1819
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, data && /* @__PURE__ */ React12.createElement(Box7, { ref: containerRef, sx: { width } }, /* @__PURE__ */ React12.createElement(
|
|
1786
1820
|
FormControl2,
|
|
1787
1821
|
{
|
|
1788
1822
|
fullWidth: true,
|
|
@@ -1790,20 +1824,21 @@ function SCSelect({
|
|
|
1790
1824
|
variant,
|
|
1791
1825
|
sx: { background: background ? background : "transparent" }
|
|
1792
1826
|
},
|
|
1793
|
-
/* @__PURE__ */
|
|
1827
|
+
/* @__PURE__ */ React12.createElement(
|
|
1794
1828
|
InputLabel2,
|
|
1795
1829
|
{
|
|
1796
1830
|
error
|
|
1797
1831
|
},
|
|
1798
|
-
required ? /* @__PURE__ */
|
|
1832
|
+
required ? /* @__PURE__ */ React12.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label
|
|
1799
1833
|
),
|
|
1800
|
-
/* @__PURE__ */
|
|
1834
|
+
/* @__PURE__ */ React12.createElement(
|
|
1801
1835
|
Select,
|
|
1802
1836
|
{
|
|
1803
1837
|
value: Array.isArray(state.hiddenValue) ? state.hiddenValue[0] || "" : state.hiddenValue != "-1" ? state.hiddenValue : "",
|
|
1804
|
-
label: required ? /* @__PURE__ */
|
|
1838
|
+
label: required ? /* @__PURE__ */ React12.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
|
|
1805
1839
|
onChange: handleChange,
|
|
1806
1840
|
onBlur: handleBlur,
|
|
1841
|
+
onOpen: handleOpen,
|
|
1807
1842
|
variant,
|
|
1808
1843
|
disabled: disabled || false,
|
|
1809
1844
|
error,
|
|
@@ -1811,7 +1846,6 @@ function SCSelect({
|
|
|
1811
1846
|
MenuProps: {
|
|
1812
1847
|
sx: {
|
|
1813
1848
|
zIndex: 1400
|
|
1814
|
-
// muy alto para que quede encima
|
|
1815
1849
|
},
|
|
1816
1850
|
PaperProps: {
|
|
1817
1851
|
sx: {
|
|
@@ -1820,11 +1854,11 @@ function SCSelect({
|
|
|
1820
1854
|
}
|
|
1821
1855
|
},
|
|
1822
1856
|
anchorOrigin: {
|
|
1823
|
-
vertical:
|
|
1857
|
+
vertical: placement,
|
|
1824
1858
|
horizontal: "left"
|
|
1825
1859
|
},
|
|
1826
1860
|
transformOrigin: {
|
|
1827
|
-
vertical: "top",
|
|
1861
|
+
vertical: placement === "bottom" ? "top" : "bottom",
|
|
1828
1862
|
horizontal: "left"
|
|
1829
1863
|
},
|
|
1830
1864
|
disableAutoFocusItem: true,
|
|
@@ -1832,19 +1866,19 @@ function SCSelect({
|
|
|
1832
1866
|
}
|
|
1833
1867
|
},
|
|
1834
1868
|
data.map((option, index) => {
|
|
1835
|
-
return /* @__PURE__ */
|
|
1869
|
+
return /* @__PURE__ */ React12.createElement(MenuItem, { key: index, value: getItemValue(option).value }, getItemValue(option).icon != void 0 ? /* @__PURE__ */ React12.createElement(ListItemIcon, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ React12.createElement(SvgIcon4, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "", /* @__PURE__ */ React12.createElement(ListItemText, { primary: getItemValue(option).text, color: "text.primary" }));
|
|
1836
1870
|
})
|
|
1837
1871
|
)
|
|
1838
1872
|
)));
|
|
1839
1873
|
}
|
|
1840
1874
|
|
|
1841
1875
|
// src/Components/SCAutocomplete.tsx
|
|
1842
|
-
import
|
|
1876
|
+
import React13, { useEffect as useEffect10, useMemo as useMemo3 } from "react";
|
|
1843
1877
|
import { Autocomplete, Checkbox, InputAdornment as InputAdornment3, MenuItem as MenuItem2, TextField as TextField3, Avatar, Typography as Typography7, SvgIcon as SvgIcon5, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2, Divider as Divider3, FormControlLabel as FormControlLabel2, IconButton as IconButton7, Chip as Chip3, Box as Box8, Button as Button7, Grid as Grid3, Popper, Paper } from "@mui/material";
|
|
1844
1878
|
import { Search, Clear } from "@mui/icons-material";
|
|
1845
1879
|
import * as Muicon5 from "@mui/icons-material";
|
|
1846
1880
|
var StopEvent = ({ children }) => {
|
|
1847
|
-
return /* @__PURE__ */
|
|
1881
|
+
return /* @__PURE__ */ React13.createElement(
|
|
1848
1882
|
Box8,
|
|
1849
1883
|
{
|
|
1850
1884
|
onMouseDown: (e) => {
|
|
@@ -1883,11 +1917,11 @@ function SCAutocomplete({
|
|
|
1883
1917
|
const labelContent = `<span style="color: red;">* </span>` + label;
|
|
1884
1918
|
let group = "";
|
|
1885
1919
|
let isSelected = false;
|
|
1886
|
-
const [selectedOptions, setSelectedOptions] =
|
|
1887
|
-
const [prevData, setPrevData] =
|
|
1888
|
-
const [originalData, setOriginalData] =
|
|
1889
|
-
const [inputValue, setInputValue] =
|
|
1890
|
-
const [isUserTyping, setIsUserTyping] =
|
|
1920
|
+
const [selectedOptions, setSelectedOptions] = React13.useState([]);
|
|
1921
|
+
const [prevData, setPrevData] = React13.useState(data);
|
|
1922
|
+
const [originalData, setOriginalData] = React13.useState(data);
|
|
1923
|
+
const [inputValue, setInputValue] = React13.useState("");
|
|
1924
|
+
const [isUserTyping, setIsUserTyping] = React13.useState(false);
|
|
1891
1925
|
useEffect10(() => {
|
|
1892
1926
|
const dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
|
|
1893
1927
|
if (!dataChangeValidation && !isUserTyping) {
|
|
@@ -1978,15 +2012,15 @@ function SCAutocomplete({
|
|
|
1978
2012
|
const selectedValue = typeFormat === "multiselect" ? selectedOptions : originalData.find(
|
|
1979
2013
|
(item) => getItemValue(item).value === state.hiddenValue
|
|
1980
2014
|
) || null;
|
|
1981
|
-
const [open, setOpen] =
|
|
1982
|
-
const componentClickActiveRef =
|
|
1983
|
-
const listboxScrollRef =
|
|
1984
|
-
const containerRef =
|
|
1985
|
-
const [chipLimit, setChipLimit] =
|
|
1986
|
-
const outsideChipsMeasureRef =
|
|
1987
|
-
const [visibleChipCount, setVisibleChipCount] =
|
|
1988
|
-
const [popoverAnchor, setPopoverAnchor] =
|
|
1989
|
-
const popoverTimerRef =
|
|
2015
|
+
const [open, setOpen] = React13.useState(false);
|
|
2016
|
+
const componentClickActiveRef = React13.useRef(false);
|
|
2017
|
+
const listboxScrollRef = React13.useRef(null);
|
|
2018
|
+
const containerRef = React13.useRef(null);
|
|
2019
|
+
const [chipLimit, setChipLimit] = React13.useState(2);
|
|
2020
|
+
const outsideChipsMeasureRef = React13.useRef(null);
|
|
2021
|
+
const [visibleChipCount, setVisibleChipCount] = React13.useState(Number.MAX_SAFE_INTEGER);
|
|
2022
|
+
const [popoverAnchor, setPopoverAnchor] = React13.useState(null);
|
|
2023
|
+
const popoverTimerRef = React13.useRef(null);
|
|
1990
2024
|
useEffect10(() => {
|
|
1991
2025
|
const el = containerRef.current;
|
|
1992
2026
|
if (!el) return;
|
|
@@ -2048,7 +2082,7 @@ function SCAutocomplete({
|
|
|
2048
2082
|
return Boolean(item.onComponentClick);
|
|
2049
2083
|
});
|
|
2050
2084
|
}, [data, getItemValue]);
|
|
2051
|
-
return /* @__PURE__ */
|
|
2085
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, data && /* @__PURE__ */ React13.createElement(Box8, { ref: containerRef, sx: { width } }, /* @__PURE__ */ React13.createElement(
|
|
2052
2086
|
Autocomplete,
|
|
2053
2087
|
__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, hayOnComponentClickGlobal ? { disableCloseOnSelect: true } : {}), hayOnComponentClickGlobal ? { blurOnSelect: false } : {}), hayOnComponentClickGlobal ? { open } : {}), hayOnComponentClickGlobal ? { onOpen: () => setOpen(true) } : {}), hayOnComponentClickGlobal ? {
|
|
2054
2088
|
onClose: (event2, reason) => {
|
|
@@ -2081,9 +2115,9 @@ function SCAutocomplete({
|
|
|
2081
2115
|
limitTags: chipLimit,
|
|
2082
2116
|
renderTags: chipOutside ? () => null : (value, getTagProps) => {
|
|
2083
2117
|
const limit = chipLimit;
|
|
2084
|
-
return /* @__PURE__ */
|
|
2118
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, value.slice(0, limit).map((option, index) => {
|
|
2085
2119
|
const _a = getTagProps({ index }), { key } = _a, chipProps = __objRest(_a, ["key"]);
|
|
2086
|
-
return /* @__PURE__ */
|
|
2120
|
+
return /* @__PURE__ */ React13.createElement(
|
|
2087
2121
|
Chip3,
|
|
2088
2122
|
__spreadProps(__spreadValues({
|
|
2089
2123
|
key,
|
|
@@ -2095,7 +2129,7 @@ function SCAutocomplete({
|
|
|
2095
2129
|
style: { maxWidth: 120, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
2096
2130
|
})
|
|
2097
2131
|
);
|
|
2098
|
-
}), value.length > limit && /* @__PURE__ */
|
|
2132
|
+
}), value.length > limit && /* @__PURE__ */ React13.createElement(Box8, { sx: { ml: 0.5, fontSize: 13, color: "#666", display: "flex", alignItems: "center" } }, `+${value.length - limit}`));
|
|
2099
2133
|
},
|
|
2100
2134
|
renderOption: (props, option) => {
|
|
2101
2135
|
const _a = props, { key } = _a, optionProps = __objRest(_a, ["key"]);
|
|
@@ -2114,7 +2148,7 @@ function SCAutocomplete({
|
|
|
2114
2148
|
group = option[columnGroup];
|
|
2115
2149
|
}
|
|
2116
2150
|
const item = getItemValue(option);
|
|
2117
|
-
return /* @__PURE__ */
|
|
2151
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(React13.Fragment, { key }, columnGroup ? !isValid ? /* @__PURE__ */ React13.createElement(Typography7, { color: "text.secondary", sx: { margin: "7px 16px !important", fontSize: "13px !important" } }, option[columnGroup]) : "" : "", /* @__PURE__ */ React13.createElement(
|
|
2118
2152
|
MenuItem2,
|
|
2119
2153
|
__spreadProps(__spreadValues({}, optionProps), {
|
|
2120
2154
|
component: "li",
|
|
@@ -2125,8 +2159,8 @@ function SCAutocomplete({
|
|
|
2125
2159
|
opacity: isDisabled ? 0.5 : 1
|
|
2126
2160
|
}
|
|
2127
2161
|
}),
|
|
2128
|
-
typeFormat != "multiselect" && getItemValue(option).icon != void 0 ? /* @__PURE__ */
|
|
2129
|
-
typeFormat == "multiselect" ? /* @__PURE__ */
|
|
2162
|
+
typeFormat != "multiselect" && getItemValue(option).icon != void 0 ? /* @__PURE__ */ React13.createElement(ListItemIcon2, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ React13.createElement(SvgIcon5, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "",
|
|
2163
|
+
typeFormat == "multiselect" ? /* @__PURE__ */ React13.createElement(
|
|
2130
2164
|
Checkbox,
|
|
2131
2165
|
{
|
|
2132
2166
|
checked: isSelected,
|
|
@@ -2135,8 +2169,8 @@ function SCAutocomplete({
|
|
|
2135
2169
|
color: "primary"
|
|
2136
2170
|
}
|
|
2137
2171
|
) : "",
|
|
2138
|
-
/* @__PURE__ */
|
|
2139
|
-
item.component != null ? /* @__PURE__ */
|
|
2172
|
+
/* @__PURE__ */ React13.createElement(ListItemText2, { primary: getItemValue(option).text, color: "text.primary" }),
|
|
2173
|
+
item.component != null ? /* @__PURE__ */ React13.createElement(StopEvent, null, /* @__PURE__ */ React13.createElement(
|
|
2140
2174
|
"span",
|
|
2141
2175
|
{
|
|
2142
2176
|
onMouseDown: (event2) => {
|
|
@@ -2167,7 +2201,7 @@ function SCAutocomplete({
|
|
|
2167
2201
|
)) : null
|
|
2168
2202
|
)));
|
|
2169
2203
|
},
|
|
2170
|
-
renderInput: (params) => /* @__PURE__ */
|
|
2204
|
+
renderInput: (params) => /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
|
|
2171
2205
|
TextField3,
|
|
2172
2206
|
__spreadProps(__spreadValues({
|
|
2173
2207
|
sx: {
|
|
@@ -2179,10 +2213,10 @@ function SCAutocomplete({
|
|
|
2179
2213
|
}
|
|
2180
2214
|
}
|
|
2181
2215
|
}, params), {
|
|
2182
|
-
label: required ? /* @__PURE__ */
|
|
2216
|
+
label: required ? /* @__PURE__ */ React13.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
|
|
2183
2217
|
placeholder: selectedOptions.length == 0 ? "B\xFAsqueda" : "",
|
|
2184
2218
|
InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
|
|
2185
|
-
endAdornment: /* @__PURE__ */
|
|
2219
|
+
endAdornment: /* @__PURE__ */ React13.createElement(React13.Fragment, null, deleteType == "icon" && (state.hiddenValue.toString() != "-1" && state.hiddenValue.toString() != "") ? /* @__PURE__ */ React13.createElement(IconButton7, { size: "small", onClick: cleanOptions, sx: { marginLeft: "auto", textAlign: "right", padding: "0px" } }, /* @__PURE__ */ React13.createElement(Clear, { fontSize: "small" })) : "", /* @__PURE__ */ React13.createElement(InputAdornment3, { style: { zIndex: 1, position: "relative" }, position: "end" }, /* @__PURE__ */ React13.createElement(Search, { fontSize: "small", color: "action", style: { cursor: "pointer" } })))
|
|
2186
2220
|
})
|
|
2187
2221
|
})
|
|
2188
2222
|
)),
|
|
@@ -2194,8 +2228,8 @@ function SCAutocomplete({
|
|
|
2194
2228
|
}
|
|
2195
2229
|
},
|
|
2196
2230
|
listbox: {
|
|
2197
|
-
component:
|
|
2198
|
-
return /* @__PURE__ */
|
|
2231
|
+
component: React13.forwardRef(function ListboxComponent(props, ref) {
|
|
2232
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
|
|
2199
2233
|
Box8,
|
|
2200
2234
|
__spreadProps(__spreadValues({
|
|
2201
2235
|
ref: (node) => {
|
|
@@ -2210,9 +2244,9 @@ function SCAutocomplete({
|
|
|
2210
2244
|
backgroundColor: "white"
|
|
2211
2245
|
}, props.sx)
|
|
2212
2246
|
}),
|
|
2213
|
-
checkMassive && typeFormat == "multiselect" ? /* @__PURE__ */
|
|
2247
|
+
checkMassive && typeFormat == "multiselect" ? /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(FormControlLabel2, { control: /* @__PURE__ */ React13.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__ */ React13.createElement(Divider3, null)) : "",
|
|
2214
2248
|
props.children,
|
|
2215
|
-
deleteType == "button" || fnAplicar ? /* @__PURE__ */
|
|
2249
|
+
deleteType == "button" || fnAplicar ? /* @__PURE__ */ React13.createElement(
|
|
2216
2250
|
Grid3,
|
|
2217
2251
|
{
|
|
2218
2252
|
container: true,
|
|
@@ -2227,7 +2261,7 @@ function SCAutocomplete({
|
|
|
2227
2261
|
justifyContent: "space-between"
|
|
2228
2262
|
}
|
|
2229
2263
|
},
|
|
2230
|
-
deleteType == "button" ? /* @__PURE__ */
|
|
2264
|
+
deleteType == "button" ? /* @__PURE__ */ React13.createElement(
|
|
2231
2265
|
Button7,
|
|
2232
2266
|
{
|
|
2233
2267
|
variant: "text",
|
|
@@ -2241,7 +2275,7 @@ function SCAutocomplete({
|
|
|
2241
2275
|
},
|
|
2242
2276
|
"Limpiar"
|
|
2243
2277
|
) : "",
|
|
2244
|
-
fnAplicar && /* @__PURE__ */
|
|
2278
|
+
fnAplicar && /* @__PURE__ */ React13.createElement(
|
|
2245
2279
|
Button7,
|
|
2246
2280
|
{
|
|
2247
2281
|
variant: "contained",
|
|
@@ -2260,7 +2294,7 @@ function SCAutocomplete({
|
|
|
2260
2294
|
), chipOutside && typeFormat === "multiselect" && selectedOptions.length > 0 && (() => {
|
|
2261
2295
|
const displayCount = Math.min(visibleChipCount, selectedOptions.length);
|
|
2262
2296
|
const hiddenCount = selectedOptions.length - displayCount;
|
|
2263
|
-
return /* @__PURE__ */
|
|
2297
|
+
return /* @__PURE__ */ React13.createElement(Box8, { sx: { position: "relative", mt: 0.5 } }, /* @__PURE__ */ React13.createElement(
|
|
2264
2298
|
Box8,
|
|
2265
2299
|
{
|
|
2266
2300
|
ref: outsideChipsMeasureRef,
|
|
@@ -2279,17 +2313,17 @@ function SCAutocomplete({
|
|
|
2279
2313
|
},
|
|
2280
2314
|
selectedOptions.map((option) => {
|
|
2281
2315
|
const avatarText = resolveAvatarText(option);
|
|
2282
|
-
return /* @__PURE__ */
|
|
2316
|
+
return /* @__PURE__ */ React13.createElement("div", { key: getItemValue(option).value, "data-outside-chip": true, style: { display: "inline-flex" } }, /* @__PURE__ */ React13.createElement(
|
|
2283
2317
|
Chip3,
|
|
2284
2318
|
__spreadValues({
|
|
2285
2319
|
size: "medium",
|
|
2286
2320
|
label: getItemValue(option).text
|
|
2287
|
-
}, chipOutside.type === "avatar" ? { avatar: /* @__PURE__ */
|
|
2321
|
+
}, chipOutside.type === "avatar" ? { avatar: /* @__PURE__ */ React13.createElement(Avatar, null, avatarText) } : {})
|
|
2288
2322
|
));
|
|
2289
2323
|
})
|
|
2290
|
-
), /* @__PURE__ */
|
|
2324
|
+
), /* @__PURE__ */ React13.createElement(Box8, { sx: { display: "flex", flexWrap: "wrap", gap: 0.5, maxHeight: 36, overflow: "hidden" } }, selectedOptions.slice(0, displayCount).map((option) => {
|
|
2291
2325
|
const avatarText = resolveAvatarText(option);
|
|
2292
|
-
return /* @__PURE__ */
|
|
2326
|
+
return /* @__PURE__ */ React13.createElement(
|
|
2293
2327
|
Chip3,
|
|
2294
2328
|
__spreadValues({
|
|
2295
2329
|
key: getItemValue(option).value,
|
|
@@ -2298,9 +2332,9 @@ function SCAutocomplete({
|
|
|
2298
2332
|
variant: "filled",
|
|
2299
2333
|
label: getItemValue(option).text,
|
|
2300
2334
|
onDelete: () => handleDeleteChip(option)
|
|
2301
|
-
}, chipOutside.type === "avatar" ? { avatar: /* @__PURE__ */
|
|
2335
|
+
}, chipOutside.type === "avatar" ? { avatar: /* @__PURE__ */ React13.createElement(Avatar, null, avatarText) } : {})
|
|
2302
2336
|
);
|
|
2303
|
-
}), hiddenCount > 0 && /* @__PURE__ */
|
|
2337
|
+
}), hiddenCount > 0 && /* @__PURE__ */ React13.createElement(
|
|
2304
2338
|
Box8,
|
|
2305
2339
|
{
|
|
2306
2340
|
onMouseEnter: handlePlusEnter,
|
|
@@ -2308,7 +2342,7 @@ function SCAutocomplete({
|
|
|
2308
2342
|
sx: { ml: 0.5, fontSize: 13, color: "#666", display: "flex", alignItems: "center", cursor: "default" }
|
|
2309
2343
|
},
|
|
2310
2344
|
`+${hiddenCount}`
|
|
2311
|
-
)), /* @__PURE__ */
|
|
2345
|
+
)), /* @__PURE__ */ React13.createElement(
|
|
2312
2346
|
Popper,
|
|
2313
2347
|
{
|
|
2314
2348
|
open: Boolean(popoverAnchor),
|
|
@@ -2316,7 +2350,7 @@ function SCAutocomplete({
|
|
|
2316
2350
|
placement: "bottom-start",
|
|
2317
2351
|
sx: { zIndex: 1500 }
|
|
2318
2352
|
},
|
|
2319
|
-
/* @__PURE__ */
|
|
2353
|
+
/* @__PURE__ */ React13.createElement(
|
|
2320
2354
|
Paper,
|
|
2321
2355
|
{
|
|
2322
2356
|
elevation: 3,
|
|
@@ -2326,7 +2360,7 @@ function SCAutocomplete({
|
|
|
2326
2360
|
},
|
|
2327
2361
|
selectedOptions.slice(displayCount).map((option) => {
|
|
2328
2362
|
const avatarText = resolveAvatarText(option);
|
|
2329
|
-
return /* @__PURE__ */
|
|
2363
|
+
return /* @__PURE__ */ React13.createElement(
|
|
2330
2364
|
Chip3,
|
|
2331
2365
|
__spreadValues({
|
|
2332
2366
|
key: getItemValue(option).value,
|
|
@@ -2335,7 +2369,7 @@ function SCAutocomplete({
|
|
|
2335
2369
|
variant: "filled",
|
|
2336
2370
|
label: getItemValue(option).text,
|
|
2337
2371
|
onDelete: () => handleDeleteChip(option)
|
|
2338
|
-
}, chipOutside.type === "avatar" ? { avatar: /* @__PURE__ */
|
|
2372
|
+
}, chipOutside.type === "avatar" ? { avatar: /* @__PURE__ */ React13.createElement(Avatar, { sx: { fontSize: avatarText.length > 1 ? "0.55rem" : "0.75rem" } }, avatarText) } : {})
|
|
2339
2373
|
);
|
|
2340
2374
|
})
|
|
2341
2375
|
)
|
|
@@ -2344,7 +2378,7 @@ function SCAutocomplete({
|
|
|
2344
2378
|
}
|
|
2345
2379
|
|
|
2346
2380
|
// src/Components/SCDateRange.tsx
|
|
2347
|
-
import
|
|
2381
|
+
import React14 from "react";
|
|
2348
2382
|
import { Box as Box9, InputAdornment as InputAdornment4 } from "@mui/material";
|
|
2349
2383
|
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
|
|
2350
2384
|
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
@@ -2369,7 +2403,7 @@ var SCDateRange = ({
|
|
|
2369
2403
|
const isStartEmpty = required && !state[0];
|
|
2370
2404
|
const isEndEmpty = required && !state[1];
|
|
2371
2405
|
const hasError = isStartEmpty || isEndEmpty;
|
|
2372
|
-
const [notification, setNotification] =
|
|
2406
|
+
const [notification, setNotification] = React14.useState(false);
|
|
2373
2407
|
const handleDateChange = (newValue) => {
|
|
2374
2408
|
const minDateDayjs = dayjs("2013-01-01");
|
|
2375
2409
|
const convertedValue = [
|
|
@@ -2413,7 +2447,7 @@ var SCDateRange = ({
|
|
|
2413
2447
|
setState(convertedValue);
|
|
2414
2448
|
}
|
|
2415
2449
|
};
|
|
2416
|
-
return /* @__PURE__ */
|
|
2450
|
+
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ React14.createElement(Box9, { sx: { width: "100%" } }, /* @__PURE__ */ React14.createElement(
|
|
2417
2451
|
DateRangePicker,
|
|
2418
2452
|
{
|
|
2419
2453
|
value: state,
|
|
@@ -2437,7 +2471,7 @@ var SCDateRange = ({
|
|
|
2437
2471
|
required,
|
|
2438
2472
|
error: isStart ? isStartEmpty : isEndEmpty,
|
|
2439
2473
|
InputProps: {
|
|
2440
|
-
endAdornment: /* @__PURE__ */
|
|
2474
|
+
endAdornment: /* @__PURE__ */ React14.createElement(InputAdornment4, { position: "end" }, /* @__PURE__ */ React14.createElement(
|
|
2441
2475
|
InsertInvitationOutlinedIcon,
|
|
2442
2476
|
{
|
|
2443
2477
|
color: hasError ? "error" : "action",
|
|
@@ -2473,11 +2507,11 @@ var DrawerContent = ({ arrayElements }) => {
|
|
|
2473
2507
|
var _a, _b, _c, _d, _e, _f;
|
|
2474
2508
|
const key = `Stack_${(_a = arrayElement.type) != null ? _a : ""} ${(_b = arrayElement.label) != null ? _b : ""}${index}`;
|
|
2475
2509
|
if (arrayElement.component) {
|
|
2476
|
-
return /* @__PURE__ */
|
|
2510
|
+
return /* @__PURE__ */ React15.createElement(Stack5, { direction: "row", alignItems: "left", gap: 1 }, arrayElement.component);
|
|
2477
2511
|
}
|
|
2478
2512
|
switch (arrayElement.type) {
|
|
2479
2513
|
case "textField":
|
|
2480
|
-
return /* @__PURE__ */
|
|
2514
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2481
2515
|
SCTextField,
|
|
2482
2516
|
{
|
|
2483
2517
|
title: arrayElement.title,
|
|
@@ -2505,7 +2539,7 @@ var DrawerContent = ({ arrayElements }) => {
|
|
|
2505
2539
|
}
|
|
2506
2540
|
);
|
|
2507
2541
|
case "textArea":
|
|
2508
|
-
return /* @__PURE__ */
|
|
2542
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2509
2543
|
SCTextArea,
|
|
2510
2544
|
{
|
|
2511
2545
|
title: arrayElement.title,
|
|
@@ -2526,7 +2560,7 @@ var DrawerContent = ({ arrayElements }) => {
|
|
|
2526
2560
|
}
|
|
2527
2561
|
);
|
|
2528
2562
|
case "autocomplete":
|
|
2529
|
-
return /* @__PURE__ */
|
|
2563
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2530
2564
|
SCAutocomplete,
|
|
2531
2565
|
{
|
|
2532
2566
|
label: arrayElement.label,
|
|
@@ -2546,7 +2580,7 @@ var DrawerContent = ({ arrayElements }) => {
|
|
|
2546
2580
|
}
|
|
2547
2581
|
);
|
|
2548
2582
|
case "select":
|
|
2549
|
-
return /* @__PURE__ */
|
|
2583
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2550
2584
|
SCSelect,
|
|
2551
2585
|
{
|
|
2552
2586
|
label: arrayElement.label,
|
|
@@ -2564,7 +2598,7 @@ var DrawerContent = ({ arrayElements }) => {
|
|
|
2564
2598
|
}
|
|
2565
2599
|
);
|
|
2566
2600
|
case "dateRange":
|
|
2567
|
-
return /* @__PURE__ */
|
|
2601
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2568
2602
|
SCDateRange,
|
|
2569
2603
|
{
|
|
2570
2604
|
labelDateInitial: arrayElement.labelDateInitial,
|
|
@@ -2580,9 +2614,9 @@ var DrawerContent = ({ arrayElements }) => {
|
|
|
2580
2614
|
return null;
|
|
2581
2615
|
}
|
|
2582
2616
|
};
|
|
2583
|
-
return /* @__PURE__ */
|
|
2617
|
+
return /* @__PURE__ */ React15.createElement(Stack5, { alignItems: "flex-start", height: "100%", gap: "16px", flex: 1, overflow: "auto", padding: "16px" }, arrayElements == null ? void 0 : arrayElements.map((arrayElement, index) => {
|
|
2584
2618
|
var _a, _b;
|
|
2585
|
-
return /* @__PURE__ */
|
|
2619
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2586
2620
|
Box10,
|
|
2587
2621
|
{
|
|
2588
2622
|
key: `Stack_${(_a = arrayElement.type) != null ? _a : ""} ${(_b = arrayElement.label) != null ? _b : ""}${index}`,
|
|
@@ -2594,7 +2628,7 @@ var DrawerContent = ({ arrayElements }) => {
|
|
|
2594
2628
|
};
|
|
2595
2629
|
|
|
2596
2630
|
// src/Components/Drawer/components/DrawerActions.tsx
|
|
2597
|
-
import
|
|
2631
|
+
import React16 from "react";
|
|
2598
2632
|
import { Button as Button8 } from "@mui/material";
|
|
2599
2633
|
import Grid4 from "@mui/material/Grid";
|
|
2600
2634
|
var DrawerActions = ({ actions, anchor }) => {
|
|
@@ -2604,7 +2638,7 @@ var DrawerActions = ({ actions, anchor }) => {
|
|
|
2604
2638
|
if (!Array.isArray(actions) || actions.length === 0) {
|
|
2605
2639
|
return null;
|
|
2606
2640
|
}
|
|
2607
|
-
return /* @__PURE__ */
|
|
2641
|
+
return /* @__PURE__ */ React16.createElement(
|
|
2608
2642
|
Grid4,
|
|
2609
2643
|
{
|
|
2610
2644
|
sx: { borderTop: 1, borderColor: "#1018403B", zIndex: 1500 },
|
|
@@ -2617,7 +2651,7 @@ var DrawerActions = ({ actions, anchor }) => {
|
|
|
2617
2651
|
justifyContent: actions.length > 1 ? "space-between" : "flex-start",
|
|
2618
2652
|
flexDirection: "row-reverse"
|
|
2619
2653
|
},
|
|
2620
|
-
actions.map((btn, index) => /* @__PURE__ */
|
|
2654
|
+
actions.map((btn, index) => /* @__PURE__ */ React16.createElement(
|
|
2621
2655
|
Button8,
|
|
2622
2656
|
{
|
|
2623
2657
|
key: index,
|
|
@@ -2634,7 +2668,7 @@ var DrawerActions = ({ actions, anchor }) => {
|
|
|
2634
2668
|
};
|
|
2635
2669
|
|
|
2636
2670
|
// src/Components/Drawer/components/DrawerHeader.tsx
|
|
2637
|
-
import
|
|
2671
|
+
import React17 from "react";
|
|
2638
2672
|
import { Typography as Typography8, IconButton as IconButton8 } from "@mui/material";
|
|
2639
2673
|
import Grid5 from "@mui/material/Grid";
|
|
2640
2674
|
import CloseIcon from "@mui/icons-material/Close";
|
|
@@ -2645,7 +2679,7 @@ var DrawerHeader = ({
|
|
|
2645
2679
|
filterSideCard,
|
|
2646
2680
|
type = "Drawer"
|
|
2647
2681
|
}) => {
|
|
2648
|
-
return /* @__PURE__ */
|
|
2682
|
+
return /* @__PURE__ */ React17.createElement(
|
|
2649
2683
|
Grid5,
|
|
2650
2684
|
{
|
|
2651
2685
|
container: true,
|
|
@@ -2660,8 +2694,8 @@ var DrawerHeader = ({
|
|
|
2660
2694
|
alignContent: "center"
|
|
2661
2695
|
}
|
|
2662
2696
|
},
|
|
2663
|
-
/* @__PURE__ */
|
|
2664
|
-
filterSideCard ? /* @__PURE__ */
|
|
2697
|
+
/* @__PURE__ */ React17.createElement(Typography8, { variant: filterSideCard ? "body2" : "h6", color: colorTitle || "text.primary" }, title != null ? title : "Personaliza tu b\xFAsqueda aqui"),
|
|
2698
|
+
filterSideCard ? /* @__PURE__ */ React17.createElement(React17.Fragment, null, filterSideCard) : /* @__PURE__ */ React17.createElement(IconButton8, { onClick: onClose }, /* @__PURE__ */ React17.createElement(CloseIcon, { "data-testid": "test-button-close", sx: { color: "text.primary" } }))
|
|
2665
2699
|
);
|
|
2666
2700
|
};
|
|
2667
2701
|
|
|
@@ -2723,7 +2757,7 @@ function SCDrawer({
|
|
|
2723
2757
|
];
|
|
2724
2758
|
};
|
|
2725
2759
|
const drawerActions = getActions();
|
|
2726
|
-
return /* @__PURE__ */
|
|
2760
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, toast && /* @__PURE__ */ React18.createElement(SCToastNotification, __spreadValues({}, toast)), /* @__PURE__ */ React18.createElement(
|
|
2727
2761
|
Grid6,
|
|
2728
2762
|
{
|
|
2729
2763
|
container: true,
|
|
@@ -2732,21 +2766,21 @@ function SCDrawer({
|
|
|
2732
2766
|
alignItems: "center",
|
|
2733
2767
|
sx: { width: "100%" }
|
|
2734
2768
|
},
|
|
2735
|
-
shouldShowChips && /* @__PURE__ */
|
|
2769
|
+
shouldShowChips && /* @__PURE__ */ React18.createElement(
|
|
2736
2770
|
ChipFiltersDisplay,
|
|
2737
2771
|
{
|
|
2738
2772
|
textFilters,
|
|
2739
2773
|
onDeleteFilter: handleDeleteFilter
|
|
2740
2774
|
}
|
|
2741
2775
|
),
|
|
2742
|
-
buttonDrawer && /* @__PURE__ */
|
|
2776
|
+
buttonDrawer && /* @__PURE__ */ React18.createElement(
|
|
2743
2777
|
DrawerButton,
|
|
2744
2778
|
{
|
|
2745
2779
|
buttonDrawer,
|
|
2746
2780
|
onToggle: toggleDrawer(true)
|
|
2747
2781
|
}
|
|
2748
2782
|
)
|
|
2749
|
-
), type != "Swipeable" ? /* @__PURE__ */
|
|
2783
|
+
), type != "Swipeable" ? /* @__PURE__ */ React18.createElement(
|
|
2750
2784
|
Drawer,
|
|
2751
2785
|
{
|
|
2752
2786
|
open: drawerOpen,
|
|
@@ -2784,7 +2818,7 @@ function SCDrawer({
|
|
|
2784
2818
|
}
|
|
2785
2819
|
}
|
|
2786
2820
|
},
|
|
2787
|
-
/* @__PURE__ */
|
|
2821
|
+
/* @__PURE__ */ React18.createElement(Stack6, { flexDirection: "column", height: "100%" }, /* @__PURE__ */ React18.createElement(
|
|
2788
2822
|
DrawerHeader,
|
|
2789
2823
|
{
|
|
2790
2824
|
title,
|
|
@@ -2793,8 +2827,8 @@ function SCDrawer({
|
|
|
2793
2827
|
filterSideCard,
|
|
2794
2828
|
type
|
|
2795
2829
|
}
|
|
2796
|
-
), /* @__PURE__ */
|
|
2797
|
-
) : /* @__PURE__ */
|
|
2830
|
+
), /* @__PURE__ */ React18.createElement(DrawerContent, { arrayElements }), /* @__PURE__ */ React18.createElement(DrawerActions, { actions: drawerActions, anchor }))
|
|
2831
|
+
) : /* @__PURE__ */ React18.createElement(
|
|
2798
2832
|
SwipeableDrawer,
|
|
2799
2833
|
{
|
|
2800
2834
|
open: drawerOpen,
|
|
@@ -2822,7 +2856,7 @@ function SCDrawer({
|
|
|
2822
2856
|
}
|
|
2823
2857
|
}
|
|
2824
2858
|
},
|
|
2825
|
-
/* @__PURE__ */
|
|
2859
|
+
/* @__PURE__ */ React18.createElement(
|
|
2826
2860
|
Box11,
|
|
2827
2861
|
{
|
|
2828
2862
|
sx: {
|
|
@@ -2836,7 +2870,7 @@ function SCDrawer({
|
|
|
2836
2870
|
}
|
|
2837
2871
|
}
|
|
2838
2872
|
),
|
|
2839
|
-
/* @__PURE__ */
|
|
2873
|
+
/* @__PURE__ */ React18.createElement(Stack6, { flexDirection: "column", height: "100%" }, /* @__PURE__ */ React18.createElement(
|
|
2840
2874
|
DrawerHeader,
|
|
2841
2875
|
{
|
|
2842
2876
|
title,
|
|
@@ -2844,7 +2878,7 @@ function SCDrawer({
|
|
|
2844
2878
|
onClose: handleDrawerClose,
|
|
2845
2879
|
type
|
|
2846
2880
|
}
|
|
2847
|
-
), /* @__PURE__ */
|
|
2881
|
+
), /* @__PURE__ */ React18.createElement(DrawerContent, { arrayElements }), /* @__PURE__ */ React18.createElement(
|
|
2848
2882
|
Grid6,
|
|
2849
2883
|
{
|
|
2850
2884
|
sx: { zIndex: 1500 },
|
|
@@ -2857,7 +2891,7 @@ function SCDrawer({
|
|
|
2857
2891
|
justifyContent: Array.isArray(drawerActions) && drawerActions.length > 1 ? "space-between" : "flex-end",
|
|
2858
2892
|
flexDirection: "row-reverse"
|
|
2859
2893
|
},
|
|
2860
|
-
Array.isArray(drawerActions) && drawerActions.map((btn, index) => /* @__PURE__ */
|
|
2894
|
+
Array.isArray(drawerActions) && drawerActions.map((btn, index) => /* @__PURE__ */ React18.createElement(
|
|
2861
2895
|
Button9,
|
|
2862
2896
|
{
|
|
2863
2897
|
key: index,
|
|
@@ -2890,13 +2924,13 @@ var AttachmentMobile = ({
|
|
|
2890
2924
|
onFileClick
|
|
2891
2925
|
}) => {
|
|
2892
2926
|
const webcamRef = useRef3(null);
|
|
2893
|
-
const [abrirCamara, setAbrirCamara] =
|
|
2894
|
-
const [capturedImage, setCapturedImage] =
|
|
2895
|
-
const [files, setFiles] =
|
|
2896
|
-
const [fileToDelete, setFileToDelete] =
|
|
2897
|
-
const [openDrawerDelete, setOpenDrawerDelete] =
|
|
2898
|
-
const [toast, setToast] =
|
|
2899
|
-
const [open, setOpen] =
|
|
2927
|
+
const [abrirCamara, setAbrirCamara] = useState13(false);
|
|
2928
|
+
const [capturedImage, setCapturedImage] = useState13(null);
|
|
2929
|
+
const [files, setFiles] = useState13([]);
|
|
2930
|
+
const [fileToDelete, setFileToDelete] = useState13(null);
|
|
2931
|
+
const [openDrawerDelete, setOpenDrawerDelete] = useState13(false);
|
|
2932
|
+
const [toast, setToast] = useState13({ open: false, mensaje: "", type: "success" });
|
|
2933
|
+
const [open, setOpen] = React19.useState(false);
|
|
2900
2934
|
const toggleAttachment = (newOpen) => () => {
|
|
2901
2935
|
setOpen(newOpen);
|
|
2902
2936
|
};
|
|
@@ -2958,13 +2992,7 @@ var AttachmentMobile = ({
|
|
|
2958
2992
|
);
|
|
2959
2993
|
const sizeMB = file.size / (1024 * 1024);
|
|
2960
2994
|
if (isDuplicateFile) {
|
|
2961
|
-
setToast({
|
|
2962
|
-
type: "error",
|
|
2963
|
-
title: "Archivo duplicado",
|
|
2964
|
-
listITems: [`El archivo "${file.name}" ya existe.`],
|
|
2965
|
-
seeMore: true,
|
|
2966
|
-
time: 5
|
|
2967
|
-
});
|
|
2995
|
+
setToast({ open: true, type: "error", mensaje: `Archivo duplicado: El archivo "${file.name}" ya existe.` });
|
|
2968
2996
|
return;
|
|
2969
2997
|
}
|
|
2970
2998
|
if (sizeMB > maxSize) {
|
|
@@ -2975,13 +3003,7 @@ var AttachmentMobile = ({
|
|
|
2975
3003
|
progress: 0,
|
|
2976
3004
|
uploadError: true
|
|
2977
3005
|
});
|
|
2978
|
-
setToast({
|
|
2979
|
-
type: "error",
|
|
2980
|
-
title: "Carga fallida",
|
|
2981
|
-
seeMore: true,
|
|
2982
|
-
listITems: [`El archivo "${file.name}" supera el l\xEDmite de ${maxSize}MB.`],
|
|
2983
|
-
time: 5
|
|
2984
|
-
});
|
|
3006
|
+
setToast({ open: true, type: "error", mensaje: `Carga fallida: El archivo "${file.name}" supera el l\xEDmite de ${maxSize}MB.` });
|
|
2985
3007
|
return;
|
|
2986
3008
|
}
|
|
2987
3009
|
if (fileAccepted && !file.name.match(
|
|
@@ -2990,13 +3012,7 @@ var AttachmentMobile = ({
|
|
|
2990
3012
|
"i"
|
|
2991
3013
|
)
|
|
2992
3014
|
)) {
|
|
2993
|
-
setToast({
|
|
2994
|
-
type: "error",
|
|
2995
|
-
title: "Tipo de archivo no permitido",
|
|
2996
|
-
listITems: [`El archivo "${file.name}" no es un tipo permitido.`],
|
|
2997
|
-
seeMore: true,
|
|
2998
|
-
time: 5
|
|
2999
|
-
});
|
|
3015
|
+
setToast({ open: true, type: "error", mensaje: `Tipo de archivo no permitido: El archivo "${file.name}" no es un tipo permitido.` });
|
|
3000
3016
|
return;
|
|
3001
3017
|
}
|
|
3002
3018
|
nuevosArchivos.push({
|
|
@@ -3036,21 +3052,9 @@ var AttachmentMobile = ({
|
|
|
3036
3052
|
const remainingValidFiles = updatedFiles.filter((f) => !f.uploadError).map((f) => new File([], f.name, { type: f.type }));
|
|
3037
3053
|
onChange(remainingValidFiles);
|
|
3038
3054
|
}
|
|
3039
|
-
setToast({
|
|
3040
|
-
type: "success",
|
|
3041
|
-
title: "Archivo eliminado",
|
|
3042
|
-
listITems: [`El archivo "${fileToRemove.name}" ha sido eliminado exitosamente.`],
|
|
3043
|
-
seeMore: true,
|
|
3044
|
-
time: 3
|
|
3045
|
-
});
|
|
3055
|
+
setToast({ open: true, type: "success", mensaje: `El archivo "${fileToRemove.name}" ha sido eliminado exitosamente.` });
|
|
3046
3056
|
} catch (error) {
|
|
3047
|
-
setToast({
|
|
3048
|
-
type: "error",
|
|
3049
|
-
title: "Error al eliminar",
|
|
3050
|
-
listITems: [`No se pudo eliminar el archivo "${fileToRemove.name}".`],
|
|
3051
|
-
seeMore: true,
|
|
3052
|
-
time: 5
|
|
3053
|
-
});
|
|
3057
|
+
setToast({ open: true, type: "error", mensaje: `No se pudo eliminar el archivo "${fileToRemove.name}".` });
|
|
3054
3058
|
}
|
|
3055
3059
|
});
|
|
3056
3060
|
const deleteFiles = (fileName) => {
|
|
@@ -3063,12 +3067,12 @@ var AttachmentMobile = ({
|
|
|
3063
3067
|
});
|
|
3064
3068
|
};
|
|
3065
3069
|
const AttachtmentActions = [
|
|
3066
|
-
{ icon: /* @__PURE__ */
|
|
3070
|
+
{ icon: /* @__PURE__ */ React19.createElement(ImageOutlinedIcon, { type: "file", color: "primary" }), color: "primary", label: "Galer\xEDa", onClick: () => {
|
|
3067
3071
|
var _a;
|
|
3068
3072
|
return (_a = inputRef.current) == null ? void 0 : _a.click();
|
|
3069
3073
|
} },
|
|
3070
|
-
{ icon: /* @__PURE__ */
|
|
3071
|
-
{ icon: /* @__PURE__ */
|
|
3074
|
+
{ icon: /* @__PURE__ */ React19.createElement(PhotoCameraOutlined, { type: "file", color: "success" }), color: "success", label: "C\xE1mara", onClick: () => openCam() },
|
|
3075
|
+
{ icon: /* @__PURE__ */ React19.createElement(FolderOpenOutlined, { type: "file", color: "warning" }), color: "warning", label: "Archivos", onClick: () => {
|
|
3072
3076
|
var _a;
|
|
3073
3077
|
return (_a = inputRef.current) == null ? void 0 : _a.click();
|
|
3074
3078
|
} }
|
|
@@ -3078,14 +3082,24 @@ var AttachmentMobile = ({
|
|
|
3078
3082
|
setFiles(initialFiles);
|
|
3079
3083
|
}
|
|
3080
3084
|
}, []);
|
|
3081
|
-
return /* @__PURE__ */
|
|
3085
|
+
return /* @__PURE__ */ React19.createElement(Box12, { display: "flex", flexDirection: "column", gap: 1 }, /* @__PURE__ */ React19.createElement(
|
|
3086
|
+
SCSnackBar,
|
|
3087
|
+
{
|
|
3088
|
+
openState: toast.open,
|
|
3089
|
+
setOpenState: (v) => setToast((prev) => __spreadProps(__spreadValues({}, prev), { open: v })),
|
|
3090
|
+
mensaje: toast.mensaje,
|
|
3091
|
+
type: toast.type,
|
|
3092
|
+
duration: 5e3,
|
|
3093
|
+
position: "Center"
|
|
3094
|
+
}
|
|
3095
|
+
), view == "button" ? /* @__PURE__ */ React19.createElement(Box12, { display: "flex", width: "100%", justifyContent: "space-between", alignItems: "center", sx }, children, /* @__PURE__ */ React19.createElement(
|
|
3082
3096
|
AttachmentButton,
|
|
3083
3097
|
{
|
|
3084
3098
|
buttonAttachment,
|
|
3085
3099
|
open,
|
|
3086
3100
|
setOpen
|
|
3087
3101
|
}
|
|
3088
|
-
)) : "", /* @__PURE__ */
|
|
3102
|
+
)) : "", /* @__PURE__ */ React19.createElement(CssBaseline, null), /* @__PURE__ */ React19.createElement(
|
|
3089
3103
|
SwipeableDrawer2,
|
|
3090
3104
|
{
|
|
3091
3105
|
slotProps: {
|
|
@@ -3110,8 +3124,7 @@ var AttachmentMobile = ({
|
|
|
3110
3124
|
onClose: toggleAttachment(false),
|
|
3111
3125
|
onOpen: toggleAttachment(true)
|
|
3112
3126
|
},
|
|
3113
|
-
|
|
3114
|
-
/* @__PURE__ */ React18.createElement(Box12, { display: "flex", flexDirection: "column", alignItems: "center", p: 2, gap: 2 }, /* @__PURE__ */ React18.createElement(Box12, { display: "flex", width: "100%", justifyContent: "space-between", alignItems: "center", gap: 1, p: 1 }, /* @__PURE__ */ React18.createElement(Typography9, { variant: "h6", color: "text.primary" }, "Agrega adjuntos"), /* @__PURE__ */ React18.createElement(IconButton9, { size: "medium", onClick: toggleAttachment(false) }, /* @__PURE__ */ React18.createElement(CloseOutlined, { color: "action" }))), /* @__PURE__ */ React18.createElement(
|
|
3127
|
+
/* @__PURE__ */ React19.createElement(Box12, { display: "flex", flexDirection: "column", alignItems: "center", p: 2, gap: 2 }, /* @__PURE__ */ React19.createElement(Box12, { display: "flex", width: "100%", justifyContent: "space-between", alignItems: "center", gap: 1, p: 1 }, /* @__PURE__ */ React19.createElement(Typography9, { variant: "h6", color: "text.primary" }, "Agrega adjuntos"), /* @__PURE__ */ React19.createElement(IconButton9, { size: "medium", onClick: toggleAttachment(false) }, /* @__PURE__ */ React19.createElement(CloseOutlined, { color: "action" }))), /* @__PURE__ */ React19.createElement(
|
|
3115
3128
|
"input",
|
|
3116
3129
|
{
|
|
3117
3130
|
type: "file",
|
|
@@ -3120,7 +3133,7 @@ var AttachmentMobile = ({
|
|
|
3120
3133
|
ref: inputRef,
|
|
3121
3134
|
onChange: handleUpload
|
|
3122
3135
|
}
|
|
3123
|
-
), /* @__PURE__ */
|
|
3136
|
+
), /* @__PURE__ */ React19.createElement(Box12, { display: "flex", justifyContent: "space-around", alignItems: "center", width: "100%", gap: 2, sx: { padding: "0px 0px 52px 0px !important" } }, AttachtmentActions.map((option, index) => /* @__PURE__ */ React19.createElement(
|
|
3124
3137
|
Box12,
|
|
3125
3138
|
{
|
|
3126
3139
|
display: "flex",
|
|
@@ -3140,7 +3153,7 @@ var AttachmentMobile = ({
|
|
|
3140
3153
|
cursor: "pointer"
|
|
3141
3154
|
}
|
|
3142
3155
|
},
|
|
3143
|
-
/* @__PURE__ */
|
|
3156
|
+
/* @__PURE__ */ React19.createElement(
|
|
3144
3157
|
IconButton9,
|
|
3145
3158
|
{
|
|
3146
3159
|
sx: {
|
|
@@ -3150,9 +3163,9 @@ var AttachmentMobile = ({
|
|
|
3150
3163
|
},
|
|
3151
3164
|
option.icon
|
|
3152
3165
|
),
|
|
3153
|
-
/* @__PURE__ */
|
|
3166
|
+
/* @__PURE__ */ React19.createElement(Typography9, { variant: "body2", color: "text.secondary" }, option.label)
|
|
3154
3167
|
))))
|
|
3155
|
-
), abrirCamara && /* @__PURE__ */
|
|
3168
|
+
), abrirCamara && /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(CancelOutlinedIcon, { onClick: closeCam, sx: { borderRadius: "50px", height: "35px", width: "35px", zIndex: 1700, background: "white", position: "absolute", left: `calc(100% - 50px)`, bottom: `calc(100% - 50px)` } }), /* @__PURE__ */ React19.createElement(Stack7, { className: "camras" }, /* @__PURE__ */ React19.createElement(
|
|
3156
3169
|
Webcam,
|
|
3157
3170
|
{
|
|
3158
3171
|
audio: false,
|
|
@@ -3176,7 +3189,7 @@ var AttachmentMobile = ({
|
|
|
3176
3189
|
// Encima de todo
|
|
3177
3190
|
}
|
|
3178
3191
|
}
|
|
3179
|
-
), /* @__PURE__ */
|
|
3192
|
+
), /* @__PURE__ */ React19.createElement(
|
|
3180
3193
|
PhotoCameraIcon,
|
|
3181
3194
|
{
|
|
3182
3195
|
onClick: capture,
|
|
@@ -3194,7 +3207,7 @@ var AttachmentMobile = ({
|
|
|
3194
3207
|
},
|
|
3195
3208
|
fontSize: "medium"
|
|
3196
3209
|
}
|
|
3197
|
-
))), files.length > 0 && /* @__PURE__ */
|
|
3210
|
+
))), files.length > 0 && /* @__PURE__ */ React19.createElement(
|
|
3198
3211
|
Stack7,
|
|
3199
3212
|
{
|
|
3200
3213
|
"data-testid": "ContenedorArchivosAdjuntos",
|
|
@@ -3207,7 +3220,7 @@ var AttachmentMobile = ({
|
|
|
3207
3220
|
}),
|
|
3208
3221
|
spacing: 1
|
|
3209
3222
|
},
|
|
3210
|
-
files.map((file) => /* @__PURE__ */
|
|
3223
|
+
files.map((file) => /* @__PURE__ */ React19.createElement(
|
|
3211
3224
|
Stack7,
|
|
3212
3225
|
{
|
|
3213
3226
|
height: 46,
|
|
@@ -3225,7 +3238,7 @@ var AttachmentMobile = ({
|
|
|
3225
3238
|
}
|
|
3226
3239
|
}
|
|
3227
3240
|
},
|
|
3228
|
-
/* @__PURE__ */
|
|
3241
|
+
/* @__PURE__ */ React19.createElement(
|
|
3229
3242
|
Stack7,
|
|
3230
3243
|
{
|
|
3231
3244
|
direction: "row",
|
|
@@ -3235,14 +3248,14 @@ var AttachmentMobile = ({
|
|
|
3235
3248
|
onClick: () => onFileClick == null ? void 0 : onFileClick(file),
|
|
3236
3249
|
sx: { cursor: onFileClick ? "pointer" : "default" }
|
|
3237
3250
|
},
|
|
3238
|
-
iconFileItem ? /* @__PURE__ */
|
|
3251
|
+
iconFileItem ? /* @__PURE__ */ React19.createElement(SvgIcon6, { color: file.uploadError ? "error" : "primary", fontSize: "small", component: IconFileItem }) : /* @__PURE__ */ React19.createElement(
|
|
3239
3252
|
UploadFileOutlined2,
|
|
3240
3253
|
{
|
|
3241
3254
|
color: file.uploadError ? "error" : "primary",
|
|
3242
3255
|
fontSize: "small"
|
|
3243
3256
|
}
|
|
3244
3257
|
),
|
|
3245
|
-
/* @__PURE__ */
|
|
3258
|
+
/* @__PURE__ */ React19.createElement(Stack7, { width: "100%" }, /* @__PURE__ */ React19.createElement(
|
|
3246
3259
|
Typography9,
|
|
3247
3260
|
{
|
|
3248
3261
|
variant: "body2",
|
|
@@ -3253,7 +3266,7 @@ var AttachmentMobile = ({
|
|
|
3253
3266
|
maxWidth: "310px"
|
|
3254
3267
|
},
|
|
3255
3268
|
file.name
|
|
3256
|
-
), /* @__PURE__ */
|
|
3269
|
+
), /* @__PURE__ */ React19.createElement(
|
|
3257
3270
|
Typography9,
|
|
3258
3271
|
{
|
|
3259
3272
|
variant: "caption",
|
|
@@ -3262,7 +3275,7 @@ var AttachmentMobile = ({
|
|
|
3262
3275
|
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}`
|
|
3263
3276
|
))
|
|
3264
3277
|
),
|
|
3265
|
-
view == "file" ? /* @__PURE__ */
|
|
3278
|
+
view == "file" ? /* @__PURE__ */ React19.createElement(Tooltip4, { title: "Descargar" }, /* @__PURE__ */ React19.createElement(
|
|
3266
3279
|
IconButton9,
|
|
3267
3280
|
{
|
|
3268
3281
|
size: "small",
|
|
@@ -3270,9 +3283,9 @@ var AttachmentMobile = ({
|
|
|
3270
3283
|
disabled: file.uploadError,
|
|
3271
3284
|
"aria-label": `Descargar ${file.name}`
|
|
3272
3285
|
},
|
|
3273
|
-
/* @__PURE__ */
|
|
3286
|
+
/* @__PURE__ */ React19.createElement(FileDownloadOutlinedIcon, { fontSize: "small", color: "action" })
|
|
3274
3287
|
)) : "",
|
|
3275
|
-
view == "button" ? /* @__PURE__ */
|
|
3288
|
+
view == "button" ? /* @__PURE__ */ React19.createElement(Tooltip4, { title: "Eliminar" }, /* @__PURE__ */ React19.createElement(
|
|
3276
3289
|
IconButton9,
|
|
3277
3290
|
{
|
|
3278
3291
|
size: "small",
|
|
@@ -3282,10 +3295,10 @@ var AttachmentMobile = ({
|
|
|
3282
3295
|
},
|
|
3283
3296
|
"aria-label": `Eliminar ${file.name}`
|
|
3284
3297
|
},
|
|
3285
|
-
/* @__PURE__ */
|
|
3298
|
+
/* @__PURE__ */ React19.createElement(DeleteOutline2, { fontSize: "small", color: "action" })
|
|
3286
3299
|
)) : ""
|
|
3287
3300
|
))
|
|
3288
|
-
), openDrawerDelete && /* @__PURE__ */
|
|
3301
|
+
), openDrawerDelete && /* @__PURE__ */ React19.createElement(
|
|
3289
3302
|
SCDrawer,
|
|
3290
3303
|
{
|
|
3291
3304
|
open: openDrawerDelete,
|
|
@@ -3295,7 +3308,7 @@ var AttachmentMobile = ({
|
|
|
3295
3308
|
heightDrawer: 150,
|
|
3296
3309
|
arrayElements: [
|
|
3297
3310
|
{
|
|
3298
|
-
component: /* @__PURE__ */
|
|
3311
|
+
component: /* @__PURE__ */ React19.createElement(Typography9, null, "Esta seguro de eliminar el adjunto ", /* @__PURE__ */ React19.createElement("strong", null, '"', fileToDelete == null ? void 0 : fileToDelete.name, '"'), " ")
|
|
3299
3312
|
}
|
|
3300
3313
|
],
|
|
3301
3314
|
actions: [
|
|
@@ -3308,19 +3321,9 @@ var AttachmentMobile = ({
|
|
|
3308
3321
|
yield deleteAction(fileToDelete.name);
|
|
3309
3322
|
}
|
|
3310
3323
|
deleteFiles(fileToDelete.name);
|
|
3311
|
-
setToast({
|
|
3312
|
-
title: "Archivo eliminado",
|
|
3313
|
-
type: "success",
|
|
3314
|
-
listITems: [`El archivo "${fileToDelete.name}" fue eliminado exitosamente.`],
|
|
3315
|
-
time: 3
|
|
3316
|
-
});
|
|
3324
|
+
setToast({ open: true, type: "success", mensaje: `El archivo "${fileToDelete.name}" fue eliminado exitosamente.` });
|
|
3317
3325
|
} catch (error) {
|
|
3318
|
-
setToast({
|
|
3319
|
-
title: "Error al eliminar archivo",
|
|
3320
|
-
type: "error",
|
|
3321
|
-
listITems: [`No se pudo eliminar el archivo "${fileToDelete.name}".`],
|
|
3322
|
-
time: 5
|
|
3323
|
-
});
|
|
3326
|
+
setToast({ open: true, type: "error", mensaje: `No se pudo eliminar el archivo "${fileToDelete.name}".` });
|
|
3324
3327
|
} finally {
|
|
3325
3328
|
setFileToDelete(null);
|
|
3326
3329
|
setOpenDrawerDelete(false);
|
|
@@ -3335,11 +3338,11 @@ var AttachmentMobile = ({
|
|
|
3335
3338
|
};
|
|
3336
3339
|
|
|
3337
3340
|
// src/Components/Calendario/Calendar.tsx
|
|
3338
|
-
import
|
|
3341
|
+
import React32, { useEffect as useEffect12, useState as useState16 } from "react";
|
|
3339
3342
|
import { Box as Box19, CircularProgress as CircularProgress5 } from "@mui/material";
|
|
3340
3343
|
|
|
3341
3344
|
// src/Components/Calendario/CalendarToolbar.tsx
|
|
3342
|
-
import
|
|
3345
|
+
import React20, { useState as useState14 } from "react";
|
|
3343
3346
|
import { ChevronLeft, ChevronRight, KeyboardArrowDown as KeyboardArrowDown2, EventOutlined } from "@mui/icons-material";
|
|
3344
3347
|
import { Box as Box13, Chip as Chip5, IconButton as IconButton10, Menu, MenuItem as MenuItem3, Stack as Stack8, Typography as Typography10 } from "@mui/material";
|
|
3345
3348
|
import dayjs2 from "dayjs";
|
|
@@ -3358,7 +3361,7 @@ var CalendarToolbar = ({
|
|
|
3358
3361
|
onNavigate,
|
|
3359
3362
|
children
|
|
3360
3363
|
}) => {
|
|
3361
|
-
const [anchorEl, setAnchorEl] =
|
|
3364
|
+
const [anchorEl, setAnchorEl] = useState14(null);
|
|
3362
3365
|
const open = Boolean(anchorEl);
|
|
3363
3366
|
const handleMenuOpen = (event2) => {
|
|
3364
3367
|
setAnchorEl(event2.currentTarget);
|
|
@@ -3381,17 +3384,17 @@ var CalendarToolbar = ({
|
|
|
3381
3384
|
}
|
|
3382
3385
|
return labelDate.format(" DD MMMM YYYY");
|
|
3383
3386
|
};
|
|
3384
|
-
return /* @__PURE__ */
|
|
3387
|
+
return /* @__PURE__ */ React20.createElement(Stack8, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 1.5, sx: { paddingBottom: "16px" } }, /* @__PURE__ */ React20.createElement(Stack8, { direction: "row", alignItems: "center", justifyContent: "flex-start", gap: 1.5 }, /* @__PURE__ */ React20.createElement(Box13, null, /* @__PURE__ */ React20.createElement(
|
|
3385
3388
|
Chip5,
|
|
3386
3389
|
{
|
|
3387
3390
|
size: "medium",
|
|
3388
3391
|
label: "Hoy",
|
|
3389
|
-
icon: /* @__PURE__ */
|
|
3392
|
+
icon: /* @__PURE__ */ React20.createElement(EventOutlined, { fontSize: "small" }),
|
|
3390
3393
|
color: "primary",
|
|
3391
3394
|
onClick: () => onNavigate("TODAY"),
|
|
3392
3395
|
variant: "standard"
|
|
3393
3396
|
}
|
|
3394
|
-
)), /* @__PURE__ */
|
|
3397
|
+
)), /* @__PURE__ */ React20.createElement(Stack8, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ React20.createElement(IconButton10, { "aria-label": "Anterior", onClick: () => onNavigate("PREV"), size: "small", color: "primary" }, /* @__PURE__ */ React20.createElement(ChevronLeft, { fontSize: "small" })), /* @__PURE__ */ React20.createElement(IconButton10, { "aria-label": "Siguiente", onClick: () => onNavigate("NEXT"), size: "small", color: "primary" }, /* @__PURE__ */ React20.createElement(ChevronRight, { fontSize: "small" })), /* @__PURE__ */ React20.createElement(Typography10, { variant: "h6", color: "primary", "data-testid": "currentDate" }, getFormattedDate()), /* @__PURE__ */ React20.createElement(IconButton10, { onClick: handleMenuOpen, size: "small", color: "primary", "aria-label": "Cambiar vista" }, /* @__PURE__ */ React20.createElement(KeyboardArrowDown2, { fontSize: "small" })), /* @__PURE__ */ React20.createElement(
|
|
3395
3398
|
Menu,
|
|
3396
3399
|
{
|
|
3397
3400
|
anchorEl,
|
|
@@ -3400,14 +3403,14 @@ var CalendarToolbar = ({
|
|
|
3400
3403
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
3401
3404
|
transformOrigin: { vertical: "top", horizontal: "center" }
|
|
3402
3405
|
},
|
|
3403
|
-
/* @__PURE__ */
|
|
3404
|
-
/* @__PURE__ */
|
|
3405
|
-
/* @__PURE__ */
|
|
3406
|
-
))), children ? /* @__PURE__ */
|
|
3406
|
+
/* @__PURE__ */ React20.createElement(MenuItem3, { onClick: () => handleViewChange("month") }, "Mes"),
|
|
3407
|
+
/* @__PURE__ */ React20.createElement(MenuItem3, { onClick: () => handleViewChange("week") }, "Semana"),
|
|
3408
|
+
/* @__PURE__ */ React20.createElement(MenuItem3, { onClick: () => handleViewChange("day") }, "D\xEDa")
|
|
3409
|
+
))), children ? /* @__PURE__ */ React20.createElement(Box13, null, children) : /* @__PURE__ */ React20.createElement(Box13, { width: "24px" }), " ");
|
|
3407
3410
|
};
|
|
3408
3411
|
|
|
3409
3412
|
// src/Components/Calendario/Views/MonthView.tsx
|
|
3410
|
-
import
|
|
3413
|
+
import React29 from "react";
|
|
3411
3414
|
import { Box as Box16, Typography as Typography14, IconButton as IconButton11, Paper as Paper2, Tooltip as Tooltip6, Stack as Stack11, CircularProgress as CircularProgress2, Button as Button11 } from "@mui/material";
|
|
3412
3415
|
import AddIcon from "@mui/icons-material/Add";
|
|
3413
3416
|
import dayjs5 from "dayjs";
|
|
@@ -3440,10 +3443,10 @@ var stateColors = {
|
|
|
3440
3443
|
};
|
|
3441
3444
|
|
|
3442
3445
|
// src/Components/Calendario/Event.tsx
|
|
3443
|
-
import
|
|
3446
|
+
import React21 from "react";
|
|
3444
3447
|
import { Box as Box14, Stack as Stack9, Typography as Typography11, Divider as Divider4, Popover as Popover3 } from "@mui/material";
|
|
3445
3448
|
var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
3446
|
-
const [anchorEl, setAnchorEl] =
|
|
3449
|
+
const [anchorEl, setAnchorEl] = React21.useState(null);
|
|
3447
3450
|
const handlePopoverOpen = (event3) => {
|
|
3448
3451
|
setAnchorEl(event3.currentTarget);
|
|
3449
3452
|
};
|
|
@@ -3451,7 +3454,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3451
3454
|
setAnchorEl(null);
|
|
3452
3455
|
};
|
|
3453
3456
|
const open = Boolean(anchorEl);
|
|
3454
|
-
return /* @__PURE__ */
|
|
3457
|
+
return /* @__PURE__ */ React21.createElement(
|
|
3455
3458
|
Stack9,
|
|
3456
3459
|
{
|
|
3457
3460
|
direction: "row",
|
|
@@ -3472,7 +3475,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3472
3475
|
cursor: onClick ? "pointer" : "default"
|
|
3473
3476
|
}, sx)
|
|
3474
3477
|
},
|
|
3475
|
-
/* @__PURE__ */
|
|
3478
|
+
/* @__PURE__ */ React21.createElement(
|
|
3476
3479
|
Divider4,
|
|
3477
3480
|
{
|
|
3478
3481
|
orientation: "vertical",
|
|
@@ -3484,7 +3487,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3484
3487
|
}
|
|
3485
3488
|
}
|
|
3486
3489
|
),
|
|
3487
|
-
/* @__PURE__ */
|
|
3490
|
+
/* @__PURE__ */ React21.createElement(
|
|
3488
3491
|
Box14,
|
|
3489
3492
|
{
|
|
3490
3493
|
px: 1,
|
|
@@ -3494,7 +3497,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3494
3497
|
display: "flex",
|
|
3495
3498
|
alignItems: "center"
|
|
3496
3499
|
},
|
|
3497
|
-
/* @__PURE__ */
|
|
3500
|
+
/* @__PURE__ */ React21.createElement(
|
|
3498
3501
|
Typography11,
|
|
3499
3502
|
{
|
|
3500
3503
|
color: "text.primary",
|
|
@@ -3510,7 +3513,7 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3510
3513
|
},
|
|
3511
3514
|
event2.title.charAt(0).toUpperCase() + event2.title.slice(1).toLowerCase()
|
|
3512
3515
|
),
|
|
3513
|
-
/* @__PURE__ */
|
|
3516
|
+
/* @__PURE__ */ React21.createElement(
|
|
3514
3517
|
Popover3,
|
|
3515
3518
|
{
|
|
3516
3519
|
id: "mouse-over-popover",
|
|
@@ -3535,60 +3538,60 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3535
3538
|
};
|
|
3536
3539
|
|
|
3537
3540
|
// src/Components/EmptyState/EmptyState.tsx
|
|
3538
|
-
import
|
|
3541
|
+
import React26 from "react";
|
|
3539
3542
|
import { Button as Button10, Stack as Stack10, Typography as Typography12 } from "@mui/material";
|
|
3540
3543
|
|
|
3541
|
-
// src/assets/ImgEmptyState/create.tsx
|
|
3542
|
-
import React21 from "react";
|
|
3543
|
-
var Create = () => {
|
|
3544
|
-
return /* @__PURE__ */ React21.createElement("svg", { width: "45", height: "41", viewBox: "0 0 45 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React21.createElement("g", { "clip-path": "url(#clip0_1283_39624)" }, /* @__PURE__ */ React21.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__ */ React21.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__ */ React21.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__ */ React21.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__ */ React21.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__ */ React21.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__ */ React21.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__ */ React21.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__ */ React21.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__ */ React21.createElement("defs", null, /* @__PURE__ */ React21.createElement("clipPath", { id: "clip0_1283_39624" }, /* @__PURE__ */ React21.createElement("rect", { width: "44", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
|
|
3545
|
-
};
|
|
3546
|
-
|
|
3547
3544
|
// src/assets/ImgEmptyState/empty.tsx
|
|
3548
3545
|
import React22 from "react";
|
|
3549
3546
|
var Empty = () => {
|
|
3550
|
-
return /* @__PURE__ */ React22.createElement("svg", { width: "
|
|
3547
|
+
return /* @__PURE__ */ React22.createElement("svg", { width: "100%", height: "100%", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React22.createElement("g", { "clip-path": "url(#clip0_1283_39626)" }, /* @__PURE__ */ React22.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__ */ React22.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__ */ React22.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__ */ React22.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__ */ React22.createElement("defs", null, /* @__PURE__ */ React22.createElement("clipPath", { id: "clip0_1283_39626" }, /* @__PURE__ */ React22.createElement("rect", { width: "40", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
|
|
3551
3548
|
};
|
|
3552
3549
|
|
|
3553
3550
|
// src/assets/ImgEmptyState/error.tsx
|
|
3554
3551
|
import React23 from "react";
|
|
3555
3552
|
var Error2 = () => {
|
|
3556
|
-
return /* @__PURE__ */ React23.createElement("svg", { width: "
|
|
3553
|
+
return /* @__PURE__ */ React23.createElement("svg", { width: "100%", height: "100%", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React23.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__ */ React23.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__ */ React23.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" }));
|
|
3557
3554
|
};
|
|
3558
3555
|
|
|
3559
3556
|
// src/assets/ImgEmptyState/search.tsx
|
|
3560
3557
|
import React24 from "react";
|
|
3561
3558
|
var Search2 = () => {
|
|
3562
|
-
return /* @__PURE__ */ React24.createElement("svg", { width: "
|
|
3559
|
+
return /* @__PURE__ */ React24.createElement("svg", { width: "100%", height: "100%", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React24.createElement("g", { "clip-path": "url(#clip0_1283_39628)" }, /* @__PURE__ */ React24.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__ */ React24.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__ */ React24.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__ */ React24.createElement("defs", null, /* @__PURE__ */ React24.createElement("clipPath", { id: "clip0_1283_39628" }, /* @__PURE__ */ React24.createElement("rect", { width: "40", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
|
|
3560
|
+
};
|
|
3561
|
+
|
|
3562
|
+
// src/assets/ImgEmptyState/Crear.tsx
|
|
3563
|
+
import React25 from "react";
|
|
3564
|
+
var Crear = () => {
|
|
3565
|
+
return /* @__PURE__ */ React25.createElement("svg", { width: "100%", height: "100%", viewBox: "0 0 71 60", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React25.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M32.8651 7.72749C33.3297 8.73403 32.8905 9.92668 31.8839 10.3913C29.95 11.2842 28.3291 12.4017 27.1797 13.9815C26.0474 15.5377 25.2507 17.7105 25.2505 20.9384C25.2504 22.047 24.3517 22.9457 23.243 22.9456C22.1344 22.9456 21.2358 22.0468 21.2358 20.9382C21.2361 17.0048 22.2237 13.9694 23.9334 11.6196C25.626 9.29313 27.9046 7.80661 30.2012 6.74635C31.2078 6.28169 32.4004 6.72096 32.8651 7.72749Z", fill: "#D9D9D9" }), /* @__PURE__ */ React25.createElement("path", { d: "Mnan nanL31.6838 57.8016C31.5923 57.3702 31.9213 56.9641 32.3623 56.9641H37.7342C38.1752 56.9641 38.5042 57.3702 38.4127 57.8016Lnan nanL38.4127 57.8016C38.1408 59.0834 37.0092 60.0002 35.6988 60.0002H34.3977C33.0874 60.0002 31.9557 59.0834 31.6838 57.8016Lnan nanZ", fill: "#B9BDC1" }), /* @__PURE__ */ React25.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M32.618 59.3541C32.5278 59.2787 32.4424 59.1976 32.3623 59.1112C32.0307 58.7535 31.7908 58.3058 31.6838 57.8016C31.5923 57.3702 31.9213 56.9641 32.3623 56.9641H37.7342C38.1752 56.9641 38.5042 57.3702 38.4127 57.8016C38.3058 58.3058 38.0658 58.7535 37.7342 59.1112C37.6542 59.1976 37.5687 59.2787 37.4785 59.3541C37.471 59.3604 37.4634 59.3667 37.4558 59.3729C36.9735 59.7676 36.3588 60.0002 35.6988 60.0002H34.3977C33.7377 60.0002 33.123 59.7676 32.6407 59.3729C32.6331 59.3667 32.6255 59.3604 32.618 59.3541Z", fill: "#B9BDC1" }), /* @__PURE__ */ React25.createElement("path", { d: "M28.0335 53.3519C27.8107 52.349 28.5738 51.3977 29.6011 51.3977H40.7778C41.8051 51.3977 42.5683 52.349 42.3454 53.3519L42.1868 54.0656C41.9419 55.1677 40.9644 55.9518 39.8354 55.9518H30.5435C29.4145 55.9518 28.437 55.1677 28.1921 54.0656L28.0335 53.3519Z", fill: "#B9BDC1" }), /* @__PURE__ */ React25.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.5254 20.5958C14.5254 9.19174 23.9064 0 35.4124 0C46.9185 0 56.2995 9.19174 56.2995 20.5958C56.2995 26.1942 54.0319 31.2695 50.3655 34.9759L48.9384 33.5642L50.3655 34.9759C50.1585 35.1851 49.9497 35.3917 49.7494 35.5899L49.7461 35.5932C48.3758 36.9492 47.4403 37.9255 47.0313 39.1176C46.8693 39.5896 46.697 40.5317 46.547 41.7784C46.4035 42.9721 46.2975 44.286 46.2239 45.402C46.0712 47.7172 44.1613 49.5864 41.7826 49.5864H29.0423C26.6636 49.5864 24.7537 47.7172 24.6009 45.402C24.5273 44.286 24.4214 42.9721 24.2778 41.7784C24.1278 40.5317 23.9555 39.5896 23.7936 39.1176C23.3845 37.9255 22.4491 36.9492 21.0788 35.5932L21.075 35.5895C20.8748 35.3914 20.6662 35.185 20.4593 34.9759C16.793 31.2695 14.5254 26.1942 14.5254 20.5958ZM35.4124 4.01465C26.0645 4.01465 18.54 11.4676 18.54 20.5958C18.54 25.086 20.3539 29.1607 23.3135 32.1525L21.9353 33.5158L23.3135 32.1525C23.504 32.3451 23.6987 32.5378 23.9026 32.7396L22.4907 34.1664L23.9026 32.7396C23.9418 32.7783 23.9815 32.8175 24.0215 32.8571C25.243 34.0642 26.8485 35.6508 27.5909 37.8146C27.9057 38.732 28.1145 40.0581 28.2637 41.299C28.4194 42.5929 28.5309 43.9862 28.6069 45.1377C28.6243 45.4015 28.8364 45.5717 29.0423 45.5717H41.7826C41.9885 45.5717 42.2006 45.4015 42.218 45.1377C42.2939 43.9862 42.4055 42.593 42.5611 41.299C42.7104 40.0581 42.9191 38.732 43.2339 37.8146C43.9764 35.6508 45.5819 34.0642 46.8033 32.8571C46.8434 32.8175 46.883 32.7783 46.9222 32.7396C47.1261 32.5378 47.3208 32.3451 47.5114 32.1525C50.4709 29.1607 52.2848 25.086 52.2848 20.5958C52.2848 11.4676 44.7603 4.01465 35.4124 4.01465Z", fill: "#B9BDC1" }), /* @__PURE__ */ React25.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M70.3394 21.106C70.2846 19.9987 69.3427 19.1455 68.2354 19.2002L63.4393 19.4373C62.332 19.492 61.4788 20.434 61.5335 21.5412C61.5883 22.6485 62.5302 23.5018 63.6375 23.447L68.4336 23.2099C69.5409 23.1552 70.3941 22.2132 70.3394 21.106Z", fill: "#D9D9D9" }), /* @__PURE__ */ React25.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M64.4519 39.4881C65.1324 38.6129 64.9746 37.3518 64.0994 36.6713L60.1598 33.608C59.2846 32.9275 58.0234 33.0853 57.3429 33.9605C56.6624 34.8356 56.8202 36.0968 57.6954 36.7773L61.6351 39.8406C62.5103 40.5211 63.7714 40.3633 64.4519 39.4881Z", fill: "#D9D9D9" }), /* @__PURE__ */ React25.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M58.6747 8.57034C57.9112 7.76654 57.9439 6.49599 58.7477 5.73249L62.366 2.29558C63.1698 1.53208 64.4404 1.56476 65.2039 2.36856C65.9673 3.17236 65.9347 4.44291 65.1309 5.20641L61.5125 8.64332C60.7087 9.40682 59.4382 9.37415 58.6747 8.57034Z", fill: "#D9D9D9" }), /* @__PURE__ */ React25.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.0991034 21.1063C0.153837 19.9991 1.09582 19.1458 2.20309 19.2006L6.99918 19.4376C8.10644 19.4924 8.95969 20.4343 8.90495 21.5416C8.85022 22.6489 7.90823 23.5021 6.80097 23.4474L2.00488 23.2103C0.897615 23.1556 0.0443701 22.2136 0.0991034 21.1063Z", fill: "#D9D9D9" }), /* @__PURE__ */ React25.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.98659 39.4881C5.30608 38.6129 5.4639 37.3518 6.33908 36.6713L10.2787 33.608C11.1539 32.9275 12.415 33.0853 13.0955 33.9605C13.776 34.8356 13.6182 36.0968 12.7431 36.7773L8.80341 39.8406C7.92822 40.5211 6.66709 40.3633 5.98659 39.4881Z", fill: "#D9D9D9" }), /* @__PURE__ */ React25.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.7638 8.57071C12.5273 7.76691 12.4946 6.49636 11.6908 5.73286L8.07248 2.29595C7.26867 1.53245 5.99813 1.56512 5.23463 2.36893C4.47113 3.17273 4.5038 4.44328 5.3076 5.20678L8.92593 8.64368C9.72974 9.40718 11.0003 9.37451 11.7638 8.57071Z", fill: "#D9D9D9" }));
|
|
3563
3566
|
};
|
|
3564
3567
|
|
|
3565
3568
|
// src/Components/EmptyState/EmptyState.tsx
|
|
3566
3569
|
var EmptyStateImageUrls = {
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3570
|
+
Crear: /* @__PURE__ */ React26.createElement(Crear, null),
|
|
3571
|
+
Error: /* @__PURE__ */ React26.createElement(Error2, null),
|
|
3572
|
+
Vacio: /* @__PURE__ */ React26.createElement(Empty, null),
|
|
3573
|
+
Buscar: /* @__PURE__ */ React26.createElement(Search2, null)
|
|
3571
3574
|
};
|
|
3572
3575
|
var DefaultIcon = ({
|
|
3573
|
-
state = "
|
|
3574
|
-
size = "
|
|
3576
|
+
state = "Crear",
|
|
3577
|
+
size = "Normal"
|
|
3575
3578
|
}) => {
|
|
3576
3579
|
const Icon = EmptyStateImageUrls[state];
|
|
3577
|
-
const iconSize = size === "
|
|
3578
|
-
return /* @__PURE__ */
|
|
3580
|
+
const iconSize = size === "Small" ? { width: "40px", height: "40px" } : { width: "60px", height: "60px" };
|
|
3581
|
+
return /* @__PURE__ */ React26.createElement("div", null, Icon);
|
|
3579
3582
|
};
|
|
3580
3583
|
var EmptyState = ({
|
|
3581
|
-
state = "
|
|
3582
|
-
size = "
|
|
3584
|
+
state = "Crear",
|
|
3585
|
+
size = "Normal",
|
|
3583
3586
|
title,
|
|
3584
3587
|
subtitle,
|
|
3585
3588
|
actions,
|
|
3586
3589
|
containerHeight = "100vh",
|
|
3587
|
-
icon = /* @__PURE__ */
|
|
3590
|
+
icon = /* @__PURE__ */ React26.createElement(DefaultIcon, { state, size })
|
|
3588
3591
|
}) => {
|
|
3589
|
-
const titleVariant = size === "
|
|
3590
|
-
const subtitleVariant = size === "
|
|
3591
|
-
return /* @__PURE__ */
|
|
3592
|
+
const titleVariant = size === "Small" ? "subtitle2" : "h6";
|
|
3593
|
+
const subtitleVariant = size === "Small" ? "caption" : "body1";
|
|
3594
|
+
return /* @__PURE__ */ React26.createElement(
|
|
3592
3595
|
Stack10,
|
|
3593
3596
|
{
|
|
3594
3597
|
alignItems: "center",
|
|
@@ -3597,8 +3600,8 @@ var EmptyState = ({
|
|
|
3597
3600
|
height: containerHeight,
|
|
3598
3601
|
"data-testid": "empty-state-container"
|
|
3599
3602
|
},
|
|
3600
|
-
icon && /* @__PURE__ */
|
|
3601
|
-
/* @__PURE__ */
|
|
3603
|
+
/* @__PURE__ */ React26.createElement(Stack10, { sx: { width: size === "Small" ? "40px" : "60px", height: size === "Small" ? "40px" : "60px" } }, icon && /* @__PURE__ */ React26.createElement(Stack10, null, icon)),
|
|
3604
|
+
/* @__PURE__ */ React26.createElement(Stack10, { gap: 0.5 }, /* @__PURE__ */ React26.createElement(Typography12, { color: "text.primary", variant: titleVariant, textAlign: "center" }, title), subtitle && /* @__PURE__ */ React26.createElement(
|
|
3602
3605
|
Typography12,
|
|
3603
3606
|
{
|
|
3604
3607
|
variant: subtitleVariant,
|
|
@@ -3607,7 +3610,7 @@ var EmptyState = ({
|
|
|
3607
3610
|
style: { whiteSpace: "pre-line" }
|
|
3608
3611
|
},
|
|
3609
3612
|
subtitle
|
|
3610
|
-
), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */
|
|
3613
|
+
), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */ React26.createElement(
|
|
3611
3614
|
Stack10,
|
|
3612
3615
|
{
|
|
3613
3616
|
direction: "row",
|
|
@@ -3617,15 +3620,15 @@ var EmptyState = ({
|
|
|
3617
3620
|
},
|
|
3618
3621
|
actions.map((action, index) => {
|
|
3619
3622
|
var _a, _b, _c, _d;
|
|
3620
|
-
return /* @__PURE__ */
|
|
3623
|
+
return /* @__PURE__ */ React26.createElement(
|
|
3621
3624
|
Button10,
|
|
3622
3625
|
{
|
|
3623
3626
|
key: index,
|
|
3624
3627
|
color: (_a = action.color) != null ? _a : "primary",
|
|
3625
|
-
variant: (_b = action.variant) != null ? _b : "text",
|
|
3628
|
+
variant: index == actions.length - 1 ? "outlined" : (_b = action.variant) != null ? _b : "text",
|
|
3626
3629
|
size: (_c = action.size) != null ? _c : "small",
|
|
3627
|
-
startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */
|
|
3628
|
-
endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */
|
|
3630
|
+
startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */ React26.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
|
|
3631
|
+
endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */ React26.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
|
|
3629
3632
|
onClick: action.onClick
|
|
3630
3633
|
},
|
|
3631
3634
|
capitalize((_d = action.text) != null ? _d : "action")
|
|
@@ -3636,13 +3639,13 @@ var EmptyState = ({
|
|
|
3636
3639
|
};
|
|
3637
3640
|
|
|
3638
3641
|
// src/assets/LogoCalendario.tsx
|
|
3639
|
-
import
|
|
3642
|
+
import React27 from "react";
|
|
3640
3643
|
var LogoCalendario = () => {
|
|
3641
|
-
return /* @__PURE__ */
|
|
3644
|
+
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)" }))));
|
|
3642
3645
|
};
|
|
3643
3646
|
|
|
3644
3647
|
// src/Components/Calendario/components/DayEventsList.tsx
|
|
3645
|
-
import
|
|
3648
|
+
import React28 from "react";
|
|
3646
3649
|
import { Box as Box15, Typography as Typography13, Divider as Divider5 } from "@mui/material";
|
|
3647
3650
|
var DayEventsList = ({
|
|
3648
3651
|
events,
|
|
@@ -3651,7 +3654,7 @@ var DayEventsList = ({
|
|
|
3651
3654
|
onEventHover
|
|
3652
3655
|
}) => {
|
|
3653
3656
|
const [first, ...rest] = events;
|
|
3654
|
-
return /* @__PURE__ */
|
|
3657
|
+
return /* @__PURE__ */ React28.createElement(Box15, { display: "flex", width: "100%", flexDirection: "column", height: "100%", pr: 1.5 }, /* @__PURE__ */ React28.createElement(Typography13, { width: "100%", color: "text.secondary" }, "Proximo evento"), first && /* @__PURE__ */ React28.createElement(Box15, { p: 1, pb: 1, width: "100%" }, /* @__PURE__ */ React28.createElement(
|
|
3655
3658
|
CalendarEventCard,
|
|
3656
3659
|
{
|
|
3657
3660
|
event: first,
|
|
@@ -3667,7 +3670,7 @@ var DayEventsList = ({
|
|
|
3667
3670
|
}
|
|
3668
3671
|
}
|
|
3669
3672
|
}
|
|
3670
|
-
)), /* @__PURE__ */
|
|
3673
|
+
)), /* @__PURE__ */ React28.createElement(Divider5, { flexItem: true, sx: { width: "100%" } }), /* @__PURE__ */ React28.createElement(Typography13, { width: "100%", py: 1, color: "text.secondary" }, "Eventos restantes"), /* @__PURE__ */ React28.createElement(
|
|
3671
3674
|
Box15,
|
|
3672
3675
|
{
|
|
3673
3676
|
width: "100%",
|
|
@@ -3680,7 +3683,7 @@ var DayEventsList = ({
|
|
|
3680
3683
|
flexDirection: "column",
|
|
3681
3684
|
gap: 1.5
|
|
3682
3685
|
},
|
|
3683
|
-
rest.map((event2) => /* @__PURE__ */
|
|
3686
|
+
rest.map((event2) => /* @__PURE__ */ React28.createElement(
|
|
3684
3687
|
CalendarEventCard,
|
|
3685
3688
|
{
|
|
3686
3689
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3764,21 +3767,21 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3764
3767
|
const noEvents = events.length === 0;
|
|
3765
3768
|
const days = getMonthDays(currentDate);
|
|
3766
3769
|
const weekDays = Array.from({ length: 7 }, (_, i) => dayjs5().day(i));
|
|
3767
|
-
const [openDrawer, setOpenDrawer] =
|
|
3768
|
-
const [selectedDay, setSelectedDay] =
|
|
3769
|
-
const [selectedEvents, setSelectedEvents] =
|
|
3770
|
-
return /* @__PURE__ */
|
|
3770
|
+
const [openDrawer, setOpenDrawer] = React29.useState(false);
|
|
3771
|
+
const [selectedDay, setSelectedDay] = React29.useState(null);
|
|
3772
|
+
const [selectedEvents, setSelectedEvents] = React29.useState([]);
|
|
3773
|
+
return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(Box16, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ React29.createElement(Box16, { minWidth: CALENDAR_CONSTANTS.MIN_WIDTH }, /* @__PURE__ */ React29.createElement(Box16, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ React29.createElement(Box16, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ React29.createElement(Typography14, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ React29.createElement(Box16, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ React29.createElement(CircularProgress2, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : seeDays == false ? /* @__PURE__ */ React29.createElement(
|
|
3771
3774
|
EmptyState,
|
|
3772
3775
|
{
|
|
3773
3776
|
containerHeight: "calc(100vh - 130px)",
|
|
3774
3777
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3775
3778
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3776
|
-
icon: /* @__PURE__ */
|
|
3779
|
+
icon: /* @__PURE__ */ React29.createElement(LogoCalendario, null)
|
|
3777
3780
|
}
|
|
3778
|
-
) : seeDays == true ? /* @__PURE__ */
|
|
3781
|
+
) : seeDays == true ? /* @__PURE__ */ React29.createElement(Box16, { display: "grid", gridTemplateColumns: CALENDAR_CONSTANTS.GRID_TEMPLATE, gap: 0.5 }, days.map((day) => {
|
|
3779
3782
|
const dayEvents = filterEventsForDay(events, day);
|
|
3780
3783
|
const isCurrentMonth = day.month() === currentDate.month();
|
|
3781
|
-
return /* @__PURE__ */
|
|
3784
|
+
return /* @__PURE__ */ React29.createElement(
|
|
3782
3785
|
Paper2,
|
|
3783
3786
|
{
|
|
3784
3787
|
key: day.toString(),
|
|
@@ -3795,7 +3798,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3795
3798
|
overflow: "hidden"
|
|
3796
3799
|
}
|
|
3797
3800
|
},
|
|
3798
|
-
/* @__PURE__ */
|
|
3801
|
+
/* @__PURE__ */ React29.createElement(Box16, { p: 1, flexShrink: 0 }, /* @__PURE__ */ React29.createElement(Box16, { display: "flex", alignItems: "center", justifyContent: "flex-start" }, /* @__PURE__ */ React29.createElement(
|
|
3799
3802
|
Box16,
|
|
3800
3803
|
{
|
|
3801
3804
|
sx: {
|
|
@@ -3808,7 +3811,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3808
3811
|
justifyContent: "center"
|
|
3809
3812
|
}
|
|
3810
3813
|
},
|
|
3811
|
-
/* @__PURE__ */
|
|
3814
|
+
/* @__PURE__ */ React29.createElement(
|
|
3812
3815
|
Typography14,
|
|
3813
3816
|
{
|
|
3814
3817
|
variant: "body2",
|
|
@@ -3816,7 +3819,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3816
3819
|
},
|
|
3817
3820
|
day.date()
|
|
3818
3821
|
)
|
|
3819
|
-
), dayEvents.length > CALENDAR_CONSTANTS.MAX_VISIBLE_EVENTS && /* @__PURE__ */
|
|
3822
|
+
), dayEvents.length > CALENDAR_CONSTANTS.MAX_VISIBLE_EVENTS && /* @__PURE__ */ React29.createElement(Tooltip6, { title: "M\xE1s eventos" }, /* @__PURE__ */ React29.createElement(
|
|
3820
3823
|
IconButton11,
|
|
3821
3824
|
{
|
|
3822
3825
|
color: "primary",
|
|
@@ -3828,9 +3831,9 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3828
3831
|
setSelectedEvents(dayEvents);
|
|
3829
3832
|
}
|
|
3830
3833
|
},
|
|
3831
|
-
/* @__PURE__ */
|
|
3834
|
+
/* @__PURE__ */ React29.createElement(AddIcon, { fontSize: "small" })
|
|
3832
3835
|
)))),
|
|
3833
|
-
/* @__PURE__ */
|
|
3836
|
+
/* @__PURE__ */ React29.createElement(Box16, { display: "flex", flexDirection: "column", gap: 0.5, p: 1, pt: 0, overflow: "hidden" }, dayEvents.slice(0, CALENDAR_CONSTANTS.MAX_VISIBLE_EVENTS).map((event2) => /* @__PURE__ */ React29.createElement(
|
|
3834
3837
|
CalendarEventCard,
|
|
3835
3838
|
{
|
|
3836
3839
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3840,7 +3843,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3840
3843
|
onHover: onEventHover
|
|
3841
3844
|
}
|
|
3842
3845
|
))),
|
|
3843
|
-
dayEvents.length > CALENDAR_CONSTANTS.MAX_VISIBLE_EVENTS && /* @__PURE__ */
|
|
3846
|
+
dayEvents.length > CALENDAR_CONSTANTS.MAX_VISIBLE_EVENTS && /* @__PURE__ */ React29.createElement(
|
|
3844
3847
|
Stack11,
|
|
3845
3848
|
{
|
|
3846
3849
|
justifyItems: "center",
|
|
@@ -3849,7 +3852,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3849
3852
|
onClick: (e) => e.stopPropagation(),
|
|
3850
3853
|
sx: { "& .MuiButtonBase-root": { width: "100%" } }
|
|
3851
3854
|
},
|
|
3852
|
-
/* @__PURE__ */
|
|
3855
|
+
/* @__PURE__ */ React29.createElement(
|
|
3853
3856
|
Button11,
|
|
3854
3857
|
{
|
|
3855
3858
|
size: "small",
|
|
@@ -3866,7 +3869,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3866
3869
|
)
|
|
3867
3870
|
)
|
|
3868
3871
|
);
|
|
3869
|
-
})) : null)), selectedDay && /* @__PURE__ */
|
|
3872
|
+
})) : null)), selectedDay && /* @__PURE__ */ React29.createElement(
|
|
3870
3873
|
SCDrawer,
|
|
3871
3874
|
{
|
|
3872
3875
|
width: CALENDAR_CONSTANTS.DRAWER_WIDTH,
|
|
@@ -3879,7 +3882,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3879
3882
|
anchor: "right",
|
|
3880
3883
|
actions: false,
|
|
3881
3884
|
arrayElements: [{
|
|
3882
|
-
component: /* @__PURE__ */
|
|
3885
|
+
component: /* @__PURE__ */ React29.createElement(
|
|
3883
3886
|
DayEventsList,
|
|
3884
3887
|
{
|
|
3885
3888
|
events: selectedEvents,
|
|
@@ -3894,7 +3897,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3894
3897
|
};
|
|
3895
3898
|
|
|
3896
3899
|
// src/Components/Calendario/Views/WeekView.tsx
|
|
3897
|
-
import
|
|
3900
|
+
import React30 from "react";
|
|
3898
3901
|
import { Box as Box17, CircularProgress as CircularProgress3, Typography as Typography15 } from "@mui/material";
|
|
3899
3902
|
import dayjs6 from "dayjs";
|
|
3900
3903
|
import localeData2 from "dayjs/plugin/localeData";
|
|
@@ -3930,9 +3933,9 @@ var WeekView = ({
|
|
|
3930
3933
|
}
|
|
3931
3934
|
return "none";
|
|
3932
3935
|
};
|
|
3933
|
-
return /* @__PURE__ */
|
|
3936
|
+
return /* @__PURE__ */ React30.createElement(Box17, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React30.createElement(Box17, { display: "flex", bgcolor: "transparent" }, /* @__PURE__ */ React30.createElement(Box17, { width: 45, bgcolor: "transparent" }), days.map((day) => {
|
|
3934
3937
|
const isToday2 = day.format("YYYY-MM-DD") === todayString;
|
|
3935
|
-
return /* @__PURE__ */
|
|
3938
|
+
return /* @__PURE__ */ React30.createElement(
|
|
3936
3939
|
Box17,
|
|
3937
3940
|
{
|
|
3938
3941
|
key: day.toString(),
|
|
@@ -3949,20 +3952,20 @@ var WeekView = ({
|
|
|
3949
3952
|
borderBottom: isToday2 ? 2 : 0,
|
|
3950
3953
|
borderColor: isToday2 ? "primary.main" : "transparent"
|
|
3951
3954
|
},
|
|
3952
|
-
/* @__PURE__ */
|
|
3953
|
-
/* @__PURE__ */
|
|
3955
|
+
/* @__PURE__ */ React30.createElement(Typography15, { variant: "h6", color: "text.primary" }, day.format("D")),
|
|
3956
|
+
/* @__PURE__ */ React30.createElement(Typography15, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
|
|
3954
3957
|
);
|
|
3955
|
-
})), isLoading ? /* @__PURE__ */
|
|
3958
|
+
})), isLoading ? /* @__PURE__ */ React30.createElement(Box17, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ React30.createElement(CircularProgress3, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && seeDays == false ? /* @__PURE__ */ React30.createElement(
|
|
3956
3959
|
EmptyState,
|
|
3957
3960
|
{
|
|
3958
3961
|
containerHeight: "calc(100vh - 130px)",
|
|
3959
3962
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3960
3963
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3961
|
-
icon: /* @__PURE__ */
|
|
3964
|
+
icon: /* @__PURE__ */ React30.createElement(LogoCalendario, null)
|
|
3962
3965
|
}
|
|
3963
3966
|
) : (
|
|
3964
3967
|
// Grid de horas y eventos
|
|
3965
|
-
/* @__PURE__ */
|
|
3968
|
+
/* @__PURE__ */ React30.createElement(Box17, { display: "flex", flex: 1 }, /* @__PURE__ */ React30.createElement(Box17, { width: 45, bgcolor: "transparent" }, hours.map((h) => /* @__PURE__ */ React30.createElement(
|
|
3966
3969
|
Box17,
|
|
3967
3970
|
{
|
|
3968
3971
|
key: h,
|
|
@@ -3971,7 +3974,7 @@ var WeekView = ({
|
|
|
3971
3974
|
pr: 1,
|
|
3972
3975
|
borderColor: "divider"
|
|
3973
3976
|
},
|
|
3974
|
-
/* @__PURE__ */
|
|
3977
|
+
/* @__PURE__ */ React30.createElement(Typography15, { variant: "caption", color: "text.secondary" }, dayjs6().hour(h).format("h A"))
|
|
3975
3978
|
))), days.map((day) => {
|
|
3976
3979
|
const dayEvents = events.filter(
|
|
3977
3980
|
(event2) => day.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
|
|
@@ -3980,7 +3983,7 @@ var WeekView = ({
|
|
|
3980
3983
|
const endsInRange = event2.end.hour() >= startHour && event2.end.hour() <= endHour;
|
|
3981
3984
|
return startsInRange || endsInRange;
|
|
3982
3985
|
}).sort((a, b) => a.start.valueOf() - b.start.valueOf());
|
|
3983
|
-
return /* @__PURE__ */
|
|
3986
|
+
return /* @__PURE__ */ React30.createElement(
|
|
3984
3987
|
Box17,
|
|
3985
3988
|
{
|
|
3986
3989
|
key: day.toString(),
|
|
@@ -3993,7 +3996,7 @@ var WeekView = ({
|
|
|
3993
3996
|
},
|
|
3994
3997
|
hours.map((hourIdx) => {
|
|
3995
3998
|
const borderType = getCellBorderType2(hourIdx, dayEvents);
|
|
3996
|
-
return /* @__PURE__ */
|
|
3999
|
+
return /* @__PURE__ */ React30.createElement(
|
|
3997
4000
|
Box17,
|
|
3998
4001
|
{
|
|
3999
4002
|
sx: { "&:hover": { bgcolor: "primary.50" } },
|
|
@@ -4010,7 +4013,7 @@ var WeekView = ({
|
|
|
4010
4013
|
const eventEnd = day.isSame(event2.end, "day") ? event2.end : day.endOf("day").hour(endHour).minute(59);
|
|
4011
4014
|
const startMinutes = (eventStart.hour() - startHour) * 60 + eventStart.minute();
|
|
4012
4015
|
const durationMinutes = eventEnd.diff(eventStart, "minute");
|
|
4013
|
-
return /* @__PURE__ */
|
|
4016
|
+
return /* @__PURE__ */ React30.createElement(
|
|
4014
4017
|
CalendarEventCard,
|
|
4015
4018
|
{
|
|
4016
4019
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -4035,7 +4038,7 @@ var WeekView = ({
|
|
|
4035
4038
|
};
|
|
4036
4039
|
|
|
4037
4040
|
// src/Components/Calendario/Views/DayView.tsx
|
|
4038
|
-
import
|
|
4041
|
+
import React31 from "react";
|
|
4039
4042
|
import { Box as Box18, CircularProgress as CircularProgress4, Typography as Typography16 } from "@mui/material";
|
|
4040
4043
|
import dayjs7 from "dayjs";
|
|
4041
4044
|
var DayView = ({
|
|
@@ -4051,15 +4054,15 @@ var DayView = ({
|
|
|
4051
4054
|
const hours = Array.from({ length: endHour - startHour + 1 }, (_, i) => startHour + i);
|
|
4052
4055
|
const dayEvents = filterEventsForDay(events, currentDate);
|
|
4053
4056
|
const noEvents = events.length === 0;
|
|
4054
|
-
return /* @__PURE__ */
|
|
4057
|
+
return /* @__PURE__ */ React31.createElement(Box18, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ React31.createElement(Box18, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ React31.createElement(Box18, { width: CALENDAR_CONSTANTS.SIDEBAR_WIDTH, bgcolor: "background.paper", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ React31.createElement(Box18, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ React31.createElement(Typography16, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ React31.createElement(Typography16, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ React31.createElement(Box18, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT }, /* @__PURE__ */ React31.createElement(CircularProgress4, { sx: { width: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE, height: CALENDAR_CONSTANTS.LOADING_SPINNER_SIZE }, variant: "indeterminate" })) : seeDays == false ? /* @__PURE__ */ React31.createElement(
|
|
4055
4058
|
EmptyState,
|
|
4056
4059
|
{
|
|
4057
4060
|
containerHeight: "calc(100vh - 140px)",
|
|
4058
4061
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
4059
4062
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
4060
|
-
icon: /* @__PURE__ */
|
|
4063
|
+
icon: /* @__PURE__ */ React31.createElement(LogoCalendario, null)
|
|
4061
4064
|
}
|
|
4062
|
-
) : /* @__PURE__ */
|
|
4065
|
+
) : /* @__PURE__ */ React31.createElement(Box18, { display: "flex", flex: 1 }, /* @__PURE__ */ React31.createElement(Box18, { width: CALENDAR_CONSTANTS.SIDEBAR_WIDTH, bgcolor: "background.paper" }, hours.map((h) => /* @__PURE__ */ React31.createElement(
|
|
4063
4066
|
Box18,
|
|
4064
4067
|
{
|
|
4065
4068
|
key: h,
|
|
@@ -4070,10 +4073,10 @@ var DayView = ({
|
|
|
4070
4073
|
borderRight: "1px solid",
|
|
4071
4074
|
borderColor: "divider"
|
|
4072
4075
|
},
|
|
4073
|
-
/* @__PURE__ */
|
|
4074
|
-
))), /* @__PURE__ */
|
|
4076
|
+
/* @__PURE__ */ React31.createElement(Typography16, { variant: "caption", color: "text.secondary" }, dayjs7().hour(h).format("h A"))
|
|
4077
|
+
))), /* @__PURE__ */ React31.createElement(Box18, { flex: 1, position: "relative" }, hours.map((hourIdx) => {
|
|
4075
4078
|
const borderType = getCellBorderType(hourIdx, dayEvents);
|
|
4076
|
-
return /* @__PURE__ */
|
|
4079
|
+
return /* @__PURE__ */ React31.createElement(
|
|
4077
4080
|
Box18,
|
|
4078
4081
|
{
|
|
4079
4082
|
sx: { "&:hover": { bgcolor: "primary.50" } },
|
|
@@ -4091,7 +4094,7 @@ var DayView = ({
|
|
|
4091
4094
|
startHour,
|
|
4092
4095
|
endHour
|
|
4093
4096
|
);
|
|
4094
|
-
return /* @__PURE__ */
|
|
4097
|
+
return /* @__PURE__ */ React31.createElement(
|
|
4095
4098
|
CalendarEventCard,
|
|
4096
4099
|
{
|
|
4097
4100
|
key: `${event2.id}-${currentDate.toString()}`,
|
|
@@ -4112,10 +4115,10 @@ var DayView = ({
|
|
|
4112
4115
|
};
|
|
4113
4116
|
|
|
4114
4117
|
// src/Components/Calendario/hooks/useCalendarNavigation.ts
|
|
4115
|
-
import { useState as
|
|
4118
|
+
import { useState as useState15 } from "react";
|
|
4116
4119
|
import dayjs8 from "dayjs";
|
|
4117
4120
|
var useCalendarNavigation = (initialDate, onDateChange) => {
|
|
4118
|
-
const [currentDate, setCurrentDate] =
|
|
4121
|
+
const [currentDate, setCurrentDate] = useState15(initialDate || dayjs8());
|
|
4119
4122
|
const getNavigationUnit = (view) => {
|
|
4120
4123
|
switch (view) {
|
|
4121
4124
|
case "day":
|
|
@@ -4169,7 +4172,7 @@ var Calendar = ({
|
|
|
4169
4172
|
endHour = CALENDAR_CONSTANTS.DEFAULT_END_HOUR,
|
|
4170
4173
|
seeDays = false
|
|
4171
4174
|
}) => {
|
|
4172
|
-
const [view, setView] =
|
|
4175
|
+
const [view, setView] = useState16(initialView);
|
|
4173
4176
|
const { currentDate, navigateDate } = useCalendarNavigation(dayjs9(), onDateChange);
|
|
4174
4177
|
useEffect12(() => {
|
|
4175
4178
|
onDateChange == null ? void 0 : onDateChange(currentDate);
|
|
@@ -4181,7 +4184,7 @@ var Calendar = ({
|
|
|
4181
4184
|
const handleNavigate = (action) => {
|
|
4182
4185
|
navigateDate(action, view);
|
|
4183
4186
|
};
|
|
4184
|
-
return /* @__PURE__ */
|
|
4187
|
+
return /* @__PURE__ */ React32.createElement(Box19, { bgcolor: "background.paper" }, /* @__PURE__ */ React32.createElement(
|
|
4185
4188
|
CalendarToolbar,
|
|
4186
4189
|
{
|
|
4187
4190
|
labelDate: currentDate,
|
|
@@ -4190,7 +4193,7 @@ var Calendar = ({
|
|
|
4190
4193
|
onNavigate: handleNavigate
|
|
4191
4194
|
},
|
|
4192
4195
|
toolbar
|
|
4193
|
-
), isLoading ? /* @__PURE__ */
|
|
4196
|
+
), isLoading ? /* @__PURE__ */ React32.createElement(
|
|
4194
4197
|
Box19,
|
|
4195
4198
|
{
|
|
4196
4199
|
display: "flex",
|
|
@@ -4198,7 +4201,7 @@ var Calendar = ({
|
|
|
4198
4201
|
alignItems: "center",
|
|
4199
4202
|
height: CALENDAR_CONSTANTS.LOADING_CONTAINER_HEIGHT
|
|
4200
4203
|
},
|
|
4201
|
-
/* @__PURE__ */
|
|
4204
|
+
/* @__PURE__ */ React32.createElement(
|
|
4202
4205
|
CircularProgress5,
|
|
4203
4206
|
{
|
|
4204
4207
|
variant: "indeterminate",
|
|
@@ -4208,7 +4211,7 @@ var Calendar = ({
|
|
|
4208
4211
|
}
|
|
4209
4212
|
}
|
|
4210
4213
|
)
|
|
4211
|
-
) : /* @__PURE__ */
|
|
4214
|
+
) : /* @__PURE__ */ React32.createElement(React32.Fragment, null, view === "month" && /* @__PURE__ */ React32.createElement(
|
|
4212
4215
|
MonthView,
|
|
4213
4216
|
{
|
|
4214
4217
|
events,
|
|
@@ -4219,7 +4222,7 @@ var Calendar = ({
|
|
|
4219
4222
|
onEventHover,
|
|
4220
4223
|
seeDays
|
|
4221
4224
|
}
|
|
4222
|
-
), view === "week" && /* @__PURE__ */
|
|
4225
|
+
), view === "week" && /* @__PURE__ */ React32.createElement(
|
|
4223
4226
|
WeekView,
|
|
4224
4227
|
{
|
|
4225
4228
|
events,
|
|
@@ -4232,7 +4235,7 @@ var Calendar = ({
|
|
|
4232
4235
|
endHour,
|
|
4233
4236
|
seeDays
|
|
4234
4237
|
}
|
|
4235
|
-
), view === "day" && /* @__PURE__ */
|
|
4238
|
+
), view === "day" && /* @__PURE__ */ React32.createElement(
|
|
4236
4239
|
DayView,
|
|
4237
4240
|
{
|
|
4238
4241
|
events,
|
|
@@ -4247,36 +4250,37 @@ var Calendar = ({
|
|
|
4247
4250
|
};
|
|
4248
4251
|
|
|
4249
4252
|
// src/Components/FooterAction/FooterAction.tsx
|
|
4250
|
-
import
|
|
4253
|
+
import React33 from "react";
|
|
4251
4254
|
import { AppBar, Toolbar, Box as Box20, Typography as Typography17 } from "@mui/material";
|
|
4252
4255
|
var FooterAction = ({
|
|
4253
4256
|
leftContent,
|
|
4254
4257
|
rightContent,
|
|
4255
4258
|
label,
|
|
4256
|
-
variant
|
|
4259
|
+
variant,
|
|
4260
|
+
width
|
|
4257
4261
|
}) => {
|
|
4258
|
-
return /* @__PURE__ */
|
|
4262
|
+
return /* @__PURE__ */ React33.createElement(
|
|
4259
4263
|
AppBar,
|
|
4260
4264
|
{
|
|
4261
4265
|
color: "inherit",
|
|
4262
|
-
sx: { position: variant == "float" ? "relative" : "fixed", left: 0, right: "auto", width: "100%", top: "auto", bottom: 0 }
|
|
4266
|
+
sx: { position: variant == "float" ? "relative" : "fixed", left: variant == "float" ? "auto" : "50%", transform: variant == "float" ? "none" : "translateX(-50%)", margin: variant == "float" ? "0 auto" : void 0, right: "auto", width: width != null ? width : "100%", top: "auto", bottom: 0 }
|
|
4263
4267
|
},
|
|
4264
|
-
/* @__PURE__ */
|
|
4268
|
+
/* @__PURE__ */ React33.createElement(
|
|
4265
4269
|
Toolbar,
|
|
4266
4270
|
{
|
|
4267
4271
|
id: "footer-toolbar",
|
|
4268
4272
|
sx: { gap: 1.5, minHeight: "50px !important" }
|
|
4269
4273
|
},
|
|
4270
4274
|
leftContent,
|
|
4271
|
-
/* @__PURE__ */
|
|
4272
|
-
label && /* @__PURE__ */
|
|
4275
|
+
/* @__PURE__ */ React33.createElement(Box20, { flexGrow: 1 }),
|
|
4276
|
+
label && /* @__PURE__ */ React33.createElement(Typography17, { variant: "body2", color: "text.secondary" }, label),
|
|
4273
4277
|
rightContent
|
|
4274
4278
|
)
|
|
4275
4279
|
);
|
|
4276
4280
|
};
|
|
4277
4281
|
|
|
4278
4282
|
// src/Components/Menu/Menu.tsx
|
|
4279
|
-
import
|
|
4283
|
+
import React34, { useCallback as useCallback3, useState as useState17 } from "react";
|
|
4280
4284
|
import { Button as Button12, Menu as Menu2 } from "@mui/material";
|
|
4281
4285
|
var BasicMenu = ({
|
|
4282
4286
|
open,
|
|
@@ -4287,8 +4291,8 @@ var BasicMenu = ({
|
|
|
4287
4291
|
options
|
|
4288
4292
|
}) => {
|
|
4289
4293
|
var _a, _b, _c, _d;
|
|
4290
|
-
const [internalAnchorEl, setInternalAnchorEl] =
|
|
4291
|
-
const [internalOpen, setInternalOpen] =
|
|
4294
|
+
const [internalAnchorEl, setInternalAnchorEl] = useState17(null);
|
|
4295
|
+
const [internalOpen, setInternalOpen] = useState17(open != null ? open : false);
|
|
4292
4296
|
const isControlled = Boolean(onClose);
|
|
4293
4297
|
const menuOpen = isControlled ? open != null ? open : false : internalOpen;
|
|
4294
4298
|
const setMenuOpen = isControlled ? () => {
|
|
@@ -4313,7 +4317,7 @@ var BasicMenu = ({
|
|
|
4313
4317
|
setMenuOpen(false);
|
|
4314
4318
|
}
|
|
4315
4319
|
}, [onClose, setMenuOpen]);
|
|
4316
|
-
return /* @__PURE__ */
|
|
4320
|
+
return /* @__PURE__ */ React34.createElement("div", null, /* @__PURE__ */ React34.createElement(
|
|
4317
4321
|
Button12,
|
|
4318
4322
|
{
|
|
4319
4323
|
id: "basic-button",
|
|
@@ -4326,7 +4330,7 @@ var BasicMenu = ({
|
|
|
4326
4330
|
size: (_c = button == null ? void 0 : button.size) != null ? _c : "small"
|
|
4327
4331
|
},
|
|
4328
4332
|
capitalize((_d = button == null ? void 0 : button.text) != null ? _d : "Menu")
|
|
4329
|
-
), /* @__PURE__ */
|
|
4333
|
+
), /* @__PURE__ */ React34.createElement(
|
|
4330
4334
|
Menu2,
|
|
4331
4335
|
{
|
|
4332
4336
|
id: "basic-menu",
|
|
@@ -4344,17 +4348,17 @@ var BasicMenu = ({
|
|
|
4344
4348
|
};
|
|
4345
4349
|
|
|
4346
4350
|
// src/Components/MultiSelect/MultiSelect.tsx
|
|
4347
|
-
import
|
|
4351
|
+
import React35, { useEffect as useEffect13, useMemo as useMemo5 } from "react";
|
|
4348
4352
|
import { Button as Button13, Checkbox as Checkbox2, FormControl as FormControl3, InputAdornment as InputAdornment5, ListItemIcon as ListItemIcon3, MenuItem as MenuItem5, Popover as Popover4, Stack as Stack12, TextField as TextField4 } from "@mui/material";
|
|
4349
4353
|
import { SearchOutlined } from "@mui/icons-material";
|
|
4350
4354
|
|
|
4351
4355
|
// src/Components/MultiSelect/helpers/useHandlers.tsx
|
|
4352
|
-
import { useCallback as useCallback4, useState as
|
|
4356
|
+
import { useCallback as useCallback4, useState as useState18 } from "react";
|
|
4353
4357
|
function useMultiSelectHandlers() {
|
|
4354
|
-
const [anchorEl, setAnchorEl] =
|
|
4355
|
-
const [open, setOpen] =
|
|
4356
|
-
const [selectedItems, setSelectedItems] =
|
|
4357
|
-
const [filterValue, setFilterValue] =
|
|
4358
|
+
const [anchorEl, setAnchorEl] = useState18(null);
|
|
4359
|
+
const [open, setOpen] = useState18(false);
|
|
4360
|
+
const [selectedItems, setSelectedItems] = useState18([]);
|
|
4361
|
+
const [filterValue, setFilterValue] = useState18("");
|
|
4358
4362
|
const handleOpen = useCallback4((e) => {
|
|
4359
4363
|
setAnchorEl(e.currentTarget);
|
|
4360
4364
|
setOpen(true);
|
|
@@ -4462,7 +4466,7 @@ function MultiSelect({
|
|
|
4462
4466
|
{ text: "Aplicar", fn: () => {
|
|
4463
4467
|
} }
|
|
4464
4468
|
];
|
|
4465
|
-
return /* @__PURE__ */
|
|
4469
|
+
return /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(
|
|
4466
4470
|
Button13,
|
|
4467
4471
|
{
|
|
4468
4472
|
"test-id": "multiselect-button",
|
|
@@ -4470,11 +4474,11 @@ function MultiSelect({
|
|
|
4470
4474
|
onClick: handleOpen,
|
|
4471
4475
|
variant: (_b = button == null ? void 0 : button.variant) != null ? _b : "text",
|
|
4472
4476
|
size: "small",
|
|
4473
|
-
startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */
|
|
4474
|
-
endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */
|
|
4477
|
+
startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */ React35.createElement(Icon, null) : null,
|
|
4478
|
+
endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */ React35.createElement(Icon, null) : null
|
|
4475
4479
|
},
|
|
4476
4480
|
capitalize((_c = button == null ? void 0 : button.text) != null ? _c : "")
|
|
4477
|
-
), /* @__PURE__ */
|
|
4481
|
+
), /* @__PURE__ */ React35.createElement(
|
|
4478
4482
|
Popover4,
|
|
4479
4483
|
{
|
|
4480
4484
|
elevation: 8,
|
|
@@ -4483,7 +4487,7 @@ function MultiSelect({
|
|
|
4483
4487
|
open: openMultiselect,
|
|
4484
4488
|
onClose: () => setOpen(false)
|
|
4485
4489
|
},
|
|
4486
|
-
/* @__PURE__ */
|
|
4490
|
+
/* @__PURE__ */ React35.createElement(Stack12, { minWidth: "320px", "data-testid": "multiselect-container", bgcolor: "white", boxShadow: 3, borderRadius: 1 }, /* @__PURE__ */ React35.createElement(Stack12, { py: 1, px: 2 }, topPanel != null ? topPanel : /* @__PURE__ */ React35.createElement(FormControl3, { fullWidth: true, size: "small" }, /* @__PURE__ */ React35.createElement(
|
|
4487
4491
|
TextField4,
|
|
4488
4492
|
{
|
|
4489
4493
|
sx: { background: background ? background : "transparent" },
|
|
@@ -4496,18 +4500,18 @@ function MultiSelect({
|
|
|
4496
4500
|
onChange: handleFilterChange,
|
|
4497
4501
|
slotProps: {
|
|
4498
4502
|
input: {
|
|
4499
|
-
endAdornment: /* @__PURE__ */
|
|
4503
|
+
endAdornment: /* @__PURE__ */ React35.createElement(InputAdornment5, { position: "end" }, /* @__PURE__ */ React35.createElement(SearchOutlined, { fontSize: "small" }))
|
|
4500
4504
|
}
|
|
4501
4505
|
}
|
|
4502
4506
|
}
|
|
4503
|
-
))), /* @__PURE__ */
|
|
4507
|
+
))), /* @__PURE__ */ React35.createElement(Stack12, { maxHeight: "300px", overflow: "auto" }, selectAll && /* @__PURE__ */ React35.createElement(MenuItem5, { dense, onClick: handleSelectAll }, /* @__PURE__ */ React35.createElement(ListItemIcon3, null, /* @__PURE__ */ React35.createElement(Checkbox2, { checked: allSelected, color: "primary" })), "Todos los items"), sortedItems.length > 0 ? sortedItems.map((item) => /* @__PURE__ */ React35.createElement(
|
|
4504
4508
|
MenuItem5,
|
|
4505
4509
|
{
|
|
4506
4510
|
key: getItemLabel(item),
|
|
4507
4511
|
dense,
|
|
4508
4512
|
onClick: () => handleCheckboxToggle(item)
|
|
4509
4513
|
},
|
|
4510
|
-
/* @__PURE__ */
|
|
4514
|
+
/* @__PURE__ */ React35.createElement(ListItemIcon3, null, /* @__PURE__ */ React35.createElement(
|
|
4511
4515
|
Checkbox2,
|
|
4512
4516
|
{
|
|
4513
4517
|
checked: selectedItems.includes(item),
|
|
@@ -4515,9 +4519,9 @@ function MultiSelect({
|
|
|
4515
4519
|
}
|
|
4516
4520
|
)),
|
|
4517
4521
|
getItemLabel(item)
|
|
4518
|
-
)) : /* @__PURE__ */
|
|
4522
|
+
)) : /* @__PURE__ */ React35.createElement(MenuItem5, { disabled: true }, "No se encontraron resultados")), /* @__PURE__ */ React35.createElement(Stack12, { direction: "row", gap: 1, p: 1, justifyContent: "space-between", bgcolor: "grey.50" }, resolvedActions.map((button2, index) => {
|
|
4519
4523
|
var _a2;
|
|
4520
|
-
return /* @__PURE__ */
|
|
4524
|
+
return /* @__PURE__ */ React35.createElement(
|
|
4521
4525
|
Button13,
|
|
4522
4526
|
{
|
|
4523
4527
|
key: index,
|
|
@@ -4533,7 +4537,7 @@ function MultiSelect({
|
|
|
4533
4537
|
}
|
|
4534
4538
|
|
|
4535
4539
|
// src/Components/PageHeader/PageHeader.tsx
|
|
4536
|
-
import
|
|
4540
|
+
import React36 from "react";
|
|
4537
4541
|
import { Stack as Stack13, Typography as Typography18 } from "@mui/material";
|
|
4538
4542
|
var PageHeader = ({
|
|
4539
4543
|
title,
|
|
@@ -4543,7 +4547,7 @@ var PageHeader = ({
|
|
|
4543
4547
|
fixed,
|
|
4544
4548
|
shadow = true
|
|
4545
4549
|
}) => {
|
|
4546
|
-
return /* @__PURE__ */
|
|
4550
|
+
return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(
|
|
4547
4551
|
Stack13,
|
|
4548
4552
|
{
|
|
4549
4553
|
"data-testid": "main-container",
|
|
@@ -4555,12 +4559,12 @@ var PageHeader = ({
|
|
|
4555
4559
|
zIndex: 10,
|
|
4556
4560
|
sx: { boxShadow: shadow ? (theme) => theme.shadows[1] : "none" }
|
|
4557
4561
|
},
|
|
4558
|
-
/* @__PURE__ */
|
|
4559
|
-
), fixed && /* @__PURE__ */
|
|
4562
|
+
/* @__PURE__ */ React36.createElement(Stack13, { "data-testid": "page-header-content", height: 40, px: 3, pl: buttonBack ? 1 : 3, direction: "row", alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React36.createElement(Stack13, { id: "left-section", direction: "row", alignItems: "center", gap: 1 }, buttonBack, /* @__PURE__ */ React36.createElement(Stack13, { id: "text-section", gap: 0.5 }, /* @__PURE__ */ React36.createElement(Typography18, { "data-testid": "page-header-title", variant: "h6", color: "text.primary" }, title), subtitle && /* @__PURE__ */ React36.createElement(Typography18, { "data-testid": "page-header-subtitle", variant: "caption", color: "text.secondary" }, subtitle))), actions && /* @__PURE__ */ React36.createElement(Stack13, { id: "right-actions", direction: "row", alignItems: "center", gap: 1 }, actions))
|
|
4563
|
+
), fixed && /* @__PURE__ */ React36.createElement(Stack13, { sx: { height: 48 } }));
|
|
4560
4564
|
};
|
|
4561
4565
|
|
|
4562
4566
|
// src/Components/SCAccordion.tsx
|
|
4563
|
-
import
|
|
4567
|
+
import React37, { useState as useState19 } from "react";
|
|
4564
4568
|
import { Box as Box21, Typography as Typography19, Accordion, AccordionSummary, AccordionDetails } from "@mui/material";
|
|
4565
4569
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
4566
4570
|
var SCAccordion = ({
|
|
@@ -4568,18 +4572,18 @@ var SCAccordion = ({
|
|
|
4568
4572
|
actions,
|
|
4569
4573
|
children
|
|
4570
4574
|
}) => {
|
|
4571
|
-
const [open, setOpen] =
|
|
4572
|
-
return /* @__PURE__ */
|
|
4575
|
+
const [open, setOpen] = useState19(false);
|
|
4576
|
+
return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(Accordion, null, /* @__PURE__ */ React37.createElement(
|
|
4573
4577
|
AccordionSummary,
|
|
4574
4578
|
{
|
|
4575
|
-
expandIcon: /* @__PURE__ */
|
|
4579
|
+
expandIcon: /* @__PURE__ */ React37.createElement(ExpandMoreIcon, { fontSize: "small", color: "action" })
|
|
4576
4580
|
},
|
|
4577
|
-
/* @__PURE__ */
|
|
4578
|
-
), /* @__PURE__ */
|
|
4581
|
+
/* @__PURE__ */ React37.createElement(Box21, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%" } }, typeof title === "string" ? /* @__PURE__ */ React37.createElement(Typography19, { noWrap: true, variant: "body1", color: "text.primary" }, title) : title, actions)
|
|
4582
|
+
), /* @__PURE__ */ React37.createElement(AccordionDetails, { sx: { padding: "12px" } }, children)));
|
|
4579
4583
|
};
|
|
4580
4584
|
|
|
4581
4585
|
// src/Components/SCActivityCalendar.tsx
|
|
4582
|
-
import
|
|
4586
|
+
import React39, { useState as useState21 } from "react";
|
|
4583
4587
|
import { Typography as Typography21, IconButton as IconButton13, Box as Box23, Badge, Menu as Menu3, MenuItem as MenuItem7, ListItemIcon as ListItemIcon5, Popover as Popover6 } from "@mui/material";
|
|
4584
4588
|
import Grid8 from "@mui/material/Grid";
|
|
4585
4589
|
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
@@ -4589,14 +4593,14 @@ import { es } from "date-fns/locale";
|
|
|
4589
4593
|
import { format, startOfWeek, addDays, isSameDay } from "date-fns";
|
|
4590
4594
|
|
|
4591
4595
|
// src/Components/SCListContent.tsx
|
|
4592
|
-
import
|
|
4596
|
+
import React38 from "react";
|
|
4593
4597
|
import { Divider as Divider6, List, ListItemButton, ListItemIcon as ListItemIcon4, ListItemText as ListItemText3, SvgIcon as SvgIcon7 } from "@mui/material";
|
|
4594
4598
|
import Grid7 from "@mui/material/Grid";
|
|
4595
4599
|
import Avatar2 from "@mui/material/Avatar";
|
|
4596
4600
|
import * as Muicon7 from "@mui/icons-material";
|
|
4597
4601
|
var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" }) => {
|
|
4598
|
-
const [selectedIndex, setSelectedIndex] =
|
|
4599
|
-
const [value, setValue] =
|
|
4602
|
+
const [selectedIndex, setSelectedIndex] = React38.useState("1");
|
|
4603
|
+
const [value, setValue] = React38.useState("1");
|
|
4600
4604
|
options.map(function(option, index, array) {
|
|
4601
4605
|
if (option == null ? void 0 : option.iconLeft) {
|
|
4602
4606
|
if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
|
|
@@ -4615,26 +4619,26 @@ var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" })
|
|
|
4615
4619
|
}
|
|
4616
4620
|
}
|
|
4617
4621
|
});
|
|
4618
|
-
return /* @__PURE__ */
|
|
4622
|
+
return /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(List, { sx: { width: "100%", bgcolor: "background.paper", padding: "0px !important" } }, options.map((option, index) => {
|
|
4619
4623
|
var _a, _b;
|
|
4620
|
-
return /* @__PURE__ */
|
|
4624
|
+
return /* @__PURE__ */ React38.createElement(React38.Fragment, { key: index }, /* @__PURE__ */ React38.createElement(
|
|
4621
4625
|
ListItemButton,
|
|
4622
4626
|
{
|
|
4623
4627
|
disabled: option.disable,
|
|
4624
4628
|
onClick: option.fn,
|
|
4625
4629
|
sx: { gap: 1, padding: iconLeftType == "Icon" ? "8px 8px" : "8px 8px 8px 0px" }
|
|
4626
4630
|
},
|
|
4627
|
-
option.iconLeft ? iconLeftType == "Icon" ? /* @__PURE__ */
|
|
4628
|
-
/* @__PURE__ */
|
|
4631
|
+
option.iconLeft ? iconLeftType == "Icon" ? /* @__PURE__ */ React38.createElement(ListItemIcon4, { sx: { minWidth: "0px !important" } }, /* @__PURE__ */ React38.createElement(SvgIcon7, { fontSize: "small", sx: { color: option.iconLeftColor || "action" }, component: option.iconLeft })) : /* @__PURE__ */ React38.createElement(Avatar2, { sx: { width: 25, height: 25, fontSize: "11px", bgcolor: option.iconLeftColor ? `${option.iconLeftColor}.main` : "default" } }, ((_a = option.iconLeft) == null ? void 0 : _a.type) != void 0 ? /* @__PURE__ */ React38.createElement(SvgIcon7, { fontSize: "small", component: option.iconLeft }) : option.iconLeft) : "",
|
|
4632
|
+
/* @__PURE__ */ React38.createElement(
|
|
4629
4633
|
ListItemText3,
|
|
4630
4634
|
{
|
|
4631
4635
|
sx: { color: option.colorDisabled == true ? "text.disabled" : "default" },
|
|
4632
4636
|
primary: option.title,
|
|
4633
|
-
secondary: /* @__PURE__ */
|
|
4637
|
+
secondary: /* @__PURE__ */ React38.createElement(Grid7, { gap: 0.5 }, /* @__PURE__ */ React38.createElement(Grid7, { container: true, gap: 0.5, sx: { color: option.colorDisabled == true ? "text.disabled" : "default" } }, option.subtitle), /* @__PURE__ */ React38.createElement(Grid7, { container: true, gap: 0.5, sx: { color: option.colorDisabled == true ? "text.disabled" : "default" } }, option.description))
|
|
4634
4638
|
}
|
|
4635
4639
|
),
|
|
4636
|
-
option.iconRight ? iconRightType == "Icon" ? /* @__PURE__ */
|
|
4637
|
-
), option.divider == true ? /* @__PURE__ */
|
|
4640
|
+
option.iconRight ? iconRightType == "Icon" ? /* @__PURE__ */ React38.createElement(ListItemIcon4, { sx: { minWidth: "0px !important", marginRight: "8px" } }, /* @__PURE__ */ React38.createElement(SvgIcon7, { fontSize: "small", sx: { color: option.iconRightColor || "action" }, component: option.iconRight })) : /* @__PURE__ */ React38.createElement(Avatar2, { variant: "circular", sx: { width: 20, height: 20 } }, ((_b = option.iconRight) == null ? void 0 : _b.type) != void 0 ? /* @__PURE__ */ React38.createElement(SvgIcon7, { fontSize: "small", color: option.iconRightColor || "action", component: option.iconRight }) : option.iconRight) : ""
|
|
4641
|
+
), option.divider == true ? /* @__PURE__ */ React38.createElement(Divider6, null) : "");
|
|
4638
4642
|
})));
|
|
4639
4643
|
};
|
|
4640
4644
|
|
|
@@ -4660,22 +4664,22 @@ var SCActivityCalendar = ({
|
|
|
4660
4664
|
configRangeHour
|
|
4661
4665
|
}) => {
|
|
4662
4666
|
let convertFecha;
|
|
4663
|
-
const [fecha, setFecha] =
|
|
4664
|
-
const [fechaSeleccionada, setFechaSeleccionada] =
|
|
4665
|
-
const [stateVal, setstateVal] =
|
|
4666
|
-
const [openCalendar, setOpenCalendar] =
|
|
4667
|
-
const [anchorPopoverFiltro, setAnchorPopoverFiltro] =
|
|
4668
|
-
const [datosEventos, setDatosEventos] =
|
|
4667
|
+
const [fecha, setFecha] = useState21(/* @__PURE__ */ new Date());
|
|
4668
|
+
const [fechaSeleccionada, setFechaSeleccionada] = useState21();
|
|
4669
|
+
const [stateVal, setstateVal] = React39.useState(/* @__PURE__ */ new Date());
|
|
4670
|
+
const [openCalendar, setOpenCalendar] = React39.useState(false);
|
|
4671
|
+
const [anchorPopoverFiltro, setAnchorPopoverFiltro] = useState21(null);
|
|
4672
|
+
const [datosEventos, setDatosEventos] = React39.useState(events);
|
|
4669
4673
|
const openPopoverFiltro = Boolean(anchorPopoverFiltro);
|
|
4670
4674
|
const hoy = /* @__PURE__ */ new Date();
|
|
4671
4675
|
const inicioSemana = startOfWeek(fecha, { weekStartsOn: 0 });
|
|
4672
4676
|
const diasSemana = Array.from({ length: 7 }, (_, i) => addDays(inicioSemana, i));
|
|
4673
|
-
|
|
4677
|
+
React39.useEffect(() => {
|
|
4674
4678
|
if (fecha != null) {
|
|
4675
4679
|
handleConvertFecha(fecha);
|
|
4676
4680
|
}
|
|
4677
4681
|
}, [fecha]);
|
|
4678
|
-
|
|
4682
|
+
React39.useEffect(() => {
|
|
4679
4683
|
if (events != null) {
|
|
4680
4684
|
setDatosEventos(events);
|
|
4681
4685
|
}
|
|
@@ -4715,7 +4719,7 @@ var SCActivityCalendar = ({
|
|
|
4715
4719
|
setDatosEventos(resultado);
|
|
4716
4720
|
}
|
|
4717
4721
|
};
|
|
4718
|
-
return /* @__PURE__ */
|
|
4722
|
+
return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(LocalizationProvider2, { dateAdapter: AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React39.createElement(Box23, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React39.createElement(Box23, { sx: { width: "100%", padding: "0px", background: "transparent" } }, /* @__PURE__ */ React39.createElement(Grid8, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 16px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React39.createElement(Grid8, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React39.createElement(Box23, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React39.createElement(Typography21, { sx: { fontSize: "12px !important", color: "#10184099" } }, format(dia, "EEEE", { locale: es }).charAt(0).toUpperCase())), /* @__PURE__ */ React39.createElement(
|
|
4719
4723
|
Box23,
|
|
4720
4724
|
{
|
|
4721
4725
|
onClick: () => setFecha(dia),
|
|
@@ -4728,8 +4732,8 @@ var SCActivityCalendar = ({
|
|
|
4728
4732
|
position: "relative"
|
|
4729
4733
|
}
|
|
4730
4734
|
},
|
|
4731
|
-
/* @__PURE__ */
|
|
4732
|
-
)))), /* @__PURE__ */
|
|
4735
|
+
/* @__PURE__ */ React39.createElement(Typography21, { sx: { fontSize: "12px !important", color: isSameDay(dia, fecha) ? "white" : "#101840DE" } }, format(dia, "d"))
|
|
4736
|
+
)))), /* @__PURE__ */ React39.createElement(Grid8, { container: true, justifyContent: "center" }, /* @__PURE__ */ React39.createElement(IconButton13, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ React39.createElement(KeyboardDoubleArrowDownIcon, { color: "action" }))))) : /* @__PURE__ */ React39.createElement(Box23, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React39.createElement(
|
|
4733
4737
|
StaticDatePicker,
|
|
4734
4738
|
{
|
|
4735
4739
|
orientation: "landscape",
|
|
@@ -4754,7 +4758,7 @@ var SCActivityCalendar = ({
|
|
|
4754
4758
|
},
|
|
4755
4759
|
onChange: (newValue) => setFecha(newValue)
|
|
4756
4760
|
}
|
|
4757
|
-
), /* @__PURE__ */
|
|
4761
|
+
), /* @__PURE__ */ React39.createElement(Grid8, { container: true, justifyContent: "center" }, /* @__PURE__ */ React39.createElement(IconButton13, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React39.createElement(KeyboardDoubleArrowUpIcon, { color: "action" }))))), /* @__PURE__ */ React39.createElement(IconButton13, { onClick: handleClickPopoverFiltro, sx: { position: "fixed", right: "calc(100% - 96%)", top: openCalendar == false ? "220px" : "444px" } }, /* @__PURE__ */ React39.createElement(FilterListIcon, { color: "action" })), /* @__PURE__ */ React39.createElement(
|
|
4758
4762
|
Popover6,
|
|
4759
4763
|
{
|
|
4760
4764
|
open: openPopoverFiltro,
|
|
@@ -4765,7 +4769,7 @@ var SCActivityCalendar = ({
|
|
|
4765
4769
|
horizontal: "right"
|
|
4766
4770
|
}
|
|
4767
4771
|
},
|
|
4768
|
-
/* @__PURE__ */
|
|
4772
|
+
/* @__PURE__ */ React39.createElement(
|
|
4769
4773
|
Menu3,
|
|
4770
4774
|
{
|
|
4771
4775
|
id: "basic-menu",
|
|
@@ -4778,24 +4782,24 @@ var SCActivityCalendar = ({
|
|
|
4778
4782
|
}
|
|
4779
4783
|
}
|
|
4780
4784
|
},
|
|
4781
|
-
/* @__PURE__ */
|
|
4782
|
-
/* @__PURE__ */
|
|
4783
|
-
/* @__PURE__ */
|
|
4784
|
-
/* @__PURE__ */
|
|
4785
|
+
/* @__PURE__ */ React39.createElement(MenuItem7, { onClick: (event2) => filtrarActividad(event2, "Todo") }, /* @__PURE__ */ React39.createElement(ListItemIcon5, null, /* @__PURE__ */ React39.createElement(CalendarMonthOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React39.createElement(Typography21, { variant: "inherit" }, "Ver todo")),
|
|
4786
|
+
/* @__PURE__ */ React39.createElement(MenuItem7, { onClick: (event2) => filtrarActividad(event2, "Finalizada") }, /* @__PURE__ */ React39.createElement(ListItemIcon5, null, /* @__PURE__ */ React39.createElement(CheckCircleOutlineOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React39.createElement(Typography21, { variant: "inherit" }, "Ver finalizadas")),
|
|
4787
|
+
/* @__PURE__ */ React39.createElement(MenuItem7, { onClick: (event2) => filtrarActividad(event2, "Aplazada") }, /* @__PURE__ */ React39.createElement(ListItemIcon5, null, /* @__PURE__ */ React39.createElement(EventBusyOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React39.createElement(Typography21, { variant: "inherit" }, "Ver aplazadas")),
|
|
4788
|
+
/* @__PURE__ */ React39.createElement(MenuItem7, { onClick: (event2) => filtrarActividad(event2, "En progreso") }, /* @__PURE__ */ React39.createElement(ListItemIcon5, null, /* @__PURE__ */ React39.createElement(PendingOutlinedIcon, { fontSize: "small" })), /* @__PURE__ */ React39.createElement(Typography21, { variant: "inherit" }, "Ver en progreso"))
|
|
4785
4789
|
)
|
|
4786
|
-
), /* @__PURE__ */
|
|
4790
|
+
), /* @__PURE__ */ React39.createElement(Box23, { sx: { boxSizing: "border-box", padding: "0px 16px", width: "100%", height: openCalendar ? "calc(91% - 316px)" : "calc(91% - 100px)", background: "white", display: "flex", flexDirection: "column", overflowY: "auto", gap: "8px", scrollSnapType: "x mandatory", paddingBottom: "10px" } }, diasSemana.map((day, dayIndex) => /* @__PURE__ */ React39.createElement(
|
|
4787
4791
|
Box23,
|
|
4788
4792
|
{
|
|
4789
4793
|
key: dayIndex
|
|
4790
4794
|
},
|
|
4791
|
-
/* @__PURE__ */
|
|
4795
|
+
/* @__PURE__ */ React39.createElement(Grid8, { container: true }, /* @__PURE__ */ React39.createElement(Typography21, { variant: "subtitle1", sx: { color: isSameDay(day, fecha) ? "info.dark" : "text.secondary" } }, day.toLocaleDateString("es-ES", {
|
|
4792
4796
|
day: "numeric"
|
|
4793
4797
|
}), " de ", day.toLocaleDateString("es-ES", {
|
|
4794
4798
|
month: "short"
|
|
4795
4799
|
}), ", ", day.toLocaleDateString("es-ES", {
|
|
4796
4800
|
weekday: "long"
|
|
4797
4801
|
}))),
|
|
4798
|
-
/* @__PURE__ */
|
|
4802
|
+
/* @__PURE__ */ React39.createElement(Box23, { sx: {
|
|
4799
4803
|
display: "flex",
|
|
4800
4804
|
flexDirection: "column"
|
|
4801
4805
|
} }, (() => {
|
|
@@ -4804,16 +4808,16 @@ var SCActivityCalendar = ({
|
|
|
4804
4808
|
(event2) => (/* @__PURE__ */ new Date(event2.date + "T00:00:00")).toDateString() === day.toDateString()
|
|
4805
4809
|
);
|
|
4806
4810
|
if (eventosDelDia.length > 0) {
|
|
4807
|
-
return eventosDelDia.map((event2, idx) => /* @__PURE__ */
|
|
4811
|
+
return eventosDelDia.map((event2, idx) => /* @__PURE__ */ React39.createElement(
|
|
4808
4812
|
SCListContent,
|
|
4809
4813
|
{
|
|
4810
4814
|
key: idx,
|
|
4811
4815
|
options: [{
|
|
4812
4816
|
title: event2.activityDescription,
|
|
4813
|
-
subtitle: /* @__PURE__ */
|
|
4817
|
+
subtitle: /* @__PURE__ */ React39.createElement(React39.Fragment, null, configRangeHour && (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).getHours() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[0])).getHours() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).getHours() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[1])).getHours() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).getMinutes() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[0])).getMinutes() && (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).getMinutes() === (/* @__PURE__ */ new Date(event2.date + "T" + configRangeHour.split("-")[1])).getMinutes() ? /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(Typography21, { variant: "body2" }, "Todo el dia"), /* @__PURE__ */ React39.createElement(LightModeOutlinedIcon, { fontSize: "small" })) : /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(Typography21, { variant: "body2" }, (/* @__PURE__ */ new Date(event2.date + "T" + event2.startTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })), /* @__PURE__ */ React39.createElement(ArrowForwardIcon, { fontSize: "small" }), /* @__PURE__ */ React39.createElement(Typography21, { variant: "body2" }, (/* @__PURE__ */ new Date(event2.date + "T" + event2.finalTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })))),
|
|
4814
4818
|
iconLeftColor: event2.state === "Finalizada" ? "#C7E49D" : "action",
|
|
4815
4819
|
iconLeft: event2.state === "Finalizada" ? "CheckCircle" : event2.state === "Aplazada" ? "EventBusyOutlined" : event2.state === "En progreso" ? "PendingOutlined" : "RadioButtonUnchecked",
|
|
4816
|
-
description: /* @__PURE__ */
|
|
4820
|
+
description: /* @__PURE__ */ React39.createElement(Grid8, { display: "flex", flexDirection: "column", alignItems: "flex-start" }, event2.state === "Aplazada" || event2.state === "En progreso" || event2.state === "Auto asignada" ? /* @__PURE__ */ React39.createElement(Grid8, { display: "flex", flexDirection: "row", alignItems: "center", gap: 0.5, sx: { marginLeft: "7px" } }, /* @__PURE__ */ React39.createElement(Badge, { variant: "dot", badgeContent: "", sx: { display: "flex", alignItems: "center", "& .MuiBadge-badge": { top: "50%", transform: "translateY(-50%)" }, color: "action" } }), /* @__PURE__ */ React39.createElement(Typography21, { variant: "body2" }, event2.state == "Auto asignada" ? "Adicional" : event2.state)) : null, /* @__PURE__ */ React39.createElement(Typography21, { variant: "body1" }, event2.equipmentDescription)),
|
|
4817
4821
|
divider: eventosDelDia.length === idx + 1 ? false : true,
|
|
4818
4822
|
colorDisabled: event2.state === "Finalizada" || event2.state === "Aplazada" || event2.state === "En progreso" ? true : false,
|
|
4819
4823
|
fn: fn ? () => fn(event2) : void 0
|
|
@@ -4821,7 +4825,7 @@ var SCActivityCalendar = ({
|
|
|
4821
4825
|
}
|
|
4822
4826
|
));
|
|
4823
4827
|
} else {
|
|
4824
|
-
return /* @__PURE__ */
|
|
4828
|
+
return /* @__PURE__ */ React39.createElement(
|
|
4825
4829
|
SCListContent,
|
|
4826
4830
|
{
|
|
4827
4831
|
options: [{
|
|
@@ -4837,7 +4841,7 @@ var SCActivityCalendar = ({
|
|
|
4837
4841
|
};
|
|
4838
4842
|
|
|
4839
4843
|
// src/Components/SCAlert.tsx
|
|
4840
|
-
import
|
|
4844
|
+
import React40 from "react";
|
|
4841
4845
|
import { Alert, AlertTitle, Typography as Typography22 } from "@mui/material";
|
|
4842
4846
|
var SCAlert = ({
|
|
4843
4847
|
title,
|
|
@@ -4852,7 +4856,7 @@ var SCAlert = ({
|
|
|
4852
4856
|
const handleClose = (event2) => {
|
|
4853
4857
|
setOpenState(false);
|
|
4854
4858
|
};
|
|
4855
|
-
return /* @__PURE__ */
|
|
4859
|
+
return /* @__PURE__ */ React40.createElement(React40.Fragment, null, openState && /* @__PURE__ */ React40.createElement(
|
|
4856
4860
|
Alert,
|
|
4857
4861
|
__spreadProps(__spreadValues({
|
|
4858
4862
|
severity,
|
|
@@ -4867,13 +4871,13 @@ var SCAlert = ({
|
|
|
4867
4871
|
}
|
|
4868
4872
|
})
|
|
4869
4873
|
}),
|
|
4870
|
-
/* @__PURE__ */
|
|
4871
|
-
subtitle ? /* @__PURE__ */
|
|
4874
|
+
/* @__PURE__ */ React40.createElement(AlertTitle, null, title),
|
|
4875
|
+
subtitle ? /* @__PURE__ */ React40.createElement(Typography22, { variant: "body3" }, subtitle) : null
|
|
4872
4876
|
));
|
|
4873
4877
|
};
|
|
4874
4878
|
|
|
4875
4879
|
// src/Components/SCAppBar.tsx
|
|
4876
|
-
import
|
|
4880
|
+
import React41, { useState as useState22, useEffect as useEffect16 } from "react";
|
|
4877
4881
|
import { Menu as Menu4, Box as Box24, Typography as Typography23, MenuItem as MenuItem8, IconButton as IconButton14, Badge as Badge2 } from "@mui/material";
|
|
4878
4882
|
import Grid9 from "@mui/material/Grid";
|
|
4879
4883
|
import "dayjs/locale/es";
|
|
@@ -4889,8 +4893,8 @@ var SCAppBar = ({
|
|
|
4889
4893
|
visibleConexion = true,
|
|
4890
4894
|
visibleMenu = true
|
|
4891
4895
|
}) => {
|
|
4892
|
-
const [isOnline, setIsOnline] =
|
|
4893
|
-
const [anchorEl, setAnchorEl] =
|
|
4896
|
+
const [isOnline, setIsOnline] = useState22(window.navigator.onLine);
|
|
4897
|
+
const [anchorEl, setAnchorEl] = useState22(null);
|
|
4894
4898
|
const openMenu = Boolean(anchorEl);
|
|
4895
4899
|
const handleMenuClick = (event2) => {
|
|
4896
4900
|
setAnchorEl(event2.currentTarget);
|
|
@@ -4912,7 +4916,7 @@ var SCAppBar = ({
|
|
|
4912
4916
|
window.removeEventListener("offline", handleOffline);
|
|
4913
4917
|
};
|
|
4914
4918
|
}, []);
|
|
4915
|
-
return /* @__PURE__ */
|
|
4919
|
+
return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(Grid9, { sx: { display: "flex", flexDirection: "column" } }, /* @__PURE__ */ React41.createElement(Grid9, { size: 12, sx: { display: "flex", flexDirection: "row", alignItems: "center", background, padding: "0px 16px", justifyContent: "space-between" } }, visibleVolver && /* @__PURE__ */ React41.createElement(IconButton14, { size: "medium", onClick: fnVolver }, /* @__PURE__ */ React41.createElement(ArrowBackIcon, { color: "action" })), /* @__PURE__ */ React41.createElement(Grid9, { sx: { display: "flex", flexDirection: "row", alignItems: "center" } }, visibleConexion && /* @__PURE__ */ React41.createElement(Grid9, { sx: { display: "flex", flexDirection: "row", alignItems: "center" } }, isOnline ? /* @__PURE__ */ React41.createElement(Wifi, { color: "action", sx: { marginRight: "8px" } }) : /* @__PURE__ */ React41.createElement(WifiOff, { color: "action", sx: { marginRight: "8px" } }), /* @__PURE__ */ React41.createElement(
|
|
4916
4920
|
Badge2,
|
|
4917
4921
|
{
|
|
4918
4922
|
anchorOrigin: {
|
|
@@ -4927,7 +4931,7 @@ var SCAppBar = ({
|
|
|
4927
4931
|
},
|
|
4928
4932
|
color: isOnline ? "success" : "error"
|
|
4929
4933
|
}
|
|
4930
|
-
), /* @__PURE__ */
|
|
4934
|
+
), /* @__PURE__ */ React41.createElement(Typography23, { variant: "caption", color: "text.secondary" }, isOnline ? "Online" : "Offline")), visibleMenu && /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(IconButton14, { size: "medium", onClick: handleMenuClick }, /* @__PURE__ */ React41.createElement(MenuIcon, { color: "action" })), /* @__PURE__ */ React41.createElement(
|
|
4931
4935
|
Menu4,
|
|
4932
4936
|
{
|
|
4933
4937
|
anchorEl,
|
|
@@ -4943,12 +4947,12 @@ var SCAppBar = ({
|
|
|
4943
4947
|
},
|
|
4944
4948
|
sx: { zIndex: "2000" }
|
|
4945
4949
|
},
|
|
4946
|
-
options.map((option, index) => /* @__PURE__ */
|
|
4947
|
-
)))), /* @__PURE__ */
|
|
4950
|
+
options.map((option, index) => /* @__PURE__ */ React41.createElement(MenuItem8, { onClick: option.fn, disabled: option.disabled, key: index }, /* @__PURE__ */ React41.createElement(Typography23, { variant: "body2" }, option.name)))
|
|
4951
|
+
)))), /* @__PURE__ */ React41.createElement(Box24, { sx: { padding: "8px 16px 0px 16px" } }, contenidoExtra)));
|
|
4948
4952
|
};
|
|
4949
4953
|
|
|
4950
4954
|
// src/Components/SCCalendarSwipeable.tsx
|
|
4951
|
-
import
|
|
4955
|
+
import React42, { useState as useState23 } from "react";
|
|
4952
4956
|
import { Typography as Typography24, IconButton as IconButton15, Box as Box25 } from "@mui/material";
|
|
4953
4957
|
import Grid10 from "@mui/material/Grid";
|
|
4954
4958
|
import { AdapterDateFns as AdapterDateFns2 } from "@mui/x-date-pickers/AdapterDateFns";
|
|
@@ -4967,14 +4971,14 @@ var SCCalendarSwipeable = ({
|
|
|
4967
4971
|
state
|
|
4968
4972
|
}) => {
|
|
4969
4973
|
let convertFecha;
|
|
4970
|
-
const [fecha, setFecha] =
|
|
4971
|
-
const [fechaSeleccionada, setFechaSeleccionada] =
|
|
4972
|
-
const [stateVal, setstateVal] =
|
|
4973
|
-
const [openCalendar, setOpenCalendar] =
|
|
4974
|
+
const [fecha, setFecha] = useState23(/* @__PURE__ */ new Date());
|
|
4975
|
+
const [fechaSeleccionada, setFechaSeleccionada] = useState23();
|
|
4976
|
+
const [stateVal, setstateVal] = React42.useState(/* @__PURE__ */ new Date());
|
|
4977
|
+
const [openCalendar, setOpenCalendar] = React42.useState(false);
|
|
4974
4978
|
const hoy = /* @__PURE__ */ new Date();
|
|
4975
4979
|
const inicioSemana = startOfWeek2(fecha, { weekStartsOn: 0 });
|
|
4976
4980
|
const diasSemana = Array.from({ length: 7 }, (_, i) => addDays2(inicioSemana, i));
|
|
4977
|
-
|
|
4981
|
+
React42.useEffect(() => {
|
|
4978
4982
|
if (fecha != null) {
|
|
4979
4983
|
handleConvertFecha(fecha);
|
|
4980
4984
|
}
|
|
@@ -4998,7 +5002,7 @@ var SCCalendarSwipeable = ({
|
|
|
4998
5002
|
// 0 = domingo, 1 = lunes
|
|
4999
5003
|
})
|
|
5000
5004
|
});
|
|
5001
|
-
return /* @__PURE__ */
|
|
5005
|
+
return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(LocalizationProvider3, { dateAdapter: AdapterDateFns2, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React42.createElement(Box25, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React42.createElement(Box25, { sx: { width: "100%", padding: "0px 16px", background: "transparent" } }, /* @__PURE__ */ React42.createElement(Grid10, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ React42.createElement(Grid10, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React42.createElement(Box25, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React42.createElement(Typography24, { sx: { fontSize: "12px !important", color: "#10184099" } }, format2(dia, "EEEE", { locale: es2 }).charAt(0).toUpperCase())), /* @__PURE__ */ React42.createElement(
|
|
5002
5006
|
Box25,
|
|
5003
5007
|
{
|
|
5004
5008
|
onClick: () => setFecha(dia),
|
|
@@ -5014,8 +5018,8 @@ var SCCalendarSwipeable = ({
|
|
|
5014
5018
|
//height: '36px',
|
|
5015
5019
|
}
|
|
5016
5020
|
},
|
|
5017
|
-
/* @__PURE__ */
|
|
5018
|
-
)))), /* @__PURE__ */
|
|
5021
|
+
/* @__PURE__ */ React42.createElement(Typography24, { sx: { fontSize: "12px !important", color: isSameDay2(dia, fecha) ? "white" : "#101840DE" } }, format2(dia, "d"))
|
|
5022
|
+
)))), /* @__PURE__ */ React42.createElement(Grid10, { container: true, justifyContent: "center" }, /* @__PURE__ */ React42.createElement(IconButton15, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ React42.createElement(KeyboardDoubleArrowDownIcon2, null))))) : /* @__PURE__ */ React42.createElement(Box25, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React42.createElement(
|
|
5019
5023
|
StaticDatePicker2,
|
|
5020
5024
|
{
|
|
5021
5025
|
orientation: "landscape",
|
|
@@ -5040,11 +5044,11 @@ var SCCalendarSwipeable = ({
|
|
|
5040
5044
|
},
|
|
5041
5045
|
onChange: (newValue) => setFecha(newValue)
|
|
5042
5046
|
}
|
|
5043
|
-
), /* @__PURE__ */
|
|
5047
|
+
), /* @__PURE__ */ React42.createElement(Grid10, { container: true, justifyContent: "center" }, /* @__PURE__ */ React42.createElement(IconButton15, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React42.createElement(KeyboardDoubleArrowUpIcon2, null))))));
|
|
5044
5048
|
};
|
|
5045
5049
|
|
|
5046
5050
|
// src/Components/SCCard.tsx
|
|
5047
|
-
import
|
|
5051
|
+
import React43 from "react";
|
|
5048
5052
|
import { Divider as Divider8, Box as Box26, SvgIcon as SvgIcon9 } from "@mui/material";
|
|
5049
5053
|
import IconButton16 from "@mui/material/IconButton";
|
|
5050
5054
|
import Card2 from "@mui/material/Card";
|
|
@@ -5058,7 +5062,7 @@ import * as Muicon8 from "@mui/icons-material";
|
|
|
5058
5062
|
var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, dividerHeader, content, actions, dividerActions, contentExpand }) => {
|
|
5059
5063
|
let iconTitleValidation = "";
|
|
5060
5064
|
let IconTitle;
|
|
5061
|
-
const [expanded, setExpanded] =
|
|
5065
|
+
const [expanded, setExpanded] = React43.useState(false);
|
|
5062
5066
|
if (iconTitle) {
|
|
5063
5067
|
if (typeof iconTitle === "string" && /\.(png|jpg|jpeg|gif|svg|webp)$/i.test(iconTitle)) {
|
|
5064
5068
|
iconTitleValidation = "image";
|
|
@@ -5074,11 +5078,11 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, dividerH
|
|
|
5074
5078
|
const handleExpandClick = () => {
|
|
5075
5079
|
setExpanded(!expanded);
|
|
5076
5080
|
};
|
|
5077
|
-
return /* @__PURE__ */
|
|
5081
|
+
return /* @__PURE__ */ React43.createElement(Card2, { sx: { width: width || "auto" } }, title && /* @__PURE__ */ React43.createElement(
|
|
5078
5082
|
CardHeader,
|
|
5079
5083
|
{
|
|
5080
|
-
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */
|
|
5081
|
-
action: actionsTitle == "expand" ? /* @__PURE__ */
|
|
5084
|
+
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React43.createElement(Box26, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React43.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React43.createElement(SvgIcon9, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
|
|
5085
|
+
action: actionsTitle == "expand" ? /* @__PURE__ */ React43.createElement(IconButton16, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React43.createElement(ExpandMoreIcon2, { fontSize: "small" })) : actionsTitle,
|
|
5082
5086
|
title,
|
|
5083
5087
|
subheader: subtitle,
|
|
5084
5088
|
sx: {
|
|
@@ -5097,18 +5101,18 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, dividerH
|
|
|
5097
5101
|
}
|
|
5098
5102
|
}
|
|
5099
5103
|
}
|
|
5100
|
-
), dividerHeader && title && /* @__PURE__ */
|
|
5104
|
+
), dividerHeader && title && /* @__PURE__ */ React43.createElement(Divider8, { variant: "fullWidth" }), image && /* @__PURE__ */ React43.createElement(
|
|
5101
5105
|
CardMedia,
|
|
5102
5106
|
{
|
|
5103
5107
|
component: "img",
|
|
5104
5108
|
height: "194",
|
|
5105
5109
|
image
|
|
5106
5110
|
}
|
|
5107
|
-
), content && /* @__PURE__ */
|
|
5111
|
+
), content && /* @__PURE__ */ React43.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, content), dividerActions && /* @__PURE__ */ React43.createElement(Divider8, { variant: "fullWidth" }), actions && /* @__PURE__ */ React43.createElement(CardActions, null, actions), contentExpand && /* @__PURE__ */ React43.createElement(Collapse2, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React43.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, contentExpand)));
|
|
5108
5112
|
};
|
|
5109
5113
|
|
|
5110
5114
|
// src/Components/SCDataGrid.tsx
|
|
5111
|
-
import
|
|
5115
|
+
import React44, { useEffect as useEffect19, useState as useState25 } from "react";
|
|
5112
5116
|
import { DataGridPro, useGridApiRef } from "@mui/x-data-grid-pro";
|
|
5113
5117
|
import { LicenseInfo as LicenseInfo2 } from "@mui/x-license";
|
|
5114
5118
|
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
@@ -5199,7 +5203,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5199
5203
|
label = label;
|
|
5200
5204
|
}
|
|
5201
5205
|
}
|
|
5202
|
-
return /* @__PURE__ */
|
|
5206
|
+
return /* @__PURE__ */ React44.createElement(
|
|
5203
5207
|
"div",
|
|
5204
5208
|
{
|
|
5205
5209
|
style: {
|
|
@@ -5217,7 +5221,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5217
5221
|
fontWeight: params.rowNode.type == "group" ? "400" : "300"
|
|
5218
5222
|
}
|
|
5219
5223
|
},
|
|
5220
|
-
params.rowNode.type === "group" && /* @__PURE__ */
|
|
5224
|
+
params.rowNode.type === "group" && /* @__PURE__ */ React44.createElement(
|
|
5221
5225
|
"span",
|
|
5222
5226
|
{
|
|
5223
5227
|
style: {
|
|
@@ -5230,7 +5234,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5230
5234
|
params.api.setRowChildrenExpansion(params.id, !params.rowNode.childrenExpanded);
|
|
5231
5235
|
}
|
|
5232
5236
|
},
|
|
5233
|
-
params.rowNode.childrenExpanded ? /* @__PURE__ */
|
|
5237
|
+
params.rowNode.childrenExpanded ? /* @__PURE__ */ React44.createElement(KeyboardArrowUpIcon, { fontSize: "small", color: "action" }) : /* @__PURE__ */ React44.createElement(KeyboardArrowDownIcon, { fontSize: "small", color: "action" })
|
|
5234
5238
|
),
|
|
5235
5239
|
label
|
|
5236
5240
|
);
|
|
@@ -5272,10 +5276,10 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5272
5276
|
let styleRowHeight = density == "compact" ? 32 : density == "standard" ? 28 : density == "comfortable" ? 31 : 32;
|
|
5273
5277
|
let rows = rowsTable ? rowsTable : validationTreeData != false ? parseInt(data.length.toString()) : data.length < 10 ? parseInt(data.length.toString()) : 10;
|
|
5274
5278
|
let validationGroupingColDef = groupingColDefs || {};
|
|
5275
|
-
const [groupDataLenght, setGroupDataLengh] =
|
|
5276
|
-
const [pageSize, setPageSize] =
|
|
5277
|
-
const [arrayRows, setArrayRows] =
|
|
5278
|
-
const [selectionModel, setSelectionModel] =
|
|
5279
|
+
const [groupDataLenght, setGroupDataLengh] = useState25(0);
|
|
5280
|
+
const [pageSize, setPageSize] = useState25(rows);
|
|
5281
|
+
const [arrayRows, setArrayRows] = useState25([]);
|
|
5282
|
+
const [selectionModel, setSelectionModel] = useState25([]);
|
|
5279
5283
|
useEffect19(() => {
|
|
5280
5284
|
var _a;
|
|
5281
5285
|
if (setSelectedRow) {
|
|
@@ -5377,7 +5381,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5377
5381
|
apiRef.current.setColumnVisibilityModel(columnVisibilityModel);
|
|
5378
5382
|
}
|
|
5379
5383
|
}, [columnVisibilityModel, apiRef]);
|
|
5380
|
-
return /* @__PURE__ */
|
|
5384
|
+
return /* @__PURE__ */ React44.createElement(React44.Fragment, null, data && /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ React44.createElement(
|
|
5381
5385
|
DataGridPro,
|
|
5382
5386
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
5383
5387
|
getRowId,
|
|
@@ -5541,13 +5545,13 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5541
5545
|
})
|
|
5542
5546
|
))));
|
|
5543
5547
|
}
|
|
5544
|
-
var SCDataGrid =
|
|
5548
|
+
var SCDataGrid = React44.memo(SCDataGridInitial, (prevProps, nextProps) => {
|
|
5545
5549
|
const isEqual = prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight;
|
|
5546
5550
|
return isEqual;
|
|
5547
5551
|
});
|
|
5548
5552
|
|
|
5549
5553
|
// src/Components/SCDatePicker.tsx
|
|
5550
|
-
import
|
|
5554
|
+
import React45 from "react";
|
|
5551
5555
|
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
|
|
5552
5556
|
import "dayjs/locale/es";
|
|
5553
5557
|
import dayjs10 from "dayjs";
|
|
@@ -5556,7 +5560,7 @@ import { LocalizationProvider as LocalizationProvider4 } from "@mui/x-date-picke
|
|
|
5556
5560
|
import { AdapterDayjs as AdapterDayjs2 } from "@mui/x-date-pickers/AdapterDayjs";
|
|
5557
5561
|
import InsertInvitationOutlinedIcon2 from "@mui/icons-material/InsertInvitationOutlined";
|
|
5558
5562
|
var SCDatePicker = ({ label, required, disabled, background, state, setState, width, minDate, maxDate }) => {
|
|
5559
|
-
return /* @__PURE__ */
|
|
5563
|
+
return /* @__PURE__ */ React45.createElement(LocalizationProvider4, { dateAdapter: AdapterDayjs2, adapterLocale: "es" }, /* @__PURE__ */ React45.createElement(
|
|
5560
5564
|
DatePicker,
|
|
5561
5565
|
{
|
|
5562
5566
|
disabled,
|
|
@@ -5612,7 +5616,7 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
|
|
|
5612
5616
|
};
|
|
5613
5617
|
|
|
5614
5618
|
// src/Components/SCDialog.tsx
|
|
5615
|
-
import
|
|
5619
|
+
import React46, { useEffect as useEffect20, useState as useState27 } from "react";
|
|
5616
5620
|
import { Button as Button19, Typography as Typography26, Modal as Modal5, Dialog as Dialog4, DialogActions as DialogActions4, DialogContent as DialogContent4, DialogTitle as DialogTitle4, IconButton as IconButton17, Tooltip as Tooltip8, Box as Box27, SvgIcon as SvgIcon10 } from "@mui/material";
|
|
5617
5621
|
import Grid11 from "@mui/material/Grid";
|
|
5618
5622
|
import ToggleButton from "@mui/material/ToggleButton";
|
|
@@ -5624,7 +5628,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5624
5628
|
let iconTitleValidation = "";
|
|
5625
5629
|
let IconTitle;
|
|
5626
5630
|
let ButtonIcon;
|
|
5627
|
-
const [open, setOpen] =
|
|
5631
|
+
const [open, setOpen] = useState27(show);
|
|
5628
5632
|
useEffect20(() => {
|
|
5629
5633
|
if (show) {
|
|
5630
5634
|
handleOpen();
|
|
@@ -5677,8 +5681,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5677
5681
|
}
|
|
5678
5682
|
};
|
|
5679
5683
|
const dialogActions = actions == false ? false : actions != void 0 ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
5680
|
-
content = content != null ? content : { component: /* @__PURE__ */
|
|
5681
|
-
return /* @__PURE__ */
|
|
5684
|
+
content = content != null ? content : { component: /* @__PURE__ */ React46.createElement(Box27, null, " Aqui va el contenido ") };
|
|
5685
|
+
return /* @__PURE__ */ React46.createElement("div", null, buttonDialog ? /* @__PURE__ */ React46.createElement(React46.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React46.createElement(Tooltip8, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React46.createElement(Button19, { 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__ */ React46.createElement(ButtonIcon, null) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React46.createElement(ButtonIcon, null) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React46.createElement(IconButton17, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React46.createElement(SvgIcon10, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React46.createElement(Modal5, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React46.createElement(
|
|
5682
5686
|
Dialog4,
|
|
5683
5687
|
{
|
|
5684
5688
|
fullScreen: typeView === "mobile" ? true : false,
|
|
@@ -5693,8 +5697,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5693
5697
|
}
|
|
5694
5698
|
}
|
|
5695
5699
|
},
|
|
5696
|
-
title && /* @__PURE__ */
|
|
5697
|
-
/* @__PURE__ */
|
|
5700
|
+
title && /* @__PURE__ */ React46.createElement(DialogTitle4, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React46.createElement(Grid11, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, typeView == "web" ? /* @__PURE__ */ React46.createElement(Grid11, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ React46.createElement(Box27, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React46.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React46.createElement(SvgIcon10, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ React46.createElement(Grid11, { sx: { width: "98%" } }, /* @__PURE__ */ React46.createElement(Typography26, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), subtitle ? subtitle : "")) : /* @__PURE__ */ React46.createElement(Grid11, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }), disableClose != true ? /* @__PURE__ */ React46.createElement(IconButton17, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ React46.createElement(CloseIcon2, { color: "action" })) : ""), typeView == "mobile" ? /* @__PURE__ */ React46.createElement(Grid11, { sx: { display: "flex", flexDirection: "column", padding: "12px 0px 4px 0px" }, gap: 1.5 }, /* @__PURE__ */ React46.createElement(Typography26, { color: "text.primary", variant: "h5" }, title ? title : ""), subtitle ? subtitle : "") : ""),
|
|
5701
|
+
/* @__PURE__ */ React46.createElement(
|
|
5698
5702
|
DialogContent4,
|
|
5699
5703
|
{
|
|
5700
5704
|
"data-testid": "dialog-content",
|
|
@@ -5723,7 +5727,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5723
5727
|
})
|
|
5724
5728
|
}
|
|
5725
5729
|
},
|
|
5726
|
-
content.url ? /* @__PURE__ */
|
|
5730
|
+
content.url ? /* @__PURE__ */ React46.createElement(
|
|
5727
5731
|
"iframe",
|
|
5728
5732
|
{
|
|
5729
5733
|
style: { border: "none", minWidth: "100%", minHeight: "100%" },
|
|
@@ -5733,7 +5737,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5733
5737
|
}
|
|
5734
5738
|
) : content.component
|
|
5735
5739
|
),
|
|
5736
|
-
dialogActions != void 0 && dialogActions != false ? Array.isArray(dialogActions) && (dialogActions == null ? void 0 : dialogActions.length) > 0 ? /* @__PURE__ */
|
|
5740
|
+
dialogActions != void 0 && dialogActions != false ? Array.isArray(dialogActions) && (dialogActions == null ? void 0 : dialogActions.length) > 0 ? /* @__PURE__ */ React46.createElement(DialogActions4, { sx: { zIndex: 1200, gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, typeView !== "mobile" ? /* @__PURE__ */ React46.createElement(React46.Fragment, null, dialogActions.length >= 3 ? /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(
|
|
5737
5741
|
Button19,
|
|
5738
5742
|
{
|
|
5739
5743
|
variant: "text",
|
|
@@ -5741,11 +5745,11 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5741
5745
|
size: "small",
|
|
5742
5746
|
onClick: dialogActions[0].fn,
|
|
5743
5747
|
disabled: dialogActions[0].disabled || false,
|
|
5744
|
-
startIcon: dialogActions[0].icon ? /* @__PURE__ */
|
|
5748
|
+
startIcon: dialogActions[0].icon ? /* @__PURE__ */ React46.createElement(SvgIcon10, { fontSize: "small", component: dialogActions[0].icon }) : void 0
|
|
5745
5749
|
},
|
|
5746
5750
|
dialogActions[0].text
|
|
5747
|
-
), /* @__PURE__ */
|
|
5748
|
-
return /* @__PURE__ */
|
|
5751
|
+
), /* @__PURE__ */ React46.createElement(Box27, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
|
|
5752
|
+
return /* @__PURE__ */ React46.createElement(
|
|
5749
5753
|
Button19,
|
|
5750
5754
|
{
|
|
5751
5755
|
key: index + 1,
|
|
@@ -5754,12 +5758,12 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5754
5758
|
size: "small",
|
|
5755
5759
|
onClick: boton.fn,
|
|
5756
5760
|
disabled: boton.disabled || false,
|
|
5757
|
-
startIcon: boton.icon ? /* @__PURE__ */
|
|
5761
|
+
startIcon: boton.icon ? /* @__PURE__ */ React46.createElement(SvgIcon10, { fontSize: "small", component: boton.icon }) : void 0
|
|
5758
5762
|
},
|
|
5759
5763
|
boton.text
|
|
5760
5764
|
);
|
|
5761
5765
|
}))) : dialogActions.map((boton, index) => {
|
|
5762
|
-
return /* @__PURE__ */
|
|
5766
|
+
return /* @__PURE__ */ React46.createElement(
|
|
5763
5767
|
Button19,
|
|
5764
5768
|
{
|
|
5765
5769
|
key: index,
|
|
@@ -5768,19 +5772,19 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5768
5772
|
size: "small",
|
|
5769
5773
|
onClick: boton.fn,
|
|
5770
5774
|
disabled: boton.disabled || false,
|
|
5771
|
-
startIcon: boton.icon ? /* @__PURE__ */
|
|
5775
|
+
startIcon: boton.icon ? /* @__PURE__ */ React46.createElement(SvgIcon10, { fontSize: "small", component: boton.icon }) : void 0
|
|
5772
5776
|
},
|
|
5773
5777
|
boton.text
|
|
5774
5778
|
);
|
|
5775
|
-
})) : /* @__PURE__ */
|
|
5779
|
+
})) : /* @__PURE__ */ React46.createElement(Box27, { sx: { width: "100%", display: "flex", flexDirection: "row", justifyContent: "center" } }, /* @__PURE__ */ React46.createElement(ToggleButtonGroup, { size: "large", fullWidth: true }, dialogActions.map((boton, index) => {
|
|
5776
5780
|
var _a;
|
|
5777
|
-
return /* @__PURE__ */
|
|
5781
|
+
return /* @__PURE__ */ React46.createElement(ToggleButton, { sx: { color: "primary.main" }, disabled: boton.disabled || false, fullWidth: boton.text ? true : false, size: "medium", value: "text", onClick: boton.fn }, (_a = boton.text) != null ? _a : /* @__PURE__ */ React46.createElement(SvgIcon10, { fontSize: "small", component: boton.icon }));
|
|
5778
5782
|
})))) : "" : ""
|
|
5779
5783
|
)));
|
|
5780
5784
|
};
|
|
5781
5785
|
|
|
5782
5786
|
// src/Components/SCDownloadExcelTable.tsx
|
|
5783
|
-
import
|
|
5787
|
+
import React47 from "react";
|
|
5784
5788
|
import { Button as Button20 } from "@mui/material";
|
|
5785
5789
|
import FileDownloadOutlinedIcon2 from "@mui/icons-material/FileDownloadOutlined";
|
|
5786
5790
|
import * as XLSX from "xlsx";
|
|
@@ -5813,11 +5817,11 @@ var SCDownloadExcelTable = ({
|
|
|
5813
5817
|
XLSX.utils.book_append_sheet(workbook, worksheet, "Hoja1");
|
|
5814
5818
|
XLSX.writeFile(workbook, `${fileName}.xlsx`);
|
|
5815
5819
|
};
|
|
5816
|
-
return /* @__PURE__ */
|
|
5820
|
+
return /* @__PURE__ */ React47.createElement(
|
|
5817
5821
|
Button20,
|
|
5818
5822
|
{
|
|
5819
5823
|
onClick: descargaExcel,
|
|
5820
|
-
startIcon: /* @__PURE__ */
|
|
5824
|
+
startIcon: /* @__PURE__ */ React47.createElement(FileDownloadOutlinedIcon2, null),
|
|
5821
5825
|
size: (downloadButton == null ? void 0 : downloadButton.size) || "small",
|
|
5822
5826
|
color: (downloadButton == null ? void 0 : downloadButton.color) || "primary",
|
|
5823
5827
|
variant: (downloadButton == null ? void 0 : downloadButton.variant) || "text",
|
|
@@ -5828,12 +5832,12 @@ var SCDownloadExcelTable = ({
|
|
|
5828
5832
|
};
|
|
5829
5833
|
|
|
5830
5834
|
// src/Components/SCMenu.tsx
|
|
5831
|
-
import
|
|
5835
|
+
import React48 from "react";
|
|
5832
5836
|
import { Box as Box28, Typography as Typography27, Paper as Paper5, Divider as Divider9, MenuList as MenuList3, MenuItem as MenuItem9, ListItemIcon as ListItemIcon7, SvgIcon as SvgIcon11 } from "@mui/material";
|
|
5833
5837
|
import Grid12 from "@mui/material/Grid";
|
|
5834
5838
|
|
|
5835
5839
|
// src/Components/Hooks/useWindowDimensions.ts
|
|
5836
|
-
import { useState as
|
|
5840
|
+
import { useState as useState28, useEffect as useEffect21 } from "react";
|
|
5837
5841
|
function getWindowDimensions() {
|
|
5838
5842
|
const { innerWidth: width, innerHeight: height } = window;
|
|
5839
5843
|
return {
|
|
@@ -5842,7 +5846,7 @@ function getWindowDimensions() {
|
|
|
5842
5846
|
};
|
|
5843
5847
|
}
|
|
5844
5848
|
function useWindowDimensions() {
|
|
5845
|
-
const [windowDimensions, setWindowDimensions] =
|
|
5849
|
+
const [windowDimensions, setWindowDimensions] = useState28(getWindowDimensions());
|
|
5846
5850
|
useEffect21(() => {
|
|
5847
5851
|
function handleResize() {
|
|
5848
5852
|
setWindowDimensions(getWindowDimensions());
|
|
@@ -5861,12 +5865,12 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5861
5865
|
const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
|
|
5862
5866
|
const widthContainer = menuSize + pageSize;
|
|
5863
5867
|
let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
5864
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5865
|
-
const [value, setValue] =
|
|
5866
|
-
|
|
5868
|
+
const [selectedIndex, setSelectedIndex] = React48.useState("1");
|
|
5869
|
+
const [value, setValue] = React48.useState("1");
|
|
5870
|
+
React48.useEffect(() => {
|
|
5867
5871
|
heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
5868
5872
|
}, [height]);
|
|
5869
|
-
|
|
5873
|
+
React48.useEffect(() => {
|
|
5870
5874
|
if (defaultOption) {
|
|
5871
5875
|
handleClickMenusItem(event, void 0);
|
|
5872
5876
|
}
|
|
@@ -5896,7 +5900,7 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5896
5900
|
setValue(String(index + 1));
|
|
5897
5901
|
}
|
|
5898
5902
|
};
|
|
5899
|
-
return /* @__PURE__ */
|
|
5903
|
+
return /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(Grid12, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ React48.createElement(Paper5, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ React48.createElement(MenuList3, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(
|
|
5900
5904
|
MenuItem9,
|
|
5901
5905
|
{
|
|
5902
5906
|
disabled: disable == true ? true : false,
|
|
@@ -5904,51 +5908,9 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5904
5908
|
selected: String(index + 1) === selectedIndex,
|
|
5905
5909
|
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
5906
5910
|
},
|
|
5907
|
-
option.iconLeft ? /* @__PURE__ */
|
|
5908
|
-
/* @__PURE__ */
|
|
5909
|
-
), option.divider == true ? /* @__PURE__ */
|
|
5910
|
-
};
|
|
5911
|
-
|
|
5912
|
-
// src/Components/SCSnackBar.tsx
|
|
5913
|
-
import React48 from "react";
|
|
5914
|
-
import MuiAlert from "@mui/material/Alert";
|
|
5915
|
-
import "dayjs/locale/es";
|
|
5916
|
-
import Snackbar from "@mui/material/Snackbar";
|
|
5917
|
-
var SCSnackBar = ({
|
|
5918
|
-
type = "success",
|
|
5919
|
-
close = true,
|
|
5920
|
-
openState,
|
|
5921
|
-
setOpenState,
|
|
5922
|
-
mensaje,
|
|
5923
|
-
duration = 3e3,
|
|
5924
|
-
position = "Center"
|
|
5925
|
-
}) => {
|
|
5926
|
-
const posicionVertical = position == "Center" ? "bottom" : position.split("-")[1] == "Up" ? "top" : "bottom";
|
|
5927
|
-
const posicionHorizontal = position == "Center" ? "center" : position.split("-")[0] == "Left" ? "left" : "right";
|
|
5928
|
-
const handleClose = (event2, reason) => {
|
|
5929
|
-
if (reason === "clickaway") {
|
|
5930
|
-
return;
|
|
5931
|
-
}
|
|
5932
|
-
setOpenState(false);
|
|
5933
|
-
};
|
|
5934
|
-
return /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(
|
|
5935
|
-
Snackbar,
|
|
5936
|
-
__spreadProps(__spreadValues({
|
|
5937
|
-
anchorOrigin: { vertical: posicionVertical, horizontal: posicionHorizontal },
|
|
5938
|
-
open: openState,
|
|
5939
|
-
autoHideDuration: duration
|
|
5940
|
-
}, close ? { onClose: handleClose } : {}), {
|
|
5941
|
-
sx: { zIndex: 2e3 }
|
|
5942
|
-
}),
|
|
5943
|
-
/* @__PURE__ */ React48.createElement(
|
|
5944
|
-
MuiAlert,
|
|
5945
|
-
__spreadProps(__spreadValues({}, close ? { onClose: handleClose } : {}), {
|
|
5946
|
-
severity: type,
|
|
5947
|
-
sx: { backgroundColor: type == "success" ? "success.50" : type == "error" ? "#F9E8E8" : type == "warning" ? "#FFF0E0" : "#E6F3F8" }
|
|
5948
|
-
}),
|
|
5949
|
-
mensaje
|
|
5950
|
-
)
|
|
5951
|
-
));
|
|
5911
|
+
option.iconLeft ? /* @__PURE__ */ React48.createElement(ListItemIcon7, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React48.createElement(SvgIcon11, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
5912
|
+
/* @__PURE__ */ React48.createElement(Grid12, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React48.createElement(Typography27, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React48.createElement(ListItemIcon7, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React48.createElement(SvgIcon11, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
5913
|
+
), option.divider == true ? /* @__PURE__ */ React48.createElement(Divider9, null) : "")))), /* @__PURE__ */ React48.createElement(Grid12, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React48.createElement(Box28, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React48.createElement(Typography27, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
5952
5914
|
};
|
|
5953
5915
|
|
|
5954
5916
|
// src/Components/SCTabs.tsx
|