@smartbit4all/ng-client 1.1.28 → 1.1.30

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.
Files changed (36) hide show
  1. package/esm2020/lib/session/dev-tool/smart-dev-tool-dialog/smart-dev-tool-dialog.component.mjs +2 -2
  2. package/esm2020/lib/session/dev-tool/smart-dev-tool-floating-button/smart-dev-tool-floating-button.component.mjs +10 -10
  3. package/esm2020/lib/session/dev-tool/smart-dev-tool.service.mjs +26 -22
  4. package/esm2020/lib/session/smart-header-maintainer.interceptor.mjs +8 -1
  5. package/esm2020/lib/session/smart-session.service.mjs +12 -6
  6. package/esm2020/lib/session/smart-timer/smart-session-timer.component.mjs +6 -6
  7. package/esm2020/lib/session/smart-timer/smart-session-timer.service.mjs +9 -8
  8. package/esm2020/lib/smart-client/projects.mjs +5 -6
  9. package/esm2020/lib/smart-client/smart-authentication.service.mjs +10 -4
  10. package/esm2020/lib/smart-client/smart-component-api-client.mjs +2 -2
  11. package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.mjs +13 -12
  12. package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.mjs +13 -12
  13. package/esm2020/lib/view-context/smart-ui-action/ui-action.descriptor.service.mjs +3 -2
  14. package/esm2020/lib/view-context/smart-ui-action/ui-action.service.mjs +9 -3
  15. package/esm2020/lib/view-context/smart-view-context.module.mjs +18 -18
  16. package/esm2020/lib/view-context/smart-view-context.service.mjs +13 -7
  17. package/fesm2015/smartbit4all-ng-client.mjs +94 -83
  18. package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
  19. package/fesm2020/smartbit4all-ng-client.mjs +94 -83
  20. package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
  21. package/lib/session/dev-tool/smart-dev-tool-floating-button/smart-dev-tool-floating-button.component.d.ts +2 -2
  22. package/lib/session/dev-tool/smart-dev-tool.service.d.ts +8 -6
  23. package/lib/session/smart-session.service.d.ts +4 -1
  24. package/lib/session/smart-timer/smart-session-timer.component.d.ts +2 -2
  25. package/lib/session/smart-timer/smart-session-timer.service.d.ts +3 -3
  26. package/lib/smart-client/projects.d.ts +4 -5
  27. package/lib/smart-client/smart-authentication.service.d.ts +5 -2
  28. package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.d.ts +5 -5
  29. package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.d.ts +6 -6
  30. package/lib/view-context/smart-ui-action/ui-action.service.d.ts +4 -1
  31. package/lib/view-context/smart-view-context.service.d.ts +4 -2
  32. package/package.json +1 -1
  33. package/smartbit4all-ng-client-1.1.30.tgz +0 -0
  34. package/esm2020/lib/smart-client/smart.subject.mjs +0 -21
  35. package/lib/smart-client/smart.subject.d.ts +0 -6
  36. package/smartbit4all-ng-client-1.1.28.tgz +0 -0
@@ -1,6 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, Injectable, Optional, Inject, PLATFORM_ID, NgModule, SkipSelf, Component, Pipe, CUSTOM_ELEMENTS_SCHEMA, ViewChild, Input } from '@angular/core';
3
3
  import { Subject, takeUntil, map, catchError, throwError, from } from 'rxjs';
4
+ import { SmartSubject } from '@smartbit4all/subject';
4
5
  import * as i1 from '@angular/common/http';
