ichec-angular-core 0.2.1 → 0.2.3

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.
package/package.json CHANGED
@@ -1,24 +1,20 @@
1
1
  {
2
2
  "name": "ichec-angular-core",
3
- "version": "0.2.1",
4
- "peerDependencies": {
5
- "@angular/common": "^20.1.1",
6
- "@angular/core": "^20.1.1"
7
- },
3
+ "version": "0.2.3",
8
4
  "exports": {
9
5
  "./styles/": "./styles",
10
6
  "./package.json": {
11
7
  "default": "./package.json"
12
8
  },
13
9
  ".": {
14
- "types": "./index.d.ts",
10
+ "types": "./types/ichec-angular-core.d.ts",
15
11
  "default": "./fesm2022/ichec-angular-core.mjs"
16
12
  }
17
13
  },
18
14
  "dependencies": {
19
- "tslib": "^2.3.0"
15
+ "tslib": "^2.8.1"
20
16
  },
21
17
  "sideEffects": false,
22
18
  "module": "fesm2022/ichec-angular-core.mjs",
23
- "typings": "index.d.ts"
19
+ "typings": "types/ichec-angular-core.d.ts"
24
20
  }
@@ -3,7 +3,8 @@ import * as rxjs from 'rxjs';
3
3
  import { Observable, BehaviorSubject } from 'rxjs';
4
4
  import { HttpClient, HttpErrorResponse } from '@angular/common/http';
5
5
  import * as _angular_core from '@angular/core';
6
- import { InjectionToken, OnInit, WritableSignal, AfterViewInit, TemplateRef } from '@angular/core';
6
+ import { InjectionToken, OnInit, AfterViewInit, TemplateRef } from '@angular/core';
7
+ import { CookieService } from 'ngx-cookie-service';
7
8
  import * as ichec_angular_core from 'ichec-angular-core';
8
9
  import { MatSidenavContent } from '@angular/material/sidenav';
9
10
  import { Location } from '@angular/common';
@@ -288,6 +289,7 @@ declare class RestService<D extends Identifiable, L extends Identifiable = D, C
288
289
  readonly _url: string;
289
290
  protected config: RestServiceConfig;
290
291
  protected _http: HttpClient;
292
+ protected cookieService: CookieService;
291
293
  deleteItem(id: number): Observable<void>;
292
294
  getForUser(user: IPortalMemberDetail, query?: IItemQuery): Observable<IPaginated<L>>;
293
295
  get(query?: IItemQuery): Observable<IPaginated<L>>;
@@ -302,6 +304,7 @@ declare class RestService<D extends Identifiable, L extends Identifiable = D, C
302
304
  putFileStandalone(url: string, file: File): Observable<void>;
303
305
  patchItem(item: U, include_keys: string[], exclude_keys: string[]): Observable<D>;
304
306
  postItem(item: C): Observable<D>;
307
+ getCsrfCookie(): string;
305
308
  private getHeaders;
306
309
  protected getBaseUrl(): string;
307
310
  private getMediaUrl;
@@ -326,7 +329,7 @@ declare class ResolvedPermission {
326
329
  }
327
330
  declare class UserService extends ItemService<IPortalMemberDetail, IPortalMemberList, IPortalMemberCreate> {
328
331
  /**
329
- Service to handle IPortalMember via REST and also handle logins.
332
+ Service to handle IPortalMember via REST and also handle logins.
330
333
  */
331
334
  loggedInUser: BehaviorSubject<IPortalMemberList | null>;
332
335
  private document;
@@ -334,15 +337,14 @@ declare class UserService extends ItemService<IPortalMemberDetail, IPortalMember
334
337
  typename: string;
335
338
  private permissions;
336
339
  get authType(): string;
337
- sessionLogin(): Observable<void>;
338
- onSessionLoginError(error: HttpErrorResponse): Observable<void>;
340
+ sessionLogin(next?: string): Observable<void>;
341
+ onSessionLoginError(error: HttpErrorResponse, next: string): Observable<void>;
339
342
  login(username: string, password: string): Observable<void>;
340
343
  hasAddPermission(feature: string): boolean;
341
344
  hasDeletePermission(feature: string): boolean;
342
345
  hasEditPermission(feature: string): boolean;
343
346
  hasViewPermission(feature: string): boolean;
344
347
  logout(): void;
345
- private onLoginCookie;
346
348
  private onLoginToken;
347
349
  private onLoggedIn;
348
350
  private parsePermission;
@@ -468,7 +470,7 @@ interface LoginUser {
468
470
  declare const LOGIN_USER: InjectionToken<LoginUser>;
469
471
  declare class LandingComponent implements OnInit {
470
472
  loginUser: LoginUser;
471
- loginError: WritableSignal<string>;
473
+ loginError: _angular_core.WritableSignal<string>;
472
474
  message: _angular_core.InputSignal<string | undefined>;
473
475
  private userService;
474
476
  private router;