@ts-core/angular 19.0.5 → 19.0.7
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.
|
@@ -3016,7 +3016,7 @@ function languageServiceFactory(cookie, options) {
|
|
|
3016
3016
|
}
|
|
3017
3017
|
const LANGUAGE_OPTIONS = new InjectionToken(`LANGUAGE_OPTIONS`);
|
|
3018
3018
|
|
|
3019
|
-
class Loginable extends
|
|
3019
|
+
class Loginable extends Loadable {
|
|
3020
3020
|
login;
|
|
3021
3021
|
// --------------------------------------------------------------------------
|
|
3022
3022
|
//
|
|
@@ -3039,8 +3039,8 @@ class Loginable extends Destroyable {
|
|
|
3039
3039
|
this.login.logined.pipe().subscribe(() => this.loginedHandler());
|
|
3040
3040
|
this.login.logouted.pipe().subscribe(() => this.logoutedHandler());
|
|
3041
3041
|
}
|
|
3042
|
-
loginedHandler() { }
|
|
3043
|
-
logoutedHandler() { }
|
|
3042
|
+
async loginedHandler() { }
|
|
3043
|
+
async logoutedHandler() { }
|
|
3044
3044
|
// --------------------------------------------------------------------------
|
|
3045
3045
|
//
|
|
3046
3046
|
// Public Methods
|
|
@@ -5984,33 +5984,23 @@ class UserServiceBase extends Loginable {
|
|
|
5984
5984
|
//
|
|
5985
5985
|
// --------------------------------------------------------------------------
|
|
5986
5986
|
_user;
|
|
5987
|
-
observer;
|
|
5988
|
-
// --------------------------------------------------------------------------
|
|
5989
|
-
//
|
|
5990
|
-
// Constructor
|
|
5991
|
-
//
|
|
5992
|
-
// --------------------------------------------------------------------------
|
|
5993
|
-
constructor(login) {
|
|
5994
|
-
super(login);
|
|
5995
|
-
this.observer = new Subject();
|
|
5996
|
-
}
|
|
5997
5987
|
// --------------------------------------------------------------------------
|
|
5998
5988
|
//
|
|
5999
5989
|
// Protected Methods
|
|
6000
5990
|
//
|
|
6001
5991
|
// --------------------------------------------------------------------------
|
|
6002
|
-
initializeUser(data) {
|
|
5992
|
+
async initializeUser(data) {
|
|
6003
5993
|
this._user = this.createUser(data);
|
|
6004
5994
|
}
|
|
6005
|
-
deinitializeUser() {
|
|
5995
|
+
async deinitializeUser() {
|
|
6006
5996
|
this._user = null;
|
|
6007
5997
|
}
|
|
6008
|
-
loginedHandler() {
|
|
6009
|
-
this.initializeUser(this.login.loginData);
|
|
5998
|
+
async loginedHandler() {
|
|
5999
|
+
await this.initializeUser(this.login.loginData);
|
|
6010
6000
|
this.observer.next(new ObservableData(UserServiceBaseEvent.LOGINED, this.user));
|
|
6011
6001
|
}
|
|
6012
|
-
logoutedHandler() {
|
|
6013
|
-
this.deinitializeUser();
|
|
6002
|
+
async logoutedHandler() {
|
|
6003
|
+
await this.deinitializeUser();
|
|
6014
6004
|
this.observer.next(new ObservableData(UserServiceBaseEvent.LOGOUTED));
|
|
6015
6005
|
}
|
|
6016
6006
|
// --------------------------------------------------------------------------
|
|
@@ -6062,9 +6052,6 @@ class UserServiceBase extends Loginable {
|
|
|
6062
6052
|
get isLogined() {
|
|
6063
6053
|
return this.has;
|
|
6064
6054
|
}
|
|
6065
|
-
get events() {
|
|
6066
|
-
return this.observer.asObservable();
|
|
6067
|
-
}
|
|
6068
6055
|
get logined() {
|
|
6069
6056
|
return this.events.pipe(filter(item => item.type === UserServiceBaseEvent.LOGINED), map(item => item.data));
|
|
6070
6057
|
}
|