@ramonbsales/noah-angular 1.0.0 → 1.1.1

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,104 +0,0 @@
1
- /**
2
- * Tipos e interfaces para autenticação
3
- */
4
- export interface LoginCredentials {
5
- email: string;
6
- password: string;
7
- }
8
- export interface LoginResponse {
9
- success: boolean;
10
- accessToken?: string;
11
- user?: UserInfo;
12
- expiresIn?: number;
13
- message?: string;
14
- errors?: string[];
15
- }
16
- export interface UserInfo {
17
- id: string;
18
- nome: string;
19
- email: string;
20
- perfil: string;
21
- permissoes: string[];
22
- avatar?: string;
23
- lastLogin?: Date;
24
- }
25
- export interface LogoutResponse {
26
- success: boolean;
27
- message?: string;
28
- }
29
- export interface RefreshTokenResponse {
30
- success: boolean;
31
- accessToken?: string;
32
- expiresIn?: number;
33
- message?: string;
34
- }
35
- /**
36
- * Estados do processo de login
37
- */
38
- export declare enum LoginStatus {
39
- IDLE = "IDLE",
40
- LOADING = "LOADING",
41
- SUCCESS = "SUCCESS",
42
- ERROR = "ERROR"
43
- }
44
- /**
45
- * Configurações opcionais para o login
46
- */
47
- export interface LoginOptions {
48
- title?: string;
49
- subtitle?: string;
50
- logoUrl?: string;
51
- backgroundUrl?: string;
52
- footerText?: string;
53
- redirectUrl?: string;
54
- showForgotPassword?: boolean;
55
- showRegisterLink?: boolean;
56
- passwordMinLength?: number;
57
- links?: {
58
- forgotPassword?: string;
59
- register?: string;
60
- termsOfService?: string;
61
- privacyPolicy?: string;
62
- };
63
- theme?: 'light' | 'dark' | 'auto';
64
- primaryColor?: string;
65
- }
66
- /**
67
- * Interface que a aplicação deve implementar para comunicação com o backend
68
- */
69
- export interface AuthProvider {
70
- /**
71
- * Realiza login no backend
72
- */
73
- login(credentials: LoginCredentials): Promise<LoginResponse>;
74
- /**
75
- * Realiza logout no backend
76
- */
77
- logout(): Promise<LogoutResponse>;
78
- /**
79
- * Renova o access token (opcional - se não implementado, usa apenas frontend)
80
- */
81
- refreshToken?(): Promise<RefreshTokenResponse>;
82
- /**
83
- * Verifica se o token ainda é válido no backend (opcional)
84
- */
85
- validateToken?(token: string): Promise<boolean>;
86
- }
87
- /**
88
- * Dados de erro de validação de formulário
89
- */
90
- export interface LoginValidationErrors {
91
- email?: string[];
92
- password?: string[];
93
- general?: string[];
94
- }
95
- /**
96
- * Estado completo do login para uso reativo
97
- */
98
- export interface LoginState {
99
- status: LoginStatus;
100
- user: UserInfo | null;
101
- isAuthenticated: boolean;
102
- errors: LoginValidationErrors;
103
- lastAttempt: Date | null;
104
- }
@@ -1,52 +0,0 @@
1
- /**
2
- * Interface para itens do menu lateral
3
- */
4
- export interface SidebarMenuItem {
5
- id: string;
6
- label: string;
7
- icon: string;
8
- route?: string;
9
- action?: () => void;
10
- children?: SidebarMenuItem[];
11
- isExpanded?: boolean;
12
- isActive?: boolean;
13
- disabled?: boolean;
14
- badge?: string | number;
15
- divider?: boolean;
16
- }
17
- /**
18
- * Configurações do sidebar
19
- */
20
- export interface SidebarConfig {
21
- width?: string;
22
- collapsedWidth?: string;
23
- position?: 'left' | 'right';
24
- collapsible?: boolean;
25
- autoCollapse?: boolean;
26
- overlay?: boolean;
27
- logo?: {
28
- src: string;
29
- alt: string;
30
- route?: string;
31
- };
32
- theme?: 'light' | 'dark';
33
- customCssClass?: string;
34
- }
35
- /**
36
- * Estado do sidebar
37
- */
38
- export interface SidebarState {
39
- isCollapsed: boolean;
40
- isMobile: boolean;
41
- isOverlayOpen: boolean;
42
- activeItemId?: string;
43
- }
44
- /**
45
- * Eventos emitidos pelo sidebar
46
- */
47
- export interface SidebarEvents {
48
- itemClick: SidebarMenuItem;
49
- toggle: boolean;
50
- overlayToggle: boolean;
51
- logoClick: void;
52
- }
package/public-api.d.ts DELETED
@@ -1,16 +0,0 @@
1
- export * from './lib/shared-components.service';
2
- export * from './lib/shared-components.component';
3
- export * from './lib/components/dropdown/dropdown.component';
4
- export * from './lib/components/input/input.component';
5
- export * from './lib/components/button/button.component';
6
- export * from './lib/components/checkbox/checkbox.component';
7
- export * from './lib/components/toggle/toggle.component';
8
- export * from './lib/components/breadcrumb/breadcrumb.component';
9
- export * from './lib/components/table/table.component';
10
- export * from './lib/sidebar/sidebar.component';
11
- export * from './lib/pages/login/login.component';
12
- export * from './lib/services';
13
- export { AUTH_PROVIDER } from './lib/services/login/login.service';
14
- export * from './lib/interceptors';
15
- export * from './lib/types/auth.types';
16
- export * from './lib/types/sidebar.types';