ngx-sp-auth 0.0.0-watch

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.
Files changed (108) hide show
  1. package/README.md +24 -0
  2. package/esm2022/lib/auth.module.mjs +87 -0
  3. package/esm2022/lib/auth.service.mjs +306 -0
  4. package/esm2022/lib/components/login/login.component.mjs +326 -0
  5. package/esm2022/lib/components/menu-lateral/dropdown/primary-dropdown/primary-dropdown.component.mjs +68 -0
  6. package/esm2022/lib/components/menu-lateral/dropdown/secondary-dropdown/secondary-dropdown.component.mjs +32 -0
  7. package/esm2022/lib/components/menu-lateral/menu/list-estab.service.mjs +55 -0
  8. package/esm2022/lib/components/menu-lateral/menu/menu-lateral.component.mjs +235 -0
  9. package/esm2022/lib/components/menu-lateral/menu/selecao-estabelecimentos-modal/selecao-estabelecimentos-modal.component.mjs +200 -0
  10. package/esm2022/lib/components/menu-lateral/menu-services.service.mjs +151 -0
  11. package/esm2022/lib/components/menu-lateral/model/iestabelecimento.model.mjs +2 -0
  12. package/esm2022/lib/components/menu-lateral/model/imenu-item-structure.model.mjs +2 -0
  13. package/esm2022/lib/components/menu-lateral/model/imenu.model.mjs +12 -0
  14. package/esm2022/lib/components/menu-lateral/model/infrausuarioimg.mjs +12 -0
  15. package/esm2022/lib/components/menu-lateral/model/isubmenu-item-structure.model.mjs +2 -0
  16. package/esm2022/lib/components/menu-lateral/model/ret-estabelecimento-session.mjs +10 -0
  17. package/esm2022/lib/components/menu-lateral/model/ret-infrausuarioemail.mjs +8 -0
  18. package/esm2022/lib/components/menu-lateral/model/ret-infrausuarioimg.mjs +11 -0
  19. package/esm2022/lib/components/menu-lateral/model/usuario-img.mjs +8 -0
  20. package/esm2022/lib/components/menu-lateral/submenus/dynamic-menu/dynamic-menu.component.mjs +54 -0
  21. package/esm2022/lib/components/menu-lateral/submenus/notif-submenu/notif-submenu.component.mjs +14 -0
  22. package/esm2022/lib/components/nova-senha/nova-senhacomponent.mjs +191 -0
  23. package/esm2022/lib/custom/custom-login.service.mjs +52 -0
  24. package/esm2022/lib/custom/custom-menu.service.mjs +88 -0
  25. package/esm2022/lib/custom/menu-config.service.mjs +70 -0
  26. package/esm2022/lib/custom/models/icustom-login-service.mjs +2 -0
  27. package/esm2022/lib/custom/models/icustom-menu-service.mjs +2 -0
  28. package/esm2022/lib/custom/models/imenu-config.mjs +2 -0
  29. package/esm2022/lib/environments/environments.service.mjs +21 -0
  30. package/esm2022/lib/environments/models/ienvironments.mjs +2 -0
  31. package/esm2022/lib/guards/auth-guard.mjs +34 -0
  32. package/esm2022/lib/guards/external-login-guard.mjs +88 -0
  33. package/esm2022/lib/guards/login-guard.mjs +35 -0
  34. package/esm2022/lib/interceptors/auth-aplic.interceptor.mjs +41 -0
  35. package/esm2022/lib/interceptors/auth-infra.interceptor.mjs +30 -0
  36. package/esm2022/lib/models/code-2fa.mjs +2 -0
  37. package/esm2022/lib/models/custom-propriedades-login.mjs +3 -0
  38. package/esm2022/lib/models/forgotten-password-form.mjs +2 -0
  39. package/esm2022/lib/models/login-form.mjs +2 -0
  40. package/esm2022/lib/models/login.mjs +2 -0
  41. package/esm2022/lib/models/nova-senha-form.mjs +2 -0
  42. package/esm2022/lib/models/password-recup.mjs +2 -0
  43. package/esm2022/lib/models/payload.mjs +2 -0
  44. package/esm2022/lib/models/ret-login.mjs +21 -0
  45. package/esm2022/lib/models/ret-token.mjs +8 -0
  46. package/esm2022/lib/models/token.mjs +2 -0
  47. package/esm2022/lib/server/ret-server-config.mjs +9 -0
  48. package/esm2022/lib/server/server.service.mjs +38 -0
  49. package/esm2022/lib/storage/auth-storage.service.mjs +409 -0
  50. package/esm2022/ngx-sp-auth.mjs +5 -0
  51. package/esm2022/public-api.mjs +37 -0
  52. package/fesm2022/ngx-sp-auth.mjs +2520 -0
  53. package/fesm2022/ngx-sp-auth.mjs.map +1 -0
  54. package/index.d.ts +5 -0
  55. package/lib/auth.module.d.ts +21 -0
  56. package/lib/auth.service.d.ts +42 -0
  57. package/lib/components/login/login.component.d.ts +67 -0
  58. package/lib/components/menu-lateral/dropdown/primary-dropdown/primary-dropdown.component.d.ts +20 -0
  59. package/lib/components/menu-lateral/dropdown/secondary-dropdown/secondary-dropdown.component.d.ts +12 -0
  60. package/lib/components/menu-lateral/menu/list-estab.service.d.ts +19 -0
  61. package/lib/components/menu-lateral/menu/menu-lateral.component.d.ts +74 -0
  62. package/lib/components/menu-lateral/menu/selecao-estabelecimentos-modal/selecao-estabelecimentos-modal.component.d.ts +71 -0
  63. package/lib/components/menu-lateral/menu-services.service.d.ts +31 -0
  64. package/lib/components/menu-lateral/model/iestabelecimento.model.d.ts +4 -0
  65. package/lib/components/menu-lateral/model/imenu-item-structure.model.d.ts +12 -0
  66. package/lib/components/menu-lateral/model/imenu.model.d.ts +40 -0
  67. package/lib/components/menu-lateral/model/infrausuarioimg.d.ts +9 -0
  68. package/lib/components/menu-lateral/model/isubmenu-item-structure.model.d.ts +9 -0
  69. package/lib/components/menu-lateral/model/ret-estabelecimento-session.d.ts +8 -0
  70. package/lib/components/menu-lateral/model/ret-infrausuarioemail.d.ts +6 -0
  71. package/lib/components/menu-lateral/model/ret-infrausuarioimg.d.ts +9 -0
  72. package/lib/components/menu-lateral/model/usuario-img.d.ts +5 -0
  73. package/lib/components/menu-lateral/submenus/dynamic-menu/dynamic-menu.component.d.ts +25 -0
  74. package/lib/components/menu-lateral/submenus/notif-submenu/notif-submenu.component.d.ts +8 -0
  75. package/lib/components/nova-senha/nova-senhacomponent.d.ts +48 -0
  76. package/lib/custom/custom-login.service.d.ts +38 -0
  77. package/lib/custom/custom-menu.service.d.ts +48 -0
  78. package/lib/custom/menu-config.service.d.ts +32 -0
  79. package/lib/custom/models/icustom-login-service.d.ts +13 -0
  80. package/lib/custom/models/icustom-menu-service.d.ts +10 -0
  81. package/lib/custom/models/imenu-config.d.ts +7 -0
  82. package/lib/environments/environments.service.d.ts +11 -0
  83. package/lib/environments/models/ienvironments.d.ts +4 -0
  84. package/lib/guards/auth-guard.d.ts +14 -0
  85. package/lib/guards/external-login-guard.d.ts +21 -0
  86. package/lib/guards/login-guard.d.ts +24 -0
  87. package/lib/interceptors/auth-aplic.interceptor.d.ts +22 -0
  88. package/lib/interceptors/auth-infra.interceptor.d.ts +16 -0
  89. package/lib/models/code-2fa.d.ts +4 -0
  90. package/lib/models/custom-propriedades-login.d.ts +11 -0
  91. package/lib/models/forgotten-password-form.d.ts +5 -0
  92. package/lib/models/login-form.d.ts +5 -0
  93. package/lib/models/login.d.ts +4 -0
  94. package/lib/models/nova-senha-form.d.ts +5 -0
  95. package/lib/models/password-recup.d.ts +5 -0
  96. package/lib/models/payload.d.ts +9 -0
  97. package/lib/models/ret-login.d.ts +20 -0
  98. package/lib/models/ret-token.d.ts +6 -0
  99. package/lib/models/token.d.ts +8 -0
  100. package/lib/server/ret-server-config.d.ts +7 -0
  101. package/lib/server/server.service.d.ts +14 -0
  102. package/lib/storage/auth-storage.service.d.ts +90 -0
  103. package/package.json +25 -0
  104. package/public-api.d.ts +36 -0
  105. package/src/assets/imgs/Property1-cadeado.png +0 -0
  106. package/src/assets/imgs/Property1-calendariofino.png +0 -0
  107. package/src/assets/imgs/Property1-mao.png +0 -0
  108. package/src/assets/styles/styles.novo.scss +0 -0
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="ngx-sp-auth" />
5
+ export * from './public-api';
@@ -0,0 +1,21 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/login/login.component";
3
+ import * as i2 from "./components/nova-senha/nova-senhacomponent";
4
+ import * as i3 from "./components/menu-lateral/dropdown/primary-dropdown/primary-dropdown.component";
5
+ import * as i4 from "./components/menu-lateral/dropdown/secondary-dropdown/secondary-dropdown.component";
6
+ import * as i5 from "./components/menu-lateral/menu/selecao-estabelecimentos-modal/selecao-estabelecimentos-modal.component";
7
+ import * as i6 from "./components/menu-lateral/menu/menu-lateral.component";
8
+ import * as i7 from "./components/menu-lateral/submenus/dynamic-menu/dynamic-menu.component";
9
+ import * as i8 from "./components/menu-lateral/submenus/notif-submenu/notif-submenu.component";
10
+ import * as i9 from "@angular/common";
11
+ import * as i10 from "@angular/forms";
12
+ import * as i11 from "ngx-sp-infra";
13
+ import * as i12 from "ngx-pagination";
14
+ import * as i13 from "ngx-bootstrap/popover";
15
+ import * as i14 from "ngx-bootstrap/tooltip";
16
+ import * as i15 from "@angular/router";
17
+ export declare class AuthModule {
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthModule, never>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AuthModule, [typeof i1.LoginComponent, typeof i2.NovaSenhaComponent, typeof i3.PrimaryDropdownComponent, typeof i4.SecondaryDropdownComponent, typeof i5.SelecaoEstabelecimentosModalComponent, typeof i6.MenuLateralComponent, typeof i7.DynamicMenuComponent, typeof i8.NotifSubmenuComponent], [typeof i9.CommonModule, typeof i10.ReactiveFormsModule, typeof i11.InfraModule, typeof i12.NgxPaginationModule, typeof i13.PopoverModule, typeof i14.TooltipModule, typeof i9.CommonModule, typeof i15.RouterLink, typeof i15.RouterOutlet], [typeof i1.LoginComponent, typeof i2.NovaSenhaComponent, typeof i3.PrimaryDropdownComponent, typeof i4.SecondaryDropdownComponent, typeof i5.SelecaoEstabelecimentosModalComponent, typeof i6.MenuLateralComponent, typeof i7.DynamicMenuComponent, typeof i8.NotifSubmenuComponent]>;
20
+ static ɵinj: i0.ɵɵInjectorDeclaration<AuthModule>;
21
+ }
@@ -0,0 +1,42 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Router } from '@angular/router';
3
+ import { LibCustomLoginService } from '../lib/custom/custom-login.service';
4
+ import { Observable } from 'rxjs';
5
+ import { ForgottenPasswordForm } from './models/forgotten-password-form';
6
+ import { LoginForm } from './models/login-form';
7
+ import { NovaSenhaForm } from './models/nova-senha-form';
8
+ import { RetLogin } from './models/ret-login';
9
+ import { IpServiceService, RetError } from 'ngx-sp-infra';
10
+ import { AuthStorageService } from './storage/auth-storage.service';
11
+ import * as i0 from "@angular/core";
12
+ export declare class AuthService {
13
+ private _httpClient;
14
+ private _router;
15
+ private _authStorageService;
16
+ private _customLoginService;
17
+ private _ipServiceService;
18
+ private readonly _HOSTNAME;
19
+ private readonly _BASE_URL;
20
+ private readonly _HTTP_HEADERS;
21
+ private ip;
22
+ private city;
23
+ private state;
24
+ private country;
25
+ constructor(_httpClient: HttpClient, _router: Router, _authStorageService: AuthStorageService, _customLoginService: LibCustomLoginService, _ipServiceService: IpServiceService);
26
+ private getParms;
27
+ private geHostName;
28
+ /** Realiza o login no sistema
29
+ * @param login Informações do formulário de login
30
+ * @returns Observable com os dados do login realizado, seja erro ou sucesso
31
+ */
32
+ login(parmsLogin: LoginForm): Observable<RetLogin>;
33
+ loginExternal(dominio: string, user: string, password: string): Observable<boolean>;
34
+ logout(): void;
35
+ validateAuthentication2Fa(code: string): Observable<RetLogin>;
36
+ GetNewCode2Fa(): Observable<RetError>;
37
+ forgottenPassword(parms: ForgottenPasswordForm): Observable<RetError>;
38
+ recoverPassword(dominio: string, usuario: string, parms: NovaSenhaForm): Observable<RetError>;
39
+ createPassword(dominio: string, usuario: string, parms: NovaSenhaForm): Observable<RetError>;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
41
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
42
+ }
@@ -0,0 +1,67 @@
1
+ import { OnInit, TemplateRef } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { Title } from '@angular/platform-browser';
4
+ import { Router } from '@angular/router';
5
+ import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
6
+ import { ToastrService } from 'ngx-toastr';
7
+ import { FormUtils, MessageService } from 'ngx-sp-infra';
8
+ import { AuthService } from '../../auth.service';
9
+ import { EnvironmentService } from '../../environments/environments.service';
10
+ import { LibCustomLoginService } from '../../custom/custom-login.service';
11
+ import { ServerService } from '../../server/server.service';
12
+ import { AuthStorageService } from '../../storage/auth-storage.service';
13
+ import * as i0 from "@angular/core";
14
+ export declare class LoginComponent implements OnInit {
15
+ private _bsModalService;
16
+ private _messageService;
17
+ private _formBuilder;
18
+ private _authService;
19
+ private _serverService;
20
+ private _environmentService;
21
+ private _authStorageService;
22
+ _customLoginService: LibCustomLoginService;
23
+ private _title;
24
+ private _router;
25
+ private _toastrService;
26
+ constructor(_bsModalService: BsModalService, _messageService: MessageService, _formBuilder: FormBuilder, _authService: AuthService, _serverService: ServerService, _environmentService: EnvironmentService, _authStorageService: AuthStorageService, _customLoginService: LibCustomLoginService, _title: Title, _router: Router, _toastrService: ToastrService);
27
+ private idFgtPsw;
28
+ modalRef?: BsModalRef;
29
+ currentTime: Date;
30
+ year: number;
31
+ isLoading: boolean;
32
+ isLoadingSendAuthentication2Fa: boolean;
33
+ showParmsAuthentication2Fa: boolean;
34
+ isLoadingGetNewCode: boolean;
35
+ private _subscription;
36
+ private timerDuration;
37
+ secondsLeft: number;
38
+ private countdown$;
39
+ form: FormGroup;
40
+ formFgtPsw: FormGroup;
41
+ formAuthentication2Fa: FormGroup;
42
+ get FormUtils(): typeof FormUtils;
43
+ get dominio(): string;
44
+ get usuario(): string;
45
+ get senha(): string;
46
+ get dominioFgtPsw(): string;
47
+ get usuarioFgtPsw(): string;
48
+ get code(): string;
49
+ ngOnInit(): void;
50
+ private createForm;
51
+ private createFormForgottenPassword;
52
+ private createFormAuthentication2Fa;
53
+ geturlErpConfig(): string;
54
+ getServer(): void;
55
+ logOn(): void;
56
+ sendForgottenPassword(): void;
57
+ forgottenPassword(): void;
58
+ sendCode(): void;
59
+ validateCode(): void;
60
+ getNewCode(): void;
61
+ GetNewCode2Fa(): void;
62
+ voltar(): void;
63
+ openForgottenPasswordModal(template: TemplateRef<any>): void;
64
+ closeForgottenPasswordModal(): void;
65
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
66
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "lib-login", never, {}, {}, never, never, false, never>;
67
+ }
@@ -0,0 +1,20 @@
1
+ import { OnInit, TemplateRef } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { LibCustomMenuService } from '../../../../custom/custom-menu.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class PrimaryDropdownComponent implements OnInit {
6
+ private _customMenuService;
7
+ selectDataState: boolean;
8
+ modulo: any;
9
+ buttonWasClicked: Observable<boolean>;
10
+ primaryDropdown: Array<any>;
11
+ constructor(_customMenuService: LibCustomMenuService);
12
+ ngOnInit(): void;
13
+ openDropdown(modulo: any, desiredDropdown: TemplateRef<any>): void;
14
+ onClickedOutside(e: Event, ref: HTMLDivElement): void;
15
+ backToPrimary(data: boolean): void;
16
+ redirectToPrePortal(): void;
17
+ redirectToModulo(modulo: string): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<PrimaryDropdownComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<PrimaryDropdownComponent, "app-primary-dropdown", never, { "buttonWasClicked": { "alias": "buttonWasClicked"; "required": false; }; }, {}, never, never, false, never>;
20
+ }
@@ -0,0 +1,12 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SecondaryDropdownComponent implements OnInit {
4
+ modulo: any;
5
+ backPrimaryDropdown: EventEmitter<boolean>;
6
+ constructor();
7
+ ngOnInit(): void;
8
+ backToPrimary(): void;
9
+ redirectToModulo(modulo: string): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<SecondaryDropdownComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<SecondaryDropdownComponent, "app-secondary-dropdown", never, { "modulo": { "alias": "modulo"; "required": false; }; }, { "backPrimaryDropdown": "backPrimaryDropdown"; }, never, never, false, never>;
12
+ }
@@ -0,0 +1,19 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { IEstabelecimento } from '../model/iestabelecimento.model';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ListEstabService {
6
+ private http;
7
+ private storage;
8
+ cacheName: string;
9
+ readonly menuKey: string;
10
+ baseUrl: string;
11
+ constructor(http: HttpClient);
12
+ getList(): Observable<IEstabelecimento[]>;
13
+ set(value: IEstabelecimento[]): void;
14
+ get(): IEstabelecimento[] | null;
15
+ remove(): void;
16
+ getCacheName(cacheName: string): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListEstabService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<ListEstabService>;
19
+ }
@@ -0,0 +1,74 @@
1
+ import { OnInit, TemplateRef } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import { BsModalService } from 'ngx-bootstrap/modal';
4
+ import { MessageService } from 'ngx-sp-infra';
5
+ import { Subject } from 'rxjs';
6
+ import { LibCustomMenuService } from './../../../custom/custom-menu.service';
7
+ import { AuthService } from '../../../auth.service';
8
+ import { MenuConfigService } from '../../../custom/menu-config.service';
9
+ import { AuthStorageService } from '../../../storage/auth-storage.service';
10
+ import { MenuServicesService } from '../menu-services.service';
11
+ import { IMenuItemStructure } from '../model/imenu-item-structure.model';
12
+ import { ISubmenuItemStructure } from '../model/isubmenu-item-structure.model';
13
+ import * as i0 from "@angular/core";
14
+ export declare class MenuLateralComponent implements OnInit {
15
+ _customMenuService: LibCustomMenuService;
16
+ private _authStorageService;
17
+ private _bsModalService;
18
+ private _menuServices;
19
+ private _messageService;
20
+ private _router;
21
+ private _authService;
22
+ constructor(_customMenuService: LibCustomMenuService, _authStorageService: AuthStorageService, _bsModalService: BsModalService, _menuServices: MenuServicesService, _messageService: MessageService, _router: Router, _authService: AuthService);
23
+ ngOnInit(): void;
24
+ private notif_template?;
25
+ menuLink?: HTMLAnchorElement;
26
+ desiredContent?: TemplateRef<any>;
27
+ readonly MODAL_ESTABELECIMENTO: number;
28
+ nomeEstabelecimento: string;
29
+ titleSubmenu: string;
30
+ submenuList: (ISubmenuItemStructure | undefined)[];
31
+ messageIfClicked: Subject<boolean>;
32
+ /** Esta variável é usada na abertura do submenu e do submenu secundário para
33
+ * que a função onClickedOutside() que está na segunda div principal do HTML do
34
+ * componente não seja ativada, pois se ela for ativada ela irá fechar o menu
35
+ * lateral, e quando vamos do submenu para o submenu secundário não queremos
36
+ * fechar o menu lateral, e quando vamos do submenu secundário para o submenu
37
+ * também não queremos fechar o menu lateral;
38
+ */
39
+ closeMenu: boolean;
40
+ /** Utilizada como a fonte da imagem de perfil do usuário logado no sistema. */
41
+ footerUserImgSrc: string;
42
+ /** Emai do usuário logado para ser exibido no popover */
43
+ footerUserEmail: string;
44
+ /** Nome do usuário logado para ser exibido no rodapé do menu. */
45
+ footerUserName: string;
46
+ isPopoverVisible: boolean;
47
+ showBalloon: boolean;
48
+ menuDynamic: boolean;
49
+ menuConfig: MenuConfigService;
50
+ private getEstabelecimentoSession;
51
+ private getMenuUserImg;
52
+ getUserEmail(): void;
53
+ updateLastLogEstabelecimento(estab: string): void;
54
+ togglePopover(): void;
55
+ dropdownWasOpened(value: boolean): void;
56
+ openExpansibleMenu(ref: HTMLDivElement): void;
57
+ openSubmenu(menu: IMenuItemStructure, ref: HTMLDivElement, desiredMenu: TemplateRef<any>): void;
58
+ onClickedOutside(e: Event, ref: HTMLDivElement): void;
59
+ private validateCachedImg;
60
+ private checkForCachedImage;
61
+ logout(): void;
62
+ getExternalUrl(url: string): string;
63
+ /** Função simples com o objetivo de abrir os modais no centro da tela.
64
+ * @param template Template HTML do modal que será aberto.
65
+ * @param modalID ID do modal que será aberto, para que possa ser referenciado depois.
66
+ */
67
+ openModal(template: TemplateRef<any>, modalID: number): void;
68
+ /** Função simples com o objetivo de fechar os modais que estiverem abertos (baseados pelo ID).
69
+ * @param modalID ID do modal que será fechado.
70
+ */
71
+ closeModal(modalID: number): void;
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuLateralComponent, never>;
73
+ static ɵcmp: i0.ɵɵComponentDeclaration<MenuLateralComponent, "app-menu-lateral", never, {}, {}, ["desiredContent"], ["*"], false, never>;
74
+ }
@@ -0,0 +1,71 @@
1
+ import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
2
+ import { BsModalService } from 'ngx-bootstrap/modal';
3
+ import { InfraEstabelecimentoFavoritoDefault, MessageService } from 'ngx-sp-infra';
4
+ import { AuthStorageService } from '../../../../storage/auth-storage.service';
5
+ import { LibCustomMenuService } from '../../../../custom/custom-menu.service';
6
+ import { MenuServicesService } from '../../menu-services.service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class SelecaoEstabelecimentosModalComponent implements OnInit {
9
+ private _authStorageService;
10
+ private _bsModalService;
11
+ private _customMenuService;
12
+ private _menuServicesService;
13
+ private _messageService;
14
+ constructor(_authStorageService: AuthStorageService, _bsModalService: BsModalService, _customMenuService: LibCustomMenuService, _menuServicesService: MenuServicesService, _messageService: MessageService);
15
+ ngOnInit(): void;
16
+ onClose: EventEmitter<any>;
17
+ onSelected: EventEmitter<any>;
18
+ $estabelecimentosList: InfraEstabelecimentoFavoritoDefault[];
19
+ page: number;
20
+ itemsPerPage: number;
21
+ response_messages: {
22
+ emptyMessage: string;
23
+ totalMessage: string;
24
+ };
25
+ refreshList(pesquisa: string): void;
26
+ private getEstabelecimentos;
27
+ /**
28
+ * Atualiza o estado do Estabelecimento, informando se ele é Padrão ou não.
29
+ * @param estabID ID do Estabelecimento a ser alterado
30
+ * @param isDefault Informa se ele é Padrão ou não
31
+ */
32
+ defineDefaultEstabelecimento(estabID: string, isDefault: boolean): void;
33
+ /**
34
+ * Envia um sinal ao componente pai com o ID e Nome do Estabelecimento selecionado no Modal
35
+ * @param estabID ID do Estabelecimento que será enviado
36
+ * @param estabNome Nome do Estabelecimento que será enviado
37
+ */
38
+ selectEstabelecimento(estabID: string, estabNome: string): void;
39
+ /**
40
+ * Realiza uma nova pesquisa no banco para atualizar a lista a cada 3 caracteres digitados
41
+ * @param pesquisa Texto do input de pesquisa
42
+ */
43
+ updateSearch(pesquisa: string): void;
44
+ /**
45
+ * Verifica se a string passada é alfanumérica.
46
+ * @param str String que será verificada
47
+ * @returns TRUE se for alfanumérica, caso contrário FALSE.
48
+ */
49
+ private isAlphanumeric;
50
+ /** Modifica a quantidade de itens a ser mostrada na lista.
51
+ * @param event parâmetro de evento que irá selecionar a nova quantidade.
52
+ */
53
+ onSelectChange(event: any): void;
54
+ /** Reseta a paginação da listagem.
55
+ */
56
+ resetPagination(list: any[]): void;
57
+ /**
58
+ * Função simples com o objetivo de abrir os modais no centro da tela.
59
+ * @param template Template HTML do modal que será aberto.
60
+ * @param modalID ID do modal que será aberto, para que possa ser referenciado depois.
61
+ */
62
+ openModal(template: TemplateRef<any>, modalID: number): void;
63
+ /**
64
+ * Função simples com o objetivo de fechar os modais que estiverem abertos (baseados pelo ID).
65
+ * @param modalID ID do modal que será fechado.
66
+ */
67
+ closeModal(modalID: number): void;
68
+ closeSelf(): void;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelecaoEstabelecimentosModalComponent, never>;
70
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelecaoEstabelecimentosModalComponent, "selecao-estabelecimentos-modal", never, {}, { "onClose": "onClose"; "onSelected": "onSelected"; }, never, never, false, never>;
71
+ }
@@ -0,0 +1,31 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { RetError, RetEstabelecimentosModal } from 'ngx-sp-infra';
4
+ import { AuthStorageService } from '../../storage/auth-storage.service';
5
+ import { RetEstabelecimentoSession } from './model/ret-estabelecimento-session';
6
+ import { RetInfraUsuarioEmail } from './model/ret-infrausuarioemail';
7
+ import { RetInfraUsuarioImg } from './model/ret-infrausuarioimg';
8
+ import { Usuario_IMG } from './model/usuario-img';
9
+ import * as i0 from "@angular/core";
10
+ export declare class MenuServicesService {
11
+ private _authStorageService;
12
+ private _httpClient;
13
+ private readonly _BASE_URL;
14
+ private readonly _HTTP_HEADERS;
15
+ constructor(_authStorageService: AuthStorageService, _httpClient: HttpClient);
16
+ getEstabelecimentosModalList(usuarioID: string, pesquisa: string): Observable<RetEstabelecimentosModal>;
17
+ getImagemMenu(): Observable<RetInfraUsuarioImg>;
18
+ getEstabelecimentoSession(estabID: string): Observable<RetEstabelecimentoSession>;
19
+ getUsuarioEmail(): Observable<RetInfraUsuarioEmail>;
20
+ updateLastLogEstabID(estabID: string): Observable<RetError>;
21
+ defineDefaultEstabelecimento(estabID: string, usuarioID: string, isDefault: boolean): Observable<RetError>;
22
+ private _menuFooterImg;
23
+ getMenuFooterImg(): Usuario_IMG | null;
24
+ setMenuFooterImg(value: Usuario_IMG): void;
25
+ saveImageToStorage(footerImgSrc: string, footerImgName: string): void;
26
+ private _subject;
27
+ newUserImageEvent(value: any): void;
28
+ getNewUserImageEvent(): Observable<any>;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<MenuServicesService, never>;
30
+ static ɵprov: i0.ɵɵInjectableDeclaration<MenuServicesService>;
31
+ }
@@ -0,0 +1,4 @@
1
+ export interface IEstabelecimento {
2
+ Id: string;
3
+ Nome: string;
4
+ }
@@ -0,0 +1,12 @@
1
+ import { ISubmenuItemStructure } from './isubmenu-item-structure.model';
2
+ /** Interface que define a estrutura de um item de menu. */
3
+ export interface IMenuItemStructure {
4
+ id: number;
5
+ label: string;
6
+ descricao: string;
7
+ icon: string;
8
+ route: string;
9
+ isExternal: boolean;
10
+ isSelected: boolean;
11
+ children?: ISubmenuItemStructure[];
12
+ }
@@ -0,0 +1,40 @@
1
+ export declare class IMenu {
2
+ ID: number;
3
+ UNICOID: number;
4
+ LABEL: string;
5
+ DESCRICAO: string;
6
+ URL: string;
7
+ CLASS_ICON: string;
8
+ IS_EXIBEMENU: boolean;
9
+ URL_DASHBOARD: string;
10
+ TAG: string;
11
+ FK: number;
12
+ STRUCT_LIST: [] | [
13
+ {
14
+ ID: number;
15
+ UNICOID: number;
16
+ LABEL: string;
17
+ DESCRICAO: string;
18
+ URL: string;
19
+ CLASS_ICON: string;
20
+ IS_EXIBEMENU: boolean;
21
+ URL_DASHBOARD: string;
22
+ TAG: string;
23
+ FK: number;
24
+ STRUCT_LIST: [] | [
25
+ {
26
+ ID: number;
27
+ UNICOID: number;
28
+ LABEL: string;
29
+ DESCRICAO: string;
30
+ URL: string;
31
+ CLASS_ICON: string;
32
+ IS_EXIBEMENU: boolean;
33
+ URL_DASHBOARD: string;
34
+ TAG: string;
35
+ FK: number;
36
+ }
37
+ ];
38
+ }
39
+ ];
40
+ }
@@ -0,0 +1,9 @@
1
+ export declare class InfraUsuarioImg {
2
+ TENANT_ID: number;
3
+ ID: number;
4
+ IMAGEM: string;
5
+ FILENAME: string;
6
+ DATACRIACAO: Date;
7
+ IS_ACTIVE: boolean;
8
+ USUARIOID: string;
9
+ }
@@ -0,0 +1,9 @@
1
+ /** Interface que define a estrutura de um item de menu. */
2
+ export interface ISubmenuItemStructure {
3
+ id: number;
4
+ label: string;
5
+ descricao: string;
6
+ route: string;
7
+ isExternal: boolean;
8
+ isSelected: boolean;
9
+ }
@@ -0,0 +1,8 @@
1
+ import { IError } from 'ngx-sp-infra';
2
+ export declare class RetEstabelecimentoSession implements IError {
3
+ Error: boolean;
4
+ ErrorMessage: string;
5
+ InfraEstabNome: string;
6
+ InfraEmpresaId: string;
7
+ InfraEmpresaNome: string;
8
+ }
@@ -0,0 +1,6 @@
1
+ import { IError } from "ngx-sp-infra";
2
+ export declare class RetInfraUsuarioEmail implements IError {
3
+ Error: boolean;
4
+ ErrorMessage: string;
5
+ Email: string;
6
+ }
@@ -0,0 +1,9 @@
1
+ import { IError } from "ngx-sp-infra";
2
+ import { InfraUsuarioImg } from './infrausuarioimg';
3
+ export declare class RetInfraUsuarioImg implements IError {
4
+ Error: boolean;
5
+ ErrorMessage: string;
6
+ InfraUsuarioImg: InfraUsuarioImg;
7
+ uncompressedFileSize?: number | null;
8
+ compressedFileSize?: number | null;
9
+ }
@@ -0,0 +1,5 @@
1
+ export declare class Usuario_IMG {
2
+ USUARIOID: string;
3
+ FILENAME: string;
4
+ FILE: string;
5
+ }
@@ -0,0 +1,25 @@
1
+ import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
2
+ import { Router } from '@angular/router';
3
+ import { IMenuItemStructure } from '../../model/imenu-item-structure.model';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DynamicMenuComponent implements OnInit {
6
+ router: Router;
7
+ selectTemplate: EventEmitter<any>;
8
+ submenuRef: HTMLDivElement;
9
+ recebeParam: Function;
10
+ titleSubmenu: string;
11
+ submenuList?: IMenuItemStructure[];
12
+ menuList: IMenuItemStructure[];
13
+ menuStatic: IMenuItemStructure[];
14
+ selectedMenuItem: number[];
15
+ selectedItem: number;
16
+ desiredContent?: TemplateRef<any>;
17
+ constructor(router: Router);
18
+ ngOnInit(): void;
19
+ onClickedOutside(e: Event, ref: HTMLDivElement): void;
20
+ indicateSelectedMenuItem(): void;
21
+ changeStar(ref: HTMLButtonElement, id: IMenuItemStructure | undefined): void;
22
+ getExternalUrl(url: string): string;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicMenuComponent, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<DynamicMenuComponent, "app-dynamic-menu", never, { "submenuRef": { "alias": "submenuRef"; "required": false; }; "recebeParam": { "alias": "recebeParam"; "required": false; }; "titleSubmenu": { "alias": "titleSubmenu"; "required": false; }; "submenuList": { "alias": "submenuList"; "required": false; }; }, { "selectTemplate": "selectTemplate"; }, ["desiredContent"], never, false, never>;
25
+ }
@@ -0,0 +1,8 @@
1
+ import { OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NotifSubmenuComponent implements OnInit {
4
+ constructor();
5
+ ngOnInit(): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotifSubmenuComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotifSubmenuComponent, "app-notif-submenu", never, {}, {}, never, never, false, never>;
8
+ }
@@ -0,0 +1,48 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { Title } from '@angular/platform-browser';
4
+ import { ActivatedRoute, Router } from '@angular/router';
5
+ import { FormUtils, MessageService } from 'ngx-sp-infra';
6
+ import { AuthService } from '../../auth.service';
7
+ import { ServerService } from '../../server/server.service';
8
+ import { AuthStorageService } from '../../storage/auth-storage.service';
9
+ import * as i0 from "@angular/core";
10
+ export declare class NovaSenhaComponent implements OnInit {
11
+ private _formBuilder;
12
+ private _messageService;
13
+ private _serverService;
14
+ private _authService;
15
+ private _authStorageService;
16
+ private _title;
17
+ private _router;
18
+ private _route;
19
+ constructor(_formBuilder: FormBuilder, _messageService: MessageService, _serverService: ServerService, _authService: AuthService, _authStorageService: AuthStorageService, _title: Title, _router: Router, _route: ActivatedRoute);
20
+ ngOnInit(): void;
21
+ private domain;
22
+ private user;
23
+ private createPassword;
24
+ esqueceuSenhaText: string;
25
+ primeiroAcessoText: string;
26
+ senhaExpiradaText: string;
27
+ cadeadoImg: string;
28
+ maoImg: string;
29
+ calendarioImg: string;
30
+ form: FormGroup;
31
+ get FormUtils(): typeof FormUtils;
32
+ passwordLabel: string;
33
+ statusSenha: number;
34
+ get code(): string | null;
35
+ get password(): string;
36
+ get confirmPassword(): string;
37
+ private createForm;
38
+ /**
39
+ * Puxa o nome do servidor salvo na configuração da máquina
40
+ */
41
+ getServer(): void;
42
+ sendPassword(): void;
43
+ updatePassword(): void;
44
+ private getParmsFromRoute;
45
+ cancelar(): void;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<NovaSenhaComponent, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<NovaSenhaComponent, "app-nova-senha", never, {}, {}, never, never, false, never>;
48
+ }
@@ -0,0 +1,38 @@
1
+ import { Router } from '@angular/router';
2
+ import { ICustomLoginService } from './models/icustom-login-service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class LibCustomLoginService {
5
+ constructor();
6
+ loginTitle: string;
7
+ loginSubtitle: string;
8
+ loginBackground: string;
9
+ loginLogotipo: string;
10
+ loginAltLogotipo: string;
11
+ loginPageTitle: string;
12
+ loginDesenvDomain: string;
13
+ loginDesenvUser: string;
14
+ loginDesenvPassword: string;
15
+ /**
16
+ * Método executado no auth.service.ts - método: login ()
17
+ * Utilizado para inicializações diversas
18
+ */
19
+ authLogin(): void;
20
+ /**
21
+ * Método executado no auth.service.ts - método: logout ()
22
+ * Utilizado para inicializações diversas
23
+ */
24
+ authLogout(): void;
25
+ /**
26
+ * Método executado no auth.service.ts - método: login ()
27
+ * Utilizado para informar o redirecionamento para a tela inicial após o login ok
28
+ *
29
+ * @param router Objeto de Router que será utilizado
30
+ */
31
+ authNavigateToPage(router: Router): void;
32
+ storedAuthLogin: () => void;
33
+ storedAuthLogout: () => void;
34
+ storedAuthNavigateToPage: (router: Router) => void;
35
+ ConfigurarCustomLogin(customLoginService: ICustomLoginService): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<LibCustomLoginService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<LibCustomLoginService>;
38
+ }