@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.
@@ -5,6 +5,7 @@ import { Breadcrumb } from '@masterteam/components/breadcrumb';
5
5
  import { CrudStateBase, REQUEST_CONTEXT, handleApiRequest, UserSearchFieldConfig, ValidatorConfig, UploadFileFieldConfig, TextareaFieldConfig } from '@masterteam/components';
6
6
  import { Action, Selector, State, Store, select } from '@ngxs/store';
7
7
  import { HttpClient, HttpContext } from '@angular/common/http';
8
+ import { of, from, concatMap, map, toArray, catchError, finalize } from 'rxjs';
8
9
  import { ActivatedRoute, Router, RouterOutlet } from '@angular/router';
9
10
  import { TranslocoService, TranslocoDirective, TranslocoPipe } from '@jsverse/transloco';
10
11
  import { Page } from '@masterteam/components/page';
@@ -21,13 +22,27 @@ import { FormControl, ReactiveFormsModule } from '@angular/forms';
21
22
  import { DynamicForm } from '@masterteam/forms/dynamic-form';
22
23
  import { ModalRef, DialogService } from '@masterteam/components/dialog';
23
24
  import { Tabs } from '@masterteam/components/tabs';
24
- import { finalize } from 'rxjs';
25
+ import { ToastService } from '@masterteam/components/toast';
25
26
  import { Avatar } from '@masterteam/components/avatar';
26
27
  import { EmptyState } from '@masterteam/components/empty-state';
27
28
  import { TextField } from '@masterteam/components/text-field';
28
29
  import { Tree } from '@masterteam/components/tree';
29
30
  import { SecureImagePipe } from '@masterteam/components/upload-field';
30
31
 
32
+ class GetUserLockStatuses {
33
+ userIds;
34
+ static type = '[UsersGroups] Get User Lock Statuses';
35
+ constructor(userIds) {
36
+ this.userIds = userIds;
37
+ }
38
+ }
39
+ class UnlockUser {
40
+ userId;
41
+ static type = '[UsersGroups] Unlock User';
42
+ constructor(userId) {
43
+ this.userId = userId;
44
+ }
45
+ }
31
46
  class GetUsers {
32
47
  static type = '[UsersGroups] Get Users';
33
48
  }
@@ -145,6 +160,8 @@ class DeleteGroup {
145
160
  var UsersGroupsActionKey;
146
161
  (function (UsersGroupsActionKey) {
147
162
  UsersGroupsActionKey["GetUsers"] = "getUsers";
163
+ UsersGroupsActionKey["GetUserLockStatuses"] = "getUserLockStatuses";
164
+ UsersGroupsActionKey["UnlockUser"] = "unlockUser";
148
165
  UsersGroupsActionKey["GetUser"] = "getUser";
149
166
  UsersGroupsActionKey["CreateUser"] = "createUser";
150
167
  UsersGroupsActionKey["UpdateUser"] = "updateUser";
@@ -179,6 +196,12 @@ let UsersGroupsState = class UsersGroupsState extends CrudStateBase {
179
196
  // ============================================================================
180
197
  // Data Selectors - Individual selectors for fine-grained reactivity
181
198
  // ============================================================================
199
+ static unlockableUserIds(state) {
200
+ return state.unlockableUserIds;
201
+ }
202
+ static unlockResponses(state) {
203
+ return state.unlockResponses;
204
+ }
182
205
  static getUsers(state) {
183
206
  return state.users;
184
207
  }
@@ -209,7 +232,52 @@ let UsersGroupsState = class UsersGroupsState extends CrudStateBase {
209
232
  // ============================================================================
210
233
  // CRUD Actions
211
234
  // ============================================================================
235
+ getUserLockStatuses(ctx, { userIds }) {
236
+ ctx.patchState({ unlockableUserIds: [] });
237
+ const ids = [...new Set(userIds.filter(Boolean))];
238
+ if (!ids.length)
239
+ return of(undefined);
240
+ const batches = [];
241
+ for (let start = 0; start < ids.length; start += 200)
242
+ batches.push(ids.slice(start, start + 200));
243
+ return handleApiRequest({
244
+ ctx,
245
+ key: UsersGroupsActionKey.GetUserLockStatuses,
246
+ request$: from(batches).pipe(concatMap((batch) => this.http.post('identity/users/lock-status', { userIds: batch }, {
247
+ context: this.context,
248
+ headers: { noMessage: 'true' },
249
+ })), map((response) => response.data), toArray()),
250
+ onSuccess: (batches) => ({
251
+ unlockableUserIds: batches
252
+ .flat()
253
+ .filter((status) => status.isLocked && status.canUnlock)
254
+ .map((status) => status.userId),
255
+ }),
256
+ }).pipe(catchError(() => of(undefined))); // Unknown/denied status keeps the action hidden.
257
+ }
258
+ unlockUser(ctx, { userId }) {
259
+ // Gateway authorizes with the current application's token. The shared
260
+ // gateway-auth interceptor routes this endpoint independently of token scope.
261
+ // Drop only this user's previous result: another row's unlock may be in flight.
262
+ const { [userId]: _previous, ...unlockResponses } = ctx.getState().unlockResponses;
263
+ ctx.patchState({ unlockResponses });
264
+ return handleApiRequest({
265
+ ctx,
266
+ key: UsersGroupsActionKey.UnlockUser,
267
+ request$: this.http.post(`identity/users/${encodeURIComponent(userId)}/unlock`, null, { context: this.context, headers: { noMessage: 'true' } }),
268
+ onSuccess: (response) => ({
269
+ unlockResponses: {
270
+ ...ctx.getState().unlockResponses,
271
+ [userId]: response.data,
272
+ },
273
+ unlockableUserIds: ctx
274
+ .getState()
275
+ .unlockableUserIds.filter((id) => id !== userId),
276
+ }),
277
+ });
278
+ }
212
279
  getUsers(ctx) {
280
+ ctx.dispatch(new GetUserLockStatuses([]));
213
281
  const req$ = this.http.get('Identity/users', {
214
282
  context: this.context,
215
283
  });
@@ -217,9 +285,11 @@ let UsersGroupsState = class UsersGroupsState extends CrudStateBase {
217
285
  ctx,
218
286
  key: UsersGroupsActionKey.GetUsers,
219
287
  request$: req$,
220
- onSuccess: (response) => ({
221
- users: response.data ?? [],
222
- }),
288
+ onSuccess: (response) => {
289
+ const users = response.data ?? [];
290
+ ctx.dispatch(new GetUserLockStatuses(users.map((user) => user.id)));
291
+ return { users };
292
+ },
223
293
  });
224
294
  }
225
295
  getUser(ctx, { userName }) {
@@ -471,6 +541,12 @@ let UsersGroupsState = class UsersGroupsState extends CrudStateBase {
471
541
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UsersGroupsState, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
472
542
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UsersGroupsState });
473
543
  };
544
+ __decorate([
545
+ Action(GetUserLockStatuses, { cancelUncompleted: true })
546
+ ], UsersGroupsState.prototype, "getUserLockStatuses", null);
547
+ __decorate([
548
+ Action(UnlockUser)
549
+ ], UsersGroupsState.prototype, "unlockUser", null);
474
550
  __decorate([
475
551
  Action(GetUsers)
476
552
  ], UsersGroupsState.prototype, "getUsers", null);
@@ -522,6 +598,12 @@ __decorate([
522
598
  __decorate([
523
599
  Action(ClearSelectedGroup)
524
600
  ], UsersGroupsState.prototype, "clearSelectedGroup", null);
601
+ __decorate([
602
+ Selector()
603
+ ], UsersGroupsState, "unlockableUserIds", null);
604
+ __decorate([
605
+ Selector()
606
+ ], UsersGroupsState, "unlockResponses", null);
525
607
  __decorate([
526
608
  Selector()
527
609
  ], UsersGroupsState, "getUsers", null);
@@ -551,6 +633,8 @@ UsersGroupsState = __decorate([
551
633
  name: 'usersGroups',
552
634
  defaults: {
553
635
  users: [],
636
+ unlockableUserIds: [],
637
+ unlockResponses: {},
554
638
  selectedUser: null,
555
639
  userSummary: null,
556
640
  groupSummary: null,
@@ -563,13 +647,15 @@ UsersGroupsState = __decorate([
563
647
  ], UsersGroupsState);
564
648
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UsersGroupsState, decorators: [{
565
649
  type: Injectable
566
- }], propDecorators: { getUsers: [], getUser: [], createUser: [], addUserToGroup: [], updateUser: [], deleteUser: [], linkUserToApplication: [], getUserSummary: [], getGroupSummary: [], resetUserPassword: [], deleteUserFromGroup: [], getGroups: [], getGroup: [], createGroup: [], updateGroup: [], deleteGroup: [], clearSelectedGroup: [] } });
650
+ }], propDecorators: { getUserLockStatuses: [], unlockUser: [], getUsers: [], getUser: [], createUser: [], addUserToGroup: [], updateUser: [], deleteUser: [], linkUserToApplication: [], getUserSummary: [], getGroupSummary: [], resetUserPassword: [], deleteUserFromGroup: [], getGroups: [], getGroup: [], createGroup: [], updateGroup: [], deleteGroup: [], clearSelectedGroup: [] } });
567
651
 
568
652
  class UsersGroupsFacade {
569
653
  store = inject(Store);
570
654
  // ============================================================================
571
655
  // Data Selectors - Memoized by NGXS (fine-grained reactivity)
572
656
  // ============================================================================
657
+ unlockableUserIds = select(UsersGroupsState.unlockableUserIds);
658
+ unlockResponses = select(UsersGroupsState.unlockResponses);
573
659
  users = select(UsersGroupsState.getUsers);
574
660
  selectedUser = select(UsersGroupsState.getSelectedUser);
575
661
  userSummary = select(UsersGroupsState.getUserSummary);
@@ -605,6 +691,9 @@ class UsersGroupsFacade {
605
691
  // ============================================================================
606
692
  // Action Dispatchers
607
693
  // ============================================================================
694
+ unlockUser(userId) {
695
+ return this.store.dispatch(new UnlockUser(userId));
696
+ }
608
697
  getUsers() {
609
698
  return this.store.dispatch(new GetUsers());
610
699
  }
@@ -694,8 +783,9 @@ class UsersGroups {
694
783
  ];
695
784
  ngOnInit() {
696
785
  const selectedTab = this.route.snapshot.firstChild?.data['componentType'];
786
+ // No users load here: the Users page is the only reader and loads them
787
+ // itself. Loading here too doubled both Identity/users and lock-status.
697
788
  this.selectedTab.set(selectedTab || 'users');
698
- this.facade.getUsers();
699
789
  }
700
790
  goBack() {
701
791
  this.router.navigate(['control-panel/product-settings']);
@@ -1376,7 +1466,7 @@ class SummaryAccessibilities {
1376
1466
  .filter((group) => group.items.length > 0);
1377
1467
  }, ...(ngDevMode ? [{ debugName: "filteredGroups" }] : /* istanbul ignore next */ []));
1378
1468
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SummaryAccessibilities, deps: [], target: i0.ɵɵFactoryTarget.Component });
1379
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SummaryAccessibilities, isStandalone: true, selector: "mt-summary-accessibilities", inputs: { accessibilities: { classPropertyName: "accessibilities", publicName: "accessibilities", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\n @if (accessibilities().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"emptyMessage()\"\n [description]=\"t('accessibilities-hint')\"\n />\n } @else {\n <div class=\"flex flex-col gap-3\">\n @if (showSearch()) {\n <mt-text-field\n [formControl]=\"searchControl\"\n icon=\"general.search-lg\"\n [placeholder]=\"t('search-accessibilities')\"\n />\n }\n\n @for (group of filteredGroups(); track group.key) {\n <section class=\"rounded-md border border-surface\">\n <header\n class=\"flex items-center justify-between gap-2 rounded-t-md border-b border-surface bg-surface-50 px-3 py-2\"\n >\n <span class=\"truncate text-sm font-semibold text-color\">\n {{ group.label }}\n </span>\n <span class=\"shrink-0 text-xs text-muted-color\">\n {{ group.items.length }}\n </span>\n </header>\n <ul>\n @for (item of group.items; track item.id) {\n <li\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\n >\n <mt-icon\n icon=\"security.lock-unlocked-01\"\n class=\"shrink-0 text-lg text-primary\"\n />\n <span\n class=\"min-w-0 flex-1 truncate text-sm text-color\"\n [title]=\"item.name\"\n >\n {{ item.name }}\n </span>\n @if (item.requiresMfa) {\n <mt-summary-pill tone=\"info\">{{ t(\"mfa\") }}</mt-summary-pill>\n }\n </li>\n }\n </ul>\n </section>\n } @empty {\n <mt-empty-state\n variant=\"filtered\"\n illustration=\"none\"\n [title]=\"t('no-search-results')\"\n />\n }\n </div>\n }\n</ng-container>\n", dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: EmptyState, selector: "mt-empty-state", inputs: ["variant", "illustration", "title", "description", "actionLabel", "actionIcon"], outputs: ["actionClick"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: SummaryPill, selector: "mt-summary-pill", inputs: ["tone"] }] });
1469
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SummaryAccessibilities, isStandalone: true, selector: "mt-summary-accessibilities", inputs: { accessibilities: { classPropertyName: "accessibilities", publicName: "accessibilities", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\r\n @if (accessibilities().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"emptyMessage()\"\r\n [description]=\"t('accessibilities-hint')\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-3\">\r\n @if (showSearch()) {\r\n <mt-text-field\r\n [formControl]=\"searchControl\"\r\n icon=\"general.search-lg\"\r\n [placeholder]=\"t('search-accessibilities')\"\r\n />\r\n }\r\n\r\n @for (group of filteredGroups(); track group.key) {\r\n <section class=\"rounded-md border border-surface\">\r\n <header\r\n class=\"flex items-center justify-between gap-2 rounded-t-md border-b border-surface bg-surface-50 px-3 py-2\"\r\n >\r\n <span class=\"truncate text-sm font-semibold text-color\">\r\n {{ group.label }}\r\n </span>\r\n <span class=\"shrink-0 text-xs text-muted-color\">\r\n {{ group.items.length }}\r\n </span>\r\n </header>\r\n <ul>\r\n @for (item of group.items; track item.id) {\r\n <li\r\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\r\n >\r\n <mt-icon\r\n icon=\"security.lock-unlocked-01\"\r\n class=\"shrink-0 text-lg text-primary\"\r\n />\r\n <span\r\n class=\"min-w-0 flex-1 truncate text-sm text-color\"\r\n [title]=\"item.name\"\r\n >\r\n {{ item.name }}\r\n </span>\r\n @if (item.requiresMfa) {\r\n <mt-summary-pill tone=\"info\">{{ t(\"mfa\") }}</mt-summary-pill>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n </section>\r\n } @empty {\r\n <mt-empty-state\r\n variant=\"filtered\"\r\n illustration=\"none\"\r\n [title]=\"t('no-search-results')\"\r\n />\r\n }\r\n </div>\r\n }\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: EmptyState, selector: "mt-empty-state", inputs: ["variant", "illustration", "title", "description", "actionLabel", "actionIcon"], outputs: ["actionClick"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: SummaryPill, selector: "mt-summary-pill", inputs: ["tone"] }] });
1380
1470
  }
1381
1471
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SummaryAccessibilities, decorators: [{
1382
1472
  type: Component,
@@ -1387,7 +1477,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1387
1477
  EmptyState,
1388
1478
  Icon,
1389
1479
  SummaryPill,
1390
- ], template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\n @if (accessibilities().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"emptyMessage()\"\n [description]=\"t('accessibilities-hint')\"\n />\n } @else {\n <div class=\"flex flex-col gap-3\">\n @if (showSearch()) {\n <mt-text-field\n [formControl]=\"searchControl\"\n icon=\"general.search-lg\"\n [placeholder]=\"t('search-accessibilities')\"\n />\n }\n\n @for (group of filteredGroups(); track group.key) {\n <section class=\"rounded-md border border-surface\">\n <header\n class=\"flex items-center justify-between gap-2 rounded-t-md border-b border-surface bg-surface-50 px-3 py-2\"\n >\n <span class=\"truncate text-sm font-semibold text-color\">\n {{ group.label }}\n </span>\n <span class=\"shrink-0 text-xs text-muted-color\">\n {{ group.items.length }}\n </span>\n </header>\n <ul>\n @for (item of group.items; track item.id) {\n <li\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\n >\n <mt-icon\n icon=\"security.lock-unlocked-01\"\n class=\"shrink-0 text-lg text-primary\"\n />\n <span\n class=\"min-w-0 flex-1 truncate text-sm text-color\"\n [title]=\"item.name\"\n >\n {{ item.name }}\n </span>\n @if (item.requiresMfa) {\n <mt-summary-pill tone=\"info\">{{ t(\"mfa\") }}</mt-summary-pill>\n }\n </li>\n }\n </ul>\n </section>\n } @empty {\n <mt-empty-state\n variant=\"filtered\"\n illustration=\"none\"\n [title]=\"t('no-search-results')\"\n />\n }\n </div>\n }\n</ng-container>\n" }]
1480
+ ], template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\r\n @if (accessibilities().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"emptyMessage()\"\r\n [description]=\"t('accessibilities-hint')\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-3\">\r\n @if (showSearch()) {\r\n <mt-text-field\r\n [formControl]=\"searchControl\"\r\n icon=\"general.search-lg\"\r\n [placeholder]=\"t('search-accessibilities')\"\r\n />\r\n }\r\n\r\n @for (group of filteredGroups(); track group.key) {\r\n <section class=\"rounded-md border border-surface\">\r\n <header\r\n class=\"flex items-center justify-between gap-2 rounded-t-md border-b border-surface bg-surface-50 px-3 py-2\"\r\n >\r\n <span class=\"truncate text-sm font-semibold text-color\">\r\n {{ group.label }}\r\n </span>\r\n <span class=\"shrink-0 text-xs text-muted-color\">\r\n {{ group.items.length }}\r\n </span>\r\n </header>\r\n <ul>\r\n @for (item of group.items; track item.id) {\r\n <li\r\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\r\n >\r\n <mt-icon\r\n icon=\"security.lock-unlocked-01\"\r\n class=\"shrink-0 text-lg text-primary\"\r\n />\r\n <span\r\n class=\"min-w-0 flex-1 truncate text-sm text-color\"\r\n [title]=\"item.name\"\r\n >\r\n {{ item.name }}\r\n </span>\r\n @if (item.requiresMfa) {\r\n <mt-summary-pill tone=\"info\">{{ t(\"mfa\") }}</mt-summary-pill>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n </section>\r\n } @empty {\r\n <mt-empty-state\r\n variant=\"filtered\"\r\n illustration=\"none\"\r\n [title]=\"t('no-search-results')\"\r\n />\r\n }\r\n </div>\r\n }\r\n</ng-container>\r\n" }]
1391
1481
  }], propDecorators: { accessibilities: [{ type: i0.Input, args: [{ isSignal: true, alias: "accessibilities", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }] } });
