@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.
@@ -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: any[];
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
  }