ngx-sp-auth 4.1.0 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1388,6 +1388,23 @@ class MenuServicesService {
1388
1388
  }));
1389
1389
  }
1390
1390
  // #endregion Menu: Version
1391
+ // #region Menu: IsMenuAllowed
1392
+ /** Método executado para validar a permissão de acesso a uma opção do menu
1393
+ */
1394
+ isMenuAllowed(route) {
1395
+ const params = new HttpParams()
1396
+ .set('route', route);
1397
+ const headers = new HttpHeaders().set("Content-Type", "application/json");
1398
+ const url = `${this._BASE_URL}/Menu/IsMenuAllowed`;
1399
+ return this._httpClient
1400
+ .get(url, { 'params': params, headers: headers })
1401
+ .pipe(take(1), tap((response) => {
1402
+ if (response.Error) {
1403
+ throw Error(response.ErrorMessage);
1404
+ }
1405
+ }));
1406
+ }
1407
+ // #endregion Menu: IsMenuAllowed
1391
1408
  // #endregion GET
1392
1409
  // #region UPDATE
1393
1410
  // #region Menu: Usuário
@@ -1908,7 +1925,7 @@ class LoginComponent {
1908
1925
  //Incialização de Senha
1909
1926
  if (response.InitializePassword) {
1910
1927
  let param = btoa(`true$${this.dominio}$${this.usuario}$${response.StatusSenha}`);
1911
- this._router.navigate([`auth/login/novaSenha/${param}`]);
1928
+ this._router.navigate([`auth/login/${param}`]);
1912
1929
  this._toastrService.success("Verifique no seu e-mail o código de validação.");
1913
1930
  }
1914
1931
  if (this._authStorageService.infraInAuthTypeId == InfraInAuthTypeId.Local && this._authStorageService.infraIn2FaTypeId != null && this._authStorageService.infraIn2FaTypeId == InfraIn2FaTypeId.Email && this._authStorageService.is2FaEnabled) {
@@ -1954,7 +1971,7 @@ class LoginComponent {
1954
1971
  //Incialização de Senha
1955
1972
  if (response.InitializePassword) {
1956
1973
  let param = btoa(`true$${this.dominio}$${this.usuarioAzure}$${response.StatusSenha}`);
1957
- this._router.navigate([`auth/login/novaSenha/${param}`]);
1974
+ this._router.navigate([`auth/login/${param}`]);
1958
1975
  this._toastrService.success("Verifique no seu e-mail o código de validação.");
1959
1976
  }
1960
1977
  if (this._authStorageService.infraInAuthTypeId == InfraInAuthTypeId.Local && this._authStorageService.infraIn2FaTypeId != null && this._authStorageService.infraIn2FaTypeId == InfraIn2FaTypeId.Email && this._authStorageService.is2FaEnabled) {
@@ -3311,6 +3328,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
3311
3328
  ], preserveWhitespaces: true, template: "<body>\n<div id=\"main-container\">\n\t<!-- #region MAIN CONTENT -->\n\t<div class=\"glb-main-container password-container\">\n\t\t<div class=\"password-info-container\">\n\t\t\t<div class=\"img mb-3\">\n\t\t\t\t<img [src]=\"statusSenha == 2 ? calendarioImg : statusSenha == 1 ? maoImg : statusSenha == 3 ? cadeadoImg : '' \" width=\"125.69\" height=\"122\">\n\t\t\t</div>\n\t\t\t<div class=\"text\">\n\t\t\t\t<h4>{{statusSenha == 2 ? 'Senha expirada' : statusSenha == 1 ? 'Primeiro acesso' : statusSenha == 3 ? 'Esqueceu sua senha?' : ''}}</h4>\n\t\t\t\t<p [innerHTML]=\"statusSenha == 2 ? senhaExpiradaText : statusSenha == 1 ? primeiroAcessoText : statusSenha == 3 ? esqueceuSenhaText : '' \"></p>\n\t\t\t</div>\n\t\t</div>\n\t\t<form [formGroup]=\"form\">\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t<label for=\"inputCode\" class=\"form-label\"> C\u00F3digo de valida\u00E7\u00E3o <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t<input type=\"text\" placeholder=\"Insira seu c\u00F3digo aqui...\" id=\"inputCode\" class=\"form-control\" formControlName=\"code\"\n\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('code'))\">\n\t\t\t\t\t<app-field-error-message [control]=\"form.get('code')\" label=\"C\u00F3digo de valida\u00E7\u00E3o\"></app-field-error-message>\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t<label for=\"inputPassword\" class=\"form-label\"> Digite uma nova Senha <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t<input type=\"password\" placeholder=\"Digite sua nova senha...\" id=\"inputPassword\" class=\"form-control\" formControlName=\"password\"\n\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('password'))\">\n\t\t\t\t\t<app-field-error-message [control]=\"form.get('password')\" label=\"{{ passwordLabel }}\"></app-field-error-message>\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"row\">\n\t\t\t\t<div class=\"col-12 mb-3\">\n\t\t\t\t\t<label for=\"inputConfirmPassword\" class=\"form-label\"> Confirme sua nova Senha <span class=\"text-danger\">*</span></label>\n\t\t\t\t\t<input type=\"password\" placeholder=\"Digite a senha novamente...\" id=\"inputConfirmPassword\" class=\"form-control\" formControlName=\"confirmPassword\"\n\t\t\t\t\t\t[class.is-invalid]=\"FormUtils.isInvalidField(form.get('confirmPassword'))\">\n\t\t\t\t\t<app-field-error-message [control]=\"form.get('confirmPassword')\" label=\"Confirme sua Senha\"></app-field-error-message>\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t\t<div class=\"btns\">\n\t\t\t\t\t<button [libLoading]=\"isLoading\" loadingText=\"Redefinindo...\" [disabled]=\"isLoading\" (click)=\"sendPassword()\" type=\"button\" class=\"btn btn-primary col w-100\">\n\t\t\t\t\t\tRedefinir senha <lib-icon iconName=\"login\" />\n\t\t\t\t\t</button>\n\n\t\t\t\t\t<div class=\"mt-3 text-center\">\n\t\t\t\t\t\t<a type=\"button\" class=\"fw-bold text-decoration-none text-secondary\" (click)=\"cancelar()\">\n\t\t\t\t\t\t\t<lib-icon iconName=\"p-seta-esquerda\" /> Voltar para a tela de login </a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t</form>\n\t</div>\n\t<!-- #endregion MAIN CONTENT -->\n</div>\n</body>\n", styles: ["body{background-color:#f5f5f5;height:100%!important;margin:0!important;padding:0!important}#main-container{display:flex;align-items:center;justify-content:center;height:100%}.password-container{padding:30px;width:37%;border:none;box-shadow:0 2px -1px #0000001a}.img{width:26%}.text{display:flex;flex-direction:column;align-items:flex-start;margin-left:auto}.text h4{font-weight:700}.text p{text-align:start}.password-info-container{display:flex;gap:15px}.btns{display:flex;flex-direction:column;align-items:center;width:100%}input::placeholder{color:#8d8d8d;font-size:15px}.icon{margin-right:5px;font-weight:700}\n"] }]
3312
3329
  }], ctorParameters: () => [{ type: i3$1.FormBuilder }, { type: ProjectUtilservice }, { type: i3.MessageService }, { type: AuthService }, { type: AuthStorageService }, { type: i8.Title }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }] });
