@fluxhub/fluxhub-lib 19.0.72 → 19.0.74
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.
|
@@ -17255,11 +17255,21 @@ class FHUploadPanelComponent {
|
|
|
17255
17255
|
ver: this.current_v,
|
|
17256
17256
|
});
|
|
17257
17257
|
}
|
|
17258
|
-
preview_email(ax) {
|
|
17258
|
+
preview_email(ax, event) {
|
|
17259
|
+
// Prevent form submission if this is called from within a form
|
|
17260
|
+
if (event) {
|
|
17261
|
+
event.preventDefault();
|
|
17262
|
+
event.stopPropagation();
|
|
17263
|
+
}
|
|
17259
17264
|
let dialogRef = this.dialog.open(FHWinShowEmail, { data: { App: ax.App, K: ax.K, Filename: ax.Filename }, width: '95%' });
|
|
17260
17265
|
dialogRef.afterClosed().subscribe((result) => { });
|
|
17261
17266
|
}
|
|
17262
|
-
download_all(ax) {
|
|
17267
|
+
download_all(ax, event) {
|
|
17268
|
+
// Prevent form submission if this is called from within a form
|
|
17269
|
+
if (event) {
|
|
17270
|
+
event.preventDefault();
|
|
17271
|
+
event.stopPropagation();
|
|
17272
|
+
}
|
|
17263
17273
|
if (ax.APP != null)
|
|
17264
17274
|
ax.App = ax.APP;
|
|
17265
17275
|
let path = '';
|
|
@@ -17627,6 +17637,7 @@ class FHUploadPanelComponent {
|
|
|
17627
17637
|
>
|
|
17628
17638
|
<td style="text-align:center" *ngIf="show_download">
|
|
17629
17639
|
<button
|
|
17640
|
+
type="button"
|
|
17630
17641
|
[hidden]="
|
|
17631
17642
|
!show_preview ||
|
|
17632
17643
|
(app.Filename.indexOf('.eml') == -1 &&
|
|
@@ -17634,15 +17645,16 @@ class FHUploadPanelComponent {
|
|
|
17634
17645
|
"
|
|
17635
17646
|
mat-icon-button
|
|
17636
17647
|
[matTooltip]="'Preview'"
|
|
17637
|
-
(click)="preview_email(app)"
|
|
17648
|
+
(click)="preview_email(app, $event)"
|
|
17638
17649
|
class="fh_icon_button"
|
|
17639
17650
|
>
|
|
17640
17651
|
<mat-icon>visibility</mat-icon>
|
|
17641
17652
|
</button>
|
|
17642
17653
|
<button
|
|
17654
|
+
type="button"
|
|
17643
17655
|
mat-icon-button
|
|
17644
17656
|
[matTooltip]="'Download File'"
|
|
17645
|
-
(click)="download_all(app)"
|
|
17657
|
+
(click)="download_all(app, $event)"
|
|
17646
17658
|
class="fh_icon_button"
|
|
17647
17659
|
>
|
|
17648
17660
|
<mat-icon>file_download</mat-icon>
|
|
@@ -17651,7 +17663,7 @@ class FHUploadPanelComponent {
|
|
|
17651
17663
|
<td
|
|
17652
17664
|
[fxShow.lt-sm]="false"
|
|
17653
17665
|
style="text-align:center;vertical-align: middle;width:36px;height:36px;"
|
|
17654
|
-
(click)="download_all(app)"
|
|
17666
|
+
(click)="download_all(app, $event)"
|
|
17655
17667
|
>
|
|
17656
17668
|
<div
|
|
17657
17669
|
style="text-align:center;vertical-align: middle;width:28px;height:28px;"
|
|
@@ -17667,7 +17679,7 @@ class FHUploadPanelComponent {
|
|
|
17667
17679
|
type="button"
|
|
17668
17680
|
mat-stroked-button
|
|
17669
17681
|
color="primary"
|
|
17670
|
-
(click)="download_all(app)"
|
|
17682
|
+
(click)="download_all(app, $event)"
|
|
17671
17683
|
>
|
|
17672
17684
|
{{ app.Filename }}
|
|
17673
17685
|
</button>
|
|
@@ -17836,22 +17848,24 @@ class FHUploadPanelComponent {
|
|
|
17836
17848
|
>
|
|
17837
17849
|
<td style="text-align:center" *ngIf="show_download">
|
|
17838
17850
|
<button
|
|
17851
|
+
type="button"
|
|
17839
17852
|
[hidden]="
|
|
17840
17853
|
app.Filename.indexOf('.eml') == -1 &&
|
|
17841
17854
|
app.Filename.indexOf('.msg') == -1
|
|
17842
17855
|
"
|
|
17843
17856
|
mat-icon-button
|
|
17844
17857
|
[matTooltip]="'Preview'"
|
|
17845
|
-
(click)="preview_email(app)"
|
|
17858
|
+
(click)="preview_email(app, $event)"
|
|
17846
17859
|
class="fh_icon_button"
|
|
17847
17860
|
>
|
|
17848
17861
|
<mat-icon>visibility</mat-icon>
|
|
17849
17862
|
</button>
|
|
17850
17863
|
|
|
17851
17864
|
<button
|
|
17865
|
+
type="button"
|
|
17852
17866
|
mat-icon-button
|
|
17853
17867
|
[matTooltip]="'Download File'"
|
|
17854
|
-
(click)="download_all(app)"
|
|
17868
|
+
(click)="download_all(app, $event)"
|
|
17855
17869
|
class="fh_icon_button"
|
|
17856
17870
|
>
|
|
17857
17871
|
<mat-icon>file_download</mat-icon>
|
|
@@ -17860,7 +17874,7 @@ class FHUploadPanelComponent {
|
|
|
17860
17874
|
<td
|
|
17861
17875
|
[fxShow.lt-sm]="false"
|
|
17862
17876
|
style="text-align:center;vertical-align: middle;width:36px;height:36px;"
|
|
17863
|
-
(click)="download_all(app)"
|
|
17877
|
+
(click)="download_all(app, $event)"
|
|
17864
17878
|
>
|
|
17865
17879
|
<div
|
|
17866
17880
|
style="text-align:center;vertical-align: middle;width:28px;height:28px;"
|
|
@@ -17877,7 +17891,7 @@ class FHUploadPanelComponent {
|
|
|
17877
17891
|
type="button"
|
|
17878
17892
|
mat-stroked-button
|
|
17879
17893
|
color="primary"
|
|
17880
|
-
(click)="download_all(app)"
|
|
17894
|
+
(click)="download_all(app, $event)"
|
|
17881
17895
|
>
|
|
17882
17896
|
{{ app.Filename }}
|
|
17883
17897
|
</button>
|
|
@@ -17967,7 +17981,7 @@ class FHUploadPanelComponent {
|
|
|
17967
17981
|
type="button"
|
|
17968
17982
|
mat-stroked-button
|
|
17969
17983
|
color="primary"
|
|
17970
|
-
(click)="download_all(app)"
|
|
17984
|
+
(click)="download_all(app, $event)"
|
|
17971
17985
|
>
|
|
17972
17986
|
{{ app.Filename }}
|
|
17973
17987
|
</button>
|
|
@@ -18012,7 +18026,7 @@ class FHUploadPanelComponent {
|
|
|
18012
18026
|
>
|
|
18013
18027
|
<td
|
|
18014
18028
|
style="text-align:center;vertical-align: middle;width:36px;height:36px;"
|
|
18015
|
-
(click)="download_all(app)"
|
|
18029
|
+
(click)="download_all(app, $event)"
|
|
18016
18030
|
>
|
|
18017
18031
|
<div
|
|
18018
18032
|
style="text-align:center;vertical-align: middle;width:28px;height:28px;"
|
|
@@ -18028,14 +18042,14 @@ class FHUploadPanelComponent {
|
|
|
18028
18042
|
type="button"
|
|
18029
18043
|
mat-stroked-button
|
|
18030
18044
|
color="primary"
|
|
18031
|
-
(click)="download_all(app)"
|
|
18045
|
+
(click)="download_all(app, $event)"
|
|
18032
18046
|
>
|
|
18033
18047
|
{{ app.Filename }}</button
|
|
18034
18048
|
><br /><br />
|
|
18035
18049
|
<button
|
|
18036
18050
|
type="button"
|
|
18037
18051
|
style="background-color: #F5F5F5"
|
|
18038
|
-
(click)="download_all(app)"
|
|
18052
|
+
(click)="download_all(app, $event)"
|
|
18039
18053
|
mat-flat-button
|
|
18040
18054
|
>
|
|
18041
18055
|
DOWNLOAD
|
|
@@ -18130,6 +18144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
18130
18144
|
>
|
|
18131
18145
|
<td style="text-align:center" *ngIf="show_download">
|
|
18132
18146
|
<button
|
|
18147
|
+
type="button"
|
|
18133
18148
|
[hidden]="
|
|
18134
18149
|
!show_preview ||
|
|
18135
18150
|
(app.Filename.indexOf('.eml') == -1 &&
|
|
@@ -18137,15 +18152,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
18137
18152
|
"
|
|
18138
18153
|
mat-icon-button
|
|
18139
18154
|
[matTooltip]="'Preview'"
|
|
18140
|
-
(click)="preview_email(app)"
|
|
18155
|
+
(click)="preview_email(app, $event)"
|
|
18141
18156
|
class="fh_icon_button"
|
|
18142
18157
|
>
|
|
18143
18158
|
<mat-icon>visibility</mat-icon>
|
|
18144
18159
|
</button>
|
|
18145
18160
|
<button
|
|
18161
|
+
type="button"
|
|
18146
18162
|
mat-icon-button
|
|
18147
18163
|
[matTooltip]="'Download File'"
|
|
18148
|
-
(click)="download_all(app)"
|
|
18164
|
+
(click)="download_all(app, $event)"
|
|
18149
18165
|
class="fh_icon_button"
|
|
18150
18166
|
>
|
|
18151
18167
|
<mat-icon>file_download</mat-icon>
|
|
@@ -18154,7 +18170,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
18154
18170
|
<td
|
|
18155
18171
|
[fxShow.lt-sm]="false"
|
|
18156
18172
|
style="text-align:center;vertical-align: middle;width:36px;height:36px;"
|
|
18157
|
-
(click)="download_all(app)"
|
|
18173
|
+
(click)="download_all(app, $event)"
|
|
18158
18174
|
>
|
|
18159
18175
|
<div
|
|
18160
18176
|
style="text-align:center;vertical-align: middle;width:28px;height:28px;"
|
|
@@ -18170,7 +18186,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
18170
18186
|
type="button"
|
|
18171
18187
|
mat-stroked-button
|
|
18172
18188
|
color="primary"
|
|
18173
|
-
(click)="download_all(app)"
|
|
18189
|
+
(click)="download_all(app, $event)"
|
|
18174
18190
|
>
|
|
18175
18191
|
{{ app.Filename }}
|
|
18176
18192
|
</button>
|
|
@@ -18339,22 +18355,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
18339
18355
|
>
|
|
18340
18356
|
<td style="text-align:center" *ngIf="show_download">
|
|
18341
18357
|
<button
|
|
18358
|
+
type="button"
|
|
18342
18359
|
[hidden]="
|
|
18343
18360
|
app.Filename.indexOf('.eml') == -1 &&
|
|
18344
18361
|
app.Filename.indexOf('.msg') == -1
|
|
18345
18362
|
"
|
|
18346
18363
|
mat-icon-button
|
|
18347
18364
|
[matTooltip]="'Preview'"
|
|
18348
|
-
(click)="preview_email(app)"
|
|
18365
|
+
(click)="preview_email(app, $event)"
|
|
18349
18366
|
class="fh_icon_button"
|
|
18350
18367
|
>
|
|
18351
18368
|
<mat-icon>visibility</mat-icon>
|
|
18352
18369
|
</button>
|
|
18353
18370
|
|
|
18354
18371
|
<button
|
|
18372
|
+
type="button"
|
|
18355
18373
|
mat-icon-button
|
|
18356
18374
|
[matTooltip]="'Download File'"
|
|
18357
|
-
(click)="download_all(app)"
|
|
18375
|
+
(click)="download_all(app, $event)"
|
|
18358
18376
|
class="fh_icon_button"
|
|
18359
18377
|
>
|
|
18360
18378
|
<mat-icon>file_download</mat-icon>
|
|
@@ -18363,7 +18381,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
18363
18381
|
<td
|
|
18364
18382
|
[fxShow.lt-sm]="false"
|
|
18365
18383
|
style="text-align:center;vertical-align: middle;width:36px;height:36px;"
|
|
18366
|
-
(click)="download_all(app)"
|
|
18384
|
+
(click)="download_all(app, $event)"
|
|
18367
18385
|
>
|
|
18368
18386
|
<div
|
|
18369
18387
|
style="text-align:center;vertical-align: middle;width:28px;height:28px;"
|
|
@@ -18380,7 +18398,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
18380
18398
|
type="button"
|
|
18381
18399
|
mat-stroked-button
|
|
18382
18400
|
color="primary"
|
|
18383
|
-
(click)="download_all(app)"
|
|
18401
|
+
(click)="download_all(app, $event)"
|
|
18384
18402
|
>
|
|
18385
18403
|
{{ app.Filename }}
|
|
18386
18404
|
</button>
|
|
@@ -18470,7 +18488,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
18470
18488
|
type="button"
|
|
18471
18489
|
mat-stroked-button
|
|
18472
18490
|
color="primary"
|
|
18473
|
-
(click)="download_all(app)"
|
|
18491
|
+
(click)="download_all(app, $event)"
|
|
18474
18492
|
>
|
|
18475
18493
|
{{ app.Filename }}
|
|
18476
18494
|
</button>
|
|
@@ -18515,7 +18533,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
18515
18533
|
>
|
|
18516
18534
|
<td
|
|
18517
18535
|
style="text-align:center;vertical-align: middle;width:36px;height:36px;"
|
|
18518
|
-
(click)="download_all(app)"
|
|
18536
|
+
(click)="download_all(app, $event)"
|
|
18519
18537
|
>
|
|
18520
18538
|
<div
|
|
18521
18539
|
style="text-align:center;vertical-align: middle;width:28px;height:28px;"
|
|
@@ -18531,14 +18549,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
18531
18549
|
type="button"
|
|
18532
18550
|
mat-stroked-button
|
|
18533
18551
|
color="primary"
|
|
18534
|
-
(click)="download_all(app)"
|
|
18552
|
+
(click)="download_all(app, $event)"
|
|
18535
18553
|
>
|
|
18536
18554
|
{{ app.Filename }}</button
|
|
18537
18555
|
><br /><br />
|
|
18538
18556
|
<button
|
|
18539
18557
|
type="button"
|
|
18540
18558
|
style="background-color: #F5F5F5"
|
|
18541
|
-
(click)="download_all(app)"
|
|
18559
|
+
(click)="download_all(app, $event)"
|
|
18542
18560
|
mat-flat-button
|
|
18543
18561
|
>
|
|
18544
18562
|
DOWNLOAD
|
|
@@ -36221,20 +36239,30 @@ class AuthHttpRequestInterceptor {
|
|
|
36221
36239
|
this.http = http;
|
|
36222
36240
|
}
|
|
36223
36241
|
intercept(request, next) {
|
|
36224
|
-
|
|
36225
|
-
|
|
36242
|
+
const token = this.getJwtToken();
|
|
36243
|
+
console.log('[AuthInterceptor] Intercepting request:', request.url);
|
|
36244
|
+
console.log('[AuthInterceptor] Token available:', token !== 'ZZ' && token !== null);
|
|
36245
|
+
if (token && token !== 'ZZ') {
|
|
36246
|
+
request = this.addToken(request, token);
|
|
36247
|
+
console.log('[AuthInterceptor] Token added to request');
|
|
36248
|
+
}
|
|
36249
|
+
else {
|
|
36250
|
+
console.warn('[AuthInterceptor] No valid token found in localStorage');
|
|
36226
36251
|
}
|
|
36227
36252
|
return next.handle(request).pipe(catchError((error) => {
|
|
36228
36253
|
if (error instanceof HttpErrorResponse &&
|
|
36229
36254
|
error.status === 400 &&
|
|
36230
36255
|
error.error === 'Invalid client request') {
|
|
36256
|
+
console.error('[AuthInterceptor] Invalid client request (400)');
|
|
36231
36257
|
this.loginservice.logout();
|
|
36232
36258
|
return throwError(error);
|
|
36233
36259
|
}
|
|
36234
36260
|
if (error instanceof HttpErrorResponse && error.status === 401) {
|
|
36261
|
+
console.warn('[AuthInterceptor] Unauthorized (401) - attempting token refresh');
|
|
36235
36262
|
return this.handle401Error(request, next);
|
|
36236
36263
|
}
|
|
36237
36264
|
else {
|
|
36265
|
+
console.error('[AuthInterceptor] HTTP Error:', error.status, error.message);
|
|
36238
36266
|
return throwError(error);
|
|
36239
36267
|
}
|
|
36240
36268
|
}));
|
|
@@ -36244,26 +36272,38 @@ class AuthHttpRequestInterceptor {
|
|
|
36244
36272
|
}
|
|
36245
36273
|
refreshTokenSubject = new BehaviorSubject(null);
|
|
36246
36274
|
handle401Error(request, next) {
|
|
36247
|
-
if (!localStorage.getItem(this.appService.COMPANY_KEY + 'refreshToken'))
|
|
36275
|
+
if (!localStorage.getItem(this.appService.COMPANY_KEY + 'refreshToken')) {
|
|
36276
|
+
console.warn('[AuthInterceptor] No refreshToken found - cannot refresh');
|
|
36248
36277
|
return next.handle(request);
|
|
36278
|
+
}
|
|
36249
36279
|
const refreshToken = localStorage.getItem(this.appService.COMPANY_KEY + 'refreshToken') ||
|
|
36250
36280
|
'ZZ';
|
|
36251
36281
|
const token = localStorage.getItem(this.appService.COMPANY_KEY + 'token') || 'ZZ';
|
|
36252
36282
|
if (!token || !refreshToken) {
|
|
36283
|
+
console.warn('[AuthInterceptor] Missing token or refreshToken');
|
|
36253
36284
|
return next.handle(request);
|
|
36254
36285
|
}
|
|
36255
36286
|
if (!this.isRefreshing) {
|
|
36287
|
+
console.log('[AuthInterceptor] Starting token refresh...');
|
|
36256
36288
|
this.isRefreshing = true;
|
|
36257
36289
|
this.refreshTokenSubject.next(null);
|
|
36258
36290
|
return this.refreshToken(token, refreshToken).pipe(switchMap((token) => {
|
|
36259
36291
|
this.isRefreshing = false;
|
|
36292
|
+
console.log('[AuthInterceptor] Token refreshed successfully');
|
|
36260
36293
|
this.refreshTokenSubject.next(localStorage.getItem(this.appService.COMPANY_KEY + 'token'));
|
|
36261
36294
|
return next.handle(this.addToken(request, localStorage.getItem(this.appService.COMPANY_KEY + 'token') ||
|
|
36262
36295
|
'ZZ'));
|
|
36296
|
+
}), catchError((error) => {
|
|
36297
|
+
this.isRefreshing = false;
|
|
36298
|
+
console.error('[AuthInterceptor] Token refresh failed:', error);
|
|
36299
|
+
this.loginservice.logout();
|
|
36300
|
+
return throwError(() => error);
|
|
36263
36301
|
}));
|
|
36264
36302
|
}
|
|
36265
36303
|
else {
|
|
36304
|
+
console.log('[AuthInterceptor] Waiting for ongoing token refresh...');
|
|
36266
36305
|
return this.refreshTokenSubject.pipe(filter((token) => token != null), take(1), switchMap((jwt) => {
|
|
36306
|
+
console.log('[AuthInterceptor] Using refreshed token from queue');
|
|
36267
36307
|
return next.handle(this.addToken(request, localStorage.getItem(this.appService.COMPANY_KEY + 'token') ||
|
|
36268
36308
|
'ZZ'));
|
|
36269
36309
|
}));
|
|
@@ -36274,6 +36314,7 @@ class AuthHttpRequestInterceptor {
|
|
|
36274
36314
|
accessToken: token,
|
|
36275
36315
|
refreshToken: refreshToken,
|
|
36276
36316
|
});
|
|
36317
|
+
console.log('[AuthInterceptor] Calling refresh endpoint:', this.appService.API_ENDPOINT + 'token/refresh');
|
|
36277
36318
|
return this.http
|
|
36278
36319
|
.post(this.appService.API_ENDPOINT + 'token/refresh', credentials, {
|
|
36279
36320
|
headers: new HttpHeaders({
|
|
@@ -36282,9 +36323,11 @@ class AuthHttpRequestInterceptor {
|
|
|
36282
36323
|
})
|
|
36283
36324
|
.pipe(tap((res) => {
|
|
36284
36325
|
if ((res.accessToken || 'ND') == 'ND') {
|
|
36326
|
+
console.error('[AuthInterceptor] Refresh response invalid - no accessToken');
|
|
36285
36327
|
this.loginservice.logout();
|
|
36286
36328
|
return;
|
|
36287
36329
|
}
|
|
36330
|
+
console.log('[AuthInterceptor] New tokens saved to localStorage');
|
|
36288
36331
|
localStorage.setItem(this.appService.COMPANY_KEY + 'token', res.accessToken);
|
|
36289
36332
|
localStorage.setItem(this.appService.COMPANY_KEY + 'refreshToken', res.refreshToken);
|
|
36290
36333
|
}));
|