@abp/ng.account.core 7.2.2 → 7.3.0-rc.2

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.
Files changed (58) hide show
  1. package/README.md +129 -2
  2. package/{esm2020 → esm2022}/abp-ng.account.core.mjs +4 -4
  3. package/esm2022/lib/auth-wrapper.service.mjs +43 -0
  4. package/esm2022/lib/tenant-box.service.mjs +56 -0
  5. package/{esm2020 → esm2022}/proxy/abp-ng.account.core-proxy.mjs +4 -4
  6. package/{esm2020 → esm2022}/proxy/lib/index.mjs +2 -2
  7. package/esm2022/proxy/lib/proxy/account/account.service.mjs +35 -0
  8. package/{esm2020 → esm2022}/proxy/lib/proxy/account/index.mjs +5 -5
  9. package/{esm2020 → esm2022}/proxy/lib/proxy/account/models.mjs +1 -1
  10. package/esm2022/proxy/lib/proxy/account/profile.service.mjs +34 -0
  11. package/esm2022/proxy/lib/proxy/account/web/areas/account/controllers/account.service.mjs +34 -0
  12. package/{esm2020 → esm2022}/proxy/lib/proxy/account/web/areas/account/controllers/index.mjs +3 -3
  13. package/{esm2020 → esm2022}/proxy/lib/proxy/account/web/areas/account/controllers/models/index.mjs +2 -2
  14. package/{esm2020 → esm2022}/proxy/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.mjs +10 -10
  15. package/{esm2020 → esm2022}/proxy/lib/proxy/account/web/areas/account/controllers/models/models.mjs +1 -1
  16. package/{esm2020 → esm2022}/proxy/lib/proxy/account/web/areas/account/index.mjs +2 -2
  17. package/{esm2020 → esm2022}/proxy/lib/proxy/account/web/areas/index.mjs +2 -2
  18. package/{esm2020 → esm2022}/proxy/lib/proxy/account/web/index.mjs +2 -2
  19. package/{esm2020 → esm2022}/proxy/lib/proxy/identity/index.mjs +1 -1
  20. package/{esm2020 → esm2022}/proxy/lib/proxy/identity/models.mjs +1 -1
  21. package/{esm2020 → esm2022}/proxy/public-api.mjs +1 -1
  22. package/{esm2020 → esm2022}/public-api.mjs +5 -5
  23. package/{fesm2020 → fesm2022}/abp-ng.account.core-proxy.mjs +92 -92
  24. package/{fesm2020 → fesm2022}/abp-ng.account.core-proxy.mjs.map +1 -1
  25. package/{fesm2020 → fesm2022}/abp-ng.account.core.mjs +84 -84
  26. package/{fesm2020 → fesm2022}/abp-ng.account.core.mjs.map +1 -1
  27. package/index.d.ts +5 -5
  28. package/lib/auth-wrapper.service.d.ts +19 -19
  29. package/lib/tenant-box.service.d.ts +20 -20
  30. package/package.json +24 -18
  31. package/proxy/index.d.ts +5 -5
  32. package/proxy/lib/index.d.ts +2 -2
  33. package/proxy/lib/proxy/account/account.service.d.ts +14 -14
  34. package/proxy/lib/proxy/account/index.d.ts +5 -5
  35. package/proxy/lib/proxy/account/models.d.ts +40 -40
  36. package/proxy/lib/proxy/account/profile.service.d.ts +13 -13
  37. package/proxy/lib/proxy/account/web/areas/account/controllers/account.service.d.ts +13 -13
  38. package/proxy/lib/proxy/account/web/areas/account/controllers/index.d.ts +3 -3
  39. package/proxy/lib/proxy/account/web/areas/account/controllers/models/index.d.ts +2 -2
  40. package/proxy/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.d.ts +8 -8
  41. package/proxy/lib/proxy/account/web/areas/account/controllers/models/models.d.ts +10 -10
  42. package/proxy/lib/proxy/account/web/areas/account/index.d.ts +2 -2
  43. package/proxy/lib/proxy/account/web/areas/index.d.ts +2 -2
  44. package/proxy/lib/proxy/account/web/index.d.ts +2 -2
  45. package/proxy/lib/proxy/identity/index.d.ts +1 -1
  46. package/proxy/lib/proxy/identity/models.d.ts +15 -15
  47. package/proxy/public-api.d.ts +1 -1
  48. package/public-api.d.ts +2 -2
  49. package/esm2020/lib/auth-wrapper.service.mjs +0 -42
  50. package/esm2020/lib/tenant-box.service.mjs +0 -55
  51. package/esm2020/proxy/lib/proxy/account/account.service.mjs +0 -34
  52. package/esm2020/proxy/lib/proxy/account/profile.service.mjs +0 -33
  53. package/esm2020/proxy/lib/proxy/account/web/areas/account/controllers/account.service.mjs +0 -33
  54. package/fesm2015/abp-ng.account.core-proxy.mjs +0 -136
  55. package/fesm2015/abp-ng.account.core-proxy.mjs.map +0 -1
  56. package/fesm2015/abp-ng.account.core.mjs +0 -104
  57. package/fesm2015/abp-ng.account.core.mjs.map +0 -1
  58. package/proxy/src/lib/proxy/README.md +0 -17
