@abp/ng.account.core 4.4.3 → 5.0.0-beta.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/abp-ng.account.core.d.ts +1 -0
- package/bundles/abp-ng.account.core-proxy.umd.js +172 -0
- package/bundles/abp-ng.account.core-proxy.umd.js.map +1 -0
- package/bundles/abp-ng.account.core.umd.js +39 -25
- package/bundles/abp-ng.account.core.umd.js.map +1 -1
- package/esm2015/abp-ng.account.core.js +1 -1
- package/esm2015/abp-ng.account.core.js.map +1 -0
- package/esm2015/lib/auth-wrapper.service.js +8 -9
- package/esm2015/lib/auth-wrapper.service.js.map +1 -0
- package/esm2015/lib/tenant-box.service.js +13 -16
- package/esm2015/lib/tenant-box.service.js.map +1 -0
- package/esm2015/proxy/abp-ng.account.core-proxy.js +5 -0
- package/esm2015/proxy/abp-ng.account.core-proxy.js.map +1 -0
- package/esm2015/proxy/lib/index.js +3 -0
- package/esm2015/proxy/lib/index.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/account.service.js +34 -0
- package/esm2015/proxy/lib/proxy/account/account.service.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/index.js +6 -0
- package/esm2015/proxy/lib/proxy/account/index.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/models.js +2 -0
- package/esm2015/proxy/lib/proxy/account/models.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/profile.service.js +33 -0
- package/esm2015/proxy/lib/proxy/account/profile.service.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/controllers/account.service.js +33 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/controllers/account.service.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/controllers/index.js +4 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/controllers/index.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/controllers/models/index.js +3 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/controllers/models/index.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.js +11 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/controllers/models/models.js +2 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/controllers/models/models.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/index.js +3 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/account/index.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/index.js +3 -0
- package/esm2015/proxy/lib/proxy/account/web/areas/index.js.map +1 -0
- package/esm2015/proxy/lib/proxy/account/web/index.js +3 -0
- package/esm2015/proxy/lib/proxy/account/web/index.js.map +1 -0
- package/esm2015/proxy/lib/proxy/identity/index.js +2 -0
- package/esm2015/proxy/lib/proxy/identity/index.js.map +1 -0
- package/esm2015/proxy/lib/proxy/identity/models.js +2 -0
- package/esm2015/proxy/lib/proxy/identity/models.js.map +1 -0
- package/esm2015/proxy/public-api.js +2 -0
- package/esm2015/proxy/public-api.js.map +1 -0
- package/esm2015/public-api.js +1 -1
- package/esm2015/public-api.js.map +1 -0
- package/fesm2015/abp-ng.account.core-proxy.js +136 -0
- package/fesm2015/abp-ng.account.core-proxy.js.map +1 -0
- package/fesm2015/abp-ng.account.core.js +16 -24
- package/fesm2015/abp-ng.account.core.js.map +1 -1
- package/lib/auth-wrapper.service.d.ts +3 -0
- package/lib/tenant-box.service.d.ts +5 -3
- package/package.json +5 -6
- package/proxy/abp-ng.account.core-proxy.d.ts +5 -0
- package/proxy/lib/index.d.ts +2 -0
- package/proxy/lib/proxy/account/account.service.d.ts +14 -0
- package/proxy/lib/proxy/account/index.d.ts +5 -0
- package/proxy/lib/proxy/account/models.d.ts +40 -0
- package/proxy/lib/proxy/account/profile.service.d.ts +13 -0
- package/proxy/lib/proxy/account/web/areas/account/controllers/account.service.d.ts +13 -0
- package/proxy/lib/proxy/account/web/areas/account/controllers/index.d.ts +3 -0
- package/proxy/lib/proxy/account/web/areas/account/controllers/models/index.d.ts +2 -0
- package/proxy/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.d.ts +8 -0
- package/proxy/lib/proxy/account/web/areas/account/controllers/models/models.d.ts +10 -0
- package/proxy/lib/proxy/account/web/areas/account/index.d.ts +2 -0
- package/proxy/lib/proxy/account/web/areas/index.d.ts +2 -0
- package/proxy/lib/proxy/account/web/index.d.ts +2 -0
- package/proxy/lib/proxy/identity/index.d.ts +1 -0
- package/proxy/lib/proxy/identity/models.d.ts +15 -0
- package/proxy/package.json +10 -0
- package/proxy/public-api.d.ts +1 -0
- package/abp-ng.account.core.metadata.json +0 -1
- package/bundles/abp-ng.account.core.umd.min.js +0 -2
- package/bundles/abp-ng.account.core.umd.min.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/account-core/proxy/src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './proxy/account';\nexport * from './proxy/identity';\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { RestService } from '@abp/ng.core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@abp/ng.core";
|
|
5
|
+
export class AccountService {
|
|
6
|
+
constructor(restService) {
|
|
7
|
+
this.restService = restService;
|
|
8
|
+
this.apiName = 'AbpAccount';
|
|
9
|
+
this.register = (input) => this.restService.request({
|
|
10
|
+
method: 'POST',
|
|
11
|
+
url: '/api/account/register',
|
|
12
|
+
body: input,
|
|
13
|
+
}, { apiName: this.apiName });
|
|
14
|
+
this.resetPassword = (input) => this.restService.request({
|
|
15
|
+
method: 'POST',
|
|
16
|
+
url: '/api/account/reset-password',
|
|
17
|
+
body: input,
|
|
18
|
+
}, { apiName: this.apiName });
|
|
19
|
+
this.sendPasswordResetCode = (input) => this.restService.request({
|
|
20
|
+
method: 'POST',
|
|
21
|
+
url: '/api/account/send-password-reset-code',
|
|
22
|
+
body: input,
|
|
23
|
+
}, { apiName: this.apiName });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
AccountService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
27
|
+
AccountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService, providedIn: 'root' });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService, decorators: [{
|
|
29
|
+
type: Injectable,
|
|
30
|
+
args: [{
|
|
31
|
+
providedIn: 'root',
|
|
32
|
+
}]
|
|
33
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
34
|
+
//# sourceMappingURL=account.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.service.js","sourceRoot":"","sources":["../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/account.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;;AAM3C,MAAM,OAAO,cAAc;IA2BzB,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;QA1B5C,YAAO,GAAG,YAAY,CAAC;QAEvB,aAAQ,GAAG,CAAC,KAAkB,EAAE,EAAE,CAChC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAuB;YAC7C,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,uBAAuB;YAC5B,IAAI,EAAE,KAAK;SACZ,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAE7B,kBAAa,GAAG,CAAC,KAAuB,EAAE,EAAE,CAC1C,IAAI,CAAC,WAAW,CAAC,OAAO,CAAY;YAClC,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,6BAA6B;YAClC,IAAI,EAAE,KAAK;SACZ,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAE7B,0BAAqB,GAAG,CAAC,KAA+B,EAAE,EAAE,CAC1D,IAAI,CAAC,WAAW,CAAC,OAAO,CAAY;YAClC,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,uCAAuC;YAC5C,IAAI,EAAE,KAAK;SACZ,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAEkB,CAAC;;2GA3BrC,cAAc;+GAAd,cAAc,cAFb,MAAM;2FAEP,cAAc;kBAH1B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import type { RegisterDto, ResetPasswordDto, SendPasswordResetCodeDto } from './models';\nimport { RestService } from '@abp/ng.core';\nimport { Injectable } from '@angular/core';\nimport type { IdentityUserDto } from '../identity/models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AccountService {\n apiName = 'AbpAccount';\n\n register = (input: RegisterDto) =>\n this.restService.request<any, IdentityUserDto>({\n method: 'POST',\n url: '/api/account/register',\n body: input,\n },\n { apiName: this.apiName });\n\n resetPassword = (input: ResetPasswordDto) =>\n this.restService.request<any, void>({\n method: 'POST',\n url: '/api/account/reset-password',\n body: input,\n },\n { apiName: this.apiName });\n\n sendPasswordResetCode = (input: SendPasswordResetCodeDto) =>\n this.restService.request<any, void>({\n method: 'POST',\n url: '/api/account/send-password-reset-code',\n body: input,\n },\n { apiName: this.apiName });\n\n constructor(private restService: RestService) {}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,CAAC","sourcesContent":["import * as Web from './web';\nexport * from './account.service';\nexport * from './models';\nexport * from './profile.service';\nexport { Web };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/models.ts"],"names":[],"mappings":"","sourcesContent":["import type { ExtensibleObject } from '@abp/ng.core';\n\nexport interface ChangePasswordInput {\n currentPassword?: string;\n newPassword: string;\n}\n\nexport interface ProfileDto extends ExtensibleObject {\n userName?: string;\n email?: string;\n name?: string;\n surname?: string;\n phoneNumber?: string;\n isExternal: boolean;\n hasPassword: boolean;\n concurrencyStamp?: string;\n}\n\nexport interface RegisterDto extends ExtensibleObject {\n userName: string;\n emailAddress: string;\n password: string;\n appName: string;\n}\n\nexport interface ResetPasswordDto {\n userId?: string;\n resetToken: string;\n password: string;\n}\n\nexport interface SendPasswordResetCodeDto {\n email: string;\n appName: string;\n returnUrl?: string;\n returnUrlHash?: string;\n}\n\nexport interface UpdateProfileDto extends ExtensibleObject {\n userName?: string;\n email?: string;\n name?: string;\n surname?: string;\n phoneNumber?: string;\n concurrencyStamp?: string;\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { RestService } from '@abp/ng.core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@abp/ng.core";
|
|
5
|
+
export class ProfileService {
|
|
6
|
+
constructor(restService) {
|
|
7
|
+
this.restService = restService;
|
|
8
|
+
this.apiName = 'AbpAccount';
|
|
9
|
+
this.changePassword = (input) => this.restService.request({
|
|
10
|
+
method: 'POST',
|
|
11
|
+
url: '/api/account/my-profile/change-password',
|
|
12
|
+
body: input,
|
|
13
|
+
}, { apiName: this.apiName });
|
|
14
|
+
this.get = () => this.restService.request({
|
|
15
|
+
method: 'GET',
|
|
16
|
+
url: '/api/account/my-profile',
|
|
17
|
+
}, { apiName: this.apiName });
|
|
18
|
+
this.update = (input) => this.restService.request({
|
|
19
|
+
method: 'PUT',
|
|
20
|
+
url: '/api/account/my-profile',
|
|
21
|
+
body: input,
|
|
22
|
+
}, { apiName: this.apiName });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
ProfileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ProfileService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
26
|
+
ProfileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ProfileService, providedIn: 'root' });
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ProfileService, decorators: [{
|
|
28
|
+
type: Injectable,
|
|
29
|
+
args: [{
|
|
30
|
+
providedIn: 'root',
|
|
31
|
+
}]
|
|
32
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
33
|
+
//# sourceMappingURL=profile.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.service.js","sourceRoot":"","sources":["../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/profile.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;;AAK3C,MAAM,OAAO,cAAc;IA0BzB,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;QAzB5C,YAAO,GAAG,YAAY,CAAC;QAEvB,mBAAc,GAAG,CAAC,KAA0B,EAAE,EAAE,CAC9C,IAAI,CAAC,WAAW,CAAC,OAAO,CAAY;YAClC,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,yCAAyC;YAC9C,IAAI,EAAE,KAAK;SACZ,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAE7B,QAAG,GAAG,GAAG,EAAE,CACT,IAAI,CAAC,WAAW,CAAC,OAAO,CAAkB;YACxC,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,yBAAyB;SAC/B,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAE7B,WAAM,GAAG,CAAC,KAAuB,EAAE,EAAE,CACnC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAkB;YACxC,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,yBAAyB;YAC9B,IAAI,EAAE,KAAK;SACZ,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAEkB,CAAC;;2GA1BrC,cAAc;+GAAd,cAAc,cAFb,MAAM;2FAEP,cAAc;kBAH1B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import type { ChangePasswordInput, ProfileDto, UpdateProfileDto } from './models';\nimport { RestService } from '@abp/ng.core';\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ProfileService {\n apiName = 'AbpAccount';\n\n changePassword = (input: ChangePasswordInput) =>\n this.restService.request<any, void>({\n method: 'POST',\n url: '/api/account/my-profile/change-password',\n body: input,\n },\n { apiName: this.apiName });\n\n get = () =>\n this.restService.request<any, ProfileDto>({\n method: 'GET',\n url: '/api/account/my-profile',\n },\n { apiName: this.apiName });\n\n update = (input: UpdateProfileDto) =>\n this.restService.request<any, ProfileDto>({\n method: 'PUT',\n url: '/api/account/my-profile',\n body: input,\n },\n { apiName: this.apiName });\n\n constructor(private restService: RestService) {}\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { RestService } from '@abp/ng.core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@abp/ng.core";
|
|
5
|
+
export class AccountService {
|
|
6
|
+
constructor(restService) {
|
|
7
|
+
this.restService = restService;
|
|
8
|
+
this.apiName = 'AbpAccount';
|
|
9
|
+
this.checkPasswordByLogin = (login) => this.restService.request({
|
|
10
|
+
method: 'POST',
|
|
11
|
+
url: '/api/account/check-password',
|
|
12
|
+
body: login,
|
|
13
|
+
}, { apiName: this.apiName });
|
|
14
|
+
this.loginByLogin = (login) => this.restService.request({
|
|
15
|
+
method: 'POST',
|
|
16
|
+
url: '/api/account/login',
|
|
17
|
+
body: login,
|
|
18
|
+
}, { apiName: this.apiName });
|
|
19
|
+
this.logout = () => this.restService.request({
|
|
20
|
+
method: 'GET',
|
|
21
|
+
url: '/api/account/logout',
|
|
22
|
+
}, { apiName: this.apiName });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
AccountService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
26
|
+
AccountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService, providedIn: 'root' });
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService, decorators: [{
|
|
28
|
+
type: Injectable,
|
|
29
|
+
args: [{
|
|
30
|
+
providedIn: 'root',
|
|
31
|
+
}]
|
|
32
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
33
|
+
//# sourceMappingURL=account.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.service.js","sourceRoot":"","sources":["../../../../../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/account.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;;AAK3C,MAAM,OAAO,cAAc;IA0BzB,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;QAzB5C,YAAO,GAAG,YAAY,CAAC;QAEvB,yBAAoB,GAAG,CAAC,KAAoB,EAAE,EAAE,CAC9C,IAAI,CAAC,WAAW,CAAC,OAAO,CAAsB;YAC5C,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,6BAA6B;YAClC,IAAI,EAAE,KAAK;SACZ,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAE7B,iBAAY,GAAG,CAAC,KAAoB,EAAE,EAAE,CACtC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAsB;YAC5C,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,oBAAoB;YACzB,IAAI,EAAE,KAAK;SACZ,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAE7B,WAAM,GAAG,GAAG,EAAE,CACZ,IAAI,CAAC,WAAW,CAAC,OAAO,CAAY;YAClC,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,qBAAqB;SAC3B,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAEkB,CAAC;;2GA1BrC,cAAc;+GAAd,cAAc,cAFb,MAAM;2FAEP,cAAc;kBAH1B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import type { AbpLoginResult, UserLoginInfo } from './models/models';\nimport { RestService } from '@abp/ng.core';\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AccountService {\n apiName = 'AbpAccount';\n\n checkPasswordByLogin = (login: UserLoginInfo) =>\n this.restService.request<any, AbpLoginResult>({\n method: 'POST',\n url: '/api/account/check-password',\n body: login,\n },\n { apiName: this.apiName });\n\n loginByLogin = (login: UserLoginInfo) =>\n this.restService.request<any, AbpLoginResult>({\n method: 'POST',\n url: '/api/account/login',\n body: login,\n },\n { apiName: this.apiName });\n\n logout = () =>\n this.restService.request<any, void>({\n method: 'GET',\n url: '/api/account/logout',\n },\n { apiName: this.apiName });\n\n constructor(private restService: RestService) {}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["import * as Models from './models';\nexport * from './account.service';\nexport { Models };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,UAAU,CAAC","sourcesContent":["export * from './login-result-type.enum';\nexport * from './models';\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { mapEnumToOptions } from '@abp/ng.core';
|
|
2
|
+
export var LoginResultType;
|
|
3
|
+
(function (LoginResultType) {
|
|
4
|
+
LoginResultType[LoginResultType["Success"] = 1] = "Success";
|
|
5
|
+
LoginResultType[LoginResultType["InvalidUserNameOrPassword"] = 2] = "InvalidUserNameOrPassword";
|
|
6
|
+
LoginResultType[LoginResultType["NotAllowed"] = 3] = "NotAllowed";
|
|
7
|
+
LoginResultType[LoginResultType["LockedOut"] = 4] = "LockedOut";
|
|
8
|
+
LoginResultType[LoginResultType["RequiresTwoFactor"] = 5] = "RequiresTwoFactor";
|
|
9
|
+
})(LoginResultType || (LoginResultType = {}));
|
|
10
|
+
export const loginResultTypeOptions = mapEnumToOptions(LoginResultType);
|
|
11
|
+
//# sourceMappingURL=login-result-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login-result-type.enum.js","sourceRoot":"","sources":["../../../../../../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,2DAAW,CAAA;IACX,+FAA6B,CAAA;IAC7B,iEAAc,CAAA;IACd,+DAAa,CAAA;IACb,+EAAqB,CAAA;AACvB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["import { mapEnumToOptions } from '@abp/ng.core';\n\nexport enum LoginResultType {\n Success = 1,\n InvalidUserNameOrPassword = 2,\n NotAllowed = 3,\n LockedOut = 4,\n RequiresTwoFactor = 5,\n}\n\nexport const loginResultTypeOptions = mapEnumToOptions(LoginResultType);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../../../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/models.ts"],"names":[],"mappings":"","sourcesContent":["import type { LoginResultType } from './login-result-type.enum';\n\nexport interface AbpLoginResult {\n result: LoginResultType;\n description?: string;\n}\n\nexport interface UserLoginInfo {\n userNameOrEmailAddress: string;\n password: string;\n rememberMe: boolean;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/web/areas/account/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import * as Controllers from './controllers';\nexport { Controllers };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/web/areas/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import * as Account from './account';\nexport { Account };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/account-core/proxy/src/lib/proxy/account/web/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,CAAC","sourcesContent":["import * as Areas from './areas';\nexport { Areas };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/account-core/proxy/src/lib/proxy/identity/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC","sourcesContent":["export * from './models';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../../../../../packages/account-core/proxy/src/lib/proxy/identity/models.ts"],"names":[],"mappings":"","sourcesContent":["import type { ExtensibleFullAuditedEntityDto } from '@abp/ng.core';\n\nexport interface IdentityUserDto extends ExtensibleFullAuditedEntityDto<string> {\n tenantId?: string;\n userName?: string;\n name?: string;\n surname?: string;\n email?: string;\n emailConfirmed: boolean;\n phoneNumber?: string;\n phoneNumberConfirmed: boolean;\n isActive: boolean;\n lockoutEnabled: boolean;\n lockoutEnd?: string;\n concurrencyStamp?: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../../../../../packages/account-core/proxy/src/public-api.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC","sourcesContent":["export * from './lib/index';\n"]}
|
package/esm2015/public-api.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export * from './lib/auth-wrapper.service';
|
|
5
5
|
export * from './lib/tenant-box.service';
|
|
6
|
-
//# sourceMappingURL=
|
|
6
|
+
//# sourceMappingURL=public-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../../../../packages/account-core/src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC","sourcesContent":["/*\n * Public API Surface of account-core\n */\n\nexport * from './lib/auth-wrapper.service';\nexport * from './lib/tenant-box.service';\n"]}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as i1 from '@abp/ng.core';
|
|
2
|
+
import { mapEnumToOptions } from '@abp/ng.core';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Injectable } from '@angular/core';
|
|
5
|
+
|
|
6
|
+
var LoginResultType;
|
|
7
|
+
(function (LoginResultType) {
|
|
8
|
+
LoginResultType[LoginResultType["Success"] = 1] = "Success";
|
|
9
|
+
LoginResultType[LoginResultType["InvalidUserNameOrPassword"] = 2] = "InvalidUserNameOrPassword";
|
|
10
|
+
LoginResultType[LoginResultType["NotAllowed"] = 3] = "NotAllowed";
|
|
11
|
+
LoginResultType[LoginResultType["LockedOut"] = 4] = "LockedOut";
|
|
12
|
+
LoginResultType[LoginResultType["RequiresTwoFactor"] = 5] = "RequiresTwoFactor";
|
|
13
|
+
})(LoginResultType || (LoginResultType = {}));
|
|
14
|
+
const loginResultTypeOptions = mapEnumToOptions(LoginResultType);
|
|
15
|
+
|
|
16
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
17
|
+
__proto__: null,
|
|
18
|
+
get LoginResultType () { return LoginResultType; },
|
|
19
|
+
loginResultTypeOptions: loginResultTypeOptions
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
class AccountService$1 {
|
|
23
|
+
constructor(restService) {
|
|
24
|
+
this.restService = restService;
|
|
25
|
+
this.apiName = 'AbpAccount';
|
|
26
|
+
this.checkPasswordByLogin = (login) => this.restService.request({
|
|
27
|
+
method: 'POST',
|
|
28
|
+
url: '/api/account/check-password',
|
|
29
|
+
body: login,
|
|
30
|
+
}, { apiName: this.apiName });
|
|
31
|
+
this.loginByLogin = (login) => this.restService.request({
|
|
32
|
+
method: 'POST',
|
|
33
|
+
url: '/api/account/login',
|
|
34
|
+
body: login,
|
|
35
|
+
}, { apiName: this.apiName });
|
|
36
|
+
this.logout = () => this.restService.request({
|
|
37
|
+
method: 'GET',
|
|
38
|
+
url: '/api/account/logout',
|
|
39
|
+
}, { apiName: this.apiName });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
AccountService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService$1, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
43
|
+
AccountService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService$1, providedIn: 'root' });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService$1, decorators: [{
|
|
45
|
+
type: Injectable,
|
|
46
|
+
args: [{
|
|
47
|
+
providedIn: 'root',
|
|
48
|
+
}]
|
|
49
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
50
|
+
|
|
51
|
+
var index$3 = /*#__PURE__*/Object.freeze({
|
|
52
|
+
__proto__: null,
|
|
53
|
+
Models: index$4,
|
|
54
|
+
AccountService: AccountService$1
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var index$2 = /*#__PURE__*/Object.freeze({
|
|
58
|
+
__proto__: null,
|
|
59
|
+
Controllers: index$3
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
var index$1 = /*#__PURE__*/Object.freeze({
|
|
63
|
+
__proto__: null,
|
|
64
|
+
Account: index$2
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
68
|
+
__proto__: null,
|
|
69
|
+
Areas: index$1
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
class AccountService {
|
|
73
|
+
constructor(restService) {
|
|
74
|
+
this.restService = restService;
|
|
75
|
+
this.apiName = 'AbpAccount';
|
|
76
|
+
this.register = (input) => this.restService.request({
|
|
77
|
+
method: 'POST',
|
|
78
|
+
url: '/api/account/register',
|
|
79
|
+
body: input,
|
|
80
|
+
}, { apiName: this.apiName });
|
|
81
|
+
this.resetPassword = (input) => this.restService.request({
|
|
82
|
+
method: 'POST',
|
|
83
|
+
url: '/api/account/reset-password',
|
|
84
|
+
body: input,
|
|
85
|
+
}, { apiName: this.apiName });
|
|
86
|
+
this.sendPasswordResetCode = (input) => this.restService.request({
|
|
87
|
+
method: 'POST',
|
|
88
|
+
url: '/api/account/send-password-reset-code',
|
|
89
|
+
body: input,
|
|
90
|
+
}, { apiName: this.apiName });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
AccountService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
94
|
+
AccountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService, providedIn: 'root' });
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AccountService, decorators: [{
|
|
96
|
+
type: Injectable,
|
|
97
|
+
args: [{
|
|
98
|
+
providedIn: 'root',
|
|
99
|
+
}]
|
|
100
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
101
|
+
|
|
102
|
+
class ProfileService {
|
|
103
|
+
constructor(restService) {
|
|
104
|
+
this.restService = restService;
|
|
105
|
+
this.apiName = 'AbpAccount';
|
|
106
|
+
this.changePassword = (input) => this.restService.request({
|
|
107
|
+
method: 'POST',
|
|
108
|
+
url: '/api/account/my-profile/change-password',
|
|
109
|
+
body: input,
|
|
110
|
+
}, { apiName: this.apiName });
|
|
111
|
+
this.get = () => this.restService.request({
|
|
112
|
+
method: 'GET',
|
|
113
|
+
url: '/api/account/my-profile',
|
|
114
|
+
}, { apiName: this.apiName });
|
|
115
|
+
this.update = (input) => this.restService.request({
|
|
116
|
+
method: 'PUT',
|
|
117
|
+
url: '/api/account/my-profile',
|
|
118
|
+
body: input,
|
|
119
|
+
}, { apiName: this.apiName });
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
ProfileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ProfileService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
123
|
+
ProfileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ProfileService, providedIn: 'root' });
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: ProfileService, decorators: [{
|
|
125
|
+
type: Injectable,
|
|
126
|
+
args: [{
|
|
127
|
+
providedIn: 'root',
|
|
128
|
+
}]
|
|
129
|
+
}], ctorParameters: function () { return [{ type: i1.RestService }]; } });
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Generated bundle index. Do not edit.
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
export { AccountService, ProfileService, index as Web };
|
|
136
|
+
//# sourceMappingURL=abp-ng.account.core-proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abp-ng.account.core-proxy.js","sources":["../../../../packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.ts","../../../../packages/account-core/proxy/src/lib/proxy/account/web/areas/account/controllers/account.service.ts","../../../../packages/account-core/proxy/src/lib/proxy/account/account.service.ts","../../../../packages/account-core/proxy/src/lib/proxy/account/profile.service.ts","../../../../packages/account-core/proxy/src/abp-ng.account.core-proxy.ts"],"sourcesContent":["import { mapEnumToOptions } from '@abp/ng.core';\n\nexport enum LoginResultType {\n Success = 1,\n InvalidUserNameOrPassword = 2,\n NotAllowed = 3,\n LockedOut = 4,\n RequiresTwoFactor = 5,\n}\n\nexport const loginResultTypeOptions = mapEnumToOptions(LoginResultType);\n","import type { AbpLoginResult, UserLoginInfo } from './models/models';\nimport { RestService } from '@abp/ng.core';\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AccountService {\n apiName = 'AbpAccount';\n\n checkPasswordByLogin = (login: UserLoginInfo) =>\n this.restService.request<any, AbpLoginResult>({\n method: 'POST',\n url: '/api/account/check-password',\n body: login,\n },\n { apiName: this.apiName });\n\n loginByLogin = (login: UserLoginInfo) =>\n this.restService.request<any, AbpLoginResult>({\n method: 'POST',\n url: '/api/account/login',\n body: login,\n },\n { apiName: this.apiName });\n\n logout = () =>\n this.restService.request<any, void>({\n method: 'GET',\n url: '/api/account/logout',\n },\n { apiName: this.apiName });\n\n constructor(private restService: RestService) {}\n}\n","import type { RegisterDto, ResetPasswordDto, SendPasswordResetCodeDto } from './models';\nimport { RestService } from '@abp/ng.core';\nimport { Injectable } from '@angular/core';\nimport type { IdentityUserDto } from '../identity/models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AccountService {\n apiName = 'AbpAccount';\n\n register = (input: RegisterDto) =>\n this.restService.request<any, IdentityUserDto>({\n method: 'POST',\n url: '/api/account/register',\n body: input,\n },\n { apiName: this.apiName });\n\n resetPassword = (input: ResetPasswordDto) =>\n this.restService.request<any, void>({\n method: 'POST',\n url: '/api/account/reset-password',\n body: input,\n },\n { apiName: this.apiName });\n\n sendPasswordResetCode = (input: SendPasswordResetCodeDto) =>\n this.restService.request<any, void>({\n method: 'POST',\n url: '/api/account/send-password-reset-code',\n body: input,\n },\n { apiName: this.apiName });\n\n constructor(private restService: RestService) {}\n}\n","import type { ChangePasswordInput, ProfileDto, UpdateProfileDto } from './models';\nimport { RestService } from '@abp/ng.core';\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ProfileService {\n apiName = 'AbpAccount';\n\n changePassword = (input: ChangePasswordInput) =>\n this.restService.request<any, void>({\n method: 'POST',\n url: '/api/account/my-profile/change-password',\n body: input,\n },\n { apiName: this.apiName });\n\n get = () =>\n this.restService.request<any, ProfileDto>({\n method: 'GET',\n url: '/api/account/my-profile',\n },\n { apiName: this.apiName });\n\n update = (input: UpdateProfileDto) =>\n this.restService.request<any, ProfileDto>({\n method: 'PUT',\n url: '/api/account/my-profile',\n body: input,\n },\n { apiName: this.apiName });\n\n constructor(private restService: RestService) {}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["AccountService"],"mappings":";;;;;AAEA,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,2DAAW,CAAA;IACX,+FAA6B,CAAA;IAC7B,iEAAc,CAAA;IACd,+DAAa,CAAA;IACb,+EAAqB,CAAA;AACvB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAEM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,eAAe,CAAC;;;;;;;;MCH1DA,gBAAc;IA0BzB,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;QAzB5C,YAAO,GAAG,YAAY,CAAC;QAEvB,yBAAoB,GAAG,CAAC,KAAoB,KAC1C,IAAI,CAAC,WAAW,CAAC,OAAO,CAAsB;YAC5C,MA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+
import { Injectable } from '@angular/core';
|
|
2
3
|
import { map, finalize } from 'rxjs/operators';
|
|
3
4
|
import { ActivatedRoute } from '@angular/router';
|
|
4
|
-
import
|
|
5
|
+
import * as i2 from '@abp/ng.core';
|
|
5
6
|
import { __rest } from 'tslib';
|
|
6
|
-
import
|
|
7
|
+
import * as i1 from '@abp/ng.theme.shared';
|
|
7
8
|
|
|
8
9
|
class AuthWrapperService {
|
|
9
10
|
constructor(multiTenancy, configState, injector) {
|
|
@@ -36,22 +37,18 @@ class AuthWrapperService {
|
|
|
36
37
|
return child;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
AuthWrapperService
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{ type: ConfigStateService },
|
|
45
|
-
{ type: Injector }
|
|
46
|
-
];
|
|
40
|
+
AuthWrapperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AuthWrapperService, deps: [{ token: i2.MultiTenancyService }, { token: i2.ConfigStateService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
41
|
+
AuthWrapperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AuthWrapperService });
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AuthWrapperService, decorators: [{
|
|
43
|
+
type: Injectable
|
|
44
|
+
}], ctorParameters: function () { return [{ type: i2.MultiTenancyService }, { type: i2.ConfigStateService }, { type: i0.Injector }]; } });
|
|
47
45
|
|
|
48
46
|
class TenantBoxService {
|
|
49
|
-
constructor(toasterService, tenantService, sessionState, configState
|
|
47
|
+
constructor(toasterService, tenantService, sessionState, configState) {
|
|
50
48
|
this.toasterService = toasterService;
|
|
51
49
|
this.tenantService = tenantService;
|
|
52
50
|
this.sessionState = sessionState;
|
|
53
51
|
this.configState = configState;
|
|
54
|
-
this.appConfigService = appConfigService;
|
|
55
52
|
this.currentTenant$ = this.sessionState.getTenant$();
|
|
56
53
|
}
|
|
57
54
|
onSwitch() {
|
|
@@ -81,7 +78,7 @@ class TenantBoxService {
|
|
|
81
78
|
}
|
|
82
79
|
setTenant(tenant) {
|
|
83
80
|
this.sessionState.setTenant(tenant);
|
|
84
|
-
this.
|
|
81
|
+
this.configState.refreshAppState();
|
|
85
82
|
}
|
|
86
83
|
showError() {
|
|
87
84
|
this.toasterService.error('AbpUiMultiTenancy::GivenTenantIsNotAvailable', 'AbpUi::Error', {
|
|
@@ -89,16 +86,11 @@ class TenantBoxService {
|
|
|
89
86
|
});
|
|
90
87
|
}
|
|
91
88
|
}
|
|
92
|
-
TenantBoxService
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
{ type: AbpTenantService },
|
|
98
|
-
{ type: SessionStateService },
|
|
99
|
-
{ type: ConfigStateService },
|
|
100
|
-
{ type: AbpApplicationConfigurationService }
|
|
101
|
-
];
|
|
89
|
+
TenantBoxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TenantBoxService, deps: [{ token: i1.ToasterService }, { token: i2.AbpTenantService }, { token: i2.SessionStateService }, { token: i2.ConfigStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
90
|
+
TenantBoxService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TenantBoxService });
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: TenantBoxService, decorators: [{
|
|
92
|
+
type: Injectable
|
|
93
|
+
}], ctorParameters: function () { return [{ type: i1.ToasterService }, { type: i2.AbpTenantService }, { type: i2.SessionStateService }, { type: i2.ConfigStateService }]; } });
|
|
102
94
|
|
|
103
95
|
/*
|
|
104
96
|
* Public API Surface of account-core
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abp-ng.account.core.js","sources":["
|
|
1
|
+
{"version":3,"file":"abp-ng.account.core.js","sources":["../../../../packages/account-core/src/lib/auth-wrapper.service.ts","../../../../packages/account-core/src/lib/tenant-box.service.ts","../../../../packages/account-core/src/public-api.ts","../../../../packages/account-core/src/abp-ng.account.core.ts"],"sourcesContent":["import { Injectable, Injector } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { ActivatedRoute } from '@angular/router';\nimport { ConfigStateService, MultiTenancyService } from '@abp/ng.core';\n\n@Injectable()\nexport class AuthWrapperService {\n isMultiTenancyEnabled$ = this.configState.getDeep$('multiTenancy.isEnabled');\n\n get enableLocalLogin$(): Observable<boolean> {\n return this.configState\n .getSetting$('Abp.Account.EnableLocalLogin')\n .pipe(map(value => value?.toLowerCase() !== 'false'));\n }\n\n tenantBoxKey = 'Account.TenantBoxComponent';\n route: ActivatedRoute;\n\n get isTenantBoxVisibleForCurrentRoute() {\n return this.getMostInnerChild().data.tenantBoxVisible ?? true;\n }\n\n get isTenantBoxVisible() {\n return this.isTenantBoxVisibleForCurrentRoute && this.multiTenancy.isTenantBoxVisible;\n }\n\n constructor(\n public readonly multiTenancy: MultiTenancyService,\n private configState: ConfigStateService,\n injector: Injector,\n ) {\n this.route = injector.get(ActivatedRoute);\n }\n\n private getMostInnerChild() {\n let child = this.route.snapshot;\n let depth = 0;\n const depthLimit = 10;\n while (child.firstChild && depth < depthLimit) {\n child = child.firstChild;\n depth++;\n }\n return child;\n }\n}\n","import {\n AbpTenantService,\n ConfigStateService,\n CurrentTenantDto,\n SessionStateService,\n} from '@abp/ng.core';\nimport { ToasterService } from '@abp/ng.theme.shared';\nimport { Injectable } from '@angular/core';\nimport { finalize } from 'rxjs/operators';\n\n@Injectable()\nexport class TenantBoxService {\n currentTenant$ = this.sessionState.getTenant$();\n\n name: string;\n\n isModalVisible: boolean;\n\n modalBusy: boolean;\n\n constructor(\n private toasterService: ToasterService,\n private tenantService: AbpTenantService,\n private sessionState: SessionStateService,\n private configState: ConfigStateService,\n ) {}\n\n onSwitch() {\n const tenant = this.sessionState.getTenant();\n this.name = tenant?.name;\n this.isModalVisible = true;\n }\n\n save() {\n if (!this.name) {\n this.setTenant(null);\n this.isModalVisible = false;\n return;\n }\n\n this.modalBusy = true;\n this.tenantService\n .findTenantByName(this.name, {})\n .pipe(finalize(() => (this.modalBusy = false)))\n .subscribe(({ success, tenantId: id, ...tenant }) => {\n if (!success) {\n this.showError();\n return;\n }\n\n this.setTenant({ ...tenant, id, isAvailable: true });\n this.isModalVisible = false;\n });\n }\n\n private setTenant(tenant: CurrentTenantDto) {\n this.sessionState.setTenant(tenant);\n this.configState.refreshAppState();\n }\n\n private showError() {\n this.toasterService.error('AbpUiMultiTenancy::GivenTenantIsNotAvailable', 'AbpUi::Error', {\n messageLocalizationParams: [this.name],\n });\n }\n}\n","/*\n * Public API Surface of account-core\n */\n\nexport * from './lib/auth-wrapper.service';\nexport * from './lib/tenant-box.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAOa,kBAAkB;IAoB7B,YACkB,YAAiC,EACzC,WAA+B,EACvC,QAAkB;QAFF,iBAAY,GAAZ,YAAY,CAAqB;QACzC,gBAAW,GAAX,WAAW,CAAoB;QArBzC,2BAAsB,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;QAQ7E,iBAAY,GAAG,4BAA4B,CAAC;QAgB1C,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;KAC3C;IAvBD,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,WAAW;aACpB,WAAW,CAAC,8BAA8B,CAAC;aAC3C,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,EAAE,MAAK,OAAO,C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AAG,KAAK,CAAC;YAC5B,OAAO;SACR;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,aAAa;aACf,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;aAC/B,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC;aAC9C,SAAS,CAAC,CAAC,EAAoC;gBAApC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,OAAa,EAAR,MAAM,cAAlC,uBAAoC,CAAF;YAC5C,IAAI,CAAC,OAAO,EAAE;gBACZ,IAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,OAAO;aACR;YAED,IAAI,CAAC,SAAS,iCAAM,MAAM,KAAE,EAAE,EAAE,WAAW,EAAE,IAAI,IAAG,CAAC;YACrD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;SAC7B,CAAC,CAAC;KACN;IAEO,SAAS,CAAC,MAAwB;QACxC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;KACpC;IAEO,SAAS;QACf,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,8CAA8C,EAAE,cAAc,EAAE;YACxF,yBAAyB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;SACvC,CAAC,CAAC;KACJ;;6GArDU,gBAAgB;iHAAhB,gBAAgB;2FAAhB,gBAAgB;kBAD5B,UAAU;;;ACVX;;;;ACAA;;;;;;"}
|
|
@@ -2,6 +2,7 @@ import { Injector } from '@angular/core';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ActivatedRoute } from '@angular/router';
|
|
4
4
|
import { ConfigStateService, MultiTenancyService } from '@abp/ng.core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class AuthWrapperService {
|
|
6
7
|
readonly multiTenancy: MultiTenancyService;
|
|
7
8
|
private configState;
|
|
@@ -13,4 +14,6 @@ export declare class AuthWrapperService {
|
|
|
13
14
|
get isTenantBoxVisible(): boolean;
|
|
14
15
|
constructor(multiTenancy: MultiTenancyService, configState: ConfigStateService, injector: Injector);
|
|
15
16
|
private getMostInnerChild;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthWrapperService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthWrapperService>;
|
|
16
19
|
}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
import { AbpTenantService, ConfigStateService, CurrentTenantDto, SessionStateService } from '@abp/ng.core';
|
|
1
2
|
import { ToasterService } from '@abp/ng.theme.shared';
|
|
2
|
-
import
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class TenantBoxService {
|
|
4
5
|
private toasterService;
|
|
5
6
|
private tenantService;
|
|
6
7
|
private sessionState;
|
|
7
8
|
private configState;
|
|
8
|
-
private appConfigService;
|
|
9
9
|
currentTenant$: import("rxjs").Observable<CurrentTenantDto>;
|
|
10
10
|
name: string;
|
|
11
11
|
isModalVisible: boolean;
|
|
12
12
|
modalBusy: boolean;
|
|
13
|
-
constructor(toasterService: ToasterService, tenantService: AbpTenantService, sessionState: SessionStateService, configState: ConfigStateService
|
|
13
|
+
constructor(toasterService: ToasterService, tenantService: AbpTenantService, sessionState: SessionStateService, configState: ConfigStateService);
|
|
14
14
|
onSwitch(): void;
|
|
15
15
|
save(): void;
|
|
16
16
|
private setTenant;
|
|
17
17
|
private showError;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TenantBoxService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TenantBoxService>;
|
|
18
20
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abp/ng.account.core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-beta.3",
|
|
4
4
|
"homepage": "https://abp.io",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/abpframework/abp.git"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@abp/ng.core": "~
|
|
11
|
-
"@abp/ng.theme.shared": "~
|
|
12
|
-
"@angular/common": ">=
|
|
13
|
-
"@angular/core": ">=
|
|
10
|
+
"@abp/ng.core": "~5.0.0-beta.2",
|
|
11
|
+
"@abp/ng.theme.shared": "~5.0.0-beta.2",
|
|
12
|
+
"@angular/common": ">=12.0.0",
|
|
13
|
+
"@angular/core": ">=12.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"tslib": "^2.0.0"
|
|
@@ -24,6 +24,5 @@
|
|
|
24
24
|
"esm2015": "esm2015/abp-ng.account.core.js",
|
|
25
25
|
"fesm2015": "fesm2015/abp-ng.account.core.js",
|
|
26
26
|
"typings": "abp-ng.account.core.d.ts",
|
|
27
|
-
"metadata": "abp-ng.account.core.metadata.json",
|
|
28
27
|
"sideEffects": false
|
|
29
28
|
}
|