@propmix/profet-common-header 2.0.4-beta-unstable → 2.0.5-beta-unstable

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,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, Injectable, Inject, EventEmitter, Component, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';
3
- import { Observable, reduce, forkJoin } from 'rxjs';
4
- import { HttpClient, HttpClientModule } from '@angular/common/http';
5
3
  import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
6
4
  import { DomSanitizer } from '@angular/platform-browser';
7
5
  import { Router } from '@angular/router';
8
6
  import { getCurrentUser, signOut } from 'aws-amplify/auth';
7
+ import { Observable, reduce, forkJoin } from 'rxjs';
8
+ import { HttpClient, HttpClientModule } from '@angular/common/http';
9
9
  import * as i1 from '@angular/common';
10
10
  import { CommonModule } from '@angular/common';
11
11
  import * as i2 from '@angular/material/toolbar';
@@ -146,7 +146,7 @@ class CommonHeaderService {
146
146
  constructor(config) {
147
147
  this.config = config;
148
148
  this.baseUrl = '';
149
- this.signOutUrl = '';
149
+ this.signOutUrl = window.location.origin;
150
150
  this._apiGatewayService = inject(ApiGatewayService);
151
151
  this.baseUrl = this.config.apiUrl;
152
152
  this.portalFrontendUrl = config.portalFrontendUrl;
@@ -259,6 +259,10 @@ class HeaderComponent {
259
259
  active: currentApp
260
260
  });
261
261
  });
262
+ let appData = {
263
+ enabledApps: this.appList
264
+ };
265
+ this.infoEvent.emit(appData);
262
266
  }
263
267
  },
264
268
  error: (e) => {
@@ -365,11 +369,11 @@ class HeaderComponent {
365
369
  }
366
370
  }
367
371
  onLogoutClick() {
368
- signOut({ global: true, oauth: { preferredSignOutUrl: this._ser.signOutUrl } })
372
+ signOut({ global: true, oauth: { redirectUrl: this._ser.signOutUrl } })
369
373
  .then(data => console.log(data))
370
374
  .catch(err => {
371
375
  console.log(err);
372
- signOut({ global: true, oauth: { preferredSignOutUrl: this._ser.signOutUrl } });
376
+ signOut({ global: true, oauth: { redirectUrl: this._ser.signOutUrl } });
373
377
  });
374
378
  }
375
379
  switchCompany(company) {
@@ -463,6 +467,14 @@ const APP_DOMAIN = [
463
467
  { domain: 'valuation', appCode: 'appraisal_valuation' }
464
468
  ];
465
469
 
470
+ var PROFET_APPS;
471
+ (function (PROFET_APPS) {
472
+ PROFET_APPS["profet_portal"] = "profet_portal";
473
+ PROFET_APPS["appraisal_management"] = "appraisal_management";
474
+ PROFET_APPS["appraisal_review"] = "appraisal_review";
475
+ PROFET_APPS["appraisal_valuation"] = "appraisal_valuation";
476
+ })(PROFET_APPS || (PROFET_APPS = {}));
477
+
466
478
  /*
467
479
  * Public API Surface of common-header
468
480
  */
@@ -471,5 +483,5 @@ const APP_DOMAIN = [
471
483
  * Generated bundle index. Do not edit.
472
484
  */
473
485
 
474
- export { APP_DOMAIN, CommonHeaderModule, CommonHeaderService, HeaderComponent, HeaderConfig };
486
+ export { APP_DOMAIN, CommonHeaderModule, CommonHeaderService, HeaderComponent, HeaderConfig, PROFET_APPS };
475
487
  //# sourceMappingURL=propmix-profet-common-header.mjs.map