componentes-sinco 1.3.3 → 1.3.5
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 +222 -122
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -3
- package/dist/index.d.ts +16 -3
- package/dist/index.js +188 -88
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1446,6 +1446,7 @@ var SCTextField = ({
|
|
|
1446
1446
|
required,
|
|
1447
1447
|
size,
|
|
1448
1448
|
width = "100%",
|
|
1449
|
+
alignText = "left",
|
|
1449
1450
|
color,
|
|
1450
1451
|
background,
|
|
1451
1452
|
//Funcionales
|
|
@@ -1603,7 +1604,14 @@ var SCTextField = ({
|
|
|
1603
1604
|
onKeyDown: handleKeyDown,
|
|
1604
1605
|
onChange: handleInputChange,
|
|
1605
1606
|
onBlur: handleBlur,
|
|
1606
|
-
|
|
1607
|
+
sx: iconInputStart || iconInputEnd ? {
|
|
1608
|
+
height: "32px",
|
|
1609
|
+
"& .MuiInputAdornment-root": {
|
|
1610
|
+
height: "32px",
|
|
1611
|
+
maxHeight: "32px"
|
|
1612
|
+
}
|
|
1613
|
+
} : void 0,
|
|
1614
|
+
inputProps: { maxLength: maxLength ? maxLength : 50, style: { textAlign: alignText } },
|
|
1607
1615
|
type: !showPassword && format3 === "password" ? "password" : (format3 || "text").toUpperCase() === "INT" || (format3 || "text").toUpperCase() === "DECIMAL" ? "number" : "text",
|
|
1608
1616
|
className: format3 === "password" && !showPassword ? "" : "",
|
|
1609
1617
|
placeholder,
|
|
@@ -1853,6 +1861,7 @@ function SCSelect({
|
|
|
1853
1861
|
const [prevData, setPrevData] = import_react16.default.useState(data);
|
|
1854
1862
|
const [error, setError] = import_react16.default.useState(false);
|
|
1855
1863
|
const [placement, setPlacement] = import_react16.default.useState("bottom");
|
|
1864
|
+
const [menuWidth, setMenuWidth] = import_react16.default.useState();
|
|
1856
1865
|
const containerRef = import_react16.default.useRef(null);
|
|
1857
1866
|
(0, import_react16.useEffect)(() => {
|
|
1858
1867
|
if (error) {
|
|
@@ -1888,6 +1897,7 @@ function SCSelect({
|
|
|
1888
1897
|
const spaceBelow = window.innerHeight - rect.bottom;
|
|
1889
1898
|
const estimatedMenuHeight = Math.min(300, data.length * 36 + 16);
|
|
1890
1899
|
setPlacement(spaceBelow < estimatedMenuHeight ? "top" : "bottom");
|
|
1900
|
+
setMenuWidth(rect.width);
|
|
1891
1901
|
}
|
|
1892
1902
|
};
|
|
1893
1903
|
const handleChange = (event2) => {
|
|
@@ -1930,6 +1940,20 @@ function SCSelect({
|
|
|
1930
1940
|
disabled: disabled || false,
|
|
1931
1941
|
error,
|
|
1932
1942
|
sx: { height: "32px" },
|
|
1943
|
+
renderValue: (selected) => {
|
|
1944
|
+
const selectedOption = data.find((item) => getItemValue(item).value === selected);
|
|
1945
|
+
if (!selectedOption) return "";
|
|
1946
|
+
const { icon, text } = getItemValue(selectedOption);
|
|
1947
|
+
return /* @__PURE__ */ import_react16.default.createElement(import_material9.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5, overflow: "hidden" } }, icon != void 0 && /* @__PURE__ */ import_react16.default.createElement(import_material9.SvgIcon, { fontSize: "small", color: "action", component: icon, sx: { flexShrink: 0 } }), /* @__PURE__ */ import_react16.default.createElement(
|
|
1948
|
+
import_material9.Box,
|
|
1949
|
+
{
|
|
1950
|
+
component: "span",
|
|
1951
|
+
title: text,
|
|
1952
|
+
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
1953
|
+
},
|
|
1954
|
+
text
|
|
1955
|
+
));
|
|
1956
|
+
},
|
|
1933
1957
|
MenuProps: {
|
|
1934
1958
|
sx: {
|
|
1935
1959
|
zIndex: 1400
|
|
@@ -1937,7 +1961,8 @@ function SCSelect({
|
|
|
1937
1961
|
PaperProps: {
|
|
1938
1962
|
sx: {
|
|
1939
1963
|
maxHeight: "300px",
|
|
1940
|
-
|
|
1964
|
+
width: menuWidth ? `${menuWidth}px` : "100%",
|
|
1965
|
+
maxWidth: menuWidth ? `${menuWidth}px` : "100%"
|
|
1941
1966
|
}
|
|
1942
1967
|
},
|
|
1943
1968
|
anchorOrigin: {
|
|
@@ -1953,7 +1978,15 @@ function SCSelect({
|
|
|
1953
1978
|
}
|
|
1954
1979
|
},
|
|
1955
1980
|
data.map((option, index) => {
|
|
1956
|
-
return /* @__PURE__ */ import_react16.default.createElement(import_material9.MenuItem, { key: index, value: getItemValue(option).value }, getItemValue(option).icon != void 0 ? /* @__PURE__ */ import_react16.default.createElement(import_material9.ListItemIcon, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ import_react16.default.createElement(import_material9.SvgIcon, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "", /* @__PURE__ */ import_react16.default.createElement(
|
|
1981
|
+
return /* @__PURE__ */ import_react16.default.createElement(import_material9.MenuItem, { key: index, value: getItemValue(option).value, sx: { minWidth: 0 } }, getItemValue(option).icon != void 0 ? /* @__PURE__ */ import_react16.default.createElement(import_material9.ListItemIcon, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ import_react16.default.createElement(import_material9.SvgIcon, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "", /* @__PURE__ */ import_react16.default.createElement(
|
|
1982
|
+
import_material9.ListItemText,
|
|
1983
|
+
{
|
|
1984
|
+
primary: getItemValue(option).text,
|
|
1985
|
+
color: "text.primary",
|
|
1986
|
+
sx: { overflow: "hidden" },
|
|
1987
|
+
slotProps: { primary: { noWrap: true, title: getItemValue(option).text } }
|
|
1988
|
+
}
|
|
1989
|
+
));
|
|
1957
1990
|
})
|
|
1958
1991
|
)
|
|
1959
1992
|
)));
|
|
@@ -5216,22 +5249,25 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, dividerH
|
|
|
5216
5249
|
var import_react51 = __toESM(require("react"), 1);
|
|
5217
5250
|
var import_x_data_grid_pro = require("@mui/x-data-grid-pro");
|
|
5218
5251
|
var import_x_license2 = require("@mui/x-license");
|
|
5252
|
+
var import_material36 = require("@mui/material");
|
|
5219
5253
|
var import_KeyboardArrowDown = __toESM(require("@mui/icons-material/KeyboardArrowDown"), 1);
|
|
5220
5254
|
var import_KeyboardArrowUp = __toESM(require("@mui/icons-material/KeyboardArrowUp"), 1);
|
|
5221
5255
|
var import_styles = require("@mui/material/styles");
|
|
5222
|
-
function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPage, rowsTable, rowSelection, checkboxSelection, width, maxHeight, density, disableColumnMenu, disableHeader, disableColumnSorting, setSelectedIndex, selectedIndex = 0, setSelectedRow, selectedRow }) {
|
|
5256
|
+
function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPage, rowsTable, rowSelection, checkboxSelection, width, maxHeight, density, disableColumnMenu, disableHeader, disableColumnSorting, setSelectedIndex, selectedIndex = 0, setSelectedRow, selectedRow, insertRowFields, onAddRow }) {
|
|
5257
|
+
var _a;
|
|
5223
5258
|
import_x_license2.LicenseInfo.setLicenseKey(
|
|
5224
5259
|
"aa892a011e4c240f3cdaf811ecfff54fTz0xMjkyODQsRT0xODEwNDI1NTk5MDAwLFM9cHJvLExNPWFubnVhbCxQVj1RMy0yMDI0LEtWPTI="
|
|
5225
5260
|
);
|
|
5226
5261
|
const theme = (0, import_styles.useTheme)();
|
|
5227
5262
|
const apiRef = (0, import_x_data_grid_pro.useGridApiRef)();
|
|
5228
5263
|
const isRowSelectable = (params) => params.row.bloqueoChecked == false ? false : true;
|
|
5264
|
+
const showInsertRow = insertRowFields != void 0 && insertRowFields.length > 0;
|
|
5229
5265
|
function generateRandomId() {
|
|
5230
5266
|
return Math.floor(Math.random() * 1e6);
|
|
5231
5267
|
}
|
|
5232
5268
|
const getTreeDataPaths = (row) => {
|
|
5233
|
-
var
|
|
5234
|
-
const group1Value = groupColumns && ((
|
|
5269
|
+
var _a2, _b, _c;
|
|
5270
|
+
const group1Value = groupColumns && ((_a2 = groupColumns(row)) == null ? void 0 : _a2.valueGroup1);
|
|
5235
5271
|
const group2Value = groupColumns && ((_b = groupColumns(row)) == null ? void 0 : _b.valueGroup2);
|
|
5236
5272
|
const fieldValue = groupColumns && ((_c = groupColumns(row)) == null ? void 0 : _c.fieldFirstColumn);
|
|
5237
5273
|
return [
|
|
@@ -5245,7 +5281,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5245
5281
|
headerName: groupColumns ? groupColumns(data[0]).headerNameFirstColumn : "Agrupador",
|
|
5246
5282
|
flex: 1,
|
|
5247
5283
|
renderCell: (params) => {
|
|
5248
|
-
var
|
|
5284
|
+
var _a2, _b;
|
|
5249
5285
|
let label = params.value.toString().includes("/") ? params.value.split("/")[0].toString() : params.value.toString();
|
|
5250
5286
|
let maxDepth = 0;
|
|
5251
5287
|
if (groupColumns && data.length > 0) {
|
|
@@ -5260,8 +5296,8 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5260
5296
|
if (groupColumns) {
|
|
5261
5297
|
const originalItem = data.find(
|
|
5262
5298
|
(item) => {
|
|
5263
|
-
var
|
|
5264
|
-
return String((
|
|
5299
|
+
var _a3;
|
|
5300
|
+
return String((_a3 = groupColumns(item)) == null ? void 0 : _a3.valueGroup1) === label;
|
|
5265
5301
|
}
|
|
5266
5302
|
);
|
|
5267
5303
|
if (originalItem) {
|
|
@@ -5270,22 +5306,22 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5270
5306
|
}
|
|
5271
5307
|
}
|
|
5272
5308
|
let subgroup1 = arrayRows.filter((r) => {
|
|
5273
|
-
var
|
|
5274
|
-
return groupColumns && String((
|
|
5309
|
+
var _a3;
|
|
5310
|
+
return groupColumns && String((_a3 = groupColumns(r)) == null ? void 0 : _a3.valueGroup1) === label;
|
|
5275
5311
|
}).map((r) => {
|
|
5276
|
-
var
|
|
5277
|
-
return groupColumns && String(((
|
|
5312
|
+
var _a3, _b2;
|
|
5313
|
+
return groupColumns && String(((_a3 = groupColumns(r)) == null ? void 0 : _a3.valueGroup2) || ((_b2 = groupColumns(r)) == null ? void 0 : _b2.fieldFirstColumn));
|
|
5278
5314
|
});
|
|
5279
5315
|
const groupedDataLength1 = subgroup1.filter((valor, indiceActual, arreglo) => arreglo.indexOf(valor) === indiceActual);
|
|
5280
5316
|
label = `${customLabel} (${groupedDataLength1.length})`;
|
|
5281
|
-
} else if (((
|
|
5317
|
+
} else if (((_a2 = groupColumns(data[0])) == null ? void 0 : _a2.valueGroup2) && params.rowNode.depth === 1) {
|
|
5282
5318
|
const labelGrouping1 = (_b = params.api.getRowNode(params.rowNode.parent)) == null ? void 0 : _b.groupingKey.toString();
|
|
5283
5319
|
let customLabel = label;
|
|
5284
5320
|
if (groupColumns) {
|
|
5285
5321
|
const originalItem = data.find(
|
|
5286
5322
|
(item) => {
|
|
5287
|
-
var
|
|
5288
|
-
return String((
|
|
5323
|
+
var _a3;
|
|
5324
|
+
return String((_a3 = groupColumns(item)) == null ? void 0 : _a3.valueGroup2) === label;
|
|
5289
5325
|
}
|
|
5290
5326
|
);
|
|
5291
5327
|
if (originalItem) {
|
|
@@ -5295,8 +5331,8 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5295
5331
|
}
|
|
5296
5332
|
const groupedDataLength2 = arrayRows.filter(
|
|
5297
5333
|
(r) => {
|
|
5298
|
-
var
|
|
5299
|
-
return groupColumns && String((
|
|
5334
|
+
var _a3, _b2;
|
|
5335
|
+
return groupColumns && String((_a3 = groupColumns(r)) == null ? void 0 : _a3.valueGroup1) === labelGrouping1 && groupColumns && String((_b2 = groupColumns(r)) == null ? void 0 : _b2.valueGroup2) === label;
|
|
5300
5336
|
}
|
|
5301
5337
|
).length;
|
|
5302
5338
|
label = `${customLabel} (${groupedDataLength2})`;
|
|
@@ -5341,25 +5377,25 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5341
5377
|
);
|
|
5342
5378
|
},
|
|
5343
5379
|
colSpan: (params) => {
|
|
5344
|
-
var
|
|
5380
|
+
var _a2, _b;
|
|
5345
5381
|
const value = String(params);
|
|
5346
|
-
const fieldGrouping1 = groupColumns ? (
|
|
5382
|
+
const fieldGrouping1 = groupColumns ? (_a2 = groupColumns(data[0])) == null ? void 0 : _a2.valueGroup1 : void 0;
|
|
5347
5383
|
const fieldGrouping2 = groupColumns ? (_b = groupColumns(data[0])) == null ? void 0 : _b.valueGroup2 : void 0;
|
|
5348
5384
|
let agrupado1 = false;
|
|
5349
5385
|
let agrupado2 = false;
|
|
5350
5386
|
if (fieldGrouping1 != void 0) {
|
|
5351
5387
|
agrupado1 = arrayRows.some(
|
|
5352
5388
|
(row) => {
|
|
5353
|
-
var
|
|
5354
|
-
return groupColumns && String((
|
|
5389
|
+
var _a3;
|
|
5390
|
+
return groupColumns && String((_a3 = groupColumns(row)) == null ? void 0 : _a3.valueGroup1) === value;
|
|
5355
5391
|
}
|
|
5356
5392
|
);
|
|
5357
5393
|
}
|
|
5358
5394
|
if (fieldGrouping2 != void 0) {
|
|
5359
5395
|
agrupado2 = arrayRows.some(
|
|
5360
5396
|
(row) => {
|
|
5361
|
-
var
|
|
5362
|
-
return groupColumns && String((
|
|
5397
|
+
var _a3;
|
|
5398
|
+
return groupColumns && String((_a3 = groupColumns(row)) == null ? void 0 : _a3.valueGroup2) === value;
|
|
5363
5399
|
}
|
|
5364
5400
|
);
|
|
5365
5401
|
}
|
|
@@ -5381,11 +5417,31 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5381
5417
|
const [pageSize, setPageSize] = (0, import_react51.useState)(rows);
|
|
5382
5418
|
const [arrayRows, setArrayRows] = (0, import_react51.useState)([]);
|
|
5383
5419
|
const [selectionModel, setSelectionModel] = (0, import_react51.useState)([]);
|
|
5420
|
+
const [insertRowValues, setInsertRowValues] = (0, import_react51.useState)({});
|
|
5421
|
+
const INSERT_ROW_ID = "__sc-datagrid-insert-row__";
|
|
5422
|
+
const resolvedGetRowId = (row) => (row == null ? void 0 : row.__isInsertRow) ? INSERT_ROW_ID : getRowId ? getRowId(row) : row.id;
|
|
5423
|
+
const pinnedRows = showInsertRow ? { bottom: [{ __isInsertRow: true }] } : void 0;
|
|
5424
|
+
const normalizedInsertRowFields = (insertRowFields && insertRowFields.length > 0 ? insertRowFields : [(_a = columns[0]) == null ? void 0 : _a.field]).map((item) => typeof item === "string" ? { field: item } : item);
|
|
5425
|
+
const insertRowTargetFields = normalizedInsertRowFields.map((item) => item.field);
|
|
5426
|
+
const isInsertRowValueFilled = (value) => value !== void 0 && value !== null && (typeof value !== "string" || value.trim() !== "");
|
|
5427
|
+
const hasInsertRowValue = () => insertRowTargetFields.some((field) => isInsertRowValueFilled(insertRowValues[field]));
|
|
5428
|
+
const handleAddInsertRow = () => {
|
|
5429
|
+
if (!hasInsertRowValue()) return;
|
|
5430
|
+
const nextId = Math.max(0, ...arrayRows.map((row) => typeof row.id === "number" ? row.id : 0)) + 1;
|
|
5431
|
+
const newRow = { id: nextId };
|
|
5432
|
+
insertRowTargetFields.forEach((field) => {
|
|
5433
|
+
const value = insertRowValues[field];
|
|
5434
|
+
if (isInsertRowValueFilled(value)) newRow[field] = typeof value === "string" ? value.trim() : value;
|
|
5435
|
+
});
|
|
5436
|
+
setArrayRows((prev) => [...prev, newRow]);
|
|
5437
|
+
setInsertRowValues({});
|
|
5438
|
+
onAddRow && onAddRow(newRow);
|
|
5439
|
+
};
|
|
5384
5440
|
(0, import_react51.useEffect)(() => {
|
|
5385
|
-
var
|
|
5441
|
+
var _a2;
|
|
5386
5442
|
if (setSelectedRow) {
|
|
5387
5443
|
setSelectedRow(arrayRows[selectedIndex]);
|
|
5388
|
-
setSelectionModel(((
|
|
5444
|
+
setSelectionModel(((_a2 = arrayRows[selectedIndex]) == null ? void 0 : _a2.id) ? [arrayRows[selectedIndex].id] : []);
|
|
5389
5445
|
}
|
|
5390
5446
|
}, [selectedIndex]);
|
|
5391
5447
|
(0, import_react51.useEffect)(() => {
|
|
@@ -5394,7 +5450,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5394
5450
|
}
|
|
5395
5451
|
}, [data]);
|
|
5396
5452
|
const dataConvertRows = (data2, columnId) => {
|
|
5397
|
-
var
|
|
5453
|
+
var _a2;
|
|
5398
5454
|
let dataConvert = [];
|
|
5399
5455
|
if ((data2 == null ? void 0 : data2.length) > 0) {
|
|
5400
5456
|
const dataKeys = Object.keys(data2[0]);
|
|
@@ -5412,7 +5468,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5412
5468
|
setArrayRows(dataConvert);
|
|
5413
5469
|
if (arrayRows.length == 0 && (groupDataLenght < 1 && validationTreeData != true)) {
|
|
5414
5470
|
setSelectedRow && setSelectedRow(dataConvert[selectedIndex]);
|
|
5415
|
-
setSelectionModel([(
|
|
5471
|
+
setSelectionModel([(_a2 = dataConvert[0]) == null ? void 0 : _a2.id]);
|
|
5416
5472
|
}
|
|
5417
5473
|
};
|
|
5418
5474
|
const handleSelectionChange = (newSelection) => {
|
|
@@ -5454,15 +5510,56 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5454
5510
|
}
|
|
5455
5511
|
}
|
|
5456
5512
|
};
|
|
5457
|
-
const processedColumns = columns.map((col) => {
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
}
|
|
5464
|
-
|
|
5465
|
-
|
|
5513
|
+
const processedColumns = columns.map((col, index) => {
|
|
5514
|
+
const baseCol = col.width !== void 0 || col.flex !== void 0 ? col : __spreadProps(__spreadValues({}, col), { flex: 1 });
|
|
5515
|
+
if (!showInsertRow) return baseCol;
|
|
5516
|
+
const isLastColumn = index === columns.length - 1;
|
|
5517
|
+
const isInputField = !isLastColumn && insertRowTargetFields.includes(baseCol.field);
|
|
5518
|
+
const originalRenderCell = baseCol.renderCell;
|
|
5519
|
+
return __spreadProps(__spreadValues({}, baseCol), {
|
|
5520
|
+
renderCell: (params) => {
|
|
5521
|
+
if (params.id !== INSERT_ROW_ID) {
|
|
5522
|
+
return originalRenderCell ? originalRenderCell(params) : params.formattedValue;
|
|
5523
|
+
}
|
|
5524
|
+
if (isInputField) {
|
|
5525
|
+
const fieldConfig = normalizedInsertRowFields.find((item) => item.field === baseCol.field);
|
|
5526
|
+
const setFieldValue = (newValue) => setInsertRowValues((prev) => __spreadProps(__spreadValues({}, prev), { [baseCol.field]: newValue }));
|
|
5527
|
+
if (fieldConfig == null ? void 0 : fieldConfig.renderCell) {
|
|
5528
|
+
return fieldConfig.renderCell({
|
|
5529
|
+
value: insertRowValues[baseCol.field],
|
|
5530
|
+
onChange: setFieldValue,
|
|
5531
|
+
field: baseCol.field
|
|
5532
|
+
});
|
|
5533
|
+
}
|
|
5534
|
+
return /* @__PURE__ */ import_react51.default.createElement(
|
|
5535
|
+
import_material36.TextField,
|
|
5536
|
+
{
|
|
5537
|
+
variant: "outlined",
|
|
5538
|
+
size: "small",
|
|
5539
|
+
placeholder: (fieldConfig == null ? void 0 : fieldConfig.placeholder) || baseCol.headerName || `Escribir ${baseCol.field}`,
|
|
5540
|
+
value: insertRowValues[baseCol.field] || "",
|
|
5541
|
+
onChange: (e) => setFieldValue(e.target.value),
|
|
5542
|
+
onKeyDown: (e) => {
|
|
5543
|
+
if (e.key === "Enter") handleAddInsertRow();
|
|
5544
|
+
},
|
|
5545
|
+
sx: { width: "100%", "& .MuiOutlinedInput-root": { height: "32px" } }
|
|
5546
|
+
}
|
|
5547
|
+
);
|
|
5548
|
+
}
|
|
5549
|
+
if (isLastColumn) {
|
|
5550
|
+
return /* @__PURE__ */ import_react51.default.createElement(
|
|
5551
|
+
import_material36.Button,
|
|
5552
|
+
{
|
|
5553
|
+
variant: "contained",
|
|
5554
|
+
size: "small",
|
|
5555
|
+
disabled: !hasInsertRowValue(),
|
|
5556
|
+
onClick: handleAddInsertRow
|
|
5557
|
+
},
|
|
5558
|
+
"Agregar"
|
|
5559
|
+
);
|
|
5560
|
+
}
|
|
5561
|
+
return null;
|
|
5562
|
+
}
|
|
5466
5563
|
});
|
|
5467
5564
|
});
|
|
5468
5565
|
const columnVisibilityModel = {};
|
|
@@ -5485,7 +5582,8 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5485
5582
|
return /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, data && /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, /* @__PURE__ */ import_react51.default.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ import_react51.default.createElement(
|
|
5486
5583
|
import_x_data_grid_pro.DataGridPro,
|
|
5487
5584
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
5488
|
-
getRowId,
|
|
5585
|
+
getRowId: showInsertRow ? resolvedGetRowId : getRowId,
|
|
5586
|
+
pinnedRows,
|
|
5489
5587
|
apiRef,
|
|
5490
5588
|
rowHeight: styleRowHeight,
|
|
5491
5589
|
rows: arrayRows,
|
|
@@ -5522,6 +5620,12 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5522
5620
|
},
|
|
5523
5621
|
sx: {
|
|
5524
5622
|
maxHeight: maxHeight ? `${maxHeight}px` : "none",
|
|
5623
|
+
"& .MuiDataGrid-pinnedRows": {
|
|
5624
|
+
boxShadow: "0px -2px 3px -2px rgba(0,0,0,0.15)"
|
|
5625
|
+
},
|
|
5626
|
+
"& .MuiDataGrid-pinnedRows .MuiDataGrid-cell": {
|
|
5627
|
+
backgroundColor: "#FBFBFB"
|
|
5628
|
+
},
|
|
5525
5629
|
"& .MuiDataGrid-columnHeaders": {
|
|
5526
5630
|
display: disableHeader == true ? "none" : "block"
|
|
5527
5631
|
},
|
|
@@ -5718,7 +5822,7 @@ var SCDatePicker = ({ label, required, disabled, background, state, setState, wi
|
|
|
5718
5822
|
|
|
5719
5823
|
// src/Components/SCDialog.tsx
|
|
5720
5824
|
var import_react53 = __toESM(require("react"), 1);
|
|
5721
|
-
var
|
|
5825
|
+
var import_material37 = require("@mui/material");
|
|
5722
5826
|
var import_Grid9 = __toESM(require("@mui/material/Grid"), 1);
|
|
5723
5827
|
var import_ToggleButton = __toESM(require("@mui/material/ToggleButton"), 1);
|
|
5724
5828
|
var import_ToggleButtonGroup = __toESM(require("@mui/material/ToggleButtonGroup"), 1);
|
|
@@ -5782,9 +5886,9 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5782
5886
|
}
|
|
5783
5887
|
};
|
|
5784
5888
|
const dialogActions = actions == false ? false : actions != void 0 ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
5785
|
-
content = content != null ? content : { component: /* @__PURE__ */ import_react53.default.createElement(
|
|
5786
|
-
return /* @__PURE__ */ import_react53.default.createElement("div", null, buttonDialog ? /* @__PURE__ */ import_react53.default.createElement(import_react53.default.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ import_react53.default.createElement(
|
|
5787
|
-
|
|
5889
|
+
content = content != null ? content : { component: /* @__PURE__ */ import_react53.default.createElement(import_material37.Box, null, " Aqui va el contenido ") };
|
|
5890
|
+
return /* @__PURE__ */ import_react53.default.createElement("div", null, buttonDialog ? /* @__PURE__ */ import_react53.default.createElement(import_react53.default.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ import_react53.default.createElement(import_material37.Tooltip, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ import_react53.default.createElement(import_material37.Button, { size: "small", color: buttonDialog.color != void 0 ? buttonDialog.color : "primary", variant: (buttonDialog == null ? void 0 : buttonDialog.variant) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.variant : "text", startIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "left" ? /* @__PURE__ */ import_react53.default.createElement(ButtonIcon, null) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ import_react53.default.createElement(ButtonIcon, null) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ import_react53.default.createElement(import_material37.IconButton, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ import_react53.default.createElement(import_material37.SvgIcon, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ import_react53.default.createElement(import_material37.Modal, { open: open || false, onClose: handleClose }, /* @__PURE__ */ import_react53.default.createElement(
|
|
5891
|
+
import_material37.Dialog,
|
|
5788
5892
|
{
|
|
5789
5893
|
fullScreen: typeView === "mobile" ? true : false,
|
|
5790
5894
|
"data-testid": "dialog-element",
|
|
@@ -5798,9 +5902,9 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5798
5902
|
}
|
|
5799
5903
|
}
|
|
5800
5904
|
},
|
|
5801
|
-
title && /* @__PURE__ */ import_react53.default.createElement(
|
|
5905
|
+
title && /* @__PURE__ */ import_react53.default.createElement(import_material37.DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ import_react53.default.createElement(import_Grid9.default, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, typeView == "web" ? /* @__PURE__ */ import_react53.default.createElement(import_Grid9.default, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ import_react53.default.createElement(import_material37.Box, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ import_react53.default.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ import_react53.default.createElement(import_material37.SvgIcon, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ import_react53.default.createElement(import_Grid9.default, { sx: { width: "98%" } }, /* @__PURE__ */ import_react53.default.createElement(import_material37.Typography, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), subtitle ? subtitle : "")) : /* @__PURE__ */ import_react53.default.createElement(import_Grid9.default, { container: true, size: 11, sx: { alignItems: "center", flexWrap: "nowrap" } }), disableClose != true ? /* @__PURE__ */ import_react53.default.createElement(import_material37.IconButton, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ import_react53.default.createElement(import_Close2.default, { color: "action" })) : ""), typeView == "mobile" ? /* @__PURE__ */ import_react53.default.createElement(import_Grid9.default, { sx: { display: "flex", flexDirection: "column", padding: "12px 0px 4px 0px" }, gap: 1.5 }, /* @__PURE__ */ import_react53.default.createElement(import_material37.Typography, { color: "text.primary", variant: "h5" }, title ? title : ""), subtitle ? subtitle : "") : ""),
|
|
5802
5906
|
/* @__PURE__ */ import_react53.default.createElement(
|
|
5803
|
-
|
|
5907
|
+
import_material37.DialogContent,
|
|
5804
5908
|
{
|
|
5805
5909
|
"data-testid": "dialog-content",
|
|
5806
5910
|
dividers: dividers ? dividers : false,
|
|
@@ -5838,20 +5942,20 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5838
5942
|
}
|
|
5839
5943
|
) : content.component
|
|
5840
5944
|
),
|
|
5841
|
-
dialogActions != void 0 && dialogActions != false ? Array.isArray(dialogActions) && (dialogActions == null ? void 0 : dialogActions.length) > 0 ? /* @__PURE__ */ import_react53.default.createElement(
|
|
5842
|
-
|
|
5945
|
+
dialogActions != void 0 && dialogActions != false ? Array.isArray(dialogActions) && (dialogActions == null ? void 0 : dialogActions.length) > 0 ? /* @__PURE__ */ import_react53.default.createElement(import_material37.DialogActions, { sx: { zIndex: 1200, gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, typeView !== "mobile" ? /* @__PURE__ */ import_react53.default.createElement(import_react53.default.Fragment, null, dialogActions.length >= 3 ? /* @__PURE__ */ import_react53.default.createElement(import_react53.default.Fragment, null, /* @__PURE__ */ import_react53.default.createElement(
|
|
5946
|
+
import_material37.Button,
|
|
5843
5947
|
{
|
|
5844
5948
|
variant: "text",
|
|
5845
5949
|
color: dialogActions[0].color || "primary",
|
|
5846
5950
|
size: "small",
|
|
5847
5951
|
onClick: dialogActions[0].fn,
|
|
5848
5952
|
disabled: dialogActions[0].disabled || false,
|
|
5849
|
-
startIcon: dialogActions[0].icon ? /* @__PURE__ */ import_react53.default.createElement(
|
|
5953
|
+
startIcon: dialogActions[0].icon ? /* @__PURE__ */ import_react53.default.createElement(import_material37.SvgIcon, { fontSize: "small", component: dialogActions[0].icon }) : void 0
|
|
5850
5954
|
},
|
|
5851
5955
|
dialogActions[0].text
|
|
5852
|
-
), /* @__PURE__ */ import_react53.default.createElement(
|
|
5956
|
+
), /* @__PURE__ */ import_react53.default.createElement(import_material37.Box, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
|
|
5853
5957
|
return /* @__PURE__ */ import_react53.default.createElement(
|
|
5854
|
-
|
|
5958
|
+
import_material37.Button,
|
|
5855
5959
|
{
|
|
5856
5960
|
key: index + 1,
|
|
5857
5961
|
variant: index === dialogActions.length - 2 ? "contained" : "text",
|
|
@@ -5859,13 +5963,13 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5859
5963
|
size: "small",
|
|
5860
5964
|
onClick: boton.fn,
|
|
5861
5965
|
disabled: boton.disabled || false,
|
|
5862
|
-
startIcon: boton.icon ? /* @__PURE__ */ import_react53.default.createElement(
|
|
5966
|
+
startIcon: boton.icon ? /* @__PURE__ */ import_react53.default.createElement(import_material37.SvgIcon, { fontSize: "small", component: boton.icon }) : void 0
|
|
5863
5967
|
},
|
|
5864
5968
|
boton.text
|
|
5865
5969
|
);
|
|
5866
5970
|
}))) : dialogActions.map((boton, index) => {
|
|
5867
5971
|
return /* @__PURE__ */ import_react53.default.createElement(
|
|
5868
|
-
|
|
5972
|
+
import_material37.Button,
|
|
5869
5973
|
{
|
|
5870
5974
|
key: index,
|
|
5871
5975
|
variant: index === dialogActions.length - 1 ? "contained" : "text",
|
|
@@ -5873,20 +5977,20 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5873
5977
|
size: "small",
|
|
5874
5978
|
onClick: boton.fn,
|
|
5875
5979
|
disabled: boton.disabled || false,
|
|
5876
|
-
startIcon: boton.icon ? /* @__PURE__ */ import_react53.default.createElement(
|
|
5980
|
+
startIcon: boton.icon ? /* @__PURE__ */ import_react53.default.createElement(import_material37.SvgIcon, { fontSize: "small", component: boton.icon }) : void 0
|
|
5877
5981
|
},
|
|
5878
5982
|
boton.text
|
|
5879
5983
|
);
|
|
5880
|
-
})) : /* @__PURE__ */ import_react53.default.createElement(
|
|
5984
|
+
})) : /* @__PURE__ */ import_react53.default.createElement(import_material37.Box, { sx: { width: "100%", display: "flex", flexDirection: "row", justifyContent: "center" } }, /* @__PURE__ */ import_react53.default.createElement(import_ToggleButtonGroup.default, { size: "large", fullWidth: true }, dialogActions.map((boton, index) => {
|
|
5881
5985
|
var _a;
|
|
5882
|
-
return /* @__PURE__ */ import_react53.default.createElement(import_ToggleButton.default, { sx: { color: "primary.main" }, disabled: boton.disabled || false, fullWidth: boton.text ? true : false, size: "medium", value: "text", onClick: boton.fn }, (_a = boton.text) != null ? _a : /* @__PURE__ */ import_react53.default.createElement(
|
|
5986
|
+
return /* @__PURE__ */ import_react53.default.createElement(import_ToggleButton.default, { sx: { color: "primary.main" }, disabled: boton.disabled || false, fullWidth: boton.text ? true : false, size: "medium", value: "text", onClick: boton.fn }, (_a = boton.text) != null ? _a : /* @__PURE__ */ import_react53.default.createElement(import_material37.SvgIcon, { fontSize: "small", component: boton.icon }));
|
|
5883
5987
|
})))) : "" : ""
|
|
5884
5988
|
)));
|
|
5885
5989
|
};
|
|
5886
5990
|
|
|
5887
5991
|
// src/Components/SCDownloadExcelTable.tsx
|
|
5888
5992
|
var import_react54 = __toESM(require("react"), 1);
|
|
5889
|
-
var
|
|
5993
|
+
var import_material38 = require("@mui/material");
|
|
5890
5994
|
var import_FileDownloadOutlined2 = __toESM(require("@mui/icons-material/FileDownloadOutlined"), 1);
|
|
5891
5995
|
var XLSX = __toESM(require("xlsx"), 1);
|
|
5892
5996
|
var SCDownloadExcelTable = ({
|
|
@@ -5920,7 +6024,7 @@ var SCDownloadExcelTable = ({
|
|
|
5920
6024
|
XLSX.writeFile(workbook, `${fileName}.xlsx`);
|
|
5921
6025
|
};
|
|
5922
6026
|
return /* @__PURE__ */ import_react54.default.createElement(
|
|
5923
|
-
|
|
6027
|
+
import_material38.Button,
|
|
5924
6028
|
{
|
|
5925
6029
|
onClick: descargaExcel,
|
|
5926
6030
|
startIcon: /* @__PURE__ */ import_react54.default.createElement(import_FileDownloadOutlined2.default, null),
|
|
@@ -5935,7 +6039,7 @@ var SCDownloadExcelTable = ({
|
|
|
5935
6039
|
|
|
5936
6040
|
// src/Components/SCMenu.tsx
|
|
5937
6041
|
var import_react56 = __toESM(require("react"), 1);
|
|
5938
|
-
var
|
|
6042
|
+
var import_material39 = require("@mui/material");
|
|
5939
6043
|
var import_Grid10 = __toESM(require("@mui/material/Grid"), 1);
|
|
5940
6044
|
|
|
5941
6045
|
// src/Components/Hooks/useWindowDimensions.ts
|
|
@@ -6002,22 +6106,22 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
6002
6106
|
setValue(String(index + 1));
|
|
6003
6107
|
}
|
|
6004
6108
|
};
|
|
6005
|
-
return /* @__PURE__ */ import_react56.default.createElement(import_react56.default.Fragment, null, /* @__PURE__ */ import_react56.default.createElement(import_Grid10.default, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ import_react56.default.createElement(
|
|
6006
|
-
|
|
6109
|
+
return /* @__PURE__ */ import_react56.default.createElement(import_react56.default.Fragment, null, /* @__PURE__ */ import_react56.default.createElement(import_Grid10.default, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ import_react56.default.createElement(import_material39.Paper, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ import_react56.default.createElement(import_material39.MenuList, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ import_react56.default.createElement(import_react56.default.Fragment, null, /* @__PURE__ */ import_react56.default.createElement(
|
|
6110
|
+
import_material39.MenuItem,
|
|
6007
6111
|
{
|
|
6008
6112
|
disabled: disable == true ? true : false,
|
|
6009
6113
|
key: index,
|
|
6010
6114
|
selected: String(index + 1) === selectedIndex,
|
|
6011
6115
|
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
6012
6116
|
},
|
|
6013
|
-
option.iconLeft ? /* @__PURE__ */ import_react56.default.createElement(
|
|
6014
|
-
/* @__PURE__ */ import_react56.default.createElement(import_Grid10.default, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ import_react56.default.createElement(
|
|
6015
|
-
), option.divider == true ? /* @__PURE__ */ import_react56.default.createElement(
|
|
6117
|
+
option.iconLeft ? /* @__PURE__ */ import_react56.default.createElement(import_material39.ListItemIcon, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ import_react56.default.createElement(import_material39.SvgIcon, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
6118
|
+
/* @__PURE__ */ import_react56.default.createElement(import_Grid10.default, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ import_react56.default.createElement(import_material39.Typography, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ import_react56.default.createElement(import_material39.ListItemIcon, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ import_react56.default.createElement(import_material39.SvgIcon, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
6119
|
+
), option.divider == true ? /* @__PURE__ */ import_react56.default.createElement(import_material39.Divider, null) : "")))), /* @__PURE__ */ import_react56.default.createElement(import_Grid10.default, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ import_react56.default.createElement(import_material39.Box, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ import_react56.default.createElement(import_material39.Typography, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
6016
6120
|
};
|
|
6017
6121
|
|
|
6018
6122
|
// src/Components/SCTabs.tsx
|
|
6019
6123
|
var import_react57 = __toESM(require("react"), 1);
|
|
6020
|
-
var
|
|
6124
|
+
var import_material40 = require("@mui/material");
|
|
6021
6125
|
var import_TabPanel = __toESM(require("@mui/lab/TabPanel"), 1);
|
|
6022
6126
|
var import_TabContext = __toESM(require("@mui/lab/TabContext"), 1);
|
|
6023
6127
|
var Muicon11 = __toESM(require("@mui/icons-material"), 1);
|
|
@@ -6079,8 +6183,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
6079
6183
|
setValue(newValue);
|
|
6080
6184
|
}
|
|
6081
6185
|
};
|
|
6082
|
-
return /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ import_react57.default.createElement(
|
|
6083
|
-
|
|
6186
|
+
return /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ import_react57.default.createElement(import_material40.Box, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ import_react57.default.createElement(import_TabContext.default, { value }, /* @__PURE__ */ import_react57.default.createElement(
|
|
6187
|
+
import_material40.Tabs,
|
|
6084
6188
|
{
|
|
6085
6189
|
"data-testid": "tab-container",
|
|
6086
6190
|
value,
|
|
@@ -6094,7 +6198,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
6094
6198
|
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
6095
6199
|
},
|
|
6096
6200
|
options.map((option) => /* @__PURE__ */ import_react57.default.createElement(
|
|
6097
|
-
|
|
6201
|
+
import_material40.Tab,
|
|
6098
6202
|
{
|
|
6099
6203
|
"data-testid": "tab-item",
|
|
6100
6204
|
value: String(i = i + 1),
|
|
@@ -6103,7 +6207,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
6103
6207
|
disabled: option.disabled || false,
|
|
6104
6208
|
iconPosition: iconPosition || "end",
|
|
6105
6209
|
icon: typeIcon == "badge" ? /* @__PURE__ */ import_react57.default.createElement(
|
|
6106
|
-
|
|
6210
|
+
import_material40.Badge,
|
|
6107
6211
|
{
|
|
6108
6212
|
sx: {
|
|
6109
6213
|
width: "20px",
|
|
@@ -6117,7 +6221,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
6117
6221
|
badgeContent: option.iconOrBadge,
|
|
6118
6222
|
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
6119
6223
|
}
|
|
6120
|
-
) : typeIcon == "icon" ? /* @__PURE__ */ import_react57.default.createElement(
|
|
6224
|
+
) : typeIcon == "icon" ? /* @__PURE__ */ import_react57.default.createElement(import_material40.SvgIcon, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
|
|
6121
6225
|
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
6122
6226
|
}
|
|
6123
6227
|
))
|
|
@@ -6128,13 +6232,13 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
6128
6232
|
value: String(l = l + 1),
|
|
6129
6233
|
sx: { padding: "16px" }
|
|
6130
6234
|
},
|
|
6131
|
-
option.page ? option.page : /* @__PURE__ */ import_react57.default.createElement(
|
|
6132
|
-
)))) : /* @__PURE__ */ import_react57.default.createElement(
|
|
6235
|
+
option.page ? option.page : /* @__PURE__ */ import_react57.default.createElement(import_material40.Typography, null, "No se ha configurado el componente a visualizar ")
|
|
6236
|
+
)))) : /* @__PURE__ */ import_react57.default.createElement(import_material40.Box, { sx: { height: "200px" } }, toast && /* @__PURE__ */ import_react57.default.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
6133
6237
|
};
|
|
6134
6238
|
|
|
6135
6239
|
// src/Components/SCTime.tsx
|
|
6136
6240
|
var import_react58 = __toESM(require("react"), 1);
|
|
6137
|
-
var
|
|
6241
|
+
var import_material41 = require("@mui/material");
|
|
6138
6242
|
var import_LocalizationProvider5 = require("@mui/x-date-pickers/LocalizationProvider");
|
|
6139
6243
|
var import_AdapterDayjs3 = require("@mui/x-date-pickers/AdapterDayjs");
|
|
6140
6244
|
var import_dayjs11 = __toESM(require("dayjs"), 1);
|
|
@@ -6190,11 +6294,15 @@ var SCTime = ({
|
|
|
6190
6294
|
setIsOpenPopover(false);
|
|
6191
6295
|
setAnchorEl(null);
|
|
6192
6296
|
};
|
|
6297
|
+
const handleTimeFieldChange = (newValue) => {
|
|
6298
|
+
const dayjsValue = newValue ? (0, import_dayjs11.default)(newValue) : null;
|
|
6299
|
+
setState(dayjsValue);
|
|
6300
|
+
};
|
|
6193
6301
|
const handleClose = () => {
|
|
6194
6302
|
setIsOpenPopover(false);
|
|
6195
6303
|
setAnchorEl(null);
|
|
6196
6304
|
};
|
|
6197
|
-
return /* @__PURE__ */ import_react58.default.createElement(import_LocalizationProvider5.LocalizationProvider, { dateAdapter: import_AdapterDayjs3.AdapterDayjs }, /* @__PURE__ */ import_react58.default.createElement(
|
|
6305
|
+
return /* @__PURE__ */ import_react58.default.createElement(import_LocalizationProvider5.LocalizationProvider, { dateAdapter: import_AdapterDayjs3.AdapterDayjs }, /* @__PURE__ */ import_react58.default.createElement(import_material41.Box, { sx: { position: "relative", minWidth: "120px", width: width ? `${width}%` : "99%" } }, /* @__PURE__ */ import_react58.default.createElement(
|
|
6198
6306
|
import_TimeField.TimeField,
|
|
6199
6307
|
{
|
|
6200
6308
|
label,
|
|
@@ -6203,10 +6311,11 @@ var SCTime = ({
|
|
|
6203
6311
|
required,
|
|
6204
6312
|
error: hasError,
|
|
6205
6313
|
onClick: handleTimeFieldClick,
|
|
6314
|
+
onChange: handleTimeFieldChange,
|
|
6206
6315
|
slotProps: {
|
|
6207
6316
|
textField: {
|
|
6208
6317
|
InputProps: {
|
|
6209
|
-
endAdornment: /* @__PURE__ */ import_react58.default.createElement(
|
|
6318
|
+
endAdornment: /* @__PURE__ */ import_react58.default.createElement(import_material41.InputAdornment, { position: "end" }, /* @__PURE__ */ import_react58.default.createElement(
|
|
6210
6319
|
import_AccessTime.default,
|
|
6211
6320
|
{
|
|
6212
6321
|
color: disabled ? "disabled" : "action",
|
|
@@ -6236,7 +6345,7 @@ var SCTime = ({
|
|
|
6236
6345
|
}
|
|
6237
6346
|
}
|
|
6238
6347
|
), /* @__PURE__ */ import_react58.default.createElement(
|
|
6239
|
-
|
|
6348
|
+
import_material41.Popover,
|
|
6240
6349
|
{
|
|
6241
6350
|
open: isOpenPopover,
|
|
6242
6351
|
anchorEl,
|
|
@@ -6266,7 +6375,7 @@ var SCTime = ({
|
|
|
6266
6375
|
}
|
|
6267
6376
|
}
|
|
6268
6377
|
},
|
|
6269
|
-
/* @__PURE__ */ import_react58.default.createElement(
|
|
6378
|
+
/* @__PURE__ */ import_react58.default.createElement(import_material41.ClickAwayListener, { onClickAway: handleClose }, /* @__PURE__ */ import_react58.default.createElement(import_material41.Box, { sx: { p: 0 } }, /* @__PURE__ */ import_react58.default.createElement(
|
|
6270
6379
|
import_DigitalClock.DigitalClock,
|
|
6271
6380
|
{
|
|
6272
6381
|
value: state,
|
|
@@ -6290,7 +6399,7 @@ var SCTime = ({
|
|
|
6290
6399
|
|
|
6291
6400
|
// src/Components/SCZoom.tsx
|
|
6292
6401
|
var import_react59 = __toESM(require("react"), 1);
|
|
6293
|
-
var
|
|
6402
|
+
var import_material42 = require("@mui/material");
|
|
6294
6403
|
var import_Grid11 = __toESM(require("@mui/material/Grid"), 1);
|
|
6295
6404
|
var import_ZoomOut = __toESM(require("@mui/icons-material/ZoomOut"), 1);
|
|
6296
6405
|
var import_ZoomIn = __toESM(require("@mui/icons-material/ZoomIn"), 1);
|
|
@@ -6306,8 +6415,8 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6306
6415
|
const handleReset = () => {
|
|
6307
6416
|
setZoom(1);
|
|
6308
6417
|
};
|
|
6309
|
-
return /* @__PURE__ */ import_react59.default.createElement(
|
|
6310
|
-
|
|
6418
|
+
return /* @__PURE__ */ import_react59.default.createElement(import_material42.Box, { style: { width: width || "280px", height: height || "280px" } }, /* @__PURE__ */ import_react59.default.createElement(
|
|
6419
|
+
import_material42.Box,
|
|
6311
6420
|
{
|
|
6312
6421
|
sx: {
|
|
6313
6422
|
overflow: zoom > 1 ? "auto" : "hidden",
|
|
@@ -6328,7 +6437,7 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6328
6437
|
}
|
|
6329
6438
|
}
|
|
6330
6439
|
)
|
|
6331
|
-
), /* @__PURE__ */ import_react59.default.createElement(import_Grid11.default, { container: true, flexWrap: "nowrap", alignItems: "center", gap: 1, sx: { position: "relative", bottom: bottom != null ? bottom : `calc(100% - 87%)`, left: left != null ? left : `calc(100% - 72%)`, zIndex: 1, width: "147px", borderRadius: "4px", padding: "4px 12px", border: bottom ? "0px" : "1px solid #0000001F", background: "white", boxShadow: bottom ? "" : "2px 3px 5px 0px #18274B33" } }, /* @__PURE__ */ import_react59.default.createElement(import_Grid11.default, { container: true, alignItems: "center", justifyContent: "center", flexWrap: "nowrap", gap: 0.5, sx: { width: "84px" } }, /* @__PURE__ */ import_react59.default.createElement(
|
|
6440
|
+
), /* @__PURE__ */ import_react59.default.createElement(import_Grid11.default, { container: true, flexWrap: "nowrap", alignItems: "center", gap: 1, sx: { position: "relative", bottom: bottom != null ? bottom : `calc(100% - 87%)`, left: left != null ? left : `calc(100% - 72%)`, zIndex: 1, width: "147px", borderRadius: "4px", padding: "4px 12px", border: bottom ? "0px" : "1px solid #0000001F", background: "white", boxShadow: bottom ? "" : "2px 3px 5px 0px #18274B33" } }, /* @__PURE__ */ import_react59.default.createElement(import_Grid11.default, { container: true, alignItems: "center", justifyContent: "center", flexWrap: "nowrap", gap: 0.5, sx: { width: "84px" } }, /* @__PURE__ */ import_react59.default.createElement(import_material42.IconButton, { onClick: handleZoomOut, disabled: zoom <= 0.5, size: "small" }, /* @__PURE__ */ import_react59.default.createElement(import_ZoomOut.default, { color: "action", fontSize: "small" })), /* @__PURE__ */ import_react59.default.createElement(import_material42.Typography, { variant: "body2", color: "textSecondary" }, Math.round(zoom * 100), "%"), /* @__PURE__ */ import_react59.default.createElement(import_material42.IconButton, { onClick: handleZoomIn, disabled: zoom >= 3, color: "primary", size: "small" }, /* @__PURE__ */ import_react59.default.createElement(import_ZoomIn.default, { color: "action", fontSize: "small" }))), /* @__PURE__ */ import_react59.default.createElement(import_material42.Divider, { orientation: "vertical", sx: { width: "1px", height: "16px" } }), /* @__PURE__ */ import_react59.default.createElement(import_material42.IconButton, { onClick: handleReset, color: "primary", size: "small" }, /* @__PURE__ */ import_react59.default.createElement(import_RotateRight.default, { color: "action", fontSize: "small" }))));
|
|
6332
6441
|
};
|
|
6333
6442
|
|
|
6334
6443
|
// src/Theme/index.ts
|
|
@@ -6800,7 +6909,6 @@ var components = {
|
|
|
6800
6909
|
color: theme.palette.primary.main
|
|
6801
6910
|
}),
|
|
6802
6911
|
colorDefault: ({ theme }) => ({
|
|
6803
|
-
backgroundColor: theme.palette.default.main,
|
|
6804
6912
|
color: theme.palette.default.contrastText
|
|
6805
6913
|
}),
|
|
6806
6914
|
deleteIcon: ({ theme }) => ({
|
|
@@ -6910,47 +7018,6 @@ var components = {
|
|
|
6910
7018
|
height: "inherit",
|
|
6911
7019
|
borderRadius: 4,
|
|
6912
7020
|
variants: [
|
|
6913
|
-
{
|
|
6914
|
-
props: { variant: "outlined", color: "default" },
|
|
6915
|
-
style: {
|
|
6916
|
-
border: `1px solid ${theme.palette.grey[400]}`,
|
|
6917
|
-
backgroundColor: "transparent ",
|
|
6918
|
-
color: theme.palette.default.contrastText,
|
|
6919
|
-
":hover": {
|
|
6920
|
-
backgroundColor: theme.palette.default.main
|
|
6921
|
-
}
|
|
6922
|
-
}
|
|
6923
|
-
},
|
|
6924
|
-
{
|
|
6925
|
-
props: { variant: "standard", color: "default" },
|
|
6926
|
-
style: {
|
|
6927
|
-
backgroundColor: theme.palette.default.main,
|
|
6928
|
-
color: theme.palette.default.contrastText,
|
|
6929
|
-
":hover": {
|
|
6930
|
-
backgroundColor: theme.palette.default.dark
|
|
6931
|
-
}
|
|
6932
|
-
}
|
|
6933
|
-
},
|
|
6934
|
-
{
|
|
6935
|
-
props: { variant: "filled", color: "default" },
|
|
6936
|
-
style: {
|
|
6937
|
-
backgroundColor: theme.palette.grey[50],
|
|
6938
|
-
color: theme.palette.default.contrastText,
|
|
6939
|
-
":hover": {
|
|
6940
|
-
backgroundColor: theme.palette.grey[100]
|
|
6941
|
-
}
|
|
6942
|
-
}
|
|
6943
|
-
},
|
|
6944
|
-
{
|
|
6945
|
-
props: { variant: "filled", color: "default" },
|
|
6946
|
-
style: {
|
|
6947
|
-
backgroundColor: theme.palette.grey[50],
|
|
6948
|
-
color: theme.palette.default.contrastText,
|
|
6949
|
-
":hover": {
|
|
6950
|
-
backgroundColor: theme.palette.grey[100]
|
|
6951
|
-
}
|
|
6952
|
-
}
|
|
6953
|
-
},
|
|
6954
7021
|
{
|
|
6955
7022
|
props: { variant: "standard", avatar: true },
|
|
6956
7023
|
style: {
|
|
@@ -7021,7 +7088,40 @@ var components = {
|
|
|
7021
7088
|
}
|
|
7022
7089
|
]
|
|
7023
7090
|
})
|
|
7024
|
-
}
|
|
7091
|
+
},
|
|
7092
|
+
variants: [
|
|
7093
|
+
{
|
|
7094
|
+
props: { variant: "outlined", color: "default" },
|
|
7095
|
+
style: ({ theme }) => ({
|
|
7096
|
+
border: `1px solid ${theme.palette.grey[400]}`,
|
|
7097
|
+
backgroundColor: "transparent",
|
|
7098
|
+
color: theme.palette.default.contrastText,
|
|
7099
|
+
":hover": {
|
|
7100
|
+
backgroundColor: theme.palette.default.main
|
|
7101
|
+
}
|
|
7102
|
+
})
|
|
7103
|
+
},
|
|
7104
|
+
{
|
|
7105
|
+
props: { variant: "standard", color: "default" },
|
|
7106
|
+
style: ({ theme }) => ({
|
|
7107
|
+
backgroundColor: theme.palette.default.main,
|
|
7108
|
+
color: theme.palette.default.contrastText,
|
|
7109
|
+
":hover": {
|
|
7110
|
+
backgroundColor: theme.palette.default.dark
|
|
7111
|
+
}
|
|
7112
|
+
})
|
|
7113
|
+
},
|
|
7114
|
+
{
|
|
7115
|
+
props: { variant: "filled", color: "default" },
|
|
7116
|
+
style: ({ theme }) => ({
|
|
7117
|
+
backgroundColor: theme.palette.grey[50],
|
|
7118
|
+
color: theme.palette.default.contrastText,
|
|
7119
|
+
":hover": {
|
|
7120
|
+
backgroundColor: theme.palette.grey[100]
|
|
7121
|
+
}
|
|
7122
|
+
})
|
|
7123
|
+
}
|
|
7124
|
+
]
|
|
7025
7125
|
},
|
|
7026
7126
|
MuiAvatar: {
|
|
7027
7127
|
styleOverrides: {
|