@arsedizioni/ars-utils 20.3.33 → 20.3.35

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.
@@ -1099,8 +1099,9 @@ declare class ClipperService implements OnDestroy {
1099
1099
  confirmIdentity(code: string, flags?: number): rxjs.Observable<ApiResult<ClipperLoginResult>>;
1100
1100
  /**
1101
1101
  * Perform logout
1102
+ * @param forget: true to dispose all user informations
1102
1103
  */
1103
- logout(): rxjs.Observable<any>;
1104
+ logout(forget?: boolean): rxjs.Observable<any>;
1104
1105
  /**
1105
1106
  * Reset login refresh timer and login state
1106
1107
  */
@@ -2127,6 +2127,7 @@ class ClipperService {
2127
2127
  if (!tokenExpired || this.loggedIn()) {
2128
2128
  // Auto login
2129
2129
  this.loggedIn.set(true);
2130
+ this.loggingIn.set(false);
2130
2131
  // Keep alive
2131
2132
  this.setKeepAlive();
2132
2133
  // Initialize channels
@@ -2292,8 +2293,7 @@ class ClipperService {
2292
2293
  : new HttpHeaders()
2293
2294
  .set("Authorization", 'Bearer ' + oauthAccessToken)
2294
2295
  })
2295
- .pipe(catchError(err => {
2296
- this.loggingIn.set(false);
2296
+ .pipe(finalize(() => this.loggingIn.set(false)), catchError(err => {
2297
2297
  return throwError(() => err);
2298
2298
  }), map((r) => {
2299
2299
  if (r.success) {
@@ -2338,8 +2338,7 @@ class ClipperService {
2338
2338
  confirmIdentity(code, flags = ClipperLoginFlags.None) {
2339
2339
  return this.httpClient
2340
2340
  .post(this._serviceUri + '/login/confirm/' + code + '/?flags=' + flags, {})
2341
- .pipe(catchError((err) => {
2342
- this.loggingIn.set(false);
2341
+ .pipe(finalize(() => this.loggingIn.set(false)), catchError((err) => {
2343
2342
  return throwError(() => err);
2344
2343
  }), map((r) => {
2345
2344
  if (r.success) {
@@ -2351,9 +2350,10 @@ class ClipperService {
2351
2350
  }
2352
2351
  /**
2353
2352
  * Perform logout
2353
+ * @param forget: true to dispose all user informations
2354
2354
  */
2355
- logout() {
2356
- return this.httpClient.post(this._serviceUri + '/logout', {}).pipe(finalize(() => {
2355
+ logout(forget = false) {
2356
+ return this.httpClient.post(this._serviceUri + '/logout/?forget=' + forget, {}).pipe(finalize(() => {
2357
2357
  this.removeKeepAlive();
2358
2358
  this.clear(true);
2359
2359
  // Clean up
@@ -3125,10 +3125,10 @@ class ClipperService {
3125
3125
  downloadArchiveFile(id, otp) {
3126
3126
  return this.httpClient.get(this._serviceUri + '/archive/files/download/?id=' + id + '&otp=' + (otp ?? ''), { responseType: 'blob' });
3127
3127
  }
3128
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ClipperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3129
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ClipperService, providedIn: 'root' }); }
3128
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ClipperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3129
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ClipperService, providedIn: 'root' }); }
3130
3130
  }
3131
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ClipperService, decorators: [{
3131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ClipperService, decorators: [{
3132
3132
  type: Injectable,
3133
3133
  args: [{
3134
3134
  providedIn: 'root',
@@ -3221,19 +3221,19 @@ class ClipperAuthInterceptor {
3221
3221
  }
3222
3222
  return request;
3223
3223
  }
3224
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ClipperAuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3225
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ClipperAuthInterceptor }); }
3224
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ClipperAuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3225
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ClipperAuthInterceptor }); }
3226
3226
  }
3227
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ClipperAuthInterceptor, decorators: [{
3227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ClipperAuthInterceptor, decorators: [{
3228
3228
  type: Injectable
3229
3229
  }] });
3230
3230
 
3231
3231
  class ArsClipperCommonModule {
3232
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ArsClipperCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3233
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: ArsClipperCommonModule }); }
3234
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ArsClipperCommonModule }); }
3232
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ArsClipperCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3233
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: ArsClipperCommonModule }); }
3234
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ArsClipperCommonModule }); }
3235
3235
  }
3236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ArsClipperCommonModule, decorators: [{
3236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ArsClipperCommonModule, decorators: [{
3237
3237
  type: NgModule
3238
3238
  }] });
3239
3239