3313
3330
 
3331
+ class ErrorMenuNotAllowed {
3332
+ constructor(router, authStorageService) {
3333
+ this.router = router;
3334
+ this.authStorageService = authStorageService;
3335
+ }
3336
+ onHome() {
3337
+ this.router.navigate(["/home"]);
3338
+ }
3339
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ErrorMenuNotAllowed, deps: [{ token: i1$1.Router }, { token: AuthStorageService }], target: i0.ɵɵFactoryTarget.Component }); }
3340
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: ErrorMenuNotAllowed, isStandalone: true, selector: "app-menu-not-allowed", ngImport: i0, template: " <div class=\"content\">\n <div class=\"image mb-4\">\n <lib-icon iconName=\"cadeado\" [iconSize]=\"128\" />\n </div>\n <h1 class=\"tittle\">Voc\u00EA n\u00E3o possui permiss\u00E3o para acessar esta tela!</h1>\n <button *ngIf=\"!this.authStorageService.isExternalLogin\" class=\"btn button mt-3\" (click)=\"onHome()\">\n Voltar para a tela inicial\n </button>\n </div>\n", styles: [".content{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100vw;height:100vh}.image{text-align:center;display:block}.tittle{font-family:Open Sans;font-style:normal;font-weight:700;font-size:48px;line-height:65px;text-align:center;color:#212529}.sub-tittle{font-family:Open Sans;font-style:normal;font-weight:400;font-size:16px;line-height:22px;width:600px;text-align:center;color:#212529}.button{background:#0d6efd;border-radius:4px;font-family:Open Sans;font-style:normal;font-weight:400;font-size:16px;line-height:22px;color:#fff}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: InfraModule }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }], preserveWhitespaces: true }); }
3341
+ }
3342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ErrorMenuNotAllowed, decorators: [{
3343
+ type: Component,
3344
+ args: [{ selector: 'app-menu-not-allowed', preserveWhitespaces: true, imports: [
3345
+ NgIf,
3346
+ InfraModule
3347
+ ], template: " <div class=\"content\">\n <div class=\"image mb-4\">\n <lib-icon iconName=\"cadeado\" [iconSize]=\"128\" />\n </div>\n <h1 class=\"tittle\">Voc\u00EA n\u00E3o possui permiss\u00E3o para acessar esta tela!</h1>\n <button *ngIf=\"!this.authStorageService.isExternalLogin\" class=\"btn button mt-3\" (click)=\"onHome()\">\n Voltar para a tela inicial\n </button>\n </div>\n", styles: [".content{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100vw;height:100vh}.image{text-align:center;display:block}.tittle{font-family:Open Sans;font-style:normal;font-weight:700;font-size:48px;line-height:65px;text-align:center;color:#212529}.sub-tittle{font-family:Open Sans;font-style:normal;font-weight:400;font-size:16px;line-height:22px;width:600px;text-align:center;color:#212529}.button{background:#0d6efd;border-radius:4px;font-family:Open Sans;font-style:normal;font-weight:400;font-size:16px;line-height:22px;color:#fff}\n"] }]
3348
+ }], ctorParameters: () => [{ type: i1$1.Router }, { type: AuthStorageService }] });
3349
+
3314
3350
  class IMenu {
3315
3351
  constructor() {
3316
3352
  this.ID = 0;
@@ -3554,6 +3590,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
3554
3590
  }], ctorParameters: () => [{ type: i1$1.Router }, { type: AuthService }] });
