@masterteam/users-groups 0.0.14 → 0.0.15
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/users-groups",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/users-groups",
|
|
6
6
|
"linkDirectory": false,
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"tailwindcss": "^4.2.2",
|
|
21
21
|
"tailwindcss-primeui": "^0.6.1",
|
|
22
22
|
"@ngxs/store": "^20.1.0",
|
|
23
|
-
"@masterteam/components": "^0.0.
|
|
24
|
-
"@masterteam/forms": "^0.0.
|
|
23
|
+
"@masterteam/components": "^0.0.165",
|
|
24
|
+
"@masterteam/forms": "^0.0.74",
|
|
25
25
|
"@masterteam/icons": "^0.0.15"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnInit, TemplateRef } from '@angular/core';
|
|
3
3
|
import * as rxjs from 'rxjs';
|
|
4
|
+
import * as _masterteam_users_groups from '@masterteam/users-groups';
|
|
4
5
|
import { TranslocoService } from '@jsverse/transloco';
|
|
5
6
|
import { PageHeaderTab } from '@masterteam/components/page-header';
|
|
6
|
-
import * as _masterteam_users_groups from '@masterteam/users-groups';
|
|
7
7
|
import { TableAction, ColumnDef } from '@masterteam/components/table';
|
|
8
8
|
import { ModalService } from '@masterteam/components/modal';
|
|
9
9
|
import { FormControl } from '@angular/forms';
|
|
@@ -43,6 +43,46 @@ interface Group {
|
|
|
43
43
|
isActivated?: boolean;
|
|
44
44
|
applicationId?: number;
|
|
45
45
|
}
|
|
46
|
+
interface Role {
|
|
47
|
+
id: string;
|
|
48
|
+
key?: string;
|
|
49
|
+
name?: TranslatedField | string;
|
|
50
|
+
moduleId?: number;
|
|
51
|
+
moduleType?: string;
|
|
52
|
+
sourceId?: number;
|
|
53
|
+
applicationId?: number;
|
|
54
|
+
extraInfo?: any[];
|
|
55
|
+
}
|
|
56
|
+
interface Permission {
|
|
57
|
+
id: number;
|
|
58
|
+
name?: string | TranslatedField;
|
|
59
|
+
moduleId?: number;
|
|
60
|
+
applicationId?: number;
|
|
61
|
+
moduleType?: string;
|
|
62
|
+
command?: string;
|
|
63
|
+
}
|
|
64
|
+
interface Accessibility {
|
|
65
|
+
id: number;
|
|
66
|
+
moduleKey?: string;
|
|
67
|
+
moduleName?: TranslatedField | string;
|
|
68
|
+
category?: string;
|
|
69
|
+
name?: TranslatedField | string;
|
|
70
|
+
enableMFACheck?: boolean;
|
|
71
|
+
createdAt?: ApiDateValue;
|
|
72
|
+
applicationId?: number;
|
|
73
|
+
groups?: any[];
|
|
74
|
+
}
|
|
75
|
+
interface UserSummary {
|
|
76
|
+
user?: User | null;
|
|
77
|
+
groups: Group[];
|
|
78
|
+
roles: Role[];
|
|
79
|
+
permissions: Permission[];
|
|
80
|
+
accessibilities: Accessibility[];
|
|
81
|
+
groupsCount?: number;
|
|
82
|
+
rolesCount?: number;
|
|
83
|
+
permissionsCount?: number;
|
|
84
|
+
accessibilitiesCount?: number;
|
|
85
|
+
}
|
|
46
86
|
interface TranslatedField {
|
|
47
87
|
display?: string;
|
|
48
88
|
en?: string;
|
|
@@ -58,6 +98,7 @@ declare enum UsersGroupsActionKey {
|
|
|
58
98
|
CreateUser = "createUser",
|
|
59
99
|
UpdateUser = "updateUser",
|
|
60
100
|
DeleteUser = "deleteUser",
|
|
101
|
+
GetUserSummary = "getUserSummary",
|
|
61
102
|
AddUserToGroup = "addUserToGroup",
|
|
62
103
|
DeleteUserFromGroup = "deleteUserFromGroup",
|
|
63
104
|
GetGroups = "getGroups",
|
|
@@ -70,6 +111,7 @@ declare enum UsersGroupsActionKey {
|
|
|
70
111
|
interface UsersGroupsStateModel extends LoadingStateShape<UsersGroupsActionKey> {
|
|
71
112
|
users: User[];
|
|
72
113
|
selectedUser: User | null;
|
|
114
|
+
userSummary: UserSummary | null;
|
|
73
115
|
groups: Group[];
|
|
74
116
|
selectedGroup: Group | null;
|
|
75
117
|
}
|
|
@@ -113,6 +155,11 @@ declare class DeleteUser {
|
|
|
113
155
|
static readonly type = "[UsersGroups] Delete User";
|
|
114
156
|
constructor(userName: string | number);
|
|
115
157
|
}
|
|
158
|
+
declare class GetUserSummary {
|
|
159
|
+
userName: string;
|
|
160
|
+
static readonly type = "[UsersGroups] Get User Summary";
|
|
161
|
+
constructor(userName: string);
|
|
162
|
+
}
|
|
116
163
|
declare class ResetUserPassword {
|
|
117
164
|
id: string | number;
|
|
118
165
|
payload: ResetUserPasswordPayload;
|
|
@@ -156,6 +203,7 @@ declare class UsersGroupsFacade {
|
|
|
156
203
|
private readonly store;
|
|
157
204
|
readonly users: _angular_core.Signal<User[]>;
|
|
158
205
|
readonly selectedUser: _angular_core.Signal<User | null>;
|
|
206
|
+
readonly userSummary: _angular_core.Signal<_masterteam_users_groups.UserSummary | null>;
|
|
159
207
|
readonly groups: _angular_core.Signal<Group[]>;
|
|
160
208
|
readonly selectedGroup: _angular_core.Signal<Group | null>;
|
|
161
209
|
private readonly loadingActive;
|
|
@@ -163,6 +211,7 @@ declare class UsersGroupsFacade {
|
|
|
163
211
|
readonly isLoadingUser: _angular_core.Signal<boolean>;
|
|
164
212
|
readonly isSavingUser: _angular_core.Signal<boolean>;
|
|
165
213
|
readonly isDeletingUser: _angular_core.Signal<boolean>;
|
|
214
|
+
readonly isLoadingUserSummary: _angular_core.Signal<boolean>;
|
|
166
215
|
readonly isLoadingGroups: _angular_core.Signal<boolean>;
|
|
167
216
|
readonly isLoadingGroup: _angular_core.Signal<boolean>;
|
|
168
217
|
readonly isSavingGroup: _angular_core.Signal<boolean>;
|
|
@@ -177,6 +226,7 @@ declare class UsersGroupsFacade {
|
|
|
177
226
|
deleteUserFromGroup(payload: any): rxjs.Observable<void>;
|
|
178
227
|
updateUser(id: string | undefined, changes: Partial<User>): rxjs.Observable<void>;
|
|
179
228
|
deleteUser(userName: string | number): rxjs.Observable<void>;
|
|
229
|
+
getUserSummary(userName: string): rxjs.Observable<void>;
|
|
180
230
|
resetUserPassword(id: string | number, payload: ResetUserPasswordPayload): rxjs.Observable<void>;
|
|
181
231
|
getGroups(): rxjs.Observable<void>;
|
|
182
232
|
getGroup(id: string | number | null): rxjs.Observable<void>;
|
|
@@ -204,6 +254,7 @@ declare class UsersGroupsState extends CrudStateBase<any, UsersGroupsStateModel,
|
|
|
204
254
|
context: HttpContext;
|
|
205
255
|
static getUsers(state: UsersGroupsStateModel): User[];
|
|
206
256
|
static getSelectedUser(state: UsersGroupsStateModel): User | null;
|
|
257
|
+
static getUserSummary(state: UsersGroupsStateModel): UserSummary | null;
|
|
207
258
|
static getGroups(state: UsersGroupsStateModel): Group[];
|
|
208
259
|
static getSelectedGroup(state: UsersGroupsStateModel): Group | null;
|
|
209
260
|
static getLoadingActive(state: UsersGroupsStateModel): string[];
|
|
@@ -214,6 +265,7 @@ declare class UsersGroupsState extends CrudStateBase<any, UsersGroupsStateModel,
|
|
|
214
265
|
addUserToGroup(ctx: StateContext<UsersGroupsStateModel>, { payload }: AddUserToGroup): rxjs.Observable<Response<any>>;
|
|
215
266
|
updateUser(ctx: StateContext<UsersGroupsStateModel>, { changes, id }: UpdateUser): rxjs.Observable<Response<User>>;
|
|
216
267
|
deleteUser(ctx: StateContext<UsersGroupsStateModel>, { userName }: DeleteUser): rxjs.Observable<_masterteam_components.Response<void>>;
|
|
268
|
+
getUserSummary(ctx: StateContext<UsersGroupsStateModel>, { userName }: GetUserSummary): rxjs.Observable<Response<UserSummary>>;
|
|
217
269
|
resetUserPassword(ctx: StateContext<UsersGroupsStateModel>, { id, payload }: ResetUserPassword): rxjs.Observable<Response<void>>;
|
|
218
270
|
deleteUserFromGroup(ctx: StateContext<UsersGroupsStateModel>, { payload }: DeleteUserFromGroup): rxjs.Observable<Response<void>>;
|
|
219
271
|
getGroups(ctx: StateContext<UsersGroupsStateModel>): rxjs.Observable<Response<Group[]>>;
|
|
@@ -267,6 +319,7 @@ declare class Users implements OnInit {
|
|
|
267
319
|
ngOnInit(): void;
|
|
268
320
|
addUserDialog(user?: any | null): void;
|
|
269
321
|
addResetPasswordDialog(user: any): void;
|
|
322
|
+
openLinkedGroupsDialog(user: any): void;
|
|
270
323
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Users, never>;
|
|
271
324
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Users, "mt-users", never, {}, {}, never, never, true, never>;
|
|
272
325
|
}
|
|
@@ -354,5 +407,5 @@ declare class GroupForm implements OnInit {
|
|
|
354
407
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GroupForm, "mt-group-form", never, { "groupForEdit": { "alias": "groupForEdit"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
355
408
|
}
|
|
356
409
|
|
|
357
|
-
export { AddUserToGroup, ClearSelectedGroup, CreateGroup, CreateUser, DeleteGroup, DeleteUser, DeleteUserFromGroup, GetGroup, GetGroups, GetUser, GetUsers, GroupForm, Groups, ResetUserPassword, UpdateGroup, UpdateUser, UserForm, Users, UsersGroups, UsersGroupsActionKey, UsersGroupsFacade, UsersGroupsState };
|
|
358
|
-
export type { ApiDateValue, Group, ResetUserPasswordPayload, TranslatedField, User, UsersGroupsStateModel };
|
|
410
|
+
export { AddUserToGroup, ClearSelectedGroup, CreateGroup, CreateUser, DeleteGroup, DeleteUser, DeleteUserFromGroup, GetGroup, GetGroups, GetUser, GetUserSummary, GetUsers, GroupForm, Groups, ResetUserPassword, UpdateGroup, UpdateUser, UserForm, Users, UsersGroups, UsersGroupsActionKey, UsersGroupsFacade, UsersGroupsState };
|
|
411
|
+
export type { Accessibility, ApiDateValue, Group, Permission, ResetUserPasswordPayload, Role, TranslatedField, User, UserSummary, UsersGroupsStateModel };
|