@corp-products/app-core 3.1.9 → 3.2.1

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.
@@ -980,5 +980,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
980
980
  * Generated bundle index. Do not edit.
981
981
  */
982
982
 
983
- export { APP_ERROR_HANDLER, APP_HTTP_CONFIG, AppDirection, AuthService, BaseHttpService, BasePaginationService, COMMON_BASE_URL, CORE_CONFIG, CookiesStorageKeys, DateFormatter, DetectDeviceService, DisplayTypesEnum, ErrorCode, ErrorHandlerService, GlobalHttpErrorInterceptor, GlobalLoaderComponent, HasPermissionsDirective, HttpBaseInterceptor, HttpContextHandler, HttpRequestOptionsKeys, IS_SYSTEM_LOADER, JwtDecoderService, Language, ListOfValues, LoaderService, LocalStorageKeys, PAGESIZE, PAGE_SIZE_OPTION, PermissionsActions, PermissionsService, REQUEST_MODIFIER, ResponsiveElementDirective, SessionStorageKeys, SortDirection, StorageService, TOASTER_SERVICE, USE_API_PREFIX, UserPermissionsEnum, authGuard, epmDefaultMapper, extractRequestOptions, mapResponse, permissionsGuard, resolveUrl };
983
+ export { APP_ERROR_HANDLER, APP_HTTP_CONFIG, AppDirection, AuthService, BaseHttpService, BasePaginationService, COMMON_BASE_URL, CORE_CONFIG, CookiesStorageKeys, DateFormatter, DetectDeviceService, DisplayTypesEnum, ErrorCode, ErrorHandlerService, GlobalHttpErrorInterceptor, GlobalLoaderComponent, HasPermissionsDirective, HttpBaseInterceptor, HttpContextHandler, HttpRequestOptionsKeys, IS_SYSTEM_LOADER, JwtDecoderService, Language, ListOfValues, LoaderService, LocalStorageKeys, PAGESIZE, PAGE_SIZE_OPTION, PermissionsActions, PermissionsService, REQUEST_MODIFIER, ResponsiveElementDirective, SessionStorageKeys, SortDirection, StorageHandler, StorageService, TOASTER_SERVICE, USE_API_PREFIX, UserPermissionsEnum, authGuard, epmDefaultMapper, extractRequestOptions, mapResponse, permissionsGuard, resolveUrl };
984
984
  //# sourceMappingURL=corp-products-app-core.mjs.map
package/index.d.ts CHANGED
@@ -7,6 +7,7 @@ import { Route, Params as Params$1, CanActivateFn } from '@angular/router';
7
7
  import * as _corp_products_app_core from '@corp-products/app-core';
8
8
  import { JwtPayload } from 'jwt-decode';
9
9
  import { TranslateService } from '@ngx-translate/core';
10
+ import { CookieService } from 'ngx-cookie-service';
10
11
 
11
12
  interface ListOptions {
12
13
  paginator?: number;
@@ -481,10 +482,33 @@ declare class HttpContextHandler {
481
482
  static useApiPrefix(hasBaseSegment: boolean): HttpContext;
482
483
  }
483
484
 
485
+ declare class StorageHandler {
486
+ private static cookieService;
487
+ static init(cookieService: CookieService): void;
488
+ static get cookies(): {
489
+ set: (key: CookiesStorageKeys, value: string, expires?: number) => void;
490
+ get: (key: CookiesStorageKeys) => string;
491
+ clear: (key: CookiesStorageKeys) => void;
492
+ };
493
+ static local: {
494
+ set: (key: LocalStorageKeys, value: unknown) => void;
495
+ get: <T>(key: LocalStorageKeys) => T | null;
496
+ clear: () => void;
497
+ };
498
+ static session: {
499
+ set: (key: SessionStorageKeys, value: unknown) => void;
500
+ get: <T>(key: SessionStorageKeys) => T | null;
501
+ clear: () => void;
502
+ };
503
+ private static setItem;
504
+ private static getItem;
505
+ private static clearStorage;
506
+ }
507
+
484
508
  type RequestModifier = (req: HttpRequest<any>) => HttpRequest<any>;
485
509
  declare const REQUEST_MODIFIER: InjectionToken<RequestModifier>;
486
510
 
487
511
  declare const APP_ERROR_HANDLER: InjectionToken<(error: any) => void>;
488
512
 
489
- export { APP_ERROR_HANDLER, APP_HTTP_CONFIG, AppDirection, AuthService, BaseHttpService, BasePaginationService, COMMON_BASE_URL, CORE_CONFIG, CookiesStorageKeys, DateFormatter, DetectDeviceService, DisplayTypesEnum, ErrorCode, ErrorHandlerService, GlobalHttpErrorInterceptor, GlobalLoaderComponent, HasPermissionsDirective, HttpBaseInterceptor, HttpContextHandler, HttpRequestOptionsKeys, IS_SYSTEM_LOADER, JwtDecoderService, Language, ListOfValues, LoaderService, LocalStorageKeys, PAGESIZE, PAGE_SIZE_OPTION, PermissionsActions, PermissionsService, REQUEST_MODIFIER, ResponsiveElementDirective, SessionStorageKeys, SortDirection, StorageService, TOASTER_SERVICE, USE_API_PREFIX, UserPermissionsEnum, authGuard, epmDefaultMapper, extractRequestOptions, mapResponse, permissionsGuard, resolveUrl };
513
+ export { APP_ERROR_HANDLER, APP_HTTP_CONFIG, AppDirection, AuthService, BaseHttpService, BasePaginationService, COMMON_BASE_URL, CORE_CONFIG, CookiesStorageKeys, DateFormatter, DetectDeviceService, DisplayTypesEnum, ErrorCode, ErrorHandlerService, GlobalHttpErrorInterceptor, GlobalLoaderComponent, HasPermissionsDirective, HttpBaseInterceptor, HttpContextHandler, HttpRequestOptionsKeys, IS_SYSTEM_LOADER, JwtDecoderService, Language, ListOfValues, LoaderService, LocalStorageKeys, PAGESIZE, PAGE_SIZE_OPTION, PermissionsActions, PermissionsService, REQUEST_MODIFIER, ResponsiveElementDirective, SessionStorageKeys, SortDirection, StorageHandler, StorageService, TOASTER_SERVICE, USE_API_PREFIX, UserPermissionsEnum, authGuard, epmDefaultMapper, extractRequestOptions, mapResponse, permissionsGuard, resolveUrl };
490
514
  export type { AppRoute, BaseHttpResponse, CoreConfig, HttpConfig, HttpMethod, HttpOptions, HttpRequestOptions, ListOptions, ListResponse, LoaderState, Params, RequestModifier, RouteData, RoutePermissionsInfo, ServiceConfig, StorageEnum, ToasterInterface, ToasterOptions, UserInfo };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corp-products/app-core",
3
- "version": "3.1.9",
3
+ "version": "3.2.1",
4
4
  "author": "shireen Omar",
5
5
  "description": "shared core services across our apps",
6
6
  "peerDependencies": {