@sinco/react 1.2.2-rc.8 → 1.2.2
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/index.esm.js +412 -76
- package/package.json +1 -1
- package/src/lib/Components/index.d.ts +2 -0
package/index.esm.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { Children, isValidElement, cloneElement, useState, useCallback, useEffect } from 'react';
|
|
3
|
-
import { CheckCircleRounded, ErrorRounded, WarningRounded, InfoRounded, Close, KeyboardArrowDown, KeyboardArrowUp } from '@mui/icons-material';
|
|
3
|
+
import { CheckCircleRounded, ErrorRounded, WarningRounded, InfoRounded, Close, KeyboardArrowDown, KeyboardArrowUp, AttachFile, UploadFileOutlined, Autorenew, CancelOutlined, DeleteOutline } from '@mui/icons-material';
|
|
4
4
|
import { withEmotionCache, ThemeContext, keyframes, css } from '@emotion/react';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
import * as ReactDOM from 'react-dom';
|
|
7
7
|
import ReactDOM__default from 'react-dom';
|
|
8
|
+
import { useDropzone } from 'react-dropzone';
|
|
8
9
|
|
|
9
10
|
function _arrayLikeToArray(r, a) {
|
|
10
11
|
(null == a || a > r.length) && (a = r.length);
|
|
@@ -14,6 +15,9 @@ function _arrayLikeToArray(r, a) {
|
|
|
14
15
|
function _arrayWithHoles(r) {
|
|
15
16
|
if (Array.isArray(r)) return r;
|
|
16
17
|
}
|
|
18
|
+
function _arrayWithoutHoles(r) {
|
|
19
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
20
|
+
}
|
|
17
21
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
18
22
|
try {
|
|
19
23
|
var i = n[a](c),
|
|
@@ -47,6 +51,9 @@ function _defineProperty(e, r, t) {
|
|
|
47
51
|
writable: !0
|
|
48
52
|
}) : e[r] = t, e;
|
|
49
53
|
}
|
|
54
|
+
function _iterableToArray(r) {
|
|
55
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
56
|
+
}
|
|
50
57
|
function _iterableToArrayLimit(r, l) {
|
|
51
58
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
52
59
|
if (null != t) {
|
|
@@ -77,6 +84,9 @@ function _iterableToArrayLimit(r, l) {
|
|
|
77
84
|
function _nonIterableRest() {
|
|
78
85
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
79
86
|
}
|
|
87
|
+
function _nonIterableSpread() {
|
|
88
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
89
|
+
}
|
|
80
90
|
function ownKeys(e, r) {
|
|
81
91
|
var t = Object.keys(e);
|
|
82
92
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -402,6 +412,9 @@ function _regeneratorRuntime() {
|
|
|
402
412
|
function _slicedToArray(r, e) {
|
|
403
413
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
404
414
|
}
|
|
415
|
+
function _toConsumableArray(r) {
|
|
416
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
417
|
+
}
|
|
405
418
|
function _toPrimitive(t, r) {
|
|
406
419
|
if ("object" != typeof t || !t) return t;
|
|
407
420
|
var e = t[Symbol.toPrimitive];
|
|
@@ -7793,8 +7806,33 @@ var components = {
|
|
|
7793
7806
|
icon: {
|
|
7794
7807
|
opacity: "70%"
|
|
7795
7808
|
},
|
|
7796
|
-
|
|
7809
|
+
deleteIconSmall: {
|
|
7810
|
+
height: 16,
|
|
7811
|
+
width: 16
|
|
7812
|
+
},
|
|
7813
|
+
deleteIconMedium: {
|
|
7814
|
+
height: 20,
|
|
7815
|
+
width: 20
|
|
7816
|
+
},
|
|
7817
|
+
sizeSmall: {
|
|
7818
|
+
height: 16
|
|
7819
|
+
},
|
|
7820
|
+
sizeMedium: {
|
|
7821
|
+
height: 20
|
|
7822
|
+
},
|
|
7823
|
+
avatarMedium: {
|
|
7824
|
+
height: 18,
|
|
7825
|
+
width: 18
|
|
7826
|
+
},
|
|
7827
|
+
colorDefault: function colorDefault(_ref2) {
|
|
7797
7828
|
var theme = _ref2.theme;
|
|
7829
|
+
return {
|
|
7830
|
+
backgroundColor: theme.palette["default"].main,
|
|
7831
|
+
color: theme.palette["default"].contrastText
|
|
7832
|
+
};
|
|
7833
|
+
},
|
|
7834
|
+
deleteIcon: function deleteIcon(_ref3) {
|
|
7835
|
+
var theme = _ref3.theme;
|
|
7798
7836
|
return {
|
|
7799
7837
|
variants: [{
|
|
7800
7838
|
props: {
|
|
@@ -7830,40 +7868,18 @@ var components = {
|
|
|
7830
7868
|
}
|
|
7831
7869
|
}, {
|
|
7832
7870
|
props: {
|
|
7833
|
-
variant: "
|
|
7871
|
+
variant: "filled",
|
|
7834
7872
|
color: "default"
|
|
7835
7873
|
},
|
|
7836
7874
|
style: {
|
|
7837
|
-
color: theme.palette.
|
|
7838
|
-
opacity: "
|
|
7839
|
-
":hover": {
|
|
7840
|
-
color: theme.palette.action.active,
|
|
7841
|
-
opacity: "54%"
|
|
7842
|
-
}
|
|
7875
|
+
color: theme.palette["default"].contrastText,
|
|
7876
|
+
opacity: "30%"
|
|
7843
7877
|
}
|
|
7844
7878
|
}]
|
|
7845
7879
|
};
|
|
7846
7880
|
},
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
width: 16
|
|
7850
|
-
},
|
|
7851
|
-
deleteIconMedium: {
|
|
7852
|
-
height: 20,
|
|
7853
|
-
width: 20
|
|
7854
|
-
},
|
|
7855
|
-
sizeSmall: {
|
|
7856
|
-
height: 16
|
|
7857
|
-
},
|
|
7858
|
-
sizeMedium: {
|
|
7859
|
-
height: 20
|
|
7860
|
-
},
|
|
7861
|
-
avatarMedium: {
|
|
7862
|
-
height: 18,
|
|
7863
|
-
width: 18
|
|
7864
|
-
},
|
|
7865
|
-
avatar: function avatar(_ref3) {
|
|
7866
|
-
var theme = _ref3.theme;
|
|
7881
|
+
avatar: function avatar(_ref4) {
|
|
7882
|
+
var theme = _ref4.theme;
|
|
7867
7883
|
return {
|
|
7868
7884
|
lineHeight: 1.8,
|
|
7869
7885
|
variants: [{
|
|
@@ -7925,22 +7941,24 @@ var components = {
|
|
|
7925
7941
|
color: "default"
|
|
7926
7942
|
},
|
|
7927
7943
|
style: {
|
|
7928
|
-
backgroundColor: theme.palette.
|
|
7929
|
-
color: theme.palette.background.paper
|
|
7930
|
-
|
|
7944
|
+
backgroundColor: theme.palette.grey[400],
|
|
7945
|
+
color: theme.palette.background.paper
|
|
7946
|
+
}
|
|
7947
|
+
}, {
|
|
7948
|
+
props: {
|
|
7949
|
+
variant: "filled",
|
|
7950
|
+
color: "default"
|
|
7951
|
+
},
|
|
7952
|
+
style: {
|
|
7953
|
+
backgroundColor: theme.palette["default"].contrastText,
|
|
7954
|
+
color: theme.palette.background.paper
|
|
7931
7955
|
}
|
|
7932
7956
|
}]
|
|
7933
7957
|
};
|
|
7934
7958
|
},
|
|
7935
|
-
label: function label(
|
|
7936
|
-
var theme = _ref4.theme;
|
|
7937
|
-
return _objectSpread2({}, theme.typography.caption);
|
|
7938
|
-
},
|
|
7939
|
-
filled: function filled(_ref5) {
|
|
7959
|
+
label: function label(_ref5) {
|
|
7940
7960
|
var theme = _ref5.theme;
|
|
7941
|
-
return {
|
|
7942
|
-
color: theme.palette.background.paper
|
|
7943
|
-
};
|
|
7961
|
+
return _objectSpread2({}, theme.typography.caption);
|
|
7944
7962
|
},
|
|
7945
7963
|
root: function root(_ref6) {
|
|
7946
7964
|
var theme = _ref6.theme;
|
|
@@ -7948,6 +7966,55 @@ var components = {
|
|
|
7948
7966
|
height: "inherit",
|
|
7949
7967
|
borderRadius: 4,
|
|
7950
7968
|
variants: [{
|
|
7969
|
+
props: {
|
|
7970
|
+
variant: "outlined",
|
|
7971
|
+
color: "default"
|
|
7972
|
+
},
|
|
7973
|
+
style: {
|
|
7974
|
+
border: "1px solid ".concat(theme.palette.grey[400]),
|
|
7975
|
+
backgroundColor: "transparent !important",
|
|
7976
|
+
color: theme.palette["default"].contrastText,
|
|
7977
|
+
":hover": {
|
|
7978
|
+
backgroundColor: theme.palette["default"].main
|
|
7979
|
+
}
|
|
7980
|
+
}
|
|
7981
|
+
}, {
|
|
7982
|
+
props: {
|
|
7983
|
+
variant: "standard",
|
|
7984
|
+
color: "default"
|
|
7985
|
+
},
|
|
7986
|
+
style: {
|
|
7987
|
+
backgroundColor: theme.palette["default"].main,
|
|
7988
|
+
color: theme.palette["default"].contrastText,
|
|
7989
|
+
":hover": {
|
|
7990
|
+
backgroundColor: theme.palette["default"].dark
|
|
7991
|
+
}
|
|
7992
|
+
}
|
|
7993
|
+
}, {
|
|
7994
|
+
props: {
|
|
7995
|
+
variant: "filled",
|
|
7996
|
+
color: "default"
|
|
7997
|
+
},
|
|
7998
|
+
style: {
|
|
7999
|
+
backgroundColor: theme.palette.grey[50],
|
|
8000
|
+
color: theme.palette["default"].contrastText,
|
|
8001
|
+
":hover": {
|
|
8002
|
+
backgroundColor: theme.palette.grey[100]
|
|
8003
|
+
}
|
|
8004
|
+
}
|
|
8005
|
+
}, {
|
|
8006
|
+
props: {
|
|
8007
|
+
variant: "filled",
|
|
8008
|
+
color: "default"
|
|
8009
|
+
},
|
|
8010
|
+
style: {
|
|
8011
|
+
backgroundColor: theme.palette.grey[50],
|
|
8012
|
+
color: theme.palette["default"].contrastText,
|
|
8013
|
+
":hover": {
|
|
8014
|
+
backgroundColor: theme.palette.grey[100]
|
|
8015
|
+
}
|
|
8016
|
+
}
|
|
8017
|
+
}, {
|
|
7951
8018
|
props: {
|
|
7952
8019
|
variant: "standard",
|
|
7953
8020
|
avatar: true
|
|
@@ -8072,11 +8139,48 @@ var components = {
|
|
|
8072
8139
|
padding: "0px 0px",
|
|
8073
8140
|
minWidth: 0
|
|
8074
8141
|
},
|
|
8075
|
-
icon: {
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8142
|
+
icon: function icon(_ref7) {
|
|
8143
|
+
var theme = _ref7.theme;
|
|
8144
|
+
return {
|
|
8145
|
+
padding: "4px",
|
|
8146
|
+
marginRight: "8px",
|
|
8147
|
+
display: "flex",
|
|
8148
|
+
alignItems: "center",
|
|
8149
|
+
borderRadius: "50%",
|
|
8150
|
+
variants: [{
|
|
8151
|
+
props: {
|
|
8152
|
+
variant: "standard",
|
|
8153
|
+
severity: "info"
|
|
8154
|
+
},
|
|
8155
|
+
style: {
|
|
8156
|
+
backgroundColor: theme.palette.info[100]
|
|
8157
|
+
}
|
|
8158
|
+
}, {
|
|
8159
|
+
props: {
|
|
8160
|
+
variant: "standard",
|
|
8161
|
+
severity: "error"
|
|
8162
|
+
},
|
|
8163
|
+
style: {
|
|
8164
|
+
backgroundColor: theme.palette.error[100]
|
|
8165
|
+
}
|
|
8166
|
+
}, {
|
|
8167
|
+
props: {
|
|
8168
|
+
variant: "standard",
|
|
8169
|
+
severity: "success"
|
|
8170
|
+
},
|
|
8171
|
+
style: {
|
|
8172
|
+
backgroundColor: theme.palette.success[100]
|
|
8173
|
+
}
|
|
8174
|
+
}, {
|
|
8175
|
+
props: {
|
|
8176
|
+
variant: "standard",
|
|
8177
|
+
severity: "warning"
|
|
8178
|
+
},
|
|
8179
|
+
style: {
|
|
8180
|
+
backgroundColor: theme.palette.warning[100]
|
|
8181
|
+
}
|
|
8182
|
+
}]
|
|
8183
|
+
};
|
|
8080
8184
|
},
|
|
8081
8185
|
action: {
|
|
8082
8186
|
display: "flex",
|
|
@@ -8190,9 +8294,9 @@ var components = {
|
|
|
8190
8294
|
size: "small"
|
|
8191
8295
|
},
|
|
8192
8296
|
style: {
|
|
8193
|
-
width:
|
|
8194
|
-
height:
|
|
8195
|
-
minHeight:
|
|
8297
|
+
width: 28,
|
|
8298
|
+
height: 28,
|
|
8299
|
+
minHeight: 28,
|
|
8196
8300
|
svg: {
|
|
8197
8301
|
height: 20,
|
|
8198
8302
|
width: 20
|
|
@@ -8515,43 +8619,28 @@ var components = {
|
|
|
8515
8619
|
dense: false
|
|
8516
8620
|
},
|
|
8517
8621
|
styleOverrides: {
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
MuiListItemText: {
|
|
8523
|
-
styleOverrides: {
|
|
8524
|
-
multiline: {},
|
|
8525
|
-
root: {
|
|
8526
|
-
marginBlock: " 4.4px ",
|
|
8527
|
-
lineHeight: "20px",
|
|
8528
|
-
letterSpacing: 0.17
|
|
8529
|
-
},
|
|
8530
|
-
dense: {
|
|
8531
|
-
lineHeight: "14.3px",
|
|
8532
|
-
letterSpacing: 0.15
|
|
8533
|
-
}
|
|
8534
|
-
}
|
|
8535
|
-
},
|
|
8536
|
-
MuiListItem: {
|
|
8537
|
-
styleOverrides: {
|
|
8538
|
-
root: {
|
|
8539
|
-
padding: "8px 16px 8px 16px"
|
|
8622
|
+
padding: {
|
|
8623
|
+
".MuiListItem-padding": {
|
|
8624
|
+
paddingBlock: 1
|
|
8625
|
+
}
|
|
8540
8626
|
},
|
|
8541
8627
|
dense: {
|
|
8542
|
-
|
|
8628
|
+
".MuiListItem-dense": {
|
|
8629
|
+
padding: "0.25px 0px 0.25px 16px"
|
|
8630
|
+
}
|
|
8543
8631
|
}
|
|
8544
8632
|
}
|
|
8545
8633
|
},
|
|
8546
8634
|
MuiListItemButton: {
|
|
8547
8635
|
styleOverrides: {
|
|
8548
8636
|
dense: {
|
|
8549
|
-
|
|
8550
|
-
padding: 0
|
|
8637
|
+
padding: "4px 16px 4px 16px "
|
|
8551
8638
|
},
|
|
8552
8639
|
root: {
|
|
8553
|
-
|
|
8554
|
-
|
|
8640
|
+
padding: "8.21px 16px",
|
|
8641
|
+
".MuiListItemText-multiline": {
|
|
8642
|
+
marginBlock: "4px"
|
|
8643
|
+
}
|
|
8555
8644
|
}
|
|
8556
8645
|
}
|
|
8557
8646
|
},
|
|
@@ -17293,6 +17382,253 @@ var IncognitIconOutlined = createSvgIcon(React__default.createElement("svg", {
|
|
|
17293
17382
|
var Incognit = IncognitIcon;
|
|
17294
17383
|
var IncognitOutlined = IncognitIconOutlined;
|
|
17295
17384
|
|
|
17385
|
+
var AdjuntarArchivo = function AdjuntarArchivo(_ref) {
|
|
17386
|
+
var compact = _ref.compact,
|
|
17387
|
+
sx = _ref.sx,
|
|
17388
|
+
controlArchivo = _ref.controlArchivo;
|
|
17389
|
+
var _useState = useState(function () {
|
|
17390
|
+
var guardarArchivo = localStorage.getItem("archivos");
|
|
17391
|
+
return guardarArchivo ? JSON.parse(guardarArchivo).map(function (file) {
|
|
17392
|
+
return {
|
|
17393
|
+
file: new File([file], file.name),
|
|
17394
|
+
progress: 0,
|
|
17395
|
+
loadingComplete: false
|
|
17396
|
+
};
|
|
17397
|
+
}) : [];
|
|
17398
|
+
}),
|
|
17399
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17400
|
+
archivos = _useState2[0],
|
|
17401
|
+
setArchivos = _useState2[1];
|
|
17402
|
+
useEffect(function () {
|
|
17403
|
+
setArchivos([]);
|
|
17404
|
+
}, []);
|
|
17405
|
+
useEffect(function () {
|
|
17406
|
+
archivos.forEach(function (archivo, index) {
|
|
17407
|
+
if (archivo.progress < 100) {
|
|
17408
|
+
var intervalo = setInterval(function () {
|
|
17409
|
+
setArchivos(function (prevArchivos) {
|
|
17410
|
+
return prevArchivos.map(function (item, idx) {
|
|
17411
|
+
return idx === index ? _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17412
|
+
progress: Math.min(item.progress + 10, 100),
|
|
17413
|
+
loadingComplete: Math.min(item.progress + 10, 100) === 100
|
|
17414
|
+
}) : item;
|
|
17415
|
+
});
|
|
17416
|
+
});
|
|
17417
|
+
}, 1000);
|
|
17418
|
+
return function () {
|
|
17419
|
+
return clearInterval(intervalo);
|
|
17420
|
+
};
|
|
17421
|
+
}
|
|
17422
|
+
});
|
|
17423
|
+
}, [archivos]);
|
|
17424
|
+
var validarArchivoDuplicado = function validarArchivoDuplicado(file) {
|
|
17425
|
+
var archivoDuplicado = archivos.some(function (archivoExistente) {
|
|
17426
|
+
return archivoExistente.file.name === file.name;
|
|
17427
|
+
});
|
|
17428
|
+
if (archivoDuplicado) {
|
|
17429
|
+
return {
|
|
17430
|
+
code: "archivo-duplicado",
|
|
17431
|
+
message: "No se puede elegir el mismo archivo, seleccione otro por favor"
|
|
17432
|
+
};
|
|
17433
|
+
}
|
|
17434
|
+
return null;
|
|
17435
|
+
};
|
|
17436
|
+
var _useDropzone = useDropzone({
|
|
17437
|
+
validator: validarArchivoDuplicado,
|
|
17438
|
+
multiple: true,
|
|
17439
|
+
onDrop: function onDrop(acceptedFiles) {
|
|
17440
|
+
setArchivos(function (prev) {
|
|
17441
|
+
var actualizarArchivos = [].concat(_toConsumableArray(prev), _toConsumableArray(acceptedFiles.map(function (file) {
|
|
17442
|
+
return {
|
|
17443
|
+
file: file,
|
|
17444
|
+
progress: 0,
|
|
17445
|
+
loadingComplete: false
|
|
17446
|
+
};
|
|
17447
|
+
})));
|
|
17448
|
+
localStorage.setItem("archivos", JSON.stringify(actualizarArchivos.map(function (_ref2) {
|
|
17449
|
+
var file = _ref2.file;
|
|
17450
|
+
return file;
|
|
17451
|
+
})));
|
|
17452
|
+
return actualizarArchivos;
|
|
17453
|
+
});
|
|
17454
|
+
}
|
|
17455
|
+
}),
|
|
17456
|
+
getRootProps = _useDropzone.getRootProps,
|
|
17457
|
+
getInputProps = _useDropzone.getInputProps;
|
|
17458
|
+
var Eliminar = useCallback(function (index) {
|
|
17459
|
+
setArchivos(function (prevFiles) {
|
|
17460
|
+
var actualizarArchivos = prevFiles.filter(function (_, indexIteration) {
|
|
17461
|
+
return indexIteration !== index;
|
|
17462
|
+
});
|
|
17463
|
+
localStorage.setItem("archivos", JSON.stringify(actualizarArchivos.map(function (_ref3) {
|
|
17464
|
+
var file = _ref3.file;
|
|
17465
|
+
return file;
|
|
17466
|
+
})));
|
|
17467
|
+
return actualizarArchivos;
|
|
17468
|
+
});
|
|
17469
|
+
}, [setArchivos]);
|
|
17470
|
+
var Editar = useCallback(function (index) {
|
|
17471
|
+
var input = document.createElement('input');
|
|
17472
|
+
input.type = 'file';
|
|
17473
|
+
input.onchange = function (event) {
|
|
17474
|
+
var newFile = event.target.files[0];
|
|
17475
|
+
if (newFile) {
|
|
17476
|
+
setArchivos(function (prevFiles) {
|
|
17477
|
+
var actualizarArchivos = prevFiles.map(function (archivo, idx) {
|
|
17478
|
+
return idx === index ? _objectSpread2(_objectSpread2({}, archivo), {}, {
|
|
17479
|
+
file: newFile,
|
|
17480
|
+
progress: 0,
|
|
17481
|
+
loadingComplete: false
|
|
17482
|
+
}) : archivo;
|
|
17483
|
+
});
|
|
17484
|
+
localStorage.setItem("archivos", JSON.stringify(actualizarArchivos.map(function (_ref4) {
|
|
17485
|
+
var file = _ref4.file;
|
|
17486
|
+
return file;
|
|
17487
|
+
})));
|
|
17488
|
+
return actualizarArchivos;
|
|
17489
|
+
});
|
|
17490
|
+
}
|
|
17491
|
+
};
|
|
17492
|
+
input.click();
|
|
17493
|
+
}, [setArchivos]);
|
|
17494
|
+
var controlEventoAdjuntar = function controlEventoAdjuntar(e) {
|
|
17495
|
+
e.stopPropagation();
|
|
17496
|
+
controlArchivo(archivos.map(function (e) {
|
|
17497
|
+
return e.file;
|
|
17498
|
+
}));
|
|
17499
|
+
setArchivos([]);
|
|
17500
|
+
localStorage.removeItem("archivos");
|
|
17501
|
+
};
|
|
17502
|
+
return React__default.createElement(Stack, {
|
|
17503
|
+
width: "100%",
|
|
17504
|
+
alignItems: "center",
|
|
17505
|
+
bgcolor: "transparent",
|
|
17506
|
+
height: "100%",
|
|
17507
|
+
gap: 1
|
|
17508
|
+
}, React__default.createElement(Stack, _objectSpread2({
|
|
17509
|
+
id: "dropzone",
|
|
17510
|
+
alignItems: "center",
|
|
17511
|
+
flexDirection: compact === true ? "row" : "column",
|
|
17512
|
+
justifyContent: "center",
|
|
17513
|
+
bgcolor: "transparent",
|
|
17514
|
+
width: "100%",
|
|
17515
|
+
boxShadow: 1,
|
|
17516
|
+
gap: 1,
|
|
17517
|
+
borderRadius: 1,
|
|
17518
|
+
py: 3,
|
|
17519
|
+
sx: _objectSpread2({
|
|
17520
|
+
border: function border(theme) {
|
|
17521
|
+
return "1px dashed ".concat(theme.palette.grey[500]);
|
|
17522
|
+
},
|
|
17523
|
+
cursor: "pointer",
|
|
17524
|
+
":hover": {
|
|
17525
|
+
backgroundColor: "action.hover"
|
|
17526
|
+
}
|
|
17527
|
+
}, sx)
|
|
17528
|
+
}, getRootProps()), React__default.createElement("input", _objectSpread2({}, getInputProps())), React__default.createElement("img", {
|
|
17529
|
+
src: "src/assets/logoAdjuntarArchivos.svg",
|
|
17530
|
+
alt: "icon"
|
|
17531
|
+
}), React__default.createElement(Stack, {
|
|
17532
|
+
gap: 0.5
|
|
17533
|
+
}, React__default.createElement(Typography, {
|
|
17534
|
+
variant: "body2",
|
|
17535
|
+
color: "text.primary"
|
|
17536
|
+
}, "Arrastrar o adjuntar archivos"), React__default.createElement(Typography, {
|
|
17537
|
+
variant: "caption",
|
|
17538
|
+
color: "text.secondary"
|
|
17539
|
+
}, "DOCX, XML, PNG, JPG \u2022 Max 00 MB")), React__default.createElement(Button, {
|
|
17540
|
+
size: "small",
|
|
17541
|
+
startIcon: React__default.createElement(AttachFile, {
|
|
17542
|
+
fontSize: "inherit"
|
|
17543
|
+
}),
|
|
17544
|
+
onClick: controlEventoAdjuntar
|
|
17545
|
+
}, "Adjuntar")), React__default.createElement(Stack, {
|
|
17546
|
+
id: "informacion",
|
|
17547
|
+
width: "100%",
|
|
17548
|
+
height: "auto",
|
|
17549
|
+
gap: 1,
|
|
17550
|
+
sx: {
|
|
17551
|
+
overflowY: "auto"
|
|
17552
|
+
}
|
|
17553
|
+
}, archivos.map(function (_ref5, index) {
|
|
17554
|
+
var file = _ref5.file,
|
|
17555
|
+
progress = _ref5.progress,
|
|
17556
|
+
loadingComplete = _ref5.loadingComplete;
|
|
17557
|
+
return React__default.createElement(Stack, {
|
|
17558
|
+
flexDirection: "row",
|
|
17559
|
+
key: "".concat(file.name, "-").concat(index),
|
|
17560
|
+
width: "100%",
|
|
17561
|
+
gap: 1,
|
|
17562
|
+
borderRadius: 0.5,
|
|
17563
|
+
sx: {
|
|
17564
|
+
":hover": {
|
|
17565
|
+
backgroundColor: "action.hover"
|
|
17566
|
+
}
|
|
17567
|
+
}
|
|
17568
|
+
}, React__default.createElement(Stack, {
|
|
17569
|
+
width: "100%",
|
|
17570
|
+
alignItems: "center",
|
|
17571
|
+
flexDirection: "row",
|
|
17572
|
+
gap: 2,
|
|
17573
|
+
p: 1
|
|
17574
|
+
}, React__default.createElement(Stack, {
|
|
17575
|
+
width: "100%",
|
|
17576
|
+
flexDirection: "row",
|
|
17577
|
+
alignItems: "center",
|
|
17578
|
+
gap: 0.5
|
|
17579
|
+
}, React__default.createElement(UploadFileOutlined, {
|
|
17580
|
+
color: "primary",
|
|
17581
|
+
fontSize: "small"
|
|
17582
|
+
}), React__default.createElement(Stack, {
|
|
17583
|
+
flexDirection: "column",
|
|
17584
|
+
width: "100%"
|
|
17585
|
+
}, React__default.createElement(Typography, {
|
|
17586
|
+
variant: "body2",
|
|
17587
|
+
color: "text.primary"
|
|
17588
|
+
}, file.name), React__default.createElement(Typography, {
|
|
17589
|
+
variant: "caption",
|
|
17590
|
+
color: "text.secondary"
|
|
17591
|
+
}, loadingComplete ? "".concat(new Date().toLocaleDateString(), " \u2022 ").concat(Math.round(file.size / 1024), " KB") : " Cargando... \u2022 ".concat(Math.round(file.size / 1024), " KB")), !loadingComplete && React__default.createElement(LinearProgress, {
|
|
17592
|
+
color: "primary",
|
|
17593
|
+
variant: "determinate",
|
|
17594
|
+
value: progress,
|
|
17595
|
+
sx: {
|
|
17596
|
+
width: "100%"
|
|
17597
|
+
}
|
|
17598
|
+
})))), React__default.createElement(Box$1, {
|
|
17599
|
+
display: "flex",
|
|
17600
|
+
justifyContent: "center",
|
|
17601
|
+
alignItems: "center"
|
|
17602
|
+
}, !loadingComplete ? React__default.createElement(React__default.Fragment, null, React__default.createElement(IconButton, {
|
|
17603
|
+
id: "editarArchivo",
|
|
17604
|
+
size: "small",
|
|
17605
|
+
onClick: function onClick() {
|
|
17606
|
+
return Editar(index);
|
|
17607
|
+
}
|
|
17608
|
+
}, React__default.createElement(Autorenew, {
|
|
17609
|
+
fontSize: "small",
|
|
17610
|
+
color: "action"
|
|
17611
|
+
})), React__default.createElement(IconButton, {
|
|
17612
|
+
id: "EliminarArchivo",
|
|
17613
|
+
size: "small",
|
|
17614
|
+
onClick: function onClick() {
|
|
17615
|
+
return Eliminar(index);
|
|
17616
|
+
}
|
|
17617
|
+
}, React__default.createElement(CancelOutlined, {
|
|
17618
|
+
fontSize: "small",
|
|
17619
|
+
color: "action"
|
|
17620
|
+
}))) : React__default.createElement(IconButton, {
|
|
17621
|
+
size: "medium",
|
|
17622
|
+
onClick: function onClick() {
|
|
17623
|
+
return Eliminar(index);
|
|
17624
|
+
}
|
|
17625
|
+
}, React__default.createElement(DeleteOutline, {
|
|
17626
|
+
fontSize: "small",
|
|
17627
|
+
color: "action"
|
|
17628
|
+
}))));
|
|
17629
|
+
})));
|
|
17630
|
+
};
|
|
17631
|
+
|
|
17296
17632
|
/**
|
|
17297
17633
|
* @license
|
|
17298
17634
|
* Copyright 2021 Google LLC
|
|
@@ -21706,4 +22042,4 @@ var useDynamicColor = function useDynamicColor(url) {
|
|
|
21706
22042
|
};
|
|
21707
22043
|
};
|
|
21708
22044
|
|
|
21709
|
-
export { AdproSincoTheme, CardRadio, DrawerComponent as Drawer, DrawerComponent, DynamicColor, EmptyStateComponent as EmptyState, EmptyStateComponent, FooterAction, Incognit, IncognitIcon, IncognitIconOutlined, IncognitOutlined, PageHeaderComponent as PageHeader, PageHeaderComponent, PageHeaderWraps, ProgressSinco, SincoTheme, ToastNotification, useDynamicColor };
|
|
22045
|
+
export { AdjuntarArchivo, AdproSincoTheme, CardRadio, DrawerComponent as Drawer, DrawerComponent, DynamicColor, EmptyStateComponent as EmptyState, EmptyStateComponent, FooterAction, Incognit, IncognitIcon, IncognitIconOutlined, IncognitOutlined, PageHeaderComponent as PageHeader, PageHeaderComponent, PageHeaderWraps, ProgressSinco, SincoTheme, ToastNotification, useDynamicColor };
|
package/package.json
CHANGED