@indigina/kendo 1.0.145-beta → 1.0.164-beta

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.
@@ -1560,33 +1560,6 @@
1560
1560
  { name: 'DELETE', id: 'DELETE' },
1561
1561
  ];
1562
1562
 
1563
- var AppToastrService = /** @class */ (function () {
1564
- function AppToastrService(toastr, appSettings) {
1565
- this.toastr = toastr;
1566
- this.appSettings = appSettings;
1567
- this.timeout = this.appSettings.toastrTimeOut;
1568
- }
1569
- AppToastrService.prototype.showError = function (message, title) {
1570
- if (title === void 0) { title = 'Error'; }
1571
- this.toastr.error(message, title, { timeOut: this.timeout });
1572
- };
1573
- AppToastrService.prototype.showSuccess = function (message, title) {
1574
- if (title === void 0) { title = ''; }
1575
- this.toastr.success(message, title, { timeOut: this.timeout });
1576
- };
1577
- return AppToastrService;
1578
- }());
1579
- AppToastrService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AppToastrService_Factory() { return new AppToastrService(i0__namespace.ɵɵinject(i1__namespace$1.ToastrService), i0__namespace.ɵɵinject(AppSettings)); }, token: AppToastrService, providedIn: "root" });
1580
- AppToastrService.decorators = [
1581
- { type: i0.Injectable, args: [{
1582
- providedIn: 'root',
1583
- },] }
1584
- ];
1585
- AppToastrService.ctorParameters = function () { return [
1586
- { type: i1$1.ToastrService },
1587
- { type: AppSettings }
1588
- ]; };
1589
-
1590
1563
  var callbackPathKey = 'callbackPath';
1591
1564
  var homePath$1 = '/home';
1592
1565
  var loginAsKey = 'X-User-Id';
@@ -1630,6 +1603,35 @@
1630
1603
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
1631
1604
  ];
1632
1605
 
1606
+ var AppToastrService = /** @class */ (function () {
1607
+ function AppToastrService(toastr, appSettings) {
1608
+ this.toastr = toastr;
1609
+ this.appSettings = appSettings;
1610
+ this.timeout = this.appSettings.toastrTimeOut;
1611
+ }
1612
+ AppToastrService.prototype.showError = function (message, title) {
1613
+ if (title === void 0) { title = 'Error'; }
1614
+ this.toastr.error(message, title, { timeOut: this.timeout });
1615
+ };
1616
+ AppToastrService.prototype.showSuccess = function (message, title) {
1617
+ if (title === void 0) { title = ''; }
1618
+ this.toastr.success(message, title, { timeOut: this.timeout });
1619
+ };
1620
+ return AppToastrService;
1621
+ }());
1622
+ AppToastrService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AppToastrService_Factory() { return new AppToastrService(i0__namespace.ɵɵinject(i1__namespace$1.ToastrService), i0__namespace.ɵɵinject(AppSettings)); }, token: AppToastrService, providedIn: "root" });
1623
+ AppToastrService.decorators = [
1624
+ { type: i0.Injectable, args: [{
1625
+ providedIn: 'root',
1626
+ },] }
1627
+ ];
1628
+ AppToastrService.ctorParameters = function () { return [
1629
+ { type: i1$1.ToastrService },
1630
+ { type: AppSettings }
1631
+ ]; };
1632
+
1633
+ var absoluteUrlRegExp = /^http(s)?:\/\//;
1634
+ var slash = '/';
1633
1635
  var HttpService = /** @class */ (function () {
1634
1636
  function HttpService(appToastrService, httpClient, appSettings, translate, router, settingsService) {
1635
1637
  this.appToastrService = appToastrService;
@@ -1660,7 +1662,14 @@
1660
1662
  return this.httpClient.put(this.createUrl(path), data).pipe(operators.tap(function () { return _this.showSuccessMessage(successTranslateMessage !== null && successTranslateMessage !== void 0 ? successTranslateMessage : 'ToastrMessages.SavedSuccessfully'); }), operators.catchError(function (err) { return _this.handleServerError(err); }));
1661
1663
  };
1662
1664
  HttpService.prototype.createUrl = function (path) {
1663
- return this.appSettings.apiUrl + path;
1665
+ if (absoluteUrlRegExp.test(path)) {
1666
+ return path;
1667
+ }
1668
+ path = path.startsWith(slash) ? path.slice(1) : path;
1669
+ var apiUrl = this.appSettings.apiUrl.endsWith(slash)
1670
+ ? this.appSettings.apiUrl
1671
+ : this.appSettings.apiUrl + slash;
1672
+ return apiUrl + path;
1664
1673
  };
1665
1674
  HttpService.prototype.handleServerError = function (error) {
1666
1675
  if (error.error instanceof ErrorEvent) {
@@ -2030,6 +2039,7 @@
2030
2039
  clickedOutside: [{ type: i0.HostListener, args: ['document:click', ['$event'],] }]
2031
2040
  };
2032
2041
 
2042
+ var resetPasswordCanceledErrorCode = 'AADB2C90091';
2033
2043
  var AzureLoginCallbackComponent = /** @class */ (function () {
2034
2044
  function AzureLoginCallbackComponent(authService, settingsService, router) {
2035
2045
  this.authService = authService;
@@ -2038,12 +2048,16 @@
2038
2048
  }
2039
2049
  AzureLoginCallbackComponent.prototype.ngOnInit = function () {
2040
2050
  var _this = this;
2041
- this.authService
2042
- .handleRedirectObservable()
2043
- .subscribe(function (result) {
2044
- _this.settingsService.setToken(result.idToken);
2045
- _this.authService.instance.setActiveAccount(result.account);
2051
+ this.authService.handleRedirectObservable().subscribe(function (result) {
2052
+ if (result) {
2053
+ _this.settingsService.setToken(result.idToken);
2054
+ _this.authService.instance.setActiveAccount(result.account);
2055
+ }
2046
2056
  _this.router.navigate(['home']);
2057
+ }, function (error) {
2058
+ if (error.errorMessage.includes(resetPasswordCanceledErrorCode)) {
2059
+ _this.router.navigate(['home']);
2060
+ }
2047
2061
  });
2048
2062
  };
2049
2063
  AzureLoginCallbackComponent.prototype.logout = function () {