@abp/ng.account.core 5.0.1 → 5.1.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.
Files changed (40) hide show
  1. package/{esm2015/abp-ng.account.core.js → esm2020/abp-ng.account.core.mjs} +0 -0
  2. package/esm2020/lib/auth-wrapper.service.mjs +42 -0
  3. package/esm2020/lib/tenant-box.service.mjs +55 -0
  4. package/{esm2015/proxy/abp-ng.account.core-proxy.js → esm2020/proxy/abp-ng.account.core-proxy.mjs} +0 -0
  5. package/{esm2015/proxy/lib/index.js → esm2020/proxy/lib/index.mjs} +0 -0
  6. package/{esm2015/proxy/lib/proxy/account/account.service.js → esm2020/proxy/lib/proxy/account/account.service.mjs} +4 -4
  7. package/{esm2015/proxy/lib/proxy/account/index.js → esm2020/proxy/lib/proxy/account/index.mjs} +0 -0
  8. package/{esm2015/proxy/lib/proxy/account/models.js → esm2020/proxy/lib/proxy/account/models.mjs} +0 -0
  9. package/{esm2015/proxy/lib/proxy/account/profile.service.js → esm2020/proxy/lib/proxy/account/profile.service.mjs} +4 -4
  10. package/{esm2015/proxy/lib/proxy/account/web/areas/account/controllers/account.service.js → esm2020/proxy/lib/proxy/account/web/areas/account/controllers/account.service.mjs} +4 -4
  11. package/{esm2015/proxy/lib/proxy/account/web/areas/account/controllers/index.js → esm2020/proxy/lib/proxy/account/web/areas/account/controllers/index.mjs} +0 -0
  12. package/{esm2015/proxy/lib/proxy/account/web/areas/account/controllers/models/index.js → esm2020/proxy/lib/proxy/account/web/areas/account/controllers/models/index.mjs} +0 -0
  13. package/{esm2015/proxy/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.js → esm2020/proxy/lib/proxy/account/web/areas/account/controllers/models/login-result-type.enum.mjs} +0 -0
  14. package/{esm2015/proxy/lib/proxy/account/web/areas/account/controllers/models/models.js → esm2020/proxy/lib/proxy/account/web/areas/account/controllers/models/models.mjs} +0 -0
  15. package/{esm2015/proxy/lib/proxy/account/web/areas/account/index.js → esm2020/proxy/lib/proxy/account/web/areas/account/index.mjs} +0 -0
  16. package/{esm2015/proxy/lib/proxy/account/web/areas/index.js → esm2020/proxy/lib/proxy/account/web/areas/index.mjs} +0 -0
  17. package/{esm2015/proxy/lib/proxy/account/web/index.js → esm2020/proxy/lib/proxy/account/web/index.mjs} +0 -0
  18. package/{esm2015/proxy/lib/proxy/identity/index.js → esm2020/proxy/lib/proxy/identity/index.mjs} +0 -0
  19. package/{esm2015/proxy/lib/proxy/identity/models.js → esm2020/proxy/lib/proxy/identity/models.mjs} +0 -0
  20. package/{esm2015/proxy/public-api.js → esm2020/proxy/public-api.mjs} +0 -0
  21. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  22. package/fesm2015/{abp-ng.account.core-proxy.js → abp-ng.account.core-proxy.mjs} +10 -10
  23. package/fesm2015/abp-ng.account.core-proxy.mjs.map +1 -0
  24. package/fesm2015/{abp-ng.account.core.js → abp-ng.account.core.mjs} +7 -7
  25. package/fesm2015/abp-ng.account.core.mjs.map +1 -0
  26. package/fesm2020/abp-ng.account.core-proxy.mjs +136 -0
  27. package/fesm2020/abp-ng.account.core-proxy.mjs.map +1 -0
  28. package/fesm2020/abp-ng.account.core.mjs +101 -0
  29. package/fesm2020/abp-ng.account.core.mjs.map +1 -0
  30. package/package.json +29 -8
  31. package/proxy/package.json +5 -5
  32. package/proxy/src/lib/proxy/README.md +17 -0
  33. package/bundles/abp-ng.account.core-proxy.umd.js +0 -170
  34. package/bundles/abp-ng.account.core-proxy.umd.js.map +0 -1
  35. package/bundles/abp-ng.account.core.umd.js +0 -462
  36. package/bundles/abp-ng.account.core.umd.js.map +0 -1
  37. package/esm2015/lib/auth-wrapper.service.js +0 -43
  38. package/esm2015/lib/tenant-box.service.js +0 -57
  39. package/fesm2015/abp-ng.account.core-proxy.js.map +0 -1
  40. package/fesm2015/abp-ng.account.core.js.map +0 -1
