siam-ui-utils 2.0.26 → 2.0.27
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/package.json +8 -7
- package/src/App.jsx +4 -7
- package/src/archivos-adjuntos/dropzone-uploader-dni-digital/index.jsx +4 -5
- package/src/archivos-adjuntos/index.jsx +4 -5
- package/src/assets/css/sass/_gogo.style.scss +9012 -0
- package/src/assets/css/sass/_mixins.scss +118 -0
- package/src/assets/css/sass/_plugins.scss +1 -0
- package/src/assets/css/sass/ampf_style.scss +182 -0
- package/src/assets/css/sass/main.scss +11 -0
- package/src/assets/css/sass/plugins/react-table.scss +311 -0
- package/src/assets/css/sass/themes/gogo.light.redruby.scss +40 -0
- package/src/index.css +2 -2
- package/src/index.js +0 -1
- package/src/main.jsx +1 -1
- package/vite.config.ts +5 -0
- package/src/react-notifications/Notification.jsx +0 -89
- package/src/react-notifications/NotificationContainer.jsx +0 -53
- package/src/react-notifications/NotificationManager.js +0 -135
- package/src/react-notifications/Notifications.jsx +0 -66
- package/src/react-notifications/index.js +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "siam-ui-utils",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.27",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"ampf-react",
|
|
6
6
|
"ampf-utils",
|
|
@@ -42,19 +42,17 @@
|
|
|
42
42
|
"vite-plugin-commonjs": "^0.10.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
+
"@eslint/js": "^9.9.0",
|
|
45
46
|
"@testing-library/dom": "^10.4.0",
|
|
46
47
|
"@testing-library/jest-dom": "^6.4.8",
|
|
47
48
|
"@testing-library/react": "^16.0.0",
|
|
48
|
-
"@types/react-router-dom": "^5.3.3",
|
|
49
|
-
"@typescript-eslint/parser": "^8.2.0",
|
|
50
|
-
"copyfiles": "^2.4.1",
|
|
51
|
-
"@eslint/js": "^9.9.0",
|
|
52
49
|
"@types/react": "^18.3.3",
|
|
53
50
|
"@types/react-dom": "^18.3.0",
|
|
51
|
+
"@types/react-router-dom": "^5.3.3",
|
|
52
|
+
"@typescript-eslint/parser": "^8.2.0",
|
|
54
53
|
"@vitejs/plugin-react": "^4.3.1",
|
|
54
|
+
"copyfiles": "^2.4.1",
|
|
55
55
|
"eslint": "^9.9.0",
|
|
56
|
-
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
57
|
-
"eslint-plugin-react-refresh": "^0.4.9",
|
|
58
56
|
"eslint-config-airbnb": "^19.0.4",
|
|
59
57
|
"eslint-config-prettier": "^8.8.0",
|
|
60
58
|
"eslint-config-react-app": "^7.0.1",
|
|
@@ -62,6 +60,9 @@
|
|
|
62
60
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
63
61
|
"eslint-plugin-prettier": "^4.2.1",
|
|
64
62
|
"eslint-plugin-react": "^7.33.0",
|
|
63
|
+
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
64
|
+
"eslint-plugin-react-refresh": "^0.4.9",
|
|
65
|
+
"sass-embedded": "^1.79.4",
|
|
65
66
|
"vite": "^5.3.4",
|
|
66
67
|
"vite-plugin-eslint": "^1.8.1",
|
|
67
68
|
"vitest": "^2.0.5"
|
package/src/App.jsx
CHANGED
|
@@ -5,12 +5,7 @@ import {
|
|
|
5
5
|
AccordionHeader,
|
|
6
6
|
AccordionItem,
|
|
7
7
|
} from 'reactstrap';
|
|
8
|
-
import {
|
|
9
|
-
TomarFoto,
|
|
10
|
-
DropzoneUploader,
|
|
11
|
-
DropzoneUploaderDniDigital,
|
|
12
|
-
NotificationContainer,
|
|
13
|
-
} from './';
|
|
8
|
+
import { TomarFoto, DropzoneUploader, DropzoneUploaderDniDigital } from './';
|
|
14
9
|
import './index.css';
|
|
15
10
|
import './App.css';
|
|
16
11
|
import './assets/css/vendor/bootstrap.min.css';
|
|
@@ -27,7 +22,6 @@ const App = () => {
|
|
|
27
22
|
|
|
28
23
|
return (
|
|
29
24
|
<div>
|
|
30
|
-
<NotificationContainer />
|
|
31
25
|
<Accordion open={open} toggle={toggle}>
|
|
32
26
|
<AccordionItem>
|
|
33
27
|
<AccordionHeader targetId="1">Tomar Foto</AccordionHeader>
|
|
@@ -68,6 +62,9 @@ const App = () => {
|
|
|
68
62
|
onChangeFiles={() => {
|
|
69
63
|
console.log('onChange');
|
|
70
64
|
}}
|
|
65
|
+
onMaxFileSizeError={() => {
|
|
66
|
+
console.log('MAXIMO ARCHIVO PERMITIDO :>> ');
|
|
67
|
+
}}
|
|
71
68
|
/>
|
|
72
69
|
</AccordionBody>
|
|
73
70
|
</AccordionItem>
|
|
@@ -4,7 +4,6 @@ import { Button } from 'reactstrap';
|
|
|
4
4
|
import { getDroppedOrSelectedFiles } from 'html5-file-selector';
|
|
5
5
|
import Dropzone from 'react-dropzone-uploader';
|
|
6
6
|
import 'react-dropzone-uploader/dist/styles.css';
|
|
7
|
-
import { NotificationManager } from '../../react-notifications';
|
|
8
7
|
import { pdfImage, IconButtonSvg } from '../../iconos';
|
|
9
8
|
import '../dropzone-uploader.css';
|
|
10
9
|
|
|
@@ -15,6 +14,9 @@ export const DropzoneUploaderDniDigital = ({
|
|
|
15
14
|
totalFiles,
|
|
16
15
|
label = 'Cargar Dni',
|
|
17
16
|
maxSize = 2,
|
|
17
|
+
onMaxFileSizeError = () => {
|
|
18
|
+
alert('El archivo supera el tamaño máximo');
|
|
19
|
+
},
|
|
18
20
|
}) => {
|
|
19
21
|
const [files, setFiles] = useState([]);
|
|
20
22
|
|
|
@@ -47,10 +49,7 @@ export const DropzoneUploaderDniDigital = ({
|
|
|
47
49
|
const { meta, remove } = fileWithMeta;
|
|
48
50
|
console.log('meta.size :>> ', meta.size);
|
|
49
51
|
if (meta.size / (1024 * 1024) > maxSize) {
|
|
50
|
-
|
|
51
|
-
'El archivo supera el tamaño máximo',
|
|
52
|
-
'Advertencia',
|
|
53
|
-
);
|
|
52
|
+
onMaxFileSizeError();
|
|
54
53
|
remove();
|
|
55
54
|
}
|
|
56
55
|
return (
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import { getDroppedOrSelectedFiles } from 'html5-file-selector';
|
|
4
4
|
import Dropzone from 'react-dropzone-uploader';
|
|
5
|
-
import { NotificationManager } from 'react-notifications';
|
|
6
5
|
import 'react-dropzone-uploader/dist/styles.css';
|
|
7
6
|
import { IconButtonSvg, pdfImage } from '../iconos';
|
|
8
7
|
import './dropzone-uploader.css';
|
|
@@ -18,6 +17,9 @@ export const DropzoneUploader = ({
|
|
|
18
17
|
nameFileLabel = 'Subir archivos',
|
|
19
18
|
classNames = '',
|
|
20
19
|
maxFileSize = maxSize,
|
|
20
|
+
onMaxFileSizeError = () => {
|
|
21
|
+
alert('El archivo supera el tamaño máximo');
|
|
22
|
+
},
|
|
21
23
|
}) => {
|
|
22
24
|
const [files, setFiles] = useState([]);
|
|
23
25
|
const [totalFilesDU, setTotalFilesDU] = useState(totalFiles);
|
|
@@ -49,10 +51,7 @@ export const DropzoneUploader = ({
|
|
|
49
51
|
const CustomPreview = ({ fileWithMeta }) => {
|
|
50
52
|
const { meta, remove } = fileWithMeta;
|
|
51
53
|
if (meta.size / (1024 * 1024) > maxFileSize) {
|
|
52
|
-
|
|
53
|
-
'El archivo supera el tamaño máximo',
|
|
54
|
-
'Advertencia',
|
|
55
|
-
);
|
|
54
|
+
onMaxFileSizeError();
|
|
56
55
|
remove();
|
|
57
56
|
}
|
|
58
57
|
return (
|