@ssplib/react-components 0.0.211 → 0.0.213
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.
|
@@ -6,11 +6,13 @@ interface ColumnData {
|
|
|
6
6
|
size?: number;
|
|
7
7
|
}
|
|
8
8
|
type FilterTypes = 'a-z' | 'z-a' | 'items' | 'date-interval' | 'data-a-z' | 'data-z-a' | 'select';
|
|
9
|
-
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, filters, hideTitleCSV, csvExcludeUpper, filterSeparator, filterStorageName, multipleDataPath, }: {
|
|
9
|
+
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, filters, hideTitleCSV, csvExcludeUpper, filterSeparator, filterStorageName, multipleDataPath, customMargin, customMarginMobile, }: {
|
|
10
10
|
mediaQueryLG?: {
|
|
11
11
|
all: number;
|
|
12
12
|
action: number;
|
|
13
13
|
};
|
|
14
|
+
customMargin?: number;
|
|
15
|
+
customMarginMobile?: number;
|
|
14
16
|
normalize?: boolean;
|
|
15
17
|
csvUpper?: boolean;
|
|
16
18
|
multipleDataPath?: string;
|
|
@@ -64,7 +64,7 @@ let startData = [];
|
|
|
64
64
|
function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg = {
|
|
65
65
|
user: 'Nenhum dado encontrado',
|
|
66
66
|
public: 'Nenhum dado encontrado',
|
|
67
|
-
}, dataPath = '', tableName = 'Dados', 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, filters = {}, hideTitleCSV = false, csvExcludeUpper = [], filterSeparator = '|', filterStorageName = 'tableFilters', multipleDataPath = '', }) {
|
|
67
|
+
}, dataPath = '', tableName = 'Dados', 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, filters = {}, hideTitleCSV = false, csvExcludeUpper = [], filterSeparator = '|', filterStorageName = 'tableFilters', multipleDataPath = '', customMargin = 4, customMarginMobile = 0, }) {
|
|
68
68
|
const [isLoading, setIsLoading] = (0, react_1.useState)(true);
|
|
69
69
|
const [error, setError] = (0, react_1.useState)(null);
|
|
70
70
|
const [data, setData] = (0, react_1.useState)(null);
|
|
@@ -718,7 +718,7 @@ function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg = {
|
|
|
718
718
|
if (!userLoaded && useKC)
|
|
719
719
|
return react_1.default.createElement(material_1.LinearProgress, null);
|
|
720
720
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
721
|
-
react_1.default.createElement(material_1.Box, { marginX: isSmall ?
|
|
721
|
+
react_1.default.createElement(material_1.Box, { marginX: isSmall ? customMarginMobile : customMargin, bgcolor: 'white', p: 2, borderRadius: 6 },
|
|
722
722
|
react_1.default.createElement(material_1.Stack, { spacing: 1.5, direction: { xs: 'column', md: 'row' } },
|
|
723
723
|
react_1.default.createElement(material_1.Stack, { spacing: 1.5, direction: { xs: 'column', md: 'row' }, marginBottom: 2, height: '40px', width: '100%' },
|
|
724
724
|
react_1.default.createElement(TextField_1.default, { InputProps: {
|
|
@@ -906,7 +906,7 @@ function FetchSelectAutoComplete(props) {
|
|
|
906
906
|
.catch((e) => console.log('Erro ao buscar dados do filtro'));
|
|
907
907
|
}, []);
|
|
908
908
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
909
|
-
react_1.default.createElement(material_1.Autocomplete, { options: data,
|
|
909
|
+
react_1.default.createElement(material_1.Autocomplete, { options: data, onChange: props.onChange, sx: {
|
|
910
910
|
margin: 1,
|
|
911
911
|
}, size: 'small', renderInput: (params) => react_1.default.createElement(TextField_1.default, Object.assign({}, params, { label: props.label })) })));
|
|
912
912
|
}
|