3555
3591
  ;
3556
3592
 
3593
+ class IsMenuAllowedlGuard {
3594
+ constructor(router, _menuService) {
3595
+ this.router = router;
3596
+ this._menuService = _menuService;
3597
+ }
3598
+ canActivate(_route, _state) {
3599
+ let route = _route.routeConfig?.path === undefined ? "" : _route.routeConfig?.path;
3600
+ return this.isMenuAllowedGuard(route);
3601
+ }
3602
+ navigateToError() {
3603
+ let notAllowed = this.router.parseUrl("/error-menu-not-allowed");
3604
+ return notAllowed;
3605
+ }
3606
+ // Valida a permissão do Menu
3607
+ async isMenuAllowedGuard(route) {
3608
+ const menuAllowed = await this.handleIsMenuAllowed(route);
3609
+ if (!menuAllowed) {
3610
+ return this.navigateToError();
3611
+ }
3612
+ return menuAllowed;
3613
+ }
3614
+ // Handle para ver se o menu é permitido.
3615
+ async handleIsMenuAllowed(route) {
3616
+ try {
3617
+ let response = false;
3618
+ await this.IsMenuAllowed(route)
3619
+ .then(res => {
3620
+ response = res;
3621
+ return response;
3622
+ })
3623
+ .catch(err => {
3624
+ throw new Error(err);
3625
+ });
3626
+ return response;
3627
+ }
3628
+ catch (error) {
3629
+ return false;
3630
+ }
3631
+ }
3632
+ // Retorna se o menu é permitido.
3633
+ IsMenuAllowed(route) {
3634
+ return new Promise((resolve, reject) => {
3635
+ this._menuService.isMenuAllowed(route).subscribe({
3636
+ next: response => {
3637
+ resolve(response.IsMenuAllowed);
3638
+ },
3639
+ error: error => {
3640
+ reject(error);
3641
+ }
3642
+ });
3643
+ });
3644
+ }
3645
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IsMenuAllowedlGuard, deps: [{ token: i1$1.Router }, { token: MenuServicesService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3646
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IsMenuAllowedlGuard, providedIn: 'root' }); }
3647
+ }
3648
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IsMenuAllowedlGuard, decorators: [{
3649
+ type: Injectable,
3650
+ args: [{ providedIn: 'root' }]
3651
+ }], ctorParameters: () => [{ type: i1$1.Router }, { type: MenuServicesService }] });
3652
+
3557
3653
  /**
3558
3654
  * \brief Intercepta uma chamada HTTP para inserir o usuário logado no header em conjunto
3559
3655
  * com o login para uso da API.
@@ -3734,7 +3830,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
3734
3830
  }] } });
3735
3831
 
3736
3832
  class NavTabsComponent {
3833
+ // #endregion PUBLIC
3834
+ // #endregion ==========> PROPERTIES <==========
3737
3835
  constructor() {
3836
+ // #region ==========> PROPERTIES <==========
3837
+ // #region PUBLIC
3738
3838
  this.subMenus = [];
3739
3839
  this.hostName = "";
3740
3840
  this.telasItem = [];
@@ -3743,9 +3843,10 @@ class NavTabsComponent {
3743
3843
  ngOnInit() {
3744
3844
  if (this.subMenus.length != 0) {
3745
3845
  this.telasItem = this.subMenus[0].telasItem;
3746
- this.listaAtiva = this.subMenus[0].titulo;
3846
+ this.listaAtiva = this.activeItem ?? this.subMenus[0].titulo;
3747
3847
  }
3748
3848
  }
3849
+ // #region ==========> UTILS <==========
3749
3850
  abaActive(b) {
3750
3851
  const index = this.subMenus.findIndex(submenu => {
3751
3852
  return submenu.titulo == b;
@@ -3754,15 +3855,19 @@ class NavTabsComponent {
3754
3855
  this.listaAtiva = this.subMenus[index].titulo;
3755
3856
  }
3756
3857
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: NavTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3757
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: NavTabsComponent, isStandalone: true, selector: "app-nav-tabs", inputs: { subMenus: "subMenus", hostName: "hostName" }, ngImport: i0, template: "<ul class=\"menu my-3\">\n @for(menu of subMenus; track $index) {\n <li class=\"menu-item\" (click)=\"abaActive(menu.titulo)\" [class.active]=\"menu.titulo === listaAtiva\">\n <a class=\"glb-cursor-pointer\" (click)=\"abaActive(menu.titulo)\" [tabindex]=\"$index\">\n {{ menu.titulo }}\n </a>\n </li>\n }\n</ul>\n@if(telasItem){\n <app-list [telasItem]=\"telasItem\" [hostName]=\"hostName\"></app-list>\n}\n", styles: ["@charset \"UTF-8\";.menu{list-style:none;padding:0;margin:0;display:flex;gap:20px}.menu-item a{text-align:center;position:relative;display:inline-block;padding-bottom:5px;color:#6c757d;text-decoration:none;transition:color .3s ease,border-bottom-color .3s ease;border-bottom:2px solid #fff;width:calc(100% + 15px)}.menu-item a:hover{color:#213b70;border-bottom:2px solid #213B70}.menu-item.active a:after{content:\"\";position:absolute;bottom:-2px;left:50%;transform:translate(-50%);width:calc(100% + 5px);height:2px;background-color:#213b70}.menu-item.active a{color:#213b70}.menu-item.active a:before{content:\"\";position:absolute;bottom:0;left:50%;transform:translate(-50%);width:0;height:0;opacity:1;transition:all .2s ease-in-out}\n"], dependencies: [{ kind: "component", type: ListComponent, selector: "app-list", inputs: ["telasItem", "hostName"] }] }); }
3858
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: NavTabsComponent, isStandalone: true, selector: "app-nav-tabs", inputs: { subMenus: "subMenus", hostName: "hostName", activeItem: "activeItem" }, ngImport: i0, template: "<ul class=\"menu my-3\">\n @for(menu of subMenus; track $index) {\n <li class=\"menu-item\" (click)=\"abaActive(menu.titulo)\" [class.active]=\"menu.titulo === listaAtiva\">\n <a class=\"glb-cursor-pointer\" (click)=\"abaActive(menu.titulo)\" [tabindex]=\"$index\">\n {{ menu.titulo }}\n </a>\n </li>\n }\n</ul>\n\n@if (telasItem) {\n <app-list [telasItem]=\"telasItem\" [hostName]=\"hostName\" />\n}\n", styles: ["@charset \"UTF-8\";.menu{list-style:none;padding:0;margin:0;display:flex;gap:20px}.menu-item a{text-align:center;position:relative;display:inline-block;padding-bottom:5px;color:#6c757d;text-decoration:none;transition:color .3s ease,border-bottom-color .3s ease;border-bottom:2px solid #fff;width:calc(100% + 15px)}.menu-item a:hover{color:#213b70;border-bottom:2px solid #213B70}.menu-item.active a:after{content:\"\";position:absolute;bottom:-2px;left:50%;transform:translate(-50%);width:calc(100% + 5px);height:2px;background-color:#213b70}.menu-item.active a{color:#213b70}.menu-item.active a:before{content:\"\";position:absolute;bottom:0;left:50%;transform:translate(-50%);width:0;height:0;opacity:1;transition:all .2s ease-in-out}\n"], dependencies: [{ kind: "component", type: ListComponent, selector: "app-list", inputs: ["telasItem", "hostName"] }] }); }
3758
3859
  }
3759
3860
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: NavTabsComponent, decorators: [{
3760
3861
  type: Component,
3761
- args: [{ selector: 'app-nav-tabs', imports: [ListComponent], template: "<ul class=\"menu my-3\">\n @for(menu of subMenus; track $index) {\n <li class=\"menu-item\" (click)=\"abaActive(menu.titulo)\" [class.active]=\"menu.titulo === listaAtiva\">\n <a class=\"glb-cursor-pointer\" (click)=\"abaActive(menu.titulo)\" [tabindex]=\"$index\">\n {{ menu.titulo }}\n </a>\n </li>\n }\n</ul>\n@if(telasItem){\n <app-list [telasItem]=\"telasItem\" [hostName]=\"hostName\"></app-list>\n}\n", styles: ["@charset \"UTF-8\";.menu{list-style:none;padding:0;margin:0;display:flex;gap:20px}.menu-item a{text-align:center;position:relative;display:inline-block;padding-bottom:5px;color:#6c757d;text-decoration:none;transition:color .3s ease,border-bottom-color .3s ease;border-bottom:2px solid #fff;width:calc(100% + 15px)}.menu-item a:hover{color:#213b70;border-bottom:2px solid #213B70}.menu-item.active a:after{content:\"\";position:absolute;bottom:-2px;left:50%;transform:translate(-50%);width:calc(100% + 5px);height:2px;background-color:#213b70}.menu-item.active a{color:#213b70}.menu-item.active a:before{content:\"\";position:absolute;bottom:0;left:50%;transform:translate(-50%);width:0;height:0;opacity:1;transition:all .2s ease-in-out}\n"] }]
3762
- }], propDecorators: { subMenus: [{
3862
+ args: [{ selector: 'app-nav-tabs', imports: [
3863
+ ListComponent
3864
+ ], template: "<ul class=\"menu my-3\">\n @for(menu of subMenus; track $index) {\n <li class=\"menu-item\" (click)=\"abaActive(menu.titulo)\" [class.active]=\"menu.titulo === listaAtiva\">\n <a class=\"glb-cursor-pointer\" (click)=\"abaActive(menu.titulo)\" [tabindex]=\"$index\">\n {{ menu.titulo }}\n </a>\n </li>\n }\n</ul>\n\n@if (telasItem) {\n <app-list [telasItem]=\"telasItem\" [hostName]=\"hostName\" />\n}\n", styles: ["@charset \"UTF-8\";.menu{list-style:none;padding:0;margin:0;display:flex;gap:20px}.menu-item a{text-align:center;position:relative;display:inline-block;padding-bottom:5px;color:#6c757d;text-decoration:none;transition:color .3s ease,border-bottom-color .3s ease;border-bottom:2px solid #fff;width:calc(100% + 15px)}.menu-item a:hover{color:#213b70;border-bottom:2px solid #213B70}.menu-item.active a:after{content:\"\";position:absolute;bottom:-2px;left:50%;transform:translate(-50%);width:calc(100% + 5px);height:2px;background-color:#213b70}.menu-item.active a{color:#213b70}.menu-item.active a:before{content:\"\";position:absolute;bottom:0;left:50%;transform:translate(-50%);width:0;height:0;opacity:1;transition:all .2s ease-in-out}\n"] }]
3865
+ }], ctorParameters: () => [], propDecorators: { subMenus: [{
3763
3866
  type: Input
3764
3867
  }], hostName: [{
3765
3868
  type: Input
3869
+ }], activeItem: [{
3870
+ type: Input
3766
3871
  }] } });
3767
3872
 
3768
3873
  class NavSubMenus {
@@ -3786,17 +3891,17 @@ class TelaItem {
3786
3891
  }
3787
3892
  }
3788
3893
  class SubMenuComponent {
3789
- /**
3790
- *
3791
- */
3894
+ // #endregion PUBLIC
3895
+ // #endregion ==========> PROPERTIES <==========
3792
3896
  constructor(_menuService, _projectUtil) {
3793
3897
  this._menuService = _menuService;
3794
3898
  this._projectUtil = _projectUtil;
3899
+ // #region ==========> PROPERTIES <==========
3900
+ // #region PUBLIC
3795
3901
  this.navSubmenus = [];
3796
3902
  this.isProduction = true;
3797
3903
  this.hostname = "https://siscandesv6.sispro.com.br";
3798
3904
  this.hostNameOutSystems = "";
3799
- this.activeItem = '';
3800
3905
  this.listaSubMenus = [];
3801
3906
  }
