ngx-sp-auth 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { importProvidersFrom, NgModule, Injectable, Inject, Component, EventEmitter, Output, Input, TemplateRef, ContentChild, ViewChild } from '@angular/core';
2
+ import { importProvidersFrom, NgModule, InjectionToken, Inject, Injectable, Component, EventEmitter, Output, Input, TemplateRef, ContentChild, ViewChild } from '@angular/core';
3
3
  import * as i1 from '@angular/common/http';
4
4
  import { HTTP_INTERCEPTORS, HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
5
5
  import * as i1$2 from '@azure/msal-angular';
@@ -118,95 +118,120 @@ var InfraIn2FaTypeId;
118
118
  InfraIn2FaTypeId[InfraIn2FaTypeId["Microsoft"] = 3] = "Microsoft";
119
119
  })(InfraIn2FaTypeId || (InfraIn2FaTypeId = {}));
120
120
 
121
+ // Token para o LibCustomEnvironmentService
122
+ const LIB_CUSTOM_ENVIRONMENT_SERVICE = new InjectionToken('LibCustomEnvironmentService');
123
+ // Token para o LibCustomStorageService
124
+ const LIB_CUSTOM_STORAGE_SERVICE = new InjectionToken('LibCustomStorageService');
125
+ // Token para o LibCustomLoginService
126
+ const LIB_CUSTOM_LOGIN_SERVICE = new InjectionToken('LibCustomLoginService');
127
+ // Token para o LibCustomMenuService
128
+ const LIB_CUSTOM_MENU_SERVICE = new InjectionToken('LibCustomMenuService');
129
+ // Token para o LibMenuConfigService
130
+ const LIB_MENU_CONFIG = new InjectionToken('LibMenuConfigService');
131
+
121
132
  class LibCustomStorageService {
122
- constructor() { }
123
- // #region Métodos recebidos do projeto
124
- storedStorageConstructor() { }
125
- ;
126
- storedStorageSaveLocalInstance() { }
127
- ;
128
- storedStorageLogout() { }
129
- storedStorageInitializeAutoStorage() { }
130
- ;
131
- // #endregion Métodos recebidos do projeto
133
+ constructor(_customStorageService) {
134
+ this._customStorageService = _customStorageService;
135
+ }
132
136
  // #region Métodos Customizadas para o Componente auth-storage.service.ts
133
137
  // Método executado no auth-storage.service.ts - método: constructor ()
134
138
  // Utilizado para inicializações diversas
135
139
  storageConstructor() {
136
- this.storedStorageConstructor();
140
+ this._customStorageService.storageConstructor();
137
141
  }
138
142
  // Método executado no auth-storage.service.ts - método: saveLocalInstance ()
139
143
  // Utilizado para salvar informações no localStorage
140
144
  storageSaveLocalInstance() {
141
- this.storedStorageSaveLocalInstance();
145
+ this._customStorageService.storageSaveLocalInstance();
142
146
  }
143
147
  // Método executado no auth-storage.service.ts - método: logout ()
144
148
  // Utilizado para inicializar informações no localStorage na logout da aplicação
145
149
  storageLogout() {
146
- this.storedStorageLogout();
150
+ this._customStorageService.storageLogout();
147
151
  }
148
152
  // Método executado no auth-storage.service.ts - método: reCheckLogin ()
149
153
  // Utilizado para inicializações diversas quando o Login exeutado via Pré Portal
150
154
  storageInitializeAutoStorage() {
151
- this.storedStorageInitializeAutoStorage();
152
- }
153
- // #endregion Métodos Customizadas para o Componente auth-storage.service.ts
154
- // #region Métodos Publicos
155
- InitializeCustomStorage(customStorageService) {
156
- //passando implementação dos métodos do projeto para a lib
157
- this.storedStorageConstructor = customStorageService.storageConstructor;
158
- this.storedStorageInitializeAutoStorage = customStorageService.storageInitializeAutoStorage;
159
- this.storedStorageLogout = customStorageService.storageLogout;
160
- this.storedStorageSaveLocalInstance = customStorageService.storageSaveLocalInstance;
161
- }
162
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
155
+ this._customStorageService.storageInitializeAutoStorage();
156
+ }
157
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomStorageService, deps: [{ token: LIB_CUSTOM_STORAGE_SERVICE }], target: i0.ɵɵFactoryTarget.Injectable }); }
163
158
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomStorageService, providedIn: 'root' }); }
164
159
  }
165
160
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomStorageService, decorators: [{
166
161
  type: Injectable,
167
162
  args: [{ providedIn: 'root' }]
168
- }], ctorParameters: () => [] });
163
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
164
+ type: Inject,
165
+ args: [LIB_CUSTOM_STORAGE_SERVICE]
166
+ }] }] });
169
167
 
170
168
  /**Service responsável por pegar as opções do menu do projeto em que está sendo utilizada*/
171
- class EnvironmentService {
172
- constructor() {
173
- this.production = false;
174
- this.hostName = "";
175
- this.product = "";
176
- this.Sp2LocalhostInfra2AuthWS = "";
177
- this.Sp2LocalhostInfra2LoginWS = "";
178
- this.Sp2Localhost = "";
179
- this.SpInfra2AuthWS = "";
180
- this.SpInfra2LoginWS = "";
181
- this.SpInfra2ErpWS = "";
182
- }
183
- ConfigurarEnvironments(properties) {
184
- //passando propriedades do produto para a lib
185
- this.production = properties.production;
186
- this.hostName = properties.hostName;
187
- this.product = properties.product;
188
- this.Sp2LocalhostInfra2AuthWS = properties.Sp2LocalhostInfra2AuthWS;
189
- this.Sp2LocalhostInfra2LoginWS = properties.Sp2LocalhostInfra2LoginWS;
190
- this.Sp2Localhost = properties.Sp2LocalhostWS;
191
- this.SpInfra2AuthWS = properties.SpInfra2AuthWS;
192
- this.SpInfra2LoginWS = properties.SpInfra2LoginWS;
193
- this.SpInfra2ErpWS = properties.SpInfra2ErpWS;
194
- this.needsAuthAplic = properties.needsAuthAplic;
195
- this.needsAuthInfra = properties.needsAuthInfra;
196
- }
197
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
198
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, providedIn: 'root' }); }
169
+ class LibCustomEnvironmentService {
170
+ constructor(_customEnvironmentService) {
171
+ this._customEnvironmentService = _customEnvironmentService;
172
+ }
173
+ // URLs que necessitam de autenticação da infra.
174
+ get needsAuthInfra() {
175
+ return this._customEnvironmentService.needsAuthInfra;
176
+ }
177
+ ;
178
+ // URLs que necessitam de autenticação do usuário para funcionar.
179
+ get needsAuthAplic() {
180
+ return this._customEnvironmentService.needsAuthAplic;
181
+ }
182
+ ;
183
+ get production() {
184
+ return this._customEnvironmentService.production;
185
+ }
186
+ ;
187
+ get hostName() {
188
+ return this._customEnvironmentService.hostName;
189
+ }
190
+ ;
191
+ get product() {
192
+ return this._customEnvironmentService.product;
193
+ }
194
+ ;
195
+ get Sp2LocalhostInfra2AuthWS() {
196
+ return this._customEnvironmentService.Sp2LocalhostInfra2AuthWS;
197
+ }
198
+ ;
199
+ get Sp2LocalhostInfra2LoginWS() {
200
+ return this._customEnvironmentService.Sp2LocalhostInfra2LoginWS;
201
+ }
202
+ ;
203
+ get Sp2LocalhostWS() {
204
+ return this._customEnvironmentService.Sp2LocalhostWS;
205
+ }
206
+ ;
207
+ get SpInfra2AuthWS() {
208
+ return this._customEnvironmentService.SpInfra2AuthWS;
209
+ }
210
+ ;
211
+ get SpInfra2LoginWS() {
212
+ return this._customEnvironmentService.SpInfra2LoginWS;
213
+ }
214
+ ;
215
+ get SpInfra2ErpWS() {
216
+ return this._customEnvironmentService.SpInfra2ErpWS;
217
+ }
218
+ ;
219
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomEnvironmentService, deps: [{ token: LIB_CUSTOM_ENVIRONMENT_SERVICE }], target: i0.ɵɵFactoryTarget.Injectable }); }
220
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomEnvironmentService, providedIn: 'root' }); }
199
221
  }
200
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EnvironmentService, decorators: [{
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomEnvironmentService, decorators: [{
201
223
  type: Injectable,
202
224
  args: [{ providedIn: 'root' }]
203
- }] });
225
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
226
+ type: Inject,
227
+ args: [LIB_CUSTOM_ENVIRONMENT_SERVICE]
228
+ }] }] });
204
229
 
