componentes-sinco 1.0.32 → 1.0.34-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 +37 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +37 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -4,6 +4,7 @@ import * as _mui_material from '@mui/material';
|
|
|
4
4
|
import { SxProps } from '@mui/material';
|
|
5
5
|
import * as Muicon from '@mui/icons-material';
|
|
6
6
|
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
7
|
+
import { GridColDef } from '@mui/x-data-grid-pro';
|
|
7
8
|
import dayjs, { Dayjs } from 'dayjs';
|
|
8
9
|
import * as _mui_material_styles from '@mui/material/styles';
|
|
9
10
|
|
|
@@ -320,7 +321,7 @@ declare const SCCalendarSwipeable: ({ background, setState, state, }: SCCalendar
|
|
|
320
321
|
|
|
321
322
|
interface SCDataGridInitialProps<T> {
|
|
322
323
|
data: T[];
|
|
323
|
-
columns:
|
|
324
|
+
columns: GridColDef[];
|
|
324
325
|
rowsTable?: number;
|
|
325
326
|
checkboxSelection?: boolean;
|
|
326
327
|
width?: string | number;
|
|
@@ -601,8 +602,9 @@ interface SCTimeProps {
|
|
|
601
602
|
timeStep?: number;
|
|
602
603
|
state: Dayjs | null;
|
|
603
604
|
setState: (value: Dayjs | null) => void;
|
|
605
|
+
error: boolean;
|
|
604
606
|
}
|
|
605
|
-
declare const SCTime: ({ label, required, disabled, background, timeStep, state, setState, }: SCTimeProps) => React__default.JSX.Element;
|
|
607
|
+
declare const SCTime: ({ label, required, disabled, background, timeStep, state, setState, error }: SCTimeProps) => React__default.JSX.Element;
|
|
606
608
|
|
|
607
609
|
interface SCCardProps {
|
|
608
610
|
title?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as _mui_material from '@mui/material';
|
|
|
4
4
|
import { SxProps } from '@mui/material';
|
|
5
5
|
import * as Muicon from '@mui/icons-material';
|
|
6
6
|
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
7
|
+
import { GridColDef } from '@mui/x-data-grid-pro';
|
|
7
8
|
import dayjs, { Dayjs } from 'dayjs';
|
|
8
9
|
import * as _mui_material_styles from '@mui/material/styles';
|
|
9
10
|
|
|
@@ -320,7 +321,7 @@ declare const SCCalendarSwipeable: ({ background, setState, state, }: SCCalendar
|
|
|
320
321
|
|
|
321
322
|
interface SCDataGridInitialProps<T> {
|
|
322
323
|
data: T[];
|
|
323
|
-
columns:
|
|
324
|
+
columns: GridColDef[];
|
|
324
325
|
rowsTable?: number;
|
|
325
326
|
checkboxSelection?: boolean;
|
|
326
327
|
width?: string | number;
|
|
@@ -601,8 +602,9 @@ interface SCTimeProps {
|
|
|
601
602
|
timeStep?: number;
|
|
602
603
|
state: Dayjs | null;
|
|
603
604
|
setState: (value: Dayjs | null) => void;
|
|
605
|
+
error: boolean;
|
|
604
606
|
}
|
|
605
|
-
declare const SCTime: ({ label, required, disabled, background, timeStep, state, setState, }: SCTimeProps) => React__default.JSX.Element;
|
|
607
|
+
declare const SCTime: ({ label, required, disabled, background, timeStep, state, setState, error }: SCTimeProps) => React__default.JSX.Element;
|
|
606
608
|
|
|
607
609
|
interface SCCardProps {
|
|
608
610
|
title?: string;
|
package/dist/index.js
CHANGED
|
@@ -2682,6 +2682,20 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2682
2682
|
LicenseInfo2.setLicenseKey(
|
|
2683
2683
|
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
2684
2684
|
);
|
|
2685
|
+
const columnsWidthConfig = React21.useMemo(() => {
|
|
2686
|
+
var _a, _b;
|
|
2687
|
+
if (!columns || columns.length === 0) return columns;
|
|
2688
|
+
const cols = [...columns];
|
|
2689
|
+
const lastIndex = cols.length - 1;
|
|
2690
|
+
if (!cols[lastIndex].flex) {
|
|
2691
|
+
cols[lastIndex] = __spreadProps(__spreadValues({}, cols[lastIndex]), {
|
|
2692
|
+
flex: 1,
|
|
2693
|
+
minWidth: (_b = (_a = cols[lastIndex].minWidth) != null ? _a : cols[lastIndex].width) != null ? _b : 120
|
|
2694
|
+
});
|
|
2695
|
+
delete cols[lastIndex].width;
|
|
2696
|
+
}
|
|
2697
|
+
return cols;
|
|
2698
|
+
}, [columns]);
|
|
2685
2699
|
const theme = useTheme();
|
|
2686
2700
|
const apiRef = useGridApiRef();
|
|
2687
2701
|
const isRowSelectable = (params) => params.row.bloqueoChecked == false ? false : true;
|
|
@@ -2771,7 +2785,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2771
2785
|
overflow: "hidden",
|
|
2772
2786
|
textOverflow: "ellipsis",
|
|
2773
2787
|
whiteSpace: "nowrap",
|
|
2774
|
-
color: "
|
|
2788
|
+
color: "text.primary",
|
|
2775
2789
|
display: "flex",
|
|
2776
2790
|
alignItems: "center",
|
|
2777
2791
|
paddingLeft: params.rowNode.depth == 0 ? "5px" : params.rowNode.depth == 1 ? "15px" : "25px",
|
|
@@ -2900,7 +2914,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2900
2914
|
apiRef,
|
|
2901
2915
|
rowHeight: styleRowHeight,
|
|
2902
2916
|
rows: arrayRows,
|
|
2903
|
-
columns,
|
|
2917
|
+
columns: columnsWidthConfig,
|
|
2904
2918
|
density: styleDensity,
|
|
2905
2919
|
treeData: validationTreeData,
|
|
2906
2920
|
getTreeDataPath: validationTreeData == true ? getTreeDataPaths : void 0,
|
|
@@ -2945,7 +2959,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2945
2959
|
"&.MuiDataGrid-root": {
|
|
2946
2960
|
[`--DataGrid-topContainerHeight`]: `${styleTopContainerHeight} !important`
|
|
2947
2961
|
},
|
|
2948
|
-
"MuiDataGrid-root .MuiDataGrid-virtualScrollerContent .MuiDataGrid-row": {
|
|
2962
|
+
"& .MuiDataGrid-root .MuiDataGrid-virtualScrollerContent .MuiDataGrid-row": {
|
|
2949
2963
|
"--height": "0px !important",
|
|
2950
2964
|
"minHeight": "0px !important",
|
|
2951
2965
|
"maxHeight": "0px !important"
|
|
@@ -2953,6 +2967,23 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
|
|
|
2953
2967
|
"& .MuiDataGrid-cell": {
|
|
2954
2968
|
padding: "0 !important",
|
|
2955
2969
|
background: "white"
|
|
2970
|
+
},
|
|
2971
|
+
"& .MuiDataGrid-cell .MuiDataGrid-cellEmpty": {
|
|
2972
|
+
display: "none",
|
|
2973
|
+
width: "0px"
|
|
2974
|
+
},
|
|
2975
|
+
"& .MuiDataGrid-virtualScroller": {
|
|
2976
|
+
overflowY: "auto !important",
|
|
2977
|
+
"&::-webkit-scrollbar": {
|
|
2978
|
+
width: "0px"
|
|
2979
|
+
},
|
|
2980
|
+
"&:hover::-webkit-scrollbar": {
|
|
2981
|
+
width: "8px"
|
|
2982
|
+
},
|
|
2983
|
+
"&::-webkit-scrollbar-thumb": {
|
|
2984
|
+
backgroundColor: "rgba(0,0,0,.2)",
|
|
2985
|
+
borderRadius: "4px"
|
|
2986
|
+
}
|
|
2956
2987
|
}
|
|
2957
2988
|
}
|
|
2958
2989
|
}
|
|
@@ -4335,13 +4366,14 @@ var SCTime = ({
|
|
|
4335
4366
|
background = "transparent",
|
|
4336
4367
|
timeStep = 5,
|
|
4337
4368
|
state,
|
|
4338
|
-
setState
|
|
4369
|
+
setState,
|
|
4370
|
+
error
|
|
4339
4371
|
}) => {
|
|
4340
4372
|
LicenseInfo3.setLicenseKey(
|
|
4341
4373
|
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
4342
4374
|
);
|
|
4343
4375
|
const isTimeEmpty = required && !state;
|
|
4344
|
-
const hasError = isTimeEmpty;
|
|
4376
|
+
const hasError = isTimeEmpty || error;
|
|
4345
4377
|
const [anchorEl, setAnchorEl] = useState20(null);
|
|
4346
4378
|
const [isOpenPopover, setIsOpenPopover] = useState20(false);
|
|
4347
4379
|
const [popoverPlacement, setPopoverPlacement] = useState20("bottom");
|