3802
3907
  ngOnInit() {
@@ -3808,6 +3913,7 @@ class SubMenuComponent {
3808
3913
  }
3809
3914
  this.listaFunction();
3810
3915
  }
3916
+ // #region ==========> UTILS <==========
3811
3917
  listaFunction() {
3812
3918
  for (let i = 0; i < this.navSubmenus.length; i++) {
3813
3919
  this.listaSubMenus.push(...this.navSubmenus[i].subMenuItem);
@@ -3815,15 +3921,12 @@ class SubMenuComponent {
3815
3921
  }
3816
3922
  GetHostName() {
3817
3923
  this._menuService.GetHostServerOutSystems().subscribe({
3818
- next: response => {
3819
- console.log(response.String);
3820
- this.hostNameOutSystems = response.String;
3821
- },
3924
+ next: response => this.hostNameOutSystems = response.String,
3822
3925
  error: error => this._projectUtil.showHttpError(error)
3823
3926
  });
3824
3927
  }
3825
3928
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SubMenuComponent, deps: [{ token: MenuServicesService }, { token: ProjectUtilservice }], target: i0.ɵɵFactoryTarget.Component }); }
3826
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: SubMenuComponent, isStandalone: true, selector: "app-nav-sub-menu", inputs: { navSubmenus: "navSubmenus", isProduction: "isProduction", hostname: "hostname" }, ngImport: i0, template: "<lib-container>\n <div class=\"px-5\" innerContent1>\n @for(subMenu of navSubmenus; track $index) {\n <div\n [class]=\"\n $first && subMenu.titulo == '' && subMenu.icon == ''\n ? ' mb-2'\n : 'mt-4 mb-2'\n \"\n >\n @if(subMenu.icon != ''){\n <lib-icon\n class=\"bold engrenagem-ajustada\"\n iconName=\"{{ subMenu.icon }}\"\n ></lib-icon>\n } @if(subMenu.titulo != ''){\n <span class=\"fw-bold fs-4 ms-1\">{{ subMenu.titulo }}</span>\n\n }\n <app-nav-tabs [subMenus]=\"navSubmenus[$index].subMenuItem\" [hostName]=\"hostNameOutSystems\"></app-nav-tabs>\n </div>\n @if(!$last){\n <hr />\n } }\n </div>\n</lib-container>\n", styles: [".engrenagem-ajustada{position:relative;top:-4px}\n"], dependencies: [{ kind: "component", type: NavTabsComponent, selector: "app-nav-tabs", inputs: ["subMenus", "hostName"] }, { kind: "component", type: LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "component", type: ContentContainerComponent, selector: "lib-container", inputs: ["documentation", "tabs", "advancedTabs", "containerTitle", "useBorder", "currentTab"], outputs: ["onChangeTab"] }] }); }
3929
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: SubMenuComponent, isStandalone: true, selector: "app-nav-sub-menu", inputs: { navSubmenus: "navSubmenus", isProduction: "isProduction", hostname: "hostname", activeItem: "activeItem" }, ngImport: i0, template: "<lib-container>\n <div class=\"px-5\" innerContent1>\n @for(subMenu of navSubmenus; track $index) {\n <div [class]=\"$first && subMenu.titulo == '' && subMenu.icon == '' ? ' mb-2' : 'mt-4 mb-2'\">\n @if (subMenu.icon != '') {\n <lib-icon class=\"bold engrenagem-ajustada\" iconName=\"{{ subMenu.icon }}\" />\n }\n @if (subMenu.titulo != ''){\n <span class=\"fw-bold fs-4 ms-1\">{{ subMenu.titulo }}</span>\n }\n\n <app-nav-tabs [activeItem]=\"activeItem\" [subMenus]=\"navSubmenus[$index].subMenuItem\" [hostName]=\"hostNameOutSystems\" />\n </div>\n\n @if(!$last){ <hr /> }\n }\n </div>\n</lib-container>\n", styles: [".engrenagem-ajustada{position:relative;top:-4px}\n"], dependencies: [{ kind: "component", type: NavTabsComponent, selector: "app-nav-tabs", inputs: ["subMenus", "hostName", "activeItem"] }, { kind: "component", type: LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "component", type: ContentContainerComponent, selector: "lib-container", inputs: ["documentation", "tabs", "advancedTabs", "containerTitle", "useBorder", "currentTab"], outputs: ["onChangeTab"] }] }); }
3827
3930
  }