@@ -0,0 +1,101 @@
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 * as i1 from '@abp/ng.theme.shared';
7
+
8
+ class AuthWrapperService {
9
+ constructor(multiTenancy, configState, injector) {
10
+ this.multiTenancy = multiTenancy;
11
+ this.configState = configState;
12
+ this.isMultiTenancyEnabled$ = this.configState.getDeep$('multiTenancy.isEnabled');
13
+ this.tenantBoxKey = 'Account.TenantBoxComponent';
14
+ this.route = injector.get(ActivatedRoute);
15
+ }
16
+ get enableLocalLogin$() {
17
+ return this.configState
18
+ .getSetting$('Abp.Account.EnableLocalLogin')
19
+ .pipe(map(value => value?.toLowerCase() !== 'false'));
20
+ }
21
+ get isTenantBoxVisibleForCurrentRoute() {
22
+ return this.getMostInnerChild().data.tenantBoxVisible ?? true;
23
+ }
24
+ get isTenantBoxVisible() {
25
+ return this.isTenantBoxVisibleForCurrentRoute && this.multiTenancy.isTenantBoxVisible;
26
+ }
27
+ getMostInnerChild() {
28
+ let child = this.route.snapshot;
29
+ let depth = 0;
30
+ const depthLimit = 10;
31
+ while (child.firstChild && depth < depthLimit) {
32
+ child = child.firstChild;
33
+ depth++;
34
+ }
35
+ return child;
36
+ }
37
+ }
38
+ AuthWrapperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuthWrapperService, deps: [{ token: i2.MultiTenancyService }, { token: i2.ConfigStateService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
39
+ AuthWrapperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuthWrapperService });
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AuthWrapperService, decorators: [{
41
+ type: Injectable
42
+ }], ctorParameters: function () { return [{ type: i2.MultiTenancyService }, { type: i2.ConfigStateService }, { type: i0.Injector }]; } });
43
+
44
+ class TenantBoxService {
45
+ constructor(toasterService, tenantService, sessionState, configState) {
46
+ this.toasterService = toasterService;
47
+ this.tenantService = tenantService;
48
+ this.sessionState = sessionState;
49
+ this.configState = configState;
50
+ this.currentTenant$ = this.sessionState.getTenant$();
51
+ }
52
+ onSwitch() {
53
+ const tenant = this.sessionState.getTenant();
54
+ this.name = tenant?.name;
55
+ this.isModalVisible = true;
56
+ }
57
+ save() {
58
+ if (!this.name) {
59
+ this.setTenant(null);
60
+ this.isModalVisible = false;
61
+ return;
62
+ }
63
+ this.modalBusy = true;
64
+ this.tenantService
65
+ .findTenantByName(this.name, {})
66
+ .pipe(finalize(() => (this.modalBusy = false)))
67
+ .subscribe(({ success, tenantId: id, ...tenant }) => {
68
+ if (!success) {
69
+ this.showError();
70
+ return;
71
+ }
72
+ this.setTenant({ ...tenant, id, isAvailable: true });
73
+ this.isModalVisible = false;
74
+ });
75
+ }
76
+ setTenant(tenant) {
77
+ this.sessionState.setTenant(tenant);
78
+ this.configState.refreshAppState();
79
+ }
80
+ showError() {
81
+ this.toasterService.error('AbpUiMultiTenancy::GivenTenantIsNotAvailable', 'AbpUi::Error', {
82
+ messageLocalizationParams: [this.name],
83
+ });
84
+ }
85
+ }
86
+ TenantBoxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: TenantBoxService, deps: [{ token: i1.ToasterService }, { token: i2.AbpTenantService }, { token: i2.SessionStateService }, { token: i2.ConfigStateService }], target: i0.ɵɵFactoryTarget.Injectable });
87
+ TenantBoxService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: TenantBoxService });
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: TenantBoxService, decorators: [{
89
+ type: Injectable
90
+ }], ctorParameters: function () { return [{ type: i1.ToasterService }, { type: i2.AbpTenantService }, { type: i2.SessionStateService }, { type: i2.ConfigStateService }]; } });
91
+
92
+ /*
93
+ * Public API Surface of account-core
94
+ */
95
+
96
+ /**
97
+ * Generated bundle index. Do not edit.
98
+ */
99
+
100
+ export { AuthWrapperService, TenantBoxService };
101
+ //# sourceMappingURL=abp-ng.account.core.mjs.map
@@ -0,0 +1 @@
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) {\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":[],"mappings":";;;;;;;MAOa,kBAAkB;IAoB7B,YACkB,YAAiC,EACzC,WAA+B,EACvC,QAAkB;QAFF,iBAAY,GAAZ,YAAY,CAAqB;QACzC,gB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GArDU,gBAAgB;iHAAhB,gBAAgB;2FAAhB,gBAAgB;kBAD5B,UAAU;;;ACVX;;;;ACAA;;;;;;"}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@abp/ng.account.core",
3
- "version": "5.0.1",
3
+ "version": "5.1.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": "~5.0.0",
11
- "@abp/ng.theme.shared": "~5.0.0",
10
+ "@abp/ng.core": "~5.1.2",
11
+ "@abp/ng.theme.shared": "~5.1.2",
12
12
  "@angular/common": ">=12.0.0",
13
13
  "@angular/core": ">=12.0.0"
14
14
  },
