@sunbird-cb/utils 1.0.9 → 1.0.10
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 +1533 -1544
- 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/helpers/logout/logout.component.js +8 -8
- package/esm2015/lib/services/configurations.model.js +1 -12
- package/esm5/lib/helpers/logout/logout.component.js +8 -8
- package/esm5/lib/services/configurations.model.js +1 -12
- package/fesm2015/sunbird-cb-utils.js +1056 -1067
- package/fesm2015/sunbird-cb-utils.js.map +1 -1
- package/fesm5/sunbird-cb-utils.js +1534 -1545
- package/fesm5/sunbird-cb-utils.js.map +1 -1
- package/lib/helpers/logout/logout.component.d.ts +3 -3
- package/lib/services/configurations.model.d.ts +0 -9
- 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('@angular/
|
|
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/
|
|
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.ng.
|
|
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('@angular/common/http'), require('keycloak-angular'), 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', '@angular/common/http', 'keycloak-angular', '@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.ng.common.http, global['keycloak-angular'], 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, http, keycloakAngular, platform, router, moment, _, platformBrowser) { 'use strict';
|
|
6
6
|
|
|
7
7
|
moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;
|
|
8
8
|
var ___default = 'default' in _ ? _['default'] : _;
|
|
@@ -1696,1771 +1696,1771 @@
|
|
|
1696
1696
|
return HorizontalScrollerModule;
|
|
1697
1697
|
}());
|
|
1698
1698
|
|
|
1699
|
-
function
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
IRecursiveData.prototype.identifier;
|
|
1708
|
-
IRecursiveData.prototype.children;
|
|
1709
|
-
}
|
|
1710
|
-
var UtilityService = (function () {
|
|
1711
|
-
function UtilityService(http, platform, router$1, route) {
|
|
1712
|
-
var _this = this;
|
|
1713
|
-
this.http = http;
|
|
1714
|
-
this.platform = platform;
|
|
1715
|
-
this.router = router$1;
|
|
1716
|
-
this.route = route;
|
|
1717
|
-
this.currentRouteData = [];
|
|
1718
|
-
this.router.events.subscribe((function (event) {
|
|
1719
|
-
if (event instanceof router.NavigationEnd) {
|
|
1720
|
-
var snapshot = _this.route.snapshot;
|
|
1721
|
-
var firstChild = snapshot.root.firstChild;
|
|
1722
|
-
_this.getChildRouteData(snapshot, firstChild);
|
|
1723
|
-
}
|
|
1724
|
-
}));
|
|
1699
|
+
var LoggerService = (function () {
|
|
1700
|
+
function LoggerService(configSvc) {
|
|
1701
|
+
this.configSvc = configSvc;
|
|
1702
|
+
this.consoleError = console.error;
|
|
1703
|
+
this.consoleInfo = console.info;
|
|
1704
|
+
this.consoleLog = console.log;
|
|
1705
|
+
this.consoleWarn = console.warn;
|
|
1706
|
+
this.noConsole = (function () { });
|
|
1725
1707
|
}
|
|
1726
|
-
|
|
1727
|
-
if (firstChild) {
|
|
1728
|
-
if (firstChild.data) {
|
|
1729
|
-
this.currentRouteData.push(firstChild.data);
|
|
1730
|
-
}
|
|
1731
|
-
if (firstChild.firstChild) {
|
|
1732
|
-
this.getChildRouteData(snapshot, firstChild.firstChild);
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
};
|
|
1736
|
-
Object.defineProperty(UtilityService.prototype, "randomId", {
|
|
1737
|
-
get: function () {
|
|
1738
|
-
return RANDOM_ID_PER_USER + 1;
|
|
1739
|
-
},
|
|
1740
|
-
enumerable: true,
|
|
1741
|
-
configurable: true
|
|
1742
|
-
});
|
|
1743
|
-
UtilityService.prototype.getJson = function (url) {
|
|
1744
|
-
return this.http.get(url);
|
|
1745
|
-
};
|
|
1746
|
-
UtilityService.prototype.getLeafNodes = function (node, nodes) {
|
|
1747
|
-
var _this = this;
|
|
1748
|
-
if ((node.children || []).length === 0) {
|
|
1749
|
-
nodes.push(node);
|
|
1750
|
-
}
|
|
1751
|
-
else {
|
|
1752
|
-
if (node.children) {
|
|
1753
|
-
node.children.forEach((function (child) {
|
|
1754
|
-
_this.getLeafNodes(child, nodes);
|
|
1755
|
-
}));
|
|
1756
|
-
}
|
|
1757
|
-
}
|
|
1758
|
-
return nodes;
|
|
1759
|
-
};
|
|
1760
|
-
UtilityService.prototype.getPath = function (node, id) {
|
|
1761
|
-
var path = [];
|
|
1762
|
-
this.hasPath(node, path, id);
|
|
1763
|
-
return path;
|
|
1764
|
-
};
|
|
1765
|
-
UtilityService.prototype.hasPath = function (node, pathArr, id) {
|
|
1766
|
-
var _this = this;
|
|
1767
|
-
if (node == null) {
|
|
1768
|
-
return false;
|
|
1769
|
-
}
|
|
1770
|
-
pathArr.push(node);
|
|
1771
|
-
if (node.identifier === id) {
|
|
1772
|
-
return true;
|
|
1773
|
-
}
|
|
1774
|
-
var children = node.children || [];
|
|
1775
|
-
if (children.some((function (u) { return _this.hasPath(u, pathArr, id); }))) {
|
|
1776
|
-
return true;
|
|
1777
|
-
}
|
|
1778
|
-
pathArr.pop();
|
|
1779
|
-
return false;
|
|
1780
|
-
};
|
|
1781
|
-
Object.defineProperty(UtilityService.prototype, "isMobile", {
|
|
1782
|
-
get: function () {
|
|
1783
|
-
if (this.isIos || this.isAndroid) {
|
|
1784
|
-
return true;
|
|
1785
|
-
}
|
|
1786
|
-
return false;
|
|
1787
|
-
},
|
|
1788
|
-
enumerable: true,
|
|
1789
|
-
configurable: true
|
|
1790
|
-
});
|
|
1791
|
-
Object.defineProperty(UtilityService.prototype, "isIos", {
|
|
1708
|
+
Object.defineProperty(LoggerService.prototype, "error", {
|
|
1792
1709
|
get: function () {
|
|
1793
|
-
return this.
|
|
1710
|
+
return this.consoleError;
|
|
1794
1711
|
},
|
|
1795
1712
|
enumerable: true,
|
|
1796
1713
|
configurable: true
|
|
1797
1714
|
});
|
|
1798
|
-
Object.defineProperty(
|
|
1715
|
+
Object.defineProperty(LoggerService.prototype, "info", {
|
|
1799
1716
|
get: function () {
|
|
1800
|
-
return this.
|
|
1717
|
+
return this.configSvc.isProduction ? this.noConsole : this.consoleInfo;
|
|
1801
1718
|
},
|
|
1802
1719
|
enumerable: true,
|
|
1803
1720
|
configurable: true
|
|
1804
1721
|
});
|
|
1805
|
-
Object.defineProperty(
|
|
1722
|
+
Object.defineProperty(LoggerService.prototype, "log", {
|
|
1806
1723
|
get: function () {
|
|
1807
|
-
return
|
|
1724
|
+
return this.configSvc.isProduction ? this.noConsole : this.consoleLog;
|
|
1808
1725
|
},
|
|
1809
1726
|
enumerable: true,
|
|
1810
1727
|
configurable: true
|
|
1811
1728
|
});
|
|
1812
|
-
Object.defineProperty(
|
|
1729
|
+
Object.defineProperty(LoggerService.prototype, "warn", {
|
|
1813
1730
|
get: function () {
|
|
1814
|
-
|
|
1815
|
-
window.webkit.messageHandlers &&
|
|
1816
|
-
window.webkit.messageHandlers.appRef) {
|
|
1817
|
-
return window.webkit.messageHandlers.appRef;
|
|
1818
|
-
}
|
|
1819
|
-
return null;
|
|
1731
|
+
return this.configSvc.isProduction ? this.noConsole : this.consoleWarn;
|
|
1820
1732
|
},
|
|
1821
1733
|
enumerable: true,
|
|
1822
1734
|
configurable: true
|
|
1823
1735
|
});
|
|
1824
|
-
|
|
1825
|
-
this.
|
|
1736
|
+
LoggerService.prototype.removeConsoleAccess = function () {
|
|
1737
|
+
if (this.configSvc.isProduction) {
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1740
|
+
var noConsoleWithError = (function () {
|
|
1741
|
+
throw new Error('Console Functions Usage Are Not Allowed.');
|
|
1742
|
+
});
|
|
1743
|
+
console.warn = noConsoleWithError;
|
|
1744
|
+
console.info = noConsoleWithError;
|
|
1745
|
+
console.error = noConsoleWithError;
|
|
1826
1746
|
};
|
|
1827
|
-
|
|
1828
|
-
get: function () {
|
|
1829
|
-
var data = {
|
|
1830
|
-
module: '',
|
|
1831
|
-
pageId: '',
|
|
1832
|
-
};
|
|
1833
|
-
this.currentRouteData.map((function (rd) {
|
|
1834
|
-
if (rd.pageId) {
|
|
1835
|
-
data.pageId = data.pageId + "/" + rd.pageId;
|
|
1836
|
-
}
|
|
1837
|
-
if (rd.module) {
|
|
1838
|
-
data.module = rd.module;
|
|
1839
|
-
}
|
|
1840
|
-
}));
|
|
1841
|
-
return data;
|
|
1842
|
-
},
|
|
1843
|
-
enumerable: true,
|
|
1844
|
-
configurable: true
|
|
1845
|
-
});
|
|
1846
|
-
UtilityService.decorators = [
|
|
1747
|
+
LoggerService.decorators = [
|
|
1847
1748
|
{ type: core.Injectable, args: [{
|
|
1848
1749
|
providedIn: 'root',
|
|
1849
1750
|
},] }
|
|
1850
1751
|
];
|
|
1851
|
-
|
|
1852
|
-
{ type:
|
|
1853
|
-
{ type: platform.Platform },
|
|
1854
|
-
{ type: router.Router },
|
|
1855
|
-
{ type: router.ActivatedRoute }
|
|
1752
|
+
LoggerService.ctorParameters = function () { return [
|
|
1753
|
+
{ type: ConfigurationsService }
|
|
1856
1754
|
]; };
|
|
1857
|
-
/** @nocollapse */
|
|
1858
|
-
return
|
|
1755
|
+
/** @nocollapse */ LoggerService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function LoggerService_Factory() { return new LoggerService(core.ɵɵinject(ConfigurationsService)); }, token: LoggerService, providedIn: "root" });
|
|
1756
|
+
return LoggerService;
|
|
1859
1757
|
}());
|
|
1860
1758
|
if (false) {
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1759
|
+
LoggerService.prototype.consoleError;
|
|
1760
|
+
LoggerService.prototype.consoleInfo;
|
|
1761
|
+
LoggerService.prototype.consoleLog;
|
|
1762
|
+
LoggerService.prototype.consoleWarn;
|
|
1763
|
+
LoggerService.prototype.noConsole;
|
|
1764
|
+
LoggerService.prototype.configSvc;
|
|
1866
1765
|
}
|
|
1867
1766
|
|
|
1868
|
-
var
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
this.
|
|
1767
|
+
var msTokenExpiryDuration = 600;
|
|
1768
|
+
var storageKey = 'msLoginRequested';
|
|
1769
|
+
var storage = localStorage;
|
|
1770
|
+
var API_ENDPOINTS = {
|
|
1771
|
+
sharePointToken: '/apis/protected/v8/user/token',
|
|
1772
|
+
};
|
|
1773
|
+
var AuthMicrosoftService = (function () {
|
|
1774
|
+
function AuthMicrosoftService(loggerSvc, http) {
|
|
1775
|
+
this.loggerSvc = loggerSvc;
|
|
1776
|
+
this.http = http;
|
|
1777
|
+
this.msConfig = {
|
|
1778
|
+
clientId: '',
|
|
1779
|
+
tenant: '',
|
|
1780
|
+
defaultEmailId: '',
|
|
1781
|
+
validEmailExtensions: [],
|
|
1782
|
+
isConfigured: false,
|
|
1783
|
+
};
|
|
1784
|
+
this.emailUsed = null;
|
|
1785
|
+
this.code = null;
|
|
1786
|
+
this.msToken = {
|
|
1787
|
+
accessToken: '',
|
|
1788
|
+
expiresOn: '',
|
|
1789
|
+
resource: '',
|
|
1790
|
+
tokenType: '',
|
|
1791
|
+
};
|
|
1877
1792
|
}
|
|
1878
|
-
|
|
1879
|
-
if (this.configSvc.restrictedFeatures) {
|
|
1880
|
-
this.isDownloadableIos = !this.configSvc.restrictedFeatures.has('iosDownload');
|
|
1881
|
-
this.isDownloadableAndroid = !this.configSvc.restrictedFeatures.has('androidDownload');
|
|
1882
|
-
}
|
|
1883
|
-
};
|
|
1884
|
-
LogoutComponent.prototype.confirmed = function () {
|
|
1885
|
-
this.disabled = true;
|
|
1886
|
-
this.dialogRef.close();
|
|
1887
|
-
this.router.navigate(['public', 'logout']);
|
|
1888
|
-
};
|
|
1889
|
-
Object.defineProperty(LogoutComponent.prototype, "isDownloadable", {
|
|
1793
|
+
Object.defineProperty(AuthMicrosoftService.prototype, "isLogoutRequired", {
|
|
1890
1794
|
get: function () {
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1795
|
+
return Boolean(this.msConfig.isConfigured && this.msConfig.clientId && this.emailUsed);
|
|
1796
|
+
},
|
|
1797
|
+
enumerable: true,
|
|
1798
|
+
configurable: true
|
|
1799
|
+
});
|
|
1800
|
+
Object.defineProperty(AuthMicrosoftService.prototype, "loginUrl", {
|
|
1801
|
+
get: function () {
|
|
1802
|
+
if (this.msConfig.isConfigured && this.msConfig.clientId) {
|
|
1803
|
+
var base = 'https://login.windows.net/common/oauth2/authorize';
|
|
1804
|
+
var searchParam = new URLSearchParams({
|
|
1805
|
+
response_type: 'code',
|
|
1806
|
+
client_id: this.msConfig.clientId,
|
|
1807
|
+
redirect_uri: window.location.href,
|
|
1808
|
+
});
|
|
1809
|
+
var fragment = location.search.substring(1);
|
|
1810
|
+
if (fragment) {
|
|
1811
|
+
return base + "?" + searchParam.toString() + "#" + fragment;
|
|
1812
|
+
}
|
|
1813
|
+
return base + "?" + searchParam.toString();
|
|
1894
1814
|
}
|
|
1895
|
-
return
|
|
1815
|
+
return null;
|
|
1896
1816
|
},
|
|
1897
1817
|
enumerable: true,
|
|
1898
1818
|
configurable: true
|
|
1899
1819
|
});
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1820
|
+
AuthMicrosoftService.prototype.logoutUrl = function (redirectUrl) {
|
|
1821
|
+
if (this.isValidEmail(this.emailUsed || '')) {
|
|
1822
|
+
return "https://login.microsoftonline.com/common/oauth2/logout?post_logout_redirect_uri=" + redirectUrl;
|
|
1823
|
+
}
|
|
1824
|
+
return redirectUrl;
|
|
1825
|
+
};
|
|
1826
|
+
AuthMicrosoftService.prototype.init = function (config) {
|
|
1827
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1828
|
+
var queryParams, url;
|
|
1829
|
+
return __generator(this, function (_a) {
|
|
1830
|
+
switch (_a.label) {
|
|
1831
|
+
case 0:
|
|
1832
|
+
if (!config || !config.microsoft || !config.microsoft.isConfigured) {
|
|
1833
|
+
this.loggerSvc.warn('Empty/No Configuration passed, ignoring Microsoft Authentication');
|
|
1834
|
+
}
|
|
1835
|
+
this.msConfig = config.microsoft;
|
|
1836
|
+
queryParams = new URLSearchParams(location.search);
|
|
1837
|
+
if (!(queryParams.has('code') && queryParams.has('session_state'))) return [3, 2];
|
|
1838
|
+
this.code = queryParams.get('code');
|
|
1839
|
+
if (!this.code) {
|
|
1840
|
+
return [2];
|
|
1841
|
+
}
|
|
1842
|
+
url = location.origin + location.pathname;
|
|
1843
|
+
return [4, this.exchangeTokenForCode(this.code, url)];
|
|
1844
|
+
case 1:
|
|
1845
|
+
_a.sent();
|
|
1846
|
+
if (location.hash) {
|
|
1847
|
+
url += location.hash.substring(1);
|
|
1848
|
+
}
|
|
1849
|
+
history.replaceState(null, '', url);
|
|
1850
|
+
_a.label = 2;
|
|
1851
|
+
case 2: return [2];
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1854
|
+
});
|
|
1855
|
+
};
|
|
1856
|
+
AuthMicrosoftService.prototype.login = function (email) {
|
|
1857
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1858
|
+
var loginUrl;
|
|
1859
|
+
return __generator(this, function (_a) {
|
|
1860
|
+
if (!this.isValidEmail(email)) {
|
|
1861
|
+
this.loggerSvc.warn("Microsoft Login is not allowed for your emailId (" + email + ")");
|
|
1862
|
+
return [2];
|
|
1863
|
+
}
|
|
1864
|
+
loginUrl = this.loginUrl;
|
|
1865
|
+
if (loginUrl) {
|
|
1866
|
+
location.assign(loginUrl);
|
|
1867
|
+
}
|
|
1868
|
+
else {
|
|
1869
|
+
this.loggerSvc.warn('Unable to identify Office Login URL, Ignoring login request');
|
|
1870
|
+
}
|
|
1871
|
+
return [2];
|
|
1872
|
+
});
|
|
1873
|
+
});
|
|
1874
|
+
};
|
|
1875
|
+
AuthMicrosoftService.prototype.getToken = function (email) {
|
|
1876
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1877
|
+
var _a, error_1, _b, error_2;
|
|
1878
|
+
return __generator(this, function (_c) {
|
|
1879
|
+
switch (_c.label) {
|
|
1880
|
+
case 0:
|
|
1881
|
+
if (this.msToken &&
|
|
1882
|
+
this.isValid(this.msToken.accessToken, this.msToken.expiresOn) &&
|
|
1883
|
+
this.msToken.accessToken) {
|
|
1884
|
+
return [2, this.msToken.accessToken];
|
|
1885
|
+
}
|
|
1886
|
+
if (!this.isValidEmail(email)) return [3, 4];
|
|
1887
|
+
_c.label = 1;
|
|
1888
|
+
case 1:
|
|
1889
|
+
_c.trys.push([1, 3, , 4]);
|
|
1890
|
+
_a = this;
|
|
1891
|
+
return [4, this.getTokenForEmail(email)];
|
|
1892
|
+
case 2:
|
|
1893
|
+
_a.msToken = _c.sent();
|
|
1894
|
+
if (this.msToken.accessToken) {
|
|
1895
|
+
this.emailUsed = email;
|
|
1896
|
+
return [2, this.msToken.accessToken];
|
|
1897
|
+
}
|
|
1898
|
+
return [3, 4];
|
|
1899
|
+
case 3:
|
|
1900
|
+
error_1 = _c.sent();
|
|
1901
|
+
if (!this.code) {
|
|
1902
|
+
this.login(email);
|
|
1903
|
+
}
|
|
1904
|
+
return [3, 4];
|
|
1905
|
+
case 4:
|
|
1906
|
+
if (!(this.msConfig.defaultEmailId && this.isValidEmail(this.msConfig.defaultEmailId))) return [3, 8];
|
|
1907
|
+
_c.label = 5;
|
|
1908
|
+
case 5:
|
|
1909
|
+
_c.trys.push([5, 7, , 8]);
|
|
1910
|
+
_b = this;
|
|
1911
|
+
return [4, this.getTokenForEmail(this.msConfig.defaultEmailId)];
|
|
1912
|
+
case 6:
|
|
1913
|
+
_b.msToken = _c.sent();
|
|
1914
|
+
if (this.msToken.accessToken) {
|
|
1915
|
+
this.emailUsed = this.msConfig.defaultEmailId;
|
|
1916
|
+
return [2, this.msToken.accessToken];
|
|
1917
|
+
}
|
|
1918
|
+
return [3, 8];
|
|
1919
|
+
case 7:
|
|
1920
|
+
error_2 = _c.sent();
|
|
1921
|
+
return [3, 8];
|
|
1922
|
+
case 8: throw new Error('UNABLE TO FETCH MS AUTH TOKEN');
|
|
1923
|
+
}
|
|
1924
|
+
});
|
|
1925
|
+
});
|
|
1926
|
+
};
|
|
1927
|
+
AuthMicrosoftService.prototype.loginForSSOEnabledEmbed = function (email) {
|
|
1928
|
+
if (!this.isValidEmail(email)) {
|
|
1929
|
+
this.loggerSvc.warn('SSO Login request Ignored. Invalid Email Id for SSO Enabled Content');
|
|
1930
|
+
}
|
|
1931
|
+
var msPrevTS = 0;
|
|
1952
1932
|
try {
|
|
1953
|
-
|
|
1954
|
-
var prefix = void 0;
|
|
1955
|
-
var suffix = void 0;
|
|
1956
|
-
var fromDate = new Date(dateRange.fromDate);
|
|
1957
|
-
var toDate = new Date(dateRange.toDate);
|
|
1958
|
-
var fromDateObj = {
|
|
1959
|
-
day: fromDate.getDate(),
|
|
1960
|
-
month: fromDate.toLocaleString('default', { month: 'short' }),
|
|
1961
|
-
year: fromDate.getFullYear(),
|
|
1962
|
-
time: fromDate.getTime(),
|
|
1963
|
-
};
|
|
1964
|
-
var toDateObj = {
|
|
1965
|
-
day: toDate.getDate(),
|
|
1966
|
-
month: toDate.toLocaleString('default', { month: 'short' }),
|
|
1967
|
-
year: toDate.getFullYear(),
|
|
1968
|
-
time: toDate.getTime(),
|
|
1969
|
-
};
|
|
1970
|
-
if (fromDateObj.time === toDateObj.time) {
|
|
1971
|
-
conciseRange = fromDateObj.day + " " + fromDateObj.month + " " + fromDateObj.year;
|
|
1972
|
-
return conciseRange;
|
|
1973
|
-
}
|
|
1974
|
-
if (fromDateObj.year !== fromDateObj.year) {
|
|
1975
|
-
prefix = fromDateObj.day + " " + fromDateObj.month + " " + fromDateObj.year;
|
|
1976
|
-
suffix = toDateObj.day + " " + toDateObj.month + " " + toDateObj.year;
|
|
1977
|
-
conciseRange = prefix + " - " + suffix;
|
|
1978
|
-
return conciseRange;
|
|
1979
|
-
}
|
|
1980
|
-
if (fromDateObj.month === toDateObj.month) {
|
|
1981
|
-
prefix = "" + fromDateObj.day;
|
|
1982
|
-
suffix = toDateObj.day + " " + toDateObj.month + " " + toDateObj.year;
|
|
1983
|
-
}
|
|
1984
|
-
else {
|
|
1985
|
-
prefix = fromDateObj.day + " " + fromDateObj.month;
|
|
1986
|
-
suffix = toDateObj.day + " " + toDateObj.month + " " + toDateObj.year;
|
|
1987
|
-
}
|
|
1988
|
-
conciseRange = prefix + " - " + suffix;
|
|
1989
|
-
return conciseRange;
|
|
1933
|
+
msPrevTS = parseInt(storage.getItem(storageKey) || '0', 10);
|
|
1990
1934
|
}
|
|
1991
|
-
catch (
|
|
1992
|
-
|
|
1935
|
+
catch (error) { }
|
|
1936
|
+
if (!msPrevTS || (msPrevTS && (Date.now() - msPrevTS) / 1000 > msTokenExpiryDuration)) {
|
|
1937
|
+
this.loggerSvc.info("last login exceeded " + msTokenExpiryDuration + " duration. Redirecting to O365 login");
|
|
1938
|
+
storage.setItem(storageKey, Date.now().toString());
|
|
1939
|
+
this.login(email);
|
|
1993
1940
|
}
|
|
1994
1941
|
};
|
|
1995
|
-
|
|
1996
|
-
{
|
|
1997
|
-
|
|
1942
|
+
AuthMicrosoftService.prototype.isValidEmail = function (email) {
|
|
1943
|
+
return this.msConfig.validEmailExtensions.some((function (ext) { return email.endsWith(ext); }));
|
|
1944
|
+
};
|
|
1945
|
+
AuthMicrosoftService.prototype.isValid = function (accessToken, expiresOn) {
|
|
1946
|
+
if (accessToken && expiresOn) {
|
|
1947
|
+
return true;
|
|
1948
|
+
}
|
|
1949
|
+
return false;
|
|
1950
|
+
};
|
|
1951
|
+
AuthMicrosoftService.prototype.exchangeTokenForCode = function (code, redirectUrl) {
|
|
1952
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1953
|
+
var response;
|
|
1954
|
+
return __generator(this, function (_a) {
|
|
1955
|
+
switch (_a.label) {
|
|
1956
|
+
case 0: return [4, this.http
|
|
1957
|
+
.get(API_ENDPOINTS + "?code=" + code + "&redirectUrl=" + redirectUrl)
|
|
1958
|
+
.toPromise()];
|
|
1959
|
+
case 1:
|
|
1960
|
+
response = _a.sent();
|
|
1961
|
+
return [2, this.getInstanceFromResponse(response)];
|
|
1962
|
+
}
|
|
1963
|
+
});
|
|
1964
|
+
});
|
|
1965
|
+
};
|
|
1966
|
+
AuthMicrosoftService.prototype.getTokenForEmail = function (email) {
|
|
1967
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1968
|
+
var response;
|
|
1969
|
+
return __generator(this, function (_a) {
|
|
1970
|
+
switch (_a.label) {
|
|
1971
|
+
case 0: return [4, this.http
|
|
1972
|
+
.get(API_ENDPOINTS.sharePointToken + "?email=" + email)
|
|
1973
|
+
.toPromise()];
|
|
1974
|
+
case 1:
|
|
1975
|
+
response = _a.sent();
|
|
1976
|
+
return [2, this.getInstanceFromResponse(response)];
|
|
1977
|
+
}
|
|
1978
|
+
});
|
|
1979
|
+
});
|
|
1980
|
+
};
|
|
1981
|
+
AuthMicrosoftService.prototype.getInstanceFromResponse = function (token) {
|
|
1982
|
+
return {
|
|
1983
|
+
accessToken: token.accessToken,
|
|
1984
|
+
expiresOn: token.expiresOn,
|
|
1985
|
+
resource: token.resource,
|
|
1986
|
+
tokenType: token.tokenType,
|
|
1987
|
+
};
|
|
1988
|
+
};
|
|
1989
|
+
AuthMicrosoftService.decorators = [
|
|
1990
|
+
{ type: core.Injectable, args: [{
|
|
1991
|
+
providedIn: 'root',
|
|
1998
1992
|
},] }
|
|
1999
1993
|
];
|
|
2000
|
-
return
|
|
1994
|
+
AuthMicrosoftService.ctorParameters = function () { return [
|
|
1995
|
+
{ type: LoggerService },
|
|
1996
|
+
{ type: http.HttpClient }
|
|
1997
|
+
]; };
|
|
1998
|
+
/** @nocollapse */ AuthMicrosoftService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AuthMicrosoftService_Factory() { return new AuthMicrosoftService(core.ɵɵinject(LoggerService), core.ɵɵinject(http.HttpClient)); }, token: AuthMicrosoftService, providedIn: "root" });
|
|
1999
|
+
return AuthMicrosoftService;
|
|
2001
2000
|
}());
|
|
2002
|
-
|
|
2003
|
-
var PipeConciseDateRangeModule = (function () {
|
|
2004
|
-
function PipeConciseDateRangeModule() {
|
|
2005
|
-
}
|
|
2006
|
-
PipeConciseDateRangeModule.decorators = [
|
|
2007
|
-
{ type: core.NgModule, args: [{
|
|
2008
|
-
declarations: [PipeConciseDateRangePipe],
|
|
2009
|
-
imports: [common.CommonModule],
|
|
2010
|
-
exports: [PipeConciseDateRangePipe],
|
|
2011
|
-
},] }
|
|
2012
|
-
];
|
|
2013
|
-
return PipeConciseDateRangeModule;
|
|
2014
|
-
}());
|
|
2015
|
-
|
|
2016
|
-
var PipeCountTransformPipe = (function () {
|
|
2017
|
-
function PipeCountTransformPipe() {
|
|
2018
|
-
}
|
|
2019
|
-
PipeCountTransformPipe.prototype.transform = function (value) {
|
|
2020
|
-
var thousand = 1000;
|
|
2021
|
-
var million = 1000000;
|
|
2022
|
-
if (value > 0) {
|
|
2023
|
-
if (value < thousand) {
|
|
2024
|
-
return String(value);
|
|
2025
|
-
}
|
|
2026
|
-
if (value >= thousand && value < million) {
|
|
2027
|
-
var views = (value / thousand).toFixed(1);
|
|
2028
|
-
if (views.endsWith('0')) {
|
|
2029
|
-
return views.split('.')[0] + "K";
|
|
2030
|
-
}
|
|
2031
|
-
return views + "K";
|
|
2032
|
-
}
|
|
2033
|
-
{
|
|
2034
|
-
var views = (value / million).toFixed(1);
|
|
2035
|
-
if (views.endsWith('0')) {
|
|
2036
|
-
return views.split('.')[0] + "M";
|
|
2037
|
-
}
|
|
2038
|
-
return views + "M";
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
return '0';
|
|
2042
|
-
};
|
|
2043
|
-
PipeCountTransformPipe.decorators = [
|
|
2044
|
-
{ type: core.Pipe, args: [{
|
|
2045
|
-
name: 'pipeCountTransform',
|
|
2046
|
-
},] }
|
|
2047
|
-
];
|
|
2048
|
-
return PipeCountTransformPipe;
|
|
2049
|
-
}());
|
|
2050
|
-
|
|
2051
|
-
var PipeCountTransformModule = (function () {
|
|
2052
|
-
function PipeCountTransformModule() {
|
|
2053
|
-
}
|
|
2054
|
-
PipeCountTransformModule.decorators = [
|
|
2055
|
-
{ type: core.NgModule, args: [{
|
|
2056
|
-
declarations: [PipeCountTransformPipe],
|
|
2057
|
-
imports: [
|
|
2058
|
-
common.CommonModule,
|
|
2059
|
-
],
|
|
2060
|
-
exports: [PipeCountTransformPipe],
|
|
2061
|
-
},] }
|
|
2062
|
-
];
|
|
2063
|
-
return PipeCountTransformModule;
|
|
2064
|
-
}());
|
|
2065
|
-
|
|
2066
|
-
function ICertificationDate() { }
|
|
2067
2001
|
if (false) {
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2002
|
+
AuthMicrosoftService.prototype.msConfig;
|
|
2003
|
+
AuthMicrosoftService.prototype.emailUsed;
|
|
2004
|
+
AuthMicrosoftService.prototype.code;
|
|
2005
|
+
AuthMicrosoftService.prototype.msToken;
|
|
2006
|
+
AuthMicrosoftService.prototype.loggerSvc;
|
|
2007
|
+
AuthMicrosoftService.prototype.http;
|
|
2072
2008
|
}
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
this.months = [
|
|
2076
|
-
'Jan',
|
|
2077
|
-
'Feb',
|
|
2078
|
-
'Mar',
|
|
2079
|
-
'Apr',
|
|
2080
|
-
'May',
|
|
2081
|
-
'Jun',
|
|
2082
|
-
'Jul',
|
|
2083
|
-
'Aug',
|
|
2084
|
-
'Sep',
|
|
2085
|
-
'Oct',
|
|
2086
|
-
'Nov',
|
|
2087
|
-
'Dec',
|
|
2088
|
-
];
|
|
2089
|
-
}
|
|
2090
|
-
PipeDateConcatPipe.prototype.transform = function (value) {
|
|
2091
|
-
var dateStr = value.day + " " + this.months[value.month - 1] + " " + value.year;
|
|
2092
|
-
if (value.timeZone) {
|
|
2093
|
-
dateStr += " " + value.timeZone;
|
|
2094
|
-
}
|
|
2095
|
-
return dateStr;
|
|
2096
|
-
};
|
|
2097
|
-
PipeDateConcatPipe.decorators = [
|
|
2098
|
-
{ type: core.Pipe, args: [{
|
|
2099
|
-
name: 'pipeDateConcat',
|
|
2100
|
-
},] }
|
|
2101
|
-
];
|
|
2102
|
-
PipeDateConcatPipe.ctorParameters = function () { return []; };
|
|
2103
|
-
return PipeDateConcatPipe;
|
|
2104
|
-
}());
|
|
2009
|
+
|
|
2010
|
+
function IParsedToken() { }
|
|
2105
2011
|
if (false) {
|
|
2106
|
-
|
|
2012
|
+
IParsedToken.prototype.email;
|
|
2013
|
+
IParsedToken.prototype.encEmail;
|
|
2014
|
+
IParsedToken.prototype.name;
|
|
2015
|
+
IParsedToken.prototype.preferred_username;
|
|
2107
2016
|
}
|
|
2108
|
-
|
|
2109
|
-
var
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2017
|
+
var storage$1 = localStorage;
|
|
2018
|
+
var storageKey$1 = 'kc';
|
|
2019
|
+
var AuthKeycloakService = (function () {
|
|
2020
|
+
function AuthKeycloakService(http, configSvc, keycloakSvc, msAuthSvc) {
|
|
2021
|
+
var _this = this;
|
|
2022
|
+
this.http = http;
|
|
2023
|
+
this.configSvc = configSvc;
|
|
2024
|
+
this.keycloakSvc = keycloakSvc;
|
|
2025
|
+
this.msAuthSvc = msAuthSvc;
|
|
2026
|
+
this.loginChangeSubject = new rxjs.ReplaySubject(1);
|
|
2027
|
+
this.loginChangeSubject.subscribe((function (isLoggedIn) {
|
|
2028
|
+
_this.configSvc.isAuthenticated = isLoggedIn;
|
|
2029
|
+
if (isLoggedIn &&
|
|
2030
|
+
_this.configSvc.instanceConfig &&
|
|
2031
|
+
Boolean(_this.configSvc.instanceConfig.disablePidCheck)) {
|
|
2032
|
+
_this.configSvc.userProfile = {
|
|
2033
|
+
email: _this.userEmail,
|
|
2034
|
+
userName: _this.userName,
|
|
2035
|
+
userId: _this.userId || '',
|
|
2036
|
+
};
|
|
2037
|
+
}
|
|
2038
|
+
}));
|
|
2126
2039
|
}
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
return
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2040
|
+
Object.defineProperty(AuthKeycloakService.prototype, "isLoggedIn$", {
|
|
2041
|
+
get: function () {
|
|
2042
|
+
return this.loginChangeSubject.asObservable();
|
|
2043
|
+
},
|
|
2044
|
+
enumerable: true,
|
|
2045
|
+
configurable: true
|
|
2046
|
+
});
|
|
2047
|
+
Object.defineProperty(AuthKeycloakService.prototype, "isLoggedIn", {
|
|
2048
|
+
get: function () {
|
|
2049
|
+
return this.keycloakSvc.isLoggedIn();
|
|
2050
|
+
},
|
|
2051
|
+
enumerable: true,
|
|
2052
|
+
configurable: true
|
|
2053
|
+
});
|
|
2054
|
+
Object.defineProperty(AuthKeycloakService.prototype, "isAuthenticated", {
|
|
2055
|
+
get: function () {
|
|
2056
|
+
return this.keycloakSvc.getKeycloakInstance().authenticated;
|
|
2057
|
+
},
|
|
2058
|
+
enumerable: true,
|
|
2059
|
+
configurable: true
|
|
2060
|
+
});
|
|
2061
|
+
Object.defineProperty(AuthKeycloakService.prototype, "token", {
|
|
2062
|
+
get: function () {
|
|
2063
|
+
return this.keycloakSvc.getKeycloakInstance().token;
|
|
2064
|
+
},
|
|
2065
|
+
enumerable: true,
|
|
2066
|
+
configurable: true
|
|
2067
|
+
});
|
|
2068
|
+
Object.defineProperty(AuthKeycloakService.prototype, "sessionId", {
|
|
2069
|
+
get: function () {
|
|
2070
|
+
return this.keycloakSvc.getKeycloakInstance().sessionId;
|
|
2071
|
+
},
|
|
2072
|
+
enumerable: true,
|
|
2073
|
+
configurable: true
|
|
2074
|
+
});
|
|
2075
|
+
Object.defineProperty(AuthKeycloakService.prototype, "userId", {
|
|
2076
|
+
get: function () {
|
|
2077
|
+
var kc = this.keycloakSvc.getKeycloakInstance();
|
|
2078
|
+
if (!kc) {
|
|
2079
|
+
return;
|
|
2080
|
+
}
|
|
2081
|
+
return (kc.tokenParsed && kc.tokenParsed.sub) || (kc.idTokenParsed && kc.idTokenParsed.sub);
|
|
2082
|
+
},
|
|
2083
|
+
enumerable: true,
|
|
2084
|
+
configurable: true
|
|
2085
|
+
});
|
|
2086
|
+
Object.defineProperty(AuthKeycloakService.prototype, "userEmail", {
|
|
2087
|
+
get: function () {
|
|
2088
|
+
var kc = this.keycloakSvc.getKeycloakInstance();
|
|
2089
|
+
var tokenParsed = ((kc.tokenParsed));
|
|
2090
|
+
var idTokenParsed = ((kc.idTokenParsed));
|
|
2091
|
+
return ((tokenParsed && tokenParsed.email) ||
|
|
2092
|
+
(idTokenParsed && idTokenParsed.email) ||
|
|
2093
|
+
(idTokenParsed && idTokenParsed.encEmail) ||
|
|
2094
|
+
(tokenParsed && tokenParsed.preferred_username) ||
|
|
2095
|
+
(idTokenParsed && idTokenParsed.preferred_username));
|
|
2096
|
+
},
|
|
2097
|
+
enumerable: true,
|
|
2098
|
+
configurable: true
|
|
2099
|
+
});
|
|
2100
|
+
Object.defineProperty(AuthKeycloakService.prototype, "userName", {
|
|
2101
|
+
get: function () {
|
|
2102
|
+
var kc = this.keycloakSvc.getKeycloakInstance();
|
|
2103
|
+
return ((kc.tokenParsed && (((kc.tokenParsed))).name) ||
|
|
2104
|
+
(kc.idTokenParsed && (((kc.idTokenParsed))).name));
|
|
2105
|
+
},
|
|
2106
|
+
enumerable: true,
|
|
2107
|
+
configurable: true
|
|
2108
|
+
});
|
|
2109
|
+
AuthKeycloakService.prototype.initAuth = function () {
|
|
2110
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2111
|
+
var instanceConfig, err_1;
|
|
2112
|
+
return __generator(this, function (_a) {
|
|
2113
|
+
switch (_a.label) {
|
|
2114
|
+
case 0:
|
|
2115
|
+
if (!this.configSvc.instanceConfig) {
|
|
2116
|
+
return [2, false];
|
|
2117
|
+
}
|
|
2118
|
+
instanceConfig = this.configSvc.instanceConfig;
|
|
2119
|
+
if (instanceConfig.microsoft.isConfigured) {
|
|
2120
|
+
this.msAuthSvc.init({ microsoft: instanceConfig.microsoft });
|
|
2121
|
+
}
|
|
2122
|
+
_a.label = 1;
|
|
2123
|
+
case 1:
|
|
2124
|
+
_a.trys.push([1, 3, , 4]);
|
|
2125
|
+
this.setupGlobalAuthResponder();
|
|
2126
|
+
this.addKeycloakEventListener();
|
|
2127
|
+
return [4, this.keycloakSvc.init({
|
|
2128
|
+
config: {
|
|
2129
|
+
url: instanceConfig.keycloak.url,
|
|
2130
|
+
realm: instanceConfig.keycloak.realm,
|
|
2131
|
+
clientId: instanceConfig.keycloak.clientId,
|
|
2132
|
+
},
|
|
2133
|
+
initOptions: __assign({}, this.getSavedKcConfig(), { onLoad: instanceConfig.keycloak.onLoad || 'check-sso', checkLoginIframe: false }),
|
|
2134
|
+
enableBearerInterceptor: true,
|
|
2135
|
+
loadUserProfileAtStartUp: false,
|
|
2136
|
+
bearerExcludedUrls: instanceConfig.keycloak.bearerExcludedUrls,
|
|
2137
|
+
})];
|
|
2138
|
+
case 2: return [2, _a.sent()];
|
|
2139
|
+
case 3:
|
|
2140
|
+
err_1 = _a.sent();
|
|
2141
|
+
return [2, false];
|
|
2142
|
+
case 4: return [2];
|
|
2162
2143
|
}
|
|
2163
|
-
|
|
2164
|
-
|
|
2144
|
+
});
|
|
2145
|
+
});
|
|
2146
|
+
};
|
|
2147
|
+
AuthKeycloakService.prototype.login = function (idpHint, redirectUrl) {
|
|
2148
|
+
if (idpHint === void 0) { idpHint = 'E'; }
|
|
2149
|
+
if (redirectUrl === void 0) { redirectUrl = this.defaultRedirectUrl; }
|
|
2150
|
+
return this.keycloakSvc.login({
|
|
2151
|
+
idpHint: idpHint,
|
|
2152
|
+
redirectUri: redirectUrl,
|
|
2153
|
+
});
|
|
2154
|
+
};
|
|
2155
|
+
AuthKeycloakService.prototype.register = function (redirectUrl) {
|
|
2156
|
+
if (redirectUrl === void 0) { redirectUrl = this.defaultRedirectUrl; }
|
|
2157
|
+
return this.keycloakSvc.register({
|
|
2158
|
+
redirectUri: redirectUrl,
|
|
2159
|
+
});
|
|
2160
|
+
};
|
|
2161
|
+
AuthKeycloakService.prototype.logout = function (_redirectUrl) {
|
|
2162
|
+
if (_redirectUrl === void 0) { _redirectUrl = this.defaultRedirectUrl; }
|
|
2163
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2164
|
+
return __generator(this, function (_a) {
|
|
2165
|
+
window.location.href = _redirectUrl + "apis/reset";
|
|
2166
|
+
return [2];
|
|
2167
|
+
});
|
|
2168
|
+
});
|
|
2169
|
+
};
|
|
2170
|
+
AuthKeycloakService.prototype.force_logout = function () {
|
|
2171
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2172
|
+
return __generator(this, function (_a) {
|
|
2173
|
+
switch (_a.label) {
|
|
2174
|
+
case 0: return [4, this.http.get('/apis/reset').toPromise()];
|
|
2175
|
+
case 1:
|
|
2176
|
+
_a.sent();
|
|
2177
|
+
return [2];
|
|
2165
2178
|
}
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
return this.defaultDuration(h, m, s);
|
|
2169
|
-
}
|
|
2179
|
+
});
|
|
2180
|
+
});
|
|
2170
2181
|
};
|
|
2171
|
-
|
|
2172
|
-
var
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2182
|
+
AuthKeycloakService.prototype.addKeycloakEventListener = function () {
|
|
2183
|
+
var _this = this;
|
|
2184
|
+
this.keycloakSvc.keycloakEvents$.subscribe((function (event) {
|
|
2185
|
+
switch (event.type) {
|
|
2186
|
+
case keycloakAngular.KeycloakEventType.OnAuthError:
|
|
2187
|
+
_this.loginChangeSubject.next(false);
|
|
2188
|
+
break;
|
|
2189
|
+
case keycloakAngular.KeycloakEventType.OnAuthLogout:
|
|
2190
|
+
_this.loginChangeSubject.next(false);
|
|
2191
|
+
storage$1.removeItem(storageKey$1);
|
|
2192
|
+
break;
|
|
2193
|
+
case keycloakAngular.KeycloakEventType.OnAuthRefreshError:
|
|
2194
|
+
break;
|
|
2195
|
+
case keycloakAngular.KeycloakEventType.OnAuthRefreshSuccess:
|
|
2196
|
+
break;
|
|
2197
|
+
case keycloakAngular.KeycloakEventType.OnAuthSuccess:
|
|
2198
|
+
break;
|
|
2199
|
+
case keycloakAngular.KeycloakEventType.OnReady:
|
|
2200
|
+
_this.loginChangeSubject.next(event.args);
|
|
2201
|
+
if (event.args) {
|
|
2202
|
+
_this.saveKeycloakConfig();
|
|
2203
|
+
}
|
|
2204
|
+
break;
|
|
2205
|
+
case keycloakAngular.KeycloakEventType.OnTokenExpired:
|
|
2206
|
+
_this.keycloakSvc.updateToken(60);
|
|
2207
|
+
break;
|
|
2208
|
+
}
|
|
2209
|
+
}));
|
|
2177
2210
|
};
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2211
|
+
AuthKeycloakService.prototype.setupGlobalAuthResponder = function () {
|
|
2212
|
+
var _this = this;
|
|
2213
|
+
rxjs.fromEvent(window, 'message')
|
|
2214
|
+
.pipe(operators.filter((function (event) {
|
|
2215
|
+
return Boolean(event) &&
|
|
2216
|
+
Boolean(event.data) &&
|
|
2217
|
+
event.data.type === 'AUTH_REQUEST' &&
|
|
2218
|
+
Boolean(event.source && typeof event.source.postMessage === 'function');
|
|
2219
|
+
})))
|
|
2220
|
+
.subscribe((function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
2221
|
+
var contentWindow, token, response;
|
|
2222
|
+
return __generator(this, function (_a) {
|
|
2223
|
+
switch (_a.label) {
|
|
2224
|
+
case 0:
|
|
2225
|
+
contentWindow = ((event.source));
|
|
2226
|
+
return [4, this.keycloakSvc.getToken()];
|
|
2227
|
+
case 1:
|
|
2228
|
+
token = _a.sent();
|
|
2229
|
+
response = {
|
|
2230
|
+
app: 'WEB_PORTAL',
|
|
2231
|
+
type: 'AUTH_RESPONSE',
|
|
2232
|
+
state: 'NONE',
|
|
2233
|
+
plugin: 'NONE',
|
|
2234
|
+
data: {
|
|
2235
|
+
token: token,
|
|
2236
|
+
id: event.data && event.data.data && event.data.data.id,
|
|
2237
|
+
},
|
|
2238
|
+
};
|
|
2239
|
+
contentWindow.postMessage(response, '*');
|
|
2240
|
+
return [2];
|
|
2241
|
+
}
|
|
2242
|
+
});
|
|
2243
|
+
}); }));
|
|
2206
2244
|
};
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
function PipeHtmlTagRemovalModule() {
|
|
2217
|
-
}
|
|
2218
|
-
PipeHtmlTagRemovalModule.decorators = [
|
|
2219
|
-
{ type: core.NgModule, args: [{
|
|
2220
|
-
declarations: [PipeHtmlTagRemovalPipe],
|
|
2221
|
-
imports: [
|
|
2222
|
-
common.CommonModule,
|
|
2223
|
-
],
|
|
2224
|
-
exports: [PipeHtmlTagRemovalPipe],
|
|
2225
|
-
},] }
|
|
2226
|
-
];
|
|
2227
|
-
return PipeHtmlTagRemovalModule;
|
|
2228
|
-
}());
|
|
2229
|
-
|
|
2230
|
-
var PipeFilterPipe = (function () {
|
|
2231
|
-
function PipeFilterPipe() {
|
|
2232
|
-
}
|
|
2233
|
-
PipeFilterPipe.prototype.transform = function (value, keys, term) {
|
|
2234
|
-
if (!term) {
|
|
2235
|
-
return value;
|
|
2236
|
-
}
|
|
2237
|
-
return (value || []).filter((function (item) { return keys.split(',')
|
|
2238
|
-
.some((function (key) { return item.hasOwnProperty(key) && new RegExp("^" + term + "$", 'gi').test(item[key]); })); }));
|
|
2245
|
+
AuthKeycloakService.prototype.saveKeycloakConfig = function () {
|
|
2246
|
+
var kc = this.keycloakSvc.getKeycloakInstance();
|
|
2247
|
+
var kcInitOptions = {
|
|
2248
|
+
idToken: kc.idToken,
|
|
2249
|
+
refreshToken: kc.refreshToken,
|
|
2250
|
+
timeSkew: kc.timeSkew,
|
|
2251
|
+
token: kc.token,
|
|
2252
|
+
};
|
|
2253
|
+
storage$1.setItem(storageKey$1, JSON.stringify(kcInitOptions));
|
|
2239
2254
|
};
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2255
|
+
AuthKeycloakService.prototype.getSavedKcConfig = function () {
|
|
2256
|
+
try {
|
|
2257
|
+
var lastSaved = storage$1.getItem(storageKey$1);
|
|
2258
|
+
if (lastSaved) {
|
|
2259
|
+
var processed = JSON.parse(lastSaved);
|
|
2260
|
+
if ('idToken' in processed &&
|
|
2261
|
+
'refreshToken' in processed &&
|
|
2262
|
+
'timeSkew' in processed &&
|
|
2263
|
+
'token' in processed) {
|
|
2264
|
+
return processed;
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
catch (e) { }
|
|
2269
|
+
return {};
|
|
2270
|
+
};
|
|
2271
|
+
Object.defineProperty(AuthKeycloakService.prototype, "defaultRedirectUrl", {
|
|
2272
|
+
get: function () {
|
|
2273
|
+
try {
|
|
2274
|
+
var baseUrl = document.baseURI;
|
|
2275
|
+
return baseUrl || location.origin;
|
|
2276
|
+
}
|
|
2277
|
+
catch (error) {
|
|
2278
|
+
return location.origin;
|
|
2279
|
+
}
|
|
2280
|
+
},
|
|
2281
|
+
enumerable: true,
|
|
2282
|
+
configurable: true
|
|
2283
|
+
});
|
|
2284
|
+
AuthKeycloakService.decorators = [
|
|
2285
|
+
{ type: core.Injectable, args: [{
|
|
2286
|
+
providedIn: 'root',
|
|
2258
2287
|
},] }
|
|
2259
2288
|
];
|
|
2260
|
-
return
|
|
2289
|
+
AuthKeycloakService.ctorParameters = function () { return [
|
|
2290
|
+
{ type: http.HttpClient },
|
|
2291
|
+
{ type: ConfigurationsService },
|
|
2292
|
+
{ type: keycloakAngular.KeycloakService },
|
|
2293
|
+
{ type: AuthMicrosoftService }
|
|
2294
|
+
]; };
|
|
2295
|
+
/** @nocollapse */ AuthKeycloakService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AuthKeycloakService_Factory() { return new AuthKeycloakService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(ConfigurationsService), core.ɵɵinject(keycloakAngular.KeycloakService), core.ɵɵinject(AuthMicrosoftService)); }, token: AuthKeycloakService, providedIn: "root" });
|
|
2296
|
+
return AuthKeycloakService;
|
|
2261
2297
|
}());
|
|
2298
|
+
if (false) {
|
|
2299
|
+
AuthKeycloakService.prototype.loginChangeSubject;
|
|
2300
|
+
AuthKeycloakService.prototype.http;
|
|
2301
|
+
AuthKeycloakService.prototype.configSvc;
|
|
2302
|
+
AuthKeycloakService.prototype.keycloakSvc;
|
|
2303
|
+
AuthKeycloakService.prototype.msAuthSvc;
|
|
2304
|
+
}
|
|
2262
2305
|
|
|
2263
|
-
|
|
2264
|
-
|
|
2306
|
+
function IWindowMobileAppModified() { }
|
|
2307
|
+
if (false) {
|
|
2308
|
+
IWindowMobileAppModified.prototype.appRef;
|
|
2309
|
+
IWindowMobileAppModified.prototype.webkit;
|
|
2310
|
+
}
|
|
2311
|
+
var RANDOM_ID_PER_USER = 0;
|
|
2312
|
+
function IRecursiveData() { }
|
|
2313
|
+
if (false) {
|
|
2314
|
+
IRecursiveData.prototype.identifier;
|
|
2315
|
+
IRecursiveData.prototype.children;
|
|
2316
|
+
}
|
|
2317
|
+
var UtilityService = (function () {
|
|
2318
|
+
function UtilityService(http, platform, router$1, route) {
|
|
2319
|
+
var _this = this;
|
|
2320
|
+
this.http = http;
|
|
2321
|
+
this.platform = platform;
|
|
2322
|
+
this.router = router$1;
|
|
2323
|
+
this.route = route;
|
|
2324
|
+
this.currentRouteData = [];
|
|
2325
|
+
this.router.events.subscribe((function (event) {
|
|
2326
|
+
if (event instanceof router.NavigationEnd) {
|
|
2327
|
+
var snapshot = _this.route.snapshot;
|
|
2328
|
+
var firstChild = snapshot.root.firstChild;
|
|
2329
|
+
_this.getChildRouteData(snapshot, firstChild);
|
|
2330
|
+
}
|
|
2331
|
+
}));
|
|
2265
2332
|
}
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2333
|
+
UtilityService.prototype.getChildRouteData = function (snapshot, firstChild) {
|
|
2334
|
+
if (firstChild) {
|
|
2335
|
+
if (firstChild.data) {
|
|
2336
|
+
this.currentRouteData.push(firstChild.data);
|
|
2337
|
+
}
|
|
2338
|
+
if (firstChild.firstChild) {
|
|
2339
|
+
this.getChildRouteData(snapshot, firstChild.firstChild);
|
|
2340
|
+
}
|
|
2273
2341
|
}
|
|
2274
|
-
|
|
2275
|
-
|
|
2342
|
+
};
|
|
2343
|
+
Object.defineProperty(UtilityService.prototype, "randomId", {
|
|
2344
|
+
get: function () {
|
|
2345
|
+
return RANDOM_ID_PER_USER + 1;
|
|
2346
|
+
},
|
|
2347
|
+
enumerable: true,
|
|
2348
|
+
configurable: true
|
|
2349
|
+
});
|
|
2350
|
+
UtilityService.prototype.getJson = function (url) {
|
|
2351
|
+
return this.http.get(url);
|
|
2352
|
+
};
|
|
2353
|
+
UtilityService.prototype.getLeafNodes = function (node, nodes) {
|
|
2354
|
+
var _this = this;
|
|
2355
|
+
if ((node.children || []).length === 0) {
|
|
2356
|
+
nodes.push(node);
|
|
2276
2357
|
}
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
if (result && result.length <= 0) {
|
|
2283
|
-
return [-1];
|
|
2358
|
+
else {
|
|
2359
|
+
if (node.children) {
|
|
2360
|
+
node.children.forEach((function (child) {
|
|
2361
|
+
_this.getLeafNodes(child, nodes);
|
|
2362
|
+
}));
|
|
2284
2363
|
}
|
|
2285
|
-
return result;
|
|
2286
2364
|
}
|
|
2287
|
-
return
|
|
2288
|
-
return it.title.toLowerCase().includes(searchTextLowerCase);
|
|
2289
|
-
}));
|
|
2365
|
+
return nodes;
|
|
2290
2366
|
};
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
function PipeFilterSearchModule() {
|
|
2301
|
-
}
|
|
2302
|
-
PipeFilterSearchModule.decorators = [
|
|
2303
|
-
{ type: core.NgModule, args: [{
|
|
2304
|
-
declarations: [PipeFilterSearchPipe],
|
|
2305
|
-
imports: [
|
|
2306
|
-
common.CommonModule,
|
|
2307
|
-
],
|
|
2308
|
-
exports: [PipeFilterSearchPipe],
|
|
2309
|
-
},] }
|
|
2310
|
-
];
|
|
2311
|
-
return PipeFilterSearchModule;
|
|
2312
|
-
}());
|
|
2313
|
-
|
|
2314
|
-
var PipeListFilterPipe = (function () {
|
|
2315
|
-
function PipeListFilterPipe() {
|
|
2316
|
-
}
|
|
2317
|
-
PipeListFilterPipe.prototype.transform = function (value, keys, term) {
|
|
2318
|
-
if (!term) {
|
|
2319
|
-
return value;
|
|
2367
|
+
UtilityService.prototype.getPath = function (node, id) {
|
|
2368
|
+
var path = [];
|
|
2369
|
+
this.hasPath(node, path, id);
|
|
2370
|
+
return path;
|
|
2371
|
+
};
|
|
2372
|
+
UtilityService.prototype.hasPath = function (node, pathArr, id) {
|
|
2373
|
+
var _this = this;
|
|
2374
|
+
if (node == null) {
|
|
2375
|
+
return false;
|
|
2320
2376
|
}
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2377
|
+
pathArr.push(node);
|
|
2378
|
+
if (node.identifier === id) {
|
|
2379
|
+
return true;
|
|
2380
|
+
}
|
|
2381
|
+
var children = node.children || [];
|
|
2382
|
+
if (children.some((function (u) { return _this.hasPath(u, pathArr, id); }))) {
|
|
2383
|
+
return true;
|
|
2384
|
+
}
|
|
2385
|
+
pathArr.pop();
|
|
2386
|
+
return false;
|
|
2324
2387
|
};
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2388
|
+
Object.defineProperty(UtilityService.prototype, "isMobile", {
|
|
2389
|
+
get: function () {
|
|
2390
|
+
if (this.isIos || this.isAndroid) {
|
|
2391
|
+
return true;
|
|
2392
|
+
}
|
|
2393
|
+
return false;
|
|
2394
|
+
},
|
|
2395
|
+
enumerable: true,
|
|
2396
|
+
configurable: true
|
|
2397
|
+
});
|
|
2398
|
+
Object.defineProperty(UtilityService.prototype, "isIos", {
|
|
2399
|
+
get: function () {
|
|
2400
|
+
return this.platform.IOS;
|
|
2401
|
+
},
|
|
2402
|
+
enumerable: true,
|
|
2403
|
+
configurable: true
|
|
2404
|
+
});
|
|
2405
|
+
Object.defineProperty(UtilityService.prototype, "isAndroid", {
|
|
2406
|
+
get: function () {
|
|
2407
|
+
return this.platform.ANDROID;
|
|
2408
|
+
},
|
|
2409
|
+
enumerable: true,
|
|
2410
|
+
configurable: true
|
|
2411
|
+
});
|
|
2412
|
+
Object.defineProperty(UtilityService.prototype, "isAndroidApp", {
|
|
2413
|
+
get: function () {
|
|
2414
|
+
return Boolean(window.appRef);
|
|
2415
|
+
},
|
|
2416
|
+
enumerable: true,
|
|
2417
|
+
configurable: true
|
|
2418
|
+
});
|
|
2419
|
+
Object.defineProperty(UtilityService.prototype, "iOsAppRef", {
|
|
2420
|
+
get: function () {
|
|
2421
|
+
if (window.webkit &&
|
|
2422
|
+
window.webkit.messageHandlers &&
|
|
2423
|
+
window.webkit.messageHandlers.appRef) {
|
|
2424
|
+
return window.webkit.messageHandlers.appRef;
|
|
2425
|
+
}
|
|
2426
|
+
return null;
|
|
2427
|
+
},
|
|
2428
|
+
enumerable: true,
|
|
2429
|
+
configurable: true
|
|
2430
|
+
});
|
|
2431
|
+
UtilityService.prototype.setRouteData = function (data) {
|
|
2432
|
+
this.currentRouteData = data;
|
|
2433
|
+
};
|
|
2434
|
+
Object.defineProperty(UtilityService.prototype, "routeData", {
|
|
2435
|
+
get: function () {
|
|
2436
|
+
var data = {
|
|
2437
|
+
module: '',
|
|
2438
|
+
pageId: '',
|
|
2439
|
+
};
|
|
2440
|
+
this.currentRouteData.map((function (rd) {
|
|
2441
|
+
if (rd.pageId) {
|
|
2442
|
+
data.pageId = data.pageId + "/" + rd.pageId;
|
|
2443
|
+
}
|
|
2444
|
+
if (rd.module) {
|
|
2445
|
+
data.module = rd.module;
|
|
2446
|
+
}
|
|
2447
|
+
}));
|
|
2448
|
+
return data;
|
|
2449
|
+
},
|
|
2450
|
+
enumerable: true,
|
|
2451
|
+
configurable: true
|
|
2452
|
+
});
|
|
2453
|
+
UtilityService.decorators = [
|
|
2454
|
+
{ type: core.Injectable, args: [{
|
|
2455
|
+
providedIn: 'root',
|
|
2343
2456
|
},] }
|
|
2344
2457
|
];
|
|
2345
|
-
return
|
|
2458
|
+
UtilityService.ctorParameters = function () { return [
|
|
2459
|
+
{ type: http.HttpClient },
|
|
2460
|
+
{ type: platform.Platform },
|
|
2461
|
+
{ type: router.Router },
|
|
2462
|
+
{ type: router.ActivatedRoute }
|
|
2463
|
+
]; };
|
|
2464
|
+
/** @nocollapse */ UtilityService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function UtilityService_Factory() { return new UtilityService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(platform.Platform), core.ɵɵinject(router.Router), core.ɵɵinject(router.ActivatedRoute)); }, token: UtilityService, providedIn: "root" });
|
|
2465
|
+
return UtilityService;
|
|
2346
2466
|
}());
|
|
2467
|
+
if (false) {
|
|
2468
|
+
UtilityService.prototype.currentRouteData;
|
|
2469
|
+
UtilityService.prototype.http;
|
|
2470
|
+
UtilityService.prototype.platform;
|
|
2471
|
+
UtilityService.prototype.router;
|
|
2472
|
+
UtilityService.prototype.route;
|
|
2473
|
+
}
|
|
2347
2474
|
|
|
2348
|
-
var
|
|
2349
|
-
function
|
|
2475
|
+
var LogoutComponent = (function () {
|
|
2476
|
+
function LogoutComponent(dialogRef, authSvc, configSvc, utilitySvc) {
|
|
2477
|
+
this.dialogRef = dialogRef;
|
|
2478
|
+
this.authSvc = authSvc;
|
|
2479
|
+
this.configSvc = configSvc;
|
|
2480
|
+
this.utilitySvc = utilitySvc;
|
|
2481
|
+
this.disabled = false;
|
|
2482
|
+
this.isDownloadableIos = false;
|
|
2483
|
+
this.isDownloadableAndroid = false;
|
|
2350
2484
|
}
|
|
2351
|
-
|
|
2352
|
-
if (
|
|
2353
|
-
|
|
2485
|
+
LogoutComponent.prototype.ngOnInit = function () {
|
|
2486
|
+
if (this.configSvc.restrictedFeatures) {
|
|
2487
|
+
this.isDownloadableIos = !this.configSvc.restrictedFeatures.has('iosDownload');
|
|
2488
|
+
this.isDownloadableAndroid = !this.configSvc.restrictedFeatures.has('androidDownload');
|
|
2354
2489
|
}
|
|
2355
|
-
return moment().startOf('hour').fromNow();
|
|
2356
2490
|
};
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2491
|
+
LogoutComponent.prototype.confirmed = function () {
|
|
2492
|
+
this.disabled = true;
|
|
2493
|
+
this.dialogRef.close();
|
|
2494
|
+
this.authSvc.force_logout();
|
|
2495
|
+
};
|
|
2496
|
+
Object.defineProperty(LogoutComponent.prototype, "isDownloadable", {
|
|
2497
|
+
get: function () {
|
|
2498
|
+
if (this.configSvc.instanceConfig && this.configSvc.instanceConfig.isContentDownloadAvailable &&
|
|
2499
|
+
(this.utilitySvc.iOsAppRef || this.utilitySvc.isAndroidApp)) {
|
|
2500
|
+
return true;
|
|
2501
|
+
}
|
|
2502
|
+
return false;
|
|
2503
|
+
},
|
|
2504
|
+
enumerable: true,
|
|
2505
|
+
configurable: true
|
|
2506
|
+
});
|
|
2507
|
+
LogoutComponent.decorators = [
|
|
2508
|
+
{ type: core.Component, args: [{
|
|
2509
|
+
selector: 'ws-utils-logout',
|
|
2510
|
+
template: "<h1 mat-dialog-title i18n>Logout Now</h1>\r\n<div class=\"ws-mat-primary-text text-base pb-2 title-text\" *ngIf=\"isDownloadable\" i18n>\r\n Note: On logging out all the downloaded content will be deleted.\r\n</div>\r\n<div mat-dialog-content class=\"text-base hide-overflow\" i18n>\r\n Are you sure?\r\n</div>\r\n<div mat-dialog-actions class=\"flex-row-reverse\">\r\n <button mat-flat-button color=\"warn\" [disabled]=\"disabled\" (click)=\"confirmed()\" i18n>\r\n Yes\r\n </button>\r\n <button mat-button class=\"margin-right-xs\" [mat-dialog-close] cdkFocusInitial i18n>No</button>\r\n</div>",
|
|
2511
|
+
styles: [".hide-overflow{overflow:hidden}"]
|
|
2512
|
+
}] }
|
|
2361
2513
|
];
|
|
2362
|
-
return
|
|
2514
|
+
LogoutComponent.ctorParameters = function () { return [
|
|
2515
|
+
{ type: material.MatDialogRef },
|
|
2516
|
+
{ type: AuthKeycloakService },
|
|
2517
|
+
{ type: ConfigurationsService },
|
|
2518
|
+
{ type: UtilityService }
|
|
2519
|
+
]; };
|
|
2520
|
+
return LogoutComponent;
|
|
2363
2521
|
}());
|
|
2522
|
+
if (false) {
|
|
2523
|
+
LogoutComponent.prototype.disabled;
|
|
2524
|
+
LogoutComponent.prototype.isDownloadableIos;
|
|
2525
|
+
LogoutComponent.prototype.isDownloadableAndroid;
|
|
2526
|
+
LogoutComponent.prototype.dialogRef;
|
|
2527
|
+
LogoutComponent.prototype.authSvc;
|
|
2528
|
+
LogoutComponent.prototype.configSvc;
|
|
2529
|
+
LogoutComponent.prototype.utilitySvc;
|
|
2530
|
+
}
|
|
2364
2531
|
|
|
2365
|
-
var
|
|
2366
|
-
function
|
|
2532
|
+
var LogoutModule = (function () {
|
|
2533
|
+
function LogoutModule() {
|
|
2367
2534
|
}
|
|
2368
|
-
|
|
2535
|
+
LogoutModule.decorators = [
|
|
2369
2536
|
{ type: core.NgModule, args: [{
|
|
2370
|
-
declarations: [
|
|
2537
|
+
declarations: [LogoutComponent],
|
|
2371
2538
|
imports: [
|
|
2372
2539
|
common.CommonModule,
|
|
2540
|
+
material.MatButtonModule,
|
|
2541
|
+
material.MatDialogModule,
|
|
2373
2542
|
],
|
|
2374
|
-
|
|
2543
|
+
entryComponents: [LogoutComponent],
|
|
2375
2544
|
},] }
|
|
2376
2545
|
];
|
|
2377
|
-
return
|
|
2546
|
+
return LogoutModule;
|
|
2378
2547
|
}());
|
|
2379
2548
|
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2549
|
+
function IDateRange() { }
|
|
2550
|
+
if (false) {
|
|
2551
|
+
IDateRange.prototype.fromDate;
|
|
2552
|
+
IDateRange.prototype.toDate;
|
|
2553
|
+
IDateRange.prototype.timeZone;
|
|
2554
|
+
}
|
|
2555
|
+
var PipeConciseDateRangePipe = (function () {
|
|
2556
|
+
function PipeConciseDateRangePipe() {
|
|
2383
2557
|
}
|
|
2384
|
-
|
|
2558
|
+
PipeConciseDateRangePipe.prototype.transform = function (dateRange) {
|
|
2559
|
+
try {
|
|
2560
|
+
var conciseRange = void 0;
|
|
2561
|
+
var prefix = void 0;
|
|
2562
|
+
var suffix = void 0;
|
|
2563
|
+
var fromDate = new Date(dateRange.fromDate);
|
|
2564
|
+
var toDate = new Date(dateRange.toDate);
|
|
2565
|
+
var fromDateObj = {
|
|
2566
|
+
day: fromDate.getDate(),
|
|
2567
|
+
month: fromDate.toLocaleString('default', { month: 'short' }),
|
|
2568
|
+
year: fromDate.getFullYear(),
|
|
2569
|
+
time: fromDate.getTime(),
|
|
2570
|
+
};
|
|
2571
|
+
var toDateObj = {
|
|
2572
|
+
day: toDate.getDate(),
|
|
2573
|
+
month: toDate.toLocaleString('default', { month: 'short' }),
|
|
2574
|
+
year: toDate.getFullYear(),
|
|
2575
|
+
time: toDate.getTime(),
|
|
2576
|
+
};
|
|
2577
|
+
if (fromDateObj.time === toDateObj.time) {
|
|
2578
|
+
conciseRange = fromDateObj.day + " " + fromDateObj.month + " " + fromDateObj.year;
|
|
2579
|
+
return conciseRange;
|
|
2580
|
+
}
|
|
2581
|
+
if (fromDateObj.year !== fromDateObj.year) {
|
|
2582
|
+
prefix = fromDateObj.day + " " + fromDateObj.month + " " + fromDateObj.year;
|
|
2583
|
+
suffix = toDateObj.day + " " + toDateObj.month + " " + toDateObj.year;
|
|
2584
|
+
conciseRange = prefix + " - " + suffix;
|
|
2585
|
+
return conciseRange;
|
|
2586
|
+
}
|
|
2587
|
+
if (fromDateObj.month === toDateObj.month) {
|
|
2588
|
+
prefix = "" + fromDateObj.day;
|
|
2589
|
+
suffix = toDateObj.day + " " + toDateObj.month + " " + toDateObj.year;
|
|
2590
|
+
}
|
|
2591
|
+
else {
|
|
2592
|
+
prefix = fromDateObj.day + " " + fromDateObj.month;
|
|
2593
|
+
suffix = toDateObj.day + " " + toDateObj.month + " " + toDateObj.year;
|
|
2594
|
+
}
|
|
2595
|
+
conciseRange = prefix + " - " + suffix;
|
|
2596
|
+
return conciseRange;
|
|
2597
|
+
}
|
|
2598
|
+
catch (e) {
|
|
2599
|
+
return dateRange.fromDate + " - " + dateRange.toDate;
|
|
2600
|
+
}
|
|
2601
|
+
};
|
|
2602
|
+
PipeConciseDateRangePipe.decorators = [
|
|
2385
2603
|
{ type: core.Pipe, args: [{
|
|
2386
|
-
name: '
|
|
2604
|
+
name: 'pipeConciseDateRange',
|
|
2387
2605
|
},] }
|
|
2388
2606
|
];
|
|
2389
|
-
return
|
|
2607
|
+
return PipeConciseDateRangePipe;
|
|
2390
2608
|
}());
|
|
2391
|
-
if (false) {
|
|
2392
|
-
OrderByPipe.prototype.transform;
|
|
2393
|
-
}
|
|
2394
2609
|
|
|
2395
|
-
var
|
|
2396
|
-
function
|
|
2610
|
+
var PipeConciseDateRangeModule = (function () {
|
|
2611
|
+
function PipeConciseDateRangeModule() {
|
|
2397
2612
|
}
|
|
2398
|
-
|
|
2613
|
+
PipeConciseDateRangeModule.decorators = [
|
|
2399
2614
|
{ type: core.NgModule, args: [{
|
|
2400
|
-
declarations: [
|
|
2401
|
-
imports: [
|
|
2402
|
-
|
|
2403
|
-
],
|
|
2404
|
-
exports: [OrderByPipe],
|
|
2615
|
+
declarations: [PipeConciseDateRangePipe],
|
|
2616
|
+
imports: [common.CommonModule],
|
|
2617
|
+
exports: [PipeConciseDateRangePipe],
|
|
2405
2618
|
},] }
|
|
2406
2619
|
];
|
|
2407
|
-
return
|
|
2620
|
+
return PipeConciseDateRangeModule;
|
|
2408
2621
|
}());
|
|
2409
2622
|
|
|
2410
|
-
var
|
|
2411
|
-
function
|
|
2623
|
+
var PipeCountTransformPipe = (function () {
|
|
2624
|
+
function PipeCountTransformPipe() {
|
|
2412
2625
|
}
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2626
|
+
PipeCountTransformPipe.prototype.transform = function (value) {
|
|
2627
|
+
var thousand = 1000;
|
|
2628
|
+
var million = 1000000;
|
|
2629
|
+
if (value > 0) {
|
|
2630
|
+
if (value < thousand) {
|
|
2631
|
+
return String(value);
|
|
2632
|
+
}
|
|
2633
|
+
if (value >= thousand && value < million) {
|
|
2634
|
+
var views = (value / thousand).toFixed(1);
|
|
2635
|
+
if (views.endsWith('0')) {
|
|
2636
|
+
return views.split('.')[0] + "K";
|
|
2637
|
+
}
|
|
2638
|
+
return views + "K";
|
|
2639
|
+
}
|
|
2640
|
+
{
|
|
2641
|
+
var views = (value / million).toFixed(1);
|
|
2642
|
+
if (views.endsWith('0')) {
|
|
2643
|
+
return views.split('.')[0] + "M";
|
|
2644
|
+
}
|
|
2645
|
+
return views + "M";
|
|
2425
2646
|
}
|
|
2426
|
-
return slicedString;
|
|
2427
2647
|
}
|
|
2428
|
-
return
|
|
2648
|
+
return '0';
|
|
2429
2649
|
};
|
|
2430
|
-
|
|
2650
|
+
PipeCountTransformPipe.decorators = [
|
|
2431
2651
|
{ type: core.Pipe, args: [{
|
|
2432
|
-
name: '
|
|
2652
|
+
name: 'pipeCountTransform',
|
|
2433
2653
|
},] }
|
|
2434
2654
|
];
|
|
2435
|
-
return
|
|
2655
|
+
return PipeCountTransformPipe;
|
|
2436
2656
|
}());
|
|
2437
2657
|
|
|
2438
|
-
var
|
|
2439
|
-
function
|
|
2658
|
+
var PipeCountTransformModule = (function () {
|
|
2659
|
+
function PipeCountTransformModule() {
|
|
2440
2660
|
}
|
|
2441
|
-
|
|
2661
|
+
PipeCountTransformModule.decorators = [
|
|
2442
2662
|
{ type: core.NgModule, args: [{
|
|
2443
|
-
declarations: [
|
|
2663
|
+
declarations: [PipeCountTransformPipe],
|
|
2444
2664
|
imports: [
|
|
2445
2665
|
common.CommonModule,
|
|
2446
2666
|
],
|
|
2447
|
-
exports: [
|
|
2667
|
+
exports: [PipeCountTransformPipe],
|
|
2448
2668
|
},] }
|
|
2449
2669
|
];
|
|
2450
|
-
return
|
|
2670
|
+
return PipeCountTransformModule;
|
|
2451
2671
|
}());
|
|
2452
2672
|
|
|
2453
|
-
function
|
|
2673
|
+
function ICertificationDate() { }
|
|
2454
2674
|
if (false) {
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2675
|
+
ICertificationDate.prototype.day;
|
|
2676
|
+
ICertificationDate.prototype.month;
|
|
2677
|
+
ICertificationDate.prototype.year;
|
|
2678
|
+
ICertificationDate.prototype.timeZone;
|
|
2458
2679
|
}
|
|
2459
|
-
var
|
|
2460
|
-
function
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2680
|
+
var PipeDateConcatPipe = (function () {
|
|
2681
|
+
function PipeDateConcatPipe() {
|
|
2682
|
+
this.months = [
|
|
2683
|
+
'Jan',
|
|
2684
|
+
'Feb',
|
|
2685
|
+
'Mar',
|
|
2686
|
+
'Apr',
|
|
2687
|
+
'May',
|
|
2688
|
+
'Jun',
|
|
2689
|
+
'Jul',
|
|
2690
|
+
'Aug',
|
|
2691
|
+
'Sep',
|
|
2692
|
+
'Oct',
|
|
2693
|
+
'Nov',
|
|
2694
|
+
'Dec',
|
|
2695
|
+
];
|
|
2696
|
+
}
|
|
2697
|
+
PipeDateConcatPipe.prototype.transform = function (value) {
|
|
2698
|
+
var dateStr = value.day + " " + this.months[value.month - 1] + " " + value.year;
|
|
2699
|
+
if (value.timeZone) {
|
|
2700
|
+
dateStr += " " + value.timeZone;
|
|
2475
2701
|
}
|
|
2476
|
-
return
|
|
2702
|
+
return dateStr;
|
|
2477
2703
|
};
|
|
2478
|
-
|
|
2704
|
+
PipeDateConcatPipe.decorators = [
|
|
2479
2705
|
{ type: core.Pipe, args: [{
|
|
2480
|
-
name: '
|
|
2706
|
+
name: 'pipeDateConcat',
|
|
2481
2707
|
},] }
|
|
2482
2708
|
];
|
|
2483
|
-
return
|
|
2709
|
+
PipeDateConcatPipe.ctorParameters = function () { return []; };
|
|
2710
|
+
return PipeDateConcatPipe;
|
|
2484
2711
|
}());
|
|
2712
|
+
if (false) {
|
|
2713
|
+
PipeDateConcatPipe.prototype.months;
|
|
2714
|
+
}
|
|
2485
2715
|
|
|
2486
|
-
var
|
|
2487
|
-
function
|
|
2716
|
+
var PipeDateConcatModule = (function () {
|
|
2717
|
+
function PipeDateConcatModule() {
|
|
2488
2718
|
}
|
|
2489
|
-
|
|
2719
|
+
PipeDateConcatModule.decorators = [
|
|
2490
2720
|
{ type: core.NgModule, args: [{
|
|
2491
|
-
declarations: [
|
|
2721
|
+
declarations: [PipeDateConcatPipe],
|
|
2492
2722
|
imports: [
|
|
2493
2723
|
common.CommonModule,
|
|
2494
2724
|
],
|
|
2495
|
-
exports: [
|
|
2725
|
+
exports: [PipeDateConcatPipe],
|
|
2496
2726
|
},] }
|
|
2497
2727
|
];
|
|
2498
|
-
return
|
|
2728
|
+
return PipeDateConcatModule;
|
|
2499
2729
|
}());
|
|
2500
2730
|
|
|
2501
|
-
var
|
|
2502
|
-
function
|
|
2731
|
+
var PipeDurationTransformPipe = (function () {
|
|
2732
|
+
function PipeDurationTransformPipe() {
|
|
2503
2733
|
}
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
try {
|
|
2508
|
-
for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
|
|
2509
|
-
var key = keys_1_1.value;
|
|
2510
|
-
if (value[key]) {
|
|
2511
|
-
result[key] = value[key];
|
|
2512
|
-
}
|
|
2513
|
-
}
|
|
2734
|
+
PipeDurationTransformPipe.prototype.transform = function (data, type) {
|
|
2735
|
+
if (data <= 0) {
|
|
2736
|
+
return '';
|
|
2514
2737
|
}
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2738
|
+
var h = Math.floor(data / 3600);
|
|
2739
|
+
var m = Math.floor((data % 3600) / 60);
|
|
2740
|
+
var s = Math.floor((data % 3600) % 60);
|
|
2741
|
+
var duration = '';
|
|
2742
|
+
var space = '';
|
|
2743
|
+
switch (type) {
|
|
2744
|
+
case 'time24':
|
|
2745
|
+
return this.defaultDuration(h, m, s);
|
|
2746
|
+
case 'hms':
|
|
2747
|
+
if (h > 0) {
|
|
2748
|
+
duration += type === 'hms' ? h + "h" : h + " hr";
|
|
2749
|
+
}
|
|
2750
|
+
if (m > 0) {
|
|
2751
|
+
if (h > 0) {
|
|
2752
|
+
space = ' ';
|
|
2753
|
+
}
|
|
2754
|
+
duration += type === 'hms' ? "" + space + m + "m" : "" + space + m + " min";
|
|
2755
|
+
}
|
|
2756
|
+
if (s > 0 && h === 0) {
|
|
2757
|
+
if (m > 0) {
|
|
2758
|
+
space = ' ';
|
|
2759
|
+
}
|
|
2760
|
+
duration += type === 'hms' ? "" + space + s + "s" : "" + space + s + " sec";
|
|
2761
|
+
}
|
|
2762
|
+
return duration;
|
|
2763
|
+
case 'hour':
|
|
2764
|
+
if (h === 0) {
|
|
2765
|
+
duration += 'less than an hour';
|
|
2766
|
+
}
|
|
2767
|
+
if (h === 1) {
|
|
2768
|
+
duration += h + " hour";
|
|
2769
|
+
}
|
|
2770
|
+
if (h > 1) {
|
|
2771
|
+
duration += h + " hours";
|
|
2772
|
+
}
|
|
2773
|
+
return duration;
|
|
2774
|
+
default:
|
|
2775
|
+
return this.defaultDuration(h, m, s);
|
|
2521
2776
|
}
|
|
2522
|
-
return result;
|
|
2523
2777
|
};
|
|
2524
|
-
|
|
2778
|
+
PipeDurationTransformPipe.prototype.defaultDuration = function (h, m, s) {
|
|
2779
|
+
var duration = '';
|
|
2780
|
+
duration += h > 0 ? h.toString().padStart(2) + ":" : '';
|
|
2781
|
+
duration += m > 0 ? m.toString().padStart(2) + ":" : '00:';
|
|
2782
|
+
duration += s > 0 ? s.toString().padStart(2) : '00';
|
|
2783
|
+
return duration;
|
|
2784
|
+
};
|
|
2785
|
+
PipeDurationTransformPipe.decorators = [
|
|
2525
2786
|
{ type: core.Pipe, args: [{
|
|
2526
|
-
name: '
|
|
2787
|
+
name: 'pipeDurationTransform',
|
|
2527
2788
|
},] }
|
|
2528
2789
|
];
|
|
2529
|
-
return
|
|
2790
|
+
return PipeDurationTransformPipe;
|
|
2530
2791
|
}());
|
|
2531
2792
|
|
|
2532
|
-
var
|
|
2533
|
-
function
|
|
2793
|
+
var PipeDurationTransformModule = (function () {
|
|
2794
|
+
function PipeDurationTransformModule() {
|
|
2534
2795
|
}
|
|
2535
|
-
|
|
2796
|
+
PipeDurationTransformModule.decorators = [
|
|
2536
2797
|
{ type: core.NgModule, args: [{
|
|
2537
|
-
declarations: [
|
|
2798
|
+
declarations: [PipeDurationTransformPipe],
|
|
2538
2799
|
imports: [
|
|
2539
2800
|
common.CommonModule,
|
|
2540
2801
|
],
|
|
2541
|
-
exports: [
|
|
2802
|
+
exports: [PipeDurationTransformPipe],
|
|
2542
2803
|
},] }
|
|
2543
2804
|
];
|
|
2544
|
-
return
|
|
2805
|
+
return PipeDurationTransformModule;
|
|
2545
2806
|
}());
|
|
2546
2807
|
|
|
2547
|
-
var
|
|
2548
|
-
function
|
|
2549
|
-
this.sanitizer = sanitizer;
|
|
2808
|
+
var PipeHtmlTagRemovalPipe = (function () {
|
|
2809
|
+
function PipeHtmlTagRemovalPipe() {
|
|
2550
2810
|
}
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
switch (type) {
|
|
2554
|
-
case 'html':
|
|
2555
|
-
return this.sanitizer.bypassSecurityTrustHtml(value);
|
|
2556
|
-
case 'style':
|
|
2557
|
-
return this.sanitizer.bypassSecurityTrustStyle(value);
|
|
2558
|
-
case 'script':
|
|
2559
|
-
return this.sanitizer.bypassSecurityTrustScript(value);
|
|
2560
|
-
case 'url':
|
|
2561
|
-
return this.sanitizer.bypassSecurityTrustUrl(value);
|
|
2562
|
-
case 'resourceUrl':
|
|
2563
|
-
return this.sanitizer.bypassSecurityTrustResourceUrl(value);
|
|
2564
|
-
default:
|
|
2565
|
-
throw new Error("Invalid safe type specified: " + type);
|
|
2566
|
-
}
|
|
2811
|
+
PipeHtmlTagRemovalPipe.prototype.transform = function (htmlString) {
|
|
2812
|
+
return htmlString ? String(htmlString).replace(/<[^>]+>/gm, '') : '';
|
|
2567
2813
|
};
|
|
2568
|
-
|
|
2814
|
+
PipeHtmlTagRemovalPipe.decorators = [
|
|
2569
2815
|
{ type: core.Pipe, args: [{
|
|
2570
|
-
name: '
|
|
2816
|
+
name: 'pipeHtmlTagRemoval',
|
|
2571
2817
|
},] }
|
|
2572
2818
|
];
|
|
2573
|
-
|
|
2574
|
-
{ type: platformBrowser.DomSanitizer }
|
|
2575
|
-
]; };
|
|
2576
|
-
return PipeSafeSanitizerPipe;
|
|
2819
|
+
return PipeHtmlTagRemovalPipe;
|
|
2577
2820
|
}());
|
|
2578
|
-
if (false) {
|
|
2579
|
-
PipeSafeSanitizerPipe.prototype.sanitizer;
|
|
2580
|
-
}
|
|
2581
2821
|
|
|
2582
|
-
var
|
|
2583
|
-
function
|
|
2822
|
+
var PipeHtmlTagRemovalModule = (function () {
|
|
2823
|
+
function PipeHtmlTagRemovalModule() {
|
|
2584
2824
|
}
|
|
2585
|
-
|
|
2825
|
+
PipeHtmlTagRemovalModule.decorators = [
|
|
2586
2826
|
{ type: core.NgModule, args: [{
|
|
2587
|
-
declarations: [
|
|
2827
|
+
declarations: [PipeHtmlTagRemovalPipe],
|
|
2588
2828
|
imports: [
|
|
2589
2829
|
common.CommonModule,
|
|
2590
2830
|
],
|
|
2591
|
-
exports: [
|
|
2592
|
-
},] }
|
|
2593
|
-
];
|
|
2594
|
-
return PipeSafeSanitizerModule;
|
|
2595
|
-
}());
|
|
2596
|
-
|
|
2597
|
-
var ExploreDetailResolve = (function () {
|
|
2598
|
-
function ExploreDetailResolve(http, configSvc, utilitySvc) {
|
|
2599
|
-
this.http = http;
|
|
2600
|
-
this.configSvc = configSvc;
|
|
2601
|
-
this.utilitySvc = utilitySvc;
|
|
2602
|
-
this.baseUrl = this.configSvc.sitePath;
|
|
2603
|
-
this.isIntranetAllowedSettings = false;
|
|
2604
|
-
}
|
|
2605
|
-
ExploreDetailResolve.prototype.resolve = function (route, _state) {
|
|
2606
|
-
var _this = this;
|
|
2607
|
-
this.isIntranetAllowedSettings = this.configSvc.isIntranetAllowed;
|
|
2608
|
-
var tag = decodeURIComponent(route.params.tags);
|
|
2609
|
-
var url = '';
|
|
2610
|
-
if (route.data.pageUrl) {
|
|
2611
|
-
url = route.data.pageUrl;
|
|
2612
|
-
}
|
|
2613
|
-
if (route.data.pageType === 'page' && route.data.pageKey) {
|
|
2614
|
-
url = this.baseUrl + "/page/" + route.data.pageKey + ".json";
|
|
2615
|
-
}
|
|
2616
|
-
return this.http.get(url).pipe(operators.map((function (pageData) { return ({ data: _this.transformPageData(pageData, tag), error: null }); })), operators.catchError((function (err) { return rxjs.of({ data: null, error: err }); })));
|
|
2617
|
-
};
|
|
2618
|
-
ExploreDetailResolve.prototype.transformPageData = function (pageData, tag) {
|
|
2619
|
-
var _this = this;
|
|
2620
|
-
var DELIMITER = '>';
|
|
2621
|
-
var path = tag.split(DELIMITER);
|
|
2622
|
-
pageData.pageLayout.widgetData.widgets = pageData.pageLayout.widgetData.widgets.map((function (widget) {
|
|
2623
|
-
if (pageData.navigationBar && pageData.navigationBar.links) {
|
|
2624
|
-
pageData.navigationBar.links = pageData.navigationBar.links
|
|
2625
|
-
.filter((function (link) { return link.widgetData.tags === tag; }));
|
|
2626
|
-
}
|
|
2627
|
-
if (widget.widgetSubType === 'cardBreadcrumb') {
|
|
2628
|
-
widget.widgetData.path = [{
|
|
2629
|
-
text: pageData.navigationBar.pageTitle,
|
|
2630
|
-
clickUrl: pageData.navigationBar.pageBackLink,
|
|
2631
|
-
}].concat(path.map((function (edge, idx) { return ({
|
|
2632
|
-
text: edge,
|
|
2633
|
-
clickUrl: "/page/explore/" + path.slice(0, idx + 1).join(DELIMITER),
|
|
2634
|
-
}); })));
|
|
2635
|
-
}
|
|
2636
|
-
if (widget.widgetSubType === 'contentStripMultiple') {
|
|
2637
|
-
widget.widgetData.strips = widget.widgetData.strips.map((function (strip) {
|
|
2638
|
-
strip.request.searchV6.filters[0].andFilters.push({ catalogPaths: [tag] });
|
|
2639
|
-
if (_this.utilitySvc.isMobile && !_this.isIntranetAllowedSettings) {
|
|
2640
|
-
strip.request.searchV6.filters[0].andFilters.push({ isInIntranet: ['false'] });
|
|
2641
|
-
}
|
|
2642
|
-
return strip;
|
|
2643
|
-
}));
|
|
2644
|
-
if (widget.widgetData.noDataWidget && widget.widgetData.noDataWidget.widgetData.strips) {
|
|
2645
|
-
widget.widgetData.noDataWidget.widgetData.strips = widget.widgetData.noDataWidget.widgetData.strips.map((function (strip) {
|
|
2646
|
-
strip.request.searchV6.filters[0].andFilters.push({ catalogPaths: [tag] });
|
|
2647
|
-
if (_this.utilitySvc.isMobile && !_this.isIntranetAllowedSettings) {
|
|
2648
|
-
strip.request.searchV6.filters[0].andFilters.push({ isInIntranet: ['false'] });
|
|
2649
|
-
}
|
|
2650
|
-
return strip;
|
|
2651
|
-
}));
|
|
2652
|
-
}
|
|
2653
|
-
}
|
|
2654
|
-
return widget;
|
|
2655
|
-
}));
|
|
2656
|
-
return pageData;
|
|
2657
|
-
};
|
|
2658
|
-
ExploreDetailResolve.decorators = [
|
|
2659
|
-
{ type: core.Injectable, args: [{
|
|
2660
|
-
providedIn: 'root',
|
|
2831
|
+
exports: [PipeHtmlTagRemovalPipe],
|
|
2661
2832
|
},] }
|
|
2662
2833
|
];
|
|
2663
|
-
|
|
2664
|
-
{ type: http.HttpClient },
|
|
2665
|
-
{ type: ConfigurationsService },
|
|
2666
|
-
{ type: UtilityService }
|
|
2667
|
-
]; };
|
|
2668
|
-
/** @nocollapse */ ExploreDetailResolve.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function ExploreDetailResolve_Factory() { return new ExploreDetailResolve(core.ɵɵinject(http.HttpClient), core.ɵɵinject(ConfigurationsService), core.ɵɵinject(UtilityService)); }, token: ExploreDetailResolve, providedIn: "root" });
|
|
2669
|
-
return ExploreDetailResolve;
|
|
2834
|
+
return PipeHtmlTagRemovalModule;
|
|
2670
2835
|
}());
|
|
2671
|
-
if (false) {
|
|
2672
|
-
ExploreDetailResolve.prototype.baseUrl;
|
|
2673
|
-
ExploreDetailResolve.prototype.isIntranetAllowedSettings;
|
|
2674
|
-
ExploreDetailResolve.prototype.http;
|
|
2675
|
-
ExploreDetailResolve.prototype.configSvc;
|
|
2676
|
-
ExploreDetailResolve.prototype.utilitySvc;
|
|
2677
|
-
}
|
|
2678
2836
|
|
|
2679
|
-
var
|
|
2680
|
-
function
|
|
2681
|
-
this.http = http;
|
|
2837
|
+
var PipeFilterPipe = (function () {
|
|
2838
|
+
function PipeFilterPipe() {
|
|
2682
2839
|
}
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
pageData.pageLayout.widgetData.widgets = pageData.pageLayout.widgetData.widgets.map((function (widget) {
|
|
2690
|
-
if (widget.widgetSubType === 'contentStripMultiple') {
|
|
2691
|
-
widget.widgetData.strips = widget.widgetData.strips.map((function (strip) {
|
|
2692
|
-
strip.request.search.filters.catalogPaths = [decodeURIComponent(tag)];
|
|
2693
|
-
return strip;
|
|
2694
|
-
}));
|
|
2695
|
-
}
|
|
2696
|
-
return widget;
|
|
2697
|
-
}));
|
|
2698
|
-
return pageData;
|
|
2840
|
+
PipeFilterPipe.prototype.transform = function (value, keys, term) {
|
|
2841
|
+
if (!term) {
|
|
2842
|
+
return value;
|
|
2843
|
+
}
|
|
2844
|
+
return (value || []).filter((function (item) { return keys.split(',')
|
|
2845
|
+
.some((function (key) { return item.hasOwnProperty(key) && new RegExp("^" + term + "$", 'gi').test(item[key]); })); }));
|
|
2699
2846
|
};
|
|
2700
|
-
|
|
2701
|
-
{ type: core.
|
|
2702
|
-
|
|
2847
|
+
PipeFilterPipe.decorators = [
|
|
2848
|
+
{ type: core.Pipe, args: [{
|
|
2849
|
+
name: 'pipeFilter',
|
|
2703
2850
|
},] }
|
|
2704
2851
|
];
|
|
2705
|
-
|
|
2706
|
-
{ type: http.HttpClient }
|
|
2707
|
-
]; };
|
|
2708
|
-
/** @nocollapse */ MarketingOfferingResolve.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function MarketingOfferingResolve_Factory() { return new MarketingOfferingResolve(core.ɵɵinject(http.HttpClient)); }, token: MarketingOfferingResolve, providedIn: "root" });
|
|
2709
|
-
return MarketingOfferingResolve;
|
|
2852
|
+
return PipeFilterPipe;
|
|
2710
2853
|
}());
|
|
2711
|
-
if (false) {
|
|
2712
|
-
MarketingOfferingResolve.prototype.http;
|
|
2713
|
-
}
|
|
2714
2854
|
|
|
2715
|
-
var
|
|
2716
|
-
|
|
2717
|
-
function IPage() { }
|
|
2718
|
-
NsPage.IPage = IPage;
|
|
2719
|
-
if (false) {
|
|
2720
|
-
IPage.prototype.contentType;
|
|
2721
|
-
IPage.prototype.navigationBar;
|
|
2722
|
-
IPage.prototype.pageLayout;
|
|
2723
|
-
IPage.prototype.tourGuide;
|
|
2724
|
-
}
|
|
2725
|
-
function INavBar() { }
|
|
2726
|
-
NsPage.INavBar = INavBar;
|
|
2727
|
-
if (false) {
|
|
2728
|
-
INavBar.prototype.links;
|
|
2729
|
-
INavBar.prototype.xsmallNonMenuLinks;
|
|
2730
|
-
INavBar.prototype.pageBackLink;
|
|
2731
|
-
INavBar.prototype.pageTitle;
|
|
2732
|
-
INavBar.prototype.background;
|
|
2733
|
-
}
|
|
2734
|
-
function INavBackground() { }
|
|
2735
|
-
NsPage.INavBackground = INavBackground;
|
|
2736
|
-
if (false) {
|
|
2737
|
-
INavBackground.prototype.color;
|
|
2738
|
-
INavBackground.prototype.styles;
|
|
2739
|
-
}
|
|
2740
|
-
function INavLink() { }
|
|
2741
|
-
NsPage.INavLink = INavLink;
|
|
2742
|
-
if (false) {
|
|
2743
|
-
INavLink.prototype.config;
|
|
2744
|
-
INavLink.prototype.actionBtnId;
|
|
2745
|
-
INavLink.prototype.actionBtn;
|
|
2746
|
-
INavLink.prototype.actionBtnName;
|
|
2747
|
-
}
|
|
2748
|
-
function INavLinkConfig() { }
|
|
2749
|
-
NsPage.INavLinkConfig = INavLinkConfig;
|
|
2750
|
-
if (false) {
|
|
2751
|
-
INavLinkConfig.prototype.type;
|
|
2752
|
-
INavLinkConfig.prototype.hideIcon;
|
|
2753
|
-
INavLinkConfig.prototype.hideTitle;
|
|
2754
|
-
INavLinkConfig.prototype.hideStatus;
|
|
2755
|
-
INavLinkConfig.prototype.hidePin;
|
|
2756
|
-
INavLinkConfig.prototype.iconColor;
|
|
2757
|
-
INavLinkConfig.prototype.treatAsCard;
|
|
2758
|
-
INavLinkConfig.prototype.useShortName;
|
|
2855
|
+
var PipeFilterModule = (function () {
|
|
2856
|
+
function PipeFilterModule() {
|
|
2759
2857
|
}
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2858
|
+
PipeFilterModule.decorators = [
|
|
2859
|
+
{ type: core.NgModule, args: [{
|
|
2860
|
+
declarations: [PipeFilterPipe],
|
|
2861
|
+
imports: [
|
|
2862
|
+
common.CommonModule,
|
|
2863
|
+
],
|
|
2864
|
+
exports: [PipeFilterPipe],
|
|
2865
|
+
},] }
|
|
2866
|
+
];
|
|
2867
|
+
return PipeFilterModule;
|
|
2868
|
+
}());
|
|
2765
2869
|
|
|
2766
|
-
var
|
|
2767
|
-
function
|
|
2768
|
-
this.configSvc = configSvc;
|
|
2769
|
-
this.http = http;
|
|
2770
|
-
this.locale = locale;
|
|
2771
|
-
this.baseUrl = this.configSvc.sitePath;
|
|
2870
|
+
var PipeFilterSearchPipe = (function () {
|
|
2871
|
+
function PipeFilterSearchPipe() {
|
|
2772
2872
|
}
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
if (route.data.pageType === 'feature' && route.data.pageKey) {
|
|
2778
|
-
return this.getData(this.baseUrl + "/feature/" + route.data.pageKey);
|
|
2779
|
-
}
|
|
2780
|
-
if (route.data.pageType === 'page' &&
|
|
2781
|
-
route.data.pageKey &&
|
|
2782
|
-
route.paramMap.has(route.data.pageKey)) {
|
|
2783
|
-
return this.getData(this.baseUrl + "/page/" + route.paramMap.get(route.data.pageKey));
|
|
2873
|
+
PipeFilterSearchPipe.prototype.transform = function (items, searchText) {
|
|
2874
|
+
var keys = [];
|
|
2875
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
2876
|
+
keys[_i - 2] = arguments[_i];
|
|
2784
2877
|
}
|
|
2785
|
-
if (
|
|
2786
|
-
|
|
2787
|
-
route.data.pageKey === 'toc') {
|
|
2788
|
-
return this.getData(this.baseUrl + "/page/" + route.data.pageKey);
|
|
2878
|
+
if (!items) {
|
|
2879
|
+
return [];
|
|
2789
2880
|
}
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
error: 'CONFIGURATION_ERROR_PAGE_URL_NOT_FORMED',
|
|
2793
|
-
};
|
|
2794
|
-
};
|
|
2795
|
-
PageResolve.prototype.setS3Cookie = function (contentId) {
|
|
2796
|
-
return this.http.post("/apis/protected/v8/content/setCookie", { contentId: contentId }).pipe(operators.catchError((function (_err) { return rxjs.of(true); })));
|
|
2797
|
-
};
|
|
2798
|
-
PageResolve.prototype.getContent = function (id) {
|
|
2799
|
-
return this.http
|
|
2800
|
-
.post("/apis/protected/v8/content/" + id + "?hierarchyType=minimal", ['status', 'artifactUrl']);
|
|
2801
|
-
};
|
|
2802
|
-
PageResolve.prototype.getData = function (url) {
|
|
2803
|
-
var _this = this;
|
|
2804
|
-
var id = (((url.split('/').pop()))).split('.')[0] || '';
|
|
2805
|
-
var equivalentId = id.startsWith('lex_auth_') ? id : JSON_MAP[id];
|
|
2806
|
-
if (equivalentId) {
|
|
2807
|
-
return rxjs.forkJoin([this.setS3Cookie(equivalentId), this.getContent(equivalentId)]).pipe(operators.mergeMap((function (_a) {
|
|
2808
|
-
var _b = __read(_a, 2), _ = _b[0], v = _b[1];
|
|
2809
|
-
if (v.status === 'Expired' || v.status === 'Deleted' || !v.artifactUrl) {
|
|
2810
|
-
return rxjs.of({ data: null, error: 'NoContent' });
|
|
2811
|
-
}
|
|
2812
|
-
return _this.http
|
|
2813
|
-
.get(v.artifactUrl + "?ts=" + new Date().getTime())
|
|
2814
|
-
.pipe(operators.map((function (data) { return ({ data: data, error: null }); })), operators.catchError((function (err) { return rxjs.of({ data: null, error: err }); })));
|
|
2815
|
-
})), operators.catchError((function (err) { return rxjs.of({ data: null, error: err }); })));
|
|
2881
|
+
if (!searchText) {
|
|
2882
|
+
return items;
|
|
2816
2883
|
}
|
|
2817
|
-
var
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
];
|
|
2825
|
-
return rxjs.forkJoin(pageRequest).pipe(operators.map((function (_a) {
|
|
2826
|
-
var _b = __read(_a, 2), general = _b[0], withLocale = _b[1];
|
|
2827
|
-
if (withLocale.data) {
|
|
2828
|
-
return withLocale;
|
|
2884
|
+
var searchTextLowerCase = searchText.toLowerCase();
|
|
2885
|
+
if (keys && keys.length) {
|
|
2886
|
+
var result = items.filter((function (it) {
|
|
2887
|
+
return it['personalDetails'][keys[0]].toLowerCase().includes(searchTextLowerCase);
|
|
2888
|
+
}));
|
|
2889
|
+
if (result && result.length <= 0) {
|
|
2890
|
+
return [-1];
|
|
2829
2891
|
}
|
|
2830
|
-
return
|
|
2831
|
-
}
|
|
2892
|
+
return result;
|
|
2893
|
+
}
|
|
2894
|
+
return items.filter((function (it) {
|
|
2895
|
+
return it.title.toLowerCase().includes(searchTextLowerCase);
|
|
2896
|
+
}));
|
|
2832
2897
|
};
|
|
2833
|
-
|
|
2834
|
-
{ type: core.
|
|
2835
|
-
|
|
2898
|
+
PipeFilterSearchPipe.decorators = [
|
|
2899
|
+
{ type: core.Pipe, args: [{
|
|
2900
|
+
name: 'pipeFilterSearch',
|
|
2836
2901
|
},] }
|
|
2837
2902
|
];
|
|
2838
|
-
|
|
2839
|
-
{ type: ConfigurationsService },
|
|
2840
|
-
{ type: http.HttpClient },
|
|
2841
|
-
{ type: String, decorators: [{ type: core.Inject, args: [core.LOCALE_ID,] }] }
|
|
2842
|
-
]; };
|
|
2843
|
-
/** @nocollapse */ PageResolve.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PageResolve_Factory() { return new PageResolve(core.ɵɵinject(ConfigurationsService), core.ɵɵinject(http.HttpClient), core.ɵɵinject(core.LOCALE_ID)); }, token: PageResolve, providedIn: "root" });
|
|
2844
|
-
return PageResolve;
|
|
2903
|
+
return PipeFilterSearchPipe;
|
|
2845
2904
|
}());
|
|
2846
|
-
if (false) {
|
|
2847
|
-
PageResolve.prototype.baseUrl;
|
|
2848
|
-
PageResolve.prototype.configSvc;
|
|
2849
|
-
PageResolve.prototype.http;
|
|
2850
|
-
PageResolve.prototype.locale;
|
|
2851
|
-
}
|
|
2852
|
-
|
|
2853
|
-
function IResolveResponse() { }
|
|
2854
|
-
if (false) {
|
|
2855
|
-
IResolveResponse.prototype.data;
|
|
2856
|
-
IResolveResponse.prototype.error;
|
|
2857
|
-
}
|
|
2858
2905
|
|
|
2859
|
-
var
|
|
2860
|
-
function
|
|
2861
|
-
this.configSvc = configSvc;
|
|
2862
|
-
this.consoleError = console.error;
|
|
2863
|
-
this.consoleInfo = console.info;
|
|
2864
|
-
this.consoleLog = console.log;
|
|
2865
|
-
this.consoleWarn = console.warn;
|
|
2866
|
-
this.noConsole = (function () { });
|
|
2906
|
+
var PipeFilterSearchModule = (function () {
|
|
2907
|
+
function PipeFilterSearchModule() {
|
|
2867
2908
|
}
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
enumerable: true,
|
|
2887
|
-
configurable: true
|
|
2888
|
-
});
|
|
2889
|
-
Object.defineProperty(LoggerService.prototype, "warn", {
|
|
2890
|
-
get: function () {
|
|
2891
|
-
return this.configSvc.isProduction ? this.noConsole : this.consoleWarn;
|
|
2892
|
-
},
|
|
2893
|
-
enumerable: true,
|
|
2894
|
-
configurable: true
|
|
2895
|
-
});
|
|
2896
|
-
LoggerService.prototype.removeConsoleAccess = function () {
|
|
2897
|
-
if (this.configSvc.isProduction) {
|
|
2898
|
-
return;
|
|
2909
|
+
PipeFilterSearchModule.decorators = [
|
|
2910
|
+
{ type: core.NgModule, args: [{
|
|
2911
|
+
declarations: [PipeFilterSearchPipe],
|
|
2912
|
+
imports: [
|
|
2913
|
+
common.CommonModule,
|
|
2914
|
+
],
|
|
2915
|
+
exports: [PipeFilterSearchPipe],
|
|
2916
|
+
},] }
|
|
2917
|
+
];
|
|
2918
|
+
return PipeFilterSearchModule;
|
|
2919
|
+
}());
|
|
2920
|
+
|
|
2921
|
+
var PipeListFilterPipe = (function () {
|
|
2922
|
+
function PipeListFilterPipe() {
|
|
2923
|
+
}
|
|
2924
|
+
PipeListFilterPipe.prototype.transform = function (value, keys, term) {
|
|
2925
|
+
if (!term) {
|
|
2926
|
+
return value;
|
|
2899
2927
|
}
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
console.warn = noConsoleWithError;
|
|
2904
|
-
console.info = noConsoleWithError;
|
|
2905
|
-
console.error = noConsoleWithError;
|
|
2928
|
+
return (value || []).filter((function (item) { return keys.split(',')
|
|
2929
|
+
.some((function (key) { return item.hasOwnProperty(key)
|
|
2930
|
+
&& item[key] && (item[key] + " ").toLocaleLowerCase().includes(term.toLocaleLowerCase()); })); }));
|
|
2906
2931
|
};
|
|
2907
|
-
|
|
2908
|
-
{ type: core.
|
|
2909
|
-
|
|
2932
|
+
PipeListFilterPipe.decorators = [
|
|
2933
|
+
{ type: core.Pipe, args: [{
|
|
2934
|
+
name: 'pipeListFilter',
|
|
2910
2935
|
},] }
|
|
2911
2936
|
];
|
|
2912
|
-
|
|
2913
|
-
{ type: ConfigurationsService }
|
|
2914
|
-
]; };
|
|
2915
|
-
/** @nocollapse */ LoggerService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function LoggerService_Factory() { return new LoggerService(core.ɵɵinject(ConfigurationsService)); }, token: LoggerService, providedIn: "root" });
|
|
2916
|
-
return LoggerService;
|
|
2937
|
+
return PipeListFilterPipe;
|
|
2917
2938
|
}());
|
|
2918
|
-
if (false) {
|
|
2919
|
-
LoggerService.prototype.consoleError;
|
|
2920
|
-
LoggerService.prototype.consoleInfo;
|
|
2921
|
-
LoggerService.prototype.consoleLog;
|
|
2922
|
-
LoggerService.prototype.consoleWarn;
|
|
2923
|
-
LoggerService.prototype.noConsole;
|
|
2924
|
-
LoggerService.prototype.configSvc;
|
|
2925
|
-
}
|
|
2926
2939
|
|
|
2927
|
-
var
|
|
2928
|
-
|
|
2929
|
-
var storage = localStorage;
|
|
2930
|
-
var API_ENDPOINTS = {
|
|
2931
|
-
sharePointToken: '/apis/protected/v8/user/token',
|
|
2932
|
-
};
|
|
2933
|
-
var AuthMicrosoftService = (function () {
|
|
2934
|
-
function AuthMicrosoftService(loggerSvc, http) {
|
|
2935
|
-
this.loggerSvc = loggerSvc;
|
|
2936
|
-
this.http = http;
|
|
2937
|
-
this.msConfig = {
|
|
2938
|
-
clientId: '',
|
|
2939
|
-
tenant: '',
|
|
2940
|
-
defaultEmailId: '',
|
|
2941
|
-
validEmailExtensions: [],
|
|
2942
|
-
isConfigured: false,
|
|
2943
|
-
};
|
|
2944
|
-
this.emailUsed = null;
|
|
2945
|
-
this.code = null;
|
|
2946
|
-
this.msToken = {
|
|
2947
|
-
accessToken: '',
|
|
2948
|
-
expiresOn: '',
|
|
2949
|
-
resource: '',
|
|
2950
|
-
tokenType: '',
|
|
2951
|
-
};
|
|
2940
|
+
var PipeListFilterModule = (function () {
|
|
2941
|
+
function PipeListFilterModule() {
|
|
2952
2942
|
}
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
return base + "?" + searchParam.toString() + "#" + fragment;
|
|
2972
|
-
}
|
|
2973
|
-
return base + "?" + searchParam.toString();
|
|
2974
|
-
}
|
|
2975
|
-
return null;
|
|
2976
|
-
},
|
|
2977
|
-
enumerable: true,
|
|
2978
|
-
configurable: true
|
|
2979
|
-
});
|
|
2980
|
-
AuthMicrosoftService.prototype.logoutUrl = function (redirectUrl) {
|
|
2981
|
-
if (this.isValidEmail(this.emailUsed || '')) {
|
|
2982
|
-
return "https://login.microsoftonline.com/common/oauth2/logout?post_logout_redirect_uri=" + redirectUrl;
|
|
2943
|
+
PipeListFilterModule.decorators = [
|
|
2944
|
+
{ type: core.NgModule, args: [{
|
|
2945
|
+
declarations: [PipeListFilterPipe],
|
|
2946
|
+
imports: [
|
|
2947
|
+
common.CommonModule,
|
|
2948
|
+
],
|
|
2949
|
+
exports: [PipeListFilterPipe],
|
|
2950
|
+
},] }
|
|
2951
|
+
];
|
|
2952
|
+
return PipeListFilterModule;
|
|
2953
|
+
}());
|
|
2954
|
+
|
|
2955
|
+
var PipeRelativeTimePipe = (function () {
|
|
2956
|
+
function PipeRelativeTimePipe() {
|
|
2957
|
+
}
|
|
2958
|
+
PipeRelativeTimePipe.prototype.transform = function (value) {
|
|
2959
|
+
if (value) {
|
|
2960
|
+
return moment((new Date(value))).fromNow();
|
|
2983
2961
|
}
|
|
2984
|
-
return
|
|
2985
|
-
};
|
|
2986
|
-
AuthMicrosoftService.prototype.init = function (config) {
|
|
2987
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2988
|
-
var queryParams, url;
|
|
2989
|
-
return __generator(this, function (_a) {
|
|
2990
|
-
switch (_a.label) {
|
|
2991
|
-
case 0:
|
|
2992
|
-
if (!config || !config.microsoft || !config.microsoft.isConfigured) {
|
|
2993
|
-
this.loggerSvc.warn('Empty/No Configuration passed, ignoring Microsoft Authentication');
|
|
2994
|
-
}
|
|
2995
|
-
this.msConfig = config.microsoft;
|
|
2996
|
-
queryParams = new URLSearchParams(location.search);
|
|
2997
|
-
if (!(queryParams.has('code') && queryParams.has('session_state'))) return [3, 2];
|
|
2998
|
-
this.code = queryParams.get('code');
|
|
2999
|
-
if (!this.code) {
|
|
3000
|
-
return [2];
|
|
3001
|
-
}
|
|
3002
|
-
url = location.origin + location.pathname;
|
|
3003
|
-
return [4, this.exchangeTokenForCode(this.code, url)];
|
|
3004
|
-
case 1:
|
|
3005
|
-
_a.sent();
|
|
3006
|
-
if (location.hash) {
|
|
3007
|
-
url += location.hash.substring(1);
|
|
3008
|
-
}
|
|
3009
|
-
history.replaceState(null, '', url);
|
|
3010
|
-
_a.label = 2;
|
|
3011
|
-
case 2: return [2];
|
|
3012
|
-
}
|
|
3013
|
-
});
|
|
3014
|
-
});
|
|
3015
|
-
};
|
|
3016
|
-
AuthMicrosoftService.prototype.login = function (email) {
|
|
3017
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3018
|
-
var loginUrl;
|
|
3019
|
-
return __generator(this, function (_a) {
|
|
3020
|
-
if (!this.isValidEmail(email)) {
|
|
3021
|
-
this.loggerSvc.warn("Microsoft Login is not allowed for your emailId (" + email + ")");
|
|
3022
|
-
return [2];
|
|
3023
|
-
}
|
|
3024
|
-
loginUrl = this.loginUrl;
|
|
3025
|
-
if (loginUrl) {
|
|
3026
|
-
location.assign(loginUrl);
|
|
3027
|
-
}
|
|
3028
|
-
else {
|
|
3029
|
-
this.loggerSvc.warn('Unable to identify Office Login URL, Ignoring login request');
|
|
3030
|
-
}
|
|
3031
|
-
return [2];
|
|
3032
|
-
});
|
|
3033
|
-
});
|
|
3034
|
-
};
|
|
3035
|
-
AuthMicrosoftService.prototype.getToken = function (email) {
|
|
3036
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3037
|
-
var _a, error_1, _b, error_2;
|
|
3038
|
-
return __generator(this, function (_c) {
|
|
3039
|
-
switch (_c.label) {
|
|
3040
|
-
case 0:
|
|
3041
|
-
if (this.msToken &&
|
|
3042
|
-
this.isValid(this.msToken.accessToken, this.msToken.expiresOn) &&
|
|
3043
|
-
this.msToken.accessToken) {
|
|
3044
|
-
return [2, this.msToken.accessToken];
|
|
3045
|
-
}
|
|
3046
|
-
if (!this.isValidEmail(email)) return [3, 4];
|
|
3047
|
-
_c.label = 1;
|
|
3048
|
-
case 1:
|
|
3049
|
-
_c.trys.push([1, 3, , 4]);
|
|
3050
|
-
_a = this;
|
|
3051
|
-
return [4, this.getTokenForEmail(email)];
|
|
3052
|
-
case 2:
|
|
3053
|
-
_a.msToken = _c.sent();
|
|
3054
|
-
if (this.msToken.accessToken) {
|
|
3055
|
-
this.emailUsed = email;
|
|
3056
|
-
return [2, this.msToken.accessToken];
|
|
3057
|
-
}
|
|
3058
|
-
return [3, 4];
|
|
3059
|
-
case 3:
|
|
3060
|
-
error_1 = _c.sent();
|
|
3061
|
-
if (!this.code) {
|
|
3062
|
-
this.login(email);
|
|
3063
|
-
}
|
|
3064
|
-
return [3, 4];
|
|
3065
|
-
case 4:
|
|
3066
|
-
if (!(this.msConfig.defaultEmailId && this.isValidEmail(this.msConfig.defaultEmailId))) return [3, 8];
|
|
3067
|
-
_c.label = 5;
|
|
3068
|
-
case 5:
|
|
3069
|
-
_c.trys.push([5, 7, , 8]);
|
|
3070
|
-
_b = this;
|
|
3071
|
-
return [4, this.getTokenForEmail(this.msConfig.defaultEmailId)];
|
|
3072
|
-
case 6:
|
|
3073
|
-
_b.msToken = _c.sent();
|
|
3074
|
-
if (this.msToken.accessToken) {
|
|
3075
|
-
this.emailUsed = this.msConfig.defaultEmailId;
|
|
3076
|
-
return [2, this.msToken.accessToken];
|
|
3077
|
-
}
|
|
3078
|
-
return [3, 8];
|
|
3079
|
-
case 7:
|
|
3080
|
-
error_2 = _c.sent();
|
|
3081
|
-
return [3, 8];
|
|
3082
|
-
case 8: throw new Error('UNABLE TO FETCH MS AUTH TOKEN');
|
|
3083
|
-
}
|
|
3084
|
-
});
|
|
3085
|
-
});
|
|
2962
|
+
return moment().startOf('hour').fromNow();
|
|
3086
2963
|
};
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
2964
|
+
PipeRelativeTimePipe.decorators = [
|
|
2965
|
+
{ type: core.Pipe, args: [{
|
|
2966
|
+
name: 'pipeRelativeTime',
|
|
2967
|
+
},] }
|
|
2968
|
+
];
|
|
2969
|
+
return PipeRelativeTimePipe;
|
|
2970
|
+
}());
|
|
2971
|
+
|
|
2972
|
+
var PipeRelativeTimeModule = (function () {
|
|
2973
|
+
function PipeRelativeTimeModule() {
|
|
2974
|
+
}
|
|
2975
|
+
PipeRelativeTimeModule.decorators = [
|
|
2976
|
+
{ type: core.NgModule, args: [{
|
|
2977
|
+
declarations: [PipeRelativeTimePipe],
|
|
2978
|
+
imports: [
|
|
2979
|
+
common.CommonModule,
|
|
2980
|
+
],
|
|
2981
|
+
exports: [PipeRelativeTimePipe],
|
|
2982
|
+
},] }
|
|
2983
|
+
];
|
|
2984
|
+
return PipeRelativeTimeModule;
|
|
2985
|
+
}());
|
|
2986
|
+
|
|
2987
|
+
var OrderByPipe = (function () {
|
|
2988
|
+
function OrderByPipe() {
|
|
2989
|
+
this.transform = _.orderBy;
|
|
2990
|
+
}
|
|
2991
|
+
OrderByPipe.decorators = [
|
|
2992
|
+
{ type: core.Pipe, args: [{
|
|
2993
|
+
name: 'orderBy',
|
|
2994
|
+
},] }
|
|
2995
|
+
];
|
|
2996
|
+
return OrderByPipe;
|
|
2997
|
+
}());
|
|
2998
|
+
if (false) {
|
|
2999
|
+
OrderByPipe.prototype.transform;
|
|
3000
|
+
}
|
|
3001
|
+
|
|
3002
|
+
var PipeOrderByModule = (function () {
|
|
3003
|
+
function PipeOrderByModule() {
|
|
3004
|
+
}
|
|
3005
|
+
PipeOrderByModule.decorators = [
|
|
3006
|
+
{ type: core.NgModule, args: [{
|
|
3007
|
+
declarations: [OrderByPipe],
|
|
3008
|
+
imports: [
|
|
3009
|
+
common.CommonModule,
|
|
3010
|
+
],
|
|
3011
|
+
exports: [OrderByPipe],
|
|
3012
|
+
},] }
|
|
3013
|
+
];
|
|
3014
|
+
return PipeOrderByModule;
|
|
3015
|
+
}());
|
|
3016
|
+
|
|
3017
|
+
var PipeLimitToPipe = (function () {
|
|
3018
|
+
function PipeLimitToPipe() {
|
|
3019
|
+
}
|
|
3020
|
+
PipeLimitToPipe.prototype.transform = function (data, limit) {
|
|
3021
|
+
if (limit === void 0) { limit = 5; }
|
|
3022
|
+
if (!data || !data.length) {
|
|
3023
|
+
return null;
|
|
3090
3024
|
}
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
msPrevTS = parseInt(storage.getItem(storageKey) || '0', 10);
|
|
3025
|
+
if (Array.isArray(data)) {
|
|
3026
|
+
return data.slice(0, limit);
|
|
3094
3027
|
}
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3028
|
+
if (typeof data === 'string') {
|
|
3029
|
+
var slicedString = data.substr(0, limit);
|
|
3030
|
+
if (limit < data.length) {
|
|
3031
|
+
return slicedString + "...";
|
|
3032
|
+
}
|
|
3033
|
+
return slicedString;
|
|
3100
3034
|
}
|
|
3035
|
+
return null;
|
|
3101
3036
|
};
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3037
|
+
PipeLimitToPipe.decorators = [
|
|
3038
|
+
{ type: core.Pipe, args: [{
|
|
3039
|
+
name: 'pipeLimitTo',
|
|
3040
|
+
},] }
|
|
3041
|
+
];
|
|
3042
|
+
return PipeLimitToPipe;
|
|
3043
|
+
}());
|
|
3044
|
+
|
|
3045
|
+
var PipeLimitToModule = (function () {
|
|
3046
|
+
function PipeLimitToModule() {
|
|
3047
|
+
}
|
|
3048
|
+
PipeLimitToModule.decorators = [
|
|
3049
|
+
{ type: core.NgModule, args: [{
|
|
3050
|
+
declarations: [PipeLimitToPipe],
|
|
3051
|
+
imports: [
|
|
3052
|
+
common.CommonModule,
|
|
3053
|
+
],
|
|
3054
|
+
exports: [PipeLimitToPipe],
|
|
3055
|
+
},] }
|
|
3056
|
+
];
|
|
3057
|
+
return PipeLimitToModule;
|
|
3058
|
+
}());
|
|
3059
|
+
|
|
3060
|
+
function IUserName() { }
|
|
3061
|
+
if (false) {
|
|
3062
|
+
IUserName.prototype.firstName;
|
|
3063
|
+
IUserName.prototype.lastName;
|
|
3064
|
+
IUserName.prototype.email;
|
|
3065
|
+
}
|
|
3066
|
+
var PipeNameTransformPipe = (function () {
|
|
3067
|
+
function PipeNameTransformPipe() {
|
|
3068
|
+
}
|
|
3069
|
+
PipeNameTransformPipe.prototype.transform = function (value) {
|
|
3070
|
+
var result = '';
|
|
3071
|
+
if (value.firstName) {
|
|
3072
|
+
result += value.firstName;
|
|
3108
3073
|
}
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
case 1:
|
|
3120
|
-
response = _a.sent();
|
|
3121
|
-
return [2, this.getInstanceFromResponse(response)];
|
|
3122
|
-
}
|
|
3123
|
-
});
|
|
3124
|
-
});
|
|
3074
|
+
if (value.lastName && value.lastName !== value.firstName) {
|
|
3075
|
+
result += " " + value.lastName;
|
|
3076
|
+
}
|
|
3077
|
+
if (result.trim() !== '') {
|
|
3078
|
+
return result;
|
|
3079
|
+
}
|
|
3080
|
+
if (value.email) {
|
|
3081
|
+
return value.email;
|
|
3082
|
+
}
|
|
3083
|
+
return 'Anonymous User';
|
|
3125
3084
|
};
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3085
|
+
PipeNameTransformPipe.decorators = [
|
|
3086
|
+
{ type: core.Pipe, args: [{
|
|
3087
|
+
name: 'pipeNameTransform',
|
|
3088
|
+
},] }
|
|
3089
|
+
];
|
|
3090
|
+
return PipeNameTransformPipe;
|
|
3091
|
+
}());
|
|
3092
|
+
|
|
3093
|
+
var PipeNameTransformModule = (function () {
|
|
3094
|
+
function PipeNameTransformModule() {
|
|
3095
|
+
}
|
|
3096
|
+
PipeNameTransformModule.decorators = [
|
|
3097
|
+
{ type: core.NgModule, args: [{
|
|
3098
|
+
declarations: [PipeNameTransformPipe],
|
|
3099
|
+
imports: [
|
|
3100
|
+
common.CommonModule,
|
|
3101
|
+
],
|
|
3102
|
+
exports: [PipeNameTransformPipe],
|
|
3103
|
+
},] }
|
|
3104
|
+
];
|
|
3105
|
+
return PipeNameTransformModule;
|
|
3106
|
+
}());
|
|
3107
|
+
|
|
3108
|
+
var PipePartialContentPipe = (function () {
|
|
3109
|
+
function PipePartialContentPipe() {
|
|
3110
|
+
}
|
|
3111
|
+
PipePartialContentPipe.prototype.transform = function (value, keys) {
|
|
3112
|
+
var e_1, _a;
|
|
3113
|
+
var result = {};
|
|
3114
|
+
try {
|
|
3115
|
+
for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {
|
|
3116
|
+
var key = keys_1_1.value;
|
|
3117
|
+
if (value[key]) {
|
|
3118
|
+
result[key] = value[key];
|
|
3137
3119
|
}
|
|
3138
|
-
}
|
|
3139
|
-
}
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3123
|
+
finally {
|
|
3124
|
+
try {
|
|
3125
|
+
if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);
|
|
3126
|
+
}
|
|
3127
|
+
finally { if (e_1) throw e_1.error; }
|
|
3128
|
+
}
|
|
3129
|
+
return result;
|
|
3140
3130
|
};
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3131
|
+
PipePartialContentPipe.decorators = [
|
|
3132
|
+
{ type: core.Pipe, args: [{
|
|
3133
|
+
name: 'pipePartialContent',
|
|
3134
|
+
},] }
|
|
3135
|
+
];
|
|
3136
|
+
return PipePartialContentPipe;
|
|
3137
|
+
}());
|
|
3138
|
+
|
|
3139
|
+
var PipePartialContentModule = (function () {
|
|
3140
|
+
function PipePartialContentModule() {
|
|
3141
|
+
}
|
|
3142
|
+
PipePartialContentModule.decorators = [
|
|
3143
|
+
{ type: core.NgModule, args: [{
|
|
3144
|
+
declarations: [PipePartialContentPipe],
|
|
3145
|
+
imports: [
|
|
3146
|
+
common.CommonModule,
|
|
3147
|
+
],
|
|
3148
|
+
exports: [PipePartialContentPipe],
|
|
3149
|
+
},] }
|
|
3150
|
+
];
|
|
3151
|
+
return PipePartialContentModule;
|
|
3152
|
+
}());
|
|
3153
|
+
|
|
3154
|
+
var PipeSafeSanitizerPipe = (function () {
|
|
3155
|
+
function PipeSafeSanitizerPipe(sanitizer) {
|
|
3156
|
+
this.sanitizer = sanitizer;
|
|
3157
|
+
}
|
|
3158
|
+
PipeSafeSanitizerPipe.prototype.transform = function (value, type) {
|
|
3159
|
+
if (type === void 0) { type = 'html'; }
|
|
3160
|
+
switch (type) {
|
|
3161
|
+
case 'html':
|
|
3162
|
+
return this.sanitizer.bypassSecurityTrustHtml(value);
|
|
3163
|
+
case 'style':
|
|
3164
|
+
return this.sanitizer.bypassSecurityTrustStyle(value);
|
|
3165
|
+
case 'script':
|
|
3166
|
+
return this.sanitizer.bypassSecurityTrustScript(value);
|
|
3167
|
+
case 'url':
|
|
3168
|
+
return this.sanitizer.bypassSecurityTrustUrl(value);
|
|
3169
|
+
case 'resourceUrl':
|
|
3170
|
+
return this.sanitizer.bypassSecurityTrustResourceUrl(value);
|
|
3171
|
+
default:
|
|
3172
|
+
throw new Error("Invalid safe type specified: " + type);
|
|
3173
|
+
}
|
|
3148
3174
|
};
|
|
3149
|
-
|
|
3150
|
-
{ type: core.
|
|
3151
|
-
|
|
3175
|
+
PipeSafeSanitizerPipe.decorators = [
|
|
3176
|
+
{ type: core.Pipe, args: [{
|
|
3177
|
+
name: 'pipeSafeSanitizer',
|
|
3152
3178
|
},] }
|
|
3153
3179
|
];
|
|
3154
|
-
|
|
3155
|
-
{ type:
|
|
3156
|
-
{ type: http.HttpClient }
|
|
3180
|
+
PipeSafeSanitizerPipe.ctorParameters = function () { return [
|
|
3181
|
+
{ type: platformBrowser.DomSanitizer }
|
|
3157
3182
|
]; };
|
|
3158
|
-
|
|
3159
|
-
return AuthMicrosoftService;
|
|
3183
|
+
return PipeSafeSanitizerPipe;
|
|
3160
3184
|
}());
|
|
3161
3185
|
if (false) {
|
|
3162
|
-
|
|
3163
|
-
AuthMicrosoftService.prototype.emailUsed;
|
|
3164
|
-
AuthMicrosoftService.prototype.code;
|
|
3165
|
-
AuthMicrosoftService.prototype.msToken;
|
|
3166
|
-
AuthMicrosoftService.prototype.loggerSvc;
|
|
3167
|
-
AuthMicrosoftService.prototype.http;
|
|
3186
|
+
PipeSafeSanitizerPipe.prototype.sanitizer;
|
|
3168
3187
|
}
|
|
3169
3188
|
|
|
3170
|
-
function
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3189
|
+
var PipeSafeSanitizerModule = (function () {
|
|
3190
|
+
function PipeSafeSanitizerModule() {
|
|
3191
|
+
}
|
|
3192
|
+
PipeSafeSanitizerModule.decorators = [
|
|
3193
|
+
{ type: core.NgModule, args: [{
|
|
3194
|
+
declarations: [PipeSafeSanitizerPipe],
|
|
3195
|
+
imports: [
|
|
3196
|
+
common.CommonModule,
|
|
3197
|
+
],
|
|
3198
|
+
exports: [PipeSafeSanitizerPipe],
|
|
3199
|
+
},] }
|
|
3200
|
+
];
|
|
3201
|
+
return PipeSafeSanitizerModule;
|
|
3202
|
+
}());
|
|
3203
|
+
|
|
3204
|
+
var ExploreDetailResolve = (function () {
|
|
3205
|
+
function ExploreDetailResolve(http, configSvc, utilitySvc) {
|
|
3182
3206
|
this.http = http;
|
|
3183
3207
|
this.configSvc = configSvc;
|
|
3184
|
-
this.
|
|
3185
|
-
this.
|
|
3186
|
-
this.
|
|
3187
|
-
this.loginChangeSubject.subscribe((function (isLoggedIn) {
|
|
3188
|
-
_this.configSvc.isAuthenticated = isLoggedIn;
|
|
3189
|
-
if (isLoggedIn &&
|
|
3190
|
-
_this.configSvc.instanceConfig &&
|
|
3191
|
-
Boolean(_this.configSvc.instanceConfig.disablePidCheck)) {
|
|
3192
|
-
_this.configSvc.userProfile = {
|
|
3193
|
-
email: _this.userEmail,
|
|
3194
|
-
userName: _this.userName,
|
|
3195
|
-
userId: _this.userId || '',
|
|
3196
|
-
};
|
|
3197
|
-
}
|
|
3198
|
-
}));
|
|
3208
|
+
this.utilitySvc = utilitySvc;
|
|
3209
|
+
this.baseUrl = this.configSvc.sitePath;
|
|
3210
|
+
this.isIntranetAllowedSettings = false;
|
|
3199
3211
|
}
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
}
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
Object.defineProperty(AuthKeycloakService.prototype, "token", {
|
|
3222
|
-
get: function () {
|
|
3223
|
-
return this.keycloakSvc.getKeycloakInstance().token;
|
|
3224
|
-
},
|
|
3225
|
-
enumerable: true,
|
|
3226
|
-
configurable: true
|
|
3227
|
-
});
|
|
3228
|
-
Object.defineProperty(AuthKeycloakService.prototype, "sessionId", {
|
|
3229
|
-
get: function () {
|
|
3230
|
-
return this.keycloakSvc.getKeycloakInstance().sessionId;
|
|
3231
|
-
},
|
|
3232
|
-
enumerable: true,
|
|
3233
|
-
configurable: true
|
|
3234
|
-
});
|
|
3235
|
-
Object.defineProperty(AuthKeycloakService.prototype, "userId", {
|
|
3236
|
-
get: function () {
|
|
3237
|
-
var kc = this.keycloakSvc.getKeycloakInstance();
|
|
3238
|
-
if (!kc) {
|
|
3239
|
-
return;
|
|
3212
|
+
ExploreDetailResolve.prototype.resolve = function (route, _state) {
|
|
3213
|
+
var _this = this;
|
|
3214
|
+
this.isIntranetAllowedSettings = this.configSvc.isIntranetAllowed;
|
|
3215
|
+
var tag = decodeURIComponent(route.params.tags);
|
|
3216
|
+
var url = '';
|
|
3217
|
+
if (route.data.pageUrl) {
|
|
3218
|
+
url = route.data.pageUrl;
|
|
3219
|
+
}
|
|
3220
|
+
if (route.data.pageType === 'page' && route.data.pageKey) {
|
|
3221
|
+
url = this.baseUrl + "/page/" + route.data.pageKey + ".json";
|
|
3222
|
+
}
|
|
3223
|
+
return this.http.get(url).pipe(operators.map((function (pageData) { return ({ data: _this.transformPageData(pageData, tag), error: null }); })), operators.catchError((function (err) { return rxjs.of({ data: null, error: err }); })));
|
|
3224
|
+
};
|
|
3225
|
+
ExploreDetailResolve.prototype.transformPageData = function (pageData, tag) {
|
|
3226
|
+
var _this = this;
|
|
3227
|
+
var DELIMITER = '>';
|
|
3228
|
+
var path = tag.split(DELIMITER);
|
|
3229
|
+
pageData.pageLayout.widgetData.widgets = pageData.pageLayout.widgetData.widgets.map((function (widget) {
|
|
3230
|
+
if (pageData.navigationBar && pageData.navigationBar.links) {
|
|
3231
|
+
pageData.navigationBar.links = pageData.navigationBar.links
|
|
3232
|
+
.filter((function (link) { return link.widgetData.tags === tag; }));
|
|
3240
3233
|
}
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
return ((kc.tokenParsed && (((kc.tokenParsed))).name) ||
|
|
3264
|
-
(kc.idTokenParsed && (((kc.idTokenParsed))).name));
|
|
3265
|
-
},
|
|
3266
|
-
enumerable: true,
|
|
3267
|
-
configurable: true
|
|
3268
|
-
});
|
|
3269
|
-
AuthKeycloakService.prototype.initAuth = function () {
|
|
3270
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3271
|
-
var instanceConfig, err_1;
|
|
3272
|
-
return __generator(this, function (_a) {
|
|
3273
|
-
switch (_a.label) {
|
|
3274
|
-
case 0:
|
|
3275
|
-
if (!this.configSvc.instanceConfig) {
|
|
3276
|
-
return [2, false];
|
|
3277
|
-
}
|
|
3278
|
-
instanceConfig = this.configSvc.instanceConfig;
|
|
3279
|
-
if (instanceConfig.microsoft.isConfigured) {
|
|
3280
|
-
this.msAuthSvc.init({ microsoft: instanceConfig.microsoft });
|
|
3234
|
+
if (widget.widgetSubType === 'cardBreadcrumb') {
|
|
3235
|
+
widget.widgetData.path = [{
|
|
3236
|
+
text: pageData.navigationBar.pageTitle,
|
|
3237
|
+
clickUrl: pageData.navigationBar.pageBackLink,
|
|
3238
|
+
}].concat(path.map((function (edge, idx) { return ({
|
|
3239
|
+
text: edge,
|
|
3240
|
+
clickUrl: "/page/explore/" + path.slice(0, idx + 1).join(DELIMITER),
|
|
3241
|
+
}); })));
|
|
3242
|
+
}
|
|
3243
|
+
if (widget.widgetSubType === 'contentStripMultiple') {
|
|
3244
|
+
widget.widgetData.strips = widget.widgetData.strips.map((function (strip) {
|
|
3245
|
+
strip.request.searchV6.filters[0].andFilters.push({ catalogPaths: [tag] });
|
|
3246
|
+
if (_this.utilitySvc.isMobile && !_this.isIntranetAllowedSettings) {
|
|
3247
|
+
strip.request.searchV6.filters[0].andFilters.push({ isInIntranet: ['false'] });
|
|
3248
|
+
}
|
|
3249
|
+
return strip;
|
|
3250
|
+
}));
|
|
3251
|
+
if (widget.widgetData.noDataWidget && widget.widgetData.noDataWidget.widgetData.strips) {
|
|
3252
|
+
widget.widgetData.noDataWidget.widgetData.strips = widget.widgetData.noDataWidget.widgetData.strips.map((function (strip) {
|
|
3253
|
+
strip.request.searchV6.filters[0].andFilters.push({ catalogPaths: [tag] });
|
|
3254
|
+
if (_this.utilitySvc.isMobile && !_this.isIntranetAllowedSettings) {
|
|
3255
|
+
strip.request.searchV6.filters[0].andFilters.push({ isInIntranet: ['false'] });
|
|
3281
3256
|
}
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
_a.trys.push([1, 3, , 4]);
|
|
3285
|
-
this.setupGlobalAuthResponder();
|
|
3286
|
-
this.addKeycloakEventListener();
|
|
3287
|
-
return [4, this.keycloakSvc.init({
|
|
3288
|
-
config: {
|
|
3289
|
-
url: instanceConfig.keycloak.url,
|
|
3290
|
-
realm: instanceConfig.keycloak.realm,
|
|
3291
|
-
clientId: instanceConfig.keycloak.clientId,
|
|
3292
|
-
},
|
|
3293
|
-
initOptions: __assign({}, this.getSavedKcConfig(), { onLoad: instanceConfig.keycloak.onLoad || 'check-sso', checkLoginIframe: false }),
|
|
3294
|
-
enableBearerInterceptor: true,
|
|
3295
|
-
loadUserProfileAtStartUp: false,
|
|
3296
|
-
bearerExcludedUrls: instanceConfig.keycloak.bearerExcludedUrls,
|
|
3297
|
-
})];
|
|
3298
|
-
case 2: return [2, _a.sent()];
|
|
3299
|
-
case 3:
|
|
3300
|
-
err_1 = _a.sent();
|
|
3301
|
-
return [2, false];
|
|
3302
|
-
case 4: return [2];
|
|
3303
|
-
}
|
|
3304
|
-
});
|
|
3305
|
-
});
|
|
3306
|
-
};
|
|
3307
|
-
AuthKeycloakService.prototype.login = function (idpHint, redirectUrl) {
|
|
3308
|
-
if (idpHint === void 0) { idpHint = 'E'; }
|
|
3309
|
-
if (redirectUrl === void 0) { redirectUrl = this.defaultRedirectUrl; }
|
|
3310
|
-
return this.keycloakSvc.login({
|
|
3311
|
-
idpHint: idpHint,
|
|
3312
|
-
redirectUri: redirectUrl,
|
|
3313
|
-
});
|
|
3314
|
-
};
|
|
3315
|
-
AuthKeycloakService.prototype.register = function (redirectUrl) {
|
|
3316
|
-
if (redirectUrl === void 0) { redirectUrl = this.defaultRedirectUrl; }
|
|
3317
|
-
return this.keycloakSvc.register({
|
|
3318
|
-
redirectUri: redirectUrl,
|
|
3319
|
-
});
|
|
3320
|
-
};
|
|
3321
|
-
AuthKeycloakService.prototype.logout = function (_redirectUrl) {
|
|
3322
|
-
if (_redirectUrl === void 0) { _redirectUrl = this.defaultRedirectUrl; }
|
|
3323
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3324
|
-
return __generator(this, function (_a) {
|
|
3325
|
-
window.location.href = _redirectUrl + "apis/reset";
|
|
3326
|
-
return [2];
|
|
3327
|
-
});
|
|
3328
|
-
});
|
|
3329
|
-
};
|
|
3330
|
-
AuthKeycloakService.prototype.force_logout = function () {
|
|
3331
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3332
|
-
return __generator(this, function (_a) {
|
|
3333
|
-
switch (_a.label) {
|
|
3334
|
-
case 0: return [4, this.http.get('/apis/reset').toPromise()];
|
|
3335
|
-
case 1:
|
|
3336
|
-
_a.sent();
|
|
3337
|
-
return [2];
|
|
3257
|
+
return strip;
|
|
3258
|
+
}));
|
|
3338
3259
|
}
|
|
3339
|
-
}
|
|
3340
|
-
|
|
3260
|
+
}
|
|
3261
|
+
return widget;
|
|
3262
|
+
}));
|
|
3263
|
+
return pageData;
|
|
3341
3264
|
};
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3265
|
+
ExploreDetailResolve.decorators = [
|
|
3266
|
+
{ type: core.Injectable, args: [{
|
|
3267
|
+
providedIn: 'root',
|
|
3268
|
+
},] }
|
|
3269
|
+
];
|
|
3270
|
+
ExploreDetailResolve.ctorParameters = function () { return [
|
|
3271
|
+
{ type: http.HttpClient },
|
|
3272
|
+
{ type: ConfigurationsService },
|
|
3273
|
+
{ type: UtilityService }
|
|
3274
|
+
]; };
|
|
3275
|
+
/** @nocollapse */ ExploreDetailResolve.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function ExploreDetailResolve_Factory() { return new ExploreDetailResolve(core.ɵɵinject(http.HttpClient), core.ɵɵinject(ConfigurationsService), core.ɵɵinject(UtilityService)); }, token: ExploreDetailResolve, providedIn: "root" });
|
|
3276
|
+
return ExploreDetailResolve;
|
|
3277
|
+
}());
|
|
3278
|
+
if (false) {
|
|
3279
|
+
ExploreDetailResolve.prototype.baseUrl;
|
|
3280
|
+
ExploreDetailResolve.prototype.isIntranetAllowedSettings;
|
|
3281
|
+
ExploreDetailResolve.prototype.http;
|
|
3282
|
+
ExploreDetailResolve.prototype.configSvc;
|
|
3283
|
+
ExploreDetailResolve.prototype.utilitySvc;
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
var MarketingOfferingResolve = (function () {
|
|
3287
|
+
function MarketingOfferingResolve(http) {
|
|
3288
|
+
this.http = http;
|
|
3289
|
+
}
|
|
3290
|
+
MarketingOfferingResolve.prototype.resolve = function (route, _state) {
|
|
3291
|
+
var _this = this;
|
|
3292
|
+
var tag = route.params.tag;
|
|
3293
|
+
return this.http.get(route.data.pageUrl).pipe(operators.map((function (pageData) { return ({ data: _this.transformPageData(pageData, tag), error: null }); })), operators.catchError((function (err) { return rxjs.of({ data: null, error: err }); })));
|
|
3294
|
+
};
|
|
3295
|
+
MarketingOfferingResolve.prototype.transformPageData = function (pageData, tag) {
|
|
3296
|
+
pageData.pageLayout.widgetData.widgets = pageData.pageLayout.widgetData.widgets.map((function (widget) {
|
|
3297
|
+
if (widget.widgetSubType === 'contentStripMultiple') {
|
|
3298
|
+
widget.widgetData.strips = widget.widgetData.strips.map((function (strip) {
|
|
3299
|
+
strip.request.search.filters.catalogPaths = [decodeURIComponent(tag)];
|
|
3300
|
+
return strip;
|
|
3301
|
+
}));
|
|
3368
3302
|
}
|
|
3303
|
+
return widget;
|
|
3369
3304
|
}));
|
|
3305
|
+
return pageData;
|
|
3370
3306
|
};
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3307
|
+
MarketingOfferingResolve.decorators = [
|
|
3308
|
+
{ type: core.Injectable, args: [{
|
|
3309
|
+
providedIn: 'root',
|
|
3310
|
+
},] }
|
|
3311
|
+
];
|
|
3312
|
+
MarketingOfferingResolve.ctorParameters = function () { return [
|
|
3313
|
+
{ type: http.HttpClient }
|
|
3314
|
+
]; };
|
|
3315
|
+
/** @nocollapse */ MarketingOfferingResolve.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function MarketingOfferingResolve_Factory() { return new MarketingOfferingResolve(core.ɵɵinject(http.HttpClient)); }, token: MarketingOfferingResolve, providedIn: "root" });
|
|
3316
|
+
return MarketingOfferingResolve;
|
|
3317
|
+
}());
|
|
3318
|
+
if (false) {
|
|
3319
|
+
MarketingOfferingResolve.prototype.http;
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
var NsPage;
|
|
3323
|
+
(function (NsPage) {
|
|
3324
|
+
function IPage() { }
|
|
3325
|
+
NsPage.IPage = IPage;
|
|
3326
|
+
if (false) {
|
|
3327
|
+
IPage.prototype.contentType;
|
|
3328
|
+
IPage.prototype.navigationBar;
|
|
3329
|
+
IPage.prototype.pageLayout;
|
|
3330
|
+
IPage.prototype.tourGuide;
|
|
3331
|
+
}
|
|
3332
|
+
function INavBar() { }
|
|
3333
|
+
NsPage.INavBar = INavBar;
|
|
3334
|
+
if (false) {
|
|
3335
|
+
INavBar.prototype.links;
|
|
3336
|
+
INavBar.prototype.xsmallNonMenuLinks;
|
|
3337
|
+
INavBar.prototype.pageBackLink;
|
|
3338
|
+
INavBar.prototype.pageTitle;
|
|
3339
|
+
INavBar.prototype.background;
|
|
3340
|
+
}
|
|
3341
|
+
function INavBackground() { }
|
|
3342
|
+
NsPage.INavBackground = INavBackground;
|
|
3343
|
+
if (false) {
|
|
3344
|
+
INavBackground.prototype.color;
|
|
3345
|
+
INavBackground.prototype.styles;
|
|
3346
|
+
}
|
|
3347
|
+
function INavLink() { }
|
|
3348
|
+
NsPage.INavLink = INavLink;
|
|
3349
|
+
if (false) {
|
|
3350
|
+
INavLink.prototype.config;
|
|
3351
|
+
INavLink.prototype.actionBtnId;
|
|
3352
|
+
INavLink.prototype.actionBtn;
|
|
3353
|
+
INavLink.prototype.actionBtnName;
|
|
3354
|
+
}
|
|
3355
|
+
function INavLinkConfig() { }
|
|
3356
|
+
NsPage.INavLinkConfig = INavLinkConfig;
|
|
3357
|
+
if (false) {
|
|
3358
|
+
INavLinkConfig.prototype.type;
|
|
3359
|
+
INavLinkConfig.prototype.hideIcon;
|
|
3360
|
+
INavLinkConfig.prototype.hideTitle;
|
|
3361
|
+
INavLinkConfig.prototype.hideStatus;
|
|
3362
|
+
INavLinkConfig.prototype.hidePin;
|
|
3363
|
+
INavLinkConfig.prototype.iconColor;
|
|
3364
|
+
INavLinkConfig.prototype.treatAsCard;
|
|
3365
|
+
INavLinkConfig.prototype.useShortName;
|
|
3366
|
+
}
|
|
3367
|
+
})(NsPage || (NsPage = {}));
|
|
3368
|
+
|
|
3369
|
+
var JSON_MAP = {
|
|
3370
|
+
pagename: 'lexid',
|
|
3371
|
+
};
|
|
3372
|
+
|
|
3373
|
+
var PageResolve = (function () {
|
|
3374
|
+
function PageResolve(configSvc, http, locale) {
|
|
3375
|
+
this.configSvc = configSvc;
|
|
3376
|
+
this.http = http;
|
|
3377
|
+
this.locale = locale;
|
|
3378
|
+
this.baseUrl = this.configSvc.sitePath;
|
|
3379
|
+
}
|
|
3380
|
+
PageResolve.prototype.resolve = function (route) {
|
|
3381
|
+
if (route.data.pageUrl) {
|
|
3382
|
+
return this.getData(route.data.pageUrl);
|
|
3383
|
+
}
|
|
3384
|
+
if (route.data.pageType === 'feature' && route.data.pageKey) {
|
|
3385
|
+
return this.getData(this.baseUrl + "/feature/" + route.data.pageKey);
|
|
3386
|
+
}
|
|
3387
|
+
if (route.data.pageType === 'page' &&
|
|
3388
|
+
route.data.pageKey &&
|
|
3389
|
+
route.paramMap.has(route.data.pageKey)) {
|
|
3390
|
+
return this.getData(this.baseUrl + "/page/" + route.paramMap.get(route.data.pageKey));
|
|
3391
|
+
}
|
|
3392
|
+
if (route.data.pageType === 'page' &&
|
|
3393
|
+
route.data.pageKey &&
|
|
3394
|
+
route.data.pageKey === 'toc') {
|
|
3395
|
+
return this.getData(this.baseUrl + "/page/" + route.data.pageKey);
|
|
3396
|
+
}
|
|
3397
|
+
return {
|
|
3398
|
+
data: null,
|
|
3399
|
+
error: 'CONFIGURATION_ERROR_PAGE_URL_NOT_FORMED',
|
|
3412
3400
|
};
|
|
3413
|
-
storage$1.setItem(storageKey$1, JSON.stringify(kcInitOptions));
|
|
3414
3401
|
};
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3402
|
+
PageResolve.prototype.setS3Cookie = function (contentId) {
|
|
3403
|
+
return this.http.post("/apis/protected/v8/content/setCookie", { contentId: contentId }).pipe(operators.catchError((function (_err) { return rxjs.of(true); })));
|
|
3404
|
+
};
|
|
3405
|
+
PageResolve.prototype.getContent = function (id) {
|
|
3406
|
+
return this.http
|
|
3407
|
+
.post("/apis/protected/v8/content/" + id + "?hierarchyType=minimal", ['status', 'artifactUrl']);
|
|
3408
|
+
};
|
|
3409
|
+
PageResolve.prototype.getData = function (url) {
|
|
3410
|
+
var _this = this;
|
|
3411
|
+
var id = (((url.split('/').pop()))).split('.')[0] || '';
|
|
3412
|
+
var equivalentId = id.startsWith('lex_auth_') ? id : JSON_MAP[id];
|
|
3413
|
+
if (equivalentId) {
|
|
3414
|
+
return rxjs.forkJoin([this.setS3Cookie(equivalentId), this.getContent(equivalentId)]).pipe(operators.mergeMap((function (_a) {
|
|
3415
|
+
var _b = __read(_a, 2), _ = _b[0], v = _b[1];
|
|
3416
|
+
if (v.status === 'Expired' || v.status === 'Deleted' || !v.artifactUrl) {
|
|
3417
|
+
return rxjs.of({ data: null, error: 'NoContent' });
|
|
3425
3418
|
}
|
|
3426
|
-
|
|
3419
|
+
return _this.http
|
|
3420
|
+
.get(v.artifactUrl + "?ts=" + new Date().getTime())
|
|
3421
|
+
.pipe(operators.map((function (data) { return ({ data: data, error: null }); })), operators.catchError((function (err) { return rxjs.of({ data: null, error: err }); })));
|
|
3422
|
+
})), operators.catchError((function (err) { return rxjs.of({ data: null, error: err }); })));
|
|
3427
3423
|
}
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3424
|
+
var pageRequest = [
|
|
3425
|
+
(equivalentId ? this.setS3Cookie(equivalentId) : rxjs.of(true)).pipe(operators.mergeMap((function () {
|
|
3426
|
+
return _this.http.get(url + ".json").pipe(operators.map((function (data) { return ({ data: data, error: null }); })), operators.catchError((function (err) { return rxjs.of({ data: null, error: err }); })));
|
|
3427
|
+
}))),
|
|
3428
|
+
this.locale === 'en' || this.locale === 'en-US' ?
|
|
3429
|
+
rxjs.of({ data: ((undefined)), error: null }) :
|
|
3430
|
+
this.http.get(url + "." + this.locale + ".json").pipe(operators.map((function (data) { return ({ data: data, error: null }); })), operators.catchError((function (err) { return rxjs.of({ data: null, error: err }); }))),
|
|
3431
|
+
];
|
|
3432
|
+
return rxjs.forkJoin(pageRequest).pipe(operators.map((function (_a) {
|
|
3433
|
+
var _b = __read(_a, 2), general = _b[0], withLocale = _b[1];
|
|
3434
|
+
if (withLocale.data) {
|
|
3435
|
+
return withLocale;
|
|
3439
3436
|
}
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
AuthKeycloakService.decorators = [
|
|
3437
|
+
return general;
|
|
3438
|
+
})));
|
|
3439
|
+
};
|
|
3440
|
+
PageResolve.decorators = [
|
|
3445
3441
|
{ type: core.Injectable, args: [{
|
|
3446
3442
|
providedIn: 'root',
|
|
3447
3443
|
},] }
|
|
3448
3444
|
];
|
|
3449
|
-
|
|
3450
|
-
{ type: http.HttpClient },
|
|
3445
|
+
PageResolve.ctorParameters = function () { return [
|
|
3451
3446
|
{ type: ConfigurationsService },
|
|
3452
|
-
{ type:
|
|
3453
|
-
{ type:
|
|
3447
|
+
{ type: http.HttpClient },
|
|
3448
|
+
{ type: String, decorators: [{ type: core.Inject, args: [core.LOCALE_ID,] }] }
|
|
3454
3449
|
]; };
|
|
3455
|
-
/** @nocollapse */
|
|
3456
|
-
return
|
|
3450
|
+
/** @nocollapse */ PageResolve.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PageResolve_Factory() { return new PageResolve(core.ɵɵinject(ConfigurationsService), core.ɵɵinject(http.HttpClient), core.ɵɵinject(core.LOCALE_ID)); }, token: PageResolve, providedIn: "root" });
|
|
3451
|
+
return PageResolve;
|
|
3457
3452
|
}());
|
|
3458
3453
|
if (false) {
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3454
|
+
PageResolve.prototype.baseUrl;
|
|
3455
|
+
PageResolve.prototype.configSvc;
|
|
3456
|
+
PageResolve.prototype.http;
|
|
3457
|
+
PageResolve.prototype.locale;
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3460
|
+
function IResolveResponse() { }
|
|
3461
|
+
if (false) {
|
|
3462
|
+
IResolveResponse.prototype.data;
|
|
3463
|
+
IResolveResponse.prototype.error;
|
|
3464
3464
|
}
|
|
3465
3465
|
|
|
3466
3466
|
var NsInstanceConfig;
|
|
@@ -3506,17 +3506,6 @@
|
|
|
3506
3506
|
IConfig.prototype.forgotPasswordConfig;
|
|
3507
3507
|
IConfig.prototype.hubs;
|
|
3508
3508
|
IConfig.prototype.courseContentPath;
|
|
3509
|
-
IConfig.prototype.portalUrls;
|
|
3510
|
-
}
|
|
3511
|
-
function IPortalUrls() { }
|
|
3512
|
-
NsInstanceConfig.IPortalUrls = IPortalUrls;
|
|
3513
|
-
if (false) {
|
|
3514
|
-
IPortalUrls.prototype.igot;
|
|
3515
|
-
IPortalUrls.prototype.spv;
|
|
3516
|
-
IPortalUrls.prototype.mdo;
|
|
3517
|
-
IPortalUrls.prototype.cbc;
|
|
3518
|
-
IPortalUrls.prototype.cbp;
|
|
3519
|
-
IPortalUrls.prototype.frac;
|
|
3520
3509
|
}
|
|
3521
3510
|
function IForgotPassword() { }
|
|
3522
3511
|
NsInstanceConfig.IForgotPassword = IForgotPassword;
|