@sunbird-cb/utils 1.0.16 → 1.0.18

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.
@@ -8,8 +8,8 @@ import { map, debounceTime, distinctUntilChanged, throttleTime, filter, catchErr
8
8
  import { CommonModule } from '@angular/common';
9
9
  import { MatIconModule, MatButtonModule, MatDialogModule, MatToolbarModule, MatCardModule, MatTooltipModule, MatSliderModule, MatProgressSpinnerModule, MatDialogRef as MatDialogRef$1 } from '@angular/material';
10
10
  import { ImageCropperModule } from 'ngx-image-cropper';
11
- import { HttpClient } from '@angular/common/http';
12
11
  import { KeycloakEventType, KeycloakService } from 'keycloak-angular';
12
+ import { HttpClient } from '@angular/common/http';
13
13
  import { Platform } from '@angular/cdk/platform';
14
14
  import { NavigationEnd, Router, ActivatedRoute } from '@angular/router';
15
15
  import * as _moment from 'moment';
@@ -62,7 +62,12 @@ var ConfigurationsService = (function () {
62
62
  color: 'primary',
63
63
  };
64
64
  this.primaryNavBarConfig = null;
65
+ this.updateOrgReadData = new BehaviorSubject('');
66
+ this.updateOrgReadDataObservable = this.updateOrgReadData.asObservable();
65
67
  }
68
+ ConfigurationsService.prototype.updateOrgData = function (id) {
69
+ this.updateOrgReadData.next(id);
70
+ };
66
71
  ConfigurationsService.decorators = [
67
72
  { type: Injectable, args: [{
68
73
  providedIn: 'root',
@@ -95,6 +100,7 @@ if (false) {
95
100
  ConfigurationsService.prototype.userProfile;
96
101
  ConfigurationsService.prototype.userProfileV2;
97
102
  ConfigurationsService.prototype.unMappedUser;
103
+ ConfigurationsService.prototype.orgReadData;
98
104
  ConfigurationsService.prototype.isAuthenticated;
99
105
  ConfigurationsService.prototype.isNewUser;
100
106
  ConfigurationsService.prototype.isActive;
@@ -115,6 +121,8 @@ if (false) {
115
121
  ConfigurationsService.prototype.primaryNavBar;
116
122
  ConfigurationsService.prototype.pageNavBar;
117
123
  ConfigurationsService.prototype.primaryNavBarConfig;
124
+ ConfigurationsService.prototype.updateOrgReadData;
125
+ ConfigurationsService.prototype.updateOrgReadDataObservable;
118
126
  }
119
127
 
120
128
  var ValueService = (function () {
@@ -1807,9 +1815,8 @@ if (false) {
1807
1815
  var storage$1 = localStorage;
1808
1816
  var storageKey$1 = 'kc';
1809
1817
  var AuthKeycloakService = (function () {
1810
- function AuthKeycloakService(http, configSvc, keycloakSvc, msAuthSvc) {
1818
+ function AuthKeycloakService(configSvc, keycloakSvc, msAuthSvc) {
1811
1819
  var _this = this;
1812
- this.http = http;
1813
1820
  this.configSvc = configSvc;
1814
1821
  this.keycloakSvc = keycloakSvc;
1815
1822
  this.msAuthSvc = msAuthSvc;
@@ -1952,7 +1959,7 @@ var AuthKeycloakService = (function () {
1952
1959
  if (_redirectUrl === void 0) { _redirectUrl = this.defaultRedirectUrl; }
1953
1960
  return __awaiter(this, void 0, void 0, function () {
1954
1961
  return __generator(this, function (_a) {
1955
- window.location.href = _redirectUrl + "apis/reset";
1962
+ window.location.href = _redirectUrl + "public/logout";
1956
1963
  return [2];
1957
1964
  });
1958
1965
  });
@@ -1960,24 +1967,23 @@ var AuthKeycloakService = (function () {
1960
1967
  AuthKeycloakService.prototype.force_logout = function () {
1961
1968
  return __awaiter(this, void 0, void 0, function () {
1962
1969
  return __generator(this, function (_a) {
1963
- switch (_a.label) {
1964
- case 0:
1965
- if (storage$1.getItem('telemetrySessionId')) {
1966
- storage$1.removeItem('telemetrySessionId');
1967
- }
1968
- try {
1969
- sessionStorage.clear();
1970
- localStorage.clear();
1971
- }
1972
- catch (_b) {
1973
- }
1974
- storage$1.removeItem(storageKey$1);
1975
- window.location.href = '/public/logout';
1976
- return [4, this.http.get('/apis/reset').toPromise()];
1977
- case 1:
1978
- _a.sent();
1979
- return [2];
1970
+ if (storage$1.getItem('telemetrySessionId')) {
1971
+ storage$1.removeItem('telemetrySessionId');
1972
+ }
1973
+ storage$1.removeItem(storageKey$1);
1974
+ if (localStorage.getItem('login') === 'true') {
1975
+ try {
1976
+ sessionStorage.clear();
1977
+ localStorage.clear();
1978
+ }
1979
+ catch (_b) {
1980
+ }
1981
+ window.location.href = this.defaultRedirectUrl + "apis/reset";
1980
1982
  }
1983
+ else {
1984
+ window.location.href = this.defaultRedirectUrl + "public/logout";
1985
+ }
1986
+ return [2];
1981
1987
  });
1982
1988
  });
1983
1989
  };
@@ -2089,17 +2095,15 @@ var AuthKeycloakService = (function () {
2089
2095
  },] }
2090
2096
  ];
2091
2097
  AuthKeycloakService.ctorParameters = function () { return [
2092
- { type: HttpClient },
2093
2098
  { type: ConfigurationsService },
2094
2099
  { type: KeycloakService },
2095
2100
  { type: AuthMicrosoftService }
2096
2101
  ]; };
2097
- /** @nocollapse */ AuthKeycloakService.ngInjectableDef = ɵɵdefineInjectable({ factory: function AuthKeycloakService_Factory() { return new AuthKeycloakService(ɵɵinject(HttpClient), ɵɵinject(ConfigurationsService), ɵɵinject(KeycloakService), ɵɵinject(AuthMicrosoftService)); }, token: AuthKeycloakService, providedIn: "root" });
2102
+ /** @nocollapse */ AuthKeycloakService.ngInjectableDef = ɵɵdefineInjectable({ factory: function AuthKeycloakService_Factory() { return new AuthKeycloakService(ɵɵinject(ConfigurationsService), ɵɵinject(KeycloakService), ɵɵinject(AuthMicrosoftService)); }, token: AuthKeycloakService, providedIn: "root" });
2098
2103
  return AuthKeycloakService;
2099
2104
  }());
2100
2105
  if (false) {
2101
2106
  AuthKeycloakService.prototype.loginChangeSubject;
2102
- AuthKeycloakService.prototype.http;
2103
2107
  AuthKeycloakService.prototype.configSvc;
2104
2108
  AuthKeycloakService.prototype.keycloakSvc;
2105
2109
  AuthKeycloakService.prototype.msAuthSvc;