componentes-sinco 1.0.40 → 1.0.41
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 +8 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2125,7 +2125,6 @@ var SCDateRange = ({
|
|
|
2125
2125
|
popper: {
|
|
2126
2126
|
sx: {
|
|
2127
2127
|
zIndex: 1400
|
|
2128
|
-
// muy alto para que quede encima
|
|
2129
2128
|
}
|
|
2130
2129
|
},
|
|
2131
2130
|
textField: ({ position }) => {
|
|
@@ -4996,6 +4995,7 @@ var AttachmentMobile = ({
|
|
|
4996
4995
|
maxSize = 400,
|
|
4997
4996
|
fileAccepted = "",
|
|
4998
4997
|
initialFiles,
|
|
4998
|
+
setAttachedFiles,
|
|
4999
4999
|
deleteAction,
|
|
5000
5000
|
children,
|
|
5001
5001
|
onChange,
|
|
@@ -5045,9 +5045,11 @@ var AttachmentMobile = ({
|
|
|
5045
5045
|
u8arr[n] = bstr.charCodeAt(n);
|
|
5046
5046
|
}
|
|
5047
5047
|
const fechaActual = new Date(Date.now());
|
|
5048
|
-
const fechaConFormato = fechaActual.getFullYear() + "" + (fechaActual.getMonth() + 1) + fechaActual.getDate();
|
|
5048
|
+
const fechaConFormato = fechaActual.getFullYear() + "" + (fechaActual.getMonth() + 1) + fechaActual.getDate() + fechaActual.getHours() + fechaActual.getMinutes() + fechaActual.getSeconds();
|
|
5049
5049
|
const capturedFile = new File([u8arr], `photo_${fechaConFormato}.jpg`, { type: mime });
|
|
5050
5050
|
newFiles = [capturedFile];
|
|
5051
|
+
setCapturedImage(null);
|
|
5052
|
+
capturedImage2 = null;
|
|
5051
5053
|
}
|
|
5052
5054
|
if (!newFiles) return;
|
|
5053
5055
|
const nuevosArchivos = [];
|
|
@@ -5111,6 +5113,7 @@ var AttachmentMobile = ({
|
|
|
5111
5113
|
if (nuevosArchivos.length > 0) {
|
|
5112
5114
|
setFiles((prevFiles) => {
|
|
5113
5115
|
const updatedFiles = [...prevFiles, ...nuevosArchivos];
|
|
5116
|
+
setAttachedFiles(updatedFiles);
|
|
5114
5117
|
if (archivosValidos.length > 0) {
|
|
5115
5118
|
onChange == null ? void 0 : onChange([
|
|
5116
5119
|
...archivosValidos,
|
|
@@ -5132,6 +5135,7 @@ var AttachmentMobile = ({
|
|
|
5132
5135
|
(file) => !(file.name === fileToRemove.name && file.size === fileToRemove.size)
|
|
5133
5136
|
);
|
|
5134
5137
|
setFiles(updatedFiles);
|
|
5138
|
+
setAttachedFiles(updatedFiles);
|
|
5135
5139
|
if (onChange) {
|
|
5136
5140
|
const remainingValidFiles = updatedFiles.filter((f) => !f.uploadError).map((f) => new File([], f.name, { type: f.type }));
|
|
5137
5141
|
onChange(remainingValidFiles);
|
|
@@ -5167,6 +5171,7 @@ var AttachmentMobile = ({
|
|
|
5167
5171
|
(0, import_react52.useEffect)(() => {
|
|
5168
5172
|
if (initialFiles && initialFiles.length > 0) {
|
|
5169
5173
|
setFiles(initialFiles);
|
|
5174
|
+
setAttachedFiles(initialFiles);
|
|
5170
5175
|
}
|
|
5171
5176
|
}, []);
|
|
5172
5177
|
return /* @__PURE__ */ import_react52.default.createElement(import_system.Box, { display: "flex", flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react52.default.createElement(import_system.Box, { display: "flex", width: "100%", justifyContent: "space-between", alignItems: "center", sx }, children, /* @__PURE__ */ import_react52.default.createElement(
|
|
@@ -5351,7 +5356,6 @@ var AttachmentMobile = ({
|
|
|
5351
5356
|
var import_react53 = __toESM(require("react"), 1);
|
|
5352
5357
|
var import_Alert = __toESM(require("@mui/material/Alert"), 1);
|
|
5353
5358
|
var import_es4 = require("dayjs/locale/es");
|
|
5354
|
-
var import_Button = __toESM(require("@mui/material/Button"), 1);
|
|
5355
5359
|
var import_Snackbar = __toESM(require("@mui/material/Snackbar"), 1);
|
|
5356
5360
|
var SCSnackBar = ({
|
|
5357
5361
|
type = "success",
|
|
@@ -5364,16 +5368,13 @@ var SCSnackBar = ({
|
|
|
5364
5368
|
}) => {
|
|
5365
5369
|
const posicionVertical = position == "Center" ? "bottom" : position.split("-")[1] == "Up" ? "top" : "bottom";
|
|
5366
5370
|
const posicionHorizontal = position == "Center" ? "center" : position.split("-")[0] == "Left" ? "left" : "right";
|
|
5367
|
-
const handleClick = () => {
|
|
5368
|
-
setOpenState(true);
|
|
5369
|
-
};
|
|
5370
5371
|
const handleClose = (event2, reason) => {
|
|
5371
5372
|
if (reason === "clickaway") {
|
|
5372
5373
|
return;
|
|
5373
5374
|
}
|
|
5374
5375
|
setOpenState(false);
|
|
5375
5376
|
};
|
|
5376
|
-
return /* @__PURE__ */ import_react53.default.createElement(import_react53.default.Fragment, null, /* @__PURE__ */ import_react53.default.createElement(
|
|
5377
|
+
return /* @__PURE__ */ import_react53.default.createElement(import_react53.default.Fragment, null, /* @__PURE__ */ import_react53.default.createElement(
|
|
5377
5378
|
import_Snackbar.default,
|
|
5378
5379
|
__spreadValues({
|
|
5379
5380
|
anchorOrigin: { vertical: posicionVertical, horizontal: posicionHorizontal },
|