componentes-sinco 1.0.33 → 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 CHANGED
@@ -2759,6 +2759,20 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2759
2759
  import_x_license2.LicenseInfo.setLicenseKey(
2760
2760
  "77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
2761
2761
  );
2762
+ const columnsWidthConfig = import_react27.default.useMemo(() => {
2763
+ var _a, _b;
2764
+ if (!columns || columns.length === 0) return columns;
2765
+ const cols = [...columns];
2766
+ const lastIndex = cols.length - 1;
2767
+ if (!cols[lastIndex].flex) {
2768
+ cols[lastIndex] = __spreadProps(__spreadValues({}, cols[lastIndex]), {
2769
+ flex: 1,
2770
+ minWidth: (_b = (_a = cols[lastIndex].minWidth) != null ? _a : cols[lastIndex].width) != null ? _b : 120
2771
+ });
2772
+ delete cols[lastIndex].width;
2773
+ }
2774
+ return cols;
2775
+ }, [columns]);
2762
2776
  const theme = (0, import_styles.useTheme)();
2763
2777
  const apiRef = (0, import_x_data_grid_pro.useGridApiRef)();
2764
2778
  const isRowSelectable = (params) => params.row.bloqueoChecked == false ? false : true;
@@ -2848,7 +2862,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2848
2862
  overflow: "hidden",
2849
2863
  textOverflow: "ellipsis",
2850
2864
  whiteSpace: "nowrap",
2851
- color: "#101840DE",
2865
+ color: "text.primary",
2852
2866
  display: "flex",
2853
2867
  alignItems: "center",
2854
2868
  paddingLeft: params.rowNode.depth == 0 ? "5px" : params.rowNode.depth == 1 ? "15px" : "25px",
@@ -2977,7 +2991,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
2977
2991
  apiRef,
2978
2992
  rowHeight: styleRowHeight,
2979
2993
  rows: arrayRows,
2980
- columns,
2994
+ columns: columnsWidthConfig,
2981
2995
  density: styleDensity,
2982
2996
  treeData: validationTreeData,
2983
2997
  getTreeDataPath: validationTreeData == true ? getTreeDataPaths : void 0,
@@ -3022,7 +3036,7 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
3022
3036
  "&.MuiDataGrid-root": {
3023
3037
  [`--DataGrid-topContainerHeight`]: `${styleTopContainerHeight} !important`
3024
3038
  },
3025
- "MuiDataGrid-root .MuiDataGrid-virtualScrollerContent .MuiDataGrid-row": {
3039
+ "& .MuiDataGrid-root .MuiDataGrid-virtualScrollerContent .MuiDataGrid-row": {
3026
3040
  "--height": "0px !important",
3027
3041
  "minHeight": "0px !important",
3028
3042
  "maxHeight": "0px !important"
@@ -3030,6 +3044,23 @@ function SCDataGridInitial({ data, columns, groupColumns, rowsTable, checkboxSel
3030
3044
  "& .MuiDataGrid-cell": {
3031
3045
  padding: "0 !important",
3032
3046
  background: "white"
3047
+ },
3048
+ "& .MuiDataGrid-cell .MuiDataGrid-cellEmpty": {
3049
+ display: "none",
3050
+ width: "0px"
3051
+ },
3052
+ "& .MuiDataGrid-virtualScroller": {
3053
+ overflowY: "auto !important",
3054
+ "&::-webkit-scrollbar": {
3055
+ width: "0px"
3056
+ },
3057
+ "&:hover::-webkit-scrollbar": {
3058
+ width: "8px"
3059
+ },
3060
+ "&::-webkit-scrollbar-thumb": {
3061
+ backgroundColor: "rgba(0,0,0,.2)",
3062
+ borderRadius: "4px"
3063
+ }
3033
3064
  }
3034
3065
  }
3035
3066
  }
@@ -4412,13 +4443,14 @@ var SCTime = ({
4412
4443
  background = "transparent",
4413
4444
  timeStep = 5,
4414
4445
  state,
4415
- setState
4446
+ setState,
4447
+ error
4416
4448
  }) => {
4417
4449
  import_x_license3.LicenseInfo.setLicenseKey(
4418
4450
  "77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
4419
4451
  );
4420
4452
  const isTimeEmpty = required && !state;
4421
- const hasError = isTimeEmpty;
4453
+ const hasError = isTimeEmpty || error;
4422
4454
  const [anchorEl, setAnchorEl] = (0, import_react48.useState)(null);
4423
4455
  const [isOpenPopover, setIsOpenPopover] = (0, import_react48.useState)(false);
4424
4456
  const [popoverPlacement, setPopoverPlacement] = (0, import_react48.useState)("bottom");