1392
1482
 
1393
1483
  /** Search appears once the list is long enough to need it. */
@@ -1494,7 +1584,7 @@ class UserAccessSummary {
1494
1584
  this.facade.getUserSummary(userName).subscribe({ error: () => undefined });
1495
1585
  }
1496
1586
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UserAccessSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
1497
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: UserAccessSummary, isStandalone: true, selector: "mt-user-access-summary", inputs: { user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex h-full min-h-0 flex-col" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\n <!-- Who this is \u2014 rendered from the table row, so it never waits on the request. -->\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\n <section class=\"flex items-center gap-3 border-b border-surface p-4\">\n <mt-avatar\n [image]=\"\n profile().image\n ? $any(profile().image | secureImage: true : context : 'avatar/')\n : ''\n \"\n icon=\"user.user-01\"\n size=\"large\"\n styleClass=\"text-surface-600! bg-surface-200!\"\n />\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <div class=\"flex min-w-0 flex-wrap items-center gap-2\">\n <h2\n class=\"min-w-0 truncate text-base font-semibold text-color\"\n [title]=\"profile().displayName\"\n >\n {{ profile().displayName }}\n </h2>\n @if (profile().isExternal) {\n <mt-summary-pill tone=\"neutral\">\n <mt-icon icon=\"general.link-external-02\" class=\"text-xs\" />\n {{ t(\"external\") }}\n </mt-summary-pill>\n } @else {\n <mt-summary-pill tone=\"success\">\n <mt-icon icon=\"user.users-01\" class=\"text-xs\" />\n {{ t(\"internal\") }}\n </mt-summary-pill>\n }\n </div>\n\n @if (profile().userName) {\n <span\n class=\"inline-flex min-w-0 items-center gap-1 text-sm text-muted-color\"\n >\n <mt-icon icon=\"user.user-01\" class=\"shrink-0 text-sm\" />\n <span class=\"truncate\">{{ profile().userName }}</span>\n </span>\n }\n </div>\n </section>\n\n <div class=\"sticky top-0 z-10 bg-content px-4 pt-2\">\n <mt-tabs [options]=\"tabs()\" [(active)]=\"activeTab\" mode=\"underline\" />\n </div>\n\n <div class=\"p-4\">\n @if (loading()) {\n <div class=\"flex flex-col gap-3\">\n @for (row of [1, 2, 3, 4]; track row) {\n <p-skeleton height=\"3.5rem\" borderRadius=\"0.375rem\" />\n }\n </div>\n } @else if (error()) {\n <div\n class=\"flex flex-col items-start gap-3 rounded-md border border-rose-200 bg-rose-50 p-4 dark:border-rose-800 dark:bg-rose-900/30\"\n role=\"alert\"\n >\n <div class=\"flex flex-col gap-1\">\n <span\n class=\"text-sm font-semibold text-rose-700 dark:text-rose-200\"\n >\n {{ t(\"summary-load-failed\") }}\n </span>\n <span class=\"text-sm text-rose-600 dark:text-rose-300\">\n {{ t(\"summary-load-failed-hint\") }}\n </span>\n </div>\n <mt-button\n icon=\"arrow.refresh-cw-02\"\n severity=\"danger\"\n variant=\"outlined\"\n size=\"small\"\n [label]=\"t('try-again')\"\n (onClick)=\"load()\"\n />\n </div>\n } @else {\n @switch (activeTab()) {\n @case (\"groups\") {\n @if (groups().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('no-linked-groups')\"\n [description]=\"t('user-groups-hint')\"\n />\n } @else {\n <div class=\"flex flex-col gap-3\">\n @if (showGroupSearch()) {\n <mt-text-field\n [formControl]=\"groupSearch\"\n icon=\"general.search-lg\"\n [placeholder]=\"t('search-groups')\"\n />\n }\n <ul class=\"rounded-md border border-surface\">\n @for (group of filteredGroups(); track group.id) {\n <li\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\n >\n <mt-avatar\n icon=\"user.users-01\"\n shape=\"square\"\n styleClass=\"bg-primary-50! text-primary!\"\n />\n <div class=\"flex min-w-0 flex-1 flex-col\">\n <span\n class=\"truncate text-sm font-medium text-color\"\n [title]=\"group.name\"\n >\n {{ group.name }}\n </span>\n @if (group.description) {\n <span\n class=\"truncate text-xs text-muted-color\"\n [title]=\"group.description\"\n >\n {{ group.description }}\n </span>\n }\n </div>\n <span\n class=\"inline-flex shrink-0 items-center gap-1 text-xs text-muted-color\"\n >\n <mt-icon icon=\"user.user-01\" class=\"text-sm\" />\n {{ group.membersCount }}\n </span>\n @if (group.isActivated) {\n <mt-summary-pill tone=\"success\">\n {{ t(\"active\") }}\n </mt-summary-pill>\n } @else {\n <mt-summary-pill tone=\"neutral\">\n {{ t(\"inactive\") }}\n </mt-summary-pill>\n }\n </li>\n } @empty {\n <li>\n <mt-empty-state\n variant=\"filtered\"\n illustration=\"none\"\n [title]=\"t('no-search-results')\"\n />\n </li>\n }\n </ul>\n </div>\n }\n }\n\n @case (\"roles\") {\n @if (roleTree().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('no-roles')\"\n [description]=\"t('user-roles-hint')\"\n />\n } @else {\n <mt-tree\n class=\"block\"\n [value]=\"roleTree()\"\n [filter]=\"true\"\n [filterPlaceholder]=\"t('search-roles')\"\n />\n }\n }\n\n @case (\"permissions\") {\n @if (permissionTree().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('no-permissions')\"\n [description]=\"t('user-permissions-hint')\"\n />\n } @else {\n <mt-tree\n class=\"block\"\n [value]=\"permissionTree()\"\n [filter]=\"true\"\n [filterPlaceholder]=\"t('search-permissions')\"\n />\n }\n }\n\n @case (\"accessibilities\") {\n <mt-summary-accessibilities\n [accessibilities]=\"accessibilities()\"\n [emptyMessage]=\"t('no-accessibilities')\"\n />\n }\n }\n }\n </div>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: Tree, selector: "mt-tree", inputs: ["value", "selection", "selectionMode", "nodeIcon", "propagateSelectionUp", "propagateSelectionDown", "checkAllChildren", "loading", "emptyMessage", "checkAllLabel", "filterPlaceholder", "dataKey", "filter", "filterMode", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "styleClass", "style", "pInputs", "nodeActions", "nodeContextmenuActions", "contextMenuSelection"], outputs: ["selectionChange", "contextMenuSelectionChange", "action"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: EmptyState, selector: "mt-empty-state", inputs: ["variant", "illustration", "title", "description", "actionLabel", "actionIcon"], outputs: ["actionClick"] }, { kind: "component", type: SummaryAccessibilities, selector: "mt-summary-accessibilities", inputs: ["accessibilities", "emptyMessage"] }, { kind: "component", type: SummaryPill, selector: "mt-summary-pill", inputs: ["tone"] }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }] });
1587
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: UserAccessSummary, isStandalone: true, selector: "mt-user-access-summary", inputs: { user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex h-full min-h-0 flex-col" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\r\n <!-- Who this is \u2014 rendered from the table row, so it never waits on the request. -->\r\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\r\n <section class=\"flex items-center gap-3 border-b border-surface p-4\">\r\n <mt-avatar\r\n [image]=\"\r\n profile().image\r\n ? $any(profile().image | secureImage: true : context : 'avatar/')\r\n : ''\r\n \"\r\n icon=\"user.user-01\"\r\n size=\"large\"\r\n styleClass=\"text-surface-600! bg-surface-200!\"\r\n />\r\n\r\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\r\n <div class=\"flex min-w-0 flex-wrap items-center gap-2\">\r\n <h2\r\n class=\"min-w-0 truncate text-base font-semibold text-color\"\r\n [title]=\"profile().displayName\"\r\n >\r\n {{ profile().displayName }}\r\n </h2>\r\n @if (profile().isExternal) {\r\n <mt-summary-pill tone=\"neutral\">\r\n <mt-icon icon=\"general.link-external-02\" class=\"text-xs\" />\r\n {{ t(\"external\") }}\r\n </mt-summary-pill>\r\n } @else {\r\n <mt-summary-pill tone=\"success\">\r\n <mt-icon icon=\"user.users-01\" class=\"text-xs\" />\r\n {{ t(\"internal\") }}\r\n </mt-summary-pill>\r\n }\r\n </div>\r\n\r\n @if (profile().userName) {\r\n <span\r\n class=\"inline-flex min-w-0 items-center gap-1 text-sm text-muted-color\"\r\n >\r\n <mt-icon icon=\"user.user-01\" class=\"shrink-0 text-sm\" />\r\n <span class=\"truncate\">{{ profile().userName }}</span>\r\n </span>\r\n }\r\n </div>\r\n </section>\r\n\r\n <div class=\"sticky top-0 z-10 bg-content px-4 pt-2\">\r\n <mt-tabs [options]=\"tabs()\" [(active)]=\"activeTab\" mode=\"underline\" />\r\n </div>\r\n\r\n <div class=\"p-4\">\r\n @if (loading()) {\r\n <div class=\"flex flex-col gap-3\">\r\n @for (row of [1, 2, 3, 4]; track row) {\r\n <p-skeleton height=\"3.5rem\" borderRadius=\"0.375rem\" />\r\n }\r\n </div>\r\n } @else if (error()) {\r\n <div\r\n class=\"flex flex-col items-start gap-3 rounded-md border border-rose-200 bg-rose-50 p-4 dark:border-rose-800 dark:bg-rose-900/30\"\r\n role=\"alert\"\r\n >\r\n <div class=\"flex flex-col gap-1\">\r\n <span\r\n class=\"text-sm font-semibold text-rose-700 dark:text-rose-200\"\r\n >\r\n {{ t(\"summary-load-failed\") }}\r\n </span>\r\n <span class=\"text-sm text-rose-600 dark:text-rose-300\">\r\n {{ t(\"summary-load-failed-hint\") }}\r\n </span>\r\n </div>\r\n <mt-button\r\n icon=\"arrow.refresh-cw-02\"\r\n severity=\"danger\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [label]=\"t('try-again')\"\r\n (onClick)=\"load()\"\r\n />\r\n </div>\r\n } @else {\r\n @switch (activeTab()) {\r\n @case (\"groups\") {\r\n @if (groups().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('no-linked-groups')\"\r\n [description]=\"t('user-groups-hint')\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-3\">\r\n @if (showGroupSearch()) {\r\n <mt-text-field\r\n [formControl]=\"groupSearch\"\r\n icon=\"general.search-lg\"\r\n [placeholder]=\"t('search-groups')\"\r\n />\r\n }\r\n <ul class=\"rounded-md border border-surface\">\r\n @for (group of filteredGroups(); track group.id) {\r\n <li\r\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\r\n >\r\n <mt-avatar\r\n icon=\"user.users-01\"\r\n shape=\"square\"\r\n styleClass=\"bg-primary-50! text-primary!\"\r\n />\r\n <div class=\"flex min-w-0 flex-1 flex-col\">\r\n <span\r\n class=\"truncate text-sm font-medium text-color\"\r\n [title]=\"group.name\"\r\n >\r\n {{ group.name }}\r\n </span>\r\n @if (group.description) {\r\n <span\r\n class=\"truncate text-xs text-muted-color\"\r\n [title]=\"group.description\"\r\n >\r\n {{ group.description }}\r\n </span>\r\n }\r\n </div>\r\n <span\r\n class=\"inline-flex shrink-0 items-center gap-1 text-xs text-muted-color\"\r\n >\r\n <mt-icon icon=\"user.user-01\" class=\"text-sm\" />\r\n {{ group.membersCount }}\r\n </span>\r\n @if (group.isActivated) {\r\n <mt-summary-pill tone=\"success\">\r\n {{ t(\"active\") }}\r\n </mt-summary-pill>\r\n } @else {\r\n <mt-summary-pill tone=\"neutral\">\r\n {{ t(\"inactive\") }}\r\n </mt-summary-pill>\r\n }\r\n </li>\r\n } @empty {\r\n <li>\r\n <mt-empty-state\r\n variant=\"filtered\"\r\n illustration=\"none\"\r\n [title]=\"t('no-search-results')\"\r\n />\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"roles\") {\r\n @if (roleTree().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('no-roles')\"\r\n [description]=\"t('user-roles-hint')\"\r\n />\r\n } @else {\r\n <mt-tree\r\n class=\"block\"\r\n [value]=\"roleTree()\"\r\n [filter]=\"true\"\r\n [filterPlaceholder]=\"t('search-roles')\"\r\n />\r\n }\r\n }\r\n\r\n @case (\"permissions\") {\r\n @if (permissionTree().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('no-permissions')\"\r\n [description]=\"t('user-permissions-hint')\"\r\n />\r\n } @else {\r\n <mt-tree\r\n class=\"block\"\r\n [value]=\"permissionTree()\"\r\n [filter]=\"true\"\r\n [filterPlaceholder]=\"t('search-permissions')\"\r\n />\r\n }\r\n }\r\n\r\n @case (\"accessibilities\") {\r\n <mt-summary-accessibilities\r\n [accessibilities]=\"accessibilities()\"\r\n [emptyMessage]=\"t('no-accessibilities')\"\r\n />\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: Tree, selector: "mt-tree", inputs: ["value", "selection", "selectionMode", "nodeIcon", "propagateSelectionUp", "propagateSelectionDown", "checkAllChildren", "loading", "emptyMessage", "checkAllLabel", "filterPlaceholder", "dataKey", "filter", "filterMode", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "styleClass", "style", "pInputs", "nodeActions", "nodeContextmenuActions", "contextMenuSelection"], outputs: ["selectionChange", "contextMenuSelectionChange", "action"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: EmptyState, selector: "mt-empty-state", inputs: ["variant", "illustration", "title", "description", "actionLabel", "actionIcon"], outputs: ["actionClick"] }, { kind: "component", type: SummaryAccessibilities, selector: "mt-summary-accessibilities", inputs: ["accessibilities", "emptyMessage"] }, { kind: "component", type: SummaryPill, selector: "mt-summary-pill", inputs: ["tone"] }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }] });
1498
1588
  }
1499
1589
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UserAccessSummary, decorators: [{
1500
1590
  type: Component,
@@ -1512,7 +1602,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1512
1602
  SecureImagePipe,
1513
1603
  SummaryAccessibilities,
1514
1604
  SummaryPill,
1515
- ], template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\n <!-- Who this is \u2014 rendered from the table row, so it never waits on the request. -->\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\n <section class=\"flex items-center gap-3 border-b border-surface p-4\">\n <mt-avatar\n [image]=\"\n profile().image\n ? $any(profile().image | secureImage: true : context : 'avatar/')\n : ''\n \"\n icon=\"user.user-01\"\n size=\"large\"\n styleClass=\"text-surface-600! bg-surface-200!\"\n />\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <div class=\"flex min-w-0 flex-wrap items-center gap-2\">\n <h2\n class=\"min-w-0 truncate text-base font-semibold text-color\"\n [title]=\"profile().displayName\"\n >\n {{ profile().displayName }}\n </h2>\n @if (profile().isExternal) {\n <mt-summary-pill tone=\"neutral\">\n <mt-icon icon=\"general.link-external-02\" class=\"text-xs\" />\n {{ t(\"external\") }}\n </mt-summary-pill>\n } @else {\n <mt-summary-pill tone=\"success\">\n <mt-icon icon=\"user.users-01\" class=\"text-xs\" />\n {{ t(\"internal\") }}\n </mt-summary-pill>\n }\n </div>\n\n @if (profile().userName) {\n <span\n class=\"inline-flex min-w-0 items-center gap-1 text-sm text-muted-color\"\n >\n <mt-icon icon=\"user.user-01\" class=\"shrink-0 text-sm\" />\n <span class=\"truncate\">{{ profile().userName }}</span>\n </span>\n }\n </div>\n </section>\n\n <div class=\"sticky top-0 z-10 bg-content px-4 pt-2\">\n <mt-tabs [options]=\"tabs()\" [(active)]=\"activeTab\" mode=\"underline\" />\n </div>\n\n <div class=\"p-4\">\n @if (loading()) {\n <div class=\"flex flex-col gap-3\">\n @for (row of [1, 2, 3, 4]; track row) {\n <p-skeleton height=\"3.5rem\" borderRadius=\"0.375rem\" />\n }\n </div>\n } @else if (error()) {\n <div\n class=\"flex flex-col items-start gap-3 rounded-md border border-rose-200 bg-rose-50 p-4 dark:border-rose-800 dark:bg-rose-900/30\"\n role=\"alert\"\n >\n <div class=\"flex flex-col gap-1\">\n <span\n class=\"text-sm font-semibold text-rose-700 dark:text-rose-200\"\n >\n {{ t(\"summary-load-failed\") }}\n </span>\n <span class=\"text-sm text-rose-600 dark:text-rose-300\">\n {{ t(\"summary-load-failed-hint\") }}\n </span>\n </div>\n <mt-button\n icon=\"arrow.refresh-cw-02\"\n severity=\"danger\"\n variant=\"outlined\"\n size=\"small\"\n [label]=\"t('try-again')\"\n (onClick)=\"load()\"\n />\n </div>\n } @else {\n @switch (activeTab()) {\n @case (\"groups\") {\n @if (groups().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('no-linked-groups')\"\n [description]=\"t('user-groups-hint')\"\n />\n } @else {\n <div class=\"flex flex-col gap-3\">\n @if (showGroupSearch()) {\n <mt-text-field\n [formControl]=\"groupSearch\"\n icon=\"general.search-lg\"\n [placeholder]=\"t('search-groups')\"\n />\n }\n <ul class=\"rounded-md border border-surface\">\n @for (group of filteredGroups(); track group.id) {\n <li\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\n >\n <mt-avatar\n icon=\"user.users-01\"\n shape=\"square\"\n styleClass=\"bg-primary-50! text-primary!\"\n />\n <div class=\"flex min-w-0 flex-1 flex-col\">\n <span\n class=\"truncate text-sm font-medium text-color\"\n [title]=\"group.name\"\n >\n {{ group.name }}\n </span>\n @if (group.description) {\n <span\n class=\"truncate text-xs text-muted-color\"\n [title]=\"group.description\"\n >\n {{ group.description }}\n </span>\n }\n </div>\n <span\n class=\"inline-flex shrink-0 items-center gap-1 text-xs text-muted-color\"\n >\n <mt-icon icon=\"user.user-01\" class=\"text-sm\" />\n {{ group.membersCount }}\n </span>\n @if (group.isActivated) {\n <mt-summary-pill tone=\"success\">\n {{ t(\"active\") }}\n </mt-summary-pill>\n } @else {\n <mt-summary-pill tone=\"neutral\">\n {{ t(\"inactive\") }}\n </mt-summary-pill>\n }\n </li>\n } @empty {\n <li>\n <mt-empty-state\n variant=\"filtered\"\n illustration=\"none\"\n [title]=\"t('no-search-results')\"\n />\n </li>\n }\n </ul>\n </div>\n }\n }\n\n @case (\"roles\") {\n @if (roleTree().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('no-roles')\"\n [description]=\"t('user-roles-hint')\"\n />\n } @else {\n <mt-tree\n class=\"block\"\n [value]=\"roleTree()\"\n [filter]=\"true\"\n [filterPlaceholder]=\"t('search-roles')\"\n />\n }\n }\n\n @case (\"permissions\") {\n @if (permissionTree().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('no-permissions')\"\n [description]=\"t('user-permissions-hint')\"\n />\n } @else {\n <mt-tree\n class=\"block\"\n [value]=\"permissionTree()\"\n [filter]=\"true\"\n [filterPlaceholder]=\"t('search-permissions')\"\n />\n }\n }\n\n @case (\"accessibilities\") {\n <mt-summary-accessibilities\n [accessibilities]=\"accessibilities()\"\n [emptyMessage]=\"t('no-accessibilities')\"\n />\n }\n }\n }\n </div>\n </div>\n</ng-container>\n" }]
1605
+ ], template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\r\n <!-- Who this is \u2014 rendered from the table row, so it never waits on the request. -->\r\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\r\n <section class=\"flex items-center gap-3 border-b border-surface p-4\">\r\n <mt-avatar\r\n [image]=\"\r\n profile().image\r\n ? $any(profile().image | secureImage: true : context : 'avatar/')\r\n : ''\r\n \"\r\n icon=\"user.user-01\"\r\n size=\"large\"\r\n styleClass=\"text-surface-600! bg-surface-200!\"\r\n />\r\n\r\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\r\n <div class=\"flex min-w-0 flex-wrap items-center gap-2\">\r\n <h2\r\n class=\"min-w-0 truncate text-base font-semibold text-color\"\r\n [title]=\"profile().displayName\"\r\n >\r\n {{ profile().displayName }}\r\n </h2>\r\n @if (profile().isExternal) {\r\n <mt-summary-pill tone=\"neutral\">\r\n <mt-icon icon=\"general.link-external-02\" class=\"text-xs\" />\r\n {{ t(\"external\") }}\r\n </mt-summary-pill>\r\n } @else {\r\n <mt-summary-pill tone=\"success\">\r\n <mt-icon icon=\"user.users-01\" class=\"text-xs\" />\r\n {{ t(\"internal\") }}\r\n </mt-summary-pill>\r\n }\r\n </div>\r\n\r\n @if (profile().userName) {\r\n <span\r\n class=\"inline-flex min-w-0 items-center gap-1 text-sm text-muted-color\"\r\n >\r\n <mt-icon icon=\"user.user-01\" class=\"shrink-0 text-sm\" />\r\n <span class=\"truncate\">{{ profile().userName }}</span>\r\n </span>\r\n }\r\n </div>\r\n </section>\r\n\r\n <div class=\"sticky top-0 z-10 bg-content px-4 pt-2\">\r\n <mt-tabs [options]=\"tabs()\" [(active)]=\"activeTab\" mode=\"underline\" />\r\n </div>\r\n\r\n <div class=\"p-4\">\r\n @if (loading()) {\r\n <div class=\"flex flex-col gap-3\">\r\n @for (row of [1, 2, 3, 4]; track row) {\r\n <p-skeleton height=\"3.5rem\" borderRadius=\"0.375rem\" />\r\n }\r\n </div>\r\n } @else if (error()) {\r\n <div\r\n class=\"flex flex-col items-start gap-3 rounded-md border border-rose-200 bg-rose-50 p-4 dark:border-rose-800 dark:bg-rose-900/30\"\r\n role=\"alert\"\r\n >\r\n <div class=\"flex flex-col gap-1\">\r\n <span\r\n class=\"text-sm font-semibold text-rose-700 dark:text-rose-200\"\r\n >\r\n {{ t(\"summary-load-failed\") }}\r\n </span>\r\n <span class=\"text-sm text-rose-600 dark:text-rose-300\">\r\n {{ t(\"summary-load-failed-hint\") }}\r\n </span>\r\n </div>\r\n <mt-button\r\n icon=\"arrow.refresh-cw-02\"\r\n severity=\"danger\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [label]=\"t('try-again')\"\r\n (onClick)=\"load()\"\r\n />\r\n </div>\r\n } @else {\r\n @switch (activeTab()) {\r\n @case (\"groups\") {\r\n @if (groups().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('no-linked-groups')\"\r\n [description]=\"t('user-groups-hint')\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-3\">\r\n @if (showGroupSearch()) {\r\n <mt-text-field\r\n [formControl]=\"groupSearch\"\r\n icon=\"general.search-lg\"\r\n [placeholder]=\"t('search-groups')\"\r\n />\r\n }\r\n <ul class=\"rounded-md border border-surface\">\r\n @for (group of filteredGroups(); track group.id) {\r\n <li\r\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\r\n >\r\n <mt-avatar\r\n icon=\"user.users-01\"\r\n shape=\"square\"\r\n styleClass=\"bg-primary-50! text-primary!\"\r\n />\r\n <div class=\"flex min-w-0 flex-1 flex-col\">\r\n <span\r\n class=\"truncate text-sm font-medium text-color\"\r\n [title]=\"group.name\"\r\n >\r\n {{ group.name }}\r\n </span>\r\n @if (group.description) {\r\n <span\r\n class=\"truncate text-xs text-muted-color\"\r\n [title]=\"group.description\"\r\n >\r\n {{ group.description }}\r\n </span>\r\n }\r\n </div>\r\n <span\r\n class=\"inline-flex shrink-0 items-center gap-1 text-xs text-muted-color\"\r\n >\r\n <mt-icon icon=\"user.user-01\" class=\"text-sm\" />\r\n {{ group.membersCount }}\r\n </span>\r\n @if (group.isActivated) {\r\n <mt-summary-pill tone=\"success\">\r\n {{ t(\"active\") }}\r\n </mt-summary-pill>\r\n } @else {\r\n <mt-summary-pill tone=\"neutral\">\r\n {{ t(\"inactive\") }}\r\n </mt-summary-pill>\r\n }\r\n </li>\r\n } @empty {\r\n <li>\r\n <mt-empty-state\r\n variant=\"filtered\"\r\n illustration=\"none\"\r\n [title]=\"t('no-search-results')\"\r\n />\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"roles\") {\r\n @if (roleTree().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('no-roles')\"\r\n [description]=\"t('user-roles-hint')\"\r\n />\r\n } @else {\r\n <mt-tree\r\n class=\"block\"\r\n [value]=\"roleTree()\"\r\n [filter]=\"true\"\r\n [filterPlaceholder]=\"t('search-roles')\"\r\n />\r\n }\r\n }\r\n\r\n @case (\"permissions\") {\r\n @if (permissionTree().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('no-permissions')\"\r\n [description]=\"t('user-permissions-hint')\"\r\n />\r\n } @else {\r\n <mt-tree\r\n class=\"block\"\r\n [value]=\"permissionTree()\"\r\n [filter]=\"true\"\r\n [filterPlaceholder]=\"t('search-permissions')\"\r\n />\r\n }\r\n }\r\n\r\n @case (\"accessibilities\") {\r\n <mt-summary-accessibilities\r\n [accessibilities]=\"accessibilities()\"\r\n [emptyMessage]=\"t('no-accessibilities')\"\r\n />\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n</ng-container>\r\n" }]
1516
1606
  }], propDecorators: { user: [{ type: i0.Input, args: [{ isSignal: true, alias: "user", required: false }] }] } });
