@ramonbsales/noah-angular 1.0.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ramonbsales-noah-angular.mjs","sources":["../../../projects/shared-components/src/lib/shared-components.service.ts","../../../projects/shared-components/src/lib/shared-components.component.ts","../../../projects/shared-components/src/lib/components/dropdown/dropdown.component.ts","../../../projects/shared-components/src/lib/components/dropdown/dropdown.component.html","../../../projects/shared-components/src/lib/components/input/input.component.ts","../../../projects/shared-components/src/lib/components/input/input.component.html","../../../projects/shared-components/src/lib/components/button/button.component.ts","../../../projects/shared-components/src/lib/components/button/button.component.html","../../../projects/shared-components/src/lib/components/checkbox/checkbox.component.ts","../../../projects/shared-components/src/lib/components/checkbox/checkbox.component.html","../../../projects/shared-components/src/lib/components/toggle/toggle.component.ts","../../../projects/shared-components/src/lib/components/toggle/toggle.component.html","../../../projects/shared-components/src/lib/components/breadcrumb/breadcrumb.component.ts","../../../projects/shared-components/src/lib/components/breadcrumb/breadcrumb.component.html","../../../projects/shared-components/src/lib/components/table/table.component.ts","../../../projects/shared-components/src/lib/components/table/table.component.html","../../../projects/shared-components/src/lib/sidebar/sidebar.component.ts","../../../projects/shared-components/src/lib/sidebar/sidebar.component.html","../../../projects/shared-components/src/lib/types/auth.types.ts","../../../projects/shared-components/src/lib/services/local-storage/local-storage.service.ts","../../../projects/shared-components/src/lib/services/local-storage/auth-storage.service.ts","../../../projects/shared-components/src/lib/services/login/login.service.ts","../../../projects/shared-components/src/lib/pages/login/login.component.ts","../../../projects/shared-components/src/lib/pages/login/login.component.html","../../../projects/shared-components/src/lib/interceptors/auth.interceptor.ts","../../../projects/shared-components/src/lib/interceptors/index.ts","../../../projects/shared-components/src/public-api.ts","../../../projects/shared-components/src/ramonbsales-noah-angular.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SharedComponentsService {\n\n constructor() { }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-shared-components',\n imports: [],\n template: `\n <p>\n shared-components works!\n </p>\n `,\n styles: ``\n})\nexport class SharedComponentsComponent {\n\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input, OnInit, forwardRef, OnChanges, SimpleChanges, Output, EventEmitter } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';\n\n@Component({\n selector: 'lib-dropdown',\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './dropdown.component.html',\n styleUrls: ['./dropdown.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DropdownComponent),\n multi: true\n }\n ]\n})\nexport class DropdownComponent implements OnInit, OnChanges, ControlValueAccessor {\n\n @Input() public label: string = 'Nome do campo';\n @Input() public placeholder: string = 'Selecione uma opção';\n @Input() public options: { value: any, label: any }[] = [];\n @Input() public disabled: boolean = false;\n @Input() public required: boolean = false;\n @Input() public errorMessage: string = 'Campo obrigatório';\n @Input() public selectedOption: any = null;\n @Input() public hideLabel: boolean = false;\n\n @Output() valueChange = new EventEmitter<any>();\n\n private internalValue: any = null;\n public isOpen: boolean = false;\n\n // ControlValueAccessor implementation\n private onChange = (value: any) => { };\n private onTouched = () => { };\n\n constructor() { }\n\n ngOnInit() {\n // Se selectedOption foi passado como Input, use-o como valor inicial\n if (this.selectedOption !== null && this.selectedOption !== undefined) {\n this.internalValue = this.selectedOption;\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Detecta mudanças no selectedOption Input\n if (changes['selectedOption'] && !changes['selectedOption'].firstChange) {\n const newValue = changes['selectedOption'].currentValue;\n if (newValue !== this.internalValue) {\n this.internalValue = newValue;\n }\n }\n }\n\n public selectOption(option: { value: any, label: any }): void {\n this.internalValue = option.value;\n this.isOpen = false;\n this.onChange(option.value);\n this.onTouched();\n this.valueChange.emit(option.value);\n }\n\n public toggleDropdown(): void {\n if (!this.disabled) {\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n this.onTouched();\n }\n }\n }\n\n public getSelectedLabel(): string {\n if (this.internalValue !== null && this.internalValue !== undefined) {\n const option = this.options.find(opt => opt.value === this.internalValue);\n return option ? option.label : '';\n }\n return this.placeholder;\n }\n\n public hasValue(): boolean {\n return this.internalValue !== null && this.internalValue !== undefined;\n }\n\n // ControlValueAccessor methods\n writeValue(value: any): void {\n this.internalValue = value;\n this.valueChange.emit(value);\n }\n\n registerOnChange(fn: (value: any) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n}\n","<label *ngIf=\"!hideLabel\" for=\"\">{{label}}</label>\n<div class=\"dropdown\" tabindex=\"0\" (blur)=\"isOpen = false\">\n <button class=\"btn btn-light w-100 text-start d-flex justify-content-between align-items-center\" type=\"button\"\n (click)=\"toggleDropdown()\" [attr.aria-expanded]=\"isOpen\" [disabled]=\"disabled\">\n <span class=\"select-option-text\" *ngIf=\"hasValue()\">{{ getSelectedLabel() }}</span>\n <span class=\"placeholder-text\" *ngIf=\"!hasValue()\">{{ getSelectedLabel() }}</span>\n <span class=\"material-icons\">\n unfold_more\n </span>\n </button>\n <ul class=\"dropdown-menu w-100 show\" *ngIf=\"isOpen\">\n <li *ngFor=\"let option of options\">\n <a class=\"dropdown-item\" (click)=\"selectOption(option)\">{{ option.label }}</a>\n </li>\n </ul>\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, Input, OnInit, forwardRef, Injector } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormControl, NgControl } from '@angular/forms';\n\nexport type InputType = 'text' | 'number' | 'date' | 'email' | 'password';\n\n@Component({\n selector: 'lib-input',\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './input.component.html',\n styleUrls: ['./input.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputComponent),\n multi: true\n }\n ]\n})\nexport class InputComponent implements OnInit, ControlValueAccessor {\n\n @Input() public label: string = 'Nome do campo';\n @Input() public placeholder: string = 'Digite aqui...';\n @Input() public type: InputType = 'text';\n @Input() public customErrorMessages: { [key: string]: string } = {};\n\n // Detects if the field is required based on FormControl validator\n public get isRequired(): boolean {\n if (this.control?.control?.validator) {\n const validator = this.control.control.validator({} as FormControl);\n return !!(validator && validator['required']);\n }\n return false;\n }\n\n // Detects if the field is disabled\n public get isDisabled(): boolean {\n return (this.control?.control?.disabled ?? false);\n }\n\n public value: any = '';\n public isFocused: boolean = false;\n public control?: NgControl;\n\n // ControlValueAccessor implementation\n private onChange = (value: any) => { };\n private onTouched = () => { };\n\n // Mapeamento padrão de mensagens de erro\n private defaultErrorMessages: { [key: string]: string } = {\n required: 'Campo obrigatório',\n email: 'Email inválido',\n minlength: 'Muito curto',\n maxlength: 'Muito longo',\n min: 'Valor muito baixo',\n max: 'Valor muito alto',\n pattern: 'Formato inválido'\n };\n\n constructor(private injector: Injector) { }\n\n ngOnInit() {\n // Injeta o NgControl para acessar os erros do FormControl\n this.control = this.injector.get(NgControl, null) || undefined;\n }\n\n public onFocus(): void {\n this.isFocused = true;\n this.onTouched();\n }\n\n public onBlur(): void {\n this.isFocused = false;\n }\n\n public onInput(event: Event): void {\n const target = event.target as HTMLInputElement;\n let newValue: any = target.value;\n\n // Conversão de tipos\n if (this.type === 'number') {\n newValue = newValue === '' ? null : Number(newValue);\n }\n\n this.value = newValue;\n this.onChange(newValue);\n }\n\n // Verifica se deve mostrar erro\n public get showError(): boolean {\n return !!(this.control?.invalid && (this.control?.dirty || this.control?.touched));\n }\n\n public get showRequiredAsterisk(): boolean {\n return !!this.isRequired && !!this.control?.invalid;\n }\n\n // Obtém a mensagem de erro do FormControl\n public get errorMessage(): string {\n if (!this.control?.errors) {\n return '';\n }\n\n const errors = this.control.errors;\n\n // Primeiro verifica se há mensagem customizada\n for (const errorKey in errors) {\n if (this.customErrorMessages[errorKey]) {\n const errorValue = errors[errorKey];\n return this.interpolateErrorMessage(this.customErrorMessages[errorKey], errorValue);\n }\n }\n\n // Depois verifica mensagens padrão\n for (const errorKey in errors) {\n if (this.defaultErrorMessages[errorKey]) {\n const errorValue = errors[errorKey];\n return this.interpolateErrorMessage(this.defaultErrorMessages[errorKey], errorValue);\n }\n }\n\n // Retorna erro genérico se não encontrar mensagem específica\n return 'Campo inválido';\n }\n\n // Interpola valores dinâmicos na mensagem de erro\n private interpolateErrorMessage(message: string, errorValue: any): string {\n if (typeof errorValue === 'object') {\n // Para erros como minlength, maxlength, min, max\n if (errorValue.requiredLength) {\n message = message.replace('{{requiredLength}}', errorValue.requiredLength);\n message = message.replace('{{actualLength}}', errorValue.actualLength);\n }\n if (errorValue.min !== undefined) {\n message = message.replace('{{min}}', errorValue.min);\n message = message.replace('{{actual}}', errorValue.actual);\n }\n if (errorValue.max !== undefined) {\n message = message.replace('{{max}}', errorValue.max);\n message = message.replace('{{actual}}', errorValue.actual);\n }\n }\n return message;\n }\n\n private validateField(): void {\n // Removido - agora usa a validação do FormControl\n }\n\n public hasValue(): boolean {\n return this.value !== null && this.value !== undefined && this.value !== '';\n }\n\n // ControlValueAccessor methods\n writeValue(value: any): void {\n this.value = value;\n }\n\n registerOnChange(fn: (value: any) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n}\n","<div class=\"form-group\">\n\n <label>{{ label }}\n <span class=\"required-asterisk\" *ngIf=\"showRequiredAsterisk\">*</span>\n </label>\n\n <div class=\"input-container\" [class.focused]=\"isFocused\" [class.has-value]=\"hasValue()\" [class.disabled]=\"isDisabled\"\n [class.error]=\"showError\">\n\n <input [type]=\"type\" [placeholder]=\"placeholder\" [value]=\"value || ''\" [disabled]=\"isDisabled\"\n [required]=\"isRequired\" (input)=\"onInput($event)\" (focus)=\"onFocus()\" (blur)=\"onBlur()\"\n [ngClass]=\"{'error': showError}\" />\n </div>\n\n <small class=\"form-text error\" *ngIf=\"showError\">\n {{ errorMessage }}\n </small>\n\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'lib-button',\n imports: [CommonModule],\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss']\n})\nexport class ButtonComponent {\n\n @Input() public title: string = 'Salvar informação';\n @Input() public backgroundColor: string = '#007bff';\n @Input() public color: string = '#fff';\n @Input() public borderColor: string = '#007bff';\n @Input() public minWidth: string = '8rem';\n @Input() public disabled: boolean = false;\n\n @Input() public loading: boolean = false;\n @Input() public loadingText: string = 'Carregando...';\n\n @Output() public onClickEvent: EventEmitter<void> = new EventEmitter<void>();\n\n public onClick(): void {\n if (!this.loading && !this.disabled) {\n this.onClickEvent.emit();\n }\n }\n}\n","<button type=\"button\" class=\"btn\" [style.background-color]=\"backgroundColor\" [style.color]=\"color\"\n [style.border-color]=\"borderColor\" [style.min-width]=\"minWidth\" [disabled]=\"disabled || loading\"\n (click)=\"onClick()\">\n <span *ngIf=\"loading\" class=\"spinner-border spinner-border-sm me-2\" role=\"status\" aria-hidden=\"true\"></span>\n <span *ngIf=\"!loading\">{{title}}</span>\n <span *ngIf=\"loading\">{{loadingText}}</span>\n</button>","import { CommonModule } from '@angular/common';\nimport { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\n\n@Component({\n selector: 'lib-checkbox',\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './checkbox.component.html',\n styleUrls: ['./checkbox.component.scss']\n})\nexport class CheckboxComponent {\n /** Array de opções: [{ label: string, value: any }] */\n @Input() options: Array<{ label: string; value: any }> = [];\n /** Se true, permite múltipla seleção */\n @Input() multiple = false;\n /** FormControl do Reactive Forms */\n @Input() control?: FormControl;\n /** Emite valor selecionado ao pai (opcional) */\n @Output() selectedChange = new EventEmitter<any[] | any>();\n\n get disabled(): boolean {\n return !!this.control?.disabled;\n }\n\n get selected(): any[] | any {\n return this.control?.value;\n }\n\n isChecked(value: any): boolean {\n if (this.multiple) {\n return Array.isArray(this.selected) && this.selected.includes(value);\n }\n return this.selected === value;\n }\n\n onOptionChange(event: Event, value: any) {\n if (this.disabled) return;\n if (this.multiple) {\n const checked = (event.target as HTMLInputElement).checked;\n let newSelected = Array.isArray(this.selected) ? [...this.selected] : [];\n if (checked) {\n if (!newSelected.includes(value)) newSelected.push(value);\n } else {\n newSelected = newSelected.filter(v => v !== value);\n }\n this.control?.setValue(newSelected);\n this.control?.markAsDirty();\n this.selectedChange.emit(newSelected);\n } else {\n this.control?.setValue(value);\n this.control?.markAsDirty();\n this.selectedChange.emit(value);\n }\n }\n\n get showError(): boolean {\n return !!this.control && this.control.invalid && (this.control.dirty || this.control.touched);\n }\n\n get errorMessage(): string | null {\n if (!this.control || !this.control.errors) return null;\n if (this.control.errors['required']) return 'Seleção obrigatória.';\n // Adicione outras mensagens customizadas conforme necessário\n return 'Valor inválido.';\n }\n}\n","<div *ngFor=\"let option of options; let i = index\"\n style=\"display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem;\">\n\n <input class=\"form-check-input\" [type]=\"multiple ? 'checkbox' : 'radio'\"\n [name]=\"multiple ? 'checkbox-group' : 'radio-group'\" [value]=\"option.value\" [checked]=\"isChecked(option.value)\"\n [disabled]=\"disabled\" (change)=\"onOptionChange($event, option.value)\" />\n <span>{{ option.label }}</span>\n</div>\n<div *ngIf=\"showError\" class=\"text-danger small mt-1\">\n {{ errorMessage }}\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, Input, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'lib-toggle',\n imports: [CommonModule],\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true\n }\n ]\n})\nexport class ToggleComponent implements ControlValueAccessor {\n @Input() title = '';\n @Input() enableTitle = false;\n\n value = false;\n onChange = (value: boolean) => { };\n onTouched = () => { };\n\n writeValue(value: boolean): void {\n this.value = value;\n }\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n toggle() {\n this.value = !this.value;\n this.onChange(this.value);\n this.onTouched();\n }\n}\n","<div class=\"form-check form-switch centered-toggle\">\n <div>\n <input class=\"form-check-input\" type=\"checkbox\" [checked]=\"value\" (change)=\"toggle()\" />\n </div>\n <span *ngIf=\"enableTitle\">{{ title }}</span>\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\n@Component({\n selector: 'lib-breadcrumb',\n imports: [RouterModule, CommonModule],\n templateUrl: './breadcrumb.component.html',\n styleUrls: ['./breadcrumb.component.scss']\n})\nexport class BreadcrumbComponent {\n\n @Input() public items: Array<{ label: string, url?: string }> = [];\n\n}\n","<nav class=\"breadcrumb\">\n <ol class=\"breadcrumb-list\">\n <li class=\"breadcrumb-item\" *ngFor=\"let item of items; let last = last\">\n <a *ngIf=\"!last\" [routerLink]=\"item.url\">{{ item.label }}</a>\n <span *ngIf=\"last\">{{ item.label }}</span>\n </li>\n </ol>\n</nav>","import { CommonModule } from '@angular/common';\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { DropdownComponent } from '../dropdown/dropdown.component';\n\nexport interface TableAction {\n title: string;\n callback: (row: any) => void;\n icon?: string; // opcional, caso queira um ícone para a ação\n}\n\nexport interface TableColumn {\n title: string;\n prop: string;\n sortable?: boolean;\n width?: string;\n actions?: TableAction[]; // Adiciona as ações à coluna\n}\n\n@Component({\n selector: 'lib-table',\n imports: [CommonModule, DropdownComponent],\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss']\n})\nexport class TableComponent {\n\n @Input() public columns: TableColumn[] = [];\n @Input() public data: any[] = [];\n @Input() public columnTypes: { [key: string]: 'string' | 'date' | 'time' | 'tag' } = {};\n @Input() public page: number = 1;\n @Input() public pageSize: number = 10;\n @Input() public totalItems: number = 0;\n @Input() public pageSizeOptions: { value: number, label: string }[] = [\n { value: 5, label: '5' },\n { value: 10, label: '10' },\n { value: 20, label: '20' },\n { value: 50, label: '50' }\n ];\n\n @Output() pageChange = new EventEmitter<number>();\n @Output() pageSizeChange = new EventEmitter<number>();\n\n get hasActions(): boolean {\n return this.columns.some(c => !!c.actions && c.actions.length > 0);\n }\n\n get actionsList(): TableAction[] {\n const col = this.columns.find((c: TableColumn) => !!c.actions && c.actions.length > 0);\n return col?.actions || [];\n }\n\n public onPageSizeChange(newSize: number): void {\n this.pageSizeChange.emit(newSize);\n }\n\n // Paginação\n get totalPages(): number {\n return Math.max(1, Math.ceil(this.totalItems / this.pageSize));\n }\n\n get currentPage(): number {\n return this.page;\n }\n\n goToPage(page: number) {\n if (page < 1 || page > this.totalPages || page === this.currentPage) return;\n this.pageChange.emit(page);\n }\n\n getPages(): (number | string)[] {\n const pages: (number | string)[] = [];\n const total = this.totalPages;\n const current = this.currentPage;\n if (total <= 8) {\n for (let i = 1; i <= total; i++) pages.push(i);\n } else {\n if (current <= 4) {\n for (let i = 1; i <= 5; i++) pages.push(i);\n pages.push('...');\n pages.push(total - 1, total);\n } else if (current >= total - 3) {\n pages.push(1, 2);\n pages.push('...');\n for (let i = total - 4; i <= total; i++) pages.push(i);\n } else {\n pages.push(1, 2);\n pages.push('...');\n for (let i = current - 1; i <= current + 1; i++) pages.push(i);\n pages.push('...');\n pages.push(total - 1, total);\n }\n }\n return pages;\n }\n\n toNumber(val: any): number {\n return typeof val === 'number' ? val : parseInt(val, 10);\n }\n}\n","<table class=\"table\">\n <thead class=\"table-light\">\n <tr>\n <ng-container *ngFor=\"let col of columns\">\n <th [style.width]=\"col.width || null\">\n {{ col.title }}\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let row of data\">\n <ng-container *ngFor=\"let col of columns\">\n <td class=\"align-middle\">\n <ng-container *ngIf=\"!col.actions\" [ngSwitch]=\"columnTypes[col.prop]\">\n <ng-container *ngSwitchCase=\"'date'\">{{ row[col.prop] | date:'dd/MM/yyyy' }}</ng-container>\n <ng-container *ngSwitchCase=\"'time'\">{{ row[col.prop] | date:'HH:mm' }}</ng-container>\n <ng-container *ngSwitchCase=\"'tag'\">\n <span class=\"badge rounded-pill\" [ngClass]=\"row[col.prop + 'Class'] || 'text-bg-dark'\">{{\n row[col.prop] }}</span>\n </ng-container>\n <ng-container *ngSwitchDefault>{{ row[col.prop] }}</ng-container>\n </ng-container>\n <ng-container *ngIf=\"col.actions\">\n <div class=\"dropdown\">\n <button class=\"btn btn-light btn-sm\" type=\"button\" data-bs-toggle=\"dropdown\"\n aria-expanded=\"false\">\n <i class=\"material-icons align-middle\">more_horiz</i>\n </button>\n <ul class=\"dropdown-menu\">\n <li *ngFor=\"let action of col.actions\">\n <a class=\"dropdown-item\" href=\"#\"\n (click)=\"action.callback(row); $event.preventDefault()\">\n <i *ngIf=\"action.icon\" class=\"material-icons align-middle me-2\">{{ action.icon\n }}</i>\n {{ action.title }}\n </a>\n </li>\n </ul>\n </div>\n </ng-container>\n </td>\n </ng-container>\n </tr>\n </tbody>\n</table>\n\n<!-- Paginator -->\n<nav aria-label=\"Tabela paginação\" class=\"d-flex justify-content-between mt-3\">\n <lib-dropdown [options]=\"pageSizeOptions\" placeholder=\"Tamanho da página\" [selectedOption]=\"pageSize\"\n [hideLabel]=\"true\" (valueChange)=\"onPageSizeChange($event)\"></lib-dropdown>\n\n <ul *ngIf=\"totalPages > 1\" class=\"pagination pagination-sm\">\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <button class=\"page-link\" (click)=\"goToPage(currentPage - 1)\" [disabled]=\"currentPage === 1\">\n <i class=\"material-icons align-middle\">chevron_left</i>\n </button>\n </li>\n <ng-container *ngFor=\"let page of getPages()\">\n <li class=\"page-item\" *ngIf=\"page !== '...'\" [class.active]=\"page === currentPage\">\n <button class=\"page-link\" (click)=\"goToPage(toNumber(page))\" [disabled]=\"page === currentPage\">{{ page\n }}</button>\n </li>\n <li class=\"page-item disabled\" *ngIf=\"page === '...'\"><span class=\"page-link\">...</span></li>\n </ng-container>\n <li class=\"page-item\" [class.disabled]=\"currentPage === totalPages\">\n <button class=\"page-link\" (click)=\"goToPage(currentPage + 1)\" [disabled]=\"currentPage === totalPages\">\n <i class=\"material-icons align-middle\">chevron_right</i>\n </button>\n </li>\n </ul>\n</nav>","import { Component, Input, Output, EventEmitter, OnInit, OnDestroy, HostListener, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Router } from '@angular/router';\nimport { BehaviorSubject, Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { SidebarMenuItem, SidebarConfig, SidebarState, SidebarEvents } from '../types/sidebar.types';\n\n@Component({\n selector: 'lib-sidebar',\n imports: [CommonModule, RouterModule],\n templateUrl: './sidebar.component.html',\n styleUrls: ['./sidebar.component.scss']\n})\nexport class SidebarComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject<void>();\n private router = inject(Router);\n\n // Configuração e dados\n @Input() config: Partial<SidebarConfig> = {};\n @Input() menuItems: SidebarMenuItem[] = [];\n @Input() isCollapsed: boolean = false;\n\n // Eventos\n @Output() itemClick = new EventEmitter<SidebarMenuItem>();\n @Output() toggle = new EventEmitter<boolean>();\n @Output() overlayToggle = new EventEmitter<boolean>();\n @Output() logoClick = new EventEmitter<void>();\n\n // Estado interno\n private state$ = new BehaviorSubject<SidebarState>({\n isCollapsed: false,\n isMobile: false,\n isOverlayOpen: false,\n activeItemId: undefined\n });\n\n // Configuração padrão\n defaultConfig: Required<SidebarConfig> = {\n width: '280px',\n collapsedWidth: '64px',\n position: 'left',\n collapsible: true,\n autoCollapse: true,\n overlay: true,\n logo: {\n src: '',\n alt: 'Logo',\n route: '/'\n },\n theme: 'light',\n customCssClass: ''\n };\n\n // Getters para o estado\n get currentState(): SidebarState {\n return this.state$.value;\n }\n\n get finalConfig(): Required<SidebarConfig> {\n return { ...this.defaultConfig, ...this.config };\n }\n\n get sidebarWidth(): string {\n return this.currentState.isCollapsed ? this.finalConfig.collapsedWidth : this.finalConfig.width;\n }\n\n ngOnInit(): void {\n this.initializeState();\n this.detectActiveRoute();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * Detecta mudanças de tela\n */\n @HostListener('window:resize', ['$event'])\n onResize(event: any): void {\n this.checkMobileState();\n }\n\n /**\n * Inicializa o estado do sidebar\n */\n private initializeState(): void {\n this.checkMobileState();\n\n // Configura estado inicial baseado no input\n this.updateState({\n isCollapsed: this.isCollapsed\n });\n\n // Auto-collapse em mobile se configurado\n if (this.finalConfig.autoCollapse && this.currentState.isMobile) {\n this.updateState({ isCollapsed: true });\n }\n }\n\n /**\n * Verifica se está em modo mobile\n */\n private checkMobileState(): void {\n const isMobile = window.innerWidth < 768; // Breakpoint md\n this.updateState({ isMobile });\n\n if (isMobile && this.finalConfig.autoCollapse) {\n this.updateState({ isCollapsed: true });\n }\n }\n\n /**\n * Detecta rota ativa\n */\n private detectActiveRoute(): void {\n const currentUrl = this.router.url;\n const activeItem = this.findActiveItem(this.menuItems, currentUrl);\n\n if (activeItem) {\n this.updateState({ activeItemId: activeItem.id });\n }\n }\n\n /**\n * Encontra item ativo baseado na URL\n */\n private findActiveItem(items: SidebarMenuItem[], url: string): SidebarMenuItem | null {\n for (const item of items) {\n if (item.route && url.startsWith(item.route)) {\n return item;\n }\n\n if (item.children) {\n const childItem = this.findActiveItem(item.children, url);\n if (childItem) return childItem;\n }\n }\n\n return null;\n }\n\n /**\n * Atualiza o estado\n */\n private updateState(newState: Partial<SidebarState>): void {\n const current = this.currentState;\n this.state$.next({ ...current, ...newState });\n }\n\n /**\n * Toggle do sidebar\n */\n toggleSidebar(): void {\n const newCollapsedState = !this.currentState.isCollapsed;\n this.updateState({ isCollapsed: newCollapsedState });\n this.toggle.emit(!newCollapsedState);\n }\n\n /**\n * Toggle do overlay (mobile)\n */\n toggleOverlay(): void {\n const newOverlayState = !this.currentState.isOverlayOpen;\n this.updateState({ isOverlayOpen: newOverlayState });\n this.overlayToggle.emit(newOverlayState);\n }\n\n /**\n * Clique no item do menu\n */\n onItemClick(item: SidebarMenuItem, event: Event): void {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n // Se tem filhos, toggle expansão\n if (item.children && item.children.length > 0) {\n event.preventDefault();\n this.toggleItemExpansion(item);\n return;\n }\n\n // Ação personalizada\n if (item.action) {\n event.preventDefault();\n item.action();\n }\n\n // Navegação\n if (item.route) {\n this.updateState({ activeItemId: item.id });\n this.router.navigate([item.route]);\n\n // Fecha overlay em mobile após navegação\n if (this.currentState.isMobile && this.currentState.isOverlayOpen) {\n this.updateState({ isOverlayOpen: false });\n }\n }\n\n // Emite evento\n this.itemClick.emit(item);\n }\n\n /**\n * Toggle expansão de item com filhos\n */\n toggleItemExpansion(item: SidebarMenuItem): void {\n item.isExpanded = !item.isExpanded;\n }\n\n /**\n * Clique no logo\n */\n onLogoClick(): void {\n if (this.finalConfig.logo.route) {\n this.router.navigate([this.finalConfig.logo.route]);\n }\n this.logoClick.emit();\n }\n\n /**\n * Fecha overlay ao clicar fora (mobile)\n */\n closeOverlay(): void {\n if (this.currentState.isMobile && this.currentState.isOverlayOpen) {\n this.updateState({ isOverlayOpen: false });\n }\n }\n\n /**\n * Verifica se item está ativo\n */\n isItemActive(item: SidebarMenuItem): boolean {\n return this.currentState.activeItemId === item.id;\n }\n\n /**\n * Verifica se item tem filhos ativos\n */\n hasActiveChild(item: SidebarMenuItem): boolean {\n if (!item.children) return false;\n\n return item.children.some(child =>\n this.isItemActive(child) || this.hasActiveChild(child)\n );\n }\n\n /**\n * TrackBy function para performance\n */\n trackByItemId(index: number, item: SidebarMenuItem): string {\n return item.id;\n }\n}\n","<!-- Overlay para mobile -->\n<div *ngIf=\"currentState.isMobile && currentState.isOverlayOpen\" class=\"sidebar-overlay\" (click)=\"closeOverlay()\">\n</div>\n\n<!-- Sidebar principal -->\n<aside class=\"sidebar\" [class.collapsed]=\"currentState.isCollapsed\" [class.mobile]=\"currentState.isMobile\"\n [class.overlay-open]=\"currentState.isOverlayOpen\" [class.theme-light]=\"finalConfig.theme === 'light'\"\n [class.theme-dark]=\"finalConfig.theme === 'dark'\" [class.position-left]=\"finalConfig.position === 'left'\"\n [class.position-right]=\"finalConfig.position === 'right'\" [ngClass]=\"finalConfig.customCssClass\"\n [style.width]=\"sidebarWidth\">\n\n <!-- Header com logo -->\n <div class=\"sidebar-header\" *ngIf=\"finalConfig.logo.src\">\n <button class=\"logo-container\" (click)=\"onLogoClick()\" [attr.aria-label]=\"finalConfig.logo.alt\">\n <img [src]=\"finalConfig.logo.src\" [alt]=\"finalConfig.logo.alt\" class=\"logo-image\">\n\n <span class=\"logo-text\" *ngIf=\"!currentState.isCollapsed\">\n {{ finalConfig.logo.alt }}\n </span>\n </button>\n\n <!-- Botão de toggle (se habilitado) -->\n <button *ngIf=\"finalConfig.collapsible && !currentState.isMobile\" class=\"toggle-btn\" (click)=\"toggleSidebar()\"\n [attr.aria-label]=\"currentState.isCollapsed ? 'Expandir menu' : 'Recolher menu'\">\n <i class=\"toggle-icon fa\" [class.fa-angle-left]=\"!currentState.isCollapsed\"\n [class.fa-angle-right]=\"currentState.isCollapsed\">\n </i>\n </button>\n </div>\n\n <!-- Navegação principal -->\n <nav class=\"sidebar-nav\">\n <ul class=\"nav-list\">\n <ng-container *ngFor=\"let item of menuItems; trackBy: trackByItemId\">\n\n <!-- Divisor -->\n <li *ngIf=\"item.divider\" class=\"nav-divider\" role=\"separator\"></li>\n\n <!-- Item do menu -->\n <li class=\"nav-item\" [class.active]=\"isItemActive(item)\"\n [class.has-children]=\"item.children && item.children.length > 0\" [class.expanded]=\"item.isExpanded\"\n [class.disabled]=\"item.disabled\" [class.has-active-child]=\"hasActiveChild(item)\">\n\n <a class=\"nav-link\" [routerLink]=\"item.route\" [class.no-route]=\"!item.route\"\n (click)=\"onItemClick(item, $event)\" [attr.aria-label]=\"item.label\"\n [attr.aria-expanded]=\"item.children ? item.isExpanded : null\" [attr.tabindex]=\"item.disabled ? -1 : 0\">\n\n <!-- Ícone -->\n <i class=\"nav-icon\" [ngClass]=\"item.icon\" [attr.aria-hidden]=\"true\">\n </i>\n\n <!-- Label -->\n <span class=\"nav-label\" *ngIf=\"!currentState.isCollapsed\">\n {{ item.label }}\n </span>\n\n <!-- Badge -->\n <span class=\"nav-badge\" *ngIf=\"item.badge && !currentState.isCollapsed\">\n {{ item.badge }}\n </span>\n\n <!-- Seta para submenu -->\n <i class=\"nav-arrow fa\" *ngIf=\"item.children && item.children.length > 0 && !currentState.isCollapsed\"\n [class.fa-chevron-down]=\"item.isExpanded\" [class.fa-chevron-right]=\"!item.isExpanded\"\n [attr.aria-hidden]=\"true\">\n </i>\n </a>\n\n <!-- Submenu -->\n <ul class=\"nav-submenu\"\n *ngIf=\"item.children && item.children.length > 0 && item.isExpanded && !currentState.isCollapsed\">\n <li class=\"nav-subitem\" *ngFor=\"let subItem of item.children; trackBy: trackByItemId\"\n [class.active]=\"isItemActive(subItem)\" [class.disabled]=\"subItem.disabled\">\n\n <a class=\"nav-sublink\" [routerLink]=\"subItem.route\" [class.no-route]=\"!subItem.route\"\n (click)=\"onItemClick(subItem, $event)\" [attr.aria-label]=\"subItem.label\"\n [attr.tabindex]=\"subItem.disabled ? -1 : 0\">\n\n <!-- Ícone do subitem -->\n <i class=\"nav-subicon\" [ngClass]=\"subItem.icon\" [attr.aria-hidden]=\"true\">\n </i>\n\n <!-- Label do subitem -->\n <span class=\"nav-sublabel\">\n {{ subItem.label }}\n </span>\n\n <!-- Badge do subitem -->\n <span class=\"nav-subbadge\" *ngIf=\"subItem.badge\">\n {{ subItem.badge }}\n </span>\n </a>\n </li>\n </ul>\n </li>\n </ng-container>\n </ul>\n </nav>\n\n <!-- Footer opcional -->\n <div class=\"sidebar-footer\" *ngIf=\"!currentState.isCollapsed\">\n <ng-content select=\"[slot=footer]\"></ng-content>\n </div>\n</aside>\n\n<!-- Botão mobile para abrir sidebar -->\n<button *ngIf=\"currentState.isMobile && !currentState.isOverlayOpen\" class=\"mobile-toggle-btn\" (click)=\"toggleOverlay()\"\n [attr.aria-label]=\"'Abrir menu'\">\n <i class=\"fa fa-bars\" [attr.aria-hidden]=\"true\"></i>\n</button>","/**\n * Tipos e interfaces para autenticação\n */\n\nexport interface LoginCredentials {\n email: string;\n password: string;\n}\n\nexport interface LoginResponse {\n success: boolean;\n accessToken?: string;\n user?: UserInfo;\n expiresIn?: number; // em minutos\n message?: string;\n errors?: string[];\n}\n\nexport interface UserInfo {\n id: string;\n nome: string;\n email: string;\n perfil: string;\n permissoes: string[];\n avatar?: string;\n lastLogin?: Date;\n}\n\nexport interface LogoutResponse {\n success: boolean;\n message?: string;\n}\n\nexport interface RefreshTokenResponse {\n success: boolean;\n accessToken?: string;\n expiresIn?: number;\n message?: string;\n}\n\n/**\n * Estados do processo de login\n */\nexport enum LoginStatus {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n SUCCESS = 'SUCCESS',\n ERROR = 'ERROR'\n}\n\n/**\n * Configurações opcionais para o login\n */\nexport interface LoginOptions {\n // Configurações visuais\n title?: string;\n subtitle?: string;\n logoUrl?: string;\n backgroundUrl?: string;\n footerText?: string;\n\n // Funcionalidades\n redirectUrl?: string;\n showForgotPassword?: boolean;\n showRegisterLink?: boolean;\n passwordMinLength?: number;\n\n // Links personalizados\n links?: {\n forgotPassword?: string;\n register?: string;\n termsOfService?: string;\n privacyPolicy?: string;\n };\n\n // Personalização visual\n theme?: 'light' | 'dark' | 'auto';\n primaryColor?: string;\n}\n\n/**\n * Interface que a aplicação deve implementar para comunicação com o backend\n */\nexport interface AuthProvider {\n /**\n * Realiza login no backend\n */\n login(credentials: LoginCredentials): Promise<LoginResponse>;\n\n /**\n * Realiza logout no backend\n */\n logout(): Promise<LogoutResponse>;\n\n /**\n * Renova o access token (opcional - se não implementado, usa apenas frontend)\n */\n refreshToken?(): Promise<RefreshTokenResponse>;\n\n /**\n * Verifica se o token ainda é válido no backend (opcional)\n */\n validateToken?(token: string): Promise<boolean>;\n}\n\n/**\n * Dados de erro de validação de formulário\n */\nexport interface LoginValidationErrors {\n email?: string[];\n password?: string[];\n general?: string[];\n}\n\n/**\n * Estado completo do login para uso reativo\n */\nexport interface LoginState {\n status: LoginStatus;\n user: UserInfo | null;\n isAuthenticated: boolean;\n errors: LoginValidationErrors;\n lastAttempt: Date | null;\n}","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nexport type StorageType = 'localStorage' | 'sessionStorage';\n\nexport interface StorageOptions {\n encrypt?: boolean;\n compress?: boolean;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LocalStorageService {\n private storageAvailable = new BehaviorSubject<boolean>(this.isStorageAvailable());\n\n // Observable para monitorar disponibilidade do storage\n get storageAvailable$(): Observable<boolean> {\n return this.storageAvailable.asObservable();\n }\n\n /**\n * Salva item no storage com validação básica\n */\n async setItem<T>(key: string, value: T, storageType: StorageType = 'localStorage', options?: StorageOptions): Promise<boolean> {\n if (!this.isStorageAvailable(storageType)) {\n console.warn(`${storageType} não está disponível`);\n return false;\n }\n\n if (!this.validateKey(key)) {\n console.error('Chave inválida fornecida');\n return false;\n }\n\n try {\n const storage = this.getStorage(storageType);\n let serializedValue = this.safeJsonStringify(value);\n\n if (!serializedValue) {\n console.error('Falha na serialização segura dos dados');\n return false;\n }\n\n // Aplicar criptografia REAL se solicitada\n if (options?.encrypt) {\n serializedValue = await this.encryptData(serializedValue);\n if (!serializedValue) {\n console.error('Falha na criptografia dos dados');\n return false;\n }\n }\n\n // Validação de tamanho (localStorage tem limite ~5MB)\n if (serializedValue.length > 5000000) {\n console.error('Dados muito grandes para o storage');\n return false;\n }\n\n storage.setItem(this.sanitizeKey(key), serializedValue);\n return true;\n } catch (error) {\n console.error(`Erro ao salvar no ${storageType}:`, error);\n return false;\n }\n }\n\n /**\n * Recupera item do storage com tipo seguro\n */\n async getItem<T>(key: string, storageType: StorageType = 'localStorage', options?: StorageOptions): Promise<T | null> {\n if (!this.isStorageAvailable(storageType)) {\n return null;\n }\n\n try {\n const storage = this.getStorage(storageType);\n let item = storage.getItem(this.sanitizeKey(key));\n\n if (!item) return null;\n\n // Aplicar descriptografia REAL se necessário\n if (options?.encrypt && item) {\n item = await this.decryptData(item);\n if (!item) {\n console.error('Falha ao descriptografar item');\n return null;\n }\n }\n\n return item ? this.safeJsonParse(item) : null;\n } catch (error) {\n console.error(`Erro ao recuperar do ${storageType}:`, error);\n return null;\n }\n }\n\n /**\n * Remove item específico\n */\n removeItem(key: string, storageType: StorageType = 'localStorage'): boolean {\n if (!this.isStorageAvailable(storageType)) {\n return false;\n }\n\n try {\n const storage = this.getStorage(storageType);\n storage.removeItem(this.sanitizeKey(key));\n return true;\n } catch (error) {\n console.error(`Erro ao remover do ${storageType}:`, error);\n return false;\n }\n }\n\n /**\n * Limpa todo o storage\n */\n clear(storageType: StorageType = 'localStorage'): boolean {\n if (!this.isStorageAvailable(storageType)) {\n return false;\n }\n\n try {\n const storage = this.getStorage(storageType);\n storage.clear();\n return true;\n } catch (error) {\n console.error(`Erro ao limpar ${storageType}:`, error);\n return false;\n }\n }\n\n /**\n * Verifica se item existe\n */\n hasItem(key: string, storageType: StorageType = 'localStorage'): boolean {\n if (!this.isStorageAvailable(storageType)) {\n return false;\n }\n\n const storage = this.getStorage(storageType);\n return storage.getItem(this.sanitizeKey(key)) !== null;\n }\n\n /**\n * Salva item com expiração\n */\n async setItemWithExpiry<T>(key: string, value: T, expiryInMinutes: number, storageType: StorageType = 'localStorage'): Promise<boolean> {\n const now = new Date();\n const item = {\n value: value,\n expiry: now.getTime() + (expiryInMinutes * 60 * 1000)\n };\n return await this.setItem(key, item, storageType);\n }\n\n /**\n * Recupera item com verificação de expiração\n */\n async getItemWithExpiry<T>(key: string, storageType: StorageType = 'localStorage'): Promise<T | null> {\n const itemStr = await this.getItem<{ value: T, expiry: number }>(key, storageType);\n\n if (!itemStr) {\n return null;\n }\n\n const now = new Date();\n if (now.getTime() > itemStr.expiry) {\n this.removeItem(key, storageType);\n return null;\n }\n\n return itemStr.value;\n }\n\n /**\n * Obtém todas as chaves do storage\n */\n getAllKeys(storageType: StorageType = 'localStorage'): string[] {\n if (!this.isStorageAvailable(storageType)) {\n return [];\n }\n\n const storage = this.getStorage(storageType);\n const keys: string[] = [];\n for (let i = 0; i < storage.length; i++) {\n const key = storage.key(i);\n if (key) keys.push(key);\n }\n return keys;\n }\n\n /**\n * Obtém tamanho ocupado do storage em bytes (aproximado)\n */\n getStorageSize(storageType: StorageType = 'localStorage'): number {\n if (!this.isStorageAvailable(storageType)) {\n return 0;\n }\n\n const storage = this.getStorage(storageType);\n let total = 0;\n for (let key in storage) {\n if (storage.hasOwnProperty(key)) {\n total += storage[key].length + key.length;\n }\n }\n return total;\n }\n\n /**\n * Monitor de eventos de storage\n */\n monitorStorageEvents(): Observable<StorageEvent> {\n return new Observable(observer => {\n const handler = (event: StorageEvent) => {\n // Validação básica de segurança\n if (this.validateStorageEvent(event)) {\n observer.next(event);\n }\n };\n\n window.addEventListener('storage', handler);\n\n return () => {\n window.removeEventListener('storage', handler);\n };\n });\n }\n\n /**\n * Limpa itens expirados do storage\n */\n async cleanExpiredItems(storageType: StorageType = 'localStorage'): Promise<number> {\n if (!this.isStorageAvailable(storageType)) {\n return 0;\n }\n\n const keys = this.getAllKeys(storageType);\n let cleanedCount = 0;\n\n for (const key of keys) {\n try {\n const item = await this.getItem<{ value: any, expiry: number }>(key, storageType);\n if (item && item.expiry) {\n const now = new Date().getTime();\n if (now > item.expiry) {\n this.removeItem(key, storageType);\n cleanedCount++;\n }\n }\n } catch (error) {\n // Ignora erros de parsing - pode não ser um item com expiração\n }\n }\n\n return cleanedCount;\n }\n\n /**\n * Backup de todos os dados do storage\n */\n backup(storageType: StorageType = 'localStorage'): { [key: string]: any } {\n if (!this.isStorageAvailable(storageType)) {\n return {};\n }\n\n const storage = this.getStorage(storageType);\n const backup: { [key: string]: any } = {};\n\n for (let i = 0; i < storage.length; i++) {\n const key = storage.key(i);\n if (key) {\n backup[key] = storage.getItem(key);\n }\n }\n\n return backup;\n }\n\n /**\n * Restaura backup para o storage\n */\n restore(backup: { [key: string]: any }, storageType: StorageType = 'localStorage'): boolean {\n if (!this.isStorageAvailable(storageType)) {\n return false;\n }\n\n // Validação rigorosa do backup\n if (!backup || typeof backup !== 'object' || Array.isArray(backup)) {\n console.error('Backup inválido fornecido');\n return false;\n }\n\n try {\n const storage = this.getStorage(storageType);\n const keys = Object.keys(backup);\n\n // Limita número de itens para evitar DoS\n if (keys.length > 100) {\n console.error('Backup muito grande - máximo 100 itens');\n return false;\n }\n\n for (const key of keys) {\n // Validação rigorosa de cada chave\n if (!this.validateKey(key)) {\n console.warn(`Chave inválida ignorada no backup: ${key}`);\n continue;\n }\n\n const value = backup[key];\n\n // Validação do valor\n if (typeof value !== 'string') {\n console.warn(`Valor inválido ignorado para chave: ${key}`);\n continue;\n }\n\n // Validação de tamanho\n if (value.length > 50000) { // 50KB por item\n console.warn(`Valor muito grande ignorado para chave: ${key}`);\n continue;\n }\n\n storage.setItem(key, value);\n }\n\n return true;\n } catch (error) {\n console.error('Erro ao restaurar backup:', error);\n return false;\n }\n }\n\n /**\n * MÉTODOS PRIVADOS SIMPLIFICADOS\n */\n\n private isStorageAvailable(storageType: StorageType = 'localStorage'): boolean {\n try {\n const storage = this.getStorage(storageType);\n const test = '__storage_test__';\n storage.setItem(test, test);\n storage.removeItem(test);\n return true;\n } catch {\n return false;\n }\n }\n\n private getStorage(storageType: StorageType): Storage {\n return storageType === 'localStorage' ? localStorage : sessionStorage;\n }\n\n private sanitizeKey(key: string): string {\n if (!key || typeof key !== 'string') {\n return '';\n }\n\n return key\n .replace(/[^a-zA-Z0-9_.-]/g, '') // Remove caracteres especiais\n .substring(0, 50); // Limita tamanho\n }\n\n private validateKey(key: string): boolean {\n if (!key || typeof key !== 'string') {\n return false;\n }\n\n // Bloqueia chaves perigosas para prototype pollution\n const dangerousKeys = ['__proto__', 'constructor', 'prototype', 'toString', 'valueOf'];\n if (dangerousKeys.includes(key)) {\n return false;\n }\n\n // Validação de tamanho e caracteres\n if (key.length > 30 || key.length === 0) {\n return false;\n }\n\n // Apenas alfanumérico e underscore\n if (!/^[a-zA-Z0-9_]+$/.test(key)) {\n return false;\n }\n\n return true;\n }\n\n private safeJsonStringify(obj: any): string | null {\n try {\n // Verifica se não é função ou undefined\n if (typeof obj === 'function' || obj === undefined) {\n return null;\n }\n\n // Limita profundidade para evitar referências circulares\n const seen = new WeakSet();\n const replacer = (key: string, value: any) => {\n // Bloqueia chaves perigosas\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return undefined;\n }\n\n // Evita referências circulares\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return '[Circular Reference]';\n }\n seen.add(value);\n }\n\n return value;\n };\n\n return JSON.stringify(obj, replacer);\n } catch (error) {\n console.error('Erro na serialização segura:', error);\n return null;\n }\n }\n\n private safeJsonParse(text: string): any {\n try {\n return JSON.parse(text, (key, value) => {\n // Bloqueia prototype pollution\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return undefined;\n }\n return value;\n });\n } catch (error) {\n console.error('Erro no parsing seguro:', error);\n return null;\n }\n }\n\n private async encryptData(text: string): Promise<string | null> {\n try {\n // Gera chave simples baseada no contexto da aplicação\n const keyMaterial = await crypto.subtle.importKey(\n 'raw',\n new TextEncoder().encode(window.location.hostname + '_secure_key'),\n 'PBKDF2',\n false,\n ['deriveKey']\n );\n\n // Gera salt fixo baseado no hostname (para poder descriptografar)\n const salt = new TextEncoder().encode(window.location.hostname.padEnd(16, '0').substring(0, 16));\n\n const key = await crypto.subtle.deriveKey(\n {\n name: 'PBKDF2',\n salt: salt,\n iterations: 10000,\n hash: 'SHA-256'\n },\n keyMaterial,\n { name: 'AES-GCM', length: 256 },\n false,\n ['encrypt']\n );\n\n const iv = crypto.getRandomValues(new Uint8Array(12));\n const encoded = new TextEncoder().encode(text);\n\n const encrypted = await crypto.subtle.encrypt(\n { name: 'AES-GCM', iv: iv },\n key,\n encoded\n );\n\n // Combina IV + dados criptografados em base64\n const combined = new Uint8Array(iv.length + encrypted.byteLength);\n combined.set(iv);\n combined.set(new Uint8Array(encrypted), iv.length);\n\n return btoa(String.fromCharCode(...combined));\n } catch (error) {\n console.error('Erro na criptografia:', error);\n return null;\n }\n }\n\n private async decryptData(encryptedText: string): Promise<string | null> {\n try {\n // Mesmo processo para gerar a chave\n const keyMaterial = await crypto.subtle.importKey(\n 'raw',\n new TextEncoder().encode(window.location.hostname + '_secure_key'),\n 'PBKDF2',\n false,\n ['deriveKey']\n );\n\n const salt = new TextEncoder().encode(window.location.hostname.padEnd(16, '0').substring(0, 16));\n\n const key = await crypto.subtle.deriveKey(\n {\n name: 'PBKDF2',\n salt: salt,\n iterations: 10000,\n hash: 'SHA-256'\n },\n keyMaterial,\n { name: 'AES-GCM', length: 256 },\n false,\n ['decrypt']\n );\n\n // Decodifica base64 e separa IV dos dados\n const combined = new Uint8Array(atob(encryptedText).split('').map(c => c.charCodeAt(0)));\n const iv = combined.slice(0, 12);\n const encrypted = combined.slice(12);\n\n const decrypted = await crypto.subtle.decrypt(\n { name: 'AES-GCM', iv: iv },\n key,\n encrypted\n );\n\n return new TextDecoder().decode(decrypted);\n } catch (error) {\n console.error('Erro na descriptografia:', error);\n return null;\n }\n }\n\n private validateStorageEvent(event: StorageEvent): boolean {\n // Validação rigorosa de origem\n if (!event.url || event.url.trim() === '') {\n return false;\n }\n\n try {\n const eventOrigin = new URL(event.url).origin;\n const currentOrigin = window.location.origin;\n\n if (eventOrigin !== currentOrigin) {\n return false;\n }\n } catch {\n return false;\n }\n\n // Validação rigorosa de chave\n if (event.key && !this.validateKey(event.key)) {\n return false;\n }\n\n // Verificação adicional de integridade temporal\n const now = Date.now();\n if (!this.lastEventTime) {\n this.lastEventTime = now;\n return true;\n }\n\n // Rate limiting básico\n if (now - this.lastEventTime < 50) { // Máximo 20 eventos/segundo\n return false;\n }\n\n this.lastEventTime = now;\n return true;\n }\n\n private lastEventTime: number = 0;\n}","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { LocalStorageService } from './local-storage.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthStorageService {\n private readonly TOKEN_KEY = 'access_token';\n private readonly USER_DATA_KEY = 'user_data';\n\n // Observable para monitorar estado de autenticação\n private isAuthenticated$ = new BehaviorSubject<boolean>(false);\n\n get authState$(): Observable<boolean> {\n return this.isAuthenticated$.asObservable();\n }\n\n constructor(private storage: LocalStorageService) {\n // Inicializa o estado de autenticação de forma assíncrona\n this.initAuthState();\n }\n\n private async initAuthState(): Promise<void> {\n const hasToken = await this.hasToken();\n this.isAuthenticated$.next(hasToken);\n }\n\n /**\n * Salva Access Token COM CRIPTOGRAFIA (backend fará todas as validações)\n */\n async setToken(token: string, expiryInMinutes: number = 60): Promise<boolean> {\n if (!token || token.trim().length === 0) {\n return false;\n }\n\n // 🔐 SEMPRE criptografar tokens para máxima segurança\n // Criamos estrutura com expiração manualmente para usar criptografia\n const now = new Date();\n const item = {\n value: token,\n expiry: now.getTime() + (expiryInMinutes * 60 * 1000)\n };\n\n const success = await this.storage.setItem(\n this.TOKEN_KEY,\n item,\n 'sessionStorage',\n { encrypt: true }\n );\n\n if (success) {\n this.isAuthenticated$.next(true);\n }\n return success;\n }\n\n /**\n * Recupera Access Token COM DESCRIPTOGRAFIA e validação de expiração\n */\n async getToken(): Promise<string | null> {\n try {\n // 🔓 SEMPRE descriptografar tokens\n const item = await this.storage.getItem<{ value: string, expiry: number }>(\n this.TOKEN_KEY,\n 'sessionStorage',\n { encrypt: true }\n );\n\n if (!item || !item.value) {\n this.isAuthenticated$.next(false);\n return null;\n }\n\n // Verificar expiração\n const now = Date.now();\n if (item.expiry && now > item.expiry) {\n // Token expirado - remover\n this.storage.removeItem(this.TOKEN_KEY, 'sessionStorage');\n this.isAuthenticated$.next(false);\n return null;\n }\n\n return item.value;\n } catch (error) {\n console.warn('Erro ao recuperar token criptografado:', error);\n this.isAuthenticated$.next(false);\n return null;\n }\n }\n\n // REMOVIDO: Refresh Token methods - ficam no servidor\n // O backend gerencia refresh automaticamente via interceptors\n\n /**\n * Salva dados do usuário COM CRIPTOGRAFIA e validação básica\n */\n async setUserData(userData: any): Promise<boolean> {\n if (!userData || typeof userData !== 'object') {\n return false;\n }\n\n // Validação básica de tamanho\n try {\n const serialized = JSON.stringify(userData);\n if (serialized.length > 100000) { // 100KB limite\n return false;\n }\n } catch {\n return false;\n }\n\n // 🔐 SEMPRE criptografar dados do usuário também\n return await this.storage.setItem(\n this.USER_DATA_KEY,\n userData,\n 'sessionStorage',\n { encrypt: true }\n );\n }\n\n /**\n * Recupera dados do usuário COM DESCRIPTOGRAFIA\n */\n async getUserData<T = any>(): Promise<T | null> {\n try {\n // 🔓 SEMPRE descriptografar dados do usuário\n return await this.storage.getItem<T>(\n this.USER_DATA_KEY,\n 'sessionStorage',\n { encrypt: true }\n );\n } catch (error) {\n console.warn('Erro ao recuperar dados do usuário criptografados:', error);\n return null;\n }\n }\n\n /**\n * Verifica apenas se possui token (backend validará se é válido)\n */\n async hasToken(): Promise<boolean> {\n const token = await this.getToken();\n return !!token && token.length > 0;\n }\n\n /**\n * Verifica se está \"aparentemente\" autenticado (token existe)\n */\n async isAuthenticated(): Promise<boolean> {\n return await this.hasToken();\n }\n\n /**\n * Limpa APENAS dados do cliente (não afeta refresh token no servidor)\n */\n clearAuthData(): void {\n this.storage.removeItem(this.TOKEN_KEY, 'sessionStorage');\n this.storage.removeItem(this.USER_DATA_KEY, 'sessionStorage');\n this.isAuthenticated$.next(false);\n }\n\n /**\n * Decodifica payload do JWT (SEM validação - apenas para UI)\n * IMPORTANTE: Use apenas para exibição, nunca para lógica de segurança\n * \n * ⚠️ ATENÇÃO: Agora requer token como parâmetro ou uso assíncrono\n */\n decodeTokenPayload(token?: string): any {\n try {\n // Se não foi passado token, não podemos usar getTokenSync (descontinuado)\n if (!token) {\n console.warn(\n '⚠️ decodeTokenPayload(): Passe o token como parâmetro ou use ' +\n 'await getToken() primeiro, pois tokens são criptografados.'\n );\n return null;\n }\n\n const jwt = token;\n if (!jwt || typeof jwt !== 'string') return null;\n\n // Validação básica do formato JWT\n const parts = jwt.split('.');\n if (parts.length !== 3) return null;\n\n // Validação base64url\n const base64UrlPattern = /^[A-Za-z0-9_-]+$/;\n if (!base64UrlPattern.test(parts[1])) return null;\n\n // Validação de tamanho razoável\n if (parts[1].length > 10000) return null;\n\n const payload = parts[1];\n const decoded = atob(payload.replace(/-/g, '+').replace(/_/g, '/'));\n\n // Parse seguro com proteção contra prototype pollution\n return JSON.parse(decoded, (key, value) => {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return undefined;\n }\n return value;\n });\n } catch (error) {\n console.warn('Erro ao decodificar token para UI:', error);\n return null;\n }\n }\n\n /**\n * Versão síncrona DESATUALIZADA (tokens agora são criptografados)\n * ⚠️ AVISO: Esta versão não funciona mais com tokens criptografados\n * Use getToken() async para acessar tokens de forma segura\n */\n private getTokenSync(): string | null {\n console.warn(\n '⚠️ getTokenSync() DESCONTINUADO: Tokens agora são criptografados. ' +\n 'Use getToken() async para descriptografia segura.'\n );\n\n // Não é possível descriptografar sincronamente\n // A criptografia AES-GCM requer operações assíncronas\n return null;\n }\n\n /**\n * Verifica se token está próximo de expirar (para UI)\n * ⚠️ ATENÇÃO: Agora é assíncrono devido à criptografia\n */\n async isTokenExpiringSoon(minutesThreshold: number = 5): Promise<boolean> {\n try {\n const token = await this.getToken();\n if (!token) return true;\n\n const tokenData = this.decodeTokenPayload(token);\n if (!tokenData || !tokenData.exp) return true;\n\n const now = Math.floor(Date.now() / 1000);\n const timeUntilExpiry = tokenData.exp - now;\n return timeUntilExpiry < (minutesThreshold * 60);\n } catch (error) {\n console.warn('Erro ao verificar expiração do token:', error);\n return true; // Em caso de erro, assumir que está expirando\n }\n }\n\n /**\n * Método utilitário: Obtém e decodifica token em uma operação\n * Ideal para componentes que precisam dos dados do token para UI\n */\n async getDecodedTokenData(): Promise<any> {\n try {\n const token = await this.getToken();\n if (!token) return null;\n\n return this.decodeTokenPayload(token);\n } catch (error) {\n console.warn('Erro ao obter dados decodificados do token:', error);\n return null;\n }\n }\n}","import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\nimport { BehaviorSubject, Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport {\n AuthProvider,\n LoginCredentials,\n LoginOptions,\n LoginResponse,\n LoginState,\n LoginStatus,\n LoginValidationErrors,\n LogoutResponse,\n UserInfo\n} from '../../types/auth.types';\nimport { AuthStorageService } from '../local-storage/auth-storage.service';\n\n/**\n * Token de injeção para o AuthProvider\n */\nexport const AUTH_PROVIDER = new InjectionToken<AuthProvider>('AuthProvider');\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LoginService {\n private readonly DEFAULT_OPTIONS: Required<LoginOptions> = {\n // Configurações visuais\n title: 'Login',\n subtitle: 'Entre na sua conta',\n logoUrl: '',\n backgroundUrl: '',\n footerText: '',\n\n // Funcionalidades\n redirectUrl: '/dashboard',\n showForgotPassword: true,\n showRegisterLink: true,\n passwordMinLength: 6,\n\n // Links personalizados\n links: {\n forgotPassword: '/forgot-password',\n register: '/register',\n termsOfService: '/terms',\n privacyPolicy: '/privacy'\n },\n\n // Personalização visual\n theme: 'light',\n primaryColor: '#3b82f6'\n };\n\n // Estado reativo do login\n private loginState$ = new BehaviorSubject<LoginState>({\n status: LoginStatus.IDLE,\n user: null,\n isAuthenticated: false,\n errors: {},\n lastAttempt: null\n });\n\n // Configurações atuais\n private currentOptions: Required<LoginOptions> = { ...this.DEFAULT_OPTIONS };\n\n constructor(\n private authStorage: AuthStorageService,\n @Optional() @Inject(AUTH_PROVIDER) private authProvider?: AuthProvider\n ) {\n this.initializeService();\n }\n\n /**\n * Observable do estado completo do login\n */\n get state$(): Observable<LoginState> {\n return this.loginState$.asObservable();\n }\n\n /**\n * Observable apenas do status de loading\n */\n get isLoading$(): Observable<boolean> {\n return this.loginState$.pipe(\n map(state => state.status === LoginStatus.LOADING)\n );\n }\n\n /**\n * Observable apenas do status de autenticação\n */\n get isAuthenticated$(): Observable<boolean> {\n return this.loginState$.pipe(\n map(state => state.isAuthenticated)\n );\n }\n\n /**\n * Observable apenas dos erros\n */\n get errors$(): Observable<LoginValidationErrors> {\n return this.loginState$.pipe(\n map(state => state.errors)\n );\n }\n\n /**\n * Observable do usuário atual\n */\n get currentUser$(): Observable<UserInfo | null> {\n return this.loginState$.pipe(\n map(state => state.user)\n );\n }\n\n /**\n * Configura opções do serviço de login\n */\n configure(options: Partial<LoginOptions>): void {\n this.currentOptions = { ...this.currentOptions, ...options };\n }\n\n /**\n * Realiza login com as credenciais fornecidas\n */\n async login(credentials: LoginCredentials): Promise<LoginResponse> {\n\n // Valida credenciais básicas\n const validationErrors = this.validateCredentials(credentials);\n if (Object.keys(validationErrors).length > 0) {\n this.updateState({\n status: LoginStatus.ERROR,\n errors: validationErrors\n });\n return { success: false, message: 'Dados inválidos', errors: Object.values(validationErrors).flat() };\n }\n\n // Inicia processo de login\n this.updateState({\n status: LoginStatus.LOADING,\n errors: {}\n });\n\n try {\n let response: LoginResponse;\n\n // if (this.authProvider) {\n // // Usa provider customizado da aplicação\n // response = await this.authProvider.login(credentials);\n // } else {\n // // Simula resposta (para desenvolvimento/demo)\n // response = await this.simulateLogin(credentials);\n // }\n\n response = await this.simulateLogin(credentials);\n\n if (response.success && response.accessToken && response.user) {\n // Login bem-sucedido\n await this.handleSuccessfulLogin(response);\n\n this.updateState({\n status: LoginStatus.SUCCESS,\n user: response.user,\n isAuthenticated: true,\n errors: {}\n });\n\n // Login bem-sucedido\n\n return response;\n } else {\n // Login falhou\n await this.handleFailedLogin();\n\n this.updateState({\n status: LoginStatus.ERROR,\n errors: { general: [response.message || 'Credenciais inválidas'] }\n });\n\n return response;\n }\n } catch (error) {\n console.error('Erro durante login:', error);\n\n await this.handleFailedLogin();\n\n const errorMessage = error instanceof Error ? error.message : 'Erro interno do servidor';\n\n this.updateState({\n status: LoginStatus.ERROR,\n errors: { general: [errorMessage] }\n });\n\n return { success: false, message: errorMessage };\n }\n }\n\n /**\n * Realiza logout\n */\n async logout(): Promise<LogoutResponse> {\n this.updateState({ status: LoginStatus.LOADING });\n\n try {\n let response: LogoutResponse = { success: true };\n\n if (this.authProvider?.logout) {\n // Notifica o backend\n response = await this.authProvider.logout();\n }\n\n // Limpa dados locais independente da resposta do backend\n this.authStorage.clearAuthData();\n\n this.updateState({\n status: LoginStatus.IDLE,\n user: null,\n isAuthenticated: false,\n errors: {},\n lastAttempt: null\n });\n\n return response;\n } catch (error) {\n console.error('Erro durante logout:', error);\n\n // Mesmo com erro, limpa dados locais\n this.authStorage.clearAuthData();\n\n this.updateState({\n status: LoginStatus.IDLE,\n user: null,\n isAuthenticated: false,\n errors: {}\n });\n\n return { success: true }; // Sempre considera logout como sucesso localmente\n }\n }\n\n\n /**\n * Verifica se o usuário atual está autenticado\n */\n async checkAuthenticationStatus(): Promise<boolean> {\n try {\n const hasToken = await this.authStorage.hasToken();\n\n if (!hasToken) {\n this.updateState({\n status: LoginStatus.IDLE,\n isAuthenticated: false,\n user: null\n });\n return false;\n }\n\n // Carrega dados do usuário se autenticado\n const userData = await this.authStorage.getUserData<UserInfo>();\n\n if (userData) {\n this.updateState({\n status: LoginStatus.SUCCESS,\n isAuthenticated: true,\n user: userData\n });\n return true;\n }\n\n return false;\n } catch (error) {\n console.error('Erro ao verificar autenticação:', error);\n return false;\n }\n }\n\n /**\n * Obtém informações do usuário atual\n */\n async getCurrentUser(): Promise<UserInfo | null> {\n return await this.authStorage.getUserData<UserInfo>();\n }\n\n /**\n * Verifica se token está expirando em breve\n * ⚠️ ATENÇÃO: Agora é assíncrono devido à criptografia\n */\n async isTokenExpiringSoon(minutesThreshold: number = 5): Promise<boolean> {\n return await this.authStorage.isTokenExpiringSoon(minutesThreshold);\n }\n\n /**\n * Limpa erros do estado atual\n */\n clearErrors(): void {\n this.updateState({ errors: {} });\n }\n\n /**\n * Reseta estado do login\n */\n async resetLoginState(): Promise<void> {\n this.updateState({\n status: LoginStatus.IDLE,\n errors: {}\n });\n }\n\n // ========== MÉTODOS PRIVADOS ==========\n\n /**\n * Inicializa o serviço\n */\n private async initializeService(): Promise<void> {\n // Inicialização simples sem controle de tentativas\n\n // Verifica autenticação atual\n await this.checkAuthenticationStatus();\n\n // Monitora mudanças de autenticação\n this.authStorage.authState$.subscribe(isAuthenticated => {\n if (!isAuthenticated && this.loginState$.value.isAuthenticated) {\n // Usuário perdeu autenticação\n this.updateState({\n status: LoginStatus.IDLE,\n user: null,\n isAuthenticated: false\n });\n }\n });\n }\n\n /**\n * Atualiza estado reativo\n */\n private updateState(updates: Partial<LoginState>): void {\n const currentState = this.loginState$.value;\n this.loginState$.next({\n ...currentState,\n ...updates,\n lastAttempt: updates.status === LoginStatus.LOADING ? new Date() : currentState.lastAttempt\n });\n }\n\n /**\n * Valida credenciais do formulário\n */\n private validateCredentials(credentials: LoginCredentials): LoginValidationErrors {\n const errors: LoginValidationErrors = {};\n\n // Validação de email\n if (!credentials.email) {\n errors.email = ['Email é obrigatório'];\n } else if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(credentials.email)) {\n errors.email = ['Email deve ter um formato válido'];\n }\n\n // Validação de senha\n if (!credentials.password) {\n errors.password = ['Senha é obrigatória'];\n } else if (credentials.password.length < 3) {\n errors.password = ['Senha deve ter pelo menos 3 caracteres'];\n }\n\n return errors;\n }\n\n /**\n * Trata login bem-sucedido\n */\n private async handleSuccessfulLogin(\n response: LoginResponse\n ): Promise<void> {\n if (!response.accessToken || !response.user) {\n throw new Error('Resposta de login inválida');\n }\n\n // Salva token\n const expiryMinutes = response.expiresIn || 60; // Default 1 hora\n await this.authStorage.setToken(response.accessToken, expiryMinutes);\n\n // Salva dados do usuário\n await this.authStorage.setUserData(response.user);\n\n // Credenciais salvas com sucesso\n }\n\n /**\n * Trata falha de login\n */\n private async handleFailedLogin(): Promise<void> {\n // Registra falha de login\n console.warn('Tentativa de login falhou');\n }\n\n /**\n * Simula resposta de login para desenvolvimento/demo\n */\n private async simulateLogin(credentials: LoginCredentials): Promise<LoginResponse> {\n // Simula delay da rede\n await new Promise(resolve => setTimeout(resolve, 1000));\n\n // Credenciais de demo\n const demoUsers = [\n {\n email: 'admin@demo.com',\n password: 'admin',\n user: {\n id: '1',\n nome: 'Administrador',\n email: 'admin@demo.com',\n perfil: 'ADMIN',\n permissoes: ['TODAS'],\n avatar: 'https://via.placeholder.com/100'\n }\n },\n {\n email: 'professor@demo.com',\n password: 'professor',\n user: {\n id: '2',\n nome: 'Professor Demo',\n email: 'professor@demo.com',\n perfil: 'PROFESSOR',\n permissoes: ['CRIAR_PROVA', 'VER_RESULTADOS'],\n avatar: 'https://via.placeholder.com/100'\n }\n },\n {\n email: 'aluno@demo.com',\n password: 'aluno',\n user: {\n id: '3',\n nome: 'Aluno Demo',\n email: 'aluno@demo.com',\n perfil: 'ALUNO',\n permissoes: ['RESPONDER_PROVA'],\n avatar: 'https://via.placeholder.com/100'\n }\n }\n ];\n\n const validUser = demoUsers.find(\n user => user.email === credentials.email && user.password === credentials.password\n );\n\n if (validUser) {\n // Gera token fake\n const header = btoa(JSON.stringify({ alg: 'HS256', typ: 'JWT' }));\n const payload = btoa(JSON.stringify({\n sub: validUser.user.id,\n email: validUser.user.email,\n name: validUser.user.nome,\n roles: validUser.user.permissoes,\n iat: Math.floor(Date.now() / 1000),\n exp: Math.floor(Date.now() / 1000) + (60 * 60) // 1 hora\n }));\n const fakeToken = `${header}.${payload}.fake-signature`;\n\n return {\n success: true,\n accessToken: fakeToken,\n user: validUser.user,\n expiresIn: 60,\n message: 'Login realizado com sucesso'\n };\n }\n\n return {\n success: false,\n message: 'Email ou senha incorretos'\n };\n }\n\n\n}\n","import { Component, OnInit, OnDestroy, Input, Output, EventEmitter, inject } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { LoginService } from '../../services/login/login.service';\nimport {\n LoginCredentials,\n LoginResponse,\n LoginStatus,\n LoginState,\n LoginOptions\n} from '../../types/auth.types';\n\n@Component({\n selector: 'lib-login',\n standalone: true,\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.scss']\n})\nexport class LoginComponent implements OnInit, OnDestroy {\n private destroy$ = new Subject<void>();\n private fb = inject(FormBuilder);\n\n // Configurações do componente\n @Input() options: Partial<LoginOptions> = {};\n @Input() showHeader: boolean = true;\n @Input() showFooter: boolean = true;\n @Input() logoUrl?: string;\n @Input() backgroundImageUrl?: string;\n @Input() customCssClass?: string;\n\n // Eventos\n @Output() loginSuccess = new EventEmitter<LoginResponse>();\n @Output() loginError = new EventEmitter<string>();\n @Output() formChange = new EventEmitter<LoginCredentials>();\n\n // Estado do componente\n loginForm!: FormGroup;\n loginState$!: import('rxjs').Observable<LoginState>;\n isLoading$!: import('rxjs').Observable<boolean>;\n errors$!: import('rxjs').Observable<any>;\n\n // Estados locais\n showPassword = false;\n LoginStatus = LoginStatus; // Para usar no template\n\n constructor(private loginService: LoginService) {\n this.createForm();\n this.initializeObservables();\n }\n\n /**\n * Inicializa os observables\n */\n private initializeObservables(): void {\n this.loginState$ = this.loginService.state$;\n this.isLoading$ = this.loginService.isLoading$;\n this.errors$ = this.loginService.errors$;\n }\n\n ngOnInit(): void {\n // Configura opções do serviço\n if (this.options) {\n this.loginService.configure(this.options);\n }\n\n // Monitora mudanças do estado\n this.loginState$\n .pipe(takeUntil(this.destroy$))\n .subscribe(state => this.handleStateChange(state));\n\n // Monitora mudanças do formulário\n this.loginForm.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe(value => {\n this.formChange.emit(value as LoginCredentials);\n });\n\n // Limpa erros quando usuário começa a digitar\n this.loginForm.get('email')?.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.loginService.clearErrors());\n\n this.loginForm.get('password')?.valueChanges\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.loginService.clearErrors());\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n /**\n * Cria o formulário reativo\n */\n private createForm(): void {\n this.loginForm = this.fb.group({\n email: ['', [\n Validators.required,\n Validators.email,\n Validators.maxLength(255)\n ]],\n password: ['', [\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(100)\n ]],\n rememberMe: [false]\n });\n }\n\n /**\n * Manipula mudanças de estado do login\n */\n private handleStateChange(state: LoginState): void {\n if (state.status === LoginStatus.SUCCESS && state.user) {\n this.loginSuccess.emit({\n success: true,\n user: state.user,\n accessToken: '', // Não expor token no evento\n message: 'Login realizado com sucesso'\n });\n }\n\n if (state.status === LoginStatus.ERROR && state.errors.general) {\n this.loginError.emit(state.errors.general[0]);\n }\n }\n\n /**\n * Submete o formulário de login\n */\n async onSubmit(): Promise<void> {\n if (this.loginForm.invalid) {\n this.markFormGroupTouched();\n return;\n }\n\n const credentials = this.loginForm.value as LoginCredentials;\n\n try {\n const response = await this.loginService.login(credentials);\n\n if (!response.success) {\n // Erro já tratado pelo serviço via observable\n console.warn('Login falhou:', response.message);\n }\n } catch (error) {\n console.error('Erro no componente de login:', error);\n }\n }\n\n /**\n * Alterna visibilidade da senha\n */\n togglePasswordVisibility(): void {\n this.showPassword = !this.showPassword;\n }\n\n\n\n /**\n * Marca todos os campos como tocados para mostrar erros\n */\n private markFormGroupTouched(): void {\n Object.keys(this.loginForm.controls).forEach(key => {\n const control = this.loginForm.get(key);\n control?.markAsTouched();\n });\n }\n\n /**\n * Verifica se campo tem erro específico\n */\n hasFieldError(fieldName: string, errorType: string): boolean {\n const field = this.loginForm.get(fieldName);\n return !!(field?.hasError(errorType) && (field?.dirty || field?.touched));\n }\n\n /**\n * Obtém mensagem de erro do campo\n */\n getFieldErrorMessage(fieldName: string): string {\n const field = this.loginForm.get(fieldName);\n\n if (!field || !field.errors || (!field.dirty && !field.touched)) {\n return '';\n }\n\n const errors = field.errors;\n\n if (errors['required']) {\n return `${this.getFieldLabel(fieldName)} é obrigatório`;\n }\n\n if (errors['email']) {\n return 'Email deve ter um formato válido';\n }\n\n if (errors['minlength']) {\n return `${this.getFieldLabel(fieldName)} deve ter pelo menos ${errors['minlength'].requiredLength} caracteres`;\n }\n\n if (errors['maxlength']) {\n return `${this.getFieldLabel(fieldName)} deve ter no máximo ${errors['maxlength'].requiredLength} caracteres`;\n }\n\n return 'Campo inválido';\n }\n\n /**\n * Obtém label do campo\n */\n private getFieldLabel(fieldName: string): string {\n const labels: { [key: string]: string } = {\n email: 'Email',\n password: 'Senha'\n };\n return labels[fieldName] || fieldName;\n }\n\n /**\n * Reseta o formulário\n */\n resetForm(): void {\n this.loginForm.reset();\n this.showPassword = false;\n this.loginService.clearErrors();\n }\n\n /**\n * Tenta fazer login com credenciais de demonstração\n */\n async loginWithDemo(userType: 'admin' | 'professor' | 'aluno'): Promise<void> {\n const demoCredentials: { [key: string]: LoginCredentials } = {\n admin: {\n email: 'admin@demo.com',\n password: 'admin'\n },\n professor: {\n email: 'professor@demo.com',\n password: 'professor'\n },\n aluno: {\n email: 'aluno@demo.com',\n password: 'aluno'\n }\n };\n\n const credentials = demoCredentials[userType];\n if (credentials) {\n // Preenche formulário\n this.loginForm.patchValue(credentials);\n\n // Executa login\n await this.onSubmit();\n }\n }\n\n /**\n * Manipula esqueci minha senha\n */\n onForgotPassword(): void {\n // Implementação específica da aplicação\n console.log('Forgot password clicked');\n }\n\n /**\n * Manipula criação de conta\n */\n onCreateAccount(): void {\n // Implementação específica da aplicação\n console.log('Create account clicked');\n }\n}\n","<!-- Container principal do login -->\n<div class=\"login-container\" [ngClass]=\"customCssClass\"\n [style.background-image]=\"options.backgroundUrl ? 'url(' + options.backgroundUrl + ')' : null\">\n\n <!-- Card de login -->\n <div class=\"login-card\">\n\n <!-- Header -->\n <div class=\"login-header\">\n <img *ngIf=\"options.logoUrl\" [src]=\"options.logoUrl\" alt=\"Logo\" class=\"login-logo\">\n\n <h1 class=\"login-title\">{{ options.title || 'Entrar' }}</h1>\n <p class=\"login-subtitle\">{{ options.subtitle || 'Acesse sua conta' }}</p>\n </div>\n\n <!-- Indicador de loading -->\n <div *ngIf=\"isLoading$ | async\" class=\"loading-overlay\">\n <div class=\"loading-spinner\"></div>\n <span class=\"loading-text\">Entrando...</span>\n </div>\n\n <!-- Estado de bloqueio removido conforme solicitação -->\n\n <!-- Formulário de login -->\n <form [formGroup]=\"loginForm\" (ngSubmit)=\"onSubmit()\" class=\"login-form\"\n [class.disabled]=\"(isLoading$ | async)\">\n\n <!-- Campo Email -->\n <div class=\"form-group\">\n <label for=\"email\" class=\"form-label\">\n Email <span class=\"required\">*</span>\n </label>\n\n <div class=\"input-wrapper\">\n <input id=\"email\" type=\"email\" formControlName=\"email\" class=\"form-input\"\n [class.error]=\"hasFieldError('email', 'required') || hasFieldError('email', 'email')\"\n placeholder=\"Digite seu email\" autocomplete=\"email\" autocapitalize=\"off\">\n\n <i class=\"input-icon icon-email\"></i>\n </div>\n\n <!-- Erro do campo email -->\n <div *ngIf=\"getFieldErrorMessage('email')\" class=\"field-error\">\n {{ getFieldErrorMessage('email') }}\n </div>\n </div>\n\n <!-- Campo Senha -->\n <div class=\"form-group\">\n <label for=\"password\" class=\"form-label\">\n Senha <span class=\"required\">*</span>\n </label>\n\n <div class=\"input-wrapper\">\n <input id=\"password\" [type]=\"showPassword ? 'text' : 'password'\" formControlName=\"password\"\n class=\"form-input\"\n [class.error]=\"hasFieldError('password', 'required') || hasFieldError('password', 'minlength')\"\n placeholder=\"Digite sua senha\" autocomplete=\"current-password\">\n\n <button type=\"button\" class=\"password-toggle\" (click)=\"togglePasswordVisibility()\"\n [attr.aria-label]=\"showPassword ? 'Ocultar senha' : 'Mostrar senha'\">\n <i [class]=\"showPassword ? 'icon-eye-off' : 'icon-eye'\"></i>\n </button>\n </div>\n\n <!-- Erro do campo senha -->\n <div *ngIf=\"getFieldErrorMessage('password')\" class=\"field-error\">\n {{ getFieldErrorMessage('password') }}\n </div>\n </div>\n\n <!-- Checkbox removido conforme solicitação -->\n\n <!-- Erros gerais -->\n <div *ngIf=\"(errors$ | async)?.general\" class=\"alert alert-error\">\n <i class=\"icon-error\"></i>\n <div>\n <div *ngFor=\"let error of (errors$ | async)?.general\">\n {{ error }}\n </div>\n </div>\n </div>\n\n <!-- Botão de submit -->\n <button type=\"submit\" class=\"login-button\" [disabled]=\"loginForm.invalid || (isLoading$ | async)\">\n\n <span *ngIf=\"!(isLoading$ | async)\">Entrar</span>\n <span *ngIf=\"isLoading$ | async\" class=\"loading-content\">\n <i class=\"icon-spinner spin\"></i>\n Entrando...\n </span>\n </button>\n\n <!-- Contador de tentativas removido conforme solicitação -->\n </form>\n\n <!-- Links adicionais -->\n <div class=\"login-links\">\n <a href=\"#\" (click)=\"onForgotPassword(); $event.preventDefault()\" class=\"link\">\n Esqueci minha senha\n </a>\n\n <span class=\"separator\">•</span>\n\n <a href=\"#\" (click)=\"onCreateAccount(); $event.preventDefault()\" class=\"link\">\n Criar conta\n </a>\n </div>\n\n <!-- Seção de demonstração removida conforme solicitação -->\n\n <!-- Footer -->\n <div *ngIf=\"options.footerText\" class=\"login-footer\">\n <p class=\"footer-text\">\n {{ options.footerText }}\n </p>\n </div>\n </div>\n</div>","import { Injectable } from '@angular/core';\nimport { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor, HttpErrorResponse } from '@angular/common/http';\nimport { Observable, throwError, from } from 'rxjs';\nimport { switchMap, catchError } from 'rxjs/operators';\nimport { AuthStorageService } from '../services/local-storage/auth-storage.service';\n\n/**\n * Interceptor HTTP para autenticação automática\n * Adiciona o Access Token nas requisições e trata erros 401\n */\n@Injectable()\nexport class AuthInterceptor implements HttpInterceptor {\n\n constructor(private authStorage: AuthStorageService) { }\n\n intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n // Converte para Observable para trabalhar com async\n return from(this.authStorage.getToken()).pipe(\n switchMap(token => {\n // Clona a requisição e adiciona o token se disponível\n let authReq = req;\n\n if (token) {\n authReq = req.clone({\n setHeaders: {\n Authorization: `Bearer ${token}`\n }\n });\n }\n\n // Processa a requisição\n return next.handle(authReq).pipe(\n catchError((error: HttpErrorResponse) => {\n // Se receber 401, limpa os dados de autenticação\n // O backend já fez o refresh automaticamente, se falhou é porque não tem mais sessão válida\n if (error.status === 401) {\n this.authStorage.clearAuthData();\n }\n\n // Re-propaga o erro para ser tratado pelos componentes\n return throwError(() => error);\n })\n );\n })\n );\n }\n}","// Export dos interceptors para uso público\nexport { AuthInterceptor } from './auth.interceptor';","/*\n * Public API Surface of shared-components\n */\n\nexport * from './lib/shared-components.service';\nexport * from './lib/shared-components.component';\n\n// Components\nexport * from './lib/components/dropdown/dropdown.component';\nexport * from './lib/components/input/input.component';\nexport * from './lib/components/button/button.component';\nexport * from './lib/components/checkbox/checkbox.component';\nexport * from './lib/components/toggle/toggle.component';\nexport * from './lib/components/breadcrumb/breadcrumb.component';\nexport * from './lib/components/table/table.component';\n\n// Layout Components \nexport * from './lib/sidebar/sidebar.component';\n\n// Pages\nexport * from './lib/pages/login/login.component';\n\n// Services\nexport * from './lib/services';\nexport { AUTH_PROVIDER } from './lib/services/login/login.service';\n\n// Interceptors\nexport * from './lib/interceptors';\n\n// Types\nexport * from './lib/types/auth.types';\nexport * from './lib/types/sidebar.types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i1.LocalStorageService","i1.LoginService","i1.AuthStorageService"],"mappings":";;;;;;;;;;;MAKa,uBAAuB,CAAA;AAElC,IAAA,WAAA,GAAA;w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AAK,EAAE;AACP,gBAAA,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC;AAChB,oBAAA,UAAU,EAAE;wBACR,aAAa,EAAE,CAAU,OAAA,EAAA,KAAK,CAAE;AACnC;AACJ,iBAAA,CAAC;;;AAIN,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAC5B,UAAU,CAAC,CAAC,KAAwB,KAAI;;;AAGpC,gBAAA,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE;AACtB,oBAAA,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE;;;AAIpC,gBAAA,OAAO,UAAU,CAAC,MAAM,KAAK,CAAC;aACjC,CAAC,CACL;SACJ,CAAC,CACL;;wGAjCI,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAC,kBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;4GAAf,eAAe,EAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACVD;;ACAA;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ramonbsales/noah-angular" />
5
+ export * from './public-api';
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class BreadcrumbComponent {
3
+ items: Array<{
4
+ label: string;
5
+ url?: string;
6
+ }>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbComponent, "lib-breadcrumb", never, { "items": { "alias": "items"; "required": false; }; }, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1,16 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ButtonComponent {
4
+ title: string;
5
+ backgroundColor: string;
6
+ color: string;
7
+ borderColor: string;
8
+ minWidth: string;
9
+ disabled: boolean;
10
+ loading: boolean;
11
+ loadingText: string;
12
+ onClickEvent: EventEmitter<void>;
13
+ onClick(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "lib-button", never, { "title": { "alias": "title"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "color": { "alias": "color"; "required": false; }; "borderColor": { "alias": "borderColor"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "loadingText": { "alias": "loadingText"; "required": false; }; }, { "onClickEvent": "onClickEvent"; }, never, never, true, never>;
16
+ }
@@ -0,0 +1,24 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CheckboxComponent {
5
+ /** Array de opções: [{ label: string, value: any }] */
6
+ options: Array<{
7
+ label: string;
8
+ value: any;
9
+ }>;
10
+ /** Se true, permite múltipla seleção */
11
+ multiple: boolean;
12
+ /** FormControl do Reactive Forms */
13
+ control?: FormControl;
14
+ /** Emite valor selecionado ao pai (opcional) */
15
+ selectedChange: EventEmitter<any>;
16
+ get disabled(): boolean;
17
+ get selected(): any[] | any;
18
+ isChecked(value: any): boolean;
19
+ onOptionChange(event: Event, value: any): void;
20
+ get showError(): boolean;
21
+ get errorMessage(): string | null;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "lib-checkbox", never, { "options": { "alias": "options"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "control": { "alias": "control"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, true, never>;
24
+ }
@@ -0,0 +1,37 @@
1
+ import { OnInit, OnChanges, SimpleChanges, EventEmitter } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DropdownComponent implements OnInit, OnChanges, ControlValueAccessor {
5
+ label: string;
6
+ placeholder: string;
7
+ options: {
8
+ value: any;
9
+ label: any;
10
+ }[];
11
+ disabled: boolean;
12
+ required: boolean;
13
+ errorMessage: string;
14
+ selectedOption: any;
15
+ hideLabel: boolean;
16
+ valueChange: EventEmitter<any>;
17
+ private internalValue;
18
+ isOpen: boolean;
19
+ private onChange;
20
+ private onTouched;
21
+ constructor();
22
+ ngOnInit(): void;
23
+ ngOnChanges(changes: SimpleChanges): void;
24
+ selectOption(option: {
25
+ value: any;
26
+ label: any;
27
+ }): void;
28
+ toggleDropdown(): void;
29
+ getSelectedLabel(): string;
30
+ hasValue(): boolean;
31
+ writeValue(value: any): void;
32
+ registerOnChange(fn: (value: any) => void): void;
33
+ registerOnTouched(fn: () => void): void;
34
+ setDisabledState(isDisabled: boolean): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "lib-dropdown", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "options": { "alias": "options"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "selectedOption": { "alias": "selectedOption"; "required": false; }; "hideLabel": { "alias": "hideLabel"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
37
+ }
@@ -0,0 +1,37 @@
1
+ import { OnInit, Injector } from '@angular/core';
2
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export type InputType = 'text' | 'number' | 'date' | 'email' | 'password';
5
+ export declare class InputComponent implements OnInit, ControlValueAccessor {
6
+ private injector;
7
+ label: string;
8
+ placeholder: string;
9
+ type: InputType;
10
+ customErrorMessages: {
11
+ [key: string]: string;
12
+ };
13
+ get isRequired(): boolean;
14
+ get isDisabled(): boolean;
15
+ value: any;
16
+ isFocused: boolean;
17
+ control?: NgControl;
18
+ private onChange;
19
+ private onTouched;
20
+ private defaultErrorMessages;
21
+ constructor(injector: Injector);
22
+ ngOnInit(): void;
23
+ onFocus(): void;
24
+ onBlur(): void;
25
+ onInput(event: Event): void;
26
+ get showError(): boolean;
27
+ get showRequiredAsterisk(): boolean;
28
+ get errorMessage(): string;
29
+ private interpolateErrorMessage;
30
+ private validateField;
31
+ hasValue(): boolean;
32
+ writeValue(value: any): void;
33
+ registerOnChange(fn: (value: any) => void): void;
34
+ registerOnTouched(fn: () => void): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "lib-input", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "type": { "alias": "type"; "required": false; }; "customErrorMessages": { "alias": "customErrorMessages"; "required": false; }; }, {}, never, never, true, never>;
37
+ }
@@ -0,0 +1,40 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface TableAction {
4
+ title: string;
5
+ callback: (row: any) => void;
6
+ icon?: string;
7
+ }
8
+ export interface TableColumn {
9
+ title: string;
10
+ prop: string;
11
+ sortable?: boolean;
12
+ width?: string;
13
+ actions?: TableAction[];
14
+ }
15
+ export declare class TableComponent {
16
+ columns: TableColumn[];
17
+ data: any[];
18
+ columnTypes: {
19
+ [key: string]: 'string' | 'date' | 'time' | 'tag';
20
+ };
21
+ page: number;
22
+ pageSize: number;
23
+ totalItems: number;
24
+ pageSizeOptions: {
25
+ value: number;
26
+ label: string;
27
+ }[];
28
+ pageChange: EventEmitter<number>;
29
+ pageSizeChange: EventEmitter<number>;
30
+ get hasActions(): boolean;
31
+ get actionsList(): TableAction[];
32
+ onPageSizeChange(newSize: number): void;
33
+ get totalPages(): number;
34
+ get currentPage(): number;
35
+ goToPage(page: number): void;
36
+ getPages(): (number | string)[];
37
+ toNumber(val: any): number;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "lib-table", never, { "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "columnTypes": { "alias": "columnTypes"; "required": false; }; "page": { "alias": "page"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; }, { "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; }, never, never, true, never>;
40
+ }
@@ -0,0 +1,15 @@
1
+ import { ControlValueAccessor } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ToggleComponent implements ControlValueAccessor {
4
+ title: string;
5
+ enableTitle: boolean;
6
+ value: boolean;
7
+ onChange: (value: boolean) => void;
8
+ onTouched: () => void;
9
+ writeValue(value: boolean): void;
10
+ registerOnChange(fn: any): void;
11
+ registerOnTouched(fn: any): void;
12
+ toggle(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<ToggleComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToggleComponent, "lib-toggle", never, { "title": { "alias": "title"; "required": false; }; "enableTitle": { "alias": "enableTitle"; "required": false; }; }, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,15 @@
1
+ import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { AuthStorageService } from '../services/local-storage/auth-storage.service';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Interceptor HTTP para autenticação automática
7
+ * Adiciona o Access Token nas requisições e trata erros 401
8
+ */
9
+ export declare class AuthInterceptor implements HttpInterceptor {
10
+ private authStorage;
11
+ constructor(authStorage: AuthStorageService);
12
+ intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthInterceptor, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthInterceptor>;
15
+ }
@@ -0,0 +1 @@
1
+ export { AuthInterceptor } from './auth.interceptor';