componentes-sinco 1.0.10 → 1.0.11-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +950 -722
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +793 -566
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -60,6 +60,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
60
60
|
var src_exports = {};
|
|
61
61
|
__export(src_exports, {
|
|
62
62
|
ADCSincoTheme: () => ADCSincoTheme,
|
|
63
|
+
Adjuntar: () => Adjuntar,
|
|
63
64
|
AdproSincoTheme: () => AdproSincoTheme,
|
|
64
65
|
Calendar: () => Calendar,
|
|
65
66
|
EmptyState: () => EmptyState,
|
|
@@ -97,19 +98,425 @@ __export(src_exports, {
|
|
|
97
98
|
});
|
|
98
99
|
module.exports = __toCommonJS(src_exports);
|
|
99
100
|
|
|
101
|
+
// src/Components/Adjuntar/Adjuntar.tsx
|
|
102
|
+
var import_react3 = __toESM(require("react"), 1);
|
|
103
|
+
var import_material2 = require("@mui/material");
|
|
104
|
+
var import_icons_material2 = require("@mui/icons-material");
|
|
105
|
+
|
|
106
|
+
// src/Components/ToastNotification/SCToastNotification.tsx
|
|
107
|
+
var import_react2 = __toESM(require("react"), 1);
|
|
108
|
+
var import_material = require("@mui/material");
|
|
109
|
+
var import_icons_material = require("@mui/icons-material");
|
|
110
|
+
|
|
111
|
+
// src/Components/ToastNotification/useProgress.ts
|
|
112
|
+
var import_react = require("react");
|
|
113
|
+
var useProgress = (timeProgress, lote) => {
|
|
114
|
+
const [progress, setProgress] = (0, import_react.useState)(0);
|
|
115
|
+
(0, import_react.useEffect)(() => {
|
|
116
|
+
const interval = setInterval(() => {
|
|
117
|
+
setProgress((prev) => {
|
|
118
|
+
if (prev >= 100) {
|
|
119
|
+
clearInterval(interval);
|
|
120
|
+
}
|
|
121
|
+
if (lote) {
|
|
122
|
+
const nextProgress = prev + lote;
|
|
123
|
+
return nextProgress <= 100 ? nextProgress : 100;
|
|
124
|
+
} else {
|
|
125
|
+
return prev + 1;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}, timeProgress * 10);
|
|
129
|
+
return () => {
|
|
130
|
+
clearInterval(interval);
|
|
131
|
+
};
|
|
132
|
+
}, [timeProgress, lote]);
|
|
133
|
+
return {
|
|
134
|
+
progress
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
var ToastProgress = (timeProgress) => {
|
|
138
|
+
const [progress, setProgress] = (0, import_react.useState)(100);
|
|
139
|
+
(0, import_react.useEffect)(() => {
|
|
140
|
+
const interval = setInterval(() => {
|
|
141
|
+
setProgress((prev) => {
|
|
142
|
+
if (prev <= 0) {
|
|
143
|
+
clearInterval(interval);
|
|
144
|
+
}
|
|
145
|
+
return prev - 1;
|
|
146
|
+
});
|
|
147
|
+
}, timeProgress * 10);
|
|
148
|
+
return () => {
|
|
149
|
+
clearInterval(interval);
|
|
150
|
+
};
|
|
151
|
+
}, [timeProgress]);
|
|
152
|
+
return {
|
|
153
|
+
progressToast: progress
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// src/Components/ToastNotification/SCToastNotification.tsx
|
|
158
|
+
var SCToastNotification = (toast) => {
|
|
159
|
+
var _a;
|
|
160
|
+
const [stateOptions, setStateOptions] = (0, import_react2.useState)(true);
|
|
161
|
+
const [stateToast, setStateToast] = (0, import_react2.useState)(true);
|
|
162
|
+
const timeProgress = toast.time || 10;
|
|
163
|
+
const { progress } = useProgress(timeProgress);
|
|
164
|
+
const toastColorConfig = toast.type || "info";
|
|
165
|
+
const toastIconOption = {
|
|
166
|
+
success: /* @__PURE__ */ import_react2.default.createElement(import_icons_material.CheckCircleRounded, { color: "success" }),
|
|
167
|
+
error: /* @__PURE__ */ import_react2.default.createElement(import_icons_material.ErrorRounded, { color: "error" }),
|
|
168
|
+
warning: /* @__PURE__ */ import_react2.default.createElement(import_icons_material.WarningRounded, { color: "warning" }),
|
|
169
|
+
info: /* @__PURE__ */ import_react2.default.createElement(import_icons_material.InfoRounded, { color: "info" })
|
|
170
|
+
};
|
|
171
|
+
const acciones = [...toast.actions || [{ text: "Action", fn: () => {
|
|
172
|
+
alert("");
|
|
173
|
+
} }, { text: "Consultar", fn: () => {
|
|
174
|
+
} }]];
|
|
175
|
+
const ToastIconConfig = toastIconOption[toast.type];
|
|
176
|
+
const closeToast = () => {
|
|
177
|
+
setStateToast(false);
|
|
178
|
+
};
|
|
179
|
+
const toggleToastOptions = () => {
|
|
180
|
+
setStateOptions((prevShowOptions) => !prevShowOptions);
|
|
181
|
+
};
|
|
182
|
+
(0, import_react2.useEffect)(() => {
|
|
183
|
+
progress >= 100 && setStateToast(false);
|
|
184
|
+
}, [progress]);
|
|
185
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, stateToast && /* @__PURE__ */ import_react2.default.createElement(
|
|
186
|
+
import_material.Stack,
|
|
187
|
+
{
|
|
188
|
+
position: "fixed",
|
|
189
|
+
zIndex: 1400,
|
|
190
|
+
right: 16,
|
|
191
|
+
top: 16,
|
|
192
|
+
width: 370,
|
|
193
|
+
sx: {
|
|
194
|
+
boxShadow: (theme) => theme.shadows[8]
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
198
|
+
import_material.Box,
|
|
199
|
+
{
|
|
200
|
+
padding: 1.5,
|
|
201
|
+
gap: 1.5,
|
|
202
|
+
display: "flex",
|
|
203
|
+
alignItems: "center",
|
|
204
|
+
sx: {
|
|
205
|
+
backgroundColor: {
|
|
206
|
+
success: "success.50",
|
|
207
|
+
error: "error.50",
|
|
208
|
+
warning: "warning.50",
|
|
209
|
+
info: "info.50"
|
|
210
|
+
}[toastColorConfig]
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
214
|
+
import_material.Stack,
|
|
215
|
+
{
|
|
216
|
+
p: 1,
|
|
217
|
+
gap: 1,
|
|
218
|
+
borderRadius: 50,
|
|
219
|
+
bgcolor: {
|
|
220
|
+
success: "success.100",
|
|
221
|
+
error: "error.100",
|
|
222
|
+
warning: "warning.100",
|
|
223
|
+
info: "info.100"
|
|
224
|
+
}[(_a = toast.type) != null ? _a : "info"]
|
|
225
|
+
},
|
|
226
|
+
/* @__PURE__ */ import_react2.default.createElement(import_material.Stack, null, ToastIconConfig)
|
|
227
|
+
),
|
|
228
|
+
/* @__PURE__ */ import_react2.default.createElement(import_material.Divider, { orientation: "vertical", flexItem: true }),
|
|
229
|
+
/* @__PURE__ */ import_react2.default.createElement(import_material.Stack, { width: 285 }, /* @__PURE__ */ import_react2.default.createElement(
|
|
230
|
+
import_material.Stack,
|
|
231
|
+
{
|
|
232
|
+
justifyContent: "space-between",
|
|
233
|
+
flexDirection: "row",
|
|
234
|
+
alignItems: "center"
|
|
235
|
+
},
|
|
236
|
+
/* @__PURE__ */ import_react2.default.createElement(import_material.Typography, { variant: "subtitle2", color: "text.primary" }, toast.title),
|
|
237
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
238
|
+
import_material.IconButton,
|
|
239
|
+
{
|
|
240
|
+
size: "small",
|
|
241
|
+
"data-testid": "close-icon",
|
|
242
|
+
onClick: closeToast
|
|
243
|
+
},
|
|
244
|
+
/* @__PURE__ */ import_react2.default.createElement(import_icons_material.Close, { fontSize: "small" })
|
|
245
|
+
)
|
|
246
|
+
), /* @__PURE__ */ import_react2.default.createElement(import_material.Stack, { gap: 0.5 }, /* @__PURE__ */ import_react2.default.createElement(import_material.Typography, { color: "text.primary", variant: "body2" }, toast.subtitle), !stateOptions && toast.listITems && toast.listITems.length > 0 && /* @__PURE__ */ import_react2.default.createElement(import_material.Stack, null, toast.listITems.map((element, i) => /* @__PURE__ */ import_react2.default.createElement(import_material.Typography, { variant: "caption", key: i }, "\u2022 ", element)))), /* @__PURE__ */ import_react2.default.createElement(import_material.Stack, { justifyContent: "flex-end", flexDirection: "row", gap: 0.5 }, toast.actions && toast.actions.length > 0 && /* @__PURE__ */ import_react2.default.createElement(import_material.Stack, { flexDirection: "row", gap: 0.5 }, toast.actions.map((button, index) => /* @__PURE__ */ import_react2.default.createElement(
|
|
247
|
+
import_material.Button,
|
|
248
|
+
{
|
|
249
|
+
key: index,
|
|
250
|
+
color: toast.type === "info" ? "info" : toast.type === "success" ? "success" : toast.type === "error" ? "error" : "warning",
|
|
251
|
+
variant: "text",
|
|
252
|
+
onClick: button.fn,
|
|
253
|
+
disabled: button.disabled || false,
|
|
254
|
+
size: "small"
|
|
255
|
+
},
|
|
256
|
+
button.text.charAt(0).toUpperCase() + button.text.slice(1).toLowerCase()
|
|
257
|
+
))), toast.seeMore && /* @__PURE__ */ import_react2.default.createElement(
|
|
258
|
+
import_material.Button,
|
|
259
|
+
{
|
|
260
|
+
onClick: toggleToastOptions,
|
|
261
|
+
size: "small",
|
|
262
|
+
variant: "text",
|
|
263
|
+
color: toastColorConfig
|
|
264
|
+
},
|
|
265
|
+
stateOptions ? "Ver m\xE1s" : "Ver menos",
|
|
266
|
+
stateOptions ? /* @__PURE__ */ import_react2.default.createElement(import_icons_material.KeyboardArrowDown, null) : /* @__PURE__ */ import_react2.default.createElement(import_icons_material.KeyboardArrowUp, null)
|
|
267
|
+
)))
|
|
268
|
+
),
|
|
269
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
270
|
+
import_material.LinearProgress,
|
|
271
|
+
{
|
|
272
|
+
sx: {
|
|
273
|
+
".MuiLinearProgress-bar": {
|
|
274
|
+
transition: "0.1s linear !important",
|
|
275
|
+
transform: "scaleX(-1)"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
color: toastColorConfig,
|
|
279
|
+
variant: "determinate",
|
|
280
|
+
value: 100 - progress
|
|
281
|
+
}
|
|
282
|
+
)
|
|
283
|
+
));
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
// src/Components/Adjuntar/Adjuntar.tsx
|
|
287
|
+
var Adjuntar = ({
|
|
288
|
+
sx,
|
|
289
|
+
compact,
|
|
290
|
+
error,
|
|
291
|
+
onChange,
|
|
292
|
+
maxSize = 400,
|
|
293
|
+
fileAccepted = ""
|
|
294
|
+
}) => {
|
|
295
|
+
const [files, setFiles] = (0, import_react3.useState)([]);
|
|
296
|
+
const [toast, setToast] = import_react3.default.useState(null);
|
|
297
|
+
const [isDragFile, setIsDragFile] = (0, import_react3.useState)(false);
|
|
298
|
+
const inputRef = (0, import_react3.useRef)(null);
|
|
299
|
+
const handleDrop = (event2) => {
|
|
300
|
+
event2.preventDefault();
|
|
301
|
+
setIsDragFile(false);
|
|
302
|
+
const filesDropped = event2.dataTransfer.files;
|
|
303
|
+
if (filesDropped && filesDropped.length > 0) {
|
|
304
|
+
const fakeEvent = {
|
|
305
|
+
target: { files: filesDropped }
|
|
306
|
+
};
|
|
307
|
+
handleUpload(fakeEvent);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
const handleDragOver = (event2) => {
|
|
311
|
+
event2.preventDefault();
|
|
312
|
+
setIsDragFile(true);
|
|
313
|
+
};
|
|
314
|
+
const handleDragLeave = (event2) => {
|
|
315
|
+
event2.preventDefault();
|
|
316
|
+
setIsDragFile(false);
|
|
317
|
+
};
|
|
318
|
+
(0, import_react3.useEffect)(() => {
|
|
319
|
+
const interval = setInterval(() => {
|
|
320
|
+
setFiles((prevFiles) => {
|
|
321
|
+
let updated = false;
|
|
322
|
+
const nuevosArchivos = prevFiles.map((file) => {
|
|
323
|
+
if (!file.uploadError && file.progress < 100) {
|
|
324
|
+
updated = true;
|
|
325
|
+
return __spreadProps(__spreadValues({}, file), { progress: Math.min(file.progress + 15, 100) });
|
|
326
|
+
}
|
|
327
|
+
return file;
|
|
328
|
+
});
|
|
329
|
+
return updated ? nuevosArchivos : prevFiles;
|
|
330
|
+
});
|
|
331
|
+
}, 1e3);
|
|
332
|
+
return () => clearInterval(interval);
|
|
333
|
+
}, [files]);
|
|
334
|
+
const handleUpload = (event2) => {
|
|
335
|
+
const newFiles = event2.target.files;
|
|
336
|
+
if (!newFiles) return;
|
|
337
|
+
const nuevosArchivos = [];
|
|
338
|
+
Array.from(newFiles).forEach((file) => {
|
|
339
|
+
const isDuplicatedFile = files.findIndex((e) => e.name === file.name && e.size === file.size);
|
|
340
|
+
const sizeMB = file.size / (1024 * 1024);
|
|
341
|
+
if (isDuplicatedFile !== -1) {
|
|
342
|
+
setToast(null);
|
|
343
|
+
setTimeout(() => {
|
|
344
|
+
setToast({
|
|
345
|
+
type: "error",
|
|
346
|
+
title: "Archivo duplicado",
|
|
347
|
+
seeMore: true,
|
|
348
|
+
listITems: ["No se permiten archivos duplicados."],
|
|
349
|
+
time: 10
|
|
350
|
+
});
|
|
351
|
+
}, 10);
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
if (sizeMB > maxSize) {
|
|
355
|
+
nuevosArchivos.push({
|
|
356
|
+
name: file.name,
|
|
357
|
+
size: file.size,
|
|
358
|
+
type: file.type,
|
|
359
|
+
progress: 0,
|
|
360
|
+
uploadError: true
|
|
361
|
+
});
|
|
362
|
+
setToast(null);
|
|
363
|
+
setTimeout(() => {
|
|
364
|
+
setToast({
|
|
365
|
+
type: "error",
|
|
366
|
+
title: "Carga fallida",
|
|
367
|
+
seeMore: true,
|
|
368
|
+
listITems: ["El archivo supera el l\xEDmite / 400MB."],
|
|
369
|
+
time: 10
|
|
370
|
+
});
|
|
371
|
+
}, 10);
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
if (fileAccepted && !file.name.match(new RegExp(`(${fileAccepted.replace(/\./g, "\\.").replace(/,/g, "|")})$`, "i"))) {
|
|
375
|
+
setToast({
|
|
376
|
+
type: "error",
|
|
377
|
+
title: "Tipo de archivo no permitido",
|
|
378
|
+
listITems: [`El archivo ${file.name} no es un tipo permitido.`],
|
|
379
|
+
time: 10
|
|
380
|
+
});
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
nuevosArchivos.push({
|
|
384
|
+
name: file.name,
|
|
385
|
+
size: file.size,
|
|
386
|
+
type: file.type,
|
|
387
|
+
progress: 0,
|
|
388
|
+
// inicializa el progreso en 0
|
|
389
|
+
uploadError: false
|
|
390
|
+
});
|
|
391
|
+
});
|
|
392
|
+
if (nuevosArchivos.length > 0) {
|
|
393
|
+
setFiles((prev) => {
|
|
394
|
+
const actualizados = [...prev, ...nuevosArchivos];
|
|
395
|
+
onChange == null ? void 0 : onChange(actualizados);
|
|
396
|
+
return actualizados;
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
event2.target.value = "";
|
|
400
|
+
};
|
|
401
|
+
const deleteFiles = (nameFile) => {
|
|
402
|
+
const filtered = files.filter((e) => e.name !== nameFile);
|
|
403
|
+
setFiles(filtered);
|
|
404
|
+
onChange == null ? void 0 : onChange(filtered);
|
|
405
|
+
};
|
|
406
|
+
return /* @__PURE__ */ import_react3.default.createElement(import_material2.Stack, { spacing: 2 }, toast && /* @__PURE__ */ import_react3.default.createElement(SCToastNotification, __spreadValues({}, toast)), /* @__PURE__ */ import_react3.default.createElement(
|
|
407
|
+
"input",
|
|
408
|
+
{
|
|
409
|
+
type: "file",
|
|
410
|
+
multiple: true,
|
|
411
|
+
hidden: true,
|
|
412
|
+
ref: inputRef,
|
|
413
|
+
onChange: handleUpload
|
|
414
|
+
}
|
|
415
|
+
), /* @__PURE__ */ import_react3.default.createElement(
|
|
416
|
+
import_material2.Stack,
|
|
417
|
+
{
|
|
418
|
+
id: "ZonaAdjuntos",
|
|
419
|
+
justifyContent: "center",
|
|
420
|
+
alignItems: "center",
|
|
421
|
+
bgcolor: "transparent",
|
|
422
|
+
padding: compact ? "12px 16px" : "16px 24px",
|
|
423
|
+
height: compact ? "56px" : "100%",
|
|
424
|
+
flexDirection: compact ? "row" : "column",
|
|
425
|
+
gap: 1,
|
|
426
|
+
borderRadius: 1,
|
|
427
|
+
onClick: () => {
|
|
428
|
+
var _a;
|
|
429
|
+
return (_a = inputRef.current) == null ? void 0 : _a.click();
|
|
430
|
+
},
|
|
431
|
+
onDrop: handleDrop,
|
|
432
|
+
onDragOver: handleDragOver,
|
|
433
|
+
onDragLeave: handleDragLeave,
|
|
434
|
+
sx: __spreadValues({
|
|
435
|
+
border: error ? (theme) => `1px solid ${theme.palette.error.main}` : (theme) => `1px dashed ${theme.palette.grey[500]}`,
|
|
436
|
+
cursor: "pointer",
|
|
437
|
+
":hover": {
|
|
438
|
+
backgroundColor: error ? "error.50" : "action.hover"
|
|
439
|
+
}
|
|
440
|
+
}, sx)
|
|
441
|
+
},
|
|
442
|
+
/* @__PURE__ */ import_react3.default.createElement(import_material2.Box, { display: "flex", bgcolor: error ? "error.50" : "primary.50", borderRadius: "100%", p: 1 }, /* @__PURE__ */ import_react3.default.createElement(import_icons_material2.CloudUploadOutlined, { color: error ? "error" : "primary", fontSize: "medium" })),
|
|
443
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
444
|
+
import_material2.Stack,
|
|
445
|
+
{
|
|
446
|
+
width: "100%",
|
|
447
|
+
flexDirection: compact ? "row" : "column",
|
|
448
|
+
alignItems: "center",
|
|
449
|
+
justifyContent: compact ? "space-between" : "center",
|
|
450
|
+
gap: 1
|
|
451
|
+
},
|
|
452
|
+
/* @__PURE__ */ import_react3.default.createElement(import_material2.Stack, { flexDirection: "column", alignItems: compact ? "start" : "center", gap: 0.5 }, /* @__PURE__ */ import_react3.default.createElement(import_material2.Typography, { variant: "body2", color: "text.primary" }, "Arrastrar o adjuntar archivos"), /* @__PURE__ */ import_react3.default.createElement(import_material2.Typography, { variant: "caption", color: error ? "error" : "text.secondary" }, error ? "DOCX, XML, PNG, JPG \u2022 Archivo no soportado" : `DOCX, XML, PNG, JPG \u2022 Max. ${maxSize}MB`)),
|
|
453
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
454
|
+
import_material2.Button,
|
|
455
|
+
{
|
|
456
|
+
variant: "text",
|
|
457
|
+
color: "primary",
|
|
458
|
+
size: "small",
|
|
459
|
+
startIcon: /* @__PURE__ */ import_react3.default.createElement(import_icons_material2.AttachFileOutlined, { color: "primary", fontSize: "small" })
|
|
460
|
+
},
|
|
461
|
+
"Adjuntar"
|
|
462
|
+
)
|
|
463
|
+
)
|
|
464
|
+
), files.length > 0 && /* @__PURE__ */ import_react3.default.createElement(
|
|
465
|
+
import_material2.Stack,
|
|
466
|
+
{
|
|
467
|
+
id: "ContenedorArchivosAdjuntos",
|
|
468
|
+
width: "100%",
|
|
469
|
+
sx: __spreadValues({
|
|
470
|
+
overflowY: "auto"
|
|
471
|
+
}, files.length > 5 && {
|
|
472
|
+
maxHeight: 250
|
|
473
|
+
}),
|
|
474
|
+
spacing: 1
|
|
475
|
+
},
|
|
476
|
+
files.map((file) => /* @__PURE__ */ import_react3.default.createElement(
|
|
477
|
+
import_material2.Stack,
|
|
478
|
+
{
|
|
479
|
+
height: 46,
|
|
480
|
+
key: file.name + (file.uploadError ? "_error" : ""),
|
|
481
|
+
direction: "row",
|
|
482
|
+
alignItems: "center",
|
|
483
|
+
justifyContent: "space-between",
|
|
484
|
+
gap: 2,
|
|
485
|
+
padding: 1,
|
|
486
|
+
borderRadius: 1,
|
|
487
|
+
sx: {
|
|
488
|
+
backgroundColor: file.uploadError ? "error.50" : "transparent",
|
|
489
|
+
":hover": {
|
|
490
|
+
backgroundColor: file.uploadError ? "error.100" : "primary.50"
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
/* @__PURE__ */ import_react3.default.createElement(import_material2.Stack, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ import_react3.default.createElement(import_icons_material2.UploadFileOutlined, { color: file.uploadError ? "error" : "primary", fontSize: "small" }), /* @__PURE__ */ import_react3.default.createElement(import_material2.Stack, { width: "100%" }, /* @__PURE__ */ import_react3.default.createElement(import_material2.Typography, { variant: "body2", color: "text.primary" }, file.name), /* @__PURE__ */ import_react3.default.createElement(import_material2.Typography, { variant: "caption", color: file.uploadError ? "error" : "text.secondary" }, file.uploadError ? "Archivo duplicado o inv\xE1lido \u2022 Carga fallida" : file.size > maxSize && file.uploadError ? "Archivo supero el l\xEDmite" : `${(file.size / (1024 * 1024)).toFixed(2)}MB \u2022 ${file.type} \u2022 carga ${file.progress}%`), file.progress === 100 && !file.uploadError ? /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null) : /* @__PURE__ */ import_react3.default.createElement(
|
|
495
|
+
import_material2.LinearProgress,
|
|
496
|
+
{
|
|
497
|
+
variant: "determinate",
|
|
498
|
+
color: file.uploadError ? "error" : "primary",
|
|
499
|
+
value: file.progress
|
|
500
|
+
}
|
|
501
|
+
))),
|
|
502
|
+
/* @__PURE__ */ import_react3.default.createElement(import_material2.IconButton, { size: "small", onClick: () => deleteFiles(file.name) }, /* @__PURE__ */ import_react3.default.createElement(import_icons_material2.DeleteOutline, { fontSize: "small", color: "action" }))
|
|
503
|
+
))
|
|
504
|
+
));
|
|
505
|
+
};
|
|
506
|
+
|
|
100
507
|
// src/Components/Drawer/SCDrawer.tsx
|
|
101
|
-
var
|
|
102
|
-
var
|
|
508
|
+
var import_react10 = __toESM(require("react"), 1);
|
|
509
|
+
var import_material8 = require("@mui/material");
|
|
103
510
|
var import_Grid23 = __toESM(require("@mui/material/Grid2"), 1);
|
|
104
511
|
var import_Close = __toESM(require("@mui/icons-material/Close"), 1);
|
|
105
512
|
var import_ArrowBackIos = __toESM(require("@mui/icons-material/ArrowBackIos"), 1);
|
|
106
513
|
var import_ArrowForwardIos = __toESM(require("@mui/icons-material/ArrowForwardIos"), 1);
|
|
107
514
|
|
|
108
515
|
// src/Components/Textfield/SCTextField.tsx
|
|
109
|
-
var
|
|
110
|
-
var
|
|
516
|
+
var import_react4 = __toESM(require("react"), 1);
|
|
517
|
+
var import_material3 = require("@mui/material");
|
|
111
518
|
var import_Grid2 = __toESM(require("@mui/material/Grid2"), 1);
|
|
112
|
-
var
|
|
519
|
+
var import_icons_material3 = require("@mui/icons-material");
|
|
113
520
|
|
|
114
521
|
// src/Components/Textfield/Helpers/validateIcon.tsx
|
|
115
522
|
var Muicon = __toESM(require("@mui/icons-material"), 1);
|
|
@@ -185,23 +592,23 @@ var SCTextField = ({
|
|
|
185
592
|
onKeyDown
|
|
186
593
|
}) => {
|
|
187
594
|
const inputComponents = {
|
|
188
|
-
outlined:
|
|
189
|
-
filled:
|
|
190
|
-
standard:
|
|
595
|
+
outlined: import_material3.OutlinedInput,
|
|
596
|
+
filled: import_material3.FilledInput,
|
|
597
|
+
standard: import_material3.Input
|
|
191
598
|
};
|
|
192
|
-
const InputComponent = inputComponents[variant] ||
|
|
599
|
+
const InputComponent = inputComponents[variant] || import_material3.OutlinedInput;
|
|
193
600
|
let IconInputStartValidation;
|
|
194
601
|
let IconInputEndValidation;
|
|
195
602
|
let IconInputStart;
|
|
196
603
|
let IconInputEnd;
|
|
197
604
|
let IconTitle;
|
|
198
|
-
const [showPassword, setShowPassword] = (0,
|
|
199
|
-
const [error, setError] = (0,
|
|
200
|
-
const [anchorInfoTitle, setAnchorInfoTitle] = (0,
|
|
605
|
+
const [showPassword, setShowPassword] = (0, import_react4.useState)(false);
|
|
606
|
+
const [error, setError] = (0, import_react4.useState)(false);
|
|
607
|
+
const [anchorInfoTitle, setAnchorInfoTitle] = (0, import_react4.useState)(null);
|
|
201
608
|
const openInfoTitle = Boolean(anchorInfoTitle);
|
|
202
|
-
const [anchorInfoElement, setAnchorInfoElement] = (0,
|
|
609
|
+
const [anchorInfoElement, setAnchorInfoElement] = (0, import_react4.useState)(null);
|
|
203
610
|
const openInfoElement = Boolean(anchorInfoElement);
|
|
204
|
-
(0,
|
|
611
|
+
(0, import_react4.useEffect)(() => {
|
|
205
612
|
if (error) {
|
|
206
613
|
setTimeout(() => {
|
|
207
614
|
setError(false);
|
|
@@ -251,16 +658,16 @@ var SCTextField = ({
|
|
|
251
658
|
const handleCloseInfoElement = () => {
|
|
252
659
|
setAnchorInfoElement(null);
|
|
253
660
|
};
|
|
254
|
-
return /* @__PURE__ */
|
|
255
|
-
|
|
661
|
+
return /* @__PURE__ */ import_react4.default.createElement(import_material3.Box, { sx: { width } }, /* @__PURE__ */ import_react4.default.createElement(import_Grid2.default, { container: true, alignItems: "center", mb: 1.25, gap: 0.5 }, iconTitle && IconTitle ? /* @__PURE__ */ import_react4.default.createElement(import_material3.SvgIcon, { color: "action", fontSize: "small", component: IconTitle }) : "", title ? /* @__PURE__ */ import_react4.default.createElement(import_material3.Typography, { mx: 0.5, variant: "subtitle2", color: "text.secondary" }, title) : "", infoTitle ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, infoTitle.component === "popover" ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement(
|
|
662
|
+
import_icons_material3.InfoOutlined,
|
|
256
663
|
{
|
|
257
664
|
color: "action",
|
|
258
665
|
fontSize: "small",
|
|
259
666
|
onMouseEnter: (event2) => handleOpenInfoTitle(event2),
|
|
260
667
|
onMouseLeave: () => handleCloseInfoTitle()
|
|
261
668
|
}
|
|
262
|
-
), /* @__PURE__ */
|
|
263
|
-
|
|
669
|
+
), /* @__PURE__ */ import_react4.default.createElement(
|
|
670
|
+
import_material3.Popover,
|
|
264
671
|
{
|
|
265
672
|
sx: {
|
|
266
673
|
pointerEvents: "none",
|
|
@@ -281,15 +688,15 @@ var SCTextField = ({
|
|
|
281
688
|
},
|
|
282
689
|
disableRestoreFocus: true
|
|
283
690
|
},
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
)) : /* @__PURE__ */
|
|
286
|
-
|
|
691
|
+
/* @__PURE__ */ import_react4.default.createElement(import_material3.Typography, { p: 2 }, infoTitle.text)
|
|
692
|
+
)) : /* @__PURE__ */ import_react4.default.createElement(import_material3.Tooltip, { title: infoTitle.text, "data-testid": "test-infoTitle", placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ import_react4.default.createElement(
|
|
693
|
+
import_icons_material3.InfoOutlined,
|
|
287
694
|
{
|
|
288
695
|
color: "action",
|
|
289
696
|
fontSize: "small"
|
|
290
697
|
}
|
|
291
|
-
))) : ""), /* @__PURE__ */
|
|
292
|
-
|
|
698
|
+
))) : ""), /* @__PURE__ */ import_react4.default.createElement(import_Grid2.default, { container: true, sx: { flexWrap: "nowrap", alignItems: "center" } }, /* @__PURE__ */ import_react4.default.createElement(
|
|
699
|
+
import_material3.FormControl,
|
|
293
700
|
{
|
|
294
701
|
color,
|
|
295
702
|
fullWidth: true,
|
|
@@ -297,305 +704,125 @@ var SCTextField = ({
|
|
|
297
704
|
variant,
|
|
298
705
|
sx: { background: background || "transparent", borderRadius: "4px" }
|
|
299
706
|
},
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
|
|
707
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
|
708
|
+
import_material3.InputLabel,
|
|
302
709
|
{
|
|
303
710
|
"data-testid": "test-label",
|
|
304
711
|
htmlFor: "",
|
|
305
712
|
required: required && label !== "" ? true : false,
|
|
306
713
|
error,
|
|
307
|
-
disabled: disabled || false
|
|
308
|
-
},
|
|
309
|
-
label ? label : ""
|
|
310
|
-
),
|
|
311
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
312
|
-
InputComponent,
|
|
313
|
-
{
|
|
314
|
-
size: size ? size : "medium",
|
|
315
|
-
fullWidth: true,
|
|
316
|
-
value: state,
|
|
317
|
-
error,
|
|
318
|
-
id: label == null ? void 0 : label.replace(/\s+/g, ""),
|
|
319
|
-
disabled: disabled != null ? disabled : false,
|
|
320
|
-
onKeyDown: handleKeyDown,
|
|
321
|
-
onChange: handleInputChange,
|
|
322
|
-
onBlur: handleBlur,
|
|
323
|
-
inputProps: { maxLength: maxLength ? maxLength : 50 },
|
|
324
|
-
type: !showPassword && format2 === "password" ? "password" : (format2 || "text").toUpperCase() === "INT" || (format2 || "text").toUpperCase() === "DECIMAL" ? "number" : "text",
|
|
325
|
-
className: format2 === "password" && !showPassword ? "" : "",
|
|
326
|
-
placeholder,
|
|
327
|
-
startAdornment: iconInputStart ? /* @__PURE__ */ import_react.default.createElement(import_material.InputAdornment, { position: "start" }, IconInputStartValidation === "text" ? iconInputStart : IconInputStart ? /* @__PURE__ */ import_react.default.createElement(IconInputStart, { fontSize: "small" }) : null) : "",
|
|
328
|
-
endAdornment: /* @__PURE__ */ import_react.default.createElement(import_material.InputAdornment, { position: "end" }, format2 === "password" ? /* @__PURE__ */ import_react.default.createElement(
|
|
329
|
-
import_material.IconButton,
|
|
330
|
-
{
|
|
331
|
-
"aria-label": "toggle password visibility",
|
|
332
|
-
onClick: handleClickShowPassword,
|
|
333
|
-
onMouseDown: handleMouseDownPassword,
|
|
334
|
-
edge: "end"
|
|
335
|
-
},
|
|
336
|
-
showPassword ? /* @__PURE__ */ import_react.default.createElement(import_icons_material.VisibilityOff, null) : /* @__PURE__ */ import_react.default.createElement(import_icons_material.Visibility, null)
|
|
337
|
-
) : iconInputEnd === void 0 && infoElement !== void 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
338
|
-
import_icons_material.InfoOutlined,
|
|
339
|
-
{
|
|
340
|
-
"data-testid": "test-infoElement",
|
|
341
|
-
sx: { ml: 0.5 },
|
|
342
|
-
color: "action",
|
|
343
|
-
fontSize: "small",
|
|
344
|
-
component: "svg",
|
|
345
|
-
onMouseEnter: (event2) => handleOpenInfoElement(event2),
|
|
346
|
-
onMouseLeave: () => handleCloseInfoElement()
|
|
347
|
-
}
|
|
348
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
349
|
-
import_material.Popover,
|
|
350
|
-
{
|
|
351
|
-
sx: {
|
|
352
|
-
pointerEvents: "none",
|
|
353
|
-
"& .MuiBackdrop-root": {
|
|
354
|
-
backgroundColor: "transparent"
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
open: openInfoElement,
|
|
358
|
-
anchorEl: anchorInfoElement,
|
|
359
|
-
onClose: handleCloseInfoElement,
|
|
360
|
-
anchorOrigin: {
|
|
361
|
-
vertical: "bottom",
|
|
362
|
-
horizontal: "left"
|
|
363
|
-
},
|
|
364
|
-
transformOrigin: {
|
|
365
|
-
vertical: "top",
|
|
366
|
-
horizontal: "left"
|
|
367
|
-
},
|
|
368
|
-
disableRestoreFocus: true
|
|
369
|
-
},
|
|
370
|
-
/* @__PURE__ */ import_react.default.createElement(import_material.Typography, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
|
|
371
|
-
)) : /* @__PURE__ */ import_react.default.createElement(import_material.Tooltip, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ import_react.default.createElement(
|
|
372
|
-
import_icons_material.InfoOutlined,
|
|
373
|
-
{
|
|
374
|
-
color: "action",
|
|
375
|
-
fontSize: "small"
|
|
376
|
-
}
|
|
377
|
-
))) : iconInputEnd !== void 0 ? IconInputEndValidation === "text" ? iconInputEnd : IconInputEnd ? /* @__PURE__ */ import_react.default.createElement(IconInputEnd, { fontSize: "small" }) : null : ""),
|
|
378
|
-
label: label ? label + (format2 === "password" && !showPassword ? "" : "") : "",
|
|
379
|
-
autoComplete: format2 === "password" ? "new-password" : "off"
|
|
380
|
-
}
|
|
381
|
-
)
|
|
382
|
-
), (iconInputEnd !== void 0 || format2 === "password") && infoElement ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
383
|
-
import_icons_material.InfoOutlined,
|
|
384
|
-
{
|
|
385
|
-
"data-testid": "test-infoElement",
|
|
386
|
-
component: "svg",
|
|
387
|
-
sx: { marginLeft: "4px" },
|
|
388
|
-
color: "action",
|
|
389
|
-
fontSize: "small",
|
|
390
|
-
onMouseEnter: (event2) => handleOpenInfoElement(event2),
|
|
391
|
-
onMouseLeave: handleCloseInfoElement
|
|
392
|
-
}
|
|
393
|
-
), /* @__PURE__ */ import_react.default.createElement(
|
|
394
|
-
import_material.Popover,
|
|
395
|
-
{
|
|
396
|
-
sx: { pointerEvents: "none" },
|
|
397
|
-
open: openInfoElement,
|
|
398
|
-
anchorEl: anchorInfoElement,
|
|
399
|
-
onClose: handleCloseInfoElement,
|
|
400
|
-
anchorOrigin: {
|
|
401
|
-
vertical: "bottom",
|
|
402
|
-
horizontal: "left"
|
|
403
|
-
},
|
|
404
|
-
transformOrigin: {
|
|
405
|
-
vertical: "top",
|
|
406
|
-
horizontal: "left"
|
|
407
|
-
},
|
|
408
|
-
disableRestoreFocus: true
|
|
409
|
-
},
|
|
410
|
-
/* @__PURE__ */ import_react.default.createElement(import_material.Typography, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
|
|
411
|
-
)) : /* @__PURE__ */ import_react.default.createElement(import_material.Tooltip, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ import_react.default.createElement(
|
|
412
|
-
import_icons_material.InfoOutlined,
|
|
413
|
-
{
|
|
414
|
-
sx: { marginLeft: "4px" },
|
|
415
|
-
color: "action",
|
|
416
|
-
fontSize: "small"
|
|
417
|
-
}
|
|
418
|
-
))) : ""));
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
// src/Components/ToastNotification/SCToastNotification.tsx
|
|
422
|
-
var import_react3 = __toESM(require("react"), 1);
|
|
423
|
-
var import_material2 = require("@mui/material");
|
|
424
|
-
var import_icons_material2 = require("@mui/icons-material");
|
|
425
|
-
|
|
426
|
-
// src/Components/ToastNotification/useProgress.ts
|
|
427
|
-
var import_react2 = require("react");
|
|
428
|
-
var useProgress = (timeProgress, lote) => {
|
|
429
|
-
const [progress, setProgress] = (0, import_react2.useState)(0);
|
|
430
|
-
(0, import_react2.useEffect)(() => {
|
|
431
|
-
const interval = setInterval(() => {
|
|
432
|
-
setProgress((prev) => {
|
|
433
|
-
if (prev >= 100) {
|
|
434
|
-
clearInterval(interval);
|
|
435
|
-
}
|
|
436
|
-
if (lote) {
|
|
437
|
-
const nextProgress = prev + lote;
|
|
438
|
-
return nextProgress <= 100 ? nextProgress : 100;
|
|
439
|
-
} else {
|
|
440
|
-
return prev + 1;
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
}, timeProgress * 10);
|
|
444
|
-
return () => {
|
|
445
|
-
clearInterval(interval);
|
|
446
|
-
};
|
|
447
|
-
}, [timeProgress, lote]);
|
|
448
|
-
return {
|
|
449
|
-
progress
|
|
450
|
-
};
|
|
451
|
-
};
|
|
452
|
-
var ToastProgress = (timeProgress) => {
|
|
453
|
-
const [progress, setProgress] = (0, import_react2.useState)(100);
|
|
454
|
-
(0, import_react2.useEffect)(() => {
|
|
455
|
-
const interval = setInterval(() => {
|
|
456
|
-
setProgress((prev) => {
|
|
457
|
-
if (prev <= 0) {
|
|
458
|
-
clearInterval(interval);
|
|
459
|
-
}
|
|
460
|
-
return prev - 1;
|
|
461
|
-
});
|
|
462
|
-
}, timeProgress * 10);
|
|
463
|
-
return () => {
|
|
464
|
-
clearInterval(interval);
|
|
465
|
-
};
|
|
466
|
-
}, [timeProgress]);
|
|
467
|
-
return {
|
|
468
|
-
progressToast: progress
|
|
469
|
-
};
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
// src/Components/ToastNotification/SCToastNotification.tsx
|
|
473
|
-
var SCToastNotification = (toast) => {
|
|
474
|
-
var _a;
|
|
475
|
-
const [stateOptions, setStateOptions] = (0, import_react3.useState)(true);
|
|
476
|
-
const [stateToast, setStateToast] = (0, import_react3.useState)(true);
|
|
477
|
-
const timeProgress = toast.time || 10;
|
|
478
|
-
const { progress } = useProgress(timeProgress);
|
|
479
|
-
const toastColorConfig = toast.type || "info";
|
|
480
|
-
const toastIconOption = {
|
|
481
|
-
success: /* @__PURE__ */ import_react3.default.createElement(import_icons_material2.CheckCircleRounded, { color: "success" }),
|
|
482
|
-
error: /* @__PURE__ */ import_react3.default.createElement(import_icons_material2.ErrorRounded, { color: "error" }),
|
|
483
|
-
warning: /* @__PURE__ */ import_react3.default.createElement(import_icons_material2.WarningRounded, { color: "warning" }),
|
|
484
|
-
info: /* @__PURE__ */ import_react3.default.createElement(import_icons_material2.InfoRounded, { color: "info" })
|
|
485
|
-
};
|
|
486
|
-
const acciones = [...toast.actions || [{ text: "Action", fn: () => {
|
|
487
|
-
alert("");
|
|
488
|
-
} }, { text: "Consultar", fn: () => {
|
|
489
|
-
} }]];
|
|
490
|
-
const ToastIconConfig = toastIconOption[toast.type];
|
|
491
|
-
const closeToast = () => {
|
|
492
|
-
setStateToast(false);
|
|
493
|
-
};
|
|
494
|
-
const toggleToastOptions = () => {
|
|
495
|
-
setStateOptions((prevShowOptions) => !prevShowOptions);
|
|
496
|
-
};
|
|
497
|
-
(0, import_react3.useEffect)(() => {
|
|
498
|
-
progress >= 100 && setStateToast(false);
|
|
499
|
-
}, [progress]);
|
|
500
|
-
return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, stateToast && /* @__PURE__ */ import_react3.default.createElement(
|
|
501
|
-
import_material2.Stack,
|
|
502
|
-
{
|
|
503
|
-
position: "fixed",
|
|
504
|
-
zIndex: 1400,
|
|
505
|
-
right: 16,
|
|
506
|
-
top: 16,
|
|
507
|
-
width: 370,
|
|
508
|
-
sx: {
|
|
509
|
-
boxShadow: (theme) => theme.shadows[8]
|
|
510
|
-
}
|
|
511
|
-
},
|
|
512
|
-
/* @__PURE__ */ import_react3.default.createElement(
|
|
513
|
-
import_material2.Box,
|
|
514
|
-
{
|
|
515
|
-
padding: 1.5,
|
|
516
|
-
gap: 1.5,
|
|
517
|
-
display: "flex",
|
|
518
|
-
alignItems: "center",
|
|
519
|
-
sx: {
|
|
520
|
-
backgroundColor: {
|
|
521
|
-
success: "success.50",
|
|
522
|
-
error: "error.50",
|
|
523
|
-
warning: "warning.50",
|
|
524
|
-
info: "info.50"
|
|
525
|
-
}[toastColorConfig]
|
|
526
|
-
}
|
|
527
|
-
},
|
|
528
|
-
/* @__PURE__ */ import_react3.default.createElement(
|
|
529
|
-
import_material2.Stack,
|
|
530
|
-
{
|
|
531
|
-
p: 1,
|
|
532
|
-
gap: 1,
|
|
533
|
-
borderRadius: 50,
|
|
534
|
-
bgcolor: {
|
|
535
|
-
success: "success.100",
|
|
536
|
-
error: "error.100",
|
|
537
|
-
warning: "warning.100",
|
|
538
|
-
info: "info.100"
|
|
539
|
-
}[(_a = toast.type) != null ? _a : "info"]
|
|
540
|
-
},
|
|
541
|
-
/* @__PURE__ */ import_react3.default.createElement(import_material2.Stack, null, ToastIconConfig)
|
|
542
|
-
),
|
|
543
|
-
/* @__PURE__ */ import_react3.default.createElement(import_material2.Divider, { orientation: "vertical", flexItem: true }),
|
|
544
|
-
/* @__PURE__ */ import_react3.default.createElement(import_material2.Stack, { width: 285 }, /* @__PURE__ */ import_react3.default.createElement(
|
|
545
|
-
import_material2.Stack,
|
|
546
|
-
{
|
|
547
|
-
justifyContent: "space-between",
|
|
548
|
-
flexDirection: "row",
|
|
549
|
-
alignItems: "center"
|
|
550
|
-
},
|
|
551
|
-
/* @__PURE__ */ import_react3.default.createElement(import_material2.Typography, { variant: "subtitle2", color: "text.primary" }, toast.title),
|
|
552
|
-
/* @__PURE__ */ import_react3.default.createElement(
|
|
553
|
-
import_material2.IconButton,
|
|
554
|
-
{
|
|
555
|
-
size: "small",
|
|
556
|
-
"data-testid": "close-icon",
|
|
557
|
-
onClick: closeToast
|
|
558
|
-
},
|
|
559
|
-
/* @__PURE__ */ import_react3.default.createElement(import_icons_material2.Close, { fontSize: "small" })
|
|
560
|
-
)
|
|
561
|
-
), /* @__PURE__ */ import_react3.default.createElement(import_material2.Stack, { gap: 0.5 }, /* @__PURE__ */ import_react3.default.createElement(import_material2.Typography, { color: "text.primary", variant: "body2" }, toast.subtitle), !stateOptions && toast.listITems && toast.listITems.length > 0 && /* @__PURE__ */ import_react3.default.createElement(import_material2.Stack, null, toast.listITems.map((element, i) => /* @__PURE__ */ import_react3.default.createElement(import_material2.Typography, { variant: "caption", key: i }, "\u2022 ", element)))), /* @__PURE__ */ import_react3.default.createElement(import_material2.Stack, { justifyContent: "flex-end", flexDirection: "row", gap: 0.5 }, toast.actions && toast.actions.length > 0 && /* @__PURE__ */ import_react3.default.createElement(import_material2.Stack, { flexDirection: "row", gap: 0.5 }, toast.actions.map((button, index) => /* @__PURE__ */ import_react3.default.createElement(
|
|
562
|
-
import_material2.Button,
|
|
563
|
-
{
|
|
564
|
-
key: index,
|
|
565
|
-
color: toast.type === "info" ? "info" : toast.type === "success" ? "success" : toast.type === "error" ? "error" : "warning",
|
|
566
|
-
variant: "text",
|
|
567
|
-
onClick: button.fn,
|
|
568
|
-
disabled: button.disabled || false,
|
|
569
|
-
size: "small"
|
|
570
|
-
},
|
|
571
|
-
button.text.charAt(0).toUpperCase() + button.text.slice(1).toLowerCase()
|
|
572
|
-
))), toast.seeMore && /* @__PURE__ */ import_react3.default.createElement(
|
|
573
|
-
import_material2.Button,
|
|
574
|
-
{
|
|
575
|
-
onClick: toggleToastOptions,
|
|
576
|
-
size: "small",
|
|
577
|
-
variant: "text",
|
|
578
|
-
color: toastColorConfig
|
|
579
|
-
},
|
|
580
|
-
stateOptions ? "Ver m\xE1s" : "Ver menos",
|
|
581
|
-
stateOptions ? /* @__PURE__ */ import_react3.default.createElement(import_icons_material2.KeyboardArrowDown, null) : /* @__PURE__ */ import_react3.default.createElement(import_icons_material2.KeyboardArrowUp, null)
|
|
582
|
-
)))
|
|
714
|
+
disabled: disabled || false
|
|
715
|
+
},
|
|
716
|
+
label ? label : ""
|
|
583
717
|
),
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
|
|
718
|
+
/* @__PURE__ */ import_react4.default.createElement(
|
|
719
|
+
InputComponent,
|
|
586
720
|
{
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
721
|
+
size: size ? size : "medium",
|
|
722
|
+
fullWidth: true,
|
|
723
|
+
value: state,
|
|
724
|
+
error,
|
|
725
|
+
id: label == null ? void 0 : label.replace(/\s+/g, ""),
|
|
726
|
+
disabled: disabled != null ? disabled : false,
|
|
727
|
+
onKeyDown: handleKeyDown,
|
|
728
|
+
onChange: handleInputChange,
|
|
729
|
+
onBlur: handleBlur,
|
|
730
|
+
inputProps: { maxLength: maxLength ? maxLength : 50 },
|
|
731
|
+
type: !showPassword && format2 === "password" ? "password" : (format2 || "text").toUpperCase() === "INT" || (format2 || "text").toUpperCase() === "DECIMAL" ? "number" : "text",
|
|
732
|
+
className: format2 === "password" && !showPassword ? "" : "",
|
|
733
|
+
placeholder,
|
|
734
|
+
startAdornment: iconInputStart ? /* @__PURE__ */ import_react4.default.createElement(import_material3.InputAdornment, { position: "start" }, IconInputStartValidation === "text" ? iconInputStart : IconInputStart ? /* @__PURE__ */ import_react4.default.createElement(IconInputStart, { fontSize: "small" }) : null) : "",
|
|
735
|
+
endAdornment: /* @__PURE__ */ import_react4.default.createElement(import_material3.InputAdornment, { position: "end" }, format2 === "password" ? /* @__PURE__ */ import_react4.default.createElement(
|
|
736
|
+
import_material3.IconButton,
|
|
737
|
+
{
|
|
738
|
+
"aria-label": "toggle password visibility",
|
|
739
|
+
onClick: handleClickShowPassword,
|
|
740
|
+
onMouseDown: handleMouseDownPassword,
|
|
741
|
+
edge: "end"
|
|
742
|
+
},
|
|
743
|
+
showPassword ? /* @__PURE__ */ import_react4.default.createElement(import_icons_material3.VisibilityOff, null) : /* @__PURE__ */ import_react4.default.createElement(import_icons_material3.Visibility, null)
|
|
744
|
+
) : iconInputEnd === void 0 && infoElement !== void 0 ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement(
|
|
745
|
+
import_icons_material3.InfoOutlined,
|
|
746
|
+
{
|
|
747
|
+
"data-testid": "test-infoElement",
|
|
748
|
+
sx: { ml: 0.5 },
|
|
749
|
+
color: "action",
|
|
750
|
+
fontSize: "small",
|
|
751
|
+
component: "svg",
|
|
752
|
+
onMouseEnter: (event2) => handleOpenInfoElement(event2),
|
|
753
|
+
onMouseLeave: () => handleCloseInfoElement()
|
|
591
754
|
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
755
|
+
), /* @__PURE__ */ import_react4.default.createElement(
|
|
756
|
+
import_material3.Popover,
|
|
757
|
+
{
|
|
758
|
+
sx: {
|
|
759
|
+
pointerEvents: "none",
|
|
760
|
+
"& .MuiBackdrop-root": {
|
|
761
|
+
backgroundColor: "transparent"
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
open: openInfoElement,
|
|
765
|
+
anchorEl: anchorInfoElement,
|
|
766
|
+
onClose: handleCloseInfoElement,
|
|
767
|
+
anchorOrigin: {
|
|
768
|
+
vertical: "bottom",
|
|
769
|
+
horizontal: "left"
|
|
770
|
+
},
|
|
771
|
+
transformOrigin: {
|
|
772
|
+
vertical: "top",
|
|
773
|
+
horizontal: "left"
|
|
774
|
+
},
|
|
775
|
+
disableRestoreFocus: true
|
|
776
|
+
},
|
|
777
|
+
/* @__PURE__ */ import_react4.default.createElement(import_material3.Typography, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
|
|
778
|
+
)) : /* @__PURE__ */ import_react4.default.createElement(import_material3.Tooltip, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ import_react4.default.createElement(
|
|
779
|
+
import_icons_material3.InfoOutlined,
|
|
780
|
+
{
|
|
781
|
+
color: "action",
|
|
782
|
+
fontSize: "small"
|
|
783
|
+
}
|
|
784
|
+
))) : iconInputEnd !== void 0 ? IconInputEndValidation === "text" ? iconInputEnd : IconInputEnd ? /* @__PURE__ */ import_react4.default.createElement(IconInputEnd, { fontSize: "small" }) : null : ""),
|
|
785
|
+
label: label ? label + (format2 === "password" && !showPassword ? "" : "") : "",
|
|
786
|
+
autoComplete: format2 === "password" ? "new-password" : "off"
|
|
596
787
|
}
|
|
597
788
|
)
|
|
598
|
-
))
|
|
789
|
+
), (iconInputEnd !== void 0 || format2 === "password") && infoElement ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, infoElement.component === "popover" ? /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement(
|
|
790
|
+
import_icons_material3.InfoOutlined,
|
|
791
|
+
{
|
|
792
|
+
"data-testid": "test-infoElement",
|
|
793
|
+
component: "svg",
|
|
794
|
+
sx: { marginLeft: "4px" },
|
|
795
|
+
color: "action",
|
|
796
|
+
fontSize: "small",
|
|
797
|
+
onMouseEnter: (event2) => handleOpenInfoElement(event2),
|
|
798
|
+
onMouseLeave: handleCloseInfoElement
|
|
799
|
+
}
|
|
800
|
+
), /* @__PURE__ */ import_react4.default.createElement(
|
|
801
|
+
import_material3.Popover,
|
|
802
|
+
{
|
|
803
|
+
sx: { pointerEvents: "none" },
|
|
804
|
+
open: openInfoElement,
|
|
805
|
+
anchorEl: anchorInfoElement,
|
|
806
|
+
onClose: handleCloseInfoElement,
|
|
807
|
+
anchorOrigin: {
|
|
808
|
+
vertical: "bottom",
|
|
809
|
+
horizontal: "left"
|
|
810
|
+
},
|
|
811
|
+
transformOrigin: {
|
|
812
|
+
vertical: "top",
|
|
813
|
+
horizontal: "left"
|
|
814
|
+
},
|
|
815
|
+
disableRestoreFocus: true
|
|
816
|
+
},
|
|
817
|
+
/* @__PURE__ */ import_react4.default.createElement(import_material3.Typography, { "data-testid": "test-popover-text", p: 2 }, infoElement.text)
|
|
818
|
+
)) : /* @__PURE__ */ import_react4.default.createElement(import_material3.Tooltip, { title: infoElement.text, placement: "bottom-end", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ import_react4.default.createElement(
|
|
819
|
+
import_icons_material3.InfoOutlined,
|
|
820
|
+
{
|
|
821
|
+
sx: { marginLeft: "4px" },
|
|
822
|
+
color: "action",
|
|
823
|
+
fontSize: "small"
|
|
824
|
+
}
|
|
825
|
+
))) : ""));
|
|
599
826
|
};
|
|
600
827
|
|
|
601
828
|
// src/Components/TextArea/Helpers/validateIcon.tsx
|
|
@@ -608,9 +835,9 @@ function getIcon(name) {
|
|
|
608
835
|
}
|
|
609
836
|
|
|
610
837
|
// src/Components/TextArea/SCTextArea.tsx
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var
|
|
838
|
+
var import_react5 = __toESM(require("react"), 1);
|
|
839
|
+
var import_material4 = require("@mui/material");
|
|
840
|
+
var import_icons_material4 = require("@mui/icons-material");
|
|
614
841
|
var SCTextArea = ({
|
|
615
842
|
//informativas
|
|
616
843
|
title,
|
|
@@ -632,11 +859,11 @@ var SCTextArea = ({
|
|
|
632
859
|
state,
|
|
633
860
|
onBlur
|
|
634
861
|
}) => {
|
|
635
|
-
const [helperCount, setHelperCount] = (0,
|
|
636
|
-
const [stateError, setStateError] = (0,
|
|
637
|
-
const [anchorInfoTitle, setAnchorInfoTitle] =
|
|
862
|
+
const [helperCount, setHelperCount] = (0, import_react5.useState)(0);
|
|
863
|
+
const [stateError, setStateError] = (0, import_react5.useState)(false);
|
|
864
|
+
const [anchorInfoTitle, setAnchorInfoTitle] = import_react5.default.useState(null);
|
|
638
865
|
const openInfoTitle = Boolean(anchorInfoTitle);
|
|
639
|
-
(0,
|
|
866
|
+
(0, import_react5.useEffect)(() => {
|
|
640
867
|
setHelperCount(state == null ? void 0 : state.length);
|
|
641
868
|
}, [state]);
|
|
642
869
|
const IconTitle = getIcon(iconTitle);
|
|
@@ -658,16 +885,16 @@ var SCTextArea = ({
|
|
|
658
885
|
const handleCloseInfoTitle = () => {
|
|
659
886
|
setAnchorInfoTitle(null);
|
|
660
887
|
};
|
|
661
|
-
return /* @__PURE__ */
|
|
662
|
-
|
|
888
|
+
return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement(import_material4.Box, { sx: { width } }, /* @__PURE__ */ import_react5.default.createElement(import_material4.Grid, { container: true, sx: { alignItems: "center" }, gap: 0.5 }, iconTitle && IconTitle && /* @__PURE__ */ import_react5.default.createElement(import_material4.SvgIcon, { color: "action", fontSize: "small", component: IconTitle }), title && /* @__PURE__ */ import_react5.default.createElement(import_material4.Typography, { color: colorTitle || "text.secondary", variant: "subtitle2" }, title), infoTitle ? /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, infoTitle.component === "popover" ? /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement(
|
|
889
|
+
import_icons_material4.InfoOutlined,
|
|
663
890
|
{
|
|
664
891
|
color: "action",
|
|
665
892
|
fontSize: "small",
|
|
666
893
|
onMouseEnter: (event2) => handleOpenInfoTitle(event2),
|
|
667
894
|
onMouseLeave: () => handleCloseInfoTitle()
|
|
668
895
|
}
|
|
669
|
-
), /* @__PURE__ */
|
|
670
|
-
|
|
896
|
+
), /* @__PURE__ */ import_react5.default.createElement(
|
|
897
|
+
import_material4.Popover,
|
|
671
898
|
{
|
|
672
899
|
sx: { pointerEvents: "none" },
|
|
673
900
|
open: openInfoTitle,
|
|
@@ -683,15 +910,15 @@ var SCTextArea = ({
|
|
|
683
910
|
},
|
|
684
911
|
disableRestoreFocus: true
|
|
685
912
|
},
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
)) : /* @__PURE__ */
|
|
688
|
-
|
|
913
|
+
/* @__PURE__ */ import_react5.default.createElement(import_material4.Typography, { sx: { p: 2 } }, infoTitle.text)
|
|
914
|
+
)) : /* @__PURE__ */ import_react5.default.createElement(import_material4.Tooltip, { title: infoTitle.text, placement: "bottom-start", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ import_react5.default.createElement(
|
|
915
|
+
import_icons_material4.InfoOutlined,
|
|
689
916
|
{
|
|
690
917
|
color: "action",
|
|
691
918
|
fontSize: "small"
|
|
692
919
|
}
|
|
693
|
-
))) : ""), /* @__PURE__ */
|
|
694
|
-
|
|
920
|
+
))) : ""), /* @__PURE__ */ import_react5.default.createElement(import_material4.Stack, null, /* @__PURE__ */ import_react5.default.createElement(
|
|
921
|
+
import_material4.TextField,
|
|
695
922
|
{
|
|
696
923
|
required,
|
|
697
924
|
placeholder,
|
|
@@ -712,8 +939,8 @@ var SCTextArea = ({
|
|
|
712
939
|
},
|
|
713
940
|
autoComplete: "off"
|
|
714
941
|
}
|
|
715
|
-
)), /* @__PURE__ */
|
|
716
|
-
|
|
942
|
+
)), /* @__PURE__ */ import_react5.default.createElement(import_material4.Stack, null, /* @__PURE__ */ import_react5.default.createElement(
|
|
943
|
+
import_material4.Typography,
|
|
717
944
|
{
|
|
718
945
|
variant: "caption",
|
|
719
946
|
color: "text.secondary",
|
|
@@ -726,8 +953,8 @@ var SCTextArea = ({
|
|
|
726
953
|
};
|
|
727
954
|
|
|
728
955
|
// src/Components/SCSelect.tsx
|
|
729
|
-
var
|
|
730
|
-
var
|
|
956
|
+
var import_react6 = __toESM(require("react"), 1);
|
|
957
|
+
var import_material5 = require("@mui/material");
|
|
731
958
|
var import_Select = __toESM(require("@mui/material/Select"), 1);
|
|
732
959
|
var Muicon2 = __toESM(require("@mui/icons-material"), 1);
|
|
733
960
|
function SCSelect({
|
|
@@ -744,16 +971,16 @@ function SCSelect({
|
|
|
744
971
|
state
|
|
745
972
|
}) {
|
|
746
973
|
const labelContent = `<span style="color: red;">* </span>` + label;
|
|
747
|
-
const [prevData, setPrevData] =
|
|
748
|
-
const [error, setError] =
|
|
749
|
-
(0,
|
|
974
|
+
const [prevData, setPrevData] = import_react6.default.useState(data);
|
|
975
|
+
const [error, setError] = import_react6.default.useState(false);
|
|
976
|
+
(0, import_react6.useEffect)(() => {
|
|
750
977
|
if (error) {
|
|
751
978
|
setTimeout(() => {
|
|
752
979
|
setError(false);
|
|
753
980
|
}, 1e3);
|
|
754
981
|
}
|
|
755
982
|
}, [error]);
|
|
756
|
-
(0,
|
|
983
|
+
(0, import_react6.useEffect)(() => {
|
|
757
984
|
let dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
|
|
758
985
|
if (dataChangeValidation == false) {
|
|
759
986
|
setState({ hiddenValue: "", textValue: "" });
|
|
@@ -787,25 +1014,25 @@ function SCSelect({
|
|
|
787
1014
|
}
|
|
788
1015
|
}
|
|
789
1016
|
};
|
|
790
|
-
return /* @__PURE__ */
|
|
791
|
-
|
|
1017
|
+
return /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, data && /* @__PURE__ */ import_react6.default.createElement(import_material5.Box, { sx: { width } }, /* @__PURE__ */ import_react6.default.createElement(
|
|
1018
|
+
import_material5.FormControl,
|
|
792
1019
|
{
|
|
793
1020
|
fullWidth: true,
|
|
794
1021
|
size: size ? size : "medium",
|
|
795
1022
|
variant
|
|
796
1023
|
},
|
|
797
|
-
/* @__PURE__ */
|
|
798
|
-
|
|
1024
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
|
1025
|
+
import_material5.InputLabel,
|
|
799
1026
|
{
|
|
800
1027
|
error
|
|
801
1028
|
},
|
|
802
|
-
required ? /* @__PURE__ */
|
|
1029
|
+
required ? /* @__PURE__ */ import_react6.default.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label
|
|
803
1030
|
),
|
|
804
|
-
/* @__PURE__ */
|
|
1031
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
|
805
1032
|
import_Select.default,
|
|
806
1033
|
{
|
|
807
1034
|
value: Array.isArray(state.hiddenValue) ? state.hiddenValue[0] || "" : state.hiddenValue != "-1" ? state.hiddenValue : "",
|
|
808
|
-
label: required ? /* @__PURE__ */
|
|
1035
|
+
label: required ? /* @__PURE__ */ import_react6.default.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
|
|
809
1036
|
onChange: handleChange,
|
|
810
1037
|
onBlur: handleBlur,
|
|
811
1038
|
variant,
|
|
@@ -831,17 +1058,17 @@ function SCSelect({
|
|
|
831
1058
|
}
|
|
832
1059
|
},
|
|
833
1060
|
data.map((option, index) => {
|
|
834
|
-
return /* @__PURE__ */
|
|
1061
|
+
return /* @__PURE__ */ import_react6.default.createElement(import_material5.MenuItem, { key: index, value: getItemValue(option).value }, getItemValue(option).icon != void 0 ? /* @__PURE__ */ import_react6.default.createElement(import_material5.ListItemIcon, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ import_react6.default.createElement(import_material5.SvgIcon, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "", /* @__PURE__ */ import_react6.default.createElement(import_material5.ListItemText, { primary: getItemValue(option).text, color: "text.primary" }));
|
|
835
1062
|
})
|
|
836
1063
|
)
|
|
837
1064
|
)));
|
|
838
1065
|
}
|
|
839
1066
|
|
|
840
1067
|
// src/Components/SCAutocomplete.tsx
|
|
841
|
-
var
|
|
842
|
-
var
|
|
1068
|
+
var import_react7 = __toESM(require("react"), 1);
|
|
1069
|
+
var import_material6 = require("@mui/material");
|
|
843
1070
|
var import_Grid22 = __toESM(require("@mui/material/Grid2"), 1);
|
|
844
|
-
var
|
|
1071
|
+
var import_icons_material5 = require("@mui/icons-material");
|
|
845
1072
|
var Muicon3 = __toESM(require("@mui/icons-material"), 1);
|
|
846
1073
|
function SCAutocomplete({
|
|
847
1074
|
label = "",
|
|
@@ -863,12 +1090,12 @@ function SCAutocomplete({
|
|
|
863
1090
|
const labelContent = `<span style="color: red;">* </span>` + label;
|
|
864
1091
|
let group = "";
|
|
865
1092
|
let isSelected = false;
|
|
866
|
-
const [selectedOptions, setSelectedOptions] =
|
|
867
|
-
const [prevData, setPrevData] =
|
|
868
|
-
const [originalData, setOriginalData] =
|
|
869
|
-
const [inputValue, setInputValue] =
|
|
870
|
-
const [isUserTyping, setIsUserTyping] =
|
|
871
|
-
(0,
|
|
1093
|
+
const [selectedOptions, setSelectedOptions] = import_react7.default.useState([]);
|
|
1094
|
+
const [prevData, setPrevData] = import_react7.default.useState(data);
|
|
1095
|
+
const [originalData, setOriginalData] = import_react7.default.useState(data);
|
|
1096
|
+
const [inputValue, setInputValue] = import_react7.default.useState("");
|
|
1097
|
+
const [isUserTyping, setIsUserTyping] = import_react7.default.useState(false);
|
|
1098
|
+
(0, import_react7.useEffect)(() => {
|
|
872
1099
|
const dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
|
|
873
1100
|
if (!dataChangeValidation && !isUserTyping) {
|
|
874
1101
|
setState({ hiddenValue: "-1", textValue: "" });
|
|
@@ -879,7 +1106,7 @@ function SCAutocomplete({
|
|
|
879
1106
|
}
|
|
880
1107
|
setPrevData(data);
|
|
881
1108
|
}, [data, isUserTyping]);
|
|
882
|
-
(0,
|
|
1109
|
+
(0, import_react7.useEffect)(() => {
|
|
883
1110
|
if (typeFormat == "multiselect") {
|
|
884
1111
|
if (state.hiddenValue != "-1" && Array.isArray(state.hiddenValue)) {
|
|
885
1112
|
const newSelectedOptions = originalData.filter(
|
|
@@ -889,7 +1116,7 @@ function SCAutocomplete({
|
|
|
889
1116
|
}
|
|
890
1117
|
}
|
|
891
1118
|
}, [state.hiddenValue, originalData, typeFormat]);
|
|
892
|
-
(0,
|
|
1119
|
+
(0, import_react7.useEffect)(() => {
|
|
893
1120
|
if (inputValue === "") {
|
|
894
1121
|
setIsUserTyping(false);
|
|
895
1122
|
}
|
|
@@ -947,8 +1174,8 @@ function SCAutocomplete({
|
|
|
947
1174
|
const selectedValue = typeFormat === "multiselect" ? selectedOptions : originalData.find(
|
|
948
1175
|
(item) => getItemValue(item).value === state.hiddenValue
|
|
949
1176
|
) || null;
|
|
950
|
-
return /* @__PURE__ */
|
|
951
|
-
|
|
1177
|
+
return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, data && /* @__PURE__ */ import_react7.default.createElement(
|
|
1178
|
+
import_material6.Autocomplete,
|
|
952
1179
|
{
|
|
953
1180
|
multiple: typeFormat === "multiselect",
|
|
954
1181
|
clearOnEscape: true,
|
|
@@ -974,10 +1201,10 @@ function SCAutocomplete({
|
|
|
974
1201
|
limitTags: 2,
|
|
975
1202
|
renderTags: (value, getTagProps) => {
|
|
976
1203
|
const limit = 2;
|
|
977
|
-
return /* @__PURE__ */
|
|
1204
|
+
return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, value.slice(0, limit).map((option, index) => {
|
|
978
1205
|
const _a = getTagProps({ index }), { key } = _a, chipProps = __objRest(_a, ["key"]);
|
|
979
|
-
return /* @__PURE__ */
|
|
980
|
-
|
|
1206
|
+
return /* @__PURE__ */ import_react7.default.createElement(
|
|
1207
|
+
import_material6.Chip,
|
|
981
1208
|
__spreadProps(__spreadValues({
|
|
982
1209
|
key,
|
|
983
1210
|
color: "default",
|
|
@@ -988,7 +1215,7 @@ function SCAutocomplete({
|
|
|
988
1215
|
style: { maxWidth: 120, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
989
1216
|
})
|
|
990
1217
|
);
|
|
991
|
-
}), value.length > limit && /* @__PURE__ */
|
|
1218
|
+
}), value.length > limit && /* @__PURE__ */ import_react7.default.createElement(import_material6.Box, { sx: { ml: 0.5, fontSize: 13, color: "#666", display: "flex", alignItems: "center" } }, `+${value.length - limit}`));
|
|
992
1219
|
},
|
|
993
1220
|
renderOption: (props, option) => {
|
|
994
1221
|
const _a = props, { key } = _a, optionProps = __objRest(_a, ["key"]);
|
|
@@ -1006,8 +1233,8 @@ function SCAutocomplete({
|
|
|
1006
1233
|
isValid = group == option[columnGroup];
|
|
1007
1234
|
group = option[columnGroup];
|
|
1008
1235
|
}
|
|
1009
|
-
return /* @__PURE__ */
|
|
1010
|
-
|
|
1236
|
+
return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, { key }, columnGroup ? !isValid ? /* @__PURE__ */ import_react7.default.createElement(import_material6.Typography, { color: "text.secondary", sx: { margin: "7px 16px !important", fontSize: "13px !important" } }, option[columnGroup]) : "" : "", /* @__PURE__ */ import_react7.default.createElement(
|
|
1237
|
+
import_material6.MenuItem,
|
|
1011
1238
|
__spreadProps(__spreadValues({}, optionProps), {
|
|
1012
1239
|
disabled: isDisabled,
|
|
1013
1240
|
style: {
|
|
@@ -1016,9 +1243,9 @@ function SCAutocomplete({
|
|
|
1016
1243
|
opacity: isDisabled ? 0.5 : 1
|
|
1017
1244
|
}
|
|
1018
1245
|
}),
|
|
1019
|
-
typeFormat != "multiselect" && getItemValue(option).icon != void 0 ? /* @__PURE__ */
|
|
1020
|
-
typeFormat == "multiselect" ? /* @__PURE__ */
|
|
1021
|
-
|
|
1246
|
+
typeFormat != "multiselect" && getItemValue(option).icon != void 0 ? /* @__PURE__ */ import_react7.default.createElement(import_material6.ListItemIcon, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ import_react7.default.createElement(import_material6.SvgIcon, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "",
|
|
1247
|
+
typeFormat == "multiselect" ? /* @__PURE__ */ import_react7.default.createElement(
|
|
1248
|
+
import_material6.Checkbox,
|
|
1022
1249
|
{
|
|
1023
1250
|
checked: isSelected,
|
|
1024
1251
|
disabled: isDisabled,
|
|
@@ -1026,25 +1253,25 @@ function SCAutocomplete({
|
|
|
1026
1253
|
color: "primary"
|
|
1027
1254
|
}
|
|
1028
1255
|
) : "",
|
|
1029
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ import_react7.default.createElement(import_material6.ListItemText, { primary: getItemValue(option).text, color: "text.primary" }),
|
|
1030
1257
|
getItemValue(option).component != void 0 ? getItemValue(option).component : ""
|
|
1031
1258
|
)));
|
|
1032
1259
|
},
|
|
1033
|
-
renderInput: (params) => /* @__PURE__ */
|
|
1034
|
-
|
|
1260
|
+
renderInput: (params) => /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(
|
|
1261
|
+
import_material6.TextField,
|
|
1035
1262
|
__spreadProps(__spreadValues({}, params), {
|
|
1036
|
-
label: required ? /* @__PURE__ */
|
|
1263
|
+
label: required ? /* @__PURE__ */ import_react7.default.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
|
|
1037
1264
|
placeholder: selectedOptions.length == 0 ? "B\xFAsqueda" : "",
|
|
1038
1265
|
InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
|
|
1039
|
-
endAdornment: /* @__PURE__ */
|
|
1266
|
+
endAdornment: /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, deleteType == "icon" && (state.hiddenValue.toString() != "-1" && state.hiddenValue.toString() != "") ? /* @__PURE__ */ import_react7.default.createElement(import_material6.IconButton, { size: "small", onClick: cleanOptions, sx: { marginLeft: "auto", textAlign: "right", padding: "0px" } }, /* @__PURE__ */ import_react7.default.createElement(import_icons_material5.Clear, { fontSize: "small" })) : "", /* @__PURE__ */ import_react7.default.createElement(import_material6.InputAdornment, { style: { zIndex: 1, position: "relative" }, position: "end" }, /* @__PURE__ */ import_react7.default.createElement(import_icons_material5.Search, { fontSize: "small", color: "action", style: { cursor: "pointer" } })))
|
|
1040
1267
|
})
|
|
1041
1268
|
})
|
|
1042
1269
|
)),
|
|
1043
1270
|
slotProps: {
|
|
1044
1271
|
listbox: {
|
|
1045
|
-
component:
|
|
1046
|
-
return /* @__PURE__ */
|
|
1047
|
-
|
|
1272
|
+
component: import_react7.default.forwardRef(function ListboxComponent(props, ref) {
|
|
1273
|
+
return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(
|
|
1274
|
+
import_material6.Box,
|
|
1048
1275
|
__spreadProps(__spreadValues({
|
|
1049
1276
|
ref
|
|
1050
1277
|
}, props), {
|
|
@@ -1054,9 +1281,9 @@ function SCAutocomplete({
|
|
|
1054
1281
|
backgroundColor: "white"
|
|
1055
1282
|
}, props.sx)
|
|
1056
1283
|
}),
|
|
1057
|
-
checkMassive && typeFormat == "multiselect" ? /* @__PURE__ */
|
|
1284
|
+
checkMassive && typeFormat == "multiselect" ? /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(import_material6.FormControlLabel, { control: /* @__PURE__ */ import_react7.default.createElement(import_material6.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__ */ import_react7.default.createElement(import_material6.Divider, null)) : "",
|
|
1058
1285
|
props.children,
|
|
1059
|
-
deleteType == "button" || fnAplicar ? /* @__PURE__ */
|
|
1286
|
+
deleteType == "button" || fnAplicar ? /* @__PURE__ */ import_react7.default.createElement(
|
|
1060
1287
|
import_Grid22.default,
|
|
1061
1288
|
{
|
|
1062
1289
|
container: true,
|
|
@@ -1071,8 +1298,8 @@ function SCAutocomplete({
|
|
|
1071
1298
|
justifyContent: "space-between"
|
|
1072
1299
|
}
|
|
1073
1300
|
},
|
|
1074
|
-
deleteType == "button" ? /* @__PURE__ */
|
|
1075
|
-
|
|
1301
|
+
deleteType == "button" ? /* @__PURE__ */ import_react7.default.createElement(
|
|
1302
|
+
import_material6.Button,
|
|
1076
1303
|
{
|
|
1077
1304
|
variant: "text",
|
|
1078
1305
|
color: "primary",
|
|
@@ -1084,8 +1311,8 @@ function SCAutocomplete({
|
|
|
1084
1311
|
},
|
|
1085
1312
|
"Limpiar"
|
|
1086
1313
|
) : "",
|
|
1087
|
-
fnAplicar && /* @__PURE__ */
|
|
1088
|
-
|
|
1314
|
+
fnAplicar && /* @__PURE__ */ import_react7.default.createElement(
|
|
1315
|
+
import_material6.Button,
|
|
1089
1316
|
{
|
|
1090
1317
|
variant: "contained",
|
|
1091
1318
|
color: "primary",
|
|
@@ -1104,8 +1331,8 @@ function SCAutocomplete({
|
|
|
1104
1331
|
}
|
|
1105
1332
|
|
|
1106
1333
|
// src/Components/SCDateRange.tsx
|
|
1107
|
-
var
|
|
1108
|
-
var
|
|
1334
|
+
var import_react8 = __toESM(require("react"), 1);
|
|
1335
|
+
var import_material7 = require("@mui/material");
|
|
1109
1336
|
var import_LocalizationProvider = require("@mui/x-date-pickers/LocalizationProvider");
|
|
1110
1337
|
var import_AdapterDayjs = require("@mui/x-date-pickers/AdapterDayjs");
|
|
1111
1338
|
var import_DateRangePicker = require("@mui/x-date-pickers-pro/DateRangePicker");
|
|
@@ -1136,7 +1363,7 @@ var SCDateRange = ({
|
|
|
1136
1363
|
];
|
|
1137
1364
|
setState(convertedValue);
|
|
1138
1365
|
};
|
|
1139
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ import_react8.default.createElement(import_LocalizationProvider.LocalizationProvider, { dateAdapter: import_AdapterDayjs.AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ import_react8.default.createElement(import_material7.Box, { sx: { width: "100%" } }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1140
1367
|
import_DateRangePicker.DateRangePicker,
|
|
1141
1368
|
{
|
|
1142
1369
|
value: state,
|
|
@@ -1155,7 +1382,7 @@ var SCDateRange = ({
|
|
|
1155
1382
|
required,
|
|
1156
1383
|
error: position === "start" ? isStartEmpty : isEndEmpty,
|
|
1157
1384
|
InputProps: {
|
|
1158
|
-
endAdornment: /* @__PURE__ */
|
|
1385
|
+
endAdornment: /* @__PURE__ */ import_react8.default.createElement(import_material7.InputAdornment, { position: "end" }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1159
1386
|
import_Event.default,
|
|
1160
1387
|
{
|
|
1161
1388
|
color: hasError ? "error" : "action",
|
|
@@ -1225,7 +1452,7 @@ var validateInputs = (arrayElements, onError, onSuccess, setChipFilters, setText
|
|
|
1225
1452
|
};
|
|
1226
1453
|
|
|
1227
1454
|
// src/Components/Drawer/Helpers/validateTypeElement.tsx
|
|
1228
|
-
var
|
|
1455
|
+
var import_react9 = __toESM(require("react"), 1);
|
|
1229
1456
|
var validateTypeElements = (element) => {
|
|
1230
1457
|
var _a;
|
|
1231
1458
|
let validation = "";
|
|
@@ -1233,37 +1460,37 @@ var validateTypeElements = (element) => {
|
|
|
1233
1460
|
if (element.type == "textField") {
|
|
1234
1461
|
validation = "textField";
|
|
1235
1462
|
typeElement = element;
|
|
1236
|
-
} else if (
|
|
1463
|
+
} else if (import_react9.default.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCtextField") {
|
|
1237
1464
|
validation = "textField";
|
|
1238
1465
|
typeElement = element == null ? void 0 : element.component.props;
|
|
1239
1466
|
} else if (element.type == "textArea") {
|
|
1240
1467
|
validation = "textArea";
|
|
1241
1468
|
typeElement = element;
|
|
1242
|
-
} else if (
|
|
1469
|
+
} else if (import_react9.default.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCtextArea") {
|
|
1243
1470
|
validation = "textArea";
|
|
1244
1471
|
typeElement = element == null ? void 0 : element.component.props;
|
|
1245
1472
|
} else if (element.type == "dateRange") {
|
|
1246
1473
|
validation = "dateRange";
|
|
1247
1474
|
typeElement = element;
|
|
1248
|
-
} else if (
|
|
1475
|
+
} else if (import_react9.default.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCDateRange") {
|
|
1249
1476
|
validation = "dateRange";
|
|
1250
1477
|
typeElement = element == null ? void 0 : element.component.props;
|
|
1251
1478
|
} else if (element.type == "autocomplete") {
|
|
1252
1479
|
validation = "autocomplete";
|
|
1253
1480
|
typeElement = element;
|
|
1254
|
-
} else if (
|
|
1481
|
+
} else if (import_react9.default.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCAutocomplete") {
|
|
1255
1482
|
validation = "autocomplete";
|
|
1256
1483
|
typeElement = element == null ? void 0 : element.component.props;
|
|
1257
1484
|
} else if (element.typeFormat == "multiselect") {
|
|
1258
1485
|
validation = "multiselect";
|
|
1259
1486
|
typeElement = element;
|
|
1260
|
-
} else if (
|
|
1487
|
+
} else if (import_react9.default.isValidElement(element == null ? void 0 : element.component) && element.component.props && ((_a = element == null ? void 0 : element.component) == null ? void 0 : _a.props).typeFormat == "multiselect") {
|
|
1261
1488
|
validation = "multiselect";
|
|
1262
1489
|
typeElement = element == null ? void 0 : element.component.props;
|
|
1263
1490
|
} else if (element.type == "select") {
|
|
1264
1491
|
validation = "select";
|
|
1265
1492
|
typeElement = element;
|
|
1266
|
-
} else if (
|
|
1493
|
+
} else if (import_react9.default.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCSelect") {
|
|
1267
1494
|
validation = "select";
|
|
1268
1495
|
typeElement = element == null ? void 0 : element.component.props;
|
|
1269
1496
|
}
|
|
@@ -1290,12 +1517,12 @@ function SCDrawer({
|
|
|
1290
1517
|
chipFilters
|
|
1291
1518
|
}) {
|
|
1292
1519
|
var _a, _b;
|
|
1293
|
-
const scrollRef = (0,
|
|
1294
|
-
const [drawerOpen, setDrawerOpen] =
|
|
1295
|
-
const [toast, setToast] =
|
|
1296
|
-
const [stateChipFilters, setChipFilters] =
|
|
1297
|
-
const [textFilters, setTextFilters] =
|
|
1298
|
-
(0,
|
|
1520
|
+
const scrollRef = (0, import_react10.useRef)(null);
|
|
1521
|
+
const [drawerOpen, setDrawerOpen] = import_react10.default.useState(open);
|
|
1522
|
+
const [toast, setToast] = import_react10.default.useState(null);
|
|
1523
|
+
const [stateChipFilters, setChipFilters] = import_react10.default.useState(false);
|
|
1524
|
+
const [textFilters, setTextFilters] = import_react10.default.useState([]);
|
|
1525
|
+
(0, import_react10.useEffect)(() => {
|
|
1299
1526
|
if (chipFilters != void 0) {
|
|
1300
1527
|
if (chipFilters.length > 0) {
|
|
1301
1528
|
setTextFilters([]);
|
|
@@ -1303,7 +1530,7 @@ function SCDrawer({
|
|
|
1303
1530
|
}
|
|
1304
1531
|
}
|
|
1305
1532
|
}, [chipFilters]);
|
|
1306
|
-
(0,
|
|
1533
|
+
(0, import_react10.useEffect)(() => {
|
|
1307
1534
|
if (open) {
|
|
1308
1535
|
toggleDrawer(true);
|
|
1309
1536
|
} else {
|
|
@@ -1466,8 +1693,8 @@ function SCDrawer({
|
|
|
1466
1693
|
};
|
|
1467
1694
|
const shouldShowChips = chipFilters != void 0 && chipFilters.length > 0 ? true : stateChipFilters === true && hasActiveFilters();
|
|
1468
1695
|
const actionsA = actions == false ? false : actions != void 0 ? actions : [{ text: "Aplicar filtros", fn: inputValidation }, { text: "Limpiar filtros", fn: cleanFilters }];
|
|
1469
|
-
return /* @__PURE__ */
|
|
1470
|
-
|
|
1696
|
+
return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, toast && /* @__PURE__ */ import_react10.default.createElement(SCToastNotification, __spreadValues({}, toast)), /* @__PURE__ */ import_react10.default.createElement(import_Grid23.default, { container: true, justifyContent: "flex-start", flexWrap: "nowrap", alignItems: "center", sx: { width: "100%" } }, shouldShowChips && /* @__PURE__ */ import_react10.default.createElement(import_material8.Box, { display: "flex", alignItems: "center", sx: { maxWidth: "78%" } }, /* @__PURE__ */ import_react10.default.createElement(import_material8.IconButton, { onClick: () => scroll(-150), size: "small" }, /* @__PURE__ */ import_react10.default.createElement(import_ArrowBackIos.default, { fontSize: "small" })), /* @__PURE__ */ import_react10.default.createElement(
|
|
1697
|
+
import_material8.Box,
|
|
1471
1698
|
{
|
|
1472
1699
|
ref: scrollRef,
|
|
1473
1700
|
gap: 0.3,
|
|
@@ -1478,8 +1705,8 @@ function SCDrawer({
|
|
|
1478
1705
|
"&::-webkit-scrollbar": { display: "none" }
|
|
1479
1706
|
}
|
|
1480
1707
|
},
|
|
1481
|
-
textFilters == null ? void 0 : textFilters.map((chipData, index) => /* @__PURE__ */
|
|
1482
|
-
|
|
1708
|
+
textFilters == null ? void 0 : textFilters.map((chipData, index) => /* @__PURE__ */ import_react10.default.createElement(
|
|
1709
|
+
import_material8.Chip,
|
|
1483
1710
|
__spreadProps(__spreadValues({
|
|
1484
1711
|
key: index,
|
|
1485
1712
|
label: chipData.value
|
|
@@ -1493,15 +1720,15 @@ function SCDrawer({
|
|
|
1493
1720
|
}
|
|
1494
1721
|
})
|
|
1495
1722
|
))
|
|
1496
|
-
), /* @__PURE__ */
|
|
1497
|
-
|
|
1723
|
+
), /* @__PURE__ */ import_react10.default.createElement(import_material8.IconButton, { onClick: () => scroll(150), size: "small" }, /* @__PURE__ */ import_react10.default.createElement(import_ArrowForwardIos.default, { fontSize: "small" }))), (buttonDrawer == null ? void 0 : buttonDrawer.type) == "chip" ? /* @__PURE__ */ import_react10.default.createElement(
|
|
1724
|
+
import_material8.Chip,
|
|
1498
1725
|
__spreadProps(__spreadValues({
|
|
1499
1726
|
onClick: toggleDrawer(true),
|
|
1500
1727
|
color: buttonDrawer == null ? void 0 : buttonDrawer.color,
|
|
1501
1728
|
variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) == "contained" ? "filled" : "outlined",
|
|
1502
1729
|
label: (_a = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _a : "",
|
|
1503
|
-
icon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" && ButtonIcon ? /* @__PURE__ */
|
|
1504
|
-
deleteIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */
|
|
1730
|
+
icon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" && ButtonIcon ? /* @__PURE__ */ import_react10.default.createElement(ButtonIcon, { fontSize: "small" }) : void 0,
|
|
1731
|
+
deleteIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ import_react10.default.createElement(ButtonIcon, { fontSize: "small" }) : void 0
|
|
1505
1732
|
}, (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? { onDelete: () => {
|
|
1506
1733
|
} } : {}), {
|
|
1507
1734
|
sx: {
|
|
@@ -1511,8 +1738,8 @@ function SCDrawer({
|
|
|
1511
1738
|
textTransform: "capitalize"
|
|
1512
1739
|
}
|
|
1513
1740
|
})
|
|
1514
|
-
) : /* @__PURE__ */
|
|
1515
|
-
|
|
1741
|
+
) : /* @__PURE__ */ import_react10.default.createElement(
|
|
1742
|
+
import_material8.Button,
|
|
1516
1743
|
{
|
|
1517
1744
|
"data-testid": "test-buttonDrawer",
|
|
1518
1745
|
sx: { textTransform: "capitalize" },
|
|
@@ -1520,12 +1747,12 @@ function SCDrawer({
|
|
|
1520
1747
|
onClick: toggleDrawer(true),
|
|
1521
1748
|
size: "small",
|
|
1522
1749
|
variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) != void 0 ? buttonDrawer == null ? void 0 : buttonDrawer.variant : "text",
|
|
1523
|
-
startIcon: ((buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" || !(buttonDrawer == null ? void 0 : buttonDrawer.iconPosition)) && ButtonIcon ? /* @__PURE__ */
|
|
1524
|
-
endIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */
|
|
1750
|
+
startIcon: ((buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" || !(buttonDrawer == null ? void 0 : buttonDrawer.iconPosition)) && ButtonIcon ? /* @__PURE__ */ import_react10.default.createElement(ButtonIcon, { fontSize: "small" }) : null,
|
|
1751
|
+
endIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ import_react10.default.createElement(ButtonIcon, { fontSize: "small" }) : null
|
|
1525
1752
|
},
|
|
1526
1753
|
(_b = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _b : ""
|
|
1527
|
-
)), /* @__PURE__ */
|
|
1528
|
-
|
|
1754
|
+
)), /* @__PURE__ */ import_react10.default.createElement(
|
|
1755
|
+
import_material8.Drawer,
|
|
1529
1756
|
{
|
|
1530
1757
|
open: drawerOpen,
|
|
1531
1758
|
onClose: toggleDrawer(false),
|
|
@@ -1538,15 +1765,15 @@ function SCDrawer({
|
|
|
1538
1765
|
}
|
|
1539
1766
|
}
|
|
1540
1767
|
},
|
|
1541
|
-
/* @__PURE__ */
|
|
1768
|
+
/* @__PURE__ */ import_react10.default.createElement(import_material8.Stack, { flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react10.default.createElement(import_Grid23.default, { container: true, sx: { backgroundColor: "primary.50", alignItems: "center", height: "42px", textAlign: "left", padding: "8px 12px", justifyContent: "space-between", alignContent: "center" } }, /* @__PURE__ */ import_react10.default.createElement(import_material8.Typography, { variant: "h6", color: colorTitle || "text.primary" }, title != null ? title : "Personaliza tu b\xFAsqueda"), /* @__PURE__ */ import_react10.default.createElement(import_material8.IconButton, { onClick: handleDrawerClose }, /* @__PURE__ */ import_react10.default.createElement(import_Close.default, { "data-testid": "test-button-close", sx: { color: "text.primary" } }))), /* @__PURE__ */ import_react10.default.createElement(import_material8.Stack, { alignItems: "flex-start", height: "100%", gap: "16px", flex: 1, overflow: "auto", padding: "16px" }, arrayElements == null ? void 0 : arrayElements.map((arrayElement, index) => {
|
|
1542
1769
|
var _a2, _b2, _c, _d, _e, _f;
|
|
1543
|
-
return /* @__PURE__ */
|
|
1544
|
-
|
|
1770
|
+
return /* @__PURE__ */ import_react10.default.createElement(
|
|
1771
|
+
import_material8.Box,
|
|
1545
1772
|
{
|
|
1546
1773
|
key: `Stack_${(_a2 = arrayElement.type) != null ? _a2 : ""} ${(_b2 = arrayElement.label) != null ? _b2 : ""}${index}`,
|
|
1547
1774
|
sx: { width: "100%" }
|
|
1548
1775
|
},
|
|
1549
|
-
arrayElement.component ? /* @__PURE__ */
|
|
1776
|
+
arrayElement.component ? /* @__PURE__ */ import_react10.default.createElement(import_material8.Stack, { direction: "row", alignItems: "left", gap: 1 }, arrayElement.component) : arrayElement.type === "textField" ? /* @__PURE__ */ import_react10.default.createElement(
|
|
1550
1777
|
SCTextField,
|
|
1551
1778
|
{
|
|
1552
1779
|
title: arrayElement.title,
|
|
@@ -1572,7 +1799,7 @@ function SCDrawer({
|
|
|
1572
1799
|
onBlur: arrayElement.onBlur,
|
|
1573
1800
|
onKeyDown: arrayElement.onKeyDown
|
|
1574
1801
|
}
|
|
1575
|
-
) : arrayElement.type === "textArea" ? /* @__PURE__ */
|
|
1802
|
+
) : arrayElement.type === "textArea" ? /* @__PURE__ */ import_react10.default.createElement(
|
|
1576
1803
|
SCTextArea,
|
|
1577
1804
|
{
|
|
1578
1805
|
title: arrayElement.title,
|
|
@@ -1591,7 +1818,7 @@ function SCDrawer({
|
|
|
1591
1818
|
state: arrayElement.state || "",
|
|
1592
1819
|
onBlur: arrayElement.onBlur
|
|
1593
1820
|
}
|
|
1594
|
-
) : arrayElement.type === "autocomplete" ? /* @__PURE__ */
|
|
1821
|
+
) : arrayElement.type === "autocomplete" ? /* @__PURE__ */ import_react10.default.createElement(
|
|
1595
1822
|
SCAutocomplete,
|
|
1596
1823
|
{
|
|
1597
1824
|
label: arrayElement.label,
|
|
@@ -1609,7 +1836,7 @@ function SCDrawer({
|
|
|
1609
1836
|
state: arrayElement.state || "",
|
|
1610
1837
|
inputChange: arrayElement.inputChange
|
|
1611
1838
|
}
|
|
1612
|
-
) : arrayElement.type === "select" ? /* @__PURE__ */
|
|
1839
|
+
) : arrayElement.type === "select" ? /* @__PURE__ */ import_react10.default.createElement(
|
|
1613
1840
|
SCSelect,
|
|
1614
1841
|
{
|
|
1615
1842
|
label: arrayElement.label,
|
|
@@ -1625,7 +1852,7 @@ function SCDrawer({
|
|
|
1625
1852
|
setState: arrayElement.setState,
|
|
1626
1853
|
state: arrayElement.state || ""
|
|
1627
1854
|
}
|
|
1628
|
-
) : arrayElement.type === "dateRange" ? /* @__PURE__ */
|
|
1855
|
+
) : arrayElement.type === "dateRange" ? /* @__PURE__ */ import_react10.default.createElement(
|
|
1629
1856
|
SCDateRange,
|
|
1630
1857
|
{
|
|
1631
1858
|
labelDateInitial: arrayElement.labelDateInitial,
|
|
@@ -1638,7 +1865,7 @@ function SCDrawer({
|
|
|
1638
1865
|
}
|
|
1639
1866
|
) : null
|
|
1640
1867
|
);
|
|
1641
|
-
})), actionsA != void 0 && actionsA != false ? Array.isArray(actionsA) && (actionsA == null ? void 0 : actionsA.length) > 0 ? /* @__PURE__ */
|
|
1868
|
+
})), actionsA != void 0 && actionsA != false ? Array.isArray(actionsA) && (actionsA == null ? void 0 : actionsA.length) > 0 ? /* @__PURE__ */ import_react10.default.createElement(
|
|
1642
1869
|
import_Grid23.default,
|
|
1643
1870
|
{
|
|
1644
1871
|
sx: { borderTop: 1, borderColor: "#1018403B" },
|
|
@@ -1650,8 +1877,8 @@ function SCDrawer({
|
|
|
1650
1877
|
justifyContent: actionsA.length > 1 ? "space-between" : !anchor && anchor != "right" ? "flex-end" : "flex-start",
|
|
1651
1878
|
flexDirection: anchor != "right" ? "row-reverse" : "row"
|
|
1652
1879
|
},
|
|
1653
|
-
actionsA.map((btn, index) => /* @__PURE__ */
|
|
1654
|
-
|
|
1880
|
+
actionsA.map((btn, index) => /* @__PURE__ */ import_react10.default.createElement(
|
|
1881
|
+
import_material8.Button,
|
|
1655
1882
|
{
|
|
1656
1883
|
key: index,
|
|
1657
1884
|
variant: index === 0 || actionsA.length < 2 ? "contained" : "text",
|
|
@@ -1667,60 +1894,60 @@ function SCDrawer({
|
|
|
1667
1894
|
}
|
|
1668
1895
|
|
|
1669
1896
|
// src/Components/FooterAction/FooterAction.tsx
|
|
1670
|
-
var
|
|
1671
|
-
var
|
|
1897
|
+
var import_react11 = __toESM(require("react"), 1);
|
|
1898
|
+
var import_material9 = require("@mui/material");
|
|
1672
1899
|
var FooterAction = ({
|
|
1673
1900
|
leftContent,
|
|
1674
1901
|
rightContent,
|
|
1675
1902
|
label,
|
|
1676
1903
|
variant
|
|
1677
1904
|
}) => {
|
|
1678
|
-
return /* @__PURE__ */
|
|
1679
|
-
|
|
1905
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1906
|
+
import_material9.AppBar,
|
|
1680
1907
|
{
|
|
1681
1908
|
color: "inherit",
|
|
1682
1909
|
sx: { position: variant == "float" ? "relative" : "fixed", left: 0, right: "auto", width: "100%", top: "auto", bottom: 0 }
|
|
1683
1910
|
},
|
|
1684
|
-
/* @__PURE__ */
|
|
1685
|
-
|
|
1911
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
1912
|
+
import_material9.Toolbar,
|
|
1686
1913
|
{
|
|
1687
1914
|
id: "footer-toolbar",
|
|
1688
1915
|
sx: { gap: 1.5, minHeight: "50px !important" }
|
|
1689
1916
|
},
|
|
1690
1917
|
leftContent,
|
|
1691
|
-
/* @__PURE__ */
|
|
1692
|
-
label && /* @__PURE__ */
|
|
1918
|
+
/* @__PURE__ */ import_react11.default.createElement(import_material9.Box, { flexGrow: 1 }),
|
|
1919
|
+
label && /* @__PURE__ */ import_react11.default.createElement(import_material9.Typography, { variant: "body2", color: "text.secondary" }, label),
|
|
1693
1920
|
rightContent
|
|
1694
1921
|
)
|
|
1695
1922
|
);
|
|
1696
1923
|
};
|
|
1697
1924
|
|
|
1698
1925
|
// src/Components/Modal/Helpers/Data.tsx
|
|
1699
|
-
var
|
|
1700
|
-
var
|
|
1926
|
+
var import_react12 = __toESM(require("react"), 1);
|
|
1927
|
+
var import_icons_material6 = require("@mui/icons-material");
|
|
1701
1928
|
var modalStateConfig = {
|
|
1702
1929
|
info: {
|
|
1703
1930
|
color: "info",
|
|
1704
1931
|
defaultDescription: "Se [sincronizar\xE1n] los datos trabajados en modo offline y se [subir\xE1n] a los servidores.",
|
|
1705
|
-
icon: /* @__PURE__ */
|
|
1932
|
+
icon: /* @__PURE__ */ import_react12.default.createElement(import_icons_material6.Info, { color: "info", fontSize: "medium" })
|
|
1706
1933
|
},
|
|
1707
1934
|
delete: {
|
|
1708
1935
|
color: "delete",
|
|
1709
1936
|
defaultDescription: "[Elemento espec\xEDfico] [dejar\xE1 de existir en todos los lugares donde est\xE9 en uso]. Esta acci\xF3n es irreversible.",
|
|
1710
|
-
icon: /* @__PURE__ */
|
|
1937
|
+
icon: /* @__PURE__ */ import_react12.default.createElement(import_icons_material6.Info, { color: "error", fontSize: "medium" })
|
|
1711
1938
|
},
|
|
1712
1939
|
warning: {
|
|
1713
1940
|
color: "warning",
|
|
1714
1941
|
defaultDescription: "Se descartar\xE1 la [creaci\xF3n] y los cambios se perder\xE1n.",
|
|
1715
|
-
icon: /* @__PURE__ */
|
|
1942
|
+
icon: /* @__PURE__ */ import_react12.default.createElement(import_icons_material6.Warning, { color: "warning", fontSize: "medium" })
|
|
1716
1943
|
}
|
|
1717
1944
|
};
|
|
1718
1945
|
|
|
1719
1946
|
// src/Components/Modal/Helpers/Utils.tsx
|
|
1720
1947
|
var MuiIcons2 = __toESM(require("@mui/icons-material"), 1);
|
|
1721
|
-
var
|
|
1948
|
+
var import_icons_material7 = require("@mui/icons-material");
|
|
1722
1949
|
var getIconComponent2 = (iconName) => {
|
|
1723
|
-
return iconName && MuiIcons2[iconName] ? MuiIcons2[iconName] :
|
|
1950
|
+
return iconName && MuiIcons2[iconName] ? MuiIcons2[iconName] : import_icons_material7.FilterListOutlined;
|
|
1724
1951
|
};
|
|
1725
1952
|
var getModalColor = (state) => {
|
|
1726
1953
|
var _a;
|
|
@@ -1742,9 +1969,9 @@ var getButtonColor = (state) => {
|
|
|
1742
1969
|
};
|
|
1743
1970
|
|
|
1744
1971
|
// src/Components/Modal/SCModal.tsx
|
|
1745
|
-
var
|
|
1746
|
-
var
|
|
1747
|
-
var
|
|
1972
|
+
var import_react13 = __toESM(require("react"), 1);
|
|
1973
|
+
var import_material10 = require("@mui/material");
|
|
1974
|
+
var import_icons_material8 = require("@mui/icons-material");
|
|
1748
1975
|
|
|
1749
1976
|
// src/generales/capitalize.tsx
|
|
1750
1977
|
function capitalize(text) {
|
|
@@ -1761,32 +1988,32 @@ var SCModal = ({
|
|
|
1761
1988
|
action
|
|
1762
1989
|
}) => {
|
|
1763
1990
|
var _a, _b, _c, _d, _e;
|
|
1764
|
-
const [openModal, setOpenModal] = (0,
|
|
1765
|
-
const handleOpen =
|
|
1991
|
+
const [openModal, setOpenModal] = (0, import_react13.useState)(open != null ? open : false);
|
|
1992
|
+
const handleOpen = import_react13.default.useCallback(() => {
|
|
1766
1993
|
setOpenModal((prev) => !prev);
|
|
1767
1994
|
}, []);
|
|
1768
|
-
const Icon = (0,
|
|
1769
|
-
const handleClose = (0,
|
|
1770
|
-
const prevAction = (0,
|
|
1995
|
+
const Icon = (0, import_react13.useMemo)(() => getIconComponent2(buttonModal == null ? void 0 : buttonModal.icon), [buttonModal == null ? void 0 : buttonModal.icon]);
|
|
1996
|
+
const handleClose = (0, import_react13.useCallback)(() => setOpenModal(false), []);
|
|
1997
|
+
const prevAction = (0, import_react13.useMemo)(
|
|
1771
1998
|
() => action != null ? action : [{ text: "Cancelar", fn: handleClose }, { text: "Consultar", fn: () => {
|
|
1772
1999
|
} }],
|
|
1773
2000
|
[action, handleClose]
|
|
1774
2001
|
);
|
|
1775
2002
|
const { icon, defaultDescription } = modalStateConfig[state];
|
|
1776
|
-
return /* @__PURE__ */
|
|
1777
|
-
|
|
2003
|
+
return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(
|
|
2004
|
+
import_material10.Button,
|
|
1778
2005
|
{
|
|
1779
2006
|
"data-testid": "test-buttonModal",
|
|
1780
2007
|
color: (_a = buttonModal == null ? void 0 : buttonModal.color) != null ? _a : "primary",
|
|
1781
2008
|
onClick: handleOpen,
|
|
1782
2009
|
variant: (_b = buttonModal == null ? void 0 : buttonModal.variant) != null ? _b : "text",
|
|
1783
2010
|
size: (_c = buttonModal == null ? void 0 : buttonModal.size) != null ? _c : "small",
|
|
1784
|
-
startIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "left" && /* @__PURE__ */
|
|
1785
|
-
endIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "right" && /* @__PURE__ */
|
|
2011
|
+
startIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "left" && /* @__PURE__ */ import_react13.default.createElement(Icon, null),
|
|
2012
|
+
endIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "right" && /* @__PURE__ */ import_react13.default.createElement(Icon, null)
|
|
1786
2013
|
},
|
|
1787
2014
|
capitalize((_d = buttonModal == null ? void 0 : buttonModal.text) != null ? _d : "filtrar")
|
|
1788
|
-
), /* @__PURE__ */
|
|
1789
|
-
|
|
2015
|
+
), /* @__PURE__ */ import_react13.default.createElement(import_material10.Modal, { open: openModal, onClose: handleOpen, sx: { boxShadow: 8 } }, /* @__PURE__ */ import_react13.default.createElement(
|
|
2016
|
+
import_material10.Box,
|
|
1790
2017
|
{
|
|
1791
2018
|
sx: {
|
|
1792
2019
|
position: "absolute",
|
|
@@ -1799,10 +2026,10 @@ var SCModal = ({
|
|
|
1799
2026
|
boxShadow: 24
|
|
1800
2027
|
}
|
|
1801
2028
|
},
|
|
1802
|
-
/* @__PURE__ */
|
|
1803
|
-
/* @__PURE__ */
|
|
1804
|
-
action && /* @__PURE__ */
|
|
1805
|
-
|
|
2029
|
+
/* @__PURE__ */ import_react13.default.createElement(import_material10.Stack, { direction: "row", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ import_react13.default.createElement(import_material10.Stack, { direction: "row", alignItems: "center", p: 1, gap: 1.5 }, /* @__PURE__ */ import_react13.default.createElement(import_material10.Box, { display: "flex", justifyContent: "center", alignItems: "center", borderRadius: "50%", height: 36, width: 36, bgcolor: getModalColor(state) }, icon), /* @__PURE__ */ import_react13.default.createElement(import_material10.Typography, { variant: "h6", color: "text.primary" }, title)), /* @__PURE__ */ import_react13.default.createElement(import_material10.IconButton, { onClick: handleOpen, "data-testid": "test-buttonClose" }, /* @__PURE__ */ import_react13.default.createElement(import_icons_material8.Close, { color: "action" }))),
|
|
2030
|
+
/* @__PURE__ */ import_react13.default.createElement(import_material10.Stack, { py: 1, px: 3, gap: 1.5 }, /* @__PURE__ */ import_react13.default.createElement(import_material10.Typography, { variant: "body1" }, description || defaultDescription)),
|
|
2031
|
+
action && /* @__PURE__ */ import_react13.default.createElement(
|
|
2032
|
+
import_material10.Stack,
|
|
1806
2033
|
{
|
|
1807
2034
|
id: "Action",
|
|
1808
2035
|
direction: "row",
|
|
@@ -1812,8 +2039,8 @@ var SCModal = ({
|
|
|
1812
2039
|
bgcolor: "grey.50",
|
|
1813
2040
|
sx: { borderRadius: 1 }
|
|
1814
2041
|
},
|
|
1815
|
-
/* @__PURE__ */
|
|
1816
|
-
|
|
2042
|
+
/* @__PURE__ */ import_react13.default.createElement(
|
|
2043
|
+
import_material10.Button,
|
|
1817
2044
|
{
|
|
1818
2045
|
color: "inherit",
|
|
1819
2046
|
variant: "text",
|
|
@@ -1822,8 +2049,8 @@ var SCModal = ({
|
|
|
1822
2049
|
},
|
|
1823
2050
|
capitalize("cancelar")
|
|
1824
2051
|
),
|
|
1825
|
-
/* @__PURE__ */
|
|
1826
|
-
|
|
2052
|
+
/* @__PURE__ */ import_react13.default.createElement(
|
|
2053
|
+
import_material10.Button,
|
|
1827
2054
|
{
|
|
1828
2055
|
"data-testid": "test-aceptar",
|
|
1829
2056
|
color: getButtonColor(state),
|
|
@@ -1839,32 +2066,32 @@ var SCModal = ({
|
|
|
1839
2066
|
};
|
|
1840
2067
|
|
|
1841
2068
|
// src/Components/MultiSelect/MultiSelect.tsx
|
|
1842
|
-
var
|
|
1843
|
-
var
|
|
1844
|
-
var
|
|
2069
|
+
var import_react16 = __toESM(require("react"), 1);
|
|
2070
|
+
var import_material11 = require("@mui/material");
|
|
2071
|
+
var import_icons_material10 = require("@mui/icons-material");
|
|
1845
2072
|
|
|
1846
2073
|
// src/Components/MultiSelect/helpers/useHandlers.tsx
|
|
1847
|
-
var
|
|
2074
|
+
var import_react14 = require("react");
|
|
1848
2075
|
function useMultiSelectHandlers() {
|
|
1849
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
1850
|
-
const [open, setOpen] = (0,
|
|
1851
|
-
const [selectedItems, setSelectedItems] = (0,
|
|
1852
|
-
const [filterValue, setFilterValue] = (0,
|
|
1853
|
-
const handleOpen = (0,
|
|
2076
|
+
const [anchorEl, setAnchorEl] = (0, import_react14.useState)(null);
|
|
2077
|
+
const [open, setOpen] = (0, import_react14.useState)(false);
|
|
2078
|
+
const [selectedItems, setSelectedItems] = (0, import_react14.useState)([]);
|
|
2079
|
+
const [filterValue, setFilterValue] = (0, import_react14.useState)("");
|
|
2080
|
+
const handleOpen = (0, import_react14.useCallback)((e) => {
|
|
1854
2081
|
setAnchorEl(e.currentTarget);
|
|
1855
2082
|
setOpen(true);
|
|
1856
2083
|
}, []);
|
|
1857
|
-
const handleClose = (0,
|
|
2084
|
+
const handleClose = (0, import_react14.useCallback)(() => {
|
|
1858
2085
|
setAnchorEl(null);
|
|
1859
2086
|
setOpen(false);
|
|
1860
2087
|
}, []);
|
|
1861
|
-
const handleFilterChange = (0,
|
|
2088
|
+
const handleFilterChange = (0, import_react14.useCallback)(
|
|
1862
2089
|
(e) => {
|
|
1863
2090
|
setFilterValue(e.target.value);
|
|
1864
2091
|
},
|
|
1865
2092
|
[]
|
|
1866
2093
|
);
|
|
1867
|
-
const handleCheckboxToggle = (0,
|
|
2094
|
+
const handleCheckboxToggle = (0, import_react14.useCallback)((item) => {
|
|
1868
2095
|
setSelectedItems(
|
|
1869
2096
|
(prev) => prev.includes(item) ? prev.filter((i) => i !== item) : [...prev, item]
|
|
1870
2097
|
);
|
|
@@ -1885,21 +2112,21 @@ function useMultiSelectHandlers() {
|
|
|
1885
2112
|
|
|
1886
2113
|
// src/Components/MultiSelect/helpers/Utils.tsx
|
|
1887
2114
|
var MuiIcons3 = __toESM(require("@mui/icons-material"), 1);
|
|
1888
|
-
var
|
|
2115
|
+
var import_icons_material9 = require("@mui/icons-material");
|
|
1889
2116
|
function getIconMultiSelect(name) {
|
|
1890
|
-
return name in MuiIcons3 ? MuiIcons3[name] :
|
|
2117
|
+
return name in MuiIcons3 ? MuiIcons3[name] : import_icons_material9.FilterListOutlined;
|
|
1891
2118
|
}
|
|
1892
2119
|
|
|
1893
2120
|
// src/Components/MultiSelect/helpers/useFilteredItems.tsx
|
|
1894
|
-
var
|
|
2121
|
+
var import_react15 = require("react");
|
|
1895
2122
|
function useFilteredItems(items, filterValue, getItemLabel, selectedItems) {
|
|
1896
|
-
const filteredItems = (0,
|
|
2123
|
+
const filteredItems = (0, import_react15.useMemo)(
|
|
1897
2124
|
() => items.filter(
|
|
1898
2125
|
(item) => getItemLabel(item).toLowerCase().includes(filterValue.toLowerCase())
|
|
1899
2126
|
),
|
|
1900
2127
|
[items, filterValue, getItemLabel]
|
|
1901
2128
|
);
|
|
1902
|
-
const sortedItems = (0,
|
|
2129
|
+
const sortedItems = (0, import_react15.useMemo)(() => {
|
|
1903
2130
|
return [
|
|
1904
2131
|
...filteredItems.filter((item) => selectedItems.includes(item)),
|
|
1905
2132
|
...filteredItems.filter((item) => !selectedItems.includes(item))
|
|
@@ -1933,16 +2160,16 @@ function MultiSelect({
|
|
|
1933
2160
|
handleCheckboxToggle,
|
|
1934
2161
|
setOpen
|
|
1935
2162
|
} = useMultiSelectHandlers();
|
|
1936
|
-
(0,
|
|
2163
|
+
(0, import_react16.useEffect)(() => {
|
|
1937
2164
|
if (open !== void 0) {
|
|
1938
2165
|
setOpen(open);
|
|
1939
2166
|
}
|
|
1940
2167
|
}, [open, setOpen]);
|
|
1941
|
-
(0,
|
|
2168
|
+
(0, import_react16.useEffect)(() => {
|
|
1942
2169
|
setSelectedItems([]);
|
|
1943
2170
|
}, [items, setSelectedItems]);
|
|
1944
2171
|
const { filteredItems, sortedItems } = useFilteredItems(items, filterValue, getItemLabel, selectedItems);
|
|
1945
|
-
const Icon = (0,
|
|
2172
|
+
const Icon = (0, import_react16.useMemo)(() => {
|
|
1946
2173
|
var _a2;
|
|
1947
2174
|
return getIconMultiSelect((_a2 = button == null ? void 0 : button.icon) != null ? _a2 : "FilterListOutlined");
|
|
1948
2175
|
}, [button == null ? void 0 : button.icon]);
|
|
@@ -1956,20 +2183,20 @@ function MultiSelect({
|
|
|
1956
2183
|
{ text: "Aplicar", fn: () => {
|
|
1957
2184
|
} }
|
|
1958
2185
|
];
|
|
1959
|
-
return /* @__PURE__ */
|
|
1960
|
-
|
|
2186
|
+
return /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement(
|
|
2187
|
+
import_material11.Button,
|
|
1961
2188
|
{
|
|
1962
2189
|
"test-id": "multiselect-button",
|
|
1963
2190
|
color: (_a = button == null ? void 0 : button.color) != null ? _a : "primary",
|
|
1964
2191
|
onClick: handleOpen,
|
|
1965
2192
|
variant: (_b = button == null ? void 0 : button.variant) != null ? _b : "text",
|
|
1966
2193
|
size: "small",
|
|
1967
|
-
startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */
|
|
1968
|
-
endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */
|
|
2194
|
+
startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */ import_react16.default.createElement(Icon, null) : null,
|
|
2195
|
+
endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */ import_react16.default.createElement(Icon, null) : null
|
|
1969
2196
|
},
|
|
1970
2197
|
capitalize(textButton != null ? textButton : "MultiSelect")
|
|
1971
|
-
), /* @__PURE__ */
|
|
1972
|
-
|
|
2198
|
+
), /* @__PURE__ */ import_react16.default.createElement(
|
|
2199
|
+
import_material11.Popover,
|
|
1973
2200
|
{
|
|
1974
2201
|
elevation: 8,
|
|
1975
2202
|
anchorEl,
|
|
@@ -1977,8 +2204,8 @@ function MultiSelect({
|
|
|
1977
2204
|
open: openMultiselect,
|
|
1978
2205
|
onClose: () => setOpen(false)
|
|
1979
2206
|
},
|
|
1980
|
-
/* @__PURE__ */
|
|
1981
|
-
|
|
2207
|
+
/* @__PURE__ */ import_react16.default.createElement(import_material11.Stack, { minWidth: "320px", "data-testid": "multiselect-container", bgcolor: "white", boxShadow: 3, borderRadius: 1 }, /* @__PURE__ */ import_react16.default.createElement(import_material11.Stack, { py: 1, px: 2 }, topPanel != null ? topPanel : /* @__PURE__ */ import_react16.default.createElement(import_material11.FormControl, { fullWidth: true, size: "small" }, /* @__PURE__ */ import_react16.default.createElement(
|
|
2208
|
+
import_material11.TextField,
|
|
1982
2209
|
{
|
|
1983
2210
|
"data-testid": "multiselect-input",
|
|
1984
2211
|
fullWidth: true,
|
|
@@ -1989,29 +2216,29 @@ function MultiSelect({
|
|
|
1989
2216
|
onChange: handleFilterChange,
|
|
1990
2217
|
slotProps: {
|
|
1991
2218
|
input: {
|
|
1992
|
-
endAdornment: /* @__PURE__ */
|
|
2219
|
+
endAdornment: /* @__PURE__ */ import_react16.default.createElement(import_material11.InputAdornment, { position: "end" }, /* @__PURE__ */ import_react16.default.createElement(import_icons_material10.SearchOutlined, { fontSize: "small" }))
|
|
1993
2220
|
}
|
|
1994
2221
|
}
|
|
1995
2222
|
}
|
|
1996
|
-
))), /* @__PURE__ */
|
|
1997
|
-
|
|
2223
|
+
))), /* @__PURE__ */ import_react16.default.createElement(import_material11.Stack, { maxHeight: "300px", overflow: "auto" }, selectAll && /* @__PURE__ */ import_react16.default.createElement(import_material11.MenuItem, { dense, onClick: handleSelectAll }, /* @__PURE__ */ import_react16.default.createElement(import_material11.ListItemIcon, null, /* @__PURE__ */ import_react16.default.createElement(import_material11.Checkbox, { checked: allSelected, color: "primary" })), "Todos los items"), sortedItems.length > 0 ? sortedItems.map((item) => /* @__PURE__ */ import_react16.default.createElement(
|
|
2224
|
+
import_material11.MenuItem,
|
|
1998
2225
|
{
|
|
1999
2226
|
key: getItemLabel(item),
|
|
2000
2227
|
dense,
|
|
2001
2228
|
onClick: () => handleCheckboxToggle(item)
|
|
2002
2229
|
},
|
|
2003
|
-
/* @__PURE__ */
|
|
2004
|
-
|
|
2230
|
+
/* @__PURE__ */ import_react16.default.createElement(import_material11.ListItemIcon, null, /* @__PURE__ */ import_react16.default.createElement(
|
|
2231
|
+
import_material11.Checkbox,
|
|
2005
2232
|
{
|
|
2006
2233
|
checked: selectedItems.includes(item),
|
|
2007
2234
|
color: "primary"
|
|
2008
2235
|
}
|
|
2009
2236
|
)),
|
|
2010
2237
|
getItemLabel(item)
|
|
2011
|
-
)) : /* @__PURE__ */
|
|
2238
|
+
)) : /* @__PURE__ */ import_react16.default.createElement(import_material11.MenuItem, { disabled: true }, "No se encontraron resultados")), /* @__PURE__ */ import_react16.default.createElement(import_material11.Stack, { direction: "row", gap: 1, p: 1, justifyContent: "space-between", bgcolor: "grey.50" }, resolvedActions.map((button2, index) => {
|
|
2012
2239
|
var _a2;
|
|
2013
|
-
return /* @__PURE__ */
|
|
2014
|
-
|
|
2240
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
2241
|
+
import_material11.Button,
|
|
2015
2242
|
{
|
|
2016
2243
|
key: index,
|
|
2017
2244
|
variant: index === 0 || resolvedActions.length < 2 ? "text" : "contained",
|
|
@@ -2026,8 +2253,8 @@ function MultiSelect({
|
|
|
2026
2253
|
}
|
|
2027
2254
|
|
|
2028
2255
|
// src/Components/PageHeader/PageHeader.tsx
|
|
2029
|
-
var
|
|
2030
|
-
var
|
|
2256
|
+
var import_react17 = __toESM(require("react"), 1);
|
|
2257
|
+
var import_material12 = require("@mui/material");
|
|
2031
2258
|
var PageHeader = ({
|
|
2032
2259
|
title,
|
|
2033
2260
|
subtitle,
|
|
@@ -2036,8 +2263,8 @@ var PageHeader = ({
|
|
|
2036
2263
|
fixed,
|
|
2037
2264
|
shadow = true
|
|
2038
2265
|
}) => {
|
|
2039
|
-
return /* @__PURE__ */
|
|
2040
|
-
|
|
2266
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
2267
|
+
import_material12.Stack,
|
|
2041
2268
|
{
|
|
2042
2269
|
"data-testid": "main-container",
|
|
2043
2270
|
justifyContent: "center",
|
|
@@ -2048,13 +2275,13 @@ var PageHeader = ({
|
|
|
2048
2275
|
zIndex: 10,
|
|
2049
2276
|
sx: { boxShadow: shadow ? (theme) => theme.shadows[1] : "none" }
|
|
2050
2277
|
},
|
|
2051
|
-
/* @__PURE__ */
|
|
2278
|
+
/* @__PURE__ */ import_react17.default.createElement(import_material12.Stack, { "data-testid": "page-header-content", height: 40, px: 3, pl: buttonBack ? 1 : 3, direction: "row", alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ import_react17.default.createElement(import_material12.Stack, { id: "left-section", direction: "row", alignItems: "center", gap: 1 }, buttonBack, /* @__PURE__ */ import_react17.default.createElement(import_material12.Stack, { id: "text-section", gap: 0.5 }, /* @__PURE__ */ import_react17.default.createElement(import_material12.Typography, { "data-testid": "page-header-title", variant: "h6", color: "text.primary" }, title), subtitle && /* @__PURE__ */ import_react17.default.createElement(import_material12.Typography, { "data-testid": "page-header-subtitle", variant: "caption", color: "text.primary" }, subtitle))), actions && /* @__PURE__ */ import_react17.default.createElement(import_material12.Stack, { id: "right-actions", direction: "row", alignItems: "center", gap: 1 }, actions))
|
|
2052
2279
|
);
|
|
2053
2280
|
};
|
|
2054
2281
|
|
|
2055
2282
|
// src/Components/SCCalendarSwipeable.tsx
|
|
2056
|
-
var
|
|
2057
|
-
var
|
|
2283
|
+
var import_react18 = __toESM(require("react"), 1);
|
|
2284
|
+
var import_material13 = require("@mui/material");
|
|
2058
2285
|
var import_Grid24 = __toESM(require("@mui/material/Grid2"), 1);
|
|
2059
2286
|
var import_AdapterDateFns = require("@mui/x-date-pickers/AdapterDateFns");
|
|
2060
2287
|
var import_LocalizationProvider2 = require("@mui/x-date-pickers/LocalizationProvider");
|
|
@@ -2072,14 +2299,14 @@ var SCCalendarSwipeable = ({
|
|
|
2072
2299
|
state
|
|
2073
2300
|
}) => {
|
|
2074
2301
|
let convertFecha;
|
|
2075
|
-
const [fecha, setFecha] = (0,
|
|
2076
|
-
const [fechaSeleccionada, setFechaSeleccionada] = (0,
|
|
2077
|
-
const [stateVal, setstateVal] =
|
|
2078
|
-
const [openCalendar, setOpenCalendar] =
|
|
2302
|
+
const [fecha, setFecha] = (0, import_react18.useState)(/* @__PURE__ */ new Date());
|
|
2303
|
+
const [fechaSeleccionada, setFechaSeleccionada] = (0, import_react18.useState)();
|
|
2304
|
+
const [stateVal, setstateVal] = import_react18.default.useState(/* @__PURE__ */ new Date());
|
|
2305
|
+
const [openCalendar, setOpenCalendar] = import_react18.default.useState(false);
|
|
2079
2306
|
const hoy = /* @__PURE__ */ new Date();
|
|
2080
2307
|
const inicioSemana = (0, import_date_fns.startOfWeek)(fecha, { weekStartsOn: 0 });
|
|
2081
2308
|
const diasSemana = Array.from({ length: 7 }, (_, i) => (0, import_date_fns.addDays)(inicioSemana, i));
|
|
2082
|
-
|
|
2309
|
+
import_react18.default.useEffect(() => {
|
|
2083
2310
|
if (fecha != null) {
|
|
2084
2311
|
handleConvertFecha(fecha);
|
|
2085
2312
|
}
|
|
@@ -2098,12 +2325,12 @@ var SCCalendarSwipeable = ({
|
|
|
2098
2325
|
setOpenCalendar(newOpen);
|
|
2099
2326
|
};
|
|
2100
2327
|
const locale = __spreadValues({}, import_locale.es);
|
|
2101
|
-
return /* @__PURE__ */
|
|
2328
|
+
return /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, /* @__PURE__ */ import_react18.default.createElement(import_LocalizationProvider2.LocalizationProvider, { dateAdapter: import_AdapterDateFns.AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ import_react18.default.createElement(import_material13.Box, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ import_react18.default.createElement(import_material13.Box, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ import_react18.default.createElement(import_Grid24.default, { container: true, gap: 0.5, sx: {
|
|
2102
2329
|
justifyContent: "space-between",
|
|
2103
2330
|
padding: "12px 0px",
|
|
2104
2331
|
background: "transparent"
|
|
2105
|
-
} }, diasSemana.map((dia) => /* @__PURE__ */
|
|
2106
|
-
|
|
2332
|
+
} }, diasSemana.map((dia) => /* @__PURE__ */ import_react18.default.createElement(import_Grid24.default, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ import_react18.default.createElement(import_material13.Box, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ import_react18.default.createElement(import_material13.Typography, { sx: { fontSize: "12px !important", color: "#10184099" } }, (0, import_date_fns.format)(dia, "EEEE", { locale: import_locale.es }).charAt(0).toUpperCase())), /* @__PURE__ */ import_react18.default.createElement(
|
|
2333
|
+
import_material13.Box,
|
|
2107
2334
|
{
|
|
2108
2335
|
onClick: () => setFecha(dia),
|
|
2109
2336
|
sx: {
|
|
@@ -2118,8 +2345,8 @@ var SCCalendarSwipeable = ({
|
|
|
2118
2345
|
//height: '36px',
|
|
2119
2346
|
}
|
|
2120
2347
|
},
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
)))), /* @__PURE__ */
|
|
2348
|
+
/* @__PURE__ */ import_react18.default.createElement(import_material13.Typography, { sx: { fontSize: "12px !important", color: (0, import_date_fns.isSameDay)(dia, fecha) ? "white" : "#101840DE" } }, (0, import_date_fns.format)(dia, "d"))
|
|
2349
|
+
)))), /* @__PURE__ */ import_react18.default.createElement(import_Grid24.default, { container: true, justifyContent: "center" }, /* @__PURE__ */ import_react18.default.createElement(import_material13.IconButton, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ import_react18.default.createElement(import_KeyboardDoubleArrowDown.default, null))))) : /* @__PURE__ */ import_react18.default.createElement(import_material13.Box, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ import_react18.default.createElement(
|
|
2123
2350
|
import_StaticDatePicker.StaticDatePicker,
|
|
2124
2351
|
{
|
|
2125
2352
|
orientation: "landscape",
|
|
@@ -2129,11 +2356,11 @@ var SCCalendarSwipeable = ({
|
|
|
2129
2356
|
sx: { fontSize: "12px !important", height: "300px !important", background: background ? background : "white", "& .MuiDayCalendar-header": { justifyContent: "space-between" }, "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" }, "& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" }, "& .MuiPickersDay-root": { fontSize: "12px !important" }, "& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" } },
|
|
2130
2357
|
onChange: (newValue) => setFecha(newValue)
|
|
2131
2358
|
}
|
|
2132
|
-
), /* @__PURE__ */
|
|
2359
|
+
), /* @__PURE__ */ import_react18.default.createElement(import_Grid24.default, { container: true, justifyContent: "center" }, /* @__PURE__ */ import_react18.default.createElement(import_material13.IconButton, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ import_react18.default.createElement(import_KeyboardDoubleArrowUp.default, null))))));
|
|
2133
2360
|
};
|
|
2134
2361
|
|
|
2135
2362
|
// src/Components/SCDataGrid.tsx
|
|
2136
|
-
var
|
|
2363
|
+
var import_react19 = __toESM(require("react"), 1);
|
|
2137
2364
|
var import_x_data_grid_pro = require("@mui/x-data-grid-pro");
|
|
2138
2365
|
var import_x_license_pro2 = require("@mui/x-license-pro");
|
|
2139
2366
|
var import_KeyboardArrowDown = __toESM(require("@mui/icons-material/KeyboardArrowDown"), 1);
|
|
@@ -2223,7 +2450,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2223
2450
|
label = label;
|
|
2224
2451
|
}
|
|
2225
2452
|
}
|
|
2226
|
-
return /* @__PURE__ */
|
|
2453
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
2227
2454
|
"div",
|
|
2228
2455
|
{
|
|
2229
2456
|
style: {
|
|
@@ -2240,7 +2467,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2240
2467
|
fontWeight: params.rowNode.type == "group" ? "400" : "300"
|
|
2241
2468
|
}
|
|
2242
2469
|
},
|
|
2243
|
-
params.rowNode.type === "group" && /* @__PURE__ */
|
|
2470
|
+
params.rowNode.type === "group" && /* @__PURE__ */ import_react19.default.createElement(
|
|
2244
2471
|
"span",
|
|
2245
2472
|
{
|
|
2246
2473
|
style: {
|
|
@@ -2253,7 +2480,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2253
2480
|
params.api.setRowChildrenExpansion(params.id, !params.rowNode.childrenExpanded);
|
|
2254
2481
|
}
|
|
2255
2482
|
},
|
|
2256
|
-
params.rowNode.childrenExpanded ? /* @__PURE__ */
|
|
2483
|
+
params.rowNode.childrenExpanded ? /* @__PURE__ */ import_react19.default.createElement(import_KeyboardArrowUp.default, { fontSize: "small", color: "action" }) : /* @__PURE__ */ import_react19.default.createElement(import_KeyboardArrowDown.default, { fontSize: "small", color: "action" })
|
|
2257
2484
|
),
|
|
2258
2485
|
label
|
|
2259
2486
|
);
|
|
@@ -2295,11 +2522,11 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2295
2522
|
let styleRowHeight = density == "compact" ? 32 : density == "standard" ? 28 : density == "comfortable" ? 36 : 32;
|
|
2296
2523
|
let rows = rowsTable ? rowsTable : validationTreeData != false ? parseInt(data.length.toString()) : data.length < 10 ? parseInt(data.length.toString()) : 10;
|
|
2297
2524
|
let validationGroupingColDef = groupingColDefs || {};
|
|
2298
|
-
const [groupDataLenght, setGroupDataLengh] = (0,
|
|
2299
|
-
const [pageSize, setPageSize] = (0,
|
|
2300
|
-
const [arrayRows, setArrayRows] = (0,
|
|
2301
|
-
const [selectionModel, setSelectionModel] = (0,
|
|
2302
|
-
(0,
|
|
2525
|
+
const [groupDataLenght, setGroupDataLengh] = (0, import_react19.useState)(0);
|
|
2526
|
+
const [pageSize, setPageSize] = (0, import_react19.useState)(rows);
|
|
2527
|
+
const [arrayRows, setArrayRows] = (0, import_react19.useState)([]);
|
|
2528
|
+
const [selectionModel, setSelectionModel] = (0, import_react19.useState)([]);
|
|
2529
|
+
(0, import_react19.useEffect)(() => {
|
|
2303
2530
|
if ((data == null ? void 0 : data.length) > 0) {
|
|
2304
2531
|
dataConvertRows(data, void 0);
|
|
2305
2532
|
}
|
|
@@ -2355,7 +2582,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2355
2582
|
setSelectionModel([...newSelection]);
|
|
2356
2583
|
}
|
|
2357
2584
|
};
|
|
2358
|
-
return /* @__PURE__ */
|
|
2585
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, data && /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ import_react19.default.createElement(
|
|
2359
2586
|
import_x_data_grid_pro.DataGridPro,
|
|
2360
2587
|
{
|
|
2361
2588
|
apiRef,
|
|
@@ -2419,45 +2646,45 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2419
2646
|
}
|
|
2420
2647
|
))));
|
|
2421
2648
|
}
|
|
2422
|
-
var SCDataGrid =
|
|
2649
|
+
var SCDataGrid = import_react19.default.memo(SCDataGridInitial, (prevProps, nextProps) => {
|
|
2423
2650
|
const isEqual = prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight && prevProps.density === nextProps.density;
|
|
2424
2651
|
return isEqual;
|
|
2425
2652
|
});
|
|
2426
2653
|
|
|
2427
2654
|
// src/Components/EmptyState/EmptyState.tsx
|
|
2428
|
-
var
|
|
2429
|
-
var
|
|
2655
|
+
var import_react24 = __toESM(require("react"), 1);
|
|
2656
|
+
var import_material14 = require("@mui/material");
|
|
2430
2657
|
|
|
2431
2658
|
// src/assets/ImgEmptyState/create.tsx
|
|
2432
|
-
var
|
|
2659
|
+
var import_react20 = __toESM(require("react"), 1);
|
|
2433
2660
|
var Create = () => {
|
|
2434
|
-
return /* @__PURE__ */
|
|
2661
|
+
return /* @__PURE__ */ import_react20.default.createElement("svg", { width: "45", height: "41", viewBox: "0 0 45 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react20.default.createElement("g", { "clip-path": "url(#clip0_1283_39624)" }, /* @__PURE__ */ import_react20.default.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__ */ import_react20.default.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__ */ import_react20.default.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__ */ import_react20.default.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__ */ import_react20.default.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__ */ import_react20.default.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__ */ import_react20.default.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__ */ import_react20.default.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__ */ import_react20.default.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__ */ import_react20.default.createElement("defs", null, /* @__PURE__ */ import_react20.default.createElement("clipPath", { id: "clip0_1283_39624" }, /* @__PURE__ */ import_react20.default.createElement("rect", { width: "44", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
|
|
2435
2662
|
};
|
|
2436
2663
|
|
|
2437
2664
|
// src/assets/ImgEmptyState/empty.tsx
|
|
2438
|
-
var
|
|
2665
|
+
var import_react21 = __toESM(require("react"), 1);
|
|
2439
2666
|
var Empty = () => {
|
|
2440
|
-
return /* @__PURE__ */
|
|
2667
|
+
return /* @__PURE__ */ import_react21.default.createElement("svg", { width: "41", height: "41", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react21.default.createElement("g", { "clip-path": "url(#clip0_1283_39626)" }, /* @__PURE__ */ import_react21.default.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__ */ import_react21.default.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__ */ import_react21.default.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__ */ import_react21.default.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__ */ import_react21.default.createElement("defs", null, /* @__PURE__ */ import_react21.default.createElement("clipPath", { id: "clip0_1283_39626" }, /* @__PURE__ */ import_react21.default.createElement("rect", { width: "40", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
|
|
2441
2668
|
};
|
|
2442
2669
|
|
|
2443
2670
|
// src/assets/ImgEmptyState/error.tsx
|
|
2444
|
-
var
|
|
2671
|
+
var import_react22 = __toESM(require("react"), 1);
|
|
2445
2672
|
var Error2 = () => {
|
|
2446
|
-
return /* @__PURE__ */
|
|
2673
|
+
return /* @__PURE__ */ import_react22.default.createElement("svg", { width: "41", height: "41", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react22.default.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__ */ import_react22.default.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__ */ import_react22.default.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" }));
|
|
2447
2674
|
};
|
|
2448
2675
|
|
|
2449
2676
|
// src/assets/ImgEmptyState/search.tsx
|
|
2450
|
-
var
|
|
2677
|
+
var import_react23 = __toESM(require("react"), 1);
|
|
2451
2678
|
var Search2 = () => {
|
|
2452
|
-
return /* @__PURE__ */
|
|
2679
|
+
return /* @__PURE__ */ import_react23.default.createElement("svg", { width: "41", height: "41", viewBox: "0 0 41 41", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react23.default.createElement("g", { "clip-path": "url(#clip0_1283_39628)" }, /* @__PURE__ */ import_react23.default.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__ */ import_react23.default.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__ */ import_react23.default.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__ */ import_react23.default.createElement("defs", null, /* @__PURE__ */ import_react23.default.createElement("clipPath", { id: "clip0_1283_39628" }, /* @__PURE__ */ import_react23.default.createElement("rect", { width: "40", height: "40", fill: "white", transform: "translate(0.5 0.5)" }))));
|
|
2453
2680
|
};
|
|
2454
2681
|
|
|
2455
2682
|
// src/Components/EmptyState/EmptyState.tsx
|
|
2456
2683
|
var EmptyStateImageUrls = {
|
|
2457
|
-
create: /* @__PURE__ */
|
|
2458
|
-
error: /* @__PURE__ */
|
|
2459
|
-
noResult: /* @__PURE__ */
|
|
2460
|
-
search: /* @__PURE__ */
|
|
2684
|
+
create: /* @__PURE__ */ import_react24.default.createElement(Create, null),
|
|
2685
|
+
error: /* @__PURE__ */ import_react24.default.createElement(Error2, null),
|
|
2686
|
+
noResult: /* @__PURE__ */ import_react24.default.createElement(Empty, null),
|
|
2687
|
+
search: /* @__PURE__ */ import_react24.default.createElement(Search2, null)
|
|
2461
2688
|
};
|
|
2462
2689
|
var DefaultIcon = ({
|
|
2463
2690
|
state = "create",
|
|
@@ -2465,7 +2692,7 @@ var DefaultIcon = ({
|
|
|
2465
2692
|
}) => {
|
|
2466
2693
|
const Icon = EmptyStateImageUrls[state];
|
|
2467
2694
|
const iconSize = size === "small" ? { width: "40px", height: "40px" } : { width: "60px", height: "60px" };
|
|
2468
|
-
return /* @__PURE__ */
|
|
2695
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", null, Icon);
|
|
2469
2696
|
};
|
|
2470
2697
|
var EmptyState = ({
|
|
2471
2698
|
state = "create",
|
|
@@ -2474,12 +2701,12 @@ var EmptyState = ({
|
|
|
2474
2701
|
subtitle,
|
|
2475
2702
|
actions,
|
|
2476
2703
|
containerHeight = "100vh",
|
|
2477
|
-
icon = /* @__PURE__ */
|
|
2704
|
+
icon = /* @__PURE__ */ import_react24.default.createElement(DefaultIcon, { state, size })
|
|
2478
2705
|
}) => {
|
|
2479
2706
|
const titleVariant = size === "small" ? "subtitle2" : "h6";
|
|
2480
2707
|
const subtitleVariant = size === "small" ? "caption" : "body1";
|
|
2481
|
-
return /* @__PURE__ */
|
|
2482
|
-
|
|
2708
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
2709
|
+
import_material14.Stack,
|
|
2483
2710
|
{
|
|
2484
2711
|
alignItems: "center",
|
|
2485
2712
|
justifyContent: "center",
|
|
@@ -2487,17 +2714,17 @@ var EmptyState = ({
|
|
|
2487
2714
|
height: containerHeight,
|
|
2488
2715
|
"data-testid": "empty-state-container"
|
|
2489
2716
|
},
|
|
2490
|
-
icon && /* @__PURE__ */
|
|
2491
|
-
/* @__PURE__ */
|
|
2492
|
-
|
|
2717
|
+
icon && /* @__PURE__ */ import_react24.default.createElement(import_material14.Stack, null, icon),
|
|
2718
|
+
/* @__PURE__ */ import_react24.default.createElement(import_material14.Stack, { gap: 0.5 }, /* @__PURE__ */ import_react24.default.createElement(import_material14.Typography, { color: "text.primary", variant: titleVariant, textAlign: "center" }, title), subtitle && /* @__PURE__ */ import_react24.default.createElement(
|
|
2719
|
+
import_material14.Typography,
|
|
2493
2720
|
{
|
|
2494
2721
|
variant: subtitleVariant,
|
|
2495
2722
|
textAlign: "center",
|
|
2496
2723
|
color: "text.secondary"
|
|
2497
2724
|
},
|
|
2498
2725
|
subtitle
|
|
2499
|
-
), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */
|
|
2500
|
-
|
|
2726
|
+
), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */ import_react24.default.createElement(
|
|
2727
|
+
import_material14.Stack,
|
|
2501
2728
|
{
|
|
2502
2729
|
direction: "row",
|
|
2503
2730
|
spacing: 2,
|
|
@@ -2506,15 +2733,15 @@ var EmptyState = ({
|
|
|
2506
2733
|
},
|
|
2507
2734
|
actions.map((action, index) => {
|
|
2508
2735
|
var _a, _b, _c, _d;
|
|
2509
|
-
return /* @__PURE__ */
|
|
2510
|
-
|
|
2736
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
2737
|
+
import_material14.Button,
|
|
2511
2738
|
{
|
|
2512
2739
|
key: index,
|
|
2513
2740
|
color: (_a = action.color) != null ? _a : "primary",
|
|
2514
2741
|
variant: (_b = action.variant) != null ? _b : "text",
|
|
2515
2742
|
size: (_c = action.size) != null ? _c : "small",
|
|
2516
|
-
startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */
|
|
2517
|
-
endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */
|
|
2743
|
+
startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */ import_react24.default.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
|
|
2744
|
+
endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */ import_react24.default.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
|
|
2518
2745
|
onClick: action.onClick
|
|
2519
2746
|
},
|
|
2520
2747
|
capitalize((_d = action.text) != null ? _d : "action")
|
|
@@ -2525,8 +2752,8 @@ var EmptyState = ({
|
|
|
2525
2752
|
};
|
|
2526
2753
|
|
|
2527
2754
|
// src/Components/SCDialog.tsx
|
|
2528
|
-
var
|
|
2529
|
-
var
|
|
2755
|
+
var import_react25 = __toESM(require("react"), 1);
|
|
2756
|
+
var import_material15 = require("@mui/material");
|
|
2530
2757
|
var import_Grid25 = __toESM(require("@mui/material/Grid2"), 1);
|
|
2531
2758
|
var import_Close2 = __toESM(require("@mui/icons-material/Close"), 1);
|
|
2532
2759
|
var Muicon5 = __toESM(require("@mui/icons-material"), 1);
|
|
@@ -2535,8 +2762,8 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2535
2762
|
let iconTitleValidation = "";
|
|
2536
2763
|
let IconTitle;
|
|
2537
2764
|
let ButtonIcon;
|
|
2538
|
-
const [open, setOpen] = (0,
|
|
2539
|
-
(0,
|
|
2765
|
+
const [open, setOpen] = (0, import_react25.useState)(show);
|
|
2766
|
+
(0, import_react25.useEffect)(() => {
|
|
2540
2767
|
if (show) {
|
|
2541
2768
|
handleOpen();
|
|
2542
2769
|
} else {
|
|
@@ -2561,7 +2788,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2561
2788
|
});
|
|
2562
2789
|
if (iconTitle) {
|
|
2563
2790
|
if (Muicon5[iconTitle] == void 0) {
|
|
2564
|
-
if (iconTitle &&
|
|
2791
|
+
if (iconTitle && import_react25.default.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
2565
2792
|
iconTitleValidation = "image";
|
|
2566
2793
|
IconTitle = iconTitle;
|
|
2567
2794
|
} else {
|
|
@@ -2586,9 +2813,9 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2586
2813
|
}
|
|
2587
2814
|
};
|
|
2588
2815
|
const dialogActions = actions != null ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
2589
|
-
content = content != null ? content : { component: /* @__PURE__ */
|
|
2590
|
-
return /* @__PURE__ */
|
|
2591
|
-
|
|
2816
|
+
content = content != null ? content : { component: /* @__PURE__ */ import_react25.default.createElement(import_material15.Box, null, " Aqui va el contenido ") };
|
|
2817
|
+
return /* @__PURE__ */ import_react25.default.createElement("div", null, buttonDialog ? /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ import_react25.default.createElement(import_material15.Tooltip, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ import_react25.default.createElement(import_material15.Button, { 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__ */ import_react25.default.createElement(ButtonIcon, null) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ import_react25.default.createElement(ButtonIcon, null) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ import_react25.default.createElement(import_material15.IconButton, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ import_react25.default.createElement(import_material15.SvgIcon, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ import_react25.default.createElement(import_material15.Modal, { open: open || false, onClose: handleClose }, /* @__PURE__ */ import_react25.default.createElement(
|
|
2818
|
+
import_material15.Dialog,
|
|
2592
2819
|
{
|
|
2593
2820
|
"data-testid": "dialog-element",
|
|
2594
2821
|
open: open || false,
|
|
@@ -2601,9 +2828,9 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2601
2828
|
}
|
|
2602
2829
|
}
|
|
2603
2830
|
},
|
|
2604
|
-
title && /* @__PURE__ */
|
|
2605
|
-
/* @__PURE__ */
|
|
2606
|
-
|
|
2831
|
+
title && /* @__PURE__ */ import_react25.default.createElement(import_material15.DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ import_react25.default.createElement(import_Grid25.default, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, /* @__PURE__ */ import_react25.default.createElement(import_Grid25.default, { container: true, size: 11, sx: { alignItems: "center" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ import_react25.default.createElement(import_material15.Box, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ import_react25.default.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ import_react25.default.createElement(import_material15.SvgIcon, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ import_react25.default.createElement(import_Grid25.default, null, /* @__PURE__ */ import_react25.default.createElement(import_material15.Typography, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), /* @__PURE__ */ import_react25.default.createElement(import_material15.Typography, { color: "text.secondary", variant: "body2", gutterBottom: true }, subtitle ? subtitle : ""))), disableClose != true ? /* @__PURE__ */ import_react25.default.createElement(import_material15.IconButton, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ import_react25.default.createElement(import_Close2.default, null)) : "")),
|
|
2832
|
+
/* @__PURE__ */ import_react25.default.createElement(
|
|
2833
|
+
import_material15.DialogContent,
|
|
2607
2834
|
{
|
|
2608
2835
|
"data-testid": "dialog-content",
|
|
2609
2836
|
dividers: dividers ? dividers : false,
|
|
@@ -2630,7 +2857,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2630
2857
|
}
|
|
2631
2858
|
}
|
|
2632
2859
|
},
|
|
2633
|
-
content.url ? /* @__PURE__ */
|
|
2860
|
+
content.url ? /* @__PURE__ */ import_react25.default.createElement(
|
|
2634
2861
|
"iframe",
|
|
2635
2862
|
{
|
|
2636
2863
|
style: { border: "none", minWidth: "100%", minHeight: "100%" },
|
|
@@ -2640,20 +2867,20 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2640
2867
|
}
|
|
2641
2868
|
) : content.component
|
|
2642
2869
|
),
|
|
2643
|
-
dialogActions.length > 0 ? /* @__PURE__ */
|
|
2644
|
-
|
|
2870
|
+
dialogActions.length > 0 ? /* @__PURE__ */ import_react25.default.createElement(import_material15.DialogActions, { sx: { gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, dialogActions.length >= 3 ? /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement(
|
|
2871
|
+
import_material15.Button,
|
|
2645
2872
|
{
|
|
2646
2873
|
variant: "text",
|
|
2647
2874
|
color: dialogActions[0].color || "primary",
|
|
2648
2875
|
size: "small",
|
|
2649
2876
|
onClick: dialogActions[0].fn,
|
|
2650
2877
|
disabled: dialogActions[0].disabled || false,
|
|
2651
|
-
startIcon: dialogActions[0].icon ? /* @__PURE__ */
|
|
2878
|
+
startIcon: dialogActions[0].icon ? /* @__PURE__ */ import_react25.default.createElement(import_material15.SvgIcon, { fontSize: "small", component: dialogActions[0].icon }) : void 0
|
|
2652
2879
|
},
|
|
2653
2880
|
dialogActions[0].text
|
|
2654
|
-
), /* @__PURE__ */
|
|
2655
|
-
return /* @__PURE__ */
|
|
2656
|
-
|
|
2881
|
+
), /* @__PURE__ */ import_react25.default.createElement(import_material15.Box, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
|
|
2882
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
2883
|
+
import_material15.Button,
|
|
2657
2884
|
{
|
|
2658
2885
|
key: index + 1,
|
|
2659
2886
|
variant: index === dialogActions.length - 2 ? "contained" : "text",
|
|
@@ -2661,13 +2888,13 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2661
2888
|
size: "small",
|
|
2662
2889
|
onClick: boton.fn,
|
|
2663
2890
|
disabled: boton.disabled || false,
|
|
2664
|
-
startIcon: boton.icon ? /* @__PURE__ */
|
|
2891
|
+
startIcon: boton.icon ? /* @__PURE__ */ import_react25.default.createElement(import_material15.SvgIcon, { fontSize: "small", component: boton.icon }) : void 0
|
|
2665
2892
|
},
|
|
2666
2893
|
boton.text
|
|
2667
2894
|
);
|
|
2668
2895
|
}))) : dialogActions.map((boton, index) => {
|
|
2669
|
-
return /* @__PURE__ */
|
|
2670
|
-
|
|
2896
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
2897
|
+
import_material15.Button,
|
|
2671
2898
|
{
|
|
2672
2899
|
key: index,
|
|
2673
2900
|
variant: index === dialogActions.length - 1 ? "contained" : "text",
|
|
@@ -2675,7 +2902,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2675
2902
|
size: "small",
|
|
2676
2903
|
onClick: boton.fn,
|
|
2677
2904
|
disabled: boton.disabled || false,
|
|
2678
|
-
startIcon: boton.icon ? /* @__PURE__ */
|
|
2905
|
+
startIcon: boton.icon ? /* @__PURE__ */ import_react25.default.createElement(import_material15.SvgIcon, { fontSize: "small", component: boton.icon }) : void 0
|
|
2679
2906
|
},
|
|
2680
2907
|
boton.text
|
|
2681
2908
|
);
|
|
@@ -2684,12 +2911,12 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
2684
2911
|
};
|
|
2685
2912
|
|
|
2686
2913
|
// src/Components/SCMenu.tsx
|
|
2687
|
-
var
|
|
2688
|
-
var
|
|
2914
|
+
var import_react27 = __toESM(require("react"), 1);
|
|
2915
|
+
var import_material16 = require("@mui/material");
|
|
2689
2916
|
var import_Grid26 = __toESM(require("@mui/material/Grid2"), 1);
|
|
2690
2917
|
|
|
2691
2918
|
// src/Components/Hooks/useWindowDimensions.ts
|
|
2692
|
-
var
|
|
2919
|
+
var import_react26 = require("react");
|
|
2693
2920
|
function getWindowDimensions() {
|
|
2694
2921
|
const { innerWidth: width, innerHeight: height } = window;
|
|
2695
2922
|
return {
|
|
@@ -2698,8 +2925,8 @@ function getWindowDimensions() {
|
|
|
2698
2925
|
};
|
|
2699
2926
|
}
|
|
2700
2927
|
function useWindowDimensions() {
|
|
2701
|
-
const [windowDimensions, setWindowDimensions] = (0,
|
|
2702
|
-
(0,
|
|
2928
|
+
const [windowDimensions, setWindowDimensions] = (0, import_react26.useState)(getWindowDimensions());
|
|
2929
|
+
(0, import_react26.useEffect)(() => {
|
|
2703
2930
|
function handleResize() {
|
|
2704
2931
|
setWindowDimensions(getWindowDimensions());
|
|
2705
2932
|
}
|
|
@@ -2717,12 +2944,12 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
2717
2944
|
const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
|
|
2718
2945
|
const widthContainer = menuSize + pageSize;
|
|
2719
2946
|
let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
2720
|
-
const [selectedIndex, setSelectedIndex] =
|
|
2721
|
-
const [value, setValue] =
|
|
2722
|
-
|
|
2947
|
+
const [selectedIndex, setSelectedIndex] = import_react27.default.useState("1");
|
|
2948
|
+
const [value, setValue] = import_react27.default.useState("1");
|
|
2949
|
+
import_react27.default.useEffect(() => {
|
|
2723
2950
|
heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
2724
2951
|
}, [height]);
|
|
2725
|
-
|
|
2952
|
+
import_react27.default.useEffect(() => {
|
|
2726
2953
|
if (defaultOption) {
|
|
2727
2954
|
handleClickMenusItem(event, void 0);
|
|
2728
2955
|
}
|
|
@@ -2752,34 +2979,34 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
2752
2979
|
setValue(String(index + 1));
|
|
2753
2980
|
}
|
|
2754
2981
|
};
|
|
2755
|
-
return /* @__PURE__ */
|
|
2756
|
-
|
|
2982
|
+
return /* @__PURE__ */ import_react27.default.createElement(import_react27.default.Fragment, null, /* @__PURE__ */ import_react27.default.createElement(import_Grid26.default, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ import_react27.default.createElement(import_material16.Paper, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ import_react27.default.createElement(import_material16.MenuList, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ import_react27.default.createElement(import_react27.default.Fragment, null, /* @__PURE__ */ import_react27.default.createElement(
|
|
2983
|
+
import_material16.MenuItem,
|
|
2757
2984
|
{
|
|
2758
2985
|
disabled: disable == true ? true : false,
|
|
2759
2986
|
key: index,
|
|
2760
2987
|
selected: String(index + 1) === selectedIndex,
|
|
2761
2988
|
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
2762
2989
|
},
|
|
2763
|
-
option.iconLeft ? /* @__PURE__ */
|
|
2764
|
-
/* @__PURE__ */
|
|
2765
|
-
), option.divider == true ? /* @__PURE__ */
|
|
2990
|
+
option.iconLeft ? /* @__PURE__ */ import_react27.default.createElement(import_material16.ListItemIcon, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ import_react27.default.createElement(import_material16.SvgIcon, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
2991
|
+
/* @__PURE__ */ import_react27.default.createElement(import_Grid26.default, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ import_react27.default.createElement(import_material16.Typography, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ import_react27.default.createElement(import_material16.ListItemIcon, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ import_react27.default.createElement(import_material16.SvgIcon, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
2992
|
+
), option.divider == true ? /* @__PURE__ */ import_react27.default.createElement(import_material16.Divider, null) : "")))), /* @__PURE__ */ import_react27.default.createElement(import_Grid26.default, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ import_react27.default.createElement(import_material16.Box, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ import_react27.default.createElement(import_material16.Typography, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
2766
2993
|
};
|
|
2767
2994
|
|
|
2768
2995
|
// src/Components/SCTabs.tsx
|
|
2769
|
-
var
|
|
2770
|
-
var
|
|
2996
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
2997
|
+
var import_material17 = require("@mui/material");
|
|
2771
2998
|
var import_TabPanel = __toESM(require("@mui/lab/TabPanel"), 1);
|
|
2772
2999
|
var import_TabContext = __toESM(require("@mui/lab/TabContext"), 1);
|
|
2773
3000
|
var Muicon7 = __toESM(require("@mui/icons-material"), 1);
|
|
2774
3001
|
var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
|
|
2775
|
-
const [toast, setToast] =
|
|
3002
|
+
const [toast, setToast] = import_react28.default.useState(null);
|
|
2776
3003
|
let i = 0;
|
|
2777
3004
|
let j = 0;
|
|
2778
3005
|
let k = 0;
|
|
2779
3006
|
let l = 0;
|
|
2780
3007
|
let validateTypeIcon = true;
|
|
2781
|
-
const [value, setValue] =
|
|
2782
|
-
(0,
|
|
3008
|
+
const [value, setValue] = import_react28.default.useState("1");
|
|
3009
|
+
(0, import_react28.useEffect)(() => {
|
|
2783
3010
|
if (defaultOption) {
|
|
2784
3011
|
handleChange(event, void 0);
|
|
2785
3012
|
}
|
|
@@ -2829,8 +3056,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
2829
3056
|
setValue(newValue);
|
|
2830
3057
|
}
|
|
2831
3058
|
};
|
|
2832
|
-
return /* @__PURE__ */
|
|
2833
|
-
|
|
3059
|
+
return /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ import_react28.default.createElement(import_material17.Box, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ import_react28.default.createElement(import_TabContext.default, { value }, /* @__PURE__ */ import_react28.default.createElement(
|
|
3060
|
+
import_material17.Tabs,
|
|
2834
3061
|
{
|
|
2835
3062
|
"data-testid": "tab-container",
|
|
2836
3063
|
value,
|
|
@@ -2843,8 +3070,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
2843
3070
|
orientation: orientation || "horizontal",
|
|
2844
3071
|
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
2845
3072
|
},
|
|
2846
|
-
options.map((option) => /* @__PURE__ */
|
|
2847
|
-
|
|
3073
|
+
options.map((option) => /* @__PURE__ */ import_react28.default.createElement(
|
|
3074
|
+
import_material17.Tab,
|
|
2848
3075
|
{
|
|
2849
3076
|
"data-testid": "tab-item",
|
|
2850
3077
|
value: String(i = i + 1),
|
|
@@ -2852,8 +3079,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
2852
3079
|
label: option.name || "",
|
|
2853
3080
|
disabled: option.disabled || false,
|
|
2854
3081
|
iconPosition: iconPosition || "end",
|
|
2855
|
-
icon: typeIcon == "badge" ? /* @__PURE__ */
|
|
2856
|
-
|
|
3082
|
+
icon: typeIcon == "badge" ? /* @__PURE__ */ import_react28.default.createElement(
|
|
3083
|
+
import_material17.Badge,
|
|
2857
3084
|
{
|
|
2858
3085
|
sx: {
|
|
2859
3086
|
width: "20px",
|
|
@@ -2867,29 +3094,29 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
2867
3094
|
badgeContent: option.iconOrBadge,
|
|
2868
3095
|
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
2869
3096
|
}
|
|
2870
|
-
) : typeIcon == "icon" ? /* @__PURE__ */
|
|
3097
|
+
) : typeIcon == "icon" ? /* @__PURE__ */ import_react28.default.createElement(import_material17.SvgIcon, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
|
|
2871
3098
|
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
2872
3099
|
}
|
|
2873
3100
|
))
|
|
2874
|
-
), children, options.map((option) => /* @__PURE__ */
|
|
3101
|
+
), children, options.map((option) => /* @__PURE__ */ import_react28.default.createElement(
|
|
2875
3102
|
import_TabPanel.default,
|
|
2876
3103
|
{
|
|
2877
3104
|
key: k = k + 1,
|
|
2878
3105
|
value: String(l = l + 1),
|
|
2879
3106
|
sx: { padding: "16px" }
|
|
2880
3107
|
},
|
|
2881
|
-
option.page ? option.page : /* @__PURE__ */
|
|
2882
|
-
)))) : /* @__PURE__ */
|
|
3108
|
+
option.page ? option.page : /* @__PURE__ */ import_react28.default.createElement(import_material17.Typography, null, "No se ha configurado el componente a visualizar ")
|
|
3109
|
+
)))) : /* @__PURE__ */ import_react28.default.createElement(import_material17.Box, { sx: { height: "200px" } }, toast && /* @__PURE__ */ import_react28.default.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
2883
3110
|
};
|
|
2884
3111
|
|
|
2885
3112
|
// src/Components/Calendario/Calendar.tsx
|
|
2886
|
-
var
|
|
2887
|
-
var
|
|
3113
|
+
var import_react35 = __toESM(require("react"), 1);
|
|
3114
|
+
var import_material23 = require("@mui/material");
|
|
2888
3115
|
|
|
2889
3116
|
// src/Components/Calendario/CalendarToolbar.tsx
|
|
2890
|
-
var
|
|
2891
|
-
var
|
|
2892
|
-
var
|
|
3117
|
+
var import_react29 = __toESM(require("react"), 1);
|
|
3118
|
+
var import_icons_material11 = require("@mui/icons-material");
|
|
3119
|
+
var import_material18 = require("@mui/material");
|
|
2893
3120
|
var import_dayjs2 = __toESM(require("dayjs"), 1);
|
|
2894
3121
|
var import_updateLocale = __toESM(require("dayjs/plugin/updateLocale"), 1);
|
|
2895
3122
|
var import_es2 = require("dayjs/locale/es");
|
|
@@ -2906,7 +3133,7 @@ var CalendarToolbar = ({
|
|
|
2906
3133
|
onNavigate,
|
|
2907
3134
|
children
|
|
2908
3135
|
}) => {
|
|
2909
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
3136
|
+
const [anchorEl, setAnchorEl] = (0, import_react29.useState)(null);
|
|
2910
3137
|
const open = Boolean(anchorEl);
|
|
2911
3138
|
const handleMenuOpen = (event2) => {
|
|
2912
3139
|
setAnchorEl(event2.currentTarget);
|
|
@@ -2929,16 +3156,16 @@ var CalendarToolbar = ({
|
|
|
2929
3156
|
}
|
|
2930
3157
|
return labelDate.format(" DD MMMM YYYY");
|
|
2931
3158
|
};
|
|
2932
|
-
return /* @__PURE__ */
|
|
2933
|
-
|
|
3159
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_material18.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 0.5, px: 1, py: 0.5 }, /* @__PURE__ */ import_react29.default.createElement(import_material18.Box, null, /* @__PURE__ */ import_react29.default.createElement(
|
|
3160
|
+
import_material18.Chip,
|
|
2934
3161
|
{
|
|
2935
3162
|
label: "Hoy",
|
|
2936
|
-
icon: /* @__PURE__ */
|
|
3163
|
+
icon: /* @__PURE__ */ import_react29.default.createElement(import_icons_material11.LightModeOutlined, { fontSize: "small" }),
|
|
2937
3164
|
color: "primary",
|
|
2938
3165
|
onClick: () => onNavigate("TODAY")
|
|
2939
3166
|
}
|
|
2940
|
-
)), /* @__PURE__ */
|
|
2941
|
-
|
|
3167
|
+
)), /* @__PURE__ */ import_react29.default.createElement(import_material18.Stack, { direction: "row", alignItems: "center", gap: 1 }, /* @__PURE__ */ import_react29.default.createElement(import_material18.IconButton, { "aria-label": "Anterior", onClick: () => onNavigate("PREV"), size: "small", color: "primary" }, /* @__PURE__ */ import_react29.default.createElement(import_icons_material11.ChevronLeft, { fontSize: "small" })), /* @__PURE__ */ import_react29.default.createElement(import_material18.IconButton, { "aria-label": "Siguiente", onClick: () => onNavigate("NEXT"), size: "small", color: "primary" }, /* @__PURE__ */ import_react29.default.createElement(import_icons_material11.ChevronRight, { fontSize: "small" })), /* @__PURE__ */ import_react29.default.createElement(import_material18.Typography, { variant: "h6", color: "primary", "data-testid": "currentDate" }, getFormattedDate()), /* @__PURE__ */ import_react29.default.createElement(import_material18.IconButton, { onClick: handleMenuOpen, size: "small", color: "primary", "aria-label": "Cambiar vista" }, /* @__PURE__ */ import_react29.default.createElement(import_icons_material11.KeyboardArrowDown, { fontSize: "small" })), /* @__PURE__ */ import_react29.default.createElement(
|
|
3168
|
+
import_material18.Menu,
|
|
2942
3169
|
{
|
|
2943
3170
|
anchorEl,
|
|
2944
3171
|
open,
|
|
@@ -2946,15 +3173,15 @@ var CalendarToolbar = ({
|
|
|
2946
3173
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
2947
3174
|
transformOrigin: { vertical: "top", horizontal: "center" }
|
|
2948
3175
|
},
|
|
2949
|
-
/* @__PURE__ */
|
|
2950
|
-
/* @__PURE__ */
|
|
2951
|
-
/* @__PURE__ */
|
|
2952
|
-
)), children ? /* @__PURE__ */
|
|
3176
|
+
/* @__PURE__ */ import_react29.default.createElement(import_material18.MenuItem, { onClick: () => handleViewChange("month") }, "Mes"),
|
|
3177
|
+
/* @__PURE__ */ import_react29.default.createElement(import_material18.MenuItem, { onClick: () => handleViewChange("week") }, "Semana"),
|
|
3178
|
+
/* @__PURE__ */ import_react29.default.createElement(import_material18.MenuItem, { onClick: () => handleViewChange("day") }, "D\xEDa")
|
|
3179
|
+
)), children ? /* @__PURE__ */ import_react29.default.createElement(import_material18.Box, null, children) : /* @__PURE__ */ import_react29.default.createElement(import_material18.Box, { width: "24px" }), " ");
|
|
2953
3180
|
};
|
|
2954
3181
|
|
|
2955
3182
|
// src/Components/Calendario/Views/MonthView.tsx
|
|
2956
|
-
var
|
|
2957
|
-
var
|
|
3183
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
3184
|
+
var import_material20 = require("@mui/material");
|
|
2958
3185
|
var import_Add = __toESM(require("@mui/icons-material/Add"), 1);
|
|
2959
3186
|
var import_dayjs4 = __toESM(require("dayjs"), 1);
|
|
2960
3187
|
var import_localeData = __toESM(require("dayjs/plugin/localeData"), 1);
|
|
@@ -2986,10 +3213,10 @@ var stateColors = {
|
|
|
2986
3213
|
};
|
|
2987
3214
|
|
|
2988
3215
|
// src/Components/Calendario/Event.tsx
|
|
2989
|
-
var
|
|
2990
|
-
var
|
|
3216
|
+
var import_react30 = __toESM(require("react"), 1);
|
|
3217
|
+
var import_material19 = require("@mui/material");
|
|
2991
3218
|
var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
2992
|
-
const [anchorEl, setAnchorEl] =
|
|
3219
|
+
const [anchorEl, setAnchorEl] = import_react30.default.useState(null);
|
|
2993
3220
|
const handlePopoverOpen = (event3) => {
|
|
2994
3221
|
setAnchorEl(event3.currentTarget);
|
|
2995
3222
|
};
|
|
@@ -2997,8 +3224,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
2997
3224
|
setAnchorEl(null);
|
|
2998
3225
|
};
|
|
2999
3226
|
const open = Boolean(anchorEl);
|
|
3000
|
-
return /* @__PURE__ */
|
|
3001
|
-
|
|
3227
|
+
return /* @__PURE__ */ import_react30.default.createElement(
|
|
3228
|
+
import_material19.Stack,
|
|
3002
3229
|
{
|
|
3003
3230
|
direction: "row",
|
|
3004
3231
|
padding: 0.5,
|
|
@@ -3018,8 +3245,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3018
3245
|
cursor: onClick ? "pointer" : "default"
|
|
3019
3246
|
}, sx)
|
|
3020
3247
|
},
|
|
3021
|
-
/* @__PURE__ */
|
|
3022
|
-
|
|
3248
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
3249
|
+
import_material19.Divider,
|
|
3023
3250
|
{
|
|
3024
3251
|
orientation: "vertical",
|
|
3025
3252
|
flexItem: true,
|
|
@@ -3030,8 +3257,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3030
3257
|
}
|
|
3031
3258
|
}
|
|
3032
3259
|
),
|
|
3033
|
-
/* @__PURE__ */
|
|
3034
|
-
|
|
3260
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
3261
|
+
import_material19.Box,
|
|
3035
3262
|
{
|
|
3036
3263
|
px: 1,
|
|
3037
3264
|
py: 0.5,
|
|
@@ -3040,8 +3267,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3040
3267
|
display: "flex",
|
|
3041
3268
|
alignItems: "center"
|
|
3042
3269
|
},
|
|
3043
|
-
/* @__PURE__ */
|
|
3044
|
-
|
|
3270
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
3271
|
+
import_material19.Typography,
|
|
3045
3272
|
{
|
|
3046
3273
|
color: "text.primary",
|
|
3047
3274
|
variant: "caption",
|
|
@@ -3056,8 +3283,8 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3056
3283
|
},
|
|
3057
3284
|
event2.title.charAt(0).toUpperCase() + event2.title.slice(1).toLowerCase()
|
|
3058
3285
|
),
|
|
3059
|
-
/* @__PURE__ */
|
|
3060
|
-
|
|
3286
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
3287
|
+
import_material19.Popover,
|
|
3061
3288
|
{
|
|
3062
3289
|
id: "mouse-over-popover",
|
|
3063
3290
|
sx: { pointerEvents: "none" },
|
|
@@ -3081,9 +3308,9 @@ var CalendarEventCard = ({ event: event2, color, sx, onClick, onHover }) => {
|
|
|
3081
3308
|
};
|
|
3082
3309
|
|
|
3083
3310
|
// src/assets/LogoCalendario.tsx
|
|
3084
|
-
var
|
|
3311
|
+
var import_react31 = __toESM(require("react"), 1);
|
|
3085
3312
|
var LogoCalendario = () => {
|
|
3086
|
-
return /* @__PURE__ */
|
|
3313
|
+
return /* @__PURE__ */ import_react31.default.createElement("svg", { width: "60", height: "61", viewBox: "0 0 60 61", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react31.default.createElement("g", { "clip-path": "url(#clip0_5353_24891)" }, /* @__PURE__ */ import_react31.default.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__ */ import_react31.default.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__ */ import_react31.default.createElement("path", { d: "M19.481 30.9138C19.481 30.5164 20.1155 30.1903 20.9058 30.1903C21.6894 30.1903 22.3305 30.5131 22.3305 30.9138V32.8862C22.3305 33.2836 21.6894 33.6097 20.9058 33.6097C20.1222 33.6097 19.481 33.2869 19.481 32.8862V30.9138Z", fill: "#6392BD" }), /* @__PURE__ */ import_react31.default.createElement("path", { d: "M30.0242 30.1903C29.2339 30.1903 28.5995 30.5164 28.5995 30.9138V32.8862C28.5995 33.2869 29.2406 33.6097 30.0242 33.6097C30.8079 33.6097 31.449 33.2836 31.449 32.8862V30.9138C31.449 30.5131 30.8079 30.1903 30.0242 30.1903Z", fill: "#6392BD" }), /* @__PURE__ */ import_react31.default.createElement("path", { d: "M37.7179 30.9138C37.7179 30.5164 38.3524 30.1903 39.1427 30.1903C39.608 30.1903 40.022 30.3038 40.2825 30.4797C40.3515 30.5276 40.4116 30.5788 40.4561 30.6344C40.5274 30.7201 40.5675 30.8147 40.5675 30.9138V32.8862C40.5675 33.2836 39.9263 33.6097 39.1427 33.6097C38.3591 33.6097 37.7179 33.2869 37.7179 32.8862V30.9138Z", fill: "#6392BD" }), /* @__PURE__ */ import_react31.default.createElement("path", { d: "M20.9058 39.8787C20.1155 39.8787 19.481 40.2048 19.481 40.6022V42.5746C19.481 42.687 19.5322 42.7927 19.6213 42.8874C19.7036 42.9731 19.8172 43.0499 19.9552 43.1122C20.2068 43.228 20.5407 43.2981 20.9058 43.2981C21.6894 43.2981 22.3305 42.972 22.3305 42.5746V40.6022C22.3305 40.2015 21.6894 39.8787 20.9058 39.8787Z", fill: "#6392BD" }), /* @__PURE__ */ import_react31.default.createElement("path", { d: "M29.524 39.9477C29.7087 39.9032 29.9158 39.8787 30.1339 39.8787C30.9176 39.8787 31.5587 40.2015 31.5587 40.6022V42.5746C31.5587 42.972 30.9176 43.2981 30.1339 43.2981C29.3503 43.2981 28.7092 42.9753 28.7092 42.5746V40.6022C28.7092 40.315 29.0409 40.0646 29.524 39.9477Z", fill: "#6392BD" }), /* @__PURE__ */ import_react31.default.createElement("path", { d: "M38.5141 39.9482C38.6989 39.9037 38.9059 39.8792 39.1241 39.8792C39.9077 39.8792 40.5488 40.202 40.5488 40.6027V42.5751C40.5488 42.9725 39.9077 43.2986 39.1241 43.2986C38.3405 43.2986 37.6993 42.9758 37.6993 42.5751V40.6027C37.6993 40.3155 38.031 40.0651 38.5141 39.9482Z", fill: "#6392BD" })), /* @__PURE__ */ import_react31.default.createElement("defs", null, /* @__PURE__ */ import_react31.default.createElement("clipPath", { id: "clip0_5353_24891" }, /* @__PURE__ */ import_react31.default.createElement("rect", { width: "60", height: "60", fill: "white", transform: "translate(0 0.5)" }))));
|
|
3087
3314
|
};
|
|
3088
3315
|
|
|
3089
3316
|
// src/Components/Calendario/Views/MonthView.tsx
|
|
@@ -3093,23 +3320,23 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3093
3320
|
const noEvents = events.length === 0;
|
|
3094
3321
|
const days = getMonthDays(currentDate);
|
|
3095
3322
|
const weekDays = Array.from({ length: 7 }, (_, i) => (0, import_dayjs4.default)().day(i));
|
|
3096
|
-
const [openDrawer, setOpenDrawer] =
|
|
3097
|
-
const [selectedDay, setSelectedDay] =
|
|
3098
|
-
const [selectedEvents, setSelectedEvents] =
|
|
3099
|
-
return /* @__PURE__ */
|
|
3323
|
+
const [openDrawer, setOpenDrawer] = import_react32.default.useState(false);
|
|
3324
|
+
const [selectedDay, setSelectedDay] = import_react32.default.useState(null);
|
|
3325
|
+
const [selectedEvents, setSelectedEvents] = import_react32.default.useState([]);
|
|
3326
|
+
return /* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { width: "100%", sx: { overflowX: "auto" } }, /* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { minWidth: "1050px" }, /* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5, mb: 1 }, weekDays.map((day) => /* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { key: day.day(), textAlign: "center", py: 0.5 }, /* @__PURE__ */ import_react32.default.createElement(import_material20.Typography, { variant: "caption", color: "text.secondary" }, day.format("dddd"))))), isLoading ? /* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react32.default.createElement(import_material20.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ import_react32.default.createElement(
|
|
3100
3327
|
EmptyState,
|
|
3101
3328
|
{
|
|
3102
3329
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3103
3330
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3104
|
-
icon: /* @__PURE__ */
|
|
3331
|
+
icon: /* @__PURE__ */ import_react32.default.createElement(LogoCalendario, null)
|
|
3105
3332
|
}
|
|
3106
|
-
) : /* @__PURE__ */
|
|
3333
|
+
) : /* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { display: "grid", gridTemplateColumns: "repeat(7, minmax(150px, 1fr))", gap: 0.5 }, days.map((day) => {
|
|
3107
3334
|
const dayEvents = events.filter(
|
|
3108
3335
|
(e) => day.isBetween(e.start.startOf("day"), e.end.endOf("day"), null, "[]")
|
|
3109
3336
|
);
|
|
3110
3337
|
const isCurrentMonth = day.month() === currentDate.month();
|
|
3111
|
-
return /* @__PURE__ */
|
|
3112
|
-
|
|
3338
|
+
return /* @__PURE__ */ import_react32.default.createElement(
|
|
3339
|
+
import_material20.Paper,
|
|
3113
3340
|
{
|
|
3114
3341
|
key: day.toString(),
|
|
3115
3342
|
onClick: () => onDayClick == null ? void 0 : onDayClick(day),
|
|
@@ -3125,8 +3352,8 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3125
3352
|
overflow: "hidden"
|
|
3126
3353
|
}
|
|
3127
3354
|
},
|
|
3128
|
-
/* @__PURE__ */
|
|
3129
|
-
|
|
3355
|
+
/* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { p: 1, flexShrink: 0 }, /* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { display: "flex", alignItems: "center", justifyContent: "flex-start" }, /* @__PURE__ */ import_react32.default.createElement(
|
|
3356
|
+
import_material20.Box,
|
|
3130
3357
|
{
|
|
3131
3358
|
sx: {
|
|
3132
3359
|
width: 24,
|
|
@@ -3138,16 +3365,16 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3138
3365
|
justifyContent: "center"
|
|
3139
3366
|
}
|
|
3140
3367
|
},
|
|
3141
|
-
/* @__PURE__ */
|
|
3142
|
-
|
|
3368
|
+
/* @__PURE__ */ import_react32.default.createElement(
|
|
3369
|
+
import_material20.Typography,
|
|
3143
3370
|
{
|
|
3144
3371
|
variant: "body2",
|
|
3145
3372
|
sx: { color: isToday(day) ? "white" : "text.secondary" }
|
|
3146
3373
|
},
|
|
3147
3374
|
day.date()
|
|
3148
3375
|
)
|
|
3149
|
-
), dayEvents.length > 2 && /* @__PURE__ */
|
|
3150
|
-
|
|
3376
|
+
), dayEvents.length > 2 && /* @__PURE__ */ import_react32.default.createElement(import_material20.Tooltip, { title: "M\xE1s eventos" }, /* @__PURE__ */ import_react32.default.createElement(
|
|
3377
|
+
import_material20.IconButton,
|
|
3151
3378
|
{
|
|
3152
3379
|
color: "primary",
|
|
3153
3380
|
size: "small",
|
|
@@ -3158,9 +3385,9 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3158
3385
|
setSelectedEvents(dayEvents);
|
|
3159
3386
|
}
|
|
3160
3387
|
},
|
|
3161
|
-
/* @__PURE__ */
|
|
3388
|
+
/* @__PURE__ */ import_react32.default.createElement(import_Add.default, { fontSize: "small" })
|
|
3162
3389
|
)))),
|
|
3163
|
-
/* @__PURE__ */
|
|
3390
|
+
/* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { display: "flex", flexDirection: "column", gap: 0.5, p: 1, pt: 0, overflow: "hidden" }, dayEvents.slice(0, 2).map((event2) => /* @__PURE__ */ import_react32.default.createElement(
|
|
3164
3391
|
CalendarEventCard,
|
|
3165
3392
|
{
|
|
3166
3393
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3170,8 +3397,8 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3170
3397
|
onHover: onEventHover
|
|
3171
3398
|
}
|
|
3172
3399
|
))),
|
|
3173
|
-
dayEvents.length > 2 && /* @__PURE__ */
|
|
3174
|
-
|
|
3400
|
+
dayEvents.length > 2 && /* @__PURE__ */ import_react32.default.createElement(
|
|
3401
|
+
import_material20.Stack,
|
|
3175
3402
|
{
|
|
3176
3403
|
justifyItems: "center",
|
|
3177
3404
|
px: 1,
|
|
@@ -3179,7 +3406,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3179
3406
|
onClick: (e) => e.stopPropagation(),
|
|
3180
3407
|
sx: { "& .MuiButtonBase-root": { width: "100%" } }
|
|
3181
3408
|
},
|
|
3182
|
-
/* @__PURE__ */
|
|
3409
|
+
/* @__PURE__ */ import_react32.default.createElement(
|
|
3183
3410
|
SCDrawer,
|
|
3184
3411
|
{
|
|
3185
3412
|
width: "350px",
|
|
@@ -3191,7 +3418,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3191
3418
|
arrayElements: [{
|
|
3192
3419
|
component: (() => {
|
|
3193
3420
|
const [first, ...rest] = dayEvents;
|
|
3194
|
-
return /* @__PURE__ */
|
|
3421
|
+
return /* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { display: "flex", width: "100%", flexDirection: "column", height: "100%", pr: 1.5 }, /* @__PURE__ */ import_react32.default.createElement(import_material20.Typography, { width: "100%", color: "text.secondary" }, " Proximo evento "), first && /* @__PURE__ */ import_react32.default.createElement(import_material20.Box, { p: 1, pb: 1, width: "100%" }, /* @__PURE__ */ import_react32.default.createElement(
|
|
3195
3422
|
CalendarEventCard,
|
|
3196
3423
|
{
|
|
3197
3424
|
event: first,
|
|
@@ -3206,8 +3433,8 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3206
3433
|
}
|
|
3207
3434
|
}
|
|
3208
3435
|
}
|
|
3209
|
-
)), /* @__PURE__ */
|
|
3210
|
-
|
|
3436
|
+
)), /* @__PURE__ */ import_react32.default.createElement(import_material20.Divider, { flexItem: true, sx: { width: "100%" } }), /* @__PURE__ */ import_react32.default.createElement(import_material20.Typography, { width: "100%", py: 1, color: "text.secondary" }, " Eventos restantes "), /* @__PURE__ */ import_react32.default.createElement(
|
|
3437
|
+
import_material20.Box,
|
|
3211
3438
|
{
|
|
3212
3439
|
width: "100%",
|
|
3213
3440
|
height: "100%",
|
|
@@ -3219,7 +3446,7 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3219
3446
|
flexDirection: "column",
|
|
3220
3447
|
gap: 1.5
|
|
3221
3448
|
},
|
|
3222
|
-
rest.map((event2) => /* @__PURE__ */
|
|
3449
|
+
rest.map((event2) => /* @__PURE__ */ import_react32.default.createElement(
|
|
3223
3450
|
CalendarEventCard,
|
|
3224
3451
|
{
|
|
3225
3452
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3248,8 +3475,8 @@ var MonthView = ({ events, isLoading, onDayClick, onMoreClick, currentDate, onEv
|
|
|
3248
3475
|
};
|
|
3249
3476
|
|
|
3250
3477
|
// src/Components/Calendario/Views/WeekView.tsx
|
|
3251
|
-
var
|
|
3252
|
-
var
|
|
3478
|
+
var import_react33 = __toESM(require("react"), 1);
|
|
3479
|
+
var import_material21 = require("@mui/material");
|
|
3253
3480
|
var import_dayjs5 = __toESM(require("dayjs"), 1);
|
|
3254
3481
|
var import_localeData2 = __toESM(require("dayjs/plugin/localeData"), 1);
|
|
3255
3482
|
import_dayjs5.default.extend(import_localeData2.default);
|
|
@@ -3283,10 +3510,10 @@ var WeekView = ({
|
|
|
3283
3510
|
}
|
|
3284
3511
|
return "none";
|
|
3285
3512
|
};
|
|
3286
|
-
return /* @__PURE__ */
|
|
3513
|
+
return /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { display: "flex", bgcolor: "transparent" }, /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { width: 45, bgcolor: "transparent" }), days.map((day) => {
|
|
3287
3514
|
const isToday2 = day.format("YYYY-MM-DD") === todayString;
|
|
3288
|
-
return /* @__PURE__ */
|
|
3289
|
-
|
|
3515
|
+
return /* @__PURE__ */ import_react33.default.createElement(
|
|
3516
|
+
import_material21.Box,
|
|
3290
3517
|
{
|
|
3291
3518
|
key: day.toString(),
|
|
3292
3519
|
height: 40,
|
|
@@ -3302,20 +3529,20 @@ var WeekView = ({
|
|
|
3302
3529
|
borderBottom: isToday2 ? 2 : 0,
|
|
3303
3530
|
borderColor: isToday2 ? "primary.main" : "transparent"
|
|
3304
3531
|
},
|
|
3305
|
-
/* @__PURE__ */
|
|
3306
|
-
/* @__PURE__ */
|
|
3532
|
+
/* @__PURE__ */ import_react33.default.createElement(import_material21.Typography, { variant: "h6", color: "text.primary" }, day.format("D")),
|
|
3533
|
+
/* @__PURE__ */ import_react33.default.createElement(import_material21.Typography, { variant: "caption", color: "text.secondary" }, day.format("dddd"))
|
|
3307
3534
|
);
|
|
3308
|
-
})), isLoading ? /* @__PURE__ */
|
|
3535
|
+
})), isLoading ? /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react33.default.createElement(import_material21.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : !isLoading && noEvents ? /* @__PURE__ */ import_react33.default.createElement(
|
|
3309
3536
|
EmptyState,
|
|
3310
3537
|
{
|
|
3311
3538
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3312
3539
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3313
|
-
icon: /* @__PURE__ */
|
|
3540
|
+
icon: /* @__PURE__ */ import_react33.default.createElement(LogoCalendario, null)
|
|
3314
3541
|
}
|
|
3315
3542
|
) : (
|
|
3316
3543
|
// Grid de horas y eventos
|
|
3317
|
-
/* @__PURE__ */
|
|
3318
|
-
|
|
3544
|
+
/* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { display: "flex", flex: 1 }, /* @__PURE__ */ import_react33.default.createElement(import_material21.Box, { width: 45, bgcolor: "transparent" }, hours.map((h) => /* @__PURE__ */ import_react33.default.createElement(
|
|
3545
|
+
import_material21.Box,
|
|
3319
3546
|
{
|
|
3320
3547
|
key: h,
|
|
3321
3548
|
height: 60,
|
|
@@ -3323,7 +3550,7 @@ var WeekView = ({
|
|
|
3323
3550
|
pr: 1,
|
|
3324
3551
|
borderColor: "divider"
|
|
3325
3552
|
},
|
|
3326
|
-
/* @__PURE__ */
|
|
3553
|
+
/* @__PURE__ */ import_react33.default.createElement(import_material21.Typography, { variant: "caption", color: "text.secondary" }, (0, import_dayjs5.default)().hour(h).format("h A"))
|
|
3327
3554
|
))), days.map((day) => {
|
|
3328
3555
|
const dayEvents = events.filter(
|
|
3329
3556
|
(event2) => day.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
|
|
@@ -3332,8 +3559,8 @@ var WeekView = ({
|
|
|
3332
3559
|
const endsInRange = event2.end.hour() >= startHour && event2.end.hour() <= endHour;
|
|
3333
3560
|
return startsInRange || endsInRange;
|
|
3334
3561
|
}).sort((a, b) => a.start.valueOf() - b.start.valueOf());
|
|
3335
|
-
return /* @__PURE__ */
|
|
3336
|
-
|
|
3562
|
+
return /* @__PURE__ */ import_react33.default.createElement(
|
|
3563
|
+
import_material21.Box,
|
|
3337
3564
|
{
|
|
3338
3565
|
key: day.toString(),
|
|
3339
3566
|
flex: 1,
|
|
@@ -3345,8 +3572,8 @@ var WeekView = ({
|
|
|
3345
3572
|
},
|
|
3346
3573
|
hours.map((hourIdx) => {
|
|
3347
3574
|
const borderType = getCellBorderType(hourIdx, dayEvents);
|
|
3348
|
-
return /* @__PURE__ */
|
|
3349
|
-
|
|
3575
|
+
return /* @__PURE__ */ import_react33.default.createElement(
|
|
3576
|
+
import_material21.Box,
|
|
3350
3577
|
{
|
|
3351
3578
|
key: hourIdx,
|
|
3352
3579
|
height: 60,
|
|
@@ -3361,7 +3588,7 @@ var WeekView = ({
|
|
|
3361
3588
|
const eventEnd = day.isSame(event2.end, "day") ? event2.end : day.endOf("day").hour(endHour).minute(59);
|
|
3362
3589
|
const startMinutes = (eventStart.hour() - startHour) * 60 + eventStart.minute();
|
|
3363
3590
|
const durationMinutes = eventEnd.diff(eventStart, "minute");
|
|
3364
|
-
return /* @__PURE__ */
|
|
3591
|
+
return /* @__PURE__ */ import_react33.default.createElement(
|
|
3365
3592
|
CalendarEventCard,
|
|
3366
3593
|
{
|
|
3367
3594
|
key: `${event2.id}-${day.toString()}`,
|
|
@@ -3386,8 +3613,8 @@ var WeekView = ({
|
|
|
3386
3613
|
};
|
|
3387
3614
|
|
|
3388
3615
|
// src/Components/Calendario/Views/DayView.tsx
|
|
3389
|
-
var
|
|
3390
|
-
var
|
|
3616
|
+
var import_react34 = __toESM(require("react"), 1);
|
|
3617
|
+
var import_material22 = require("@mui/material");
|
|
3391
3618
|
var import_dayjs6 = __toESM(require("dayjs"), 1);
|
|
3392
3619
|
var DayView = ({
|
|
3393
3620
|
events,
|
|
@@ -3418,15 +3645,15 @@ var DayView = ({
|
|
|
3418
3645
|
(event2) => currentDate.isBetween(event2.start.startOf("day"), event2.end.endOf("day"), null, "[]")
|
|
3419
3646
|
);
|
|
3420
3647
|
const noEvents = events.length === 0;
|
|
3421
|
-
return /* @__PURE__ */
|
|
3648
|
+
return /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { display: "flex", flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { display: "flex", borderBottom: "1px solid", borderColor: "primary.main", bgcolor: "background.paper" }, /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { width: 47, bgcolor: "background.default", borderBottom: "1px solid", borderColor: "transparent" }), /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { flex: 1, display: "flex", flexDirection: "column", textAlign: "start", gap: 0.5, py: 1, bgcolor: "primary.50" }, /* @__PURE__ */ import_react34.default.createElement(import_material22.Typography, { variant: "h6", color: "text.secondary" }, currentDate.format("D")), /* @__PURE__ */ import_react34.default.createElement(import_material22.Typography, { variant: "caption", color: "text.secondary" }, currentDate.format("dddd")))), isLoading ? /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "450px" }, /* @__PURE__ */ import_react34.default.createElement(import_material22.CircularProgress, { sx: { width: "60px", height: "60px" }, variant: "indeterminate" })) : noEvents ? /* @__PURE__ */ import_react34.default.createElement(
|
|
3422
3649
|
EmptyState,
|
|
3423
3650
|
{
|
|
3424
3651
|
title: "Inicia la gesti\xF3n de las actividades",
|
|
3425
3652
|
subtitle: "Selecciona un mec\xE1nico y as\xEDgnale las actividades a realizar.",
|
|
3426
|
-
icon: /* @__PURE__ */
|
|
3653
|
+
icon: /* @__PURE__ */ import_react34.default.createElement(LogoCalendario, null)
|
|
3427
3654
|
}
|
|
3428
|
-
) : /* @__PURE__ */
|
|
3429
|
-
|
|
3655
|
+
) : /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { display: "flex", flex: 1 }, /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { width: 47, bgcolor: "background.default" }, hours.map((h) => /* @__PURE__ */ import_react34.default.createElement(
|
|
3656
|
+
import_material22.Box,
|
|
3430
3657
|
{
|
|
3431
3658
|
key: h,
|
|
3432
3659
|
height: 60,
|
|
@@ -3436,11 +3663,11 @@ var DayView = ({
|
|
|
3436
3663
|
borderRight: "1px solid",
|
|
3437
3664
|
borderColor: "divider"
|
|
3438
3665
|
},
|
|
3439
|
-
/* @__PURE__ */
|
|
3440
|
-
))), /* @__PURE__ */
|
|
3666
|
+
/* @__PURE__ */ import_react34.default.createElement(import_material22.Typography, { variant: "caption", color: "text.secondary" }, (0, import_dayjs6.default)().hour(h).format("h A"))
|
|
3667
|
+
))), /* @__PURE__ */ import_react34.default.createElement(import_material22.Box, { flex: 1, position: "relative" }, hours.map((hourIdx) => {
|
|
3441
3668
|
const borderType = getCellBorderType(hourIdx, dayEvents);
|
|
3442
|
-
return /* @__PURE__ */
|
|
3443
|
-
|
|
3669
|
+
return /* @__PURE__ */ import_react34.default.createElement(
|
|
3670
|
+
import_material22.Box,
|
|
3444
3671
|
{
|
|
3445
3672
|
key: hourIdx,
|
|
3446
3673
|
height: 60,
|
|
@@ -3458,7 +3685,7 @@ var DayView = ({
|
|
|
3458
3685
|
const clampedEnd = eventEnd.isAfter(maxEnd) ? maxEnd : eventEnd;
|
|
3459
3686
|
const startMinutes = (clampedStart.hour() - startHour) * 60 + clampedStart.minute();
|
|
3460
3687
|
const durationMinutes = clampedEnd.diff(clampedStart, "minute");
|
|
3461
|
-
return /* @__PURE__ */
|
|
3688
|
+
return /* @__PURE__ */ import_react34.default.createElement(
|
|
3462
3689
|
CalendarEventCard,
|
|
3463
3690
|
{
|
|
3464
3691
|
key: `${event2.id}-${currentDate.toString()}`,
|
|
@@ -3494,8 +3721,8 @@ var Calendar = ({
|
|
|
3494
3721
|
// <- valor por defecto
|
|
3495
3722
|
endHour = 23
|
|
3496
3723
|
}) => {
|
|
3497
|
-
const [view, setView] = (0,
|
|
3498
|
-
const [currentDate, setCurrentDate] = (0,
|
|
3724
|
+
const [view, setView] = (0, import_react35.useState)(initialView);
|
|
3725
|
+
const [currentDate, setCurrentDate] = (0, import_react35.useState)((0, import_dayjs7.default)());
|
|
3499
3726
|
const handleViewChange = (newView) => {
|
|
3500
3727
|
setView(newView);
|
|
3501
3728
|
onViewChange == null ? void 0 : onViewChange(newView);
|
|
@@ -3514,7 +3741,7 @@ var Calendar = ({
|
|
|
3514
3741
|
} else if (action === "TODAY") newDate = (0, import_dayjs7.default)();
|
|
3515
3742
|
setCurrentDate(newDate);
|
|
3516
3743
|
};
|
|
3517
|
-
return /* @__PURE__ */
|
|
3744
|
+
return /* @__PURE__ */ import_react35.default.createElement(import_material23.Box, null, /* @__PURE__ */ import_react35.default.createElement(
|
|
3518
3745
|
CalendarToolbar,
|
|
3519
3746
|
{
|
|
3520
3747
|
labelDate: currentDate,
|
|
@@ -3523,16 +3750,16 @@ var Calendar = ({
|
|
|
3523
3750
|
onNavigate: handleNavigate
|
|
3524
3751
|
},
|
|
3525
3752
|
toolbar
|
|
3526
|
-
), isLoading ? /* @__PURE__ */
|
|
3527
|
-
|
|
3753
|
+
), isLoading ? /* @__PURE__ */ import_react35.default.createElement(import_react35.default.Fragment, null, /* @__PURE__ */ import_react35.default.createElement(import_material23.Box, null, /* @__PURE__ */ import_react35.default.createElement(
|
|
3754
|
+
import_material23.Box,
|
|
3528
3755
|
{
|
|
3529
3756
|
display: "flex",
|
|
3530
3757
|
justifyContent: "center",
|
|
3531
3758
|
alignItems: "center",
|
|
3532
3759
|
height: "400px"
|
|
3533
3760
|
},
|
|
3534
|
-
/* @__PURE__ */
|
|
3535
|
-
))) : /* @__PURE__ */
|
|
3761
|
+
/* @__PURE__ */ import_react35.default.createElement(import_material23.CircularProgress, { variant: "indeterminate" })
|
|
3762
|
+
))) : /* @__PURE__ */ import_react35.default.createElement(import_react35.default.Fragment, null, view === "month" && /* @__PURE__ */ import_react35.default.createElement(
|
|
3536
3763
|
MonthView,
|
|
3537
3764
|
{
|
|
3538
3765
|
events,
|
|
@@ -3542,7 +3769,7 @@ var Calendar = ({
|
|
|
3542
3769
|
onEventClick,
|
|
3543
3770
|
onEventHover
|
|
3544
3771
|
}
|
|
3545
|
-
), view === "week" && /* @__PURE__ */
|
|
3772
|
+
), view === "week" && /* @__PURE__ */ import_react35.default.createElement(
|
|
3546
3773
|
WeekView,
|
|
3547
3774
|
{
|
|
3548
3775
|
events,
|
|
@@ -3554,7 +3781,7 @@ var Calendar = ({
|
|
|
3554
3781
|
startHour,
|
|
3555
3782
|
endHour
|
|
3556
3783
|
}
|
|
3557
|
-
), view === "day" && /* @__PURE__ */
|
|
3784
|
+
), view === "day" && /* @__PURE__ */ import_react35.default.createElement(
|
|
3558
3785
|
DayView,
|
|
3559
3786
|
{
|
|
3560
3787
|
events,
|
|
@@ -3568,8 +3795,8 @@ var Calendar = ({
|
|
|
3568
3795
|
};
|
|
3569
3796
|
|
|
3570
3797
|
// src/Components/SCTime.tsx
|
|
3571
|
-
var
|
|
3572
|
-
var
|
|
3798
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
3799
|
+
var import_material24 = require("@mui/material");
|
|
3573
3800
|
var import_LocalizationProvider3 = require("@mui/x-date-pickers/LocalizationProvider");
|
|
3574
3801
|
var import_AdapterDayjs2 = require("@mui/x-date-pickers/AdapterDayjs");
|
|
3575
3802
|
var import_dayjs8 = __toESM(require("dayjs"), 1);
|
|
@@ -3592,9 +3819,9 @@ var SCTime = ({
|
|
|
3592
3819
|
);
|
|
3593
3820
|
const isTimeEmpty = required && !state;
|
|
3594
3821
|
const hasError = isTimeEmpty;
|
|
3595
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
3596
|
-
const [isOpenPopover, setIsOpenPopover] = (0,
|
|
3597
|
-
const [popoverPlacement, setPopoverPlacement] = (0,
|
|
3822
|
+
const [anchorEl, setAnchorEl] = (0, import_react36.useState)(null);
|
|
3823
|
+
const [isOpenPopover, setIsOpenPopover] = (0, import_react36.useState)(false);
|
|
3824
|
+
const [popoverPlacement, setPopoverPlacement] = (0, import_react36.useState)("bottom");
|
|
3598
3825
|
const detectPlacement = (element) => {
|
|
3599
3826
|
const rect = element.getBoundingClientRect();
|
|
3600
3827
|
const windowHeight = window.innerHeight;
|
|
@@ -3625,7 +3852,7 @@ var SCTime = ({
|
|
|
3625
3852
|
setIsOpenPopover(false);
|
|
3626
3853
|
setAnchorEl(null);
|
|
3627
3854
|
};
|
|
3628
|
-
return /* @__PURE__ */
|
|
3855
|
+
return /* @__PURE__ */ import_react36.default.createElement(import_LocalizationProvider3.LocalizationProvider, { dateAdapter: import_AdapterDayjs2.AdapterDayjs }, /* @__PURE__ */ import_react36.default.createElement(import_material24.Box, { sx: { position: "relative", width: "120px" } }, /* @__PURE__ */ import_react36.default.createElement(
|
|
3629
3856
|
import_TimeField.TimeField,
|
|
3630
3857
|
{
|
|
3631
3858
|
label,
|
|
@@ -3637,7 +3864,7 @@ var SCTime = ({
|
|
|
3637
3864
|
slotProps: {
|
|
3638
3865
|
textField: {
|
|
3639
3866
|
InputProps: {
|
|
3640
|
-
endAdornment: /* @__PURE__ */
|
|
3867
|
+
endAdornment: /* @__PURE__ */ import_react36.default.createElement(import_material24.InputAdornment, { position: "end" }, /* @__PURE__ */ import_react36.default.createElement(
|
|
3641
3868
|
import_AccessTime.default,
|
|
3642
3869
|
{
|
|
3643
3870
|
color: disabled ? "disabled" : "action",
|
|
@@ -3666,8 +3893,8 @@ var SCTime = ({
|
|
|
3666
3893
|
}
|
|
3667
3894
|
}
|
|
3668
3895
|
}
|
|
3669
|
-
), /* @__PURE__ */
|
|
3670
|
-
|
|
3896
|
+
), /* @__PURE__ */ import_react36.default.createElement(
|
|
3897
|
+
import_material24.Popover,
|
|
3671
3898
|
{
|
|
3672
3899
|
open: isOpenPopover,
|
|
3673
3900
|
anchorEl,
|
|
@@ -3694,7 +3921,7 @@ var SCTime = ({
|
|
|
3694
3921
|
}
|
|
3695
3922
|
}
|
|
3696
3923
|
},
|
|
3697
|
-
/* @__PURE__ */
|
|
3924
|
+
/* @__PURE__ */ import_react36.default.createElement(import_material24.ClickAwayListener, { onClickAway: handleClose }, /* @__PURE__ */ import_react36.default.createElement(import_material24.Box, { sx: { p: 0 } }, /* @__PURE__ */ import_react36.default.createElement(
|
|
3698
3925
|
import_DigitalClock.DigitalClock,
|
|
3699
3926
|
{
|
|
3700
3927
|
value: state,
|
|
@@ -3716,8 +3943,8 @@ var SCTime = ({
|
|
|
3716
3943
|
};
|
|
3717
3944
|
|
|
3718
3945
|
// src/Components/SCCard.tsx
|
|
3719
|
-
var
|
|
3720
|
-
var
|
|
3946
|
+
var import_react37 = __toESM(require("react"), 1);
|
|
3947
|
+
var import_material25 = require("@mui/material");
|
|
3721
3948
|
var import_IconButton = __toESM(require("@mui/material/IconButton"), 1);
|
|
3722
3949
|
var import_Card = __toESM(require("@mui/material/Card"), 1);
|
|
3723
3950
|
var import_CardHeader = __toESM(require("@mui/material/CardHeader"), 1);
|
|
@@ -3730,10 +3957,10 @@ var Muicon8 = __toESM(require("@mui/icons-material"), 1);
|
|
|
3730
3957
|
var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
|
|
3731
3958
|
let iconTitleValidation = "";
|
|
3732
3959
|
let IconTitle;
|
|
3733
|
-
const [expanded, setExpanded] =
|
|
3960
|
+
const [expanded, setExpanded] = import_react37.default.useState(false);
|
|
3734
3961
|
if (iconTitle) {
|
|
3735
3962
|
if (Muicon8[iconTitle] == void 0) {
|
|
3736
|
-
if (iconTitle &&
|
|
3963
|
+
if (iconTitle && import_react37.default.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
3737
3964
|
iconTitleValidation = "image";
|
|
3738
3965
|
IconTitle = iconTitle;
|
|
3739
3966
|
} else {
|
|
@@ -3748,11 +3975,11 @@ var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, action
|
|
|
3748
3975
|
const handleExpandClick = () => {
|
|
3749
3976
|
setExpanded(!expanded);
|
|
3750
3977
|
};
|
|
3751
|
-
return /* @__PURE__ */
|
|
3978
|
+
return /* @__PURE__ */ import_react37.default.createElement(import_Card.default, { sx: { maxWidth: 345 } }, title && /* @__PURE__ */ import_react37.default.createElement(
|
|
3752
3979
|
import_CardHeader.default,
|
|
3753
3980
|
{
|
|
3754
|
-
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */
|
|
3755
|
-
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */
|
|
3981
|
+
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ import_react37.default.createElement(import_material25.Box, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ import_react37.default.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ import_react37.default.createElement(import_material25.SvgIcon, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
|
|
3982
|
+
action: (expand == null ? void 0 : expand.position) == "top" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ import_react37.default.createElement(import_material25.Button, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ import_react37.default.createElement(import_IconButton.default, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ import_react37.default.createElement(import_ExpandMore.default, { fontSize: "small" })) : actionsTitle,
|
|
3756
3983
|
title,
|
|
3757
3984
|
subheader: subtitle,
|
|
3758
3985
|
sx: {
|
|
@@ -3771,15 +3998,15 @@ var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, action
|
|
|
3771
3998
|
}
|
|
3772
3999
|
}
|
|
3773
4000
|
}
|
|
3774
|
-
), image && /* @__PURE__ */
|
|
4001
|
+
), image && /* @__PURE__ */ import_react37.default.createElement(
|
|
3775
4002
|
import_CardMedia.default,
|
|
3776
4003
|
{
|
|
3777
4004
|
component: "img",
|
|
3778
4005
|
height: "194",
|
|
3779
4006
|
image
|
|
3780
4007
|
}
|
|
3781
|
-
), content && /* @__PURE__ */
|
|
3782
|
-
|
|
4008
|
+
), content && /* @__PURE__ */ import_react37.default.createElement(import_CardContent.default, { sx: { padding: "8px 16px !important" } }, content), ((expand == null ? void 0 : expand.position) == "bottom" || actions != void 0) && /* @__PURE__ */ import_react37.default.createElement(import_CardActions.default, { disableSpacing: true, sx: { justifyContent: "flex-end" } }, (expand == null ? void 0 : expand.position) === "bottom" ? (expand == null ? void 0 : expand.type) === "text" ? /* @__PURE__ */ import_react37.default.createElement(import_material25.Button, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, "Expandir") : (expand == null ? void 0 : expand.type) === "icon" && /* @__PURE__ */ import_react37.default.createElement(import_IconButton.default, { onClick: handleExpandClick, sx: { marginRight: "auto" } }, /* @__PURE__ */ import_react37.default.createElement(import_ExpandMore.default, null)) : null, actions && actions.length > 0 ? actions.map((action, index) => /* @__PURE__ */ import_react37.default.createElement(
|
|
4009
|
+
import_material25.Button,
|
|
3783
4010
|
{
|
|
3784
4011
|
key: index,
|
|
3785
4012
|
size: "small",
|
|
@@ -3789,15 +4016,15 @@ var SCCard = ({ title, image, iconTitle, actionsTitle, subtitle, content, action
|
|
|
3789
4016
|
disabled: action.disabled || false
|
|
3790
4017
|
},
|
|
3791
4018
|
action.text
|
|
3792
|
-
)) : ""), expand && /* @__PURE__ */
|
|
4019
|
+
)) : ""), expand && /* @__PURE__ */ import_react37.default.createElement(import_Collapse.default, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ import_react37.default.createElement(import_CardContent.default, { sx: { padding: "8px 16px !important" } }, expand.content)));
|
|
3793
4020
|
};
|
|
3794
4021
|
|
|
3795
4022
|
// src/Theme/index.ts
|
|
3796
4023
|
var import_styles3 = require("@mui/material/styles");
|
|
3797
4024
|
|
|
3798
4025
|
// src/Theme/components.ts
|
|
3799
|
-
var
|
|
3800
|
-
var
|
|
4026
|
+
var import_react38 = __toESM(require("react"), 1);
|
|
4027
|
+
var import_icons_material12 = require("@mui/icons-material");
|
|
3801
4028
|
var components = {
|
|
3802
4029
|
MuiSelect: {
|
|
3803
4030
|
styleOverrides: {
|
|
@@ -4494,10 +4721,10 @@ var components = {
|
|
|
4494
4721
|
MuiAlert: {
|
|
4495
4722
|
defaultProps: {
|
|
4496
4723
|
iconMapping: {
|
|
4497
|
-
success:
|
|
4498
|
-
error:
|
|
4499
|
-
warning:
|
|
4500
|
-
info:
|
|
4724
|
+
success: import_react38.default.createElement(import_icons_material12.CheckCircleRounded),
|
|
4725
|
+
error: import_react38.default.createElement(import_icons_material12.ErrorRounded),
|
|
4726
|
+
warning: import_react38.default.createElement(import_icons_material12.WarningRounded),
|
|
4727
|
+
info: import_react38.default.createElement(import_icons_material12.InfoRounded)
|
|
4501
4728
|
}
|
|
4502
4729
|
},
|
|
4503
4730
|
variants: [
|
|
@@ -5538,6 +5765,7 @@ var ADCSincoTheme = (0, import_styles3.createTheme)(__spreadValues({}, ADCTheme)
|
|
|
5538
5765
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5539
5766
|
0 && (module.exports = {
|
|
5540
5767
|
ADCSincoTheme,
|
|
5768
|
+
Adjuntar,
|
|
5541
5769
|
AdproSincoTheme,
|
|
5542
5770
|
Calendar,
|
|
5543
5771
|
EmptyState,
|