1517
1607
 
1518
1608
  class Users {
@@ -1520,6 +1610,7 @@ class Users {
1520
1610
  applicationLinkCol = viewChild.required('applicationLinkCol');
1521
1611
  emailCol = viewChild.required('emailCol');
1522
1612
  facade = inject(UsersGroupsFacade);
1613
+ toast = inject(ToastService);
1523
1614
  modal = inject(ModalService);
1524
1615
  translocoService = inject(TranslocoService);
1525
1616
  users = computed(() => {
@@ -1575,7 +1666,26 @@ class Users {
1575
1666
  ], ...(ngDevMode ? [{ debugName: "tableActions" }] : /* istanbul ignore next */ []));
1576
1667
  deletingRowIds = signal([], ...(ngDevMode ? [{ debugName: "deletingRowIds" }] : /* istanbul ignore next */ []));
1577
1668
  linkingRowIds = signal([], ...(ngDevMode ? [{ debugName: "linkingRowIds" }] : /* istanbul ignore next */ []));
1669
+ unlockingRowIds = signal([], ...(ngDevMode ? [{ debugName: "unlockingRowIds" }] : /* istanbul ignore next */ []));
1578
1670
  rowActions = signal([
1671
+ {
1672
+ icon: 'security.lock-unlocked-01',
1673
+ tooltip: this.translocoService.translate('users-groups.unlock-account'),
1674
+ color: 'secondary',
1675
+ action: (row) => this.unlockUser(row),
1676
+ hidden: (row) => !row.id || !this.facade.unlockableUserIds().includes(row.id),
1677
+ loading: (row) => this.unlockingRowIds().includes(row.id),
1678
+ // A dialog, not a popup: the cross-application warning needs a header
1679
+ // and a bounded width (a popup stretches it across the table).
1680
+ confirmation: {
1681
+ type: 'dialog',
1682
+ header: this.translocoService.translate('users-groups.unlock-account'),
1683
+ message: this.translocoService.translate('users-groups.unlock-confirm-message'),
1684
+ icon: 'security.lock-unlocked-01',
1685
+ acceptLabel: this.translocoService.translate('users-groups.unlock-account'),
1686
+ rejectLabel: this.translocoService.translate('users-groups.cancel'),
1687
+ },
1688
+ },
1579
1689
  {
1580
1690
  icon: 'general.eye',
1581
1691
  tooltip: this.translocoService.translate('users-groups.access-summary'),
@@ -1720,6 +1830,31 @@ class Users {
1720
1830
  ngOnInit() {
1721
1831
  this.facade.getUsers();
1722
1832
  }
1833
+ unlockUser(user) {
1834
+ const id = user.id;
1835
+ if (!id ||
1836
+ !this.facade.unlockableUserIds().includes(id) ||
1837
+ this.unlockingRowIds().includes(id))
1838
+ return;
1839
+ this.unlockingRowIds.update((ids) => [...ids, id]);
1840
+ this.facade
1841
+ .unlockUser(id)
1842
+ .pipe(finalize(() => this.unlockingRowIds.update((ids) => ids.filter((value) => value !== id))))
1843
+ .subscribe({
1844
+ next: () => {
1845
+ this.toast.success(this.facade.unlockResponses()[id]?.message ||
1846
+ this.translocoService.translate('users-groups.unlock-succeeded'));
1847
+ this.facade.getUsers();
1848
+ },
1849
+ error: (error) => {
1850
+ const message = error?.error?.errors?.message ?? error?.error?.message;
1851
+ this.toast.error(typeof message === 'string' && message.trim()
1852
+ ? message
1853
+ : this.translocoService.translate('users-groups.unlock-failed'));
1854
+ this.facade.getUsers();
1855
+ },
1856
+ });
1857
+ }
1723
1858
  isLinkedToCurrentApplication(user) {
1724
1859
  return user?.isLinkedToCurrentApplication !== false;
1725
1860
  }
@@ -1793,7 +1928,7 @@ class Users {
1793
1928
  });
1794
1929
  }
1795
1930
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Users, deps: [], target: i0.ɵɵFactoryTarget.Component });
1796
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Users, isStandalone: true, selector: "mt-users", viewQueries: [{ propertyName: "typeCol", first: true, predicate: ["typeCol"], descendants: true, isSignal: true }, { propertyName: "applicationLinkCol", first: true, predicate: ["applicationLinkCol"], descendants: true, isSignal: true }, { propertyName: "emailCol", first: true, predicate: ["emailCol"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\n <div class=\"mt-5\">\n <ng-template #typeCol let-row>\n @if (row.isExternal) {\n <span\n class=\"inline-flex items-center gap-1 rounded-md bg-slate-50 dark:bg-slate-900/30 p-2\"\n >\n <mt-icon\n icon=\"general.link-external-02\"\n class=\"text-slate-600 dark:text-slate-300 text-sm\"\n />\n <span class=\"text-slate-700 dark:text-slate-200 text-xs font-medium\">\n {{ t(\"external\") }}\n </span>\n </span>\n } @else {\n <span\n class=\"inline-flex items-center gap-1 rounded-md bg-emerald-50 dark:bg-emerald-900/30 p-2\"\n >\n <mt-icon\n icon=\"user.users-01\"\n class=\"text-emerald-600 dark:text-emerald-300 text-sm\"\n />\n <span\n class=\"text-emerald-700 dark:text-emerald-200 text-xs font-medium\"\n >\n {{ t(\"internal\") }}\n </span>\n </span>\n }\n </ng-template>\n\n <ng-template #applicationLinkCol let-row>\n @if (isLinkedToCurrentApplication(row)) {\n <span\n class=\"inline-flex items-center gap-1 rounded-md bg-emerald-50 dark:bg-emerald-900/30 p-2\"\n >\n <mt-icon\n icon=\"user.user-check-01\"\n class=\"text-emerald-600 dark:text-emerald-300 text-sm\"\n />\n <span\n class=\"text-emerald-700 dark:text-emerald-200 text-xs font-medium\"\n >\n {{ t(\"linked\") }}\n </span>\n </span>\n } @else {\n <span\n class=\"inline-flex items-center gap-1 rounded-md bg-amber-50 dark:bg-amber-900/30 p-2\"\n >\n <mt-icon\n icon=\"general.link-broken-01\"\n class=\"text-amber-600 dark:text-amber-300 text-sm\"\n />\n <span class=\"text-amber-700 dark:text-amber-200 text-xs font-medium\">\n {{ t(\"not-linked\") }}\n </span>\n </span>\n }\n </ng-template>\n\n <ng-template #emailCol let-row>\n <span\n class=\"block max-w-64 truncate\"\n mtTruncateTooltip\n tooltipPosition=\"top\"\n >{{ row.email }}</span\n >\n </ng-template>\n\n <mt-table\n [tabs]=\"tabs()\"\n [(activeTab)]=\"activeTab\"\n [data]=\"users()\"\n [columns]=\"tableColumns()\"\n [actions]=\"tableActions()\"\n [rowActions]=\"rowActions()\"\n [generalSearch]=\"true\"\n [showFilters]=\"false\"\n [loading]=\"loading()\"\n storageKey=\"users-groups-users-table\"\n >\n </mt-table>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }] });
1931
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Users, isStandalone: true, selector: "mt-users", viewQueries: [{ propertyName: "typeCol", first: true, predicate: ["typeCol"], descendants: true, isSignal: true }, { propertyName: "applicationLinkCol", first: true, predicate: ["applicationLinkCol"], descendants: true, isSignal: true }, { propertyName: "emailCol", first: true, predicate: ["emailCol"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\r\n <!-- mt-table wraps row actions; a locked row has five, so keep them on one line. -->\r\n <div class=\"mt-5 [&_.mt-actions-column>div]:flex-nowrap\">\r\n <ng-template #typeCol let-row>\r\n @if (row.isExternal) {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-md bg-slate-50 dark:bg-slate-900/30 p-2\"\r\n >\r\n <mt-icon\r\n icon=\"general.link-external-02\"\r\n class=\"text-slate-600 dark:text-slate-300 text-sm\"\r\n />\r\n <span class=\"text-slate-700 dark:text-slate-200 text-xs font-medium\">\r\n {{ t(\"external\") }}\r\n </span>\r\n </span>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-md bg-emerald-50 dark:bg-emerald-900/30 p-2\"\r\n >\r\n <mt-icon\r\n icon=\"user.users-01\"\r\n class=\"text-emerald-600 dark:text-emerald-300 text-sm\"\r\n />\r\n <span\r\n class=\"text-emerald-700 dark:text-emerald-200 text-xs font-medium\"\r\n >\r\n {{ t(\"internal\") }}\r\n </span>\r\n </span>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #applicationLinkCol let-row>\r\n @if (isLinkedToCurrentApplication(row)) {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-md bg-emerald-50 dark:bg-emerald-900/30 p-2\"\r\n >\r\n <mt-icon\r\n icon=\"user.user-check-01\"\r\n class=\"text-emerald-600 dark:text-emerald-300 text-sm\"\r\n />\r\n <span\r\n class=\"text-emerald-700 dark:text-emerald-200 text-xs font-medium\"\r\n >\r\n {{ t(\"linked\") }}\r\n </span>\r\n </span>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-md bg-amber-50 dark:bg-amber-900/30 p-2\"\r\n >\r\n <mt-icon\r\n icon=\"general.link-broken-01\"\r\n class=\"text-amber-600 dark:text-amber-300 text-sm\"\r\n />\r\n <span class=\"text-amber-700 dark:text-amber-200 text-xs font-medium\">\r\n {{ t(\"not-linked\") }}\r\n </span>\r\n </span>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #emailCol let-row>\r\n <span\r\n class=\"block max-w-64 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ row.email }}</span\r\n >\r\n </ng-template>\r\n\r\n <mt-table\r\n [tabs]=\"tabs()\"\r\n [(activeTab)]=\"activeTab\"\r\n [data]=\"users()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [generalSearch]=\"true\"\r\n [showFilters]=\"false\"\r\n [loading]=\"loading()\"\r\n storageKey=\"users-groups-users-table\"\r\n >\r\n </mt-table>\r\n </div>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }] });
1797
1932
  }
1798
1933
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Users, decorators: [{
1799
1934
  type: Component,
@@ -1804,7 +1939,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1804
1939
  Icon,
1805
1940
  TranslocoDirective,
1806
1941
  TruncateTooltip,
1807
- ], template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\n <div class=\"mt-5\">\n <ng-template #typeCol let-row>\n @if (row.isExternal) {\n <span\n class=\"inline-flex items-center gap-1 rounded-md bg-slate-50 dark:bg-slate-900/30 p-2\"\n >\n <mt-icon\n icon=\"general.link-external-02\"\n class=\"text-slate-600 dark:text-slate-300 text-sm\"\n />\n <span class=\"text-slate-700 dark:text-slate-200 text-xs font-medium\">\n {{ t(\"external\") }}\n </span>\n </span>\n } @else {\n <span\n class=\"inline-flex items-center gap-1 rounded-md bg-emerald-50 dark:bg-emerald-900/30 p-2\"\n >\n <mt-icon\n icon=\"user.users-01\"\n class=\"text-emerald-600 dark:text-emerald-300 text-sm\"\n />\n <span\n class=\"text-emerald-700 dark:text-emerald-200 text-xs font-medium\"\n >\n {{ t(\"internal\") }}\n </span>\n </span>\n }\n </ng-template>\n\n <ng-template #applicationLinkCol let-row>\n @if (isLinkedToCurrentApplication(row)) {\n <span\n class=\"inline-flex items-center gap-1 rounded-md bg-emerald-50 dark:bg-emerald-900/30 p-2\"\n >\n <mt-icon\n icon=\"user.user-check-01\"\n class=\"text-emerald-600 dark:text-emerald-300 text-sm\"\n />\n <span\n class=\"text-emerald-700 dark:text-emerald-200 text-xs font-medium\"\n >\n {{ t(\"linked\") }}\n </span>\n </span>\n } @else {\n <span\n class=\"inline-flex items-center gap-1 rounded-md bg-amber-50 dark:bg-amber-900/30 p-2\"\n >\n <mt-icon\n icon=\"general.link-broken-01\"\n class=\"text-amber-600 dark:text-amber-300 text-sm\"\n />\n <span class=\"text-amber-700 dark:text-amber-200 text-xs font-medium\">\n {{ t(\"not-linked\") }}\n </span>\n </span>\n }\n </ng-template>\n\n <ng-template #emailCol let-row>\n <span\n class=\"block max-w-64 truncate\"\n mtTruncateTooltip\n tooltipPosition=\"top\"\n >{{ row.email }}</span\n >\n </ng-template>\n\n <mt-table\n [tabs]=\"tabs()\"\n [(activeTab)]=\"activeTab\"\n [data]=\"users()\"\n [columns]=\"tableColumns()\"\n [actions]=\"tableActions()\"\n [rowActions]=\"rowActions()\"\n [generalSearch]=\"true\"\n [showFilters]=\"false\"\n [loading]=\"loading()\"\n storageKey=\"users-groups-users-table\"\n >\n </mt-table>\n </div>\n</ng-container>\n" }]
1942
+ ], template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\r\n <!-- mt-table wraps row actions; a locked row has five, so keep them on one line. -->\r\n <div class=\"mt-5 [&_.mt-actions-column>div]:flex-nowrap\">\r\n <ng-template #typeCol let-row>\r\n @if (row.isExternal) {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-md bg-slate-50 dark:bg-slate-900/30 p-2\"\r\n >\r\n <mt-icon\r\n icon=\"general.link-external-02\"\r\n class=\"text-slate-600 dark:text-slate-300 text-sm\"\r\n />\r\n <span class=\"text-slate-700 dark:text-slate-200 text-xs font-medium\">\r\n {{ t(\"external\") }}\r\n </span>\r\n </span>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-md bg-emerald-50 dark:bg-emerald-900/30 p-2\"\r\n >\r\n <mt-icon\r\n icon=\"user.users-01\"\r\n class=\"text-emerald-600 dark:text-emerald-300 text-sm\"\r\n />\r\n <span\r\n class=\"text-emerald-700 dark:text-emerald-200 text-xs font-medium\"\r\n >\r\n {{ t(\"internal\") }}\r\n </span>\r\n </span>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #applicationLinkCol let-row>\r\n @if (isLinkedToCurrentApplication(row)) {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-md bg-emerald-50 dark:bg-emerald-900/30 p-2\"\r\n >\r\n <mt-icon\r\n icon=\"user.user-check-01\"\r\n class=\"text-emerald-600 dark:text-emerald-300 text-sm\"\r\n />\r\n <span\r\n class=\"text-emerald-700 dark:text-emerald-200 text-xs font-medium\"\r\n >\r\n {{ t(\"linked\") }}\r\n </span>\r\n </span>\r\n } @else {\r\n <span\r\n class=\"inline-flex items-center gap-1 rounded-md bg-amber-50 dark:bg-amber-900/30 p-2\"\r\n >\r\n <mt-icon\r\n icon=\"general.link-broken-01\"\r\n class=\"text-amber-600 dark:text-amber-300 text-sm\"\r\n />\r\n <span class=\"text-amber-700 dark:text-amber-200 text-xs font-medium\">\r\n {{ t(\"not-linked\") }}\r\n </span>\r\n </span>\r\n }\r\n </ng-template>\r\n\r\n <ng-template #emailCol let-row>\r\n <span\r\n class=\"block max-w-64 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ row.email }}</span\r\n >\r\n </ng-template>\r\n\r\n <mt-table\r\n [tabs]=\"tabs()\"\r\n [(activeTab)]=\"activeTab\"\r\n [data]=\"users()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [generalSearch]=\"true\"\r\n [showFilters]=\"false\"\r\n [loading]=\"loading()\"\r\n storageKey=\"users-groups-users-table\"\r\n >\r\n </mt-table>\r\n </div>\r\n</ng-container>\r\n" }]
1808
1943
  }], propDecorators: { typeCol: [{ type: i0.ViewChild, args: ['typeCol', { isSignal: true }] }], applicationLinkCol: [{ type: i0.ViewChild, args: ['applicationLinkCol', { isSignal: true }] }], emailCol: [{ type: i0.ViewChild, args: ['emailCol', { isSignal: true }] }] } });