205
230
  class AuthStorageService {
206
- constructor(_httpBackend, _customStorageService, _environmentService) {
231
+ constructor(_httpBackend, _customStorageService, _customEnvironmentService) {
207
232
  this._httpBackend = _httpBackend;
208
233
  this._customStorageService = _customStorageService;
209
- this._environmentService = _environmentService;
234
+ this._customEnvironmentService = _customEnvironmentService;
210
235
  this._BASE_URL = ''; // SpInfra2WS
211
236
  this.__local_key = 'user_auth_v6';
212
237
  // indica se objeto já está marcado para salvar os dados no local storage.
@@ -254,8 +279,8 @@ class AuthStorageService {
254
279
  // azureClientId
255
280
  this.__azureClientId = "";
256
281
  this._httpClient = new HttpClient(_httpBackend);
257
- this._BASE_URL = `${_environmentService.SpInfra2LoginWS}/LoginSisproERP`; // SpInfra2WS
258
- this._BASE_URL = !_environmentService.production ? this._BASE_URL : `${_environmentService.SpInfra2LoginWS}/LoginSisproERP`;
282
+ this._BASE_URL = `${_customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`; // SpInfra2WS
283
+ this._BASE_URL = !_customEnvironmentService.production ? this._BASE_URL : `${_customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`;
259
284
  // Método com customizações para inicializações da storage
260
285
  this._customStorageService.storageConstructor();
261
286
  const expectedLocalAuthStorage = localStorage.getItem(this.__local_key);
@@ -623,26 +648,45 @@ class AuthStorageService {
623
648
  return false;
624
649
  }
625
650
  }
626
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthStorageService, deps: [{ token: i1.HttpBackend }, { token: LibCustomStorageService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
651
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthStorageService, deps: [{ token: i1.HttpBackend }, { token: LibCustomStorageService }, { token: LibCustomEnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
627
652
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthStorageService, providedIn: 'root' }); }
628
653
  }
629
654
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthStorageService, decorators: [{
630
655
  type: Injectable,
631
656
  args: [{ providedIn: 'root' }]
632
- }], ctorParameters: () => [{ type: i1.HttpBackend }, { type: LibCustomStorageService }, { type: EnvironmentService }] });
657
+ }], ctorParameters: () => [{ type: i1.HttpBackend }, { type: LibCustomStorageService }, { type: LibCustomEnvironmentService }] });
633
658
 
634
659
  class LibCustomLoginService {
635
- constructor() {
636
- // #region Propriedade Customizadas para o Componente login.component.ts
637
- this.loginTitle = "";
638
- this.loginSubtitle = "";
639
- this.loginBackground = "";
640
- this.loginLogotipo = "";
641
- this.loginAltLogotipo = "";
642
- this.loginPageTitle = "";
643
- this.loginDesenvDomain = "";
644
- this.loginDesenvUser = "";
645
- this.loginDesenvPassword = "";
660
+ constructor(_customLoginService) {
661
+ this._customLoginService = _customLoginService;
662
+ }
663
+ // #region Propriedade Customizadas para o Componente login.component.ts
664
+ get loginTitle() {
665
+ return this._customLoginService.loginTitle;
666
+ }
667
+ get loginSubtitle() {
668
+ return this._customLoginService.loginSubtitle;
669
+ }
670
+ get loginBackground() {
671
+ return this._customLoginService.loginBackground;
672
+ }
673
+ get loginLogotipo() {
674
+ return this._customLoginService.loginLogotipo;
675
+ }
676
+ get loginAltLogotipo() {
677
+ return this._customLoginService.loginAltLogotipo;
678
+ }
679
+ get loginPageTitle() {
680
+ return this._customLoginService.loginPageTitle;
681
+ }
682
+ get loginDesenvDomain() {
683
+ return this._customLoginService.loginDesenvDomain;
684
+ }
685
+ get loginDesenvUser() {
686
+ return this._customLoginService.loginDesenvUser;
687
+ }
688
+ get loginDesenvPassword() {
689
+ return this._customLoginService.loginDesenvPassword;
646
690
  }
647
691
  // #endregion Propriedade Customizadas para o Componente login.component.ts
648
692
  // #region Métodos Customizadas para o Componente auth.service.ts
@@ -651,14 +695,14 @@ class LibCustomLoginService {
651
695
  * Utilizado para inicializações diversas
652
696
  */
653
697
  authLogin() {
654
- this.storedAuthLogin();
698
+ this._customLoginService.authLogin();
655
699
  }
656
700
  /**
657
701
  * Método executado no auth.service.ts - método: logout ()
658
702
  * Utilizado para inicializações diversas
659
703
  */
660
704
  authLogout() {
661
- this.storedAuthLogout();
705
+ this._customLoginService.authLogout();
662
706
  }
663
707
  /**
664
708
  * Método executado no auth.service.ts - método: login ()
@@ -667,41 +711,26 @@ class LibCustomLoginService {
667
711
  * @param router Objeto de Router que será utilizado
668
712
  */
669
713
  authNavigateToPage(router) {
670
- this.storedAuthNavigateToPage(router);
671
- }
672
- // #endregion Métodos recebidos do projeto
673
- // #region Métodos Publicos
674
- ConfigurarCustomLogin(customLoginService) {
675
- //passando propriedades do projeto para a lib
676
- this.loginTitle = customLoginService.loginTitle;
677
- this.loginSubtitle = customLoginService.loginSubtitle;
678
- this.loginBackground = customLoginService.loginBackground;
679
- this.loginLogotipo = customLoginService.loginLogotipo;
680
- this.loginAltLogotipo = customLoginService.loginAltLogotipo;
681
- this.loginPageTitle = customLoginService.loginPageTitle;
682
- this.loginDesenvDomain = customLoginService.loginDesenvDomain;
683
- this.loginDesenvUser = customLoginService.loginDesenvUser;
684
- this.loginDesenvPassword = customLoginService.loginDesenvPassword;
685
- //passando implementação dos métodos do projeto para a lib
686
- this.storedAuthLogin = customLoginService.authLogin;
687
- this.storedAuthLogout = customLoginService.authLogout;
688
- this.storedAuthNavigateToPage = customLoginService.authNavigateToPage;
689
- }
690
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomLoginService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
714
+ this._customLoginService.authNavigateToPage(router);
715
+ }
716
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomLoginService, deps: [{ token: LIB_CUSTOM_LOGIN_SERVICE }], target: i0.ɵɵFactoryTarget.Injectable }); }
691
717
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomLoginService, providedIn: 'root' }); }
692
718
  }
693
719
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomLoginService, decorators: [{
694
720
  type: Injectable,
695
721
  args: [{ providedIn: 'root' }]
696
- }], ctorParameters: () => [] });
722
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
723
+ type: Inject,
724
+ args: [LIB_CUSTOM_LOGIN_SERVICE]
725
+ }] }] });
697
726
 
698
727
  class ProjectUtilservice {
699
- constructor(router, authStorageService, checkUrlAndMethodService, messageService, _environmentService) {
728
+ constructor(router, authStorageService, checkUrlAndMethodService, messageService, _customEnvironmentService) {
700
729
  this.router = router;
701
730
  this.authStorageService = authStorageService;
702
731
  this.checkUrlAndMethodService = checkUrlAndMethodService;
703
732
  this.messageService = messageService;
704
- this._environmentService = _environmentService;
733
+ this._customEnvironmentService = _customEnvironmentService;
705
734
  }
706
735
  // Exibe a mensagem de erro de uma requisição http
707
736
  showHttpError(error) {
@@ -713,7 +742,7 @@ class ProjectUtilservice {
713
742
  // Erro ocorreu no lado do servidor
714
743
  let isUnauthorizedAccess = error.status === 401;
715
744
  if (isUnauthorizedAccess) {
716
- let isFromAplic = this.checkUrlAndMethodService.needsAuthRequest(error.url, "*", this._environmentService.needsAuthAplic);
745
+ let isFromAplic = this.checkUrlAndMethodService.needsAuthRequest(error.url, "*", this._customEnvironmentService.needsAuthAplic);
717
746
  if (isFromAplic) {
718
747
  // Remove a autenticação do usuário.
719
748
  this.authStorageService.isLoggedInSub.next(false);
@@ -738,9 +767,9 @@ class ProjectUtilservice {
738
767
  }
739
768
  // Obtém o hostName
740
769
  getHostName() {
741
- return this._environmentService.hostName;
770
+ return this._customEnvironmentService.hostName;
742
771
  }
743
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProjectUtilservice, deps: [{ token: i1$1.Router }, { token: AuthStorageService }, { token: i3.CheckUrlAndMethodService }, { token: i3.MessageService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
772
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProjectUtilservice, deps: [{ token: i1$1.Router }, { token: AuthStorageService }, { token: i3.CheckUrlAndMethodService }, { token: i3.MessageService }, { token: LibCustomEnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
744
773
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProjectUtilservice, providedIn: 'root' }); }
745
774
  }
746
775
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ProjectUtilservice, decorators: [{
@@ -748,19 +777,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
748
777
  args: [{
749
778
  providedIn: 'root'
750
779
  }]
751
- }], ctorParameters: () => [{ type: i1$1.Router }, { type: AuthStorageService }, { type: i3.CheckUrlAndMethodService }, { type: i3.MessageService }, { type: EnvironmentService }] });
780
+ }], ctorParameters: () => [{ type: i1$1.Router }, { type: AuthStorageService }, { type: i3.CheckUrlAndMethodService }, { type: i3.MessageService }, { type: LibCustomEnvironmentService }] });
752
781
 
