ngx-sp-auth 2.2.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngx-sp-auth.mjs +1644 -786
- package/fesm2022/ngx-sp-auth.mjs.map +1 -1
- package/lib/auth-config.d.ts +2 -0
- package/lib/auth.module.d.ts +1 -9
- package/lib/auth.routes.d.ts +2 -0
- package/lib/auth.service.d.ts +36 -8
- package/lib/components/login/login.component.d.ts +49 -21
- package/lib/components/login-os/login-os.component.d.ts +27 -0
- package/lib/components/menu-lateral/dropdown/primary-dropdown/primary-dropdown.component.d.ts +4 -2
- package/lib/components/menu-lateral/dropdown/secondary-dropdown/secondary-dropdown.component.d.ts +3 -1
- package/lib/components/menu-lateral/menu/menu-lateral.component.d.ts +31 -18
- package/lib/components/menu-lateral/menu/selecao-estabelecimentos-modal/selecao-estabelecimentos-modal.component.d.ts +4 -2
- package/lib/components/menu-lateral/menu-services.service.d.ts +21 -4
- package/lib/components/menu-lateral/model/dynamic-menu.d.ts +18 -0
- package/lib/components/menu-lateral/model/infrausuarioimg.d.ts +7 -7
- package/lib/components/menu-lateral/model/navsubmenu-searchitem.d.ts +5 -0
- package/lib/components/menu-lateral/model/ret-navsubmenu.d.ts +11 -0
- package/lib/components/menu-lateral/submenus/dynamic-menu/dynamic-menu.component.d.ts +3 -1
- package/lib/components/nova-senha/nova-senhacomponent.d.ts +7 -5
- package/lib/custom/{custom-menu.service.d.ts → lib-custom-menu.service.d.ts} +10 -14
- package/lib/custom/{custom-storage.service.d.ts → lib-custom-storage.service.d.ts} +1 -4
- package/lib/custom/{menu-config.service.d.ts → lib-menu-config.service.d.ts} +11 -16
- package/lib/custom/models/icustom-login-service.d.ts +2 -0
- package/lib/custom/models/icustom-menu-service.d.ts +2 -0
- package/lib/custom/models/icustom-storage-service.d.ts +0 -1
- package/lib/custom/models/imenu-config.d.ts +2 -2
- package/lib/environments/environments.service.d.ts +8 -1
- package/lib/environments/models/ienvironments.d.ts +9 -0
- package/lib/guards/external-login-guard.d.ts +3 -5
- package/lib/guards/login-os.guard.d.ts +13 -0
- package/lib/interceptors/auth-aplic.interceptor.d.ts +4 -4
- package/lib/interceptors/auth-infra.interceptor.d.ts +1 -1
- package/lib/models/infraIn2FaTypeId.d.ts +5 -0
- package/lib/models/infraInAuthTypeId.d.ts +5 -0
- package/lib/models/login-os.model.d.ts +7 -0
- package/lib/models/ret-autenthication.d.ts +14 -0
- package/lib/models/ret-login.d.ts +1 -4
- package/lib/project/project-utils.service.d.ts +18 -0
- package/lib/storage/auth-storage.service.d.ts +21 -4
- package/package.json +3 -1
- package/public-api.d.ts +13 -9
- package/README.md +0 -207
- package/lib/components/menu-lateral/menu/list-estab.service.d.ts +0 -19
- package/lib/components/menu-lateral/model/iestabelecimento.model.d.ts +0 -4
- package/lib/models/custom-propriedades-login.d.ts +0 -11
- package/lib/server/ret-server-config.d.ts +0 -7
- package/lib/server/server.service.d.ts +0 -14
- package/src/assets/imgs/Property1-cadeado.png +0 -0
- package/src/assets/imgs/Property1-calendariofino.png +0 -0
- package/src/assets/imgs/Property1-mao.png +0 -0
- /package/lib/custom/{custom-login.service.d.ts → lib-custom-login.service.d.ts} +0 -0
package/lib/auth.module.d.ts
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./components/login/login.component";
|
|
3
|
-
import * as i2 from "@angular/common";
|
|
4
|
-
import * as i3 from "@angular/forms";
|
|
5
|
-
import * as i4 from "ngx-sp-infra";
|
|
6
|
-
import * as i5 from "ngx-pagination";
|
|
7
|
-
import * as i6 from "ngx-bootstrap/popover";
|
|
8
|
-
import * as i7 from "ngx-bootstrap/tooltip";
|
|
9
|
-
import * as i8 from "@angular/router";
|
|
10
2
|
export declare class AuthModule {
|
|
11
3
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthModule,
|
|
4
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AuthModule, never, never, never>;
|
|
13
5
|
static ɵinj: i0.ɵɵInjectorDeclaration<AuthModule>;
|
|
14
6
|
}
|
package/lib/auth.service.d.ts
CHANGED
|
@@ -1,42 +1,70 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
|
-
import { LibCustomLoginService } from '../lib/custom/custom-login.service';
|
|
4
3
|
import { Observable } from 'rxjs';
|
|
5
|
-
import { ForgottenPasswordForm } from './models/forgotten-password-form';
|
|
6
4
|
import { LoginForm } from './models/login-form';
|
|
7
|
-
import { NovaSenhaForm } from './models/nova-senha-form';
|
|
8
5
|
import { RetLogin } from './models/ret-login';
|
|
6
|
+
import { RetAutenthication } from './models/ret-autenthication';
|
|
7
|
+
import { ForgottenPasswordForm } from './models/forgotten-password-form';
|
|
8
|
+
import { NovaSenhaForm } from './models/nova-senha-form';
|
|
9
9
|
import { IpServiceService, RetError } from 'ngx-sp-infra';
|
|
10
10
|
import { AuthStorageService } from './storage/auth-storage.service';
|
|
11
|
+
import { LibCustomLoginService } from './custom/lib-custom-login.service';
|
|
12
|
+
import { ProjectUtilservice } from './project/project-utils.service';
|
|
13
|
+
import { EnvironmentService } from '../lib/environments/environments.service';
|
|
11
14
|
import * as i0 from "@angular/core";
|
|
12
15
|
export declare class AuthService {
|
|
13
16
|
private _httpClient;
|
|
14
17
|
private _router;
|
|
15
18
|
private _authStorageService;
|
|
16
|
-
private _customLoginService;
|
|
17
19
|
private _ipServiceService;
|
|
18
|
-
private
|
|
20
|
+
private _customLoginService;
|
|
21
|
+
private _projectUtilservice;
|
|
22
|
+
private _environmentService;
|
|
23
|
+
private _pendingWarning;
|
|
19
24
|
private readonly _BASE_URL;
|
|
25
|
+
private readonly _AUTH_BASE_URL;
|
|
26
|
+
private readonly _BASE_OS_URL;
|
|
20
27
|
private readonly _HTTP_HEADERS;
|
|
21
28
|
private ip;
|
|
22
29
|
private city;
|
|
23
30
|
private state;
|
|
24
31
|
private country;
|
|
25
|
-
constructor(_httpClient: HttpClient, _router: Router, _authStorageService: AuthStorageService, _customLoginService: LibCustomLoginService,
|
|
32
|
+
constructor(_httpClient: HttpClient, _router: Router, _authStorageService: AuthStorageService, _ipServiceService: IpServiceService, _customLoginService: LibCustomLoginService, _projectUtilservice: ProjectUtilservice, _environmentService: EnvironmentService);
|
|
26
33
|
private getParms;
|
|
27
|
-
private
|
|
34
|
+
private getHostName;
|
|
35
|
+
/** Obtém o método de autenticação
|
|
36
|
+
* @param domain Domínio do login
|
|
37
|
+
* @returns Observable com os dados do método de autenticação, seja erro ou sucesso
|
|
38
|
+
*/
|
|
39
|
+
getAuthentication(domain: string): Observable<RetAutenthication>;
|
|
28
40
|
/** Realiza o login no sistema
|
|
29
41
|
* @param login Informações do formulário de login
|
|
30
42
|
* @returns Observable com os dados do login realizado, seja erro ou sucesso
|
|
31
43
|
*/
|
|
32
|
-
login(
|
|
44
|
+
login(domain: string, user: string, password: string): Observable<RetLogin>;
|
|
45
|
+
/** Realiza o login no sistema (Azure)
|
|
46
|
+
* @param domain Domínio de login
|
|
47
|
+
* @param user usuário de login (mail)
|
|
48
|
+
* @returns Observable com os dados do login realizado, seja erro ou sucesso
|
|
49
|
+
*/
|
|
50
|
+
loginAzure(domain: string, user: string): Observable<RetLogin>;
|
|
33
51
|
loginExternal(dominio: string, user: string, password: string): Observable<boolean>;
|
|
52
|
+
/** Este método é utilizado para realizar o login no sistema integrado com a OS.
|
|
53
|
+
* Originalmente pensado para utilizar apenas pelo componente de integração de login.
|
|
54
|
+
* @param parmsLogin Informações do formulário de login
|
|
55
|
+
* @param serialV6 Serial do V6
|
|
56
|
+
*
|
|
57
|
+
* @returns Observable com os dados do login realizado, seja erro ou sucesso
|
|
58
|
+
*/
|
|
59
|
+
loginOS(parmsLogin: LoginForm, serialV6: string): Observable<RetLogin>;
|
|
34
60
|
logout(): void;
|
|
35
61
|
validateAuthentication2Fa(code: string): Observable<RetLogin>;
|
|
36
62
|
GetNewCode2Fa(): Observable<RetError>;
|
|
37
63
|
forgottenPassword(parms: ForgottenPasswordForm): Observable<RetError>;
|
|
38
64
|
recoverPassword(dominio: string, usuario: string, parms: NovaSenhaForm): Observable<RetError>;
|
|
39
65
|
createPassword(dominio: string, usuario: string, parms: NovaSenhaForm): Observable<RetError>;
|
|
66
|
+
setPendingWarning(message: string): void;
|
|
67
|
+
consumePendingWarning(): string | null;
|
|
40
68
|
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
41
69
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
42
70
|
}
|
|
@@ -1,58 +1,86 @@
|
|
|
1
|
-
import { OnInit
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
2
|
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
3
3
|
import { Title } from '@angular/platform-browser';
|
|
4
4
|
import { Router } from '@angular/router';
|
|
5
|
-
import {
|
|
5
|
+
import { MsalGuardConfiguration, MsalService } from '@azure/msal-angular';
|
|
6
6
|
import { ToastrService } from 'ngx-toastr';
|
|
7
7
|
import { FormUtils, MessageService } from 'ngx-sp-infra';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { LibCustomLoginService } from '../../custom/lib-custom-login.service';
|
|
9
|
+
import { ProjectUtilservice } from '../../project/project-utils.service';
|
|
10
10
|
import { EnvironmentService } from '../../environments/environments.service';
|
|
11
|
-
import {
|
|
11
|
+
import { AuthService } from '../../auth.service';
|
|
12
12
|
import { AuthStorageService } from '../../storage/auth-storage.service';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
|
+
export declare enum LoginProgress {
|
|
15
|
+
Domain = 1,
|
|
16
|
+
Local = 2,
|
|
17
|
+
Azure = 3
|
|
18
|
+
}
|
|
19
|
+
export declare enum SituacaoLogin {
|
|
20
|
+
LOGIN = 0,
|
|
21
|
+
AUTENTICACAO_2_FATORES = 1,
|
|
22
|
+
ESQUECEU_SENHA = 2
|
|
23
|
+
}
|
|
14
24
|
export declare class LoginComponent implements OnInit {
|
|
15
|
-
private
|
|
16
|
-
private
|
|
25
|
+
private _msalGuardConfiguration;
|
|
26
|
+
private _msalService;
|
|
27
|
+
_customLoginService: LibCustomLoginService;
|
|
17
28
|
private _formBuilder;
|
|
29
|
+
private _projectUtilservice;
|
|
18
30
|
private _authService;
|
|
19
|
-
private _serverService;
|
|
20
31
|
private _environmentService;
|
|
21
32
|
private _authStorageService;
|
|
22
|
-
_customLoginService: LibCustomLoginService;
|
|
23
33
|
private _title;
|
|
24
34
|
private _router;
|
|
25
35
|
private _toastrService;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
private _messageService;
|
|
37
|
+
constructor(_msalGuardConfiguration: MsalGuardConfiguration, _msalService: MsalService, _customLoginService: LibCustomLoginService, _formBuilder: FormBuilder, _projectUtilservice: ProjectUtilservice, _authService: AuthService, _environmentService: EnvironmentService, _authStorageService: AuthStorageService, _title: Title, _router: Router, _toastrService: ToastrService, _messageService: MessageService);
|
|
38
|
+
private _situacaoLogin;
|
|
29
39
|
currentTime: Date;
|
|
30
40
|
year: number;
|
|
31
|
-
|
|
41
|
+
isLoadingDomain: boolean;
|
|
42
|
+
isLoadingLogin: boolean;
|
|
43
|
+
isLoadingAzure: boolean;
|
|
44
|
+
isLoadingForgottenPassword: boolean;
|
|
32
45
|
isLoadingSendAuthentication2Fa: boolean;
|
|
33
|
-
showParmsAuthentication2Fa: boolean;
|
|
34
46
|
isLoadingGetNewCode: boolean;
|
|
47
|
+
showParmsAuthentication2Fa: boolean;
|
|
48
|
+
loginProgress: number;
|
|
49
|
+
get situacaoLogin(): SituacaoLogin;
|
|
50
|
+
set situacaoLogin(value: SituacaoLogin);
|
|
35
51
|
private _subscription;
|
|
36
52
|
private timerDuration;
|
|
37
53
|
secondsLeft: number;
|
|
38
54
|
private countdown$;
|
|
39
|
-
|
|
55
|
+
formDomain: FormGroup;
|
|
56
|
+
formLogin: FormGroup;
|
|
57
|
+
formAzure: FormGroup;
|
|
40
58
|
formFgtPsw: FormGroup;
|
|
41
59
|
formAuthentication2Fa: FormGroup;
|
|
42
60
|
get FormUtils(): typeof FormUtils;
|
|
43
61
|
get dominio(): string;
|
|
44
62
|
get usuario(): string;
|
|
45
63
|
get senha(): string;
|
|
64
|
+
get usuarioAzure(): string;
|
|
65
|
+
get senhaAzure(): string;
|
|
46
66
|
get dominioFgtPsw(): string;
|
|
47
67
|
get usuarioFgtPsw(): string;
|
|
48
68
|
get code(): string;
|
|
49
|
-
ngOnInit(): void
|
|
50
|
-
private
|
|
69
|
+
ngOnInit(): Promise<void>;
|
|
70
|
+
private createFormDomain;
|
|
71
|
+
private createFormLogin;
|
|
72
|
+
private createFormAzure;
|
|
51
73
|
private createFormForgottenPassword;
|
|
52
74
|
private createFormAuthentication2Fa;
|
|
75
|
+
private configMsal;
|
|
76
|
+
private initMsal;
|
|
77
|
+
private initMsalForLoginOk;
|
|
53
78
|
geturlErpConfig(): string;
|
|
54
|
-
|
|
79
|
+
getAuthentication(): Promise<void>;
|
|
55
80
|
logOn(): void;
|
|
81
|
+
logOnAdmin(): void;
|
|
82
|
+
logOnAzure(): void;
|
|
83
|
+
logOnAzureOk(): Promise<void>;
|
|
56
84
|
sendForgottenPassword(): void;
|
|
57
85
|
forgottenPassword(): void;
|
|
58
86
|
sendCode(): void;
|
|
@@ -60,8 +88,8 @@ export declare class LoginComponent implements OnInit {
|
|
|
60
88
|
getNewCode(): void;
|
|
61
89
|
GetNewCode2Fa(): void;
|
|
62
90
|
voltar(): void;
|
|
63
|
-
|
|
64
|
-
|
|
91
|
+
returnDomain(): void;
|
|
92
|
+
private showIntegracaoAlert;
|
|
65
93
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
|
|
66
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "
|
|
94
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "app-login", never, {}, {}, never, never, true, never>;
|
|
67
95
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { ProjectUtilservice } from '../../project/project-utils.service';
|
|
4
|
+
import { AuthService } from '../../auth.service';
|
|
5
|
+
import { AuthStorageService } from '../../storage/auth-storage.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class LoginOSComponent implements OnInit, OnDestroy {
|
|
8
|
+
private _authService;
|
|
9
|
+
private _projectUtilservice;
|
|
10
|
+
private _route;
|
|
11
|
+
private _router;
|
|
12
|
+
private _storageService;
|
|
13
|
+
private _parmsLogin;
|
|
14
|
+
private _loginOSModel?;
|
|
15
|
+
private _timerSubscription;
|
|
16
|
+
loginStatus: "loading" | "success" | "error" | "updated";
|
|
17
|
+
timer: number;
|
|
18
|
+
constructor(_authService: AuthService, _projectUtilservice: ProjectUtilservice, _route: ActivatedRoute, _router: Router, _storageService: AuthStorageService);
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
logOn(): void;
|
|
21
|
+
redirect(): void;
|
|
22
|
+
private startTimer;
|
|
23
|
+
private getParams;
|
|
24
|
+
ngOnDestroy(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoginOSComponent, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoginOSComponent, "login-os", never, {}, {}, never, never, true, never>;
|
|
27
|
+
}
|
package/lib/components/menu-lateral/dropdown/primary-dropdown/primary-dropdown.component.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { LibCustomMenuService } from '../../../../custom/custom-menu.service';
|
|
3
|
+
import { LibCustomMenuService } from '../../../../custom/lib-custom-menu.service';
|
|
4
|
+
import { ProjectUtilservice } from '../../../../project/project-utils.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class PrimaryDropdownComponent implements OnInit {
|
|
6
7
|
private _customMenuService;
|
|
8
|
+
private _projectUtilservice;
|
|
7
9
|
selectDataState: boolean;
|
|
8
10
|
modulo: any;
|
|
9
11
|
buttonWasClicked: Observable<boolean>;
|
|
10
12
|
primaryDropdown: Array<any>;
|
|
11
|
-
constructor(_customMenuService: LibCustomMenuService);
|
|
13
|
+
constructor(_customMenuService: LibCustomMenuService, _projectUtilservice: ProjectUtilservice);
|
|
12
14
|
ngOnInit(): void;
|
|
13
15
|
openDropdown(modulo: any, desiredDropdown: TemplateRef<any>): void;
|
|
14
16
|
onClickedOutside(e: Event, ref: HTMLDivElement): void;
|
package/lib/components/menu-lateral/dropdown/secondary-dropdown/secondary-dropdown.component.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { ProjectUtilservice } from '../../../../project/project-utils.service';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class SecondaryDropdownComponent implements OnInit {
|
|
5
|
+
private _projectUtilservice;
|
|
4
6
|
modulo: any;
|
|
5
7
|
backPrimaryDropdown: EventEmitter<boolean>;
|
|
6
|
-
constructor();
|
|
8
|
+
constructor(_projectUtilservice: ProjectUtilservice);
|
|
7
9
|
ngOnInit(): void;
|
|
8
10
|
backToPrimary(): void;
|
|
9
11
|
redirectToModulo(modulo: string): void;
|
|
@@ -1,28 +1,40 @@
|
|
|
1
|
-
import { OnInit, TemplateRef } from
|
|
2
|
-
import { Router } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
1
|
+
import { ElementRef, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { MsalGuardConfiguration, MsalService } from '@azure/msal-angular';
|
|
5
|
+
import { BsModalService } from 'ngx-bootstrap/modal';
|
|
6
|
+
import { ToastrService } from 'ngx-toastr';
|
|
7
|
+
import { MessageService } from 'ngx-sp-infra';
|
|
8
|
+
import { AuthStorageService } from '../../../storage/auth-storage.service';
|
|
9
|
+
import { LibCustomMenuService } from '../../../custom/lib-custom-menu.service';
|
|
10
|
+
import { ProjectUtilservice } from '../../../project/project-utils.service';
|
|
11
|
+
import { MenuServicesService } from '../menu-services.service';
|
|
12
|
+
import { AuthService } from '../../../auth.service';
|
|
13
|
+
import { EnvironmentService } from './../../../environments/environments.service';
|
|
14
|
+
import { IMenuItemStructure } from '../model/imenu-item-structure.model';
|
|
15
|
+
import { ISubmenuItemStructure } from '../model/isubmenu-item-structure.model';
|
|
16
|
+
import { DynamicMenu } from '../model/dynamic-menu';
|
|
13
17
|
import * as i0 from "@angular/core";
|
|
14
|
-
export declare class MenuLateralComponent implements OnInit {
|
|
18
|
+
export declare class MenuLateralComponent implements OnInit, OnDestroy {
|
|
19
|
+
private _msalGuardConfiguration;
|
|
20
|
+
private _msalService;
|
|
21
|
+
private _toastrService;
|
|
15
22
|
_customMenuService: LibCustomMenuService;
|
|
16
23
|
private _authStorageService;
|
|
17
24
|
private _bsModalService;
|
|
18
25
|
private _menuServices;
|
|
19
26
|
private _messageService;
|
|
27
|
+
private _projectUtilService;
|
|
20
28
|
private _router;
|
|
21
29
|
private _authService;
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
private _environmentService;
|
|
31
|
+
constructor(_msalGuardConfiguration: MsalGuardConfiguration, _msalService: MsalService, _toastrService: ToastrService, _customMenuService: LibCustomMenuService, _authStorageService: AuthStorageService, _bsModalService: BsModalService, _menuServices: MenuServicesService, _messageService: MessageService, _projectUtilService: ProjectUtilservice, _router: Router, _authService: AuthService, _environmentService: EnvironmentService);
|
|
32
|
+
ngOnInit(): Promise<void>;
|
|
33
|
+
ngOnDestroy(): void;
|
|
34
|
+
sidebar: ElementRef<HTMLDivElement>;
|
|
35
|
+
handleKeyboardShortcut: (event: KeyboardEvent) => void;
|
|
24
36
|
private notif_template?;
|
|
25
|
-
menuLink
|
|
37
|
+
menuLink: HTMLAnchorElement;
|
|
26
38
|
desiredContent?: TemplateRef<any>;
|
|
27
39
|
readonly MODAL_ESTABELECIMENTO: number;
|
|
28
40
|
nomeEstabelecimento: string;
|
|
@@ -45,8 +57,6 @@ export declare class MenuLateralComponent implements OnInit {
|
|
|
45
57
|
footerUserName: string;
|
|
46
58
|
isPopoverVisible: boolean;
|
|
47
59
|
showBalloon: boolean;
|
|
48
|
-
menuDynamic: boolean;
|
|
49
|
-
menuConfig: MenuConfigService;
|
|
50
60
|
private getEstabelecimentoSession;
|
|
51
61
|
private getMenuUserImg;
|
|
52
62
|
getUserEmail(): void;
|
|
@@ -60,6 +70,9 @@ export declare class MenuLateralComponent implements OnInit {
|
|
|
60
70
|
private checkForCachedImage;
|
|
61
71
|
logout(): void;
|
|
62
72
|
getExternalUrl(url: string): string;
|
|
73
|
+
constroiRegrasDynamicMenu(menus: DynamicMenu[]): DynamicMenu[];
|
|
74
|
+
private configMsal;
|
|
75
|
+
private initMsal;
|
|
63
76
|
/** Função simples com o objetivo de abrir os modais no centro da tela.
|
|
64
77
|
* @param template Template HTML do modal que será aberto.
|
|
65
78
|
* @param modalID ID do modal que será aberto, para que possa ser referenciado depois.
|
|
@@ -2,7 +2,8 @@ import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
|
2
2
|
import { BsModalService } from 'ngx-bootstrap/modal';
|
|
3
3
|
import { InfraEstabelecimentoFavoritoDefault, MessageService } from 'ngx-sp-infra';
|
|
4
4
|
import { AuthStorageService } from '../../../../storage/auth-storage.service';
|
|
5
|
-
import {
|
|
5
|
+
import { ProjectUtilservice } from '../../../../project/project-utils.service';
|
|
6
|
+
import { LibCustomMenuService } from '../../../../custom/lib-custom-menu.service';
|
|
6
7
|
import { MenuServicesService } from '../../menu-services.service';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class SelecaoEstabelecimentosModalComponent implements OnInit {
|
|
@@ -11,7 +12,8 @@ export declare class SelecaoEstabelecimentosModalComponent implements OnInit {
|
|
|
11
12
|
private _customMenuService;
|
|
12
13
|
private _menuServicesService;
|
|
13
14
|
private _messageService;
|
|
14
|
-
|
|
15
|
+
private _projectUtilService;
|
|
16
|
+
constructor(_authStorageService: AuthStorageService, _bsModalService: BsModalService, _customMenuService: LibCustomMenuService, _menuServicesService: MenuServicesService, _messageService: MessageService, _projectUtilService: ProjectUtilservice);
|
|
15
17
|
ngOnInit(): void;
|
|
16
18
|
onClose: EventEmitter<any>;
|
|
17
19
|
onSelected: EventEmitter<any>;
|
|
@@ -1,24 +1,41 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { RetError, RetEstabelecimentosModal } from 'ngx-sp-infra';
|
|
4
3
|
import { AuthStorageService } from '../../storage/auth-storage.service';
|
|
5
|
-
import {
|
|
4
|
+
import { EnvironmentService } from '../../environments/environments.service';
|
|
5
|
+
import { RetError, RetEstabelecimentosModal } from 'ngx-sp-infra';
|
|
6
|
+
import { Usuario_IMG } from './model/usuario-img';
|
|
6
7
|
import { RetInfraUsuarioEmail } from './model/ret-infrausuarioemail';
|
|
7
8
|
import { RetInfraUsuarioImg } from './model/ret-infrausuarioimg';
|
|
8
|
-
import {
|
|
9
|
+
import { RetEstabelecimentoSession } from './model/ret-estabelecimento-session';
|
|
10
|
+
import { RetNavSubMenu, RetSubmenuWithCards } from './model/ret-navsubmenu';
|
|
11
|
+
import { NavSubmenuSearchItem } from './model/navsubmenu-searchitem';
|
|
12
|
+
import { RetDynamicMenu } from './model/dynamic-menu';
|
|
9
13
|
import * as i0 from "@angular/core";
|
|
10
14
|
export declare class MenuServicesService {
|
|
11
15
|
private _authStorageService;
|
|
12
16
|
private _httpClient;
|
|
17
|
+
private _environmentService;
|
|
13
18
|
private readonly _BASE_URL;
|
|
14
19
|
private readonly _HTTP_HEADERS;
|
|
15
|
-
constructor(_authStorageService: AuthStorageService, _httpClient: HttpClient);
|
|
20
|
+
constructor(_authStorageService: AuthStorageService, _httpClient: HttpClient, _environmentService: EnvironmentService);
|
|
16
21
|
getEstabelecimentosModalList(usuarioID: string, pesquisa: string): Observable<RetEstabelecimentosModal>;
|
|
17
22
|
getImagemMenu(): Observable<RetInfraUsuarioImg>;
|
|
18
23
|
getEstabelecimentoSession(estabID: string): Observable<RetEstabelecimentoSession>;
|
|
19
24
|
getUsuarioEmail(): Observable<RetInfraUsuarioEmail>;
|
|
20
25
|
updateLastLogEstabID(estabID: string): Observable<RetError>;
|
|
21
26
|
defineDefaultEstabelecimento(estabID: string, usuarioID: string, isDefault: boolean): Observable<RetError>;
|
|
27
|
+
/** Método executado para pegar o Menu lateral levando em conta as permissões do usuário, grupo e o tenant ativo
|
|
28
|
+
* Executado caso o getter do boolean Menu Dynamic seja true
|
|
29
|
+
*/
|
|
30
|
+
getMenuLateral(moduloId: number): Observable<RetDynamicMenu>;
|
|
31
|
+
/** Método executado para montar estrutura de título, submenu e telas de acordo com os modelos presentes na ngx-sp-infra
|
|
32
|
+
* envia-se o título deste grupo de submenus, ícone e enum daqueles submenus que
|
|
33
|
+
* ficarão alocados no grupo de determinado título enviado
|
|
34
|
+
*/
|
|
35
|
+
getTelaSubmenus(NavSubmenuSearchItems: NavSubmenuSearchItem[]): Observable<RetNavSubMenu>;
|
|
36
|
+
/** Método executado para montar estrutura da tela de submenu com os cards baseado no IdUnico do menu acessado em específico
|
|
37
|
+
*/
|
|
38
|
+
getTelaSubmenusWithCards(MenuIdUnico: number): Observable<RetSubmenuWithCards>;
|
|
22
39
|
private _menuFooterImg;
|
|
23
40
|
getMenuFooterImg(): Usuario_IMG | null;
|
|
24
41
|
setMenuFooterImg(value: Usuario_IMG): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IError } from "ngx-sp-infra";
|
|
2
|
+
import { IMenuItemStructure } from "./imenu-item-structure.model";
|
|
3
|
+
import { ISubmenuItemStructure } from "./isubmenu-item-structure.model";
|
|
4
|
+
export declare class RetDynamicMenu implements IError {
|
|
5
|
+
Error: boolean;
|
|
6
|
+
ErrorMessage: string;
|
|
7
|
+
MenuSubmenu: DynamicMenu[];
|
|
8
|
+
}
|
|
9
|
+
export declare class DynamicMenu implements IMenuItemStructure {
|
|
10
|
+
id: number;
|
|
11
|
+
label: string;
|
|
12
|
+
descricao: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
route: string;
|
|
15
|
+
isExternal: boolean;
|
|
16
|
+
isSelected: boolean;
|
|
17
|
+
children?: ISubmenuItemStructure[] | undefined;
|
|
18
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare class InfraUsuarioImg {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
TENANT_ID: number;
|
|
3
|
+
ID: number;
|
|
4
|
+
IMAGEM: string;
|
|
5
|
+
FILENAME: string;
|
|
6
|
+
DATACRIACAO: Date;
|
|
7
|
+
IS_ACTIVE: boolean;
|
|
8
|
+
USUARIOID: string;
|
|
9
9
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IError, NavSubmenuCards, NavSubMenus } from "ngx-sp-infra";
|
|
2
|
+
export declare class RetNavSubMenu implements IError {
|
|
3
|
+
Error: boolean;
|
|
4
|
+
ErrorMessage: string;
|
|
5
|
+
NavSubmenus: NavSubMenus[];
|
|
6
|
+
}
|
|
7
|
+
export declare class RetSubmenuWithCards implements IError {
|
|
8
|
+
Error: boolean;
|
|
9
|
+
ErrorMessage: string;
|
|
10
|
+
Submenu: NavSubmenuCards[];
|
|
11
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
|
+
import { ProjectUtilservice } from '../../../../project/project-utils.service';
|
|
3
4
|
import { IMenuItemStructure } from '../../model/imenu-item-structure.model';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class DynamicMenuComponent implements OnInit {
|
|
6
7
|
router: Router;
|
|
8
|
+
private _projectUtilService;
|
|
7
9
|
selectTemplate: EventEmitter<any>;
|
|
8
10
|
submenuRef: HTMLDivElement;
|
|
9
11
|
recebeParam: Function;
|
|
@@ -14,7 +16,7 @@ export declare class DynamicMenuComponent implements OnInit {
|
|
|
14
16
|
selectedMenuItem: number[];
|
|
15
17
|
selectedItem: number;
|
|
16
18
|
desiredContent?: TemplateRef<any>;
|
|
17
|
-
constructor(router: Router);
|
|
19
|
+
constructor(router: Router, _projectUtilService: ProjectUtilservice);
|
|
18
20
|
ngOnInit(): void;
|
|
19
21
|
onClickedOutside(e: Event, ref: HTMLDivElement): void;
|
|
20
22
|
indicateSelectedMenuItem(): void;
|
|
@@ -3,34 +3,36 @@ import { FormBuilder, FormGroup } from '@angular/forms';
|
|
|
3
3
|
import { Title } from '@angular/platform-browser';
|
|
4
4
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
5
|
import { FormUtils, MessageService } from 'ngx-sp-infra';
|
|
6
|
+
import { ProjectUtilservice } from '../../project/project-utils.service';
|
|
6
7
|
import { AuthService } from '../../auth.service';
|
|
7
|
-
import { ServerService } from '../../server/server.service';
|
|
8
8
|
import { AuthStorageService } from '../../storage/auth-storage.service';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class NovaSenhaComponent implements OnInit {
|
|
11
11
|
private _formBuilder;
|
|
12
|
+
private _projectUtilservice;
|
|
12
13
|
private _messageService;
|
|
13
|
-
private _serverService;
|
|
14
14
|
private _authService;
|
|
15
15
|
private _authStorageService;
|
|
16
16
|
private _title;
|
|
17
17
|
private _router;
|
|
18
18
|
private _route;
|
|
19
|
-
constructor(_formBuilder: FormBuilder,
|
|
19
|
+
constructor(_formBuilder: FormBuilder, _projectUtilservice: ProjectUtilservice, _messageService: MessageService, _authService: AuthService, _authStorageService: AuthStorageService, _title: Title, _router: Router, _route: ActivatedRoute);
|
|
20
20
|
ngOnInit(): void;
|
|
21
21
|
private domain;
|
|
22
22
|
private user;
|
|
23
23
|
private createPassword;
|
|
24
|
+
isDisabled: boolean;
|
|
24
25
|
esqueceuSenhaText: string;
|
|
25
26
|
primeiroAcessoText: string;
|
|
26
27
|
senhaExpiradaText: string;
|
|
27
28
|
cadeadoImg: string;
|
|
28
29
|
maoImg: string;
|
|
29
30
|
calendarioImg: string;
|
|
31
|
+
statusSenha: number;
|
|
32
|
+
isLoading: boolean;
|
|
30
33
|
form: FormGroup;
|
|
31
34
|
get FormUtils(): typeof FormUtils;
|
|
32
35
|
passwordLabel: string;
|
|
33
|
-
statusSenha: number;
|
|
34
36
|
get code(): string | null;
|
|
35
37
|
get password(): string;
|
|
36
38
|
get confirmPassword(): string;
|
|
@@ -38,7 +40,7 @@ export declare class NovaSenhaComponent implements OnInit {
|
|
|
38
40
|
/**
|
|
39
41
|
* Puxa o nome do servidor salvo na configuração da máquina
|
|
40
42
|
*/
|
|
41
|
-
|
|
43
|
+
getAuthentication(): void;
|
|
42
44
|
sendPassword(): void;
|
|
43
45
|
updatePassword(): void;
|
|
44
46
|
private getParmsFromRoute;
|
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
3
2
|
import { IMenuItemStructure } from '../components/menu-lateral/model/imenu-item-structure.model';
|
|
4
3
|
import { AuthStorageService } from '../storage/auth-storage.service';
|
|
5
|
-
import {
|
|
4
|
+
import { LibMenuConfigService } from './lib-menu-config.service';
|
|
6
5
|
import { ICustomMenuService } from './models/icustom-menu-service';
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
7
|
export declare class LibCustomMenuService {
|
|
9
8
|
private _menuConfig;
|
|
10
9
|
private _authStorageService;
|
|
11
|
-
private _router;
|
|
12
|
-
menuService: ICustomMenuService;
|
|
13
10
|
menuDynamic: boolean;
|
|
11
|
+
menuDynamicCustom: boolean;
|
|
14
12
|
moduleName: string;
|
|
15
13
|
moduleImg: string;
|
|
16
14
|
moduleSvg: string;
|
|
17
15
|
themeColor: string;
|
|
18
|
-
private readonly _MENU_BASE_URL;
|
|
19
|
-
private currentURL;
|
|
20
16
|
private _menuItems;
|
|
21
|
-
|
|
22
|
-
private menuLateralUpdated;
|
|
23
|
-
menuConfig: MenuConfigService;
|
|
17
|
+
menuConfig: LibMenuConfigService;
|
|
24
18
|
/** Obtém as opções do menu. */
|
|
25
19
|
get menuItems(): IMenuItemStructure[];
|
|
26
20
|
set menuItems(value: IMenuItemStructure[]);
|
|
@@ -33,16 +27,18 @@ export declare class LibCustomMenuService {
|
|
|
33
27
|
estabelecimentoID: string;
|
|
34
28
|
empresaID: string;
|
|
35
29
|
}): void;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
private storedMenuopenExpansibleMenu?;
|
|
39
|
-
constructor(_menuConfig: MenuConfigService, _authStorageService: AuthStorageService, _router: Router);
|
|
40
|
-
ConfigurarCustomMenuService(RealcustomMenuService: ICustomMenuService): void;
|
|
30
|
+
constructor(_menuConfig: LibMenuConfigService, _authStorageService: AuthStorageService);
|
|
31
|
+
menuDynamicGetModuloId(): number;
|
|
41
32
|
menuDynamicOnInit(): void;
|
|
42
33
|
menuStaticOnInit(): void;
|
|
43
34
|
menuopenExpansibleMenu(ref: HTMLDivElement): void;
|
|
44
35
|
/** Método que deve ser chamado na seleção de um novo estabelecimento, ele atualizará os valores do nosso BehaviorSubject para que possamos utilizá-lo em outras partes do sistema. */
|
|
45
36
|
emitEstabelecimentoEvent(): void;
|
|
37
|
+
private storeMenuDynamicGetModuloId;
|
|
38
|
+
private storedMenuStaticOnInit;
|
|
39
|
+
private storedMenuDynamicOnInit;
|
|
40
|
+
private storedMenuopenExpansibleMenu;
|
|
41
|
+
ConfigurarCustomMenuService(RealcustomMenuService: ICustomMenuService): void;
|
|
46
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibCustomMenuService, never>;
|
|
47
43
|
static ɵprov: i0.ɵɵInjectableDeclaration<LibCustomMenuService>;
|
|
48
44
|
}
|
|
@@ -2,7 +2,6 @@ import { ICustomStorageService } from './models/icustom-storage-service';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class LibCustomStorageService {
|
|
4
4
|
constructor();
|
|
5
|
-
private __isSaving;
|
|
6
5
|
storedStorageConstructor(): void;
|
|
7
6
|
storedStorageSaveLocalInstance(): void;
|
|
8
7
|
storedStorageLogout(): void;
|
|
@@ -11,9 +10,7 @@ export declare class LibCustomStorageService {
|
|
|
11
10
|
storageSaveLocalInstance(): void;
|
|
12
11
|
storageLogout(): void;
|
|
13
12
|
storageInitializeAutoStorage(): void;
|
|
14
|
-
|
|
15
|
-
private __authStorageNotSaving;
|
|
16
|
-
ConfigurarCustomStorage(customStorageService: ICustomStorageService): void;
|
|
13
|
+
InitializeCustomStorage(customStorageService: ICustomStorageService): void;
|
|
17
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<LibCustomStorageService, never>;
|
|
18
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<LibCustomStorageService>;
|
|
19
16
|
}
|