componentes-sinco 1.1.43 → 1.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +105 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +85 -36
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -640,6 +640,28 @@ interface SCDialogProps {
|
|
|
640
640
|
}
|
|
641
641
|
declare const SCDialog: ({ title, iconTitle, subtitle, content, actions, buttonDialog, disableClose, dividers, widthContent, heightContent, background, typeView, setShow, show }: SCDialogProps) => React__default.JSX.Element;
|
|
642
642
|
|
|
643
|
+
interface ColumnDef {
|
|
644
|
+
field: string;
|
|
645
|
+
type?: 'number' | 'string' | 'boolean' | 'date' | 'dateTime';
|
|
646
|
+
headerName?: string;
|
|
647
|
+
valueGetter?: (value: any) => any;
|
|
648
|
+
renderCell?: (value: any) => any;
|
|
649
|
+
}
|
|
650
|
+
interface DownloadButtonProps {
|
|
651
|
+
text?: string;
|
|
652
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
653
|
+
variant?: 'text' | 'outlined' | 'contained';
|
|
654
|
+
disabled?: boolean;
|
|
655
|
+
size?: 'small' | 'medium' | 'large';
|
|
656
|
+
}
|
|
657
|
+
interface SCDownloadExcelTableProps {
|
|
658
|
+
downloadButton?: DownloadButtonProps;
|
|
659
|
+
fileName?: string;
|
|
660
|
+
data?: Record<string, any>[];
|
|
661
|
+
columns?: ColumnDef[];
|
|
662
|
+
}
|
|
663
|
+
declare const SCDownloadExcelTable: ({ downloadButton, fileName, data, columns, }: SCDownloadExcelTableProps) => React__default.JSX.Element;
|
|
664
|
+
|
|
643
665
|
interface Option$2 {
|
|
644
666
|
title?: string;
|
|
645
667
|
subtitle?: any;
|
|
@@ -758,4 +780,4 @@ declare const SincoTheme: _mui_material_styles.Theme;
|
|
|
758
780
|
declare let AdproSincoTheme: _mui_material_styles.Theme;
|
|
759
781
|
declare let ADCSincoTheme: _mui_material_styles.Theme;
|
|
760
782
|
|
|
761
|
-
export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAlert, SCAppBar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDatePicker, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCSnackBar, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SCZoom, SincoTheme, StopEvent, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
|
|
783
|
+
export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAlert, SCAppBar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDatePicker, SCDateRange, SCDialog, SCDownloadExcelTable, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCSnackBar, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SCZoom, SincoTheme, StopEvent, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
|
package/dist/index.d.ts
CHANGED
|
@@ -640,6 +640,28 @@ interface SCDialogProps {
|
|
|
640
640
|
}
|
|
641
641
|
declare const SCDialog: ({ title, iconTitle, subtitle, content, actions, buttonDialog, disableClose, dividers, widthContent, heightContent, background, typeView, setShow, show }: SCDialogProps) => React__default.JSX.Element;
|
|
642
642
|
|
|
643
|
+
interface ColumnDef {
|
|
644
|
+
field: string;
|
|
645
|
+
type?: 'number' | 'string' | 'boolean' | 'date' | 'dateTime';
|
|
646
|
+
headerName?: string;
|
|
647
|
+
valueGetter?: (value: any) => any;
|
|
648
|
+
renderCell?: (value: any) => any;
|
|
649
|
+
}
|
|
650
|
+
interface DownloadButtonProps {
|
|
651
|
+
text?: string;
|
|
652
|
+
color?: 'inherit' | 'primary' | 'secondary' | 'success' | 'error' | 'info' | 'warning';
|
|
653
|
+
variant?: 'text' | 'outlined' | 'contained';
|
|
654
|
+
disabled?: boolean;
|
|
655
|
+
size?: 'small' | 'medium' | 'large';
|
|
656
|
+
}
|
|
657
|
+
interface SCDownloadExcelTableProps {
|
|
658
|
+
downloadButton?: DownloadButtonProps;
|
|
659
|
+
fileName?: string;
|
|
660
|
+
data?: Record<string, any>[];
|
|
661
|
+
columns?: ColumnDef[];
|
|
662
|
+
}
|
|
663
|
+
declare const SCDownloadExcelTable: ({ downloadButton, fileName, data, columns, }: SCDownloadExcelTableProps) => React__default.JSX.Element;
|
|
664
|
+
|
|
643
665
|
interface Option$2 {
|
|
644
666
|
title?: string;
|
|
645
667
|
subtitle?: any;
|
|
@@ -758,4 +780,4 @@ declare const SincoTheme: _mui_material_styles.Theme;
|
|
|
758
780
|
declare let AdproSincoTheme: _mui_material_styles.Theme;
|
|
759
781
|
declare let ADCSincoTheme: _mui_material_styles.Theme;
|
|
760
782
|
|
|
761
|
-
export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAlert, SCAppBar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDatePicker, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCSnackBar, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SCZoom, SincoTheme, StopEvent, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
|
|
783
|
+
export { ADCSincoTheme, AdproSincoTheme, Attachment, AttachmentMobile, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyButtonVariants, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyAnchorPositions, type RepplySizeVariants, SCActivityCalendar, SCAlert, SCAppBar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDatePicker, SCDateRange, SCDialog, SCDownloadExcelTable, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCSnackBar, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SCZoom, SincoTheme, StopEvent, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
|
package/dist/index.js
CHANGED
|
@@ -5640,8 +5640,56 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5640
5640
|
)));
|
|
5641
5641
|
};
|
|
5642
5642
|
|
|
5643
|
-
// src/Components/
|
|
5643
|
+
// src/Components/SCDownloadExcelTable.tsx
|
|
5644
5644
|
import React45 from "react";
|
|
5645
|
+
import { Button as Button20 } from "@mui/material";
|
|
5646
|
+
import FileDownloadOutlinedIcon2 from "@mui/icons-material/FileDownloadOutlined";
|
|
5647
|
+
import * as XLSX from "xlsx";
|
|
5648
|
+
var SCDownloadExcelTable = ({
|
|
5649
|
+
downloadButton,
|
|
5650
|
+
fileName = "archivo excel",
|
|
5651
|
+
data = [],
|
|
5652
|
+
columns = []
|
|
5653
|
+
}) => {
|
|
5654
|
+
const formatValue = (value, type) => {
|
|
5655
|
+
if (value === null || value === void 0) return "";
|
|
5656
|
+
if (type === "boolean") return value ? "S\xED" : "No";
|
|
5657
|
+
if ((type === "date" || type === "dateTime") && value instanceof Date)
|
|
5658
|
+
return value.toLocaleString("es-CO");
|
|
5659
|
+
if ((type === "date" || type === "dateTime") && typeof value === "string")
|
|
5660
|
+
return new Date(value).toLocaleString("es-CO");
|
|
5661
|
+
return value;
|
|
5662
|
+
};
|
|
5663
|
+
const descargaExcel = () => {
|
|
5664
|
+
const headers = columns.map((col) => col.field == "" ? "" : col.headerName);
|
|
5665
|
+
const rows = data.map(
|
|
5666
|
+
(row) => columns.map((col) => {
|
|
5667
|
+
const raw = row[col.field];
|
|
5668
|
+
const resolved = col.valueGetter ? col.valueGetter(raw) : raw;
|
|
5669
|
+
return formatValue(resolved, col.type);
|
|
5670
|
+
})
|
|
5671
|
+
);
|
|
5672
|
+
const worksheet = XLSX.utils.aoa_to_sheet([headers, ...rows]);
|
|
5673
|
+
const workbook = XLSX.utils.book_new();
|
|
5674
|
+
XLSX.utils.book_append_sheet(workbook, worksheet, "Hoja1");
|
|
5675
|
+
XLSX.writeFile(workbook, `${fileName}.xlsx`);
|
|
5676
|
+
};
|
|
5677
|
+
return /* @__PURE__ */ React45.createElement(
|
|
5678
|
+
Button20,
|
|
5679
|
+
{
|
|
5680
|
+
onClick: descargaExcel,
|
|
5681
|
+
startIcon: /* @__PURE__ */ React45.createElement(FileDownloadOutlinedIcon2, null),
|
|
5682
|
+
size: (downloadButton == null ? void 0 : downloadButton.size) || "small",
|
|
5683
|
+
color: (downloadButton == null ? void 0 : downloadButton.color) || "primary",
|
|
5684
|
+
variant: (downloadButton == null ? void 0 : downloadButton.variant) || "text",
|
|
5685
|
+
disabled: (downloadButton == null ? void 0 : downloadButton.disabled) || data.length === 0
|
|
5686
|
+
},
|
|
5687
|
+
(downloadButton == null ? void 0 : downloadButton.text) || "Descargar Excel"
|
|
5688
|
+
);
|
|
5689
|
+
};
|
|
5690
|
+
|
|
5691
|
+
// src/Components/SCMenu.tsx
|
|
5692
|
+
import React46 from "react";
|
|
5645
5693
|
import { Box as Box27, Typography as Typography26, Paper as Paper5, Divider as Divider8, MenuList as MenuList3, MenuItem as MenuItem9, ListItemIcon as ListItemIcon7, SvgIcon as SvgIcon11 } from "@mui/material";
|
|
5646
5694
|
import Grid12 from "@mui/material/Grid";
|
|
5647
5695
|
|
|
@@ -5674,12 +5722,12 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5674
5722
|
const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
|
|
5675
5723
|
const widthContainer = menuSize + pageSize;
|
|
5676
5724
|
let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
5677
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5678
|
-
const [value, setValue] =
|
|
5679
|
-
|
|
5725
|
+
const [selectedIndex, setSelectedIndex] = React46.useState("1");
|
|
5726
|
+
const [value, setValue] = React46.useState("1");
|
|
5727
|
+
React46.useEffect(() => {
|
|
5680
5728
|
heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
5681
5729
|
}, [height]);
|
|
5682
|
-
|
|
5730
|
+
React46.useEffect(() => {
|
|
5683
5731
|
if (defaultOption) {
|
|
5684
5732
|
handleClickMenusItem(event, void 0);
|
|
5685
5733
|
}
|
|
@@ -5709,7 +5757,7 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5709
5757
|
setValue(String(index + 1));
|
|
5710
5758
|
}
|
|
5711
5759
|
};
|
|
5712
|
-
return /* @__PURE__ */
|
|
5760
|
+
return /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(Grid12, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ React46.createElement(Paper5, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ React46.createElement(MenuList3, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(
|
|
5713
5761
|
MenuItem9,
|
|
5714
5762
|
{
|
|
5715
5763
|
disabled: disable == true ? true : false,
|
|
@@ -5717,13 +5765,13 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5717
5765
|
selected: String(index + 1) === selectedIndex,
|
|
5718
5766
|
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
5719
5767
|
},
|
|
5720
|
-
option.iconLeft ? /* @__PURE__ */
|
|
5721
|
-
/* @__PURE__ */
|
|
5722
|
-
), option.divider == true ? /* @__PURE__ */
|
|
5768
|
+
option.iconLeft ? /* @__PURE__ */ React46.createElement(ListItemIcon7, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React46.createElement(SvgIcon11, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
5769
|
+
/* @__PURE__ */ React46.createElement(Grid12, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React46.createElement(Typography26, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React46.createElement(ListItemIcon7, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React46.createElement(SvgIcon11, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
5770
|
+
), option.divider == true ? /* @__PURE__ */ React46.createElement(Divider8, null) : "")))), /* @__PURE__ */ React46.createElement(Grid12, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React46.createElement(Box27, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React46.createElement(Typography26, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
5723
5771
|
};
|
|
5724
5772
|
|
|
5725
5773
|
// src/Components/SCSnackBar.tsx
|
|
5726
|
-
import
|
|
5774
|
+
import React47 from "react";
|
|
5727
5775
|
import MuiAlert from "@mui/material/Alert";
|
|
5728
5776
|
import "dayjs/locale/es";
|
|
5729
5777
|
import Snackbar from "@mui/material/Snackbar";
|
|
@@ -5744,7 +5792,7 @@ var SCSnackBar = ({
|
|
|
5744
5792
|
}
|
|
5745
5793
|
setOpenState(false);
|
|
5746
5794
|
};
|
|
5747
|
-
return /* @__PURE__ */
|
|
5795
|
+
return /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
|
|
5748
5796
|
Snackbar,
|
|
5749
5797
|
__spreadProps(__spreadValues({
|
|
5750
5798
|
anchorOrigin: { vertical: posicionVertical, horizontal: posicionHorizontal },
|
|
@@ -5753,7 +5801,7 @@ var SCSnackBar = ({
|
|
|
5753
5801
|
}, close ? { onClose: handleClose } : {}), {
|
|
5754
5802
|
sx: { zIndex: 2e3 }
|
|
5755
5803
|
}),
|
|
5756
|
-
/* @__PURE__ */
|
|
5804
|
+
/* @__PURE__ */ React47.createElement(
|
|
5757
5805
|
MuiAlert,
|
|
5758
5806
|
__spreadProps(__spreadValues({}, close ? { onClose: handleClose } : {}), {
|
|
5759
5807
|
severity: type,
|
|
@@ -5765,19 +5813,19 @@ var SCSnackBar = ({
|
|
|
5765
5813
|
};
|
|
5766
5814
|
|
|
5767
5815
|
// src/Components/SCTabs.tsx
|
|
5768
|
-
import
|
|
5816
|
+
import React48, { useEffect as useEffect21 } from "react";
|
|
5769
5817
|
import { Typography as Typography27, Box as Box28, SvgIcon as SvgIcon12, Tab as Tab3, Tabs as Tabs3, Badge as Badge3 } from "@mui/material";
|
|
5770
5818
|
import TabPanel from "@mui/lab/TabPanel";
|
|
5771
5819
|
import TabContext from "@mui/lab/TabContext";
|
|
5772
5820
|
import * as Muicon11 from "@mui/icons-material";
|
|
5773
5821
|
var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
|
|
5774
|
-
const [toast, setToast] =
|
|
5822
|
+
const [toast, setToast] = React48.useState(null);
|
|
5775
5823
|
let i = 0;
|
|
5776
5824
|
let j = 0;
|
|
5777
5825
|
let k = 0;
|
|
5778
5826
|
let l = 0;
|
|
5779
5827
|
let validateTypeIcon = true;
|
|
5780
|
-
const [value, setValue] =
|
|
5828
|
+
const [value, setValue] = React48.useState("1");
|
|
5781
5829
|
useEffect21(() => {
|
|
5782
5830
|
if (defaultOption) {
|
|
5783
5831
|
handleChange(event, void 0);
|
|
@@ -5828,7 +5876,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5828
5876
|
setValue(newValue);
|
|
5829
5877
|
}
|
|
5830
5878
|
};
|
|
5831
|
-
return /* @__PURE__ */
|
|
5879
|
+
return /* @__PURE__ */ React48.createElement(React48.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ React48.createElement(Box28, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ React48.createElement(TabContext, { value }, /* @__PURE__ */ React48.createElement(
|
|
5832
5880
|
Tabs3,
|
|
5833
5881
|
{
|
|
5834
5882
|
"data-testid": "tab-container",
|
|
@@ -5842,7 +5890,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5842
5890
|
orientation: orientation || "horizontal",
|
|
5843
5891
|
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
5844
5892
|
},
|
|
5845
|
-
options.map((option) => /* @__PURE__ */
|
|
5893
|
+
options.map((option) => /* @__PURE__ */ React48.createElement(
|
|
5846
5894
|
Tab3,
|
|
5847
5895
|
{
|
|
5848
5896
|
"data-testid": "tab-item",
|
|
@@ -5851,7 +5899,7 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5851
5899
|
label: option.name || "",
|
|
5852
5900
|
disabled: option.disabled || false,
|
|
5853
5901
|
iconPosition: iconPosition || "end",
|
|
5854
|
-
icon: typeIcon == "badge" ? /* @__PURE__ */
|
|
5902
|
+
icon: typeIcon == "badge" ? /* @__PURE__ */ React48.createElement(
|
|
5855
5903
|
Badge3,
|
|
5856
5904
|
{
|
|
5857
5905
|
sx: {
|
|
@@ -5866,23 +5914,23 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5866
5914
|
badgeContent: option.iconOrBadge,
|
|
5867
5915
|
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
5868
5916
|
}
|
|
5869
|
-
) : typeIcon == "icon" ? /* @__PURE__ */
|
|
5917
|
+
) : typeIcon == "icon" ? /* @__PURE__ */ React48.createElement(SvgIcon12, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
|
|
5870
5918
|
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
5871
5919
|
}
|
|
5872
5920
|
))
|
|
5873
|
-
), children, options.map((option) => /* @__PURE__ */
|
|
5921
|
+
), children, options.map((option) => /* @__PURE__ */ React48.createElement(
|
|
5874
5922
|
TabPanel,
|
|
5875
5923
|
{
|
|
5876
5924
|
key: k = k + 1,
|
|
5877
5925
|
value: String(l = l + 1),
|
|
5878
5926
|
sx: { padding: "16px" }
|
|
5879
5927
|
},
|
|
5880
|
-
option.page ? option.page : /* @__PURE__ */
|
|
5881
|
-
)))) : /* @__PURE__ */
|
|
5928
|
+
option.page ? option.page : /* @__PURE__ */ React48.createElement(Typography27, null, "No se ha configurado el componente a visualizar ")
|
|
5929
|
+
)))) : /* @__PURE__ */ React48.createElement(Box28, { sx: { height: "200px" } }, toast && /* @__PURE__ */ React48.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
5882
5930
|
};
|
|
5883
5931
|
|
|
5884
5932
|
// src/Components/SCTime.tsx
|
|
5885
|
-
import
|
|
5933
|
+
import React49, { useState as useState27 } from "react";
|
|
5886
5934
|
import { Box as Box29, InputAdornment as InputAdornment6, Popover as Popover8, ClickAwayListener as ClickAwayListener3 } from "@mui/material";
|
|
5887
5935
|
import { LocalizationProvider as LocalizationProvider5 } from "@mui/x-date-pickers/LocalizationProvider";
|
|
5888
5936
|
import { AdapterDayjs as AdapterDayjs3 } from "@mui/x-date-pickers/AdapterDayjs";
|
|
@@ -5943,7 +5991,7 @@ var SCTime = ({
|
|
|
5943
5991
|
setIsOpenPopover(false);
|
|
5944
5992
|
setAnchorEl(null);
|
|
5945
5993
|
};
|
|
5946
|
-
return /* @__PURE__ */
|
|
5994
|
+
return /* @__PURE__ */ React49.createElement(LocalizationProvider5, { dateAdapter: AdapterDayjs3 }, /* @__PURE__ */ React49.createElement(Box29, { sx: { position: "relative", minWidth: "120px", width: width ? `${width}%` : "99%" } }, /* @__PURE__ */ React49.createElement(
|
|
5947
5995
|
TimeField,
|
|
5948
5996
|
{
|
|
5949
5997
|
label,
|
|
@@ -5955,7 +6003,7 @@ var SCTime = ({
|
|
|
5955
6003
|
slotProps: {
|
|
5956
6004
|
textField: {
|
|
5957
6005
|
InputProps: {
|
|
5958
|
-
endAdornment: /* @__PURE__ */
|
|
6006
|
+
endAdornment: /* @__PURE__ */ React49.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React49.createElement(
|
|
5959
6007
|
AccessTimeIcon,
|
|
5960
6008
|
{
|
|
5961
6009
|
color: disabled ? "disabled" : "action",
|
|
@@ -5984,7 +6032,7 @@ var SCTime = ({
|
|
|
5984
6032
|
}
|
|
5985
6033
|
}
|
|
5986
6034
|
}
|
|
5987
|
-
), /* @__PURE__ */
|
|
6035
|
+
), /* @__PURE__ */ React49.createElement(
|
|
5988
6036
|
Popover8,
|
|
5989
6037
|
{
|
|
5990
6038
|
open: isOpenPopover,
|
|
@@ -6015,7 +6063,7 @@ var SCTime = ({
|
|
|
6015
6063
|
}
|
|
6016
6064
|
}
|
|
6017
6065
|
},
|
|
6018
|
-
/* @__PURE__ */
|
|
6066
|
+
/* @__PURE__ */ React49.createElement(ClickAwayListener3, { onClickAway: handleClose }, /* @__PURE__ */ React49.createElement(Box29, { sx: { p: 0 } }, /* @__PURE__ */ React49.createElement(
|
|
6019
6067
|
DigitalClock,
|
|
6020
6068
|
{
|
|
6021
6069
|
value: state,
|
|
@@ -6038,7 +6086,7 @@ var SCTime = ({
|
|
|
6038
6086
|
};
|
|
6039
6087
|
|
|
6040
6088
|
// src/Components/SCZoom.tsx
|
|
6041
|
-
import
|
|
6089
|
+
import React50, { useState as useState28 } from "react";
|
|
6042
6090
|
import { Typography as Typography29, Divider as Divider9, IconButton as IconButton18, Box as Box30 } from "@mui/material";
|
|
6043
6091
|
import Grid13 from "@mui/material/Grid";
|
|
6044
6092
|
import ZoomOutIcon from "@mui/icons-material/ZoomOut";
|
|
@@ -6055,7 +6103,7 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6055
6103
|
const handleReset = () => {
|
|
6056
6104
|
setZoom(1);
|
|
6057
6105
|
};
|
|
6058
|
-
return /* @__PURE__ */
|
|
6106
|
+
return /* @__PURE__ */ React50.createElement(Box30, { style: { width: width || "280px", height: height || "280px" } }, /* @__PURE__ */ React50.createElement(
|
|
6059
6107
|
Box30,
|
|
6060
6108
|
{
|
|
6061
6109
|
sx: {
|
|
@@ -6065,7 +6113,7 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6065
6113
|
height: height || "340px"
|
|
6066
6114
|
}
|
|
6067
6115
|
},
|
|
6068
|
-
/* @__PURE__ */
|
|
6116
|
+
/* @__PURE__ */ React50.createElement(
|
|
6069
6117
|
"img",
|
|
6070
6118
|
{
|
|
6071
6119
|
src: image,
|
|
@@ -6077,14 +6125,14 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6077
6125
|
}
|
|
6078
6126
|
}
|
|
6079
6127
|
)
|
|
6080
|
-
), /* @__PURE__ */
|
|
6128
|
+
), /* @__PURE__ */ React50.createElement(Grid13, { container: true, flexWrap: "nowrap", alignItems: "center", gap: 1, sx: { position: "relative", bottom: bottom != null ? bottom : `calc(100% - 87%)`, left: left != null ? left : `calc(100% - 72%)`, zIndex: 1, width: "147px", borderRadius: "4px", padding: "4px 12px", border: bottom ? "0px" : "1px solid #0000001F", background: "white", boxShadow: bottom ? "" : "2px 3px 5px 0px #18274B33" } }, /* @__PURE__ */ React50.createElement(Grid13, { container: true, alignItems: "center", justifyContent: "center", flexWrap: "nowrap", gap: 0.5, sx: { width: "84px" } }, /* @__PURE__ */ React50.createElement(IconButton18, { onClick: handleZoomOut, disabled: zoom <= 0.5, size: "small" }, /* @__PURE__ */ React50.createElement(ZoomOutIcon, { color: "action", fontSize: "small" })), /* @__PURE__ */ React50.createElement(Typography29, { variant: "body2", color: "textSecondary" }, Math.round(zoom * 100), "%"), /* @__PURE__ */ React50.createElement(IconButton18, { onClick: handleZoomIn, disabled: zoom >= 3, color: "primary", size: "small" }, /* @__PURE__ */ React50.createElement(ZoomInIcon, { color: "action", fontSize: "small" }))), /* @__PURE__ */ React50.createElement(Divider9, { orientation: "vertical", sx: { width: "1px", height: "16px" } }), /* @__PURE__ */ React50.createElement(IconButton18, { onClick: handleReset, color: "primary", size: "small" }, /* @__PURE__ */ React50.createElement(RotateRightIcon, { color: "action", fontSize: "small" }))));
|
|
6081
6129
|
};
|
|
6082
6130
|
|
|
6083
6131
|
// src/Theme/index.ts
|
|
6084
6132
|
import { createTheme } from "@mui/material/styles";
|
|
6085
6133
|
|
|
6086
6134
|
// src/Theme/components.ts
|
|
6087
|
-
import
|
|
6135
|
+
import React51 from "react";
|
|
6088
6136
|
import {
|
|
6089
6137
|
InfoRounded as InfoRounded2,
|
|
6090
6138
|
CheckCircleRounded as CheckCircleRounded2,
|
|
@@ -6788,10 +6836,10 @@ var components = {
|
|
|
6788
6836
|
MuiAlert: {
|
|
6789
6837
|
defaultProps: {
|
|
6790
6838
|
iconMapping: {
|
|
6791
|
-
success:
|
|
6792
|
-
error:
|
|
6793
|
-
warning:
|
|
6794
|
-
info:
|
|
6839
|
+
success: React51.createElement(CheckCircleRounded2),
|
|
6840
|
+
error: React51.createElement(ErrorRounded2),
|
|
6841
|
+
warning: React51.createElement(WarningRounded2),
|
|
6842
|
+
info: React51.createElement(InfoRounded2)
|
|
6795
6843
|
}
|
|
6796
6844
|
},
|
|
6797
6845
|
variants: [
|
|
@@ -7853,6 +7901,7 @@ export {
|
|
|
7853
7901
|
SCDatePicker,
|
|
7854
7902
|
SCDateRange,
|
|
7855
7903
|
SCDialog,
|
|
7904
|
+
SCDownloadExcelTable,
|
|
7856
7905
|
SCDrawer,
|
|
7857
7906
|
SCListContent,
|
|
7858
7907
|
SCMenu,
|