3828
3931
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SubMenuComponent, decorators: [{
3829
3932
  type: Component,
@@ -3831,13 +3934,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
3831
3934
  NavTabsComponent,
3832
3935
  LibIconsComponent,
3833
3936
  ContentContainerComponent
3834
- ], standalone: true, template: "<lib-container>\n <div class=\"px-5\" innerContent1>\n @for(subMenu of navSubmenus; track $index) {\n <div\n [class]=\"\n $first && subMenu.titulo == '' && subMenu.icon == ''\n ? ' mb-2'\n : 'mt-4 mb-2'\n \"\n >\n @if(subMenu.icon != ''){\n <lib-icon\n class=\"bold engrenagem-ajustada\"\n iconName=\"{{ subMenu.icon }}\"\n ></lib-icon>\n } @if(subMenu.titulo != ''){\n <span class=\"fw-bold fs-4 ms-1\">{{ subMenu.titulo }}</span>\n\n }\n <app-nav-tabs [subMenus]=\"navSubmenus[$index].subMenuItem\" [hostName]=\"hostNameOutSystems\"></app-nav-tabs>\n </div>\n @if(!$last){\n <hr />\n } }\n </div>\n</lib-container>\n", styles: [".engrenagem-ajustada{position:relative;top:-4px}\n"] }]
3937
+ ], standalone: true, template: "<lib-container>\n <div class=\"px-5\" innerContent1>\n @for(subMenu of navSubmenus; track $index) {\n <div [class]=\"$first && subMenu.titulo == '' && subMenu.icon == '' ? ' mb-2' : 'mt-4 mb-2'\">\n @if (subMenu.icon != '') {\n <lib-icon class=\"bold engrenagem-ajustada\" iconName=\"{{ subMenu.icon }}\" />\n }\n @if (subMenu.titulo != ''){\n <span class=\"fw-bold fs-4 ms-1\">{{ subMenu.titulo }}</span>\n }\n\n <app-nav-tabs [activeItem]=\"activeItem\" [subMenus]=\"navSubmenus[$index].subMenuItem\" [hostName]=\"hostNameOutSystems\" />\n </div>\n\n @if(!$last){ <hr /> }\n }\n </div>\n</lib-container>\n", styles: [".engrenagem-ajustada{position:relative;top:-4px}\n"] }]
3835
3938
  }], ctorParameters: () => [{ type: MenuServicesService }, { type: ProjectUtilservice }], propDecorators: { navSubmenus: [{
3836
3939
  type: Input
3837
3940
  }], isProduction: [{
3838
3941
  type: Input
3839
3942
  }], hostname: [{
3840
3943
  type: Input
3944
+ }], activeItem: [{
3945
+ type: Input
3841
3946
  }] } });