@@ -18,11 +18,32 @@
18
18
  "publishConfig": {
19
19
  "access": "public"
20
20
  },
21
- "main": "bundles/abp-ng.account.core.umd.js",
22
- "module": "fesm2015/abp-ng.account.core.js",
23
- "es2015": "fesm2015/abp-ng.account.core.js",
24
- "esm2015": "esm2015/abp-ng.account.core.js",
25
- "fesm2015": "fesm2015/abp-ng.account.core.js",
21
+ "module": "fesm2015/abp-ng.account.core.mjs",
22
+ "es2020": "fesm2020/abp-ng.account.core.mjs",
23
+ "esm2020": "esm2020/abp-ng.account.core.mjs",
24
+ "fesm2020": "fesm2020/abp-ng.account.core.mjs",
25
+ "fesm2015": "fesm2015/abp-ng.account.core.mjs",
26
26
  "typings": "abp-ng.account.core.d.ts",
27
+ "exports": {
28
+ "./package.json": {
29
+ "default": "./package.json"
30
+ },
31
+ ".": {
32
+ "types": "./abp-ng.account.core.d.ts",
33
+ "esm2020": "./esm2020/abp-ng.account.core.mjs",
34
+ "es2020": "./fesm2020/abp-ng.account.core.mjs",
35
+ "es2015": "./fesm2015/abp-ng.account.core.mjs",
36
+ "node": "./fesm2015/abp-ng.account.core.mjs",
37
+ "default": "./fesm2020/abp-ng.account.core.mjs"
38
+ },
39
+ "./proxy": {
40
+ "types": "./proxy/abp-ng.account.core-proxy.d.ts",
41
+ "esm2020": "./esm2020/proxy/abp-ng.account.core-proxy.mjs",
42
+ "es2020": "./fesm2020/abp-ng.account.core-proxy.mjs",
43
+ "es2015": "./fesm2015/abp-ng.account.core-proxy.mjs",
44
+ "node": "./fesm2015/abp-ng.account.core-proxy.mjs",
45
+ "default": "./fesm2020/abp-ng.account.core-proxy.mjs"
46
+ }
47
+ },
27
48
  "sideEffects": false
28
49
  }