1809
1944
 
1810
1945
  /**
@@ -2276,7 +2411,7 @@ class GroupAccessSummary {
2276
2411
  return this.translocoService.translate(`users-groups.${key}`);
2277
2412
  }
2278
2413
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GroupAccessSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
2279
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GroupAccessSummary, isStandalone: true, selector: "mt-group-access-summary", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex h-full min-h-0 flex-col" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\n <!-- Which group \u2014 rendered from the table row, so it never waits on the request. -->\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\n <section class=\"flex items-center gap-3 border-b border-surface p-4\">\n <mt-avatar\n icon=\"user.users-01\"\n size=\"large\"\n shape=\"square\"\n styleClass=\"bg-primary-50! text-primary!\"\n />\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <div class=\"flex min-w-0 flex-wrap items-center gap-2\">\n <h2\n class=\"min-w-0 truncate text-base font-semibold text-color\"\n [title]=\"header().name\"\n >\n {{ header().name }}\n </h2>\n @if (header().isActivated) {\n <mt-summary-pill tone=\"success\">{{ t(\"active\") }}</mt-summary-pill>\n } @else {\n <mt-summary-pill tone=\"neutral\">{{\n t(\"inactive\")\n }}</mt-summary-pill>\n }\n </div>\n\n @if (header().description) {\n <p\n class=\"line-clamp-2 text-sm text-muted-color\"\n [title]=\"header().description\"\n >\n {{ header().description }}\n </p>\n }\n </div>\n </section>\n\n <div class=\"sticky top-0 z-10 bg-content px-4 pt-2\">\n <mt-tabs [options]=\"tabs()\" [(active)]=\"activeTab\" mode=\"underline\" />\n </div>\n\n <div class=\"p-4\">\n @if (loading()) {\n <div class=\"flex flex-col gap-3\">\n @for (row of [1, 2, 3, 4]; track row) {\n <p-skeleton height=\"3.5rem\" borderRadius=\"0.375rem\" />\n }\n </div>\n } @else if (error()) {\n <div\n class=\"flex flex-col items-start gap-3 rounded-md border border-rose-200 bg-rose-50 p-4 dark:border-rose-800 dark:bg-rose-900/30\"\n role=\"alert\"\n >\n <div class=\"flex flex-col gap-1\">\n <span\n class=\"text-sm font-semibold text-rose-700 dark:text-rose-200\"\n >\n {{ t(\"summary-load-failed\") }}\n </span>\n <span class=\"text-sm text-rose-600 dark:text-rose-300\">\n {{ t(\"summary-load-failed-hint\") }}\n </span>\n </div>\n <mt-button\n icon=\"arrow.refresh-cw-02\"\n severity=\"danger\"\n variant=\"outlined\"\n size=\"small\"\n [label]=\"t('try-again')\"\n (onClick)=\"load()\"\n />\n </div>\n } @else {\n @switch (activeTab()) {\n @case (\"members\") {\n @if (members().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('no-members')\"\n [description]=\"t('group-members-hint')\"\n />\n } @else {\n <div class=\"flex flex-col gap-3\">\n @if (showMemberSearch()) {\n <mt-text-field\n [formControl]=\"memberSearch\"\n icon=\"general.search-lg\"\n [placeholder]=\"t('search-members')\"\n />\n }\n <ul class=\"rounded-md border border-surface\">\n @for (member of filteredMembers(); track member.id) {\n <li\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\n >\n <mt-avatar\n [image]=\"\n member.photo\n ? $any(\n member.photo\n | secureImage: true : context : 'avatar/'\n )\n : ''\n \"\n icon=\"user.user-01\"\n styleClass=\"text-surface-600! bg-surface-200!\"\n />\n <div class=\"flex min-w-0 flex-1 flex-col\">\n <span\n class=\"truncate text-sm font-medium text-color\"\n [title]=\"member.displayName\"\n >\n {{ member.displayName }}\n </span>\n @if (member.email || member.userName) {\n <span\n class=\"truncate text-xs text-muted-color\"\n [title]=\"member.email || member.userName\"\n >\n {{ member.email || member.userName }}\n </span>\n }\n </div>\n @for (flag of member.flags; track flag.label) {\n <mt-summary-pill [tone]=\"flag.tone\">\n {{ flag.label }}\n </mt-summary-pill>\n }\n </li>\n } @empty {\n <li>\n <mt-empty-state\n variant=\"filtered\"\n illustration=\"none\"\n [title]=\"t('no-search-results')\"\n />\n </li>\n }\n </ul>\n </div>\n }\n }\n\n @case (\"permissions\") {\n @if (permissionTree().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('group-no-permissions')\"\n [description]=\"t('group-permissions-hint')\"\n />\n } @else {\n <mt-tree\n class=\"block\"\n [value]=\"permissionTree()\"\n [filter]=\"true\"\n [filterPlaceholder]=\"t('search-permissions')\"\n />\n }\n }\n\n @case (\"accessibilities\") {\n <mt-summary-accessibilities\n [accessibilities]=\"accessibilities()\"\n [emptyMessage]=\"t('group-no-accessibilities')\"\n />\n }\n\n @case (\"usages\") {\n @if (usageCount() === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('no-usages')\"\n [description]=\"t('usages-coverage')\"\n />\n } @else {\n <div class=\"flex flex-col gap-4\">\n @if (blockingCount() > 0) {\n <div\n class=\"flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-800 dark:border-amber-800 dark:bg-amber-900/30 dark:text-amber-200\"\n role=\"status\"\n >\n <mt-icon\n icon=\"alert.alert-triangle\"\n class=\"mt-0.5 shrink-0 text-base\"\n />\n <span>\n {{\n t(\"usages-blocking-note\", { count: blockingCount() })\n }}\n </span>\n </div>\n }\n\n @if (impactTiles().length) {\n <section class=\"flex flex-col gap-2\">\n <div class=\"flex flex-col\">\n <span class=\"text-sm font-semibold text-color\">\n {{ t(\"runtime-impact\") }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ t(\"runtime-impact-hint\") }}\n </span>\n </div>\n <div class=\"grid grid-cols-2 gap-2 sm:grid-cols-3\">\n @for (tile of impactTiles(); track tile.key) {\n <div\n class=\"flex flex-col gap-0.5 rounded-md border border-surface bg-surface-50 px-3 py-2 dark:bg-surface-800\"\n >\n <span\n class=\"text-lg font-semibold text-color tabular-nums\"\n >\n {{ tile.value }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ tile.label }}\n </span>\n </div>\n }\n </div>\n </section>\n }\n\n @if (showUsageSearch()) {\n <mt-text-field\n [formControl]=\"usageSearch\"\n icon=\"general.search-lg\"\n [placeholder]=\"t('search-usages')\"\n />\n }\n\n @for (\n category of filteredUsageCategories();\n track category.key\n ) {\n <section class=\"rounded-md border border-surface\">\n <header\n class=\"flex items-center justify-between gap-2 rounded-t-md border-b border-surface bg-surface-50 px-3 py-2 dark:bg-surface-800\"\n >\n <span\n class=\"inline-flex min-w-0 items-center gap-2 text-sm font-semibold text-color\"\n >\n <mt-icon\n [icon]=\"category.icon\"\n class=\"shrink-0 text-base text-primary\"\n />\n <span class=\"truncate\">{{ category.label }}</span>\n </span>\n <span class=\"shrink-0 text-xs text-muted-color\">\n {{ category.items.length }}\n </span>\n </header>\n\n <ul>\n @for (usage of category.items; track usage.id) {\n <li\n class=\"flex flex-col gap-1.5 border-b border-surface px-3 py-2.5 last:border-b-0\"\n >\n <div class=\"flex min-w-0 items-start gap-2\">\n <div class=\"flex min-w-0 flex-1 flex-col\">\n <span\n class=\"truncate text-sm font-medium text-color\"\n [title]=\"usage.title\"\n >\n {{ usage.title }}\n </span>\n <span class=\"truncate text-xs text-muted-color\">\n {{ usage.sourceLabel }}\n @if (usage.stepName) {\n \u00B7 {{ t(\"step\") }}: {{ usage.stepName }}\n }\n </span>\n </div>\n @for (state of usage.states; track state) {\n <mt-summary-pill tone=\"warn\">\n {{ state }}\n </mt-summary-pill>\n }\n </div>\n\n @if (usage.scopeLabel || usage.channels.length) {\n <div class=\"flex flex-wrap items-center gap-1.5\">\n @if (usage.scopeLabel) {\n <span\n class=\"inline-flex min-w-0 items-center gap-1 text-xs text-muted-color\"\n >\n <mt-icon\n icon=\"custom.hierarchy-structure\"\n class=\"shrink-0 text-sm\"\n />\n <span\n class=\"truncate\"\n [title]=\"usage.scopeLabel\"\n >\n {{ usage.scopeLabel }}\n </span>\n </span>\n }\n @for (channel of usage.channels; track channel) {\n <mt-summary-pill tone=\"info\">\n {{ channel }}\n </mt-summary-pill>\n }\n </div>\n }\n\n @if (usage.impact.length) {\n <span class=\"text-xs text-muted-color\">\n {{ usage.impact.join(\" \u00B7 \") }}\n </span>\n }\n\n @for (warning of usage.warnings; track $index) {\n <span\n class=\"inline-flex items-start gap-1 text-xs text-amber-700 dark:text-amber-300\"\n >\n <mt-icon\n icon=\"alert.alert-triangle\"\n class=\"mt-px shrink-0 text-sm\"\n />\n {{ warning }}\n </span>\n }\n </li>\n }\n </ul>\n </section>\n } @empty {\n <mt-empty-state\n variant=\"filtered\"\n illustration=\"none\"\n [title]=\"t('no-search-results')\"\n />\n }\n </div>\n }\n }\n }\n }\n </div>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: Tree, selector: "mt-tree", inputs: ["value", "selection", "selectionMode", "nodeIcon", "propagateSelectionUp", "propagateSelectionDown", "checkAllChildren", "loading", "emptyMessage", "checkAllLabel", "filterPlaceholder", "dataKey", "filter", "filterMode", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "styleClass", "style", "pInputs", "nodeActions", "nodeContextmenuActions", "contextMenuSelection"], outputs: ["selectionChange", "contextMenuSelectionChange", "action"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: EmptyState, selector: "mt-empty-state", inputs: ["variant", "illustration", "title", "description", "actionLabel", "actionIcon"], outputs: ["actionClick"] }, { kind: "component", type: SummaryAccessibilities, selector: "mt-summary-accessibilities", inputs: ["accessibilities", "emptyMessage"] }, { kind: "component", type: SummaryPill, selector: "mt-summary-pill", inputs: ["tone"] }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }] });
2414
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GroupAccessSummary, isStandalone: true, selector: "mt-group-access-summary", inputs: { group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex h-full min-h-0 flex-col" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\r\n <!-- Which group \u2014 rendered from the table row, so it never waits on the request. -->\r\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\r\n <section class=\"flex items-center gap-3 border-b border-surface p-4\">\r\n <mt-avatar\r\n icon=\"user.users-01\"\r\n size=\"large\"\r\n shape=\"square\"\r\n styleClass=\"bg-primary-50! text-primary!\"\r\n />\r\n\r\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\r\n <div class=\"flex min-w-0 flex-wrap items-center gap-2\">\r\n <h2\r\n class=\"min-w-0 truncate text-base font-semibold text-color\"\r\n [title]=\"header().name\"\r\n >\r\n {{ header().name }}\r\n </h2>\r\n @if (header().isActivated) {\r\n <mt-summary-pill tone=\"success\">{{ t(\"active\") }}</mt-summary-pill>\r\n } @else {\r\n <mt-summary-pill tone=\"neutral\">{{\r\n t(\"inactive\")\r\n }}</mt-summary-pill>\r\n }\r\n </div>\r\n\r\n @if (header().description) {\r\n <p\r\n class=\"line-clamp-2 text-sm text-muted-color\"\r\n [title]=\"header().description\"\r\n >\r\n {{ header().description }}\r\n </p>\r\n }\r\n </div>\r\n </section>\r\n\r\n <div class=\"sticky top-0 z-10 bg-content px-4 pt-2\">\r\n <mt-tabs [options]=\"tabs()\" [(active)]=\"activeTab\" mode=\"underline\" />\r\n </div>\r\n\r\n <div class=\"p-4\">\r\n @if (loading()) {\r\n <div class=\"flex flex-col gap-3\">\r\n @for (row of [1, 2, 3, 4]; track row) {\r\n <p-skeleton height=\"3.5rem\" borderRadius=\"0.375rem\" />\r\n }\r\n </div>\r\n } @else if (error()) {\r\n <div\r\n class=\"flex flex-col items-start gap-3 rounded-md border border-rose-200 bg-rose-50 p-4 dark:border-rose-800 dark:bg-rose-900/30\"\r\n role=\"alert\"\r\n >\r\n <div class=\"flex flex-col gap-1\">\r\n <span\r\n class=\"text-sm font-semibold text-rose-700 dark:text-rose-200\"\r\n >\r\n {{ t(\"summary-load-failed\") }}\r\n </span>\r\n <span class=\"text-sm text-rose-600 dark:text-rose-300\">\r\n {{ t(\"summary-load-failed-hint\") }}\r\n </span>\r\n </div>\r\n <mt-button\r\n icon=\"arrow.refresh-cw-02\"\r\n severity=\"danger\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [label]=\"t('try-again')\"\r\n (onClick)=\"load()\"\r\n />\r\n </div>\r\n } @else {\r\n @switch (activeTab()) {\r\n @case (\"members\") {\r\n @if (members().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('no-members')\"\r\n [description]=\"t('group-members-hint')\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-3\">\r\n @if (showMemberSearch()) {\r\n <mt-text-field\r\n [formControl]=\"memberSearch\"\r\n icon=\"general.search-lg\"\r\n [placeholder]=\"t('search-members')\"\r\n />\r\n }\r\n <ul class=\"rounded-md border border-surface\">\r\n @for (member of filteredMembers(); track member.id) {\r\n <li\r\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\r\n >\r\n <mt-avatar\r\n [image]=\"\r\n member.photo\r\n ? $any(\r\n member.photo\r\n | secureImage: true : context : 'avatar/'\r\n )\r\n : ''\r\n \"\r\n icon=\"user.user-01\"\r\n styleClass=\"text-surface-600! bg-surface-200!\"\r\n />\r\n <div class=\"flex min-w-0 flex-1 flex-col\">\r\n <span\r\n class=\"truncate text-sm font-medium text-color\"\r\n [title]=\"member.displayName\"\r\n >\r\n {{ member.displayName }}\r\n </span>\r\n @if (member.email || member.userName) {\r\n <span\r\n class=\"truncate text-xs text-muted-color\"\r\n [title]=\"member.email || member.userName\"\r\n >\r\n {{ member.email || member.userName }}\r\n </span>\r\n }\r\n </div>\r\n @for (flag of member.flags; track flag.label) {\r\n <mt-summary-pill [tone]=\"flag.tone\">\r\n {{ flag.label }}\r\n </mt-summary-pill>\r\n }\r\n </li>\r\n } @empty {\r\n <li>\r\n <mt-empty-state\r\n variant=\"filtered\"\r\n illustration=\"none\"\r\n [title]=\"t('no-search-results')\"\r\n />\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"permissions\") {\r\n @if (permissionTree().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('group-no-permissions')\"\r\n [description]=\"t('group-permissions-hint')\"\r\n />\r\n } @else {\r\n <mt-tree\r\n class=\"block\"\r\n [value]=\"permissionTree()\"\r\n [filter]=\"true\"\r\n [filterPlaceholder]=\"t('search-permissions')\"\r\n />\r\n }\r\n }\r\n\r\n @case (\"accessibilities\") {\r\n <mt-summary-accessibilities\r\n [accessibilities]=\"accessibilities()\"\r\n [emptyMessage]=\"t('group-no-accessibilities')\"\r\n />\r\n }\r\n\r\n @case (\"usages\") {\r\n @if (usageCount() === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('no-usages')\"\r\n [description]=\"t('usages-coverage')\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-4\">\r\n @if (blockingCount() > 0) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-800 dark:border-amber-800 dark:bg-amber-900/30 dark:text-amber-200\"\r\n role=\"status\"\r\n >\r\n <mt-icon\r\n icon=\"alert.alert-triangle\"\r\n class=\"mt-0.5 shrink-0 text-base\"\r\n />\r\n <span>\r\n {{\r\n t(\"usages-blocking-note\", { count: blockingCount() })\r\n }}\r\n </span>\r\n </div>\r\n }\r\n\r\n @if (impactTiles().length) {\r\n <section class=\"flex flex-col gap-2\">\r\n <div class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-color\">\r\n {{ t(\"runtime-impact\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"runtime-impact-hint\") }}\r\n </span>\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-2 sm:grid-cols-3\">\r\n @for (tile of impactTiles(); track tile.key) {\r\n <div\r\n class=\"flex flex-col gap-0.5 rounded-md border border-surface bg-surface-50 px-3 py-2 dark:bg-surface-800\"\r\n >\r\n <span\r\n class=\"text-lg font-semibold text-color tabular-nums\"\r\n >\r\n {{ tile.value }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ tile.label }}\r\n </span>\r\n </div>\r\n }\r\n </div>\r\n </section>\r\n }\r\n\r\n @if (showUsageSearch()) {\r\n <mt-text-field\r\n [formControl]=\"usageSearch\"\r\n icon=\"general.search-lg\"\r\n [placeholder]=\"t('search-usages')\"\r\n />\r\n }\r\n\r\n @for (\r\n category of filteredUsageCategories();\r\n track category.key\r\n ) {\r\n <section class=\"rounded-md border border-surface\">\r\n <header\r\n class=\"flex items-center justify-between gap-2 rounded-t-md border-b border-surface bg-surface-50 px-3 py-2 dark:bg-surface-800\"\r\n >\r\n <span\r\n class=\"inline-flex min-w-0 items-center gap-2 text-sm font-semibold text-color\"\r\n >\r\n <mt-icon\r\n [icon]=\"category.icon\"\r\n class=\"shrink-0 text-base text-primary\"\r\n />\r\n <span class=\"truncate\">{{ category.label }}</span>\r\n </span>\r\n <span class=\"shrink-0 text-xs text-muted-color\">\r\n {{ category.items.length }}\r\n </span>\r\n </header>\r\n\r\n <ul>\r\n @for (usage of category.items; track usage.id) {\r\n <li\r\n class=\"flex flex-col gap-1.5 border-b border-surface px-3 py-2.5 last:border-b-0\"\r\n >\r\n <div class=\"flex min-w-0 items-start gap-2\">\r\n <div class=\"flex min-w-0 flex-1 flex-col\">\r\n <span\r\n class=\"truncate text-sm font-medium text-color\"\r\n [title]=\"usage.title\"\r\n >\r\n {{ usage.title }}\r\n </span>\r\n <span class=\"truncate text-xs text-muted-color\">\r\n {{ usage.sourceLabel }}\r\n @if (usage.stepName) {\r\n \u00B7 {{ t(\"step\") }}: {{ usage.stepName }}\r\n }\r\n </span>\r\n </div>\r\n @for (state of usage.states; track state) {\r\n <mt-summary-pill tone=\"warn\">\r\n {{ state }}\r\n </mt-summary-pill>\r\n }\r\n </div>\r\n\r\n @if (usage.scopeLabel || usage.channels.length) {\r\n <div class=\"flex flex-wrap items-center gap-1.5\">\r\n @if (usage.scopeLabel) {\r\n <span\r\n class=\"inline-flex min-w-0 items-center gap-1 text-xs text-muted-color\"\r\n >\r\n <mt-icon\r\n icon=\"custom.hierarchy-structure\"\r\n class=\"shrink-0 text-sm\"\r\n />\r\n <span\r\n class=\"truncate\"\r\n [title]=\"usage.scopeLabel\"\r\n >\r\n {{ usage.scopeLabel }}\r\n </span>\r\n </span>\r\n }\r\n @for (channel of usage.channels; track channel) {\r\n <mt-summary-pill tone=\"info\">\r\n {{ channel }}\r\n </mt-summary-pill>\r\n }\r\n </div>\r\n }\r\n\r\n @if (usage.impact.length) {\r\n <span class=\"text-xs text-muted-color\">\r\n {{ usage.impact.join(\" \u00B7 \") }}\r\n </span>\r\n }\r\n\r\n @for (warning of usage.warnings; track $index) {\r\n <span\r\n class=\"inline-flex items-start gap-1 text-xs text-amber-700 dark:text-amber-300\"\r\n >\r\n <mt-icon\r\n icon=\"alert.alert-triangle\"\r\n class=\"mt-px shrink-0 text-sm\"\r\n />\r\n {{ warning }}\r\n </span>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n </section>\r\n } @empty {\r\n <mt-empty-state\r\n variant=\"filtered\"\r\n illustration=\"none\"\r\n [title]=\"t('no-search-results')\"\r\n />\r\n }\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: Tree, selector: "mt-tree", inputs: ["value", "selection", "selectionMode", "nodeIcon", "propagateSelectionUp", "propagateSelectionDown", "checkAllChildren", "loading", "emptyMessage", "checkAllLabel", "filterPlaceholder", "dataKey", "filter", "filterMode", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "styleClass", "style", "pInputs", "nodeActions", "nodeContextmenuActions", "contextMenuSelection"], outputs: ["selectionChange", "contextMenuSelectionChange", "action"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: EmptyState, selector: "mt-empty-state", inputs: ["variant", "illustration", "title", "description", "actionLabel", "actionIcon"], outputs: ["actionClick"] }, { kind: "component", type: SummaryAccessibilities, selector: "mt-summary-accessibilities", inputs: ["accessibilities", "emptyMessage"] }, { kind: "component", type: SummaryPill, selector: "mt-summary-pill", inputs: ["tone"] }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }] });
2280
2415
  }
2281
2416
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GroupAccessSummary, decorators: [{
2282
2417
  type: Component,
@@ -2294,7 +2429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
2294
2429
  SecureImagePipe,
2295
2430
  SummaryAccessibilities,
2296
2431
  SummaryPill,
2297
- ], template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\n <!-- Which group \u2014 rendered from the table row, so it never waits on the request. -->\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\n <section class=\"flex items-center gap-3 border-b border-surface p-4\">\n <mt-avatar\n icon=\"user.users-01\"\n size=\"large\"\n shape=\"square\"\n styleClass=\"bg-primary-50! text-primary!\"\n />\n\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\n <div class=\"flex min-w-0 flex-wrap items-center gap-2\">\n <h2\n class=\"min-w-0 truncate text-base font-semibold text-color\"\n [title]=\"header().name\"\n >\n {{ header().name }}\n </h2>\n @if (header().isActivated) {\n <mt-summary-pill tone=\"success\">{{ t(\"active\") }}</mt-summary-pill>\n } @else {\n <mt-summary-pill tone=\"neutral\">{{\n t(\"inactive\")\n }}</mt-summary-pill>\n }\n </div>\n\n @if (header().description) {\n <p\n class=\"line-clamp-2 text-sm text-muted-color\"\n [title]=\"header().description\"\n >\n {{ header().description }}\n </p>\n }\n </div>\n </section>\n\n <div class=\"sticky top-0 z-10 bg-content px-4 pt-2\">\n <mt-tabs [options]=\"tabs()\" [(active)]=\"activeTab\" mode=\"underline\" />\n </div>\n\n <div class=\"p-4\">\n @if (loading()) {\n <div class=\"flex flex-col gap-3\">\n @for (row of [1, 2, 3, 4]; track row) {\n <p-skeleton height=\"3.5rem\" borderRadius=\"0.375rem\" />\n }\n </div>\n } @else if (error()) {\n <div\n class=\"flex flex-col items-start gap-3 rounded-md border border-rose-200 bg-rose-50 p-4 dark:border-rose-800 dark:bg-rose-900/30\"\n role=\"alert\"\n >\n <div class=\"flex flex-col gap-1\">\n <span\n class=\"text-sm font-semibold text-rose-700 dark:text-rose-200\"\n >\n {{ t(\"summary-load-failed\") }}\n </span>\n <span class=\"text-sm text-rose-600 dark:text-rose-300\">\n {{ t(\"summary-load-failed-hint\") }}\n </span>\n </div>\n <mt-button\n icon=\"arrow.refresh-cw-02\"\n severity=\"danger\"\n variant=\"outlined\"\n size=\"small\"\n [label]=\"t('try-again')\"\n (onClick)=\"load()\"\n />\n </div>\n } @else {\n @switch (activeTab()) {\n @case (\"members\") {\n @if (members().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('no-members')\"\n [description]=\"t('group-members-hint')\"\n />\n } @else {\n <div class=\"flex flex-col gap-3\">\n @if (showMemberSearch()) {\n <mt-text-field\n [formControl]=\"memberSearch\"\n icon=\"general.search-lg\"\n [placeholder]=\"t('search-members')\"\n />\n }\n <ul class=\"rounded-md border border-surface\">\n @for (member of filteredMembers(); track member.id) {\n <li\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\n >\n <mt-avatar\n [image]=\"\n member.photo\n ? $any(\n member.photo\n | secureImage: true : context : 'avatar/'\n )\n : ''\n \"\n icon=\"user.user-01\"\n styleClass=\"text-surface-600! bg-surface-200!\"\n />\n <div class=\"flex min-w-0 flex-1 flex-col\">\n <span\n class=\"truncate text-sm font-medium text-color\"\n [title]=\"member.displayName\"\n >\n {{ member.displayName }}\n </span>\n @if (member.email || member.userName) {\n <span\n class=\"truncate text-xs text-muted-color\"\n [title]=\"member.email || member.userName\"\n >\n {{ member.email || member.userName }}\n </span>\n }\n </div>\n @for (flag of member.flags; track flag.label) {\n <mt-summary-pill [tone]=\"flag.tone\">\n {{ flag.label }}\n </mt-summary-pill>\n }\n </li>\n } @empty {\n <li>\n <mt-empty-state\n variant=\"filtered\"\n illustration=\"none\"\n [title]=\"t('no-search-results')\"\n />\n </li>\n }\n </ul>\n </div>\n }\n }\n\n @case (\"permissions\") {\n @if (permissionTree().length === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('group-no-permissions')\"\n [description]=\"t('group-permissions-hint')\"\n />\n } @else {\n <mt-tree\n class=\"block\"\n [value]=\"permissionTree()\"\n [filter]=\"true\"\n [filterPlaceholder]=\"t('search-permissions')\"\n />\n }\n }\n\n @case (\"accessibilities\") {\n <mt-summary-accessibilities\n [accessibilities]=\"accessibilities()\"\n [emptyMessage]=\"t('group-no-accessibilities')\"\n />\n }\n\n @case (\"usages\") {\n @if (usageCount() === 0) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('no-usages')\"\n [description]=\"t('usages-coverage')\"\n />\n } @else {\n <div class=\"flex flex-col gap-4\">\n @if (blockingCount() > 0) {\n <div\n class=\"flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-800 dark:border-amber-800 dark:bg-amber-900/30 dark:text-amber-200\"\n role=\"status\"\n >\n <mt-icon\n icon=\"alert.alert-triangle\"\n class=\"mt-0.5 shrink-0 text-base\"\n />\n <span>\n {{\n t(\"usages-blocking-note\", { count: blockingCount() })\n }}\n </span>\n </div>\n }\n\n @if (impactTiles().length) {\n <section class=\"flex flex-col gap-2\">\n <div class=\"flex flex-col\">\n <span class=\"text-sm font-semibold text-color\">\n {{ t(\"runtime-impact\") }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ t(\"runtime-impact-hint\") }}\n </span>\n </div>\n <div class=\"grid grid-cols-2 gap-2 sm:grid-cols-3\">\n @for (tile of impactTiles(); track tile.key) {\n <div\n class=\"flex flex-col gap-0.5 rounded-md border border-surface bg-surface-50 px-3 py-2 dark:bg-surface-800\"\n >\n <span\n class=\"text-lg font-semibold text-color tabular-nums\"\n >\n {{ tile.value }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ tile.label }}\n </span>\n </div>\n }\n </div>\n </section>\n }\n\n @if (showUsageSearch()) {\n <mt-text-field\n [formControl]=\"usageSearch\"\n icon=\"general.search-lg\"\n [placeholder]=\"t('search-usages')\"\n />\n }\n\n @for (\n category of filteredUsageCategories();\n track category.key\n ) {\n <section class=\"rounded-md border border-surface\">\n <header\n class=\"flex items-center justify-between gap-2 rounded-t-md border-b border-surface bg-surface-50 px-3 py-2 dark:bg-surface-800\"\n >\n <span\n class=\"inline-flex min-w-0 items-center gap-2 text-sm font-semibold text-color\"\n >\n <mt-icon\n [icon]=\"category.icon\"\n class=\"shrink-0 text-base text-primary\"\n />\n <span class=\"truncate\">{{ category.label }}</span>\n </span>\n <span class=\"shrink-0 text-xs text-muted-color\">\n {{ category.items.length }}\n </span>\n </header>\n\n <ul>\n @for (usage of category.items; track usage.id) {\n <li\n class=\"flex flex-col gap-1.5 border-b border-surface px-3 py-2.5 last:border-b-0\"\n >\n <div class=\"flex min-w-0 items-start gap-2\">\n <div class=\"flex min-w-0 flex-1 flex-col\">\n <span\n class=\"truncate text-sm font-medium text-color\"\n [title]=\"usage.title\"\n >\n {{ usage.title }}\n </span>\n <span class=\"truncate text-xs text-muted-color\">\n {{ usage.sourceLabel }}\n @if (usage.stepName) {\n \u00B7 {{ t(\"step\") }}: {{ usage.stepName }}\n }\n </span>\n </div>\n @for (state of usage.states; track state) {\n <mt-summary-pill tone=\"warn\">\n {{ state }}\n </mt-summary-pill>\n }\n </div>\n\n @if (usage.scopeLabel || usage.channels.length) {\n <div class=\"flex flex-wrap items-center gap-1.5\">\n @if (usage.scopeLabel) {\n <span\n class=\"inline-flex min-w-0 items-center gap-1 text-xs text-muted-color\"\n >\n <mt-icon\n icon=\"custom.hierarchy-structure\"\n class=\"shrink-0 text-sm\"\n />\n <span\n class=\"truncate\"\n [title]=\"usage.scopeLabel\"\n >\n {{ usage.scopeLabel }}\n </span>\n </span>\n }\n @for (channel of usage.channels; track channel) {\n <mt-summary-pill tone=\"info\">\n {{ channel }}\n </mt-summary-pill>\n }\n </div>\n }\n\n @if (usage.impact.length) {\n <span class=\"text-xs text-muted-color\">\n {{ usage.impact.join(\" \u00B7 \") }}\n </span>\n }\n\n @for (warning of usage.warnings; track $index) {\n <span\n class=\"inline-flex items-start gap-1 text-xs text-amber-700 dark:text-amber-300\"\n >\n <mt-icon\n icon=\"alert.alert-triangle\"\n class=\"mt-px shrink-0 text-sm\"\n />\n {{ warning }}\n </span>\n }\n </li>\n }\n </ul>\n </section>\n } @empty {\n <mt-empty-state\n variant=\"filtered\"\n illustration=\"none\"\n [title]=\"t('no-search-results')\"\n />\n }\n </div>\n }\n }\n }\n }\n </div>\n </div>\n</ng-container>\n" }]
2432
+ ], template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\r\n <!-- Which group \u2014 rendered from the table row, so it never waits on the request. -->\r\n <div class=\"min-h-0 flex-1 overflow-y-auto\">\r\n <section class=\"flex items-center gap-3 border-b border-surface p-4\">\r\n <mt-avatar\r\n icon=\"user.users-01\"\r\n size=\"large\"\r\n shape=\"square\"\r\n styleClass=\"bg-primary-50! text-primary!\"\r\n />\r\n\r\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\r\n <div class=\"flex min-w-0 flex-wrap items-center gap-2\">\r\n <h2\r\n class=\"min-w-0 truncate text-base font-semibold text-color\"\r\n [title]=\"header().name\"\r\n >\r\n {{ header().name }}\r\n </h2>\r\n @if (header().isActivated) {\r\n <mt-summary-pill tone=\"success\">{{ t(\"active\") }}</mt-summary-pill>\r\n } @else {\r\n <mt-summary-pill tone=\"neutral\">{{\r\n t(\"inactive\")\r\n }}</mt-summary-pill>\r\n }\r\n </div>\r\n\r\n @if (header().description) {\r\n <p\r\n class=\"line-clamp-2 text-sm text-muted-color\"\r\n [title]=\"header().description\"\r\n >\r\n {{ header().description }}\r\n </p>\r\n }\r\n </div>\r\n </section>\r\n\r\n <div class=\"sticky top-0 z-10 bg-content px-4 pt-2\">\r\n <mt-tabs [options]=\"tabs()\" [(active)]=\"activeTab\" mode=\"underline\" />\r\n </div>\r\n\r\n <div class=\"p-4\">\r\n @if (loading()) {\r\n <div class=\"flex flex-col gap-3\">\r\n @for (row of [1, 2, 3, 4]; track row) {\r\n <p-skeleton height=\"3.5rem\" borderRadius=\"0.375rem\" />\r\n }\r\n </div>\r\n } @else if (error()) {\r\n <div\r\n class=\"flex flex-col items-start gap-3 rounded-md border border-rose-200 bg-rose-50 p-4 dark:border-rose-800 dark:bg-rose-900/30\"\r\n role=\"alert\"\r\n >\r\n <div class=\"flex flex-col gap-1\">\r\n <span\r\n class=\"text-sm font-semibold text-rose-700 dark:text-rose-200\"\r\n >\r\n {{ t(\"summary-load-failed\") }}\r\n </span>\r\n <span class=\"text-sm text-rose-600 dark:text-rose-300\">\r\n {{ t(\"summary-load-failed-hint\") }}\r\n </span>\r\n </div>\r\n <mt-button\r\n icon=\"arrow.refresh-cw-02\"\r\n severity=\"danger\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [label]=\"t('try-again')\"\r\n (onClick)=\"load()\"\r\n />\r\n </div>\r\n } @else {\r\n @switch (activeTab()) {\r\n @case (\"members\") {\r\n @if (members().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('no-members')\"\r\n [description]=\"t('group-members-hint')\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-3\">\r\n @if (showMemberSearch()) {\r\n <mt-text-field\r\n [formControl]=\"memberSearch\"\r\n icon=\"general.search-lg\"\r\n [placeholder]=\"t('search-members')\"\r\n />\r\n }\r\n <ul class=\"rounded-md border border-surface\">\r\n @for (member of filteredMembers(); track member.id) {\r\n <li\r\n class=\"flex items-center gap-3 border-b border-surface px-3 py-2.5 last:border-b-0\"\r\n >\r\n <mt-avatar\r\n [image]=\"\r\n member.photo\r\n ? $any(\r\n member.photo\r\n | secureImage: true : context : 'avatar/'\r\n )\r\n : ''\r\n \"\r\n icon=\"user.user-01\"\r\n styleClass=\"text-surface-600! bg-surface-200!\"\r\n />\r\n <div class=\"flex min-w-0 flex-1 flex-col\">\r\n <span\r\n class=\"truncate text-sm font-medium text-color\"\r\n [title]=\"member.displayName\"\r\n >\r\n {{ member.displayName }}\r\n </span>\r\n @if (member.email || member.userName) {\r\n <span\r\n class=\"truncate text-xs text-muted-color\"\r\n [title]=\"member.email || member.userName\"\r\n >\r\n {{ member.email || member.userName }}\r\n </span>\r\n }\r\n </div>\r\n @for (flag of member.flags; track flag.label) {\r\n <mt-summary-pill [tone]=\"flag.tone\">\r\n {{ flag.label }}\r\n </mt-summary-pill>\r\n }\r\n </li>\r\n } @empty {\r\n <li>\r\n <mt-empty-state\r\n variant=\"filtered\"\r\n illustration=\"none\"\r\n [title]=\"t('no-search-results')\"\r\n />\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n }\r\n\r\n @case (\"permissions\") {\r\n @if (permissionTree().length === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('group-no-permissions')\"\r\n [description]=\"t('group-permissions-hint')\"\r\n />\r\n } @else {\r\n <mt-tree\r\n class=\"block\"\r\n [value]=\"permissionTree()\"\r\n [filter]=\"true\"\r\n [filterPlaceholder]=\"t('search-permissions')\"\r\n />\r\n }\r\n }\r\n\r\n @case (\"accessibilities\") {\r\n <mt-summary-accessibilities\r\n [accessibilities]=\"accessibilities()\"\r\n [emptyMessage]=\"t('group-no-accessibilities')\"\r\n />\r\n }\r\n\r\n @case (\"usages\") {\r\n @if (usageCount() === 0) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('no-usages')\"\r\n [description]=\"t('usages-coverage')\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-4\">\r\n @if (blockingCount() > 0) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-800 dark:border-amber-800 dark:bg-amber-900/30 dark:text-amber-200\"\r\n role=\"status\"\r\n >\r\n <mt-icon\r\n icon=\"alert.alert-triangle\"\r\n class=\"mt-0.5 shrink-0 text-base\"\r\n />\r\n <span>\r\n {{\r\n t(\"usages-blocking-note\", { count: blockingCount() })\r\n }}\r\n </span>\r\n </div>\r\n }\r\n\r\n @if (impactTiles().length) {\r\n <section class=\"flex flex-col gap-2\">\r\n <div class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-color\">\r\n {{ t(\"runtime-impact\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"runtime-impact-hint\") }}\r\n </span>\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-2 sm:grid-cols-3\">\r\n @for (tile of impactTiles(); track tile.key) {\r\n <div\r\n class=\"flex flex-col gap-0.5 rounded-md border border-surface bg-surface-50 px-3 py-2 dark:bg-surface-800\"\r\n >\r\n <span\r\n class=\"text-lg font-semibold text-color tabular-nums\"\r\n >\r\n {{ tile.value }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ tile.label }}\r\n </span>\r\n </div>\r\n }\r\n </div>\r\n </section>\r\n }\r\n\r\n @if (showUsageSearch()) {\r\n <mt-text-field\r\n [formControl]=\"usageSearch\"\r\n icon=\"general.search-lg\"\r\n [placeholder]=\"t('search-usages')\"\r\n />\r\n }\r\n\r\n @for (\r\n category of filteredUsageCategories();\r\n track category.key\r\n ) {\r\n <section class=\"rounded-md border border-surface\">\r\n <header\r\n class=\"flex items-center justify-between gap-2 rounded-t-md border-b border-surface bg-surface-50 px-3 py-2 dark:bg-surface-800\"\r\n >\r\n <span\r\n class=\"inline-flex min-w-0 items-center gap-2 text-sm font-semibold text-color\"\r\n >\r\n <mt-icon\r\n [icon]=\"category.icon\"\r\n class=\"shrink-0 text-base text-primary\"\r\n />\r\n <span class=\"truncate\">{{ category.label }}</span>\r\n </span>\r\n <span class=\"shrink-0 text-xs text-muted-color\">\r\n {{ category.items.length }}\r\n </span>\r\n </header>\r\n\r\n <ul>\r\n @for (usage of category.items; track usage.id) {\r\n <li\r\n class=\"flex flex-col gap-1.5 border-b border-surface px-3 py-2.5 last:border-b-0\"\r\n >\r\n <div class=\"flex min-w-0 items-start gap-2\">\r\n <div class=\"flex min-w-0 flex-1 flex-col\">\r\n <span\r\n class=\"truncate text-sm font-medium text-color\"\r\n [title]=\"usage.title\"\r\n >\r\n {{ usage.title }}\r\n </span>\r\n <span class=\"truncate text-xs text-muted-color\">\r\n {{ usage.sourceLabel }}\r\n @if (usage.stepName) {\r\n \u00B7 {{ t(\"step\") }}: {{ usage.stepName }}\r\n }\r\n </span>\r\n </div>\r\n @for (state of usage.states; track state) {\r\n <mt-summary-pill tone=\"warn\">\r\n {{ state }}\r\n </mt-summary-pill>\r\n }\r\n </div>\r\n\r\n @if (usage.scopeLabel || usage.channels.length) {\r\n <div class=\"flex flex-wrap items-center gap-1.5\">\r\n @if (usage.scopeLabel) {\r\n <span\r\n class=\"inline-flex min-w-0 items-center gap-1 text-xs text-muted-color\"\r\n >\r\n <mt-icon\r\n icon=\"custom.hierarchy-structure\"\r\n class=\"shrink-0 text-sm\"\r\n />\r\n <span\r\n class=\"truncate\"\r\n [title]=\"usage.scopeLabel\"\r\n >\r\n {{ usage.scopeLabel }}\r\n </span>\r\n </span>\r\n }\r\n @for (channel of usage.channels; track channel) {\r\n <mt-summary-pill tone=\"info\">\r\n {{ channel }}\r\n </mt-summary-pill>\r\n }\r\n </div>\r\n }\r\n\r\n @if (usage.impact.length) {\r\n <span class=\"text-xs text-muted-color\">\r\n {{ usage.impact.join(\" \u00B7 \") }}\r\n </span>\r\n }\r\n\r\n @for (warning of usage.warnings; track $index) {\r\n <span\r\n class=\"inline-flex items-start gap-1 text-xs text-amber-700 dark:text-amber-300\"\r\n >\r\n <mt-icon\r\n icon=\"alert.alert-triangle\"\r\n class=\"mt-px shrink-0 text-sm\"\r\n />\r\n {{ warning }}\r\n </span>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n </section>\r\n } @empty {\r\n <mt-empty-state\r\n variant=\"filtered\"\r\n illustration=\"none\"\r\n [title]=\"t('no-search-results')\"\r\n />\r\n }\r\n </div>\r\n }\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n</ng-container>\r\n" }]
2298
2433
  }], propDecorators: { group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }] } });
2299
2434
  function scopeLabel(scope, lang) {
2300
2435
  const template = resolveTranslated(scope.level?.templateName, lang);
@@ -2430,5 +2565,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
2430
2565
  * Generated bundle index. Do not edit.
2431
2566
  */
2432
2567
 
2433
- 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 };
2568
+ 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 };
2434
2569
  //# sourceMappingURL=masterteam-users-groups.mjs.map