5
6
  import { HttpHeaders, HttpContext, HttpEventType, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
6
7
  import * as i4 from '@angular/common';
@@ -730,14 +731,15 @@ class SmartSessionService {
730
731
  constructor(apiService, cookieService) {
731
732
  this.apiService = apiService;
732
733
  this.cookieService = cookieService;
734
+ this._destroy$ = new Subject();
733
735
  this.isAuthenticated = false;
734
- this.authenticationStateChanged = new Subject();
736
+ this.authenticationStateChanged = new SmartSubject(this._destroy$);
735
737
  this.headerParams = new Array();
736
- this.headersUpdated = new Subject();
738
+ this.headersUpdated = new SmartSubject(this._destroy$);
737
739
  // Locale
738
740
  this.localStorageLocaleName = 'locale';
739
- this.localeChanged = new Subject();
740
- this.sessionExpiracyChanged = new Subject();
741
+ this.localeChanged = new SmartSubject(this._destroy$);
742
+ this.sessionExpiracyChanged = new SmartSubject(this._destroy$);
741
743
  }
742
744
  get sessionInfoData() {
743
745
  return this._sessionInfoData;
@@ -749,6 +751,10 @@ class SmartSessionService {
749
751
  this.sessionExpiracyChanged.next();
750
752
  }
751
753
  }
754
+ ngOnDestroy() {
755
+ this._destroy$.next();
756
+ this._destroy$.complete();
757
+ }
752
758
  setSessionHandlerService(smartSessionHandlerService) {
753
759
  this.sessionHandlerService = smartSessionHandlerService;
754
760
  }
@@ -815,7 +821,7 @@ class SmartSessionService {
815
821
  return this.initializeRunning.toPromise();
816
822
  }
817
823
  else {
818
- this.initializeRunning = new Subject();
824
+ this.initializeRunning = new SmartSubject(this._destroy$);
819
825
  try {
820
826
  this.checkStatements();
821
827
  let tokenFromLocalStorage = localStorage.getItem('token');
@@ -2104,13 +2110,14 @@ class SmartViewContextService {
2104
2110
  this.viewHandlers = new Array();
2105
2111
  this.openedViewUuids = new Array();
2106
2112
  this.openedViewData = new Array();
2107
- this.uuidOfPageHasBeenChanged = new Subject();
2108
- this.viewContextHasBeenSynced = new Subject();
2109
- this.openSmartLink = new Subject();
2113
+ this._destroy$ = new Subject();
2114
+ this.uuidOfPageHasBeenChanged = new SmartSubject(this._destroy$);
2115
+ this.viewContextHasBeenSynced = new SmartSubject(this._destroy$);
2116
+ this.openSmartLink = new SmartSubject(this._destroy$);
2110
2117
  this.isOpeningSmartLink = false;
2111
2118
  this.dialogRefs = [];
2112
2119
  this.smartApiClients = new Map();
2113
- this.translateServiceChanged = new Subject();
2120
+ this.translateServiceChanged = new SmartSubject(this._destroy$);
2114
2121
  }
2115
2122
  set translateService(translateService) {
2116
2123
  this._translateService = translateService;
@@ -2123,6 +2130,10 @@ class SmartViewContextService {
2123
2130
  }
2124
2131
  return undefined;
2125
2132
  }
2133
+ ngOnDestroy() {
2134
+ this._destroy$.next();
2135
+ this._destroy$.complete();
2136
+ }
2126
2137
  follow(uuid, detectChange) {
2127
2138
  this.smartApiClients.set(uuid, detectChange);
2128
2139
  }
@@ -2221,7 +2232,7 @@ class SmartViewContextService {
2221
2232
  return this.initializeRunning.toPromise();
2222
2233
  }
2223
2234
  else {
2224
- this.initializeRunning = new Subject();
2235
+ this.initializeRunning = new SmartSubject(this._destroy$);
2225
2236
  try {
2226
2237
  if (this.viewHandlers.length === 0) {
2227
2238
  throw new Error("There aren't any viewHandlers in SmartViewContextService! Provide some to use its functions.");
@@ -2544,7 +2555,7 @@ class ApiQueueService {
2544
2555
  this._destroy$ = new Subject();
2545
2556
  this.queue = [];
2546
2557
  this.isProcessing = false;
2547
- this.queueSubject = new Subject();
2558
+ this.queueSubject = new SmartSubject(this._destroy$);
2548
2559
  this.queueSubject.pipe(takeUntil(this._destroy$)).subscribe(() => this.processQueue());
2549
2560
  }
2550
2561
  ngOnDestroy() {
@@ -2602,16 +2613,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2602
2613
  class SmartDevToolService {
2603
2614
  constructor(cookieService) {
2604
2615
  this.cookieService = cookieService;
2605
- this.smartDevToolName = "smartDevTool";
2606
- this.isSmartDevToolActiveName = "smartDevToolActive";
2616
+ this.smartDevToolName = 'smartDevTool';
2617
+ this.isSmartDevToolActiveName = 'smartDevToolActive';
2607
2618
  this.isActive = false;
2608
- this.smartDevToolHoursName = "smartDevToolHours";
2609
- this.smartDevToolMaxName = "smartDevToolMaxCalls";
2619
+ this.smartDevToolHoursName = 'smartDevToolHours';
2620
+ this.smartDevToolMaxName = 'smartDevToolMaxCalls';
2610
2621
  this.hoursToSave = 1;
2611
2622
  this.maxNumOfSavedCalls = 50;
2612
- this.descriptorChanged = new Subject();
2623
+ this._destroy$ = new Subject();
2624
+ this.descriptorChanged = new SmartSubject(this._destroy$);
2613
2625
  this.newErrorsCount = 0;
2614
- this.newErrorsCountChanged = new Subject();
2626
+ this.newErrorsCountChanged = new SmartSubject(this._destroy$);
2615
2627
  this.setUpLocalStorage();
2616
2628
  let apiCallsFromLocalStorage = localStorage.getItem(this.smartDevToolName);
2617
2629
  if (apiCallsFromLocalStorage) {
@@ -2621,9 +2633,9 @@ class SmartDevToolService {
2621
2633
  this.descriptor = { apiCalls: [] };
2622
2634
  this.save();
2623
2635
  }
2624
- window.addEventListener("storage", (event) => {
2636
+ window.addEventListener('storage', (event) => {
2625
2637
  if (event.storageArea === localStorage) {
2626
- this.isActive = localStorage.getItem(this.isSmartDevToolActiveName) === "true";
2638
+ this.isActive = localStorage.getItem(this.isSmartDevToolActiveName) === 'true';
2627
2639
  let hoursToSaveString = localStorage.getItem(this.smartDevToolHoursName);
2628
2640
  if (hoursToSaveString) {
2629
2641
  this.hoursToSave = Number.parseInt(hoursToSaveString);
@@ -2635,10 +2647,14 @@ class SmartDevToolService {
2635
2647
  }
2636
2648
  });
2637
2649
  }
2650
+ ngOnDestroy() {
2651
+ this._destroy$.next();
2652
+ this._destroy$.complete();
2653
+ }
2638
2654
  setUpLocalStorage() {
2639
2655
  let keysOfLocalStorage = Object.keys(localStorage);
2640
2656
  if (!keysOfLocalStorage.includes(this.isSmartDevToolActiveName)) {
2641
- localStorage.setItem(this.isSmartDevToolActiveName, "true");
2657
+ localStorage.setItem(this.isSmartDevToolActiveName, 'true');
2642
2658
  }
2643
2659
  }
2644
2660
  writeResponse(request, response, requestDate, responseDate) {
@@ -2693,19 +2709,17 @@ class SmartDevToolService {
2693
2709
  let now = new Date();
2694
2710
  this.descriptor.apiCalls = this.descriptor.apiCalls.filter((apiCall) => {
2695
2711
  let hoursBetween;
2696
- if (typeof apiCall.requestDate === "string") {
2712
+ if (typeof apiCall.requestDate === 'string') {
2697
2713
  hoursBetween = Math.floor(Math.abs(now.getMilliseconds() - new Date(apiCall.requestDate).getMilliseconds()) / 36e5);
2698
2714
  }
2699
2715
  else {
2700
- hoursBetween = Math.floor(Math.abs(now.getMilliseconds() - apiCall.requestDate.getMilliseconds()) /
2701
- 36e5);
2716
+ hoursBetween = Math.floor(Math.abs(now.getMilliseconds() - apiCall.requestDate.getMilliseconds()) / 36e5);
2702
2717
  }
2703
2718
  return hoursBetween < this.hoursToSave;
2704
2719
  });
2705
2720
  }
2706
2721
  sanitizeByLength() {
2707
- if (this.descriptor?.apiCalls &&
2708
- this.descriptor.apiCalls.length > this.maxNumOfSavedCalls) {
2722
+ if (this.descriptor?.apiCalls && this.descriptor.apiCalls.length > this.maxNumOfSavedCalls) {
2709
2723
  let length = this.descriptor.apiCalls.length;
2710
2724
  this.descriptor.apiCalls.splice(this.maxNumOfSavedCalls - 1, length - this.maxNumOfSavedCalls);
2711
2725
  }
@@ -2734,15 +2748,15 @@ class SmartDevToolService {
2734
2748
  }
2735
2749
  }
2736
2750
  SmartDevToolService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolService, deps: [{ token: SmartCookieService }], target: i0.ɵɵFactoryTarget.Injectable });
2737
- SmartDevToolService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolService, providedIn: "root" });
2751
+ SmartDevToolService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolService, providedIn: 'root' });
2738
2752
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolService, decorators: [{
2739
2753
  type: Injectable,
2740
2754
  args: [{
2741
- providedIn: "root",
2755
+ providedIn: 'root',
2742
2756
  }]
2743
2757
  }], ctorParameters: function () { return [{ type: SmartCookieService }]; } });
2744
2758
  class SmartDevToolDatePipe extends DatePipe {
2745
- transform(value, format = "yyyy.MM.dd. H:mm:ss") {
2759
+ transform(value, format = 'yyyy.MM.dd. H:mm:ss') {
2746
2760
  return super.transform(value, format);
2747
2761
  }
2748
2762
  }
@@ -2751,7 +2765,7 @@ SmartDevToolDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", versi
2751
2765
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolDatePipe, decorators: [{
2752
2766
  type: Pipe,
2753
2767
  args: [{
2754
- name: "smartDevToolDatePipe",
2768
+ name: 'smartDevToolDatePipe',
2755
2769
  }]
2756
2770
  }] });
2757
2771
 
@@ -2836,7 +2850,7 @@ class SmartDevToolDialogComponent {
2836
2850
  }
2837
2851
  copy() {
2838
2852
  copyToClipboard({
2839
- value: this.service.getPureString()
2853
+ value: this.service.getPureString(),
2840
2854
  });
2841
2855
  }
2842
2856
  close() {
@@ -2876,20 +2890,20 @@ class SmartDevToolFloatingButtonComponent {
2876
2890
  constructor(service) {
2877
2891
  this.service = service;
2878
2892
  this._destroy$ = new Subject();
2879
- this.adminKeyName = "useDevTool";
2893
+ this.adminKeyName = 'useDevTool';
2880
2894
  this.isShown = false;
2881
- this.errorsCount = "";
2895
+ this.errorsCount = '';
2882
2896
  this.service.service.newErrorsCountChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
2883
- this.errorsCount = `${this.service.service.newErrorsCount > 0 ? this.service.service.newErrorsCount : ""}`;
2897
+ this.errorsCount = `${this.service.service.newErrorsCount > 0 ? this.service.service.newErrorsCount : ''}`;
2884
2898
  });
2885
- window.addEventListener("storage", (event) => {
2899
+ window.addEventListener('storage', (event) => {
2886
2900
  if (event.storageArea === localStorage) {
2887
2901
  if (Object.keys(localStorage).includes(this.adminKeyName)) {
2888
- this.isShown = localStorage.getItem(this.adminKeyName) === "true";
2902
+ this.isShown = localStorage.getItem(this.adminKeyName) === 'true';
2889
2903
  }
2890
2904
  }
2891
2905
  });
2892
- this.isShown = localStorage.getItem(this.adminKeyName) === "true";
2906
+ this.isShown = localStorage.getItem(this.adminKeyName) === 'true';
2893
2907
  }
2894
2908
  ngOnDestroy() {
2895
2909
  this._destroy$.next();
@@ -2902,7 +2916,7 @@ SmartDevToolFloatingButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion
2902
2916
  SmartDevToolFloatingButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartDevToolFloatingButtonComponent, selector: "smart-session-dev-tool", ngImport: i0, template: "<button\r\n *ngIf=\"isShown\"\r\n mat-fab\r\n [color]=\"errorsCount.length ? 'warn' : 'accent'\"\r\n class=\"floatingButton\"\r\n extended\r\n title=\"devTool\"\r\n (click)=\"openDevToolDialog()\"\r\n>\r\n <smart-icon color=\"white\" icon=\"developer_mode\"></smart-icon>\r\n {{ errorsCount }}\r\n</button>\r\n", styles: [".floatingButton{position:fixed;right:2rem;bottom:2rem}.mat-icon.mat-white{color:#fff}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3$2.SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2903
2917
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolFloatingButtonComponent, decorators: [{
2904
2918
  type: Component,
2905
- args: [{ selector: "smart-session-dev-tool", template: "<button\r\n *ngIf=\"isShown\"\r\n mat-fab\r\n [color]=\"errorsCount.length ? 'warn' : 'accent'\"\r\n class=\"floatingButton\"\r\n extended\r\n title=\"devTool\"\r\n (click)=\"openDevToolDialog()\"\r\n>\r\n <smart-icon color=\"white\" icon=\"developer_mode\"></smart-icon>\r\n {{ errorsCount }}\r\n</button>\r\n", styles: [".floatingButton{position:fixed;right:2rem;bottom:2rem}.mat-icon.mat-white{color:#fff}\n"] }]
2919
+ args: [{ selector: 'smart-session-dev-tool', template: "<button\r\n *ngIf=\"isShown\"\r\n mat-fab\r\n [color]=\"errorsCount.length ? 'warn' : 'accent'\"\r\n class=\"floatingButton\"\r\n extended\r\n title=\"devTool\"\r\n (click)=\"openDevToolDialog()\"\r\n>\r\n <smart-icon color=\"white\" icon=\"developer_mode\"></smart-icon>\r\n {{ errorsCount }}\r\n</button>\r\n", styles: [".floatingButton{position:fixed;right:2rem;bottom:2rem}.mat-icon.mat-white{color:#fff}\n"] }]
2906
2920
  }], ctorParameters: function () { return [{ type: SmartDevToolDialogService }]; } });
2907
2921
 
2908
2922
  class SmartDevToolInterceptor {
@@ -2963,9 +2977,9 @@ class SmartSessionTimerService {
2963
2977
  this.session = session;
2964
2978
  this._destroy$ = new Subject();
2965
2979
  this.totalTimeInMinutes = 30;
2966
- this.sessionExpiration = "sessionExpiracy";
2967
- this.timeChanged = new Subject();
2968
- this.onTimerExpired = new Subject();
2980
+ this.sessionExpiration = 'sessionExpiracy';
2981
+ this.timeChanged = new SmartSubject(this._destroy$);
2982
+ this.onTimerExpired = new SmartSubject(this._destroy$);
2969
2983
  this.session.sessionExpiracyChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
2970
2984
  this.restart();
2971
2985
  });
@@ -2997,11 +3011,11 @@ class SmartSessionTimerService {
2997
3011
  }
2998
3012
  }
2999
3013
  SmartSessionTimerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, deps: [{ token: SmartSessionService }], target: i0.ɵɵFactoryTarget.Injectable });
3000
- SmartSessionTimerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, providedIn: "root" });
3014
+ SmartSessionTimerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, providedIn: 'root' });
3001
3015
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, decorators: [{
3002
3016
  type: Injectable,
3003
3017
  args: [{
3004
- providedIn: "root",
3018
+ providedIn: 'root',
3005
3019
  }]
3006
3020
  }], ctorParameters: function () { return [{ type: SmartSessionService }]; } });
3007
3021
 
@@ -3024,14 +3038,14 @@ class SmartSessionTimerComponent {
3024
3038
  formatTime(seconds) {
3025
3039
  let minutes = Math.floor(seconds / 60);
3026
3040
  let remainingSeconds = seconds % 60;
3027
- return `${minutes}:${remainingSeconds < 10 ? "0" : ""}${remainingSeconds}`;
3041
+ return `${minutes}:${remainingSeconds < 10 ? '0' : ''}${remainingSeconds}`;
3028
3042
  }
3029
3043
  }
3030
3044
  SmartSessionTimerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerComponent, deps: [{ token: SmartSessionTimerService }], target: i0.ɵɵFactoryTarget.Component });
