mesauth-angular 0.1.3 → 0.1.4

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.
@@ -72,7 +72,6 @@ export interface RealTimeNotificationDto {
72
72
  sourceAppIconUrl?: string;
73
73
  }
74
74
  export declare class MesAuthService {
75
- private http;
76
75
  private hubConnection;
77
76
  private _currentUser;
78
77
  currentUser$: Observable<IUser | null>;
@@ -80,7 +79,7 @@ export declare class MesAuthService {
80
79
  notifications$: Observable<any>;
81
80
  private apiBase;
82
81
  private config;
83
- constructor(http: HttpClient);
82
+ readonly http: HttpClient;
84
83
  init(config: MesAuthConfig): void;
85
84
  getConfig(): MesAuthConfig | null;
86
85
  private fetchCurrentUser;
@@ -4,10 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { Injectable } from '@angular/core';
7
+ import { inject, Injectable } from '@angular/core';
11
8
  import { HttpClient } from '@angular/common/http';
12
9
  import { HubConnectionBuilder, LogLevel } from '@microsoft/signalr';
13
10
  import { BehaviorSubject, Subject } from 'rxjs';
@@ -19,8 +16,7 @@ export var NotificationType;
19
16
  NotificationType["Success"] = "Success";
20
17
  })(NotificationType || (NotificationType = {}));
21
18
  let MesAuthService = class MesAuthService {
22
- constructor(http) {
23
- this.http = http;
19
+ constructor() {
24
20
  this.hubConnection = null;
25
21
  this._currentUser = new BehaviorSubject(null);
26
22
  this.currentUser$ = this._currentUser.asObservable();
@@ -28,6 +24,8 @@ let MesAuthService = class MesAuthService {
28
24
  this.notifications$ = this._notifications.asObservable();
29
25
  this.apiBase = '';
30
26
  this.config = null;
27
+ //constructor(private http: HttpClient) {}
28
+ this.http = inject(HttpClient);
31
29
  }
32
30
  init(config) {
33
31
  this.config = config;
@@ -105,7 +103,6 @@ let MesAuthService = class MesAuthService {
105
103
  }
106
104
  };
107
105
  MesAuthService = __decorate([
108
- Injectable(),
109
- __metadata("design:paramtypes", [HttpClient])
106
+ Injectable()
110
107
  ], MesAuthService);
111
108
  export { MesAuthService };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mesauth-angular",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Angular-friendly SignalR notifier + API helper for current user and notifications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",