@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.
- package/bundles/sunbird-cb-utils.umd.js +31 -27
- package/bundles/sunbird-cb-utils.umd.js.map +1 -1
- package/bundles/sunbird-cb-utils.umd.min.js +2 -2
- package/bundles/sunbird-cb-utils.umd.min.js.map +1 -1
- package/esm2015/lib/services/auth-keycloak.service.js +18 -19
- package/esm2015/lib/services/configurations.service.js +9 -1
- package/esm5/lib/services/auth-keycloak.service.js +23 -29
- package/esm5/lib/services/configurations.service.js +9 -1
- package/fesm2015/sunbird-cb-utils.js +23 -14
- package/fesm2015/sunbird-cb-utils.js.map +1 -1
- package/fesm5/sunbird-cb-utils.js +28 -24
- package/fesm5/sunbird-cb-utils.js.map +1 -1
- package/lib/services/auth-keycloak.service.d.ts +1 -3
- package/lib/services/configurations.service.d.ts +4 -0
- package/package.json +1 -1
- package/sunbird-cb-utils.metadata.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/dialog'), require('@angular/material/snack-bar'), require('rxjs'), require('@angular/cdk/layout'), require('rxjs/operators'), require('@angular/common'), require('@angular/material'), require('ngx-image-cropper'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@sunbird-cb/utils', ['exports', '@angular/core', '@angular/material/dialog', '@angular/material/snack-bar', 'rxjs', '@angular/cdk/layout', 'rxjs/operators', '@angular/common', '@angular/material', 'ngx-image-cropper', '@angular/common/http', '
|
|
4
|
-
(global = global || self, factory((global['sunbird-cb'] = global['sunbird-cb'] || {}, global['sunbird-cb'].utils = {}), global.ng.core, global.ng.material.dialog, global.ng.material['snack-bar'], global.rxjs, global.ng.cdk.layout, global.rxjs.operators, global.ng.common, global.ng.material, global.ngxImageCropper, global
|
|
5
|
-
}(this, (function (exports, core, dialog, snackBar, rxjs, layout, operators, common, material, ngxImageCropper,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/dialog'), require('@angular/material/snack-bar'), require('rxjs'), require('@angular/cdk/layout'), require('rxjs/operators'), require('@angular/common'), require('@angular/material'), require('ngx-image-cropper'), require('keycloak-angular'), require('@angular/common/http'), require('@angular/cdk/platform'), require('@angular/router'), require('moment'), require('lodash'), require('@angular/platform-browser')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@sunbird-cb/utils', ['exports', '@angular/core', '@angular/material/dialog', '@angular/material/snack-bar', 'rxjs', '@angular/cdk/layout', 'rxjs/operators', '@angular/common', '@angular/material', 'ngx-image-cropper', 'keycloak-angular', '@angular/common/http', '@angular/cdk/platform', '@angular/router', 'moment', 'lodash', '@angular/platform-browser'], factory) :
|
|
4
|
+
(global = global || self, factory((global['sunbird-cb'] = global['sunbird-cb'] || {}, global['sunbird-cb'].utils = {}), global.ng.core, global.ng.material.dialog, global.ng.material['snack-bar'], global.rxjs, global.ng.cdk.layout, global.rxjs.operators, global.ng.common, global.ng.material, global.ngxImageCropper, global['keycloak-angular'], global.ng.common.http, global.ng.cdk.platform, global.ng.router, global.moment, global._, global.ng.platformBrowser));
|
|
5
|
+
}(this, (function (exports, core, dialog, snackBar, rxjs, layout, operators, common, material, ngxImageCropper, keycloakAngular, http, platform, router, _moment, lodash, platformBrowser) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -269,7 +269,12 @@
|
|
|
269
269
|
color: 'primary',
|
|
270
270
|
};
|
|
271
271
|
this.primaryNavBarConfig = null;
|
|
272
|
+
this.updateOrgReadData = new rxjs.BehaviorSubject('');
|
|
273
|
+
this.updateOrgReadDataObservable = this.updateOrgReadData.asObservable();
|
|
272
274
|
}
|
|
275
|
+
ConfigurationsService.prototype.updateOrgData = function (id) {
|
|
276
|
+
this.updateOrgReadData.next(id);
|
|
277
|
+
};
|
|
273
278
|
ConfigurationsService.decorators = [
|
|
274
279
|
{ type: core.Injectable, args: [{
|
|
275
280
|
providedIn: 'root',
|
|
@@ -302,6 +307,7 @@
|
|
|
302
307
|
ConfigurationsService.prototype.userProfile;
|
|
303
308
|
ConfigurationsService.prototype.userProfileV2;
|
|
304
309
|
ConfigurationsService.prototype.unMappedUser;
|
|
310
|
+
ConfigurationsService.prototype.orgReadData;
|
|
305
311
|
ConfigurationsService.prototype.isAuthenticated;
|
|
306
312
|
ConfigurationsService.prototype.isNewUser;
|
|
307
313
|
ConfigurationsService.prototype.isActive;
|
|
@@ -322,6 +328,8 @@
|
|
|
322
328
|
ConfigurationsService.prototype.primaryNavBar;
|
|
323
329
|
ConfigurationsService.prototype.pageNavBar;
|
|
324
330
|
ConfigurationsService.prototype.primaryNavBarConfig;
|
|
331
|
+
ConfigurationsService.prototype.updateOrgReadData;
|
|
332
|
+
ConfigurationsService.prototype.updateOrgReadDataObservable;
|
|
325
333
|
}
|
|
326
334
|
|
|
327
335
|
var ValueService = (function () {
|
|
@@ -2014,9 +2022,8 @@
|
|
|
2014
2022
|
var storage$1 = localStorage;
|
|
2015
2023
|
var storageKey$1 = 'kc';
|
|
2016
2024
|
var AuthKeycloakService = (function () {
|
|
2017
|
-
function AuthKeycloakService(
|
|
2025
|
+
function AuthKeycloakService(configSvc, keycloakSvc, msAuthSvc) {
|
|
2018
2026
|
var _this = this;
|
|
2019
|
-
this.http = http;
|
|
2020
2027
|
this.configSvc = configSvc;
|
|
2021
2028
|
this.keycloakSvc = keycloakSvc;
|
|
2022
2029
|
this.msAuthSvc = msAuthSvc;
|
|
@@ -2159,7 +2166,7 @@
|
|
|
2159
2166
|
if (_redirectUrl === void 0) { _redirectUrl = this.defaultRedirectUrl; }
|
|
2160
2167
|
return __awaiter(this, void 0, void 0, function () {
|
|
2161
2168
|
return __generator(this, function (_a) {
|
|
2162
|
-
window.location.href = _redirectUrl + "
|
|
2169
|
+
window.location.href = _redirectUrl + "public/logout";
|
|
2163
2170
|
return [2];
|
|
2164
2171
|
});
|
|
2165
2172
|
});
|
|
@@ -2167,24 +2174,23 @@
|
|
|
2167
2174
|
AuthKeycloakService.prototype.force_logout = function () {
|
|
2168
2175
|
return __awaiter(this, void 0, void 0, function () {
|
|
2169
2176
|
return __generator(this, function (_a) {
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
window.location.href = '/public/logout';
|
|
2183
|
-
return [4, this.http.get('/apis/reset').toPromise()];
|
|
2184
|
-
case 1:
|
|
2185
|
-
_a.sent();
|
|
2186
|
-
return [2];
|
|
2177
|
+
if (storage$1.getItem('telemetrySessionId')) {
|
|
2178
|
+
storage$1.removeItem('telemetrySessionId');
|
|
2179
|
+
}
|
|
2180
|
+
storage$1.removeItem(storageKey$1);
|
|
2181
|
+
if (localStorage.getItem('login') === 'true') {
|
|
2182
|
+
try {
|
|
2183
|
+
sessionStorage.clear();
|
|
2184
|
+
localStorage.clear();
|
|
2185
|
+
}
|
|
2186
|
+
catch (_b) {
|
|
2187
|
+
}
|
|
2188
|
+
window.location.href = this.defaultRedirectUrl + "apis/reset";
|
|
2187
2189
|
}
|
|
2190
|
+
else {
|
|
2191
|
+
window.location.href = this.defaultRedirectUrl + "public/logout";
|
|
2192
|
+
}
|
|
2193
|
+
return [2];
|
|
2188
2194
|
});
|
|
2189
2195
|
});
|
|
2190
2196
|
};
|
|
@@ -2296,17 +2302,15 @@
|
|
|
2296
2302
|
},] }
|
|
2297
2303
|
];
|
|
2298
2304
|
AuthKeycloakService.ctorParameters = function () { return [
|
|
2299
|
-
{ type: http.HttpClient },
|
|
2300
2305
|
{ type: ConfigurationsService },
|
|
2301
2306
|
{ type: keycloakAngular.KeycloakService },
|
|
2302
2307
|
{ type: AuthMicrosoftService }
|
|
2303
2308
|
]; };
|
|
2304
|
-
/** @nocollapse */ AuthKeycloakService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AuthKeycloakService_Factory() { return new AuthKeycloakService(core.ɵɵinject(
|
|
2309
|
+
/** @nocollapse */ AuthKeycloakService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AuthKeycloakService_Factory() { return new AuthKeycloakService(core.ɵɵinject(ConfigurationsService), core.ɵɵinject(keycloakAngular.KeycloakService), core.ɵɵinject(AuthMicrosoftService)); }, token: AuthKeycloakService, providedIn: "root" });
|
|
2305
2310
|
return AuthKeycloakService;
|
|
2306
2311
|
}());
|
|
2307
2312
|
if (false) {
|
|
2308
2313
|
AuthKeycloakService.prototype.loginChangeSubject;
|
|
2309
|
-
AuthKeycloakService.prototype.http;
|
|
2310
2314
|
AuthKeycloakService.prototype.configSvc;
|
|
2311
2315
|
AuthKeycloakService.prototype.keycloakSvc;
|
|
2312
2316
|
AuthKeycloakService.prototype.msAuthSvc;
|