3031
3045
  SmartSessionTimerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SmartSessionTimerComponent, selector: "smart-session-timer", providers: [SmartSessionTimerService], ngImport: i0, template: "<div class=\"smart-session-timer-container\">\r\n <span class=\"smart-session-timer\" *ngIf=\"timeInSeconds\">\r\n {{ formatTime(timeInSeconds!) }}\r\n </span>\r\n</div>\r\n", styles: [""], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3032
3046
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerComponent, decorators: [{
3033
3047
  type: Component,
3034
- args: [{ selector: "smart-session-timer", providers: [SmartSessionTimerService], template: "<div class=\"smart-session-timer-container\">\r\n <span class=\"smart-session-timer\" *ngIf=\"timeInSeconds\">\r\n {{ formatTime(timeInSeconds!) }}\r\n </span>\r\n</div>\r\n", styles: [""] }]
3048
+ args: [{ selector: 'smart-session-timer', providers: [SmartSessionTimerService], template: "<div class=\"smart-session-timer-container\">\r\n <span class=\"smart-session-timer\" *ngIf=\"timeInSeconds\">\r\n {{ formatTime(timeInSeconds!) }}\r\n </span>\r\n</div>\r\n", styles: [""] }]
3035
3049
  }], ctorParameters: function () { return [{ type: SmartSessionTimerService }]; } });
