@ssplib/react-components 0.0.317 → 0.0.319
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/components/form/input/Input.d.ts +3 -0
- package/components/form/input/MaskInput.d.ts +3 -6
- package/components/form/table/GenericTable.d.ts +1 -1
- package/components/form/table/Table.d.ts +1 -1
- package/components/form/table/types.d.ts +10 -1
- package/index.cjs +2 -2
- package/index.cjs.map +1 -1
- package/index.esm.js +2 -2
- package/index.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { IMaskConfig } from './MaskInput';
|
|
2
3
|
export declare function Input({ type, numberMask, xs, sm, inputMinLength, inputMaxLength, defaultValue, md, disabled, watchValue, ...props }: {
|
|
3
4
|
type: 'cnpj' | 'cpf' | 'input' | 'email' | 'cpf_cnpj' | 'phone' | 'input' | 'number' | 'rg' | 'password' | 'cep' | 'sei';
|
|
4
5
|
name: string;
|
|
@@ -14,6 +15,8 @@ export declare function Input({ type, numberMask, xs, sm, inputMinLength, inputM
|
|
|
14
15
|
sm?: number;
|
|
15
16
|
md?: number;
|
|
16
17
|
disabled?: boolean;
|
|
18
|
+
imaskConfig?: IMaskConfig;
|
|
19
|
+
customValidate?: (value: string, form: any) => string | undefined;
|
|
17
20
|
}): JSX.Element;
|
|
18
21
|
declare const _default: React.MemoExoticComponent<typeof Input>;
|
|
19
22
|
export default _default;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { IMaskInput } from 'react-imask';
|
|
3
|
+
export type IMaskConfig = Partial<React.ComponentProps<typeof IMaskInput>>;
|
|
2
4
|
export default function MaskInput(props: {
|
|
3
5
|
formConfig: object;
|
|
4
6
|
defaultValue?: string;
|
|
5
|
-
maskProps: {
|
|
6
|
-
mask: string | RegExp;
|
|
7
|
-
definitions?: {
|
|
8
|
-
[key: string]: string | RegExp;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
7
|
disabled?: boolean;
|
|
12
8
|
watchValue?: string;
|
|
13
9
|
onMask?: (value: string, setMask: React.Dispatch<React.SetStateAction<string>>) => void;
|
|
10
|
+
imaskConfig?: IMaskConfig;
|
|
14
11
|
}): JSX.Element;
|
|
@@ -3,6 +3,6 @@ import { TableProps2 } from './types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Tabela cujo dados devem ser passados via props
|
|
5
5
|
*/
|
|
6
|
-
export declare function GenericTable<T>({ mediaQueryLG, columns, 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, isLoading, }: TableProps2): JSX.Element;
|
|
6
|
+
export declare function GenericTable<T>({ mediaQueryLG, columns, 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, isLoading, alwaysExpanded, }: TableProps2): JSX.Element;
|
|
7
7
|
declare const _default: React.MemoExoticComponent<typeof GenericTable>;
|
|
8
8
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TableProps } from './types';
|
|
3
|
-
export declare function Table({ mediaQueryLG, columns, csvConfig, fetchFunc, emptyMsg, dataPath, tableName, columnSize, action, useKC, itemCount, expandTextMaxLength, collapsedSize, customMargin, customMarginMobile, filtersFunc, filters, orderBy, customErrorMsg, customTableStyle, id, initialData, isExpandable, }: TableProps): JSX.Element;
|
|
3
|
+
export declare function Table({ mediaQueryLG, columns, csvConfig, fetchFunc, emptyMsg, dataPath, tableName, columnSize, action, useKC, itemCount, expandTextMaxLength, collapsedSize, customMargin, customMarginMobile, filtersFunc, filters, orderBy, customErrorMsg, customTableStyle, id, initialData, isExpandable, alwaysExpanded, }: TableProps): JSX.Element;
|
|
4
4
|
declare const _default: React.MemoExoticComponent<typeof Table>;
|
|
5
5
|
export default _default;
|
|
@@ -72,7 +72,12 @@ export interface TableProps {
|
|
|
72
72
|
/** Mensagem de erro personalizada */
|
|
73
73
|
customErrorMsg?: string | ReactNode;
|
|
74
74
|
/** Colunas da tabela */
|
|
75
|
-
columns:
|
|
75
|
+
columns: {
|
|
76
|
+
keyName: string;
|
|
77
|
+
title: string;
|
|
78
|
+
customComponent?: (content: string, obj: any) => ReactNode;
|
|
79
|
+
size?: number;
|
|
80
|
+
}[];
|
|
76
81
|
/** Nome da tabela */
|
|
77
82
|
tableName: string;
|
|
78
83
|
csvConfig?: CsvConfigProp;
|
|
@@ -107,6 +112,8 @@ export interface TableProps {
|
|
|
107
112
|
isLoading?: boolean;
|
|
108
113
|
/** Flag para mostrar ou não o botão de expandir a Linha */
|
|
109
114
|
isExpandable?: boolean;
|
|
115
|
+
/** Flag para sempre manter as linhas expandidas */
|
|
116
|
+
alwaysExpanded?: boolean;
|
|
110
117
|
}
|
|
111
118
|
export interface TableProps2 {
|
|
112
119
|
/** ID único da tabela */
|
|
@@ -209,4 +216,6 @@ export interface TableProps2 {
|
|
|
209
216
|
isLoading?: boolean;
|
|
210
217
|
/** Flag para mostrar ou não o botão de expandir a Linha */
|
|
211
218
|
isExpandable?: boolean;
|
|
219
|
+
/** Flag para sempre manter as linhas expandidas */
|
|
220
|
+
alwaysExpanded?: boolean;
|
|
212
221
|
}
|