3842
3947
 
3843
3948
  /** Modules */
@@ -3846,5 +3951,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
3846
3951
  * Generated bundle index. Do not edit.
3847
3952
  */
3848
3953
 
3849
- 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, ListComponent, LoginComponent, LoginGuard, LoginOSComponent, LoginOSGuard, LoginProgress, MenuLateralComponent, MenuServicesService, NavSubMenus, NavSubmenuCards, NavSubmenuSearchItem, NavTabsComponent, NotifSubmenuComponent, NovaSenhaComponent, PrimaryDropdownComponent, RetInfraUsuarioImg, RetMenuItemStructure, RetMenuLateral, RetMenuPromise, RetNavSubMenu, RetSubmenuWithCards, SecondaryDropdownComponent, SelecaoEstabelecimentosModalComponent, SituacaoLogin, SubMenuCardComponent, SubMenuComponent, SubMenuItem, TelaItem };
3954
+ export { AUTH_ROUTES, AuthAplicInterceptor, AuthGuard, AuthInfraInterceptor, AuthModule, AuthService, AuthStorageService, DynamicMenuComponent, ErrorMenuNotAllowed, ExternaLoginlGuard, IMenu, InfraUsuarioImg, IsMenuAllowedlGuard, LIB_CUSTOM_ENVIRONMENT_SERVICE, LIB_CUSTOM_LOGIN_SERVICE, LIB_CUSTOM_MENU_SERVICE, LIB_CUSTOM_STORAGE_SERVICE, LIB_MENU_CONFIG, LibCustomEnvironmentService, LibCustomLoginService, LibCustomMenuService, LibCustomStorageService, LibMenuConfigService, ListComponent, LoginComponent, LoginGuard, LoginOSComponent, LoginOSGuard, LoginProgress, MenuLateralComponent, MenuServicesService, NavSubMenus, NavSubmenuCards, NavSubmenuSearchItem, NavTabsComponent, NotifSubmenuComponent, NovaSenhaComponent, PrimaryDropdownComponent, RetInfraUsuarioImg, RetMenuItemStructure, RetMenuLateral, RetMenuPromise, RetNavSubMenu, RetSubmenuWithCards, SecondaryDropdownComponent, SelecaoEstabelecimentosModalComponent, SituacaoLogin, SubMenuCardComponent, SubMenuComponent, SubMenuItem, TelaItem };
3850
3955
  //# sourceMappingURL=ngx-sp-auth.mjs.map