3036
3050
 
3037
3051
  /*
@@ -3110,6 +3124,13 @@ class SmartHeaderMaintainerInterceptor {
3110
3124
  intercept(request, next) {
3111
3125
  // new request data
3112
3126
  let url = request.urlWithParams.replace('http://localhost', this.session.getBasePath());
3127
+ // TODO fix me
3128
+ if (request.urlWithParams.includes('/kerb/sso')) {
3129
+ request = request.clone({
3130
+ url: url,
3131
+ });
3132
+ return next.handle(request);
3133
+ }
3113
3134
  let headers = {};
3114
3135
  // copy current headers
3115
3136
  request.headers.keys().map((key) => {
@@ -3346,7 +3367,7 @@ class UiActionDescriptorService {
3346
3367
  constructor(viewContext) {
3347
3368
  this.viewContext = viewContext;
3348
3369
  this._destroy$ = new Subject();
3349
- this.languageChanged = new Subject();
3370
+ this.languageChanged = new SmartSubject(this._destroy$);
3350
3371
  this.keysToTranslate = ['title', 'text', 'placeholder', 'caption', 'feedbackText'];
3351
3372
  this.basicActionDescriptors = new Map([
3352
3373
  [
@@ -3531,15 +3552,15 @@ class UiActionConfirmDialogService extends SmartdialogService {
3531
3552
  constructor(dialog, router) {
3532
3553
  super(dialog, router);
3533
3554
  this._destroy$ = new Subject();
3534
- this.onAction = new Subject();
3555
+ this.onAction = new SmartSubject(this._destroy$);
3535
3556
  this.shouldDoAction = false;
3536
3557
  }
3537
3558
  openDialog() {
3538
3559
  this.shouldDoAction = false;
3539
- this.onAction = new Subject();
3560
+ this.onAction = new SmartSubject(this._destroy$);
3540
3561
  const dialogData = {
3541
3562
  content: {
3542
- title: "",
3563
+ title: '',
3543
3564
  },
3544
3565
  size: {},
3545
3566
  customComponent: UiActionConfirmDialogComponent,
@@ -3550,20 +3571,20 @@ class UiActionConfirmDialogService extends SmartdialogService {
3550
3571
  this.shouldDoAction = true;
3551
3572
  this.onAction.complete();
3552
3573
  this.closeDialog();
3553
- this.onAction = new Subject();
3574
+ this.onAction = new SmartSubject(this._destroy$);
3554
3575
  }
3555
3576
  cancel() {
3556
3577
  this.onAction.complete();
3557
3578
  this.closeDialog();
3558
- this.onAction = new Subject();
3579
+ this.onAction = new SmartSubject(this._destroy$);
3559
3580
  }
3560
3581
  }
3561
3582
  UiActionConfirmDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
3562
- UiActionConfirmDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, providedIn: "root" });
3583
+ UiActionConfirmDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, providedIn: 'root' });
3563
3584
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, decorators: [{
3564
3585
  type: Injectable,
3565
3586
  args: [{
3566
- providedIn: "root",
3587
+ providedIn: 'root',
3567
3588
  }]
3568
3589
  }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2$1.Router }]; } });
3569
3590
 
@@ -3680,7 +3701,7 @@ class UiActionInputDialogService extends SmartdialogService {
3680
3701
  constructor(dialog, router) {
3681
3702
  super(dialog, router);
3682
3703
  this._destroy$ = new Subject();
3683
- this.onAction = new Subject();
3704
+ this.onAction = new SmartSubject(this._destroy$);
3684
3705
  }
3685
3706
  setDataAndOpenDialog(action, nodeName) {
3686
3707
  this.action = action;
@@ -3689,10 +3710,10 @@ class UiActionInputDialogService extends SmartdialogService {
3689
3710
  }
3690
3711
  openDialog() {
3691
3712
  this.params = undefined;
3692
- this.onAction = new Subject();
3713
+ this.onAction = new SmartSubject(this._destroy$);
3693
3714
  const dialogData = {
3694
3715
  content: {
3695
- title: "",
3716
+ title: '',
3696
3717
  },
3697
3718
  size: {},
3698
3719
  customComponent: UiActionInputDialogComponent,
@@ -3703,20 +3724,20 @@ class UiActionInputDialogService extends SmartdialogService {
3703
3724
  this.params = params;
3704
3725
  this.onAction.complete();
3705
3726
  this.closeDialog();
3706
- this.onAction = new Subject();
3727
+ this.onAction = new SmartSubject(this._destroy$);
3707
3728
  }
3708
3729
  cancel() {
3709
3730
  this.onAction.complete();
3710
3731
  this.closeDialog();
3711
- this.onAction = new Subject();
3732
+ this.onAction = new SmartSubject(this._destroy$);
3712
3733
  }
3713
3734
  }
3714
3735
  UiActionInputDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
3715
- UiActionInputDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogService, providedIn: "root" });
3736
+ UiActionInputDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogService, providedIn: 'root' });
3716
3737
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogService, decorators: [{
3717
3738
  type: Injectable,
3718
3739
  args: [{
3719
- providedIn: "root",
3740
+ providedIn: 'root',
3720
3741
  }]
3721
3742
  }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2$1.Router }]; } });
3722
3743
 
@@ -3725,6 +3746,11 @@ class UiActionService {
3725
3746
  this.confirmDialogService = confirmDialogService;
3726
3747
  this.textFieldDialogService = textFieldDialogService;
3727
3748
  this._snackBar = _snackBar;
3749
+ this._destroy$ = new Subject();
3750
+ }
3751
+ ngOnDestroy() {
3752
+ this._destroy$.next();
3753
+ this._destroy$.complete();
3728
3754
  }
3729
3755
  async execute(uiAction, options) {
3730
3756
  let uiActionRequest;
@@ -3737,12 +3763,12 @@ class UiActionService {
3737
3763
  this.uiActionModel.serviceToUse.submit.next();
3738
3764
  try {
3739
3765
  await this.uiActionModel.serviceToUse.submit.toPromise();
3740
- this.uiActionModel.serviceToUse.submit = new Subject();
3766
+ this.uiActionModel.serviceToUse.submit = new SmartSubject(this._destroy$);
3741
3767
  this.uiActionModel.serviceToUse.reSubscribeToChange.next();
3742
3768
  }
3743
3769
  catch (error) {
3744
3770
  console.error(error);
3745
- this.uiActionModel.serviceToUse.submit = new Subject();
3771
+ this.uiActionModel.serviceToUse.submit = new SmartSubject(this._destroy$);
3746
3772
  this.uiActionModel.serviceToUse.reSubscribeToChange.next();
3747
3773
  return;
3748
3774
  }
@@ -4056,7 +4082,12 @@ var UiActionDialogType;
4056
4082
  class SmartAuthService {
4057
4083
  constructor() {
4058
4084
  this.bffApisHaveBeenSetUp = false;
4059
- this.headersUpdated = new Subject();
4085
+ this._destroy$ = new Subject();
4086
+ this.headersUpdated = new SmartSubject(this._destroy$);
4087
+ }
4088
+ ngOnDestroy() {
4089
+ this._destroy$.next();
4090
+ this._destroy$.complete();
4060
4091
  }
4061
4092
  }
4062
4093
  SmartAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -4065,26 +4096,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4065
4096
  type: Injectable
4066
4097
  }] });
4067
4098
 
4068
- class SmartSubject extends Subject {
4069
- constructor(unsubscribe$) {
4070
- super();
4071
- this.unsubscribe$ = unsubscribe$;
4072
- }
4073
- subscribe(observerOrNext, error, complete) {
4074
- if (typeof observerOrNext === "object") {
4075
- const next = observerOrNext.next;
4076
- observerOrNext.next = (value) => {
4077
- if (next) {
4078
- next.call(observerOrNext, value);
4079
- }
4080
- };
4081
- }
4082
- const subscription = super.subscribe(observerOrNext, error, complete);
4083
- subscription.add(this.unsubscribe$.subscribe());
4084
- return subscription;
4085
- }
4086
- }
4087
-
4088
4099
  let SmartComponentApiClient = class SmartComponentApiClient {
4089
4100
  constructor(inject, auth, pageName) {
4090
4101
  this.inject = inject;
@@ -4453,5 +4464,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4453
4464
  * Generated bundle index. Do not edit.
4454
4465
  */
