componentes-sinco 1.1.15 → 1.1.17
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 +142 -66
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +142 -66
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -93,6 +93,7 @@ interface DrawerProps<T> {
|
|
|
93
93
|
text: string;
|
|
94
94
|
fn: () => void;
|
|
95
95
|
disabled?: boolean;
|
|
96
|
+
color?: "primary" | "secondary" | "error" | "info" | "success" | "warning";
|
|
96
97
|
}[] | boolean;
|
|
97
98
|
buttonDrawer?: false | {
|
|
98
99
|
type?: 'chip' | 'button';
|
|
@@ -109,6 +110,8 @@ interface DrawerProps<T> {
|
|
|
109
110
|
setOpen?: any;
|
|
110
111
|
chipFilters?: any[];
|
|
111
112
|
heightDrawer?: number;
|
|
113
|
+
filterSideCard?: any;
|
|
114
|
+
ref?: any;
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
type ToastType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -135,7 +138,7 @@ declare const ToastProgress: (timeProgress: number) => {
|
|
|
135
138
|
progressToast: number;
|
|
136
139
|
};
|
|
137
140
|
|
|
138
|
-
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, }: DrawerProps<T>): React__default.JSX.Element;
|
|
141
|
+
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, filterSideCard, ref, }: DrawerProps<T>): React__default.JSX.Element;
|
|
139
142
|
|
|
140
143
|
interface FooterActionsProperties {
|
|
141
144
|
label?: React.ReactNode;
|
|
@@ -330,12 +333,18 @@ interface SCDataGridInitialProps<T> {
|
|
|
330
333
|
getRowId?: (row: T) => string | number;
|
|
331
334
|
rowsTable?: number;
|
|
332
335
|
checkboxSelection?: boolean;
|
|
336
|
+
rowSelection?: boolean;
|
|
333
337
|
width?: string | number;
|
|
334
338
|
maxHeight?: number;
|
|
339
|
+
density?: "compact" | "standard" | "comfortable";
|
|
335
340
|
disableColumnMenu?: boolean;
|
|
336
341
|
disableColumnSorting?: boolean;
|
|
342
|
+
setSelectedIndex?: (index: number) => void;
|
|
343
|
+
selectedIndex?: number;
|
|
344
|
+
setSelectedRow?: (any: any) => void;
|
|
345
|
+
selectedRow?: any;
|
|
337
346
|
}
|
|
338
|
-
declare function SCDataGridInitial<T>({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight, disableColumnMenu, disableColumnSorting }: SCDataGridInitialProps<T>): React__default.JSX.Element;
|
|
347
|
+
declare function SCDataGridInitial<T>({ data, columns, getRowId, groupColumns, rowsTable, rowSelection, checkboxSelection, width, maxHeight, density, disableColumnMenu, disableColumnSorting, setSelectedIndex, selectedIndex, setSelectedRow, selectedRow }: SCDataGridInitialProps<T>): React__default.JSX.Element;
|
|
339
348
|
declare const SCDataGrid: React__default.MemoExoticComponent<typeof SCDataGridInitial>;
|
|
340
349
|
|
|
341
350
|
interface SCAutocompleteProps<T> {
|
package/dist/index.d.ts
CHANGED
|
@@ -93,6 +93,7 @@ interface DrawerProps<T> {
|
|
|
93
93
|
text: string;
|
|
94
94
|
fn: () => void;
|
|
95
95
|
disabled?: boolean;
|
|
96
|
+
color?: "primary" | "secondary" | "error" | "info" | "success" | "warning";
|
|
96
97
|
}[] | boolean;
|
|
97
98
|
buttonDrawer?: false | {
|
|
98
99
|
type?: 'chip' | 'button';
|
|
@@ -109,6 +110,8 @@ interface DrawerProps<T> {
|
|
|
109
110
|
setOpen?: any;
|
|
110
111
|
chipFilters?: any[];
|
|
111
112
|
heightDrawer?: number;
|
|
113
|
+
filterSideCard?: any;
|
|
114
|
+
ref?: any;
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
type ToastType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -135,7 +138,7 @@ declare const ToastProgress: (timeProgress: number) => {
|
|
|
135
138
|
progressToast: number;
|
|
136
139
|
};
|
|
137
140
|
|
|
138
|
-
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, }: DrawerProps<T>): React__default.JSX.Element;
|
|
141
|
+
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, heightDrawer, filterSideCard, ref, }: DrawerProps<T>): React__default.JSX.Element;
|
|
139
142
|
|
|
140
143
|
interface FooterActionsProperties {
|
|
141
144
|
label?: React.ReactNode;
|
|
@@ -330,12 +333,18 @@ interface SCDataGridInitialProps<T> {
|
|
|
330
333
|
getRowId?: (row: T) => string | number;
|
|
331
334
|
rowsTable?: number;
|
|
332
335
|
checkboxSelection?: boolean;
|
|
336
|
+
rowSelection?: boolean;
|
|
333
337
|
width?: string | number;
|
|
334
338
|
maxHeight?: number;
|
|
339
|
+
density?: "compact" | "standard" | "comfortable";
|
|
335
340
|
disableColumnMenu?: boolean;
|
|
336
341
|
disableColumnSorting?: boolean;
|
|
342
|
+
setSelectedIndex?: (index: number) => void;
|
|
343
|
+
selectedIndex?: number;
|
|
344
|
+
setSelectedRow?: (any: any) => void;
|
|
345
|
+
selectedRow?: any;
|
|
337
346
|
}
|
|
338
|
-
declare function SCDataGridInitial<T>({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight, disableColumnMenu, disableColumnSorting }: SCDataGridInitialProps<T>): React__default.JSX.Element;
|
|
347
|
+
declare function SCDataGridInitial<T>({ data, columns, getRowId, groupColumns, rowsTable, rowSelection, checkboxSelection, width, maxHeight, density, disableColumnMenu, disableColumnSorting, setSelectedIndex, selectedIndex, setSelectedRow, selectedRow }: SCDataGridInitialProps<T>): React__default.JSX.Element;
|
|
339
348
|
declare const SCDataGrid: React__default.MemoExoticComponent<typeof SCDataGridInitial>;
|
|
340
349
|
|
|
341
350
|
interface SCAutocompleteProps<T> {
|
package/dist/index.js
CHANGED
|
@@ -1325,7 +1325,13 @@ var SCTextField = ({
|
|
|
1325
1325
|
fullWidth: true,
|
|
1326
1326
|
size: size ? size : "medium",
|
|
1327
1327
|
variant,
|
|
1328
|
-
sx: {
|
|
1328
|
+
sx: {
|
|
1329
|
+
background: background || "transparent",
|
|
1330
|
+
borderRadius: "4px",
|
|
1331
|
+
"& .MuiOutlinedInput-input": {
|
|
1332
|
+
padding: "6px 0px 6px 14px"
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1329
1335
|
},
|
|
1330
1336
|
/* @__PURE__ */ React8.createElement(
|
|
1331
1337
|
InputLabel,
|
|
@@ -1334,7 +1340,13 @@ var SCTextField = ({
|
|
|
1334
1340
|
htmlFor: "",
|
|
1335
1341
|
required: required && label !== "" ? true : false,
|
|
1336
1342
|
error,
|
|
1337
|
-
disabled: disabled || false
|
|
1343
|
+
disabled: disabled || false,
|
|
1344
|
+
sx: {
|
|
1345
|
+
"&.MuiInputLabel-outlined": {
|
|
1346
|
+
transform: "translate(14px, 8px) scale(1)"
|
|
1347
|
+
// <-- tu transform
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1338
1350
|
},
|
|
1339
1351
|
label ? label : ""
|
|
1340
1352
|
),
|
|
@@ -2073,6 +2085,9 @@ var SCDateRange = ({
|
|
|
2073
2085
|
"& .MuiInputLabel-asterisk": {
|
|
2074
2086
|
color: "error.main"
|
|
2075
2087
|
},
|
|
2088
|
+
"& .MuiPickersOutlinedInput-sectionsContainer": {
|
|
2089
|
+
padding: "6px 0px"
|
|
2090
|
+
},
|
|
2076
2091
|
background: background != null ? background : "transparent"
|
|
2077
2092
|
}
|
|
2078
2093
|
};
|
|
@@ -2229,15 +2244,15 @@ var DrawerActions = ({ actions, anchor }) => {
|
|
|
2229
2244
|
height: "42px",
|
|
2230
2245
|
alignItems: "center",
|
|
2231
2246
|
flexWrap: "nowrap",
|
|
2232
|
-
justifyContent: actions.length > 1 ? "space-between" :
|
|
2233
|
-
flexDirection:
|
|
2247
|
+
justifyContent: actions.length > 1 ? "space-between" : "flex-start",
|
|
2248
|
+
flexDirection: "row-reverse"
|
|
2234
2249
|
},
|
|
2235
2250
|
actions.map((btn, index) => /* @__PURE__ */ React14.createElement(
|
|
2236
2251
|
Button7,
|
|
2237
2252
|
{
|
|
2238
2253
|
key: index,
|
|
2239
2254
|
variant: index === 0 || actions.length < 2 ? "contained" : "text",
|
|
2240
|
-
color: "primary",
|
|
2255
|
+
color: btn.color ? btn.color : "primary",
|
|
2241
2256
|
onClick: btn.fn,
|
|
2242
2257
|
disabled: btn.disabled || false,
|
|
2243
2258
|
size: "small",
|
|
@@ -2257,7 +2272,8 @@ var DrawerHeader = ({
|
|
|
2257
2272
|
title,
|
|
2258
2273
|
colorTitle,
|
|
2259
2274
|
onClose,
|
|
2260
|
-
anchor
|
|
2275
|
+
anchor,
|
|
2276
|
+
filterSideCard
|
|
2261
2277
|
}) => {
|
|
2262
2278
|
return /* @__PURE__ */ React15.createElement(
|
|
2263
2279
|
Grid5,
|
|
@@ -2265,9 +2281,9 @@ var DrawerHeader = ({
|
|
|
2265
2281
|
container: true,
|
|
2266
2282
|
sx: {
|
|
2267
2283
|
marginTop: anchor == "bottom" ? "16px" : "0px",
|
|
2268
|
-
backgroundColor: anchor == "bottom" ? "white" : "primary.50",
|
|
2284
|
+
backgroundColor: anchor == "bottom" ? "white" : filterSideCard ? "#EAEBEC" : "primary.50",
|
|
2269
2285
|
alignItems: "center",
|
|
2270
|
-
height: "42px",
|
|
2286
|
+
height: filterSideCard ? "38px" : "42px",
|
|
2271
2287
|
textAlign: "left",
|
|
2272
2288
|
padding: "8px 12px",
|
|
2273
2289
|
justifyContent: "space-between",
|
|
@@ -2275,7 +2291,7 @@ var DrawerHeader = ({
|
|
|
2275
2291
|
}
|
|
2276
2292
|
},
|
|
2277
2293
|
/* @__PURE__ */ React15.createElement(Typography8, { variant: "h6", color: colorTitle || "text.primary" }, title != null ? title : "Personaliza tu b\xFAsqueda"),
|
|
2278
|
-
/* @__PURE__ */ React15.createElement(IconButton8, { onClick: onClose }, /* @__PURE__ */ React15.createElement(CloseIcon, { "data-testid": "test-button-close", sx: { color: "text.primary" } }))
|
|
2294
|
+
filterSideCard ? /* @__PURE__ */ React15.createElement(React15.Fragment, null, filterSideCard) : /* @__PURE__ */ React15.createElement(IconButton8, { onClick: onClose }, /* @__PURE__ */ React15.createElement(CloseIcon, { "data-testid": "test-button-close", sx: { color: "text.primary" } }))
|
|
2279
2295
|
);
|
|
2280
2296
|
};
|
|
2281
2297
|
|
|
@@ -2291,7 +2307,9 @@ function SCDrawer({
|
|
|
2291
2307
|
open,
|
|
2292
2308
|
setOpen,
|
|
2293
2309
|
chipFilters,
|
|
2294
|
-
heightDrawer = 456
|
|
2310
|
+
heightDrawer = 456,
|
|
2311
|
+
filterSideCard,
|
|
2312
|
+
ref
|
|
2295
2313
|
}) {
|
|
2296
2314
|
const drawerBleeding = heightDrawer;
|
|
2297
2315
|
const { drawerOpen, handleDrawerClose, toggleDrawer } = useDrawerState({ open, setOpen });
|
|
@@ -2318,6 +2336,7 @@ function SCDrawer({
|
|
|
2318
2336
|
);
|
|
2319
2337
|
}
|
|
2320
2338
|
};
|
|
2339
|
+
const containerRef = React16.useRef(null);
|
|
2321
2340
|
const handleCleanFilters = () => {
|
|
2322
2341
|
cleanAllFilters(arrayElements, setTextFilters);
|
|
2323
2342
|
};
|
|
@@ -2360,13 +2379,37 @@ function SCDrawer({
|
|
|
2360
2379
|
Drawer,
|
|
2361
2380
|
{
|
|
2362
2381
|
open: drawerOpen,
|
|
2363
|
-
onClose: toggleDrawer(false),
|
|
2382
|
+
onClose: filterSideCard ? void 0 : toggleDrawer(false),
|
|
2364
2383
|
anchor: anchor != null ? anchor : "left",
|
|
2365
2384
|
sx: {
|
|
2366
2385
|
"& .MuiDrawer-paper": {
|
|
2367
|
-
width: width != null ? width : "450px",
|
|
2386
|
+
width: filterSideCard ? "100%" : width != null ? width : "450px",
|
|
2368
2387
|
boxSizing: "border-box",
|
|
2369
|
-
borderRadius: anchor !== "right" ? "0px 4px 4px 0px" : "4px 0px 0px 4px"
|
|
2388
|
+
borderRadius: anchor !== "right" ? "0px 4px 4px 0px" : "4px 0px 0px 4px",
|
|
2389
|
+
boxShadow: filterSideCard ? "none !important" : "0px 8px 10px -5px rgba(24, 39, 75, 0.2), 0px 16px 24px 2px rgba(24, 39, 75, 0.14), 0px 6px 30px 5px rgba(24, 39, 75, 0.12)"
|
|
2390
|
+
},
|
|
2391
|
+
"&.MuiDrawer-root": {
|
|
2392
|
+
boxShadow: filterSideCard ? "none !important" : "0px 3px 1px -2px rgba(24, 39, 75, 0.20),0px 2px 2px 0px rgba(24, 39, 75, 0.14),0px 1px 5px 0px rgba(24, 39, 75, 0.12)"
|
|
2393
|
+
}
|
|
2394
|
+
},
|
|
2395
|
+
ModalProps: {
|
|
2396
|
+
container: ref == null ? void 0 : ref.current,
|
|
2397
|
+
keepMounted: true,
|
|
2398
|
+
slotProps: {
|
|
2399
|
+
root: {
|
|
2400
|
+
style: {
|
|
2401
|
+
position: "absolute"
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
},
|
|
2406
|
+
hideBackdrop: true,
|
|
2407
|
+
PaperProps: {
|
|
2408
|
+
sx: {
|
|
2409
|
+
position: "absolute !important",
|
|
2410
|
+
height: "100%",
|
|
2411
|
+
width: 300,
|
|
2412
|
+
right: 0
|
|
2370
2413
|
}
|
|
2371
2414
|
}
|
|
2372
2415
|
},
|
|
@@ -2375,7 +2418,9 @@ function SCDrawer({
|
|
|
2375
2418
|
{
|
|
2376
2419
|
title,
|
|
2377
2420
|
colorTitle,
|
|
2378
|
-
onClose: handleDrawerClose
|
|
2421
|
+
onClose: handleDrawerClose,
|
|
2422
|
+
anchor,
|
|
2423
|
+
filterSideCard
|
|
2379
2424
|
}
|
|
2380
2425
|
), /* @__PURE__ */ React16.createElement(DrawerContent, { arrayElements }), /* @__PURE__ */ React16.createElement(DrawerActions, { actions: drawerActions, anchor }))
|
|
2381
2426
|
) : /* @__PURE__ */ React16.createElement(
|
|
@@ -2804,7 +2849,7 @@ import { LicenseInfo as LicenseInfo2 } from "@mui/x-license";
|
|
|
2804
2849
|
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
2805
2850
|
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
|
|
2806
2851
|
import { useTheme } from "@mui/material/styles";
|
|
2807
|
-
function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, checkboxSelection, width, maxHeight, disableColumnMenu, disableColumnSorting }) {
|
|
2852
|
+
function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, rowSelection, checkboxSelection, width, maxHeight, density, disableColumnMenu, disableColumnSorting, setSelectedIndex, selectedIndex = 0, setSelectedRow, selectedRow }) {
|
|
2808
2853
|
LicenseInfo2.setLicenseKey(
|
|
2809
2854
|
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
2810
2855
|
);
|
|
@@ -2832,7 +2877,6 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
2832
2877
|
renderCell: (params) => {
|
|
2833
2878
|
var _a, _b;
|
|
2834
2879
|
let label = params.value.toString().includes("/") ? params.value.split("/")[0].toString() : params.value.toString();
|
|
2835
|
-
debugger;
|
|
2836
2880
|
let maxDepth = 0;
|
|
2837
2881
|
if (groupColumns && data.length > 0) {
|
|
2838
2882
|
const sampleItem = groupColumns(data[0]);
|
|
@@ -2955,24 +2999,32 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
2955
2999
|
}
|
|
2956
3000
|
}
|
|
2957
3001
|
};
|
|
2958
|
-
let densityC = "compact";
|
|
2959
3002
|
let validationTreeData = groupColumns ? true : false;
|
|
2960
3003
|
let validationCheckboxSelection = checkboxSelection || false;
|
|
2961
|
-
let styleDensity =
|
|
2962
|
-
let styleTopContainerHeight = styleDensity === "compact" ? "26px" : styleDensity === "standard" ? "
|
|
2963
|
-
let styleRowHeight =
|
|
3004
|
+
let styleDensity = density || "compact";
|
|
3005
|
+
let styleTopContainerHeight = styleDensity === "compact" ? "26px" : styleDensity === "standard" ? "32px" : styleDensity === "comfortable" ? "40px" : "26px";
|
|
3006
|
+
let styleRowHeight = density == "compact" ? 32 : density == "standard" ? 28 : density == "comfortable" ? 31 : 32;
|
|
2964
3007
|
let rows = rowsTable ? rowsTable : validationTreeData != false ? parseInt(data.length.toString()) : data.length < 10 ? parseInt(data.length.toString()) : 10;
|
|
2965
3008
|
let validationGroupingColDef = groupingColDefs || {};
|
|
2966
3009
|
const [groupDataLenght, setGroupDataLengh] = useState13(0);
|
|
2967
3010
|
const [pageSize, setPageSize] = useState13(rows);
|
|
2968
3011
|
const [arrayRows, setArrayRows] = useState13([]);
|
|
2969
3012
|
const [selectionModel, setSelectionModel] = useState13([]);
|
|
3013
|
+
useEffect13(() => {
|
|
3014
|
+
var _a;
|
|
3015
|
+
debugger;
|
|
3016
|
+
if (setSelectedRow) {
|
|
3017
|
+
setSelectedRow(arrayRows[selectedIndex]);
|
|
3018
|
+
setSelectionModel(((_a = arrayRows[selectedIndex]) == null ? void 0 : _a.id) ? [arrayRows[selectedIndex].id] : []);
|
|
3019
|
+
}
|
|
3020
|
+
}, [selectedIndex]);
|
|
2970
3021
|
useEffect13(() => {
|
|
2971
3022
|
if ((data == null ? void 0 : data.length) > 0) {
|
|
2972
3023
|
dataConvertRows(data, void 0);
|
|
2973
3024
|
}
|
|
2974
3025
|
}, [data]);
|
|
2975
3026
|
const dataConvertRows = (data2, columnId) => {
|
|
3027
|
+
var _a;
|
|
2976
3028
|
let dataConvert = [];
|
|
2977
3029
|
if ((data2 == null ? void 0 : data2.length) > 0) {
|
|
2978
3030
|
const dataKeys = Object.keys(data2[0]);
|
|
@@ -2987,9 +3039,15 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
2987
3039
|
dataConvert = [...dataConvert, newKeys];
|
|
2988
3040
|
});
|
|
2989
3041
|
}
|
|
3042
|
+
debugger;
|
|
2990
3043
|
setArrayRows(dataConvert);
|
|
3044
|
+
if (arrayRows.length == 0 && (groupDataLenght < 1 && validationTreeData != true)) {
|
|
3045
|
+
setSelectedRow && setSelectedRow(dataConvert[selectedIndex]);
|
|
3046
|
+
setSelectionModel([(_a = dataConvert[0]) == null ? void 0 : _a.id]);
|
|
3047
|
+
}
|
|
2991
3048
|
};
|
|
2992
3049
|
const handleSelectionChange = (newSelection) => {
|
|
3050
|
+
debugger;
|
|
2993
3051
|
if (groupDataLenght > 0 && validationTreeData == true) {
|
|
2994
3052
|
let numberGrouped = 0;
|
|
2995
3053
|
let idsRowSelectBefore = [];
|
|
@@ -3010,6 +3068,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
3010
3068
|
}
|
|
3011
3069
|
}
|
|
3012
3070
|
});
|
|
3071
|
+
debugger;
|
|
3013
3072
|
if (idRowSelect !== null) {
|
|
3014
3073
|
const soloEnArr1 = idsRowSelectBefore.filter((elemento) => !idRowSelect.includes(elemento));
|
|
3015
3074
|
const hasCommonElements = idsRowSelectBefore.some((element) => idRowSelect.includes(element));
|
|
@@ -3020,7 +3079,13 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
3020
3079
|
}
|
|
3021
3080
|
}
|
|
3022
3081
|
} else {
|
|
3082
|
+
debugger;
|
|
3023
3083
|
setSelectionModel([...newSelection]);
|
|
3084
|
+
const selectedId = newSelection[0];
|
|
3085
|
+
const index = arrayRows.findIndex((row) => row.id === selectedId);
|
|
3086
|
+
if (index !== -1 && setSelectedIndex) {
|
|
3087
|
+
setSelectedIndex(index);
|
|
3088
|
+
}
|
|
3024
3089
|
}
|
|
3025
3090
|
};
|
|
3026
3091
|
const processedColumns = columns.map((col) => {
|
|
@@ -3054,7 +3119,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
3054
3119
|
}, [columnVisibilityModel, apiRef]);
|
|
3055
3120
|
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, data && /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ React21.createElement(
|
|
3056
3121
|
DataGridPro,
|
|
3057
|
-
{
|
|
3122
|
+
__spreadProps(__spreadValues({
|
|
3058
3123
|
getRowId,
|
|
3059
3124
|
apiRef,
|
|
3060
3125
|
rowHeight: styleRowHeight,
|
|
@@ -3074,16 +3139,16 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
3074
3139
|
checkboxSelection: validationCheckboxSelection,
|
|
3075
3140
|
rowSelectionModel: selectionModel,
|
|
3076
3141
|
onRowSelectionModelChange: (newSelection) => handleSelectionChange(newSelection),
|
|
3077
|
-
isRowSelectable
|
|
3078
|
-
|
|
3142
|
+
isRowSelectable
|
|
3143
|
+
}, rowSelection != true ? { disableRowSelectionOnClick: true } : {}), {
|
|
3079
3144
|
hideFooter: validationTreeData == true ? true : false,
|
|
3080
3145
|
disableColumnResize: false,
|
|
3081
3146
|
localeText: {
|
|
3082
3147
|
noRowsLabel: "No hay filas",
|
|
3083
3148
|
columnMenuLabel: "Men\xFA de columna",
|
|
3084
3149
|
footerTotalRows: "Filas Totales:",
|
|
3085
|
-
footerRowSelected: (
|
|
3086
|
-
// Ejemplo de traducción dinámica
|
|
3150
|
+
footerRowSelected: () => "",
|
|
3151
|
+
// Ejemplo de traducción dinámica para que diga cuantas filas selecciono count => `${count.toLocaleString()} fila(s) seleccionada(s)`
|
|
3087
3152
|
MuiTablePagination: {
|
|
3088
3153
|
labelRowsPerPage: "Filas por p\xE1gina:",
|
|
3089
3154
|
labelDisplayedRows: ({ from, to, count }) => `${from}\u2013${to} de ${count !== -1 ? count : `m\xE1s de ${to}`}`
|
|
@@ -3094,9 +3159,16 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
3094
3159
|
"& .MuiDataGrid-filler": {
|
|
3095
3160
|
display: "none !important"
|
|
3096
3161
|
},
|
|
3162
|
+
"& .MuiDataGrid-columnHeader": {
|
|
3163
|
+
backgroundColor: "#FBFBFB"
|
|
3164
|
+
},
|
|
3165
|
+
"& .MuiDataGrid-columnSeparator": {
|
|
3166
|
+
display: "none"
|
|
3167
|
+
},
|
|
3097
3168
|
"& .MuiDataGrid-footerContainer": {
|
|
3098
3169
|
minHeight: "26px !important",
|
|
3099
|
-
height: "26px !important"
|
|
3170
|
+
height: "26px !important",
|
|
3171
|
+
backgroundColor: "#FBFBFB"
|
|
3100
3172
|
},
|
|
3101
3173
|
"& .MuiTablePagination-toolbar": {
|
|
3102
3174
|
minHeight: "25px !important",
|
|
@@ -3117,6 +3189,10 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
3117
3189
|
padding: "0 !important",
|
|
3118
3190
|
background: "white"
|
|
3119
3191
|
},
|
|
3192
|
+
// Fila seleccionada (cuando selectionModel selecciona filas)
|
|
3193
|
+
"& .MuiDataGrid-row.Mui-selected .MuiDataGrid-cell": {
|
|
3194
|
+
backgroundColor: "#2063A014"
|
|
3195
|
+
},
|
|
3120
3196
|
// Ocultar celdas vacías completamente
|
|
3121
3197
|
"& .MuiDataGrid-cellEmpty": {
|
|
3122
3198
|
display: "none !important",
|
|
@@ -3195,7 +3271,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, rowsTable, c
|
|
|
3195
3271
|
visibility: "hidden !important"
|
|
3196
3272
|
}
|
|
3197
3273
|
}
|
|
3198
|
-
}
|
|
3274
|
+
})
|
|
3199
3275
|
))));
|
|
3200
3276
|
}
|
|
3201
3277
|
var SCDataGrid = React21.memo(SCDataGridInitial, (prevProps, nextProps) => {
|
|
@@ -4655,7 +4731,7 @@ var SCTime = ({
|
|
|
4655
4731
|
)),
|
|
4656
4732
|
sx: {
|
|
4657
4733
|
backgroundColor: background,
|
|
4658
|
-
padding: "
|
|
4734
|
+
padding: "6px 12px",
|
|
4659
4735
|
cursor: disabled ? "default" : "pointer",
|
|
4660
4736
|
"& input": {
|
|
4661
4737
|
cursor: disabled ? "default" : "pointer"
|
|
@@ -4929,7 +5005,7 @@ var SCActivityCalendar = ({
|
|
|
4929
5005
|
subtitle: /* @__PURE__ */ React42.createElement(React42.Fragment, null, configRangeHour && new Date(event2.date.replace("00:00:00", event2.startTime)).getHours() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[0])).getHours() && new Date(event2.date.replace("00:00:00", event2.finalTime)).getHours() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[1])).getHours() && new Date(event2.date.replace("00:00:00", event2.startTime)).getMinutes() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[0])).getMinutes() && new Date(event2.date.replace("00:00:00", event2.finalTime)).getMinutes() === new Date(event2.date.replace("00:00:00", configRangeHour.split("-")[1])).getMinutes() ? /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(Typography25, null, "Todo el dia"), /* @__PURE__ */ React42.createElement(LightModeOutlinedIcon, { fontSize: "small" })) : /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(Typography25, null, new Date(event2.date.replace("00:00:00", event2.startTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })), /* @__PURE__ */ React42.createElement(ArrowForwardIcon, { fontSize: "small" }), /* @__PURE__ */ React42.createElement(Typography25, null, new Date(event2.date.replace("00:00:00", event2.finalTime)).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: true })))),
|
|
4930
5006
|
iconLeftColor: event2.state === "Finalizada" ? "#C7E49D" : "action",
|
|
4931
5007
|
iconLeft: event2.state === "Finalizada" ? "CheckCircle" : event2.state === "Aplazada" ? "EventBusyOutlined" : event2.state === "En progreso" ? "PendingOutlined" : "RadioButtonUnchecked",
|
|
4932
|
-
description: /* @__PURE__ */ React42.createElement(
|
|
5008
|
+
description: /* @__PURE__ */ React42.createElement(Grid11, { display: "flex", flexDirection: "column", alignItems: "flex-start" }, event2.state === "Aplazada" || event2.state === "En progreso" || event2.state === "Auto asignada" ? /* @__PURE__ */ React42.createElement(Grid11, { display: "flex", flexDirection: "row", alignItems: "center", gap: 0.5, sx: { marginLeft: "7px" } }, /* @__PURE__ */ React42.createElement(Badge2, { variant: "dot", badgeContent: "", sx: { display: "flex", alignItems: "center", "& .MuiBadge-badge": { top: "50%", transform: "translateY(-50%)" }, color: "action" } }), /* @__PURE__ */ React42.createElement(Typography25, null, event2.state == "Auto asignada" ? "Adicional" : event2.state)) : null, /* @__PURE__ */ React42.createElement(Typography25, { variant: "body2" }, event2.equipmentDescription)),
|
|
4933
5009
|
divider: eventosDelDia.length === idx + 1 ? false : true,
|
|
4934
5010
|
colorDisabled: event2.state === "Finalizada" || event2.state === "Aplazada" || event2.state === "En progreso" ? true : false,
|
|
4935
5011
|
fn: fn ? () => fn(event2) : void 0
|
|
@@ -5544,10 +5620,10 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
|
|
|
5544
5620
|
sx: {
|
|
5545
5621
|
minWidth: 140,
|
|
5546
5622
|
width: width || "100%",
|
|
5623
|
+
background: background || "transparent",
|
|
5547
5624
|
"& .MuiPickersInputBase-sectionsContainer": {
|
|
5548
|
-
padding: "
|
|
5549
|
-
}
|
|
5550
|
-
background: background || "transparent"
|
|
5625
|
+
padding: "6px 0px"
|
|
5626
|
+
}
|
|
5551
5627
|
},
|
|
5552
5628
|
slotProps: {
|
|
5553
5629
|
popper: {
|
|
@@ -5684,25 +5760,25 @@ var components = {
|
|
|
5684
5760
|
{
|
|
5685
5761
|
props: { density: "compact" },
|
|
5686
5762
|
style: {
|
|
5687
|
-
"--height": "
|
|
5688
|
-
minHeight: "
|
|
5689
|
-
maxHeight: "
|
|
5763
|
+
"--height": "26px",
|
|
5764
|
+
minHeight: "26px !important",
|
|
5765
|
+
maxHeight: "26px !important"
|
|
5690
5766
|
}
|
|
5691
5767
|
},
|
|
5692
5768
|
{
|
|
5693
5769
|
props: { density: "standard" },
|
|
5694
5770
|
style: {
|
|
5695
|
-
"--height": "
|
|
5696
|
-
minHeight: "
|
|
5697
|
-
maxHeight: "
|
|
5771
|
+
"--height": "32px",
|
|
5772
|
+
minHeight: "32px !important",
|
|
5773
|
+
maxHeight: "32px !important"
|
|
5698
5774
|
}
|
|
5699
5775
|
},
|
|
5700
5776
|
{
|
|
5701
5777
|
props: { density: "comfortable" },
|
|
5702
5778
|
style: {
|
|
5703
|
-
"--height": "
|
|
5704
|
-
minHeight: "
|
|
5705
|
-
maxHeight: "
|
|
5779
|
+
"--height": "40px",
|
|
5780
|
+
minHeight: "40px !important",
|
|
5781
|
+
maxHeight: "40px !important"
|
|
5706
5782
|
}
|
|
5707
5783
|
}
|
|
5708
5784
|
]
|
|
@@ -5712,25 +5788,25 @@ var components = {
|
|
|
5712
5788
|
{
|
|
5713
5789
|
props: { density: "compact" },
|
|
5714
5790
|
style: {
|
|
5715
|
-
"--height": "
|
|
5716
|
-
minHeight: "
|
|
5717
|
-
maxHeight: "
|
|
5791
|
+
"--height": "26px",
|
|
5792
|
+
minHeight: "26px !important",
|
|
5793
|
+
maxHeight: "26px !important"
|
|
5718
5794
|
}
|
|
5719
5795
|
},
|
|
5720
5796
|
{
|
|
5721
5797
|
props: { density: "standard" },
|
|
5722
5798
|
style: {
|
|
5723
|
-
"--height": "
|
|
5724
|
-
minHeight: "
|
|
5725
|
-
maxHeight: "
|
|
5799
|
+
"--height": "32px",
|
|
5800
|
+
minHeight: "32px !important",
|
|
5801
|
+
maxHeight: "32px !important"
|
|
5726
5802
|
}
|
|
5727
5803
|
},
|
|
5728
5804
|
{
|
|
5729
5805
|
props: { density: "comfortable" },
|
|
5730
5806
|
style: {
|
|
5731
|
-
"--height": "
|
|
5732
|
-
minHeight: "
|
|
5733
|
-
maxHeight: "
|
|
5807
|
+
"--height": "40px",
|
|
5808
|
+
minHeight: "40px !important",
|
|
5809
|
+
maxHeight: "40px !important"
|
|
5734
5810
|
}
|
|
5735
5811
|
}
|
|
5736
5812
|
]
|
|
@@ -5743,25 +5819,25 @@ var components = {
|
|
|
5743
5819
|
{
|
|
5744
5820
|
props: { density: "compact" },
|
|
5745
5821
|
style: {
|
|
5746
|
-
"--height": "
|
|
5747
|
-
minHeight: "
|
|
5748
|
-
maxHeight: "
|
|
5822
|
+
"--height": "26px",
|
|
5823
|
+
minHeight: "26px !important",
|
|
5824
|
+
maxHeight: "26px !important"
|
|
5749
5825
|
}
|
|
5750
5826
|
},
|
|
5751
5827
|
{
|
|
5752
5828
|
props: { density: "standard" },
|
|
5753
5829
|
style: {
|
|
5754
|
-
"--height": "
|
|
5755
|
-
minHeight: "
|
|
5756
|
-
maxHeight: "
|
|
5830
|
+
"--height": "32px",
|
|
5831
|
+
minHeight: "32px !important",
|
|
5832
|
+
maxHeight: "32px !important"
|
|
5757
5833
|
}
|
|
5758
5834
|
},
|
|
5759
5835
|
{
|
|
5760
5836
|
props: { density: "comfortable" },
|
|
5761
5837
|
style: {
|
|
5762
|
-
"--height": "
|
|
5763
|
-
minHeight: "
|
|
5764
|
-
maxHeight: "
|
|
5838
|
+
"--height": "40px",
|
|
5839
|
+
minHeight: "40px !important",
|
|
5840
|
+
maxHeight: "40px !important"
|
|
5765
5841
|
}
|
|
5766
5842
|
}
|
|
5767
5843
|
]
|
|
@@ -5794,9 +5870,9 @@ var components = {
|
|
|
5794
5870
|
{
|
|
5795
5871
|
props: { density: "comfortable" },
|
|
5796
5872
|
style: {
|
|
5797
|
-
"--height": "
|
|
5798
|
-
minHeight: "
|
|
5799
|
-
maxHeight: "
|
|
5873
|
+
"--height": "40px",
|
|
5874
|
+
minHeight: "40px !important",
|
|
5875
|
+
maxHeight: "40px !important"
|
|
5800
5876
|
}
|
|
5801
5877
|
}
|
|
5802
5878
|
]
|
|
@@ -5829,9 +5905,9 @@ var components = {
|
|
|
5829
5905
|
{
|
|
5830
5906
|
props: { density: "comfortable" },
|
|
5831
5907
|
style: {
|
|
5832
|
-
"--height": "
|
|
5833
|
-
minHeight: "
|
|
5834
|
-
maxHeight: "
|
|
5908
|
+
"--height": "40px",
|
|
5909
|
+
minHeight: "40px !important",
|
|
5910
|
+
maxHeight: "40px !important"
|
|
5835
5911
|
}
|
|
5836
5912
|
}
|
|
5837
5913
|
],
|
|
@@ -6596,7 +6672,7 @@ var components = {
|
|
|
6596
6672
|
styleOverrides: {
|
|
6597
6673
|
root: {
|
|
6598
6674
|
"&.MuiAutocomplete-root .MuiOutlinedInput-root": {
|
|
6599
|
-
padding: "
|
|
6675
|
+
padding: "3px 14px 4px 10px !important"
|
|
6600
6676
|
},
|
|
6601
6677
|
"& .MuiAutocomplete-endAdornment": {
|
|
6602
6678
|
top: "calc(50% - 12px)",
|