753
782
  class AuthService {
754
783
  // #endregion PRIVATE
755
784
  // #endregion ==========> PROPERTIES <==========
756
- constructor(_httpClient, _router, _authStorageService, _ipServiceService, _customLoginService, _projectUtilservice, _environmentService) {
785
+ constructor(_httpClient, _router, _authStorageService, _ipServiceService, _customLoginService, _projectUtilservice, _customEnvironmentService) {
757
786
  this._httpClient = _httpClient;
758
787
  this._router = _router;
759
788
  this._authStorageService = _authStorageService;
760
789
  this._ipServiceService = _ipServiceService;
761
790
  this._customLoginService = _customLoginService;
762
791
  this._projectUtilservice = _projectUtilservice;
763
- this._environmentService = _environmentService;
792
+ this._customEnvironmentService = _customEnvironmentService;
764
793
  // #region ==========> PROPERTIES <==========
765
794
  // #region PRIVATE
766
795
  this._pendingWarning = null;
@@ -772,12 +801,12 @@ class AuthService {
772
801
  this.city = "undefined";
773
802
  this.state = "undefined";
774
803
  this.country = "undefined";
775
- this._BASE_URL = `${this._environmentService.SpInfra2LoginWS}/LoginSisproERP`; // SpInfra2WS
776
- this._AUTH_BASE_URL = `${this._environmentService.SpInfra2AuthWS}/Auth`; // SpInfra2AuthWS
777
- this._BASE_OS_URL = `${this._environmentService.SpInfra2LoginWS}/LoginIntegradoOS`; // SpInfra2LoginWS
778
- this._BASE_URL = !this._environmentService.production ? this._BASE_URL : `${this._environmentService.SpInfra2LoginWS}/LoginSisproERP`;
779
- this._AUTH_BASE_URL = !this._environmentService.production ? this._AUTH_BASE_URL : `${this._environmentService.SpInfra2AuthWS}/Auth`;
780
- this._BASE_OS_URL = !this._environmentService.production ? this._BASE_OS_URL : `${this._environmentService.SpInfra2LoginWS}/LoginIntegradoOS`;
804
+ this._BASE_URL = `${this._customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`; // SpInfra2WS
805
+ this._AUTH_BASE_URL = `${this._customEnvironmentService.SpInfra2AuthWS}/Auth`; // SpInfra2AuthWS
806
+ this._BASE_OS_URL = `${this._customEnvironmentService.SpInfra2LoginWS}/LoginIntegradoOS`; // SpInfra2LoginWS
807
+ this._BASE_URL = !this._customEnvironmentService.production ? this._BASE_URL : `${this._customEnvironmentService.SpInfra2LoginWS}/LoginSisproERP`;
808
+ this._AUTH_BASE_URL = !this._customEnvironmentService.production ? this._AUTH_BASE_URL : `${this._customEnvironmentService.SpInfra2AuthWS}/Auth`;
809
+ this._BASE_OS_URL = !this._customEnvironmentService.production ? this._BASE_OS_URL : `${this._customEnvironmentService.SpInfra2LoginWS}/LoginIntegradoOS`;
781
810
  this.getParms();
782
811
  }
783
812
  // #region ==========> SERVICE METHODS <==========
@@ -1209,19 +1238,19 @@ class AuthService {
1209
1238
  this._pendingWarning = null;
1210
1239
  return message;
1211
1240
  }
1212
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: i1$1.Router }, { token: AuthStorageService }, { token: i3.IpServiceService }, { token: LibCustomLoginService }, { token: ProjectUtilservice }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1241
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: i1$1.Router }, { token: AuthStorageService }, { token: i3.IpServiceService }, { token: LibCustomLoginService }, { token: ProjectUtilservice }, { token: LibCustomEnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1213
1242
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthService, providedIn: 'root' }); }
1214
1243
  }
1215
1244
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthService, decorators: [{
1216
1245
  type: Injectable,
1217
1246
  args: [{ providedIn: 'root' }]
1218
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.Router }, { type: AuthStorageService }, { type: i3.IpServiceService }, { type: LibCustomLoginService }, { type: ProjectUtilservice }, { type: EnvironmentService }] });
1247
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.Router }, { type: AuthStorageService }, { type: i3.IpServiceService }, { type: LibCustomLoginService }, { type: ProjectUtilservice }, { type: LibCustomEnvironmentService }] });
1219
1248
 
1220
1249
  class MenuServicesService {
1221
- constructor(_authStorageService, _httpClient, _environmentService) {
1250
+ constructor(_authStorageService, _httpClient, _customEnvironmentService) {
1222
1251
  this._authStorageService = _authStorageService;
1223
1252
  this._httpClient = _httpClient;
1224
- this._environmentService = _environmentService;
1253
+ this._customEnvironmentService = _customEnvironmentService;
1225
1254
  this._BASE_URL = ""; // SpInfra2AplicWS
1226
1255
  this._HTTP_HEADERS = new HttpHeaders().set('Content-Type', 'application/json');
1227
1256
  // #endregion Menu Dinâmico
@@ -1231,8 +1260,8 @@ class MenuServicesService {
1231
1260
  // #region NewImg Event
1232
1261
  // Implementação de lógica vista no link: https://hasangalakdinu.medium.com/how-to-call-a-function-in-another-component-angular-using-rxjs-3f2e85920705
1233
1262
  this._subject = new Subject();
1234
- this._BASE_URL = `${this._environmentService.SpInfra2ErpWS}`; // SpInfra2ErpWS
1235
- this._BASE_URL = !this._environmentService.production ? this._BASE_URL : `${this._environmentService.SpInfra2ErpWS}`;
1263
+ this._BASE_URL = `${this._customEnvironmentService.SpInfra2ErpWS}`; // SpInfra2ErpWS
1264
+ this._BASE_URL = !this._customEnvironmentService.production ? this._BASE_URL : `${this._customEnvironmentService.SpInfra2ErpWS}`;
1236
1265
  }
1237
1266
  // #region ==========> SERVICES <==========
1238
1267
  // #region PREPARATION
@@ -1397,7 +1426,7 @@ class MenuServicesService {
1397
1426
  getNewUserImageEvent() {
1398
1427
  return this._subject.asObservable();
1399
1428
  }
1400
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuServicesService, deps: [{ token: AuthStorageService }, { token: i1.HttpClient }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1429
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuServicesService, deps: [{ token: AuthStorageService }, { token: i1.HttpClient }, { token: LibCustomEnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1401
1430
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuServicesService, providedIn: 'root' }); }
1402
1431
  }
1403
1432
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuServicesService, decorators: [{
@@ -1405,11 +1434,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1405
1434
  args: [{
1406
1435
  providedIn: 'root'
1407
1436
  }]
1408
- }], ctorParameters: () => [{ type: AuthStorageService }, { type: i1.HttpClient }, { type: EnvironmentService }] });
1437
+ }], ctorParameters: () => [{ type: AuthStorageService }, { type: i1.HttpClient }, { type: LibCustomEnvironmentService }] });
1409
1438
 
1410
1439
  /**Service responsável por pegar as opções do menu do projeto em que está sendo utilizada*/
