@indigina/kendo 1.0.142-beta → 1.0.155-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.
@@ -1245,6 +1245,9 @@
1245
1245
  function IndiginaModule() {
1246
1246
  }
1247
1247
  IndiginaModule.forRoot = function (configuration) {
1248
+ if (!configuration.appSettings.apiUrl.endsWith('/')) {
1249
+ configuration.appSettings.apiUrl += '/';
1250
+ }
1248
1251
  return {
1249
1252
  ngModule: IndiginaModule,
1250
1253
  providers: [
@@ -1560,33 +1563,6 @@
1560
1563
  { name: 'DELETE', id: 'DELETE' },
1561
1564
  ];
1562
1565
 
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
1566
  var callbackPathKey = 'callbackPath';
1591
1567
  var homePath$1 = '/home';
1592
1568
  var loginAsKey = 'X-User-Id';
@@ -1630,6 +1606,34 @@
1630
1606
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
1631
1607
  ];
1632
1608
 
1609
+ var AppToastrService = /** @class */ (function () {
1610
+ function AppToastrService(toastr, appSettings) {
1611
+ this.toastr = toastr;
1612
+ this.appSettings = appSettings;
1613
+ this.timeout = this.appSettings.toastrTimeOut;
1614
+ }
1615
+ AppToastrService.prototype.showError = function (message, title) {
1616
+ if (title === void 0) { title = 'Error'; }
1617
+ this.toastr.error(message, title, { timeOut: this.timeout });
1618
+ };
1619
+ AppToastrService.prototype.showSuccess = function (message, title) {
1620
+ if (title === void 0) { title = ''; }
1621
+ this.toastr.success(message, title, { timeOut: this.timeout });
1622
+ };
1623
+ return AppToastrService;
1624
+ }());
1625
+ 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" });
1626
+ AppToastrService.decorators = [
1627
+ { type: i0.Injectable, args: [{
1628
+ providedIn: 'root',
1629
+ },] }
1630
+ ];
1631
+ AppToastrService.ctorParameters = function () { return [
1632
+ { type: i1$1.ToastrService },
1633
+ { type: AppSettings }
1634
+ ]; };
1635
+
1636
+ var absoluteUrlRegExp = /^http(s)?:\/\//;
1633
1637
  var HttpService = /** @class */ (function () {
1634
1638
  function HttpService(appToastrService, httpClient, appSettings, translate, router, settingsService) {
1635
1639
  this.appToastrService = appToastrService;
@@ -1660,7 +1664,7 @@
1660
1664
  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
1665
  };
1662
1666
  HttpService.prototype.createUrl = function (path) {
1663
- return this.appSettings.apiUrl + path;
1667
+ return absoluteUrlRegExp.test(path) ? path : this.appSettings.apiUrl + path;
1664
1668
  };
1665
1669
  HttpService.prototype.handleServerError = function (error) {
1666
1670
  if (error.error instanceof ErrorEvent) {
@@ -2041,8 +2045,10 @@
2041
2045
  this.authService
2042
2046
  .handleRedirectObservable()
2043
2047
  .subscribe(function (result) {
2044
- _this.settingsService.setToken(result.idToken);
2045
- _this.authService.instance.setActiveAccount(result.account);
2048
+ if (result) {
2049
+ _this.settingsService.setToken(result.idToken);
2050
+ _this.authService.instance.setActiveAccount(result.account);
2051
+ }
2046
2052
  _this.router.navigate(['home']);
2047
2053
  });
2048
2054
  };
@@ -2110,6 +2116,32 @@
2110
2116
  clickedOutside: [{ type: i0.HostListener, args: ['document:click', ['$event'],] }]
2111
2117
  };
2112
2118
 
2119
+ var isIE = window.navigator.userAgent.indexOf('MSIE ') > -1 ||
2120
+ window.navigator.userAgent.indexOf('Trident/') > -1;
2121
+ var MSALInstanceFactory = function (config) {
2122
+ var msalConfig = {
2123
+ auth: {
2124
+ clientId: config.appSettings.azureB2C.clientId,
2125
+ authority: config.appSettings.azureB2C.authority,
2126
+ knownAuthorities: config.appSettings.azureB2C.knownAuthorities,
2127
+ redirectUri: window.location.origin + '/azure/login/callback',
2128
+ postLogoutRedirectUri: '/',
2129
+ navigateToLoginRequestUrl: false,
2130
+ },
2131
+ cache: {
2132
+ cacheLocation: msalBrowser.BrowserCacheLocation.SessionStorage,
2133
+ storeAuthStateInCookie: isIE,
2134
+ },
2135
+ system: {
2136
+ loggerOptions: {
2137
+ loggerCallback: function () { },
2138
+ piiLoggingEnabled: false,
2139
+ },
2140
+ },
2141
+ };
2142
+ return new msalBrowser.PublicClientApplication(msalConfig);
2143
+ };
2144
+
2113
2145
  var PermissionsService = /** @class */ (function () {
2114
2146
  function PermissionsService(httpService, accountService, signalRService) {
2115
2147
  var _this = this;
@@ -2235,32 +2267,6 @@
2235
2267
  permissionCategory: [{ type: i0.Input }]
2236
2268
  };
2237
2269
 
2238
- var isIE = window.navigator.userAgent.indexOf('MSIE ') > -1 ||
2239
- window.navigator.userAgent.indexOf('Trident/') > -1;
2240
- var MSALInstanceFactory = function (config) {
2241
- var msalConfig = {
2242
- auth: {
2243
- clientId: config.appSettings.azureB2C.clientId,
2244
- authority: config.appSettings.azureB2C.authority,
2245
- knownAuthorities: config.appSettings.azureB2C.knownAuthorities,
2246
- redirectUri: window.location.origin + '/azure/login/callback',
2247
- postLogoutRedirectUri: '/',
2248
- navigateToLoginRequestUrl: false,
2249
- },
2250
- cache: {
2251
- cacheLocation: msalBrowser.BrowserCacheLocation.SessionStorage,
2252
- storeAuthStateInCookie: isIE,
2253
- },
2254
- system: {
2255
- loggerOptions: {
2256
- loggerCallback: function () { },
2257
- piiLoggingEnabled: false,
2258
- },
2259
- },
2260
- };
2261
- return new msalBrowser.PublicClientApplication(msalConfig);
2262
- };
2263
-
2264
2270
  var AuthorizationHeader = 'Authorization';
2265
2271
  var AuthHeadersInterceptor = /** @class */ (function () {
2266
2272
  function AuthHeadersInterceptor(settingsService) {
@@ -3182,6 +3188,9 @@
3182
3188
  function KendoModule() {
3183
3189
  }
3184
3190
  KendoModule.forRoot = function (config) {
3191
+ if (!config.appSettings.apiUrl.endsWith('/')) {
3192
+ config.appSettings.apiUrl += '/';
3193
+ }
3185
3194
  return {
3186
3195
  ngModule: KendoModule,
3187
3196
  providers: [
@@ -3766,6 +3775,7 @@
3766
3775
  exports.LanguageSelectorComponent = LanguageSelectorComponent;
3767
3776
  exports.LiveUpdatesControlComponent = LiveUpdatesControlComponent;
3768
3777
  exports.LocaleSettingsService = LocaleSettingsService;
3778
+ exports.MSALInstanceFactory = MSALInstanceFactory;
3769
3779
  exports.ModalWindowComponent = ModalWindowComponent;
3770
3780
  exports.MulticheckFilterComponent = MulticheckFilterComponent;
3771
3781
  exports.NumberInputComponent = NumberInputComponent;
@@ -3790,7 +3800,6 @@
3790
3800
  exports.ɵe = TreeViewNodeComponent;
3791
3801
  exports.ɵf = TreeViewNodePropComponent;
3792
3802
  exports.ɵg = AuthHeadersInterceptor;
3793
- exports.ɵh = MSALInstanceFactory;
3794
3803
  Object.keys(animations).forEach(function (k) {
3795
3804
  if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
3796
3805
  enumerable: true,