componentes-sinco 1.2.7 → 1.2.8
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 +41 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -13
- package/dist/index.d.ts +8 -13
- package/dist/index.js +46 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -69,9 +69,10 @@ interface AttachmentMobileProps<T> {
|
|
|
69
69
|
downloadAction?: (file: UploadedFile) => Promise<void> | void;
|
|
70
70
|
view?: 'file' | 'button';
|
|
71
71
|
iconFileItem?: any | React.ReactNode | React.ReactElement | React.ElementType | null;
|
|
72
|
+
onFileClick?: (file: UploadedFile) => void;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
declare const AttachmentMobile: ({ buttonAttachment, maxSize, fileAccepted, initialFiles, deleteAction, downloadAction, onChange, children, sx, view, iconFileItem, }: AttachmentMobileProps<any>) => React__default.JSX.Element;
|
|
75
|
+
declare const AttachmentMobile: ({ buttonAttachment, maxSize, fileAccepted, initialFiles, deleteAction, downloadAction, onChange, children, sx, view, iconFileItem, onFileClick, }: AttachmentMobileProps<any>) => React__default.JSX.Element;
|
|
75
76
|
|
|
76
77
|
type CalendarView = 'month' | 'week' | 'day';
|
|
77
78
|
type EventState = 'En progreso' | 'Finalizada' | 'Vencida' | 'Asignada' | 'Aplazada' | 'Generada';
|
|
@@ -547,21 +548,15 @@ interface SCCardProps {
|
|
|
547
548
|
title?: string;
|
|
548
549
|
subtitle?: string;
|
|
549
550
|
iconTitle?: React__default.ReactNode | React__default.ReactElement | keyof typeof Muicon;
|
|
550
|
-
actionsTitle?: any;
|
|
551
|
+
actionsTitle?: any | "expand";
|
|
552
|
+
dividerHeader?: boolean;
|
|
551
553
|
image?: any;
|
|
552
554
|
content?: any;
|
|
553
|
-
actions?:
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
disabled?: boolean;
|
|
557
|
-
}[];
|
|
558
|
-
expand?: {
|
|
559
|
-
type?: 'icon' | 'text';
|
|
560
|
-
position?: 'top' | 'bottom';
|
|
561
|
-
content?: string;
|
|
562
|
-
};
|
|
555
|
+
actions?: any;
|
|
556
|
+
dividerActions?: boolean;
|
|
557
|
+
contentExpand?: any;
|
|
563
558
|
}
|
|
564
|
-
declare const SCCard: ({ width, title, image, iconTitle, actionsTitle, subtitle, content, actions,
|
|
559
|
+
declare const SCCard: ({ width, title, image, iconTitle, actionsTitle, subtitle, dividerHeader, content, actions, dividerActions, contentExpand }: SCCardProps) => React__default.JSX.Element;
|
|
565
560
|
|
|
566
561
|
interface SCDataGridInitialProps<T> {
|
|
567
562
|
data: T[];
|
package/dist/index.d.ts
CHANGED
|
@@ -69,9 +69,10 @@ interface AttachmentMobileProps<T> {
|
|
|
69
69
|
downloadAction?: (file: UploadedFile) => Promise<void> | void;
|
|
70
70
|
view?: 'file' | 'button';
|
|
71
71
|
iconFileItem?: any | React.ReactNode | React.ReactElement | React.ElementType | null;
|
|
72
|
+
onFileClick?: (file: UploadedFile) => void;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
declare const AttachmentMobile: ({ buttonAttachment, maxSize, fileAccepted, initialFiles, deleteAction, downloadAction, onChange, children, sx, view, iconFileItem, }: AttachmentMobileProps<any>) => React__default.JSX.Element;
|
|
75
|
+
declare const AttachmentMobile: ({ buttonAttachment, maxSize, fileAccepted, initialFiles, deleteAction, downloadAction, onChange, children, sx, view, iconFileItem, onFileClick, }: AttachmentMobileProps<any>) => React__default.JSX.Element;
|
|
75
76
|
|
|
76
77
|
type CalendarView = 'month' | 'week' | 'day';
|
|
77
78
|
type EventState = 'En progreso' | 'Finalizada' | 'Vencida' | 'Asignada' | 'Aplazada' | 'Generada';
|
|
@@ -547,21 +548,15 @@ interface SCCardProps {
|
|
|
547
548
|
title?: string;
|
|
548
549
|
subtitle?: string;
|
|
549
550
|
iconTitle?: React__default.ReactNode | React__default.ReactElement | keyof typeof Muicon;
|
|
550
|
-
actionsTitle?: any;
|
|
551
|
+
actionsTitle?: any | "expand";
|
|
552
|
+
dividerHeader?: boolean;
|
|
551
553
|
image?: any;
|
|
552
554
|
content?: any;
|
|
553
|
-
actions?:
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
disabled?: boolean;
|
|
557
|
-
}[];
|
|
558
|
-
expand?: {
|
|
559
|
-
type?: 'icon' | 'text';
|
|
560
|
-
position?: 'top' | 'bottom';
|
|
561
|
-
content?: string;
|
|
562
|
-
};
|
|
555
|
+
actions?: any;
|
|
556
|
+
dividerActions?: boolean;
|
|
557
|
+
contentExpand?: any;
|
|
563
558
|
}
|
|
564
|
-
declare const SCCard: ({ width, title, image, iconTitle, actionsTitle, subtitle, content, actions,
|
|
559
|
+
declare const SCCard: ({ width, title, image, iconTitle, actionsTitle, subtitle, dividerHeader, content, actions, dividerActions, contentExpand }: SCCardProps) => React__default.JSX.Element;
|
|
565
560
|
|
|
566
561
|
interface SCDataGridInitialProps<T> {
|
|
567
562
|
data: T[];
|
package/dist/index.js
CHANGED
|
@@ -831,7 +831,8 @@ var AttachmentMobile = ({
|
|
|
831
831
|
children,
|
|
832
832
|
sx,
|
|
833
833
|
view = "button",
|
|
834
|
-
iconFileItem
|
|
834
|
+
iconFileItem,
|
|
835
|
+
onFileClick
|
|
835
836
|
}) => {
|
|
836
837
|
const webcamRef = useRef2(null);
|
|
837
838
|
const [abrirCamara, setAbrirCamara] = useState5(false);
|
|
@@ -1158,31 +1159,43 @@ var AttachmentMobile = ({
|
|
|
1158
1159
|
}
|
|
1159
1160
|
}
|
|
1160
1161
|
},
|
|
1161
|
-
/* @__PURE__ */ React6.createElement(
|
|
1162
|
-
|
|
1163
|
-
{
|
|
1164
|
-
color: file.uploadError ? "error" : "primary",
|
|
1165
|
-
fontSize: "small"
|
|
1166
|
-
}
|
|
1167
|
-
), /* @__PURE__ */ React6.createElement(Stack4, { width: "100%" }, /* @__PURE__ */ React6.createElement(
|
|
1168
|
-
Typography4,
|
|
1169
|
-
{
|
|
1170
|
-
variant: "body2",
|
|
1171
|
-
color: "text.primary",
|
|
1172
|
-
whiteSpace: "nowrap",
|
|
1173
|
-
overflow: "hidden",
|
|
1174
|
-
textOverflow: "ellipsis",
|
|
1175
|
-
maxWidth: "310px"
|
|
1176
|
-
},
|
|
1177
|
-
file.name
|
|
1178
|
-
), /* @__PURE__ */ React6.createElement(
|
|
1179
|
-
Typography4,
|
|
1162
|
+
/* @__PURE__ */ React6.createElement(
|
|
1163
|
+
Stack4,
|
|
1180
1164
|
{
|
|
1181
|
-
|
|
1182
|
-
|
|
1165
|
+
direction: "row",
|
|
1166
|
+
alignItems: "center",
|
|
1167
|
+
gap: 1,
|
|
1168
|
+
width: "100%",
|
|
1169
|
+
onClick: () => onFileClick == null ? void 0 : onFileClick(file),
|
|
1170
|
+
sx: { cursor: onFileClick ? "pointer" : "default" }
|
|
1183
1171
|
},
|
|
1184
|
-
|
|
1185
|
-
|
|
1172
|
+
iconFileItem ? /* @__PURE__ */ React6.createElement(SvgIcon2, { color: file.uploadError ? "error" : "primary", fontSize: "small", component: IconFileItem }) : /* @__PURE__ */ React6.createElement(
|
|
1173
|
+
UploadFileOutlined2,
|
|
1174
|
+
{
|
|
1175
|
+
color: file.uploadError ? "error" : "primary",
|
|
1176
|
+
fontSize: "small"
|
|
1177
|
+
}
|
|
1178
|
+
),
|
|
1179
|
+
/* @__PURE__ */ React6.createElement(Stack4, { width: "100%" }, /* @__PURE__ */ React6.createElement(
|
|
1180
|
+
Typography4,
|
|
1181
|
+
{
|
|
1182
|
+
variant: "body2",
|
|
1183
|
+
color: "text.primary",
|
|
1184
|
+
whiteSpace: "nowrap",
|
|
1185
|
+
overflow: "hidden",
|
|
1186
|
+
textOverflow: "ellipsis",
|
|
1187
|
+
maxWidth: "310px"
|
|
1188
|
+
},
|
|
1189
|
+
file.name
|
|
1190
|
+
), /* @__PURE__ */ React6.createElement(
|
|
1191
|
+
Typography4,
|
|
1192
|
+
{
|
|
1193
|
+
variant: "caption",
|
|
1194
|
+
color: file.uploadError ? "error" : "text.secondary"
|
|
1195
|
+
},
|
|
1196
|
+
file.uploadError && file.size / (1024 * 1024) > maxSize ? "Archivo super\xF3 el l\xEDmite \u2022 Carga fallida" : file.uploadError ? "Archivo duplicado o inv\xE1lido \u2022 Carga fallida" : `${(file.size / (1024 * 1024)).toFixed(2)}MB \u2022 ${file.type}`
|
|
1197
|
+
))
|
|
1198
|
+
),
|
|
1186
1199
|
view == "file" ? /* @__PURE__ */ React6.createElement(Tooltip2, { title: "Descargar" }, /* @__PURE__ */ React6.createElement(
|
|
1187
1200
|
IconButton4,
|
|
1188
1201
|
{
|
|
@@ -4970,7 +4983,7 @@ var SCCalendarSwipeable = ({
|
|
|
4970
4983
|
|
|
4971
4984
|
// src/Components/SCCard.tsx
|
|
4972
4985
|
import React42 from "react";
|
|
4973
|
-
import {
|
|
4986
|
+
import { Divider as Divider8, Box as Box26, SvgIcon as SvgIcon9 } from "@mui/material";
|
|
4974
4987
|
import IconButton16 from "@mui/material/IconButton";
|
|
4975
4988
|
import Card2 from "@mui/material/Card";
|
|
4976
4989
|
import CardHeader from "@mui/material/CardHeader";
|
|
@@ -4980,7 +4993,7 @@ import CardActions from "@mui/material/CardActions";
|
|
|
4980
4993
|
import Collapse2 from "@mui/material/Collapse";
|
|
4981
4994
|
import ExpandMoreIcon2 from "@mui/icons-material/ExpandMore";
|
|
4982
4995
|
import * as Muicon8 from "@mui/icons-material";
|
|
4983
|
-
var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content, actions,
|
|
4996
|
+
var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, dividerHeader, content, actions, dividerActions, contentExpand }) => {
|
|
4984
4997
|
let iconTitleValidation = "";
|
|
4985
4998
|
let IconTitle;
|
|
4986
4999
|
const [expanded, setExpanded] = React42.useState(false);
|
|
@@ -5005,7 +5018,7 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
5005
5018
|
CardHeader,
|
|
5006
5019
|
{
|
|
5007
5020
|
avatar: iconTitle ? iconTitleValidation === "image" ? /* @__PURE__ */ React42.createElement(Box26, { sx: { marginRight: "16px", width: "44px", height: "44px", borderRadius: "1px" } }, /* @__PURE__ */ React42.createElement("img", { src: IconTitle, width: "44px", height: "44px" })) : /* @__PURE__ */ React42.createElement(SvgIcon9, { color: "action", fontSize: "small", component: IconTitle, sx: { marginRight: "16px" } }) : void 0,
|
|
5008
|
-
action:
|
|
5021
|
+
action: actionsTitle == "expand" ? /* @__PURE__ */ React42.createElement(IconButton16, { onClick: handleExpandClick, sx: { marginRight: "auto" }, size: "small" }, /* @__PURE__ */ React42.createElement(ExpandMoreIcon2, { fontSize: "small" })) : actionsTitle,
|
|
5009
5022
|
title,
|
|
5010
5023
|
subheader: subtitle,
|
|
5011
5024
|
sx: {
|
|
@@ -5024,25 +5037,14 @@ var SCCard = ({ width, title, image, iconTitle, actionsTitle, subtitle, content,
|
|
|
5024
5037
|
}
|
|
5025
5038
|
}
|
|
5026
5039
|
}
|
|
5027
|
-
), image && /* @__PURE__ */ React42.createElement(
|
|
5040
|
+
), dividerHeader && title && /* @__PURE__ */ React42.createElement(Divider8, { variant: "fullWidth" }), image && /* @__PURE__ */ React42.createElement(
|
|
5028
5041
|
CardMedia,
|
|
5029
5042
|
{
|
|
5030
5043
|
component: "img",
|
|
5031
5044
|
height: "194",
|
|
5032
5045
|
image
|
|
5033
5046
|
}
|
|
5034
|
-
), content && /* @__PURE__ */ React42.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, content),
|
|
5035
|
-
Button18,
|
|
5036
|
-
{
|
|
5037
|
-
key: index,
|
|
5038
|
-
size: "small",
|
|
5039
|
-
color: action.color || "primary",
|
|
5040
|
-
variant: action.variant || "text",
|
|
5041
|
-
onClick: action.fn,
|
|
5042
|
-
disabled: action.disabled || false
|
|
5043
|
-
},
|
|
5044
|
-
action.text
|
|
5045
|
-
)) : ""), expand && /* @__PURE__ */ React42.createElement(Collapse2, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React42.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, expand.content)));
|
|
5047
|
+
), content && /* @__PURE__ */ React42.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, content), dividerActions && /* @__PURE__ */ React42.createElement(Divider8, { variant: "fullWidth" }), actions && /* @__PURE__ */ React42.createElement(CardActions, null, actions), contentExpand && /* @__PURE__ */ React42.createElement(Collapse2, { in: expanded, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React42.createElement(CardContent2, { sx: { padding: "8px 16px !important" } }, contentExpand)));
|
|
5046
5048
|
};
|
|
5047
5049
|
|
|
5048
5050
|
// src/Components/SCDataGrid.tsx
|
|
@@ -5767,7 +5769,7 @@ var SCDownloadExcelTable = ({
|
|
|
5767
5769
|
|
|
5768
5770
|
// src/Components/SCMenu.tsx
|
|
5769
5771
|
import React47 from "react";
|
|
5770
|
-
import { Box as Box28, Typography as Typography27, Paper as Paper5, Divider as
|
|
5772
|
+
import { Box as Box28, Typography as Typography27, Paper as Paper5, Divider as Divider9, MenuList as MenuList3, MenuItem as MenuItem9, ListItemIcon as ListItemIcon7, SvgIcon as SvgIcon11 } from "@mui/material";
|
|
5771
5773
|
import Grid12 from "@mui/material/Grid";
|
|
5772
5774
|
|
|
5773
5775
|
// src/Components/Hooks/useWindowDimensions.ts
|
|
@@ -5844,7 +5846,7 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5844
5846
|
},
|
|
5845
5847
|
option.iconLeft ? /* @__PURE__ */ React47.createElement(ListItemIcon7, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React47.createElement(SvgIcon11, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
5846
5848
|
/* @__PURE__ */ React47.createElement(Grid12, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ React47.createElement(Typography27, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ React47.createElement(ListItemIcon7, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ React47.createElement(SvgIcon11, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
5847
|
-
), option.divider == true ? /* @__PURE__ */ React47.createElement(
|
|
5849
|
+
), option.divider == true ? /* @__PURE__ */ React47.createElement(Divider9, null) : "")))), /* @__PURE__ */ React47.createElement(Grid12, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ React47.createElement(Box28, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ React47.createElement(Typography27, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
5848
5850
|
};
|
|
5849
5851
|
|
|
5850
5852
|
// src/Components/SCSnackBar.tsx
|
|
@@ -6164,7 +6166,7 @@ var SCTime = ({
|
|
|
6164
6166
|
|
|
6165
6167
|
// src/Components/SCZoom.tsx
|
|
6166
6168
|
import React51, { useState as useState30 } from "react";
|
|
6167
|
-
import { Typography as Typography30, Divider as
|
|
6169
|
+
import { Typography as Typography30, Divider as Divider10, IconButton as IconButton18, Box as Box31 } from "@mui/material";
|
|
6168
6170
|
import Grid13 from "@mui/material/Grid";
|
|
6169
6171
|
import ZoomOutIcon from "@mui/icons-material/ZoomOut";
|
|
6170
6172
|
import ZoomInIcon from "@mui/icons-material/ZoomIn";
|
|
@@ -6202,7 +6204,7 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6202
6204
|
}
|
|
6203
6205
|
}
|
|
6204
6206
|
)
|
|
6205
|
-
), /* @__PURE__ */ React51.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__ */ React51.createElement(Grid13, { container: true, alignItems: "center", justifyContent: "center", flexWrap: "nowrap", gap: 0.5, sx: { width: "84px" } }, /* @__PURE__ */ React51.createElement(IconButton18, { onClick: handleZoomOut, disabled: zoom <= 0.5, size: "small" }, /* @__PURE__ */ React51.createElement(ZoomOutIcon, { color: "action", fontSize: "small" })), /* @__PURE__ */ React51.createElement(Typography30, { variant: "body2", color: "textSecondary" }, Math.round(zoom * 100), "%"), /* @__PURE__ */ React51.createElement(IconButton18, { onClick: handleZoomIn, disabled: zoom >= 3, color: "primary", size: "small" }, /* @__PURE__ */ React51.createElement(ZoomInIcon, { color: "action", fontSize: "small" }))), /* @__PURE__ */ React51.createElement(
|
|
6207
|
+
), /* @__PURE__ */ React51.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__ */ React51.createElement(Grid13, { container: true, alignItems: "center", justifyContent: "center", flexWrap: "nowrap", gap: 0.5, sx: { width: "84px" } }, /* @__PURE__ */ React51.createElement(IconButton18, { onClick: handleZoomOut, disabled: zoom <= 0.5, size: "small" }, /* @__PURE__ */ React51.createElement(ZoomOutIcon, { color: "action", fontSize: "small" })), /* @__PURE__ */ React51.createElement(Typography30, { variant: "body2", color: "textSecondary" }, Math.round(zoom * 100), "%"), /* @__PURE__ */ React51.createElement(IconButton18, { onClick: handleZoomIn, disabled: zoom >= 3, color: "primary", size: "small" }, /* @__PURE__ */ React51.createElement(ZoomInIcon, { color: "action", fontSize: "small" }))), /* @__PURE__ */ React51.createElement(Divider10, { orientation: "vertical", sx: { width: "1px", height: "16px" } }), /* @__PURE__ */ React51.createElement(IconButton18, { onClick: handleReset, color: "primary", size: "small" }, /* @__PURE__ */ React51.createElement(RotateRightIcon, { color: "action", fontSize: "small" }))));
|
|
6206
6208
|
};
|
|
6207
6209
|
|
|
6208
6210
|
// src/Theme/index.ts
|