@abp/ng.identity 4.4.0 → 5.0.0-beta.1
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.identity.d.ts +1 -11
- package/bundles/abp-ng.identity-config.umd.js +30 -7
- package/bundles/abp-ng.identity-config.umd.js.map +1 -1
- package/bundles/abp-ng.identity-proxy.umd.js +213 -0
- package/bundles/abp-ng.identity-proxy.umd.js.map +1 -0
- package/bundles/abp-ng.identity.umd.js +652 -1185
- package/bundles/abp-ng.identity.umd.js.map +1 -1
- package/config/abp-ng.identity-config.d.ts +1 -1
- package/config/identity-config.module.d.ts +4 -0
- package/config/package.json +0 -1
- package/config/providers/route.provider.d.ts +1 -1
- package/esm2015/abp-ng.identity.js +1 -10
- package/esm2015/abp-ng.identity.js.map +1 -0
- package/esm2015/config/abp-ng.identity-config.js +1 -2
- package/esm2015/config/abp-ng.identity-config.js.map +1 -0
- package/esm2015/config/enums/index.js +1 -1
- package/esm2015/config/enums/index.js.map +1 -0
- package/esm2015/config/enums/policy-names.js +1 -1
- package/esm2015/config/enums/policy-names.js.map +1 -0
- package/esm2015/config/enums/route-names.js +1 -1
- package/esm2015/config/enums/route-names.js.map +1 -0
- package/esm2015/config/identity-config.module.js +8 -4
- package/esm2015/config/identity-config.module.js.map +1 -0
- package/esm2015/config/providers/index.js +1 -1
- package/esm2015/config/providers/index.js.map +1 -0
- package/esm2015/config/providers/route.provider.js +1 -1
- package/esm2015/config/providers/route.provider.js.map +1 -0
- package/esm2015/config/public-api.js +1 -1
- package/esm2015/config/public-api.js.map +1 -0
- package/esm2015/lib/components/index.js +1 -1
- package/esm2015/lib/components/index.js.map +1 -0
- package/esm2015/lib/components/roles/roles.component.js +44 -46
- package/esm2015/lib/components/roles/roles.component.js.map +1 -0
- package/esm2015/lib/components/users/users.component.js +69 -67
- package/esm2015/lib/components/users/users.component.js.map +1 -0
- package/esm2015/lib/defaults/default-roles-entity-actions.js +14 -16
- package/esm2015/lib/defaults/default-roles-entity-actions.js.map +1 -0
- package/esm2015/lib/defaults/default-roles-entity-props.js +13 -15
- package/esm2015/lib/defaults/default-roles-entity-props.js.map +1 -0
- package/esm2015/lib/defaults/default-roles-form-props.js +3 -5
- package/esm2015/lib/defaults/default-roles-form-props.js.map +1 -0
- package/esm2015/lib/defaults/default-roles-toolbar-actions.js +5 -7
- package/esm2015/lib/defaults/default-roles-toolbar-actions.js.map +1 -0
- package/esm2015/lib/defaults/default-users-entity-actions.js +13 -15
- package/esm2015/lib/defaults/default-users-entity-actions.js.map +1 -0
- package/esm2015/lib/defaults/default-users-entity-props.js +1 -1
- package/esm2015/lib/defaults/default-users-entity-props.js.map +1 -0
- package/esm2015/lib/defaults/default-users-form-props.js +8 -11
- package/esm2015/lib/defaults/default-users-form-props.js.map +1 -0
- package/esm2015/lib/defaults/default-users-toolbar-actions.js +5 -7
- package/esm2015/lib/defaults/default-users-toolbar-actions.js.map +1 -0
- package/esm2015/lib/enums/components.js +1 -1
- package/esm2015/lib/enums/components.js.map +1 -0
- package/esm2015/lib/enums/index.js +1 -1
- package/esm2015/lib/enums/index.js.map +1 -0
- package/esm2015/lib/guards/extensions.guard.js +7 -7
- package/esm2015/lib/guards/extensions.guard.js.map +1 -0
- package/esm2015/lib/guards/index.js +1 -1
- package/esm2015/lib/guards/index.js.map +1 -0
- package/esm2015/lib/identity-routing.module.js +27 -23
- package/esm2015/lib/identity-routing.module.js.map +1 -0
- package/esm2015/lib/identity.module.js +38 -20
- package/esm2015/lib/identity.module.js.map +1 -0
- package/esm2015/lib/models/config-options.js +1 -1
- package/esm2015/lib/models/config-options.js.map +1 -0
- package/esm2015/lib/models/index.js +1 -2
- package/esm2015/lib/models/index.js.map +1 -0
- package/esm2015/lib/tokens/extensions.token.js +1 -1
- package/esm2015/lib/tokens/extensions.token.js.map +1 -0
- package/esm2015/lib/tokens/index.js +1 -1
- package/esm2015/lib/tokens/index.js.map +1 -0
- package/esm2015/proxy/abp-ng.identity-proxy.js +5 -0
- package/esm2015/proxy/abp-ng.identity-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/identity/identity-role.service.js +46 -0
- package/esm2015/proxy/lib/proxy/identity/identity-role.service.js.map +1 -0
- package/esm2015/proxy/lib/proxy/identity/identity-user-lookup.service.js +37 -0
- package/esm2015/proxy/lib/proxy/identity/identity-user-lookup.service.js.map +1 -0
- package/esm2015/proxy/lib/proxy/identity/identity-user.service.js +63 -0
- package/esm2015/proxy/lib/proxy/identity/identity-user.service.js.map +1 -0
- package/esm2015/proxy/lib/proxy/identity/index.js +6 -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/lib/proxy/identity/profile.service.js +33 -0
- package/esm2015/proxy/lib/proxy/identity/profile.service.js.map +1 -0
- package/esm2015/proxy/lib/proxy/users/index.js +2 -0
- package/esm2015/proxy/lib/proxy/users/index.js.map +1 -0
- package/esm2015/proxy/lib/proxy/users/models.js +2 -0
- package/esm2015/proxy/lib/proxy/users/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 -6
- package/esm2015/public-api.js.map +1 -0
- package/fesm2015/abp-ng.identity-config.js +8 -4
- package/fesm2015/abp-ng.identity-config.js.map +1 -1
- package/fesm2015/abp-ng.identity-proxy.js +173 -0
- package/fesm2015/abp-ng.identity-proxy.js.map +1 -0
- package/fesm2015/abp-ng.identity.js +224 -628
- package/fesm2015/abp-ng.identity.js.map +1 -1
- package/lib/components/roles/roles.component.d.ts +8 -8
- package/lib/components/users/users.component.d.ts +8 -10
- package/lib/defaults/default-roles-entity-actions.d.ts +1 -1
- package/lib/defaults/default-roles-entity-props.d.ts +1 -1
- package/lib/defaults/default-roles-form-props.d.ts +1 -1
- package/lib/defaults/default-roles-toolbar-actions.d.ts +1 -1
- package/lib/defaults/default-users-entity-actions.d.ts +1 -1
- package/lib/defaults/default-users-entity-props.d.ts +1 -1
- package/lib/defaults/default-users-form-props.d.ts +1 -1
- package/lib/defaults/default-users-toolbar-actions.d.ts +1 -1
- package/lib/guards/extensions.guard.d.ts +3 -0
- package/lib/identity-routing.module.d.ts +5 -0
- package/lib/identity.module.d.ts +13 -0
- package/lib/models/config-options.d.ts +1 -1
- package/lib/models/index.d.ts +0 -1
- package/lib/tokens/extensions.token.d.ts +1 -2
- package/package.json +7 -5
- package/proxy/abp-ng.identity-proxy.d.ts +5 -0
- package/proxy/lib/index.d.ts +2 -0
- package/{lib → proxy/lib}/proxy/identity/identity-role.service.d.ts +6 -3
- package/{lib → proxy/lib}/proxy/identity/identity-user-lookup.service.d.ts +3 -0
- package/{lib → proxy/lib}/proxy/identity/identity-user.service.d.ts +4 -1
- package/{lib → proxy/lib}/proxy/identity/index.d.ts +0 -0
- package/{lib → proxy/lib}/proxy/identity/models.d.ts +33 -28
- package/{lib → proxy/lib}/proxy/identity/profile.service.d.ts +3 -0
- package/{lib → proxy/lib}/proxy/users/index.d.ts +0 -0
- package/proxy/lib/proxy/users/models.d.ts +11 -0
- package/proxy/package.json +10 -0
- package/proxy/public-api.d.ts +1 -0
- package/public-api.d.ts +0 -5
- package/abp-ng.identity.metadata.json +0 -1
- package/bundles/abp-ng.identity-config.umd.min.js +0 -2
- package/bundles/abp-ng.identity-config.umd.min.js.map +0 -1
- package/bundles/abp-ng.identity.umd.min.js +0 -2
- package/bundles/abp-ng.identity.umd.min.js.map +0 -1
- package/config/abp-ng.identity-config.metadata.json +0 -1
- package/esm2015/lib/actions/identity.actions.js +0 -67
- package/esm2015/lib/actions/index.js +0 -2
- package/esm2015/lib/models/identity.js +0 -2
- package/esm2015/lib/proxy/identity/identity-role.service.js +0 -47
- package/esm2015/lib/proxy/identity/identity-user-lookup.service.js +0 -38
- package/esm2015/lib/proxy/identity/identity-user.service.js +0 -64
- package/esm2015/lib/proxy/identity/index.js +0 -6
- package/esm2015/lib/proxy/identity/models.js +0 -2
- package/esm2015/lib/proxy/identity/profile.service.js +0 -34
- package/esm2015/lib/proxy/users/index.js +0 -2
- package/esm2015/lib/proxy/users/models.js +0 -2
- package/esm2015/lib/services/identity-state.service.js +0 -66
- package/esm2015/lib/services/index.js +0 -2
- package/esm2015/lib/states/identity.state.js +0 -128
- package/esm2015/lib/states/index.js +0 -2
- package/lib/actions/identity.actions.d.ts +0 -65
- package/lib/actions/index.d.ts +0 -1
- package/lib/models/identity.d.ts +0 -11
- package/lib/proxy/users/models.d.ts +0 -11
- package/lib/services/identity-state.service.d.ts +0 -21
- package/lib/services/index.d.ts +0 -1
- package/lib/states/identity.state.d.ts +0 -26
- package/lib/states/index.d.ts +0 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@abp/ng.core'), require('@abp/ng.theme.shared'), require('@abp/ng.theme.shared/extensions'), require('@angular/core'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@abp/ng.identity', ['exports', '@abp/ng.core', '@abp/ng.theme.shared', '@abp/ng.theme.shared/extensions', '@angular/core', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.abp = global.abp || {}, global.abp.ng = global.abp.ng || {}, global.abp.ng.identity = {}), global.i1, global.
|
|
5
|
-
}(this, (function (exports, i1,
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@abp/ng.core'), require('@abp/ng.theme.shared'), require('@abp/ng.theme.shared/extensions'), require('@angular/core'), require('rxjs/operators'), require('@abp/ng.identity/proxy'), require('@abp/ng.permission-management'), require('@angular/forms'), require('@ngx-validate/core'), require('@ng-bootstrap/ng-bootstrap'), require('@angular/common'), require('rxjs'), require('@angular/router')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@abp/ng.identity', ['exports', '@abp/ng.core', '@abp/ng.theme.shared', '@abp/ng.theme.shared/extensions', '@angular/core', 'rxjs/operators', '@abp/ng.identity/proxy', '@abp/ng.permission-management', '@angular/forms', '@ngx-validate/core', '@ng-bootstrap/ng-bootstrap', '@angular/common', 'rxjs', '@angular/router'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.abp = global.abp || {}, global.abp.ng = global.abp.ng || {}, global.abp.ng.identity = {}), global.i1, global.i2, global.i4, global.ng.core, global.rxjs.operators, global.abp.ng.identity.proxy, global.i5, global.ng.forms, global.i9, global.i6, global.ng.common, global.rxjs, global.ng.router));
|
|
5
|
+
}(this, (function (exports, i1, i2, i4, i0, operators, i3, i5, i4$1, i9, i6, i8, rxjs, i1$1) { 'use strict';
|
|
8
6
|
|
|
9
7
|
function _interopNamespace(e) {
|
|
10
8
|
if (e && e.__esModule) return e;
|
|
@@ -27,170 +25,483 @@
|
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
28
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
29
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
30
30
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
31
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
32
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
33
|
+
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
34
|
+
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
35
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
36
|
+
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
31
37
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
32
|
-
var snq__default = /*#__PURE__*/_interopDefaultLegacy(snq);
|
|
33
38
|
|
|
34
|
-
var
|
|
35
|
-
function
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var DeleteRole = /** @class */ (function () {
|
|
49
|
-
function DeleteRole(payload) {
|
|
50
|
-
this.payload = payload;
|
|
51
|
-
}
|
|
52
|
-
return DeleteRole;
|
|
53
|
-
}());
|
|
54
|
-
DeleteRole.type = '[Identity] Delete Role';
|
|
55
|
-
var CreateRole = /** @class */ (function () {
|
|
56
|
-
function CreateRole(payload) {
|
|
57
|
-
this.payload = payload;
|
|
58
|
-
}
|
|
59
|
-
return CreateRole;
|
|
60
|
-
}());
|
|
61
|
-
CreateRole.type = '[Identity] Create Role';
|
|
62
|
-
var UpdateRole = /** @class */ (function () {
|
|
63
|
-
function UpdateRole(payload) {
|
|
64
|
-
this.payload = payload;
|
|
65
|
-
}
|
|
66
|
-
return UpdateRole;
|
|
67
|
-
}());
|
|
68
|
-
UpdateRole.type = '[Identity] Update Role';
|
|
69
|
-
var GetUsers = /** @class */ (function () {
|
|
70
|
-
function GetUsers(payload) {
|
|
71
|
-
this.payload = payload;
|
|
72
|
-
}
|
|
73
|
-
return GetUsers;
|
|
74
|
-
}());
|
|
75
|
-
GetUsers.type = '[Identity] Get Users';
|
|
76
|
-
var GetUserById = /** @class */ (function () {
|
|
77
|
-
function GetUserById(payload) {
|
|
78
|
-
this.payload = payload;
|
|
79
|
-
}
|
|
80
|
-
return GetUserById;
|
|
81
|
-
}());
|
|
82
|
-
GetUserById.type = '[Identity] Get User By Id';
|
|
83
|
-
var DeleteUser = /** @class */ (function () {
|
|
84
|
-
function DeleteUser(payload) {
|
|
85
|
-
this.payload = payload;
|
|
86
|
-
}
|
|
87
|
-
return DeleteUser;
|
|
88
|
-
}());
|
|
89
|
-
DeleteUser.type = '[Identity] Delete User';
|
|
90
|
-
var CreateUser = /** @class */ (function () {
|
|
91
|
-
function CreateUser(payload) {
|
|
92
|
-
this.payload = payload;
|
|
93
|
-
}
|
|
94
|
-
return CreateUser;
|
|
95
|
-
}());
|
|
96
|
-
CreateUser.type = '[Identity] Create User';
|
|
97
|
-
var UpdateUser = /** @class */ (function () {
|
|
98
|
-
function UpdateUser(payload) {
|
|
99
|
-
this.payload = payload;
|
|
39
|
+
var RolesComponent = /** @class */ (function () {
|
|
40
|
+
function RolesComponent(list, confirmationService, injector, service) {
|
|
41
|
+
var _this = this;
|
|
42
|
+
this.list = list;
|
|
43
|
+
this.confirmationService = confirmationService;
|
|
44
|
+
this.injector = injector;
|
|
45
|
+
this.service = service;
|
|
46
|
+
this.data = { items: [], totalCount: 0 };
|
|
47
|
+
this.visiblePermissions = false;
|
|
48
|
+
this.modalBusy = false;
|
|
49
|
+
this.permissionManagementKey = "PermissionManagement.PermissionManagementComponent" /* PermissionManagement */;
|
|
50
|
+
this.onVisiblePermissionChange = function (event) {
|
|
51
|
+
_this.visiblePermissions = event;
|
|
52
|
+
};
|
|
100
53
|
}
|
|
101
|
-
|
|
54
|
+
RolesComponent.prototype.ngOnInit = function () {
|
|
55
|
+
this.hookToQuery();
|
|
56
|
+
};
|
|
57
|
+
RolesComponent.prototype.buildForm = function () {
|
|
58
|
+
var data = new i4.FormPropData(this.injector, this.selected);
|
|
59
|
+
this.form = i4.generateFormFromProps(data);
|
|
60
|
+
};
|
|
61
|
+
RolesComponent.prototype.openModal = function () {
|
|
62
|
+
this.buildForm();
|
|
63
|
+
this.isModalVisible = true;
|
|
64
|
+
};
|
|
65
|
+
RolesComponent.prototype.add = function () {
|
|
66
|
+
this.selected = {};
|
|
67
|
+
this.openModal();
|
|
68
|
+
};
|
|
69
|
+
RolesComponent.prototype.edit = function (id) {
|
|
70
|
+
var _this = this;
|
|
71
|
+
this.service.get(id).subscribe(function (res) {
|
|
72
|
+
_this.selected = res;
|
|
73
|
+
_this.openModal();
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
RolesComponent.prototype.save = function () {
|
|
77
|
+
var _this = this;
|
|
78
|
+
if (!this.form.valid)
|
|
79
|
+
return;
|
|
80
|
+
this.modalBusy = true;
|
|
81
|
+
var id = this.selected.id;
|
|
82
|
+
(id
|
|
83
|
+
? this.service.update(id, Object.assign(Object.assign({}, this.selected), this.form.value))
|
|
84
|
+
: this.service.create(this.form.value))
|
|
85
|
+
.pipe(operators.finalize(function () { return (_this.modalBusy = false); }))
|
|
86
|
+
.subscribe(function () {
|
|
87
|
+
_this.isModalVisible = false;
|
|
88
|
+
_this.list.get();
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
RolesComponent.prototype.delete = function (id, name) {
|
|
92
|
+
var _this = this;
|
|
93
|
+
this.confirmationService
|
|
94
|
+
.warn('AbpIdentity::RoleDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
|
|
95
|
+
messageLocalizationParams: [name],
|
|
96
|
+
})
|
|
97
|
+
.subscribe(function (status) {
|
|
98
|
+
if (status === i2.Confirmation.Status.confirm) {
|
|
99
|
+
_this.service.delete(id).subscribe(function () { return _this.list.get(); });
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
RolesComponent.prototype.hookToQuery = function () {
|
|
104
|
+
var _this = this;
|
|
105
|
+
this.list.hookToQuery(function (query) { return _this.service.getList(query); }).subscribe(function (res) { return (_this.data = res); });
|
|
106
|
+
};
|
|
107
|
+
RolesComponent.prototype.openPermissionsModal = function (providerKey) {
|
|
108
|
+
var _this = this;
|
|
109
|
+
this.providerKey = providerKey;
|
|
110
|
+
setTimeout(function () {
|
|
111
|
+
_this.visiblePermissions = true;
|
|
112
|
+
}, 0);
|
|
113
|
+
};
|
|
114
|
+
RolesComponent.prototype.sort = function (data) {
|
|
115
|
+
var _a = data.sorts[0], prop = _a.prop, dir = _a.dir;
|
|
116
|
+
this.list.sortKey = prop;
|
|
117
|
+
this.list.sortOrder = dir;
|
|
118
|
+
};
|
|
119
|
+
return RolesComponent;
|
|
102
120
|
}());
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
121
|
+
RolesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RolesComponent, deps: [{ token: i1__namespace.ListService }, { token: i2__namespace.ConfirmationService }, { token: i0__namespace.Injector }, { token: i3__namespace.IdentityRoleService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
122
|
+
RolesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: RolesComponent, selector: "abp-roles", providers: [
|
|
123
|
+
i1.ListService,
|
|
124
|
+
{
|
|
125
|
+
provide: i4.EXTENSIONS_IDENTIFIER,
|
|
126
|
+
useValue: "Identity.RolesComponent" /* Roles */,
|
|
127
|
+
},
|
|
128
|
+
], ngImport: i0__namespace, template: "<div id=\"identity-roles-wrapper\" class=\"card\">\n <div class=\"card-header\">\n <div class=\"row\">\n <div class=\"col col-md-6\">\n <h5 class=\"card-title\">{{ 'AbpIdentity::Roles' | abpLocalization }}</h5>\n </div>\n <div class=\"text-right col col-md-6\">\n <abp-page-toolbar [record]=\"data.items\"></abp-page-toolbar>\n </div>\n </div>\n </div>\n\n <div class=\"card-body\">\n <abp-extensible-table\n [data]=\"data.items\"\n [recordsTotal]=\"data.totalCount\"\n [list]=\"list\"\n ></abp-extensible-table>\n </div>\n</div>\n\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\n <ng-template #abpHeader>\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}</h3>\n </ng-template>\n\n <ng-template #abpBody>\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" validateOnSubmit>\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\n </button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"form?.invalid\" (click)=\"save()\">{{\n 'AbpIdentity::Save' | abpLocalization\n }}</abp-button>\n </ng-template>\n</abp-modal>\n\n<abp-permission-management\n #abpPermissionManagement=\"abpPermissionManagement\"\n *abpReplaceableTemplate=\"\n {\n inputs: {\n providerName: { value: 'R' },\n providerKey: { value: providerKey },\n visible: { value: visiblePermissions, twoWay: true },\n hideBadges: { value: true }\n },\n outputs: { visibleChange: onVisiblePermissionChange },\n componentKey: permissionManagementKey\n };\n let init = initTemplate\n \"\n (abpInit)=\"init(abpPermissionManagement)\"\n>\n</abp-permission-management>\n", components: [{ type: i4__namespace.PageToolbarComponent, selector: "abp-page-toolbar", exportAs: ["abpPageToolbar"] }, { type: i4__namespace.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2__namespace.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i4__namespace.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i2__namespace.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { type: i5__namespace.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }], directives: [{ type: i4__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i4__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", inputs: ["blueprints", "errorTemplate", "invalidClasses", "mapErrorsFn", "skipValidation", "targetSelector", "validateOnSubmit"] }, { type: i2__namespace.ModalCloseDirective, selector: "[abpClose]" }, { type: i1__namespace.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { type: i1__namespace.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }], pipes: { "abpLocalization": i1__namespace.LocalizationPipe } });
|
|
129
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: RolesComponent, decorators: [{
|
|
130
|
+
type: i0.Component,
|
|
131
|
+
args: [{
|
|
132
|
+
selector: 'abp-roles',
|
|
133
|
+
templateUrl: './roles.component.html',
|
|
134
|
+
providers: [
|
|
135
|
+
i1.ListService,
|
|
136
|
+
{
|
|
137
|
+
provide: i4.EXTENSIONS_IDENTIFIER,
|
|
138
|
+
useValue: "Identity.RolesComponent" /* Roles */,
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
}]
|
|
142
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.ListService }, { type: i2__namespace.ConfirmationService }, { type: i0__namespace.Injector }, { type: i3__namespace.IdentityRoleService }]; } });
|
|
143
|
+
|
|
144
|
+
var UsersComponent = /** @class */ (function () {
|
|
145
|
+
function UsersComponent(list, confirmationService, service, fb, injector) {
|
|
146
|
+
var _this = this;
|
|
147
|
+
this.list = list;
|
|
148
|
+
this.confirmationService = confirmationService;
|
|
149
|
+
this.service = service;
|
|
150
|
+
this.fb = fb;
|
|
151
|
+
this.injector = injector;
|
|
152
|
+
this.data = { items: [], totalCount: 0 };
|
|
153
|
+
this.visiblePermissions = false;
|
|
154
|
+
this.modalBusy = false;
|
|
155
|
+
this.permissionManagementKey = "PermissionManagement.PermissionManagementComponent" /* PermissionManagement */;
|
|
156
|
+
this.trackByFn = function (index, item) { return Object.keys(item)[0] || index; };
|
|
157
|
+
this.onVisiblePermissionChange = function (event) {
|
|
158
|
+
_this.visiblePermissions = event;
|
|
159
|
+
};
|
|
107
160
|
}
|
|
108
|
-
|
|
161
|
+
Object.defineProperty(UsersComponent.prototype, "roleGroups", {
|
|
162
|
+
get: function () {
|
|
163
|
+
var _a;
|
|
164
|
+
return ((_a = this.form.get('roleNames')) === null || _a === void 0 ? void 0 : _a.controls) || [];
|
|
165
|
+
},
|
|
166
|
+
enumerable: false,
|
|
167
|
+
configurable: true
|
|
168
|
+
});
|
|
169
|
+
UsersComponent.prototype.ngOnInit = function () {
|
|
170
|
+
this.hookToQuery();
|
|
171
|
+
};
|
|
172
|
+
UsersComponent.prototype.buildForm = function () {
|
|
173
|
+
var _this = this;
|
|
174
|
+
var data = new i4.FormPropData(this.injector, this.selected);
|
|
175
|
+
this.form = i4.generateFormFromProps(data);
|
|
176
|
+
this.service.getAssignableRoles().subscribe(function (_b) {
|
|
177
|
+
var items = _b.items;
|
|
178
|
+
_this.roles = items;
|
|
179
|
+
_this.form.addControl('roleNames', _this.fb.array(_this.roles.map(function (role) {
|
|
180
|
+
var _b;
|
|
181
|
+
var _a;
|
|
182
|
+
return _this.fb.group((_b = {},
|
|
183
|
+
_b[role.name] = [
|
|
184
|
+
_this.selected.id
|
|
185
|
+
? !!((_a = _this.selectedUserRoles) === null || _a === void 0 ? void 0 : _a.find(function (userRole) { return userRole.id === role.id; }))
|
|
186
|
+
: role.isDefault,
|
|
187
|
+
],
|
|
188
|
+
_b));
|
|
189
|
+
})));
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
UsersComponent.prototype.openModal = function () {
|
|
193
|
+
this.buildForm();
|
|
194
|
+
this.isModalVisible = true;
|
|
195
|
+
};
|
|
196
|
+
UsersComponent.prototype.add = function () {
|
|
197
|
+
this.selected = {};
|
|
198
|
+
this.selectedUserRoles = [];
|
|
199
|
+
this.openModal();
|
|
200
|
+
};
|
|
201
|
+
UsersComponent.prototype.edit = function (id) {
|
|
202
|
+
var _this = this;
|
|
203
|
+
this.service
|
|
204
|
+
.get(id)
|
|
205
|
+
.pipe(operators.tap(function (user) { return (_this.selected = user); }), operators.switchMap(function () { return _this.service.getRoles(id); }))
|
|
206
|
+
.subscribe(function (userRole) {
|
|
207
|
+
_this.selectedUserRoles = userRole.items || [];
|
|
208
|
+
_this.openModal();
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
UsersComponent.prototype.save = function () {
|
|
212
|
+
var _this = this;
|
|
213
|
+
if (!this.form.valid || this.modalBusy)
|
|
214
|
+
return;
|
|
215
|
+
this.modalBusy = true;
|
|
216
|
+
var _b = this.form.value.roleNames, roleNames = _b === void 0 ? [] : _b;
|
|
217
|
+
var mappedRoleNames = roleNames.filter(function (role) { return !!role[Object.keys(role)[0]]; }).map(function (role) { return Object.keys(role)[0]; }) ||
|
|
218
|
+
[];
|
|
219
|
+
var id = this.selected.id;
|
|
220
|
+
(id
|
|
221
|
+
? this.service.update(id, Object.assign(Object.assign(Object.assign({}, this.selected), this.form.value), { roleNames: mappedRoleNames }))
|
|
222
|
+
: this.service.create(Object.assign(Object.assign({}, this.form.value), { roleNames: mappedRoleNames })))
|
|
223
|
+
.pipe(operators.finalize(function () { return (_this.modalBusy = false); }))
|
|
224
|
+
.subscribe(function () {
|
|
225
|
+
_this.isModalVisible = false;
|
|
226
|
+
_this.list.get();
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
UsersComponent.prototype.delete = function (id, userName) {
|
|
230
|
+
var _this = this;
|
|
231
|
+
this.confirmationService
|
|
232
|
+
.warn('AbpIdentity::UserDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
|
|
233
|
+
messageLocalizationParams: [userName],
|
|
234
|
+
})
|
|
235
|
+
.subscribe(function (status) {
|
|
236
|
+
if (status === i2.Confirmation.Status.confirm) {
|
|
237
|
+
_this.service.delete(id).subscribe(function () { return _this.list.get(); });
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
};
|
|
241
|
+
UsersComponent.prototype.sort = function (data) {
|
|
242
|
+
var _b = data.sorts[0], prop = _b.prop, dir = _b.dir;
|
|
243
|
+
this.list.sortKey = prop;
|
|
244
|
+
this.list.sortOrder = dir;
|
|
245
|
+
};
|
|
246
|
+
UsersComponent.prototype.hookToQuery = function () {
|
|
247
|
+
var _this = this;
|
|
248
|
+
this.list.hookToQuery(function (query) { return _this.service.getList(query); }).subscribe(function (res) { return (_this.data = res); });
|
|
249
|
+
};
|
|
250
|
+
UsersComponent.prototype.openPermissionsModal = function (providerKey) {
|
|
251
|
+
var _this = this;
|
|
252
|
+
this.providerKey = providerKey;
|
|
253
|
+
setTimeout(function () {
|
|
254
|
+
_this.visiblePermissions = true;
|
|
255
|
+
}, 0);
|
|
256
|
+
};
|
|
257
|
+
return UsersComponent;
|
|
109
258
|
}());
|
|
110
|
-
|
|
259
|
+
UsersComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: UsersComponent, deps: [{ token: i1__namespace.ListService }, { token: i2__namespace.ConfirmationService }, { token: i3__namespace.IdentityUserService }, { token: i4__namespace$1.FormBuilder }, { token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
260
|
+
UsersComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: UsersComponent, selector: "abp-users", providers: [
|
|
261
|
+
i1.ListService,
|
|
262
|
+
{
|
|
263
|
+
provide: i4.EXTENSIONS_IDENTIFIER,
|
|
264
|
+
useValue: "Identity.UsersComponent" /* Users */,
|
|
265
|
+
},
|
|
266
|
+
], viewQueries: [{ propertyName: "modalContent", first: true, predicate: ["modalContent"], descendants: true }], ngImport: i0__namespace, template: "<div id=\"identity-roles-wrapper\" class=\"card\">\n <div class=\"card-header\">\n <div class=\"row\">\n <div class=\"col col-md-6\">\n <h5 class=\"card-title\">{{ 'AbpIdentity::Users' | abpLocalization }}</h5>\n </div>\n <div class=\"text-right col col-md-6\">\n <abp-page-toolbar [record]=\"data.items\"></abp-page-toolbar>\n </div>\n </div>\n </div>\n <div class=\"card-body\">\n <div id=\"data-tables-table-filter\" class=\"data-tables-filter\">\n <div class=\"input-group\">\n <input\n type=\"search\"\n class=\"form-control\"\n [placeholder]=\"'AbpUi::PagerSearch' | abpLocalization\"\n [(ngModel)]=\"list.filter\"\n />\n </div>\n </div>\n\n <abp-extensible-table\n [data]=\"data.items\"\n [recordsTotal]=\"data.totalCount\"\n [list]=\"list\"\n ></abp-extensible-table>\n </div>\n</div>\n\n<abp-modal [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\n <ng-template #abpHeader>\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewUser') | abpLocalization }}</h3>\n </ng-template>\n\n <ng-template #abpBody>\n <ng-template #loaderRef\n ><div class=\"text-center\"><i class=\"fa fa-pulse fa-spinner\"></i></div\n ></ng-template>\n\n <form *ngIf=\"form; else loaderRef\" [formGroup]=\"form\" (ngSubmit)=\"save()\">\n <ul ngbNav #nav=\"ngbNav\" class=\"nav-tabs\">\n <li ngbNavItem>\n <a ngbNavLink>{{ 'AbpIdentity::UserInformations' | abpLocalization }}</a>\n <ng-template ngbNavContent>\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\n </ng-template>\n </li>\n\n <li ngbNavItem>\n <a ngbNavLink>{{ 'AbpIdentity::Roles' | abpLocalization }}</a>\n <ng-template ngbNavContent>\n <div\n *ngFor=\"let roleGroup of roleGroups; let i = index; trackBy: trackByFn\"\n class=\"custom-checkbox custom-control mb-2\"\n >\n <input\n type=\"checkbox\"\n class=\"custom-control-input\"\n [attr.id]=\"'roles-' + i\"\n [formControl]=\"roleGroup.controls[roles[i].name]\"\n />\n <label class=\"custom-control-label\" [attr.for]=\"'roles-' + i\">{{\n roles[i].name\n }}</label>\n </div>\n </ng-template>\n </li>\n </ul>\n\n <div class=\"mt-2 fade-in-top\" [ngbNavOutlet]=\"nav\"></div>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\n </button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"form?.invalid\" (click)=\"save()\">{{\n 'AbpIdentity::Save' | abpLocalization\n }}</abp-button>\n </ng-template>\n</abp-modal>\n\n<abp-permission-management\n #abpPermissionManagement=\"abpPermissionManagement\"\n *abpReplaceableTemplate=\"\n {\n inputs: {\n providerName: { value: 'U' },\n providerKey: { value: providerKey },\n visible: { value: visiblePermissions, twoWay: true }\n },\n outputs: { visibleChange: onVisiblePermissionChange },\n componentKey: permissionManagementKey\n };\n let init = initTemplate\n \"\n (abpInit)=\"init(abpPermissionManagement)\"\n>\n</abp-permission-management>\n", components: [{ type: i4__namespace.PageToolbarComponent, selector: "abp-page-toolbar", exportAs: ["abpPageToolbar"] }, { type: i4__namespace.ExtensibleTableComponent, selector: "abp-extensible-table", inputs: ["actionsText", "data", "list", "recordsTotal", "actionsColumnWidth", "actionsTemplate"], exportAs: ["abpExtensibleTable"] }, { type: i2__namespace.ModalComponent, selector: "abp-modal", inputs: ["visible", "busy", "options", "suppressUnsavedChangesWarning"], outputs: ["visibleChange", "init", "appear", "disappear"] }, { type: i4__namespace.ExtensibleFormComponent, selector: "abp-extensible-form", inputs: ["selectedRecord"], exportAs: ["abpExtensibleForm"] }, { type: i6__namespace.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { type: i2__namespace.ButtonComponent, selector: "abp-button", inputs: ["buttonId", "buttonClass", "buttonType", "iconClass", "loading", "disabled", "attributes"], outputs: ["click", "focus", "blur", "abpClick", "abpFocus", "abpBlur"] }, { type: i5__namespace.PermissionManagementComponent, selector: "abp-permission-management", inputs: ["providerName", "providerKey", "hideBadges", "visible"], outputs: ["visibleChange"], exportAs: ["abpPermissionManagement"] }], directives: [{ type: i4__namespace$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace.FormSubmitDirective, selector: "form[ngSubmit][formGroup]", inputs: ["debounce", "notValidateOnSubmit"], outputs: ["ngSubmit"] }, { type: i4__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", inputs: ["blueprints", "errorTemplate", "invalidClasses", "mapErrorsFn", "skipValidation", "targetSelector", "validateOnSubmit"] }, { type: i6__namespace.NgbNav, selector: "[ngbNav]", inputs: ["destroyOnHide", "orientation", "roles", "keyboard", "activeId"], outputs: ["activeIdChange", "navChange"], exportAs: ["ngbNav"] }, { type: i6__namespace.NgbNavItem, selector: "[ngbNavItem]", inputs: ["disabled", "domId", "destroyOnHide", "ngbNavItem"], exportAs: ["ngbNavItem"] }, { type: i6__namespace.NgbNavLink, selector: "a[ngbNavLink]" }, { type: i6__namespace.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { type: i8__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i4__namespace$1.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i9__namespace.ValidationDirective, selector: "[formControl],[formControlName]", inputs: ["blueprints", "errorTemplate", "invalidClasses", "mapErrorsFn", "skipValidation", "targetSelector", "validateOnSubmit"] }, { type: i2__namespace.ModalCloseDirective, selector: "[abpClose]" }, { type: i1__namespace.ReplaceableTemplateDirective, selector: "[abpReplaceableTemplate]", inputs: ["abpReplaceableTemplate"] }, { type: i1__namespace.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }], pipes: { "abpLocalization": i1__namespace.LocalizationPipe } });
|
|
267
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: UsersComponent, decorators: [{
|
|
268
|
+
type: i0.Component,
|
|
269
|
+
args: [{
|
|
270
|
+
selector: 'abp-users',
|
|
271
|
+
templateUrl: './users.component.html',
|
|
272
|
+
providers: [
|
|
273
|
+
i1.ListService,
|
|
274
|
+
{
|
|
275
|
+
provide: i4.EXTENSIONS_IDENTIFIER,
|
|
276
|
+
useValue: "Identity.UsersComponent" /* Users */,
|
|
277
|
+
},
|
|
278
|
+
],
|
|
279
|
+
}]
|
|
280
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.ListService }, { type: i2__namespace.ConfirmationService }, { type: i3__namespace.IdentityUserService }, { type: i4__namespace$1.FormBuilder }, { type: i0__namespace.Injector }]; }, propDecorators: { modalContent: [{
|
|
281
|
+
type: i0.ViewChild,
|
|
282
|
+
args: ['modalContent', { static: false }]
|
|
283
|
+
}] } });
|
|
111
284
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
285
|
+
var DEFAULT_ROLES_ENTITY_ACTIONS = i4.EntityAction.createMany([
|
|
286
|
+
{
|
|
287
|
+
text: 'AbpIdentity::Edit',
|
|
288
|
+
action: function (data) {
|
|
289
|
+
var component = data.getInjected(RolesComponent);
|
|
290
|
+
component.edit(data.record.id);
|
|
291
|
+
},
|
|
292
|
+
permission: 'AbpIdentity.Roles.Update',
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
text: 'AbpIdentity::Permissions',
|
|
296
|
+
action: function (data) {
|
|
297
|
+
var component = data.getInjected(RolesComponent);
|
|
298
|
+
component.openPermissionsModal(data.record.name);
|
|
299
|
+
},
|
|
300
|
+
permission: 'AbpIdentity.Roles.ManagePermissions',
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
text: 'AbpIdentity::Delete',
|
|
304
|
+
action: function (data) {
|
|
305
|
+
var component = data.getInjected(RolesComponent);
|
|
306
|
+
component.delete(data.record.id, data.record.name);
|
|
307
|
+
},
|
|
308
|
+
permission: 'AbpIdentity.Roles.Delete',
|
|
309
|
+
visible: function (data) { return !data.record.isStatic; },
|
|
310
|
+
},
|
|
311
|
+
]);
|
|
312
|
+
|
|
313
|
+
var DEFAULT_ROLES_ENTITY_PROPS = i4.EntityProp.createMany([
|
|
314
|
+
{
|
|
315
|
+
type: "string" /* String */,
|
|
316
|
+
name: 'name',
|
|
317
|
+
displayName: 'AbpIdentity::RoleName',
|
|
318
|
+
sortable: true,
|
|
319
|
+
valueResolver: function (data) {
|
|
320
|
+
var l10n = data.getInjected(i1.LocalizationService);
|
|
321
|
+
var t = l10n.instant.bind(l10n);
|
|
322
|
+
var _a = data.record, isDefault = _a.isDefault, isPublic = _a.isPublic, name = _a.name;
|
|
323
|
+
return rxjs.of(name +
|
|
324
|
+
(isDefault
|
|
325
|
+
? "<span class=\"badge badge-pill badge-success ml-1\">" + t('AbpIdentity::DisplayName:IsDefault') + "</span>"
|
|
326
|
+
: '') +
|
|
327
|
+
(isPublic
|
|
328
|
+
? "<span class=\"badge badge-pill badge-info ml-1\">" + t('AbpIdentity::DisplayName:IsPublic') + "</span>"
|
|
329
|
+
: ''));
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
]);
|
|
333
|
+
|
|
334
|
+
var DEFAULT_ROLES_CREATE_FORM_PROPS = i4.FormProp.createMany([
|
|
335
|
+
{
|
|
336
|
+
type: "string" /* String */,
|
|
337
|
+
name: 'name',
|
|
338
|
+
displayName: 'AbpIdentity::RoleName',
|
|
339
|
+
id: 'role-name',
|
|
340
|
+
disabled: function (data) { return data.record && data.record.isStatic; },
|
|
341
|
+
validators: function () { return [i4$1.Validators.required]; },
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
type: "boolean" /* Boolean */,
|
|
345
|
+
name: 'isDefault',
|
|
346
|
+
displayName: 'AbpIdentity::DisplayName:IsDefault',
|
|
347
|
+
id: 'role-is-default',
|
|
348
|
+
defaultValue: false,
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
type: "boolean" /* Boolean */,
|
|
352
|
+
name: 'isPublic',
|
|
353
|
+
displayName: 'AbpIdentity::DisplayName:IsPublic',
|
|
354
|
+
id: 'role-is-public',
|
|
355
|
+
defaultValue: false,
|
|
356
|
+
},
|
|
357
|
+
]);
|
|
358
|
+
var DEFAULT_ROLES_EDIT_FORM_PROPS = DEFAULT_ROLES_CREATE_FORM_PROPS;
|
|
359
|
+
|
|
360
|
+
var DEFAULT_ROLES_TOOLBAR_ACTIONS = i4.ToolbarAction.createMany([
|
|
361
|
+
{
|
|
362
|
+
text: 'AbpIdentity::NewRole',
|
|
363
|
+
action: function (data) {
|
|
364
|
+
var component = data.getInjected(RolesComponent);
|
|
365
|
+
component.add();
|
|
366
|
+
},
|
|
367
|
+
permission: 'AbpIdentity.Roles.Create',
|
|
368
|
+
icon: 'fa fa-plus',
|
|
369
|
+
},
|
|
370
|
+
]);
|
|
371
|
+
|
|
372
|
+
var DEFAULT_USERS_ENTITY_ACTIONS = i4.EntityAction.createMany([
|
|
373
|
+
{
|
|
374
|
+
text: 'AbpIdentity::Edit',
|
|
375
|
+
action: function (data) {
|
|
376
|
+
var component = data.getInjected(UsersComponent);
|
|
377
|
+
component.edit(data.record.id);
|
|
378
|
+
},
|
|
379
|
+
permission: 'AbpIdentity.Users.Update',
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
text: 'AbpIdentity::Permissions',
|
|
383
|
+
action: function (data) {
|
|
384
|
+
var component = data.getInjected(UsersComponent);
|
|
385
|
+
component.openPermissionsModal(data.record.id);
|
|
386
|
+
},
|
|
387
|
+
permission: 'AbpIdentity.Users.ManagePermissions',
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
text: 'AbpIdentity::Delete',
|
|
391
|
+
action: function (data) {
|
|
392
|
+
var component = data.getInjected(UsersComponent);
|
|
393
|
+
component.delete(data.record.id, data.record.name || data.record.userName);
|
|
394
|
+
},
|
|
395
|
+
permission: 'AbpIdentity.Users.Delete',
|
|
396
|
+
},
|
|
397
|
+
]);
|
|
398
|
+
|
|
399
|
+
var DEFAULT_USERS_ENTITY_PROPS = i4.EntityProp.createMany([
|
|
400
|
+
{
|
|
401
|
+
type: "string" /* String */,
|
|
402
|
+
name: 'userName',
|
|
403
|
+
displayName: 'AbpIdentity::UserName',
|
|
404
|
+
sortable: true,
|
|
405
|
+
columnWidth: 250,
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
type: "string" /* String */,
|
|
409
|
+
name: 'email',
|
|
410
|
+
displayName: 'AbpIdentity::EmailAddress',
|
|
411
|
+
sortable: true,
|
|
412
|
+
columnWidth: 250,
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
type: "string" /* String */,
|
|
416
|
+
name: 'phoneNumber',
|
|
417
|
+
displayName: 'AbpIdentity::PhoneNumber',
|
|
418
|
+
sortable: true,
|
|
419
|
+
columnWidth: 250,
|
|
420
|
+
},
|
|
421
|
+
]);
|
|
422
|
+
|
|
423
|
+
/*! *****************************************************************************
|
|
424
|
+
Copyright (c) Microsoft Corporation.
|
|
425
|
+
|
|
426
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
427
|
+
purpose with or without fee is hereby granted.
|
|
428
|
+
|
|
429
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
430
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
431
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
432
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
433
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
434
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
435
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
436
|
+
***************************************************************************** */
|
|
437
|
+
/* global Reflect, Promise */
|
|
438
|
+
var extendStatics = function (d, b) {
|
|
439
|
+
extendStatics = Object.setPrototypeOf ||
|
|
440
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
441
|
+
function (d, b) { for (var p in b)
|
|
442
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
443
|
+
d[p] = b[p]; };
|
|
444
|
+
return extendStatics(d, b);
|
|
445
|
+
};
|
|
446
|
+
function __extends(d, b) {
|
|
447
|
+
if (typeof b !== "function" && b !== null)
|
|
448
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
449
|
+
extendStatics(d, b);
|
|
450
|
+
function __() { this.constructor = d; }
|
|
451
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
452
|
+
}
|
|
453
|
+
var __assign = function () {
|
|
454
|
+
__assign = Object.assign || function __assign(t) {
|
|
455
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
456
|
+
s = arguments[i];
|
|
457
|
+
for (var p in s)
|
|
458
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
459
|
+
t[p] = s[p];
|
|
460
|
+
}
|
|
461
|
+
return t;
|
|
462
|
+
};
|
|
463
|
+
return __assign.apply(this, arguments);
|
|
464
|
+
};
|
|
465
|
+
function __rest(s, e) {
|
|
466
|
+
var t = {};
|
|
467
|
+
for (var p in s)
|
|
468
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
469
|
+
t[p] = s[p];
|
|
470
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
471
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
472
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
473
|
+
t[p[i]] = s[p[i]];
|
|
474
|
+
}
|
|
475
|
+
return t;
|
|
476
|
+
}
|
|
477
|
+
function __decorate(decorators, target, key, desc) {
|
|
478
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
479
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
480
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
481
|
+
else
|
|
482
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
483
|
+
if (d = decorators[i])
|
|
484
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
485
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
486
|
+
}
|
|
487
|
+
function __param(paramIndex, decorator) {
|
|
488
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
489
|
+
}
|
|
490
|
+
function __metadata(metadataKey, metadataValue) {
|
|
491
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
492
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
493
|
+
}
|
|
494
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
495
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
496
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
497
|
+
function fulfilled(value) { try {
|
|
498
|
+
step(generator.next(value));
|
|
499
|
+
}
|
|
500
|
+
catch (e) {
|
|
501
|
+
reject(e);
|
|
502
|
+
} }
|
|
503
|
+
function rejected(value) { try {
|
|
504
|
+
step(generator["throw"](value));
|
|
194
505
|
}
|
|
195
506
|
catch (e) {
|
|
196
507
|
reject(e);
|
|
@@ -331,760 +642,109 @@
|
|
|
331
642
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
332
643
|
s += arguments[i].length;
|
|
333
644
|
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
334
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
335
|
-
r[k] = a[j];
|
|
336
|
-
return r;
|
|
337
|
-
}
|
|
338
|
-
function __spreadArray(to, from, pack) {
|
|
339
|
-
if (pack || arguments.length === 2)
|
|
340
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
341
|
-
if (ar || !(i in from)) {
|
|
342
|
-
if (!ar)
|
|
343
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
344
|
-
ar[i] = from[i];
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
return to.concat(ar || from);
|
|
348
|
-
}
|
|
349
|
-
function __await(v) {
|
|
350
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
351
|
-
}
|
|
352
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
353
|
-
if (!Symbol.asyncIterator)
|
|
354
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
355
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
356
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
357
|
-
function verb(n) { if (g[n])
|
|
358
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
359
|
-
function resume(n, v) { try {
|
|
360
|
-
step(g[n](v));
|
|
361
|
-
}
|
|
362
|
-
catch (e) {
|
|
363
|
-
settle(q[0][3], e);
|
|
364
|
-
} }
|
|
365
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
366
|
-
function fulfill(value) { resume("next", value); }
|
|
367
|
-
function reject(value) { resume("throw", value); }
|
|
368
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
369
|
-
resume(q[0][0], q[0][1]); }
|
|
370
|
-
}
|
|
371
|
-
function __asyncDelegator(o) {
|
|
372
|
-
var i, p;
|
|
373
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
374
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
375
|
-
}
|
|
376
|
-
function __asyncValues(o) {
|
|
377
|
-
if (!Symbol.asyncIterator)
|
|
378
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
379
|
-
var m = o[Symbol.asyncIterator], i;
|
|
380
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
381
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
382
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
383
|
-
}
|
|
384
|
-
function __makeTemplateObject(cooked, raw) {
|
|
385
|
-
if (Object.defineProperty) {
|
|
386
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
387
|
-
}
|
|
388
|
-
else {
|
|
389
|
-
cooked.raw = raw;
|
|
390
|
-
}
|
|
391
|
-
return cooked;
|
|
392
|
-
}
|
|
393
|
-
;
|
|
394
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
395
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
396
|
-
}) : function (o, v) {
|
|
397
|
-
o["default"] = v;
|
|
398
|
-
};
|
|
399
|
-
function __importStar(mod) {
|
|
400
|
-
if (mod && mod.__esModule)
|
|
401
|
-
return mod;
|
|
402
|
-
var result = {};
|
|
403
|
-
if (mod != null)
|
|
404
|
-
for (var k in mod)
|
|
405
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
406
|
-
__createBinding(result, mod, k);
|
|
407
|
-
__setModuleDefault(result, mod);
|
|
408
|
-
return result;
|
|
409
|
-
}
|
|
410
|
-
function __importDefault(mod) {
|
|
411
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
412
|
-
}
|
|
413
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
414
|
-
if (kind === "a" && !f)
|
|
415
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
416
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
417
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
418
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
419
|
-
}
|
|
420
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
421
|
-
if (kind === "m")
|
|
422
|
-
throw new TypeError("Private method is not writable");
|
|
423
|
-
if (kind === "a" && !f)
|
|
424
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
425
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
426
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
427
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
var IdentityRoleService = /** @class */ (function () {
|
|
431
|
-
function IdentityRoleService(restService) {
|
|
432
|
-
var _this = this;
|
|
433
|
-
this.restService = restService;
|
|
434
|
-
this.apiName = 'AbpIdentity';
|
|
435
|
-
this.create = function (input) { return _this.restService.request({
|
|
436
|
-
method: 'POST',
|
|
437
|
-
url: '/api/identity/roles',
|
|
438
|
-
body: input,
|
|
439
|
-
}, { apiName: _this.apiName }); };
|
|
440
|
-
this.delete = function (id) { return _this.restService.request({
|
|
441
|
-
method: 'DELETE',
|
|
442
|
-
url: "/api/identity/roles/" + id,
|
|
443
|
-
}, { apiName: _this.apiName }); };
|
|
444
|
-
this.get = function (id) { return _this.restService.request({
|
|
445
|
-
method: 'GET',
|
|
446
|
-
url: "/api/identity/roles/" + id,
|
|
447
|
-
}, { apiName: _this.apiName }); };
|
|
448
|
-
this.getAllList = function () { return _this.restService.request({
|
|
449
|
-
method: 'GET',
|
|
450
|
-
url: '/api/identity/roles/all',
|
|
451
|
-
}, { apiName: _this.apiName }); };
|
|
452
|
-
this.getList = function (input) { return _this.restService.request({
|
|
453
|
-
method: 'GET',
|
|
454
|
-
url: '/api/identity/roles',
|
|
455
|
-
params: { sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
456
|
-
}, { apiName: _this.apiName }); };
|
|
457
|
-
this.update = function (id, input) { return _this.restService.request({
|
|
458
|
-
method: 'PUT',
|
|
459
|
-
url: "/api/identity/roles/" + id,
|
|
460
|
-
body: input,
|
|
461
|
-
}, { apiName: _this.apiName }); };
|
|
462
|
-
}
|
|
463
|
-
return IdentityRoleService;
|
|
464
|
-
}());
|
|
465
|
-
IdentityRoleService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IdentityRoleService_Factory() { return new IdentityRoleService(i0__namespace.ɵɵinject(i1__namespace.RestService)); }, token: IdentityRoleService, providedIn: "root" });
|
|
466
|
-
IdentityRoleService.decorators = [
|
|
467
|
-
{ type: i0.Injectable, args: [{
|
|
468
|
-
providedIn: 'root',
|
|
469
|
-
},] }
|
|
470
|
-
];
|
|
471
|
-
IdentityRoleService.ctorParameters = function () { return [
|
|
472
|
-
{ type: i1.RestService }
|
|
473
|
-
]; };
|
|
474
|
-
|
|
475
|
-
var IdentityUserService = /** @class */ (function () {
|
|
476
|
-
function IdentityUserService(restService) {
|
|
477
|
-
var _this = this;
|
|
478
|
-
this.restService = restService;
|
|
479
|
-
this.apiName = 'AbpIdentity';
|
|
480
|
-
this.create = function (input) { return _this.restService.request({
|
|
481
|
-
method: 'POST',
|
|
482
|
-
url: '/api/identity/users',
|
|
483
|
-
body: input,
|
|
484
|
-
}, { apiName: _this.apiName }); };
|
|
485
|
-
this.delete = function (id) { return _this.restService.request({
|
|
486
|
-
method: 'DELETE',
|
|
487
|
-
url: "/api/identity/users/" + id,
|
|
488
|
-
}, { apiName: _this.apiName }); };
|
|
489
|
-
this.findByEmail = function (email) { return _this.restService.request({
|
|
490
|
-
method: 'GET',
|
|
491
|
-
url: "/api/identity/users/by-email/" + email,
|
|
492
|
-
}, { apiName: _this.apiName }); };
|
|
493
|
-
this.findByUsername = function (username) { return _this.restService.request({
|
|
494
|
-
method: 'GET',
|
|
495
|
-
url: '/api/identity/users/by-username/{userName}',
|
|
496
|
-
}, { apiName: _this.apiName }); };
|
|
497
|
-
this.get = function (id) { return _this.restService.request({
|
|
498
|
-
method: 'GET',
|
|
499
|
-
url: "/api/identity/users/" + id,
|
|
500
|
-
}, { apiName: _this.apiName }); };
|
|
501
|
-
this.getAssignableRoles = function () { return _this.restService.request({
|
|
502
|
-
method: 'GET',
|
|
503
|
-
url: '/api/identity/users/assignable-roles',
|
|
504
|
-
}, { apiName: _this.apiName }); };
|
|
505
|
-
this.getList = function (input) { return _this.restService.request({
|
|
506
|
-
method: 'GET',
|
|
507
|
-
url: '/api/identity/users',
|
|
508
|
-
params: { filter: input.filter, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
509
|
-
}, { apiName: _this.apiName }); };
|
|
510
|
-
this.getRoles = function (id) { return _this.restService.request({
|
|
511
|
-
method: 'GET',
|
|
512
|
-
url: "/api/identity/users/" + id + "/roles",
|
|
513
|
-
}, { apiName: _this.apiName }); };
|
|
514
|
-
this.update = function (id, input) { return _this.restService.request({
|
|
515
|
-
method: 'PUT',
|
|
516
|
-
url: "/api/identity/users/" + id,
|
|
517
|
-
body: input,
|
|
518
|
-
}, { apiName: _this.apiName }); };
|
|
519
|
-
this.updateRoles = function (id, input) { return _this.restService.request({
|
|
520
|
-
method: 'PUT',
|
|
521
|
-
url: "/api/identity/users/" + id + "/roles",
|
|
522
|
-
body: input,
|
|
523
|
-
}, { apiName: _this.apiName }); };
|
|
524
|
-
}
|
|
525
|
-
return IdentityUserService;
|
|
526
|
-
}());
|
|
527
|
-
IdentityUserService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IdentityUserService_Factory() { return new IdentityUserService(i0__namespace.ɵɵinject(i1__namespace.RestService)); }, token: IdentityUserService, providedIn: "root" });
|
|
528
|
-
IdentityUserService.decorators = [
|
|
529
|
-
{ type: i0.Injectable, args: [{
|
|
530
|
-
providedIn: 'root',
|
|
531
|
-
},] }
|
|
532
|
-
];
|
|
533
|
-
IdentityUserService.ctorParameters = function () { return [
|
|
534
|
-
{ type: i1.RestService }
|
|
535
|
-
]; };
|
|
536
|
-
|
|
537
|
-
exports.ɵc = /** @class */ (function () {
|
|
538
|
-
function IdentityState(identityUserService, identityRoleService) {
|
|
539
|
-
this.identityUserService = identityUserService;
|
|
540
|
-
this.identityRoleService = identityRoleService;
|
|
541
|
-
}
|
|
542
|
-
IdentityState.getRoles = function (_a) {
|
|
543
|
-
var roles = _a.roles;
|
|
544
|
-
return roles.items || [];
|
|
545
|
-
};
|
|
546
|
-
IdentityState.getRolesTotalCount = function (_a) {
|
|
547
|
-
var roles = _a.roles;
|
|
548
|
-
return roles.totalCount || 0;
|
|
549
|
-
};
|
|
550
|
-
IdentityState.getUsers = function (_a) {
|
|
551
|
-
var users = _a.users;
|
|
552
|
-
return users.items || [];
|
|
553
|
-
};
|
|
554
|
-
IdentityState.getUsersTotalCount = function (_a) {
|
|
555
|
-
var users = _a.users;
|
|
556
|
-
return users.totalCount || 0;
|
|
557
|
-
};
|
|
558
|
-
IdentityState.prototype.getRoles = function (_a, _b) {
|
|
559
|
-
var patchState = _a.patchState;
|
|
560
|
-
var payload = _b.payload;
|
|
561
|
-
return this.identityRoleService.getList(payload).pipe(operators.tap(function (roles) { return patchState({
|
|
562
|
-
roles: roles,
|
|
563
|
-
}); }));
|
|
564
|
-
};
|
|
565
|
-
IdentityState.prototype.getRole = function (_a, _b) {
|
|
566
|
-
var patchState = _a.patchState;
|
|
567
|
-
var payload = _b.payload;
|
|
568
|
-
return this.identityRoleService.get(payload).pipe(operators.tap(function (selectedRole) { return patchState({
|
|
569
|
-
selectedRole: selectedRole,
|
|
570
|
-
}); }));
|
|
571
|
-
};
|
|
572
|
-
IdentityState.prototype.deleteRole = function (_, _a) {
|
|
573
|
-
var payload = _a.payload;
|
|
574
|
-
return this.identityRoleService.delete(payload);
|
|
575
|
-
};
|
|
576
|
-
IdentityState.prototype.addRole = function (_, _a) {
|
|
577
|
-
var payload = _a.payload;
|
|
578
|
-
return this.identityRoleService.create(payload);
|
|
579
|
-
};
|
|
580
|
-
IdentityState.prototype.updateRole = function (_a, _b) {
|
|
581
|
-
var getState = _a.getState;
|
|
582
|
-
var payload = _b.payload;
|
|
583
|
-
return this.identityRoleService.update(payload.id, Object.assign(Object.assign({}, getState().selectedRole), payload));
|
|
584
|
-
};
|
|
585
|
-
IdentityState.prototype.getUsers = function (_a, _b) {
|
|
586
|
-
var patchState = _a.patchState;
|
|
587
|
-
var payload = _b.payload;
|
|
588
|
-
return this.identityUserService.getList(payload).pipe(operators.tap(function (users) { return patchState({
|
|
589
|
-
users: users,
|
|
590
|
-
}); }));
|
|
591
|
-
};
|
|
592
|
-
IdentityState.prototype.getUser = function (_a, _b) {
|
|
593
|
-
var patchState = _a.patchState;
|
|
594
|
-
var payload = _b.payload;
|
|
595
|
-
return this.identityUserService.get(payload).pipe(operators.tap(function (selectedUser) { return patchState({
|
|
596
|
-
selectedUser: selectedUser,
|
|
597
|
-
}); }));
|
|
598
|
-
};
|
|
599
|
-
IdentityState.prototype.deleteUser = function (_, _a) {
|
|
600
|
-
var payload = _a.payload;
|
|
601
|
-
return this.identityUserService.delete(payload);
|
|
602
|
-
};
|
|
603
|
-
IdentityState.prototype.addUser = function (_, _a) {
|
|
604
|
-
var payload = _a.payload;
|
|
605
|
-
return this.identityUserService.create(payload);
|
|
606
|
-
};
|
|
607
|
-
IdentityState.prototype.updateUser = function (_a, _b) {
|
|
608
|
-
var getState = _a.getState;
|
|
609
|
-
var payload = _b.payload;
|
|
610
|
-
return this.identityUserService.update(payload.id, Object.assign(Object.assign({}, getState().selectedUser), payload));
|
|
611
|
-
};
|
|
612
|
-
IdentityState.prototype.getUserRoles = function (_a, _b) {
|
|
613
|
-
var patchState = _a.patchState;
|
|
614
|
-
var payload = _b.payload;
|
|
615
|
-
return this.identityUserService.getRoles(payload).pipe(operators.pluck('items'), operators.tap(function (selectedUserRoles) { return patchState({
|
|
616
|
-
selectedUserRoles: selectedUserRoles,
|
|
617
|
-
}); }));
|
|
618
|
-
};
|
|
619
|
-
return IdentityState;
|
|
620
|
-
}());
|
|
621
|
-
exports.ɵc.decorators = [
|
|
622
|
-
{ type: i0.Injectable }
|
|
623
|
-
];
|
|
624
|
-
exports.ɵc.ctorParameters = function () { return [
|
|
625
|
-
{ type: IdentityUserService },
|
|
626
|
-
{ type: IdentityRoleService }
|
|
627
|
-
]; };
|
|
628
|
-
__decorate([
|
|
629
|
-
i1$1.Action(GetRoles)
|
|
630
|
-
], exports.ɵc.prototype, "getRoles", null);
|
|
631
|
-
__decorate([
|
|
632
|
-
i1$1.Action(GetRoleById)
|
|
633
|
-
], exports.ɵc.prototype, "getRole", null);
|
|
634
|
-
__decorate([
|
|
635
|
-
i1$1.Action(DeleteRole)
|
|
636
|
-
], exports.ɵc.prototype, "deleteRole", null);
|
|
637
|
-
__decorate([
|
|
638
|
-
i1$1.Action(CreateRole)
|
|
639
|
-
], exports.ɵc.prototype, "addRole", null);
|
|
640
|
-
__decorate([
|
|
641
|
-
i1$1.Action(UpdateRole)
|
|
642
|
-
], exports.ɵc.prototype, "updateRole", null);
|
|
643
|
-
__decorate([
|
|
644
|
-
i1$1.Action(GetUsers)
|
|
645
|
-
], exports.ɵc.prototype, "getUsers", null);
|
|
646
|
-
__decorate([
|
|
647
|
-
i1$1.Action(GetUserById)
|
|
648
|
-
], exports.ɵc.prototype, "getUser", null);
|
|
649
|
-
__decorate([
|
|
650
|
-
i1$1.Action(DeleteUser)
|
|
651
|
-
], exports.ɵc.prototype, "deleteUser", null);
|
|
652
|
-
__decorate([
|
|
653
|
-
i1$1.Action(CreateUser)
|
|
654
|
-
], exports.ɵc.prototype, "addUser", null);
|
|
655
|
-
__decorate([
|
|
656
|
-
i1$1.Action(UpdateUser)
|
|
657
|
-
], exports.ɵc.prototype, "updateUser", null);
|
|
658
|
-
__decorate([
|
|
659
|
-
i1$1.Action(GetUserRoles)
|
|
660
|
-
], exports.ɵc.prototype, "getUserRoles", null);
|
|
661
|
-
__decorate([
|
|
662
|
-
i1$1.Selector()
|
|
663
|
-
], exports.ɵc, "getRoles", null);
|
|
664
|
-
__decorate([
|
|
665
|
-
i1$1.Selector()
|
|
666
|
-
], exports.ɵc, "getRolesTotalCount", null);
|
|
667
|
-
__decorate([
|
|
668
|
-
i1$1.Selector()
|
|
669
|
-
], exports.ɵc, "getUsers", null);
|
|
670
|
-
__decorate([
|
|
671
|
-
i1$1.Selector()
|
|
672
|
-
], exports.ɵc, "getUsersTotalCount", null);
|
|
673
|
-
exports.ɵc = __decorate([
|
|
674
|
-
i1$1.State({
|
|
675
|
-
name: 'IdentityState',
|
|
676
|
-
defaults: { roles: {}, selectedRole: {}, users: {}, selectedUser: {} },
|
|
677
|
-
})
|
|
678
|
-
], exports.ɵc);
|
|
679
|
-
|
|
680
|
-
var ɵ0$9 = "Identity.RolesComponent" /* Roles */;
|
|
681
|
-
var RolesComponent = /** @class */ (function () {
|
|
682
|
-
function RolesComponent(list, confirmationService, store, injector) {
|
|
683
|
-
var _this = this;
|
|
684
|
-
this.list = list;
|
|
685
|
-
this.confirmationService = confirmationService;
|
|
686
|
-
this.store = store;
|
|
687
|
-
this.injector = injector;
|
|
688
|
-
this.visiblePermissions = false;
|
|
689
|
-
this.modalBusy = false;
|
|
690
|
-
this.permissionManagementKey = "PermissionManagement.PermissionManagementComponent" /* PermissionManagement */;
|
|
691
|
-
this.onVisiblePermissionChange = function (event) {
|
|
692
|
-
_this.visiblePermissions = event;
|
|
693
|
-
};
|
|
694
|
-
}
|
|
695
|
-
RolesComponent.prototype.ngOnInit = function () {
|
|
696
|
-
this.hookToQuery();
|
|
697
|
-
};
|
|
698
|
-
RolesComponent.prototype.buildForm = function () {
|
|
699
|
-
var data = new extensions.FormPropData(this.injector, this.selected);
|
|
700
|
-
this.form = extensions.generateFormFromProps(data);
|
|
701
|
-
};
|
|
702
|
-
RolesComponent.prototype.openModal = function () {
|
|
703
|
-
this.buildForm();
|
|
704
|
-
this.isModalVisible = true;
|
|
705
|
-
};
|
|
706
|
-
RolesComponent.prototype.add = function () {
|
|
707
|
-
this.selected = {};
|
|
708
|
-
this.openModal();
|
|
709
|
-
};
|
|
710
|
-
RolesComponent.prototype.edit = function (id) {
|
|
711
|
-
var _this = this;
|
|
712
|
-
this.store
|
|
713
|
-
.dispatch(new GetRoleById(id))
|
|
714
|
-
.pipe(operators.pluck('IdentityState', 'selectedRole'))
|
|
715
|
-
.subscribe(function (selectedRole) {
|
|
716
|
-
_this.selected = selectedRole;
|
|
717
|
-
_this.openModal();
|
|
718
|
-
});
|
|
719
|
-
};
|
|
720
|
-
RolesComponent.prototype.save = function () {
|
|
721
|
-
var _this = this;
|
|
722
|
-
if (!this.form.valid)
|
|
723
|
-
return;
|
|
724
|
-
this.modalBusy = true;
|
|
725
|
-
this.store
|
|
726
|
-
.dispatch(this.selected.id
|
|
727
|
-
? new UpdateRole(Object.assign(Object.assign(Object.assign({}, this.selected), this.form.value), { id: this.selected.id }))
|
|
728
|
-
: new CreateRole(this.form.value))
|
|
729
|
-
.pipe(operators.finalize(function () { return (_this.modalBusy = false); }))
|
|
730
|
-
.subscribe(function () {
|
|
731
|
-
_this.isModalVisible = false;
|
|
732
|
-
_this.list.get();
|
|
733
|
-
});
|
|
734
|
-
};
|
|
735
|
-
RolesComponent.prototype.delete = function (id, name) {
|
|
736
|
-
var _this = this;
|
|
737
|
-
this.confirmationService
|
|
738
|
-
.warn('AbpIdentity::RoleDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
|
|
739
|
-
messageLocalizationParams: [name],
|
|
740
|
-
})
|
|
741
|
-
.subscribe(function (status) {
|
|
742
|
-
if (status === ng_theme_shared.Confirmation.Status.confirm) {
|
|
743
|
-
_this.store.dispatch(new DeleteRole(id)).subscribe(function () { return _this.list.get(); });
|
|
744
|
-
}
|
|
745
|
-
});
|
|
746
|
-
};
|
|
747
|
-
RolesComponent.prototype.hookToQuery = function () {
|
|
748
|
-
var _this = this;
|
|
749
|
-
this.list.hookToQuery(function (query) { return _this.store.dispatch(new GetRoles(query)); }).subscribe();
|
|
750
|
-
};
|
|
751
|
-
RolesComponent.prototype.openPermissionsModal = function (providerKey) {
|
|
752
|
-
var _this = this;
|
|
753
|
-
this.providerKey = providerKey;
|
|
754
|
-
setTimeout(function () {
|
|
755
|
-
_this.visiblePermissions = true;
|
|
756
|
-
}, 0);
|
|
757
|
-
};
|
|
758
|
-
RolesComponent.prototype.sort = function (data) {
|
|
759
|
-
var _a = data.sorts[0], prop = _a.prop, dir = _a.dir;
|
|
760
|
-
this.list.sortKey = prop;
|
|
761
|
-
this.list.sortOrder = dir;
|
|
762
|
-
};
|
|
763
|
-
return RolesComponent;
|
|
764
|
-
}());
|
|
765
|
-
RolesComponent.decorators = [
|
|
766
|
-
{ type: i0.Component, args: [{
|
|
767
|
-
selector: 'abp-roles',
|
|
768
|
-
template: "<div id=\"identity-roles-wrapper\" class=\"card\">\n <div class=\"card-header\">\n <div class=\"row\">\n <div class=\"col col-md-6\">\n <h5 class=\"card-title\">{{ 'AbpIdentity::Roles' | abpLocalization }}</h5>\n </div>\n <div class=\"text-right col col-md-6\">\n <abp-page-toolbar [record]=\"data$ | async\"></abp-page-toolbar>\n </div>\n </div>\n </div>\n\n <div class=\"card-body\">\n <abp-extensible-table\n [data]=\"data$ | async\"\n [recordsTotal]=\"totalCount$ | async\"\n [list]=\"list\"\n ></abp-extensible-table>\n </div>\n</div>\n\n<abp-modal size=\"md\" [(visible)]=\"isModalVisible\" [busy]=\"modalBusy\">\n <ng-template #abpHeader>\n <h3>{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}</h3>\n </ng-template>\n\n <ng-template #abpBody>\n <form [formGroup]=\"form\" (ngSubmit)=\"save()\" validateOnSubmit>\n <abp-extensible-form [selectedRecord]=\"selected\"></abp-extensible-form>\n </form>\n </ng-template>\n\n <ng-template #abpFooter>\n <button type=\"button\" class=\"btn btn-secondary\" abpClose>\n {{ 'AbpIdentity::Cancel' | abpLocalization }}\n </button>\n <abp-button iconClass=\"fa fa-check\" [disabled]=\"form?.invalid\" (click)=\"save()\">{{\n 'AbpIdentity::Save' | abpLocalization\n }}</abp-button>\n </ng-template>\n</abp-modal>\n\n<abp-permission-management\n #abpPermissionManagement=\"abpPermissionManagement\"\n *abpReplaceableTemplate=\"\n {\n inputs: {\n providerName: { value: 'R' },\n providerKey: { value: providerKey },\n visible: { value: visiblePermissions, twoWay: true },\n hideBadges: { value: true }\n },\n outputs: { visibleChange: onVisiblePermissionChange },\n componentKey: permissionManagementKey\n };\n let init = initTemplate\n \"\n (abpInit)=\"init(abpPermissionManagement)\"\n>\n</abp-permission-management>\n",
|
|
769
|
-
providers: [
|
|
770
|
-
i1.ListService,
|
|
771
|
-
{
|
|
772
|
-
provide: extensions.EXTENSIONS_IDENTIFIER,
|
|
773
|
-
useValue: ɵ0$9,
|
|
774
|
-
},
|
|
775
|
-
]
|
|
776
|
-
},] }
|
|
777
|
-
];
|
|
778
|
-
RolesComponent.ctorParameters = function () { return [
|
|
779
|
-
{ type: i1.ListService },
|
|
780
|
-
{ type: ng_theme_shared.ConfirmationService },
|
|
781
|
-
{ type: i1$1.Store },
|
|
782
|
-
{ type: i0.Injector }
|
|
783
|
-
]; };
|
|
784
|
-
__decorate([
|
|
785
|
-
i1$1.Select(exports.ɵc.getRoles)
|
|
786
|
-
], RolesComponent.prototype, "data$", void 0);
|
|
787
|
-
__decorate([
|
|
788
|
-
i1$1.Select(exports.ɵc.getRolesTotalCount)
|
|
789
|
-
], RolesComponent.prototype, "totalCount$", void 0);
|
|
790
|
-
|
|
791
|
-
var ɵ0$8 = "Identity.UsersComponent" /* Users */;
|
|
792
|
-
var UsersComponent = /** @class */ (function () {
|
|
793
|
-
function UsersComponent(list, confirmationService, userService, fb, store, injector) {
|
|
794
|
-
var _this = this;
|
|
795
|
-
this.list = list;
|
|
796
|
-
this.confirmationService = confirmationService;
|
|
797
|
-
this.userService = userService;
|
|
798
|
-
this.fb = fb;
|
|
799
|
-
this.store = store;
|
|
800
|
-
this.injector = injector;
|
|
801
|
-
this.visiblePermissions = false;
|
|
802
|
-
this.modalBusy = false;
|
|
803
|
-
this.permissionManagementKey = "PermissionManagement.PermissionManagementComponent" /* PermissionManagement */;
|
|
804
|
-
this.trackByFn = function (index, item) { return Object.keys(item)[0] || index; };
|
|
805
|
-
this.onVisiblePermissionChange = function (event) {
|
|
806
|
-
_this.visiblePermissions = event;
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
Object.defineProperty(UsersComponent.prototype, "roleGroups", {
|
|
810
|
-
get: function () {
|
|
811
|
-
var _this = this;
|
|
812
|
-
return snq__default['default'](function () { return _this.form.get('roleNames').controls; }, []);
|
|
813
|
-
},
|
|
814
|
-
enumerable: false,
|
|
815
|
-
configurable: true
|
|
816
|
-
});
|
|
817
|
-
UsersComponent.prototype.ngOnInit = function () {
|
|
818
|
-
this.hookToQuery();
|
|
819
|
-
};
|
|
820
|
-
UsersComponent.prototype.buildForm = function () {
|
|
821
|
-
var _this = this;
|
|
822
|
-
var data = new extensions.FormPropData(this.injector, this.selected);
|
|
823
|
-
this.form = extensions.generateFormFromProps(data);
|
|
824
|
-
this.userService.getAssignableRoles().subscribe(function (_a) {
|
|
825
|
-
var items = _a.items;
|
|
826
|
-
_this.roles = items;
|
|
827
|
-
_this.form.addControl('roleNames', _this.fb.array(_this.roles.map(function (role) {
|
|
828
|
-
var _a;
|
|
829
|
-
return _this.fb.group((_a = {},
|
|
830
|
-
_a[role.name] = [
|
|
831
|
-
_this.selected.id
|
|
832
|
-
? !!snq__default['default'](function () { return _this.selectedUserRoles.find(function (userRole) { return userRole.id === role.id; }); })
|
|
833
|
-
: role.isDefault,
|
|
834
|
-
],
|
|
835
|
-
_a));
|
|
836
|
-
})));
|
|
837
|
-
});
|
|
838
|
-
};
|
|
839
|
-
UsersComponent.prototype.openModal = function () {
|
|
840
|
-
this.buildForm();
|
|
841
|
-
this.isModalVisible = true;
|
|
842
|
-
};
|
|
843
|
-
UsersComponent.prototype.add = function () {
|
|
844
|
-
this.selected = {};
|
|
845
|
-
this.selectedUserRoles = [];
|
|
846
|
-
this.openModal();
|
|
847
|
-
};
|
|
848
|
-
UsersComponent.prototype.edit = function (id) {
|
|
849
|
-
var _this = this;
|
|
850
|
-
this.store
|
|
851
|
-
.dispatch(new GetUserById(id))
|
|
852
|
-
.pipe(operators.switchMap(function () { return _this.store.dispatch(new GetUserRoles(id)); }), operators.pluck('IdentityState'), operators.take(1))
|
|
853
|
-
.subscribe(function (state) {
|
|
854
|
-
_this.selected = state.selectedUser;
|
|
855
|
-
_this.selectedUserRoles = state.selectedUserRoles || [];
|
|
856
|
-
_this.openModal();
|
|
857
|
-
});
|
|
858
|
-
};
|
|
859
|
-
UsersComponent.prototype.save = function () {
|
|
860
|
-
var _this = this;
|
|
861
|
-
if (!this.form.valid || this.modalBusy)
|
|
862
|
-
return;
|
|
863
|
-
this.modalBusy = true;
|
|
864
|
-
var roleNames = this.form.value.roleNames;
|
|
865
|
-
var mappedRoleNames = snq__default['default'](function () { return roleNames.filter(function (role) { return !!role[Object.keys(role)[0]]; }).map(function (role) { return Object.keys(role)[0]; }); }, []);
|
|
866
|
-
this.store
|
|
867
|
-
.dispatch(this.selected.id
|
|
868
|
-
? new UpdateUser(Object.assign(Object.assign(Object.assign({}, this.selected), this.form.value), { id: this.selected.id, roleNames: mappedRoleNames }))
|
|
869
|
-
: new CreateUser(Object.assign(Object.assign({}, this.form.value), { roleNames: mappedRoleNames })))
|
|
870
|
-
.pipe(operators.finalize(function () { return (_this.modalBusy = false); }))
|
|
871
|
-
.subscribe(function () {
|
|
872
|
-
_this.isModalVisible = false;
|
|
873
|
-
_this.list.get();
|
|
874
|
-
});
|
|
875
|
-
};
|
|
876
|
-
UsersComponent.prototype.delete = function (id, userName) {
|
|
877
|
-
var _this = this;
|
|
878
|
-
this.confirmationService
|
|
879
|
-
.warn('AbpIdentity::UserDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
|
|
880
|
-
messageLocalizationParams: [userName],
|
|
881
|
-
})
|
|
882
|
-
.subscribe(function (status) {
|
|
883
|
-
if (status === ng_theme_shared.Confirmation.Status.confirm) {
|
|
884
|
-
_this.store.dispatch(new DeleteUser(id)).subscribe(function () { return _this.list.get(); });
|
|
645
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
646
|
+
r[k] = a[j];
|
|
647
|
+
return r;
|
|
648
|
+
}
|
|
649
|
+
function __spreadArray(to, from, pack) {
|
|
650
|
+
if (pack || arguments.length === 2)
|
|
651
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
652
|
+
if (ar || !(i in from)) {
|
|
653
|
+
if (!ar)
|
|
654
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
655
|
+
ar[i] = from[i];
|
|
885
656
|
}
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
};
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
{
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
{
|
|
922
|
-
{
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
var component = data.getInjected(RolesComponent);
|
|
939
|
-
component.edit(data.record.id);
|
|
940
|
-
}, ɵ1$4 = function (data) {
|
|
941
|
-
var component = data.getInjected(RolesComponent);
|
|
942
|
-
component.openPermissionsModal(data.record.name);
|
|
943
|
-
}, ɵ2$2 = function (data) {
|
|
944
|
-
var component = data.getInjected(RolesComponent);
|
|
945
|
-
component.delete(data.record.id, data.record.name);
|
|
946
|
-
}, ɵ3$1 = function (data) { return !data.record.isStatic; };
|
|
947
|
-
var DEFAULT_ROLES_ENTITY_ACTIONS = extensions.EntityAction.createMany([
|
|
948
|
-
{
|
|
949
|
-
text: 'AbpIdentity::Edit',
|
|
950
|
-
action: ɵ0$7,
|
|
951
|
-
permission: 'AbpIdentity.Roles.Update',
|
|
952
|
-
},
|
|
953
|
-
{
|
|
954
|
-
text: 'AbpIdentity::Permissions',
|
|
955
|
-
action: ɵ1$4,
|
|
956
|
-
permission: 'AbpIdentity.Roles.ManagePermissions',
|
|
957
|
-
},
|
|
958
|
-
{
|
|
959
|
-
text: 'AbpIdentity::Delete',
|
|
960
|
-
action: ɵ2$2,
|
|
961
|
-
permission: 'AbpIdentity.Roles.Delete',
|
|
962
|
-
visible: ɵ3$1,
|
|
963
|
-
},
|
|
964
|
-
]);
|
|
965
|
-
|
|
966
|
-
var ɵ0$6 = function (data) {
|
|
967
|
-
var l10n = data.getInjected(i1.LocalizationService);
|
|
968
|
-
var t = l10n.instant.bind(l10n);
|
|
969
|
-
var _a = data.record, isDefault = _a.isDefault, isPublic = _a.isPublic, name = _a.name;
|
|
970
|
-
return rxjs.of(name +
|
|
971
|
-
(isDefault
|
|
972
|
-
? "<span class=\"badge badge-pill badge-success ml-1\">" + t('AbpIdentity::DisplayName:IsDefault') + "</span>"
|
|
973
|
-
: '') +
|
|
974
|
-
(isPublic
|
|
975
|
-
? "<span class=\"badge badge-pill badge-info ml-1\">" + t('AbpIdentity::DisplayName:IsPublic') + "</span>"
|
|
976
|
-
: ''));
|
|
977
|
-
};
|
|
978
|
-
var DEFAULT_ROLES_ENTITY_PROPS = extensions.EntityProp.createMany([
|
|
979
|
-
{
|
|
980
|
-
type: "string" /* String */,
|
|
981
|
-
name: 'name',
|
|
982
|
-
displayName: 'AbpIdentity::RoleName',
|
|
983
|
-
sortable: true,
|
|
984
|
-
valueResolver: ɵ0$6,
|
|
985
|
-
},
|
|
986
|
-
]);
|
|
987
|
-
|
|
988
|
-
var ɵ0$5 = function (data) { return data.record && data.record.isStatic; }, ɵ1$3 = function () { return [forms.Validators.required]; };
|
|
989
|
-
var DEFAULT_ROLES_CREATE_FORM_PROPS = extensions.FormProp.createMany([
|
|
990
|
-
{
|
|
991
|
-
type: "string" /* String */,
|
|
992
|
-
name: 'name',
|
|
993
|
-
displayName: 'AbpIdentity::RoleName',
|
|
994
|
-
id: 'role-name',
|
|
995
|
-
disabled: ɵ0$5,
|
|
996
|
-
validators: ɵ1$3,
|
|
997
|
-
},
|
|
998
|
-
{
|
|
999
|
-
type: "boolean" /* Boolean */,
|
|
1000
|
-
name: 'isDefault',
|
|
1001
|
-
displayName: 'AbpIdentity::DisplayName:IsDefault',
|
|
1002
|
-
id: 'role-is-default',
|
|
1003
|
-
defaultValue: false,
|
|
1004
|
-
},
|
|
1005
|
-
{
|
|
1006
|
-
type: "boolean" /* Boolean */,
|
|
1007
|
-
name: 'isPublic',
|
|
1008
|
-
displayName: 'AbpIdentity::DisplayName:IsPublic',
|
|
1009
|
-
id: 'role-is-public',
|
|
1010
|
-
defaultValue: false,
|
|
1011
|
-
},
|
|
1012
|
-
]);
|
|
1013
|
-
var DEFAULT_ROLES_EDIT_FORM_PROPS = DEFAULT_ROLES_CREATE_FORM_PROPS;
|
|
1014
|
-
|
|
1015
|
-
var ɵ0$4 = function (data) {
|
|
1016
|
-
var component = data.getInjected(RolesComponent);
|
|
1017
|
-
component.add();
|
|
1018
|
-
};
|
|
1019
|
-
var DEFAULT_ROLES_TOOLBAR_ACTIONS = extensions.ToolbarAction.createMany([
|
|
1020
|
-
{
|
|
1021
|
-
text: 'AbpIdentity::NewRole',
|
|
1022
|
-
action: ɵ0$4,
|
|
1023
|
-
permission: 'AbpIdentity.Roles.Create',
|
|
1024
|
-
icon: 'fa fa-plus',
|
|
1025
|
-
},
|
|
1026
|
-
]);
|
|
1027
|
-
|
|
1028
|
-
var ɵ0$3 = function (data) {
|
|
1029
|
-
var component = data.getInjected(UsersComponent);
|
|
1030
|
-
component.edit(data.record.id);
|
|
1031
|
-
}, ɵ1$2 = function (data) {
|
|
1032
|
-
var component = data.getInjected(UsersComponent);
|
|
1033
|
-
component.openPermissionsModal(data.record.id);
|
|
1034
|
-
}, ɵ2$1 = function (data) {
|
|
1035
|
-
var component = data.getInjected(UsersComponent);
|
|
1036
|
-
component.delete(data.record.id, data.record.name || data.record.userName);
|
|
657
|
+
}
|
|
658
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
659
|
+
}
|
|
660
|
+
function __await(v) {
|
|
661
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
662
|
+
}
|
|
663
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
664
|
+
if (!Symbol.asyncIterator)
|
|
665
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
666
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
667
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
668
|
+
function verb(n) { if (g[n])
|
|
669
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
670
|
+
function resume(n, v) { try {
|
|
671
|
+
step(g[n](v));
|
|
672
|
+
}
|
|
673
|
+
catch (e) {
|
|
674
|
+
settle(q[0][3], e);
|
|
675
|
+
} }
|
|
676
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
677
|
+
function fulfill(value) { resume("next", value); }
|
|
678
|
+
function reject(value) { resume("throw", value); }
|
|
679
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
680
|
+
resume(q[0][0], q[0][1]); }
|
|
681
|
+
}
|
|
682
|
+
function __asyncDelegator(o) {
|
|
683
|
+
var i, p;
|
|
684
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
685
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
686
|
+
}
|
|
687
|
+
function __asyncValues(o) {
|
|
688
|
+
if (!Symbol.asyncIterator)
|
|
689
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
690
|
+
var m = o[Symbol.asyncIterator], i;
|
|
691
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
692
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
693
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
694
|
+
}
|
|
695
|
+
function __makeTemplateObject(cooked, raw) {
|
|
696
|
+
if (Object.defineProperty) {
|
|
697
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
cooked.raw = raw;
|
|
701
|
+
}
|
|
702
|
+
return cooked;
|
|
703
|
+
}
|
|
704
|
+
;
|
|
705
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
706
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
707
|
+
}) : function (o, v) {
|
|
708
|
+
o["default"] = v;
|
|
1037
709
|
};
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
sortable: true,
|
|
1069
|
-
columnWidth: 250,
|
|
1070
|
-
},
|
|
1071
|
-
{
|
|
1072
|
-
type: "string" /* String */,
|
|
1073
|
-
name: 'phoneNumber',
|
|
1074
|
-
displayName: 'AbpIdentity::PhoneNumber',
|
|
1075
|
-
sortable: true,
|
|
1076
|
-
columnWidth: 250,
|
|
1077
|
-
},
|
|
1078
|
-
]);
|
|
710
|
+
function __importStar(mod) {
|
|
711
|
+
if (mod && mod.__esModule)
|
|
712
|
+
return mod;
|
|
713
|
+
var result = {};
|
|
714
|
+
if (mod != null)
|
|
715
|
+
for (var k in mod)
|
|
716
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
717
|
+
__createBinding(result, mod, k);
|
|
718
|
+
__setModuleDefault(result, mod);
|
|
719
|
+
return result;
|
|
720
|
+
}
|
|
721
|
+
function __importDefault(mod) {
|
|
722
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
723
|
+
}
|
|
724
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
725
|
+
if (kind === "a" && !f)
|
|
726
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
727
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
728
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
729
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
730
|
+
}
|
|
731
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
732
|
+
if (kind === "m")
|
|
733
|
+
throw new TypeError("Private method is not writable");
|
|
734
|
+
if (kind === "a" && !f)
|
|
735
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
736
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
737
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
738
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
739
|
+
}
|
|
1079
740
|
|
|
1080
|
-
var
|
|
1081
|
-
var DEFAULT_USERS_CREATE_FORM_PROPS = extensions.FormProp.createMany([
|
|
741
|
+
var DEFAULT_USERS_CREATE_FORM_PROPS = i4.FormProp.createMany([
|
|
1082
742
|
{
|
|
1083
743
|
type: "string" /* String */,
|
|
1084
744
|
name: 'userName',
|
|
1085
745
|
displayName: 'AbpIdentity::UserName',
|
|
1086
746
|
id: 'user-name',
|
|
1087
|
-
validators:
|
|
747
|
+
validators: function () { return [i4$1.Validators.required, i4$1.Validators.maxLength(256)]; },
|
|
1088
748
|
},
|
|
1089
749
|
{
|
|
1090
750
|
type: "password" /* Password */,
|
|
@@ -1092,35 +752,35 @@
|
|
|
1092
752
|
displayName: 'AbpIdentity::Password',
|
|
1093
753
|
id: 'password',
|
|
1094
754
|
autocomplete: 'new-password',
|
|
1095
|
-
validators:
|
|
755
|
+
validators: function (data) { return __spreadArray([i4$1.Validators.required], __read(i2.getPasswordValidators({ get: data.getInjected }))); },
|
|
1096
756
|
},
|
|
1097
757
|
{
|
|
1098
758
|
type: "string" /* String */,
|
|
1099
759
|
name: 'name',
|
|
1100
760
|
displayName: 'AbpIdentity::DisplayName:Name',
|
|
1101
761
|
id: 'name',
|
|
1102
|
-
validators:
|
|
762
|
+
validators: function () { return [i4$1.Validators.maxLength(64)]; },
|
|
1103
763
|
},
|
|
1104
764
|
{
|
|
1105
765
|
type: "string" /* String */,
|
|
1106
766
|
name: 'surname',
|
|
1107
767
|
displayName: 'AbpIdentity::DisplayName:Surname',
|
|
1108
768
|
id: 'surname',
|
|
1109
|
-
validators:
|
|
769
|
+
validators: function () { return [i4$1.Validators.maxLength(64)]; },
|
|
1110
770
|
},
|
|
1111
771
|
{
|
|
1112
772
|
type: "email" /* Email */,
|
|
1113
773
|
name: 'email',
|
|
1114
774
|
displayName: 'AbpIdentity::EmailAddress',
|
|
1115
775
|
id: 'email',
|
|
1116
|
-
validators:
|
|
776
|
+
validators: function () { return [i4$1.Validators.required, i4$1.Validators.maxLength(256), i4$1.Validators.email]; },
|
|
1117
777
|
},
|
|
1118
778
|
{
|
|
1119
779
|
type: "string" /* String */,
|
|
1120
780
|
name: 'phoneNumber',
|
|
1121
781
|
displayName: 'AbpIdentity::PhoneNumber',
|
|
1122
782
|
id: 'phone-number',
|
|
1123
|
-
validators:
|
|
783
|
+
validators: function () { return [i4$1.Validators.maxLength(16)]; },
|
|
1124
784
|
},
|
|
1125
785
|
{
|
|
1126
786
|
type: "boolean" /* Boolean */,
|
|
@@ -1130,17 +790,15 @@
|
|
|
1130
790
|
defaultValue: true,
|
|
1131
791
|
},
|
|
1132
792
|
]);
|
|
1133
|
-
var
|
|
1134
|
-
var DEFAULT_USERS_EDIT_FORM_PROPS = DEFAULT_USERS_CREATE_FORM_PROPS.filter(ɵ6);
|
|
793
|
+
var DEFAULT_USERS_EDIT_FORM_PROPS = DEFAULT_USERS_CREATE_FORM_PROPS.filter(function (prop) { return prop.name !== 'password'; });
|
|
1135
794
|
|
|
1136
|
-
var
|
|
1137
|
-
var component = data.getInjected(UsersComponent);
|
|
1138
|
-
component.add();
|
|
1139
|
-
};
|
|
1140
|
-
var DEFAULT_USERS_TOOLBAR_ACTIONS = extensions.ToolbarAction.createMany([
|
|
795
|
+
var DEFAULT_USERS_TOOLBAR_ACTIONS = i4.ToolbarAction.createMany([
|
|
1141
796
|
{
|
|
1142
797
|
text: 'AbpIdentity::NewUser',
|
|
1143
|
-
action:
|
|
798
|
+
action: function (data) {
|
|
799
|
+
var component = data.getInjected(UsersComponent);
|
|
800
|
+
component.add();
|
|
801
|
+
},
|
|
1144
802
|
permission: 'AbpIdentity.Users.Create',
|
|
1145
803
|
icon: 'fa fa-plus',
|
|
1146
804
|
},
|
|
@@ -1178,49 +836,35 @@
|
|
|
1178
836
|
this.injector = injector;
|
|
1179
837
|
}
|
|
1180
838
|
IdentityExtensionsGuard.prototype.canActivate = function () {
|
|
1181
|
-
var extensions
|
|
839
|
+
var extensions = this.injector.get(i4.ExtensionsService);
|
|
1182
840
|
var actionContributors = this.injector.get(IDENTITY_ENTITY_ACTION_CONTRIBUTORS, null) || {};
|
|
1183
841
|
var toolbarContributors = this.injector.get(IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, null) || {};
|
|
1184
842
|
var propContributors = this.injector.get(IDENTITY_ENTITY_PROP_CONTRIBUTORS, null) || {};
|
|
1185
843
|
var createFormContributors = this.injector.get(IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, null) || {};
|
|
1186
844
|
var editFormContributors = this.injector.get(IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, null) || {};
|
|
1187
845
|
var configState = this.injector.get(i1.ConfigStateService);
|
|
1188
|
-
return
|
|
846
|
+
return i4.getObjectExtensionEntitiesFromStore(configState, 'Identity').pipe(operators.map(function (entities) {
|
|
1189
847
|
var _a;
|
|
1190
848
|
return (_a = {},
|
|
1191
849
|
_a["Identity.RolesComponent" /* Roles */] = entities.Role,
|
|
1192
850
|
_a["Identity.UsersComponent" /* Users */] = entities.User,
|
|
1193
851
|
_a);
|
|
1194
|
-
}),
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
852
|
+
}), i4.mapEntitiesToContributors(configState, 'AbpIdentity'), operators.tap(function (objectExtensionContributors) {
|
|
853
|
+
i4.mergeWithDefaultActions(extensions.entityActions, DEFAULT_IDENTITY_ENTITY_ACTIONS, actionContributors);
|
|
854
|
+
i4.mergeWithDefaultActions(extensions.toolbarActions, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, toolbarContributors);
|
|
855
|
+
i4.mergeWithDefaultProps(extensions.entityProps, DEFAULT_IDENTITY_ENTITY_PROPS, objectExtensionContributors.prop, propContributors);
|
|
856
|
+
i4.mergeWithDefaultProps(extensions.createFormProps, DEFAULT_IDENTITY_CREATE_FORM_PROPS, objectExtensionContributors.createForm, createFormContributors);
|
|
857
|
+
i4.mergeWithDefaultProps(extensions.editFormProps, DEFAULT_IDENTITY_EDIT_FORM_PROPS, objectExtensionContributors.editForm, editFormContributors);
|
|
1200
858
|
}), operators.mapTo(true));
|
|
1201
859
|
};
|
|
1202
860
|
return IdentityExtensionsGuard;
|
|
1203
861
|
}());
|
|
1204
|
-
IdentityExtensionsGuard
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
]; };
|
|
862
|
+
IdentityExtensionsGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityExtensionsGuard, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
863
|
+
IdentityExtensionsGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityExtensionsGuard });
|
|
864
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityExtensionsGuard, decorators: [{
|
|
865
|
+
type: i0.Injectable
|
|
866
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }]; } });
|
|
1210
867
|
|
|
1211
|
-
var ɵ0 = {
|
|
1212
|
-
requiredPolicy: 'AbpIdentity.Roles',
|
|
1213
|
-
replaceableComponent: {
|
|
1214
|
-
key: "Identity.RolesComponent" /* Roles */,
|
|
1215
|
-
defaultComponent: RolesComponent,
|
|
1216
|
-
},
|
|
1217
|
-
}, ɵ1 = {
|
|
1218
|
-
requiredPolicy: 'AbpIdentity.Users',
|
|
1219
|
-
replaceableComponent: {
|
|
1220
|
-
key: "Identity.UsersComponent" /* Users */,
|
|
1221
|
-
defaultComponent: UsersComponent,
|
|
1222
|
-
},
|
|
1223
|
-
};
|
|
1224
868
|
var routes = [
|
|
1225
869
|
{ path: '', redirectTo: 'roles', pathMatch: 'full' },
|
|
1226
870
|
{
|
|
@@ -1231,12 +875,24 @@
|
|
|
1231
875
|
{
|
|
1232
876
|
path: 'roles',
|
|
1233
877
|
component: i1.ReplaceableRouteContainerComponent,
|
|
1234
|
-
data:
|
|
878
|
+
data: {
|
|
879
|
+
requiredPolicy: 'AbpIdentity.Roles',
|
|
880
|
+
replaceableComponent: {
|
|
881
|
+
key: "Identity.RolesComponent" /* Roles */,
|
|
882
|
+
defaultComponent: RolesComponent,
|
|
883
|
+
},
|
|
884
|
+
},
|
|
1235
885
|
},
|
|
1236
886
|
{
|
|
1237
887
|
path: 'users',
|
|
1238
888
|
component: i1.ReplaceableRouteContainerComponent,
|
|
1239
|
-
data:
|
|
889
|
+
data: {
|
|
890
|
+
requiredPolicy: 'AbpIdentity.Users',
|
|
891
|
+
replaceableComponent: {
|
|
892
|
+
key: "Identity.UsersComponent" /* Users */,
|
|
893
|
+
defaultComponent: UsersComponent,
|
|
894
|
+
},
|
|
895
|
+
},
|
|
1240
896
|
},
|
|
1241
897
|
],
|
|
1242
898
|
},
|
|
@@ -1246,12 +902,16 @@
|
|
|
1246
902
|
}
|
|
1247
903
|
return IdentityRoutingModule;
|
|
1248
904
|
}());
|
|
1249
|
-
IdentityRoutingModule
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
905
|
+
IdentityRoutingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityRoutingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
906
|
+
IdentityRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityRoutingModule, imports: [i1__namespace$1.RouterModule], exports: [i1$1.RouterModule] });
|
|
907
|
+
IdentityRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityRoutingModule, imports: [[i1$1.RouterModule.forChild(routes)], i1$1.RouterModule] });
|
|
908
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityRoutingModule, decorators: [{
|
|
909
|
+
type: i0.NgModule,
|
|
910
|
+
args: [{
|
|
911
|
+
imports: [i1$1.RouterModule.forChild(routes)],
|
|
912
|
+
exports: [i1$1.RouterModule],
|
|
913
|
+
}]
|
|
914
|
+
}] });
|
|
1255
915
|
|
|
1256
916
|
var IdentityModule = /** @class */ (function () {
|
|
1257
917
|
function IdentityModule() {
|
|
@@ -1291,215 +951,52 @@
|
|
|
1291
951
|
};
|
|
1292
952
|
return IdentityModule;
|
|
1293
953
|
}());
|
|
1294
|
-
IdentityModule
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
}
|
|
1330
|
-
this.search = function (input) { return _this.restService.request({
|
|
1331
|
-
method: 'GET',
|
|
1332
|
-
url: '/api/identity/users/lookup/search',
|
|
1333
|
-
params: { filter: input.filter, sorting: input.sorting, skipCount: input.skipCount, maxResultCount: input.maxResultCount },
|
|
1334
|
-
}, { apiName: _this.apiName }); };
|
|
1335
|
-
}
|
|
1336
|
-
return IdentityUserLookupService;
|
|
1337
|
-
}());
|
|
1338
|
-
IdentityUserLookupService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IdentityUserLookupService_Factory() { return new IdentityUserLookupService(i0__namespace.ɵɵinject(i1__namespace.RestService)); }, token: IdentityUserLookupService, providedIn: "root" });
|
|
1339
|
-
IdentityUserLookupService.decorators = [
|
|
1340
|
-
{ type: i0.Injectable, args: [{
|
|
1341
|
-
providedIn: 'root',
|
|
1342
|
-
},] }
|
|
1343
|
-
];
|
|
1344
|
-
IdentityUserLookupService.ctorParameters = function () { return [
|
|
1345
|
-
{ type: i1.RestService }
|
|
1346
|
-
]; };
|
|
1347
|
-
|
|
1348
|
-
var ProfileService = /** @class */ (function () {
|
|
1349
|
-
function ProfileService(restService) {
|
|
1350
|
-
var _this = this;
|
|
1351
|
-
this.restService = restService;
|
|
1352
|
-
this.apiName = 'AbpIdentity';
|
|
1353
|
-
this.changePassword = function (input) { return _this.restService.request({
|
|
1354
|
-
method: 'POST',
|
|
1355
|
-
url: '/api/identity/my-profile/change-password',
|
|
1356
|
-
body: input,
|
|
1357
|
-
}, { apiName: _this.apiName }); };
|
|
1358
|
-
this.get = function () { return _this.restService.request({
|
|
1359
|
-
method: 'GET',
|
|
1360
|
-
url: '/api/identity/my-profile',
|
|
1361
|
-
}, { apiName: _this.apiName }); };
|
|
1362
|
-
this.update = function (input) { return _this.restService.request({
|
|
1363
|
-
method: 'PUT',
|
|
1364
|
-
url: '/api/identity/my-profile',
|
|
1365
|
-
body: input,
|
|
1366
|
-
}, { apiName: _this.apiName }); };
|
|
1367
|
-
}
|
|
1368
|
-
return ProfileService;
|
|
1369
|
-
}());
|
|
1370
|
-
ProfileService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ProfileService_Factory() { return new ProfileService(i0__namespace.ɵɵinject(i1__namespace.RestService)); }, token: ProfileService, providedIn: "root" });
|
|
1371
|
-
ProfileService.decorators = [
|
|
1372
|
-
{ type: i0.Injectable, args: [{
|
|
1373
|
-
providedIn: 'root',
|
|
1374
|
-
},] }
|
|
1375
|
-
];
|
|
1376
|
-
ProfileService.ctorParameters = function () { return [
|
|
1377
|
-
{ type: i1.RestService }
|
|
1378
|
-
]; };
|
|
1379
|
-
|
|
1380
|
-
var IdentityStateService = /** @class */ (function () {
|
|
1381
|
-
function IdentityStateService(store) {
|
|
1382
|
-
this.store = store;
|
|
1383
|
-
}
|
|
1384
|
-
IdentityStateService.prototype.getRoles = function () {
|
|
1385
|
-
return this.store.selectSnapshot(exports.ɵc.getRoles);
|
|
1386
|
-
};
|
|
1387
|
-
IdentityStateService.prototype.getRolesTotalCount = function () {
|
|
1388
|
-
return this.store.selectSnapshot(exports.ɵc.getRolesTotalCount);
|
|
1389
|
-
};
|
|
1390
|
-
IdentityStateService.prototype.getUsers = function () {
|
|
1391
|
-
return this.store.selectSnapshot(exports.ɵc.getUsers);
|
|
1392
|
-
};
|
|
1393
|
-
IdentityStateService.prototype.getUsersTotalCount = function () {
|
|
1394
|
-
return this.store.selectSnapshot(exports.ɵc.getUsersTotalCount);
|
|
1395
|
-
};
|
|
1396
|
-
IdentityStateService.prototype.dispatchGetRoles = function () {
|
|
1397
|
-
var args = [];
|
|
1398
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1399
|
-
args[_i] = arguments[_i];
|
|
1400
|
-
}
|
|
1401
|
-
return this.store.dispatch(new (GetRoles.bind.apply(GetRoles, __spread([void 0], args)))());
|
|
1402
|
-
};
|
|
1403
|
-
IdentityStateService.prototype.dispatchGetRoleById = function () {
|
|
1404
|
-
var args = [];
|
|
1405
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1406
|
-
args[_i] = arguments[_i];
|
|
1407
|
-
}
|
|
1408
|
-
return this.store.dispatch(new (GetRoleById.bind.apply(GetRoleById, __spread([void 0], args)))());
|
|
1409
|
-
};
|
|
1410
|
-
IdentityStateService.prototype.dispatchDeleteRole = function () {
|
|
1411
|
-
var args = [];
|
|
1412
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1413
|
-
args[_i] = arguments[_i];
|
|
1414
|
-
}
|
|
1415
|
-
return this.store.dispatch(new (DeleteRole.bind.apply(DeleteRole, __spread([void 0], args)))());
|
|
1416
|
-
};
|
|
1417
|
-
IdentityStateService.prototype.dispatchCreateRole = function () {
|
|
1418
|
-
var args = [];
|
|
1419
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1420
|
-
args[_i] = arguments[_i];
|
|
1421
|
-
}
|
|
1422
|
-
return this.store.dispatch(new (CreateRole.bind.apply(CreateRole, __spread([void 0], args)))());
|
|
1423
|
-
};
|
|
1424
|
-
IdentityStateService.prototype.dispatchUpdateRole = function () {
|
|
1425
|
-
var args = [];
|
|
1426
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1427
|
-
args[_i] = arguments[_i];
|
|
1428
|
-
}
|
|
1429
|
-
return this.store.dispatch(new (UpdateRole.bind.apply(UpdateRole, __spread([void 0], args)))());
|
|
1430
|
-
};
|
|
1431
|
-
IdentityStateService.prototype.dispatchGetUsers = function () {
|
|
1432
|
-
var args = [];
|
|
1433
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1434
|
-
args[_i] = arguments[_i];
|
|
1435
|
-
}
|
|
1436
|
-
return this.store.dispatch(new (GetUsers.bind.apply(GetUsers, __spread([void 0], args)))());
|
|
1437
|
-
};
|
|
1438
|
-
IdentityStateService.prototype.dispatchGetUserById = function () {
|
|
1439
|
-
var args = [];
|
|
1440
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1441
|
-
args[_i] = arguments[_i];
|
|
1442
|
-
}
|
|
1443
|
-
return this.store.dispatch(new (GetUserById.bind.apply(GetUserById, __spread([void 0], args)))());
|
|
1444
|
-
};
|
|
1445
|
-
IdentityStateService.prototype.dispatchDeleteUser = function () {
|
|
1446
|
-
var args = [];
|
|
1447
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1448
|
-
args[_i] = arguments[_i];
|
|
1449
|
-
}
|
|
1450
|
-
return this.store.dispatch(new (DeleteUser.bind.apply(DeleteUser, __spread([void 0], args)))());
|
|
1451
|
-
};
|
|
1452
|
-
IdentityStateService.prototype.dispatchCreateUser = function () {
|
|
1453
|
-
var args = [];
|
|
1454
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1455
|
-
args[_i] = arguments[_i];
|
|
1456
|
-
}
|
|
1457
|
-
return this.store.dispatch(new (CreateUser.bind.apply(CreateUser, __spread([void 0], args)))());
|
|
1458
|
-
};
|
|
1459
|
-
IdentityStateService.prototype.dispatchUpdateUser = function () {
|
|
1460
|
-
var args = [];
|
|
1461
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1462
|
-
args[_i] = arguments[_i];
|
|
1463
|
-
}
|
|
1464
|
-
return this.store.dispatch(new (UpdateUser.bind.apply(UpdateUser, __spread([void 0], args)))());
|
|
1465
|
-
};
|
|
1466
|
-
IdentityStateService.prototype.dispatchGetUserRoles = function () {
|
|
1467
|
-
var args = [];
|
|
1468
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1469
|
-
args[_i] = arguments[_i];
|
|
1470
|
-
}
|
|
1471
|
-
return this.store.dispatch(new (GetUserRoles.bind.apply(GetUserRoles, __spread([void 0], args)))());
|
|
1472
|
-
};
|
|
1473
|
-
return IdentityStateService;
|
|
1474
|
-
}());
|
|
1475
|
-
IdentityStateService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function IdentityStateService_Factory() { return new IdentityStateService(i0__namespace.ɵɵinject(i1__namespace$1.Store)); }, token: IdentityStateService, providedIn: "root" });
|
|
1476
|
-
IdentityStateService.decorators = [
|
|
1477
|
-
{ type: i0.Injectable, args: [{
|
|
1478
|
-
providedIn: 'root',
|
|
1479
|
-
},] }
|
|
1480
|
-
];
|
|
1481
|
-
IdentityStateService.ctorParameters = function () { return [
|
|
1482
|
-
{ type: i1$1.Store }
|
|
1483
|
-
]; };
|
|
954
|
+
IdentityModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
955
|
+
IdentityModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityModule, declarations: [RolesComponent, UsersComponent], imports: [i1.CoreModule,
|
|
956
|
+
IdentityRoutingModule,
|
|
957
|
+
i6.NgbNavModule,
|
|
958
|
+
i2.ThemeSharedModule,
|
|
959
|
+
i4.UiExtensionsModule,
|
|
960
|
+
i6.NgbDropdownModule,
|
|
961
|
+
i5.PermissionManagementModule,
|
|
962
|
+
i9.NgxValidateCoreModule], exports: [RolesComponent, UsersComponent] });
|
|
963
|
+
IdentityModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityModule, imports: [[
|
|
964
|
+
i1.CoreModule,
|
|
965
|
+
IdentityRoutingModule,
|
|
966
|
+
i6.NgbNavModule,
|
|
967
|
+
i2.ThemeSharedModule,
|
|
968
|
+
i4.UiExtensionsModule,
|
|
969
|
+
i6.NgbDropdownModule,
|
|
970
|
+
i5.PermissionManagementModule,
|
|
971
|
+
i9.NgxValidateCoreModule,
|
|
972
|
+
]] });
|
|
973
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: IdentityModule, decorators: [{
|
|
974
|
+
type: i0.NgModule,
|
|
975
|
+
args: [{
|
|
976
|
+
declarations: [RolesComponent, UsersComponent],
|
|
977
|
+
exports: [RolesComponent, UsersComponent],
|
|
978
|
+
imports: [
|
|
979
|
+
i1.CoreModule,
|
|
980
|
+
IdentityRoutingModule,
|
|
981
|
+
i6.NgbNavModule,
|
|
982
|
+
i2.ThemeSharedModule,
|
|
983
|
+
i4.UiExtensionsModule,
|
|
984
|
+
i6.NgbDropdownModule,
|
|
985
|
+
i5.PermissionManagementModule,
|
|
986
|
+
i9.NgxValidateCoreModule,
|
|
987
|
+
],
|
|
988
|
+
}]
|
|
989
|
+
}] });
|
|
1484
990
|
|
|
1485
991
|
/**
|
|
1486
992
|
* Generated bundle index. Do not edit.
|
|
1487
993
|
*/
|
|
1488
994
|
|
|
1489
|
-
exports.CreateRole = CreateRole;
|
|
1490
|
-
exports.CreateUser = CreateUser;
|
|
1491
995
|
exports.DEFAULT_IDENTITY_CREATE_FORM_PROPS = DEFAULT_IDENTITY_CREATE_FORM_PROPS;
|
|
1492
996
|
exports.DEFAULT_IDENTITY_EDIT_FORM_PROPS = DEFAULT_IDENTITY_EDIT_FORM_PROPS;
|
|
1493
997
|
exports.DEFAULT_IDENTITY_ENTITY_ACTIONS = DEFAULT_IDENTITY_ENTITY_ACTIONS;
|
|
1494
998
|
exports.DEFAULT_IDENTITY_ENTITY_PROPS = DEFAULT_IDENTITY_ENTITY_PROPS;
|
|
1495
999
|
exports.DEFAULT_IDENTITY_TOOLBAR_ACTIONS = DEFAULT_IDENTITY_TOOLBAR_ACTIONS;
|
|
1496
|
-
exports.DeleteRole = DeleteRole;
|
|
1497
|
-
exports.DeleteUser = DeleteUser;
|
|
1498
|
-
exports.GetRoleById = GetRoleById;
|
|
1499
|
-
exports.GetRoles = GetRoles;
|
|
1500
|
-
exports.GetUserById = GetUserById;
|
|
1501
|
-
exports.GetUserRoles = GetUserRoles;
|
|
1502
|
-
exports.GetUsers = GetUsers;
|
|
1503
1000
|
exports.IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS = IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS;
|
|
1504
1001
|
exports.IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS = IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS;
|
|
1505
1002
|
exports.IDENTITY_ENTITY_ACTION_CONTRIBUTORS = IDENTITY_ENTITY_ACTION_CONTRIBUTORS;
|
|
@@ -1507,38 +1004,8 @@
|
|
|
1507
1004
|
exports.IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS = IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS;
|
|
1508
1005
|
exports.IdentityExtensionsGuard = IdentityExtensionsGuard;
|
|
1509
1006
|
exports.IdentityModule = IdentityModule;
|
|
1510
|
-
exports.IdentityRoleService = IdentityRoleService;
|
|
1511
|
-
exports.IdentityState = exports.ɵc;
|
|
1512
|
-
exports.IdentityStateService = IdentityStateService;
|
|
1513
|
-
exports.IdentityUserLookupService = IdentityUserLookupService;
|
|
1514
|
-
exports.IdentityUserService = IdentityUserService;
|
|
1515
|
-
exports.ProfileService = ProfileService;
|
|
1516
1007
|
exports.RolesComponent = RolesComponent;
|
|
1517
|
-
exports.UpdateRole = UpdateRole;
|
|
1518
|
-
exports.UpdateUser = UpdateUser;
|
|
1519
1008
|
exports.UsersComponent = UsersComponent;
|
|
1520
|
-
exports.ɵa = RolesComponent;
|
|
1521
|
-
exports.ɵba = IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS;
|
|
1522
|
-
exports.ɵd = IdentityUserService;
|
|
1523
|
-
exports.ɵe = IdentityRoleService;
|
|
1524
|
-
exports.ɵf = GetRoles;
|
|
1525
|
-
exports.ɵg = GetRoleById;
|
|
1526
|
-
exports.ɵh = DeleteRole;
|
|
1527
|
-
exports.ɵi = CreateRole;
|
|
1528
|
-
exports.ɵj = UpdateRole;
|
|
1529
|
-
exports.ɵk = GetUsers;
|
|
1530
|
-
exports.ɵl = GetUserById;
|
|
1531
|
-
exports.ɵm = DeleteUser;
|
|
1532
|
-
exports.ɵn = CreateUser;
|
|
1533
|
-
exports.ɵo = UpdateUser;
|
|
1534
|
-
exports.ɵp = GetUserRoles;
|
|
1535
|
-
exports.ɵt = UsersComponent;
|
|
1536
|
-
exports.ɵu = IdentityRoutingModule;
|
|
1537
|
-
exports.ɵv = IdentityExtensionsGuard;
|
|
1538
|
-
exports.ɵw = IDENTITY_ENTITY_ACTION_CONTRIBUTORS;
|
|
1539
|
-
exports.ɵx = IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS;
|
|
1540
|
-
exports.ɵy = IDENTITY_ENTITY_PROP_CONTRIBUTORS;
|
|
1541
|
-
exports.ɵz = IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS;
|
|
1542
1009
|
|
|
1543
1010
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1544
1011
|
|