componentes-sinco 1.1.9 → 1.1.11
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 +173 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +191 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -98,6 +98,7 @@ __export(index_exports, {
|
|
|
98
98
|
SCCard: () => SCCard,
|
|
99
99
|
SCDataGrid: () => SCDataGrid,
|
|
100
100
|
SCDataGridInitial: () => SCDataGridInitial,
|
|
101
|
+
SCDatePicker: () => SCDatePicker,
|
|
101
102
|
SCDateRange: () => SCDateRange,
|
|
102
103
|
SCDialog: () => SCDialog,
|
|
103
104
|
SCDrawer: () => SCDrawer,
|
|
@@ -2305,7 +2306,7 @@ var DrawerActions = ({ actions, anchor }) => {
|
|
|
2305
2306
|
sx: { borderTop: 1, borderColor: "#1018403B", zIndex: 1500 },
|
|
2306
2307
|
container: true,
|
|
2307
2308
|
gap: 2,
|
|
2308
|
-
padding: "8px
|
|
2309
|
+
padding: "8px 16px",
|
|
2309
2310
|
height: "42px",
|
|
2310
2311
|
alignItems: "center",
|
|
2311
2312
|
flexWrap: "nowrap",
|
|
@@ -2466,6 +2467,11 @@ function SCDrawer({
|
|
|
2466
2467
|
onOpen: toggleDrawer(true),
|
|
2467
2468
|
anchor: "bottom",
|
|
2468
2469
|
swipeAreaWidth: drawerBleeding,
|
|
2470
|
+
transitionDuration: { enter: 500, exit: 400 },
|
|
2471
|
+
ModalProps: {
|
|
2472
|
+
BackdropProps: { timeout: 400 }
|
|
2473
|
+
},
|
|
2474
|
+
hysteresis: 0.2,
|
|
2469
2475
|
sx: {
|
|
2470
2476
|
zIndex: 1400,
|
|
2471
2477
|
"& .MuiDrawer-paper": {
|
|
@@ -2474,6 +2480,11 @@ function SCDrawer({
|
|
|
2474
2480
|
boxSizing: "border-box",
|
|
2475
2481
|
borderRadius: "4px 4px 0px 0px"
|
|
2476
2482
|
}
|
|
2483
|
+
},
|
|
2484
|
+
slotProps: {
|
|
2485
|
+
backdrop: {
|
|
2486
|
+
sx: { backgroundColor: "#00000038" }
|
|
2487
|
+
}
|
|
2477
2488
|
}
|
|
2478
2489
|
},
|
|
2479
2490
|
/* @__PURE__ */ import_react20.default.createElement(
|
|
@@ -2498,7 +2509,33 @@ function SCDrawer({
|
|
|
2498
2509
|
onClose: handleDrawerClose,
|
|
2499
2510
|
anchor
|
|
2500
2511
|
}
|
|
2501
|
-
), /* @__PURE__ */ import_react20.default.createElement(DrawerContent, { arrayElements }), /* @__PURE__ */ import_react20.default.createElement(
|
|
2512
|
+
), /* @__PURE__ */ import_react20.default.createElement(DrawerContent, { arrayElements }), /* @__PURE__ */ import_react20.default.createElement(
|
|
2513
|
+
import_Grid4.default,
|
|
2514
|
+
{
|
|
2515
|
+
sx: { zIndex: 1500 },
|
|
2516
|
+
container: true,
|
|
2517
|
+
gap: 2,
|
|
2518
|
+
padding: "8px 16px 40px 16px",
|
|
2519
|
+
height: "86px",
|
|
2520
|
+
alignItems: "center",
|
|
2521
|
+
flexWrap: "nowrap",
|
|
2522
|
+
justifyContent: Array.isArray(drawerActions) && drawerActions.length > 1 ? "space-between" : "flex-end",
|
|
2523
|
+
flexDirection: "row-reverse"
|
|
2524
|
+
},
|
|
2525
|
+
Array.isArray(drawerActions) && drawerActions.map((btn, index) => /* @__PURE__ */ import_react20.default.createElement(
|
|
2526
|
+
import_material14.Button,
|
|
2527
|
+
{
|
|
2528
|
+
key: index,
|
|
2529
|
+
variant: index === 0 || drawerActions.length < 2 ? "contained" : "text",
|
|
2530
|
+
color: "primary",
|
|
2531
|
+
onClick: btn.fn,
|
|
2532
|
+
disabled: btn.disabled || false,
|
|
2533
|
+
size: "small",
|
|
2534
|
+
fullWidth: anchor === "bottom" ? true : false
|
|
2535
|
+
},
|
|
2536
|
+
btn.text
|
|
2537
|
+
))
|
|
2538
|
+
))
|
|
2502
2539
|
));
|
|
2503
2540
|
}
|
|
2504
2541
|
|
|
@@ -2613,7 +2650,7 @@ function MultiSelect({
|
|
|
2613
2650
|
selectAll = false,
|
|
2614
2651
|
getItemLabel
|
|
2615
2652
|
}) {
|
|
2616
|
-
var _a, _b;
|
|
2653
|
+
var _a, _b, _c;
|
|
2617
2654
|
const {
|
|
2618
2655
|
anchorEl,
|
|
2619
2656
|
open: openMultiselect,
|
|
@@ -2660,7 +2697,7 @@ function MultiSelect({
|
|
|
2660
2697
|
startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */ import_react24.default.createElement(Icon, null) : null,
|
|
2661
2698
|
endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */ import_react24.default.createElement(Icon, null) : null
|
|
2662
2699
|
},
|
|
2663
|
-
capitalize(
|
|
2700
|
+
capitalize((_c = button == null ? void 0 : button.text) != null ? _c : "")
|
|
2664
2701
|
), /* @__PURE__ */ import_react24.default.createElement(
|
|
2665
2702
|
import_material16.Popover,
|
|
2666
2703
|
{
|
|
@@ -2796,7 +2833,7 @@ var SCCalendarSwipeable = ({
|
|
|
2796
2833
|
// 0 = domingo, 1 = lunes
|
|
2797
2834
|
})
|
|
2798
2835
|
});
|
|
2799
|
-
return /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, null, /* @__PURE__ */ import_react26.default.createElement(import_LocalizationProvider2.LocalizationProvider, { dateAdapter: import_AdapterDateFns.AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ import_react26.default.createElement(import_material18.Box, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ import_react26.default.createElement(import_material18.Box, { sx: { width: "100%",
|
|
2836
|
+
return /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, null, /* @__PURE__ */ import_react26.default.createElement(import_LocalizationProvider2.LocalizationProvider, { dateAdapter: import_AdapterDateFns.AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ import_react26.default.createElement(import_material18.Box, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ import_react26.default.createElement(import_material18.Box, { sx: { width: "100%", padding: "0px 16px", background: "transparent" } }, /* @__PURE__ */ import_react26.default.createElement(import_Grid5.default, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ import_react26.default.createElement(import_Grid5.default, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ import_react26.default.createElement(import_material18.Box, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ import_react26.default.createElement(import_material18.Typography, { sx: { fontSize: "12px !important", color: "#10184099" } }, (0, import_date_fns.format)(dia, "EEEE", { locale: import_locale.es }).charAt(0).toUpperCase())), /* @__PURE__ */ import_react26.default.createElement(
|
|
2800
2837
|
import_material18.Box,
|
|
2801
2838
|
{
|
|
2802
2839
|
onClick: () => setFecha(dia),
|
|
@@ -2820,7 +2857,22 @@ var SCCalendarSwipeable = ({
|
|
|
2820
2857
|
openTo: "day",
|
|
2821
2858
|
value: fecha,
|
|
2822
2859
|
slotProps: { toolbar: { hidden: true }, actionBar: { actions: [] } },
|
|
2823
|
-
sx: {
|
|
2860
|
+
sx: {
|
|
2861
|
+
"& .MuiDateCalendar-root": {
|
|
2862
|
+
width: "100%",
|
|
2863
|
+
maxWidth: "unset",
|
|
2864
|
+
margin: 0,
|
|
2865
|
+
padding: "0px 16px"
|
|
2866
|
+
},
|
|
2867
|
+
fontSize: "12px !important",
|
|
2868
|
+
height: "260px !important",
|
|
2869
|
+
background: background ? background : "white",
|
|
2870
|
+
"& .MuiDayCalendar-header": { justifyContent: "space-between" },
|
|
2871
|
+
"& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" },
|
|
2872
|
+
"& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" },
|
|
2873
|
+
"& .MuiPickersDay-root": { fontSize: "12px !important" },
|
|
2874
|
+
"& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" }
|
|
2875
|
+
},
|
|
2824
2876
|
onChange: (newValue) => setFecha(newValue)
|
|
2825
2877
|
}
|
|
2826
2878
|
), /* @__PURE__ */ import_react26.default.createElement(import_Grid5.default, { container: true, justifyContent: "center" }, /* @__PURE__ */ import_react26.default.createElement(import_material18.IconButton, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ import_react26.default.createElement(import_KeyboardDoubleArrowUp.default, null))))));
|
|
@@ -2833,7 +2885,7 @@ var import_x_license2 = require("@mui/x-license");
|
|
|
2833
2885
|
var import_KeyboardArrowDown = __toESM(require("@mui/icons-material/KeyboardArrowDown"), 1);
|
|
2834
2886
|
var import_KeyboardArrowUp = __toESM(require("@mui/icons-material/KeyboardArrowUp"), 1);
|
|
2835
2887
|
var import_styles = require("@mui/material/styles");
|
|
2836
|
-
function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }) {
|
|
2888
|
+
function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }) {
|
|
2837
2889
|
import_x_license2.LicenseInfo.setLicenseKey(
|
|
2838
2890
|
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
2839
2891
|
);
|
|
@@ -3065,6 +3117,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
3065
3117
|
return /* @__PURE__ */ import_react27.default.createElement(import_react27.default.Fragment, null, data && /* @__PURE__ */ import_react27.default.createElement(import_react27.default.Fragment, null, /* @__PURE__ */ import_react27.default.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ import_react27.default.createElement(
|
|
3066
3118
|
import_x_data_grid_pro.DataGridPro,
|
|
3067
3119
|
{
|
|
3120
|
+
getRowId,
|
|
3068
3121
|
apiRef,
|
|
3069
3122
|
rowHeight: styleRowHeight,
|
|
3070
3123
|
rows: arrayRows,
|
|
@@ -3392,7 +3445,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
3392
3445
|
}
|
|
3393
3446
|
}
|
|
3394
3447
|
},
|
|
3395
|
-
title && /* @__PURE__ */ import_react33.default.createElement(import_material20.DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ import_react33.default.createElement(import_Grid6.default, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, /* @__PURE__ */ import_react33.default.createElement(import_Grid6.default, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ import_react33.default.createElement(import_material20.Box, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ import_react33.default.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ import_react33.default.createElement(import_material20.SvgIcon, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ import_react33.default.createElement(import_Grid6.default, { sx: { width: "98%" } }, /* @__PURE__ */ import_react33.default.createElement(import_material20.Typography, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), subtitle ? subtitle : "")), disableClose != true ? /* @__PURE__ */ import_react33.default.createElement(import_material20.IconButton, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ import_react33.default.createElement(import_Close2.default, { color: "action" })) : "")),
|
|
3448
|
+
title && /* @__PURE__ */ import_react33.default.createElement(import_material20.DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ import_react33.default.createElement(import_Grid6.default, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, typeView == "web" ? /* @__PURE__ */ import_react33.default.createElement(import_Grid6.default, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ import_react33.default.createElement(import_material20.Box, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ import_react33.default.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ import_react33.default.createElement(import_material20.SvgIcon, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ import_react33.default.createElement(import_Grid6.default, { sx: { width: "98%" } }, /* @__PURE__ */ import_react33.default.createElement(import_material20.Typography, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), subtitle ? subtitle : "")) : /* @__PURE__ */ import_react33.default.createElement(import_Grid6.default, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }), disableClose != true ? /* @__PURE__ */ import_react33.default.createElement(import_material20.IconButton, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ import_react33.default.createElement(import_Close2.default, { color: "action" })) : ""), typeView == "mobile" ? /* @__PURE__ */ import_react33.default.createElement(import_Grid6.default, { sx: { display: "flex", flexDirection: "column", padding: "12px 0px 4px 0px" }, gap: 1.5 }, /* @__PURE__ */ import_react33.default.createElement(import_material20.Typography, { color: "text.primary", variant: "h5" }, title ? title : ""), subtitle ? subtitle : "") : ""),
|
|
3396
3449
|
/* @__PURE__ */ import_react33.default.createElement(
|
|
3397
3450
|
import_material20.DialogContent,
|
|
3398
3451
|
{
|
|
@@ -3473,7 +3526,7 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
3473
3526
|
);
|
|
3474
3527
|
})) : /* @__PURE__ */ import_react33.default.createElement(import_material20.Box, { sx: { width: "100%", display: "flex", flexDirection: "row", justifyContent: "center" } }, /* @__PURE__ */ import_react33.default.createElement(import_ToggleButtonGroup.default, { size: "large", fullWidth: true }, dialogActions.map((boton, index) => {
|
|
3475
3528
|
var _a;
|
|
3476
|
-
return /* @__PURE__ */ import_react33.default.createElement(import_ToggleButton.default, { fullWidth: boton.text ? true : false, size: "medium", value: "text", onClick: boton.fn }, (_a = boton.text) != null ? _a : /* @__PURE__ */ import_react33.default.createElement(import_material20.SvgIcon, { fontSize: "small", component: boton.icon }));
|
|
3529
|
+
return /* @__PURE__ */ import_react33.default.createElement(import_ToggleButton.default, { disabled: boton.disabled || false, fullWidth: boton.text ? true : false, size: "medium", value: "text", onClick: boton.fn }, (_a = boton.text) != null ? _a : /* @__PURE__ */ import_react33.default.createElement(import_material20.SvgIcon, { fontSize: "small", component: boton.icon }));
|
|
3477
3530
|
})))) : "" : ""
|
|
3478
3531
|
)));
|
|
3479
3532
|
};
|
|
@@ -3505,14 +3558,14 @@ var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" })
|
|
|
3505
3558
|
}
|
|
3506
3559
|
}
|
|
3507
3560
|
});
|
|
3508
|
-
return /* @__PURE__ */ import_react34.default.createElement(import_react34.default.Fragment, null, /* @__PURE__ */ import_react34.default.createElement(import_material21.List, { sx: { width: "100%",
|
|
3561
|
+
return /* @__PURE__ */ import_react34.default.createElement(import_react34.default.Fragment, null, /* @__PURE__ */ import_react34.default.createElement(import_material21.List, { sx: { width: "100%", bgcolor: "background.paper", padding: "0px !important" } }, options.map((option, index) => {
|
|
3509
3562
|
var _a, _b;
|
|
3510
3563
|
return /* @__PURE__ */ import_react34.default.createElement(import_react34.default.Fragment, { key: index }, /* @__PURE__ */ import_react34.default.createElement(
|
|
3511
3564
|
import_material21.ListItemButton,
|
|
3512
3565
|
{
|
|
3513
3566
|
disabled: option.disable,
|
|
3514
3567
|
onClick: option.fn,
|
|
3515
|
-
sx: { gap: 1 }
|
|
3568
|
+
sx: { gap: 1, padding: iconLeftType == "Icon" ? "8px 8px" : "8px 8px 8px 0px" }
|
|
3516
3569
|
},
|
|
3517
3570
|
option.iconLeft ? iconLeftType == "Icon" ? /* @__PURE__ */ import_react34.default.createElement(import_material21.ListItemIcon, { sx: { minWidth: "0px !important" } }, /* @__PURE__ */ import_react34.default.createElement(import_material21.SvgIcon, { fontSize: "small", sx: { color: option.iconLeftColor || "action" }, component: option.iconLeft })) : /* @__PURE__ */ import_react34.default.createElement(import_Avatar.default, { sx: { width: 25, height: 25, fontSize: "11px", bgcolor: option.iconLeftColor ? `${option.iconLeftColor}.main` : "default" } }, ((_a = option.iconLeft) == null ? void 0 : _a.type) != void 0 ? /* @__PURE__ */ import_react34.default.createElement(import_material21.SvgIcon, { fontSize: "small", component: option.iconLeft }) : option.iconLeft) : "",
|
|
3518
3571
|
/* @__PURE__ */ import_react34.default.createElement(
|
|
@@ -4863,7 +4916,7 @@ var SCActivityCalendar = ({
|
|
|
4863
4916
|
// 0 = domingo, 1 = lunes
|
|
4864
4917
|
})
|
|
4865
4918
|
});
|
|
4866
|
-
return /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement(import_LocalizationProvider4.LocalizationProvider, { dateAdapter: import_AdapterDateFns2.AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ import_react50.default.createElement(import_material34.Box, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ import_react50.default.createElement(import_material34.Box, { sx: { width: "100%",
|
|
4919
|
+
return /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement(import_LocalizationProvider4.LocalizationProvider, { dateAdapter: import_AdapterDateFns2.AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ import_react50.default.createElement(import_material34.Box, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ import_react50.default.createElement(import_material34.Box, { sx: { width: "100%", padding: "0px 16px", background: "transparent" } }, /* @__PURE__ */ import_react50.default.createElement(import_Grid9.default, { container: true, gap: 0.5, sx: { justifyContent: "space-between", padding: "12px 0px", background: "transparent" } }, diasSemana.map((dia) => /* @__PURE__ */ import_react50.default.createElement(import_Grid9.default, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ import_react50.default.createElement(import_material34.Box, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ import_react50.default.createElement(import_material34.Typography, { sx: { fontSize: "12px !important", color: "#10184099" } }, (0, import_date_fns2.format)(dia, "EEEE", { locale: import_locale2.es }).charAt(0).toUpperCase())), /* @__PURE__ */ import_react50.default.createElement(
|
|
4867
4920
|
import_material34.Box,
|
|
4868
4921
|
{
|
|
4869
4922
|
onClick: () => setFecha(dia),
|
|
@@ -4884,10 +4937,25 @@ var SCActivityCalendar = ({
|
|
|
4884
4937
|
openTo: "day",
|
|
4885
4938
|
value: fecha,
|
|
4886
4939
|
slotProps: { toolbar: { hidden: true }, actionBar: { actions: [] } },
|
|
4887
|
-
sx: {
|
|
4940
|
+
sx: {
|
|
4941
|
+
"& .MuiDateCalendar-root": {
|
|
4942
|
+
width: "100%",
|
|
4943
|
+
maxWidth: "unset",
|
|
4944
|
+
margin: 0,
|
|
4945
|
+
padding: "0px 16px"
|
|
4946
|
+
},
|
|
4947
|
+
fontSize: "12px !important",
|
|
4948
|
+
height: "260px !important",
|
|
4949
|
+
background: background ? background : "white",
|
|
4950
|
+
"& .MuiDayCalendar-header": { justifyContent: "space-between" },
|
|
4951
|
+
"& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" },
|
|
4952
|
+
"& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" },
|
|
4953
|
+
"& .MuiPickersDay-root": { fontSize: "12px !important" },
|
|
4954
|
+
"& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" }
|
|
4955
|
+
},
|
|
4888
4956
|
onChange: (newValue) => setFecha(newValue)
|
|
4889
4957
|
}
|
|
4890
|
-
), /* @__PURE__ */ import_react50.default.createElement(import_Grid9.default, { container: true, justifyContent: "center" }, /* @__PURE__ */ import_react50.default.createElement(import_material34.IconButton, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ import_react50.default.createElement(import_KeyboardDoubleArrowUp2.default, { color: "action" }))))), /* @__PURE__ */ import_react50.default.createElement(import_material34.Box, { sx: { boxSizing: "border-box", padding: "0px 16px", width: "100%", height: openCalendar ? "calc(91% -
|
|
4958
|
+
), /* @__PURE__ */ import_react50.default.createElement(import_Grid9.default, { container: true, justifyContent: "center" }, /* @__PURE__ */ import_react50.default.createElement(import_material34.IconButton, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ import_react50.default.createElement(import_KeyboardDoubleArrowUp2.default, { color: "action" }))))), /* @__PURE__ */ import_react50.default.createElement(import_material34.Box, { sx: { boxSizing: "border-box", padding: "0px 16px", width: "100%", height: openCalendar ? "calc(91% - 260px)" : "calc(91% - 100px)", background: "white", display: "flex", flexDirection: "column", overflowY: "auto", gap: "8px", scrollSnapType: "x mandatory", paddingBottom: "10px" } }, diasSemana.map((day, dayIndex) => /* @__PURE__ */ import_react50.default.createElement(
|
|
4891
4959
|
import_material34.Box,
|
|
4892
4960
|
{
|
|
4893
4961
|
key: dayIndex
|
|
@@ -4998,6 +5066,7 @@ var import_system = require("@mui/system");
|
|
|
4998
5066
|
var import_icons_material13 = require("@mui/icons-material");
|
|
4999
5067
|
var import_PhotoCamera = __toESM(require("@mui/icons-material/PhotoCamera"), 1);
|
|
5000
5068
|
var import_CancelOutlined = __toESM(require("@mui/icons-material/CancelOutlined"), 1);
|
|
5069
|
+
var import_ImageOutlined = __toESM(require("@mui/icons-material/ImageOutlined"), 1);
|
|
5001
5070
|
var AttachmentMobile = ({
|
|
5002
5071
|
buttonAttachment,
|
|
5003
5072
|
maxSize = 400,
|
|
@@ -5163,7 +5232,7 @@ var AttachmentMobile = ({
|
|
|
5163
5232
|
}
|
|
5164
5233
|
});
|
|
5165
5234
|
const AttachtmentActions = [
|
|
5166
|
-
{ icon: /* @__PURE__ */ import_react52.default.createElement(
|
|
5235
|
+
{ icon: /* @__PURE__ */ import_react52.default.createElement(import_ImageOutlined.default, { type: "file", color: "primary" }), color: "primary", label: "Galer\xEDa", onClick: () => {
|
|
5167
5236
|
var _a;
|
|
5168
5237
|
return (_a = inputRef.current) == null ? void 0 : _a.click();
|
|
5169
5238
|
} },
|
|
@@ -5188,14 +5257,22 @@ var AttachmentMobile = ({
|
|
|
5188
5257
|
)), /* @__PURE__ */ import_react52.default.createElement(import_CssBaseline.default, null), /* @__PURE__ */ import_react52.default.createElement(
|
|
5189
5258
|
import_material36.SwipeableDrawer,
|
|
5190
5259
|
{
|
|
5260
|
+
slotProps: {
|
|
5261
|
+
backdrop: {
|
|
5262
|
+
sx: { backgroundColor: "#00000038" }
|
|
5263
|
+
}
|
|
5264
|
+
},
|
|
5191
5265
|
ModalProps: {
|
|
5192
5266
|
sx: {
|
|
5193
5267
|
zIndex: 1400,
|
|
5194
5268
|
"& .MuiPaper-root": {
|
|
5195
5269
|
borderRadius: "16px 16px 0 0"
|
|
5196
5270
|
}
|
|
5197
|
-
}
|
|
5271
|
+
},
|
|
5272
|
+
BackdropProps: { timeout: 400 }
|
|
5198
5273
|
},
|
|
5274
|
+
transitionDuration: { enter: 500, exit: 400 },
|
|
5275
|
+
hysteresis: 0.2,
|
|
5199
5276
|
anchor: "bottom",
|
|
5200
5277
|
swipeAreaWidth: 56,
|
|
5201
5278
|
open,
|
|
@@ -5203,7 +5280,7 @@ var AttachmentMobile = ({
|
|
|
5203
5280
|
onOpen: toggleAttachment(true)
|
|
5204
5281
|
},
|
|
5205
5282
|
toast && /* @__PURE__ */ import_react52.default.createElement(SCToastNotification, __spreadValues({}, toast)),
|
|
5206
|
-
/* @__PURE__ */ import_react52.default.createElement(import_system.Box, { display: "flex", flexDirection: "column", alignItems: "center", p: 2, gap: 2 }, /* @__PURE__ */ import_react52.default.createElement(import_system.Box, { display: "flex", width: "100%", justifyContent: "space-between", alignItems: "center", gap: 1, p: 1 }, /* @__PURE__ */ import_react52.default.createElement(import_material36.Typography, { variant: "h6", color: "text.primary" }, "
|
|
5283
|
+
/* @__PURE__ */ import_react52.default.createElement(import_system.Box, { display: "flex", flexDirection: "column", alignItems: "center", p: 2, gap: 2 }, /* @__PURE__ */ import_react52.default.createElement(import_system.Box, { display: "flex", width: "100%", justifyContent: "space-between", alignItems: "center", gap: 1, p: 1 }, /* @__PURE__ */ import_react52.default.createElement(import_material36.Typography, { variant: "h6", color: "text.primary" }, "Agrega adjuntos"), /* @__PURE__ */ import_react52.default.createElement(import_material36.IconButton, { size: "medium", onClick: toggleAttachment(false) }, /* @__PURE__ */ import_react52.default.createElement(import_icons_material13.CloseOutlined, { color: "action" }))), /* @__PURE__ */ import_react52.default.createElement(
|
|
5207
5284
|
"input",
|
|
5208
5285
|
{
|
|
5209
5286
|
type: "file",
|
|
@@ -5212,22 +5289,21 @@ var AttachmentMobile = ({
|
|
|
5212
5289
|
ref: inputRef,
|
|
5213
5290
|
onChange: handleUpload
|
|
5214
5291
|
}
|
|
5215
|
-
), /* @__PURE__ */ import_react52.default.createElement(import_system.Box, { display: "flex", justifyContent: "space-around", alignItems: "center", width: "100%", gap: 2 }, AttachtmentActions.map((option, index) => /* @__PURE__ */ import_react52.default.createElement(
|
|
5292
|
+
), /* @__PURE__ */ import_react52.default.createElement(import_system.Box, { display: "flex", justifyContent: "space-around", alignItems: "center", width: "100%", gap: 2, sx: { padding: "0px 0px 52px 0px !important" } }, AttachtmentActions.map((option, index) => /* @__PURE__ */ import_react52.default.createElement(
|
|
5216
5293
|
import_system.Box,
|
|
5217
5294
|
{
|
|
5218
5295
|
display: "flex",
|
|
5219
5296
|
flexDirection: "column",
|
|
5220
5297
|
alignItems: "center",
|
|
5221
|
-
width: 100,
|
|
5298
|
+
width: "100%",
|
|
5222
5299
|
height: 80,
|
|
5223
5300
|
borderRadius: 1,
|
|
5224
|
-
bgcolor: "grey.
|
|
5301
|
+
bgcolor: "grey.50",
|
|
5225
5302
|
border: "1px solid",
|
|
5226
|
-
borderColor: "grey.
|
|
5227
|
-
boxShadow: 1,
|
|
5303
|
+
borderColor: "grey.100",
|
|
5228
5304
|
justifyContent: "center",
|
|
5229
5305
|
p: 1,
|
|
5230
|
-
gap:
|
|
5306
|
+
gap: 0.5,
|
|
5231
5307
|
onClick: option.onClick,
|
|
5232
5308
|
sx: {
|
|
5233
5309
|
cursor: "pointer"
|
|
@@ -5243,7 +5319,7 @@ var AttachmentMobile = ({
|
|
|
5243
5319
|
},
|
|
5244
5320
|
option.icon
|
|
5245
5321
|
),
|
|
5246
|
-
/* @__PURE__ */ import_react52.default.createElement(import_material36.Typography, { variant: "body2", color: "text.
|
|
5322
|
+
/* @__PURE__ */ import_react52.default.createElement(import_material36.Typography, { variant: "body2", color: "text.secondary" }, option.label)
|
|
5247
5323
|
))))
|
|
5248
5324
|
), abrirCamara && /* @__PURE__ */ import_react52.default.createElement(import_react52.default.Fragment, null, /* @__PURE__ */ import_react52.default.createElement(import_CancelOutlined.default, { onClick: closeCam, sx: { borderRadius: "50px", height: "35px", width: "35px", zIndex: 1700, background: "white", position: "absolute", left: `calc(100% - 50px)`, bottom: `calc(100% - 50px)` } }), /* @__PURE__ */ import_react52.default.createElement(import_material36.Stack, { className: "camras" }, /* @__PURE__ */ import_react52.default.createElement(
|
|
5249
5325
|
import_react_webcam.default,
|
|
@@ -5475,11 +5551,77 @@ var SCAppBar = ({
|
|
|
5475
5551
|
)))), /* @__PURE__ */ import_react54.default.createElement(import_material37.Box, { sx: { padding: "8px 16px 0px 16px" } }, contenidoExtra)));
|
|
5476
5552
|
};
|
|
5477
5553
|
|
|
5554
|
+
// src/Components/SCDatePicker.tsx
|
|
5555
|
+
var import_react55 = __toESM(require("react"), 1);
|
|
5556
|
+
var import_DatePicker = require("@mui/x-date-pickers/DatePicker");
|
|
5557
|
+
var import_es6 = require("dayjs/locale/es");
|
|
5558
|
+
var import_dayjs11 = __toESM(require("dayjs"), 1);
|
|
5559
|
+
var import_es7 = require("dayjs/locale/es");
|
|
5560
|
+
var import_LocalizationProvider5 = require("@mui/x-date-pickers/LocalizationProvider");
|
|
5561
|
+
var import_AdapterDayjs3 = require("@mui/x-date-pickers/AdapterDayjs");
|
|
5562
|
+
var import_InsertInvitationOutlined = __toESM(require("@mui/icons-material/InsertInvitationOutlined"), 1);
|
|
5563
|
+
var SCDatePicker = ({ label, required, disabled, background, state, setState, width }) => {
|
|
5564
|
+
return /* @__PURE__ */ import_react55.default.createElement(import_LocalizationProvider5.LocalizationProvider, { dateAdapter: import_AdapterDayjs3.AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ import_react55.default.createElement(
|
|
5565
|
+
import_DatePicker.DatePicker,
|
|
5566
|
+
{
|
|
5567
|
+
disabled,
|
|
5568
|
+
label: label || "Fecha",
|
|
5569
|
+
value: state,
|
|
5570
|
+
onChange: (value) => {
|
|
5571
|
+
if (value && import_dayjs11.default.isDayjs(value) && value.isValid()) {
|
|
5572
|
+
const minDate = (0, import_dayjs11.default)("2015-01-01");
|
|
5573
|
+
const maxDate = (0, import_dayjs11.default)().add(3, "month");
|
|
5574
|
+
if (value.isBefore(minDate, "day")) {
|
|
5575
|
+
alert("La fecha no puede ser anterior al 01/01/2015");
|
|
5576
|
+
return;
|
|
5577
|
+
}
|
|
5578
|
+
if (value.isAfter(maxDate, "day")) {
|
|
5579
|
+
alert("La fecha no puede ser posterior a 3 meses desde hoy");
|
|
5580
|
+
return;
|
|
5581
|
+
}
|
|
5582
|
+
setState(value);
|
|
5583
|
+
}
|
|
5584
|
+
},
|
|
5585
|
+
minDate: (0, import_dayjs11.default)("2015-01-01"),
|
|
5586
|
+
maxDate: (0, import_dayjs11.default)().add(3, "month"),
|
|
5587
|
+
sx: {
|
|
5588
|
+
minWidth: 140,
|
|
5589
|
+
padding: "13px 0px",
|
|
5590
|
+
width: width || "100%",
|
|
5591
|
+
"& .MuiPickersInputBase-sectionsContainer": {
|
|
5592
|
+
padding: "8px 0px"
|
|
5593
|
+
},
|
|
5594
|
+
background: background || "transparent"
|
|
5595
|
+
},
|
|
5596
|
+
slotProps: {
|
|
5597
|
+
popper: {
|
|
5598
|
+
sx: {
|
|
5599
|
+
zIndex: 2e3
|
|
5600
|
+
}
|
|
5601
|
+
},
|
|
5602
|
+
textField: {
|
|
5603
|
+
required: required || false,
|
|
5604
|
+
InputLabelProps: {
|
|
5605
|
+
sx: {
|
|
5606
|
+
"&.MuiInputLabel-shrink": {
|
|
5607
|
+
transform: "translate(10px, 5px) scale(0.9) !important"
|
|
5608
|
+
}
|
|
5609
|
+
}
|
|
5610
|
+
}
|
|
5611
|
+
}
|
|
5612
|
+
},
|
|
5613
|
+
slots: {
|
|
5614
|
+
openPickerIcon: import_InsertInvitationOutlined.default
|
|
5615
|
+
}
|
|
5616
|
+
}
|
|
5617
|
+
));
|
|
5618
|
+
};
|
|
5619
|
+
|
|
5478
5620
|
// src/Theme/index.ts
|
|
5479
5621
|
var import_styles3 = require("@mui/material/styles");
|
|
5480
5622
|
|
|
5481
5623
|
// src/Theme/components.ts
|
|
5482
|
-
var
|
|
5624
|
+
var import_react56 = __toESM(require("react"), 1);
|
|
5483
5625
|
var import_icons_material15 = require("@mui/icons-material");
|
|
5484
5626
|
var components = {
|
|
5485
5627
|
MuiSelect: {
|
|
@@ -5836,6 +5978,7 @@ var components = {
|
|
|
5836
5978
|
})
|
|
5837
5979
|
}
|
|
5838
5980
|
},
|
|
5981
|
+
//este hace claro el fondo
|
|
5839
5982
|
MuiBackdrop: {
|
|
5840
5983
|
styleOverrides: {
|
|
5841
5984
|
root: {
|
|
@@ -6177,10 +6320,10 @@ var components = {
|
|
|
6177
6320
|
MuiAlert: {
|
|
6178
6321
|
defaultProps: {
|
|
6179
6322
|
iconMapping: {
|
|
6180
|
-
success:
|
|
6181
|
-
error:
|
|
6182
|
-
warning:
|
|
6183
|
-
info:
|
|
6323
|
+
success: import_react56.default.createElement(import_icons_material15.CheckCircleRounded),
|
|
6324
|
+
error: import_react56.default.createElement(import_icons_material15.ErrorRounded),
|
|
6325
|
+
warning: import_react56.default.createElement(import_icons_material15.WarningRounded),
|
|
6326
|
+
info: import_react56.default.createElement(import_icons_material15.InfoRounded)
|
|
6184
6327
|
}
|
|
6185
6328
|
},
|
|
6186
6329
|
variants: [
|
|
@@ -7239,6 +7382,7 @@ var ADCSincoTheme = (0, import_styles3.createTheme)(__spreadValues({}, ADCTheme)
|
|
|
7239
7382
|
SCCard,
|
|
7240
7383
|
SCDataGrid,
|
|
7241
7384
|
SCDataGridInitial,
|
|
7385
|
+
SCDatePicker,
|
|
7242
7386
|
SCDateRange,
|
|
7243
7387
|
SCDialog,
|
|
7244
7388
|
SCDrawer,
|