@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
|
@@ -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
|
|
680
|
+
this.authenticationStateChanged = new SmartSubject(this._destroy$);
|
|
679
681
|
this.headerParams = new Array();
|
|
680
|
-
this.headersUpdated = new
|
|
682
|
+
this.headersUpdated = new SmartSubject(this._destroy$);
|
|
681
683
|
// Locale
|
|
682
684
|
this.localStorageLocaleName = 'locale';
|
|
683
|
-
this.localeChanged = new
|
|
684
|
-
this.sessionExpiracyChanged = new
|
|
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
|
|
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.
|
|
2029
|
-
this.
|
|
2030
|
-
this.
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
2579
|
-
this.isSmartDevToolActiveName =
|
|
2589
|
+
this.smartDevToolName = 'smartDevTool';
|
|
2590
|
+
this.isSmartDevToolActiveName = 'smartDevToolActive';
|
|
2580
2591
|
this.isActive = false;
|
|
2581
|
-
this.smartDevToolHoursName =
|
|
2582
|
-
this.smartDevToolMaxName =
|
|
2592
|
+
this.smartDevToolHoursName = 'smartDevToolHours';
|
|
2593
|
+
this.smartDevToolMaxName = 'smartDevToolMaxCalls';
|
|
2583
2594
|
this.hoursToSave = 1;
|
|
2584
2595
|
this.maxNumOfSavedCalls = 50;
|
|
2585
|
-
this.
|
|
2596
|
+
this._destroy$ = new Subject();
|
|
2597
|
+
this.descriptorChanged = new SmartSubject(this._destroy$);
|
|
2586
2598
|
this.newErrorsCount = 0;
|
|
2587
|
-
this.newErrorsCountChanged = new
|
|
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(
|
|
2609
|
+
window.addEventListener('storage', (event) => {
|
|
2598
2610
|
if (event.storageArea === localStorage) {
|
|
2599
|
-
this.isActive = localStorage.getItem(this.isSmartDevToolActiveName) ===
|
|
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,
|
|
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 ===
|
|
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:
|
|
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:
|
|
2730
|
+
providedIn: 'root',
|
|
2717
2731
|
}]
|
|
2718
2732
|
}], ctorParameters: function () { return [{ type: SmartCookieService }]; } });
|
|
2719
2733
|
class SmartDevToolDatePipe extends DatePipe {
|
|
2720
|
-
transform(value, format =
|
|
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:
|
|
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 =
|
|
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(
|
|
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) ===
|
|
2877
|
+
this.isShown = localStorage.getItem(this.adminKeyName) === 'true';
|
|
2864
2878
|
}
|
|
2865
2879
|
}
|
|
2866
2880
|
});
|
|
2867
|
-
this.isShown = localStorage.getItem(this.adminKeyName) ===
|
|
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:
|
|
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 =
|
|
2942
|
-
this.timeChanged = new
|
|
2943
|
-
this.onTimerExpired = new
|
|
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:
|
|
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:
|
|
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 ?
|
|
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:
|
|
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
|
/*
|
|
@@ -3327,7 +3341,7 @@ class UiActionDescriptorService {
|
|
|
3327
3341
|
constructor(viewContext) {
|
|
3328
3342
|
this.viewContext = viewContext;
|
|
3329
3343
|
this._destroy$ = new Subject();
|
|
3330
|
-
this.languageChanged = new
|
|
3344
|
+
this.languageChanged = new SmartSubject(this._destroy$);
|
|
3331
3345
|
this.keysToTranslate = ['title', 'text', 'placeholder', 'caption', 'feedbackText'];
|
|
3332
3346
|
this.basicActionDescriptors = new Map([
|
|
3333
3347
|
[
|
|
@@ -3525,15 +3539,15 @@ class UiActionConfirmDialogService extends SmartdialogService {
|
|
|
3525
3539
|
constructor(dialog, router) {
|
|
3526
3540
|
super(dialog, router);
|
|
3527
3541
|
this._destroy$ = new Subject();
|
|
3528
|
-
this.onAction = new
|
|
3542
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3529
3543
|
this.shouldDoAction = false;
|
|
3530
3544
|
}
|
|
3531
3545
|
openDialog() {
|
|
3532
3546
|
this.shouldDoAction = false;
|
|
3533
|
-
this.onAction = new
|
|
3547
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3534
3548
|
const dialogData = {
|
|
3535
3549
|
content: {
|
|
3536
|
-
title:
|
|
3550
|
+
title: '',
|
|
3537
3551
|
},
|
|
3538
3552
|
size: {},
|
|
3539
3553
|
customComponent: UiActionConfirmDialogComponent,
|
|
@@ -3544,20 +3558,20 @@ class UiActionConfirmDialogService extends SmartdialogService {
|
|
|
3544
3558
|
this.shouldDoAction = true;
|
|
3545
3559
|
this.onAction.complete();
|
|
3546
3560
|
this.closeDialog();
|
|
3547
|
-
this.onAction = new
|
|
3561
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3548
3562
|
}
|
|
3549
3563
|
cancel() {
|
|
3550
3564
|
this.onAction.complete();
|
|
3551
3565
|
this.closeDialog();
|
|
3552
|
-
this.onAction = new
|
|
3566
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3553
3567
|
}
|
|
3554
3568
|
}
|
|
3555
3569
|
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:
|
|
3570
|
+
UiActionConfirmDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, providedIn: 'root' });
|
|
3557
3571
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UiActionConfirmDialogService, decorators: [{
|
|
3558
3572
|
type: Injectable,
|
|
3559
3573
|
args: [{
|
|
3560
|
-
providedIn:
|
|
3574
|
+
providedIn: 'root',
|
|
3561
3575
|
}]
|
|
3562
3576
|
}], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i2$1.Router }]; } });
|
|
3563
3577
|
|
|
@@ -3678,7 +3692,7 @@ class UiActionInputDialogService extends SmartdialogService {
|
|
|
3678
3692
|
constructor(dialog, router) {
|
|
3679
3693
|
super(dialog, router);
|
|
3680
3694
|
this._destroy$ = new Subject();
|
|
3681
|
-
this.onAction = new
|
|
3695
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3682
3696
|
}
|
|
3683
3697
|
setDataAndOpenDialog(action, nodeName) {
|
|
3684
3698
|
this.action = action;
|
|
@@ -3687,10 +3701,10 @@ class UiActionInputDialogService extends SmartdialogService {
|
|
|
3687
3701
|
}
|
|
3688
3702
|
openDialog() {
|
|
3689
3703
|
this.params = undefined;
|
|
3690
|
-
this.onAction = new
|
|
3704
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3691
3705
|
const dialogData = {
|
|
3692
3706
|
content: {
|
|
3693
|
-
title:
|
|
3707
|
+
title: '',
|
|
3694
3708
|
},
|
|
3695
3709
|
size: {},
|
|
3696
3710
|
customComponent: UiActionInputDialogComponent,
|
|
@@ -3702,21 +3716,21 @@ class UiActionInputDialogService extends SmartdialogService {
|
|
|
3702
3716
|
this.params = params;
|
|
3703
3717
|
this.onAction.complete();
|
|
3704
3718
|
this.closeDialog();
|
|
3705
|
-
this.onAction = new
|
|
3719
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
3706
3720
|
});
|
|
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
|
execute(uiAction, options) {
|
|
3730
3749
|
var _a;
|
|
@@ -3739,12 +3758,12 @@ class UiActionService {
|
|
|
3739
3758
|
this.uiActionModel.serviceToUse.submit.next();
|
|
3740
3759
|
try {
|
|
3741
3760
|
yield this.uiActionModel.serviceToUse.submit.toPromise();
|
|
3742
|
-
this.uiActionModel.serviceToUse.submit = new
|
|
3761
|
+
this.uiActionModel.serviceToUse.submit = new SmartSubject(this._destroy$);
|
|
3743
3762
|
this.uiActionModel.serviceToUse.reSubscribeToChange.next();
|
|
3744
3763
|
}
|
|
3745
3764
|
catch (error) {
|
|
3746
3765
|
console.error(error);
|
|
3747
|
-
this.uiActionModel.serviceToUse.submit = new
|
|
3766
|
+
this.uiActionModel.serviceToUse.submit = new SmartSubject(this._destroy$);
|
|
3748
3767
|
this.uiActionModel.serviceToUse.reSubscribeToChange.next();
|
|
3749
3768
|
return;
|
|
3750
3769
|
}
|
|
@@ -4072,7 +4091,12 @@ var UiActionDialogType;
|
|
|
4072
4091
|
class SmartAuthService {
|
|
4073
4092
|
constructor() {
|
|
4074
4093
|
this.bffApisHaveBeenSetUp = false;
|
|
4075
|
-
this.
|
|
4094
|
+
this._destroy$ = new Subject();
|
|
4095
|
+
this.headersUpdated = new SmartSubject(this._destroy$);
|
|
4096
|
+
}
|
|
4097
|
+
ngOnDestroy() {
|
|
4098
|
+
this._destroy$.next();
|
|
4099
|
+
this._destroy$.complete();
|
|
4076
4100
|
}
|
|
4077
4101
|
}
|
|
4078
4102
|
SmartAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SmartAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -4081,26 +4105,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4081
4105
|
type: Injectable
|
|
4082
4106
|
}] });
|
|
4083
4107
|
|
|
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
4108
|
let SmartComponentApiClient = class SmartComponentApiClient {
|
|
4105
4109
|
constructor(inject, auth, pageName) {
|
|
4106
4110
|
this.inject = inject;
|
|
@@ -4480,5 +4484,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
4480
4484
|
* Generated bundle index. Do not edit.
|
|
4481
4485
|
*/
|
|
4482
4486
|
|
|
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,
|
|
4487
|
+
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
4488
|
//# sourceMappingURL=smartbit4all-ng-client.mjs.map
|