@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
@@ -2,6 +2,7 @@ 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 { __awaiter, __decorate, __param } from 'tslib';
4
4
  import { Subject, takeUntil, map, catchError, throwError, from } from 'rxjs';
5
+ import { SmartSubject } from '@smartbit4all/subject';
5
6
  import * as i1 from '@angular/common/http';
6
7
  import { HttpHeaders, HttpContext, HttpEventType, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
7
8
  import * as i4 from '@angular/common';
@@ -674,14 +675,15 @@ class SmartSessionService {
674
675
  constructor(apiService, cookieService) {
675
676
  this.apiService = apiService;
676
677
  this.cookieService = cookieService;
678
+ this._destroy$ = new Subject();
677
679
  this.isAuthenticated = false;
678
- this.authenticationStateChanged = new Subject();
680
+ this.authenticationStateChanged = new SmartSubject(this._destroy$);
679
681
  this.headerParams = new Array();
680
- this.headersUpdated = new Subject();
682
+ this.headersUpdated = new SmartSubject(this._destroy$);
681
683
  // Locale
682
684
  this.localStorageLocaleName = 'locale';
683
- this.localeChanged = new Subject();
684
- this.sessionExpiracyChanged = new Subject();
685
+ this.localeChanged = new SmartSubject(this._destroy$);
686
+ this.sessionExpiracyChanged = new SmartSubject(this._destroy$);
685
687
  }
686
688
  get sessionInfoData() {
687
689
  return this._sessionInfoData;
@@ -694,6 +696,10 @@ class SmartSessionService {
694
696
  this.sessionExpiracyChanged.next();
695
697
  }
696
698
  }
699
+ ngOnDestroy() {
700
+ this._destroy$.next();
701
+ this._destroy$.complete();
702
+ }
697
703
  setSessionHandlerService(smartSessionHandlerService) {
698
704
  this.sessionHandlerService = smartSessionHandlerService;
699
705
  }
@@ -763,7 +769,7 @@ class SmartSessionService {
763
769
  return this.initializeRunning.toPromise();
764
770
  }
765
771
  else {
766
- this.initializeRunning = new Subject();
772
+ this.initializeRunning = new SmartSubject(this._destroy$);
767
773
  try {
768
774
  this.checkStatements();
769
775
  let tokenFromLocalStorage = localStorage.getItem('token');
@@ -2025,13 +2031,14 @@ class SmartViewContextService {
2025
2031
  this.viewHandlers = new Array();
2026
2032
  this.openedViewUuids = new Array();
2027
2033
  this.openedViewData = new Array();
2028
- this.uuidOfPageHasBeenChanged = new Subject();
2029
- this.viewContextHasBeenSynced = new Subject();
2030
- this.openSmartLink = new Subject();
2034
+ this._destroy$ = new Subject();
2035
+ this.uuidOfPageHasBeenChanged = new SmartSubject(this._destroy$);
2036
+ this.viewContextHasBeenSynced = new SmartSubject(this._destroy$);
2037
+ this.openSmartLink = new SmartSubject(this._destroy$);
2031
2038
  this.isOpeningSmartLink = false;
2032
2039
  this.dialogRefs = [];
2033
2040
  this.smartApiClients = new Map();
2034
- this.translateServiceChanged = new Subject();
2041
+ this.translateServiceChanged = new SmartSubject(this._destroy$);
2035
2042
  }
2036
2043
  set translateService(translateService) {
2037
2044
  this._translateService = translateService;
@@ -2044,6 +2051,10 @@ class SmartViewContextService {
2044
2051
  }
2045
2052
  return undefined;
2046
2053
  }
2054
+ ngOnDestroy() {
2055
+ this._destroy$.next();
2056
+ this._destroy$.complete();
2057
+ }
2047
2058
  follow(uuid, detectChange) {
2048
2059
  this.smartApiClients.set(uuid, detectChange);
2049
2060
  }
@@ -2154,7 +2165,7 @@ class SmartViewContextService {
2154
2165
  return this.initializeRunning.toPromise();
2155
2166
  }
2156
2167
  else {
2157
- this.initializeRunning = new Subject();
2168
+ this.initializeRunning = new SmartSubject(this._destroy$);
2158
2169
  try {
2159
2170
  if (this.viewHandlers.length === 0) {
2160
2171
  throw new Error("There aren't any viewHandlers in SmartViewContextService! Provide some to use its functions.");
@@ -2515,7 +2526,7 @@ class ApiQueueService {
2515
2526
  this._destroy$ = new Subject();
2516
2527
  this.queue = [];
2517
2528
  this.isProcessing = false;
2518
- this.queueSubject = new Subject();
2529
+ this.queueSubject = new SmartSubject(this._destroy$);
2519
2530
  this.queueSubject.pipe(takeUntil(this._destroy$)).subscribe(() => this.processQueue());
2520
2531
  }
2521
2532
  ngOnDestroy() {
@@ -2575,16 +2586,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2575
2586
  class SmartDevToolService {
2576
2587
  constructor(cookieService) {
2577
2588
  this.cookieService = cookieService;
2578
- this.smartDevToolName = "smartDevTool";
2579
- this.isSmartDevToolActiveName = "smartDevToolActive";
2589
+ this.smartDevToolName = 'smartDevTool';
2590
+ this.isSmartDevToolActiveName = 'smartDevToolActive';
2580
2591
  this.isActive = false;
2581
- this.smartDevToolHoursName = "smartDevToolHours";
2582
- this.smartDevToolMaxName = "smartDevToolMaxCalls";
2592
+ this.smartDevToolHoursName = 'smartDevToolHours';
2593
+ this.smartDevToolMaxName = 'smartDevToolMaxCalls';
2583
2594
  this.hoursToSave = 1;
2584
2595
  this.maxNumOfSavedCalls = 50;
2585
- this.descriptorChanged = new Subject();
2596
+ this._destroy$ = new Subject();
2597
+ this.descriptorChanged = new SmartSubject(this._destroy$);
2586
2598
  this.newErrorsCount = 0;
2587
- this.newErrorsCountChanged = new Subject();
2599
+ this.newErrorsCountChanged = new SmartSubject(this._destroy$);
2588
2600
  this.setUpLocalStorage();
2589
2601
  let apiCallsFromLocalStorage = localStorage.getItem(this.smartDevToolName);
2590
2602
  if (apiCallsFromLocalStorage) {
@@ -2594,9 +2606,9 @@ class SmartDevToolService {
2594
2606
  this.descriptor = { apiCalls: [] };
2595
2607
  this.save();
2596
2608
  }
2597
- window.addEventListener("storage", (event) => {
2609
+ window.addEventListener('storage', (event) => {
2598
2610
  if (event.storageArea === localStorage) {
2599
- this.isActive = localStorage.getItem(this.isSmartDevToolActiveName) === "true";
2611
+ this.isActive = localStorage.getItem(this.isSmartDevToolActiveName) === 'true';
2600
2612
  let hoursToSaveString = localStorage.getItem(this.smartDevToolHoursName);
2601
2613
  if (hoursToSaveString) {
2602
2614
  this.hoursToSave = Number.parseInt(hoursToSaveString);
@@ -2608,10 +2620,14 @@ class SmartDevToolService {
2608
2620
  }
2609
2621
  });
2610
2622
  }
2623
+ ngOnDestroy() {
2624
+ this._destroy$.next();
2625
+ this._destroy$.complete();
2626
+ }
2611
2627
  setUpLocalStorage() {
2612
2628
  let keysOfLocalStorage = Object.keys(localStorage);
2613
2629
  if (!keysOfLocalStorage.includes(this.isSmartDevToolActiveName)) {
2614
- localStorage.setItem(this.isSmartDevToolActiveName, "true");
2630
+ localStorage.setItem(this.isSmartDevToolActiveName, 'true');
2615
2631
  }
2616
2632
  }
2617
2633
  writeResponse(request, response, requestDate, responseDate) {
@@ -2667,20 +2683,18 @@ class SmartDevToolService {
2667
2683
  let now = new Date();
2668
2684
  this.descriptor.apiCalls = this.descriptor.apiCalls.filter((apiCall) => {
2669
2685
  let hoursBetween;
2670
- if (typeof apiCall.requestDate === "string") {
2686
+ if (typeof apiCall.requestDate === 'string') {
2671
2687
  hoursBetween = Math.floor(Math.abs(now.getMilliseconds() - new Date(apiCall.requestDate).getMilliseconds()) / 36e5);
2672
2688
  }
2673
2689
  else {
2674
- hoursBetween = Math.floor(Math.abs(now.getMilliseconds() - apiCall.requestDate.getMilliseconds()) /
2675
- 36e5);
2690
+ hoursBetween = Math.floor(Math.abs(now.getMilliseconds() - apiCall.requestDate.getMilliseconds()) / 36e5);
2676
2691
  }
2677
2692
  return hoursBetween < this.hoursToSave;
2678
2693
  });
2679
2694
  }
2680
2695
  sanitizeByLength() {
2681
2696
  var _a;
2682
- if (((_a = this.descriptor) === null || _a === void 0 ? void 0 : _a.apiCalls) &&
2683
- this.descriptor.apiCalls.length > this.maxNumOfSavedCalls) {
2697
+ if (((_a = this.descriptor) === null || _a === void 0 ? void 0 : _a.apiCalls) && this.descriptor.apiCalls.length > this.maxNumOfSavedCalls) {
2684
2698
  let length = this.descriptor.apiCalls.length;
2685
2699
  this.descriptor.apiCalls.splice(this.maxNumOfSavedCalls - 1, length - this.maxNumOfSavedCalls);
2686
2700
  }
@@ -2709,15 +2723,15 @@ class SmartDevToolService {
2709
2723
  }
2710
2724
  }
2711
2725
  SmartDevToolService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolService, deps: [{ token: SmartCookieService }], target: i0.ɵɵFactoryTarget.Injectable });
2712
- SmartDevToolService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolService, providedIn: "root" });
2726
+ SmartDevToolService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolService, providedIn: 'root' });
2713
2727
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolService, decorators: [{
2714
2728
  type: Injectable,
2715
2729
  args: [{
2716
- providedIn: "root",
2730
+ providedIn: 'root',
2717
2731
  }]
2718
2732
  }], ctorParameters: function () { return [{ type: SmartCookieService }]; } });
2719
2733
  class SmartDevToolDatePipe extends DatePipe {
2720
- transform(value, format = "yyyy.MM.dd. H:mm:ss") {
2734
+ transform(value, format = 'yyyy.MM.dd. H:mm:ss') {
2721
2735
  return super.transform(value, format);
2722
2736
  }
2723
2737
  }
@@ -2726,7 +2740,7 @@ SmartDevToolDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", versi
2726
2740
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolDatePipe, decorators: [{
2727
2741
  type: Pipe,
2728
2742
  args: [{
2729
- name: "smartDevToolDatePipe",
2743
+ name: 'smartDevToolDatePipe',
2730
2744
  }]
2731
2745
  }] });
2732
2746
 
@@ -2811,7 +2825,7 @@ class SmartDevToolDialogComponent {
2811
2825
  }
2812
2826
  copy() {
2813
2827
  copyToClipboard({
2814
- value: this.service.getPureString()
2828
+ value: this.service.getPureString(),
2815
2829
  });
2816
2830
  }
2817
2831
  close() {
@@ -2851,20 +2865,20 @@ class SmartDevToolFloatingButtonComponent {
2851
2865
  constructor(service) {
2852
2866
  this.service = service;
2853
2867
  this._destroy$ = new Subject();
2854
- this.adminKeyName = "useDevTool";
2868
+ this.adminKeyName = 'useDevTool';
2855
2869
  this.isShown = false;
2856
- this.errorsCount = "";
2870
+ this.errorsCount = '';
2857
2871
  this.service.service.newErrorsCountChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
2858
- this.errorsCount = `${this.service.service.newErrorsCount > 0 ? this.service.service.newErrorsCount : ""}`;
2872
+ this.errorsCount = `${this.service.service.newErrorsCount > 0 ? this.service.service.newErrorsCount : ''}`;
2859
2873
  });
2860
- window.addEventListener("storage", (event) => {
2874
+ window.addEventListener('storage', (event) => {
2861
2875
  if (event.storageArea === localStorage) {
2862
2876
  if (Object.keys(localStorage).includes(this.adminKeyName)) {
2863
- this.isShown = localStorage.getItem(this.adminKeyName) === "true";
2877
+ this.isShown = localStorage.getItem(this.adminKeyName) === 'true';
2864
2878
  }
2865
2879
  }
2866
2880
  });
2867
- this.isShown = localStorage.getItem(this.adminKeyName) === "true";
2881
+ this.isShown = localStorage.getItem(this.adminKeyName) === 'true';
2868
2882
  }
2869
2883
  ngOnDestroy() {
2870
2884
  this._destroy$.next();
@@ -2877,7 +2891,7 @@ SmartDevToolFloatingButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion
2877
2891
  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"] }] });
2878
2892
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartDevToolFloatingButtonComponent, decorators: [{
2879
2893
  type: Component,
2880
- 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"] }]
2894
+ 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"] }]
2881
2895
  }], ctorParameters: function () { return [{ type: SmartDevToolDialogService }]; } });
2882
2896
 
2883
2897
  class SmartDevToolInterceptor {
@@ -2938,9 +2952,9 @@ class SmartSessionTimerService {
2938
2952
  this.session = session;
2939
2953
  this._destroy$ = new Subject();
2940
2954
  this.totalTimeInMinutes = 30;
2941
- this.sessionExpiration = "sessionExpiracy";
2942
- this.timeChanged = new Subject();
2943
- this.onTimerExpired = new Subject();
2955
+ this.sessionExpiration = 'sessionExpiracy';
2956
+ this.timeChanged = new SmartSubject(this._destroy$);
2957
+ this.onTimerExpired = new SmartSubject(this._destroy$);
2944
2958
  this.session.sessionExpiracyChanged.pipe(takeUntil(this._destroy$)).subscribe(() => {
2945
2959
  this.restart();
2946
2960
  });
@@ -2972,11 +2986,11 @@ class SmartSessionTimerService {
2972
2986
  }
2973
2987
  }
2974
2988
  SmartSessionTimerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, deps: [{ token: SmartSessionService }], target: i0.ɵɵFactoryTarget.Injectable });
2975
- SmartSessionTimerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, providedIn: "root" });
2989
+ SmartSessionTimerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, providedIn: 'root' });
2976
2990
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerService, decorators: [{
2977
2991
  type: Injectable,
2978
2992
  args: [{
2979
- providedIn: "root",
2993
+ providedIn: 'root',
2980
2994
  }]
2981
2995
  }], ctorParameters: function () { return [{ type: SmartSessionService }]; } });
2982
2996
 
@@ -2999,14 +3013,14 @@ class SmartSessionTimerComponent {
2999
3013
  formatTime(seconds) {
3000
3014
  let minutes = Math.floor(seconds / 60);
3001
3015
  let remainingSeconds = seconds % 60;
3002
- return `${minutes}:${remainingSeconds < 10 ? "0" : ""}${remainingSeconds}`;
3016
+ return `${minutes}:${remainingSeconds < 10 ? '0' : ''}${remainingSeconds}`;
3003
3017
  }
3004
3018
  }
3005
3019
  SmartSessionTimerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerComponent, deps: [{ token: SmartSessionTimerService }], target: i0.ɵɵFactoryTarget.Component });
