@masterteam/users-groups 0.0.51 → 0.0.52
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.
|
@@ -29,6 +29,7 @@ import { EmptyState } from '@masterteam/components/empty-state';
|
|
|
29
29
|
import { TextField } from '@masterteam/components/text-field';
|
|
30
30
|
import { Tree } from '@masterteam/components/tree';
|
|
31
31
|
import { SecureImagePipe } from '@masterteam/components/upload-field';
|
|
32
|
+
import { UnavailableAssignees } from '@masterteam/components/user-search-field';
|
|
32
33
|
import * as i2 from 'primeng/progressbar';
|
|
33
34
|
import { ProgressBarModule } from 'primeng/progressbar';
|
|
34
35
|
|
|
@@ -2285,7 +2286,7 @@ class UserAccessSummary {
|
|
|
2285
2286
|
this.facade.getUserSummary(userName).subscribe({ error: () => undefined });
|
|
2286
2287
|
}
|
|
2287
2288
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UserAccessSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2288
|
-
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" }] });
|
|
2289
|
+
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", "ariaLabel", "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" }] });
|
|
2289
2290
|
}
|
|
2290
2291
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UserAccessSummary, decorators: [{
|
|
2291
2292
|
type: Component,
|
|
@@ -2365,6 +2366,32 @@ function humanize$1(id) {
|
|
|
2365
2366
|
return words ? words.charAt(0).toUpperCase() + words.slice(1) : id;
|
|
2366
2367
|
}
|
|
2367
2368
|
|
|
2369
|
+
/**
|
|
2370
|
+
* The "Who takes over?" options. People who are being replaced themselves stay
|
|
2371
|
+
* in the list, so an administrator searching for them sees why they can't be
|
|
2372
|
+
* chosen, but they are labelled and moved to the end.
|
|
2373
|
+
*
|
|
2374
|
+
* @param unavailableIds lower-cased user IDs from `UnavailableAssignees`
|
|
2375
|
+
* @param beingReplaced the translated "being replaced" label
|
|
2376
|
+
*/
|
|
2377
|
+
function successorOptions(candidates, unavailableIds, beingReplaced) {
|
|
2378
|
+
const options = candidates.map((user) => {
|
|
2379
|
+
const name = user.userName
|
|
2380
|
+
? `${user.displayName || user.userName} (${user.userName})`
|
|
2381
|
+
: user.displayName || user.id;
|
|
2382
|
+
const unavailable = unavailableIds.has(user.id.toLowerCase());
|
|
2383
|
+
return {
|
|
2384
|
+
value: user.id,
|
|
2385
|
+
label: unavailable ? `${name} · ${beingReplaced}` : name,
|
|
2386
|
+
unavailable,
|
|
2387
|
+
};
|
|
2388
|
+
});
|
|
2389
|
+
return [
|
|
2390
|
+
...options.filter((option) => !option.unavailable),
|
|
2391
|
+
...options.filter((option) => option.unavailable),
|
|
2392
|
+
];
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2368
2395
|
/**
|
|
2369
2396
|
* Replace by, in one step: choose the successor, give a reason, read the
|
|
2370
2397
|
* same general explanation every replacement gets, start. Submitting is the
|
|
@@ -2373,7 +2400,9 @@ function humanize$1(id) {
|
|
|
2373
2400
|
*
|
|
2374
2401
|
* Nothing is searched or checked before Start: the backend validates the
|
|
2375
2402
|
* successor and finds the work itself, and a refusal comes back as the
|
|
2376
|
-
* start's error.
|
|
2403
|
+
* start's error. The one thing shown beforehand is who is being replaced
|
|
2404
|
+
* themselves (the list every user picker reads): they are labelled in the
|
|
2405
|
+
* successor list and cannot be chosen, because the backend refuses them.
|
|
2377
2406
|
*/
|
|
2378
2407
|
class ReplaceUserDialog {
|
|
2379
2408
|
modal = inject(ModalService);
|
|
@@ -2402,6 +2431,18 @@ class ReplaceUserDialog {
|
|
|
2402
2431
|
candidates = computed(() => this.users().filter((user) => user.id &&
|
|
2403
2432
|
user.id !== this.source().id &&
|
|
2404
2433
|
user.isLinkedToCurrentApplication !== false), ...(ngDevMode ? [{ debugName: "candidates" }] : /* istanbul ignore next */ []));
|
|
2434
|
+
/** Lower-cased IDs of people who are being replaced; empty on any failure. */
|
|
2435
|
+
unavailableIds = toSignal(inject(UnavailableAssignees).ids(), { initialValue: new Set() });
|
|
2436
|
+
options = computed(() => successorOptions(this.candidates(), this.unavailableIds(), this.text.t('dialog.successor-being-replaced')), ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
|
|
2437
|
+
/** The chosen successor is being replaced themselves: Start stays off. */
|
|
2438
|
+
unavailableSuccessor = computed(() => {
|
|
2439
|
+
const chosen = this.successorValue().successorUserId;
|
|
2440
|
+
const option = this.options().find((item) => item.value === chosen);
|
|
2441
|
+
if (!option?.unavailable)
|
|
2442
|
+
return null;
|
|
2443
|
+
const person = this.candidates().find((user) => user.id === chosen);
|
|
2444
|
+
return person?.displayName || person?.userName || chosen;
|
|
2445
|
+
}, ...(ngDevMode ? [{ debugName: "unavailableSuccessor" }] : /* istanbul ignore next */ []));
|
|
2405
2446
|
successorConfig = computed(() => ({
|
|
2406
2447
|
sections: [
|
|
2407
2448
|
{
|
|
@@ -2413,11 +2454,9 @@ class ReplaceUserDialog {
|
|
|
2413
2454
|
key: 'successorUserId',
|
|
2414
2455
|
label: this.text.t('dialog.successor'),
|
|
2415
2456
|
placeholder: this.text.t('dialog.successor-placeholder'),
|
|
2416
|
-
options: this.
|
|
2417
|
-
value
|
|
2418
|
-
label
|
|
2419
|
-
? `${user.displayName || user.userName} (${user.userName})`
|
|
2420
|
-
: user.displayName || user.id,
|
|
2457
|
+
options: this.options().map(({ value, label }) => ({
|
|
2458
|
+
value,
|
|
2459
|
+
label,
|
|
2421
2460
|
})),
|
|
2422
2461
|
filter: true,
|
|
2423
2462
|
validators: [ValidatorConfig.required()],
|
|
@@ -2457,6 +2496,7 @@ class ReplaceUserDialog {
|
|
|
2457
2496
|
const reason = (this.reasonValue().reason ?? '').trim();
|
|
2458
2497
|
return (!this.creating() &&
|
|
2459
2498
|
!!this.successorValue().successorUserId &&
|
|
2499
|
+
!this.unavailableSuccessor() &&
|
|
2460
2500
|
reason.length >= 3 &&
|
|
2461
2501
|
reason.length <= 1000);
|
|
2462
2502
|
}, ...(ngDevMode ? [{ debugName: "canSubmit" }] : /* istanbul ignore next */ []));
|
|
@@ -2538,7 +2578,7 @@ class ReplaceUserDialog {
|
|
|
2538
2578
|
this.blockingId.set(null);
|
|
2539
2579
|
}
|
|
2540
2580
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ReplaceUserDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2541
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ReplaceUserDialog, isStandalone: true, selector: "mt-replace-user-dialog", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, users: { classPropertyName: "users", publicName: "users", isSignal: true, isRequired: false, transformFunction: null }, successorUserId: { classPropertyName: "successorUserId", publicName: "successorUserId", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups.replacement'\">\r\n <div class=\"flex flex-col gap-5 p-4\" [class]=\"modal.contentClass\">\r\n <!-- Who is leaving -->\r\n <div class=\"flex flex-col gap-3\">\r\n <div class=\"flex min-w-0 items-center gap-3\">\r\n <mt-avatar\r\n [label]=\"sourceInitials()\"\r\n shape=\"circle\"\r\n size=\"large\"\r\n styleClass=\"bg-surface-100! text-color! dark:bg-surface-800!\"\r\n />\r\n <div class=\"min-w-0\">\r\n <div class=\"text-xs text-muted-color\">\r\n {{ t(\"dialog.replacing\") }}\r\n </div>\r\n <div class=\"truncate text-base font-semibold\">{{ sourceName() }}</div>\r\n </div>\r\n </div>\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"dialog.intro\", { name: sourceName() }) }}\r\n </p>\r\n </div>\r\n\r\n <mt-dynamic-form\r\n
|
|
2581
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ReplaceUserDialog, isStandalone: true, selector: "mt-replace-user-dialog", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, users: { classPropertyName: "users", publicName: "users", isSignal: true, isRequired: false, transformFunction: null }, successorUserId: { classPropertyName: "successorUserId", publicName: "successorUserId", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups.replacement'\">\r\n <div class=\"flex flex-col gap-5 p-4\" [class]=\"modal.contentClass\">\r\n <!-- Who is leaving -->\r\n <div class=\"flex flex-col gap-3\">\r\n <div class=\"flex min-w-0 items-center gap-3\">\r\n <mt-avatar\r\n [label]=\"sourceInitials()\"\r\n shape=\"circle\"\r\n size=\"large\"\r\n styleClass=\"bg-surface-100! text-color! dark:bg-surface-800!\"\r\n />\r\n <div class=\"min-w-0\">\r\n <div class=\"text-xs text-muted-color\">\r\n {{ t(\"dialog.replacing\") }}\r\n </div>\r\n <div class=\"truncate text-base font-semibold\">{{ sourceName() }}</div>\r\n </div>\r\n </div>\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"dialog.intro\", { name: sourceName() }) }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-2\">\r\n <mt-dynamic-form\r\n [formConfig]=\"successorConfig()\"\r\n [formControl]=\"successorForm\"\r\n />\r\n @if (unavailableSuccessor(); as name) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n >\r\n <mt-icon icon=\"alert.alert-circle\" class=\"mt-0.5 shrink-0\" />\r\n <span>{{ t(\"dialog.successor-unavailable\", { name: name }) }}</span>\r\n </div>\r\n }\r\n </div>\r\n\r\n <mt-dynamic-form [formConfig]=\"reasonConfig()\" [formControl]=\"reasonForm\" />\r\n\r\n <!-- What a replacement moves and what it keeps, the same for every\r\n person: this is what the admin confirms. Nothing is looked up for\r\n this person. Keep the list in step with the backend's handover\r\n (Pplus5.BE Docs/User-Replacement/BE-Handover-Execution.md). -->\r\n <section\r\n class=\"flex flex-col gap-2 rounded-md border border-surface bg-surface-50 p-4 text-sm dark:bg-surface-900\"\r\n >\r\n <div class=\"flex items-center gap-2 font-semibold\">\r\n <mt-icon icon=\"general.info-circle\" class=\"text-muted-color\" />\r\n {{ t(\"dialog.what-happens\") }}\r\n </div>\r\n <ul class=\"flex flex-col gap-2\">\r\n <li class=\"flex items-start gap-2\">\r\n <mt-icon\r\n icon=\"user.user-right-01\"\r\n class=\"mt-0.5 shrink-0 text-primary\"\r\n />\r\n <div class=\"flex flex-col gap-1\">\r\n <span>{{ t(\"dialog.explain-moves\") }}</span>\r\n <ul class=\"list-disc ps-5 text-muted-color\">\r\n <li>{{ t(\"dialog.moves-fields\") }}</li>\r\n <li>{{ t(\"dialog.moves-teams\") }}</li>\r\n <li>{{ t(\"dialog.moves-schedule\") }}</li>\r\n <li>{{ t(\"dialog.moves-approvals\") }}</li>\r\n <li>{{ t(\"dialog.moves-requests\") }}</li>\r\n <li>{{ t(\"dialog.moves-escalations\") }}</li>\r\n <li>{{ t(\"dialog.moves-lists\") }}</li>\r\n </ul>\r\n </div>\r\n </li>\r\n <li class=\"flex items-start gap-2\">\r\n <mt-icon\r\n icon=\"time.clock-rewind\"\r\n class=\"mt-0.5 shrink-0 text-muted-color\"\r\n />\r\n <span>{{ t(\"dialog.explain-history\") }}</span>\r\n </li>\r\n <li class=\"flex items-start gap-2\">\r\n <mt-icon\r\n icon=\"alert.alert-triangle\"\r\n class=\"mt-0.5 shrink-0 text-muted-color\"\r\n />\r\n <span>{{ t(\"dialog.explain-manual\") }}</span>\r\n </li>\r\n <li class=\"flex items-start gap-2\">\r\n <mt-icon\r\n icon=\"user.user-check-01\"\r\n class=\"mt-0.5 shrink-0 text-muted-color\"\r\n />\r\n <span>{{ t(\"dialog.explain-account\") }}</span>\r\n </li>\r\n </ul>\r\n </section>\r\n\r\n @if (createError()) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n >\r\n <mt-icon icon=\"alert.alert-circle\" class=\"mt-0.5 shrink-0\" />\r\n <div class=\"flex flex-col items-start gap-2\">\r\n <span>{{ createError() }}</span>\r\n @if (blockingId()) {\r\n <mt-button\r\n [label]=\"t('dialog.open-blocking')\"\r\n icon=\"general.link-external-01\"\r\n variant=\"outlined\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (click)=\"openBlocking()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n variant=\"outlined\"\r\n [disabled]=\"creating()\"\r\n (click)=\"close()\"\r\n />\r\n <mt-button\r\n [label]=\"t('dialog.submit')\"\r\n icon=\"user.user-right-01\"\r\n [loading]=\"creating()\"\r\n [disabled]=\"!canSubmit()\"\r\n (click)=\"submit()\"\r\n />\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ 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: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "forcedDisabledFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys", "externalValues", "serverFieldErrors"], outputs: ["runtimeMessagesChange"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "ariaLabel", "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: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
|
|
2542
2582
|
}
|
|
2543
2583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ReplaceUserDialog, decorators: [{
|
|
2544
2584
|
type: Component,
|
|
@@ -2549,7 +2589,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
2549
2589
|
Button,
|
|
2550
2590
|
Icon,
|
|
2551
2591
|
TranslocoDirective,
|
|
2552
|
-
], template: "<ng-container *transloco=\"let t; prefix: 'users-groups.replacement'\">\r\n <div class=\"flex flex-col gap-5 p-4\" [class]=\"modal.contentClass\">\r\n <!-- Who is leaving -->\r\n <div class=\"flex flex-col gap-3\">\r\n <div class=\"flex min-w-0 items-center gap-3\">\r\n <mt-avatar\r\n [label]=\"sourceInitials()\"\r\n shape=\"circle\"\r\n size=\"large\"\r\n styleClass=\"bg-surface-100! text-color! dark:bg-surface-800!\"\r\n />\r\n <div class=\"min-w-0\">\r\n <div class=\"text-xs text-muted-color\">\r\n {{ t(\"dialog.replacing\") }}\r\n </div>\r\n <div class=\"truncate text-base font-semibold\">{{ sourceName() }}</div>\r\n </div>\r\n </div>\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"dialog.intro\", { name: sourceName() }) }}\r\n </p>\r\n </div>\r\n\r\n <mt-dynamic-form\r\n
|
|
2592
|
+
], template: "<ng-container *transloco=\"let t; prefix: 'users-groups.replacement'\">\r\n <div class=\"flex flex-col gap-5 p-4\" [class]=\"modal.contentClass\">\r\n <!-- Who is leaving -->\r\n <div class=\"flex flex-col gap-3\">\r\n <div class=\"flex min-w-0 items-center gap-3\">\r\n <mt-avatar\r\n [label]=\"sourceInitials()\"\r\n shape=\"circle\"\r\n size=\"large\"\r\n styleClass=\"bg-surface-100! text-color! dark:bg-surface-800!\"\r\n />\r\n <div class=\"min-w-0\">\r\n <div class=\"text-xs text-muted-color\">\r\n {{ t(\"dialog.replacing\") }}\r\n </div>\r\n <div class=\"truncate text-base font-semibold\">{{ sourceName() }}</div>\r\n </div>\r\n </div>\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"dialog.intro\", { name: sourceName() }) }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-2\">\r\n <mt-dynamic-form\r\n [formConfig]=\"successorConfig()\"\r\n [formControl]=\"successorForm\"\r\n />\r\n @if (unavailableSuccessor(); as name) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n >\r\n <mt-icon icon=\"alert.alert-circle\" class=\"mt-0.5 shrink-0\" />\r\n <span>{{ t(\"dialog.successor-unavailable\", { name: name }) }}</span>\r\n </div>\r\n }\r\n </div>\r\n\r\n <mt-dynamic-form [formConfig]=\"reasonConfig()\" [formControl]=\"reasonForm\" />\r\n\r\n <!-- What a replacement moves and what it keeps, the same for every\r\n person: this is what the admin confirms. Nothing is looked up for\r\n this person. Keep the list in step with the backend's handover\r\n (Pplus5.BE Docs/User-Replacement/BE-Handover-Execution.md). -->\r\n <section\r\n class=\"flex flex-col gap-2 rounded-md border border-surface bg-surface-50 p-4 text-sm dark:bg-surface-900\"\r\n >\r\n <div class=\"flex items-center gap-2 font-semibold\">\r\n <mt-icon icon=\"general.info-circle\" class=\"text-muted-color\" />\r\n {{ t(\"dialog.what-happens\") }}\r\n </div>\r\n <ul class=\"flex flex-col gap-2\">\r\n <li class=\"flex items-start gap-2\">\r\n <mt-icon\r\n icon=\"user.user-right-01\"\r\n class=\"mt-0.5 shrink-0 text-primary\"\r\n />\r\n <div class=\"flex flex-col gap-1\">\r\n <span>{{ t(\"dialog.explain-moves\") }}</span>\r\n <ul class=\"list-disc ps-5 text-muted-color\">\r\n <li>{{ t(\"dialog.moves-fields\") }}</li>\r\n <li>{{ t(\"dialog.moves-teams\") }}</li>\r\n <li>{{ t(\"dialog.moves-schedule\") }}</li>\r\n <li>{{ t(\"dialog.moves-approvals\") }}</li>\r\n <li>{{ t(\"dialog.moves-requests\") }}</li>\r\n <li>{{ t(\"dialog.moves-escalations\") }}</li>\r\n <li>{{ t(\"dialog.moves-lists\") }}</li>\r\n </ul>\r\n </div>\r\n </li>\r\n <li class=\"flex items-start gap-2\">\r\n <mt-icon\r\n icon=\"time.clock-rewind\"\r\n class=\"mt-0.5 shrink-0 text-muted-color\"\r\n />\r\n <span>{{ t(\"dialog.explain-history\") }}</span>\r\n </li>\r\n <li class=\"flex items-start gap-2\">\r\n <mt-icon\r\n icon=\"alert.alert-triangle\"\r\n class=\"mt-0.5 shrink-0 text-muted-color\"\r\n />\r\n <span>{{ t(\"dialog.explain-manual\") }}</span>\r\n </li>\r\n <li class=\"flex items-start gap-2\">\r\n <mt-icon\r\n icon=\"user.user-check-01\"\r\n class=\"mt-0.5 shrink-0 text-muted-color\"\r\n />\r\n <span>{{ t(\"dialog.explain-account\") }}</span>\r\n </li>\r\n </ul>\r\n </section>\r\n\r\n @if (createError()) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n >\r\n <mt-icon icon=\"alert.alert-circle\" class=\"mt-0.5 shrink-0\" />\r\n <div class=\"flex flex-col items-start gap-2\">\r\n <span>{{ createError() }}</span>\r\n @if (blockingId()) {\r\n <mt-button\r\n [label]=\"t('dialog.open-blocking')\"\r\n icon=\"general.link-external-01\"\r\n variant=\"outlined\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (click)=\"openBlocking()\"\r\n />\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n variant=\"outlined\"\r\n [disabled]=\"creating()\"\r\n (click)=\"close()\"\r\n />\r\n <mt-button\r\n [label]=\"t('dialog.submit')\"\r\n icon=\"user.user-right-01\"\r\n [loading]=\"creating()\"\r\n [disabled]=\"!canSubmit()\"\r\n (click)=\"submit()\"\r\n />\r\n </div>\r\n</ng-container>\r\n" }]
|
|
2553
2593
|
}], propDecorators: { source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: true }] }], users: [{ type: i0.Input, args: [{ isSignal: true, alias: "users", required: false }] }], successorUserId: [{ type: i0.Input, args: [{ isSignal: true, alias: "successorUserId", required: false }] }] } });
|
|
2554
2594
|
|
|
2555
2595
|
const COUNT_ICONS = {
|
|
@@ -3322,7 +3362,7 @@ class GroupForm {
|
|
|
3322
3362
|
}
|
|
3323
3363
|
}
|
|
3324
3364
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GroupForm, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3325
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GroupForm, isStandalone: true, selector: "mt-group-form", inputs: { groupForEdit: { classPropertyName: "groupForEdit", publicName: "groupForEdit", isSignal: true, isRequired: false, transformFunction: null } }, providers: [DialogService], viewQueries: [{ propertyName: "userCol", first: true, predicate: ["userCol"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\r\n <div [class]=\"'flex flex-col gap-1 p-4 ' + modal.contentClass\">\r\n @if (!getGroupFormLoading()) {\r\n <form class=\"col-span-1\">\r\n <mt-dynamic-form\r\n [formConfig]=\"groupFormConfig()\"\r\n [formControl]=\"groupFormControl\"\r\n />\r\n </form>\r\n\r\n @if (groupForEdit()) {\r\n <div class=\"flex gap-3 items-end mt-6 pt-4 border-t-1 border-surface\">\r\n <mt-dynamic-form\r\n class=\"flex-1\"\r\n [formConfig]=\"internalUserFormConfig()\"\r\n [formControl]=\"internalUserFormControl\"\r\n />\r\n <mt-button\r\n icon=\"general.plus\"\r\n class=\"mb-1\"\r\n variant=\"outlined\"\r\n (click)=\"onAddUser()\"\r\n [disabled]=\"\r\n addUserToGroupLoading() ||\r\n isUserExistInMembers() ||\r\n !internalUserFormControl.value?.userField\r\n \"\r\n />\r\n </div>\r\n\r\n <mt-table\r\n noCard\r\n [data]=\"selectedGroup()?.members || []\"\r\n [columns]=\"tableColumns()\"\r\n [rowActions]=\"rowActions()\"\r\n storageKey=\"users-groups-group-members-table\"\r\n [generalSearch]=\"false\"\r\n [showFilters]=\"false\"\r\n [loading]=\"addUserToGroupLoading()\"\r\n >\r\n </mt-table>\r\n <ng-template #userCol let-row>\r\n <div class=\"flex items-center gap-2\">\r\n <mt-avatar [icon]=\"'custom.user-pp'\"> </mt-avatar>\r\n {{ row?.displayName }}\r\n </div>\r\n </ng-template>\r\n }\r\n } @else {\r\n <p-skeleton class=\"my-4 mt-7\" height=\"3rem\" />\r\n <p-skeleton class=\"my-4\" height=\"3rem\" />\r\n <p-skeleton class=\"my-4\" height=\"3rem\" />\r\n }\r\n </div>\r\n\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n variant=\"outlined\"\r\n [disabled]=\"createUpdateGroupLoading()\"\r\n (click)=\"ref.close(false)\"\r\n />\r\n <mt-button\r\n [label]=\"selectedGroup() ? t('save') : t('add')\"\r\n (click)=\"onSubmit()\"\r\n [loading]=\"createUpdateGroupLoading()\"\r\n [disabled]=\"!this.groupFormControl.valid || createUpdateGroupLoading()\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "forcedDisabledFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys", "externalValues", "serverFieldErrors"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "searchScope", "showFilters", "filterMode", "filterCloseOnOutsideClick", "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"] }] });
|
|
3365
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GroupForm, isStandalone: true, selector: "mt-group-form", inputs: { groupForEdit: { classPropertyName: "groupForEdit", publicName: "groupForEdit", isSignal: true, isRequired: false, transformFunction: null } }, providers: [DialogService], viewQueries: [{ propertyName: "userCol", first: true, predicate: ["userCol"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups'\">\r\n <div [class]=\"'flex flex-col gap-1 p-4 ' + modal.contentClass\">\r\n @if (!getGroupFormLoading()) {\r\n <form class=\"col-span-1\">\r\n <mt-dynamic-form\r\n [formConfig]=\"groupFormConfig()\"\r\n [formControl]=\"groupFormControl\"\r\n />\r\n </form>\r\n\r\n @if (groupForEdit()) {\r\n <div class=\"flex gap-3 items-end mt-6 pt-4 border-t-1 border-surface\">\r\n <mt-dynamic-form\r\n class=\"flex-1\"\r\n [formConfig]=\"internalUserFormConfig()\"\r\n [formControl]=\"internalUserFormControl\"\r\n />\r\n <mt-button\r\n icon=\"general.plus\"\r\n class=\"mb-1\"\r\n variant=\"outlined\"\r\n (click)=\"onAddUser()\"\r\n [disabled]=\"\r\n addUserToGroupLoading() ||\r\n isUserExistInMembers() ||\r\n !internalUserFormControl.value?.userField\r\n \"\r\n />\r\n </div>\r\n\r\n <mt-table\r\n noCard\r\n [data]=\"selectedGroup()?.members || []\"\r\n [columns]=\"tableColumns()\"\r\n [rowActions]=\"rowActions()\"\r\n storageKey=\"users-groups-group-members-table\"\r\n [generalSearch]=\"false\"\r\n [showFilters]=\"false\"\r\n [loading]=\"addUserToGroupLoading()\"\r\n >\r\n </mt-table>\r\n <ng-template #userCol let-row>\r\n <div class=\"flex items-center gap-2\">\r\n <mt-avatar [icon]=\"'custom.user-pp'\"> </mt-avatar>\r\n {{ row?.displayName }}\r\n </div>\r\n </ng-template>\r\n }\r\n } @else {\r\n <p-skeleton class=\"my-4 mt-7\" height=\"3rem\" />\r\n <p-skeleton class=\"my-4\" height=\"3rem\" />\r\n <p-skeleton class=\"my-4\" height=\"3rem\" />\r\n }\r\n </div>\r\n\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n variant=\"outlined\"\r\n [disabled]=\"createUpdateGroupLoading()\"\r\n (click)=\"ref.close(false)\"\r\n />\r\n <mt-button\r\n [label]=\"selectedGroup() ? t('save') : t('add')\"\r\n (click)=\"onSubmit()\"\r\n [loading]=\"createUpdateGroupLoading()\"\r\n [disabled]=\"!this.groupFormControl.valid || createUpdateGroupLoading()\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "forcedDisabledFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys", "externalValues", "serverFieldErrors"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "ariaLabel", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "searchScope", "showFilters", "filterMode", "filterCloseOnOutsideClick", "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"] }] });
|
|
3326
3366
|
}
|
|
3327
3367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GroupForm, decorators: [{
|
|
3328
3368
|
type: Component,
|
|
@@ -3595,7 +3635,7 @@ class GroupAccessSummary {
|
|
|
3595
3635
|
return this.translocoService.translate(`users-groups.${key}`);
|
|
3596
3636
|
}
|
|
3597
3637
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GroupAccessSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3598
|
-
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 (impactTiles().length) {\r\n <section class=\"flex flex-col gap-2\">\r\n <span class=\"text-sm font-semibold text-color\">\r\n {{ t(\"runtime-impact\") }}\r\n </span>\r\n <!-- auto-fit: one row whenever the drawer has room, wraps on narrow screens. -->\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(6.5rem,1fr))] gap-2\"\r\n >\r\n @for (tile of impactTiles(); track tile.key) {\r\n <div\r\n class=\"flex min-w-0 flex-col gap-0.5 rounded-md border border-surface bg-surface-50 px-2.5 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 leading-tight 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 @if (filteredUsageCategories().length) {\r\n <!-- One bordered list, so folded categories read as a single accordion, not loose cards. -->\r\n <div class=\"overflow-hidden rounded-md border border-surface\">\r\n @for (\r\n category of filteredUsageCategories();\r\n track category.key\r\n ) {\r\n @let expanded = expandedCategories().has(category.key);\r\n <section class=\"border-b border-surface last:border-b-0\">\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full cursor-pointer items-center justify-between gap-2 border-surface px-3 py-3 text-start transition-colors hover:bg-surface-50 aria-expanded:border-b aria-expanded:bg-surface-50 dark:hover:bg-surface-800 dark:aria-expanded:bg-surface-800\"\r\n [attr.aria-expanded]=\"expanded\"\r\n [attr.aria-controls]=\"\r\n 'usage-category-' + category.key\r\n \"\r\n (click)=\"toggleCategory(category.key)\"\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\r\n class=\"inline-flex shrink-0 items-center gap-2 text-xs text-muted-color\"\r\n >\r\n {{ category.items.length }}\r\n <mt-icon\r\n icon=\"arrow.chevron-down\"\r\n class=\"text-base transition-transform\"\r\n [class.rotate-180]=\"expanded\"\r\n />\r\n </span>\r\n </button>\r\n\r\n <ul\r\n [id]=\"'usage-category-' + category.key\"\r\n [hidden]=\"!expanded\"\r\n >\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\r\n class=\"truncate text-xs text-muted-color\"\r\n >\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\r\n class=\"flex flex-wrap items-center gap-1.5\"\r\n >\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 (\r\n channel of usage.channels;\r\n track channel\r\n ) {\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 }\r\n </div>\r\n } @else {\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" }] });
|
|
3638
|
+
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 (impactTiles().length) {\r\n <section class=\"flex flex-col gap-2\">\r\n <span class=\"text-sm font-semibold text-color\">\r\n {{ t(\"runtime-impact\") }}\r\n </span>\r\n <!-- auto-fit: one row whenever the drawer has room, wraps on narrow screens. -->\r\n <div\r\n class=\"grid grid-cols-[repeat(auto-fit,minmax(6.5rem,1fr))] gap-2\"\r\n >\r\n @for (tile of impactTiles(); track tile.key) {\r\n <div\r\n class=\"flex min-w-0 flex-col gap-0.5 rounded-md border border-surface bg-surface-50 px-2.5 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 leading-tight 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 @if (filteredUsageCategories().length) {\r\n <!-- One bordered list, so folded categories read as a single accordion, not loose cards. -->\r\n <div class=\"overflow-hidden rounded-md border border-surface\">\r\n @for (\r\n category of filteredUsageCategories();\r\n track category.key\r\n ) {\r\n @let expanded = expandedCategories().has(category.key);\r\n <section class=\"border-b border-surface last:border-b-0\">\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full cursor-pointer items-center justify-between gap-2 border-surface px-3 py-3 text-start transition-colors hover:bg-surface-50 aria-expanded:border-b aria-expanded:bg-surface-50 dark:hover:bg-surface-800 dark:aria-expanded:bg-surface-800\"\r\n [attr.aria-expanded]=\"expanded\"\r\n [attr.aria-controls]=\"\r\n 'usage-category-' + category.key\r\n \"\r\n (click)=\"toggleCategory(category.key)\"\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\r\n class=\"inline-flex shrink-0 items-center gap-2 text-xs text-muted-color\"\r\n >\r\n {{ category.items.length }}\r\n <mt-icon\r\n icon=\"arrow.chevron-down\"\r\n class=\"text-base transition-transform\"\r\n [class.rotate-180]=\"expanded\"\r\n />\r\n </span>\r\n </button>\r\n\r\n <ul\r\n [id]=\"'usage-category-' + category.key\"\r\n [hidden]=\"!expanded\"\r\n >\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\r\n class=\"truncate text-xs text-muted-color\"\r\n >\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\r\n class=\"flex flex-wrap items-center gap-1.5\"\r\n >\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 (\r\n channel of usage.channels;\r\n track channel\r\n ) {\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 }\r\n </div>\r\n } @else {\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", "ariaLabel", "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" }] });
|
|
3599
3639
|
}
|
|
3600
3640
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GroupAccessSummary, decorators: [{
|
|
3601
3641
|
type: Component,
|
|
@@ -4704,7 +4744,7 @@ class UserReplacementDetails {
|
|
|
4704
4744
|
return user?.displayName || user?.userName || userId;
|
|
4705
4745
|
}
|
|
4706
4746
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UserReplacementDetails, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4707
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: UserReplacementDetails, isStandalone: true, selector: "mt-user-replacement-details", inputs: { operationId: { classPropertyName: "operationId", publicName: "operationId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups.replacement'\">\r\n <div class=\"flex flex-col gap-4 p-4\" [class]=\"modal.contentClass\">\r\n @if (loading()) {\r\n <p-skeleton height=\"7rem\" borderRadius=\"0.375rem\" />\r\n <p-skeleton height=\"6rem\" borderRadius=\"0.375rem\" />\r\n <p-skeleton height=\"12rem\" borderRadius=\"0.375rem\" />\r\n } @else if (loadError()) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-4 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n role=\"alert\"\r\n >\r\n <mt-icon icon=\"alert.alert-circle\" class=\"mt-0.5 shrink-0\" />\r\n <span>{{ loadError() }}</span>\r\n </div>\r\n } @else if (contractOutdated()) {\r\n <div\r\n class=\"rounded-md border border-amber-200 bg-amber-50 p-4 text-sm text-amber-700 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200\"\r\n >\r\n {{ t(\"contract-outdated\") }}\r\n </div>\r\n } @else if (summary(); as replacement) {\r\n <!-- Who \u2192 who, the status, and when -->\r\n <section\r\n class=\"flex flex-col gap-3 rounded-md border border-surface bg-content p-4\"\r\n >\r\n <div class=\"flex items-center gap-3\">\r\n <div class=\"flex min-w-0 flex-1 items-center gap-3\">\r\n <mt-avatar\r\n [label]=\"sourceInitials()\"\r\n shape=\"circle\"\r\n styleClass=\"bg-surface-100! text-color! dark:bg-surface-800!\"\r\n />\r\n <div class=\"min-w-0\">\r\n <div class=\"text-xs text-muted-color\">{{ t(\"from\") }}</div>\r\n <div class=\"truncate font-semibold\" [title]=\"sourceName()\">\r\n {{ sourceName() }}\r\n </div>\r\n </div>\r\n </div>\r\n <mt-icon\r\n icon=\"arrow.arrow-right\"\r\n class=\"shrink-0 text-lg text-muted-color rtl:rotate-180\"\r\n />\r\n <div class=\"flex min-w-0 flex-1 items-center gap-3\">\r\n <mt-avatar\r\n [label]=\"successorInitials()\"\r\n shape=\"circle\"\r\n styleClass=\"bg-primary-50! text-primary-700! dark:bg-primary-950! dark:text-primary-200!\"\r\n />\r\n <div class=\"min-w-0\">\r\n <div class=\"text-xs text-muted-color\">{{ t(\"to\") }}</div>\r\n <div class=\"truncate font-semibold\" [title]=\"successorName()\">\r\n {{ successorName() }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-wrap items-center gap-x-4 gap-y-2 border-t border-surface pt-3 text-xs text-muted-color\"\r\n >\r\n <span\r\n class=\"rounded-md border px-2 py-0.5 font-semibold\"\r\n [class]=\"statusClass()\"\r\n >{{ text.code(\"statuses\", replacement.status) }}</span\r\n >\r\n @if (createdAt(); as created) {\r\n <span class=\"flex items-center gap-1\">\r\n <mt-icon icon=\"time.calendar\" />\r\n {{ t(\"started\") }}\r\n <span class=\"tabular-nums text-color\">{{\r\n created | mtDateFormat: \"dateTime\"\r\n }}</span>\r\n </span>\r\n }\r\n @if (updatedAt(); as updated) {\r\n <span class=\"flex items-center gap-1\">\r\n <mt-icon icon=\"time.clock\" />\r\n {{ t(\"updated\") }}\r\n <span class=\"tabular-nums text-color\">{{\r\n updated | mtDateFormat: \"dateTime\"\r\n }}</span>\r\n </span>\r\n }\r\n </div>\r\n </section>\r\n\r\n <!-- Where it is, in one sentence -->\r\n @if (card(); as status) {\r\n <section\r\n class=\"flex flex-col gap-3 rounded-md border p-4\"\r\n [class]=\"cardBoxClass()\"\r\n role=\"status\"\r\n >\r\n <div class=\"flex items-start gap-3\">\r\n <mt-icon\r\n [icon]=\"status.icon\"\r\n class=\"mt-0.5 shrink-0 text-xl\"\r\n [class]=\"cardIconClass()\"\r\n />\r\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\r\n <div class=\"font-semibold\">{{ status.title }}</div>\r\n @if (status.body) {\r\n <div class=\"text-sm\">{{ status.body }}</div>\r\n }\r\n @if (isFinished() && notCheckedCount() > 0) {\r\n <div class=\"text-sm opacity-80\">\r\n {{ t(\"not-checked-note\", { count: notCheckedCount() }) }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (canRemoveSource()) {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-t border-surface pt-3\"\r\n >\r\n <span class=\"text-sm\">{{\r\n t(\"remove-source-hint\", { name: sourceName() })\r\n }}</span>\r\n <mt-button\r\n [label]=\"t('remove-source')\"\r\n icon=\"general.link-broken-01\"\r\n severity=\"danger\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [loading]=\"removing()\"\r\n (click)=\"removeSource()\"\r\n />\r\n </div>\r\n }\r\n\r\n @if (status.progress) {\r\n <p-progressbar mode=\"indeterminate\" [style]=\"{ height: '4px' }\" />\r\n }\r\n\r\n @if (actionError()) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n role=\"alert\"\r\n >\r\n <mt-icon icon=\"alert.alert-circle\" class=\"mt-0.5 shrink-0\" />\r\n <span>{{ actionError() }}</span>\r\n </div>\r\n }\r\n </section>\r\n }\r\n\r\n <!-- The results: outcomes after Start, what needs an admin first -->\r\n @if (showResults()) {\r\n <section class=\"flex flex-col gap-3\">\r\n <h3 class=\"text-sm font-semibold\">{{ t(\"results-title\") }}</h3>\r\n\r\n @if (tabs().length > 1) {\r\n <mt-tabs\r\n [options]=\"tabs()\"\r\n [active]=\"activeTab()\"\r\n (activeChange)=\"selectTab($event)\"\r\n mode=\"underline\"\r\n size=\"small\"\r\n />\r\n }\r\n @if (rows().length > 8) {\r\n <mt-text-field\r\n [formControl]=\"search\"\r\n icon=\"general.search-lg\"\r\n [placeholder]=\"t('search-results')\"\r\n />\r\n }\r\n\r\n @if (itemsError()) {\r\n <div\r\n class=\"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n role=\"alert\"\r\n >\r\n {{ itemsError() }}\r\n </div>\r\n } @else if (itemsLoading() && !filteredRows().length) {\r\n <div class=\"flex flex-col gap-2\">\r\n @for (row of [1, 2, 3]; track row) {\r\n <p-skeleton height=\"3.5rem\" borderRadius=\"0.375rem\" />\r\n }\r\n </div>\r\n } @else if (!filteredRows().length) {\r\n <div\r\n class=\"rounded-md border border-dashed border-surface p-4 text-center text-sm text-muted-color\"\r\n >\r\n {{ t(\"no-matching-results\") }}\r\n </div>\r\n } @else {\r\n <ul class=\"rounded-md border border-surface bg-content\">\r\n @for (group of visibleGroups(); track group.place.key) {\r\n <li class=\"border-t border-surface first:border-t-0\">\r\n <!-- The place: project, record, request or escalation -->\r\n <div\r\n class=\"flex items-center gap-3 bg-surface-50 px-3 py-2 dark:bg-surface-900\"\r\n >\r\n <mt-icon\r\n [icon]=\"group.place.icon\"\r\n class=\"shrink-0 text-muted-color\"\r\n />\r\n <div class=\"min-w-0 flex-1\">\r\n <div\r\n class=\"truncate text-sm font-semibold\"\r\n [title]=\"group.place.title\"\r\n >\r\n {{ group.place.title }}\r\n </div>\r\n @if (group.place.context) {\r\n <div\r\n class=\"truncate text-xs text-muted-color\"\r\n [title]=\"group.place.context\"\r\n >\r\n {{ group.place.context }}\r\n </div>\r\n }\r\n </div>\r\n @if (group.place.openUrl) {\r\n <a\r\n class=\"flex shrink-0 items-center gap-1 text-xs text-primary hover:underline\"\r\n [href]=\"group.place.openUrl\"\r\n target=\"_blank\"\r\n rel=\"noopener\"\r\n >\r\n {{ t(\"open-project\") }}\r\n <mt-icon\r\n icon=\"general.link-external-01\"\r\n class=\"rtl:-scale-x-100\"\r\n />\r\n </a>\r\n }\r\n </div>\r\n <ul>\r\n @for (row of group.rows; track row.itemId) {\r\n <li\r\n class=\"flex items-start gap-3 border-t border-surface p-3\"\r\n >\r\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\r\n <span class=\"text-sm font-medium\">{{\r\n row.words.headline\r\n }}</span>\r\n @if (row.statusDetail) {\r\n <span class=\"text-xs text-muted-color\">{{\r\n row.statusDetail\r\n }}</span>\r\n }\r\n @if (showDetails() && row.words.technical) {\r\n <span\r\n class=\"truncate font-mono text-[11px] text-muted-color\"\r\n [title]=\"row.words.technical\"\r\n >{{ row.words.technical }}</span\r\n >\r\n }\r\n </div>\r\n <span\r\n class=\"shrink-0 whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"row.statusClass\"\r\n >{{ row.status }}</span\r\n >\r\n </li>\r\n }\r\n @if (group.foldedTeamRoles) {\r\n <li\r\n class=\"flex items-center gap-2 border-t border-surface px-3 py-2 text-xs text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.check-circle\" class=\"shrink-0\" />\r\n {{ t(\"team-note\", { count: group.foldedTeamRoles }) }}\r\n </li>\r\n }\r\n @if (group.untouched) {\r\n <li\r\n class=\"flex items-start gap-2 border-t border-surface px-3 py-2 text-xs text-muted-color\"\r\n >\r\n <mt-icon\r\n icon=\"general.info-circle\"\r\n class=\"mt-0.5 shrink-0\"\r\n />\r\n {{ t(\"untouched-note\", { list: group.untouched }) }}\r\n </li>\r\n }\r\n @if (group.unchecked) {\r\n <li\r\n class=\"flex items-start gap-2 border-t border-surface px-3 py-2 text-xs text-muted-color\"\r\n >\r\n <mt-icon\r\n icon=\"alert.alert-circle\"\r\n class=\"mt-0.5 shrink-0\"\r\n />\r\n {{ t(\"unchecked-note\", { list: group.unchecked }) }}\r\n </li>\r\n }\r\n </ul>\r\n </li>\r\n }\r\n </ul>\r\n @if (hiddenRowCount() > 0) {\r\n <mt-button\r\n class=\"self-center\"\r\n [label]=\"t('show-more', { count: hiddenRowCount() })\"\r\n icon=\"arrow.chevron-down\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (click)=\"showMore()\"\r\n />\r\n }\r\n @if (loadingMore()) {\r\n <div\r\n class=\"flex items-center justify-center gap-2 text-xs text-muted-color\"\r\n role=\"status\"\r\n >\r\n <mt-icon icon=\"arrow.refresh-cw-02\" class=\"animate-spin\" />\r\n {{\r\n t(\"loading-more\", {\r\n loaded: items().length,\r\n total: summary()?.itemCount ?? items().length,\r\n })\r\n }}\r\n </div>\r\n }\r\n }\r\n </section>\r\n }\r\n\r\n <!-- One general limit, with every backend code behind a toggle -->\r\n <div class=\"flex flex-col gap-1 text-xs text-muted-color\">\r\n <div class=\"flex items-start gap-1.5\">\r\n <mt-icon icon=\"general.info-circle\" class=\"mt-px shrink-0\" />\r\n <span>{{ t(\"notices.supported-only\") }}</span>\r\n </div>\r\n @if (technicalDetails().length) {\r\n <button\r\n type=\"button\"\r\n class=\"ms-5 flex items-center gap-1 self-start text-primary hover:underline\"\r\n [attr.aria-expanded]=\"showDetails()\"\r\n (click)=\"showDetails.set(!showDetails())\"\r\n >\r\n <mt-icon\r\n [icon]=\"showDetails() ? 'arrow.chevron-up' : 'arrow.chevron-down'\"\r\n />\r\n {{ showDetails() ? t(\"hide-details\") : t(\"show-details\") }}\r\n </button>\r\n @if (showDetails()) {\r\n <ul class=\"ms-5 flex list-disc flex-col gap-0.5 ps-4\">\r\n @for (detail of technicalDetails(); track $index) {\r\n <li>{{ detail }}</li>\r\n }\r\n </ul>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Close, and Stop / Close replacement while the backend allows it -->\r\n <div [class]=\"modal.footerClass\">\r\n @if (canCancel()) {\r\n <mt-button\r\n [label]=\"cancelIsStop() ? t('stop') : t('close')\"\r\n icon=\"general.x-circle\"\r\n severity=\"danger\"\r\n variant=\"outlined\"\r\n [loading]=\"cancelling()\"\r\n (click)=\"cancel()\"\r\n />\r\n }\r\n <mt-button [label]=\"t('dismiss')\" (click)=\"close()\" />\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ 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: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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: 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: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "ngmodule", type: ProgressBarModule }, { kind: "component", type: i2.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "unit", "mode", "color"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "pipe", type: MTDateFormatPipe, name: "mtDateFormat" }] });
|
|
4747
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: UserReplacementDetails, isStandalone: true, selector: "mt-user-replacement-details", inputs: { operationId: { classPropertyName: "operationId", publicName: "operationId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups.replacement'\">\r\n <div class=\"flex flex-col gap-4 p-4\" [class]=\"modal.contentClass\">\r\n @if (loading()) {\r\n <p-skeleton height=\"7rem\" borderRadius=\"0.375rem\" />\r\n <p-skeleton height=\"6rem\" borderRadius=\"0.375rem\" />\r\n <p-skeleton height=\"12rem\" borderRadius=\"0.375rem\" />\r\n } @else if (loadError()) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-4 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n role=\"alert\"\r\n >\r\n <mt-icon icon=\"alert.alert-circle\" class=\"mt-0.5 shrink-0\" />\r\n <span>{{ loadError() }}</span>\r\n </div>\r\n } @else if (contractOutdated()) {\r\n <div\r\n class=\"rounded-md border border-amber-200 bg-amber-50 p-4 text-sm text-amber-700 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200\"\r\n >\r\n {{ t(\"contract-outdated\") }}\r\n </div>\r\n } @else if (summary(); as replacement) {\r\n <!-- Who \u2192 who, the status, and when -->\r\n <section\r\n class=\"flex flex-col gap-3 rounded-md border border-surface bg-content p-4\"\r\n >\r\n <div class=\"flex items-center gap-3\">\r\n <div class=\"flex min-w-0 flex-1 items-center gap-3\">\r\n <mt-avatar\r\n [label]=\"sourceInitials()\"\r\n shape=\"circle\"\r\n styleClass=\"bg-surface-100! text-color! dark:bg-surface-800!\"\r\n />\r\n <div class=\"min-w-0\">\r\n <div class=\"text-xs text-muted-color\">{{ t(\"from\") }}</div>\r\n <div class=\"truncate font-semibold\" [title]=\"sourceName()\">\r\n {{ sourceName() }}\r\n </div>\r\n </div>\r\n </div>\r\n <mt-icon\r\n icon=\"arrow.arrow-right\"\r\n class=\"shrink-0 text-lg text-muted-color rtl:rotate-180\"\r\n />\r\n <div class=\"flex min-w-0 flex-1 items-center gap-3\">\r\n <mt-avatar\r\n [label]=\"successorInitials()\"\r\n shape=\"circle\"\r\n styleClass=\"bg-primary-50! text-primary-700! dark:bg-primary-950! dark:text-primary-200!\"\r\n />\r\n <div class=\"min-w-0\">\r\n <div class=\"text-xs text-muted-color\">{{ t(\"to\") }}</div>\r\n <div class=\"truncate font-semibold\" [title]=\"successorName()\">\r\n {{ successorName() }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-wrap items-center gap-x-4 gap-y-2 border-t border-surface pt-3 text-xs text-muted-color\"\r\n >\r\n <span\r\n class=\"rounded-md border px-2 py-0.5 font-semibold\"\r\n [class]=\"statusClass()\"\r\n >{{ text.code(\"statuses\", replacement.status) }}</span\r\n >\r\n @if (createdAt(); as created) {\r\n <span class=\"flex items-center gap-1\">\r\n <mt-icon icon=\"time.calendar\" />\r\n {{ t(\"started\") }}\r\n <span class=\"tabular-nums text-color\">{{\r\n created | mtDateFormat: \"dateTime\"\r\n }}</span>\r\n </span>\r\n }\r\n @if (updatedAt(); as updated) {\r\n <span class=\"flex items-center gap-1\">\r\n <mt-icon icon=\"time.clock\" />\r\n {{ t(\"updated\") }}\r\n <span class=\"tabular-nums text-color\">{{\r\n updated | mtDateFormat: \"dateTime\"\r\n }}</span>\r\n </span>\r\n }\r\n </div>\r\n </section>\r\n\r\n <!-- Where it is, in one sentence -->\r\n @if (card(); as status) {\r\n <section\r\n class=\"flex flex-col gap-3 rounded-md border p-4\"\r\n [class]=\"cardBoxClass()\"\r\n role=\"status\"\r\n >\r\n <div class=\"flex items-start gap-3\">\r\n <mt-icon\r\n [icon]=\"status.icon\"\r\n class=\"mt-0.5 shrink-0 text-xl\"\r\n [class]=\"cardIconClass()\"\r\n />\r\n <div class=\"flex min-w-0 flex-1 flex-col gap-1\">\r\n <div class=\"font-semibold\">{{ status.title }}</div>\r\n @if (status.body) {\r\n <div class=\"text-sm\">{{ status.body }}</div>\r\n }\r\n @if (isFinished() && notCheckedCount() > 0) {\r\n <div class=\"text-sm opacity-80\">\r\n {{ t(\"not-checked-note\", { count: notCheckedCount() }) }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n @if (canRemoveSource()) {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-t border-surface pt-3\"\r\n >\r\n <span class=\"text-sm\">{{\r\n t(\"remove-source-hint\", { name: sourceName() })\r\n }}</span>\r\n <mt-button\r\n [label]=\"t('remove-source')\"\r\n icon=\"general.link-broken-01\"\r\n severity=\"danger\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [loading]=\"removing()\"\r\n (click)=\"removeSource()\"\r\n />\r\n </div>\r\n }\r\n\r\n @if (status.progress) {\r\n <p-progressbar mode=\"indeterminate\" [style]=\"{ height: '4px' }\" />\r\n }\r\n\r\n @if (actionError()) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n role=\"alert\"\r\n >\r\n <mt-icon icon=\"alert.alert-circle\" class=\"mt-0.5 shrink-0\" />\r\n <span>{{ actionError() }}</span>\r\n </div>\r\n }\r\n </section>\r\n }\r\n\r\n <!-- The results: outcomes after Start, what needs an admin first -->\r\n @if (showResults()) {\r\n <section class=\"flex flex-col gap-3\">\r\n <h3 class=\"text-sm font-semibold\">{{ t(\"results-title\") }}</h3>\r\n\r\n @if (tabs().length > 1) {\r\n <mt-tabs\r\n [options]=\"tabs()\"\r\n [active]=\"activeTab()\"\r\n (activeChange)=\"selectTab($event)\"\r\n mode=\"underline\"\r\n size=\"small\"\r\n />\r\n }\r\n @if (rows().length > 8) {\r\n <mt-text-field\r\n [formControl]=\"search\"\r\n icon=\"general.search-lg\"\r\n [placeholder]=\"t('search-results')\"\r\n />\r\n }\r\n\r\n @if (itemsError()) {\r\n <div\r\n class=\"rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n role=\"alert\"\r\n >\r\n {{ itemsError() }}\r\n </div>\r\n } @else if (itemsLoading() && !filteredRows().length) {\r\n <div class=\"flex flex-col gap-2\">\r\n @for (row of [1, 2, 3]; track row) {\r\n <p-skeleton height=\"3.5rem\" borderRadius=\"0.375rem\" />\r\n }\r\n </div>\r\n } @else if (!filteredRows().length) {\r\n <div\r\n class=\"rounded-md border border-dashed border-surface p-4 text-center text-sm text-muted-color\"\r\n >\r\n {{ t(\"no-matching-results\") }}\r\n </div>\r\n } @else {\r\n <ul class=\"rounded-md border border-surface bg-content\">\r\n @for (group of visibleGroups(); track group.place.key) {\r\n <li class=\"border-t border-surface first:border-t-0\">\r\n <!-- The place: project, record, request or escalation -->\r\n <div\r\n class=\"flex items-center gap-3 bg-surface-50 px-3 py-2 dark:bg-surface-900\"\r\n >\r\n <mt-icon\r\n [icon]=\"group.place.icon\"\r\n class=\"shrink-0 text-muted-color\"\r\n />\r\n <div class=\"min-w-0 flex-1\">\r\n <div\r\n class=\"truncate text-sm font-semibold\"\r\n [title]=\"group.place.title\"\r\n >\r\n {{ group.place.title }}\r\n </div>\r\n @if (group.place.context) {\r\n <div\r\n class=\"truncate text-xs text-muted-color\"\r\n [title]=\"group.place.context\"\r\n >\r\n {{ group.place.context }}\r\n </div>\r\n }\r\n </div>\r\n @if (group.place.openUrl) {\r\n <a\r\n class=\"flex shrink-0 items-center gap-1 text-xs text-primary hover:underline\"\r\n [href]=\"group.place.openUrl\"\r\n target=\"_blank\"\r\n rel=\"noopener\"\r\n >\r\n {{ t(\"open-project\") }}\r\n <mt-icon\r\n icon=\"general.link-external-01\"\r\n class=\"rtl:-scale-x-100\"\r\n />\r\n </a>\r\n }\r\n </div>\r\n <ul>\r\n @for (row of group.rows; track row.itemId) {\r\n <li\r\n class=\"flex items-start gap-3 border-t border-surface p-3\"\r\n >\r\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\r\n <span class=\"text-sm font-medium\">{{\r\n row.words.headline\r\n }}</span>\r\n @if (row.statusDetail) {\r\n <span class=\"text-xs text-muted-color\">{{\r\n row.statusDetail\r\n }}</span>\r\n }\r\n @if (showDetails() && row.words.technical) {\r\n <span\r\n class=\"truncate font-mono text-[11px] text-muted-color\"\r\n [title]=\"row.words.technical\"\r\n >{{ row.words.technical }}</span\r\n >\r\n }\r\n </div>\r\n <span\r\n class=\"shrink-0 whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"row.statusClass\"\r\n >{{ row.status }}</span\r\n >\r\n </li>\r\n }\r\n @if (group.foldedTeamRoles) {\r\n <li\r\n class=\"flex items-center gap-2 border-t border-surface px-3 py-2 text-xs text-muted-color\"\r\n >\r\n <mt-icon icon=\"general.check-circle\" class=\"shrink-0\" />\r\n {{ t(\"team-note\", { count: group.foldedTeamRoles }) }}\r\n </li>\r\n }\r\n @if (group.untouched) {\r\n <li\r\n class=\"flex items-start gap-2 border-t border-surface px-3 py-2 text-xs text-muted-color\"\r\n >\r\n <mt-icon\r\n icon=\"general.info-circle\"\r\n class=\"mt-0.5 shrink-0\"\r\n />\r\n {{ t(\"untouched-note\", { list: group.untouched }) }}\r\n </li>\r\n }\r\n @if (group.unchecked) {\r\n <li\r\n class=\"flex items-start gap-2 border-t border-surface px-3 py-2 text-xs text-muted-color\"\r\n >\r\n <mt-icon\r\n icon=\"alert.alert-circle\"\r\n class=\"mt-0.5 shrink-0\"\r\n />\r\n {{ t(\"unchecked-note\", { list: group.unchecked }) }}\r\n </li>\r\n }\r\n </ul>\r\n </li>\r\n }\r\n </ul>\r\n @if (hiddenRowCount() > 0) {\r\n <mt-button\r\n class=\"self-center\"\r\n [label]=\"t('show-more', { count: hiddenRowCount() })\"\r\n icon=\"arrow.chevron-down\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (click)=\"showMore()\"\r\n />\r\n }\r\n @if (loadingMore()) {\r\n <div\r\n class=\"flex items-center justify-center gap-2 text-xs text-muted-color\"\r\n role=\"status\"\r\n >\r\n <mt-icon icon=\"arrow.refresh-cw-02\" class=\"animate-spin\" />\r\n {{\r\n t(\"loading-more\", {\r\n loaded: items().length,\r\n total: summary()?.itemCount ?? items().length,\r\n })\r\n }}\r\n </div>\r\n }\r\n }\r\n </section>\r\n }\r\n\r\n <!-- One general limit, with every backend code behind a toggle -->\r\n <div class=\"flex flex-col gap-1 text-xs text-muted-color\">\r\n <div class=\"flex items-start gap-1.5\">\r\n <mt-icon icon=\"general.info-circle\" class=\"mt-px shrink-0\" />\r\n <span>{{ t(\"notices.supported-only\") }}</span>\r\n </div>\r\n @if (technicalDetails().length) {\r\n <button\r\n type=\"button\"\r\n class=\"ms-5 flex items-center gap-1 self-start text-primary hover:underline\"\r\n [attr.aria-expanded]=\"showDetails()\"\r\n (click)=\"showDetails.set(!showDetails())\"\r\n >\r\n <mt-icon\r\n [icon]=\"showDetails() ? 'arrow.chevron-up' : 'arrow.chevron-down'\"\r\n />\r\n {{ showDetails() ? t(\"hide-details\") : t(\"show-details\") }}\r\n </button>\r\n @if (showDetails()) {\r\n <ul class=\"ms-5 flex list-disc flex-col gap-0.5 ps-4\">\r\n @for (detail of technicalDetails(); track $index) {\r\n <li>{{ detail }}</li>\r\n }\r\n </ul>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Close, and Stop / Close replacement while the backend allows it -->\r\n <div [class]=\"modal.footerClass\">\r\n @if (canCancel()) {\r\n <mt-button\r\n [label]=\"cancelIsStop() ? t('stop') : t('close')\"\r\n icon=\"general.x-circle\"\r\n severity=\"danger\"\r\n variant=\"outlined\"\r\n [loading]=\"cancelling()\"\r\n (click)=\"cancel()\"\r\n />\r\n }\r\n <mt-button [label]=\"t('dismiss')\" (click)=\"close()\" />\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ 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: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "ariaLabel", "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: 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: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "ngmodule", type: ProgressBarModule }, { kind: "component", type: i2.ProgressBar, selector: "p-progressBar, p-progressbar, p-progress-bar", inputs: ["value", "showValue", "styleClass", "valueStyleClass", "unit", "mode", "color"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "pipe", type: MTDateFormatPipe, name: "mtDateFormat" }] });
|
|
4708
4748
|
}
|
|
4709
4749
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UserReplacementDetails, decorators: [{
|
|
4710
4750
|
type: Component,
|
|
@@ -5051,7 +5091,7 @@ class UserReplacements {
|
|
|
5051
5091
|
return user?.displayName || user?.userName || userId;
|
|
5052
5092
|
}
|
|
5053
5093
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UserReplacements, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5054
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: UserReplacements, isStandalone: true, selector: "mt-user-replacements", viewQueries: [{ propertyName: "personCol", first: true, predicate: ["personCol"], descendants: true, isSignal: true }, { propertyName: "statusCol", first: true, predicate: ["statusCol"], descendants: true, isSignal: true }, { propertyName: "startedCol", first: true, predicate: ["startedCol"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups.replacement'\">\r\n <ng-template #personCol let-row>\r\n <div class=\"flex min-w-0 items-center gap-3\">\r\n <mt-avatar\r\n [label]=\"row.sourceInitials\"\r\n shape=\"circle\"\r\n styleClass=\"bg-surface-100! text-color! dark:bg-surface-800!\"\r\n />\r\n <div class=\"flex min-w-0 flex-col\">\r\n <span class=\"truncate font-medium\">{{ row.sourceName }}</span>\r\n <span class=\"flex min-w-0 items-center gap-1 text-xs text-muted-color\">\r\n <mt-icon icon=\"arrow.arrow-right\" class=\"shrink-0 rtl:rotate-180\" />\r\n <span class=\"truncate\">{{ row.successorName }}</span>\r\n </span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #statusCol let-row>\r\n <div class=\"flex flex-col items-start gap-1\">\r\n <span\r\n class=\"whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"row.statusClass\"\r\n >{{ row.statusLabel }}</span\r\n >\r\n @if (row.detail) {\r\n <span class=\"text-xs tabular-nums text-muted-color\">{{\r\n row.detail\r\n }}</span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #startedCol let-row>\r\n @if (row.createdAt) {\r\n <span class=\"whitespace-nowrap tabular-nums\">{{\r\n row.createdAt | mtDateFormat: \"dateTime\"\r\n }}</span>\r\n }\r\n </ng-template>\r\n\r\n <div class=\"mt-5 flex flex-col gap-4\">\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('refresh')\"\r\n icon=\"arrow.refresh-cw-02\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [disabled]=\"loading()\"\r\n (click)=\"reload()\"\r\n />\r\n </div>\r\n\r\n @if (error()) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n >\r\n <mt-icon icon=\"alert.alert-circle\" class=\"mt-0.5 shrink-0\" />\r\n <span>{{ error() }}</span>\r\n </div>\r\n }\r\n\r\n <mt-table\r\n [tabs]=\"tabs()\"\r\n [activeTab]=\"filter()\"\r\n (activeTabChange)=\"setFilter($event)\"\r\n [data]=\"rows()\"\r\n [columns]=\"columns()\"\r\n [rowActions]=\"rowActions()\"\r\n [loading]=\"loading()\"\r\n [generalSearch]=\"true\"\r\n [clickableRows]=\"true\"\r\n (rowClick)=\"open($event.operationId)\"\r\n dataKey=\"operationId\"\r\n [emptyTitle]=\"emptyTitle()\"\r\n [emptyDescription]=\"emptyDescription()\"\r\n />\r\n\r\n @if (nextCursor() && !loading()) {\r\n <mt-button\r\n class=\"self-center\"\r\n [label]=\"t('list.load-more')\"\r\n icon=\"arrow.chevron-down\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [loading]=\"loadingMore()\"\r\n (click)=\"loadMore()\"\r\n />\r\n }\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: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "searchScope", "showFilters", "filterMode", "filterCloseOnOutsideClick", "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: 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: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "pipe", type: MTDateFormatPipe, name: "mtDateFormat" }] });
|
|
5094
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: UserReplacements, isStandalone: true, selector: "mt-user-replacements", viewQueries: [{ propertyName: "personCol", first: true, predicate: ["personCol"], descendants: true, isSignal: true }, { propertyName: "statusCol", first: true, predicate: ["statusCol"], descendants: true, isSignal: true }, { propertyName: "startedCol", first: true, predicate: ["startedCol"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'users-groups.replacement'\">\r\n <ng-template #personCol let-row>\r\n <div class=\"flex min-w-0 items-center gap-3\">\r\n <mt-avatar\r\n [label]=\"row.sourceInitials\"\r\n shape=\"circle\"\r\n styleClass=\"bg-surface-100! text-color! dark:bg-surface-800!\"\r\n />\r\n <div class=\"flex min-w-0 flex-col\">\r\n <span class=\"truncate font-medium\">{{ row.sourceName }}</span>\r\n <span class=\"flex min-w-0 items-center gap-1 text-xs text-muted-color\">\r\n <mt-icon icon=\"arrow.arrow-right\" class=\"shrink-0 rtl:rotate-180\" />\r\n <span class=\"truncate\">{{ row.successorName }}</span>\r\n </span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #statusCol let-row>\r\n <div class=\"flex flex-col items-start gap-1\">\r\n <span\r\n class=\"whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"row.statusClass\"\r\n >{{ row.statusLabel }}</span\r\n >\r\n @if (row.detail) {\r\n <span class=\"text-xs tabular-nums text-muted-color\">{{\r\n row.detail\r\n }}</span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #startedCol let-row>\r\n @if (row.createdAt) {\r\n <span class=\"whitespace-nowrap tabular-nums\">{{\r\n row.createdAt | mtDateFormat: \"dateTime\"\r\n }}</span>\r\n }\r\n </ng-template>\r\n\r\n <div class=\"mt-5 flex flex-col gap-4\">\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n [label]=\"t('refresh')\"\r\n icon=\"arrow.refresh-cw-02\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [disabled]=\"loading()\"\r\n (click)=\"reload()\"\r\n />\r\n </div>\r\n\r\n @if (error()) {\r\n <div\r\n class=\"flex items-start gap-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:border-red-900 dark:bg-red-950 dark:text-red-200\"\r\n >\r\n <mt-icon icon=\"alert.alert-circle\" class=\"mt-0.5 shrink-0\" />\r\n <span>{{ error() }}</span>\r\n </div>\r\n }\r\n\r\n <mt-table\r\n [tabs]=\"tabs()\"\r\n [activeTab]=\"filter()\"\r\n (activeTabChange)=\"setFilter($event)\"\r\n [data]=\"rows()\"\r\n [columns]=\"columns()\"\r\n [rowActions]=\"rowActions()\"\r\n [loading]=\"loading()\"\r\n [generalSearch]=\"true\"\r\n [clickableRows]=\"true\"\r\n (rowClick)=\"open($event.operationId)\"\r\n dataKey=\"operationId\"\r\n [emptyTitle]=\"emptyTitle()\"\r\n [emptyDescription]=\"emptyDescription()\"\r\n />\r\n\r\n @if (nextCursor() && !loading()) {\r\n <mt-button\r\n class=\"self-center\"\r\n [label]=\"t('list.load-more')\"\r\n icon=\"arrow.chevron-down\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n [loading]=\"loadingMore()\"\r\n (click)=\"loadMore()\"\r\n />\r\n }\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: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "searchScope", "showFilters", "filterMode", "filterCloseOnOutsideClick", "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: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "ariaLabel", "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: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "pipe", type: MTDateFormatPipe, name: "mtDateFormat" }] });
|
|
5055
5095
|
}
|
|
5056
5096
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: UserReplacements, decorators: [{
|
|
5057
5097
|
type: Component,
|