@data-c/ui 0.2.92 → 0.2.93
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/dist/index.d.ts +57 -2
- package/dist/index.js +1476 -279
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1948 -751
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { ButtonProps as ButtonProps$3, StackProps, CheckboxProps as CheckboxProps$1, IconButtonProps, DrawerProps, TypographyProps, ToolbarProps as ToolbarProps$1, TextFieldProps as TextFieldProps$1, TooltipProps as TooltipProps$2, BoxProps, PaperProps, SvgIconProps, IconProps, ListProps, DialogProps as DialogProps$1, ChipProps, InputBaseProps, Breakpoint, TableFooterProps, MenuItemProps as MenuItemProps$2, PopoverProps, ContainerProps, AutocompleteInputChangeReason } from '@mui/material';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
5
|
-
import { CredentialsConfigsInterface, AmbienteDataInterface, Empresa, PaginationProps as PaginationProps$1 } from '@data-c/hooks';
|
|
5
|
+
import { CredentialsConfigsInterface, AmbienteDataInterface, Empresa, PaginationProps as PaginationProps$1, LoginDataInterface, DecodedTokenInterface, UsuarioModel } from '@data-c/hooks';
|
|
6
6
|
import * as _mui_material_styles from '@mui/material/styles';
|
|
7
7
|
export { Theme, ThemeOptions, ThemeProvider, createTheme, styled, useTheme } from '@mui/material/styles';
|
|
8
8
|
import { AvatarProps } from '@mui/material/Avatar';
|
|
@@ -1056,4 +1056,59 @@ declare const CurrencyTextField: React$1.ForwardRefExoticComponent<Omit<Omit<Tex
|
|
|
1056
1056
|
onChange?: ((e: React.ChangeEvent<HTMLInputElement>, value: any) => void) | undefined;
|
|
1057
1057
|
}, "ref"> & React$1.RefAttributes<unknown>>;
|
|
1058
1058
|
|
|
1059
|
-
|
|
1059
|
+
interface CredentialsContextType {
|
|
1060
|
+
login: (email: string, password: string) => Promise<LoginDataInterface | undefined>;
|
|
1061
|
+
logout: () => void;
|
|
1062
|
+
isSubmitting: boolean;
|
|
1063
|
+
token: string | null;
|
|
1064
|
+
refreshToken: string | null;
|
|
1065
|
+
userLogged: DecodedTokenInterface | null;
|
|
1066
|
+
isAuthenticated: boolean;
|
|
1067
|
+
selecionarLicenca: (loginToken?: string, empresaId?: string) => Promise<AmbienteDataInterface>;
|
|
1068
|
+
alterarSenha: (senhaAtual: string, senhaNova: string, email?: string) => Promise<any>;
|
|
1069
|
+
recuperarSenha: (email: string) => Promise<any>;
|
|
1070
|
+
refreshAccessToken: () => Promise<string>;
|
|
1071
|
+
obterUsuarioLogado: () => Promise<UsuarioModel>;
|
|
1072
|
+
uploadAvatar: (base64Image: string) => Promise<string>;
|
|
1073
|
+
atualizarUsuario: (data: UsuarioModel) => Promise<any>;
|
|
1074
|
+
gerarWhatsappVerificationCode: () => Promise<UsuarioModel>;
|
|
1075
|
+
validarCodigoWhatsapp: (codigoVerificacao: string) => Promise<LoginDataInterface>;
|
|
1076
|
+
gerarOtpVerificationCode: (data: {
|
|
1077
|
+
target: string;
|
|
1078
|
+
channel: 'whatsapp' | 'email';
|
|
1079
|
+
}) => Promise<UsuarioModel>;
|
|
1080
|
+
validarOtpVerificationCode: (data: {
|
|
1081
|
+
target: string;
|
|
1082
|
+
channel: 'whatsapp' | 'email';
|
|
1083
|
+
code: string;
|
|
1084
|
+
}) => Promise<LoginDataInterface | undefined>;
|
|
1085
|
+
}
|
|
1086
|
+
interface CredentialsProviderProps {
|
|
1087
|
+
children: ReactNode;
|
|
1088
|
+
credentialsConfig: CredentialsConfigsInterface;
|
|
1089
|
+
}
|
|
1090
|
+
declare function CredentialsProvider({ children, credentialsConfig, }: CredentialsProviderProps): react_jsx_runtime.JSX.Element;
|
|
1091
|
+
declare function useCredentialsContext(): CredentialsContextType;
|
|
1092
|
+
|
|
1093
|
+
interface AuthProps {
|
|
1094
|
+
onLoginSuccess: (tokens: AmbienteDataInterface) => void;
|
|
1095
|
+
onAlreadyLogged?: () => void;
|
|
1096
|
+
onLoginFailed: (err: any) => void;
|
|
1097
|
+
appName: string;
|
|
1098
|
+
banner?: ReactNode;
|
|
1099
|
+
loginSection?: ReactNode;
|
|
1100
|
+
}
|
|
1101
|
+
declare function Auth(props: AuthProps): react_jsx_runtime.JSX.Element;
|
|
1102
|
+
|
|
1103
|
+
interface AlterarSenhaPropsV2 {
|
|
1104
|
+
primeiroAcesso?: boolean;
|
|
1105
|
+
email?: string;
|
|
1106
|
+
senhaAtual?: string;
|
|
1107
|
+
isOpen: boolean;
|
|
1108
|
+
onClose: () => Promise<void>;
|
|
1109
|
+
onSuccess?: () => void;
|
|
1110
|
+
onFailed?: (err: any) => void;
|
|
1111
|
+
}
|
|
1112
|
+
declare function AlterarSenhaV2(props: AlterarSenhaPropsV2): react_jsx_runtime.JSX.Element;
|
|
1113
|
+
|
|
1114
|
+
export { AlterarLicenca, AlterarLicencaProps, AlterarSenha, AlterarSenhaProps, AlterarSenhaPropsV2, AlterarSenhaV2, Article, Auth, AuthProps, Autocomplete, AutocompleteProps, Avatar, Breadcrumbs, BreadcrumbsItem, BreadcrumbsProps, Button$1 as Button, ButtonContainer, Button as ButtonGroup, CEPTextField, CEPTextFieldProps, Card, Checkbox, CheckboxProps, ColorsGrid, Content$1 as Content, ContentProps, ContentTitle, CredentialsContextType, CredentialsProvider, CurrencyCellStyle, CurrencyTextField, DataTable, DataTableOptions, DataTableOptionsProps, DatePicker, DatePickerProvider, DateRange, DateRangePicker, Dialog, DocumentoTextField, DocumentoTextFieldProps, DrawerMenu, DrawerMenuProps, Editable, EditableProps, Filter, FilterApiContext, FilterApiContextProps, FilterContainer$1 as FilterContainer, FilterControl, FilterDataContext, FilterDataContextProps, FilterOptions, FilterProps, FilterProvider, FilterProviderProps, Flag, GridColDef, Header, Icon, IconName, LabelValue, LabelValueProps, List$1 as List, LucideIcon as LucidIcon, LucideIconComponent, LucideIconProps, Menu, MenuItemProps$1 as MenuItemProps, MioAuth, MioAuthProps, NotaVersao, OptionStyles, Page, PageTitle$1 as PageTitle, PasswordTextField, List as Popover, Profile, ProfileProps, SearchTextField, Surface, TelefoneTextField, TelefoneTextFieldProps, TextField, TextFieldProps, TipoDocumento, TipoTelefone, Title, TitleProps, TitleVariant, Tooltip, TooltipProps, TransportableDataTableProps, Transporter, TransporterBaseProps, TransporterValue, VersaoProps, renderMenuItems, theme, useCredentialsContext, useFilter, useFilterApi, useMenu, useTransporter };
|