componentes-sinco 1.1.30 → 1.1.32
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 +166 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +241 -177
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -138,6 +138,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
138
138
|
var import_react5 = __toESM(require("react"), 1);
|
|
139
139
|
var import_material3 = require("@mui/material");
|
|
140
140
|
var import_icons_material5 = require("@mui/icons-material");
|
|
141
|
+
var Muicon = __toESM(require("@mui/icons-material"), 1);
|
|
141
142
|
|
|
142
143
|
// src/Components/ToastNotification/SCToastNotification.tsx
|
|
143
144
|
var import_react2 = __toESM(require("react"), 1);
|
|
@@ -482,7 +483,8 @@ var Attachment = ({
|
|
|
482
483
|
onChange,
|
|
483
484
|
downloadAction,
|
|
484
485
|
deleteAction,
|
|
485
|
-
initialFiles = []
|
|
486
|
+
initialFiles = [],
|
|
487
|
+
iconFileItem
|
|
486
488
|
}) => {
|
|
487
489
|
const [files, setFiles] = (0, import_react5.useState)([]);
|
|
488
490
|
const [fileToDelete, setFileToDelete] = (0, import_react5.useState)(null);
|
|
@@ -490,6 +492,14 @@ var Attachment = ({
|
|
|
490
492
|
const [openModal, setOpenModal] = (0, import_react5.useState)(false);
|
|
491
493
|
const [isDragFile, setIsDragFile] = (0, import_react5.useState)(false);
|
|
492
494
|
const inputRef = (0, import_react5.useRef)(null);
|
|
495
|
+
let IconFileItem;
|
|
496
|
+
if (iconFileItem) {
|
|
497
|
+
if (Muicon[iconFileItem] == void 0) {
|
|
498
|
+
IconFileItem = iconFileItem;
|
|
499
|
+
} else {
|
|
500
|
+
IconFileItem = Muicon[iconFileItem];
|
|
501
|
+
}
|
|
502
|
+
}
|
|
493
503
|
(0, import_react5.useEffect)(() => {
|
|
494
504
|
if (initialFiles && initialFiles.length > 0) {
|
|
495
505
|
setFiles(initialFiles);
|
|
@@ -740,7 +750,7 @@ var Attachment = ({
|
|
|
740
750
|
}
|
|
741
751
|
}
|
|
742
752
|
},
|
|
743
|
-
/* @__PURE__ */ import_react5.default.createElement(import_material3.Stack, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ import_react5.default.createElement(
|
|
753
|
+
/* @__PURE__ */ import_react5.default.createElement(import_material3.Stack, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, iconFileItem ? /* @__PURE__ */ import_react5.default.createElement(import_material3.SvgIcon, { color: file.uploadError ? "error" : "primary", fontSize: "small", component: IconFileItem }) : /* @__PURE__ */ import_react5.default.createElement(
|
|
744
754
|
import_icons_material5.UploadFileOutlined,
|
|
745
755
|
{
|
|
746
756
|
color: file.uploadError ? "error" : "primary",
|
|
@@ -891,6 +901,7 @@ var import_PhotoCamera = __toESM(require("@mui/icons-material/PhotoCamera"), 1);
|
|
|
891
901
|
var import_CancelOutlined = __toESM(require("@mui/icons-material/CancelOutlined"), 1);
|
|
892
902
|
var import_ImageOutlined = __toESM(require("@mui/icons-material/ImageOutlined"), 1);
|
|
893
903
|
var import_FileDownloadOutlined = __toESM(require("@mui/icons-material/FileDownloadOutlined"), 1);
|
|
904
|
+
var Muicon2 = __toESM(require("@mui/icons-material"), 1);
|
|
894
905
|
var AttachmentMobile = ({
|
|
895
906
|
buttonAttachment,
|
|
896
907
|
maxSize = 400,
|
|
@@ -901,7 +912,8 @@ var AttachmentMobile = ({
|
|
|
901
912
|
onChange,
|
|
902
913
|
children,
|
|
903
914
|
sx,
|
|
904
|
-
view = "button"
|
|
915
|
+
view = "button",
|
|
916
|
+
iconFileItem
|
|
905
917
|
}) => {
|
|
906
918
|
const webcamRef = (0, import_react7.useRef)(null);
|
|
907
919
|
const [abrirCamara, setAbrirCamara] = (0, import_react7.useState)(false);
|
|
@@ -912,6 +924,14 @@ var AttachmentMobile = ({
|
|
|
912
924
|
const toggleAttachment = (newOpen) => () => {
|
|
913
925
|
setOpen(newOpen);
|
|
914
926
|
};
|
|
927
|
+
let IconFileItem;
|
|
928
|
+
if (iconFileItem) {
|
|
929
|
+
if (Muicon2[iconFileItem] == void 0) {
|
|
930
|
+
IconFileItem = iconFileItem;
|
|
931
|
+
} else {
|
|
932
|
+
IconFileItem = Muicon2[iconFileItem];
|
|
933
|
+
}
|
|
934
|
+
}
|
|
915
935
|
const closeCam = () => {
|
|
916
936
|
setAbrirCamara(false);
|
|
917
937
|
};
|
|
@@ -1220,7 +1240,7 @@ var AttachmentMobile = ({
|
|
|
1220
1240
|
}
|
|
1221
1241
|
}
|
|
1222
1242
|
},
|
|
1223
|
-
/* @__PURE__ */ import_react7.default.createElement(import_material5.Stack, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ import_react7.default.createElement(
|
|
1243
|
+
/* @__PURE__ */ import_react7.default.createElement(import_material5.Stack, { direction: "row", alignItems: "center", gap: 1, width: "100%" }, iconFileItem ? /* @__PURE__ */ import_react7.default.createElement(import_material5.SvgIcon, { color: file.uploadError ? "error" : "primary", fontSize: "small", component: IconFileItem }) : /* @__PURE__ */ import_react7.default.createElement(
|
|
1224
1244
|
import_icons_material7.UploadFileOutlined,
|
|
1225
1245
|
{
|
|
1226
1246
|
color: file.uploadError ? "error" : "primary",
|
|
@@ -1474,10 +1494,10 @@ var import_material18 = require("@mui/material");
|
|
|
1474
1494
|
var import_Grid4 = __toESM(require("@mui/material/Grid"), 1);
|
|
1475
1495
|
|
|
1476
1496
|
// src/Components/Drawer/Helpers/Utils.tsx
|
|
1477
|
-
var
|
|
1497
|
+
var Muicon3 = __toESM(require("@mui/icons-material"), 1);
|
|
1478
1498
|
var getIcon = (iconName) => {
|
|
1479
|
-
if (iconName && iconName in
|
|
1480
|
-
return
|
|
1499
|
+
if (iconName && iconName in Muicon3) {
|
|
1500
|
+
return Muicon3[iconName];
|
|
1481
1501
|
}
|
|
1482
1502
|
return null;
|
|
1483
1503
|
};
|
|
@@ -1513,51 +1533,68 @@ var validateInputs = (arrayElements, onError, onSuccess, setChipFilters, setText
|
|
|
1513
1533
|
|
|
1514
1534
|
// src/Components/Drawer/Helpers/validateTypeElement.tsx
|
|
1515
1535
|
var import_react10 = __toESM(require("react"), 1);
|
|
1536
|
+
var COMPONENT_NAME_MAP = {
|
|
1537
|
+
SCtextField: "textField",
|
|
1538
|
+
SCtextArea: "textArea",
|
|
1539
|
+
SCDateRange: "dateRange",
|
|
1540
|
+
SCDatePicker: "datePicker",
|
|
1541
|
+
SCTime: "time",
|
|
1542
|
+
SCAutocomplete: "autocomplete",
|
|
1543
|
+
SCSelect: "select"
|
|
1544
|
+
};
|
|
1545
|
+
var getComponentName = (node) => {
|
|
1546
|
+
const type = node.type;
|
|
1547
|
+
return typeof type === "function" ? type.displayName || type.name || "" : "";
|
|
1548
|
+
};
|
|
1549
|
+
var isKnownComponent = (node) => {
|
|
1550
|
+
var _a;
|
|
1551
|
+
const name = getComponentName(node);
|
|
1552
|
+
if (COMPONENT_NAME_MAP[name]) return true;
|
|
1553
|
+
if (((_a = node.props) == null ? void 0 : _a.typeFormat) === "multiselect") return true;
|
|
1554
|
+
return false;
|
|
1555
|
+
};
|
|
1556
|
+
var findInTree = (node) => {
|
|
1557
|
+
var _a;
|
|
1558
|
+
if (!import_react10.default.isValidElement(node)) return null;
|
|
1559
|
+
if (isKnownComponent(node)) return node;
|
|
1560
|
+
const children = (_a = node.props) == null ? void 0 : _a.children;
|
|
1561
|
+
if (!children) return null;
|
|
1562
|
+
for (const child of import_react10.default.Children.toArray(children)) {
|
|
1563
|
+
if (import_react10.default.isValidElement(child)) {
|
|
1564
|
+
const found = findInTree(child);
|
|
1565
|
+
if (found) return found;
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
return null;
|
|
1569
|
+
};
|
|
1570
|
+
var resolveValidation = (node) => {
|
|
1571
|
+
var _a;
|
|
1572
|
+
const name = getComponentName(node);
|
|
1573
|
+
if (((_a = node.props) == null ? void 0 : _a.typeFormat) === "multiselect") return "multiselect";
|
|
1574
|
+
return COMPONENT_NAME_MAP[name] || "";
|
|
1575
|
+
};
|
|
1516
1576
|
var validateTypeElements = (element) => {
|
|
1517
1577
|
var _a;
|
|
1518
1578
|
let validation = "";
|
|
1519
1579
|
let typeElement = element;
|
|
1520
|
-
if (element.type
|
|
1521
|
-
validation =
|
|
1580
|
+
if (element.type && COMPONENT_NAME_MAP[(_a = Object.keys(COMPONENT_NAME_MAP).find((k) => COMPONENT_NAME_MAP[k] === element.type)) != null ? _a : ""]) {
|
|
1581
|
+
validation = element.type;
|
|
1522
1582
|
typeElement = element;
|
|
1523
|
-
} else if (
|
|
1524
|
-
validation = "textField";
|
|
1525
|
-
typeElement = element == null ? void 0 : element.component.props;
|
|
1526
|
-
} else if (element.type == "textArea") {
|
|
1527
|
-
validation = "textArea";
|
|
1528
|
-
typeElement = element;
|
|
1529
|
-
} else if (import_react10.default.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCtextArea") {
|
|
1530
|
-
validation = "textArea";
|
|
1531
|
-
typeElement = element == null ? void 0 : element.component.props;
|
|
1532
|
-
} else if (element.type == "dateRange") {
|
|
1533
|
-
validation = "dateRange";
|
|
1534
|
-
typeElement = element;
|
|
1535
|
-
} else if (import_react10.default.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCDateRange") {
|
|
1536
|
-
validation = "dateRange";
|
|
1537
|
-
typeElement = element == null ? void 0 : element.component.props;
|
|
1538
|
-
} else if (element.type == "autocomplete") {
|
|
1539
|
-
validation = "autocomplete";
|
|
1540
|
-
typeElement = element;
|
|
1541
|
-
} else if (import_react10.default.isValidElement(element == null ? void 0 : element.component) && element.component.type && element.component.type.name == "SCAutocomplete") {
|
|
1542
|
-
validation = "autocomplete";
|
|
1543
|
-
typeElement = element == null ? void 0 : element.component.props;
|
|
1544
|
-
} else if (element.typeFormat == "multiselect") {
|
|
1583
|
+
} else if (element.typeFormat === "multiselect") {
|
|
1545
1584
|
validation = "multiselect";
|
|
1546
1585
|
typeElement = element;
|
|
1547
|
-
} else if (import_react10.default.isValidElement(element == null ? void 0 : element.component) &&
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1586
|
+
} else if (import_react10.default.isValidElement(element == null ? void 0 : element.component) && isKnownComponent(element.component)) {
|
|
1587
|
+
const node = element.component;
|
|
1588
|
+
validation = resolveValidation(node);
|
|
1589
|
+
typeElement = node.props;
|
|
1590
|
+
} else if (import_react10.default.isValidElement(element == null ? void 0 : element.component)) {
|
|
1591
|
+
const found = findInTree(element.component);
|
|
1592
|
+
if (found) {
|
|
1593
|
+
validation = resolveValidation(found);
|
|
1594
|
+
typeElement = found.props;
|
|
1595
|
+
}
|
|
1556
1596
|
}
|
|
1557
|
-
return {
|
|
1558
|
-
validation,
|
|
1559
|
-
element: typeElement
|
|
1560
|
-
};
|
|
1597
|
+
return { validation, element: typeElement };
|
|
1561
1598
|
};
|
|
1562
1599
|
|
|
1563
1600
|
// src/Components/Drawer/hooks/useDrawerState.ts
|
|
@@ -1622,11 +1659,11 @@ var useChipFilters = (arrayElements, chipFilters) => {
|
|
|
1622
1659
|
const processManualFilters = () => {
|
|
1623
1660
|
const newFiltersToAdd = [];
|
|
1624
1661
|
arrayElements.forEach((element) => {
|
|
1625
|
-
var _a, _b, _c, _d;
|
|
1662
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1626
1663
|
const { validation, element: typeElement } = validateTypeElements(element);
|
|
1627
1664
|
const textValue = ((_a = typeElement.state) == null ? void 0 : _a.textValue) !== void 0 ? String((_b = typeElement.state) == null ? void 0 : _b.textValue) : String(typeElement.state);
|
|
1628
|
-
if (textValue.trim() !== "" && textValue.trim() !== ",") {
|
|
1629
|
-
const value = validation === "dateRange" ? `${(_c = typeElement.state[0]) == null ? void 0 : _c.format("DD/MM/YYYY")} - ${(_d = typeElement.state[1]) == null ? void 0 : _d.format("DD/MM/YYYY")}` : textValue;
|
|
1665
|
+
if (textValue.trim() !== "" && textValue.trim() !== "," && textValue.trim() !== "undefined") {
|
|
1666
|
+
const value = validation === "dateRange" ? `${(_c = typeElement.state[0]) == null ? void 0 : _c.format("DD/MM/YYYY")} - ${(_d = typeElement.state[1]) == null ? void 0 : _d.format("DD/MM/YYYY")}` : validation === "datePicker" ? (_f = (_e = typeElement.state) == null ? void 0 : _e.format("DD/MM/YYYY")) != null ? _f : "" : validation === "time" ? (_h = (_g = typeElement.state) == null ? void 0 : _g.format("HH:mm")) != null ? _h : "" : textValue;
|
|
1630
1667
|
const existingFilterIndex = newFiltersToAdd.findIndex(
|
|
1631
1668
|
(filter) => filter.arrayElement.label === element.label
|
|
1632
1669
|
);
|
|
@@ -1654,20 +1691,26 @@ var useChipFilters = (arrayElements, chipFilters) => {
|
|
|
1654
1691
|
});
|
|
1655
1692
|
};
|
|
1656
1693
|
const getCurrentValue = (validation, typeElement) => {
|
|
1657
|
-
var _a, _b, _c, _d, _e;
|
|
1694
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
1658
1695
|
if (validation === "dateRange") {
|
|
1659
1696
|
if (((_a = typeElement.state) == null ? void 0 : _a[0]) && ((_b = typeElement.state) == null ? void 0 : _b[1])) {
|
|
1660
1697
|
return `${(_c = typeElement.state[0]) == null ? void 0 : _c.format("DD/MM/YYYY")} - ${(_d = typeElement.state[1]) == null ? void 0 : _d.format("DD/MM/YYYY")}`;
|
|
1661
1698
|
}
|
|
1662
1699
|
return "";
|
|
1663
1700
|
}
|
|
1664
|
-
|
|
1701
|
+
if (validation === "datePicker") {
|
|
1702
|
+
return ((_f = (_e = typeElement.state) == null ? void 0 : _e.isValid) == null ? void 0 : _f.call(_e)) ? typeElement.state.format("DD/MM/YYYY") : "";
|
|
1703
|
+
}
|
|
1704
|
+
if (validation === "time") {
|
|
1705
|
+
return ((_h = (_g = typeElement.state) == null ? void 0 : _g.isValid) == null ? void 0 : _h.call(_g)) ? typeElement.state.format("HH:mm") : "";
|
|
1706
|
+
}
|
|
1707
|
+
return ((_i = typeElement.state) == null ? void 0 : _i.textValue) !== void 0 ? String(typeElement.state.textValue).trim() : String(typeElement.state).trim();
|
|
1665
1708
|
};
|
|
1666
1709
|
const updateFilter = (value, typeElement, label) => {
|
|
1667
1710
|
setTextFilters((prevFilters) => {
|
|
1668
1711
|
const newFilter = { value, arrayElement: typeElement };
|
|
1669
1712
|
const existingFilterIndex = prevFilters.findIndex(
|
|
1670
|
-
(filter) => filter.arrayElement.label === label
|
|
1713
|
+
(filter) => label !== void 0 ? filter.arrayElement.label === label : filter.value === value
|
|
1671
1714
|
);
|
|
1672
1715
|
if (existingFilterIndex !== -1) {
|
|
1673
1716
|
const updatedFilters = [...prevFilters];
|
|
@@ -1688,7 +1731,7 @@ var useChipFilters = (arrayElements, chipFilters) => {
|
|
|
1688
1731
|
return ((_b = typeElement.state) == null ? void 0 : _b[0]) !== null && ((_c = typeElement.state) == null ? void 0 : _c[1]) !== null;
|
|
1689
1732
|
} else {
|
|
1690
1733
|
const stateValue = String(typeElement.state).trim();
|
|
1691
|
-
return stateValue !== "" && stateValue !== ",";
|
|
1734
|
+
return stateValue !== "" && stateValue !== "," && stateValue !== "undefined";
|
|
1692
1735
|
}
|
|
1693
1736
|
});
|
|
1694
1737
|
};
|
|
@@ -1733,6 +1776,10 @@ var resetElementByType = (originalElement, validation, typeElement) => {
|
|
|
1733
1776
|
case "dateRange":
|
|
1734
1777
|
defaultValue = [null, null];
|
|
1735
1778
|
break;
|
|
1779
|
+
case "datePicker":
|
|
1780
|
+
case "time":
|
|
1781
|
+
defaultValue = null;
|
|
1782
|
+
break;
|
|
1736
1783
|
case "multiselect":
|
|
1737
1784
|
defaultValue = { hiddenValue: [], textValue: [] };
|
|
1738
1785
|
break;
|
|
@@ -1811,8 +1858,8 @@ var DrawerButton = ({
|
|
|
1811
1858
|
// src/Components/Drawer/components/ChipFiltersDisplay.tsx
|
|
1812
1859
|
var import_react15 = __toESM(require("react"), 1);
|
|
1813
1860
|
var import_material9 = require("@mui/material");
|
|
1814
|
-
var
|
|
1815
|
-
var
|
|
1861
|
+
var import_ChevronLeft = __toESM(require("@mui/icons-material/ChevronLeft"), 1);
|
|
1862
|
+
var import_ChevronRight = __toESM(require("@mui/icons-material/ChevronRight"), 1);
|
|
1816
1863
|
var ChipFiltersDisplay = ({
|
|
1817
1864
|
textFilters,
|
|
1818
1865
|
onDeleteFilter
|
|
@@ -1823,7 +1870,7 @@ var ChipFiltersDisplay = ({
|
|
|
1823
1870
|
scrollRef.current.scrollLeft += offset;
|
|
1824
1871
|
}
|
|
1825
1872
|
};
|
|
1826
|
-
return /* @__PURE__ */ import_react15.default.createElement(import_material9.Box, { display: "flex", alignItems: "center", sx: { maxWidth: "78%" } }, /* @__PURE__ */ import_react15.default.createElement(import_material9.IconButton, { onClick: () => scroll(-150), size: "small" }, /* @__PURE__ */ import_react15.default.createElement(
|
|
1873
|
+
return /* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, null, (textFilters == null ? void 0 : textFilters.length) > 0 && /* @__PURE__ */ import_react15.default.createElement(import_material9.Box, { display: "flex", alignItems: "center", sx: { maxWidth: "78%" } }, /* @__PURE__ */ import_react15.default.createElement(import_material9.IconButton, { onClick: () => scroll(-150), size: "small" }, /* @__PURE__ */ import_react15.default.createElement(import_ChevronLeft.default, { fontSize: "small", color: "action" })), /* @__PURE__ */ import_react15.default.createElement(
|
|
1827
1874
|
import_material9.Box,
|
|
1828
1875
|
{
|
|
1829
1876
|
ref: scrollRef,
|
|
@@ -1850,7 +1897,7 @@ var ChipFiltersDisplay = ({
|
|
|
1850
1897
|
}
|
|
1851
1898
|
})
|
|
1852
1899
|
))
|
|
1853
|
-
), /* @__PURE__ */ import_react15.default.createElement(import_material9.IconButton, { onClick: () => scroll(150), size: "small" }, /* @__PURE__ */ import_react15.default.createElement(
|
|
1900
|
+
), /* @__PURE__ */ import_react15.default.createElement(import_material9.IconButton, { onClick: () => scroll(150), size: "small" }, /* @__PURE__ */ import_react15.default.createElement(import_ChevronRight.default, { fontSize: "small", color: "action" }))));
|
|
1854
1901
|
};
|
|
1855
1902
|
|
|
1856
1903
|
// src/Components/Drawer/components/DrawerContent.tsx
|
|
@@ -1864,16 +1911,16 @@ var import_Grid = __toESM(require("@mui/material/Grid"), 1);
|
|
|
1864
1911
|
var import_icons_material9 = require("@mui/icons-material");
|
|
1865
1912
|
|
|
1866
1913
|
// src/Components/Textfield/Helpers/validateIcon.tsx
|
|
1867
|
-
var
|
|
1914
|
+
var Muicon4 = __toESM(require("@mui/icons-material"), 1);
|
|
1868
1915
|
function getIconComponent2(name) {
|
|
1869
1916
|
if (typeof name !== "string") return name;
|
|
1870
|
-
return name in
|
|
1917
|
+
return name in Muicon4 ? Muicon4[name] : void 0;
|
|
1871
1918
|
}
|
|
1872
1919
|
function getIconValidation(name) {
|
|
1873
1920
|
if (typeof name !== "string") {
|
|
1874
1921
|
return (name == null ? void 0 : name.type) ? "icon" : "text";
|
|
1875
1922
|
}
|
|
1876
|
-
return name in
|
|
1923
|
+
return name in Muicon4 ? "icon" : "text";
|
|
1877
1924
|
}
|
|
1878
1925
|
|
|
1879
1926
|
// src/Components/Textfield/Helpers/validateKeyDown.tsx
|
|
@@ -2316,7 +2363,7 @@ var SCTextArea = ({
|
|
|
2316
2363
|
var import_react18 = __toESM(require("react"), 1);
|
|
2317
2364
|
var import_material12 = require("@mui/material");
|
|
2318
2365
|
var import_Select = __toESM(require("@mui/material/Select"), 1);
|
|
2319
|
-
var
|
|
2366
|
+
var Muicon5 = __toESM(require("@mui/icons-material"), 1);
|
|
2320
2367
|
function SCSelect({
|
|
2321
2368
|
label = "",
|
|
2322
2369
|
data,
|
|
@@ -2350,7 +2397,7 @@ function SCSelect({
|
|
|
2350
2397
|
data.map(function(option, index, array) {
|
|
2351
2398
|
if (option == null ? void 0 : option.icon) {
|
|
2352
2399
|
if ((option == null ? void 0 : option.icon.type) == void 0) {
|
|
2353
|
-
option.icon =
|
|
2400
|
+
option.icon = Muicon5[option == null ? void 0 : option.icon];
|
|
2354
2401
|
} else {
|
|
2355
2402
|
option;
|
|
2356
2403
|
}
|
|
@@ -2432,7 +2479,7 @@ function SCSelect({
|
|
|
2432
2479
|
var import_react19 = __toESM(require("react"), 1);
|
|
2433
2480
|
var import_material13 = require("@mui/material");
|
|
2434
2481
|
var import_icons_material11 = require("@mui/icons-material");
|
|
2435
|
-
var
|
|
2482
|
+
var Muicon6 = __toESM(require("@mui/icons-material"), 1);
|
|
2436
2483
|
var StopEvent = ({ children }) => {
|
|
2437
2484
|
return /* @__PURE__ */ import_react19.default.createElement(
|
|
2438
2485
|
import_material13.Box,
|
|
@@ -2466,7 +2513,8 @@ function SCAutocomplete({
|
|
|
2466
2513
|
setState,
|
|
2467
2514
|
state,
|
|
2468
2515
|
inputChange,
|
|
2469
|
-
maxCheck
|
|
2516
|
+
maxCheck,
|
|
2517
|
+
width = "100%"
|
|
2470
2518
|
}) {
|
|
2471
2519
|
const labelContent = `<span style="color: red;">* </span>` + label;
|
|
2472
2520
|
let group = "";
|
|
@@ -2506,7 +2554,7 @@ function SCAutocomplete({
|
|
|
2506
2554
|
return data.map((option) => {
|
|
2507
2555
|
if ((option == null ? void 0 : option.icon) && option.icon.type === void 0) {
|
|
2508
2556
|
return __spreadProps(__spreadValues({}, option), {
|
|
2509
|
-
icon:
|
|
2557
|
+
icon: Muicon6[option.icon]
|
|
2510
2558
|
});
|
|
2511
2559
|
}
|
|
2512
2560
|
return option;
|
|
@@ -2558,13 +2606,26 @@ function SCAutocomplete({
|
|
|
2558
2606
|
) || null;
|
|
2559
2607
|
const [open, setOpen] = import_react19.default.useState(false);
|
|
2560
2608
|
const componentClickActiveRef = import_react19.default.useRef(false);
|
|
2609
|
+
const containerRef = import_react19.default.useRef(null);
|
|
2610
|
+
const [chipLimit, setChipLimit] = import_react19.default.useState(2);
|
|
2611
|
+
(0, import_react19.useEffect)(() => {
|
|
2612
|
+
const el = containerRef.current;
|
|
2613
|
+
if (!el) return;
|
|
2614
|
+
const observer = new ResizeObserver((entries) => {
|
|
2615
|
+
const width2 = entries[0].contentRect.width;
|
|
2616
|
+
const limit = Math.max(1, Math.floor((width2 - 80) / 128));
|
|
2617
|
+
setChipLimit(limit);
|
|
2618
|
+
});
|
|
2619
|
+
observer.observe(el);
|
|
2620
|
+
return () => observer.disconnect();
|
|
2621
|
+
}, []);
|
|
2561
2622
|
const hayOnComponentClickGlobal = (0, import_react19.useMemo)(() => {
|
|
2562
2623
|
return data.some((opt) => {
|
|
2563
2624
|
const item = getItemValue(opt);
|
|
2564
2625
|
return Boolean(item.onComponentClick);
|
|
2565
2626
|
});
|
|
2566
2627
|
}, [data, getItemValue]);
|
|
2567
|
-
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, data && /* @__PURE__ */ import_react19.default.createElement(
|
|
2628
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, data && /* @__PURE__ */ import_react19.default.createElement(import_material13.Box, { ref: containerRef, sx: { width } }, /* @__PURE__ */ import_react19.default.createElement(
|
|
2568
2629
|
import_material13.Autocomplete,
|
|
2569
2630
|
__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, hayOnComponentClickGlobal ? { disableCloseOnSelect: true } : {}), hayOnComponentClickGlobal ? { blurOnSelect: false } : {}), hayOnComponentClickGlobal ? { open } : {}), hayOnComponentClickGlobal ? { onOpen: () => setOpen(true) } : {}), hayOnComponentClickGlobal ? {
|
|
2570
2631
|
onClose: (event2, reason) => {
|
|
@@ -2594,9 +2655,9 @@ function SCAutocomplete({
|
|
|
2594
2655
|
width: "100%",
|
|
2595
2656
|
maxWidth: "100%"
|
|
2596
2657
|
},
|
|
2597
|
-
limitTags:
|
|
2658
|
+
limitTags: chipLimit,
|
|
2598
2659
|
renderTags: (value, getTagProps) => {
|
|
2599
|
-
const limit =
|
|
2660
|
+
const limit = chipLimit;
|
|
2600
2661
|
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, value.slice(0, limit).map((option, index) => {
|
|
2601
2662
|
const _a = getTagProps({ index }), { key } = _a, chipProps = __objRest(_a, ["key"]);
|
|
2602
2663
|
return /* @__PURE__ */ import_react19.default.createElement(
|
|
@@ -2679,7 +2740,14 @@ function SCAutocomplete({
|
|
|
2679
2740
|
},
|
|
2680
2741
|
renderInput: (params) => /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement(
|
|
2681
2742
|
import_material13.TextField,
|
|
2682
|
-
__spreadProps(__spreadValues({
|
|
2743
|
+
__spreadProps(__spreadValues({
|
|
2744
|
+
sx: { "& .MuiOutlinedInput-input": {
|
|
2745
|
+
padding: "2.5px 2px 2.5px 2px !important",
|
|
2746
|
+
// ajusta aquí
|
|
2747
|
+
width: "10px !important",
|
|
2748
|
+
minWidth: "10px !important"
|
|
2749
|
+
} }
|
|
2750
|
+
}, params), {
|
|
2683
2751
|
label: required ? /* @__PURE__ */ import_react19.default.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
|
|
2684
2752
|
placeholder: selectedOptions.length == 0 ? "B\xFAsqueda" : "",
|
|
2685
2753
|
InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
|
|
@@ -2754,7 +2822,7 @@ function SCAutocomplete({
|
|
|
2754
2822
|
}
|
|
2755
2823
|
}
|
|
2756
2824
|
})
|
|
2757
|
-
));
|
|
2825
|
+
)));
|
|
2758
2826
|
}
|
|
2759
2827
|
|
|
2760
2828
|
// src/Components/SCDateRange.tsx
|
|
@@ -4296,7 +4364,7 @@ var PageHeader = ({
|
|
|
4296
4364
|
zIndex: 10,
|
|
4297
4365
|
sx: { boxShadow: shadow ? (theme) => theme.shadows[1] : "none" }
|
|
4298
4366
|
},
|
|
4299
|
-
/* @__PURE__ */ import_react42.default.createElement(import_material28.Stack, { "data-testid": "page-header-content", height: 40, px: 3, pl: buttonBack ? 1 : 3, direction: "row", alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ import_react42.default.createElement(import_material28.Stack, { id: "left-section", direction: "row", alignItems: "center", gap: 1 }, buttonBack, /* @__PURE__ */ import_react42.default.createElement(import_material28.Stack, { id: "text-section", gap: 0.5 }, /* @__PURE__ */ import_react42.default.createElement(import_material28.Typography, { "data-testid": "page-header-title", variant: "h6", color: "text.primary" }, title), subtitle && /* @__PURE__ */ import_react42.default.createElement(import_material28.Typography, { "data-testid": "page-header-subtitle", variant: "caption", color: "text.
|
|
4367
|
+
/* @__PURE__ */ import_react42.default.createElement(import_material28.Stack, { "data-testid": "page-header-content", height: 40, px: 3, pl: buttonBack ? 1 : 3, direction: "row", alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ import_react42.default.createElement(import_material28.Stack, { id: "left-section", direction: "row", alignItems: "center", gap: 1 }, buttonBack, /* @__PURE__ */ import_react42.default.createElement(import_material28.Stack, { id: "text-section", gap: 0.5 }, /* @__PURE__ */ import_react42.default.createElement(import_material28.Typography, { "data-testid": "page-header-title", variant: "h6", color: "text.primary" }, title), subtitle && /* @__PURE__ */ import_react42.default.createElement(import_material28.Typography, { "data-testid": "page-header-subtitle", variant: "caption", color: "text.secondary" }, subtitle))), actions && /* @__PURE__ */ import_react42.default.createElement(import_material28.Stack, { id: "right-actions", direction: "row", alignItems: "center", gap: 1 }, actions))
|
|
4300
4368
|
);
|
|
4301
4369
|
};
|
|
4302
4370
|
|
|
@@ -4315,24 +4383,24 @@ var import_react43 = __toESM(require("react"), 1);
|
|
|
4315
4383
|
var import_material29 = require("@mui/material");
|
|
4316
4384
|
var import_Grid5 = __toESM(require("@mui/material/Grid"), 1);
|
|
4317
4385
|
var import_Avatar = __toESM(require("@mui/material/Avatar"), 1);
|
|
4318
|
-
var
|
|
4386
|
+
var Muicon7 = __toESM(require("@mui/icons-material"), 1);
|
|
4319
4387
|
var SCListContent = ({ options, iconLeftType = "Icon", iconRightType = "Icon" }) => {
|
|
4320
4388
|
const [selectedIndex, setSelectedIndex] = import_react43.default.useState("1");
|
|
4321
4389
|
const [value, setValue] = import_react43.default.useState("1");
|
|
4322
4390
|
options.map(function(option, index, array) {
|
|
4323
4391
|
if (option == null ? void 0 : option.iconLeft) {
|
|
4324
4392
|
if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
|
|
4325
|
-
const found =
|
|
4393
|
+
const found = Muicon7[option == null ? void 0 : option.iconLeft];
|
|
4326
4394
|
if (found != void 0) {
|
|
4327
|
-
option.iconLeft =
|
|
4395
|
+
option.iconLeft = Muicon7[option == null ? void 0 : option.iconLeft];
|
|
4328
4396
|
}
|
|
4329
4397
|
}
|
|
4330
4398
|
}
|
|
4331
4399
|
if (option == null ? void 0 : option.iconRight) {
|
|
4332
4400
|
if ((option == null ? void 0 : option.iconRight.type) == void 0) {
|
|
4333
|
-
const found =
|
|
4401
|
+
const found = Muicon7[option == null ? void 0 : option.iconRight];
|
|
4334
4402
|
if (found != void 0) {
|
|
4335
|
-
option.iconRight =
|
|
4403
|
+
option.iconRight = Muicon7[option == null ? void 0 : option.iconRight];
|
|
4336
4404
|
}
|
|
4337
4405
|
}
|
|
4338
4406
|
}
|
|
@@ -4388,8 +4456,6 @@ var SCActivityCalendar = ({
|
|
|
4388
4456
|
const [openCalendar, setOpenCalendar] = import_react44.default.useState(false);
|
|
4389
4457
|
const [anchorPopoverFiltro, setAnchorPopoverFiltro] = (0, import_react44.useState)(null);
|
|
4390
4458
|
const [datosEventos, setDatosEventos] = import_react44.default.useState(events);
|
|
4391
|
-
console.log("eventos", events);
|
|
4392
|
-
console.log("datosEventos", datosEventos);
|
|
4393
4459
|
const openPopoverFiltro = Boolean(anchorPopoverFiltro);
|
|
4394
4460
|
const hoy = /* @__PURE__ */ new Date();
|
|
4395
4461
|
const inicioSemana = (0, import_date_fns.startOfWeek)(fecha, { weekStartsOn: 0 });
|
|
@@ -4524,12 +4590,9 @@ var SCActivityCalendar = ({
|
|
|
4524
4590
|
flexDirection: "column"
|
|
4525
4591
|
} }, (() => {
|
|
4526
4592
|
const esDomingo = day.getDay() === 0;
|
|
4527
|
-
console.log("D\xEDa:", day);
|
|
4528
|
-
console.log("Filtrando eventos para el d\xEDa:", datosEventos);
|
|
4529
4593
|
const eventosDelDia = datosEventos.filter(
|
|
4530
4594
|
(event2) => (/* @__PURE__ */ new Date(event2.date + "T00:00:00")).toDateString() === day.toDateString()
|
|
4531
4595
|
);
|
|
4532
|
-
console.log("Cantidad eventos para el d\xEDa:", eventosDelDia);
|
|
4533
4596
|
if (eventosDelDia.length > 0) {
|
|
4534
4597
|
return eventosDelDia.map((event2, idx) => /* @__PURE__ */ import_react44.default.createElement(
|
|
4535
4598
|
SCListContent,
|
|
@@ -4627,11 +4690,9 @@ var SCAppBar = ({
|
|
|
4627
4690
|
};
|
|
4628
4691
|
(0, import_react46.useEffect)(() => {
|
|
4629
4692
|
const handleOnline = () => {
|
|
4630
|
-
console.log("tiene internet");
|
|
4631
4693
|
setIsOnline(true);
|
|
4632
4694
|
};
|
|
4633
4695
|
const handleOffline = () => {
|
|
4634
|
-
console.log(" no tiene internet");
|
|
4635
4696
|
setIsOnline(false);
|
|
4636
4697
|
};
|
|
4637
4698
|
window.addEventListener("online", handleOnline);
|
|
@@ -4783,13 +4844,13 @@ var import_CardContent = __toESM(require("@mui/material/CardContent"), 1);
|
|
|
4783
4844
|
var import_CardActions = __toESM(require("@mui/material/CardActions"), 1);
|
|
4784
4845
|
var import_Collapse = __toESM(require("@mui/material/Collapse"), 1);
|
|
4785
4846
|
var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"), 1);
|
|
4786
|
-
var
|
|
4847
|
+
var Muicon8 = __toESM(require("@mui/icons-material"), 1);
|
|
4787
4848
|
var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }) => {
|
|
4788
4849
|
let iconTitleValidation = "";
|
|
4789
4850
|
let IconTitle;
|
|
4790
4851
|
const [expanded, setExpanded] = import_react48.default.useState(false);
|
|
4791
4852
|
if (iconTitle) {
|
|
4792
|
-
if (
|
|
4853
|
+
if (Muicon8[iconTitle] == void 0) {
|
|
4793
4854
|
if (iconTitle && import_react48.default.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
4794
4855
|
iconTitleValidation = "image";
|
|
4795
4856
|
IconTitle = iconTitle;
|
|
@@ -4799,7 +4860,7 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
4799
4860
|
}
|
|
4800
4861
|
} else {
|
|
4801
4862
|
iconTitleValidation = "icon";
|
|
4802
|
-
IconTitle =
|
|
4863
|
+
IconTitle = Muicon8[iconTitle];
|
|
4803
4864
|
}
|
|
4804
4865
|
}
|
|
4805
4866
|
const handleExpandClick = () => {
|
|
@@ -4856,7 +4917,7 @@ var import_x_license2 = require("@mui/x-license");
|
|
|
4856
4917
|
var import_KeyboardArrowDown = __toESM(require("@mui/icons-material/KeyboardArrowDown"), 1);
|
|
4857
4918
|
var import_KeyboardArrowUp = __toESM(require("@mui/icons-material/KeyboardArrowUp"), 1);
|
|
4858
4919
|
var import_styles = require("@mui/material/styles");
|
|
4859
|
-
function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPage, rowsTable, rowSelection, checkboxSelection, width, maxHeight, density, disableColumnMenu, disableColumnSorting, setSelectedIndex, selectedIndex = 0, setSelectedRow, selectedRow }) {
|
|
4920
|
+
function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPage, rowsTable, rowSelection, checkboxSelection, width, maxHeight, density, disableColumnMenu, disableHeader, disableColumnSorting, setSelectedIndex, selectedIndex = 0, setSelectedRow, selectedRow }) {
|
|
4860
4921
|
import_x_license2.LicenseInfo.setLicenseKey(
|
|
4861
4922
|
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
4862
4923
|
);
|
|
@@ -4953,6 +5014,7 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
4953
5014
|
color: "#10184099",
|
|
4954
5015
|
display: "flex",
|
|
4955
5016
|
alignItems: "center",
|
|
5017
|
+
borderTop: params.rowNode.type === "group" && params.rowNode.depth === 0 ? "2px solid #2063A0" : "1px solid #E0E0E0",
|
|
4956
5018
|
paddingLeft: params.rowNode.depth == 0 ? "5px" : params.rowNode.depth == 1 ? "15px" : "25px",
|
|
4957
5019
|
backgroundColor: params.rowNode.type === "group" ? theme.palette.grey[100 + (maxDepth - params.rowNode.depth) * 100] : "#FFFFFF",
|
|
4958
5020
|
fontWeight: params.rowNode.type == "group" ? "400" : "300"
|
|
@@ -5107,7 +5169,6 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5107
5169
|
columnVisibilityModel[col.field] = false;
|
|
5108
5170
|
}
|
|
5109
5171
|
});
|
|
5110
|
-
console.log("columnVisibilityModel:", columnVisibilityModel);
|
|
5111
5172
|
const initialState = {
|
|
5112
5173
|
pagination: { paginationModel: { pageSize: rows } }
|
|
5113
5174
|
};
|
|
@@ -5159,6 +5220,9 @@ function SCDataGridInitial({ data, columns, getRowId, groupColumns, titleRowsPag
|
|
|
5159
5220
|
},
|
|
5160
5221
|
sx: {
|
|
5161
5222
|
maxHeight: maxHeight ? `${maxHeight}px` : "none",
|
|
5223
|
+
"& .MuiDataGrid-columnHeaders": {
|
|
5224
|
+
display: disableHeader == true ? "none" : "block"
|
|
5225
|
+
},
|
|
5162
5226
|
"& .MuiDataGrid-filler": {
|
|
5163
5227
|
display: "none !important"
|
|
5164
5228
|
},
|
|
@@ -5354,7 +5418,7 @@ var import_Grid9 = __toESM(require("@mui/material/Grid"), 1);
|
|
|
5354
5418
|
var import_ToggleButton = __toESM(require("@mui/material/ToggleButton"), 1);
|
|
5355
5419
|
var import_ToggleButtonGroup = __toESM(require("@mui/material/ToggleButtonGroup"), 1);
|
|
5356
5420
|
var import_Close2 = __toESM(require("@mui/icons-material/Close"), 1);
|
|
5357
|
-
var
|
|
5421
|
+
var Muicon9 = __toESM(require("@mui/icons-material"), 1);
|
|
5358
5422
|
var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, disableClose, dividers, widthContent, heightContent, background, typeView = "web", setShow, show }) => {
|
|
5359
5423
|
let i = 0;
|
|
5360
5424
|
let iconTitleValidation = "";
|
|
@@ -5369,17 +5433,17 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5369
5433
|
}
|
|
5370
5434
|
}, [show]);
|
|
5371
5435
|
if ((buttonDialog == null ? void 0 : buttonDialog.icon) != void 0) {
|
|
5372
|
-
if (
|
|
5436
|
+
if (Muicon9[buttonDialog == null ? void 0 : buttonDialog.icon] == void 0) {
|
|
5373
5437
|
ButtonIcon = buttonDialog == null ? void 0 : buttonDialog.icon;
|
|
5374
5438
|
} else {
|
|
5375
|
-
ButtonIcon =
|
|
5439
|
+
ButtonIcon = Muicon9[buttonDialog == null ? void 0 : buttonDialog.icon];
|
|
5376
5440
|
}
|
|
5377
5441
|
}
|
|
5378
5442
|
if (Array.isArray(actions)) {
|
|
5379
5443
|
actions.map(function(option, index, array) {
|
|
5380
5444
|
if (option == null ? void 0 : option.icon) {
|
|
5381
5445
|
if ((option == null ? void 0 : option.icon.type) == void 0) {
|
|
5382
|
-
option.icon =
|
|
5446
|
+
option.icon = Muicon9[option == null ? void 0 : option.icon];
|
|
5383
5447
|
} else {
|
|
5384
5448
|
option;
|
|
5385
5449
|
}
|
|
@@ -5387,17 +5451,17 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5387
5451
|
});
|
|
5388
5452
|
}
|
|
5389
5453
|
if (iconTitle) {
|
|
5390
|
-
if (
|
|
5391
|
-
if (
|
|
5454
|
+
if (Muicon9[iconTitle] == void 0) {
|
|
5455
|
+
if (Muicon9[iconTitle]) {
|
|
5392
5456
|
iconTitleValidation = "icon";
|
|
5393
|
-
IconTitle =
|
|
5457
|
+
IconTitle = Muicon9[iconTitle];
|
|
5394
5458
|
} else {
|
|
5395
5459
|
iconTitleValidation = "image";
|
|
5396
5460
|
IconTitle = iconTitle;
|
|
5397
5461
|
}
|
|
5398
5462
|
} else {
|
|
5399
5463
|
iconTitleValidation = "icon";
|
|
5400
|
-
IconTitle =
|
|
5464
|
+
IconTitle = Muicon9[iconTitle];
|
|
5401
5465
|
}
|
|
5402
5466
|
}
|
|
5403
5467
|
const handleOpen = () => {
|
|
@@ -5542,7 +5606,7 @@ function useWindowDimensions() {
|
|
|
5542
5606
|
}
|
|
5543
5607
|
|
|
5544
5608
|
// src/Components/SCMenu.tsx
|
|
5545
|
-
var
|
|
5609
|
+
var Muicon10 = __toESM(require("@mui/icons-material"), 1);
|
|
5546
5610
|
var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu, widthPage }) => {
|
|
5547
5611
|
const { height, width } = useWindowDimensions();
|
|
5548
5612
|
const menuSize = widthMenu ? parseInt(widthMenu) : 284;
|
|
@@ -5562,14 +5626,14 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5562
5626
|
options.map(function(option, index, array) {
|
|
5563
5627
|
if (option == null ? void 0 : option.iconLeft) {
|
|
5564
5628
|
if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
|
|
5565
|
-
option.iconLeft =
|
|
5629
|
+
option.iconLeft = Muicon10[option == null ? void 0 : option.iconLeft];
|
|
5566
5630
|
} else {
|
|
5567
5631
|
option;
|
|
5568
5632
|
}
|
|
5569
5633
|
}
|
|
5570
5634
|
if (option == null ? void 0 : option.iconRight) {
|
|
5571
5635
|
if ((option == null ? void 0 : option.iconRight.type) == void 0) {
|
|
5572
|
-
option.iconRight =
|
|
5636
|
+
option.iconRight = Muicon10[option == null ? void 0 : option.iconRight];
|
|
5573
5637
|
} else {
|
|
5574
5638
|
option;
|
|
5575
5639
|
}
|
|
@@ -5644,7 +5708,7 @@ var import_react55 = __toESM(require("react"), 1);
|
|
|
5644
5708
|
var import_material37 = require("@mui/material");
|
|
5645
5709
|
var import_TabPanel = __toESM(require("@mui/lab/TabPanel"), 1);
|
|
5646
5710
|
var import_TabContext = __toESM(require("@mui/lab/TabContext"), 1);
|
|
5647
|
-
var
|
|
5711
|
+
var Muicon11 = __toESM(require("@mui/icons-material"), 1);
|
|
5648
5712
|
var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
|
|
5649
5713
|
const [toast, setToast] = import_react55.default.useState(null);
|
|
5650
5714
|
let i = 0;
|
|
@@ -5662,9 +5726,9 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5662
5726
|
const optionsLength = options.length;
|
|
5663
5727
|
if (option == null ? void 0 : option.iconOrBadge) {
|
|
5664
5728
|
if (typeIcon == "icon") {
|
|
5665
|
-
if ((option == null ? void 0 : option.iconOrBadge) in
|
|
5729
|
+
if ((option == null ? void 0 : option.iconOrBadge) in Muicon11 == true) {
|
|
5666
5730
|
validateTypeIcon = true;
|
|
5667
|
-
option.iconOrBadge =
|
|
5731
|
+
option.iconOrBadge = Muicon11[option == null ? void 0 : option.iconOrBadge];
|
|
5668
5732
|
} else {
|
|
5669
5733
|
validateTypeIcon = false;
|
|
5670
5734
|
setTimeout(() => {
|
|
@@ -5678,7 +5742,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5678
5742
|
return;
|
|
5679
5743
|
}
|
|
5680
5744
|
} else if (typeIcon == "badge") {
|
|
5681
|
-
if ((option == null ? void 0 : option.iconOrBadge) in
|
|
5745
|
+
if ((option == null ? void 0 : option.iconOrBadge) in Muicon11 == false) {
|
|
5682
5746
|
validateTypeIcon = true;
|
|
5683
5747
|
option;
|
|
5684
5748
|
} else {
|
|
@@ -5818,7 +5882,7 @@ var SCTime = ({
|
|
|
5818
5882
|
setIsOpenPopover(false);
|
|
5819
5883
|
setAnchorEl(null);
|
|
5820
5884
|
};
|
|
5821
|
-
return /* @__PURE__ */ import_react56.default.createElement(import_LocalizationProvider5.LocalizationProvider, { dateAdapter: import_AdapterDayjs3.AdapterDayjs }, /* @__PURE__ */ import_react56.default.createElement(import_material38.Box, { sx: { position: "relative", width: width ? `${width}%` : "99%" } }, /* @__PURE__ */ import_react56.default.createElement(
|
|
5885
|
+
return /* @__PURE__ */ import_react56.default.createElement(import_LocalizationProvider5.LocalizationProvider, { dateAdapter: import_AdapterDayjs3.AdapterDayjs }, /* @__PURE__ */ import_react56.default.createElement(import_material38.Box, { sx: { position: "relative", minWidth: "120px", width: width ? `${width}%` : "99%" } }, /* @__PURE__ */ import_react56.default.createElement(
|
|
5822
5886
|
import_TimeField.TimeField,
|
|
5823
5887
|
{
|
|
5824
5888
|
label,
|