componentes-sinco 1.1.43 → 1.1.45
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.cjs
CHANGED
|
@@ -102,6 +102,7 @@ __export(index_exports, {
|
|
|
102
102
|
SCDatePicker: () => SCDatePicker,
|
|
103
103
|
SCDateRange: () => SCDateRange,
|
|
104
104
|
SCDialog: () => SCDialog,
|
|
105
|
+
SCDownloadExcelTable: () => SCDownloadExcelTable,
|
|
105
106
|
SCDrawer: () => SCDrawer,
|
|
106
107
|
SCListContent: () => SCListContent,
|
|
107
108
|
SCMenu: () => SCMenu,
|
|
@@ -5724,13 +5725,61 @@ var SCDialog = ({ title, iconTitle, subtitle, content, actions, buttonDialog, di
|
|
|
5724
5725
|
)));
|
|
5725
5726
|
};
|
|
5726
5727
|
|
|
5727
|
-
// src/Components/
|
|
5728
|
-
var
|
|
5728
|
+
// src/Components/SCDownloadExcelTable.tsx
|
|
5729
|
+
var import_react52 = __toESM(require("react"), 1);
|
|
5729
5730
|
var import_material36 = require("@mui/material");
|
|
5731
|
+
var import_FileDownloadOutlined2 = __toESM(require("@mui/icons-material/FileDownloadOutlined"), 1);
|
|
5732
|
+
var XLSX = __toESM(require("xlsx"), 1);
|
|
5733
|
+
var SCDownloadExcelTable = ({
|
|
5734
|
+
downloadButton,
|
|
5735
|
+
fileName = "archivo excel",
|
|
5736
|
+
data = [],
|
|
5737
|
+
columns = []
|
|
5738
|
+
}) => {
|
|
5739
|
+
const formatValue = (value, type) => {
|
|
5740
|
+
if (value === null || value === void 0) return "";
|
|
5741
|
+
if (type === "boolean") return value ? "S\xED" : "No";
|
|
5742
|
+
if ((type === "date" || type === "dateTime") && value instanceof Date)
|
|
5743
|
+
return value.toLocaleString("es-CO");
|
|
5744
|
+
if ((type === "date" || type === "dateTime") && typeof value === "string")
|
|
5745
|
+
return new Date(value).toLocaleString("es-CO");
|
|
5746
|
+
return value;
|
|
5747
|
+
};
|
|
5748
|
+
const descargaExcel = () => {
|
|
5749
|
+
const headers = columns.map((col) => col.field == "" ? "" : col.headerName);
|
|
5750
|
+
const rows = data.map(
|
|
5751
|
+
(row) => columns.map((col) => {
|
|
5752
|
+
const raw = row[col.field];
|
|
5753
|
+
const resolved = col.valueGetter ? col.valueGetter(raw) : raw;
|
|
5754
|
+
return formatValue(resolved, col.type);
|
|
5755
|
+
})
|
|
5756
|
+
);
|
|
5757
|
+
const worksheet = XLSX.utils.aoa_to_sheet([headers, ...rows]);
|
|
5758
|
+
const workbook = XLSX.utils.book_new();
|
|
5759
|
+
XLSX.utils.book_append_sheet(workbook, worksheet, "Hoja1");
|
|
5760
|
+
XLSX.writeFile(workbook, `${fileName}.xlsx`);
|
|
5761
|
+
};
|
|
5762
|
+
return /* @__PURE__ */ import_react52.default.createElement(
|
|
5763
|
+
import_material36.Button,
|
|
5764
|
+
{
|
|
5765
|
+
onClick: descargaExcel,
|
|
5766
|
+
startIcon: /* @__PURE__ */ import_react52.default.createElement(import_FileDownloadOutlined2.default, null),
|
|
5767
|
+
size: (downloadButton == null ? void 0 : downloadButton.size) || "small",
|
|
5768
|
+
color: (downloadButton == null ? void 0 : downloadButton.color) || "primary",
|
|
5769
|
+
variant: (downloadButton == null ? void 0 : downloadButton.variant) || "text",
|
|
5770
|
+
disabled: (downloadButton == null ? void 0 : downloadButton.disabled) || data.length === 0
|
|
5771
|
+
},
|
|
5772
|
+
(downloadButton == null ? void 0 : downloadButton.text) || "Descargar Excel"
|
|
5773
|
+
);
|
|
5774
|
+
};
|
|
5775
|
+
|
|
5776
|
+
// src/Components/SCMenu.tsx
|
|
5777
|
+
var import_react54 = __toESM(require("react"), 1);
|
|
5778
|
+
var import_material37 = require("@mui/material");
|
|
5730
5779
|
var import_Grid10 = __toESM(require("@mui/material/Grid"), 1);
|
|
5731
5780
|
|
|
5732
5781
|
// src/Components/Hooks/useWindowDimensions.ts
|
|
5733
|
-
var
|
|
5782
|
+
var import_react53 = require("react");
|
|
5734
5783
|
function getWindowDimensions() {
|
|
5735
5784
|
const { innerWidth: width, innerHeight: height } = window;
|
|
5736
5785
|
return {
|
|
@@ -5739,8 +5788,8 @@ function getWindowDimensions() {
|
|
|
5739
5788
|
};
|
|
5740
5789
|
}
|
|
5741
5790
|
function useWindowDimensions() {
|
|
5742
|
-
const [windowDimensions, setWindowDimensions] = (0,
|
|
5743
|
-
(0,
|
|
5791
|
+
const [windowDimensions, setWindowDimensions] = (0, import_react53.useState)(getWindowDimensions());
|
|
5792
|
+
(0, import_react53.useEffect)(() => {
|
|
5744
5793
|
function handleResize() {
|
|
5745
5794
|
setWindowDimensions(getWindowDimensions());
|
|
5746
5795
|
}
|
|
@@ -5758,12 +5807,12 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5758
5807
|
const pageSize = widthPage ? parseInt(widthPage) : width - menuSize;
|
|
5759
5808
|
const widthContainer = menuSize + pageSize;
|
|
5760
5809
|
let heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
5761
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5762
|
-
const [value, setValue] =
|
|
5763
|
-
|
|
5810
|
+
const [selectedIndex, setSelectedIndex] = import_react54.default.useState("1");
|
|
5811
|
+
const [value, setValue] = import_react54.default.useState("1");
|
|
5812
|
+
import_react54.default.useEffect(() => {
|
|
5764
5813
|
heightContainer = heightMenu ? parseInt(heightMenu) : height - 76;
|
|
5765
5814
|
}, [height]);
|
|
5766
|
-
|
|
5815
|
+
import_react54.default.useEffect(() => {
|
|
5767
5816
|
if (defaultOption) {
|
|
5768
5817
|
handleClickMenusItem(event, void 0);
|
|
5769
5818
|
}
|
|
@@ -5793,21 +5842,21 @@ var SCMenu = ({ header, options, defaultOption, disable, widthMenu, heightMenu,
|
|
|
5793
5842
|
setValue(String(index + 1));
|
|
5794
5843
|
}
|
|
5795
5844
|
};
|
|
5796
|
-
return /* @__PURE__ */
|
|
5797
|
-
|
|
5845
|
+
return /* @__PURE__ */ import_react54.default.createElement(import_react54.default.Fragment, null, /* @__PURE__ */ import_react54.default.createElement(import_Grid10.default, { container: true, sx: { height: heightContainer, width: widthContainer, flexDirection: "column" } }, /* @__PURE__ */ import_react54.default.createElement(import_material37.Paper, { "data-testid": "menu-content", sx: { width: menuSize, height: heightContainer, overflow: "auto" } }, header && header.component, /* @__PURE__ */ import_react54.default.createElement(import_material37.MenuList, { sx: { height: options.length * 45, padding: "8px 0px" } }, options.map((option, index) => /* @__PURE__ */ import_react54.default.createElement(import_react54.default.Fragment, null, /* @__PURE__ */ import_react54.default.createElement(
|
|
5846
|
+
import_material37.MenuItem,
|
|
5798
5847
|
{
|
|
5799
5848
|
disabled: disable == true ? true : false,
|
|
5800
5849
|
key: index,
|
|
5801
5850
|
selected: String(index + 1) === selectedIndex,
|
|
5802
5851
|
onClick: (event2) => handleClickMenusItem(event2, index)
|
|
5803
5852
|
},
|
|
5804
|
-
option.iconLeft ? /* @__PURE__ */
|
|
5805
|
-
/* @__PURE__ */
|
|
5806
|
-
), option.divider == true ? /* @__PURE__ */
|
|
5853
|
+
option.iconLeft ? /* @__PURE__ */ import_react54.default.createElement(import_material37.ListItemIcon, { sx: { color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ import_react54.default.createElement(import_material37.SvgIcon, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconLeft })) : "",
|
|
5854
|
+
/* @__PURE__ */ import_react54.default.createElement(import_Grid10.default, { container: true, size: 12, sx: { maxWidth: 220, flexWrap: "noWrap", alignItems: "center" } }, /* @__PURE__ */ import_react54.default.createElement(import_material37.Typography, { noWrap: true, variant: "caption", color: String(index + 1) === selectedIndex ? "primary" : "active" }, option.name), option.iconRight ? /* @__PURE__ */ import_react54.default.createElement(import_material37.ListItemIcon, { sx: { minWidth: "0px !important", color: String(index + 1) === selectedIndex ? "primary" : "active" } }, /* @__PURE__ */ import_react54.default.createElement(import_material37.SvgIcon, { fontSize: "small", color: String(index + 1) === selectedIndex ? "primary" : "action", component: option.iconRight })) : "")
|
|
5855
|
+
), option.divider == true ? /* @__PURE__ */ import_react54.default.createElement(import_material37.Divider, null) : "")))), /* @__PURE__ */ import_react54.default.createElement(import_Grid10.default, { container: true }, options.map((option, index) => option.page ? String(index + 1) == value ? /* @__PURE__ */ import_react54.default.createElement(import_material37.Box, { "data-testid": "menu-page-content", sx: { padding: "16px", width: pageSize, height: heightContainer }, key: index }, option.page) : "" : /* @__PURE__ */ import_react54.default.createElement(import_material37.Typography, { color: "error" }, "No se ha configurado el componente a visualizar")))));
|
|
5807
5856
|
};
|
|
5808
5857
|
|
|
5809
5858
|
// src/Components/SCSnackBar.tsx
|
|
5810
|
-
var
|
|
5859
|
+
var import_react55 = __toESM(require("react"), 1);
|
|
5811
5860
|
var import_Alert = __toESM(require("@mui/material/Alert"), 1);
|
|
5812
5861
|
var import_es6 = require("dayjs/locale/es");
|
|
5813
5862
|
var import_Snackbar = __toESM(require("@mui/material/Snackbar"), 1);
|
|
@@ -5828,7 +5877,7 @@ var SCSnackBar = ({
|
|
|
5828
5877
|
}
|
|
5829
5878
|
setOpenState(false);
|
|
5830
5879
|
};
|
|
5831
|
-
return /* @__PURE__ */
|
|
5880
|
+
return /* @__PURE__ */ import_react55.default.createElement(import_react55.default.Fragment, null, /* @__PURE__ */ import_react55.default.createElement(
|
|
5832
5881
|
import_Snackbar.default,
|
|
5833
5882
|
__spreadProps(__spreadValues({
|
|
5834
5883
|
anchorOrigin: { vertical: posicionVertical, horizontal: posicionHorizontal },
|
|
@@ -5837,7 +5886,7 @@ var SCSnackBar = ({
|
|
|
5837
5886
|
}, close ? { onClose: handleClose } : {}), {
|
|
5838
5887
|
sx: { zIndex: 2e3 }
|
|
5839
5888
|
}),
|
|
5840
|
-
/* @__PURE__ */
|
|
5889
|
+
/* @__PURE__ */ import_react55.default.createElement(
|
|
5841
5890
|
import_Alert.default,
|
|
5842
5891
|
__spreadProps(__spreadValues({}, close ? { onClose: handleClose } : {}), {
|
|
5843
5892
|
severity: type,
|
|
@@ -5849,20 +5898,20 @@ var SCSnackBar = ({
|
|
|
5849
5898
|
};
|
|
5850
5899
|
|
|
5851
5900
|
// src/Components/SCTabs.tsx
|
|
5852
|
-
var
|
|
5853
|
-
var
|
|
5901
|
+
var import_react56 = __toESM(require("react"), 1);
|
|
5902
|
+
var import_material38 = require("@mui/material");
|
|
5854
5903
|
var import_TabPanel = __toESM(require("@mui/lab/TabPanel"), 1);
|
|
5855
5904
|
var import_TabContext = __toESM(require("@mui/lab/TabContext"), 1);
|
|
5856
5905
|
var Muicon11 = __toESM(require("@mui/icons-material"), 1);
|
|
5857
5906
|
var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }) => {
|
|
5858
|
-
const [toast, setToast] =
|
|
5907
|
+
const [toast, setToast] = import_react56.default.useState(null);
|
|
5859
5908
|
let i = 0;
|
|
5860
5909
|
let j = 0;
|
|
5861
5910
|
let k = 0;
|
|
5862
5911
|
let l = 0;
|
|
5863
5912
|
let validateTypeIcon = true;
|
|
5864
|
-
const [value, setValue] =
|
|
5865
|
-
(0,
|
|
5913
|
+
const [value, setValue] = import_react56.default.useState("1");
|
|
5914
|
+
(0, import_react56.useEffect)(() => {
|
|
5866
5915
|
if (defaultOption) {
|
|
5867
5916
|
handleChange(event, void 0);
|
|
5868
5917
|
}
|
|
@@ -5912,8 +5961,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5912
5961
|
setValue(newValue);
|
|
5913
5962
|
}
|
|
5914
5963
|
};
|
|
5915
|
-
return /* @__PURE__ */
|
|
5916
|
-
|
|
5964
|
+
return /* @__PURE__ */ import_react56.default.createElement(import_react56.default.Fragment, null, validateTypeIcon == true ? /* @__PURE__ */ import_react56.default.createElement(import_material38.Box, { sx: { height: orientation == "vertical" ? "100%" : "auto", display: "flex", flexDirection: orientation == "vertical" ? "row" : "column" }, id: "tabsitos" }, /* @__PURE__ */ import_react56.default.createElement(import_TabContext.default, { value }, /* @__PURE__ */ import_react56.default.createElement(
|
|
5965
|
+
import_material38.Tabs,
|
|
5917
5966
|
{
|
|
5918
5967
|
"data-testid": "tab-container",
|
|
5919
5968
|
value,
|
|
@@ -5926,8 +5975,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5926
5975
|
orientation: orientation || "horizontal",
|
|
5927
5976
|
sx: { borderBottom: orientation == "vertical" ? 0 : 1, borderRight: orientation == "vertical" ? 1 : 0, borderColor: "divider", background: background || "" }
|
|
5928
5977
|
},
|
|
5929
|
-
options.map((option) => /* @__PURE__ */
|
|
5930
|
-
|
|
5978
|
+
options.map((option) => /* @__PURE__ */ import_react56.default.createElement(
|
|
5979
|
+
import_material38.Tab,
|
|
5931
5980
|
{
|
|
5932
5981
|
"data-testid": "tab-item",
|
|
5933
5982
|
value: String(i = i + 1),
|
|
@@ -5935,8 +5984,8 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5935
5984
|
label: option.name || "",
|
|
5936
5985
|
disabled: option.disabled || false,
|
|
5937
5986
|
iconPosition: iconPosition || "end",
|
|
5938
|
-
icon: typeIcon == "badge" ? /* @__PURE__ */
|
|
5939
|
-
|
|
5987
|
+
icon: typeIcon == "badge" ? /* @__PURE__ */ import_react56.default.createElement(
|
|
5988
|
+
import_material38.Badge,
|
|
5940
5989
|
{
|
|
5941
5990
|
sx: {
|
|
5942
5991
|
width: "20px",
|
|
@@ -5950,24 +5999,24 @@ var SCTabs = ({ options, defaultOption, typeIcon, background, iconPosition, colo
|
|
|
5950
5999
|
badgeContent: option.iconOrBadge,
|
|
5951
6000
|
color: value == String(i) ? colorTab ? colorTab : "primary" : "default"
|
|
5952
6001
|
}
|
|
5953
|
-
) : typeIcon == "icon" ? /* @__PURE__ */
|
|
6002
|
+
) : typeIcon == "icon" ? /* @__PURE__ */ import_react56.default.createElement(import_material38.SvgIcon, { fontSize: "small", component: option.iconOrBadge, color: value == String(i) ? colorTab ? colorTab : "primary" : "action", sx: { width: "20px", height: "20px" } }) : "",
|
|
5954
6003
|
sx: { "& .MuiTab-icon": { margin: "0px !important" }, padding: "10px 16px", gap: "4px" }
|
|
5955
6004
|
}
|
|
5956
6005
|
))
|
|
5957
|
-
), children, options.map((option) => /* @__PURE__ */
|
|
6006
|
+
), children, options.map((option) => /* @__PURE__ */ import_react56.default.createElement(
|
|
5958
6007
|
import_TabPanel.default,
|
|
5959
6008
|
{
|
|
5960
6009
|
key: k = k + 1,
|
|
5961
6010
|
value: String(l = l + 1),
|
|
5962
6011
|
sx: { padding: "16px" }
|
|
5963
6012
|
},
|
|
5964
|
-
option.page ? option.page : /* @__PURE__ */
|
|
5965
|
-
)))) : /* @__PURE__ */
|
|
6013
|
+
option.page ? option.page : /* @__PURE__ */ import_react56.default.createElement(import_material38.Typography, null, "No se ha configurado el componente a visualizar ")
|
|
6014
|
+
)))) : /* @__PURE__ */ import_react56.default.createElement(import_material38.Box, { sx: { height: "200px" } }, toast && /* @__PURE__ */ import_react56.default.createElement(SCToastNotification, __spreadValues({ "data-testid": "error-tab-message" }, toast))));
|
|
5966
6015
|
};
|
|
5967
6016
|
|
|
5968
6017
|
// src/Components/SCTime.tsx
|
|
5969
|
-
var
|
|
5970
|
-
var
|
|
6018
|
+
var import_react57 = __toESM(require("react"), 1);
|
|
6019
|
+
var import_material39 = require("@mui/material");
|
|
5971
6020
|
var import_LocalizationProvider5 = require("@mui/x-date-pickers/LocalizationProvider");
|
|
5972
6021
|
var import_AdapterDayjs3 = require("@mui/x-date-pickers/AdapterDayjs");
|
|
5973
6022
|
var import_dayjs11 = __toESM(require("dayjs"), 1);
|
|
@@ -5992,10 +6041,10 @@ var SCTime = ({
|
|
|
5992
6041
|
);
|
|
5993
6042
|
const isTimeEmpty = required && !state;
|
|
5994
6043
|
const hasError = isTimeEmpty || error;
|
|
5995
|
-
const [anchorEl, setAnchorEl] = (0,
|
|
5996
|
-
const [isOpenPopover, setIsOpenPopover] = (0,
|
|
5997
|
-
const [popoverPlacement, setPopoverPlacement] = (0,
|
|
5998
|
-
const [popoverWidth, setPopoverWidth] = (0,
|
|
6044
|
+
const [anchorEl, setAnchorEl] = (0, import_react57.useState)(null);
|
|
6045
|
+
const [isOpenPopover, setIsOpenPopover] = (0, import_react57.useState)(false);
|
|
6046
|
+
const [popoverPlacement, setPopoverPlacement] = (0, import_react57.useState)("bottom");
|
|
6047
|
+
const [popoverWidth, setPopoverWidth] = (0, import_react57.useState)(void 0);
|
|
5999
6048
|
const detectPlacement = (element) => {
|
|
6000
6049
|
const rect = element.getBoundingClientRect();
|
|
6001
6050
|
const windowHeight = window.innerHeight;
|
|
@@ -6027,7 +6076,7 @@ var SCTime = ({
|
|
|
6027
6076
|
setIsOpenPopover(false);
|
|
6028
6077
|
setAnchorEl(null);
|
|
6029
6078
|
};
|
|
6030
|
-
return /* @__PURE__ */
|
|
6079
|
+
return /* @__PURE__ */ import_react57.default.createElement(import_LocalizationProvider5.LocalizationProvider, { dateAdapter: import_AdapterDayjs3.AdapterDayjs }, /* @__PURE__ */ import_react57.default.createElement(import_material39.Box, { sx: { position: "relative", minWidth: "120px", width: width ? `${width}%` : "99%" } }, /* @__PURE__ */ import_react57.default.createElement(
|
|
6031
6080
|
import_TimeField.TimeField,
|
|
6032
6081
|
{
|
|
6033
6082
|
label,
|
|
@@ -6039,7 +6088,7 @@ var SCTime = ({
|
|
|
6039
6088
|
slotProps: {
|
|
6040
6089
|
textField: {
|
|
6041
6090
|
InputProps: {
|
|
6042
|
-
endAdornment: /* @__PURE__ */
|
|
6091
|
+
endAdornment: /* @__PURE__ */ import_react57.default.createElement(import_material39.InputAdornment, { position: "end" }, /* @__PURE__ */ import_react57.default.createElement(
|
|
6043
6092
|
import_AccessTime.default,
|
|
6044
6093
|
{
|
|
6045
6094
|
color: disabled ? "disabled" : "action",
|
|
@@ -6068,8 +6117,8 @@ var SCTime = ({
|
|
|
6068
6117
|
}
|
|
6069
6118
|
}
|
|
6070
6119
|
}
|
|
6071
|
-
), /* @__PURE__ */
|
|
6072
|
-
|
|
6120
|
+
), /* @__PURE__ */ import_react57.default.createElement(
|
|
6121
|
+
import_material39.Popover,
|
|
6073
6122
|
{
|
|
6074
6123
|
open: isOpenPopover,
|
|
6075
6124
|
anchorEl,
|
|
@@ -6099,7 +6148,7 @@ var SCTime = ({
|
|
|
6099
6148
|
}
|
|
6100
6149
|
}
|
|
6101
6150
|
},
|
|
6102
|
-
/* @__PURE__ */
|
|
6151
|
+
/* @__PURE__ */ import_react57.default.createElement(import_material39.ClickAwayListener, { onClickAway: handleClose }, /* @__PURE__ */ import_react57.default.createElement(import_material39.Box, { sx: { p: 0 } }, /* @__PURE__ */ import_react57.default.createElement(
|
|
6103
6152
|
import_DigitalClock.DigitalClock,
|
|
6104
6153
|
{
|
|
6105
6154
|
value: state,
|
|
@@ -6122,14 +6171,14 @@ var SCTime = ({
|
|
|
6122
6171
|
};
|
|
6123
6172
|
|
|
6124
6173
|
// src/Components/SCZoom.tsx
|
|
6125
|
-
var
|
|
6126
|
-
var
|
|
6174
|
+
var import_react58 = __toESM(require("react"), 1);
|
|
6175
|
+
var import_material40 = require("@mui/material");
|
|
6127
6176
|
var import_Grid11 = __toESM(require("@mui/material/Grid"), 1);
|
|
6128
6177
|
var import_ZoomOut = __toESM(require("@mui/icons-material/ZoomOut"), 1);
|
|
6129
6178
|
var import_ZoomIn = __toESM(require("@mui/icons-material/ZoomIn"), 1);
|
|
6130
6179
|
var import_RotateRight = __toESM(require("@mui/icons-material/RotateRight"), 1);
|
|
6131
6180
|
var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
6132
|
-
const [zoom, setZoom] = (0,
|
|
6181
|
+
const [zoom, setZoom] = (0, import_react58.useState)(1);
|
|
6133
6182
|
const handleZoomIn = () => {
|
|
6134
6183
|
setZoom((prev) => Math.min(prev + 0.2, 3));
|
|
6135
6184
|
};
|
|
@@ -6139,8 +6188,8 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6139
6188
|
const handleReset = () => {
|
|
6140
6189
|
setZoom(1);
|
|
6141
6190
|
};
|
|
6142
|
-
return /* @__PURE__ */
|
|
6143
|
-
|
|
6191
|
+
return /* @__PURE__ */ import_react58.default.createElement(import_material40.Box, { style: { width: width || "280px", height: height || "280px" } }, /* @__PURE__ */ import_react58.default.createElement(
|
|
6192
|
+
import_material40.Box,
|
|
6144
6193
|
{
|
|
6145
6194
|
sx: {
|
|
6146
6195
|
overflow: zoom > 1 ? "auto" : "hidden",
|
|
@@ -6149,7 +6198,7 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6149
6198
|
height: height || "340px"
|
|
6150
6199
|
}
|
|
6151
6200
|
},
|
|
6152
|
-
/* @__PURE__ */
|
|
6201
|
+
/* @__PURE__ */ import_react58.default.createElement(
|
|
6153
6202
|
"img",
|
|
6154
6203
|
{
|
|
6155
6204
|
src: image,
|
|
@@ -6161,14 +6210,14 @@ var SCZoom = ({ image, width, height, bottom, left }) => {
|
|
|
6161
6210
|
}
|
|
6162
6211
|
}
|
|
6163
6212
|
)
|
|
6164
|
-
), /* @__PURE__ */
|
|
6213
|
+
), /* @__PURE__ */ import_react58.default.createElement(import_Grid11.default, { container: true, flexWrap: "nowrap", alignItems: "center", gap: 1, sx: { position: "relative", bottom: bottom != null ? bottom : `calc(100% - 87%)`, left: left != null ? left : `calc(100% - 72%)`, zIndex: 1, width: "147px", borderRadius: "4px", padding: "4px 12px", border: bottom ? "0px" : "1px solid #0000001F", background: "white", boxShadow: bottom ? "" : "2px 3px 5px 0px #18274B33" } }, /* @__PURE__ */ import_react58.default.createElement(import_Grid11.default, { container: true, alignItems: "center", justifyContent: "center", flexWrap: "nowrap", gap: 0.5, sx: { width: "84px" } }, /* @__PURE__ */ import_react58.default.createElement(import_material40.IconButton, { onClick: handleZoomOut, disabled: zoom <= 0.5, size: "small" }, /* @__PURE__ */ import_react58.default.createElement(import_ZoomOut.default, { color: "action", fontSize: "small" })), /* @__PURE__ */ import_react58.default.createElement(import_material40.Typography, { variant: "body2", color: "textSecondary" }, Math.round(zoom * 100), "%"), /* @__PURE__ */ import_react58.default.createElement(import_material40.IconButton, { onClick: handleZoomIn, disabled: zoom >= 3, color: "primary", size: "small" }, /* @__PURE__ */ import_react58.default.createElement(import_ZoomIn.default, { color: "action", fontSize: "small" }))), /* @__PURE__ */ import_react58.default.createElement(import_material40.Divider, { orientation: "vertical", sx: { width: "1px", height: "16px" } }), /* @__PURE__ */ import_react58.default.createElement(import_material40.IconButton, { onClick: handleReset, color: "primary", size: "small" }, /* @__PURE__ */ import_react58.default.createElement(import_RotateRight.default, { color: "action", fontSize: "small" }))));
|
|
6165
6214
|
};
|
|
6166
6215
|
|
|
6167
6216
|
// src/Theme/index.ts
|
|
6168
6217
|
var import_styles3 = require("@mui/material/styles");
|
|
6169
6218
|
|
|
6170
6219
|
// src/Theme/components.ts
|
|
6171
|
-
var
|
|
6220
|
+
var import_react59 = __toESM(require("react"), 1);
|
|
6172
6221
|
var import_icons_material15 = require("@mui/icons-material");
|
|
6173
6222
|
var components = {
|
|
6174
6223
|
MuiSelect: {
|
|
@@ -6867,10 +6916,10 @@ var components = {
|
|
|
6867
6916
|
MuiAlert: {
|
|
6868
6917
|
defaultProps: {
|
|
6869
6918
|
iconMapping: {
|
|
6870
|
-
success:
|
|
6871
|
-
error:
|
|
6872
|
-
warning:
|
|
6873
|
-
info:
|
|
6919
|
+
success: import_react59.default.createElement(import_icons_material15.CheckCircleRounded),
|
|
6920
|
+
error: import_react59.default.createElement(import_icons_material15.ErrorRounded),
|
|
6921
|
+
warning: import_react59.default.createElement(import_icons_material15.WarningRounded),
|
|
6922
|
+
info: import_react59.default.createElement(import_icons_material15.InfoRounded)
|
|
6874
6923
|
}
|
|
6875
6924
|
},
|
|
6876
6925
|
variants: [
|
|
@@ -7933,6 +7982,7 @@ var ADCSincoTheme = (0, import_styles3.createTheme)(__spreadValues({}, ADCTheme)
|
|
|
7933
7982
|
SCDatePicker,
|
|
7934
7983
|
SCDateRange,
|
|
7935
7984
|
SCDialog,
|
|
7985
|
+
SCDownloadExcelTable,
|
|
7936
7986
|
SCDrawer,
|
|
7937
7987
|
SCListContent,
|
|
7938
7988
|
SCMenu,
|