4455
4466
 
4456
- export { APIS, ApiModule, ApiQueueService, BASE_PATH, COLLECTION_FORMATS, CloseResult, Configuration, DataChangeKind, IS_ASYNC_PARAM_NAME, MessageOptionType, MessageType, SessionAPIS, SessionErrorBehaviour, SessionService, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartDevToolDatePipe, SmartDevToolFloatingButtonComponent, SmartDevToolService, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartSubject, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, UiActionButtonIconPos, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, ViewEventHandler, ViewService, ViewState, ViewType, WidgetMap };
4467
+ export { APIS, ApiModule, ApiQueueService, BASE_PATH, COLLECTION_FORMATS, CloseResult, Configuration, DataChangeKind, IS_ASYNC_PARAM_NAME, MessageOptionType, MessageType, SessionAPIS, SessionErrorBehaviour, SessionService, SmartAuthService, SmartComponent, SmartComponentApiClient, SmartDevToolDatePipe, SmartDevToolFloatingButtonComponent, SmartDevToolService, SmartLinkChannelVariableInPath, SmartLinkUuidVariableInPath, SmartNgClientModule, SmartNgClientService, SmartService, SmartSessionModule, SmartSessionService, SmartSessionTimerComponent, SmartSessionTimerService, SmartViewContextErrorDialogButtonLabel, SmartViewContextErrorDialogMessage, SmartViewContextErrorDialogTitle, SmartViewContextModule, SmartViewContextService, SmartViewRedirect, UiActionButtonIconPos, UiActionButtonType, UiActionConfirmDialogComponent, UiActionConfirmDialogService, UiActionDescriptorService, UiActionDialogType, UiActionFeedbackType, UiActionInputDialogComponent, UiActionInputDialogService, UiActionInputType, UiActionService, UiActionToolbarComponent, ViewEventHandler, ViewService, ViewState, ViewType, WidgetMap };
4457
4468
  //# sourceMappingURL=smartbit4all-ng-client.mjs.map