3006
3020
  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"] }] });
3007
3021
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartSessionTimerComponent, decorators: [{
3008
3022
  type: Component,
3009
- 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: [""] }]
3023
+ 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: [""] }]
3010
3024
  }], ctorParameters: function () { return [{ type: SmartSessionTimerService }]; } });
3011
3025
 
3012
3026
  /*
@@ -3085,6 +3099,13 @@ class SmartHeaderMaintainerInterceptor {
3085
3099
  intercept(request, next) {
3086
3100
  // new request data
3087
3101
  let url = request.urlWithParams.replace('http://localhost', this.session.getBasePath());
3102
+ // TODO fix me
3103
+ if (request.urlWithParams.includes('/kerb/sso')) {
3104
+ request = request.clone({
3105
+ url: url,
3106
+ });
3107
+ return next.handle(request);
3108
+ }
3088
3109
  let headers = {};
3089
3110
  // copy current headers
3090
3111
  request.headers.keys().map((key) => {
@@ -3327,7 +3348,7 @@ class UiActionDescriptorService {
3327
3348
  constructor(viewContext) {
3328
3349
  this.viewContext = viewContext;
3329
3350
  this._destroy$ = new Subject();
3330
- this.languageChanged = new Subject();
3351
+ this.languageChanged = new SmartSubject(this._destroy$);
3331
3352
  this.keysToTranslate = ['title', 'text', 'placeholder', 'caption', 'feedbackText'];
3332
3353
  this.basicActionDescriptors = new Map([
3333
3354
  [
@@ -3525,15 +3546,15 @@ class UiActionConfirmDialogService extends SmartdialogService {
3525
3546
  constructor(dialog, router) {
3526
3547
  super(dialog, router);
3527
3548
  this._destroy$ = new Subject();
3528
- this.onAction = new Subject();
3549
+ this.onAction = new SmartSubject(this._destroy$);
3529
3550
  this.shouldDoAction = false;
3530
3551
  }
3531
3552
  openDialog() {
3532
3553
  this.shouldDoAction = false;
3533
- this.onAction = new Subject();
3554
+ this.onAction = new SmartSubject(this._destroy$);
3534
3555
  const dialogData = {
3535
3556
  content: {
3536
- title: "",
3557
+ title: '',
3537
3558
  },
3538
3559
  size: {},
3539
3560
  customComponent: UiActionConfirmDialogComponent,
@@ -3544,20 +3565,20 @@ class UiActionConfirmDialogService extends SmartdialogService {
3544
3565
  this.shouldDoAction = true;
3545
3566
  this.onAction.complete();
3546
3567
  this.closeDialog();
3547
- this.onAction = new Subject();
3568
+ this.onAction = new SmartSubject(this._destroy$);
3548
3569
  }
3549
3570
  cancel() {
3550
3571
  this.onAction.complete();
3551
3572
  this.closeDialog();
3552
- this.onAction = new Subject();
3573
+ this.onAction = new SmartSubject(this._destroy$);
3553
3574
  }
3554
3575
  }
3555
3576
  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 });
3556
- UiActionConfirmDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, providedIn: "root" });
3577
+ UiActionConfirmDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, providedIn: 'root' });
3557
3578
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, decorators: [{
3558
3579
  type: Injectable,
3559
3580
  args: [{
3560
- providedIn: "root",
3581
+ providedIn: 'root',
3561
3582
  }]
3562
3583
  }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2$1.Router }]; } });
3563
3584
 
@@ -3678,7 +3699,7 @@ class UiActionInputDialogService extends SmartdialogService {
3678
3699
  constructor(dialog, router) {
3679
3700
  super(dialog, router);
3680
3701
  this._destroy$ = new Subject();
3681
- this.onAction = new Subject();
3702
+ this.onAction = new SmartSubject(this._destroy$);
3682
3703
  }
3683
3704
  setDataAndOpenDialog(action, nodeName) {
3684
3705
  this.action = action;
@@ -3687,10 +3708,10 @@ class UiActionInputDialogService extends SmartdialogService {
3687
3708
  }
3688
3709
  openDialog() {
3689
3710
  this.params = undefined;
3690
- this.onAction = new Subject();
3711
+ this.onAction = new SmartSubject(this._destroy$);
3691
3712
  const dialogData = {
3692
3713
  content: {
3693
- title: "",
3714
+ title: '',
3694
3715
  },
3695
3716
  size: {},
3696
3717
  customComponent: UiActionInputDialogComponent,
@@ -3702,21 +3723,21 @@ class UiActionInputDialogService extends SmartdialogService {
3702
3723
  this.params = params;
3703
3724
  this.onAction.complete();
3704
3725
  this.closeDialog();
3705
- this.onAction = new Subject();
3726
+ this.onAction = new SmartSubject(this._destroy$);
3706
3727
  });
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
  execute(uiAction, options) {
3730
3756
  var _a;
@@ -3739,12 +3765,12 @@ class UiActionService {
3739
3765
  this.uiActionModel.serviceToUse.submit.next();
3740
3766
  try {
3741
3767
  yield this.uiActionModel.serviceToUse.submit.toPromise();
3742
- this.uiActionModel.serviceToUse.submit = new Subject();
3768
+ this.uiActionModel.serviceToUse.submit = new SmartSubject(this._destroy$);
3743
3769
  this.uiActionModel.serviceToUse.reSubscribeToChange.next();
3744
3770
  }
3745
3771
  catch (error) {
3746
3772
  console.error(error);
3747
- this.uiActionModel.serviceToUse.submit = new Subject();
3773
+ this.uiActionModel.serviceToUse.submit = new SmartSubject(this._destroy$);
3748
3774
  this.uiActionModel.serviceToUse.reSubscribeToChange.next();
3749
3775
  return;
3750
3776
  }
@@ -4072,7 +4098,12 @@ var UiActionDialogType;
4072
4098
  class SmartAuthService {
4073
4099
  constructor() {
4074
4100
  this.bffApisHaveBeenSetUp = false;
4075
- this.headersUpdated = new Subject();
4101
+ this._destroy$ = new Subject();
4102
+ this.headersUpdated = new SmartSubject(this._destroy$);
4103
+ }
4104
+ ngOnDestroy() {
4105
+ this._destroy$.next();
4106
+ this._destroy$.complete();
4076
4107
  }
4077
4108
  }
4078
4109
  SmartAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -4081,26 +4112,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4081
4112
  type: Injectable
4082
4113
  }] });
4083
4114
 
4084
- class SmartSubject extends Subject {
4085
- constructor(unsubscribe$) {
4086
- super();
4087
- this.unsubscribe$ = unsubscribe$;
4088
- }
4089
- subscribe(observerOrNext, error, complete) {
4090
- if (typeof observerOrNext === "object") {
4091
- const next = observerOrNext.next;
4092
- observerOrNext.next = (value) => {
4093
- if (next) {
4094
- next.call(observerOrNext, value);
4095
- }
4096
- };
4097
- }
4098
- const subscription = super.subscribe(observerOrNext, error, complete);
4099
- subscription.add(this.unsubscribe$.subscribe());
4100
- return subscription;
4101
- }
4102
- }
4103
-
4104
4115
  let SmartComponentApiClient = class SmartComponentApiClient {
4105
4116
  constructor(inject, auth, pageName) {
4106
4117
  this.inject = inject;
@@ -4480,5 +4491,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
4480
4491
  * Generated bundle index. Do not edit.
4481
4492
  */
4482
4493
 
4483
- 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 };
4494
+ 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 };
4484
4495
  //# sourceMappingURL=smartbit4all-ng-client.mjs.map