1411
1440
  class LibMenuConfigService {
1412
- constructor() {
1441
+ constructor(_menuConfig) {
1442
+ this._menuConfig = _menuConfig;
1413
1443
  this.menu = [];
1414
1444
  this.menuDropdown = [];
1415
1445
  }
@@ -1419,62 +1449,68 @@ class LibMenuConfigService {
1419
1449
  * @returns As opções do menu inicializadas.
1420
1450
  */
1421
1451
  initializeMenu(currentRoute, customList) {
1422
- this.menu = this.storedInitializeMenu(currentRoute, customList);
1452
+ this.menu = this._menuConfig.initializeMenu(currentRoute, customList);
1423
1453
  return this.menu;
1424
1454
  }
1425
1455
  setMenuType(isStaticMenu) {
1426
- this.storedSetMenuType(isStaticMenu);
1456
+ this._menuConfig.setMenuType(isStaticMenu);
1427
1457
  }
1428
1458
  updateRouteSelection(currentRoute, currentList) {
1429
- return this.updateRouteSelection(currentRoute, currentList);
1459
+ return this._menuConfig.updateRouteSelection(currentRoute, currentList);
1430
1460
  }
1431
1461
  /** Inicializa as opções do menu dropdown com base em uma lista personalizada (opcional).
1432
1462
  * @param primaryDropdownList Uma lista personalizada de opções do dropdown (opcional).
1433
1463
  * @returns As opções do dropdown inicializadas.
1434
1464
  */
1435
1465
  initializeMenuDropdown(primaryDropdownList) {
1436
- this.menuDropdown = this.storedInitializeMenuDropdown(primaryDropdownList);
1466
+ this.menuDropdown = this._menuConfig.initializeMenuDropdown(primaryDropdownList);
1437
1467
  return this.menuDropdown;
1438
1468
  }
1439
- ConfigurarMenuConfig(menuConfig) {
1440
- //passando implementação dos métodos do projeto para a lib
1441
- this.storedInitializeMenu = menuConfig.initializeMenu;
1442
- this.storedInitializeMenuDropdown = menuConfig.initializeMenuDropdown;
1443
- this.storedSetMenuType = menuConfig.setMenuType;
1444
- this.updateRouteSelection = menuConfig.updateRouteSelection;
1445
- }
1446
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibMenuConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1469
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibMenuConfigService, deps: [{ token: LIB_MENU_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
1447
1470
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibMenuConfigService, providedIn: 'root' }); }
1448
1471
  }
1449
1472
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibMenuConfigService, decorators: [{
1450
1473
  type: Injectable,
1451
1474
  args: [{ providedIn: 'root' }]
1452
- }] });
1475
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1476
+ type: Inject,
1477
+ args: [LIB_MENU_CONFIG]
1478
+ }] }] });
1453
1479
 
1454
1480
  class LibCustomMenuService {
1481
+ // #region Propriedade Customizadas do Menu
1482
+ get menuDynamic() {
1483
+ return this._customMenuService.menuDynamic;
1484
+ }
1485
+ get menuDynamicCustom() {
1486
+ return this._customMenuService.menuDynamicCustom;
1487
+ }
1488
+ get moduleName() {
1489
+ return this._customMenuService.moduleName;
1490
+ }
1491
+ get moduleImg() {
1492
+ return this._customMenuService.moduleImg;
1493
+ }
1494
+ get moduleSvg() {
1495
+ return this._customMenuService.moduleSvg;
1496
+ }
1497
+ get themeColor() {
1498
+ return this._customMenuService.themeColor;
1499
+ }
1455
1500
  /** Obtém as opções do menu. */
1456
1501
  get menuItems() {
1457
- return this._menuItems;
1502
+ return this._customMenuService.menuItems;
1458
1503
  }
1459
1504
  set menuItems(value) {
1460
- this._menuItems = value;
1505
+ this._customMenuService.menuItems = value;
1461
1506
  }
1462
1507
  setEmpresa(value) { this.empresaId.next(value); }
1463
1508
  // ! Definição do BehaviorSubject: responsável principal da emissão do evento
1464
1509
  // #endregion Propriedade do Menu
1465
- constructor(_menuConfig, _authStorageService) {
1510
+ constructor(_customMenuService, _menuConfig, _authStorageService) {
1511
+ this._customMenuService = _customMenuService;
1466
1512
  this._menuConfig = _menuConfig;
1467
1513
  this._authStorageService = _authStorageService;
1468
- // #region Propriedade Customizadas do Menu
1469
- this.menuDynamic = false;
1470
- this.menuDynamicCustom = false;
1471
- this.moduleName = "";
1472
- this.moduleImg = "";
1473
- this.moduleSvg = "";
1474
- this.themeColor = "";
1475
- // #endregion Propriedade Customizadas do Menu
1476
- // #region Propriedade do Menu
1477
- this._menuItems = [];
1478
1514
  // ! Definição do BehaviorSubject: responsável principal da emissão do evento
1479
1515
  this.empresaId = new BehaviorSubject({ estabelecimentoID: "", empresaID: "" });
1480
1516
  this.applyEmpresa$ = this.empresaId.asObservable();
@@ -1485,22 +1521,22 @@ class LibCustomMenuService {
1485
1521
  // Método executado no menu-lateral.component.ts - método: onInit ()
1486
1522
  // Utilizado para obter o Módulo para montagem do Menu Dinâmico Lateral
1487
1523
  menuDynamicGetModuloId() {
1488
- return this.storeMenuDynamicGetModuloId();
1524
+ return this._customMenuService.menuDynamicGetModuloId();
1489
1525
  }
1490
1526
  // Método executado no menu-lateral.component.ts - método: onInit ()
1491
1527
  // Utilizado para inicializações diversas
1492
1528
  menuDynamicOnInit() {
1493
- this.storedMenuDynamicOnInit();
1529
+ this._customMenuService.menuDynamicOnInit();
1494
1530
  }
1495
1531
  // Método executado no menu-lateral.component.ts - método: onInit ()
1496
1532
  // Utilizado para inicializações diversas
1497
1533
  menuStaticOnInit() {
1498
- this.storedMenuStaticOnInit();
1534
+ this._customMenuService.menuStaticOnInit();
1499
1535
  }
1500
1536
  // Método executado no menu-lateral.component.ts - método: openExpansibleMenu()
1501
1537
  // Utilizado para inicializações ao Expandir a opção de Menu
1502
1538
  menuopenExpansibleMenu(ref) {
1503
- this.storedMenuopenExpansibleMenu(ref);
1539
+ this._customMenuService.menuopenExpansibleMenu(ref);
1504
1540
  }
1505
1541
  /** Método que deve ser chamado na seleção de um novo estabelecimento, ele atualizará os valores do nosso BehaviorSubject para que possamos utilizá-lo em outras partes do sistema. */
1506
1542
  emitEstabelecimentoEvent() {
@@ -1509,29 +1545,16 @@ class LibCustomMenuService {
1509
1545
  empresaID: this._authStorageService.infraEmpresaId
1510
1546
  });
1511
1547
  }
1512
- // #endregion Métodos recebidos do projeto
1513
- // #region Métodos Publicos
1514
- ConfigurarCustomMenuService(RealcustomMenuService) {
1515
- //passando propriedades do projeto para a lib
1516
- this.menuDynamic = RealcustomMenuService.menuDynamic;
1517
- this.menuDynamicCustom = RealcustomMenuService.menuDynamicCustom;
1518
- this.moduleName = RealcustomMenuService.moduleName;
1519
- this.moduleImg = RealcustomMenuService.moduleImg;
1520
- this.moduleSvg = RealcustomMenuService.moduleSvg;
1521
- this.themeColor = RealcustomMenuService.themeColor;
1522
- //passando implementação dos métodos do projeto para a lib
1523
- this.storeMenuDynamicGetModuloId = RealcustomMenuService.menuDynamicGetModuloId;
1524
- this.storedMenuStaticOnInit = RealcustomMenuService.menuStaticOnInit;
1525
- this.storedMenuopenExpansibleMenu = RealcustomMenuService.menuopenExpansibleMenu;
1526
- this.storedMenuDynamicOnInit = RealcustomMenuService.menuDynamicOnInit;
1527
- }
1528
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomMenuService, deps: [{ token: LibMenuConfigService }, { token: AuthStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1548
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomMenuService, deps: [{ token: LIB_CUSTOM_MENU_SERVICE }, { token: LibMenuConfigService }, { token: AuthStorageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1529
1549
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomMenuService, providedIn: 'root' }); }
1530
1550
  }
1531
1551
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LibCustomMenuService, decorators: [{
1532
1552
  type: Injectable,
1533
1553
  args: [{ providedIn: 'root' }]
1534
- }], ctorParameters: () => [{ type: LibMenuConfigService }, { type: AuthStorageService }] });
1554
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1555
+ type: Inject,
1556
+ args: [LIB_CUSTOM_MENU_SERVICE]
1557
+ }] }, { type: LibMenuConfigService }, { type: AuthStorageService }] });
1535
1558
 
1536
1559
  var LoginProgress;
