componentes-sinco 1.0.3 → 1.0.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/create-KZGO2OZA.svg +18 -0
- package/dist/empty-3NEKE7WO.svg +13 -0
- package/dist/error-RUCZUXDN.svg +5 -0
- package/dist/index.cjs +1555 -1101
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +216 -148
- package/dist/index.d.ts +216 -148
- package/dist/index.js +1536 -1086
- package/dist/index.js.map +1 -0
- package/dist/search-OKSCVF2W.svg +12 -0
- package/package.json +24 -17
- package/dist/componentes-sinco.css +0 -1
- package/dist/my-react-lib.es.js +0 -105856
- package/dist/my-react-lib.umd.js +0 -454
- package/dist/src/App.d.ts +0 -4
- package/dist/src/Components/Adjuntar/Adjuntar.d.ts +0 -4
- package/dist/src/Components/Adjuntar/Model.d.ts +0 -17
- package/dist/src/Components/Adjuntar/index.d.ts +0 -1
- package/dist/src/Components/Calendario/Calendario.d.ts +0 -3
- package/dist/src/Components/Drawer/Helpers/Model.d.ts +0 -55
- package/dist/src/Components/Drawer/Helpers/Utils.d.ts +0 -4
- package/dist/src/Components/Drawer/Helpers/index.d.ts +0 -3
- package/dist/src/Components/Drawer/Helpers/validateInput.d.ts +0 -3
- package/dist/src/Components/Drawer/SCDrawer.d.ts +0 -5
- package/dist/src/Components/Drawer/SCDrawer.test.d.ts +0 -1
- package/dist/src/Components/Drawer/index.d.ts +0 -1
- package/dist/src/Components/FooterAction/FooterAction.d.ts +0 -4
- package/dist/src/Components/FooterAction/Model.d.ts +0 -6
- package/dist/src/Components/FooterAction/index.d.ts +0 -2
- package/dist/src/Components/Hooks/useWindowDimensions.d.ts +0 -4
- package/dist/src/Components/Modal/Helpers/Data.d.ts +0 -19
- package/dist/src/Components/Modal/Helpers/Model.d.ts +0 -26
- package/dist/src/Components/Modal/Helpers/Utils.d.ts +0 -3
- package/dist/src/Components/Modal/Helpers/index.d.ts +0 -3
- package/dist/src/Components/Modal/SCModal.d.ts +0 -4
- package/dist/src/Components/Modal/SCModal.test.d.ts +0 -1
- package/dist/src/Components/Modal/index.d.ts +0 -2
- package/dist/src/Components/MultiSelect/MultiSelect.test.d.ts +0 -1
- package/dist/src/Components/MultiSelect/SCMultiSelect.d.ts +0 -4
- package/dist/src/Components/MultiSelect/example.d.ts +0 -3
- package/dist/src/Components/MultiSelect/helpers/Model.d.ts +0 -24
- package/dist/src/Components/MultiSelect/helpers/Utils.d.ts +0 -3
- package/dist/src/Components/MultiSelect/helpers/index.d.ts +0 -4
- package/dist/src/Components/MultiSelect/helpers/useFilteredItems.d.ts +0 -4
- package/dist/src/Components/MultiSelect/helpers/useHandlers.d.ts +0 -12
- package/dist/src/Components/MultiSelect/index.d.ts +0 -2
- package/dist/src/Components/PageHeader/Model.d.ts +0 -8
- package/dist/src/Components/PageHeader/PageHeader.d.ts +0 -4
- package/dist/src/Components/PageHeader/PageHeader.test.d.ts +0 -1
- package/dist/src/Components/PageHeader/index.d.ts +0 -2
- package/dist/src/Components/SCAutocomplete.d.ts +0 -26
- package/dist/src/Components/SCCalendarSwipeable.d.ts +0 -9
- package/dist/src/Components/SCDataGrid.d.ts +0 -19
- package/dist/src/Components/SCDialog.d.ts +0 -32
- package/dist/src/Components/SCMenu.d.ts +0 -20
- package/dist/src/Components/SCTabs.d.ts +0 -22
- package/dist/src/Components/TextArea/Helpers/Model.d.ts +0 -23
- package/dist/src/Components/TextArea/Helpers/index.d.ts +0 -2
- package/dist/src/Components/TextArea/Helpers/validateIcon.d.ts +0 -3
- package/dist/src/Components/TextArea/SCTextArea.d.ts +0 -4
- package/dist/src/Components/TextArea/index.d.ts +0 -2
- package/dist/src/Components/Textfield/Helpers/index.d.ts +0 -3
- package/dist/src/Components/Textfield/Helpers/validateIcon.d.ts +0 -4
- package/dist/src/Components/Textfield/Helpers/validateKeyDown.d.ts +0 -1
- package/dist/src/Components/Textfield/Helpers/validateOnBlur.d.ts +0 -10
- package/dist/src/Components/Textfield/Model.d.ts +0 -32
- package/dist/src/Components/Textfield/SCTextField.d.ts +0 -4
- package/dist/src/Components/Textfield/Textfield.test.d.ts +0 -1
- package/dist/src/Components/Textfield/index.d.ts +0 -2
- package/dist/src/Components/ToastNotification/Model.d.ts +0 -14
- package/dist/src/Components/ToastNotification/SCToastNotification.d.ts +0 -4
- package/dist/src/Components/ToastNotification/index.d.ts +0 -3
- package/dist/src/Components/ToastNotification/useProgress.d.ts +0 -6
- package/dist/src/Components/index.d.ts +0 -14
- package/dist/src/Pages/PruebasDavid/Test.d.ts +0 -3
- package/dist/src/Pages/PruebasNataly/PruebaPag1.d.ts +0 -4
- package/dist/src/Pages/PruebasNataly/PruebaPag2.d.ts +0 -3
- package/dist/src/Pages/PruebasNataly/TestNataly.d.ts +0 -3
- package/dist/src/Theme/breakpoints.d.ts +0 -3
- package/dist/src/Theme/components.d.ts +0 -3
- package/dist/src/Theme/index.d.ts +0 -3
- package/dist/src/Theme/mixins.d.ts +0 -3
- package/dist/src/Theme/module.d.ts +0 -69
- package/dist/src/Theme/palette.d.ts +0 -6
- package/dist/src/Theme/shadows.d.ts +0 -3
- package/dist/src/Theme/theme.d.ts +0 -5
- package/dist/src/Theme/typography.d.ts +0 -3
- package/dist/src/generales/capitalize.d.ts +0 -1
- package/dist/src/generales/index.d.ts +0 -2
- package/dist/src/generales/types.d.ts +0 -4
- package/dist/src/index.d.ts +0 -5
- package/dist/src/main.d.ts +0 -1
- package/dist/src/stories/Autocomplete/Autocomplete.stories.d.ts +0 -7
- package/dist/src/stories/CalendarSwipeable/CalendarSwipeable.stories.d.ts +0 -7
- package/dist/src/stories/DataGrid/DataGrid.stories.d.ts +0 -7
- package/dist/src/stories/Dialog/Dialog.stories.d.ts +0 -7
- package/dist/src/stories/Drawer/Drawer.stories.d.ts +0 -7
- package/dist/src/stories/FooterAction/Footer.stories.d.ts +0 -7
- package/dist/src/stories/Generales/Typography.d.ts +0 -1
- package/dist/src/stories/Generales/index.d.ts +0 -2
- package/dist/src/stories/Generales/types.d.ts +0 -3
- package/dist/src/stories/Menu/Menu.stories.d.ts +0 -7
- package/dist/src/stories/Modal/Modal.stories.d.ts +0 -7
- package/dist/src/stories/MultiSelect/MultiSelect.stories.d.ts +0 -7
- package/dist/src/stories/PageHeader/Header.stories.d.ts +0 -7
- package/dist/src/stories/Tabs/Tabs.stories.d.ts +0 -7
- package/dist/src/stories/TextArea/TextArea.stories.d.ts +0 -7
- package/dist/src/stories/Textfield/textfield.stories.d.ts +0 -7
- package/dist/src/stories/ToastNotification/toastNotification.stories.d.ts +0 -27
- package/dist/vite.svg +0 -1
- package/dist/vitest.setup.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -31,9 +31,9 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
// src/Components/Drawer/SCDrawer.tsx
|
|
34
|
-
import
|
|
35
|
-
import { Box as
|
|
36
|
-
import
|
|
34
|
+
import React7 from "react";
|
|
35
|
+
import { Box as Box7, Drawer, Typography as Typography7, IconButton as IconButton5, Button as Button4, Stack as Stack3, Chip as Chip2 } from "@mui/material";
|
|
36
|
+
import Grid4 from "@mui/material/Grid2";
|
|
37
37
|
import CloseIcon from "@mui/icons-material/Close";
|
|
38
38
|
|
|
39
39
|
// src/Components/Textfield/SCTextField.tsx
|
|
@@ -75,12 +75,12 @@ function validateKeyDown(event2, format2) {
|
|
|
75
75
|
|
|
76
76
|
// src/Components/Textfield/Helpers/validateOnBlur.tsx
|
|
77
77
|
var validateOnBlurField = ({
|
|
78
|
-
|
|
78
|
+
state,
|
|
79
79
|
required = false,
|
|
80
80
|
setError,
|
|
81
81
|
onBlur
|
|
82
82
|
}) => (event2) => {
|
|
83
|
-
const isError = !
|
|
83
|
+
const isError = !state.trim() && required;
|
|
84
84
|
setError(isError);
|
|
85
85
|
if (onBlur) {
|
|
86
86
|
onBlur(event2);
|
|
@@ -109,8 +109,8 @@ var SCTextField = ({
|
|
|
109
109
|
color,
|
|
110
110
|
background,
|
|
111
111
|
//Funcionales
|
|
112
|
+
setState,
|
|
112
113
|
state,
|
|
113
|
-
value,
|
|
114
114
|
onChange,
|
|
115
115
|
onBlur,
|
|
116
116
|
onKeyDown
|
|
@@ -161,15 +161,15 @@ var SCTextField = ({
|
|
|
161
161
|
const handleInputChange = (event2) => {
|
|
162
162
|
let valueMax = maxLength ? maxLength + 1 : 50;
|
|
163
163
|
if (event2.target.value.length < valueMax) {
|
|
164
|
-
if (
|
|
165
|
-
|
|
164
|
+
if (setState) {
|
|
165
|
+
setState(event2.target.value);
|
|
166
166
|
}
|
|
167
167
|
if (onChange) {
|
|
168
168
|
onChange(event2);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
-
const handleBlur = validateOnBlurField({
|
|
172
|
+
const handleBlur = validateOnBlurField({ state, required, setError, onBlur });
|
|
173
173
|
const handleOpenInfoTitle = (event2) => {
|
|
174
174
|
setAnchorInfoTitle(event2.currentTarget);
|
|
175
175
|
};
|
|
@@ -244,7 +244,7 @@ var SCTextField = ({
|
|
|
244
244
|
{
|
|
245
245
|
size: size ? size : "medium",
|
|
246
246
|
fullWidth: true,
|
|
247
|
-
value,
|
|
247
|
+
value: state,
|
|
248
248
|
error,
|
|
249
249
|
id: label == null ? void 0 : label.replace(/\s+/g, ""),
|
|
250
250
|
disabled: disabled != null ? disabled : false,
|
|
@@ -540,7 +540,7 @@ function getIcon(name) {
|
|
|
540
540
|
|
|
541
541
|
// src/Components/TextArea/SCTextArea.tsx
|
|
542
542
|
import React3, { useEffect as useEffect4, useState as useState4 } from "react";
|
|
543
|
-
import { Typography as Typography3, Stack as Stack2, TextField, Box as Box3, Popover as Popover2, Tooltip as Tooltip2, SvgIcon as SvgIcon2, Grid2 } from "@mui/material";
|
|
543
|
+
import { Typography as Typography3, Stack as Stack2, TextField, Box as Box3, Popover as Popover2, Tooltip as Tooltip2, SvgIcon as SvgIcon2, Grid as Grid2 } from "@mui/material";
|
|
544
544
|
import { InfoOutlined as InfoOutlined2 } from "@mui/icons-material";
|
|
545
545
|
var SCTextArea = ({
|
|
546
546
|
//informativas
|
|
@@ -559,8 +559,8 @@ var SCTextArea = ({
|
|
|
559
559
|
colorTitle,
|
|
560
560
|
background,
|
|
561
561
|
//funcionales
|
|
562
|
+
setState,
|
|
562
563
|
state,
|
|
563
|
-
value,
|
|
564
564
|
onBlur
|
|
565
565
|
}) => {
|
|
566
566
|
const [helperCount, setHelperCount] = useState4(0);
|
|
@@ -568,11 +568,11 @@ var SCTextArea = ({
|
|
|
568
568
|
const [anchorInfoTitle, setAnchorInfoTitle] = React3.useState(null);
|
|
569
569
|
const openInfoTitle = Boolean(anchorInfoTitle);
|
|
570
570
|
useEffect4(() => {
|
|
571
|
-
setHelperCount(
|
|
572
|
-
}, [
|
|
571
|
+
setHelperCount(state == null ? void 0 : state.length);
|
|
572
|
+
}, [state]);
|
|
573
573
|
const IconTitle = getIcon(iconTitle);
|
|
574
574
|
const handleBlur = (event2) => {
|
|
575
|
-
if (required &&
|
|
575
|
+
if (required && state.trim() === "") {
|
|
576
576
|
setStateError(true);
|
|
577
577
|
setTimeout(() => {
|
|
578
578
|
setStateError(false);
|
|
@@ -634,11 +634,11 @@ var SCTextArea = ({
|
|
|
634
634
|
multiline: true,
|
|
635
635
|
disabled,
|
|
636
636
|
rows,
|
|
637
|
-
value,
|
|
637
|
+
value: state,
|
|
638
638
|
onBlur: handleBlur,
|
|
639
639
|
onChange: (e) => {
|
|
640
|
-
if (
|
|
641
|
-
|
|
640
|
+
if (setState) {
|
|
641
|
+
setState(e.target.value.substring(0, maxLength));
|
|
642
642
|
}
|
|
643
643
|
},
|
|
644
644
|
autoComplete: "off"
|
|
@@ -656,683 +656,723 @@ var SCTextArea = ({
|
|
|
656
656
|
))));
|
|
657
657
|
};
|
|
658
658
|
|
|
659
|
-
// src/Components/
|
|
659
|
+
// src/Components/SCSelect.tsx
|
|
660
|
+
import React4, { useEffect as useEffect5 } from "react";
|
|
661
|
+
import { InputLabel as InputLabel2, FormControl as FormControl2, MenuItem, SvgIcon as SvgIcon3, ListItemIcon, ListItemText, Box as Box4 } from "@mui/material";
|
|
662
|
+
import Select from "@mui/material/Select";
|
|
660
663
|
import * as Muicon2 from "@mui/icons-material";
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
664
|
+
function SCSelect({
|
|
665
|
+
label = "",
|
|
666
|
+
data,
|
|
667
|
+
getItemValue,
|
|
668
|
+
width = "100%",
|
|
669
|
+
size = "small",
|
|
670
|
+
variant = "outlined",
|
|
671
|
+
deleteType = "button",
|
|
672
|
+
required,
|
|
673
|
+
disabled,
|
|
674
|
+
background,
|
|
675
|
+
fnAplicar,
|
|
676
|
+
setState,
|
|
677
|
+
state
|
|
678
|
+
}) {
|
|
679
|
+
const labelContent = `<span style="color: red;">* </span>` + label;
|
|
680
|
+
const [prevData, setPrevData] = React4.useState(data);
|
|
681
|
+
const [error, setError] = React4.useState(false);
|
|
682
|
+
useEffect5(() => {
|
|
683
|
+
if (error) {
|
|
684
|
+
setTimeout(() => {
|
|
685
|
+
setError(false);
|
|
686
|
+
}, 1e3);
|
|
673
687
|
}
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
if (
|
|
684
|
-
if (
|
|
685
|
-
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
filledValues++;
|
|
688
|
+
}, [error]);
|
|
689
|
+
useEffect5(() => {
|
|
690
|
+
let dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
|
|
691
|
+
if (dataChangeValidation == false) {
|
|
692
|
+
setState({ hiddenValue: "", textValue: "" });
|
|
693
|
+
setPrevData(data);
|
|
694
|
+
}
|
|
695
|
+
}, [data]);
|
|
696
|
+
data.map(function(option, index, array) {
|
|
697
|
+
if (option == null ? void 0 : option.icon) {
|
|
698
|
+
if ((option == null ? void 0 : option.icon.type) == void 0) {
|
|
699
|
+
option.icon = Muicon2[option == null ? void 0 : option.icon];
|
|
700
|
+
} else {
|
|
701
|
+
option;
|
|
689
702
|
}
|
|
690
703
|
}
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
type: "error",
|
|
697
|
-
title: "Algunos campos son requeridos",
|
|
698
|
-
time: 10
|
|
699
|
-
});
|
|
700
|
-
}
|
|
701
|
-
};
|
|
702
|
-
|
|
703
|
-
// src/generales/capitalize.tsx
|
|
704
|
-
function capitalize(text) {
|
|
705
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
// src/Components/Drawer/SCDrawer.tsx
|
|
709
|
-
var SCDrawer = ({
|
|
710
|
-
//informativas
|
|
711
|
-
title,
|
|
712
|
-
arrayElements = [],
|
|
713
|
-
actions,
|
|
714
|
-
buttonDrawer,
|
|
715
|
-
//Apariencia
|
|
716
|
-
colorTitle,
|
|
717
|
-
anchor = "left",
|
|
718
|
-
width,
|
|
719
|
-
//Funcionales
|
|
720
|
-
open
|
|
721
|
-
}) => {
|
|
722
|
-
var _a;
|
|
723
|
-
const [drawerOpen, setDrawerOpen] = React4.useState(open);
|
|
724
|
-
const [toast, setToast] = React4.useState(null);
|
|
725
|
-
const handleDrawerClose = () => {
|
|
726
|
-
setDrawerOpen(false);
|
|
727
|
-
};
|
|
728
|
-
const toggleDrawer = (newOpen) => () => {
|
|
729
|
-
setDrawerOpen(newOpen);
|
|
704
|
+
});
|
|
705
|
+
const handleBlur = () => {
|
|
706
|
+
const currentValue = Array.isArray(state.hiddenValue) ? state.hiddenValue[0] : state.hiddenValue;
|
|
707
|
+
const isError = !currentValue && !!required;
|
|
708
|
+
setError(Boolean(isError));
|
|
730
709
|
};
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
710
|
+
const handleChange = (event2) => {
|
|
711
|
+
const selectedValue = event2.target.value;
|
|
712
|
+
if (selectedValue) {
|
|
713
|
+
const selectedOption = data.find((item) => getItemValue(item).value === selectedValue);
|
|
714
|
+
if (selectedOption) {
|
|
715
|
+
const itemValue = getItemValue(selectedOption);
|
|
716
|
+
setState({
|
|
717
|
+
hiddenValue: itemValue.value,
|
|
718
|
+
textValue: itemValue.text
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
}
|
|
737
722
|
};
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
actions = actions != null ? actions : [{ text: "Limpiar", fn: clean }, { text: "Consultar", fn: inputValidation }];
|
|
741
|
-
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, toast && /* @__PURE__ */ React4.createElement(SCToastNotification, __spreadValues({}, toast)), /* @__PURE__ */ React4.createElement(
|
|
742
|
-
Button2,
|
|
743
|
-
{
|
|
744
|
-
"data-testid": "test-buttonDrawer",
|
|
745
|
-
sx: { textTransform: "capitalize" },
|
|
746
|
-
color: buttonDrawer == null ? void 0 : buttonDrawer.color,
|
|
747
|
-
onClick: toggleDrawer(true),
|
|
748
|
-
size: "small",
|
|
749
|
-
variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) != void 0 ? buttonDrawer == null ? void 0 : buttonDrawer.variant : "text",
|
|
750
|
-
startIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" || !(buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) ? /* @__PURE__ */ React4.createElement(ButtonIcon, { color: (buttonDrawer == null ? void 0 : buttonDrawer.color) != void 0 ? buttonDrawer == null ? void 0 : buttonDrawer.color : "primary" }) : null,
|
|
751
|
-
endIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" ? /* @__PURE__ */ React4.createElement(ButtonIcon, { color: (buttonDrawer == null ? void 0 : buttonDrawer.color) != void 0 ? buttonDrawer == null ? void 0 : buttonDrawer.color : "primary" }) : null
|
|
752
|
-
},
|
|
753
|
-
capitalize((_a = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _a : "Drawer")
|
|
754
|
-
), /* @__PURE__ */ React4.createElement(
|
|
755
|
-
Drawer,
|
|
723
|
+
return /* @__PURE__ */ React4.createElement(React4.Fragment, null, data && /* @__PURE__ */ React4.createElement(Box4, { sx: { width } }, /* @__PURE__ */ React4.createElement(
|
|
724
|
+
FormControl2,
|
|
756
725
|
{
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
sx: {
|
|
761
|
-
"& .MuiDrawer-paper": {
|
|
762
|
-
width: width != null ? width : "450px",
|
|
763
|
-
boxSizing: "border-box",
|
|
764
|
-
borderRadius: anchor !== "right" ? "0px 4px 4px 0px" : "4px 0px 0px 4px"
|
|
765
|
-
}
|
|
766
|
-
}
|
|
726
|
+
fullWidth: true,
|
|
727
|
+
size: size ? size : "medium",
|
|
728
|
+
variant
|
|
767
729
|
},
|
|
768
|
-
/* @__PURE__ */ React4.createElement(
|
|
769
|
-
|
|
770
|
-
return /* @__PURE__ */ React4.createElement(
|
|
771
|
-
Box4,
|
|
772
|
-
{
|
|
773
|
-
key: `Stack_${(_a2 = arrayElement.type) != null ? _a2 : ""} ${(_b = arrayElement.label) != null ? _b : ""}${index}`,
|
|
774
|
-
sx: { width: "100%" }
|
|
775
|
-
},
|
|
776
|
-
arrayElement.component ? /* @__PURE__ */ React4.createElement(Stack3, { direction: "row", alignItems: "left", gap: 1 }, arrayElement.component) : arrayElement.type === "textField" ? /* @__PURE__ */ React4.createElement(
|
|
777
|
-
SCTextField,
|
|
778
|
-
{
|
|
779
|
-
title: arrayElement.title,
|
|
780
|
-
iconTitle: arrayElement.iconTitle,
|
|
781
|
-
infoTitle: arrayElement.infoTitle,
|
|
782
|
-
label: arrayElement.label,
|
|
783
|
-
placeholder: arrayElement.placeholder,
|
|
784
|
-
infoElement: arrayElement.infoElement,
|
|
785
|
-
iconInputStart: arrayElement.iconInputStart,
|
|
786
|
-
iconInputEnd: arrayElement.iconInputEnd,
|
|
787
|
-
maxLength: arrayElement.maxLength,
|
|
788
|
-
variant: arrayElement.variant,
|
|
789
|
-
format: arrayElement.format,
|
|
790
|
-
disabled: arrayElement.disabled,
|
|
791
|
-
required: arrayElement.required,
|
|
792
|
-
size: arrayElement.size,
|
|
793
|
-
width: arrayElement.width,
|
|
794
|
-
color: arrayElement.color,
|
|
795
|
-
background: arrayElement.background,
|
|
796
|
-
state: arrayElement.state,
|
|
797
|
-
value: arrayElement.value || "",
|
|
798
|
-
onChange: arrayElement.onChange,
|
|
799
|
-
onBlur: arrayElement.onBlur,
|
|
800
|
-
onKeyDown: arrayElement.onKeyDown
|
|
801
|
-
}
|
|
802
|
-
) : arrayElement.type === "textArea" ? /* @__PURE__ */ React4.createElement(
|
|
803
|
-
SCTextArea,
|
|
804
|
-
{
|
|
805
|
-
title: arrayElement.title,
|
|
806
|
-
iconTitle: arrayElement.iconTitle,
|
|
807
|
-
infoTitle: arrayElement.infoTitle,
|
|
808
|
-
label: arrayElement.label,
|
|
809
|
-
placeholder: arrayElement.placeholder,
|
|
810
|
-
maxLength: arrayElement.maxLength,
|
|
811
|
-
variant: arrayElement.variant,
|
|
812
|
-
disabled: arrayElement.disabled,
|
|
813
|
-
required: arrayElement.required,
|
|
814
|
-
width: arrayElement.width,
|
|
815
|
-
rows: arrayElement.rows,
|
|
816
|
-
background: arrayElement.background,
|
|
817
|
-
state: arrayElement.state,
|
|
818
|
-
value: arrayElement.value || "",
|
|
819
|
-
onBlur: arrayElement.onBlur
|
|
820
|
-
}
|
|
821
|
-
) : null
|
|
822
|
-
);
|
|
823
|
-
})), actions != void 0 && actions.length > 0 ? /* @__PURE__ */ React4.createElement(
|
|
824
|
-
Grid3,
|
|
730
|
+
/* @__PURE__ */ React4.createElement(
|
|
731
|
+
InputLabel2,
|
|
825
732
|
{
|
|
826
|
-
|
|
827
|
-
bgcolor: "background.default",
|
|
828
|
-
gap: 2,
|
|
829
|
-
padding: "9px 16px 9px 16px",
|
|
830
|
-
height: "42px",
|
|
831
|
-
alignItems: "center",
|
|
832
|
-
justifyContent: actions.length > 1 ? "space-between" : !anchor && anchor != "right" ? "flex-end" : "flex-start",
|
|
833
|
-
flexDirection: anchor != "right" ? "row-reverse" : "row"
|
|
733
|
+
error
|
|
834
734
|
},
|
|
835
|
-
|
|
836
|
-
Button2,
|
|
837
|
-
{
|
|
838
|
-
key: index,
|
|
839
|
-
variant: index === 0 || actions && actions.length < 2 ? "contained" : "text",
|
|
840
|
-
color: "primary",
|
|
841
|
-
onClick: btn.fn,
|
|
842
|
-
disabled: btn.disabled || false,
|
|
843
|
-
size: "small"
|
|
844
|
-
},
|
|
845
|
-
btn.text
|
|
846
|
-
))
|
|
847
|
-
) : "")
|
|
848
|
-
));
|
|
849
|
-
};
|
|
850
|
-
|
|
851
|
-
// src/Components/MultiSelect/SCMultiSelect.tsx
|
|
852
|
-
import React5, { useEffect as useEffect5, useMemo as useMemo2 } from "react";
|
|
853
|
-
import { Button as Button3, Checkbox, FormControl as FormControl2, InputAdornment as InputAdornment2, ListItemIcon, MenuItem, Popover as Popover3, Stack as Stack4, TextField as TextField2 } from "@mui/material";
|
|
854
|
-
import { SearchOutlined } from "@mui/icons-material";
|
|
855
|
-
|
|
856
|
-
// src/Components/MultiSelect/helpers/useHandlers.tsx
|
|
857
|
-
import { useCallback, useState as useState5 } from "react";
|
|
858
|
-
function useMultiSelectHandlers() {
|
|
859
|
-
const [anchorEl, setAnchorEl] = useState5(null);
|
|
860
|
-
const [open, setOpen] = useState5(false);
|
|
861
|
-
const [selectedItems, setSelectedItems] = useState5([]);
|
|
862
|
-
const [filterValue, setFilterValue] = useState5("");
|
|
863
|
-
const handleOpen = useCallback((e) => {
|
|
864
|
-
setAnchorEl(e.currentTarget);
|
|
865
|
-
setOpen(true);
|
|
866
|
-
}, []);
|
|
867
|
-
const handleClose = useCallback(() => {
|
|
868
|
-
setAnchorEl(null);
|
|
869
|
-
setOpen(false);
|
|
870
|
-
}, []);
|
|
871
|
-
const handleFilterChange = useCallback(
|
|
872
|
-
(e) => {
|
|
873
|
-
setFilterValue(e.target.value);
|
|
874
|
-
},
|
|
875
|
-
[]
|
|
876
|
-
);
|
|
877
|
-
const handleCheckboxToggle = useCallback((item) => {
|
|
878
|
-
setSelectedItems(
|
|
879
|
-
(prev) => prev.includes(item) ? prev.filter((i) => i !== item) : [...prev, item]
|
|
880
|
-
);
|
|
881
|
-
}, []);
|
|
882
|
-
return {
|
|
883
|
-
anchorEl,
|
|
884
|
-
open,
|
|
885
|
-
selectedItems,
|
|
886
|
-
filterValue,
|
|
887
|
-
setSelectedItems,
|
|
888
|
-
handleOpen,
|
|
889
|
-
handleClose,
|
|
890
|
-
handleFilterChange,
|
|
891
|
-
handleCheckboxToggle,
|
|
892
|
-
setOpen
|
|
893
|
-
};
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
// src/Components/MultiSelect/helpers/Utils.tsx
|
|
897
|
-
import * as MuiIcons2 from "@mui/icons-material";
|
|
898
|
-
import { FilterListOutlined as FilterListOutlined2 } from "@mui/icons-material";
|
|
899
|
-
function getIconMultiSelect(name) {
|
|
900
|
-
return name in MuiIcons2 ? MuiIcons2[name] : FilterListOutlined2;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
// src/Components/MultiSelect/helpers/useFilteredItems.tsx
|
|
904
|
-
import { useMemo } from "react";
|
|
905
|
-
function useFilteredItems(items, filterValue, getItemLabel, selectedItems) {
|
|
906
|
-
const filteredItems = useMemo(
|
|
907
|
-
() => items.filter(
|
|
908
|
-
(item) => getItemLabel(item).toLowerCase().includes(filterValue.toLowerCase())
|
|
735
|
+
required ? /* @__PURE__ */ React4.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label
|
|
909
736
|
),
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
737
|
+
/* @__PURE__ */ React4.createElement(
|
|
738
|
+
Select,
|
|
739
|
+
{
|
|
740
|
+
value: Array.isArray(state.hiddenValue) ? state.hiddenValue[0] || "" : state.hiddenValue != "-1" ? state.hiddenValue : "",
|
|
741
|
+
label: required ? /* @__PURE__ */ React4.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
|
|
742
|
+
onChange: handleChange,
|
|
743
|
+
onBlur: handleBlur,
|
|
744
|
+
variant,
|
|
745
|
+
disabled: disabled || false,
|
|
746
|
+
error,
|
|
747
|
+
MenuProps: {
|
|
748
|
+
PaperProps: {
|
|
749
|
+
sx: {
|
|
750
|
+
left: "0px !important"
|
|
751
|
+
}
|
|
752
|
+
},
|
|
753
|
+
sx: {
|
|
754
|
+
"& .MuiPaper-root": {
|
|
755
|
+
left: "0px !important"
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
},
|
|
760
|
+
data.map((option, index) => {
|
|
761
|
+
return /* @__PURE__ */ React4.createElement(MenuItem, { key: index, value: getItemValue(option).value }, getItemValue(option).icon != void 0 ? /* @__PURE__ */ React4.createElement(ListItemIcon, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ React4.createElement(SvgIcon3, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "", /* @__PURE__ */ React4.createElement(ListItemText, { primary: getItemValue(option).text, color: "text.primary" }));
|
|
762
|
+
})
|
|
763
|
+
)
|
|
764
|
+
)));
|
|
919
765
|
}
|
|
920
766
|
|
|
921
|
-
// src/Components/
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
767
|
+
// src/Components/SCAutocomplete.tsx
|
|
768
|
+
import React5, { useEffect as useEffect6 } from "react";
|
|
769
|
+
import { Autocomplete, Checkbox, InputAdornment as InputAdornment3, MenuItem as MenuItem2, TextField as TextField3, Typography as Typography5, SvgIcon as SvgIcon4, ListItemIcon as ListItemIcon2, ListItemText as ListItemText2, Divider as Divider3, FormControlLabel as FormControlLabel2, IconButton as IconButton4, Chip, Box as Box5, Button as Button3 } from "@mui/material";
|
|
770
|
+
import Grid3 from "@mui/material/Grid2";
|
|
771
|
+
import { Search, Clear } from "@mui/icons-material";
|
|
772
|
+
import * as Muicon3 from "@mui/icons-material";
|
|
773
|
+
function SCAutocomplete({
|
|
774
|
+
label = "",
|
|
775
|
+
data,
|
|
776
|
+
columnGroup,
|
|
777
|
+
getItemValue,
|
|
778
|
+
typeFormat = "normal",
|
|
779
|
+
checkMassive = false,
|
|
780
|
+
deleteType = "button",
|
|
781
|
+
fnAplicar,
|
|
782
|
+
required,
|
|
783
|
+
disabled,
|
|
784
|
+
background,
|
|
785
|
+
setState,
|
|
786
|
+
state,
|
|
787
|
+
inputChange,
|
|
788
|
+
maxCheck
|
|
789
|
+
// Agregar el parámetro maxCheck
|
|
932
790
|
}) {
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
if (
|
|
948
|
-
|
|
791
|
+
const labelContent = `<span style="color: red;">* </span>` + label;
|
|
792
|
+
let group = "";
|
|
793
|
+
let isSelected = false;
|
|
794
|
+
const [selectedOptions, setSelectedOptions] = React5.useState([]);
|
|
795
|
+
const [prevData, setPrevData] = React5.useState(data);
|
|
796
|
+
const [originalData, setOriginalData] = React5.useState(data);
|
|
797
|
+
const [inputValue, setInputValue] = React5.useState("");
|
|
798
|
+
const [isUserTyping, setIsUserTyping] = React5.useState(false);
|
|
799
|
+
useEffect6(() => {
|
|
800
|
+
const dataChangeValidation = JSON.stringify(prevData) === JSON.stringify(data);
|
|
801
|
+
if (!dataChangeValidation && !isUserTyping) {
|
|
802
|
+
setState({ hiddenValue: "-1", textValue: "" });
|
|
803
|
+
setSelectedOptions([]);
|
|
804
|
+
setOriginalData(data);
|
|
805
|
+
} else if (!isUserTyping) {
|
|
806
|
+
setOriginalData(data);
|
|
949
807
|
}
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
setSelectedItems([]);
|
|
953
|
-
}, [items, setSelectedItems]);
|
|
954
|
-
const { filteredItems, sortedItems } = useFilteredItems(items, filterValue, getItemLabel, selectedItems);
|
|
955
|
-
const Icon = useMemo2(() => {
|
|
956
|
-
var _a2;
|
|
957
|
-
return getIconMultiSelect((_a2 = button == null ? void 0 : button.icon) != null ? _a2 : "FilterListOutlined");
|
|
958
|
-
}, [button == null ? void 0 : button.icon]);
|
|
959
|
-
const handleSelectAll = () => {
|
|
960
|
-
const allSelected2 = selectedItems.length === filteredItems.length;
|
|
961
|
-
setSelectedItems(allSelected2 ? [] : filteredItems);
|
|
962
|
-
};
|
|
963
|
-
const allSelected = filteredItems.length > 0 && selectedItems.length === filteredItems.length;
|
|
964
|
-
const resolvedActions = actions != null ? actions : [
|
|
965
|
-
{ text: "Limpiar", fn: handleClose },
|
|
966
|
-
{ text: "Aplicar", fn: () => {
|
|
967
|
-
} }
|
|
968
|
-
];
|
|
969
|
-
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
|
|
970
|
-
Button3,
|
|
971
|
-
{
|
|
972
|
-
"test-id": "multiselect-button",
|
|
973
|
-
color: (_a = button == null ? void 0 : button.color) != null ? _a : "primary",
|
|
974
|
-
onClick: handleOpen,
|
|
975
|
-
variant: (_b = button == null ? void 0 : button.variant) != null ? _b : "text",
|
|
976
|
-
size: "small",
|
|
977
|
-
startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */ React5.createElement(Icon, null) : null,
|
|
978
|
-
endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */ React5.createElement(Icon, null) : null
|
|
979
|
-
},
|
|
980
|
-
capitalize(textButton != null ? textButton : "MultiSelect")
|
|
981
|
-
), /* @__PURE__ */ React5.createElement(
|
|
982
|
-
Popover3,
|
|
983
|
-
{
|
|
984
|
-
elevation: 8,
|
|
985
|
-
anchorEl,
|
|
986
|
-
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
987
|
-
open: openMultiselect,
|
|
988
|
-
onClose: () => setOpen(false)
|
|
989
|
-
},
|
|
990
|
-
/* @__PURE__ */ React5.createElement(Stack4, { minWidth: "320px", "data-testid": "multiselect-container", bgcolor: "white", boxShadow: 3, borderRadius: 1 }, /* @__PURE__ */ React5.createElement(Stack4, { py: 1, px: 2 }, topPanel != null ? topPanel : /* @__PURE__ */ React5.createElement(FormControl2, { fullWidth: true, size: "small" }, /* @__PURE__ */ React5.createElement(
|
|
991
|
-
TextField2,
|
|
992
|
-
{
|
|
993
|
-
"data-testid": "multiselect-input",
|
|
994
|
-
fullWidth: true,
|
|
995
|
-
size: "small",
|
|
996
|
-
variant: "outlined",
|
|
997
|
-
placeholder: "Buscar",
|
|
998
|
-
value: filterValue,
|
|
999
|
-
onChange: handleFilterChange,
|
|
1000
|
-
slotProps: {
|
|
1001
|
-
input: {
|
|
1002
|
-
endAdornment: /* @__PURE__ */ React5.createElement(InputAdornment2, { position: "end" }, /* @__PURE__ */ React5.createElement(SearchOutlined, { fontSize: "small" }))
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
))), /* @__PURE__ */ React5.createElement(Stack4, { maxHeight: "300px", overflow: "auto" }, selectAll && /* @__PURE__ */ React5.createElement(MenuItem, { dense, onClick: handleSelectAll }, /* @__PURE__ */ React5.createElement(ListItemIcon, null, /* @__PURE__ */ React5.createElement(Checkbox, { checked: allSelected, color: "primary" })), "Todos los items"), sortedItems.length > 0 ? sortedItems.map((item) => /* @__PURE__ */ React5.createElement(
|
|
1007
|
-
MenuItem,
|
|
1008
|
-
{
|
|
1009
|
-
key: getItemLabel(item),
|
|
1010
|
-
dense,
|
|
1011
|
-
onClick: () => handleCheckboxToggle(item)
|
|
1012
|
-
},
|
|
1013
|
-
/* @__PURE__ */ React5.createElement(ListItemIcon, null, /* @__PURE__ */ React5.createElement(
|
|
1014
|
-
Checkbox,
|
|
1015
|
-
{
|
|
1016
|
-
checked: selectedItems.includes(item),
|
|
1017
|
-
color: "primary"
|
|
1018
|
-
}
|
|
1019
|
-
)),
|
|
1020
|
-
getItemLabel(item)
|
|
1021
|
-
)) : /* @__PURE__ */ React5.createElement(MenuItem, { disabled: true }, "No se encontraron resultados")), /* @__PURE__ */ React5.createElement(Stack4, { direction: "row", gap: 1, p: 1, justifyContent: "space-between", bgcolor: "grey.50" }, resolvedActions.map((button2, index) => {
|
|
1022
|
-
var _a2;
|
|
1023
|
-
return /* @__PURE__ */ React5.createElement(
|
|
1024
|
-
Button3,
|
|
1025
|
-
{
|
|
1026
|
-
key: index,
|
|
1027
|
-
variant: index === 0 || resolvedActions.length < 2 ? "text" : "contained",
|
|
1028
|
-
onClick: button2.fn,
|
|
1029
|
-
disabled: (_a2 = button2.disabled) != null ? _a2 : false,
|
|
1030
|
-
size: "small"
|
|
1031
|
-
},
|
|
1032
|
-
capitalize(button2.text)
|
|
1033
|
-
);
|
|
1034
|
-
})))
|
|
1035
|
-
));
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
// src/Components/SCDialog.tsx
|
|
1039
|
-
import React6, { useEffect as useEffect6, useState as useState6 } from "react";
|
|
1040
|
-
import { Button as Button4, Typography as Typography5, Modal, Dialog, DialogActions, DialogContent, DialogTitle, IconButton as IconButton4, Tooltip as Tooltip3, Box as Box5, SvgIcon as SvgIcon3 } from "@mui/material";
|
|
1041
|
-
import Grid4 from "@mui/material/Grid2";
|
|
1042
|
-
import CloseIcon2 from "@mui/icons-material/Close";
|
|
1043
|
-
import * as Muicon3 from "@mui/icons-material";
|
|
1044
|
-
var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, disableClose, dividers, widthContent, heightContent, background, setShow, show }) => {
|
|
1045
|
-
let i = 0;
|
|
1046
|
-
let iconTitleValidation = "";
|
|
1047
|
-
let IconTitle;
|
|
1048
|
-
let ButtonIcon;
|
|
1049
|
-
const [open, setOpen] = useState6(show);
|
|
808
|
+
setPrevData(data);
|
|
809
|
+
}, [data, isUserTyping]);
|
|
1050
810
|
useEffect6(() => {
|
|
1051
|
-
if (
|
|
1052
|
-
|
|
811
|
+
if (typeFormat == "multiselect") {
|
|
812
|
+
if (state.hiddenValue != "-1" && Array.isArray(state.hiddenValue)) {
|
|
813
|
+
const newSelectedOptions = originalData.filter(
|
|
814
|
+
(item) => state.hiddenValue.includes(getItemValue(item).value)
|
|
815
|
+
);
|
|
816
|
+
setSelectedOptions(newSelectedOptions);
|
|
817
|
+
}
|
|
1053
818
|
}
|
|
1054
|
-
}, [
|
|
1055
|
-
|
|
1056
|
-
if (
|
|
1057
|
-
|
|
1058
|
-
} else {
|
|
1059
|
-
ButtonIcon = Muicon3[buttonDialog == null ? void 0 : buttonDialog.icon];
|
|
819
|
+
}, [state.hiddenValue, originalData, typeFormat]);
|
|
820
|
+
useEffect6(() => {
|
|
821
|
+
if (inputValue === "") {
|
|
822
|
+
setIsUserTyping(false);
|
|
1060
823
|
}
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
if (
|
|
1064
|
-
if (
|
|
1065
|
-
|
|
1066
|
-
IconTitle = iconTitle;
|
|
824
|
+
}, [inputValue]);
|
|
825
|
+
data.map(function(option) {
|
|
826
|
+
if (option == null ? void 0 : option.icon) {
|
|
827
|
+
if ((option == null ? void 0 : option.icon.type) == void 0) {
|
|
828
|
+
option.icon = Muicon3[option == null ? void 0 : option.icon];
|
|
1067
829
|
} else {
|
|
1068
|
-
|
|
1069
|
-
IconTitle = iconTitle;
|
|
830
|
+
option;
|
|
1070
831
|
}
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
const cleanOptions = (event2) => {
|
|
835
|
+
setState({ hiddenValue: "-1", textValue: "" });
|
|
836
|
+
setSelectedOptions([]);
|
|
837
|
+
setInputValue("");
|
|
838
|
+
setIsUserTyping(false);
|
|
839
|
+
};
|
|
840
|
+
const handleCheckAll = (event2) => {
|
|
841
|
+
if (event2.target.checked) {
|
|
842
|
+
const itemsToSelect = maxCheck ? data.slice(0, maxCheck) : data;
|
|
843
|
+
setSelectedOptions(itemsToSelect);
|
|
844
|
+
setState({
|
|
845
|
+
hiddenValue: itemsToSelect.map((item) => getItemValue(item).value),
|
|
846
|
+
textValue: itemsToSelect.map((item) => getItemValue(item).text)
|
|
847
|
+
});
|
|
1071
848
|
} else {
|
|
1072
|
-
|
|
1073
|
-
|
|
849
|
+
setSelectedOptions([]);
|
|
850
|
+
setState({ hiddenValue: "-1", textValue: "" });
|
|
851
|
+
setInputValue("");
|
|
852
|
+
setIsUserTyping(false);
|
|
1074
853
|
}
|
|
1075
|
-
}
|
|
1076
|
-
const
|
|
1077
|
-
const
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
854
|
+
};
|
|
855
|
+
const allSelected = data.length > 0 && selectedOptions.length === data.length;
|
|
856
|
+
const handleChange = (event2, value) => {
|
|
857
|
+
if (typeFormat === "multiselect") {
|
|
858
|
+
if (maxCheck && value.length > maxCheck) {
|
|
859
|
+
value = value.slice(0, maxCheck);
|
|
860
|
+
}
|
|
861
|
+
const ids = value.map((v) => getItemValue ? getItemValue(v).value : "");
|
|
862
|
+
const texts = value.map((v) => getItemValue ? getItemValue(v).text : "");
|
|
863
|
+
setSelectedOptions(value);
|
|
864
|
+
setState({
|
|
865
|
+
hiddenValue: ids,
|
|
866
|
+
textValue: texts
|
|
867
|
+
});
|
|
868
|
+
} else {
|
|
869
|
+
setState({
|
|
870
|
+
hiddenValue: getItemValue(value).value,
|
|
871
|
+
textValue: getItemValue(value).text
|
|
872
|
+
});
|
|
1081
873
|
}
|
|
1082
874
|
};
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
875
|
+
const selectedValue = typeFormat === "multiselect" ? selectedOptions : originalData.find(
|
|
876
|
+
(item) => getItemValue(item).value === state.hiddenValue
|
|
877
|
+
) || null;
|
|
878
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, data && /* @__PURE__ */ React5.createElement(
|
|
879
|
+
Autocomplete,
|
|
1087
880
|
{
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
881
|
+
multiple: typeFormat === "multiselect",
|
|
882
|
+
clearOnEscape: true,
|
|
883
|
+
disabled,
|
|
884
|
+
options: data,
|
|
885
|
+
isOptionEqualToValue: (option, value) => getItemValue(option).value === getItemValue(value).value,
|
|
886
|
+
onInputChange: (event2, value) => {
|
|
887
|
+
setInputValue(value);
|
|
888
|
+
setIsUserTyping(value.length > 0);
|
|
889
|
+
if (inputChange) {
|
|
890
|
+
inputChange(value);
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
onChange: handleChange,
|
|
894
|
+
getOptionLabel: (option) => getItemValue(option).text,
|
|
895
|
+
value: selectedValue,
|
|
1091
896
|
sx: {
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
897
|
+
background: background || "transparent",
|
|
898
|
+
width: "100%",
|
|
899
|
+
maxWidth: "100%"
|
|
900
|
+
},
|
|
901
|
+
limitTags: 2,
|
|
902
|
+
renderTags: (value, getTagProps) => {
|
|
903
|
+
const limit = 2;
|
|
904
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, value.slice(0, limit).map((option, index) => {
|
|
905
|
+
const _a = getTagProps({ index }), { key } = _a, chipProps = __objRest(_a, ["key"]);
|
|
906
|
+
return /* @__PURE__ */ React5.createElement(
|
|
907
|
+
Chip,
|
|
908
|
+
__spreadProps(__spreadValues({
|
|
909
|
+
key,
|
|
910
|
+
color: "default",
|
|
911
|
+
size: "small",
|
|
912
|
+
variant: "filled",
|
|
913
|
+
label: getItemValue(option).text
|
|
914
|
+
}, chipProps), {
|
|
915
|
+
style: { maxWidth: 120, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }
|
|
916
|
+
})
|
|
917
|
+
);
|
|
918
|
+
}), value.length > limit && /* @__PURE__ */ React5.createElement(Box5, { sx: { ml: 0.5, fontSize: 13, color: "#666", display: "flex", alignItems: "center" } }, `+${value.length - limit}`));
|
|
919
|
+
},
|
|
920
|
+
renderOption: (props, option) => {
|
|
921
|
+
const _a = props, { key } = _a, optionProps = __objRest(_a, ["key"]);
|
|
922
|
+
let isValid;
|
|
923
|
+
let isDisabled = false;
|
|
924
|
+
if (typeFormat == "multiselect") {
|
|
925
|
+
isSelected = selectedOptions.some(
|
|
926
|
+
(selected) => getItemValue(selected).value === getItemValue(option).value
|
|
927
|
+
);
|
|
928
|
+
if (maxCheck && selectedOptions.length >= maxCheck && !isSelected) {
|
|
929
|
+
isDisabled = true;
|
|
930
|
+
}
|
|
1095
931
|
}
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
/* @__PURE__ */ React6.createElement(
|
|
1100
|
-
DialogContent,
|
|
1101
|
-
{
|
|
1102
|
-
dividers: dividers ? dividers : false,
|
|
1103
|
-
sx: {
|
|
1104
|
-
m: 0,
|
|
1105
|
-
padding: "12px 16px 8px 16px",
|
|
1106
|
-
background: background ? background : "white",
|
|
1107
|
-
height: !heightContent ? "508px" : heightContent,
|
|
1108
|
-
width: widthContent == "extra-small" ? "444px" : widthContent == "small" ? "600px" : widthContent == "medium" ? "900px" : widthContent == "large" ? "1200px" : widthContent == "extra-large" ? "1536px" : "900px"
|
|
932
|
+
if (columnGroup) {
|
|
933
|
+
isValid = group == option[columnGroup];
|
|
934
|
+
group = option[columnGroup];
|
|
1109
935
|
}
|
|
936
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(React5.Fragment, { key }, columnGroup ? !isValid ? /* @__PURE__ */ React5.createElement(Typography5, { color: "text.secondary", sx: { margin: "7px 16px !important", fontSize: "13px !important" } }, option[columnGroup]) : "" : "", /* @__PURE__ */ React5.createElement(
|
|
937
|
+
MenuItem2,
|
|
938
|
+
__spreadProps(__spreadValues({}, optionProps), {
|
|
939
|
+
disabled: isDisabled,
|
|
940
|
+
style: {
|
|
941
|
+
background: typeFormat != "multiselect" ? state.hiddenValue == getItemValue(option).value ? "#dfe6ec" : "white" : "white",
|
|
942
|
+
padding: "7px 16px",
|
|
943
|
+
opacity: isDisabled ? 0.5 : 1
|
|
944
|
+
}
|
|
945
|
+
}),
|
|
946
|
+
typeFormat != "multiselect" && getItemValue(option).icon != void 0 ? /* @__PURE__ */ React5.createElement(ListItemIcon2, { sx: { minWidth: "10px !important" } }, /* @__PURE__ */ React5.createElement(SvgIcon4, { fontSize: "small", color: "action", component: getItemValue(option).icon })) : "",
|
|
947
|
+
typeFormat == "multiselect" ? /* @__PURE__ */ React5.createElement(
|
|
948
|
+
Checkbox,
|
|
949
|
+
{
|
|
950
|
+
checked: isSelected,
|
|
951
|
+
disabled: isDisabled,
|
|
952
|
+
value: getItemValue(option).text,
|
|
953
|
+
color: "primary"
|
|
954
|
+
}
|
|
955
|
+
) : "",
|
|
956
|
+
/* @__PURE__ */ React5.createElement(ListItemText2, { primary: getItemValue(option).text, color: "text.primary" }),
|
|
957
|
+
getItemValue(option).component != void 0 ? getItemValue(option).component : ""
|
|
958
|
+
)));
|
|
959
|
+
},
|
|
960
|
+
renderInput: (params) => /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
|
|
961
|
+
TextField3,
|
|
962
|
+
__spreadProps(__spreadValues({}, params), {
|
|
963
|
+
label: required ? /* @__PURE__ */ React5.createElement("span", { dangerouslySetInnerHTML: { __html: labelContent } }) : label,
|
|
964
|
+
placeholder: selectedOptions.length == 0 ? "B\xFAsqueda" : "",
|
|
965
|
+
InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
|
|
966
|
+
endAdornment: /* @__PURE__ */ React5.createElement(React5.Fragment, null, deleteType == "icon" && (state.hiddenValue.toString() != "-1" && state.hiddenValue.toString() != "") ? /* @__PURE__ */ React5.createElement(IconButton4, { size: "small", onClick: cleanOptions, sx: { marginLeft: "auto", textAlign: "right", padding: "0px" } }, /* @__PURE__ */ React5.createElement(Clear, { fontSize: "small" })) : "", /* @__PURE__ */ React5.createElement(InputAdornment3, { style: { zIndex: 1, position: "relative" }, position: "end" }, /* @__PURE__ */ React5.createElement(Search, { fontSize: "small", color: "action", style: { cursor: "pointer" } })))
|
|
967
|
+
})
|
|
968
|
+
})
|
|
969
|
+
)),
|
|
970
|
+
slotProps: {
|
|
971
|
+
listbox: {
|
|
972
|
+
component: React5.forwardRef(function ListboxComponent(props, ref) {
|
|
973
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
|
|
974
|
+
Box5,
|
|
975
|
+
__spreadProps(__spreadValues({
|
|
976
|
+
ref
|
|
977
|
+
}, props), {
|
|
978
|
+
sx: __spreadValues({
|
|
979
|
+
position: "relative",
|
|
980
|
+
paddingBottom: "56px",
|
|
981
|
+
backgroundColor: "white"
|
|
982
|
+
}, props.sx)
|
|
983
|
+
}),
|
|
984
|
+
checkMassive && typeFormat == "multiselect" ? /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(FormControlLabel2, { control: /* @__PURE__ */ React5.createElement(Checkbox, { checked: allSelected, indeterminate: selectedOptions.length > 0 && selectedOptions.length < data.length, onChange: handleCheckAll, color: "primary" }), label: "Todos los items", sx: { marginLeft: "0px !important", marginRight: "0px !important", padding: "7px 16px" } }), /* @__PURE__ */ React5.createElement(Divider3, null)) : "",
|
|
985
|
+
props.children,
|
|
986
|
+
deleteType == "button" || fnAplicar ? /* @__PURE__ */ React5.createElement(
|
|
987
|
+
Grid3,
|
|
988
|
+
{
|
|
989
|
+
container: true,
|
|
990
|
+
sx: {
|
|
991
|
+
position: "sticky",
|
|
992
|
+
bottom: -8,
|
|
993
|
+
left: 0,
|
|
994
|
+
width: "100%",
|
|
995
|
+
backgroundColor: "grey.50",
|
|
996
|
+
padding: "8px 16px",
|
|
997
|
+
textAlign: "left",
|
|
998
|
+
justifyContent: "space-between"
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
deleteType == "button" ? /* @__PURE__ */ React5.createElement(
|
|
1002
|
+
Button3,
|
|
1003
|
+
{
|
|
1004
|
+
variant: "text",
|
|
1005
|
+
color: "primary",
|
|
1006
|
+
size: "small",
|
|
1007
|
+
onClick: (event2) => {
|
|
1008
|
+
event2.stopPropagation();
|
|
1009
|
+
cleanOptions(event2);
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
"Limpiar"
|
|
1013
|
+
) : "",
|
|
1014
|
+
fnAplicar && /* @__PURE__ */ React5.createElement(
|
|
1015
|
+
Button3,
|
|
1016
|
+
{
|
|
1017
|
+
variant: "contained",
|
|
1018
|
+
color: "primary",
|
|
1019
|
+
size: "small",
|
|
1020
|
+
onClick: fnAplicar
|
|
1021
|
+
},
|
|
1022
|
+
"Aplicar"
|
|
1023
|
+
)
|
|
1024
|
+
) : ""
|
|
1025
|
+
));
|
|
1026
|
+
})
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
));
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
// src/Components/SCDateRange.tsx
|
|
1034
|
+
import React6 from "react";
|
|
1035
|
+
import { Box as Box6, InputAdornment as InputAdornment4 } from "@mui/material";
|
|
1036
|
+
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
|
|
1037
|
+
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
1038
|
+
import { DateRangePicker } from "@mui/x-date-pickers-pro/DateRangePicker";
|
|
1039
|
+
import { MultiInputDateRangeField } from "@mui/x-date-pickers-pro/MultiInputDateRangeField";
|
|
1040
|
+
import dayjs from "dayjs";
|
|
1041
|
+
import "dayjs/locale/es";
|
|
1042
|
+
import { LicenseInfo } from "@mui/x-license-pro";
|
|
1043
|
+
import EventIcon from "@mui/icons-material/Event";
|
|
1044
|
+
var SCDateRange = ({
|
|
1045
|
+
labelDateInitial = "Fecha inicial",
|
|
1046
|
+
labelDateFinal = "Fecha final",
|
|
1047
|
+
required = false,
|
|
1048
|
+
disabled = false,
|
|
1049
|
+
background = "transparent",
|
|
1050
|
+
state,
|
|
1051
|
+
setState
|
|
1052
|
+
}) => {
|
|
1053
|
+
LicenseInfo.setLicenseKey(
|
|
1054
|
+
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
1055
|
+
);
|
|
1056
|
+
const isStartEmpty = required && !state[0];
|
|
1057
|
+
const isEndEmpty = required && !state[1];
|
|
1058
|
+
const hasError = isStartEmpty || isEndEmpty;
|
|
1059
|
+
const handleDateChange = (newValue) => {
|
|
1060
|
+
const convertedValue = [
|
|
1061
|
+
newValue[0] ? dayjs(newValue[0]) : null,
|
|
1062
|
+
newValue[1] ? dayjs(newValue[1]) : null
|
|
1063
|
+
];
|
|
1064
|
+
setState(convertedValue);
|
|
1065
|
+
};
|
|
1066
|
+
return /* @__PURE__ */ React6.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "es" }, /* @__PURE__ */ React6.createElement(Box6, { sx: { width: "100%" } }, /* @__PURE__ */ React6.createElement(
|
|
1067
|
+
DateRangePicker,
|
|
1068
|
+
{
|
|
1069
|
+
value: state,
|
|
1070
|
+
onChange: handleDateChange,
|
|
1071
|
+
disabled,
|
|
1072
|
+
slots: {
|
|
1073
|
+
field: MultiInputDateRangeField
|
|
1110
1074
|
},
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1075
|
+
slotProps: {
|
|
1076
|
+
field: {
|
|
1077
|
+
slotProps: {
|
|
1078
|
+
textField: ({ position }) => ({
|
|
1079
|
+
label: position === "start" ? labelDateInitial : labelDateFinal,
|
|
1080
|
+
size: "small",
|
|
1081
|
+
variant: "outlined",
|
|
1082
|
+
required,
|
|
1083
|
+
error: position === "start" ? isStartEmpty : isEndEmpty,
|
|
1084
|
+
InputProps: {
|
|
1085
|
+
endAdornment: /* @__PURE__ */ React6.createElement(InputAdornment4, { position: "end" }, /* @__PURE__ */ React6.createElement(
|
|
1086
|
+
EventIcon,
|
|
1087
|
+
{
|
|
1088
|
+
color: hasError ? "error" : "action",
|
|
1089
|
+
fontSize: "small"
|
|
1090
|
+
}
|
|
1091
|
+
))
|
|
1092
|
+
},
|
|
1093
|
+
sx: {
|
|
1094
|
+
mr: position === "start" ? 1 : 0,
|
|
1095
|
+
"& .MuiOutlinedInput-root": {
|
|
1096
|
+
backgroundColor: background === "transparent" ? "transparent" : background
|
|
1097
|
+
},
|
|
1098
|
+
"& .MuiInputLabel-asterisk": {
|
|
1099
|
+
color: "error.main"
|
|
1100
|
+
},
|
|
1101
|
+
background: background != null ? background : "transparent"
|
|
1102
|
+
}
|
|
1103
|
+
})
|
|
1104
|
+
}
|
|
1118
1105
|
}
|
|
1119
|
-
) : content.component
|
|
1120
|
-
),
|
|
1121
|
-
dialogActions.length > 0 ? /* @__PURE__ */ React6.createElement(DialogActions, { sx: { gap: 1, m: 0, padding: "12px 16px 12px 16px" } }, dialogActions.map((boton) => /* @__PURE__ */ React6.createElement(
|
|
1122
|
-
Button4,
|
|
1123
|
-
{
|
|
1124
|
-
key: i = i + 1,
|
|
1125
|
-
autoFocus: true,
|
|
1126
|
-
variant: i == 1 || dialogActions.length < 2 ? "contained" : "text",
|
|
1127
|
-
color: "primary",
|
|
1128
|
-
size: "small",
|
|
1129
|
-
onClick: boton.fn,
|
|
1130
|
-
disabled: boton.disabled || false
|
|
1131
1106
|
},
|
|
1132
|
-
|
|
1133
|
-
|
|
1107
|
+
sx: {
|
|
1108
|
+
display: "flex",
|
|
1109
|
+
gap: 1,
|
|
1110
|
+
width: "100%"
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1134
1113
|
)));
|
|
1135
1114
|
};
|
|
1136
1115
|
|
|
1137
|
-
// src/Components/
|
|
1138
|
-
import React7 from "react";
|
|
1139
|
-
import { Box as Box6, Typography as Typography6, Paper, Divider as Divider2, MenuList, MenuItem as MenuItem2, ListItemIcon as ListItemIcon2, SvgIcon as SvgIcon4 } from "@mui/material";
|
|
1140
|
-
import Grid5 from "@mui/material/Grid2";
|
|
1141
|
-
|
|
1142
|
-
// src/Components/Hooks/useWindowDimensions.ts
|
|
1143
|
-
import { useState as useState7, useEffect as useEffect7 } from "react";
|
|
1144
|
-
function getWindowDimensions() {
|
|
1145
|
-
const { innerWidth: width, innerHeight: height } = window;
|
|
1146
|
-
return {
|
|
1147
|
-
width,
|
|
1148
|
-
height
|
|
1149
|
-
};
|
|
1150
|
-
}
|
|
1151
|
-
function useWindowDimensions() {
|
|
1152
|
-
const [windowDimensions, setWindowDimensions] = useState7(getWindowDimensions());
|
|
1153
|
-
useEffect7(() => {
|
|
1154
|
-
function handleResize() {
|
|
1155
|
-
setWindowDimensions(getWindowDimensions());
|
|
1156
|
-
}
|
|
1157
|
-
window.addEventListener("resize", handleResize);
|
|
1158
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
1159
|
-
}, []);
|
|
1160
|
-
return windowDimensions;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
// src/Components/SCMenu.tsx
|
|
1116
|
+
// src/Components/Drawer/Helpers/Utils.tsx
|
|
1164
1117
|
import * as Muicon4 from "@mui/icons-material";
|
|
1165
|
-
var
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
options.map(function(option, index, array) {
|
|
1182
|
-
if (option == null ? void 0 : option.iconLeft) {
|
|
1183
|
-
if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
|
|
1184
|
-
option.iconLeft = Muicon4[option == null ? void 0 : option.iconLeft];
|
|
1185
|
-
} else {
|
|
1186
|
-
option;
|
|
1118
|
+
var getIcon2 = (iconName) => {
|
|
1119
|
+
if (iconName && iconName in Muicon4) {
|
|
1120
|
+
return Muicon4[iconName];
|
|
1121
|
+
}
|
|
1122
|
+
return null;
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
// src/Components/Drawer/Helpers/validateInput.tsx
|
|
1126
|
+
var validateInputs = (arrayElements, onError, onSuccess) => {
|
|
1127
|
+
var _a;
|
|
1128
|
+
let requiredValues = 0;
|
|
1129
|
+
let filledValues = 0;
|
|
1130
|
+
for (let i = 0; i < arrayElements.length; i++) {
|
|
1131
|
+
if (arrayElements[i].component === void 0) {
|
|
1132
|
+
if (arrayElements[i].required) {
|
|
1133
|
+
requiredValues++;
|
|
1187
1134
|
}
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
if ((option == null ? void 0 : option.iconRight.type) == void 0) {
|
|
1191
|
-
option.iconRight = Muicon4[option == null ? void 0 : option.iconRight];
|
|
1192
|
-
} else {
|
|
1193
|
-
option;
|
|
1135
|
+
if (arrayElements[i].required && ((_a = arrayElements[i].state) == null ? void 0 : _a.trim()) !== "") {
|
|
1136
|
+
filledValues++;
|
|
1194
1137
|
}
|
|
1195
1138
|
}
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(Grid5, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ React7.createElement(Paper, { sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ React7.createElement(MenuList, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(
|
|
1207
|
-
MenuItem2,
|
|
1208
|
-
{
|
|
1209
|
-
disabled: disable == true ? true : false,
|
|
1210
|
-
key: index,
|
|
1211
|
-
selected: String(index + 1) === selectedIndex,
|
|
1212
|
-
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
1213
|
-
},
|
|
1214
|
-
option.iconLeft ? /* @__PURE__ */ React7.createElement(ListItemIcon2, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React7.createElement(SvgIcon4, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
1215
|
-
/* @__PURE__ */ React7.createElement(Grid5, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React7.createElement(Typography6, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React7.createElement(ListItemIcon2, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React7.createElement(SvgIcon4, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
1216
|
-
), option.divider == true ? /* @__PURE__ */ React7.createElement(Divider2, null) : "")))), /* @__PURE__ */ React7.createElement(Grid5, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React7.createElement(Box6, { sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React7.createElement(Typography6, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
1139
|
+
}
|
|
1140
|
+
if (requiredValues === filledValues) {
|
|
1141
|
+
onSuccess();
|
|
1142
|
+
} else {
|
|
1143
|
+
onError({
|
|
1144
|
+
type: "error",
|
|
1145
|
+
title: "Algunos campos son requeridos",
|
|
1146
|
+
time: 10
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1217
1149
|
};
|
|
1218
1150
|
|
|
1219
|
-
// src/Components/
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
} else if (typeIcon == "badge") {
|
|
1258
|
-
if ((option == null ? void 0 : option.iconOrBadge) in Muicon5 == false) {
|
|
1259
|
-
validateTypeIcon = true;
|
|
1260
|
-
option;
|
|
1151
|
+
// src/Components/Drawer/SCDrawer.tsx
|
|
1152
|
+
function SCDrawer({
|
|
1153
|
+
//informativas
|
|
1154
|
+
title,
|
|
1155
|
+
arrayElements = [],
|
|
1156
|
+
actions,
|
|
1157
|
+
buttonDrawer,
|
|
1158
|
+
//Apariencia
|
|
1159
|
+
colorTitle,
|
|
1160
|
+
anchor = "left",
|
|
1161
|
+
width,
|
|
1162
|
+
//Funcionales
|
|
1163
|
+
open
|
|
1164
|
+
}) {
|
|
1165
|
+
var _a, _b;
|
|
1166
|
+
const [drawerOpen, setDrawerOpen] = React7.useState(open);
|
|
1167
|
+
const [toast, setToast] = React7.useState(null);
|
|
1168
|
+
const handleDrawerClose = () => {
|
|
1169
|
+
setDrawerOpen(false);
|
|
1170
|
+
};
|
|
1171
|
+
const toggleDrawer = (newOpen) => () => {
|
|
1172
|
+
setDrawerOpen(newOpen);
|
|
1173
|
+
};
|
|
1174
|
+
const ButtonIcon = getIcon2(buttonDrawer == null ? void 0 : buttonDrawer.icon);
|
|
1175
|
+
const setToastWithDelay = (toastContent) => {
|
|
1176
|
+
setToast(null);
|
|
1177
|
+
setTimeout(() => {
|
|
1178
|
+
setToast(toastContent);
|
|
1179
|
+
}, 10);
|
|
1180
|
+
};
|
|
1181
|
+
const inputValidation = () => validateInputs(arrayElements, setToastWithDelay, handleDrawerClose);
|
|
1182
|
+
const clean = () => {
|
|
1183
|
+
arrayElements.forEach((element, index) => {
|
|
1184
|
+
if (element.setState) {
|
|
1185
|
+
if (element.type === "textField" || element.type === "textArea") {
|
|
1186
|
+
element.setState("");
|
|
1187
|
+
} else if (element.type === "dateRange") {
|
|
1188
|
+
element.setState([null, null]);
|
|
1261
1189
|
} else {
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
subtitle: "En Option todos los iconOrBadge deben ser numeros para el badge, por favor verificar.",
|
|
1268
|
-
time: 10
|
|
1269
|
-
});
|
|
1270
|
-
}, 10);
|
|
1271
|
-
return;
|
|
1190
|
+
if (element.type == "autocomplete" && element.typeFormat == "multiselect") {
|
|
1191
|
+
element.setState({ hiddenValue: [], textValue: [] });
|
|
1192
|
+
} else {
|
|
1193
|
+
element.setState({ hiddenValue: "-1", textValue: "" });
|
|
1194
|
+
}
|
|
1272
1195
|
}
|
|
1273
1196
|
}
|
|
1274
|
-
}
|
|
1275
|
-
});
|
|
1276
|
-
const handleChange = (event2, newValue) => {
|
|
1277
|
-
if (defaultOption && newValue == void 0) {
|
|
1278
|
-
setValue(defaultOption);
|
|
1279
|
-
} else if (newValue != void 0) {
|
|
1280
|
-
setValue(newValue);
|
|
1281
|
-
}
|
|
1197
|
+
});
|
|
1282
1198
|
};
|
|
1283
|
-
|
|
1284
|
-
|
|
1199
|
+
const actionsA = actions == false ? false : actions != void 0 ? actions : [{ text: "Aplicar filtros", fn: inputValidation }, { text: "Limpiar filtros", fn: clean }];
|
|
1200
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, toast && /* @__PURE__ */ React7.createElement(SCToastNotification, __spreadValues({}, toast)), (buttonDrawer == null ? void 0 : buttonDrawer.type) == "chip" ? /* @__PURE__ */ React7.createElement(
|
|
1201
|
+
Chip2,
|
|
1202
|
+
__spreadProps(__spreadValues({
|
|
1203
|
+
onClick: toggleDrawer(true),
|
|
1204
|
+
color: buttonDrawer == null ? void 0 : buttonDrawer.color,
|
|
1205
|
+
variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) == "contained" ? "filled" : "outlined",
|
|
1206
|
+
label: (_a = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _a : "",
|
|
1207
|
+
icon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : void 0,
|
|
1208
|
+
deleteIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : void 0
|
|
1209
|
+
}, (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? { onDelete: () => {
|
|
1210
|
+
} } : {}), {
|
|
1211
|
+
sx: {
|
|
1212
|
+
"& .MuiChip-icon": {
|
|
1213
|
+
color: "inherit"
|
|
1214
|
+
},
|
|
1215
|
+
textTransform: "capitalize"
|
|
1216
|
+
}
|
|
1217
|
+
})
|
|
1218
|
+
) : /* @__PURE__ */ React7.createElement(
|
|
1219
|
+
Button4,
|
|
1285
1220
|
{
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
1221
|
+
"data-testid": "test-buttonDrawer",
|
|
1222
|
+
sx: { textTransform: "capitalize" },
|
|
1223
|
+
color: buttonDrawer == null ? void 0 : buttonDrawer.color,
|
|
1224
|
+
onClick: toggleDrawer(true),
|
|
1225
|
+
size: "small",
|
|
1226
|
+
variant: (buttonDrawer == null ? void 0 : buttonDrawer.variant) != void 0 ? buttonDrawer == null ? void 0 : buttonDrawer.variant : "text",
|
|
1227
|
+
startIcon: ((buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "left" || !(buttonDrawer == null ? void 0 : buttonDrawer.iconPosition)) && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : null,
|
|
1228
|
+
endIcon: (buttonDrawer == null ? void 0 : buttonDrawer.iconPosition) === "right" && ButtonIcon ? /* @__PURE__ */ React7.createElement(ButtonIcon, { fontSize: "small" }) : null
|
|
1295
1229
|
},
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
height: "20px",
|
|
1310
|
-
"& .MuiBadge-badge": {
|
|
1311
|
-
top: "10px",
|
|
1312
|
-
right: "10px"
|
|
1313
|
-
}
|
|
1314
|
-
},
|
|
1315
|
-
variant: "standard",
|
|
1316
|
-
badgeContent: option.iconOrBadge,
|
|
1317
|
-
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
1318
|
-
}
|
|
1319
|
-
) : typeIcon == "icon" ? /* @__PURE__ */ React8.createElement(SvgIcon5, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
|
|
1320
|
-
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
1230
|
+
(_b = buttonDrawer == null ? void 0 : buttonDrawer.text) != null ? _b : ""
|
|
1231
|
+
), /* @__PURE__ */ React7.createElement(
|
|
1232
|
+
Drawer,
|
|
1233
|
+
{
|
|
1234
|
+
open: drawerOpen,
|
|
1235
|
+
onClose: toggleDrawer(false),
|
|
1236
|
+
anchor: anchor != null ? anchor : "left",
|
|
1237
|
+
sx: {
|
|
1238
|
+
"& .MuiDrawer-paper": {
|
|
1239
|
+
width: width != null ? width : "450px",
|
|
1240
|
+
boxSizing: "border-box",
|
|
1241
|
+
borderRadius: anchor !== "right" ? "0px 4px 4px 0px" : "4px 0px 0px 4px"
|
|
1242
|
+
}
|
|
1321
1243
|
}
|
|
1322
|
-
))
|
|
1323
|
-
), children, options.map((option) => /* @__PURE__ */ React8.createElement(
|
|
1324
|
-
TabPanel,
|
|
1325
|
-
{
|
|
1326
|
-
key: k = k + 1,
|
|
1327
|
-
value: String(l = l + 1),
|
|
1328
|
-
sx: { padding: "16px" }
|
|
1329
1244
|
},
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1245
|
+
/* @__PURE__ */ React7.createElement(Stack3, { flexDirection: "column", height: "100%" }, /* @__PURE__ */ React7.createElement(Grid4, { container: true, sx: { backgroundColor: "primary.50", alignItems: "center", height: "42px", textAlign: "left", padding: "8px 12px", justifyContent: "space-between", alignContent: "center" } }, /* @__PURE__ */ React7.createElement(Typography7, { variant: "h6", color: colorTitle || "text.primary" }, title != null ? title : "Personaliza tu b\xFAsqueda"), /* @__PURE__ */ React7.createElement(IconButton5, { onClick: handleDrawerClose }, /* @__PURE__ */ React7.createElement(CloseIcon, { "data-testid": "test-button-close", sx: { color: "text.primary" } }))), /* @__PURE__ */ React7.createElement(Stack3, { alignItems: "flex-start", height: "100%", gap: "16px", flex: 1, overflow: "auto", padding: "16px" }, arrayElements == null ? void 0 : arrayElements.map((arrayElement, index) => {
|
|
1246
|
+
var _a2, _b2, _c, _d, _e, _f;
|
|
1247
|
+
return /* @__PURE__ */ React7.createElement(
|
|
1248
|
+
Box7,
|
|
1249
|
+
{
|
|
1250
|
+
key: `Stack_${(_a2 = arrayElement.type) != null ? _a2 : ""} ${(_b2 = arrayElement.label) != null ? _b2 : ""}${index}`,
|
|
1251
|
+
sx: { width: "100%" }
|
|
1252
|
+
},
|
|
1253
|
+
arrayElement.component ? /* @__PURE__ */ React7.createElement(Stack3, { direction: "row", alignItems: "left", gap: 1 }, arrayElement.component) : arrayElement.type === "textField" ? /* @__PURE__ */ React7.createElement(
|
|
1254
|
+
SCTextField,
|
|
1255
|
+
{
|
|
1256
|
+
title: arrayElement.title,
|
|
1257
|
+
iconTitle: arrayElement.iconTitle,
|
|
1258
|
+
infoTitle: arrayElement.infoTitle,
|
|
1259
|
+
label: arrayElement.label,
|
|
1260
|
+
placeholder: arrayElement.placeholder,
|
|
1261
|
+
infoElement: arrayElement.infoElement,
|
|
1262
|
+
iconInputStart: arrayElement.iconInputStart,
|
|
1263
|
+
iconInputEnd: arrayElement.iconInputEnd,
|
|
1264
|
+
maxLength: arrayElement.maxLength,
|
|
1265
|
+
variant: arrayElement.variant,
|
|
1266
|
+
format: arrayElement.format,
|
|
1267
|
+
disabled: arrayElement.disabled,
|
|
1268
|
+
required: arrayElement.required,
|
|
1269
|
+
size: arrayElement.size,
|
|
1270
|
+
width: arrayElement.width,
|
|
1271
|
+
color: arrayElement.color,
|
|
1272
|
+
background: arrayElement.background,
|
|
1273
|
+
setState: arrayElement.setState,
|
|
1274
|
+
state: arrayElement.state || "",
|
|
1275
|
+
onChange: arrayElement.onChange,
|
|
1276
|
+
onBlur: arrayElement.onBlur,
|
|
1277
|
+
onKeyDown: arrayElement.onKeyDown
|
|
1278
|
+
}
|
|
1279
|
+
) : arrayElement.type === "textArea" ? /* @__PURE__ */ React7.createElement(
|
|
1280
|
+
SCTextArea,
|
|
1281
|
+
{
|
|
1282
|
+
title: arrayElement.title,
|
|
1283
|
+
iconTitle: arrayElement.iconTitle,
|
|
1284
|
+
infoTitle: arrayElement.infoTitle,
|
|
1285
|
+
label: arrayElement.label,
|
|
1286
|
+
placeholder: arrayElement.placeholder,
|
|
1287
|
+
maxLength: arrayElement.maxLength,
|
|
1288
|
+
variant: arrayElement.variant,
|
|
1289
|
+
disabled: arrayElement.disabled,
|
|
1290
|
+
required: arrayElement.required,
|
|
1291
|
+
width: arrayElement.width,
|
|
1292
|
+
rows: arrayElement.rows,
|
|
1293
|
+
background: arrayElement.background,
|
|
1294
|
+
setState: arrayElement.setState,
|
|
1295
|
+
state: arrayElement.state || "",
|
|
1296
|
+
onBlur: arrayElement.onBlur
|
|
1297
|
+
}
|
|
1298
|
+
) : arrayElement.type === "autocomplete" ? /* @__PURE__ */ React7.createElement(
|
|
1299
|
+
SCAutocomplete,
|
|
1300
|
+
{
|
|
1301
|
+
label: arrayElement.label,
|
|
1302
|
+
data: (_c = arrayElement.data) != null ? _c : [],
|
|
1303
|
+
columnGroup: arrayElement.columnGroup,
|
|
1304
|
+
getItemValue: (_d = arrayElement.getItemValue) != null ? _d : () => ({ text: "", value: "" }),
|
|
1305
|
+
typeFormat: arrayElement.typeFormat,
|
|
1306
|
+
checkMassive: arrayElement.checkMassive,
|
|
1307
|
+
deleteType: arrayElement.deleteType,
|
|
1308
|
+
required: arrayElement.required,
|
|
1309
|
+
disabled: arrayElement.disabled,
|
|
1310
|
+
background: arrayElement.background,
|
|
1311
|
+
fnAplicar: arrayElement.fnAplicar,
|
|
1312
|
+
setState: arrayElement.setState,
|
|
1313
|
+
state: arrayElement.state || "",
|
|
1314
|
+
inputChange: arrayElement.inputChange
|
|
1315
|
+
}
|
|
1316
|
+
) : arrayElement.type === "select" ? /* @__PURE__ */ React7.createElement(
|
|
1317
|
+
SCSelect,
|
|
1318
|
+
{
|
|
1319
|
+
label: arrayElement.label,
|
|
1320
|
+
data: (_e = arrayElement.data) != null ? _e : [],
|
|
1321
|
+
getItemValue: (_f = arrayElement.getItemValue) != null ? _f : () => ({ text: "", value: "" }),
|
|
1322
|
+
width: arrayElement.width,
|
|
1323
|
+
size: arrayElement.size,
|
|
1324
|
+
variant: arrayElement.variant,
|
|
1325
|
+
deleteType: arrayElement.deleteType,
|
|
1326
|
+
required: arrayElement.required,
|
|
1327
|
+
disabled: arrayElement.disabled,
|
|
1328
|
+
background: arrayElement.background,
|
|
1329
|
+
fnAplicar: arrayElement.fnAplicar,
|
|
1330
|
+
setState: arrayElement.setState,
|
|
1331
|
+
state: arrayElement.state || ""
|
|
1332
|
+
}
|
|
1333
|
+
) : arrayElement.type === "dateRange" ? /* @__PURE__ */ React7.createElement(
|
|
1334
|
+
SCDateRange,
|
|
1335
|
+
{
|
|
1336
|
+
labelDateInitial: arrayElement.labelDateInitial,
|
|
1337
|
+
labelDateFinal: arrayElement.labelDateFinal,
|
|
1338
|
+
required: arrayElement.required,
|
|
1339
|
+
disabled: arrayElement.disabled,
|
|
1340
|
+
background: arrayElement.background,
|
|
1341
|
+
state: arrayElement.state || [],
|
|
1342
|
+
setState: arrayElement.setState
|
|
1343
|
+
}
|
|
1344
|
+
) : null
|
|
1345
|
+
);
|
|
1346
|
+
})), actionsA != void 0 && actionsA != false ? Array.isArray(actionsA) && (actionsA == null ? void 0 : actionsA.length) > 0 ? /* @__PURE__ */ React7.createElement(
|
|
1347
|
+
Grid4,
|
|
1348
|
+
{
|
|
1349
|
+
sx: { borderTop: 1, borderColor: "#1018403B" },
|
|
1350
|
+
container: true,
|
|
1351
|
+
gap: 2,
|
|
1352
|
+
padding: "8px 12px",
|
|
1353
|
+
height: "42px",
|
|
1354
|
+
alignItems: "center",
|
|
1355
|
+
justifyContent: actionsA.length > 1 ? "space-between" : !anchor && anchor != "right" ? "flex-end" : "flex-start",
|
|
1356
|
+
flexDirection: anchor != "right" ? "row-reverse" : "row"
|
|
1357
|
+
},
|
|
1358
|
+
actionsA.map((btn, index) => /* @__PURE__ */ React7.createElement(
|
|
1359
|
+
Button4,
|
|
1360
|
+
{
|
|
1361
|
+
key: index,
|
|
1362
|
+
variant: index === 0 || actionsA.length < 2 ? "contained" : "text",
|
|
1363
|
+
color: "primary",
|
|
1364
|
+
onClick: btn.fn,
|
|
1365
|
+
disabled: btn.disabled || false,
|
|
1366
|
+
size: "small"
|
|
1367
|
+
},
|
|
1368
|
+
btn.text
|
|
1369
|
+
))
|
|
1370
|
+
) : "" : "")
|
|
1371
|
+
));
|
|
1372
|
+
}
|
|
1333
1373
|
|
|
1334
1374
|
// src/Components/FooterAction/FooterAction.tsx
|
|
1335
|
-
import
|
|
1375
|
+
import React8 from "react";
|
|
1336
1376
|
import { AppBar, Toolbar, Box as Box8, Typography as Typography8 } from "@mui/material";
|
|
1337
1377
|
var FooterAction = ({
|
|
1338
1378
|
leftContent,
|
|
@@ -1340,52 +1380,52 @@ var FooterAction = ({
|
|
|
1340
1380
|
label,
|
|
1341
1381
|
variant
|
|
1342
1382
|
}) => {
|
|
1343
|
-
return /* @__PURE__ */
|
|
1383
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1344
1384
|
AppBar,
|
|
1345
1385
|
{
|
|
1346
1386
|
color: "inherit",
|
|
1347
1387
|
sx: { position: variant == "float" ? "relative" : "fixed", left: 0, right: "auto", width: "100%", top: "auto", bottom: 0 }
|
|
1348
1388
|
},
|
|
1349
|
-
/* @__PURE__ */
|
|
1389
|
+
/* @__PURE__ */ React8.createElement(
|
|
1350
1390
|
Toolbar,
|
|
1351
1391
|
{
|
|
1352
1392
|
id: "footer-toolbar",
|
|
1353
1393
|
sx: { gap: 1.5, minHeight: "50px !important" }
|
|
1354
1394
|
},
|
|
1355
1395
|
leftContent,
|
|
1356
|
-
/* @__PURE__ */
|
|
1357
|
-
label && /* @__PURE__ */
|
|
1396
|
+
/* @__PURE__ */ React8.createElement(Box8, { flexGrow: 1 }),
|
|
1397
|
+
label && /* @__PURE__ */ React8.createElement(Typography8, { variant: "body2", color: "text.secondary" }, label),
|
|
1358
1398
|
rightContent
|
|
1359
1399
|
)
|
|
1360
1400
|
);
|
|
1361
1401
|
};
|
|
1362
1402
|
|
|
1363
1403
|
// src/Components/Modal/Helpers/Data.tsx
|
|
1364
|
-
import
|
|
1404
|
+
import React9 from "react";
|
|
1365
1405
|
import { Info, Warning } from "@mui/icons-material";
|
|
1366
1406
|
var modalStateConfig = {
|
|
1367
1407
|
info: {
|
|
1368
1408
|
color: "info",
|
|
1369
1409
|
defaultDescription: "Se [sincronizar\xE1n] los datos trabajados en modo offline y se [subir\xE1n] a los servidores.",
|
|
1370
|
-
icon: /* @__PURE__ */
|
|
1410
|
+
icon: /* @__PURE__ */ React9.createElement(Info, { color: "info", fontSize: "medium" })
|
|
1371
1411
|
},
|
|
1372
1412
|
delete: {
|
|
1373
1413
|
color: "delete",
|
|
1374
1414
|
defaultDescription: "[Elemento espec\xEDfico] [dejar\xE1 de existir en todos los lugares donde est\xE9 en uso]. Esta acci\xF3n es irreversible.",
|
|
1375
|
-
icon: /* @__PURE__ */
|
|
1415
|
+
icon: /* @__PURE__ */ React9.createElement(Info, { color: "error", fontSize: "medium" })
|
|
1376
1416
|
},
|
|
1377
1417
|
warning: {
|
|
1378
1418
|
color: "warning",
|
|
1379
1419
|
defaultDescription: "Se descartar\xE1 la [creaci\xF3n] y los cambios se perder\xE1n.",
|
|
1380
|
-
icon: /* @__PURE__ */
|
|
1420
|
+
icon: /* @__PURE__ */ React9.createElement(Warning, { color: "warning", fontSize: "medium" })
|
|
1381
1421
|
}
|
|
1382
1422
|
};
|
|
1383
1423
|
|
|
1384
1424
|
// src/Components/Modal/Helpers/Utils.tsx
|
|
1385
|
-
import * as
|
|
1386
|
-
import { FilterListOutlined
|
|
1425
|
+
import * as MuiIcons2 from "@mui/icons-material";
|
|
1426
|
+
import { FilterListOutlined } from "@mui/icons-material";
|
|
1387
1427
|
var getIconComponent2 = (iconName) => {
|
|
1388
|
-
return iconName &&
|
|
1428
|
+
return iconName && MuiIcons2[iconName] ? MuiIcons2[iconName] : FilterListOutlined;
|
|
1389
1429
|
};
|
|
1390
1430
|
var getModalColor = (state) => {
|
|
1391
1431
|
var _a;
|
|
@@ -1407,9 +1447,16 @@ var getButtonColor = (state) => {
|
|
|
1407
1447
|
};
|
|
1408
1448
|
|
|
1409
1449
|
// src/Components/Modal/SCModal.tsx
|
|
1410
|
-
import
|
|
1411
|
-
import { Modal
|
|
1450
|
+
import React10, { useCallback, useEffect as useEffect7, useMemo, useState as useState5 } from "react";
|
|
1451
|
+
import { Modal, Box as Box9, Typography as Typography9, IconButton as IconButton6, Button as Button5, Stack as Stack4 } from "@mui/material";
|
|
1412
1452
|
import { Close as Close2 } from "@mui/icons-material";
|
|
1453
|
+
|
|
1454
|
+
// src/generales/capitalize.tsx
|
|
1455
|
+
function capitalize(text) {
|
|
1456
|
+
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
// src/Components/Modal/SCModal.tsx
|
|
1413
1460
|
var SCModal = ({
|
|
1414
1461
|
buttonModal,
|
|
1415
1462
|
state = "info",
|
|
@@ -1419,34 +1466,34 @@ var SCModal = ({
|
|
|
1419
1466
|
action
|
|
1420
1467
|
}) => {
|
|
1421
1468
|
var _a, _b, _c, _d, _e;
|
|
1422
|
-
const [openModal, setOpenModal] =
|
|
1423
|
-
|
|
1469
|
+
const [openModal, setOpenModal] = useState5(open != null ? open : false);
|
|
1470
|
+
useEffect7(() => {
|
|
1424
1471
|
if (open !== void 0) {
|
|
1425
1472
|
setOpenModal(open);
|
|
1426
1473
|
}
|
|
1427
1474
|
}, [open]);
|
|
1428
|
-
const Icon =
|
|
1429
|
-
const handleClose =
|
|
1475
|
+
const Icon = useMemo(() => getIconComponent2(buttonModal == null ? void 0 : buttonModal.icon), [buttonModal == null ? void 0 : buttonModal.icon]);
|
|
1476
|
+
const handleClose = useCallback(() => setOpenModal(false), []);
|
|
1430
1477
|
const toggleModal = (newOpen) => () => setOpenModal(newOpen);
|
|
1431
|
-
const prevAction =
|
|
1478
|
+
const prevAction = useMemo(
|
|
1432
1479
|
() => action != null ? action : [{ text: "Cancelar", fn: handleClose }, { text: "Consultar", fn: () => {
|
|
1433
1480
|
} }],
|
|
1434
1481
|
[action, handleClose]
|
|
1435
1482
|
);
|
|
1436
1483
|
const { icon, defaultDescription } = modalStateConfig[state];
|
|
1437
|
-
return /* @__PURE__ */
|
|
1438
|
-
|
|
1484
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
|
|
1485
|
+
Button5,
|
|
1439
1486
|
{
|
|
1440
1487
|
"data-testid": "test-buttonModal",
|
|
1441
1488
|
color: (_a = buttonModal == null ? void 0 : buttonModal.color) != null ? _a : "primary",
|
|
1442
1489
|
onClick: toggleModal(true),
|
|
1443
1490
|
variant: (_b = buttonModal == null ? void 0 : buttonModal.variant) != null ? _b : "text",
|
|
1444
1491
|
size: (_c = buttonModal == null ? void 0 : buttonModal.size) != null ? _c : "small",
|
|
1445
|
-
startIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "left" && /* @__PURE__ */
|
|
1446
|
-
endIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "right" && /* @__PURE__ */
|
|
1492
|
+
startIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "left" && /* @__PURE__ */ React10.createElement(Icon, null),
|
|
1493
|
+
endIcon: (buttonModal == null ? void 0 : buttonModal.iconPosition) === "right" && /* @__PURE__ */ React10.createElement(Icon, null)
|
|
1447
1494
|
},
|
|
1448
1495
|
capitalize((_d = buttonModal == null ? void 0 : buttonModal.text) != null ? _d : "filtrar")
|
|
1449
|
-
), /* @__PURE__ */
|
|
1496
|
+
), /* @__PURE__ */ React10.createElement(Modal, { open: openModal, onClose: toggleModal(false), sx: { boxShadow: 8 } }, /* @__PURE__ */ React10.createElement(
|
|
1450
1497
|
Box9,
|
|
1451
1498
|
{
|
|
1452
1499
|
sx: {
|
|
@@ -1460,10 +1507,10 @@ var SCModal = ({
|
|
|
1460
1507
|
boxShadow: 24
|
|
1461
1508
|
}
|
|
1462
1509
|
},
|
|
1463
|
-
/* @__PURE__ */
|
|
1464
|
-
/* @__PURE__ */
|
|
1465
|
-
action && /* @__PURE__ */
|
|
1466
|
-
|
|
1510
|
+
/* @__PURE__ */ React10.createElement(Stack4, { direction: "row", justifyContent: "space-between", alignItems: "center" }, /* @__PURE__ */ React10.createElement(Stack4, { direction: "row", alignItems: "center", p: 1, gap: 1.5 }, /* @__PURE__ */ React10.createElement(Box9, { display: "flex", justifyContent: "center", alignItems: "center", borderRadius: "50%", height: 36, width: 36, bgcolor: getModalColor(state) }, icon), /* @__PURE__ */ React10.createElement(Typography9, { variant: "h6", color: "text.primary" }, title)), /* @__PURE__ */ React10.createElement(IconButton6, { onClick: toggleModal(false), "data-testid": "test-buttonClose" }, /* @__PURE__ */ React10.createElement(Close2, { color: "action" }))),
|
|
1511
|
+
/* @__PURE__ */ React10.createElement(Stack4, { py: 1, px: 3, gap: 1.5 }, /* @__PURE__ */ React10.createElement(Typography9, { variant: "body1" }, description || defaultDescription)),
|
|
1512
|
+
action && /* @__PURE__ */ React10.createElement(
|
|
1513
|
+
Stack4,
|
|
1467
1514
|
{
|
|
1468
1515
|
id: "Action",
|
|
1469
1516
|
direction: "row",
|
|
@@ -1473,8 +1520,8 @@ var SCModal = ({
|
|
|
1473
1520
|
bgcolor: "grey.50",
|
|
1474
1521
|
sx: { borderRadius: 1 }
|
|
1475
1522
|
},
|
|
1476
|
-
/* @__PURE__ */
|
|
1477
|
-
|
|
1523
|
+
/* @__PURE__ */ React10.createElement(
|
|
1524
|
+
Button5,
|
|
1478
1525
|
{
|
|
1479
1526
|
color: "inherit",
|
|
1480
1527
|
variant: "text",
|
|
@@ -1483,8 +1530,8 @@ var SCModal = ({
|
|
|
1483
1530
|
},
|
|
1484
1531
|
capitalize("cancelar")
|
|
1485
1532
|
),
|
|
1486
|
-
/* @__PURE__ */
|
|
1487
|
-
|
|
1533
|
+
/* @__PURE__ */ React10.createElement(
|
|
1534
|
+
Button5,
|
|
1488
1535
|
{
|
|
1489
1536
|
"data-testid": "test-aceptar",
|
|
1490
1537
|
color: getButtonColor(state),
|
|
@@ -1493,11 +1540,198 @@ var SCModal = ({
|
|
|
1493
1540
|
disabled: false,
|
|
1494
1541
|
size: "small"
|
|
1495
1542
|
},
|
|
1496
|
-
capitalize(action[0].text)
|
|
1497
|
-
)
|
|
1498
|
-
)
|
|
1499
|
-
)));
|
|
1500
|
-
};
|
|
1543
|
+
capitalize(action[0].text)
|
|
1544
|
+
)
|
|
1545
|
+
)
|
|
1546
|
+
)));
|
|
1547
|
+
};
|
|
1548
|
+
|
|
1549
|
+
// src/Components/MultiSelect/MultiSelect.tsx
|
|
1550
|
+
import React11, { useEffect as useEffect8, useMemo as useMemo3 } from "react";
|
|
1551
|
+
import { Button as Button6, Checkbox as Checkbox2, FormControl as FormControl3, InputAdornment as InputAdornment5, ListItemIcon as ListItemIcon3, MenuItem as MenuItem3, Popover as Popover3, Stack as Stack5, TextField as TextField4 } from "@mui/material";
|
|
1552
|
+
import { SearchOutlined } from "@mui/icons-material";
|
|
1553
|
+
|
|
1554
|
+
// src/Components/MultiSelect/helpers/useHandlers.tsx
|
|
1555
|
+
import { useCallback as useCallback2, useState as useState6 } from "react";
|
|
1556
|
+
function useMultiSelectHandlers() {
|
|
1557
|
+
const [anchorEl, setAnchorEl] = useState6(null);
|
|
1558
|
+
const [open, setOpen] = useState6(false);
|
|
1559
|
+
const [selectedItems, setSelectedItems] = useState6([]);
|
|
1560
|
+
const [filterValue, setFilterValue] = useState6("");
|
|
1561
|
+
const handleOpen = useCallback2((e) => {
|
|
1562
|
+
setAnchorEl(e.currentTarget);
|
|
1563
|
+
setOpen(true);
|
|
1564
|
+
}, []);
|
|
1565
|
+
const handleClose = useCallback2(() => {
|
|
1566
|
+
setAnchorEl(null);
|
|
1567
|
+
setOpen(false);
|
|
1568
|
+
}, []);
|
|
1569
|
+
const handleFilterChange = useCallback2(
|
|
1570
|
+
(e) => {
|
|
1571
|
+
setFilterValue(e.target.value);
|
|
1572
|
+
},
|
|
1573
|
+
[]
|
|
1574
|
+
);
|
|
1575
|
+
const handleCheckboxToggle = useCallback2((item) => {
|
|
1576
|
+
setSelectedItems(
|
|
1577
|
+
(prev) => prev.includes(item) ? prev.filter((i) => i !== item) : [...prev, item]
|
|
1578
|
+
);
|
|
1579
|
+
}, []);
|
|
1580
|
+
return {
|
|
1581
|
+
anchorEl,
|
|
1582
|
+
open,
|
|
1583
|
+
selectedItems,
|
|
1584
|
+
filterValue,
|
|
1585
|
+
setSelectedItems,
|
|
1586
|
+
handleOpen,
|
|
1587
|
+
handleClose,
|
|
1588
|
+
handleFilterChange,
|
|
1589
|
+
handleCheckboxToggle,
|
|
1590
|
+
setOpen
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
// src/Components/MultiSelect/helpers/Utils.tsx
|
|
1595
|
+
import * as MuiIcons3 from "@mui/icons-material";
|
|
1596
|
+
import { FilterListOutlined as FilterListOutlined2 } from "@mui/icons-material";
|
|
1597
|
+
function getIconMultiSelect(name) {
|
|
1598
|
+
return name in MuiIcons3 ? MuiIcons3[name] : FilterListOutlined2;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
// src/Components/MultiSelect/helpers/useFilteredItems.tsx
|
|
1602
|
+
import { useMemo as useMemo2 } from "react";
|
|
1603
|
+
function useFilteredItems(items, filterValue, getItemLabel, selectedItems) {
|
|
1604
|
+
const filteredItems = useMemo2(
|
|
1605
|
+
() => items.filter(
|
|
1606
|
+
(item) => getItemLabel(item).toLowerCase().includes(filterValue.toLowerCase())
|
|
1607
|
+
),
|
|
1608
|
+
[items, filterValue, getItemLabel]
|
|
1609
|
+
);
|
|
1610
|
+
const sortedItems = useMemo2(() => {
|
|
1611
|
+
return [
|
|
1612
|
+
...filteredItems.filter((item) => selectedItems.includes(item)),
|
|
1613
|
+
...filteredItems.filter((item) => !selectedItems.includes(item))
|
|
1614
|
+
];
|
|
1615
|
+
}, [filteredItems, selectedItems]);
|
|
1616
|
+
return { filteredItems, sortedItems };
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
// src/Components/MultiSelect/MultiSelect.tsx
|
|
1620
|
+
function MultiSelect({
|
|
1621
|
+
textButton,
|
|
1622
|
+
button,
|
|
1623
|
+
items,
|
|
1624
|
+
topPanel,
|
|
1625
|
+
actions,
|
|
1626
|
+
dense = false,
|
|
1627
|
+
open,
|
|
1628
|
+
selectAll = false,
|
|
1629
|
+
getItemLabel
|
|
1630
|
+
}) {
|
|
1631
|
+
var _a, _b;
|
|
1632
|
+
const {
|
|
1633
|
+
anchorEl,
|
|
1634
|
+
open: openMultiselect,
|
|
1635
|
+
selectedItems,
|
|
1636
|
+
filterValue,
|
|
1637
|
+
setSelectedItems,
|
|
1638
|
+
handleOpen,
|
|
1639
|
+
handleClose,
|
|
1640
|
+
handleFilterChange,
|
|
1641
|
+
handleCheckboxToggle,
|
|
1642
|
+
setOpen
|
|
1643
|
+
} = useMultiSelectHandlers();
|
|
1644
|
+
useEffect8(() => {
|
|
1645
|
+
if (open !== void 0) {
|
|
1646
|
+
setOpen(open);
|
|
1647
|
+
}
|
|
1648
|
+
}, [open, setOpen]);
|
|
1649
|
+
useEffect8(() => {
|
|
1650
|
+
setSelectedItems([]);
|
|
1651
|
+
}, [items, setSelectedItems]);
|
|
1652
|
+
const { filteredItems, sortedItems } = useFilteredItems(items, filterValue, getItemLabel, selectedItems);
|
|
1653
|
+
const Icon = useMemo3(() => {
|
|
1654
|
+
var _a2;
|
|
1655
|
+
return getIconMultiSelect((_a2 = button == null ? void 0 : button.icon) != null ? _a2 : "FilterListOutlined");
|
|
1656
|
+
}, [button == null ? void 0 : button.icon]);
|
|
1657
|
+
const handleSelectAll = () => {
|
|
1658
|
+
const allSelected2 = selectedItems.length === filteredItems.length;
|
|
1659
|
+
setSelectedItems(allSelected2 ? [] : filteredItems);
|
|
1660
|
+
};
|
|
1661
|
+
const allSelected = filteredItems.length > 0 && selectedItems.length === filteredItems.length;
|
|
1662
|
+
const resolvedActions = actions != null ? actions : [
|
|
1663
|
+
{ text: "Limpiar", fn: handleClose },
|
|
1664
|
+
{ text: "Aplicar", fn: () => {
|
|
1665
|
+
} }
|
|
1666
|
+
];
|
|
1667
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(
|
|
1668
|
+
Button6,
|
|
1669
|
+
{
|
|
1670
|
+
"test-id": "multiselect-button",
|
|
1671
|
+
color: (_a = button == null ? void 0 : button.color) != null ? _a : "primary",
|
|
1672
|
+
onClick: handleOpen,
|
|
1673
|
+
variant: (_b = button == null ? void 0 : button.variant) != null ? _b : "text",
|
|
1674
|
+
size: "small",
|
|
1675
|
+
startIcon: (button == null ? void 0 : button.iconPosition) === "left" || !(button == null ? void 0 : button.iconPosition) ? /* @__PURE__ */ React11.createElement(Icon, null) : null,
|
|
1676
|
+
endIcon: (button == null ? void 0 : button.iconPosition) === "right" ? /* @__PURE__ */ React11.createElement(Icon, null) : null
|
|
1677
|
+
},
|
|
1678
|
+
capitalize(textButton != null ? textButton : "MultiSelect")
|
|
1679
|
+
), /* @__PURE__ */ React11.createElement(
|
|
1680
|
+
Popover3,
|
|
1681
|
+
{
|
|
1682
|
+
elevation: 8,
|
|
1683
|
+
anchorEl,
|
|
1684
|
+
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
1685
|
+
open: openMultiselect,
|
|
1686
|
+
onClose: () => setOpen(false)
|
|
1687
|
+
},
|
|
1688
|
+
/* @__PURE__ */ React11.createElement(Stack5, { minWidth: "320px", "data-testid": "multiselect-container", bgcolor: "white", boxShadow: 3, borderRadius: 1 }, /* @__PURE__ */ React11.createElement(Stack5, { py: 1, px: 2 }, topPanel != null ? topPanel : /* @__PURE__ */ React11.createElement(FormControl3, { fullWidth: true, size: "small" }, /* @__PURE__ */ React11.createElement(
|
|
1689
|
+
TextField4,
|
|
1690
|
+
{
|
|
1691
|
+
"data-testid": "multiselect-input",
|
|
1692
|
+
fullWidth: true,
|
|
1693
|
+
size: "small",
|
|
1694
|
+
variant: "outlined",
|
|
1695
|
+
placeholder: "Buscar",
|
|
1696
|
+
value: filterValue,
|
|
1697
|
+
onChange: handleFilterChange,
|
|
1698
|
+
slotProps: {
|
|
1699
|
+
input: {
|
|
1700
|
+
endAdornment: /* @__PURE__ */ React11.createElement(InputAdornment5, { position: "end" }, /* @__PURE__ */ React11.createElement(SearchOutlined, { fontSize: "small" }))
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
))), /* @__PURE__ */ React11.createElement(Stack5, { maxHeight: "300px", overflow: "auto" }, selectAll && /* @__PURE__ */ React11.createElement(MenuItem3, { dense, onClick: handleSelectAll }, /* @__PURE__ */ React11.createElement(ListItemIcon3, null, /* @__PURE__ */ React11.createElement(Checkbox2, { checked: allSelected, color: "primary" })), "Todos los items"), sortedItems.length > 0 ? sortedItems.map((item) => /* @__PURE__ */ React11.createElement(
|
|
1705
|
+
MenuItem3,
|
|
1706
|
+
{
|
|
1707
|
+
key: getItemLabel(item),
|
|
1708
|
+
dense,
|
|
1709
|
+
onClick: () => handleCheckboxToggle(item)
|
|
1710
|
+
},
|
|
1711
|
+
/* @__PURE__ */ React11.createElement(ListItemIcon3, null, /* @__PURE__ */ React11.createElement(
|
|
1712
|
+
Checkbox2,
|
|
1713
|
+
{
|
|
1714
|
+
checked: selectedItems.includes(item),
|
|
1715
|
+
color: "primary"
|
|
1716
|
+
}
|
|
1717
|
+
)),
|
|
1718
|
+
getItemLabel(item)
|
|
1719
|
+
)) : /* @__PURE__ */ React11.createElement(MenuItem3, { disabled: true }, "No se encontraron resultados")), /* @__PURE__ */ React11.createElement(Stack5, { direction: "row", gap: 1, p: 1, justifyContent: "space-between", bgcolor: "grey.50" }, resolvedActions.map((button2, index) => {
|
|
1720
|
+
var _a2;
|
|
1721
|
+
return /* @__PURE__ */ React11.createElement(
|
|
1722
|
+
Button6,
|
|
1723
|
+
{
|
|
1724
|
+
key: index,
|
|
1725
|
+
variant: index === 0 || resolvedActions.length < 2 ? "text" : "contained",
|
|
1726
|
+
onClick: button2.fn,
|
|
1727
|
+
disabled: (_a2 = button2.disabled) != null ? _a2 : false,
|
|
1728
|
+
size: "small"
|
|
1729
|
+
},
|
|
1730
|
+
capitalize(button2.text)
|
|
1731
|
+
);
|
|
1732
|
+
})))
|
|
1733
|
+
));
|
|
1734
|
+
}
|
|
1501
1735
|
|
|
1502
1736
|
// src/Components/PageHeader/PageHeader.tsx
|
|
1503
1737
|
import React12 from "react";
|
|
@@ -1527,11 +1761,11 @@ var PageHeader = ({
|
|
|
1527
1761
|
};
|
|
1528
1762
|
|
|
1529
1763
|
// src/Components/SCCalendarSwipeable.tsx
|
|
1530
|
-
import React13, { useState as
|
|
1764
|
+
import React13, { useState as useState7 } from "react";
|
|
1531
1765
|
import { Typography as Typography11, IconButton as IconButton7, Box as Box10 } from "@mui/material";
|
|
1532
|
-
import
|
|
1766
|
+
import Grid5 from "@mui/material/Grid2";
|
|
1533
1767
|
import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
|
|
1534
|
-
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
|
|
1768
|
+
import { LocalizationProvider as LocalizationProvider2 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
1535
1769
|
import { StaticDatePicker } from "@mui/x-date-pickers/StaticDatePicker";
|
|
1536
1770
|
import { es } from "date-fns/locale";
|
|
1537
1771
|
import { format, startOfWeek, addDays, isSameDay } from "date-fns";
|
|
@@ -1546,8 +1780,8 @@ var SCCalendarSwipeable = ({
|
|
|
1546
1780
|
state
|
|
1547
1781
|
}) => {
|
|
1548
1782
|
let convertFecha;
|
|
1549
|
-
const [fecha, setFecha] =
|
|
1550
|
-
const [fechaSeleccionada, setFechaSeleccionada] =
|
|
1783
|
+
const [fecha, setFecha] = useState7(/* @__PURE__ */ new Date());
|
|
1784
|
+
const [fechaSeleccionada, setFechaSeleccionada] = useState7();
|
|
1551
1785
|
const [stateVal, setstateVal] = React13.useState(/* @__PURE__ */ new Date());
|
|
1552
1786
|
const [openCalendar, setOpenCalendar] = React13.useState(false);
|
|
1553
1787
|
const hoy = /* @__PURE__ */ new Date();
|
|
@@ -1572,11 +1806,11 @@ var SCCalendarSwipeable = ({
|
|
|
1572
1806
|
setOpenCalendar(newOpen);
|
|
1573
1807
|
};
|
|
1574
1808
|
const locale = __spreadValues({}, es);
|
|
1575
|
-
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
|
|
1809
|
+
return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(LocalizationProvider2, { dateAdapter: AdapterDateFns, adapterLocale: locale }, openCalendar == false ? /* @__PURE__ */ React13.createElement(Box10, { "data-testid": "calendar-mobile", sx: { width: "100%", background: background ? background : "white", display: "flex", flexDirection: "column", alignItems: "center" } }, /* @__PURE__ */ React13.createElement(Box10, { sx: { width: "100%", maxWidth: "320px", background: "transparent" } }, /* @__PURE__ */ React13.createElement(Grid5, { container: true, gap: 0.5, sx: {
|
|
1576
1810
|
justifyContent: "space-between",
|
|
1577
1811
|
padding: "12px 0px",
|
|
1578
1812
|
background: "transparent"
|
|
1579
|
-
} }, diasSemana.map((dia) => /* @__PURE__ */ React13.createElement(
|
|
1813
|
+
} }, diasSemana.map((dia) => /* @__PURE__ */ React13.createElement(Grid5, { sx: { width: "36px" }, key: dia.toString() }, /* @__PURE__ */ React13.createElement(Box10, { sx: { width: "36px", height: "40px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React13.createElement(Typography11, { sx: { fontSize: "12px !important", color: "#10184099" } }, format(dia, "EEEE", { locale: es }).charAt(0).toUpperCase())), /* @__PURE__ */ React13.createElement(
|
|
1580
1814
|
Box10,
|
|
1581
1815
|
{
|
|
1582
1816
|
onClick: () => setFecha(dia),
|
|
@@ -1593,7 +1827,7 @@ var SCCalendarSwipeable = ({
|
|
|
1593
1827
|
}
|
|
1594
1828
|
},
|
|
1595
1829
|
/* @__PURE__ */ React13.createElement(Typography11, { sx: { fontSize: "12px !important", color: isSameDay(dia, fecha) ? "white" : "#101840DE" } }, format(dia, "d"))
|
|
1596
|
-
)))), /* @__PURE__ */ React13.createElement(
|
|
1830
|
+
)))), /* @__PURE__ */ React13.createElement(Grid5, { container: true, justifyContent: "center" }, /* @__PURE__ */ React13.createElement(IconButton7, { "data-testid": "open-calendar-button", onClick: toggleCalendar(true) }, /* @__PURE__ */ React13.createElement(KeyboardDoubleArrowDownIcon, null))))) : /* @__PURE__ */ React13.createElement(Box10, { sx: { width: "100%", background: "white" } }, /* @__PURE__ */ React13.createElement(
|
|
1597
1831
|
StaticDatePicker,
|
|
1598
1832
|
{
|
|
1599
1833
|
orientation: "landscape",
|
|
@@ -1603,107 +1837,157 @@ var SCCalendarSwipeable = ({
|
|
|
1603
1837
|
sx: { fontSize: "12px !important", height: "300px !important", background: background ? background : "white", "& .MuiDayCalendar-header": { justifyContent: "space-between" }, "& .MuiDayCalendar-weekContainer": { justifyContent: "space-between" }, "& .MuiPickersCalendarHeader-root": { paddingLeft: "0px", paddingRight: "0px", color: "#10184099" }, "& .MuiPickersDay-root": { fontSize: "12px !important" }, "& .MuiDayCalendar-weekDayLabel": { fontSize: "12px !important" } },
|
|
1604
1838
|
onChange: (newValue) => setFecha(newValue)
|
|
1605
1839
|
}
|
|
1606
|
-
), /* @__PURE__ */ React13.createElement(
|
|
1840
|
+
), /* @__PURE__ */ React13.createElement(Grid5, { container: true, justifyContent: "center" }, /* @__PURE__ */ React13.createElement(IconButton7, { "data-testid": "close-calendar-button", onClick: toggleCalendar(false) }, /* @__PURE__ */ React13.createElement(KeyboardDoubleArrowUpIcon, null))))));
|
|
1607
1841
|
};
|
|
1608
1842
|
|
|
1609
1843
|
// src/Components/SCDataGrid.tsx
|
|
1610
|
-
import React14, { useEffect as
|
|
1844
|
+
import React14, { useEffect as useEffect10, useState as useState8 } from "react";
|
|
1611
1845
|
import { DataGridPro, useGridApiRef } from "@mui/x-data-grid-pro";
|
|
1612
|
-
import { LicenseInfo } from "@mui/x-license-pro";
|
|
1613
|
-
import
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
},
|
|
1619
|
-
"& .MuiDataGrid-footerContainer": {
|
|
1620
|
-
minHeight: "26px !important",
|
|
1621
|
-
height: "26px !important"
|
|
1622
|
-
},
|
|
1623
|
-
"& .MuiTablePagination-toolbar": {
|
|
1624
|
-
minHeight: "25px !important",
|
|
1625
|
-
height: "25px !important"
|
|
1626
|
-
},
|
|
1627
|
-
"& .MuiTablePagination-actions .MuiIconButton-root": {
|
|
1628
|
-
padding: "0px !important"
|
|
1629
|
-
},
|
|
1630
|
-
"&.MuiDataGrid-root": {
|
|
1631
|
-
"--DataGrid-topContainerHeight": "0px !important"
|
|
1632
|
-
/* Cambia este valor según tus necesidades */
|
|
1633
|
-
},
|
|
1634
|
-
"MuiDataGrid-root .MuiDataGrid-virtualScrollerContent .MuiDataGrid-row": {
|
|
1635
|
-
"--height": "0px !important",
|
|
1636
|
-
"minHeight": "0px !important",
|
|
1637
|
-
"maxHeight": "0px !important"
|
|
1638
|
-
},
|
|
1639
|
-
"& .MuiDataGrid-cell": {
|
|
1640
|
-
padding: "0 !important"
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
});
|
|
1644
|
-
var SCDataGrid = (_a) => {
|
|
1645
|
-
var _b = _a, { data, columns, rowsTable, checkboxSelection, width, height, maxHeight, density, agrupacion, groupingColDef, getTreeDataPath } = _b, props = __objRest(_b, ["data", "columns", "rowsTable", "checkboxSelection", "width", "height", "maxHeight", "density", "agrupacion", "groupingColDef", "getTreeDataPath"]);
|
|
1646
|
-
const apiRef = useGridApiRef();
|
|
1647
|
-
const classes = useStyles();
|
|
1648
|
-
LicenseInfo.setLicenseKey(
|
|
1846
|
+
import { LicenseInfo as LicenseInfo2 } from "@mui/x-license-pro";
|
|
1847
|
+
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
|
1848
|
+
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
|
|
1849
|
+
import { useTheme } from "@mui/material/styles";
|
|
1850
|
+
var SCDataGridInitial = ({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }) => {
|
|
1851
|
+
LicenseInfo2.setLicenseKey(
|
|
1649
1852
|
"77d49a57fbc5f4af35ddb05c5f1742e0Tz0xMTI3MjgsRT0xNzc4MzcxMTk5MDAwLFM9cHJvLExNPXN1YnNjcmlwdGlvbixQVj1RMy0yMDI0LEtWPTI="
|
|
1650
1853
|
);
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1854
|
+
const theme = useTheme();
|
|
1855
|
+
const apiRef = useGridApiRef();
|
|
1856
|
+
const isRowSelectable = (params) => params.row.bloqueoChecked == false ? false : true;
|
|
1857
|
+
function generateRandomId() {
|
|
1858
|
+
return Math.floor(Math.random() * 1e6);
|
|
1859
|
+
}
|
|
1860
|
+
const getTreeDataPaths = (row) => {
|
|
1861
|
+
return [
|
|
1862
|
+
row[groupColumns[0].split("[")[1].split("]")[0].trim()],
|
|
1863
|
+
...groupColumns.length > 2 ? [row[groupColumns[1].split("[")[1].split("]")[0].trim()]] : [],
|
|
1864
|
+
`${row[groupColumns[groupColumns.length - 1].split("[")[1].split("]")[0].trim()].toString()}/${generateRandomId()}`
|
|
1865
|
+
];
|
|
1866
|
+
};
|
|
1867
|
+
const groupingColDefs = {
|
|
1868
|
+
field: "grouping",
|
|
1869
|
+
headerName: groupColumns != void 0 ? groupColumns[groupColumns.length - 1].split("[").length == 2 ? groupColumns[groupColumns.length - 1].split("[")[0].trim() : "Agrupador" : "",
|
|
1870
|
+
renderCell: (params) => {
|
|
1871
|
+
var _a;
|
|
1872
|
+
let label = params.value.toString().includes("/") ? params.value.split("/")[0].toString() : params.value.toString();
|
|
1873
|
+
const maxDepth = groupColumns ? groupColumns.length - 2 : 0;
|
|
1874
|
+
if (groupColumns != void 0) {
|
|
1875
|
+
if (params.rowNode.depth === 0) {
|
|
1876
|
+
const textBegin = groupColumns[0] ? groupColumns[0].split("[")[0].trim() : "";
|
|
1877
|
+
const textEnd = groupColumns[0] ? groupColumns[0].split("]")[1].trim() : "";
|
|
1878
|
+
const labelGrouping1 = `${textBegin} ${label} ${textEnd}`;
|
|
1879
|
+
const fieldGrouping1 = groupColumns[0].split("[")[1].split("]")[0].trim();
|
|
1880
|
+
const fieldGrouping2 = groupColumns[1].split("[")[1].split("]")[0].trim();
|
|
1881
|
+
const subgroup1 = arrayRows.filter((r) => r[fieldGrouping1].toString() === label).map((r) => r[fieldGrouping2]);
|
|
1882
|
+
const groupedDataLength1 = subgroup1.filter((valor, indiceActual, arreglo) => arreglo.indexOf(valor) === indiceActual);
|
|
1883
|
+
label = `${labelGrouping1} (${groupedDataLength1.length})`;
|
|
1884
|
+
} else if (groupColumns.length > 2 && params.rowNode.depth === 1) {
|
|
1885
|
+
const labelGrouping1 = (_a = params.api.getRowNode(params.rowNode.parent)) == null ? void 0 : _a.groupingKey;
|
|
1886
|
+
const textBegin = groupColumns[1] ? groupColumns[1].split("[")[0] : "";
|
|
1887
|
+
const textEnd = groupColumns[1] ? groupColumns[1].split("]")[1].trim() : "";
|
|
1888
|
+
const labelGrouping2 = `${textBegin} ${label} ${textEnd}`;
|
|
1889
|
+
const fieldGrouping1 = groupColumns[0].split("[")[1].split("]")[0].trim();
|
|
1890
|
+
const fieldGrouping2 = groupColumns[1].split("[")[1].split("]")[0].trim();
|
|
1891
|
+
const groupedDataLength2 = arrayRows.filter(
|
|
1892
|
+
(r) => r[fieldGrouping1] === labelGrouping1 && r[fieldGrouping2] === label
|
|
1893
|
+
).length;
|
|
1894
|
+
label = `${labelGrouping2} (${groupedDataLength2})`;
|
|
1895
|
+
} else {
|
|
1896
|
+
label = label;
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1900
|
+
"div",
|
|
1901
|
+
{
|
|
1902
|
+
style: {
|
|
1903
|
+
width: "100%",
|
|
1904
|
+
boxSizing: "border-box",
|
|
1905
|
+
overflow: "hidden",
|
|
1906
|
+
textOverflow: "ellipsis",
|
|
1907
|
+
whiteSpace: "nowrap",
|
|
1908
|
+
color: "#101840DE",
|
|
1909
|
+
display: "flex",
|
|
1910
|
+
alignItems: "center",
|
|
1911
|
+
paddingLeft: params.rowNode.depth == 0 ? "5px" : params.rowNode.depth == 1 ? "15px" : "25px",
|
|
1912
|
+
backgroundColor: params.rowNode.type === "group" ? theme.palette.grey[100 + (maxDepth - params.rowNode.depth) * 100] : "#FFFFFF",
|
|
1913
|
+
fontWeight: params.rowNode.type == "group" ? "400" : "300"
|
|
1914
|
+
}
|
|
1915
|
+
},
|
|
1916
|
+
params.rowNode.type === "group" && /* @__PURE__ */ React14.createElement(
|
|
1917
|
+
"span",
|
|
1918
|
+
{
|
|
1919
|
+
style: {
|
|
1920
|
+
cursor: "pointer",
|
|
1921
|
+
marginRight: 8,
|
|
1922
|
+
userSelect: "none"
|
|
1923
|
+
},
|
|
1924
|
+
onClick: (e) => {
|
|
1925
|
+
e.stopPropagation();
|
|
1926
|
+
params.api.setRowChildrenExpansion(params.id, !params.rowNode.childrenExpanded);
|
|
1927
|
+
}
|
|
1928
|
+
},
|
|
1929
|
+
params.rowNode.childrenExpanded ? /* @__PURE__ */ React14.createElement(KeyboardArrowUpIcon, { fontSize: "small", color: "action" }) : /* @__PURE__ */ React14.createElement(KeyboardArrowDownIcon, { fontSize: "small", color: "action" })
|
|
1930
|
+
),
|
|
1931
|
+
label
|
|
1932
|
+
);
|
|
1933
|
+
},
|
|
1934
|
+
colSpan: (params) => {
|
|
1935
|
+
const value = String(params);
|
|
1936
|
+
const fieldGrouping1 = groupColumns[0].split("[")[1].split("]")[0].trim();
|
|
1937
|
+
const fieldGrouping2 = groupColumns.length > 2 ? groupColumns[1].split("[")[1].split("]")[0].trim() : void 0;
|
|
1938
|
+
let agrupado1 = false;
|
|
1939
|
+
let agrupado2 = false;
|
|
1940
|
+
if (fieldGrouping1 != void 0) {
|
|
1941
|
+
agrupado1 = arrayRows.some(
|
|
1942
|
+
(row) => String(row[fieldGrouping1]) === value
|
|
1943
|
+
);
|
|
1944
|
+
}
|
|
1945
|
+
if (fieldGrouping2 != void 0) {
|
|
1946
|
+
agrupado2 = arrayRows.some(
|
|
1947
|
+
(row) => String(row[fieldGrouping2]) === value
|
|
1948
|
+
);
|
|
1949
|
+
}
|
|
1950
|
+
if (agrupado1 || agrupado2) {
|
|
1951
|
+
return columns.length + 1;
|
|
1952
|
+
} else {
|
|
1953
|
+
return 1;
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
};
|
|
1957
|
+
let validationTreeData = groupColumns ? true : false;
|
|
1958
|
+
let validationCheckboxSelection = checkboxSelection || false;
|
|
1959
|
+
let styleDensity = density || "compact";
|
|
1960
|
+
let styleTopContainerHeight = styleDensity === "compact" ? "26px" : styleDensity === "standard" ? "38px" : styleDensity === "comfortable" ? "60px" : "27px";
|
|
1961
|
+
let styleRowHeight = density == "compact" ? 32 : density == "standard" ? 28 : density == "comfortable" ? 36 : 32;
|
|
1962
|
+
let rows = rowsTable ? rowsTable : validationTreeData != false ? parseInt(data.length.toString()) : data.length < 10 ? parseInt(data.length.toString()) : 10;
|
|
1963
|
+
let validationGroupingColDef = groupingColDefs || {};
|
|
1964
|
+
const [groupDataLenght, setGroupDataLengh] = useState8(0);
|
|
1965
|
+
const [pageSize, setPageSize] = useState8(rows);
|
|
1966
|
+
const [arrayRows, setArrayRows] = useState8([]);
|
|
1967
|
+
const [selectionModel, setSelectionModel] = useState8([]);
|
|
1968
|
+
useEffect10(() => {
|
|
1671
1969
|
if ((data == null ? void 0 : data.length) > 0) {
|
|
1672
1970
|
dataConvertRows(data, void 0);
|
|
1673
|
-
if (validationTreeData) {
|
|
1674
|
-
countGroupedElements(data, getTreeDataPath);
|
|
1675
|
-
}
|
|
1676
1971
|
}
|
|
1677
1972
|
}, [data]);
|
|
1678
|
-
useEffect11(() => {
|
|
1679
|
-
if (groupDataLenght > 0 && validationTreeData == true) {
|
|
1680
|
-
setHeightTable(heightTable ? heightTable : groupDataLenght * tamanoCelda + tamanoEncabezado + 27);
|
|
1681
|
-
} else if (groupDataLenght <= 0 && validationTreeData == false) {
|
|
1682
|
-
setHeightTable(heightTable ? heightTable : rows * tamanoCelda + tamanoEncabezado + 27);
|
|
1683
|
-
}
|
|
1684
|
-
}, [groupDataLenght]);
|
|
1685
1973
|
const dataConvertRows = (data2, columnId) => {
|
|
1686
|
-
let
|
|
1974
|
+
let dataConvert = [];
|
|
1687
1975
|
if ((data2 == null ? void 0 : data2.length) > 0) {
|
|
1688
1976
|
const dataKeys = Object.keys(data2[0]);
|
|
1689
1977
|
data2.map((item) => {
|
|
1690
1978
|
const newKeys = {};
|
|
1691
1979
|
let i = 0;
|
|
1692
|
-
let id =
|
|
1980
|
+
let id = dataConvert.length + 1;
|
|
1693
1981
|
for (i = 0; i < dataKeys.length; i++) {
|
|
1694
1982
|
newKeys[dataKeys[i]] = item[dataKeys[i]];
|
|
1695
1983
|
}
|
|
1696
1984
|
newKeys.id = columnId ? item[columnId] : id;
|
|
1697
|
-
|
|
1985
|
+
dataConvert = [...dataConvert, newKeys];
|
|
1698
1986
|
});
|
|
1699
1987
|
}
|
|
1700
|
-
setArrayRows(
|
|
1988
|
+
setArrayRows(dataConvert);
|
|
1701
1989
|
};
|
|
1702
|
-
const isRowSelectable = (params) => params.row.bloqueoChecked == false ? false : true;
|
|
1703
|
-
const [selectionModel, setSelectionModel] = useState10([]);
|
|
1704
1990
|
const handleSelectionChange = (newSelection) => {
|
|
1705
|
-
console.log(data);
|
|
1706
|
-
console.log(arrayRows);
|
|
1707
1991
|
if (groupDataLenght > 0 && validationTreeData == true) {
|
|
1708
1992
|
let numberGrouped = 0;
|
|
1709
1993
|
let idsRowSelectBefore = [];
|
|
@@ -1737,41 +2021,27 @@ var SCDataGrid = (_a) => {
|
|
|
1737
2021
|
setSelectionModel([...newSelection]);
|
|
1738
2022
|
}
|
|
1739
2023
|
};
|
|
1740
|
-
|
|
1741
|
-
const groupedCounts = {};
|
|
1742
|
-
data.forEach((row2) => {
|
|
1743
|
-
const path = getTreeDataPath2(row2) || [];
|
|
1744
|
-
const key = path[0];
|
|
1745
|
-
if (!groupedCounts[key]) {
|
|
1746
|
-
groupedCounts[key] = 0;
|
|
1747
|
-
}
|
|
1748
|
-
groupedCounts[key]++;
|
|
1749
|
-
});
|
|
1750
|
-
setGroupDataLengh(Object.keys(groupedCounts).length);
|
|
1751
|
-
return groupedCounts;
|
|
1752
|
-
};
|
|
1753
|
-
const virtualScrollerHeight = validationTreeData ? groupDataLenght * tamanoCelda + 10 : rows * tamanoCelda;
|
|
1754
|
-
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, heightTable > 0 ? /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement("div", { style: { display: "flex", flexDirection: "column", width, maxHeight } }, /* @__PURE__ */ React14.createElement(
|
|
2024
|
+
return /* @__PURE__ */ React14.createElement(React14.Fragment, null, data && /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement("div", { style: { width: width || "100%", maxHeight: maxHeight ? `${maxHeight}px` : "none" } }, /* @__PURE__ */ React14.createElement(
|
|
1755
2025
|
DataGridPro,
|
|
1756
|
-
|
|
1757
|
-
apiRef
|
|
1758
|
-
|
|
2026
|
+
{
|
|
2027
|
+
apiRef,
|
|
2028
|
+
rowHeight: styleRowHeight,
|
|
1759
2029
|
rows: arrayRows,
|
|
1760
2030
|
columns,
|
|
1761
|
-
density,
|
|
2031
|
+
density: styleDensity,
|
|
1762
2032
|
treeData: validationTreeData,
|
|
1763
|
-
getTreeDataPath,
|
|
1764
|
-
groupingColDef: validationTreeData == true ?
|
|
2033
|
+
getTreeDataPath: validationTreeData == true ? getTreeDataPaths : void 0,
|
|
2034
|
+
groupingColDef: validationTreeData == true ? validationGroupingColDef : void 0,
|
|
1765
2035
|
pagination: true,
|
|
1766
2036
|
initialState: {
|
|
1767
2037
|
pagination: { paginationModel: { pageSize: rows } }
|
|
1768
2038
|
},
|
|
1769
|
-
checkboxSelection,
|
|
2039
|
+
checkboxSelection: validationCheckboxSelection,
|
|
1770
2040
|
rowSelectionModel: selectionModel,
|
|
1771
2041
|
onRowSelectionModelChange: (newSelection) => handleSelectionChange(newSelection),
|
|
1772
2042
|
isRowSelectable,
|
|
1773
2043
|
disableRowSelectionOnClick: true,
|
|
1774
|
-
|
|
2044
|
+
hideFooter: validationTreeData == true ? true : false,
|
|
1775
2045
|
localeText: {
|
|
1776
2046
|
noRowsLabel: "No hay filas",
|
|
1777
2047
|
columnMenuLabel: "Men\xFA de columna",
|
|
@@ -1782,233 +2052,496 @@ var SCDataGrid = (_a) => {
|
|
|
1782
2052
|
labelRowsPerPage: "Filas por p\xE1gina:",
|
|
1783
2053
|
labelDisplayedRows: ({ from, to, count }) => `${from}\u2013${to} de ${count !== -1 ? count : `m\xE1s de ${to}`}`
|
|
1784
2054
|
}
|
|
2055
|
+
},
|
|
2056
|
+
sx: {
|
|
2057
|
+
maxHeight: maxHeight ? `${maxHeight}px` : "none",
|
|
2058
|
+
//overflow: 'auto',
|
|
2059
|
+
"& .MuiDataGrid-filler": {
|
|
2060
|
+
display: "none !important"
|
|
2061
|
+
},
|
|
2062
|
+
"& .MuiDataGrid-footerContainer": {
|
|
2063
|
+
minHeight: "26px !important",
|
|
2064
|
+
height: "26px !important"
|
|
2065
|
+
},
|
|
2066
|
+
"& .MuiTablePagination-toolbar": {
|
|
2067
|
+
minHeight: "25px !important",
|
|
2068
|
+
height: "25px !important"
|
|
2069
|
+
},
|
|
2070
|
+
"& .MuiTablePagination-actions .MuiIconButton-root": {
|
|
2071
|
+
padding: "0px !important"
|
|
2072
|
+
},
|
|
2073
|
+
"&.MuiDataGrid-root": {
|
|
2074
|
+
[`--DataGrid-topContainerHeight`]: `${styleTopContainerHeight} !important`
|
|
2075
|
+
},
|
|
2076
|
+
"MuiDataGrid-root .MuiDataGrid-virtualScrollerContent .MuiDataGrid-row": {
|
|
2077
|
+
"--height": "0px !important",
|
|
2078
|
+
"minHeight": "0px !important",
|
|
2079
|
+
"maxHeight": "0px !important"
|
|
2080
|
+
},
|
|
2081
|
+
"& .MuiDataGrid-cell": {
|
|
2082
|
+
padding: "0 !important",
|
|
2083
|
+
background: "white"
|
|
2084
|
+
}
|
|
1785
2085
|
}
|
|
1786
|
-
}
|
|
1787
|
-
)))
|
|
2086
|
+
}
|
|
2087
|
+
))));
|
|
1788
2088
|
};
|
|
2089
|
+
var SCDataGrid = React14.memo(SCDataGridInitial, (prevProps, nextProps) => {
|
|
2090
|
+
const isEqual = prevProps.data === nextProps.data && prevProps.columns === nextProps.columns && prevProps.groupColumns === nextProps.groupColumns && prevProps.rowsTable === nextProps.rowsTable && prevProps.checkboxSelection === nextProps.checkboxSelection && prevProps.width === nextProps.width && prevProps.maxHeight === nextProps.maxHeight && prevProps.density === nextProps.density;
|
|
2091
|
+
return isEqual;
|
|
2092
|
+
});
|
|
1789
2093
|
|
|
1790
|
-
// src/Components/
|
|
1791
|
-
import React15
|
|
1792
|
-
import {
|
|
2094
|
+
// src/Components/EmptyState/EmptyState.tsx
|
|
2095
|
+
import React15 from "react";
|
|
2096
|
+
import { Button as Button8, Stack as Stack7, Typography as Typography12 } from "@mui/material";
|
|
2097
|
+
|
|
2098
|
+
// src/assets/ImgEmptyState/create.svg
|
|
2099
|
+
var create_default = "./create-KZGO2OZA.svg";
|
|
2100
|
+
|
|
2101
|
+
// src/assets/ImgEmptyState/error.svg
|
|
2102
|
+
var error_default = "./error-RUCZUXDN.svg";
|
|
2103
|
+
|
|
2104
|
+
// src/assets/ImgEmptyState/empty.svg
|
|
2105
|
+
var empty_default = "./empty-3NEKE7WO.svg";
|
|
2106
|
+
|
|
2107
|
+
// src/assets/ImgEmptyState/search.svg
|
|
2108
|
+
var search_default = "./search-OKSCVF2W.svg";
|
|
2109
|
+
|
|
2110
|
+
// src/Components/EmptyState/EmptyState.tsx
|
|
2111
|
+
var EmptyStateImageUrls = {
|
|
2112
|
+
create: create_default,
|
|
2113
|
+
error: error_default,
|
|
2114
|
+
noResult: empty_default,
|
|
2115
|
+
search: search_default
|
|
2116
|
+
};
|
|
2117
|
+
var DefaultIcon = ({
|
|
2118
|
+
state = "create",
|
|
2119
|
+
size = "large"
|
|
2120
|
+
}) => {
|
|
2121
|
+
const imageUrl = EmptyStateImageUrls[state];
|
|
2122
|
+
const iconSize = size === "small" ? { width: "40px", height: "40px" } : { width: "60px", height: "60px" };
|
|
2123
|
+
return /* @__PURE__ */ React15.createElement("img", { src: imageUrl, alt: state, style: iconSize });
|
|
2124
|
+
};
|
|
2125
|
+
var EmptyState = ({
|
|
2126
|
+
state = "create",
|
|
2127
|
+
size = "large",
|
|
2128
|
+
title,
|
|
2129
|
+
subtitle,
|
|
2130
|
+
actions,
|
|
2131
|
+
containerHeight = "100vh",
|
|
2132
|
+
icon = /* @__PURE__ */ React15.createElement(DefaultIcon, { state, size })
|
|
2133
|
+
}) => {
|
|
2134
|
+
const titleVariant = size === "small" ? "subtitle2" : "h6";
|
|
2135
|
+
const subtitleVariant = size === "small" ? "caption" : "body1";
|
|
2136
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2137
|
+
Stack7,
|
|
2138
|
+
{
|
|
2139
|
+
alignItems: "center",
|
|
2140
|
+
justifyContent: "center",
|
|
2141
|
+
spacing: 2,
|
|
2142
|
+
height: containerHeight,
|
|
2143
|
+
"data-testid": "empty-state-container"
|
|
2144
|
+
},
|
|
2145
|
+
icon && /* @__PURE__ */ React15.createElement(Stack7, null, icon),
|
|
2146
|
+
/* @__PURE__ */ React15.createElement(Stack7, { gap: 0.5 }, /* @__PURE__ */ React15.createElement(Typography12, { color: "text.primary", variant: titleVariant, textAlign: "center" }, title), subtitle && /* @__PURE__ */ React15.createElement(
|
|
2147
|
+
Typography12,
|
|
2148
|
+
{
|
|
2149
|
+
variant: subtitleVariant,
|
|
2150
|
+
textAlign: "center",
|
|
2151
|
+
color: "text.secondary"
|
|
2152
|
+
},
|
|
2153
|
+
subtitle
|
|
2154
|
+
), actions && (actions == null ? void 0 : actions.length) > 0 && /* @__PURE__ */ React15.createElement(
|
|
2155
|
+
Stack7,
|
|
2156
|
+
{
|
|
2157
|
+
direction: "row",
|
|
2158
|
+
spacing: 2,
|
|
2159
|
+
alignItems: "center",
|
|
2160
|
+
justifyContent: "center"
|
|
2161
|
+
},
|
|
2162
|
+
actions.map((action, index) => {
|
|
2163
|
+
var _a, _b, _c, _d;
|
|
2164
|
+
return /* @__PURE__ */ React15.createElement(
|
|
2165
|
+
Button8,
|
|
2166
|
+
{
|
|
2167
|
+
key: index,
|
|
2168
|
+
color: (_a = action.color) != null ? _a : "primary",
|
|
2169
|
+
variant: (_b = action.variant) != null ? _b : "text",
|
|
2170
|
+
size: (_c = action.size) != null ? _c : "small",
|
|
2171
|
+
startIcon: action.icon && action.iconPosition === "left" ? /* @__PURE__ */ React15.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
|
|
2172
|
+
endIcon: action.icon && action.iconPosition === "right" ? /* @__PURE__ */ React15.createElement("img", { src: action.icon, alt: "icon" }) : void 0,
|
|
2173
|
+
onClick: action.onClick
|
|
2174
|
+
},
|
|
2175
|
+
capitalize((_d = action.text) != null ? _d : "action")
|
|
2176
|
+
);
|
|
2177
|
+
})
|
|
2178
|
+
))
|
|
2179
|
+
);
|
|
2180
|
+
};
|
|
2181
|
+
|
|
2182
|
+
// src/Components/SCDialog.tsx
|
|
2183
|
+
import React16, { useEffect as useEffect11, useState as useState9 } from "react";
|
|
2184
|
+
import { Button as Button9, Typography as Typography13, Modal as Modal2, Dialog, DialogActions, DialogContent, DialogTitle, IconButton as IconButton8, Tooltip as Tooltip3, Box as Box11, SvgIcon as SvgIcon5 } from "@mui/material";
|
|
2185
|
+
import Grid6 from "@mui/material/Grid2";
|
|
2186
|
+
import CloseIcon2 from "@mui/icons-material/Close";
|
|
2187
|
+
import * as Muicon5 from "@mui/icons-material";
|
|
2188
|
+
var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, disableClose, dividers, widthContent, heightContent, background, setShow, show }) => {
|
|
2189
|
+
let i = 0;
|
|
2190
|
+
let iconTitleValidation = "";
|
|
2191
|
+
let IconTitle;
|
|
2192
|
+
let ButtonIcon;
|
|
2193
|
+
const [open, setOpen] = useState9(show);
|
|
2194
|
+
useEffect11(() => {
|
|
2195
|
+
if (show) {
|
|
2196
|
+
handleOpen();
|
|
2197
|
+
} else {
|
|
2198
|
+
handleClose();
|
|
2199
|
+
}
|
|
2200
|
+
}, [show]);
|
|
2201
|
+
if ((buttonDialog == null ? void 0 : buttonDialog.icon) != void 0) {
|
|
2202
|
+
if (Muicon5[buttonDialog == null ? void 0 : buttonDialog.icon] == void 0) {
|
|
2203
|
+
ButtonIcon = buttonDialog == null ? void 0 : buttonDialog.icon;
|
|
2204
|
+
} else {
|
|
2205
|
+
ButtonIcon = Muicon5[buttonDialog == null ? void 0 : buttonDialog.icon];
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
actions == null ? void 0 : actions.map(function(option, index, array) {
|
|
2209
|
+
if (option == null ? void 0 : option.icon) {
|
|
2210
|
+
if ((option == null ? void 0 : option.icon.type) == void 0) {
|
|
2211
|
+
option.icon = Muicon5[option == null ? void 0 : option.icon];
|
|
2212
|
+
} else {
|
|
2213
|
+
option;
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
});
|
|
2217
|
+
if (iconTitle) {
|
|
2218
|
+
if (Muicon5[iconTitle] == void 0) {
|
|
2219
|
+
if (iconTitle && React16.isValidElement(iconTitle) && iconTitle.type == void 0) {
|
|
2220
|
+
iconTitleValidation = "image";
|
|
2221
|
+
IconTitle = iconTitle;
|
|
2222
|
+
} else {
|
|
2223
|
+
iconTitleValidation = "icon";
|
|
2224
|
+
IconTitle = iconTitle;
|
|
2225
|
+
}
|
|
2226
|
+
} else {
|
|
2227
|
+
iconTitleValidation = "icon";
|
|
2228
|
+
IconTitle = Muicon5[iconTitle];
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
const handleOpen = () => {
|
|
2232
|
+
setOpen(true);
|
|
2233
|
+
if (setShow) {
|
|
2234
|
+
setShow(true);
|
|
2235
|
+
}
|
|
2236
|
+
};
|
|
2237
|
+
const handleClose = () => {
|
|
2238
|
+
setOpen(false);
|
|
2239
|
+
if (setShow) {
|
|
2240
|
+
setShow(false);
|
|
2241
|
+
}
|
|
2242
|
+
};
|
|
2243
|
+
const dialogActions = actions != null ? actions : [{ text: "Cerrar", fn: handleClose }];
|
|
2244
|
+
content = content != null ? content : { component: /* @__PURE__ */ React16.createElement(Box11, null, " Aqui va el contenido ") };
|
|
2245
|
+
return /* @__PURE__ */ React16.createElement("div", null, buttonDialog ? /* @__PURE__ */ React16.createElement(React16.Fragment, null, buttonDialog.text != void 0 ? /* @__PURE__ */ React16.createElement(Tooltip3, { placement: "bottom-start", title: buttonDialog.tooltip != void 0 ? buttonDialog.tooltip : "", slotProps: { popper: { modifiers: [{ name: "offset", options: { offset: [0, -14] } }] } } }, /* @__PURE__ */ React16.createElement(Button9, { 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__ */ React16.createElement(ButtonIcon, { color: buttonDialog.color != void 0 ? buttonDialog.color : "primary" }) : "" : "", endIcon: (buttonDialog == null ? void 0 : buttonDialog.iconPosition) != void 0 ? (buttonDialog == null ? void 0 : buttonDialog.iconPosition) == "right" ? /* @__PURE__ */ React16.createElement(ButtonIcon, { color: buttonDialog.color != void 0 ? buttonDialog.color : "primary" }) : "" : "", onClick: handleOpen }, " ", (buttonDialog == null ? void 0 : buttonDialog.text) != void 0 ? buttonDialog.text : "", " ")) : /* @__PURE__ */ React16.createElement(IconButton8, { style: { cursor: "pointer" }, onClick: handleOpen }, /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", color: (buttonDialog == null ? void 0 : buttonDialog.color) != void 0 ? buttonDialog == null ? void 0 : buttonDialog.color : "action", component: ButtonIcon }))) : "", /* @__PURE__ */ React16.createElement(Modal2, { open: open || false, onClose: handleClose }, /* @__PURE__ */ React16.createElement(
|
|
2246
|
+
Dialog,
|
|
2247
|
+
{
|
|
2248
|
+
"data-testid": "dialog-element",
|
|
2249
|
+
open: open || false,
|
|
2250
|
+
onClose: disableClose ? void 0 : handleClose,
|
|
2251
|
+
maxWidth: "xl",
|
|
2252
|
+
sx: {
|
|
2253
|
+
width: "100% !important",
|
|
2254
|
+
"& .MuiBackdrop-root": {
|
|
2255
|
+
backdropFilter: "blur(0px) !important"
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
},
|
|
2259
|
+
title && /* @__PURE__ */ React16.createElement(DialogTitle, { sx: { m: 0, padding: "8px 16px 8px 16px" }, "data-testid": "dialog-icon-title" }, /* @__PURE__ */ React16.createElement(Grid6, { container: true, size: 12, sx: { justifyContent: "space-between", flexWrap: "nowrap" } }, /* @__PURE__ */ React16.createElement(Grid6, { container: true, size: 11, sx: { alignItems: "center" } }, iconTitle ? iconTitleValidation == "image" ? /* @__PURE__ */ React16.createElement(Box11, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React16.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React16.createElement(SvgIcon5, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : "", /* @__PURE__ */ React16.createElement(Grid6, null, /* @__PURE__ */ React16.createElement(Typography13, { color: "text.primary", variant: "h6", gutterBottom: true }, title ? title : ""), /* @__PURE__ */ React16.createElement(Typography13, { color: "text.secondary", variant: "body2", gutterBottom: true }, subtitle ? subtitle : ""))), disableClose != true ? /* @__PURE__ */ React16.createElement(IconButton8, { "data-testid": "close-dialog-button", onClick: handleClose, size: "small", color: "default", sx: { height: 22, width: 22 } }, /* @__PURE__ */ React16.createElement(CloseIcon2, null)) : "")),
|
|
2260
|
+
/* @__PURE__ */ React16.createElement(
|
|
2261
|
+
DialogContent,
|
|
2262
|
+
{
|
|
2263
|
+
"data-testid": "dialog-content",
|
|
2264
|
+
dividers: dividers ? dividers : false,
|
|
2265
|
+
sx: {
|
|
2266
|
+
m: 0,
|
|
2267
|
+
padding: "12px 16px 8px 16px",
|
|
2268
|
+
background: background ? background : "white",
|
|
2269
|
+
height: !heightContent ? { xs: "60vh", sm: "70vh", md: "508px" } : heightContent,
|
|
2270
|
+
width: () => {
|
|
2271
|
+
switch (widthContent) {
|
|
2272
|
+
case "extra-small":
|
|
2273
|
+
return { xs: "48vw", md: "33vw" };
|
|
2274
|
+
case "small":
|
|
2275
|
+
return { xs: "54vw", md: "39vw" };
|
|
2276
|
+
case "medium":
|
|
2277
|
+
return { xs: "64vw", md: "56vw" };
|
|
2278
|
+
case "large":
|
|
2279
|
+
return { xs: "74vw", md: "78vw" };
|
|
2280
|
+
case "extra-large":
|
|
2281
|
+
return { xs: "84vw", md: "93vw" };
|
|
2282
|
+
default:
|
|
2283
|
+
return { xs: "64vw", md: "56vw" };
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
},
|
|
2288
|
+
content.url ? /* @__PURE__ */ React16.createElement(
|
|
2289
|
+
"iframe",
|
|
2290
|
+
{
|
|
2291
|
+
style: { border: "none", minWidth: "100%", minHeight: "100%" },
|
|
2292
|
+
id: "inlineFrameExample",
|
|
2293
|
+
title: "Inline Frame Example",
|
|
2294
|
+
src: content.url
|
|
2295
|
+
}
|
|
2296
|
+
) : content.component
|
|
2297
|
+
),
|
|
2298
|
+
dialogActions.length > 0 ? /* @__PURE__ */ React16.createElement(DialogActions, { sx: { gap: 1, m: 0, padding: "12px 16px 12px 16px", justifyContent: dialogActions.length >= 3 ? "space-between" : "flex-end" } }, dialogActions.length >= 3 ? /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
|
|
2299
|
+
Button9,
|
|
2300
|
+
{
|
|
2301
|
+
variant: "text",
|
|
2302
|
+
color: dialogActions[0].color || "primary",
|
|
2303
|
+
size: "small",
|
|
2304
|
+
onClick: dialogActions[0].fn,
|
|
2305
|
+
disabled: dialogActions[0].disabled || false,
|
|
2306
|
+
startIcon: dialogActions[0].icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: dialogActions[0].icon }) : void 0
|
|
2307
|
+
},
|
|
2308
|
+
dialogActions[0].text
|
|
2309
|
+
), /* @__PURE__ */ React16.createElement(Box11, { sx: { display: "flex", gap: 1 } }, dialogActions.slice(1).map((boton, index) => {
|
|
2310
|
+
return /* @__PURE__ */ React16.createElement(
|
|
2311
|
+
Button9,
|
|
2312
|
+
{
|
|
2313
|
+
key: index + 1,
|
|
2314
|
+
variant: index === dialogActions.length - 2 ? "contained" : "text",
|
|
2315
|
+
color: boton.color || "primary",
|
|
2316
|
+
size: "small",
|
|
2317
|
+
onClick: boton.fn,
|
|
2318
|
+
disabled: boton.disabled || false,
|
|
2319
|
+
startIcon: boton.icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
|
|
2320
|
+
},
|
|
2321
|
+
boton.text
|
|
2322
|
+
);
|
|
2323
|
+
}))) : dialogActions.map((boton, index) => {
|
|
2324
|
+
return /* @__PURE__ */ React16.createElement(
|
|
2325
|
+
Button9,
|
|
2326
|
+
{
|
|
2327
|
+
key: index,
|
|
2328
|
+
variant: index === dialogActions.length - 1 ? "contained" : "text",
|
|
2329
|
+
color: boton.color || "primary",
|
|
2330
|
+
size: "small",
|
|
2331
|
+
onClick: boton.fn,
|
|
2332
|
+
disabled: boton.disabled || false,
|
|
2333
|
+
startIcon: boton.icon ? /* @__PURE__ */ React16.createElement(SvgIcon5, { fontSize: "small", component: boton.icon }) : void 0
|
|
2334
|
+
},
|
|
2335
|
+
boton.text
|
|
2336
|
+
);
|
|
2337
|
+
})) : ""
|
|
2338
|
+
)));
|
|
2339
|
+
};
|
|
2340
|
+
|
|
2341
|
+
// src/Components/SCMenu.tsx
|
|
2342
|
+
import React17 from "react";
|
|
2343
|
+
import { Box as Box12, Typography as Typography14, Paper, Divider as Divider4, MenuList, MenuItem as MenuItem4, ListItemIcon as ListItemIcon4, SvgIcon as SvgIcon6 } from "@mui/material";
|
|
1793
2344
|
import Grid7 from "@mui/material/Grid2";
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
disabled,
|
|
1807
|
-
background,
|
|
1808
|
-
setState,
|
|
1809
|
-
state
|
|
1810
|
-
}) {
|
|
1811
|
-
const labelContent = `<span class="red-asterisk">* </span>` + label;
|
|
1812
|
-
let group = "";
|
|
1813
|
-
let isSelected = false;
|
|
1814
|
-
const [selectedOptions, setSelectedOptions] = React15.useState([]);
|
|
1815
|
-
const [prevData, setPrevData] = React15.useState(data);
|
|
2345
|
+
|
|
2346
|
+
// src/Components/Hooks/useWindowDimensions.ts
|
|
2347
|
+
import { useState as useState10, useEffect as useEffect12 } from "react";
|
|
2348
|
+
function getWindowDimensions() {
|
|
2349
|
+
const { innerWidth: width, innerHeight: height } = window;
|
|
2350
|
+
return {
|
|
2351
|
+
width,
|
|
2352
|
+
height
|
|
2353
|
+
};
|
|
2354
|
+
}
|
|
2355
|
+
function useWindowDimensions() {
|
|
2356
|
+
const [windowDimensions, setWindowDimensions] = useState10(getWindowDimensions());
|
|
1816
2357
|
useEffect12(() => {
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
2358
|
+
function handleResize() {
|
|
2359
|
+
setWindowDimensions(getWindowDimensions());
|
|
2360
|
+
}
|
|
2361
|
+
window.addEventListener("resize", handleResize);
|
|
2362
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
2363
|
+
}, []);
|
|
2364
|
+
return windowDimensions;
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
// src/Components/SCMenu.tsx
|
|
2368
|
+
import * as Muicon6 from "@mui/icons-material";
|
|
2369
|
+
var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu, widthPage }) => {
|
|
2370
|
+
const { height, width } = useWindowDimensions();
|
|
2371
|
+
const menuSize = widthMenu ? parseInt(widthMenu) : 284;
|
|
2372
|
+
const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
|
|
2373
|
+
const widthContainer = menuSize + pageSize;
|
|
2374
|
+
let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
2375
|
+
const [selectedIndex, setSelectedIndex] = React17.useState("1");
|
|
2376
|
+
const [value, setValue] = React17.useState("1");
|
|
2377
|
+
React17.useEffect(() => {
|
|
2378
|
+
heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
2379
|
+
}, [height]);
|
|
2380
|
+
React17.useEffect(() => {
|
|
2381
|
+
if (defaultOption) {
|
|
2382
|
+
handleClickMenusItem(event, void 0);
|
|
1822
2383
|
}
|
|
1823
|
-
}, [
|
|
1824
|
-
|
|
1825
|
-
if (
|
|
1826
|
-
if (
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
2384
|
+
}, [defaultOption]);
|
|
2385
|
+
options.map(function(option, index, array) {
|
|
2386
|
+
if (option == null ? void 0 : option.iconLeft) {
|
|
2387
|
+
if ((option == null ? void 0 : option.iconLeft.type) == void 0) {
|
|
2388
|
+
option.iconLeft = Muicon6[option == null ? void 0 : option.iconLeft];
|
|
2389
|
+
} else {
|
|
2390
|
+
option;
|
|
1830
2391
|
}
|
|
1831
2392
|
}
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
if ((option == null ? void 0 : option.icon.type) == void 0) {
|
|
1836
|
-
option.icon = Muicon6[option == null ? void 0 : option.icon];
|
|
2393
|
+
if (option == null ? void 0 : option.iconRight) {
|
|
2394
|
+
if ((option == null ? void 0 : option.iconRight.type) == void 0) {
|
|
2395
|
+
option.iconRight = Muicon6[option == null ? void 0 : option.iconRight];
|
|
1837
2396
|
} else {
|
|
1838
2397
|
option;
|
|
1839
2398
|
}
|
|
1840
2399
|
}
|
|
1841
2400
|
});
|
|
1842
|
-
const
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
setState({
|
|
1850
|
-
hiddenValue: data.map((item) => getItemValue(item).value),
|
|
1851
|
-
textValue: data.map((item) => getItemValue(item).text)
|
|
1852
|
-
});
|
|
1853
|
-
} else {
|
|
1854
|
-
setSelectedOptions([]);
|
|
1855
|
-
setState({ hiddenValue: "-1", textValue: "" });
|
|
1856
|
-
}
|
|
1857
|
-
};
|
|
1858
|
-
const allSelected = data.length > 0 && selectedOptions.length === data.length;
|
|
1859
|
-
const handleChange = (event2, value) => {
|
|
1860
|
-
if (type === "multiselect") {
|
|
1861
|
-
const ids = value.map((v) => getItemValue ? getItemValue(v).value : "");
|
|
1862
|
-
const texts = value.map((v) => getItemValue ? getItemValue(v).text : "");
|
|
1863
|
-
setSelectedOptions(value);
|
|
1864
|
-
setState({
|
|
1865
|
-
hiddenValue: ids,
|
|
1866
|
-
textValue: texts
|
|
1867
|
-
});
|
|
1868
|
-
} else {
|
|
1869
|
-
setState({
|
|
1870
|
-
hiddenValue: getItemValue(value).value,
|
|
1871
|
-
textValue: getItemValue(value).text
|
|
1872
|
-
});
|
|
2401
|
+
const handleClickMenusItem = (event2, index) => {
|
|
2402
|
+
if (defaultOption && index == void 0) {
|
|
2403
|
+
setSelectedIndex(defaultOption);
|
|
2404
|
+
setValue(defaultOption);
|
|
2405
|
+
} else if (index != void 0) {
|
|
2406
|
+
setSelectedIndex(String(index + 1));
|
|
2407
|
+
setValue(String(index + 1));
|
|
1873
2408
|
}
|
|
1874
2409
|
};
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
) : data.find(
|
|
1878
|
-
(item) => getItemValue(item).value === state.hiddenValue
|
|
1879
|
-
) || null;
|
|
1880
|
-
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, data && /* @__PURE__ */ React15.createElement(
|
|
1881
|
-
Autocomplete,
|
|
2410
|
+
return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Grid7, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ React17.createElement(Paper, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ React17.createElement(MenuList, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
|
|
2411
|
+
MenuItem4,
|
|
1882
2412
|
{
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
group = option[columnGroup];
|
|
2413
|
+
disabled: disable == true ? true : false,
|
|
2414
|
+
key: index,
|
|
2415
|
+
selected: String(index + 1) === selectedIndex,
|
|
2416
|
+
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
2417
|
+
},
|
|
2418
|
+
option.iconLeft ? /* @__PURE__ */ React17.createElement(ListItemIcon4, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React17.createElement(SvgIcon6, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
2419
|
+
/* @__PURE__ */ React17.createElement(Grid7, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React17.createElement(Typography14, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React17.createElement(ListItemIcon4, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React17.createElement(SvgIcon6, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
2420
|
+
), option.divider == true ? /* @__PURE__ */ React17.createElement(Divider4, null) : "")))), /* @__PURE__ */ React17.createElement(Grid7, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React17.createElement(Box12, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React17.createElement(Typography14, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
2421
|
+
};
|
|
2422
|
+
|
|
2423
|
+
// src/Components/SCTabs.tsx
|
|
2424
|
+
import React18, { useEffect as useEffect13 } from "react";
|
|
2425
|
+
import { Typography as Typography15, Box as Box13, SvgIcon as SvgIcon7, Tab, Tabs, Badge } from "@mui/material";
|
|
2426
|
+
import TabPanel from "@mui/lab/TabPanel";
|
|
2427
|
+
import TabContext from "@mui/lab/TabContext";
|
|
2428
|
+
import * as Muicon7 from "@mui/icons-material";
|
|
2429
|
+
var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
|
|
2430
|
+
const [toast, setToast] = React18.useState(null);
|
|
2431
|
+
let i = 0;
|
|
2432
|
+
let j = 0;
|
|
2433
|
+
let k = 0;
|
|
2434
|
+
let l = 0;
|
|
2435
|
+
let validateTypeIcon = true;
|
|
2436
|
+
const [value, setValue] = React18.useState("1");
|
|
2437
|
+
useEffect13(() => {
|
|
2438
|
+
if (defaultOption) {
|
|
2439
|
+
handleChange(event, void 0);
|
|
2440
|
+
}
|
|
2441
|
+
}, [defaultOption]);
|
|
2442
|
+
options.map(function(option) {
|
|
2443
|
+
const optionsLength = options.length;
|
|
2444
|
+
if (option == null ? void 0 : option.iconOrBadge) {
|
|
2445
|
+
if (typeIcon == "icon") {
|
|
2446
|
+
if ((option == null ? void 0 : option.iconOrBadge) in Muicon7 == true) {
|
|
2447
|
+
validateTypeIcon = true;
|
|
2448
|
+
option.iconOrBadge = Muicon7[option == null ? void 0 : option.iconOrBadge];
|
|
2449
|
+
} else {
|
|
2450
|
+
validateTypeIcon = false;
|
|
2451
|
+
setTimeout(() => {
|
|
2452
|
+
setToast({
|
|
2453
|
+
type: "error",
|
|
2454
|
+
title: "Componente SCTabs",
|
|
2455
|
+
subtitle: "En Option todos los iconOrBadge deben ser iconos de MUI, por favor verificar.",
|
|
2456
|
+
time: 50
|
|
2457
|
+
});
|
|
2458
|
+
}, 10);
|
|
2459
|
+
return;
|
|
1931
2460
|
}
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
|
|
1948
|
-
Box11,
|
|
1949
|
-
__spreadProps(__spreadValues({
|
|
1950
|
-
ref
|
|
1951
|
-
}, props), {
|
|
1952
|
-
sx: __spreadValues({
|
|
1953
|
-
position: "relative",
|
|
1954
|
-
paddingBottom: "56px",
|
|
1955
|
-
backgroundColor: "white"
|
|
1956
|
-
}, props.sx)
|
|
1957
|
-
}),
|
|
1958
|
-
checkMassive && type == "multiselect" ? /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(FormControlLabel, { control: /* @__PURE__ */ React15.createElement(Checkbox2, { checked: allSelected, indeterminate: selectedOptions.length > 0 && selectedOptions.length < data.length, onChange: handleCheckAll, color: "primary" }), label: "Todos los item", sx: { marginLeft: "0px !important", marginRight: "0px !important", padding: "7px 16px" } }), /* @__PURE__ */ React15.createElement(Divider3, null)) : "",
|
|
1959
|
-
props.children,
|
|
1960
|
-
deleteType == "button" || fnAplicar ? /* @__PURE__ */ React15.createElement(
|
|
1961
|
-
Grid7,
|
|
1962
|
-
{
|
|
1963
|
-
container: true,
|
|
1964
|
-
sx: {
|
|
1965
|
-
position: "sticky",
|
|
1966
|
-
bottom: -8,
|
|
1967
|
-
left: 0,
|
|
1968
|
-
width: "100%",
|
|
1969
|
-
backgroundColor: "grey.50",
|
|
1970
|
-
padding: "8px 16px",
|
|
1971
|
-
textAlign: "left",
|
|
1972
|
-
justifyContent: "space-between"
|
|
1973
|
-
}
|
|
1974
|
-
},
|
|
1975
|
-
deleteType == "button" ? /* @__PURE__ */ React15.createElement(
|
|
1976
|
-
Button8,
|
|
1977
|
-
{
|
|
1978
|
-
variant: "text",
|
|
1979
|
-
color: "primary",
|
|
1980
|
-
size: "small",
|
|
1981
|
-
onClick: (event2) => {
|
|
1982
|
-
event2.stopPropagation();
|
|
1983
|
-
cleanOptions(event2);
|
|
1984
|
-
}
|
|
1985
|
-
},
|
|
1986
|
-
"Limpiar"
|
|
1987
|
-
) : "",
|
|
1988
|
-
fnAplicar && /* @__PURE__ */ React15.createElement(
|
|
1989
|
-
Button8,
|
|
1990
|
-
{
|
|
1991
|
-
variant: "contained",
|
|
1992
|
-
color: "primary",
|
|
1993
|
-
size: "small",
|
|
1994
|
-
onClick: fnAplicar
|
|
1995
|
-
},
|
|
1996
|
-
"Aplicar"
|
|
1997
|
-
)
|
|
1998
|
-
) : ""
|
|
1999
|
-
));
|
|
2000
|
-
})
|
|
2461
|
+
} else if (typeIcon == "badge") {
|
|
2462
|
+
if ((option == null ? void 0 : option.iconOrBadge) in Muicon7 == false) {
|
|
2463
|
+
validateTypeIcon = true;
|
|
2464
|
+
option;
|
|
2465
|
+
} else {
|
|
2466
|
+
validateTypeIcon = false;
|
|
2467
|
+
setTimeout(() => {
|
|
2468
|
+
setToast({
|
|
2469
|
+
type: "error",
|
|
2470
|
+
title: "Componente SCTabs",
|
|
2471
|
+
subtitle: "En Option todos los iconOrBadge deben ser numeros para el badge, por favor verificar.",
|
|
2472
|
+
time: 10
|
|
2473
|
+
});
|
|
2474
|
+
}, 10);
|
|
2475
|
+
return;
|
|
2001
2476
|
}
|
|
2002
2477
|
}
|
|
2003
2478
|
}
|
|
2004
|
-
)
|
|
2005
|
-
|
|
2479
|
+
});
|
|
2480
|
+
const handleChange = (event2, newValue) => {
|
|
2481
|
+
if (defaultOption && newValue == void 0) {
|
|
2482
|
+
setValue(defaultOption);
|
|
2483
|
+
} else if (newValue != void 0) {
|
|
2484
|
+
setValue(newValue);
|
|
2485
|
+
}
|
|
2486
|
+
};
|
|
2487
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ React18.createElement(Box13, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ React18.createElement(TabContext, { value }, /* @__PURE__ */ React18.createElement(
|
|
2488
|
+
Tabs,
|
|
2489
|
+
{
|
|
2490
|
+
"data-testid": "tab-container",
|
|
2491
|
+
value,
|
|
2492
|
+
onChange: handleChange,
|
|
2493
|
+
variant: variant ? orientation == "vertical" && variant == "fullWidth" ? "standard" : variant : "standard",
|
|
2494
|
+
scrollButtons: scrollButtons == false ? false : true,
|
|
2495
|
+
visibleScrollbar: scrollButtons == false ? true : false,
|
|
2496
|
+
textColor: colorTab,
|
|
2497
|
+
indicatorColor: colorTab,
|
|
2498
|
+
orientation: orientation || "horizontal",
|
|
2499
|
+
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
2500
|
+
},
|
|
2501
|
+
options.map((option) => /* @__PURE__ */ React18.createElement(
|
|
2502
|
+
Tab,
|
|
2503
|
+
{
|
|
2504
|
+
"data-testid": "tab-item",
|
|
2505
|
+
value: String(i = i + 1),
|
|
2506
|
+
key: j = j + 1,
|
|
2507
|
+
label: option.name || "",
|
|
2508
|
+
disabled: option.disabled || false,
|
|
2509
|
+
iconPosition: iconPosition || "end",
|
|
2510
|
+
icon: typeIcon == "badge" ? /* @__PURE__ */ React18.createElement(
|
|
2511
|
+
Badge,
|
|
2512
|
+
{
|
|
2513
|
+
sx: {
|
|
2514
|
+
width: "20px",
|
|
2515
|
+
height: "20px",
|
|
2516
|
+
"& .MuiBadge-badge": {
|
|
2517
|
+
top: "10px",
|
|
2518
|
+
right: "10px"
|
|
2519
|
+
}
|
|
2520
|
+
},
|
|
2521
|
+
variant: "standard",
|
|
2522
|
+
badgeContent: option.iconOrBadge,
|
|
2523
|
+
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
2524
|
+
}
|
|
2525
|
+
) : typeIcon == "icon" ? /* @__PURE__ */ React18.createElement(SvgIcon7, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
|
|
2526
|
+
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
2527
|
+
}
|
|
2528
|
+
))
|
|
2529
|
+
), children, options.map((option) => /* @__PURE__ */ React18.createElement(
|
|
2530
|
+
TabPanel,
|
|
2531
|
+
{
|
|
2532
|
+
key: k = k + 1,
|
|
2533
|
+
value: String(l = l + 1),
|
|
2534
|
+
sx: { padding: "16px" }
|
|
2535
|
+
},
|
|
2536
|
+
option.page ? option.page : /* @__PURE__ */ React18.createElement(Typography15, null, "No se ha configurado el componente a visualizar ")
|
|
2537
|
+
)))) : /* @__PURE__ */ React18.createElement(Box13, { sx: { height: "200px" } }, toast && /* @__PURE__ */ React18.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
2538
|
+
};
|
|
2006
2539
|
|
|
2007
2540
|
// src/Theme/index.ts
|
|
2008
2541
|
import { createTheme } from "@mui/material/styles";
|
|
2009
2542
|
|
|
2010
2543
|
// src/Theme/components.ts
|
|
2011
|
-
import
|
|
2544
|
+
import React19 from "react";
|
|
2012
2545
|
import {
|
|
2013
2546
|
InfoRounded as InfoRounded2,
|
|
2014
2547
|
CheckCircleRounded as CheckCircleRounded2,
|
|
@@ -2373,7 +2906,7 @@ var components = {
|
|
|
2373
2906
|
MuiBackdrop: {
|
|
2374
2907
|
styleOverrides: {
|
|
2375
2908
|
root: {
|
|
2376
|
-
backgroundColor: "
|
|
2909
|
+
backgroundColor: "transparent"
|
|
2377
2910
|
}
|
|
2378
2911
|
}
|
|
2379
2912
|
},
|
|
@@ -2711,10 +3244,10 @@ var components = {
|
|
|
2711
3244
|
MuiAlert: {
|
|
2712
3245
|
defaultProps: {
|
|
2713
3246
|
iconMapping: {
|
|
2714
|
-
success:
|
|
2715
|
-
error:
|
|
2716
|
-
warning:
|
|
2717
|
-
info:
|
|
3247
|
+
success: React19.createElement(CheckCircleRounded2),
|
|
3248
|
+
error: React19.createElement(ErrorRounded2),
|
|
3249
|
+
warning: React19.createElement(WarningRounded2),
|
|
3250
|
+
info: React19.createElement(InfoRounded2)
|
|
2718
3251
|
}
|
|
2719
3252
|
},
|
|
2720
3253
|
variants: [
|
|
@@ -3551,85 +4084,8 @@ var paletteADC = __spreadValues({
|
|
|
3551
4084
|
}
|
|
3552
4085
|
}, BasicPalette);
|
|
3553
4086
|
|
|
3554
|
-
// node_modules/@mui/system/esm/createBreakpoints/createBreakpoints.js
|
|
3555
|
-
var sortBreakpointsValues = (values) => {
|
|
3556
|
-
const breakpointsAsArray = Object.keys(values).map((key) => ({
|
|
3557
|
-
key,
|
|
3558
|
-
val: values[key]
|
|
3559
|
-
})) || [];
|
|
3560
|
-
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
3561
|
-
return breakpointsAsArray.reduce((acc, obj) => {
|
|
3562
|
-
return __spreadProps(__spreadValues({}, acc), {
|
|
3563
|
-
[obj.key]: obj.val
|
|
3564
|
-
});
|
|
3565
|
-
}, {});
|
|
3566
|
-
};
|
|
3567
|
-
function createBreakpoints(breakpoints2) {
|
|
3568
|
-
const _a = breakpoints2, {
|
|
3569
|
-
values: values = {
|
|
3570
|
-
xs: 0,
|
|
3571
|
-
// phone
|
|
3572
|
-
sm: 600,
|
|
3573
|
-
// tablet
|
|
3574
|
-
md: 900,
|
|
3575
|
-
// small laptop
|
|
3576
|
-
lg: 1200,
|
|
3577
|
-
// desktop
|
|
3578
|
-
xl: 1536
|
|
3579
|
-
// large screen
|
|
3580
|
-
},
|
|
3581
|
-
unit = "px",
|
|
3582
|
-
step = 5
|
|
3583
|
-
} = _a, other = __objRest(_a, [
|
|
3584
|
-
// The breakpoint **start** at this value.
|
|
3585
|
-
// For instance with the first breakpoint xs: [xs, sm).
|
|
3586
|
-
"values",
|
|
3587
|
-
"unit",
|
|
3588
|
-
"step"
|
|
3589
|
-
]);
|
|
3590
|
-
const sortedValues = sortBreakpointsValues(values);
|
|
3591
|
-
const keys = Object.keys(sortedValues);
|
|
3592
|
-
function up(key) {
|
|
3593
|
-
const value = typeof values[key] === "number" ? values[key] : key;
|
|
3594
|
-
return `@media (min-width:${value}${unit})`;
|
|
3595
|
-
}
|
|
3596
|
-
function down(key) {
|
|
3597
|
-
const value = typeof values[key] === "number" ? values[key] : key;
|
|
3598
|
-
return `@media (max-width:${value - step / 100}${unit})`;
|
|
3599
|
-
}
|
|
3600
|
-
function between(start, end) {
|
|
3601
|
-
const endIndex = keys.indexOf(end);
|
|
3602
|
-
return `@media (min-width:${typeof values[start] === "number" ? values[start] : start}${unit}) and (max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === "number" ? values[keys[endIndex]] : end) - step / 100}${unit})`;
|
|
3603
|
-
}
|
|
3604
|
-
function only(key) {
|
|
3605
|
-
if (keys.indexOf(key) + 1 < keys.length) {
|
|
3606
|
-
return between(key, keys[keys.indexOf(key) + 1]);
|
|
3607
|
-
}
|
|
3608
|
-
return up(key);
|
|
3609
|
-
}
|
|
3610
|
-
function not(key) {
|
|
3611
|
-
const keyIndex = keys.indexOf(key);
|
|
3612
|
-
if (keyIndex === 0) {
|
|
3613
|
-
return up(keys[1]);
|
|
3614
|
-
}
|
|
3615
|
-
if (keyIndex === keys.length - 1) {
|
|
3616
|
-
return down(keys[keyIndex]);
|
|
3617
|
-
}
|
|
3618
|
-
return between(key, keys[keys.indexOf(key) + 1]).replace("@media", "@media not all and");
|
|
3619
|
-
}
|
|
3620
|
-
return __spreadValues({
|
|
3621
|
-
keys,
|
|
3622
|
-
values: sortedValues,
|
|
3623
|
-
up,
|
|
3624
|
-
down,
|
|
3625
|
-
between,
|
|
3626
|
-
only,
|
|
3627
|
-
not,
|
|
3628
|
-
unit
|
|
3629
|
-
}, other);
|
|
3630
|
-
}
|
|
3631
|
-
|
|
3632
4087
|
// src/Theme/breakpoints.ts
|
|
4088
|
+
import { createBreakpoints } from "@mui/system";
|
|
3633
4089
|
var breakpoints = createBreakpoints({
|
|
3634
4090
|
values: {
|
|
3635
4091
|
xs: 0,
|
|
@@ -3832,16 +4288,20 @@ var ADCSincoTheme = createTheme(__spreadValues({}, ADCTheme));
|
|
|
3832
4288
|
export {
|
|
3833
4289
|
ADCSincoTheme,
|
|
3834
4290
|
AdproSincoTheme,
|
|
4291
|
+
EmptyState,
|
|
3835
4292
|
FooterAction,
|
|
4293
|
+
MultiSelect,
|
|
3836
4294
|
PageHeader,
|
|
3837
4295
|
SCAutocomplete,
|
|
3838
4296
|
SCCalendarSwipeable,
|
|
3839
4297
|
SCDataGrid,
|
|
4298
|
+
SCDataGridInitial,
|
|
4299
|
+
SCDateRange,
|
|
3840
4300
|
SCDialog,
|
|
3841
4301
|
SCDrawer,
|
|
3842
4302
|
SCMenu,
|
|
3843
4303
|
SCModal,
|
|
3844
|
-
|
|
4304
|
+
SCSelect,
|
|
3845
4305
|
SCTabs,
|
|
3846
4306
|
SCTextArea,
|
|
3847
4307
|
SCTextField,
|
|
@@ -3859,14 +4319,4 @@ export {
|
|
|
3859
4319
|
useMultiSelectHandlers,
|
|
3860
4320
|
useProgress
|
|
3861
4321
|
};
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
@mui/system/esm/index.js:
|
|
3865
|
-
(**
|
|
3866
|
-
* @mui/system v7.1.1
|
|
3867
|
-
*
|
|
3868
|
-
* @license MIT
|
|
3869
|
-
* This source code is licensed under the MIT license found in the
|
|
3870
|
-
* LICENSE file in the root directory of this source tree.
|
|
3871
|
-
*)
|
|
3872
|
-
*/
|
|
4322
|
+
//# sourceMappingURL=index.js.map
|