@smartbit4all/ng-client 1.1.28 → 1.1.29
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/esm2020/lib/session/dev-tool/smart-dev-tool-dialog/smart-dev-tool-dialog.component.mjs +2 -2
- package/esm2020/lib/session/dev-tool/smart-dev-tool-floating-button/smart-dev-tool-floating-button.component.mjs +10 -10
- package/esm2020/lib/session/dev-tool/smart-dev-tool.service.mjs +26 -22
- package/esm2020/lib/session/smart-session.service.mjs +12 -6
- package/esm2020/lib/session/smart-timer/smart-session-timer.component.mjs +6 -6
- package/esm2020/lib/session/smart-timer/smart-session-timer.service.mjs +9 -8
- package/esm2020/lib/smart-client/projects.mjs +5 -6
- package/esm2020/lib/smart-client/smart-authentication.service.mjs +10 -4
- package/esm2020/lib/smart-client/smart-component-api-client.mjs +2 -2
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.mjs +13 -12
- package/esm2020/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.mjs +13 -12
- package/esm2020/lib/view-context/smart-ui-action/ui-action.descriptor.service.mjs +3 -2
- package/esm2020/lib/view-context/smart-ui-action/ui-action.service.mjs +9 -3
- package/esm2020/lib/view-context/smart-view-context.module.mjs +18 -18
- package/esm2020/lib/view-context/smart-view-context.service.mjs +13 -7
- package/fesm2015/smartbit4all-ng-client.mjs +87 -83
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +87 -83
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/session/dev-tool/smart-dev-tool-floating-button/smart-dev-tool-floating-button.component.d.ts +2 -2
- package/lib/session/dev-tool/smart-dev-tool.service.d.ts +8 -6
- package/lib/session/smart-session.service.d.ts +4 -1
- package/lib/session/smart-timer/smart-session-timer.component.d.ts +2 -2
- package/lib/session/smart-timer/smart-session-timer.service.d.ts +3 -3
- package/lib/smart-client/projects.d.ts +4 -5
- package/lib/smart-client/smart-authentication.service.d.ts +5 -2
- package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.d.ts +5 -5
- package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.d.ts +6 -6
- package/lib/view-context/smart-ui-action/ui-action.service.d.ts +4 -1
- package/lib/view-context/smart-view-context.service.d.ts +4 -2
- package/package.json +1 -1
- package/smartbit4all-ng-client-1.1.29.tgz +0 -0
- package/esm2020/lib/smart-client/smart.subject.mjs +0 -21
- package/lib/smart-client/smart.subject.d.ts +0 -6
- 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
|
|
736
|
+
this.authenticationStateChanged = new SmartSubject(this._destroy$);
|
|
735
737
|
this.headerParams = new Array();
|
|
736
|
-
this.headersUpdated = new
|
|
738
|
+
this.headersUpdated = new SmartSubject(this._destroy$);
|
|
737
739
|
// Locale
|
|
738
740
|
this.localStorageLocaleName = 'locale';
|
|
739
|
-
this.localeChanged = new
|
|
740
|
-
this.sessionExpiracyChanged = new
|
|
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
|
|
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.
|
|
2108
|
-
this.
|
|
2109
|
-
this.
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
2606
|
-
this.isSmartDevToolActiveName =
|
|
2616
|
+
this.smartDevToolName = 'smartDevTool';
|
|
2617
|
+
this.isSmartDevToolActiveName = 'smartDevToolActive';
|
|
2607
2618
|
this.isActive = false;
|
|
2608
|
-
this.smartDevToolHoursName =
|
|
2609
|
-
this.smartDevToolMaxName =
|
|
2619
|
+
this.smartDevToolHoursName = 'smartDevToolHours';
|
|
2620
|
+
this.smartDevToolMaxName = 'smartDevToolMaxCalls';
|
|
2610
2621
|
this.hoursToSave = 1;
|
|
2611
2622
|
this.maxNumOfSavedCalls = 50;
|
|
2612
|
-
this.
|
|
2623
|
+
this._destroy$ = new Subject();
|
|
2624
|
+
this.descriptorChanged = new SmartSubject(this._destroy$);
|
|
2613
2625
|
this.newErrorsCount = 0;
|
|
2614
|
-
this.newErrorsCountChanged = new
|
|
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(
|
|
2636
|
+
window.addEventListener('storage', (event) => {
|
|
2625
2637
|
if (event.storageArea === localStorage) {
|
|
2626
|
-
this.isActive = localStorage.getItem(this.isSmartDevToolActiveName) ===
|
|
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,
|
|
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 ===
|
|
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:
|
|
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:
|
|
2755
|
+
providedIn: 'root',
|
|
2742
2756
|
}]
|
|
2743
2757
|
}], ctorParameters: function () { return [{ type: SmartCookieService }]; } });
|
|
2744
2758
|
class SmartDevToolDatePipe extends DatePipe {
|
|
2745
|
-
transform(value, format =
|
|
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:
|
|
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 =
|
|
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(
|
|
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) ===
|
|
2902
|
+
this.isShown = localStorage.getItem(this.adminKeyName) === 'true';
|
|
2889
2903
|
}
|
|
2890
2904
|
}
|
|
2891
2905
|
});
|
|
2892
|
-
this.isShown = localStorage.getItem(this.adminKeyName) ===
|
|
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:
|
|
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 =
|
|
2967
|
-
this.timeChanged = new
|
|
2968
|
-
this.onTimerExpired = new
|
|
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:
|
|
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:
|
|
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 ?
|
|
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:
|
|
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
|
/*
|
|
@@ -3346,7 +3360,7 @@ class UiActionDescriptorService {
|
|
|
3346
3360
|
constructor(viewContext) {
|
|
3347
3361
|
this.viewContext = viewContext;
|
|
3348
3362
|
this._destroy$ = new Subject();
|
|
3349
|
-
this.languageChanged = new
|
|
3363
|
+
this.languageChanged = new SmartSubject(this._destroy$);
|
|
3350
3364
|
this.keysToTranslate = ['title', 'text', 'placeholder', 'caption', 'feedbackText'];
|
|
3351
3365
|
this.basicActionDescriptors = new Map([
|
|
3352
3366
|
[
|
|
@@ -3531,15 +3545,15 @@ class UiActionConfirmDialogService extends SmartdialogService {
|
|
|
3531
3545
|
constructor(dialog, router) {
|
|
3532
3546
|
super(dialog, router);
|
|
3533
3547
|
this._destroy$ = new Subject();
|
|
3534
|
-
this.onAction = new
|
|
3548
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3535
3549
|
this.shouldDoAction = false;
|
|
3536
3550
|
}
|
|
3537
3551
|
openDialog() {
|
|
3538
3552
|
this.shouldDoAction = false;
|
|
3539
|
-
this.onAction = new
|
|
3553
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3540
3554
|
const dialogData = {
|
|
3541
3555
|
content: {
|
|
3542
|
-
title:
|
|
3556
|
+
title: '',
|
|
3543
3557
|
},
|
|
3544
3558
|
size: {},
|
|
3545
3559
|
customComponent: UiActionConfirmDialogComponent,
|
|
@@ -3550,20 +3564,20 @@ class UiActionConfirmDialogService extends SmartdialogService {
|
|
|
3550
3564
|
this.shouldDoAction = true;
|
|
3551
3565
|
this.onAction.complete();
|
|
3552
3566
|
this.closeDialog();
|
|
3553
|
-
this.onAction = new
|
|
3567
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3554
3568
|
}
|
|
3555
3569
|
cancel() {
|
|
3556
3570
|
this.onAction.complete();
|
|
3557
3571
|
this.closeDialog();
|
|
3558
|
-
this.onAction = new
|
|
3572
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3559
3573
|
}
|
|
3560
3574
|
}
|
|
3561
3575
|
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:
|
|
3576
|
+
UiActionConfirmDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, providedIn: 'root' });
|
|
3563
3577
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, decorators: [{
|
|
3564
3578
|
type: Injectable,
|
|
3565
3579
|
args: [{
|
|
3566
|
-
providedIn:
|
|
3580
|
+
providedIn: 'root',
|
|
3567
3581
|
}]
|
|
3568
3582
|
}], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2$1.Router }]; } });
|
|
3569
3583
|
|
|
@@ -3680,7 +3694,7 @@ class UiActionInputDialogService extends SmartdialogService {
|
|
|
3680
3694
|
constructor(dialog, router) {
|
|
3681
3695
|
super(dialog, router);
|
|
3682
3696
|
this._destroy$ = new Subject();
|
|
3683
|
-
this.onAction = new
|
|
3697
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3684
3698
|
}
|
|
3685
3699
|
setDataAndOpenDialog(action, nodeName) {
|
|
3686
3700
|
this.action = action;
|
|
@@ -3689,10 +3703,10 @@ class UiActionInputDialogService extends SmartdialogService {
|
|
|
3689
3703
|
}
|
|
3690
3704
|
openDialog() {
|
|
3691
3705
|
this.params = undefined;
|
|
3692
|
-
this.onAction = new
|
|
3706
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3693
3707
|
const dialogData = {
|
|
3694
3708
|
content: {
|
|
3695
|
-
title:
|
|
3709
|
+
title: '',
|
|
3696
3710
|
},
|
|
3697
3711
|
size: {},
|
|
3698
3712
|
customComponent: UiActionInputDialogComponent,
|
|
@@ -3703,20 +3717,20 @@ class UiActionInputDialogService extends SmartdialogService {
|
|
|
3703
3717
|
this.params = params;
|
|
3704
3718
|
this.onAction.complete();
|
|
3705
3719
|
this.closeDialog();
|
|
3706
|
-
this.onAction = new
|
|
3720
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3707
3721
|
}
|
|
3708
3722
|
cancel() {
|
|
3709
3723
|
this.onAction.complete();
|
|
3710
3724
|
this.closeDialog();
|
|
3711
|
-
this.onAction = new
|
|
3725
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3712
3726
|
}
|
|
3713
3727
|
}
|
|
3714
3728
|
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:
|
|
3729
|
+
UiActionInputDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogService, providedIn: 'root' });
|
|
3716
3730
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionInputDialogService, decorators: [{
|
|
3717
3731
|
type: Injectable,
|
|
3718
3732
|
args: [{
|
|
3719
|
-
providedIn:
|
|
3733
|
+
providedIn: 'root',
|
|
3720
3734
|
}]
|
|
3721
3735
|
}], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2$1.Router }]; } });
|
|
3722
3736
|
|
|
@@ -3725,6 +3739,11 @@ class UiActionService {
|
|
|
3725
3739
|
this.confirmDialogService = confirmDialogService;
|
|
3726
3740
|
this.textFieldDialogService = textFieldDialogService;
|
|
3727
3741
|
this._snackBar = _snackBar;
|
|
3742
|
+
this._destroy$ = new Subject();
|
|
3743
|
+
}
|
|
3744
|
+
ngOnDestroy() {
|
|
3745
|
+
this._destroy$.next();
|
|
3746
|
+
this._destroy$.complete();
|
|
3728
3747
|
}
|
|
3729
3748
|
async execute(uiAction, options) {
|
|
3730
3749
|
let uiActionRequest;
|
|
@@ -3737,12 +3756,12 @@ class UiActionService {
|
|
|
3737
3756
|
this.uiActionModel.serviceToUse.submit.next();
|
|
3738
3757
|
try {
|
|
3739
3758
|
await this.uiActionModel.serviceToUse.submit.toPromise();
|
|
3740
|
-
this.uiActionModel.serviceToUse.submit = new
|
|
3759
|
+
this.uiActionModel.serviceToUse.submit = new SmartSubject(this._destroy$);
|
|
3741
3760
|
this.uiActionModel.serviceToUse.reSubscribeToChange.next();
|
|
3742
3761
|
}
|
|
3743
3762
|
catch (error) {
|
|
3744
3763
|
console.error(error);
|
|
3745
|
-
this.uiActionModel.serviceToUse.submit = new
|
|
3764
|
+
this.uiActionModel.serviceToUse.submit = new SmartSubject(this._destroy$);
|
|
3746
3765
|
this.uiActionModel.serviceToUse.reSubscribeToChange.next();
|
|
3747
3766
|
return;
|
|
3748
3767
|
}
|
|
@@ -4056,7 +4075,12 @@ var UiActionDialogType;
|
|
|
4056
4075
|
class SmartAuthService {
|
|
4057
4076
|
constructor() {
|
|
4058
4077
|
this.bffApisHaveBeenSetUp = false;
|
|
4059
|
-
this.
|
|
4078
|
+
this._destroy$ = new Subject();
|
|
4079
|
+
this.headersUpdated = new SmartSubject(this._destroy$);
|
|
4080
|
+
}
|
|
4081
|
+
ngOnDestroy() {
|
|
4082
|
+
this._destroy$.next();
|
|
4083
|
+
this._destroy$.complete();
|
|
4060
4084
|
}
|
|
4061
4085
|
}
|
|
4062
4086
|
SmartAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -4065,26 +4089,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4065
4089
|
type: Injectable
|
|
4066
4090
|
}] });
|
|
4067
4091
|
|
|
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
4092
|
let SmartComponentApiClient = class SmartComponentApiClient {
|
|
4089
4093
|
constructor(inject, auth, pageName) {
|
|
4090
4094
|
this.inject = inject;
|
|
@@ -4453,5 +4457,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4453
4457
|
* Generated bundle index. Do not edit.
|
|
4454
4458
|
*/
|
|
4455
4459
|
|
|
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,
|
|
4460
|
+
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
4461
|
//# sourceMappingURL=smartbit4all-ng-client.mjs.map
|