componentes-sinco 1.0.33 → 1.0.34-rc.2
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 +139 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +254 -155
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2064,7 +2064,6 @@ var SCDateRange = ({
|
|
|
2064
2064
|
const isStartEmpty = required && !state[0];
|
|
2065
2065
|
const isEndEmpty = required && !state[1];
|
|
2066
2066
|
const hasError = isStartEmpty || isEndEmpty;
|
|
2067
|
-
const minDate = new Date(2013, 0, 1);
|
|
2068
2067
|
const [notification, setNotification] = import_react16.default.useState(false);
|
|
2069
2068
|
const handleDateChange = (newValue) => {
|
|
2070
2069
|
const minDateDayjs = (0, import_dayjs.default)("2013-01-01");
|
|
@@ -2084,7 +2083,30 @@ var SCDateRange = ({
|
|
|
2084
2083
|
return;
|
|
2085
2084
|
}
|
|
2086
2085
|
}
|
|
2087
|
-
|
|
2086
|
+
const startDateChanged = convertedValue[0] && state[0] && !convertedValue[0].isSame(state[0], "day");
|
|
2087
|
+
const hasEndDate = convertedValue[1] !== null;
|
|
2088
|
+
if (startDateChanged && convertedValue[0]) {
|
|
2089
|
+
if (!hasEndDate || hasEndDate && convertedValue[0].isAfter(convertedValue[1])) {
|
|
2090
|
+
const correctedValue = [
|
|
2091
|
+
convertedValue[0],
|
|
2092
|
+
convertedValue[0]
|
|
2093
|
+
// Establecer fecha final igual a la inicial
|
|
2094
|
+
];
|
|
2095
|
+
setState(correctedValue);
|
|
2096
|
+
return;
|
|
2097
|
+
}
|
|
2098
|
+
}
|
|
2099
|
+
const isInvalidRange = convertedValue[0] && convertedValue[1] && convertedValue[0].isAfter(convertedValue[1]);
|
|
2100
|
+
if (isInvalidRange) {
|
|
2101
|
+
const correctedValue = [
|
|
2102
|
+
convertedValue[0],
|
|
2103
|
+
convertedValue[0]
|
|
2104
|
+
// Establecer fecha final igual a la inicial
|
|
2105
|
+
];
|
|
2106
|
+
setState(correctedValue);
|
|
2107
|
+
} else {
|
|
2108
|
+
setState(convertedValue);
|
|
2109
|
+
}
|
|
2088
2110
|
};
|
|
2089
2111
|
return /* @__PURE__ */ import_react16.default.createElement(import_react16.default.Fragment, null, /* @__PURE__ */ import_react16.default.createElement(import_LocalizationProvider.LocalizationProvider, { dateAdapter: import_AdapterDayjs.AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ import_react16.default.createElement(import_material10.Box, { sx: { width: "100%" } }, /* @__PURE__ */ import_react16.default.createElement(
|
|
2090
2112
|
import_DateRangePicker.DateRangePicker,
|
|
@@ -2096,44 +2118,38 @@ var SCDateRange = ({
|
|
|
2096
2118
|
field: import_MultiInputDateRangeField.MultiInputDateRangeField
|
|
2097
2119
|
},
|
|
2098
2120
|
slotProps: {
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2121
|
+
textField: ({ position }) => {
|
|
2122
|
+
const isStart = position === "start";
|
|
2123
|
+
return {
|
|
2124
|
+
label: isStart ? labelDateInitial : labelDateFinal,
|
|
2125
|
+
size: "small",
|
|
2126
|
+
variant: "outlined",
|
|
2127
|
+
required,
|
|
2128
|
+
error: isStart ? isStartEmpty : isEndEmpty,
|
|
2129
|
+
InputProps: {
|
|
2130
|
+
endAdornment: /* @__PURE__ */ import_react16.default.createElement(import_material10.InputAdornment, { position: "end" }, /* @__PURE__ */ import_react16.default.createElement(
|
|
2131
|
+
import_Event.default,
|
|
2132
|
+
{
|
|
2133
|
+
color: hasError ? "error" : "action",
|
|
2134
|
+
fontSize: "small"
|
|
2135
|
+
}
|
|
2136
|
+
))
|
|
2137
|
+
},
|
|
2138
|
+
sx: {
|
|
2139
|
+
flex: 1,
|
|
2140
|
+
"& .MuiOutlinedInput-root": {
|
|
2141
|
+
backgroundColor: background === "transparent" ? "transparent" : background
|
|
2115
2142
|
},
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
color: "error.main"
|
|
2123
|
-
},
|
|
2124
|
-
background: background != null ? background : "transparent"
|
|
2125
|
-
}
|
|
2126
|
-
})
|
|
2127
|
-
}
|
|
2143
|
+
"& .MuiInputLabel-asterisk": {
|
|
2144
|
+
color: "error.main"
|
|
2145
|
+
},
|
|
2146
|
+
background: background != null ? background : "transparent"
|
|
2147
|
+
}
|
|
2148
|
+
};
|
|
2128
2149
|
}
|
|
2129
|
-
},
|
|
2130
|
-
sx: {
|
|
2131
|
-
display: "flex",
|
|
2132
|
-
gap: 1,
|
|
2133
|
-
width: "100%"
|
|
2134
2150
|
}
|
|
2135
2151
|
}
|
|
2136
|
-
)))
|
|
2152
|
+
))));
|
|
2137
2153
|
};
|
|
2138
2154
|
|
|
2139
2155
|
// src/Components/Drawer/components/DrawerContent.tsx
|
|
@@ -2342,6 +2358,7 @@ function SCDrawer({
|
|
|
2342
2358
|
setOpen,
|
|
2343
2359
|
chipFilters
|
|
2344
2360
|
}) {
|
|
2361
|
+
const drawerBleeding = 56;
|
|
2345
2362
|
const { drawerOpen, handleDrawerClose, toggleDrawer } = useDrawerState({ open, setOpen });
|
|
2346
2363
|
const { toast, setToastWithDelay } = useToast();
|
|
2347
2364
|
const {
|
|
@@ -2404,12 +2421,12 @@ function SCDrawer({
|
|
|
2404
2421
|
onToggle: toggleDrawer(true)
|
|
2405
2422
|
}
|
|
2406
2423
|
)
|
|
2407
|
-
), /* @__PURE__ */ import_react20.default.createElement(
|
|
2424
|
+
), anchor != "bottom" ? /* @__PURE__ */ import_react20.default.createElement(
|
|
2408
2425
|
import_material14.Drawer,
|
|
2409
2426
|
{
|
|
2410
2427
|
open: drawerOpen,
|
|
2411
2428
|
onClose: toggleDrawer(false),
|
|
2412
|
-
anchor,
|
|
2429
|
+
anchor: anchor != null ? anchor : "left",
|
|
2413
2430
|
sx: {
|
|
2414
2431
|
"& .MuiDrawer-paper": {
|
|
2415
2432
|
width: width != null ? width : "450px",
|
|
@@ -2426,6 +2443,45 @@ function SCDrawer({
|
|
|
2426
2443
|
onClose: handleDrawerClose
|
|
2427
2444
|
}
|
|
2428
2445
|
), /* @__PURE__ */ import_react20.default.createElement(DrawerContent, { arrayElements }), /* @__PURE__ */ import_react20.default.createElement(DrawerActions, { actions: drawerActions, anchor }))
|
|
2446
|
+
) : /* @__PURE__ */ import_react20.default.createElement(
|
|
2447
|
+
import_material14.SwipeableDrawer,
|
|
2448
|
+
{
|
|
2449
|
+
open: drawerOpen,
|
|
2450
|
+
onClose: toggleDrawer(false),
|
|
2451
|
+
onOpen: toggleDrawer(true),
|
|
2452
|
+
anchor: "bottom",
|
|
2453
|
+
swipeAreaWidth: drawerBleeding,
|
|
2454
|
+
sx: {
|
|
2455
|
+
"& .MuiDrawer-paper": {
|
|
2456
|
+
width: "auto",
|
|
2457
|
+
height: `calc(50% - ${drawerBleeding}px)`,
|
|
2458
|
+
boxSizing: "border-box",
|
|
2459
|
+
borderRadius: "4px 4px 0px 0px"
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
},
|
|
2463
|
+
/* @__PURE__ */ import_react20.default.createElement(
|
|
2464
|
+
import_material14.Box,
|
|
2465
|
+
{
|
|
2466
|
+
sx: {
|
|
2467
|
+
width: 30,
|
|
2468
|
+
height: 6,
|
|
2469
|
+
backgroundColor: "#ccc",
|
|
2470
|
+
borderRadius: 3,
|
|
2471
|
+
position: "absolute",
|
|
2472
|
+
top: 8,
|
|
2473
|
+
left: "calc(50% - 15px)"
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
),
|
|
2477
|
+
/* @__PURE__ */ import_react20.default.createElement(import_material14.Stack, { flexDirection: "column", height: "100%" }, /* @__PURE__ */ import_react20.default.createElement(
|
|
2478
|
+
DrawerHeader,
|
|
2479
|
+
{
|
|
2480
|
+
title,
|
|
2481
|
+
colorTitle,
|
|
2482
|
+
onClose: handleDrawerClose
|
|
2483
|
+
}
|
|
2484
|
+
), /* @__PURE__ */ import_react20.default.createElement(DrawerContent, { arrayElements }), /* @__PURE__ */ import_react20.default.createElement(DrawerActions, { actions: drawerActions, anchor }))
|
|
2429
2485
|
));
|
|
2430
2486
|
}
|
|
2431
2487
|
|
|
@@ -3030,6 +3086,48 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
3030
3086
|
"& .MuiDataGrid-cell": {
|
|
3031
3087
|
padding: "0 !important",
|
|
3032
3088
|
background: "white"
|
|
3089
|
+
},
|
|
3090
|
+
// Ocultar scrollbars personalizados de MUI completamente
|
|
3091
|
+
"& .MuiDataGrid-scrollbar": {
|
|
3092
|
+
display: "none !important",
|
|
3093
|
+
visibility: "hidden !important",
|
|
3094
|
+
width: "0 !important",
|
|
3095
|
+
opacity: "0 !important"
|
|
3096
|
+
},
|
|
3097
|
+
"& .MuiDataGrid-scrollbar--vertical": {
|
|
3098
|
+
display: "none !important",
|
|
3099
|
+
visibility: "hidden !important",
|
|
3100
|
+
width: "0 !important",
|
|
3101
|
+
opacity: "0 !important"
|
|
3102
|
+
},
|
|
3103
|
+
// Scrollbar filler y content siempre transparentes
|
|
3104
|
+
"& .MuiDataGrid-scrollbarFiller": {
|
|
3105
|
+
backgroundColor: "transparent !important",
|
|
3106
|
+
display: "none !important"
|
|
3107
|
+
},
|
|
3108
|
+
"& .MuiDataGrid-scrollbarContent": {
|
|
3109
|
+
backgroundColor: "transparent !important",
|
|
3110
|
+
display: "none !important"
|
|
3111
|
+
},
|
|
3112
|
+
// Scrollbar nativo visible solo cuando hay overflow
|
|
3113
|
+
"& .MuiDataGrid-virtualScroller": {
|
|
3114
|
+
overflowY: "auto !important",
|
|
3115
|
+
scrollbarWidth: "thin",
|
|
3116
|
+
scrollbarColor: "#888 transparent",
|
|
3117
|
+
"&::-webkit-scrollbar": {
|
|
3118
|
+
width: "8px",
|
|
3119
|
+
height: "8px"
|
|
3120
|
+
},
|
|
3121
|
+
"&::-webkit-scrollbar-track": {
|
|
3122
|
+
background: "transparent"
|
|
3123
|
+
},
|
|
3124
|
+
"&::-webkit-scrollbar-thumb": {
|
|
3125
|
+
background: "#888",
|
|
3126
|
+
borderRadius: "4px"
|
|
3127
|
+
},
|
|
3128
|
+
"&::-webkit-scrollbar-thumb:hover": {
|
|
3129
|
+
background: "#555"
|
|
3130
|
+
}
|
|
3033
3131
|
}
|
|
3034
3132
|
}
|
|
3035
3133
|
}
|
|
@@ -4412,13 +4510,14 @@ var SCTime = ({
|
|
|
4412
4510
|
background = "transparent",
|
|
4413
4511
|
timeStep = 5,
|
|
4414
4512
|
state,
|
|
4415
|
-
setState
|
|
4513
|
+
setState,
|
|
4514
|
+
error
|
|
4416
4515
|
}) => {
|
|
4417
4516
|
import_x_license3.LicenseInfo.setLicenseKey(
|
|
4418
4517
|
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
4419
4518
|
);
|
|
4420
4519
|
const isTimeEmpty = required && !state;
|
|
4421
|
-
const hasError = isTimeEmpty;
|
|
4520
|
+
const hasError = isTimeEmpty || error;
|
|
4422
4521
|
const [anchorEl, setAnchorEl] = (0, import_react48.useState)(null);
|
|
4423
4522
|
const [isOpenPopover, setIsOpenPopover] = (0, import_react48.useState)(false);
|
|
4424
4523
|
const [popoverPlacement, setPopoverPlacement] = (0, import_react48.useState)("bottom");
|