@osovitny/anatoly 2.15.8 → 2.15.9

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.
@@ -1,16 +1,17 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { BaseApiService } from '../../data/base/base-api.service';
3
- import { SessionStorageService } from './web-storage.service';
3
+ import { LocalStorageService, SessionStorageService } from './web-storage.service';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class AppContextService extends BaseApiService {
6
6
  protected http: HttpClient;
7
+ protected localStorage: LocalStorageService;
7
8
  protected sessionStorage: SessionStorageService;
8
9
  private storageKeyName;
9
10
  private subscription;
10
11
  private successes;
11
12
  private _updated;
12
13
  readonly updated$: import("rxjs").Observable<any>;
13
- constructor(http: HttpClient, sessionStorage: SessionStorageService);
14
+ constructor(http: HttpClient, localStorage: LocalStorageService, sessionStorage: SessionStorageService);
14
15
  private getCurrentFromSession;
15
16
  private setCurrentFromSession;
16
17
  private updateCurrentIfExpired;
@@ -20,6 +21,9 @@ export declare class AppContextService extends BaseApiService {
20
21
  getCurrent(success?: Function): void;
21
22
  updateCurrent(success?: Function): void;
22
23
  clearCurrent(): void;
24
+ clearLocalStorage(): void;
25
+ clearSessionStorage(): void;
26
+ clearStorage(): void;
23
27
  get current(): any;
24
28
  set current(value: any);
25
29
  static ɵfac: i0.ɵɵFactoryDeclaration<AppContextService, never>;
@@ -1,12 +1,13 @@
1
1
  import * as i0 from "@angular/core";
2
2
  declare class WebStorageService {
3
- storage: any;
3
+ storage: Storage;
4
4
  constructor(storage: string);
5
5
  setItem(key: any, value: any): void;
6
6
  setObject(key: any, value: any): void;
7
- getItem(key: any): any;
7
+ getItem(key: any): string;
8
8
  getObject(key: any): any;
9
9
  remove(key: any): void;
10
+ clear(): void;
10
11
  }
11
12
  export declare class LocalStorageService extends WebStorageService {
12
13
  constructor();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osovitny/anatoly",
3
- "version": "2.15.8",
3
+ "version": "2.15.9",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "15.1.1",
6
6
  "@angular/core": "15.1.1"