@@ -1,136 +0,0 @@
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
- let AccountService$1 = class AccountService {
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: "15.0.4", ngImport: i0, type: AccountService$1, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
43
- AccountService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountService$1, providedIn: 'root' });
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", 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
- AccountService: AccountService$1,
54
- Models: index$4
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: "15.0.4", ngImport: i0, type: AccountService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
94
- AccountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AccountService, providedIn: 'root' });
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", 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: "15.0.4", ngImport: i0, type: ProfileService, deps: [{ token: i1.RestService }], target: i0.ɵɵFactoryTarget.Injectable });
123
- ProfileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ProfileService, providedIn: 'root' });
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", 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.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abp-ng.account.core-proxy.mjs","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';\r\n\r\nexport enum LoginResultType {\r\n Success = 1,\r\n InvalidUserNameOrPassword = 2,\r\n NotAllowed = 3,\r\n LockedOut = 4,\r\n RequiresTwoFactor = 5,\r\n}\r\n\r\nexport const loginResultTypeOptions = mapEnumToOptions(LoginResultType);\r\n","import type { AbpLoginResult, UserLoginInfo } from './models/models';\r\nimport { RestService } from '@abp/ng.core';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AccountService {\r\n apiName = 'AbpAccount';\r\n\r\n checkPasswordByLogin = (login: UserLoginInfo) =>\r\n this.restService.request<any, AbpLoginResult>({\r\n method: 'POST',\r\n url: '/api/account/check-password',\r\n body: login,\r\n },\r\n { apiName: this.apiName });\r\n\r\n loginByLogin = (login: UserLoginInfo) =>\r\n this.restService.request<any, AbpLoginResult>({\r\n method: 'POST',\r\n url: '/api/account/login',\r\n body: login,\r\n },\r\n { apiName: this.apiName });\r\n\r\n logout = () =>\r\n this.restService.request<any, void>({\r\n method: 'GET',\r\n url: '/api/account/logout',\r\n },\r\n { apiName: this.apiName });\r\n\r\n constructor(private restService: RestService) {}\r\n}\r\n","import type { RegisterDto, ResetPasswordDto, SendPasswordResetCodeDto } from './models';\r\nimport { RestService } from '@abp/ng.core';\r\nimport { Injectable } from '@angular/core';\r\nimport type { IdentityUserDto } from '../identity/models';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class AccountService {\r\n apiName = 'AbpAccount';\r\n\r\n register = (input: RegisterDto) =>\r\n this.restService.request<any, IdentityUserDto>({\r\n method: 'POST',\r\n url: '/api/account/register',\r\n body: input,\r\n },\r\n { apiName: this.apiName });\r\n\r\n resetPassword = (input: ResetPasswordDto) =>\r\n this.restService.request<any, void>({\r\n method: 'POST',\r\n url: '/api/account/reset-password',\r\n body: input,\r\n },\r\n { apiName: this.apiName });\r\n\r\n sendPasswordResetCode = (input: SendPasswordResetCodeDto) =>\r\n this.restService.request<any, void>({\r\n method: 'POST',\r\n url: '/api/account/send-password-reset-code',\r\n body: input,\r\n },\r\n { apiName: this.apiName });\r\n\r\n constructor(private restService: RestService) {}\r\n}\r\n","import type { ChangePasswordInput, ProfileDto, UpdateProfileDto } from './models';\r\nimport { RestService } from '@abp/ng.core';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class ProfileService {\r\n apiName = 'AbpAccount';\r\n\r\n changePassword = (input: ChangePasswordInput) =>\r\n this.restService.request<any, void>({\r\n method: 'POST',\r\n url: '/api/account/my-profile/change-password',\r\n body: input,\r\n },\r\n { apiName: this.apiName });\r\n\r\n get = () =>\r\n this.restService.request<any, ProfileDto>({\r\n method: 'GET',\r\n url: '/api/account/my-profile',\r\n },\r\n { apiName: this.apiName });\r\n\r\n update = (input: UpdateProfileDto) =>\r\n this.restService.request<any, ProfileDto>({\r\n method: 'PUT',\r\n url: '/api/account/my-profile',\r\n body: input,\r\n },\r\n { apiName: this.apiName });\r\n\r\n constructor(private restService: RestService) {}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["AccountService"],"mappings":";;;;;AAEA,IAAY,eAMX,CAAA;AAND,CAAA,UAAY,eAAe,EAAA;IACzB,eAAA,CAAA,eAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW,CAAA;IACX,eAAA,CAAA,eAAA,CAAA,2BAAA,CAAA,GAAA,CAAA,CAAA,GAAA,2BAA6B,CAAA;IAC7B,eAAA,CAAA,eAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAc,CAAA;IACd,eAAA,CAAA,eAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAa,CAAA;IACb,eAAA,CAAA,eAAA,CAAA,mBAAA,CAAA,GAAA,CAAA,CAAA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I,EAAE,KAAK;SACZ,EACD,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;KAEmB;;2GA1BrC,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA,CAAA;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACND;;AAEG;;;;"}
@@ -1,104 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable } from '@angular/core';
3
- import { map, finalize } from 'rxjs/operators';
4
- import { ActivatedRoute } from '@angular/router';
5
- import * as i2 from '@abp/ng.core';
6
- import { __rest } from 'tslib';
7
- import * as i1 from '@abp/ng.theme.shared';
8
-
9
- class AuthWrapperService {
10
- constructor(multiTenancy, configState, injector) {
11
- this.multiTenancy = multiTenancy;
12
- this.configState = configState;
13
- this.isMultiTenancyEnabled$ = this.configState.getDeep$('multiTenancy.isEnabled');
14
- this.tenantBoxKey = 'Account.TenantBoxComponent';
15
- this.route = injector.get(ActivatedRoute);
16
- }
17
- get enableLocalLogin$() {
18
- return this.configState
19
- .getSetting$('Abp.Account.EnableLocalLogin')
20
- .pipe(map(value => (value === null || value === void 0 ? void 0 : value.toLowerCase()) !== 'false'));
21
- }
22
- get isTenantBoxVisibleForCurrentRoute() {
23
- var _a;
24
- return (_a = this.getMostInnerChild().data.tenantBoxVisible) !== null && _a !== void 0 ? _a : true;
25
- }
26
- get isTenantBoxVisible() {
27
- return this.isTenantBoxVisibleForCurrentRoute && this.multiTenancy.isTenantBoxVisible;
28
- }
29
- getMostInnerChild() {
30
- let child = this.route.snapshot;
31
- let depth = 0;
32
- const depthLimit = 10;
33
- while (child.firstChild && depth < depthLimit) {
34
- child = child.firstChild;
35
- depth++;
36
- }
37
- return child;
38
- }
39
- }
40
- AuthWrapperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", 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: "15.0.4", ngImport: i0, type: AuthWrapperService });
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AuthWrapperService, decorators: [{
43
- type: Injectable
44
- }], ctorParameters: function () { return [{ type: i2.MultiTenancyService }, { type: i2.ConfigStateService }, { type: i0.Injector }]; } });
45
-
46
- class TenantBoxService {
47
- constructor(toasterService, tenantService, sessionState, configState) {
48
- this.toasterService = toasterService;
49
- this.tenantService = tenantService;
50
- this.sessionState = sessionState;
51
- this.configState = configState;
52
- this.currentTenant$ = this.sessionState.getTenant$();
53
- }
54
- onSwitch() {
55
- const tenant = this.sessionState.getTenant();
56
- this.name = (tenant === null || tenant === void 0 ? void 0 : tenant.name) || '';
57
- this.isModalVisible = true;
58
- }
59
- save() {
60
- if (!this.name) {
61
- this.setTenant(null);
62
- this.isModalVisible = false;
63
- return;
64
- }
65
- this.modalBusy = true;
66
- this.tenantService
67
- .findTenantByName(this.name)
68
- .pipe(finalize(() => (this.modalBusy = false)))
69
- .subscribe((_a) => {
70
- var { success, tenantId: id } = _a, tenant = __rest(_a, ["success", "tenantId"]);
71
- if (!success) {
72
- this.showError();
73
- return;
74
- }
75
- this.setTenant(Object.assign(Object.assign({}, tenant), { id, isAvailable: true }));
76
- this.isModalVisible = false;
77
- });
78
- }
79
- setTenant(tenant) {
80
- this.sessionState.setTenant(tenant);
81
- this.configState.refreshAppState();
82
- }
83
- showError() {
84
- this.toasterService.error('AbpUiMultiTenancy::GivenTenantIsNotAvailable', 'AbpUi::Error', {
85
- messageLocalizationParams: [this.name || ''],
86
- });
87
- }
88
- }
89
- TenantBoxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", 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: "15.0.4", ngImport: i0, type: TenantBoxService });
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: TenantBoxService, decorators: [{
92
- type: Injectable
93
- }], ctorParameters: function () { return [{ type: i1.ToasterService }, { type: i2.AbpTenantService }, { type: i2.SessionStateService }, { type: i2.ConfigStateService }]; } });
94
-
95
- /*
96
- * Public API Surface of account-core
97
- */
98
-
99
- /**
100
- * Generated bundle index. Do not edit.
101
- */
102
-
103
- export { AuthWrapperService, TenantBoxService };
104
- //# sourceMappingURL=abp-ng.account.core.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abp-ng.account.core.mjs","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';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { ConfigStateService, MultiTenancyService } from '@abp/ng.core';\r\n\r\n@Injectable()\r\nexport class AuthWrapperService {\r\n isMultiTenancyEnabled$ = this.configState.getDeep$('multiTenancy.isEnabled');\r\n\r\n get enableLocalLogin$(): Observable<boolean> {\r\n return this.configState\r\n .getSetting$('Abp.Account.EnableLocalLogin')\r\n .pipe(map(value => value?.toLowerCase() !== 'false'));\r\n }\r\n\r\n tenantBoxKey = 'Account.TenantBoxComponent';\r\n route: ActivatedRoute;\r\n\r\n get isTenantBoxVisibleForCurrentRoute() {\r\n return this.getMostInnerChild().data.tenantBoxVisible ?? true;\r\n }\r\n\r\n get isTenantBoxVisible() {\r\n return this.isTenantBoxVisibleForCurrentRoute && this.multiTenancy.isTenantBoxVisible;\r\n }\r\n\r\n constructor(\r\n public readonly multiTenancy: MultiTenancyService,\r\n private configState: ConfigStateService,\r\n injector: Injector,\r\n ) {\r\n this.route = injector.get(ActivatedRoute);\r\n }\r\n\r\n private getMostInnerChild() {\r\n let child = this.route.snapshot;\r\n let depth = 0;\r\n const depthLimit = 10;\r\n while (child.firstChild && depth < depthLimit) {\r\n child = child.firstChild;\r\n depth++;\r\n }\r\n return child;\r\n }\r\n}\r\n","import {\r\n AbpTenantService,\r\n ConfigStateService,\r\n CurrentTenantDto,\r\n SessionStateService,\r\n} from '@abp/ng.core';\r\nimport { ToasterService } from '@abp/ng.theme.shared';\r\nimport { Injectable } from '@angular/core';\r\nimport { finalize } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class TenantBoxService {\r\n currentTenant$ = this.sessionState.getTenant$();\r\n\r\n name?: string;\r\n\r\n isModalVisible!: boolean;\r\n\r\n modalBusy!: boolean;\r\n\r\n constructor(\r\n private toasterService: ToasterService,\r\n private tenantService: AbpTenantService,\r\n private sessionState: SessionStateService,\r\n private configState: ConfigStateService,\r\n ) {}\r\n\r\n onSwitch() {\r\n const tenant = this.sessionState.getTenant();\r\n this.name = tenant?.name || '';\r\n this.isModalVisible = true;\r\n }\r\n\r\n save() {\r\n if (!this.name) {\r\n this.setTenant(null);\r\n this.isModalVisible = false;\r\n return;\r\n }\r\n\r\n this.modalBusy = true;\r\n this.tenantService\r\n .findTenantByName(this.name)\r\n .pipe(finalize(() => (this.modalBusy = false)))\r\n .subscribe(({ success, tenantId: id, ...tenant }) => {\r\n if (!success) {\r\n this.showError();\r\n return;\r\n }\r\n\r\n this.setTenant({ ...tenant, id, isAvailable: true });\r\n this.isModalVisible = false;\r\n });\r\n }\r\n\r\n private setTenant(tenant: CurrentTenantDto | null) {\r\n this.sessionState.setTenant(tenant);\r\n this.configState.refreshAppState();\r\n }\r\n\r\n private showError() {\r\n this.toasterService.error('AbpUiMultiTenancy::GivenTenantIsNotAvailable', 'AbpUi::Error', {\r\n messageLocalizationParams: [this.name || ''],\r\n });\r\n }\r\n}\r\n","/*\r\n * Public API Surface of account-core\r\n */\r\n\r\nexport * from './lib/auth-wrapper.service';\r\nexport * from './lib/tenant-box.service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;MAOa,kBAAkB,CAAA;AAoB7B,IAAA,WAAA,CACkB,YAAiC,EACzC,WAA+B,EACvC,QAAkB,EAAA;AAFF,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAqB;AACzC,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAoB;QArBzC,IAAsB,CAAA,sBAAA,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;AAQ7E,QAAA,IAAY,CAAA,YAAA,GAAG,4BAA4B,CAAC;QAgB1C,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;KAC3C;AAvBD,IAAA,IAAI,iBAAiB,GAAA;QACnB,OAAO,IAAI,CAAC,WAAW;aACpB,WAAW,CAAC,8BAA8B,CAAC;aAC3C,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAA,KAAK,KAAA,IAAA,IAAL,KAAK,KAAL,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,KAAK,CAAE,WAAW,EAAE,MAAK,O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AA,CAAA,EAAA,EAAM,MAAM,CAAA,EAAA,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAA,CAAA,CAAG,CAAC;AACrD,YAAA,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;AAC9B,SAAC,CAAC,CAAC;KACN;AAEO,IAAA,SAAS,CAAC,MAA+B,EAAA;AAC/C,QAAA,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AACpC,QAAA,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC;KACpC;IAEO,SAAS,GAAA;QACf,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,8CAA8C,EAAE,cAAc,EAAE;AACxF,YAAA,yBAAyB,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;AAC7C,SAAA,CAAC,CAAC;KACJ;;6GArDU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;iHAAhB,gBAAgB,EAAA,CAAA,CAAA;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;;;ACVX;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,17 +0,0 @@
1
- # Proxy Generation Output
2
-
3
- This directory includes the output of the latest proxy generation.
4
- The files and folders in it will be overwritten when proxy generation is run again.
5
- Therefore, please do not place your own content in this folder.
6
-
7
- In addition, `generate-proxy.json` works like a lock file.
8
- It includes information used by the proxy generator, so please do not delete or modify it.
9
-
10
- Finally, the name of the files and folders should not be changed for two reasons:
11
- - Proxy generator will keep creating them at those paths and you will have multiple copies of the same content.
12
- - ABP Suite generates files which include imports from this folder.
13
-
14
- > **Important Notice:** If you are building a module and are planning to publish to npm,
15
- > some of the generated proxies are likely to be exported from public-api.ts file. In such a case,
16
- > please make sure you export files directly and not from barrel exports. In other words,
17
- > do not include index.ts exports in your public-api.ts exports.