1537
1560
  (function (LoginProgress) {
@@ -1549,7 +1572,7 @@ var SituacaoLogin;
1549
1572
  ;
1550
1573
  // ajustes ERICK
1551
1574
  class LoginComponent {
1552
- constructor(_msalGuardConfiguration, _msalService, _customLoginService, _formBuilder, _projectUtilservice, _authService, _environmentService, _authStorageService, _title, _router, _toastrService,
1575
+ constructor(_msalGuardConfiguration, _msalService, _customLoginService, _formBuilder, _projectUtilservice, _authService, _customEnvironmentService, _authStorageService, _title, _router, _toastrService,
1553
1576
  // Exibição de alerta para caso o payload do login OS não seja infromado corretamente
1554
1577
  _messageService) {
1555
1578
  this._msalGuardConfiguration = _msalGuardConfiguration;
@@ -1558,7 +1581,7 @@ class LoginComponent {
1558
1581
  this._formBuilder = _formBuilder;
1559
1582
  this._projectUtilservice = _projectUtilservice;
1560
1583
  this._authService = _authService;
1561
- this._environmentService = _environmentService;
1584
+ this._customEnvironmentService = _customEnvironmentService;
1562
1585
  this._authStorageService = _authStorageService;
1563
1586
  this._title = _title;
1564
1587
  this._router = _router;
@@ -1648,7 +1671,7 @@ class LoginComponent {
1648
1671
  // Método para configuração dos campos de edição do formulário (Login)
1649
1672
  createFormDomain() {
1650
1673
  // Dados originais de Login (Domínio)
1651
- if (this._environmentService.production) {
1674
+ if (this._customEnvironmentService.production) {
1652
1675
  this.formDomain = this._formBuilder.group({
1653
1676
  dominio: ['', [Validators.required, Validators.maxLength(50)]],
1654
1677
  });
@@ -1661,7 +1684,7 @@ class LoginComponent {
1661
1684
  }
1662
1685
  createFormLogin() {
1663
1686
  // Dados originais de Login (Usuário e Senha)
1664
- if (this._environmentService.production) {
1687
+ if (this._customEnvironmentService.production) {
1665
1688
  this.formLogin = this._formBuilder.group({
1666
1689
  usuario: ['', [Validators.required, Validators.maxLength(100)]],
1667
1690
  senha: ['', [Validators.required, Validators.maxLength(100)]]
@@ -1703,7 +1726,7 @@ class LoginComponent {
1703
1726
  // #region Azure
1704
1727
  async configMsal() {
1705
1728
  const isIE = window.navigator.userAgent.indexOf("MSIE ") > -1 || window.navigator.userAgent.indexOf("Trident/") > -1;
1706
- const hostAuthLogin = !this._environmentService.production ? "http://localhost:4200/auth/login" : `${this._environmentService.hostName}/SisproErpCloud/${this._environmentService.product}/auth/login`;
1729
+ const hostAuthLogin = !this._customEnvironmentService.production ? "http://localhost:4200/auth/login" : `${this._customEnvironmentService.hostName}/SisproErpCloud/${this._customEnvironmentService.product}/auth/login`;
1707
1730
  this._msalService.instance = new PublicClientApplication({
1708
1731
  auth: {
1709
1732
  clientId: `${this._authStorageService.azureClientId}`,
@@ -1764,7 +1787,7 @@ class LoginComponent {
1764
1787
  // Obtém a Url do Config Erp
1765
1788
  geturlErpConfig() {
1766
1789
  // verificar depois
1767
- return `${this._environmentService.hostName}/SisproErpCloud/ConfigErp`;
1790
+ return `${this._customEnvironmentService.hostName}/SisproErpCloud/ConfigErp`;
1768
1791
  }
1769
1792
  /*
1770
1793
  * Obtém os parâmetros de método de autenticação
@@ -2022,7 +2045,7 @@ class LoginComponent {
2022
2045
  this._messageService.showAlertWarning(warningMessage);
2023
2046
  }
2024
2047
  }
2025
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LoginComponent, deps: [{ token: MSAL_GUARD_CONFIG }, { token: i1$2.MsalService }, { token: LibCustomLoginService }, { token: i3$1.FormBuilder }, { token: ProjectUtilservice }, { token: AuthService }, { token: EnvironmentService }, { token: AuthStorageService }, { token: i8.Title }, { token: i1$1.Router }, { token: i10.ToastrService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Component }); }
2048
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LoginComponent, deps: [{ token: MSAL_GUARD_CONFIG }, { token: i1$2.MsalService }, { token: LibCustomLoginService }, { token: i3$1.FormBuilder }, { token: ProjectUtilservice }, { token: AuthService }, { token: LibCustomEnvironmentService }, { token: AuthStorageService }, { token: i8.Title }, { token: i1$1.Router }, { token: i10.ToastrService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Component }); }
2026
2049
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: LoginComponent, isStandalone: true, selector: "app-login", ngImport: i0, template: "<div id=\"login\" class=\"container-fluid\">\n\t<div class=\"row\">\n\t\t<!-- Conte\u00FAdo da DIV do background -->\n\t\t<div class=\"col-md-6 px-0\">\n\t\t\t<div class=\"background\" style=\"background-image: linear-gradient(to bottom, rgba(10, 44, 81, 0.9), rgba(10, 44, 81, 0.9)), url({{_customLoginService.loginBackground}})\">\n\t\t\t\t<div class=\"text-position texto-apresentacao ps-5\">\n\t\t\t\t\t<h1 class=\"title\" id=\"title\"></h1>\n\t\t\t\t\t<p class=\"subtitle\" id=\"subtitle\"></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- Conte\u00FAdo da DIV de Login -->\n\t\t<div class=\"col-md-6 px-0\">\n\n\t\t\t<div class=\"div-size\">\n\t\t\t\t<div class=\"logotipo\">\n\t\t\t\t\t<img style=\"height: 95px;\" src=\"{{ this._customLoginService.loginLogotipo }}\" alt=\"{{ this._customLoginService.loginAltLogotipo }}\" />\n\t\t\t\t</div>\n\n\t\t\t\t@if (situacaoLogin !== 2) {\n\t\t\t\t\t@if (!showParmsAuthentication2Fa) {\n\t\t\t\t\t\t@switch (loginProgress) {\n\t\t\t\t\t\t\t@case(1) {\n\t\t\t\t\t\t\t\t<form [formGroup]=\"formDomain\" class=\"form-position\">\n\t\t\t\t\t\t\t\t\t<div class=\"col mb-3\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"predio\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" placeholder=\"Dom\u00EDnio\" formControlName=\"dominio\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formDomain.get('dominio'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formDomain.get('dominio')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingDomain\" loadingText=\"Acessando...\" class=\"btn btn-primary\" [disabled]=\"isLoadingDomain\" (click)=\"getAuthentication()\">\n\t\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t@case(2) {\n\t\t\t\t\t\t\t\t<form [formGroup]=\"formLogin\" class=\"form-position\">\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"usuario-quadro\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control px-3\" formControlName=\"usuario\" placeholder=\"Usu\u00E1rio\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formLogin.get('usuario'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formLogin.get('usuario')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-lock-text\"><lib-icon iconName=\"chave\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"password\" class=\"form-control px-3\" formControlName=\"senha\" placeholder=\"Senha\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formLogin.get('senha'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formLogin.get('senha')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button (click)=\"returnDomain()\" type=\"button\" class=\"btn btn-outline-secondary w-100\">\n\t\t\t\t\t\t\t\t\t\t\t\tVoltar\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingLogin\" loadingText=\"Acessando...\" class=\"btn btn-primary btn-heigth-48 w-100\" [disabled]=\"isLoadingLogin\" (click)=\"logOn()\">\n\t\t\t\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"mt-3 text-center\">\n\t\t\t\t\t\t\t\t\t\t<a type=\"button\" (click)=\"situacaoLogin = 2\" class=\"fw-bold text-decoration-none text-secondary\"\n\t\t\t\t\t\t\t\t\t\t\ttooltip=\"N\u00E3o se preocupe, clique aqui e informe o dom\u00EDnio e o usu\u00E1rio desejados que enviaremos um e-mail com maiores informa\u00E7\u00F5es.\">\n\t\t\t\t\t\t\t\t\t\t\tEsqueceu sua senha? </a>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t@case(3) {\n\t\t\t\t\t\t\t\t<form [formGroup]=\"formAzure\" class=\"form-position formAzure\">\n\t\t\t\t\t\t\t\t\t<div class=\"w-100 mb-3\">\n\t\t\t\t\t\t\t\t\t\t<button type=\"button\" loadingText=\"Acessando...\" class=\"btn btn-primary p-2 mb-3 w-100 d-flex align-items-center justify-content-center gap-2\" (click)=\"logOnAzure()\">\n\t\t\t\t\t\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" heigth=\"14\" width=\"14\" viewBox=\"0 0 23 23\"><path fill=\"transparent\" d=\"M0 0h23v23H0z\"/><path fill=\"#f35325\" d=\"M1 1h10v10H1z\"/><path fill=\"#81bc06\" d=\"M12 1h10v10H12z\"/><path fill=\"#05a6f0\" d=\"M1 12h10v10H1z\"/><path fill=\"#ffba08\" d=\"M12 12h10v10H12z\"/></svg>\n\t\t\t\t\t\t\t\t\t\t\tMicrosoft\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t<div class=\"w-100 text-center text-secondary\">\n\t\t\t\t\t\t\t\t\t\t\t<span id=\"ou-text\"> ou </span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"usuario-quadro\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control px-3\" formControlName=\"usuario\" placeholder=\"Usu\u00E1rio\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAzure.get('usuario'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAzure.get('usuario')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-lock-text\"><lib-icon iconName=\"chave\" /></span>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"password\" class=\"form-control px-3\" formControlName=\"senha\" placeholder=\"Senha\"\n\t\t\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAzure.get('senha'))\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAzure.get('senha')\" />\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button (click)=\"returnDomain()\" type=\"button\" class=\"btn btn-outline-secondary w-100\">\n\t\t\t\t\t\t\t\t\t\t\t\t<lib-icon iconName=\"seta-esquerda\" /> VOLTAR\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingAzure\" loadingText=\"Acessando...\" class=\"btn btn-primary btn-heigth-48 w-100\" [disabled]=\"isLoadingAzure\" (click)=\"logOnAdmin()\">\n\t\t\t\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@else {\n\t\t\t\t\t\t<form [formGroup]=\"formAuthentication2Fa\" class=\"form-position\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<div class=\"input-group input-group mb-3\">\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><img src=\"assets/icons/lock.svg\" alt=\"lock-icon\" /></span>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" formControlName=\"code\" id=\"code\" placeholder=\"C\u00F3digo de 2 fatores\"\n\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formAuthentication2Fa.get('code'))\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formAuthentication2Fa.get('code')\" />\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"d-flex flex-row align-items-center gap-3 mb-3\">\n\t\t\t\t\t\t\t\t<button (click)=\"voltar()\" type=\"button\" class=\"btn btn-outline-secondary col\"> <lib-icon iconName=\"seta-esquerda\" /> VOLTAR </button>\n\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingSendAuthentication2Fa\" [disabled]=\"isLoadingSendAuthentication2Fa\" (click)=\"sendCode()\" type=\"button\" class=\"btn btn-primary col\">\n\t\t\t\t\t\t\t\t\tACESSAR <lib-icon iconName=\"login\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class=\"d-flex flex-row align-items-center justify-content-center\">\n\t\t\t\t\t\t\t\t@if (secondsLeft === 0) {\n\t\t\t\t\t\t\t\t\t<button [libLoading]=\"isLoadingForgottenPassword\" loadingText=\"Enviando...\" [disabled]=\"isLoadingForgottenPassword\" (click)=\"getNewCode()\" type=\"button\" class=\"btn btn-outline-primary col\">\n\t\t\t\t\t\t\t\t\t\tEnviar novo c\u00F3digo <lib-icon iconName=\"aviao-papel\" />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\t<span class=\"fw-bold text-secondary\">{{ secondsLeft }} {{ secondsLeft == 1 ? 'segundo' : 'segundos' }} para obter novo c\u00F3digo</span>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</form>\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@else {\n\t\t\t\t\t<form [formGroup]=\"formFgtPsw\" class=\"form-position\">\n\t\t\t\t\t\t<div class=\"row mb-3\">\n\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t<div class=\"input-group input-group\">\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"predio\" /></span>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"dominioFgtPssInput\" placeholder=\"Dom\u00EDnio\" formControlName=\"dominioFgtPsw\"\n\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formFgtPsw.get('dominioFgtPsw'))\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formFgtPsw.get('dominioFgtPsw')\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"row mb-3\">\n\t\t\t\t\t\t\t<div class=\"col\">\n\t\t\t\t\t\t\t\t<div class=\"input-group input-group\">\n\t\t\t\t\t\t\t\t\t<span class=\"input-group-text\" id=\"input-at-sign-text\"><lib-icon iconName=\"usuario-quadro\" /></span>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"usuarioFgtPssInput\" placeholder=\"Usu\u00E1rio\" formControlName=\"usuarioFgtPsw\"\n\t\t\t\t\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(formFgtPsw.get('usuarioFgtPsw'))\">\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<app-field-error-message [control]=\"formFgtPsw.get('usuarioFgtPsw')\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\t\t@if(formFgtPsw.get('usuarioFgtPsw')?.value === 'admin' || formFgtPsw.get('usuarioFgtPsw')?.value === 'CRMadmin'){\n <p class=\"texto-admin\">N\u00E3o \u00E9 poss\u00EDvel alterar a senha do usu\u00E1rio 'admin'</p>\n }@else{\n <button [libLoading]=\"isLoadingForgottenPassword\" loadingText=\"Enviando...\" class=\"btn btn-primary btn-heigth-48\" [disabled]=\"isLoadingForgottenPassword\" (click)=\"sendForgottenPassword()\">\n Enviar e-mail <lib-icon iconName=\"aviao-papel\" />\n </button>\n }\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"mt-3 text-center\">\n\t\t\t\t\t\t\t<a type=\"button\" (click)=\"situacaoLogin = 0\" class=\"fw-bold text-decoration-none text-secondary\" tooltip=\"Retornar para o login.\"> <lib-icon iconName=\"seta-esquerda\" /> Voltar para o login </a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t<div class=\"footer-position\">\n\t\t\t\t\t<footer>\n\t\t\t\t\t\t<div class=\"d-flex flex-row align-items-center justify-content-center gap-2\">\n\t\t\t\t\t\t\t<a href=\"https://dpo.privacytools.com.br/policy-view/JmGeNlJdw/1/poli%CC%81tica-de-privacidade/pt_BR?s=1685731510066\" target=\"_blank\" class=\"text-primary text-decoration-none fw-bold\"> POL\u00CDTICA DE PRIVACIDADE </a>\n\t\t\t\t\t\t\t<span> | </span>\n\t\t\t\t\t\t\t<a href=\"https://dpo.privacytools.com.br/policy-view/Rork35NN2/2/poli%CC%81tica-de-cookies/pt_BR?s=1685731551976\" target=\"_blank\" class=\"text-primary text-decoration-none fw-bold\"> POL\u00CDTICA DE COOKIES </a>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<p class=\"text-secondary\">\n\t\t\t\t\t\t\tDesenvolvido por <a href=\"https://www.sispro.com.br/\" target=\"_blank\" class=\"text-primary text-decoration-none fw-bold\"> SISPRO </a> \u00A9 {{ year }} Todos os direitos reservados\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<div class=\"icons\">\n\t\t\t\t\t\t\t<a href=\"https://pt-br.facebook.com/SisproERP/\" target=\"_blank\"> <lib-icon class=\"text-primary\" iconName=\"facebook\" iconSize=\"medium-small\"/> </a>\n\t\t\t\t\t\t\t<a href=\"https://www.instagram.com/accounts/login/?next=/sispro_software/\" target=\"_blank\"> <lib-icon class=\"text-primary\" iconName=\"instagram\" iconSize=\"medium-small\"/> </a>\n\t\t\t\t\t\t\t<a href=\"https://br.linkedin.com/company/sispro\" target=\"_blank\"> <lib-icon class=\"text-primary\" iconName=\"linkedin\" iconSize=\"medium-small\"/> </a>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"text-center\">\n\t\t\t\t\t\t\t<a class=\"text-primary fw-bold text-decoration-none glb-font-size-12\" [href]=\"geturlErpConfig()\"> Configurar ERP </a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</footer>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n", styles: ["@charset \"UTF-8\";#login .background{display:grid;height:100vh;align-content:center;background-size:cover;color:#f5f5f5;align-items:center;justify-content:center}#login .div-size{display:flex;flex-direction:column;justify-content:space-around;width:100%;height:100vh;align-items:center;background-color:#f5f5f5;box-shadow:0 0 15px #333}#login .title{font-size:3.5vw;text-transform:uppercase;font-weight:700}#login .subtitle{font-size:21px}#login .logotipo{display:flex;justify-content:center;margin-top:10%}#login .form-position{display:flex;flex-direction:column;align-content:center;width:378px}#login .form-item{margin-bottom:16px}#login .footer{display:flex;justify-content:center}#login .footer-position{font-size:14px;display:flex;justify-content:center;align-items:flex-end}#login .icons{display:flex;justify-content:center;align-items:center;margin-top:16px}#login .icons a{padding:4px}#login .icon-item{margin-left:24px;color:#007bff}#login .col-md-7,#login .col-md-5{padding:0}#login .btn-acessar{height:48px;outline-style:none}#login .texto-apresentacao{align-items:start}#login .separator{margin-left:5px}#login #ou-text{display:flex;flex-direction:row;align-items:center;justify-content:space-between}#login #ou-text:before{content:\"\";display:block;width:100%;height:1px;border-bottom:1px solid rgb(108,117,125);margin-right:12px}#login #ou-text:after{content:\"\";display:block;width:100%;height:1px;border-bottom:1px solid rgb(108,117,125);margin-left:12px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: InfraModule }, { kind: "component", type: i3.FieldErrorMessageComponent, selector: "app-field-error-message, lib-error-message", inputs: ["customMessage", "control", "label"] }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "directive", type: i3.LoadingBtnDirective, selector: "button[libLoading], a[libLoading]", inputs: ["loadingText", "loadingType", "libLoading"] }, { kind: "ngmodule", type: CommonModule }], preserveWhitespaces: true }); }
2027
2050
  }
2028
2051
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LoginComponent, decorators: [{
@@ -2036,7 +2059,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
2036
2059
  }], ctorParameters: () => [{ type: undefined, decorators: [{
2037
2060
  type: Inject,
2038
2061
  args: [MSAL_GUARD_CONFIG]
2039
- }] }, { type: i1$2.MsalService }, { type: LibCustomLoginService }, { type: i3$1.FormBuilder }, { type: ProjectUtilservice }, { type: AuthService }, { type: EnvironmentService }, { type: AuthStorageService }, { type: i8.Title }, { type: i1$1.Router }, { type: i10.ToastrService }, { type: i3.MessageService }] });
2062
+ }] }, { type: i1$2.MsalService }, { type: LibCustomLoginService }, { type: i3$1.FormBuilder }, { type: ProjectUtilservice }, { type: AuthService }, { type: LibCustomEnvironmentService }, { type: AuthStorageService }, { type: i8.Title }, { type: i1$1.Router }, { type: i10.ToastrService }, { type: i3.MessageService }] });
2040
2063
 
2041
2064
  class LoginOSModel {
2042
2065
  // Sugestão do GPT: "Pra facilitar instanciar a partir de objetos."
@@ -2618,11 +2641,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
2618
2641
  }] } });
2619
2642
 
2620
2643
  class MenuLateralComponent {
2621
- constructor(_msalGuardConfiguration, _msalService, _toastrService, _customMenuService, _authStorageService, _bsModalService, _menuServices, _messageService, _projectUtilService, _router, _authService, _environmentService) {
2644
+ constructor(_msalGuardConfiguration, _msalService, _toastrService, _customMenuService, _customEnvironmentService, _authStorageService, _bsModalService, _menuServices, _messageService, _projectUtilService, _router, _authService) {
2622
2645
  this._msalGuardConfiguration = _msalGuardConfiguration;
2623
2646
  this._msalService = _msalService;
2624
2647
  this._toastrService = _toastrService;
2625
2648
  this._customMenuService = _customMenuService;
2649
+ this._customEnvironmentService = _customEnvironmentService;
2626
2650
  this._authStorageService = _authStorageService;
2627
2651
  this._bsModalService = _bsModalService;
2628
2652
  this._menuServices = _menuServices;
@@ -2630,7 +2654,6 @@ class MenuLateralComponent {
2630
2654
  this._projectUtilService = _projectUtilService;
2631
2655
  this._router = _router;
2632
2656
  this._authService = _authService;
2633
- this._environmentService = _environmentService;
2634
2657
  this.handleKeyboardShortcut = (event) => {
2635
2658
  if (event.ctrlKey && event.key.toLowerCase() === 'b') {
2636
2659
  event.preventDefault(); // Prevents any default behavior (like bold in text editors)
@@ -2797,7 +2820,7 @@ class MenuLateralComponent {
2797
2820
  logout() {
2798
2821
  // Verifica se é Login Azure
2799
2822
  if (this._authStorageService.infraInAuthTypeId == InfraInAuthTypeId.Azure && this._authStorageService.user.toLowerCase() != "admin") {
2800
- const hostAuthLogin = !this._environmentService.production ? "http://localhost:4200/auth/login" : `${this._environmentService.hostName}/SisproErpCloud/${this._environmentService.product}/auth/login`;
2823
+ const hostAuthLogin = !this._customEnvironmentService.production ? "http://localhost:4200/auth/login" : `${this._customEnvironmentService.hostName}/SisproErpCloud/${this._customEnvironmentService.product}/auth/login`;
2801
2824
  this._msalService.logoutRedirect({
2802
2825
  postLogoutRedirectUri: hostAuthLogin
2803
2826
  });
@@ -2816,7 +2839,7 @@ class MenuLateralComponent {
2816
2839
  // #region Azure
2817
2840
  async configMsal() {
2818
2841
  const isIE = window.navigator.userAgent.indexOf("MSIE ") > -1 || window.navigator.userAgent.indexOf("Trident/") > -1;
2819
- const hostAuthLogin = !this._environmentService.production ? "http://localhost:4200/auth/login" : `${this._environmentService.hostName}/SisproErpCloud/${this._environmentService.product}/auth/login`;
2842
+ const hostAuthLogin = !this._customEnvironmentService.production ? "http://localhost:4200/auth/login" : `${this._customEnvironmentService.hostName}/SisproErpCloud/${this._customEnvironmentService.product}/auth/login`;
2820
2843
  this._msalService.instance = new PublicClientApplication({
2821
2844
  auth: {
2822
2845
  clientId: `${this._authStorageService.azureClientId}`,
@@ -2873,7 +2896,7 @@ class MenuLateralComponent {
2873
2896
  closeModal(modalID) {
2874
2897
  this._bsModalService.hide(modalID);
2875
2898
  }
2876
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuLateralComponent, deps: [{ token: MSAL_GUARD_CONFIG }, { token: i1$2.MsalService }, { token: i10.ToastrService }, { token: LibCustomMenuService }, { token: AuthStorageService }, { token: i2.BsModalService }, { token: MenuServicesService }, { token: i3.MessageService }, { token: ProjectUtilservice }, { token: i1$1.Router }, { token: AuthService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Component }); }
2899
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuLateralComponent, deps: [{ token: MSAL_GUARD_CONFIG }, { token: i1$2.MsalService }, { token: i10.ToastrService }, { token: LibCustomMenuService }, { token: LibCustomEnvironmentService }, { token: AuthStorageService }, { token: i2.BsModalService }, { token: MenuServicesService }, { token: i3.MessageService }, { token: ProjectUtilservice }, { token: i1$1.Router }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Component }); }
2877
2900
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", 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\" \n (clickOutside)=\"closeMenu == true ? onClickedOutside($event, submenu_ref) : closeMenu = true\">\n <div class=\"sidebar {{_customMenuService.themeColor}} closed\" #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)=\"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\n <ng-container>\n <img *ngIf=\"_customMenuService.moduleImg != ''; else moduleSVG\" [src]=\"_customMenuService.moduleImg\" alt=\"\">\n <span class=\"ps-2\"> {{ this._customMenuService.moduleName }} <lib-icon iconName=\"seta-direita\" iconColor=\"white\" /> </span>\n\n <ng-template #moduleSVG>\n <lib-icon iconColor=\"white\" [iconName]=\"_customMenuService.moduleSvg\"/>\n </ng-template>\n </ng-container>\n\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)=\"openModal(modalEstabelecimento, MODAL_ESTABELECIMENTO)\"\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 </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; 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)\"\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\" (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 <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 </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)=\"closeModal(MODAL_ESTABELECIMENTO)\"\n (onSelected)=\"closeModal(MODAL_ESTABELECIMENTO); updateLastLogEstabelecimento($event);\"></selecao-estabelecimentos-modal>\n</ng-template>\n<!-- #endregion MODAL SELECAO ESTABELECIMENTO -->\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:212px;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{display:flex;flex-direction:row;width:100%;align-items:center;justify-content:center}.icon-estabelecimento 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{margin:0}.sidebar.closed .icon-estabelecimento button{justify-content:center}.sidebar.closed .icon-estabelecimento 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}.sidebar.closed span{display:none}.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: i12.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: i13.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: NotifSubmenuComponent, selector: "app-notif-submenu" }, { kind: "component", type: DynamicMenuComponent, selector: "app-dynamic-menu", inputs: ["submenuRef", "recebeParam", "titleSubmenu", "submenuList"], outputs: ["selectTemplate"] }, { kind: "component", type: PrimaryDropdownComponent, selector: "app-primary-dropdown", inputs: ["buttonWasClicked"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$2.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"] }] }); }
2878
2901
  }
2879
2902
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: MenuLateralComponent, decorators: [{
@@ -2894,7 +2917,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
2894
2917
  }], ctorParameters: () => [{ type: undefined, decorators: [{
2895
2918
  type: Inject,
2896
2919
  args: [MSAL_GUARD_CONFIG]
2897
- }] }, { type: i1$2.MsalService }, { type: i10.ToastrService }, { type: LibCustomMenuService }, { type: AuthStorageService }, { type: i2.BsModalService }, { type: MenuServicesService }, { type: i3.MessageService }, { type: ProjectUtilservice }, { type: i1$1.Router }, { type: AuthService }, { type: EnvironmentService }], propDecorators: { sidebar: [{
2920
+ }] }, { type: i1$2.MsalService }, { type: i10.ToastrService }, { type: LibCustomMenuService }, { type: LibCustomEnvironmentService }, { type: AuthStorageService }, { type: i2.BsModalService }, { type: MenuServicesService }, { type: i3.MessageService }, { type: ProjectUtilservice }, { type: i1$1.Router }, { type: AuthService }], propDecorators: { sidebar: [{
2898
2921
  type: ViewChild,
2899
2922
  args: ['sidebar', { static: true }]
2900
2923
  }], notif_template: [{
@@ -3333,10 +3356,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
3333
3356
  * Depende do serviço de autenticação.
3334
3357
  */
3335
3358
  class AuthAplicInterceptor {
3336
- constructor(authCheckService, token, _environmentService) {
3359
+ constructor(authCheckService, token, _customEnvironmentService) {
3337
3360
  this.authCheckService = authCheckService;
3338
3361
  this.token = token;
3339
- this._environmentService = _environmentService;
3362
+ this._customEnvironmentService = _customEnvironmentService;
3340
3363
  }
3341
3364
  intercept(req, next) {
3342
3365
  // convert promise to observable using 'from' operator
@@ -3344,7 +3367,7 @@ class AuthAplicInterceptor {
3344
3367
  }
3345
3368
  async handle(req, next) {
3346
3369
  let changedReq = req;
3347
- if (this.authCheckService.needsAuthRequest(req.url, req.method, this._environmentService.needsAuthAplic)) {
3370
+ if (this.authCheckService.needsAuthRequest(req.url, req.method, this._customEnvironmentService.needsAuthAplic)) {
3348
3371
  // Verifica se o Token precisa ser renovado
3349
3372
  await this.token.renewToken();
3350
3373
  // Adiciona as autenticações necessárias ao servidor.
@@ -3353,25 +3376,25 @@ class AuthAplicInterceptor {
3353
3376
  }
3354
3377
  return await lastValueFrom(next.handle(changedReq));
3355
3378
  }
3356
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthAplicInterceptor, deps: [{ token: i3.CheckUrlAndMethodService }, { token: AuthStorageService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3379
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthAplicInterceptor, deps: [{ token: i3.CheckUrlAndMethodService }, { token: AuthStorageService }, { token: LibCustomEnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3357
3380
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthAplicInterceptor, providedIn: 'root' }); }
3358
3381
  }
3359
3382
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthAplicInterceptor, decorators: [{
3360
3383
  type: Injectable,
3361
3384
  args: [{ providedIn: 'root' }]
3362
- }], ctorParameters: () => [{ type: i3.CheckUrlAndMethodService }, { type: AuthStorageService }, { type: EnvironmentService }] });
3385
+ }], ctorParameters: () => [{ type: i3.CheckUrlAndMethodService }, { type: AuthStorageService }, { type: LibCustomEnvironmentService }] });
3363
3386
 
3364
3387
  /**
3365
3388
  * \brief Intercepta uma chamada HTTP para inserir a autenticação da Sispro.
3366
3389
  */
3367
3390
  class AuthInfraInterceptor {
3368
- constructor(authCheckService, _environmentService) {
3391
+ constructor(authCheckService, _customEnvironmentService) {
3369
3392
  this.authCheckService = authCheckService;
3370
- this._environmentService = _environmentService;
3393
+ this._customEnvironmentService = _customEnvironmentService;
3371
3394
  }
3372
3395
  intercept(req, next) {
3373
3396
  let changedReq = req;
3374
- if (this.authCheckService.needsAuthRequest(req.url, req.method, this._environmentService.needsAuthInfra)) {
3397
+ if (this.authCheckService.needsAuthRequest(req.url, req.method, this._customEnvironmentService.needsAuthInfra)) {
3375
3398
  // Adiciona as autenticações necessárias ao servidor. Autenticação básica.
3376
3399
  let headers = req.headers.set("Authorization", `Basic ${btoa(`${localStorage.getItem('configServerUser')}:${localStorage.getItem('configServerPassword')}`)}
3377
3400
  `);
@@ -3379,22 +3402,25 @@ class AuthInfraInterceptor {
3379
3402
  }
3380
3403
  return next.handle(changedReq);
3381
3404
  }
3382
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthInfraInterceptor, deps: [{ token: i3.CheckUrlAndMethodService }, { token: EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3405
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthInfraInterceptor, deps: [{ token: i3.CheckUrlAndMethodService }, { token: LibCustomEnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3383
3406
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthInfraInterceptor, providedIn: 'root' }); }
3384
3407
  }
3385
3408
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: AuthInfraInterceptor, decorators: [{
3386
3409
  type: Injectable,
3387
3410
  args: [{ providedIn: 'root' }]
3388
- }], ctorParameters: () => [{ type: i3.CheckUrlAndMethodService }, { type: EnvironmentService }] });
3411
+ }], ctorParameters: () => [{ type: i3.CheckUrlAndMethodService }, { type: LibCustomEnvironmentService }] });
3389
3412
 
3390
3413
  const AUTH_ROUTES = [
3391
3414
  { path: '', component: LoginComponent, data: { title: "SisproERP | Meu portal" } },
3392
3415
  { path: 'novaSenha/:param', component: NovaSenhaComponent, data: { title: "Nova Senha" } }
3393
3416
  ];
3394
3417
 
3418
+ /** Modules */
3419
+ //???f
3420
+
3395
3421
  /**
3396
3422
  * Generated bundle index. Do not edit.
3397
3423
  */
3398
3424
 
3399
- export { AUTH_ROUTES, AuthAplicInterceptor, AuthGuard, AuthInfraInterceptor, AuthModule, AuthService, AuthStorageService, DynamicMenuComponent, EnvironmentService, ExternaLoginlGuard, IMenu, InfraUsuarioImg, LibCustomLoginService, LibCustomMenuService, LibCustomStorageService, LibMenuConfigService, LoginComponent, LoginGuard, LoginOSComponent, LoginOSGuard, LoginProgress, MenuLateralComponent, MenuServicesService, NotifSubmenuComponent, NovaSenhaComponent, PrimaryDropdownComponent, RetInfraUsuarioImg, RetMenuItemStructure, RetMenuLateral, RetMenuPromise, RetNavSubMenu, RetSubmenuWithCards, SecondaryDropdownComponent, SelecaoEstabelecimentosModalComponent, SituacaoLogin };
3425
+ export { AUTH_ROUTES, AuthAplicInterceptor, AuthGuard, AuthInfraInterceptor, AuthModule, AuthService, AuthStorageService, DynamicMenuComponent, ExternaLoginlGuard, IMenu, InfraUsuarioImg, LIB_CUSTOM_ENVIRONMENT_SERVICE, LIB_CUSTOM_LOGIN_SERVICE, LIB_CUSTOM_MENU_SERVICE, LIB_CUSTOM_STORAGE_SERVICE, LIB_MENU_CONFIG, LibCustomEnvironmentService, LibCustomLoginService, LibCustomMenuService, LibCustomStorageService, LibMenuConfigService, LoginComponent, LoginGuard, LoginOSComponent, LoginOSGuard, LoginProgress, MenuLateralComponent, MenuServicesService, NotifSubmenuComponent, NovaSenhaComponent, PrimaryDropdownComponent, RetInfraUsuarioImg, RetMenuItemStructure, RetMenuLateral, RetMenuPromise, RetNavSubMenu, RetSubmenuWithCards, SecondaryDropdownComponent, SelecaoEstabelecimentosModalComponent, SituacaoLogin };
3400
3426
  //# sourceMappingURL=ngx-sp-auth.mjs.map