@@ -1,9 +1,9 @@
1
1
  {
2
- "main": "../bundles/abp-ng.account.core-proxy.umd.js",
3
- "module": "../fesm2015/abp-ng.account.core-proxy.js",
4
- "es2015": "../fesm2015/abp-ng.account.core-proxy.js",
5
- "esm2015": "../esm2015/proxy/abp-ng.account.core-proxy.js",
6
- "fesm2015": "../fesm2015/abp-ng.account.core-proxy.js",
2
+ "module": "../fesm2015/abp-ng.account.core-proxy.mjs",
3
+ "es2020": "../fesm2020/abp-ng.account.core-proxy.mjs",
4
+ "esm2020": "../esm2020/proxy/abp-ng.account.core-proxy.mjs",
5
+ "fesm2020": "../fesm2020/abp-ng.account.core-proxy.mjs",
6
+ "fesm2015": "../fesm2015/abp-ng.account.core-proxy.mjs",
7
7
  "typings": "abp-ng.account.core-proxy.d.ts",
8
8
  "sideEffects": false,
9
9
  "name": "@abp/ng.account.core/proxy"
@@ -0,0 +1,17 @@
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.
@@ -1,170 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@abp/ng.core'), require('@angular/core')) :
3
- typeof define === 'function' && define.amd ? define('@abp/ng.account.core/proxy', ['exports', '@abp/ng.core', '@angular/core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.abp = global.abp || {}, global.abp.ng = global.abp.ng || {}, global.abp.ng.account = global.abp.ng.account || {}, global.abp.ng.account.core = global.abp.ng.account.core || {}, global.abp.ng.account.core.proxy = {}), global.i1, global.ng.core));
5
- })(this, (function (exports, i1, i0) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
26
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
27
-
28
- var LoginResultType;
29
- (function (LoginResultType) {
30
- LoginResultType[LoginResultType["Success"] = 1] = "Success";
31
- LoginResultType[LoginResultType["InvalidUserNameOrPassword"] = 2] = "InvalidUserNameOrPassword";
32
- LoginResultType[LoginResultType["NotAllowed"] = 3] = "NotAllowed";
33
- LoginResultType[LoginResultType["LockedOut"] = 4] = "LockedOut";
34
- LoginResultType[LoginResultType["RequiresTwoFactor"] = 5] = "RequiresTwoFactor";
35
- })(LoginResultType || (LoginResultType = {}));
36
- var loginResultTypeOptions = i1.mapEnumToOptions(LoginResultType);
37
-
38
- var index$4 = /*#__PURE__*/Object.freeze({
39
- __proto__: null,
40
- get LoginResultType () { return LoginResultType; },
41
- loginResultTypeOptions: loginResultTypeOptions
42
- });
43
-
44
- var AccountService$1 = /** @class */ (function () {
45
- function AccountService(restService) {
46
- var _this = this;
47
- this.restService = restService;
48
- this.apiName = 'AbpAccount';
49
- this.checkPasswordByLogin = function (login) { return _this.restService.request({
50
- method: 'POST',
51
- url: '/api/account/check-password',
52
- body: login,
53
- }, { apiName: _this.apiName }); };
54
- this.loginByLogin = function (login) { return _this.restService.request({
55
- method: 'POST',
56
- url: '/api/account/login',
57
- body: login,
58
- }, { apiName: _this.apiName }); };
59
- this.logout = function () { return _this.restService.request({
60
- method: 'GET',
61
- url: '/api/account/logout',
62
- }, { apiName: _this.apiName }); };
63
- }
64
- return AccountService;
65
- }());
66
- AccountService$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, deps: [{ token: i1__namespace.RestService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
67
- AccountService$1.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, providedIn: 'root' });
68
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService$1, decorators: [{
69
- type: i0.Injectable,
70
- args: [{
71
- providedIn: 'root',
72
- }]
73
- }], ctorParameters: function () { return [{ type: i1__namespace.RestService }]; } });
74
-
75
- var index$3 = /*#__PURE__*/Object.freeze({
76
- __proto__: null,
77
- Models: index$4,
78
- AccountService: AccountService$1
79
- });
80
-
81
- var index$2 = /*#__PURE__*/Object.freeze({
82
- __proto__: null,
83
- Controllers: index$3
84
- });
85
-
86
- var index$1 = /*#__PURE__*/Object.freeze({
87
- __proto__: null,
88
- Account: index$2
89
- });
90
-
91
- var index = /*#__PURE__*/Object.freeze({
92
- __proto__: null,
93
- Areas: index$1
94
- });
95
-
96
- var AccountService = /** @class */ (function () {
97
- function AccountService(restService) {
98
- var _this = this;
99
- this.restService = restService;
100
- this.apiName = 'AbpAccount';
101
- this.register = function (input) { return _this.restService.request({
102
- method: 'POST',
103
- url: '/api/account/register',
104
- body: input,
105
- }, { apiName: _this.apiName }); };
106
- this.resetPassword = function (input) { return _this.restService.request({
107
- method: 'POST',
108
- url: '/api/account/reset-password',
109
- body: input,
110
- }, { apiName: _this.apiName }); };
111
- this.sendPasswordResetCode = function (input) { return _this.restService.request({
112
- method: 'POST',
113
- url: '/api/account/send-password-reset-code',
114
- body: input,
115
- }, { apiName: _this.apiName }); };
116
- }
117
- return AccountService;
118
- }());
119
- AccountService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService, deps: [{ token: i1__namespace.RestService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
120
- AccountService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService, providedIn: 'root' });
121
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: AccountService, decorators: [{
122
- type: i0.Injectable,
123
- args: [{
124
- providedIn: 'root',
125
- }]
126
- }], ctorParameters: function () { return [{ type: i1__namespace.RestService }]; } });
127
-
128
- var ProfileService = /** @class */ (function () {
129
- function ProfileService(restService) {
130
- var _this = this;
131
- this.restService = restService;
132
- this.apiName = 'AbpAccount';
133
- this.changePassword = function (input) { return _this.restService.request({
134
- method: 'POST',
135
- url: '/api/account/my-profile/change-password',
136
- body: input,
137
- }, { apiName: _this.apiName }); };
138
- this.get = function () { return _this.restService.request({
139
- method: 'GET',
140
- url: '/api/account/my-profile',
141
- }, { apiName: _this.apiName }); };
142
- this.update = function (input) { return _this.restService.request({
143
- method: 'PUT',
144
- url: '/api/account/my-profile',
145
- body: input,
146
- }, { apiName: _this.apiName }); };
147
- }
148
- return ProfileService;
149
- }());
150
- ProfileService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ProfileService, deps: [{ token: i1__namespace.RestService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
151
- ProfileService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ProfileService, providedIn: 'root' });
152
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: ProfileService, decorators: [{
153
- type: i0.Injectable,
154
- args: [{
155
- providedIn: 'root',
156
- }]
157
- }], ctorParameters: function () { return [{ type: i1__namespace.RestService }]; } });
158
-
159
- /**
160
- * Generated bundle index. Do not edit.
161
- */
162
-
163
- exports.AccountService = AccountService;
164
- exports.ProfileService = ProfileService;
165
- exports.Web = index;
166
-
167
- Object.defineProperty(exports, '__esModule', { value: true });
168
-
169
- }));
170
- //# sourceMappingURL=abp-ng.account.core-proxy.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abp-ng.account.core-proxy.umd.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';\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":["mapEnumToOptions","AccountService","Injectable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAEA,IAAY,eAMX;IAND,WAAY,eAAe;QACzB,2DAAW,CAAA;QACX,+FAA6B,CAAA;QAC7B,iEAAc,CAAA;QACd,+DAAa,CAAA;QACb,+EAAqB,CAAA;IACvB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;IAEM,IAAM,sBAAsB,GAAGA,mBAAgB,CAAC,eAAe,CAAC;;;;;;;;ICHvE;QA0BE,wBAAoB,WAAwB;YAA5C,iBAAgD;YAA5B,gBAAW,GAAX,WAAW,CAAa;YAzB5C,YAAO,GAAG,YAAY,CAAC;YAEvB,yBAAoB,GAAG,UAAC,KAAoB,IAC1C,OAAA,KAAI,CAAC,WAAW,CAAC,OAAO,CAAsB;gBAC5C,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,6BAA6B;gBAClC,IAAI,EAAE,KAAK;aACZ,EACD,EAAE,OAAO,EAAE,KAAI,CAAC,OAAO,EAAE,CAAC,GAAA,CAAC;YAE7B,iBAAY,GAAG,UAAC,KAAoB,IAClC,OAAA,KAAI,CAAC,WAAW,CAAC,OAAO,CAAsB;gBAC5C,MAAM,EAAE,MAAM;gBACd,GAAG,EAAE,oBAAoB;gBACzB,IAA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