@masterteam/users-groups 0.0.40 → 0.0.41

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.40",
3
+ "version": "0.0.41",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/users-groups",
6
6
  "linkDirectory": false,
@@ -20,7 +20,7 @@
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.321",
23
+ "@masterteam/components": "^0.0.322",
24
24
  "@masterteam/icons": "^0.0.17",
25
25
  "@masterteam/forms": "^0.0.167"
26
26
  },
@@ -250,6 +250,8 @@ interface ApiDateValue {
250
250
  }
251
251
  declare enum UsersGroupsActionKey {
252
252
  GetUsers = "getUsers",
253
+ GetUserLockStatuses = "getUserLockStatuses",
254
+ UnlockUser = "unlockUser",
253
255
  GetUser = "getUser",
254
256
  CreateUser = "createUser",
255
257
  UpdateUser = "updateUser",
@@ -268,17 +270,38 @@ declare enum UsersGroupsActionKey {
268
270
  }
269
271
  interface UsersGroupsStateModel extends LoadingStateShape<UsersGroupsActionKey> {
270
272
  users: User[];
273
+ unlockableUserIds: string[];
274
+ unlockResponses: Record<string, UserUnlockResponse>;
271
275
  selectedUser: User | null;
272
276
  userSummary: UserSummary | null;
273
277
  groupSummary: GroupAccessSummary | null;
274
278
  groups: Group[];
275
279
  selectedGroup: Group | null;
276
280
  }
281
+ interface UserLockStatus {
282
+ userId: string;
283
+ isLocked: boolean;
284
+ canUnlock: boolean;
285
+ }
286
+ interface UserUnlockResponse {
287
+ appliesToAllApplications: boolean;
288
+ message: string;
289
+ }
277
290
  interface ResetUserPasswordPayload {
278
291
  userName: string;
279
292
  newPassword: string;
280
293
  }
281
294
 
295
+ declare class GetUserLockStatuses {
296
+ userIds: string[];
297
+ static readonly type = "[UsersGroups] Get User Lock Statuses";
298
+ constructor(userIds: string[]);
299
+ }
300
+ declare class UnlockUser {
301
+ userId: string;
302
+ static readonly type = "[UsersGroups] Unlock User";
303
+ constructor(userId: string);
304
+ }
282
305
  declare class GetUsers {
283
306
  static readonly type = "[UsersGroups] Get Users";
284
307
  }
@@ -370,6 +393,8 @@ declare class DeleteGroup {
370
393
 
371
394
  declare class UsersGroupsFacade {
372
395
  private readonly store;
396
+ readonly unlockableUserIds: _angular_core.Signal<string[]>;
397
+ readonly unlockResponses: _angular_core.Signal<Record<string, _masterteam_users_groups.UserUnlockResponse>>;
373
398
  readonly users: _angular_core.Signal<User[]>;
374
399
  readonly selectedUser: _angular_core.Signal<User | null>;
375
400
  readonly userSummary: _angular_core.Signal<_masterteam_users_groups.UserSummary | null>;
@@ -394,6 +419,7 @@ declare class UsersGroupsFacade {
394
419
  readonly isAddingUserToGroup: _angular_core.Signal<boolean>;
395
420
  readonly isDeletingUserFromGroup: _angular_core.Signal<boolean>;
396
421
  readonly isResettingPassword: _angular_core.Signal<boolean>;
422
+ unlockUser(userId: string): rxjs.Observable<void>;
397
423
  getUsers(): rxjs.Observable<void>;
398
424
  getUser(id: string | null): rxjs.Observable<void>;
399
425
  createUser(payload: Partial<User>): rxjs.Observable<void>;
@@ -430,6 +456,8 @@ declare class UsersGroupsState extends CrudStateBase<any, UsersGroupsStateModel,
430
456
  private http;
431
457
  context: HttpContext;
432
458
  private encodeUserName;
459
+ static unlockableUserIds(state: UsersGroupsStateModel): string[];
460
+ static unlockResponses(state: UsersGroupsStateModel): Record<string, UserUnlockResponse>;
433
461
  static getUsers(state: UsersGroupsStateModel): User[];
434
462
  static getSelectedUser(state: UsersGroupsStateModel): User | null;
435
463
  static getUserSummary(state: UsersGroupsStateModel): UserSummary | null;
@@ -438,6 +466,8 @@ declare class UsersGroupsState extends CrudStateBase<any, UsersGroupsStateModel,
438
466
  static getSelectedGroup(state: UsersGroupsStateModel): Group | null;
439
467
  static getLoadingActive(state: UsersGroupsStateModel): string[];
440
468
  static getErrors(state: UsersGroupsStateModel): Record<string, string | null>;
469
+ getUserLockStatuses(ctx: StateContext<UsersGroupsStateModel>, { userIds }: GetUserLockStatuses): rxjs.Observable<UserLockStatus[][] | undefined>;
470
+ unlockUser(ctx: StateContext<UsersGroupsStateModel>, { userId }: UnlockUser): rxjs.Observable<Response<UserUnlockResponse>>;
441
471
  getUsers(ctx: StateContext<UsersGroupsStateModel>): rxjs.Observable<Response<User[]>>;
442
472
  getUser(ctx: StateContext<UsersGroupsStateModel>, { userName }: GetUser): rxjs.Observable<Response<User>>;
443
473
  createUser(ctx: StateContext<UsersGroupsStateModel>, { payload }: CreateUser): rxjs.Observable<Response<User>>;
@@ -484,9 +514,10 @@ declare class Users implements OnInit {
484
514
  applicationLinkCol: _angular_core.Signal<TemplateRef<any>>;
485
515
  emailCol: _angular_core.Signal<TemplateRef<any>>;
486
516
  private readonly facade;
517
+ private readonly toast;
487
518
  readonly modal: ModalService;
488
519
  private readonly translocoService;
489
- users: _angular_core.Signal<_masterteam_users_groups.User[]>;
520
+ users: _angular_core.Signal<User[]>;
490
521
  tabs: _angular_core.Signal<{
491
522
  label: string;
492
523
  value: string;
@@ -496,12 +527,14 @@ declare class Users implements OnInit {
496
527
  tableActions: _angular_core.WritableSignal<TableAction[]>;
497
528
  deletingRowIds: _angular_core.WritableSignal<any[]>;
498
529
  linkingRowIds: _angular_core.WritableSignal<any[]>;
530
+ unlockingRowIds: _angular_core.WritableSignal<string[]>;
499
531
  rowActions: _angular_core.WritableSignal<TableAction[]>;
500
532
  tableColumns: _angular_core.WritableSignal<ColumnDef[]>;
501
533
  loading: _angular_core.Signal<boolean>;
502
534
  private allUsers;
503
- activeUsers: _angular_core.Signal<_masterteam_users_groups.User[]>;
535
+ activeUsers: _angular_core.Signal<User[]>;
504
536
  ngOnInit(): void;
537
+ unlockUser(user: User): void;
505
538
  isLinkedToCurrentApplication(user: any): boolean;
506
539
  linkUserToApplication(user: any): void;
507
540
  unlinkUserFromApplication(user: any): void;
@@ -554,7 +587,7 @@ declare class UserForm implements OnInit {
554
587
  context: HttpContext;
555
588
  contextGatway: HttpContext;
556
589
  internalUserFormConfig: _angular_core.WritableSignal<DynamicFormConfig>;
557
- fieldColSpan: _angular_core.Signal<12 | 6>;
590
+ fieldColSpan: _angular_core.Signal<6 | 12>;
558
591
  externalUserFormConfig: _angular_core.Signal<DynamicFormConfig>;
559
592
  constructor();
560
593
  ngOnInit(): void;
@@ -595,5 +628,5 @@ declare class GroupForm implements OnInit {
595
628
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<GroupForm, "mt-group-form", never, { "groupForEdit": { "alias": "groupForEdit"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
596
629
  }
597
630
 
598
- export { AddUserToGroup, ClearSelectedGroup, CreateGroup, CreateUser, DeleteGroup, DeleteUser, DeleteUserFromGroup, GetGroup, GetGroupSummary, GetGroups, GetUser, GetUserSummary, GetUsers, GroupForm, Groups, LinkUserToApplication, ResetUserPassword, UpdateGroup, UpdateUser, UserForm, Users, UsersGroups, UsersGroupsActionKey, UsersGroupsFacade, UsersGroupsState };
599
- export type { Accessibility, ApiDateValue, Group, GroupAccessSummary, IdentityPrincipalRuntimeImpact, IdentityPrincipalUsage, IdentityPrincipalUsageSummary, IdentityPrincipalUsageWarning, Permission, PermissionScope, ResetUserPasswordPayload, Role, RoleLevelDataAssignment, RoleScope, RoleScopeLevel, RoleScopeModule, TranslatedField, User, UserReference, UserSummary, UsersGroupsStateModel };
631
+ export { AddUserToGroup, ClearSelectedGroup, CreateGroup, CreateUser, DeleteGroup, DeleteUser, DeleteUserFromGroup, GetGroup, GetGroupSummary, GetGroups, GetUser, GetUserLockStatuses, GetUserSummary, GetUsers, GroupForm, Groups, LinkUserToApplication, ResetUserPassword, UnlockUser, UpdateGroup, UpdateUser, UserForm, Users, UsersGroups, UsersGroupsActionKey, UsersGroupsFacade, UsersGroupsState };
632
+ export type { Accessibility, ApiDateValue, Group, GroupAccessSummary, IdentityPrincipalRuntimeImpact, IdentityPrincipalUsage, IdentityPrincipalUsageSummary, IdentityPrincipalUsageWarning, Permission, PermissionScope, ResetUserPasswordPayload, Role, RoleLevelDataAssignment, RoleScope, RoleScopeLevel, RoleScopeModule, TranslatedField, User, UserLockStatus, UserReference, UserSummary, UserUnlockResponse, UsersGroupsStateModel };