ngx-sp-auth 4.21.1 → 4.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngx-sp-auth.mjs +196 -231
- package/fesm2022/ngx-sp-auth.mjs.map +1 -1
- package/lib/auth.service.d.ts +3 -7
- package/lib/interceptors/auth-aplic.interceptor.d.ts +8 -6
- package/lib/interceptors/auth-infra.interceptor.d.ts +5 -3
- package/lib/services/pesquisa-telas-global.service.d.ts +4 -4
- package/lib/storage/auth-storage.service.d.ts +2 -13
- package/lib/utils/auth-utils.service.d.ts +5 -5
- package/package.json +2 -2
package/fesm2022/ngx-sp-auth.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { importProvidersFrom, NgModule, InjectionToken, Inject, Injectable,
|
|
2
|
+
import { importProvidersFrom, NgModule, InjectionToken, Inject, Injectable, Component, EventEmitter, Output, Input, TemplateRef, ContentChild, ViewChild, inject } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common/http';
|
|
4
|
-
import { HTTP_INTERCEPTORS,
|
|
4
|
+
import { HTTP_INTERCEPTORS, HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
5
5
|
import * as i1$2 from '@azure/msal-angular';
|
|
6
6
|
import { MsalInterceptor, MsalGuard, MsalModule, MSAL_GUARD_CONFIG } from '@azure/msal-angular';
|
|
7
7
|
import { LogLevel, PublicClientApplication, InteractionType } from '@azure/msal-browser';
|
|
8
|
-
import { BehaviorSubject, firstValueFrom, take, tap, Subject, Subscription, debounceTime, distinctUntilChanged, filter, switchMap, timer, map as map$1, of, lastValueFrom, from } from 'rxjs';
|
|
9
8
|
import { take as take$1, tap as tap$1, map, switchMap as switchMap$1 } from 'rxjs/operators';
|
|
10
9
|
import * as i1$1 from '@angular/router';
|
|
11
10
|
import { RouterLink, NavigationEnd, RouterOutlet } from '@angular/router';
|
|
11
|
+
import { BehaviorSubject, take, tap, Subject, Subscription, debounceTime, distinctUntilChanged, filter, switchMap, timer, map as map$1, firstValueFrom, of, lastValueFrom, from } from 'rxjs';
|
|
12
12
|
import * as i3 from 'ngx-sp-infra';
|
|
13
13
|
import { Utils, SearchInputComponent, InfraModule, FormUtils, Usuario, RetPasswordPolicy, RetCheckPassword, CheckPasswordRecord, PasswordPolicyComponent, LibIconsComponent, ContentContainerComponent } from 'ngx-sp-infra';
|
|
14
14
|
import { openDB, deleteDB } from 'idb';
|
|
@@ -512,85 +512,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
512
512
|
}]
|
|
513
513
|
}], ctorParameters: () => [{ type: LibCustomEnvironmentService }] });
|
|
514
514
|
|
|
515
|
-
class LibCustomLoginService {
|
|
516
|
-
constructor(_customLoginService) {
|
|
517
|
-
this._customLoginService = _customLoginService;
|
|
518
|
-
}
|
|
519
|
-
// #region Propriedade Customizadas para o Componente login.component.ts
|
|
520
|
-
get loginTitle() {
|
|
521
|
-
return this._customLoginService.loginTitle;
|
|
522
|
-
}
|
|
523
|
-
get loginSubtitle() {
|
|
524
|
-
return this._customLoginService.loginSubtitle;
|
|
525
|
-
}
|
|
526
|
-
get loginBackground() {
|
|
527
|
-
return this._customLoginService.loginBackground;
|
|
528
|
-
}
|
|
529
|
-
get loginLogotipo() {
|
|
530
|
-
return this._customLoginService.loginLogotipo;
|
|
531
|
-
}
|
|
532
|
-
get loginAltLogotipo() {
|
|
533
|
-
return this._customLoginService.loginAltLogotipo;
|
|
534
|
-
}
|
|
535
|
-
get loginPageTitle() {
|
|
536
|
-
return this._customLoginService.loginPageTitle;
|
|
537
|
-
}
|
|
538
|
-
get loginDesenvDomain() {
|
|
539
|
-
return this._customLoginService.loginDesenvDomain;
|
|
540
|
-
}
|
|
541
|
-
get loginDesenvUser() {
|
|
542
|
-
return this._customLoginService.loginDesenvUser;
|
|
543
|
-
}
|
|
544
|
-
get loginDesenvPassword() {
|
|
545
|
-
return this._customLoginService.loginDesenvPassword;
|
|
546
|
-
}
|
|
547
|
-
// #endregion Propriedade Customizadas para o Componente login.component.ts
|
|
548
|
-
// #region Métodos Customizadas para o Componente auth.service.ts
|
|
549
|
-
/**
|
|
550
|
-
* Método executado no auth.service.ts - método: login ()
|
|
551
|
-
* Utilizado para inicializações diversas
|
|
552
|
-
*/
|
|
553
|
-
authLogin() {
|
|
554
|
-
this._customLoginService.authLogin();
|
|
555
|
-
}
|
|
556
|
-
/**
|
|
557
|
-
* Método executado no auth.service.ts - método: logout ()
|
|
558
|
-
* Utilizado para inicializações diversas
|
|
559
|
-
*/
|
|
560
|
-
authLogout() {
|
|
561
|
-
this._customLoginService.authLogout();
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* Método executado no auth.service.ts - método: login ()
|
|
565
|
-
* Utilizado para informar o redirecionamento para a tela inicial após o login ok
|
|
566
|
-
*
|
|
567
|
-
* @param router Objeto de Router que será utilizado
|
|
568
|
-
*/
|
|
569
|
-
authNavigateToPage(router) {
|
|
570
|
-
this._customLoginService.authNavigateToPage(router);
|
|
571
|
-
}
|
|
572
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LibCustomLoginService, deps: [{ token: LIB_CUSTOM_LOGIN_SERVICE }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
573
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LibCustomLoginService, providedIn: 'root' }); }
|
|
574
|
-
}
|
|
575
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LibCustomLoginService, decorators: [{
|
|
576
|
-
type: Injectable,
|
|
577
|
-
args: [{ providedIn: 'root' }]
|
|
578
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
579
|
-
type: Inject,
|
|
580
|
-
args: [LIB_CUSTOM_LOGIN_SERVICE]
|
|
581
|
-
}] }] });
|
|
582
|
-
|
|
583
515
|
class AuthStorageService {
|
|
584
|
-
constructor(_httpBackend, _customStorageService, _indexedDBService, _customEnvironmentService
|
|
516
|
+
constructor(_httpBackend, _customStorageService, _indexedDBService, _customEnvironmentService) {
|
|
585
517
|
this._httpBackend = _httpBackend;
|
|
586
518
|
this._customStorageService = _customStorageService;
|
|
587
519
|
this._indexedDBService = _indexedDBService;
|
|
588
520
|
this._customEnvironmentService = _customEnvironmentService;
|
|
589
|
-
this.
|
|
590
|
-
this._router = _router;
|
|
591
|
-
this._BASE_URL = ''; // SpInfra2LoginWS
|
|
592
|
-
this._LOGOUT_BASE_URL = ''; // SpInfra2LoginWS
|
|
593
|
-
this._HTTP_HEADERS = new HttpHeaders().set('Content-Type', 'application/json');
|
|
521
|
+
this._BASE_URL = ''; // SpInfra2WS
|
|
594
522
|
this.__local_key = 'user_auth_v6';
|
|
595
523
|
// indica se objeto já está marcado para salvar os dados no local storage.
|
|
596
524
|
this.__isSaving = false;
|
|
@@ -637,10 +565,8 @@ class AuthStorageService {
|
|
|
637
565
|
// azureClientId
|
|
638
566
|
this.__azureClientId = "";
|
|
639
567
|
this._httpClient = new HttpClient(_httpBackend);
|
|
640
|
-
this._BASE_URL = `${_customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`; //
|
|
641
|
-
this._BASE_URL = !_customEnvironmentService.production ? this._BASE_URL : `${_customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`;
|
|
642
|
-
this._LOGOUT_BASE_URL = `${_customEnvironmentService.SpInfra2LoginWS}/LogoutSisproErp`; // SpInfra2LoginWS
|
|
643
|
-
this._BASE_URL = !_customEnvironmentService.production ? this._BASE_URL : `${_customEnvironmentService.SpInfra2LoginWS}/LogoutSisproErp`; // SpInfra2LoginWS
|
|
568
|
+
this._BASE_URL = `${_customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`; // SpInfra2WS
|
|
569
|
+
this._BASE_URL = !_customEnvironmentService.production ? this._BASE_URL : `${_customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`;
|
|
644
570
|
// Método com customizações para inicializações da storage
|
|
645
571
|
this._customStorageService.storageConstructor();
|
|
646
572
|
const expectedLocalAuthStorage = localStorage.getItem(this.__local_key);
|
|
@@ -913,22 +839,36 @@ class AuthStorageService {
|
|
|
913
839
|
// Chama a si próprio depois de um tempo igual ao tempo restante para o vencimento do token, para renovar o token ou deslogar o usuário.
|
|
914
840
|
setTimeout(this.reCheckLogin.bind(this, true), leftTime * 1000);
|
|
915
841
|
}
|
|
916
|
-
/**
|
|
917
|
-
* Realiza o logout do sistema, consumindo o endpoint de logout para remover os cookies e limpando as informações de autenticação armazenadas no localStorage.
|
|
918
|
-
* @returns Promise<boolean> indicando navegação para a tela de login após o logout.
|
|
919
|
-
*/
|
|
920
842
|
logout() {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
843
|
+
this.__isCheckingAuth = false;
|
|
844
|
+
this.isLoggedInSub.next(false);
|
|
845
|
+
this.__UrlRedirect = "/";
|
|
846
|
+
this.__ip = "";
|
|
847
|
+
this.__tenantId = 0;
|
|
848
|
+
this.__infraUsuarioId = "";
|
|
849
|
+
this.__infraEstabId = "";
|
|
850
|
+
this.__infraEstabNome = "";
|
|
851
|
+
this.__infraEmpresaId = "";
|
|
852
|
+
this.__infraEmpresaNome = "";
|
|
853
|
+
this.__user = "";
|
|
854
|
+
this.__userName = "";
|
|
855
|
+
this.__authToken = "";
|
|
856
|
+
this.__dominio = "";
|
|
857
|
+
this.__tokenPayload = {};
|
|
858
|
+
this.__isExternalLogin = false;
|
|
859
|
+
this.__infraInAuthTypeId = 0;
|
|
860
|
+
this.__infraIn2FaTypeId = null;
|
|
861
|
+
this.__is2FaEnabled = false;
|
|
862
|
+
this.__azureTenantId = "";
|
|
863
|
+
this.__azureClientId = "";
|
|
864
|
+
localStorage.removeItem(this.__local_key);
|
|
865
|
+
// Limpa o armazenamento local do navegador que contém os filtros de um produto específico
|
|
866
|
+
// Fecha a conexão local (se houver) antes de excluir a database para evitar o callback 'blocking'
|
|
867
|
+
this._indexedDBService.closeOpenConnection()
|
|
868
|
+
.then(() => this._indexedDBService.deleteDatabase())
|
|
869
|
+
.catch((err) => console.warn('logout() => falha ao limpar conexão', err));
|
|
870
|
+
// Método com customizações para finalizações da storage
|
|
871
|
+
this._customStorageService.storageLogout();
|
|
932
872
|
}
|
|
933
873
|
getNewTokenBack() {
|
|
934
874
|
let token = {
|
|
@@ -941,14 +881,15 @@ class AuthStorageService {
|
|
|
941
881
|
};
|
|
942
882
|
const url = `${this._BASE_URL}/GetNewToken`;
|
|
943
883
|
const headers = new HttpHeaders()
|
|
944
|
-
.set('Content-Type', 'application/json')
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
884
|
+
.set('Content-Type', 'application/json')
|
|
885
|
+
.set('Authorization', `Basic ${btoa(`${localStorage.getItem('configServerUser')}:${localStorage.getItem('configServerPassword')}`)}`);
|
|
886
|
+
return this._httpClient
|
|
887
|
+
.post(url, token, { 'headers': headers })
|
|
888
|
+
.pipe(take(1), tap((response) => {
|
|
889
|
+
if (response.Error) {
|
|
890
|
+
throw Error(response.ErrorMessage);
|
|
891
|
+
}
|
|
892
|
+
}));
|
|
952
893
|
}
|
|
953
894
|
getNewToken() {
|
|
954
895
|
return new Promise((resolve, reject) => {
|
|
@@ -985,37 +926,6 @@ class AuthStorageService {
|
|
|
985
926
|
}
|
|
986
927
|
}
|
|
987
928
|
}
|
|
988
|
-
onLogout() {
|
|
989
|
-
this.__isCheckingAuth = false;
|
|
990
|
-
this.isLoggedInSub.next(false);
|
|
991
|
-
this.__UrlRedirect = "/";
|
|
992
|
-
this.__ip = "";
|
|
993
|
-
this.__tenantId = 0;
|
|
994
|
-
this.__infraUsuarioId = "";
|
|
995
|
-
this.__infraEstabId = "";
|
|
996
|
-
this.__infraEstabNome = "";
|
|
997
|
-
this.__infraEmpresaId = "";
|
|
998
|
-
this.__infraEmpresaNome = "";
|
|
999
|
-
this.__user = "";
|
|
1000
|
-
this.__userName = "";
|
|
1001
|
-
this.__authToken = "";
|
|
1002
|
-
this.__dominio = "";
|
|
1003
|
-
this.__tokenPayload = {};
|
|
1004
|
-
this.__isExternalLogin = false;
|
|
1005
|
-
this.__infraInAuthTypeId = 0;
|
|
1006
|
-
this.__infraIn2FaTypeId = null;
|
|
1007
|
-
this.__is2FaEnabled = false;
|
|
1008
|
-
this.__azureTenantId = "";
|
|
1009
|
-
this.__azureClientId = "";
|
|
1010
|
-
localStorage.removeItem(this.__local_key);
|
|
1011
|
-
// Limpa o armazenamento local do navegador que contém os filtros de um produto específico
|
|
1012
|
-
// Fecha a conexão local (se houver) antes de excluir a database para evitar o callback 'blocking'
|
|
1013
|
-
this._indexedDBService.closeOpenConnection()
|
|
1014
|
-
.then(() => this._indexedDBService.deleteDatabase())
|
|
1015
|
-
.catch((err) => console.warn('logout() => falha ao limpar conexão', err));
|
|
1016
|
-
// Método com customizações para finalizações da storage
|
|
1017
|
-
this._customStorageService.storageLogout();
|
|
1018
|
-
}
|
|
1019
929
|
isPrePortal() {
|
|
1020
930
|
// Identifica se a origem é PrePortal
|
|
1021
931
|
var url = new URL(window.location.href);
|
|
@@ -1032,46 +942,114 @@ class AuthStorageService {
|
|
|
1032
942
|
return false;
|
|
1033
943
|
}
|
|
1034
944
|
}
|
|
1035
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AuthStorageService, deps: [{ token: i1.HttpBackend }, { token: LibCustomStorageService }, { token: IndexedDBService }, { token: LibCustomEnvironmentService }
|
|
945
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AuthStorageService, deps: [{ token: i1.HttpBackend }, { token: LibCustomStorageService }, { token: IndexedDBService }, { token: LibCustomEnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1036
946
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AuthStorageService, providedIn: 'root' }); }
|
|
1037
947
|
}
|
|
1038
948
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AuthStorageService, decorators: [{
|
|
1039
949
|
type: Injectable,
|
|
1040
950
|
args: [{ providedIn: 'root' }]
|
|
1041
|
-
}], ctorParameters: () => [{ type: i1.HttpBackend }, { type: LibCustomStorageService }, { type: IndexedDBService }, { type: LibCustomEnvironmentService }
|
|
951
|
+
}], ctorParameters: () => [{ type: i1.HttpBackend }, { type: LibCustomStorageService }, { type: IndexedDBService }, { type: LibCustomEnvironmentService }] });
|
|
952
|
+
|
|
953
|
+
class LibCustomLoginService {
|
|
954
|
+
constructor(_customLoginService) {
|
|
955
|
+
this._customLoginService = _customLoginService;
|
|
956
|
+
}
|
|
957
|
+
// #region Propriedade Customizadas para o Componente login.component.ts
|
|
958
|
+
get loginTitle() {
|
|
959
|
+
return this._customLoginService.loginTitle;
|
|
960
|
+
}
|
|
961
|
+
get loginSubtitle() {
|
|
962
|
+
return this._customLoginService.loginSubtitle;
|
|
963
|
+
}
|
|
964
|
+
get loginBackground() {
|
|
965
|
+
return this._customLoginService.loginBackground;
|
|
966
|
+
}
|
|
967
|
+
get loginLogotipo() {
|
|
968
|
+
return this._customLoginService.loginLogotipo;
|
|
969
|
+
}
|
|
970
|
+
get loginAltLogotipo() {
|
|
971
|
+
return this._customLoginService.loginAltLogotipo;
|
|
972
|
+
}
|
|
973
|
+
get loginPageTitle() {
|
|
974
|
+
return this._customLoginService.loginPageTitle;
|
|
975
|
+
}
|
|
976
|
+
get loginDesenvDomain() {
|
|
977
|
+
return this._customLoginService.loginDesenvDomain;
|
|
978
|
+
}
|
|
979
|
+
get loginDesenvUser() {
|
|
980
|
+
return this._customLoginService.loginDesenvUser;
|
|
981
|
+
}
|
|
982
|
+
get loginDesenvPassword() {
|
|
983
|
+
return this._customLoginService.loginDesenvPassword;
|
|
984
|
+
}
|
|
985
|
+
// #endregion Propriedade Customizadas para o Componente login.component.ts
|
|
986
|
+
// #region Métodos Customizadas para o Componente auth.service.ts
|
|
987
|
+
/**
|
|
988
|
+
* Método executado no auth.service.ts - método: login ()
|
|
989
|
+
* Utilizado para inicializações diversas
|
|
990
|
+
*/
|
|
991
|
+
authLogin() {
|
|
992
|
+
this._customLoginService.authLogin();
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Método executado no auth.service.ts - método: logout ()
|
|
996
|
+
* Utilizado para inicializações diversas
|
|
997
|
+
*/
|
|
998
|
+
authLogout() {
|
|
999
|
+
this._customLoginService.authLogout();
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Método executado no auth.service.ts - método: login ()
|
|
1003
|
+
* Utilizado para informar o redirecionamento para a tela inicial após o login ok
|
|
1004
|
+
*
|
|
1005
|
+
* @param router Objeto de Router que será utilizado
|
|
1006
|
+
*/
|
|
1007
|
+
authNavigateToPage(router) {
|
|
1008
|
+
this._customLoginService.authNavigateToPage(router);
|
|
1009
|
+
}
|
|
1010
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LibCustomLoginService, deps: [{ token: LIB_CUSTOM_LOGIN_SERVICE }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1011
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LibCustomLoginService, providedIn: 'root' }); }
|
|
1012
|
+
}
|
|
1013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LibCustomLoginService, decorators: [{
|
|
1014
|
+
type: Injectable,
|
|
1015
|
+
args: [{ providedIn: 'root' }]
|
|
1016
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1017
|
+
type: Inject,
|
|
1018
|
+
args: [LIB_CUSTOM_LOGIN_SERVICE]
|
|
1019
|
+
}] }] });
|
|
1042
1020
|
|
|
1043
1021
|
class AuthUtilService {
|
|
1044
|
-
constructor(
|
|
1045
|
-
this.
|
|
1046
|
-
this.
|
|
1022
|
+
constructor(router, authStorageService, checkUrlAndMethodService, messageService, _customEnvironmentService) {
|
|
1023
|
+
this.router = router;
|
|
1024
|
+
this.authStorageService = authStorageService;
|
|
1025
|
+
this.checkUrlAndMethodService = checkUrlAndMethodService;
|
|
1026
|
+
this.messageService = messageService;
|
|
1047
1027
|
this._customEnvironmentService = _customEnvironmentService;
|
|
1048
|
-
this._message = _message;
|
|
1049
|
-
this._router = _router;
|
|
1050
1028
|
}
|
|
1051
1029
|
// Exibe a mensagem de erro de uma requisição http
|
|
1052
1030
|
showHttpError(error) {
|
|
1053
1031
|
if (error.error instanceof ErrorEvent) {
|
|
1054
1032
|
// Erro ocorreu no lado do cliente
|
|
1055
|
-
this.
|
|
1033
|
+
this.messageService.showAlertDanger(Utils.getHttpErrorMessage(error));
|
|
1056
1034
|
}
|
|
1057
1035
|
else {
|
|
1058
1036
|
// Erro ocorreu no lado do servidor
|
|
1059
1037
|
let isUnauthorizedAccess = error.status === 401;
|
|
1060
1038
|
if (isUnauthorizedAccess) {
|
|
1061
|
-
let isFromAplic = this.
|
|
1039
|
+
let isFromAplic = this.checkUrlAndMethodService.needsAuthRequest(error.url, "*", this._customEnvironmentService.needsAuthAplic);
|
|
1062
1040
|
if (isFromAplic) {
|
|
1063
|
-
// Comentado pois neste projeto esta alteração de valores não realizava o logout como deveria corretamente...
|
|
1064
|
-
// this.authStorageService.isLoggedInSub.next(false);
|
|
1065
|
-
// this.authStorageService.urlRedirect = "/";
|
|
1066
1041
|
// Remove a autenticação do usuário.
|
|
1067
|
-
this.
|
|
1042
|
+
this.authStorageService.isLoggedInSub.next(false);
|
|
1043
|
+
this.authStorageService.urlRedirect = "/";
|
|
1044
|
+
let promise = this.router.navigate(["/auth/login"]);
|
|
1045
|
+
promise.then(this.showExpiredAccess.bind(this));
|
|
1068
1046
|
}
|
|
1069
1047
|
else {
|
|
1070
|
-
this.
|
|
1048
|
+
this.messageService.showAlertDanger(Utils.getHttpErrorMessage(error));
|
|
1071
1049
|
}
|
|
1072
1050
|
}
|
|
1073
1051
|
else {
|
|
1074
|
-
this.
|
|
1052
|
+
this.messageService.showAlertDanger(Utils.getHttpErrorMessage(error));
|
|
1075
1053
|
}
|
|
1076
1054
|
}
|
|
1077
1055
|
}
|
|
@@ -1079,33 +1057,32 @@ class AuthUtilService {
|
|
|
1079
1057
|
showHTTPErrorOS(error) {
|
|
1080
1058
|
if (error.error instanceof ErrorEvent) {
|
|
1081
1059
|
// Erro ocorreu no lado do cliente
|
|
1082
|
-
this.
|
|
1083
|
-
this.
|
|
1060
|
+
this.router.navigate(["/auth/login"]).then(e => {
|
|
1061
|
+
this.messageService.showAlertDanger(Utils.getHttpErrorMessage(error));
|
|
1084
1062
|
});
|
|
1085
1063
|
}
|
|
1086
1064
|
else {
|
|
1087
1065
|
// Erro ocorreu no lado do servidor
|
|
1088
1066
|
let isUnauthorizedAccess = error.status === 401;
|
|
1089
1067
|
if (isUnauthorizedAccess) {
|
|
1090
|
-
let isFromAplic = this.
|
|
1068
|
+
let isFromAplic = this.checkUrlAndMethodService.needsAuthRequest(error.url, "*", this._customEnvironmentService.needsAuthAplic);
|
|
1091
1069
|
if (isFromAplic) {
|
|
1092
|
-
// Comentado pois neste projeto esta alteração de valores não realizava o logout como deveria corretamente...
|
|
1093
|
-
// this.authStorageService.isLoggedInSub.next(false);
|
|
1094
|
-
// this.authStorageService.urlRedirect = "/";
|
|
1095
1070
|
// Remove a autenticação do usuário.
|
|
1096
|
-
this.
|
|
1097
|
-
|
|
1071
|
+
this.authStorageService.isLoggedInSub.next(false);
|
|
1072
|
+
this.authStorageService.urlRedirect = "/";
|
|
1073
|
+
this.router.navigate(["/auth/login"]).then(e => {
|
|
1074
|
+
this.messageService.showAlertDanger(Utils.getHttpErrorMessage(error));
|
|
1098
1075
|
});
|
|
1099
1076
|
}
|
|
1100
1077
|
else {
|
|
1101
|
-
this.
|
|
1102
|
-
this.
|
|
1078
|
+
this.router.navigate(["/auth/login"]).then(e => {
|
|
1079
|
+
this.messageService.showAlertDanger(Utils.getHttpErrorMessage(error));
|
|
1103
1080
|
});
|
|
1104
1081
|
}
|
|
1105
1082
|
}
|
|
1106
1083
|
else {
|
|
1107
|
-
this.
|
|
1108
|
-
this.
|
|
1084
|
+
this.router.navigate(["/auth/login"]).then(e => {
|
|
1085
|
+
this.messageService.showAlertDanger(Utils.getHttpErrorMessage(error));
|
|
1109
1086
|
});
|
|
1110
1087
|
}
|
|
1111
1088
|
}
|
|
@@ -1113,14 +1090,14 @@ class AuthUtilService {
|
|
|
1113
1090
|
// Mostra uma mensagem de sessão expirada.
|
|
1114
1091
|
showExpiredAccess(navigationResult) {
|
|
1115
1092
|
if (navigationResult) {
|
|
1116
|
-
this.
|
|
1093
|
+
this.messageService.showAlertWarning("Sessão expirada, logue-se novamente.");
|
|
1117
1094
|
}
|
|
1118
1095
|
}
|
|
1119
1096
|
// Obtém o hostName
|
|
1120
1097
|
getHostName() {
|
|
1121
1098
|
return this._customEnvironmentService.hostName;
|
|
1122
1099
|
}
|
|
1123
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AuthUtilService, deps: [{ token:
|
|
1100
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AuthUtilService, deps: [{ token: i1$1.Router }, { token: AuthStorageService }, { token: i3.CheckUrlAndMethodService }, { token: i3.MessageService }, { token: LibCustomEnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1124
1101
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AuthUtilService, providedIn: 'root' }); }
|
|
1125
1102
|
}
|
|
1126
1103
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: AuthUtilService, decorators: [{
|
|
@@ -1128,7 +1105,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
1128
1105
|
args: [{
|
|
1129
1106
|
providedIn: 'root'
|
|
1130
1107
|
}]
|
|
1131
|
-
}], ctorParameters: () => [{ type:
|
|
1108
|
+
}], ctorParameters: () => [{ type: i1$1.Router }, { type: AuthStorageService }, { type: i3.CheckUrlAndMethodService }, { type: i3.MessageService }, { type: LibCustomEnvironmentService }] });
|
|
1132
1109
|
|
|
1133
1110
|
class AuthService {
|
|
1134
1111
|
// #endregion PRIVATE
|
|
@@ -1145,23 +1122,20 @@ class AuthService {
|
|
|
1145
1122
|
// #region ==========> PROPERTIES <==========
|
|
1146
1123
|
// #region PRIVATE
|
|
1147
1124
|
this._pendingWarning = null;
|
|
1148
|
-
this._AUTH_BASE_URL = ''; // SpInfra2AuthWS
|
|
1149
1125
|
this._BASE_URL = ''; // SpInfra2WS
|
|
1126
|
+
this._AUTH_BASE_URL = ''; // SpInfra2AuthWS
|
|
1150
1127
|
this._BASE_OS_URL = ''; // SpInfra2LoginWS
|
|
1151
|
-
this._LOGOUT_BASE_URL = ''; // SpInfra2LoginWS
|
|
1152
1128
|
this._HTTP_HEADERS = new HttpHeaders().set('Content-Type', 'application/json');
|
|
1153
1129
|
this.ip = "undefined";
|
|
1154
1130
|
this.city = "undefined";
|
|
1155
1131
|
this.state = "undefined";
|
|
1156
1132
|
this.country = "undefined";
|
|
1133
|
+
this._BASE_URL = `${this._customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`; // SpInfra2WS
|
|
1157
1134
|
this._AUTH_BASE_URL = `${this._customEnvironmentService.SpInfra2AuthWS}/Auth`; // SpInfra2AuthWS
|
|
1158
|
-
this._BASE_URL = `${this._customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`; // SpInfra2LoginWS
|
|
1159
1135
|
this._BASE_OS_URL = `${this._customEnvironmentService.SpInfra2LoginWS}/LoginIntegradoOS`; // SpInfra2LoginWS
|
|
1160
|
-
this._LOGOUT_BASE_URL = `${this._customEnvironmentService.SpInfra2LoginWS}/LogoutSisproErp`; // SpInfra2LoginWS
|
|
1161
|
-
this._AUTH_BASE_URL = !this._customEnvironmentService.production ? this._AUTH_BASE_URL : `${this._customEnvironmentService.SpInfra2AuthWS}/Auth`;
|
|
1162
1136
|
this._BASE_URL = !this._customEnvironmentService.production ? this._BASE_URL : `${this._customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`;
|
|
1137
|
+
this._AUTH_BASE_URL = !this._customEnvironmentService.production ? this._AUTH_BASE_URL : `${this._customEnvironmentService.SpInfra2AuthWS}/Auth`;
|
|
1163
1138
|
this._BASE_OS_URL = !this._customEnvironmentService.production ? this._BASE_OS_URL : `${this._customEnvironmentService.SpInfra2LoginWS}/LoginIntegradoOS`;
|
|
1164
|
-
this._LOGOUT_BASE_URL = !this._customEnvironmentService.production ? this._LOGOUT_BASE_URL : `${this._customEnvironmentService.SpInfra2LoginWS}/LogoutSisproErp`;
|
|
1165
1139
|
this.getParms();
|
|
1166
1140
|
}
|
|
1167
1141
|
// #region ==========> SERVICE METHODS <==========
|
|
@@ -1219,10 +1193,8 @@ class AuthService {
|
|
|
1219
1193
|
if (response.Error) {
|
|
1220
1194
|
throw Error(response.ErrorMessage);
|
|
1221
1195
|
}
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
// localStorage.setItem('configServerUser', response.User);
|
|
1225
|
-
// localStorage.setItem('configServerPassword', response.Password);
|
|
1196
|
+
localStorage.setItem('configServerUser', response.User);
|
|
1197
|
+
localStorage.setItem('configServerPassword', response.Password);
|
|
1226
1198
|
this._authStorageService.tenantId = response.TenantId;
|
|
1227
1199
|
this._authStorageService.dominio = response.Domain;
|
|
1228
1200
|
this._authStorageService.infraInAuthTypeId = response.InfraInAuthTypeId;
|
|
@@ -1466,22 +1438,14 @@ class AuthService {
|
|
|
1466
1438
|
}
|
|
1467
1439
|
}));
|
|
1468
1440
|
}
|
|
1469
|
-
/**
|
|
1470
|
-
* Realiza o logout do sistema, consumindo o endpoint de logout para remover os cookies e limpando as informações de autenticação armazenadas no localStorage.
|
|
1471
|
-
* @returns Promise<boolean> indicando navegação para a tela de login após o logout.
|
|
1472
|
-
*/
|
|
1441
|
+
/** Realiza o logout do sistema, removendo tokens do localStorage e limpando cache */
|
|
1473
1442
|
logout() {
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
localStorage.removeItem('configServerPassword');
|
|
1481
|
-
// Método com customizações para inicializações do Logout
|
|
1482
|
-
this._customLoginService.authLogout();
|
|
1483
|
-
});
|
|
1484
|
-
return this._router.navigate(["/auth/login"]);
|
|
1443
|
+
this._authStorageService.logout();
|
|
1444
|
+
localStorage.removeItem('configsServerUser');
|
|
1445
|
+
localStorage.removeItem('configsServerPassword');
|
|
1446
|
+
// Método com customizações para inicializações do Logout
|
|
1447
|
+
this._customLoginService.authLogout();
|
|
1448
|
+
this._router.navigate(["/auth/login"]);
|
|
1485
1449
|
}
|
|
1486
1450
|
validateAuthentication2Fa(code) {
|
|
1487
1451
|
let Code2Fa = {
|
|
@@ -2008,12 +1972,16 @@ class PesquisaTelasGlobalService {
|
|
|
2008
1972
|
// #region PUBLIC
|
|
2009
1973
|
// #endregion PUBLIC
|
|
2010
1974
|
// #endregion ==========> PROPERTIES <==========
|
|
2011
|
-
constructor(_appRef, _injector, _httpClient, _customEnvironmentService, _authUtils) {
|
|
1975
|
+
constructor(_componentFactoryResolver, _appRef, _injector, _httpClient, _customEnvironmentService, _authUtils) {
|
|
1976
|
+
this._componentFactoryResolver = _componentFactoryResolver;
|
|
2012
1977
|
this._appRef = _appRef;
|
|
2013
1978
|
this._injector = _injector;
|
|
2014
1979
|
this._httpClient = _httpClient;
|
|
2015
1980
|
this._customEnvironmentService = _customEnvironmentService;
|
|
2016
1981
|
this._authUtils = _authUtils;
|
|
1982
|
+
// #region ==========> PROPERTIES <==========
|
|
1983
|
+
// #region PRIVATE
|
|
1984
|
+
// #region GERENCIAMENTO DINÂMICO DO COMPONENTE
|
|
2017
1985
|
/**
|
|
2018
1986
|
* Referência ao componente dinâmico criado.
|
|
2019
1987
|
* Usado para gerenciar o ciclo de vida e estado do componente.
|
|
@@ -2135,7 +2103,7 @@ class PesquisaTelasGlobalService {
|
|
|
2135
2103
|
*
|
|
2136
2104
|
* Este método utiliza a API baixo nível do Angular para criar um componente dinamicamente e anexá-lo ao DOM. O processo envolve:
|
|
2137
2105
|
*
|
|
2138
|
-
* 1. Criar o componente via
|
|
2106
|
+
* 1. Criar o componente via ComponentFactoryResolver
|
|
2139
2107
|
* 2. Configurar suas propriedades iniciais
|
|
2140
2108
|
* 3. Registrá-lo no mecanismo de detecção de mudanças do Angular
|
|
2141
2109
|
* 4. Anexá-lo ao DOM (fora da hierarquia normal de componentes)
|
|
@@ -2151,18 +2119,24 @@ class PesquisaTelasGlobalService {
|
|
|
2151
2119
|
if (this._componentRef) {
|
|
2152
2120
|
return;
|
|
2153
2121
|
}
|
|
2154
|
-
// 1.
|
|
2155
|
-
|
|
2156
|
-
//
|
|
2122
|
+
// 1. Resolve a fábrica do componente - primeiro passo para criar
|
|
2123
|
+
// um componente dinamicamente no Angular. A fábrica contém os metadados
|
|
2124
|
+
// necessários para instanciar o componente.
|
|
2125
|
+
const componentFactory = this._componentFactoryResolver.resolveComponentFactory(SearchInputComponent);
|
|
2126
|
+
// 2. Cria uma nova instância do componente usando o injector raiz
|
|
2127
|
+
// Isso garante que o componente tenha acesso aos mesmos serviços
|
|
2128
|
+
// que componentes criados normalmente via template
|
|
2129
|
+
this._componentRef = componentFactory.create(this._injector);
|
|
2130
|
+
// 3. Registra a view do componente no ApplicationRef
|
|
2157
2131
|
// Isso é CRÍTICO: sem este passo, o componente não participaria
|
|
2158
2132
|
// do ciclo de detecção de mudanças do Angular
|
|
2159
2133
|
this._appRef.attachView(this._componentRef.hostView);
|
|
2160
|
-
//
|
|
2134
|
+
// 4. Obtém o elemento DOM raiz do componente e o anexa ao body
|
|
2161
2135
|
// Como este componente é criado fora da hierarquia normal,
|
|
2162
2136
|
// precisamos anexá-lo manualmente ao DOM
|
|
2163
2137
|
const domElem = this._componentRef.hostView.rootNodes[0];
|
|
2164
2138
|
document.body.appendChild(domElem);
|
|
2165
|
-
//
|
|
2139
|
+
// 5. Configura os listeners dos eventos do componente
|
|
2166
2140
|
// Em vez de tratar o hide() diretamente aqui, encaminhamos o evento para o Subject _onClose$ e guardamos a subscription para poder removê-la quando escondermos o componente.
|
|
2167
2141
|
this._componentCloseSub = this._componentRef.instance.onClose.subscribe(() => this._onClose$.next());
|
|
2168
2142
|
// Em vez de tratar o getTelas() diretamente aqui, encaminhamos o evento para o Subject _onSearch$ e guardamos a subscription para poder removê-la quando escondermos o componente.
|
|
@@ -2206,16 +2180,13 @@ class PesquisaTelasGlobalService {
|
|
|
2206
2180
|
// #endregion GERENCIAMENTO DO COMPONENTE
|
|
2207
2181
|
showErrorMessage(response) { if (response.Error)
|
|
2208
2182
|
throw Error(response.ErrorMessage); }
|
|
2209
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: PesquisaTelasGlobalService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }, { token: i1.HttpClient }, { token: LibCustomEnvironmentService }, { token: AuthUtilService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2183
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: PesquisaTelasGlobalService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }, { token: i0.Injector }, { token: i1.HttpClient }, { token: LibCustomEnvironmentService }, { token: AuthUtilService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2210
2184
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: PesquisaTelasGlobalService, providedIn: 'root' }); }
|
|
2211
2185
|
}
|
|
2212
2186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: PesquisaTelasGlobalService, decorators: [{
|
|
2213
2187
|
type: Injectable,
|
|
2214
2188
|
args: [{ providedIn: 'root' }]
|
|
2215
|
-
}], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }, { type: i1.HttpClient }, { type: LibCustomEnvironmentService }, { type: AuthUtilService }]
|
|
2216
|
-
type: ViewChild,
|
|
2217
|
-
args: ['container', { read: ViewContainerRef, static: true }]
|
|
2218
|
-
}] } });
|
|
2189
|
+
}], ctorParameters: () => [{ type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }, { type: i0.Injector }, { type: i1.HttpClient }, { type: LibCustomEnvironmentService }, { type: AuthUtilService }] });
|
|
2219
2190
|
|
|
2220
2191
|
class ErrorMenuNotAllowed {
|
|
2221
2192
|
constructor(router, authStorageService) {
|
|
@@ -3697,6 +3668,8 @@ class MenuLateralComponent {
|
|
|
3697
3668
|
}
|
|
3698
3669
|
constroiRegrasDynamicMenu(menus) {
|
|
3699
3670
|
const home = { id: 1, label: "Início", descricao: "Tela inicial", icon: "casa", route: "home", isExternal: false, isSelected: this._router.url.includes("home"), isOutroModulo: false };
|
|
3671
|
+
const cloud = { id: 1, label: "Ir para a Cloud", descricao: "Cloud OS", icon: "nuvem", route: `https://${window.location.host}/SisproErp/`, isExternal: false, isSelected: this._router.url.includes("cloud"), isOutroModulo: true };
|
|
3672
|
+
menus.unshift(cloud);
|
|
3700
3673
|
menus.unshift(home);
|
|
3701
3674
|
return menus;
|
|
3702
3675
|
}
|
|
@@ -3798,7 +3771,7 @@ class MenuLateralComponent {
|
|
|
3798
3771
|
});
|
|
3799
3772
|
}
|
|
3800
3773
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MenuLateralComponent, deps: [{ token: MSAL_GUARD_CONFIG }, { token: i1$2.MsalService }, { token: i10.ToastrService }, { token: LibCustomEnvironmentService }, { token: AuthStorageService }, { token: i4.BsModalService }, { token: MenuServicesService }, { token: i3.MessageService }, { token: AuthUtilService }, { token: i1$1.Router }, { token: AuthService }, { token: i11.BreakpointObserver }, { token: LibCustomMenuService }, { token: PesquisaTelasGlobalService }, { token: IndexedDBService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3801
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MenuLateralComponent, isStandalone: true, selector: "app-menu-lateral", queries: [{ propertyName: "desiredContent", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "sidebar", first: true, predicate: ["sidebar"], descendants: true, static: true }, { propertyName: "notif_template", first: true, predicate: ["notif_menu"], descendants: true }, { propertyName: "menuLink", first: true, predicate: ["menuLink"], descendants: true }], ngImport: i0, template: "<!-- #region MAIN CONTENT -->\n<div id=\"menu\" class=\"main col-12\">\n\n <div style=\"height: 100vh; z-index: 3;\" class=\"sidebar-control position-relative d-flex flex-row\" #menuContainer\n (clickOutside)=\"closeMenu == true ? onClickedOutside($event, submenu_ref) : closeMenu = true\">\n <div class=\"sidebar {{_customMenuService.themeColor}} closed\" [ngClass]=\"{'closed-mobile': isMobile && !isMenuOpened}\" #sidebar>\n <div class=\"menu-header\">\n <ul>\n <li class=\"mb-3\">\n <div class=\"logo-hamburguer\">\n <img src=\"assets/icons/logotipo-sispro.svg\" alt=\"logo-sispro\" class=\"logo-sispro\" title=\"logo\" width=\"136px\" height=\"48px\">\n <button class=\"button-hamburguer\" (click)=\"isMenuOpened = !isMenuOpened; openExpansibleMenu(sidebar);\">\n <img src=\"assets/icons/menu.svg\" alt=\"menu hamburguer\">\n </button>\n </div>\n </li>\n\n <!-- #region M\u00D3DULOS -->\n <li class=\"mb-3\" style=\"margin-left: 8px; margin-right: 8px\">\n <div class=\"btn-group\">\n <button (click)=\"dropdownWasOpened(true)\" type=\"button\" class=\"dropdown-button\" data-bs-toggle=\"dropdown\"\n aria-expanded=\"false\" data-bs-auto-close=\"outside\">\n <ng-container>\n <lib-icon iconColor=\"white\" [iconName]=\"_customMenuService.moduleSvg\" />\n <span class=\"ps-2\"> {{ this._customMenuService.moduleName }} <lib-icon iconName=\"seta-direita\" iconColor=\"white\" /> </span>\n </ng-container>\n </button>\n <ul class=\"dropdown-menu\" #dropdown_ref>\n <app-primary-dropdown [buttonWasClicked]=\"messageIfClicked\"></app-primary-dropdown>\n </ul>\n </div>\n </li>\n <!-- #endregion M\u00D3DULOS -->\n\n <!-- #region ESTABELECIMENTOS -->\n <li class=\"mx-3\" style=\"margin-bottom: 16px;\">\n <div class=\"icon-estabelecimento\">\n <button class=\"row justify-content-between bg-transparent border-0\"\n (click)=\"openModalEstabelecimento(modalEstabelecimento)\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : nomeEstabelecimento\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"predio\" iconColor=\"white\" />\n <span *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-9 ps-2 glb-text-width-160 text-start text-truncate\"> {{ nomeEstabelecimento }} </span>\n <lib-icon *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-1\" iconName=\"seta-direita\" iconColor=\"white\" />\n </button>\n </div>\n </li>\n <!-- #endregion ESTABELECIMENTOS -->\n\n\n <!-- #region PESQUISA -->\n @if (_customMenuService.menuDynamic) {\n <li class=\"mx-3 mb-3\">\n <div class=\"icon-pesquisa\">\n <button class=\"d-flex align-items-center justify-content-start gap-2 bg-transparent border-0\" (click)=\"_pesquisaTelas.show()\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : 'Pesquisar telas'\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"lupa\" iconColor=\"white\" />\n @if (!sidebar.classList.contains('closed')) { <span class=\"col ps-2 text-start text-truncate\"> Pesquisar telas </span> }\n </button>\n </div>\n </li>\n }\n <!-- #endregion PESQUISA -->\n\n </ul>\n\n </div>\n\n <!-- #region MENUS DE NAVEGA\u00C7\u00C3O -->\n <div class=\"main-menu\">\n <div class=\"scroll\">\n <div class=\"list-menu px-2 pb-1\">\n\n <!-- #region MENU DIN\u00C2MICO -->\n <div class=\"dynamic-menu\">\n <ul #dynamic_menu_items *ngIf=\"_customMenuService.menuItems; else isLoading\">\n\n <li *ngFor=\"let menuItem of _customMenuService.menuItems; let i = index\"\n class=\"p-1 rounded\"\n (click)=\"openSubmenu(menuItem, submenu_ref, dynamic_menu)\"\n [class.selectedItem]=\"menuItem.isSelected\">\n\n <a *ngIf=\"!menuItem.isExternal && !menuItem.isOutroModulo; else externalMenu\"\n [routerLink]=\"menuItem.route != '' ? menuItem.route : null\"\n [id]=\"'item' + menuItem.id\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\"\n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\"\n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImg\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImg>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\"\n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n\n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(menuItem.route,menuItem.isOutroModulo)\"\n target=\"_blank\"\n [id]=\"'item' + menuItem.id\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\"\n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\"\n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImgExternal\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImgExternal>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\"\n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n </ng-template>\n </li>\n\n </ul>\n </div>\n\n <ng-template #isLoading>\n <li class=\"spinner-border spinner-border-sm mt-2\" role=\"status\" aria-hidden=\"true\"></li>\n </ng-template>\n <!-- #endregion MENU DIN\u00C2MICO -->\n\n </div>\n </div>\n </div>\n <!-- #endregion MENUS DE NAVEGA\u00C7\u00C3O -->\n\n <!-- #region FOOTER -->\n <div class=\"footer-menu glb-cursor-pointer\" (mouseenter)=\"showBalloon = true\" (mouseleave)=\"showBalloon = false\"\n [popover]=\"popoverContent\" placement=\"right bottom\" [outsideClick]=\"true\" containerClass=\"width: 200px\" >\n <div class=\"footer-components d-flex flex-row align-items-center gap-2 py-2 px-1 justify-content-center gap-2\" [class.open]=\"showBalloon\">\n @if (footerUserImgSrc) {\n <img class=\"photo-profile\" [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n }\n @else {\n <lib-icon iconName=\"contraparte\" iconColor=\"white\"/>\n }\n\n <span class=\"text-truncate fw-bold text-start\" style=\"max-width: 100%;\"> {{ footerUserName }} </span>\n </div>\n </div>\n\n <ng-template #popoverContent>\n <div class=\"footer-menu\" style=\"width: 1000px;\">\n <div class=\"d-flex align-items-center\">\n <img *ngIf=\"footerUserImgSrc; else noUserImg\" class=\"photo-profile\"\n [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n <ng-template #noUserImg>\n <lib-icon iconName=\"contraparte\" iconColor=\"currentColor\"/>\n </ng-template>\n <div class=\"d-flex flex-column ms-1\">\n <div [tooltip]=\"footerUserName\" class=\"dynamic-container\" style=\"white-space: nowrap; flex-grow: 1;max-width: 200px; font-size: 16px;\">{{footerUserName}}</div>\n <div [tooltip]=\"footerUserEmail\" class=\"dynamic-container\" style=\"white-space: nowrap; font-size: 12px; flex-grow: 1;max-width: 200px;\">{{footerUserEmail}}</div>\n </div>\n </div>\n </div>\n <hr class=\"mb-2 mt-2\">\n <div routerLink=\"meu-perfil\" style=\"cursor: pointer;\" (click)=\"togglePopover(); $event.stopPropagation()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"contraparte\"/> Meu Perfil\n </div>\n \n <div class=\"mt-2\" style=\"cursor: pointer;\" (click)=\"openModalVersion(modalVersion)\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"info\"/> Vers\u00E3o\n </div>\n\n <div class=\"mt-2\" style=\"cursor: pointer;\" (click)=\"deleteIDB()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"lixeira\"/> Limpar filtros salvos\n </div>\n\n <div class=\"mt-2\" (click)=\"logout()\" style=\"cursor: pointer;\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"logout\"/> Sair\n </div>\n </ng-template>\n <!-- #endregion FOOTER -->\n\n </div>\n\n <div class=\"submenu\" #submenu_ref>\n <ng-template [ngIf]=\"desiredContent !== null\">\n <ng-content *ngTemplateOutlet=\"desiredContent!; context: {$implicit: submenuList}\"></ng-content>\n </ng-template>\n </div>\n </div>\n\n <div class=\"main-content col d-flex flex-column align-content-between\" id=\"body-content\">\n <div class=\"content\" style=\"position: relative;\">\n <router-outlet></router-outlet>\n </div>\n <div app-footer></div>\n </div>\n\n</div>\n<!-- #endregion MAIN CONTENT -->\n\n<!-- #region TEMPLATES -->\n<ng-template #dynamic_menu let-data>\n <app-dynamic-menu\n [submenuList]=\"data\"\n [titleSubmenu]=\"titleSubmenu\" [submenuRef]=\"submenu_ref\" [recebeParam]=\"onClickedOutside.bind(this)\"\n [hostServerOutSystems]=\"HostServerOutSystems\">\n </app-dynamic-menu>\n</ng-template>\n\n<ng-template #notif_menu>\n <app-notif-submenu></app-notif-submenu>\n</ng-template>\n\n<!-- #region MODAL SELECAO ESTABELECIMENTO -->\n<ng-template #modalEstabelecimento>\n <selecao-estabelecimentos-modal (onClose)=\"closeModalEstabelecimento()\"\n (onSelected)=\"closeModalEstabelecimento(); updateLastLogEstabelecimento($event);\">\n </selecao-estabelecimentos-modal>\n</ng-template>\n<!-- #endregion MODAL SELECAO ESTABELECIMENTO -->\n\n<!-- #region MODAL VERSION -->\n<ng-template #modalVersion>\n <versoes-modal (onClose)=\"closeModalVersion()\" />\n</ng-template>\n<!-- #endregion MODAL VERSION -->\n\n<!-- #endregion TEMPLATES -->\n", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;font-size:14px}span{color:#fff}ul{list-style:none;padding-left:0;white-space:nowrap}#menu.main{display:flex;width:100%;height:100%;background:#eee}::-webkit-scrollbar{width:8px;background:transparent}::-webkit-scrollbar-thumb{background:#bbb;border-radius:16px}.main-content{width:100%;z-index:0;overflow-y:auto;overflow:overlay;height:100vh}.main-content .content{padding:0 16px 16px;background-color:#eee!important}.disable-scroll{overflow-y:hidden}.dropdown-button{padding:8px;border-radius:8px;background-color:#3265ee;border:none;font-size:14px;font-weight:700;width:100%;display:flex}.dropdown-button span{width:100%;display:flex;justify-content:space-between}.dropdown-menu{width:300px;border-radius:8px}.dropdown-menu li{margin:16px 8px}.dropdown-menu li a{font-size:14px}.dropdown-menu li a:hover{font-weight:700;background-color:transparent}.dropdown-menu .dropdown-divider{height:0}.link-portal{color:#213b70;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}.container{display:flex;width:max-content}.sidebar{display:flex;flex-direction:column;height:100%;grid-template-rows:min-content;box-sizing:border-box;transition:width .5s;background-color:#213b70;max-width:inherit}.sidebar .footer-menu{justify-content:flex-end}.menu-header{display:flex;flex-direction:column;white-space:nowrap;padding:32px 0 0;background-color:#213b70}.menu-header ul li{margin-left:16px;margin-right:16px}.menu-header ul>li:last-child{border-bottom:1px solid #3265ee;padding-bottom:15px;height:auto}.dropdown{margin:0}.btn-group{width:100%}.sidebar.closed .menu-header ul li{margin-left:0;margin-right:0}.sidebar.closed .menu-header{display:flex;flex-direction:column;align-items:center}.icon-estabelecimento button,.icon-pesquisa button{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:center}.icon-estabelecimento button span:hover,.icon-pesquisa button span:hover{font-weight:700}.header-content{display:flex;flex-direction:column;justify-content:space-evenly;height:100%;margin:0 20px}.logo-hamburguer{display:flex;justify-content:space-between;margin-right:8px}.logo-hamburguer .button-hamburguer{border:none;background-color:transparent}.sidebar.closed .logo-hamburguer{justify-content:center;margin-right:0}.scroll{overflow-y:auto;overflow-x:hidden;min-height:20%;margin-right:2px}.list-menu{padding-left:16px;padding-right:8px;display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.list-menu .text-closed{padding-top:15px;display:none;color:#fff}.list-menu .text-opened{color:#fff;font-size:12px;padding-top:15px;visibility:visible;white-space:nowrap}.list-menu .li-main{padding:10px 7px;border-radius:8px}.list-menu .onSelect{background-color:#3265ee}.list-menu div.static-menu>ul>li:first-child{margin-top:16px}.list-menu .span-main{font-size:14px;margin-left:8px;opacity:1;pointer-events:auto;white-space:break-spaces}.list-menu .span-main:hover,.list-menu .list-options span:hover{font-weight:700}.list-menu p{font-size:10px;font-weight:700;text-transform:uppercase;border-bottom:1px solid #3265ee;visibility:hidden}.selectedItem{background-color:#3265ee}.selectedItem span{font-weight:700;background-color:transparent}.notif{padding:2px 13px;margin-bottom:none;background-color:#000;border-radius:8px;font-weight:700}.sidebar.closed .chevron{display:none}.sidebar.closed .icon-estabelecimento,.sidebar.closed .icon-pesquisa{margin:0}.sidebar.closed .icon-estabelecimento button,.sidebar.closed .icon-pesquisa button{justify-content:center}.sidebar.closed .icon-estabelecimento button img,.sidebar.closed .icon-pesquisa button img{margin:0}.align-chevron{width:100%;text-align:justify;align-items:center;display:flex;justify-content:space-between}.selected-color{background-color:#3265ee}.main-menu{display:flex;flex-direction:column;justify-content:space-between;height:100%;min-height:20%}.button-icons{border:none;background-color:transparent}.footer-menu{display:flex;flex-direction:column}.footer-menu .footer-components{border-top:1px solid #3265ee}.footer-menu .footer-components .button-closed{display:none}.footer-menu button{border:none;background-color:transparent;border-radius:8px}.footer-menu .points{padding:4px 0;margin:4px 0;border-radius:8px}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.footer-menu .open-user{background-color:#3265ee}.submenu{width:341px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden;box-shadow:0 4px 8px #0000004d}.submenu ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}.submenu ul li{font-size:20px;font-weight:600;line-height:22px;padding-bottom:18px}.submenu .itens-list{display:flex;justify-content:space-between;align-items:center}.submenu .itens-list .favoritos,.submenu .itens-list span{cursor:pointer}.submenu .footer-menu{display:flex;flex-direction:row;justify-content:center;overflow:hidden}.submenu .footer-menu .footer-components{border-top:1px solid #3265ee;white-space:nowrap}.submenu .footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.submenu .footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu .footer-components{display:flex;justify-content:center;align-items:center}.submenu button{position:relative;left:10%;border:none;background-color:transparent}.submenu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0;box-shadow:0 4px 8px #0000004d}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.search-bar{max-width:368px;height:38px;margin-top:24px;border:1px solid #ced4da;box-sizing:border-box;border-radius:8px}.opened-notif-sub{min-width:452px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden}.sidebar.closed{max-width:73px;transition:.5s}.sidebar.closed span{display:none}.closed-mobile{width:42px}.opened-mobile{width:80vw}.sidebar.closed span{white-space:nowrap;overflow:hidden}.sidebar.closed .logo-sispro{display:none}.sidebar.closed .list-menu{padding:0;margin-left:0;margin-right:0;display:flex;flex-direction:column;align-items:center}.sidebar.closed .list-menu span{opacity:0;pointer-events:none}.sidebar.closed .list-menu .text-closed{padding-bottom:11px;visibility:visible;display:block}.sidebar.closed .list-menu .text-opened{display:none;font-size:8px}.sidebar.closed .list-menu .chevron,.sidebar.closed .favoritos,.sidebar.closed .footer-components .button-opened{display:none}.sidebar.closed .footer-components .button-closed{display:block}.sidebar.closed .button-icons{border:none;background-color:transparent}.sidebar.closed .footer-components{display:flex;align-items:center}.sidebar.closed button{border:none;background-color:transparent;display:block}.sidebar.closed .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.sidebar-control{height:100vh;max-width:227.667px}.sidebar-control .main-content.closed{margin-left:0}.glb-text-width-120{max-width:120px}.profile-picture{display:inline-block;position:relative;width:100px;height:100px;border-radius:50%;overflow:hidden}.profile-picture img{width:100%;height:100%;object-fit:cover;border-radius:50%;clip-path:circle(50% at 50% 50%)}.image-div{width:50px;min-width:50px;height:50px;border-radius:100%;position:relative;overflow:hidden;z-index:1}.image-div #photoUser{width:146px;height:146px;top:-1px;left:-1px;object-fit:cover;position:relative;z-index:1;border:none;border-color:transparent}.dynamic-container{display:inline-block;white-space:nowrap;overflow:hidden}.custom-popover{width:1000px}\n"], dependencies: [{ kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i15.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i7$1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "ngmodule", type: InfraModule }, { kind: "directive", type: i3.ClickOutsideDirective, selector: "[clickOutside], [libClickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "component", type: i3.FooterComponent, selector: "[app-footer], app-footer, lib-footer" }, { kind: "component", type: SelecaoEstabelecimentosModalComponent, selector: "selecao-estabelecimentos-modal", outputs: ["onClose", "onSelected"] }, { kind: "component", type: VersoesModalComponent, selector: "versoes-modal", outputs: ["onClose"] }, { kind: "component", type: NotifSubmenuComponent, selector: "app-notif-submenu" }, { kind: "component", type: DynamicMenuComponent, selector: "app-dynamic-menu", inputs: ["submenuRef", "recebeParam", "titleSubmenu", "submenuList", "hostServerOutSystems"], outputs: ["selectTemplate"] }, { kind: "component", type: PrimaryDropdownComponent, selector: "app-primary-dropdown", inputs: ["buttonWasClicked"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i17.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i17.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i17.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i17.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
3774
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: MenuLateralComponent, isStandalone: true, selector: "app-menu-lateral", queries: [{ propertyName: "desiredContent", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "sidebar", first: true, predicate: ["sidebar"], descendants: true, static: true }, { propertyName: "notif_template", first: true, predicate: ["notif_menu"], descendants: true }, { propertyName: "menuLink", first: true, predicate: ["menuLink"], descendants: true }], ngImport: i0, template: "<!-- #region MAIN CONTENT -->\n<div id=\"menu\" class=\"main col-12\">\n\n <div style=\"height: 100vh; z-index: 3;\" class=\"sidebar-control position-relative d-flex flex-row\" #menuContainer\n (clickOutside)=\"closeMenu == true ? onClickedOutside($event, submenu_ref) : closeMenu = true\">\n <div class=\"sidebar {{_customMenuService.themeColor}} closed\" [ngClass]=\"{'closed-mobile': isMobile && !isMenuOpened}\" #sidebar>\n <div class=\"menu-header\">\n <ul>\n <li class=\"mb-3\">\n <div class=\"logo-hamburguer\">\n <img src=\"assets/icons/logotipo-sispro.svg\" alt=\"logo-sispro\" class=\"logo-sispro\" title=\"logo\" width=\"136px\" height=\"48px\">\n <button class=\"button-hamburguer\" (click)=\"isMenuOpened = !isMenuOpened; openExpansibleMenu(sidebar);\">\n <img src=\"assets/icons/menu.svg\" alt=\"menu hamburguer\">\n </button>\n </div>\n </li>\n\n <!-- #region M\u00D3DULOS -->\n <li class=\"mb-3\" style=\"margin-left: 8px; margin-right: 8px\">\n <div class=\"btn-group\">\n <button (click)=\"dropdownWasOpened(true)\" type=\"button\" class=\"dropdown-button\" data-bs-toggle=\"dropdown\"\n aria-expanded=\"false\" data-bs-auto-close=\"outside\">\n <ng-container>\n <lib-icon iconColor=\"white\" [iconName]=\"_customMenuService.moduleSvg\" />\n <span class=\"ps-2\"> {{ this._customMenuService.moduleName }} <lib-icon iconName=\"seta-direita\" iconColor=\"white\" /> </span>\n </ng-container>\n </button>\n <ul class=\"dropdown-menu\" #dropdown_ref>\n <app-primary-dropdown [buttonWasClicked]=\"messageIfClicked\"></app-primary-dropdown>\n </ul>\n </div>\n </li>\n <!-- #endregion M\u00D3DULOS -->\n\n <!-- #region ESTABELECIMENTOS -->\n <li class=\"mx-3\" style=\"margin-bottom: 16px;\">\n <div class=\"icon-estabelecimento\">\n <button class=\"row justify-content-between bg-transparent border-0\"\n (click)=\"openModalEstabelecimento(modalEstabelecimento)\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : nomeEstabelecimento\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"predio\" iconColor=\"white\" />\n <span *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-9 ps-2 glb-text-width-160 text-start text-truncate\"> {{ nomeEstabelecimento }} </span>\n <lib-icon *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-1\" iconName=\"seta-direita\" iconColor=\"white\" />\n </button>\n </div>\n </li>\n <!-- #endregion ESTABELECIMENTOS -->\n\n\n <!-- #region PESQUISA -->\n @if (_customMenuService.menuDynamic) {\n <li class=\"mx-3 mb-3\">\n <div class=\"icon-pesquisa\">\n <button class=\"d-flex align-items-center justify-content-start gap-2 bg-transparent border-0\" (click)=\"_pesquisaTelas.show()\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : 'Pesquisar telas'\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"lupa\" iconColor=\"white\" />\n @if (!sidebar.classList.contains('closed')) { <span class=\"col ps-2 text-start text-truncate\"> Pesquisar telas </span> }\n </button>\n </div>\n </li>\n }\n <!-- #endregion PESQUISA -->\n\n </ul>\n\n </div>\n\n <!-- #region MENUS DE NAVEGA\u00C7\u00C3O -->\n <div class=\"main-menu\">\n <div class=\"scroll\">\n <div class=\"list-menu px-2 pb-1\">\n\n <!-- #region MENU DIN\u00C2MICO -->\n <div class=\"dynamic-menu\">\n <ul #dynamic_menu_items *ngIf=\"_customMenuService.menuItems; else isLoading\">\n\n <li *ngFor=\"let menuItem of _customMenuService.menuItems; let i = index\"\n class=\"p-1 rounded\"\n (click)=\"openSubmenu(menuItem, submenu_ref, dynamic_menu)\"\n [class.selectedItem]=\"menuItem.isSelected\">\n\n <a *ngIf=\"!menuItem.isExternal && !menuItem.isOutroModulo; else externalMenu\"\n [routerLink]=\"menuItem.route != '' ? menuItem.route : null\"\n [id]=\"'item' + menuItem.id\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" [title]=\"menuItem.label\"\n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\"\n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImg\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImg>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\"\n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n\n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(menuItem.route,menuItem.isOutroModulo)\"\n target=\"_blank\"\n [id]=\"'item' + menuItem.id\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" [title]=\"menuItem.label\"\n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\"\n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImgExternal\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImgExternal>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\"\n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n </ng-template>\n </li>\n\n </ul>\n </div>\n\n <ng-template #isLoading>\n <li class=\"spinner-border spinner-border-sm mt-2\" role=\"status\" aria-hidden=\"true\"></li>\n </ng-template>\n <!-- #endregion MENU DIN\u00C2MICO -->\n\n </div>\n </div>\n </div>\n <!-- #endregion MENUS DE NAVEGA\u00C7\u00C3O -->\n\n <!-- #region FOOTER -->\n <div class=\"footer-menu glb-cursor-pointer\" (mouseenter)=\"showBalloon = true\" (mouseleave)=\"showBalloon = false\"\n [popover]=\"popoverContent\" placement=\"right bottom\" [outsideClick]=\"true\" containerClass=\"width: 200px\" >\n <div class=\"footer-components d-flex flex-row align-items-center gap-2 py-2 px-1 justify-content-center gap-2\" [class.open]=\"showBalloon\">\n @if (footerUserImgSrc) {\n <img class=\"photo-profile\" [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n }\n @else {\n <lib-icon iconName=\"contraparte\" iconColor=\"white\"/>\n }\n\n <span class=\"text-truncate fw-bold text-start\" style=\"max-width: 100%;\"> {{ footerUserName }} </span>\n </div>\n </div>\n\n <ng-template #popoverContent>\n <div class=\"footer-menu\" style=\"width: 1000px;\">\n <div class=\"d-flex align-items-center\">\n <img *ngIf=\"footerUserImgSrc; else noUserImg\" class=\"photo-profile\"\n [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n <ng-template #noUserImg>\n <lib-icon iconName=\"contraparte\" iconColor=\"currentColor\"/>\n </ng-template>\n <div class=\"d-flex flex-column ms-1\">\n <div [tooltip]=\"footerUserName\" class=\"dynamic-container\" style=\"white-space: nowrap; flex-grow: 1;max-width: 200px; font-size: 16px;\">{{footerUserName}}</div>\n <div [tooltip]=\"footerUserEmail\" class=\"dynamic-container\" style=\"white-space: nowrap; font-size: 12px; flex-grow: 1;max-width: 200px;\">{{footerUserEmail}}</div>\n </div>\n </div>\n </div>\n <hr class=\"mb-2 mt-2\">\n <div routerLink=\"meu-perfil\" style=\"cursor: pointer;\" (click)=\"togglePopover(); $event.stopPropagation()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"contraparte\"/> Meu Perfil\n </div>\n \n <div class=\"mt-2\" style=\"cursor: pointer;\" (click)=\"openModalVersion(modalVersion)\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"info\"/> Vers\u00E3o\n </div>\n\n <div class=\"mt-2\" style=\"cursor: pointer;\" (click)=\"deleteIDB()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"lixeira\"/> Limpar filtros salvos\n </div>\n\n <div class=\"mt-2\" (click)=\"logout()\" style=\"cursor: pointer;\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"logout\"/> Sair\n </div>\n </ng-template>\n <!-- #endregion FOOTER -->\n\n </div>\n\n <div class=\"submenu\" #submenu_ref>\n <ng-template [ngIf]=\"desiredContent !== null\">\n <ng-content *ngTemplateOutlet=\"desiredContent!; context: {$implicit: submenuList}\"></ng-content>\n </ng-template>\n </div>\n </div>\n\n <div class=\"main-content col d-flex flex-column align-content-between\" id=\"body-content\">\n <div class=\"content\" style=\"position: relative;\">\n <router-outlet></router-outlet>\n </div>\n <div app-footer></div>\n </div>\n\n</div>\n<!-- #endregion MAIN CONTENT -->\n\n<!-- #region TEMPLATES -->\n<ng-template #dynamic_menu let-data>\n <app-dynamic-menu\n [submenuList]=\"data\"\n [titleSubmenu]=\"titleSubmenu\" [submenuRef]=\"submenu_ref\" [recebeParam]=\"onClickedOutside.bind(this)\"\n [hostServerOutSystems]=\"HostServerOutSystems\">\n </app-dynamic-menu>\n</ng-template>\n\n<ng-template #notif_menu>\n <app-notif-submenu></app-notif-submenu>\n</ng-template>\n\n<!-- #region MODAL SELECAO ESTABELECIMENTO -->\n<ng-template #modalEstabelecimento>\n <selecao-estabelecimentos-modal (onClose)=\"closeModalEstabelecimento()\"\n (onSelected)=\"closeModalEstabelecimento(); updateLastLogEstabelecimento($event);\">\n </selecao-estabelecimentos-modal>\n</ng-template>\n<!-- #endregion MODAL SELECAO ESTABELECIMENTO -->\n\n<!-- #region MODAL VERSION -->\n<ng-template #modalVersion>\n <versoes-modal (onClose)=\"closeModalVersion()\" />\n</ng-template>\n<!-- #endregion MODAL VERSION -->\n\n<!-- #endregion TEMPLATES -->\n", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;font-size:14px}span{color:#fff}ul{list-style:none;padding-left:0;white-space:nowrap}#menu.main{display:flex;width:100%;height:100%;background:#eee}::-webkit-scrollbar{width:8px;background:transparent}::-webkit-scrollbar-thumb{background:#bbb;border-radius:16px}.main-content{width:100%;z-index:0;overflow-y:auto;overflow:overlay;height:100vh}.main-content .content{padding:0 16px 16px;background-color:#eee!important}.disable-scroll{overflow-y:hidden}.dropdown-button{padding:8px;border-radius:8px;background-color:#3265ee;border:none;font-size:14px;font-weight:700;width:100%;display:flex}.dropdown-button span{width:100%;display:flex;justify-content:space-between}.dropdown-menu{width:300px;border-radius:8px}.dropdown-menu li{margin:16px 8px}.dropdown-menu li a{font-size:14px}.dropdown-menu li a:hover{font-weight:700;background-color:transparent}.dropdown-menu .dropdown-divider{height:0}.link-portal{color:#213b70;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}.container{display:flex;width:max-content}.sidebar{display:flex;flex-direction:column;height:100%;grid-template-rows:min-content;box-sizing:border-box;transition:width .5s;background-color:#213b70;max-width:inherit}.sidebar .footer-menu{justify-content:flex-end}.menu-header{display:flex;flex-direction:column;white-space:nowrap;padding:32px 0 0;background-color:#213b70}.menu-header ul li{margin-left:16px;margin-right:16px}.menu-header ul>li:last-child{border-bottom:1px solid #3265ee;padding-bottom:15px;height:auto}.dropdown{margin:0}.btn-group{width:100%}.sidebar.closed .menu-header ul li{margin-left:0;margin-right:0}.sidebar.closed .menu-header{display:flex;flex-direction:column;align-items:center}.icon-estabelecimento button,.icon-pesquisa button{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:center}.icon-estabelecimento button span:hover,.icon-pesquisa button span:hover{font-weight:700}.header-content{display:flex;flex-direction:column;justify-content:space-evenly;height:100%;margin:0 20px}.logo-hamburguer{display:flex;justify-content:space-between;margin-right:8px}.logo-hamburguer .button-hamburguer{border:none;background-color:transparent}.sidebar.closed .logo-hamburguer{justify-content:center;margin-right:0}.scroll{overflow-y:auto;overflow-x:hidden;min-height:20%;margin-right:2px}.list-menu{padding-left:16px;padding-right:8px;display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.list-menu .text-closed{padding-top:15px;display:none;color:#fff}.list-menu .text-opened{color:#fff;font-size:12px;padding-top:15px;visibility:visible;white-space:nowrap}.list-menu .li-main{padding:10px 7px;border-radius:8px}.list-menu .onSelect{background-color:#3265ee}.list-menu div.static-menu>ul>li:first-child{margin-top:16px}.list-menu .span-main{font-size:14px;margin-left:8px;opacity:1;pointer-events:auto;white-space:break-spaces}.list-menu .span-main:hover,.list-menu .list-options span:hover{font-weight:700}.list-menu p{font-size:10px;font-weight:700;text-transform:uppercase;border-bottom:1px solid #3265ee;visibility:hidden}.selectedItem{background-color:#3265ee}.selectedItem span{font-weight:700;background-color:transparent}.notif{padding:2px 13px;margin-bottom:none;background-color:#000;border-radius:8px;font-weight:700}.sidebar.closed .chevron{display:none}.sidebar.closed .icon-estabelecimento,.sidebar.closed .icon-pesquisa{margin:0}.sidebar.closed .icon-estabelecimento button,.sidebar.closed .icon-pesquisa button{justify-content:center}.sidebar.closed .icon-estabelecimento button img,.sidebar.closed .icon-pesquisa button img{margin:0}.align-chevron{width:100%;text-align:justify;align-items:center;display:flex;justify-content:space-between}.selected-color{background-color:#3265ee}.main-menu{display:flex;flex-direction:column;justify-content:space-between;height:100%;min-height:20%}.button-icons{border:none;background-color:transparent}.footer-menu{display:flex;flex-direction:column}.footer-menu .footer-components{border-top:1px solid #3265ee}.footer-menu .footer-components .button-closed{display:none}.footer-menu button{border:none;background-color:transparent;border-radius:8px}.footer-menu .points{padding:4px 0;margin:4px 0;border-radius:8px}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.footer-menu .open-user{background-color:#3265ee}.submenu{width:341px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden;box-shadow:0 4px 8px #0000004d}.submenu ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}.submenu ul li{font-size:20px;font-weight:600;line-height:22px;padding-bottom:18px}.submenu .itens-list{display:flex;justify-content:space-between;align-items:center}.submenu .itens-list .favoritos,.submenu .itens-list span{cursor:pointer}.submenu .footer-menu{display:flex;flex-direction:row;justify-content:center;overflow:hidden}.submenu .footer-menu .footer-components{border-top:1px solid #3265ee;white-space:nowrap}.submenu .footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.submenu .footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu .footer-components{display:flex;justify-content:center;align-items:center}.submenu button{position:relative;left:10%;border:none;background-color:transparent}.submenu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0;box-shadow:0 4px 8px #0000004d}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.search-bar{max-width:368px;height:38px;margin-top:24px;border:1px solid #ced4da;box-sizing:border-box;border-radius:8px}.opened-notif-sub{min-width:452px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden}.sidebar.closed{max-width:73px;transition:.5s}.sidebar.closed span{display:none}.closed-mobile{width:42px}.opened-mobile{width:80vw}.sidebar.closed span{white-space:nowrap;overflow:hidden}.sidebar.closed .logo-sispro{display:none}.sidebar.closed .list-menu{padding:0;margin-left:0;margin-right:0;display:flex;flex-direction:column;align-items:center}.sidebar.closed .list-menu span{opacity:0;pointer-events:none}.sidebar.closed .list-menu .text-closed{padding-bottom:11px;visibility:visible;display:block}.sidebar.closed .list-menu .text-opened{display:none;font-size:8px}.sidebar.closed .list-menu .chevron,.sidebar.closed .favoritos,.sidebar.closed .footer-components .button-opened{display:none}.sidebar.closed .footer-components .button-closed{display:block}.sidebar.closed .button-icons{border:none;background-color:transparent}.sidebar.closed .footer-components{display:flex;align-items:center}.sidebar.closed button{border:none;background-color:transparent;display:block}.sidebar.closed .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.sidebar-control{height:100vh;max-width:227.667px}.sidebar-control .main-content.closed{margin-left:0}.glb-text-width-120{max-width:120px}.profile-picture{display:inline-block;position:relative;width:100px;height:100px;border-radius:50%;overflow:hidden}.profile-picture img{width:100%;height:100%;object-fit:cover;border-radius:50%;clip-path:circle(50% at 50% 50%)}.image-div{width:50px;min-width:50px;height:50px;border-radius:100%;position:relative;overflow:hidden;z-index:1}.image-div #photoUser{width:146px;height:146px;top:-1px;left:-1px;object-fit:cover;position:relative;z-index:1;border:none;border-color:transparent}.dynamic-container{display:inline-block;white-space:nowrap;overflow:hidden}.custom-popover{width:1000px}\n"], dependencies: [{ kind: "ngmodule", type: PopoverModule }, { kind: "directive", type: i15.PopoverDirective, selector: "[popover]", inputs: ["adaptivePosition", "boundariesElement", "popover", "popoverContext", "popoverTitle", "placement", "outsideClick", "triggers", "container", "containerClass", "isOpen", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i7$1.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "ngmodule", type: InfraModule }, { kind: "directive", type: i3.ClickOutsideDirective, selector: "[clickOutside], [libClickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "component", type: i3.FooterComponent, selector: "[app-footer], app-footer, lib-footer" }, { kind: "component", type: SelecaoEstabelecimentosModalComponent, selector: "selecao-estabelecimentos-modal", outputs: ["onClose", "onSelected"] }, { kind: "component", type: VersoesModalComponent, selector: "versoes-modal", outputs: ["onClose"] }, { kind: "component", type: NotifSubmenuComponent, selector: "app-notif-submenu" }, { kind: "component", type: DynamicMenuComponent, selector: "app-dynamic-menu", inputs: ["submenuRef", "recebeParam", "titleSubmenu", "submenuList", "hostServerOutSystems"], outputs: ["selectTemplate"] }, { kind: "component", type: PrimaryDropdownComponent, selector: "app-primary-dropdown", inputs: ["buttonWasClicked"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i17.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i17.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i17.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i17.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
3802
3775
|
}
|
|
3803
3776
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: MenuLateralComponent, decorators: [{
|
|
3804
3777
|
type: Component,
|
|
@@ -3816,7 +3789,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
3816
3789
|
RouterOutlet,
|
|
3817
3790
|
NgIf,
|
|
3818
3791
|
NgClass
|
|
3819
|
-
], template: "<!-- #region MAIN CONTENT -->\n<div id=\"menu\" class=\"main col-12\">\n\n <div style=\"height: 100vh; z-index: 3;\" class=\"sidebar-control position-relative d-flex flex-row\" #menuContainer\n (clickOutside)=\"closeMenu == true ? onClickedOutside($event, submenu_ref) : closeMenu = true\">\n <div class=\"sidebar {{_customMenuService.themeColor}} closed\" [ngClass]=\"{'closed-mobile': isMobile && !isMenuOpened}\" #sidebar>\n <div class=\"menu-header\">\n <ul>\n <li class=\"mb-3\">\n <div class=\"logo-hamburguer\">\n <img src=\"assets/icons/logotipo-sispro.svg\" alt=\"logo-sispro\" class=\"logo-sispro\" title=\"logo\" width=\"136px\" height=\"48px\">\n <button class=\"button-hamburguer\" (click)=\"isMenuOpened = !isMenuOpened; openExpansibleMenu(sidebar);\">\n <img src=\"assets/icons/menu.svg\" alt=\"menu hamburguer\">\n </button>\n </div>\n </li>\n\n <!-- #region M\u00D3DULOS -->\n <li class=\"mb-3\" style=\"margin-left: 8px; margin-right: 8px\">\n <div class=\"btn-group\">\n <button (click)=\"dropdownWasOpened(true)\" type=\"button\" class=\"dropdown-button\" data-bs-toggle=\"dropdown\"\n aria-expanded=\"false\" data-bs-auto-close=\"outside\">\n <ng-container>\n <lib-icon iconColor=\"white\" [iconName]=\"_customMenuService.moduleSvg\" />\n <span class=\"ps-2\"> {{ this._customMenuService.moduleName }} <lib-icon iconName=\"seta-direita\" iconColor=\"white\" /> </span>\n </ng-container>\n </button>\n <ul class=\"dropdown-menu\" #dropdown_ref>\n <app-primary-dropdown [buttonWasClicked]=\"messageIfClicked\"></app-primary-dropdown>\n </ul>\n </div>\n </li>\n <!-- #endregion M\u00D3DULOS -->\n\n <!-- #region ESTABELECIMENTOS -->\n <li class=\"mx-3\" style=\"margin-bottom: 16px;\">\n <div class=\"icon-estabelecimento\">\n <button class=\"row justify-content-between bg-transparent border-0\"\n (click)=\"openModalEstabelecimento(modalEstabelecimento)\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : nomeEstabelecimento\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"predio\" iconColor=\"white\" />\n <span *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-9 ps-2 glb-text-width-160 text-start text-truncate\"> {{ nomeEstabelecimento }} </span>\n <lib-icon *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-1\" iconName=\"seta-direita\" iconColor=\"white\" />\n </button>\n </div>\n </li>\n <!-- #endregion ESTABELECIMENTOS -->\n\n\n <!-- #region PESQUISA -->\n @if (_customMenuService.menuDynamic) {\n <li class=\"mx-3 mb-3\">\n <div class=\"icon-pesquisa\">\n <button class=\"d-flex align-items-center justify-content-start gap-2 bg-transparent border-0\" (click)=\"_pesquisaTelas.show()\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : 'Pesquisar telas'\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"lupa\" iconColor=\"white\" />\n @if (!sidebar.classList.contains('closed')) { <span class=\"col ps-2 text-start text-truncate\"> Pesquisar telas </span> }\n </button>\n </div>\n </li>\n }\n <!-- #endregion PESQUISA -->\n\n </ul>\n\n </div>\n\n <!-- #region MENUS DE NAVEGA\u00C7\u00C3O -->\n <div class=\"main-menu\">\n <div class=\"scroll\">\n <div class=\"list-menu px-2 pb-1\">\n\n <!-- #region MENU DIN\u00C2MICO -->\n <div class=\"dynamic-menu\">\n <ul #dynamic_menu_items *ngIf=\"_customMenuService.menuItems; else isLoading\">\n\n <li *ngFor=\"let menuItem of _customMenuService.menuItems; let i = index\"\n class=\"p-1 rounded\"\n (click)=\"openSubmenu(menuItem, submenu_ref, dynamic_menu)\"\n [class.selectedItem]=\"menuItem.isSelected\">\n\n <a *ngIf=\"!menuItem.isExternal && !menuItem.isOutroModulo; else externalMenu\"\n [routerLink]=\"menuItem.route != '' ? menuItem.route : null\"\n [id]=\"'item' + menuItem.id\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\"\n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\"\n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImg\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImg>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\"\n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n\n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(menuItem.route,menuItem.isOutroModulo)\"\n target=\"_blank\"\n [id]=\"'item' + menuItem.id\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\"\n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\"\n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImgExternal\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImgExternal>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\"\n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n </ng-template>\n </li>\n\n </ul>\n </div>\n\n <ng-template #isLoading>\n <li class=\"spinner-border spinner-border-sm mt-2\" role=\"status\" aria-hidden=\"true\"></li>\n </ng-template>\n <!-- #endregion MENU DIN\u00C2MICO -->\n\n </div>\n </div>\n </div>\n <!-- #endregion MENUS DE NAVEGA\u00C7\u00C3O -->\n\n <!-- #region FOOTER -->\n <div class=\"footer-menu glb-cursor-pointer\" (mouseenter)=\"showBalloon = true\" (mouseleave)=\"showBalloon = false\"\n [popover]=\"popoverContent\" placement=\"right bottom\" [outsideClick]=\"true\" containerClass=\"width: 200px\" >\n <div class=\"footer-components d-flex flex-row align-items-center gap-2 py-2 px-1 justify-content-center gap-2\" [class.open]=\"showBalloon\">\n @if (footerUserImgSrc) {\n <img class=\"photo-profile\" [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n }\n @else {\n <lib-icon iconName=\"contraparte\" iconColor=\"white\"/>\n }\n\n <span class=\"text-truncate fw-bold text-start\" style=\"max-width: 100%;\"> {{ footerUserName }} </span>\n </div>\n </div>\n\n <ng-template #popoverContent>\n <div class=\"footer-menu\" style=\"width: 1000px;\">\n <div class=\"d-flex align-items-center\">\n <img *ngIf=\"footerUserImgSrc; else noUserImg\" class=\"photo-profile\"\n [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n <ng-template #noUserImg>\n <lib-icon iconName=\"contraparte\" iconColor=\"currentColor\"/>\n </ng-template>\n <div class=\"d-flex flex-column ms-1\">\n <div [tooltip]=\"footerUserName\" class=\"dynamic-container\" style=\"white-space: nowrap; flex-grow: 1;max-width: 200px; font-size: 16px;\">{{footerUserName}}</div>\n <div [tooltip]=\"footerUserEmail\" class=\"dynamic-container\" style=\"white-space: nowrap; font-size: 12px; flex-grow: 1;max-width: 200px;\">{{footerUserEmail}}</div>\n </div>\n </div>\n </div>\n <hr class=\"mb-2 mt-2\">\n <div routerLink=\"meu-perfil\" style=\"cursor: pointer;\" (click)=\"togglePopover(); $event.stopPropagation()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"contraparte\"/> Meu Perfil\n </div>\n \n <div class=\"mt-2\" style=\"cursor: pointer;\" (click)=\"openModalVersion(modalVersion)\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"info\"/> Vers\u00E3o\n </div>\n\n <div class=\"mt-2\" style=\"cursor: pointer;\" (click)=\"deleteIDB()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"lixeira\"/> Limpar filtros salvos\n </div>\n\n <div class=\"mt-2\" (click)=\"logout()\" style=\"cursor: pointer;\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"logout\"/> Sair\n </div>\n </ng-template>\n <!-- #endregion FOOTER -->\n\n </div>\n\n <div class=\"submenu\" #submenu_ref>\n <ng-template [ngIf]=\"desiredContent !== null\">\n <ng-content *ngTemplateOutlet=\"desiredContent!; context: {$implicit: submenuList}\"></ng-content>\n </ng-template>\n </div>\n </div>\n\n <div class=\"main-content col d-flex flex-column align-content-between\" id=\"body-content\">\n <div class=\"content\" style=\"position: relative;\">\n <router-outlet></router-outlet>\n </div>\n <div app-footer></div>\n </div>\n\n</div>\n<!-- #endregion MAIN CONTENT -->\n\n<!-- #region TEMPLATES -->\n<ng-template #dynamic_menu let-data>\n <app-dynamic-menu\n [submenuList]=\"data\"\n [titleSubmenu]=\"titleSubmenu\" [submenuRef]=\"submenu_ref\" [recebeParam]=\"onClickedOutside.bind(this)\"\n [hostServerOutSystems]=\"HostServerOutSystems\">\n </app-dynamic-menu>\n</ng-template>\n\n<ng-template #notif_menu>\n <app-notif-submenu></app-notif-submenu>\n</ng-template>\n\n<!-- #region MODAL SELECAO ESTABELECIMENTO -->\n<ng-template #modalEstabelecimento>\n <selecao-estabelecimentos-modal (onClose)=\"closeModalEstabelecimento()\"\n (onSelected)=\"closeModalEstabelecimento(); updateLastLogEstabelecimento($event);\">\n </selecao-estabelecimentos-modal>\n</ng-template>\n<!-- #endregion MODAL SELECAO ESTABELECIMENTO -->\n\n<!-- #region MODAL VERSION -->\n<ng-template #modalVersion>\n <versoes-modal (onClose)=\"closeModalVersion()\" />\n</ng-template>\n<!-- #endregion MODAL VERSION -->\n\n<!-- #endregion TEMPLATES -->\n", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;font-size:14px}span{color:#fff}ul{list-style:none;padding-left:0;white-space:nowrap}#menu.main{display:flex;width:100%;height:100%;background:#eee}::-webkit-scrollbar{width:8px;background:transparent}::-webkit-scrollbar-thumb{background:#bbb;border-radius:16px}.main-content{width:100%;z-index:0;overflow-y:auto;overflow:overlay;height:100vh}.main-content .content{padding:0 16px 16px;background-color:#eee!important}.disable-scroll{overflow-y:hidden}.dropdown-button{padding:8px;border-radius:8px;background-color:#3265ee;border:none;font-size:14px;font-weight:700;width:100%;display:flex}.dropdown-button span{width:100%;display:flex;justify-content:space-between}.dropdown-menu{width:300px;border-radius:8px}.dropdown-menu li{margin:16px 8px}.dropdown-menu li a{font-size:14px}.dropdown-menu li a:hover{font-weight:700;background-color:transparent}.dropdown-menu .dropdown-divider{height:0}.link-portal{color:#213b70;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}.container{display:flex;width:max-content}.sidebar{display:flex;flex-direction:column;height:100%;grid-template-rows:min-content;box-sizing:border-box;transition:width .5s;background-color:#213b70;max-width:inherit}.sidebar .footer-menu{justify-content:flex-end}.menu-header{display:flex;flex-direction:column;white-space:nowrap;padding:32px 0 0;background-color:#213b70}.menu-header ul li{margin-left:16px;margin-right:16px}.menu-header ul>li:last-child{border-bottom:1px solid #3265ee;padding-bottom:15px;height:auto}.dropdown{margin:0}.btn-group{width:100%}.sidebar.closed .menu-header ul li{margin-left:0;margin-right:0}.sidebar.closed .menu-header{display:flex;flex-direction:column;align-items:center}.icon-estabelecimento button,.icon-pesquisa button{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:center}.icon-estabelecimento button span:hover,.icon-pesquisa button span:hover{font-weight:700}.header-content{display:flex;flex-direction:column;justify-content:space-evenly;height:100%;margin:0 20px}.logo-hamburguer{display:flex;justify-content:space-between;margin-right:8px}.logo-hamburguer .button-hamburguer{border:none;background-color:transparent}.sidebar.closed .logo-hamburguer{justify-content:center;margin-right:0}.scroll{overflow-y:auto;overflow-x:hidden;min-height:20%;margin-right:2px}.list-menu{padding-left:16px;padding-right:8px;display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.list-menu .text-closed{padding-top:15px;display:none;color:#fff}.list-menu .text-opened{color:#fff;font-size:12px;padding-top:15px;visibility:visible;white-space:nowrap}.list-menu .li-main{padding:10px 7px;border-radius:8px}.list-menu .onSelect{background-color:#3265ee}.list-menu div.static-menu>ul>li:first-child{margin-top:16px}.list-menu .span-main{font-size:14px;margin-left:8px;opacity:1;pointer-events:auto;white-space:break-spaces}.list-menu .span-main:hover,.list-menu .list-options span:hover{font-weight:700}.list-menu p{font-size:10px;font-weight:700;text-transform:uppercase;border-bottom:1px solid #3265ee;visibility:hidden}.selectedItem{background-color:#3265ee}.selectedItem span{font-weight:700;background-color:transparent}.notif{padding:2px 13px;margin-bottom:none;background-color:#000;border-radius:8px;font-weight:700}.sidebar.closed .chevron{display:none}.sidebar.closed .icon-estabelecimento,.sidebar.closed .icon-pesquisa{margin:0}.sidebar.closed .icon-estabelecimento button,.sidebar.closed .icon-pesquisa button{justify-content:center}.sidebar.closed .icon-estabelecimento button img,.sidebar.closed .icon-pesquisa button img{margin:0}.align-chevron{width:100%;text-align:justify;align-items:center;display:flex;justify-content:space-between}.selected-color{background-color:#3265ee}.main-menu{display:flex;flex-direction:column;justify-content:space-between;height:100%;min-height:20%}.button-icons{border:none;background-color:transparent}.footer-menu{display:flex;flex-direction:column}.footer-menu .footer-components{border-top:1px solid #3265ee}.footer-menu .footer-components .button-closed{display:none}.footer-menu button{border:none;background-color:transparent;border-radius:8px}.footer-menu .points{padding:4px 0;margin:4px 0;border-radius:8px}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.footer-menu .open-user{background-color:#3265ee}.submenu{width:341px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden;box-shadow:0 4px 8px #0000004d}.submenu ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}.submenu ul li{font-size:20px;font-weight:600;line-height:22px;padding-bottom:18px}.submenu .itens-list{display:flex;justify-content:space-between;align-items:center}.submenu .itens-list .favoritos,.submenu .itens-list span{cursor:pointer}.submenu .footer-menu{display:flex;flex-direction:row;justify-content:center;overflow:hidden}.submenu .footer-menu .footer-components{border-top:1px solid #3265ee;white-space:nowrap}.submenu .footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.submenu .footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu .footer-components{display:flex;justify-content:center;align-items:center}.submenu button{position:relative;left:10%;border:none;background-color:transparent}.submenu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0;box-shadow:0 4px 8px #0000004d}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.search-bar{max-width:368px;height:38px;margin-top:24px;border:1px solid #ced4da;box-sizing:border-box;border-radius:8px}.opened-notif-sub{min-width:452px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden}.sidebar.closed{max-width:73px;transition:.5s}.sidebar.closed span{display:none}.closed-mobile{width:42px}.opened-mobile{width:80vw}.sidebar.closed span{white-space:nowrap;overflow:hidden}.sidebar.closed .logo-sispro{display:none}.sidebar.closed .list-menu{padding:0;margin-left:0;margin-right:0;display:flex;flex-direction:column;align-items:center}.sidebar.closed .list-menu span{opacity:0;pointer-events:none}.sidebar.closed .list-menu .text-closed{padding-bottom:11px;visibility:visible;display:block}.sidebar.closed .list-menu .text-opened{display:none;font-size:8px}.sidebar.closed .list-menu .chevron,.sidebar.closed .favoritos,.sidebar.closed .footer-components .button-opened{display:none}.sidebar.closed .footer-components .button-closed{display:block}.sidebar.closed .button-icons{border:none;background-color:transparent}.sidebar.closed .footer-components{display:flex;align-items:center}.sidebar.closed button{border:none;background-color:transparent;display:block}.sidebar.closed .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.sidebar-control{height:100vh;max-width:227.667px}.sidebar-control .main-content.closed{margin-left:0}.glb-text-width-120{max-width:120px}.profile-picture{display:inline-block;position:relative;width:100px;height:100px;border-radius:50%;overflow:hidden}.profile-picture img{width:100%;height:100%;object-fit:cover;border-radius:50%;clip-path:circle(50% at 50% 50%)}.image-div{width:50px;min-width:50px;height:50px;border-radius:100%;position:relative;overflow:hidden;z-index:1}.image-div #photoUser{width:146px;height:146px;top:-1px;left:-1px;object-fit:cover;position:relative;z-index:1;border:none;border-color:transparent}.dynamic-container{display:inline-block;white-space:nowrap;overflow:hidden}.custom-popover{width:1000px}\n"] }]
|
|
3792
|
+
], template: "<!-- #region MAIN CONTENT -->\n<div id=\"menu\" class=\"main col-12\">\n\n <div style=\"height: 100vh; z-index: 3;\" class=\"sidebar-control position-relative d-flex flex-row\" #menuContainer\n (clickOutside)=\"closeMenu == true ? onClickedOutside($event, submenu_ref) : closeMenu = true\">\n <div class=\"sidebar {{_customMenuService.themeColor}} closed\" [ngClass]=\"{'closed-mobile': isMobile && !isMenuOpened}\" #sidebar>\n <div class=\"menu-header\">\n <ul>\n <li class=\"mb-3\">\n <div class=\"logo-hamburguer\">\n <img src=\"assets/icons/logotipo-sispro.svg\" alt=\"logo-sispro\" class=\"logo-sispro\" title=\"logo\" width=\"136px\" height=\"48px\">\n <button class=\"button-hamburguer\" (click)=\"isMenuOpened = !isMenuOpened; openExpansibleMenu(sidebar);\">\n <img src=\"assets/icons/menu.svg\" alt=\"menu hamburguer\">\n </button>\n </div>\n </li>\n\n <!-- #region M\u00D3DULOS -->\n <li class=\"mb-3\" style=\"margin-left: 8px; margin-right: 8px\">\n <div class=\"btn-group\">\n <button (click)=\"dropdownWasOpened(true)\" type=\"button\" class=\"dropdown-button\" data-bs-toggle=\"dropdown\"\n aria-expanded=\"false\" data-bs-auto-close=\"outside\">\n <ng-container>\n <lib-icon iconColor=\"white\" [iconName]=\"_customMenuService.moduleSvg\" />\n <span class=\"ps-2\"> {{ this._customMenuService.moduleName }} <lib-icon iconName=\"seta-direita\" iconColor=\"white\" /> </span>\n </ng-container>\n </button>\n <ul class=\"dropdown-menu\" #dropdown_ref>\n <app-primary-dropdown [buttonWasClicked]=\"messageIfClicked\"></app-primary-dropdown>\n </ul>\n </div>\n </li>\n <!-- #endregion M\u00D3DULOS -->\n\n <!-- #region ESTABELECIMENTOS -->\n <li class=\"mx-3\" style=\"margin-bottom: 16px;\">\n <div class=\"icon-estabelecimento\">\n <button class=\"row justify-content-between bg-transparent border-0\"\n (click)=\"openModalEstabelecimento(modalEstabelecimento)\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : nomeEstabelecimento\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"predio\" iconColor=\"white\" />\n <span *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-9 ps-2 glb-text-width-160 text-start text-truncate\"> {{ nomeEstabelecimento }} </span>\n <lib-icon *ngIf=\"!sidebar.classList.contains('closed')\" class=\"col-1\" iconName=\"seta-direita\" iconColor=\"white\" />\n </button>\n </div>\n </li>\n <!-- #endregion ESTABELECIMENTOS -->\n\n\n <!-- #region PESQUISA -->\n @if (_customMenuService.menuDynamic) {\n <li class=\"mx-3 mb-3\">\n <div class=\"icon-pesquisa\">\n <button class=\"d-flex align-items-center justify-content-start gap-2 bg-transparent border-0\" (click)=\"_pesquisaTelas.show()\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : 'Pesquisar telas'\" placement=\"right\">\n\n <lib-icon class=\"col-1\" iconName=\"lupa\" iconColor=\"white\" />\n @if (!sidebar.classList.contains('closed')) { <span class=\"col ps-2 text-start text-truncate\"> Pesquisar telas </span> }\n </button>\n </div>\n </li>\n }\n <!-- #endregion PESQUISA -->\n\n </ul>\n\n </div>\n\n <!-- #region MENUS DE NAVEGA\u00C7\u00C3O -->\n <div class=\"main-menu\">\n <div class=\"scroll\">\n <div class=\"list-menu px-2 pb-1\">\n\n <!-- #region MENU DIN\u00C2MICO -->\n <div class=\"dynamic-menu\">\n <ul #dynamic_menu_items *ngIf=\"_customMenuService.menuItems; else isLoading\">\n\n <li *ngFor=\"let menuItem of _customMenuService.menuItems; let i = index\"\n class=\"p-1 rounded\"\n (click)=\"openSubmenu(menuItem, submenu_ref, dynamic_menu)\"\n [class.selectedItem]=\"menuItem.isSelected\">\n\n <a *ngIf=\"!menuItem.isExternal && !menuItem.isOutroModulo; else externalMenu\"\n [routerLink]=\"menuItem.route != '' ? menuItem.route : null\"\n [id]=\"'item' + menuItem.id\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" [title]=\"menuItem.label\"\n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\"\n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImg\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImg>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\"\n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n\n <ng-template #externalMenu>\n <a [href]=\"getExternalUrl(menuItem.route,menuItem.isOutroModulo)\"\n target=\"_blank\"\n [id]=\"'item' + menuItem.id\"\n [tooltip]=\"!sidebar.classList.contains('closed') ? '' : menuItem.label\" [title]=\"menuItem.label\"\n placement=\"left\" class=\"w-100 d-flex align-items-center button-icons text-decoration-none p-1 glb-cursor-pointer\"\n [class]=\"sidebar.classList.contains('closed') ? 'justify-content-center' : 'justify-content-between'\">\n\n <div class=\"container\">\n <lib-icon *ngIf=\"!menuItem.icon.includes('assets/icons'); else iconImgExternal\" [iconName]=\"menuItem.icon\" iconColor=\"white\"/>\n <span class=\"span-main\">{{ menuItem.label }}</span>\n <ng-template #iconImgExternal>\n <img [src]=\"menuItem.icon\" [alt]=\"'icone: ' + menuItem.label\">\n </ng-template>\n </div>\n <lib-icon *ngIf=\"(menuItem.children && menuItem.children.length > 0) && !sidebar.classList.contains('closed')\"\n iconName=\"seta-direita\" iconColor=\"white\"/>\n </a>\n </ng-template>\n </li>\n\n </ul>\n </div>\n\n <ng-template #isLoading>\n <li class=\"spinner-border spinner-border-sm mt-2\" role=\"status\" aria-hidden=\"true\"></li>\n </ng-template>\n <!-- #endregion MENU DIN\u00C2MICO -->\n\n </div>\n </div>\n </div>\n <!-- #endregion MENUS DE NAVEGA\u00C7\u00C3O -->\n\n <!-- #region FOOTER -->\n <div class=\"footer-menu glb-cursor-pointer\" (mouseenter)=\"showBalloon = true\" (mouseleave)=\"showBalloon = false\"\n [popover]=\"popoverContent\" placement=\"right bottom\" [outsideClick]=\"true\" containerClass=\"width: 200px\" >\n <div class=\"footer-components d-flex flex-row align-items-center gap-2 py-2 px-1 justify-content-center gap-2\" [class.open]=\"showBalloon\">\n @if (footerUserImgSrc) {\n <img class=\"photo-profile\" [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n }\n @else {\n <lib-icon iconName=\"contraparte\" iconColor=\"white\"/>\n }\n\n <span class=\"text-truncate fw-bold text-start\" style=\"max-width: 100%;\"> {{ footerUserName }} </span>\n </div>\n </div>\n\n <ng-template #popoverContent>\n <div class=\"footer-menu\" style=\"width: 1000px;\">\n <div class=\"d-flex align-items-center\">\n <img *ngIf=\"footerUserImgSrc; else noUserImg\" class=\"photo-profile\"\n [src]=\"['data:image/jpeg;base64,' + footerUserImgSrc]\" alt=\"foto-perfil\">\n <ng-template #noUserImg>\n <lib-icon iconName=\"contraparte\" iconColor=\"currentColor\"/>\n </ng-template>\n <div class=\"d-flex flex-column ms-1\">\n <div [tooltip]=\"footerUserName\" class=\"dynamic-container\" style=\"white-space: nowrap; flex-grow: 1;max-width: 200px; font-size: 16px;\">{{footerUserName}}</div>\n <div [tooltip]=\"footerUserEmail\" class=\"dynamic-container\" style=\"white-space: nowrap; font-size: 12px; flex-grow: 1;max-width: 200px;\">{{footerUserEmail}}</div>\n </div>\n </div>\n </div>\n <hr class=\"mb-2 mt-2\">\n <div routerLink=\"meu-perfil\" style=\"cursor: pointer;\" (click)=\"togglePopover(); $event.stopPropagation()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"contraparte\"/> Meu Perfil\n </div>\n \n <div class=\"mt-2\" style=\"cursor: pointer;\" (click)=\"openModalVersion(modalVersion)\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"info\"/> Vers\u00E3o\n </div>\n\n <div class=\"mt-2\" style=\"cursor: pointer;\" (click)=\"deleteIDB()\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"lixeira\"/> Limpar filtros salvos\n </div>\n\n <div class=\"mt-2\" (click)=\"logout()\" style=\"cursor: pointer;\">\n <lib-icon [iconSize]=\"'small'\" iconName=\"logout\"/> Sair\n </div>\n </ng-template>\n <!-- #endregion FOOTER -->\n\n </div>\n\n <div class=\"submenu\" #submenu_ref>\n <ng-template [ngIf]=\"desiredContent !== null\">\n <ng-content *ngTemplateOutlet=\"desiredContent!; context: {$implicit: submenuList}\"></ng-content>\n </ng-template>\n </div>\n </div>\n\n <div class=\"main-content col d-flex flex-column align-content-between\" id=\"body-content\">\n <div class=\"content\" style=\"position: relative;\">\n <router-outlet></router-outlet>\n </div>\n <div app-footer></div>\n </div>\n\n</div>\n<!-- #endregion MAIN CONTENT -->\n\n<!-- #region TEMPLATES -->\n<ng-template #dynamic_menu let-data>\n <app-dynamic-menu\n [submenuList]=\"data\"\n [titleSubmenu]=\"titleSubmenu\" [submenuRef]=\"submenu_ref\" [recebeParam]=\"onClickedOutside.bind(this)\"\n [hostServerOutSystems]=\"HostServerOutSystems\">\n </app-dynamic-menu>\n</ng-template>\n\n<ng-template #notif_menu>\n <app-notif-submenu></app-notif-submenu>\n</ng-template>\n\n<!-- #region MODAL SELECAO ESTABELECIMENTO -->\n<ng-template #modalEstabelecimento>\n <selecao-estabelecimentos-modal (onClose)=\"closeModalEstabelecimento()\"\n (onSelected)=\"closeModalEstabelecimento(); updateLastLogEstabelecimento($event);\">\n </selecao-estabelecimentos-modal>\n</ng-template>\n<!-- #endregion MODAL SELECAO ESTABELECIMENTO -->\n\n<!-- #region MODAL VERSION -->\n<ng-template #modalVersion>\n <versoes-modal (onClose)=\"closeModalVersion()\" />\n</ng-template>\n<!-- #endregion MODAL VERSION -->\n\n<!-- #endregion TEMPLATES -->\n", styles: ["*{padding:0;margin:0;font-family:Open sans,Arial,Helvetica,sans-serif;font-size:14px}span{color:#fff}ul{list-style:none;padding-left:0;white-space:nowrap}#menu.main{display:flex;width:100%;height:100%;background:#eee}::-webkit-scrollbar{width:8px;background:transparent}::-webkit-scrollbar-thumb{background:#bbb;border-radius:16px}.main-content{width:100%;z-index:0;overflow-y:auto;overflow:overlay;height:100vh}.main-content .content{padding:0 16px 16px;background-color:#eee!important}.disable-scroll{overflow-y:hidden}.dropdown-button{padding:8px;border-radius:8px;background-color:#3265ee;border:none;font-size:14px;font-weight:700;width:100%;display:flex}.dropdown-button span{width:100%;display:flex;justify-content:space-between}.dropdown-menu{width:300px;border-radius:8px}.dropdown-menu li{margin:16px 8px}.dropdown-menu li a{font-size:14px}.dropdown-menu li a:hover{font-weight:700;background-color:transparent}.dropdown-menu .dropdown-divider{height:0}.link-portal{color:#213b70;text-decoration:underline;text-align:center;font-weight:700;font-size:14px}.container{display:flex;width:max-content}.sidebar{display:flex;flex-direction:column;height:100%;grid-template-rows:min-content;box-sizing:border-box;transition:width .5s;background-color:#213b70;max-width:inherit}.sidebar .footer-menu{justify-content:flex-end}.menu-header{display:flex;flex-direction:column;white-space:nowrap;padding:32px 0 0;background-color:#213b70}.menu-header ul li{margin-left:16px;margin-right:16px}.menu-header ul>li:last-child{border-bottom:1px solid #3265ee;padding-bottom:15px;height:auto}.dropdown{margin:0}.btn-group{width:100%}.sidebar.closed .menu-header ul li{margin-left:0;margin-right:0}.sidebar.closed .menu-header{display:flex;flex-direction:column;align-items:center}.icon-estabelecimento button,.icon-pesquisa button{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:center}.icon-estabelecimento button span:hover,.icon-pesquisa button span:hover{font-weight:700}.header-content{display:flex;flex-direction:column;justify-content:space-evenly;height:100%;margin:0 20px}.logo-hamburguer{display:flex;justify-content:space-between;margin-right:8px}.logo-hamburguer .button-hamburguer{border:none;background-color:transparent}.sidebar.closed .logo-hamburguer{justify-content:center;margin-right:0}.scroll{overflow-y:auto;overflow-x:hidden;min-height:20%;margin-right:2px}.list-menu{padding-left:16px;padding-right:8px;display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.list-menu .text-closed{padding-top:15px;display:none;color:#fff}.list-menu .text-opened{color:#fff;font-size:12px;padding-top:15px;visibility:visible;white-space:nowrap}.list-menu .li-main{padding:10px 7px;border-radius:8px}.list-menu .onSelect{background-color:#3265ee}.list-menu div.static-menu>ul>li:first-child{margin-top:16px}.list-menu .span-main{font-size:14px;margin-left:8px;opacity:1;pointer-events:auto;white-space:break-spaces}.list-menu .span-main:hover,.list-menu .list-options span:hover{font-weight:700}.list-menu p{font-size:10px;font-weight:700;text-transform:uppercase;border-bottom:1px solid #3265ee;visibility:hidden}.selectedItem{background-color:#3265ee}.selectedItem span{font-weight:700;background-color:transparent}.notif{padding:2px 13px;margin-bottom:none;background-color:#000;border-radius:8px;font-weight:700}.sidebar.closed .chevron{display:none}.sidebar.closed .icon-estabelecimento,.sidebar.closed .icon-pesquisa{margin:0}.sidebar.closed .icon-estabelecimento button,.sidebar.closed .icon-pesquisa button{justify-content:center}.sidebar.closed .icon-estabelecimento button img,.sidebar.closed .icon-pesquisa button img{margin:0}.align-chevron{width:100%;text-align:justify;align-items:center;display:flex;justify-content:space-between}.selected-color{background-color:#3265ee}.main-menu{display:flex;flex-direction:column;justify-content:space-between;height:100%;min-height:20%}.button-icons{border:none;background-color:transparent}.footer-menu{display:flex;flex-direction:column}.footer-menu .footer-components{border-top:1px solid #3265ee}.footer-menu .footer-components .button-closed{display:none}.footer-menu button{border:none;background-color:transparent;border-radius:8px}.footer-menu .points{padding:4px 0;margin:4px 0;border-radius:8px}.footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.footer-menu .open-user{background-color:#3265ee}.submenu{width:341px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden;box-shadow:0 4px 8px #0000004d}.submenu ul{display:flex;flex-direction:column;margin:25px 26px 0 24px}.submenu ul li{font-size:20px;font-weight:600;line-height:22px;padding-bottom:18px}.submenu .itens-list{display:flex;justify-content:space-between;align-items:center}.submenu .itens-list .favoritos,.submenu .itens-list span{cursor:pointer}.submenu .footer-menu{display:flex;flex-direction:row;justify-content:center;overflow:hidden}.submenu .footer-menu .footer-components{border-top:1px solid #3265ee;white-space:nowrap}.submenu .footer-menu button{position:relative;left:35%;border:none;background-color:transparent}.submenu .footer-menu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu .footer-components{display:flex;justify-content:center;align-items:center}.submenu button{position:relative;left:10%;border:none;background-color:transparent}.submenu .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.submenu.opened-sub{z-index:1;display:flex;position:absolute;left:100%;height:100vh;justify-content:space-between}.submenu-footer{display:flex;flex-direction:row;justify-content:center;align-content:center;margin-bottom:14px;border-top:1px solid #2847a0;box-shadow:0 4px 8px #0000004d}.submenu-footer .subfooter-components{padding-top:16px}.submenu-footer span{font-weight:700;padding-left:10px}.search-bar{max-width:368px;height:38px;margin-top:24px;border:1px solid #ced4da;box-sizing:border-box;border-radius:8px}.opened-notif-sub{min-width:452px;display:none;background-color:#3265ee;box-sizing:border-box;flex-direction:column;overflow:hidden}.sidebar.closed{max-width:73px;transition:.5s}.sidebar.closed span{display:none}.closed-mobile{width:42px}.opened-mobile{width:80vw}.sidebar.closed span{white-space:nowrap;overflow:hidden}.sidebar.closed .logo-sispro{display:none}.sidebar.closed .list-menu{padding:0;margin-left:0;margin-right:0;display:flex;flex-direction:column;align-items:center}.sidebar.closed .list-menu span{opacity:0;pointer-events:none}.sidebar.closed .list-menu .text-closed{padding-bottom:11px;visibility:visible;display:block}.sidebar.closed .list-menu .text-opened{display:none;font-size:8px}.sidebar.closed .list-menu .chevron,.sidebar.closed .favoritos,.sidebar.closed .footer-components .button-opened{display:none}.sidebar.closed .footer-components .button-closed{display:block}.sidebar.closed .button-icons{border:none;background-color:transparent}.sidebar.closed .footer-components{display:flex;align-items:center}.sidebar.closed button{border:none;background-color:transparent;display:block}.sidebar.closed .photo-profile{width:32px;height:32px;border-radius:50%;margin:0}.sidebar-control{height:100vh;max-width:227.667px}.sidebar-control .main-content.closed{margin-left:0}.glb-text-width-120{max-width:120px}.profile-picture{display:inline-block;position:relative;width:100px;height:100px;border-radius:50%;overflow:hidden}.profile-picture img{width:100%;height:100%;object-fit:cover;border-radius:50%;clip-path:circle(50% at 50% 50%)}.image-div{width:50px;min-width:50px;height:50px;border-radius:100%;position:relative;overflow:hidden;z-index:1}.image-div #photoUser{width:146px;height:146px;top:-1px;left:-1px;object-fit:cover;position:relative;z-index:1;border:none;border-color:transparent}.dynamic-container{display:inline-block;white-space:nowrap;overflow:hidden}.custom-popover{width:1000px}\n"] }]
|
|
3820
3793
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3821
3794
|
type: Inject,
|
|
3822
3795
|
args: [MSAL_GUARD_CONFIG]
|
|
@@ -4684,13 +4657,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
4684
4657
|
;
|
|
4685
4658
|
|
|
4686
4659
|
/**
|
|
4687
|
-
* Intercepta uma chamada HTTP para inserir o usuário logado
|
|
4660
|
+
* \brief Intercepta uma chamada HTTP para inserir o usuário logado no header em conjunto
|
|
4661
|
+
* com o login para uso da API.
|
|
4662
|
+
*
|
|
4688
4663
|
* Depende do serviço de autenticação.
|
|
4689
|
-
*/
|
|
4664
|
+
*/
|
|
4690
4665
|
class AuthAplicInterceptor {
|
|
4691
|
-
constructor(
|
|
4692
|
-
this.
|
|
4693
|
-
this.
|
|
4666
|
+
constructor(authCheckService, token, _customEnvironmentService) {
|
|
4667
|
+
this.authCheckService = authCheckService;
|
|
4668
|
+
this.token = token;
|
|
4694
4669
|
this._customEnvironmentService = _customEnvironmentService;
|
|
4695
4670
|
}
|
|
4696
4671
|
intercept(req, next) {
|
|
@@ -4699,16 +4674,12 @@ class AuthAplicInterceptor {
|
|
|
4699
4674
|
}
|
|
4700
4675
|
async handle(req, next) {
|
|
4701
4676
|
let changedReq = req;
|
|
4702
|
-
if (this.
|
|
4677
|
+
if (this.authCheckService.needsAuthRequest(req.url, req.method, this._customEnvironmentService.needsAuthAplic)) {
|
|
4703
4678
|
// Verifica se o Token precisa ser renovado
|
|
4704
|
-
await this.
|
|
4679
|
+
await this.token.renewToken();
|
|
4705
4680
|
// Adiciona as autenticações necessárias ao servidor.
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
changedReq = req.clone({
|
|
4709
|
-
headers: headers,
|
|
4710
|
-
withCredentials: true // Parâmetro necessário para utilização dos Cookies HttpOnly
|
|
4711
|
-
});
|
|
4681
|
+
let headers = req.headers.set('Authorization', `Bearer ${this.token.authToken}`);
|
|
4682
|
+
changedReq = req.clone({ headers: headers });
|
|
4712
4683
|
}
|
|
4713
4684
|
return await lastValueFrom(next.handle(changedReq));
|
|
4714
4685
|
}
|
|
@@ -4720,27 +4691,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
4720
4691
|
args: [{ providedIn: 'root' }]
|
|
4721
4692
|
}], ctorParameters: () => [{ type: i3.CheckUrlAndMethodService }, { type: AuthStorageService }, { type: LibCustomEnvironmentService }] });
|
|
4722
4693
|
|
|
4723
|
-
/**
|
|
4694
|
+
/**
|
|
4695
|
+
* \brief Intercepta uma chamada HTTP para inserir a autenticação da Sispro.
|
|
4696
|
+
*/
|
|
4724
4697
|
class AuthInfraInterceptor {
|
|
4725
|
-
constructor(
|
|
4726
|
-
this.
|
|
4698
|
+
constructor(authCheckService, _customEnvironmentService) {
|
|
4699
|
+
this.authCheckService = authCheckService;
|
|
4727
4700
|
this._customEnvironmentService = _customEnvironmentService;
|
|
4728
4701
|
}
|
|
4729
4702
|
intercept(req, next) {
|
|
4730
4703
|
let changedReq = req;
|
|
4731
|
-
if (this.
|
|
4732
|
-
// Instanciado inicialmente com os headers da requisição original, para não perder nenhum header que já tenha sido adicionado
|
|
4733
|
-
let headers = req.headers;
|
|
4704
|
+
if (this.authCheckService.needsAuthRequest(req.url, req.method, this._customEnvironmentService.needsAuthInfra)) {
|
|
4734
4705
|
// Adiciona as autenticações necessárias ao servidor. Autenticação básica.
|
|
4735
|
-
|
|
4736
|
-
if (localStorage.getItem('configServerUser') && localStorage.getItem('configServerPassword')) {
|
|
4737
|
-
headers = req.headers.set("Authorization", `Basic ${btoa(`${localStorage.getItem('configServerUser')}:${localStorage.getItem('configServerPassword')}`)}
|
|
4706
|
+
let headers = req.headers.set("Authorization", `Basic ${btoa(`${localStorage.getItem('configServerUser')}:${localStorage.getItem('configServerPassword')}`)}
|
|
4738
4707
|
`);
|
|
4739
|
-
}
|
|
4740
|
-
changedReq = req.clone({
|
|
4741
|
-
headers: headers,
|
|
4742
|
-
withCredentials: true // Parâmetro necessário para utilização dos Cookies HttpOnly
|
|
4743
|
-
});
|
|
4708
|
+
changedReq = req.clone({ headers: headers });
|
|
4744
4709
|
}
|
|
4745
4710
|
return next.handle(changedReq);
|
|
4746
4711
|
}
|