@arsedizioni/ars-utils 20.0.40 → 20.1.2

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.
@@ -1538,7 +1538,7 @@ var ClipperExportDocumentsFormat;
1538
1538
  })(ClipperExportDocumentsFormat || (ClipperExportDocumentsFormat = {}));
1539
1539
  class ClipperDashboard {
1540
1540
  constructor() {
1541
- this.items = signal([]);
1541
+ this.items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : []));
1542
1542
  this.isTrial = false;
1543
1543
  this.unreadItems = computed(() => {
1544
1544
  const states = [];
@@ -1550,7 +1550,7 @@ class ClipperDashboard {
1550
1550
  states.push([ClipperModule.Approfondimenti, this.items().find((x) => x.id == ClipperModule.Approfondimenti)?.unreadItems ?? 0]);
1551
1551
  states.push([ClipperModule.QuesitiECasiRisolti, this.items().find((x) => x.id == ClipperModule.QuesitiECasiRisolti)?.unreadItems ?? 0]);
1552
1552
  return states;
1553
- });
1553
+ }, ...(ngDevMode ? [{ debugName: "unreadItems" }] : []));
1554
1554
  this.unreadItemsByModel = computed(() => {
1555
1555
  const states = [];
1556
1556
  this.items().forEach(item => {
@@ -1584,7 +1584,7 @@ class ClipperDashboard {
1584
1584
  }
1585
1585
  });
1586
1586
  return states;
1587
- });
1587
+ }, ...(ngDevMode ? [{ debugName: "unreadItemsByModel" }] : []));
1588
1588
  }
1589
1589
  /**
1590
1590
  * Update unread items
@@ -1995,29 +1995,29 @@ class ClipperService {
1995
1995
  this.keepAlive = 0;
1996
1996
  this._serviceUri = '';
1997
1997
  this._flags = ClipperServiceFlags.None;
1998
- this.loggedIn = signal(sessionStorage.getItem("clipper_oauth_token") !== null);
1999
- this.loggingIn = signal(false);
2000
- this.snapshot = signal(undefined);
2001
- this.supportsRS = signal(false);
2002
- this.shouldRefreshToken = signal(false);
2003
- this.referencesSnapshot = signal(undefined);
1998
+ this.loggedIn = signal(sessionStorage.getItem("clipper_oauth_token") !== null, ...(ngDevMode ? [{ debugName: "loggedIn" }] : []));
1999
+ this.loggingIn = signal(false, ...(ngDevMode ? [{ debugName: "loggingIn" }] : []));
2000
+ this.snapshot = signal(undefined, ...(ngDevMode ? [{ debugName: "snapshot" }] : []));
2001
+ this.supportsRS = signal(false, ...(ngDevMode ? [{ debugName: "supportsRS" }] : []));
2002
+ this.shouldRefreshToken = signal(false, ...(ngDevMode ? [{ debugName: "shouldRefreshToken" }] : []));
2003
+ this.referencesSnapshot = signal(undefined, ...(ngDevMode ? [{ debugName: "referencesSnapshot" }] : []));
2004
2004
  this.dashboard = new ClipperDashboard();
2005
- this.bag = signal([]);
2005
+ this.bag = signal([], ...(ngDevMode ? [{ debugName: "bag" }] : []));
2006
2006
  this.bagTotal = computed(() => {
2007
2007
  return this.bag().length;
2008
- });
2009
- this.visible = signal(false);
2008
+ }, ...(ngDevMode ? [{ debugName: "bagTotal" }] : []));
2009
+ this.visible = signal(false, ...(ngDevMode ? [{ debugName: "visible" }] : []));
2010
2010
  this._teams = [];
2011
- this.currentTeamId = signal(SystemUtils.emptyUUID());
2012
- this.currentTeamName = signal("PERSONALE");
2011
+ this.currentTeamId = signal(SystemUtils.emptyUUID(), ...(ngDevMode ? [{ debugName: "currentTeamId" }] : []));
2012
+ this.currentTeamName = signal("PERSONALE", ...(ngDevMode ? [{ debugName: "currentTeamName" }] : []));
2013
2013
  this.currentTeamIsPrivate = computed(() => {
2014
2014
  return this.currentTeamId() !== SystemUtils.emptyUUID();
2015
- });
2016
- this.availableChannels = signal([]);
2015
+ }, ...(ngDevMode ? [{ debugName: "currentTeamIsPrivate" }] : []));
2016
+ this.availableChannels = signal([], ...(ngDevMode ? [{ debugName: "availableChannels" }] : []));
2017
2017
  this.activeChannels = computed(() => {
2018
2018
  return this.availableChannels()?.filter(x => !x.disabled && x.active === true);
2019
- });
2020
- this.allowTags = signal(false);
2019
+ }, ...(ngDevMode ? [{ debugName: "activeChannels" }] : []));
2020
+ this.allowTags = signal(false, ...(ngDevMode ? [{ debugName: "allowTags" }] : []));
2021
2021
  }
2022
2022
  get appUri() {
2023
2023
  return this._appUri;
@@ -2316,6 +2316,8 @@ class ClipperService {
2316
2316
  return this.httpClient.post(this._serviceUri + '/logout', {}).pipe(finalize(() => {
2317
2317
  this.removeKeepAlive();
2318
2318
  this.clear(true);
2319
+ // Remove credentials
2320
+ localStorage.removeItem('clipper_login');
2319
2321
  }), catchError((_e) => {
2320
2322
  return of([]);
2321
2323
  }));
@@ -2345,7 +2347,6 @@ class ClipperService {
2345
2347
  if (clearOAuthToken) {
2346
2348
  sessionStorage.removeItem('clipper_oauth_token');
2347
2349
  }
2348
- localStorage.removeItem('clipper_login');
2349
2350
  // Reset login
2350
2351
  this.reset();
2351
2352
  }
@@ -3078,10 +3079,10 @@ class ClipperService {
3078
3079
  downloadArchiveFile(id, otp) {
3079
3080
  return this.httpClient.get(this._serviceUri + '/archive/files/download/?id=' + id + '&otp=' + (otp ?? ''), { responseType: 'blob' });
3080
3081
  }
3081
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ClipperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3082
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ClipperService, providedIn: 'root' }); }
3082
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ClipperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3083
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ClipperService, providedIn: 'root' }); }
3083
3084
  }
3084
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ClipperService, decorators: [{
3085
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ClipperService, decorators: [{
3085
3086
  type: Injectable,
3086
3087
  args: [{
3087
3088
  providedIn: 'root',
@@ -3174,19 +3175,19 @@ class ClipperAuthInterceptor {
3174
3175
  }
3175
3176
  return request;
3176
3177
  }
3177
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ClipperAuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3178
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ClipperAuthInterceptor }); }
3178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ClipperAuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3179
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ClipperAuthInterceptor }); }
3179
3180
  }
3180
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ClipperAuthInterceptor, decorators: [{
3181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ClipperAuthInterceptor, decorators: [{
3181
3182
  type: Injectable
3182
3183
  }] });
3183
3184
 
3184
3185
  class ArsClipperCommonModule {
3185
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ArsClipperCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3186
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.5", ngImport: i0, type: ArsClipperCommonModule }); }
3187
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ArsClipperCommonModule }); }
3186
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ArsClipperCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3187
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.0", ngImport: i0, type: ArsClipperCommonModule }); }
3188
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ArsClipperCommonModule }); }
3188
3189
  }
3189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ArsClipperCommonModule, decorators: [{
3190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.0", ngImport: i0, type: ArsClipperCommonModule, decorators: [{
3190
3191
  type: NgModule
3191
3192
  }] });
3192
3193