@ssplib/react-components 0.0.276 → 0.0.278
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { DropzoneOptions } from 'react-dropzone';
|
|
3
|
+
export default function DropFileUpload({ name, tipoArquivo, title, required, multiple, apiURL, sizeLimit, xs, sm, md, route, tstToken, dropZoneOptions, }: {
|
|
3
4
|
name: string;
|
|
4
5
|
tipoArquivo: string;
|
|
5
6
|
title: string;
|
|
@@ -9,6 +10,7 @@ export default function DropFileUpload({ name, tipoArquivo, title, required, mul
|
|
|
9
10
|
required?: boolean;
|
|
10
11
|
multiple?: boolean;
|
|
11
12
|
sizeLimit?: number;
|
|
13
|
+
dropZoneOptions?: DropzoneOptions;
|
|
12
14
|
xs?: number;
|
|
13
15
|
sm?: number;
|
|
14
16
|
md?: number;
|
|
@@ -58,10 +58,8 @@ function LinearProgressWithLabel(props) {
|
|
|
58
58
|
react_1.default.createElement(material_1.Box, { sx: { minWidth: 3 } },
|
|
59
59
|
react_1.default.createElement(material_1.Typography, { variant: 'body2', color: 'text.secondary' }, `${Math.round(props.value)}%`))));
|
|
60
60
|
}
|
|
61
|
-
function DropFileUpload({ name, tipoArquivo, title, required = false, multiple = false, apiURL, sizeLimit = 4, xs = 12, sm, md, route = '', tstToken = '', }) {
|
|
62
|
-
const { getRootProps, getInputProps } = (0, react_dropzone_1.useDropzone)({
|
|
63
|
-
multiple,
|
|
64
|
-
onDrop: (dropFiles) => {
|
|
61
|
+
function DropFileUpload({ name, tipoArquivo, title, required = false, multiple = false, apiURL, sizeLimit = 4, xs = 12, sm, md, route = '', tstToken = '', dropZoneOptions, }) {
|
|
62
|
+
const { getRootProps, getInputProps } = (0, react_dropzone_1.useDropzone)(Object.assign({ multiple, useFsAccessApi: true, onDrop: (dropFiles) => {
|
|
65
63
|
const fileList = [];
|
|
66
64
|
setProgress(-1);
|
|
67
65
|
dropFiles
|
|
@@ -119,8 +117,7 @@ function DropFileUpload({ name, tipoArquivo, title, required = false, multiple =
|
|
|
119
117
|
removeFile(id);
|
|
120
118
|
});
|
|
121
119
|
});
|
|
122
|
-
},
|
|
123
|
-
});
|
|
120
|
+
} }, (dropZoneOptions || {})));
|
|
124
121
|
const context = (0, react_1.useContext)(form_1.FormContext);
|
|
125
122
|
const { user } = (0, react_1.useContext)(auth_1.AuthContext);
|
|
126
123
|
const theme = (0, material_1.useTheme)();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableProps } from './types';
|
|
3
|
-
export declare function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg, dataPath, tableName, csv, columnSize, action, useKC, statusKeyName, csvExcludeKeys, csvExcludeKeysCSV, csvExcludeKeysAll, csvCustomKeyNames, csvExcludeValidate, csvButtonTitle, csvNoZipText, csvAllButtonTitle, removeQuotes, normalize, csvShowAllButton, csvWithoutZip, itemCount, csvUpper, csvZipFileNamesKey, generateCsvZip, hideTitleCSV, csvExcludeUpper, multipleDataPath, expandTextMaxLength, collapsedSize, customMargin, customMarginMobile, filtersFunc, filters, orderBy, customErrorMsg, customTableStyle, id, initialData, }: TableProps): JSX.Element;
|
|
3
|
+
export declare function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg, dataPath, tableName, csv, columnSize, action, useKC, statusKeyName, csvExcludeKeys, csvExcludeKeysCSV, csvExcludeKeysAll, csvCustomKeyNames, csvExcludeValidate, csvButtonTitle, csvNoZipText, csvAllButtonTitle, removeQuotes, normalize, csvShowAllButton, csvWithoutZip, itemCount, csvUpper, csvZipFileNamesKey, generateCsvZip, hideTitleCSV, csvExcludeUpper, multipleDataPath, expandTextMaxLength, collapsedSize, customMargin, customMarginMobile, filtersFunc, filters, orderBy, customErrorMsg, customTableStyle, id, initialData, isExpandable, }: TableProps): JSX.Element;
|
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof Table>;
|
|
5
5
|
export default _default;
|
|
@@ -53,7 +53,7 @@ let localTableNameCache = '';
|
|
|
53
53
|
function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg = {
|
|
54
54
|
user: 'Nenhum dado encontrado',
|
|
55
55
|
public: 'Nenhum dado encontrado',
|
|
56
|
-
}, dataPath = '', tableName = 'Dado', csv, columnSize, action, useKC = true, statusKeyName = '', csvExcludeKeys = [], csvExcludeKeysCSV = [], csvExcludeKeysAll = [], csvCustomKeyNames = {}, csvExcludeValidate = (key, value) => false, csvButtonTitle = 'Salvar .CSV', csvNoZipText = 'Salvar .CSV', csvAllButtonTitle = 'Salvar todos em CSV', removeQuotes = false, normalize = false, csvShowAllButton = false, csvWithoutZip = false, itemCount = 10, csvUpper = false, csvZipFileNamesKey = '', generateCsvZip = false, hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMaxLength = 50, collapsedSize = 53, customMargin = 4, customMarginMobile = 0, filtersFunc, filters = [], orderBy = [], customErrorMsg = undefined, customTableStyle = {}, id, initialData = null, }) {
|
|
56
|
+
}, dataPath = '', tableName = 'Dado', csv, columnSize, action, useKC = true, statusKeyName = '', csvExcludeKeys = [], csvExcludeKeysCSV = [], csvExcludeKeysAll = [], csvCustomKeyNames = {}, csvExcludeValidate = (key, value) => false, csvButtonTitle = 'Salvar .CSV', csvNoZipText = 'Salvar .CSV', csvAllButtonTitle = 'Salvar todos em CSV', removeQuotes = false, normalize = false, csvShowAllButton = false, csvWithoutZip = false, itemCount = 10, csvUpper = false, csvZipFileNamesKey = '', generateCsvZip = false, hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMaxLength = 50, collapsedSize = 53, customMargin = 4, customMarginMobile = 0, filtersFunc, filters = [], orderBy = [], customErrorMsg = undefined, customTableStyle = {}, id, initialData = null, isExpandable = true, }) {
|
|
57
57
|
var _a;
|
|
58
58
|
const [isLoading, setIsLoading] = (0, react_1.useState)(false);
|
|
59
59
|
const [error, setError] = (0, react_1.useState)(null);
|
|
@@ -360,7 +360,7 @@ function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg = {
|
|
|
360
360
|
startIcon: react_1.default.createElement(icons_material_1.KeyboardArrowDown, null),
|
|
361
361
|
fullWidth: true,
|
|
362
362
|
} }, "Ordenar"),
|
|
363
|
-
react_1.default.createElement(material_1.Button, { variant: 'contained', fullWidth: true, startIcon: isExpandAll ? react_1.default.createElement(icons_material_1.KeyboardArrowUp, null) : react_1.default.createElement(icons_material_1.KeyboardArrowDown, null), sx: {
|
|
363
|
+
isExpandable && (react_1.default.createElement(material_1.Button, { variant: 'contained', fullWidth: true, startIcon: isExpandAll ? react_1.default.createElement(icons_material_1.KeyboardArrowUp, null) : react_1.default.createElement(icons_material_1.KeyboardArrowDown, null), sx: {
|
|
364
364
|
backgroundColor: '#637082',
|
|
365
365
|
':hover': {
|
|
366
366
|
backgroundColor: '#3c4757',
|
|
@@ -370,7 +370,7 @@ function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg = {
|
|
|
370
370
|
padding: {
|
|
371
371
|
md: '0px 8px',
|
|
372
372
|
},
|
|
373
|
-
}, onClick: expandAll }, isExpandAll ? 'Recolher' : 'Expandir'))),
|
|
373
|
+
}, onClick: expandAll }, isExpandAll ? 'Recolher' : 'Expandir')))),
|
|
374
374
|
react_1.default.createElement(material_1.Stack, { alignItems: 'end', width: { xs: '100%', md: '20%' }, direction: { xs: 'row', md: 'column' }, spacing: { xs: 1, md: 0 } },
|
|
375
375
|
react_1.default.createElement(Typography_1.default, { fontWeight: 600, textAlign: 'end' },
|
|
376
376
|
"Registro de ",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssplib/react-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.278",
|
|
4
4
|
"description": "SSP React Components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Pedro Henrique <sr.hudrick@gmail.com>",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"keycloak-js": "^25.0.1",
|
|
22
22
|
"react-toastify": "^10.0.4",
|
|
23
23
|
"axios": "^1.6.7",
|
|
24
|
-
"react-dropzone": "^14.
|
|
24
|
+
"react-dropzone": "^14.3.8",
|
|
25
25
|
"leaflet": "^1.9.4",
|
|
26
26
|
"leaflet-defaulticon-compatibility": "^0.1.2",
|
|
27
27
|
"react-leaflet": "^4.2.1"
|