@fundamental-ngx/core 0.55.4 → 0.55.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dialog/base/dialog-config-base.class.d.ts +2 -0
- package/fesm2022/fundamental-ngx-core-action-bar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-action-sheet.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-avatar-group.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-avatar-group.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-avatar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-avatar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-bar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-bar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-breadcrumb.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-busy-indicator.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-button.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-calendar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-calendar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-card.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-carousel.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-checkbox.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-checkbox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-combobox.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dialog.mjs +6 -4
- package/fesm2022/fundamental-ngx-core-dialog.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dynamic-page.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-dynamic-side-content.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-facets.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-facets.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-feed-input.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-feed-list-item.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-file-uploader.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-file-uploader.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-fixed-card-layout.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-flexible-column-layout.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-form.mjs +14 -14
- package/fesm2022/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-generic-tag.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-grid-list.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-grid-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-icon.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-icon.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-illustrated-message.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-info-label.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-input-group.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-input-group.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-layout-grid.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-layout-panel.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-link.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-link.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-list.mjs +51 -14
- package/fesm2022/fundamental-ngx-core-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-menu.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-box.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-page.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-message-strip.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-message-toast.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-message-toast.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-micro-process-flow.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-input.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-notification.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-notification.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-attribute.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-identifier.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-marker.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-number.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-status.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-pagination.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-panel.mjs +18 -10
- package/fesm2022/fundamental-ngx-core-panel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-popover.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-product-switch.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-progress-indicator.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-quick-view.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-quick-view.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-radio.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-radio.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-rating-indicator.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-resizable-card-layout.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-segmented-button.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-segmented-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-select.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-settings.mjs +362 -0
- package/fesm2022/fundamental-ngx-core-settings.mjs.map +1 -0
- package/fesm2022/fundamental-ngx-core-shellbar.mjs +332 -46
- package/fesm2022/fundamental-ngx-core-shellbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-side-navigation.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-side-navigation.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-skeleton.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-slider.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-slider.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-split-button.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-status-indicator.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-step-input.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-step-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-switch.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-table.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-table.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tabs.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-text.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-tile.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-time.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-time.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-title.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-token.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-token.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-toolbar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-tree.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-user-menu.mjs +652 -0
- package/fesm2022/fundamental-ngx-core-user-menu.mjs.map +1 -0
- package/fesm2022/fundamental-ngx-core-vertical-navigation.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-vertical-navigation.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-wizard.mjs +2 -2
- package/fesm2022/fundamental-ngx-core.mjs +8 -3
- package/fesm2022/fundamental-ngx-core.mjs.map +1 -1
- package/fundamental-ngx.module.d.ts +2 -1
- package/index.d.ts +1 -0
- package/list/directives/subline/list-subline.directive.d.ts +5 -0
- package/list/index.d.ts +1 -0
- package/list/list-item/list-item.component.d.ts +6 -2
- package/list/list.component.d.ts +7 -1
- package/list/list.module.d.ts +2 -1
- package/package.json +17 -9
- package/panel/panel-content/panel-content.directive.d.ts +5 -3
- package/panel/panel.component.d.ts +5 -1
- package/settings/index.d.ts +11 -0
- package/settings/settings-container/settings-container.component.d.ts +52 -0
- package/settings/settings-content/settings-content.directive.d.ts +15 -0
- package/settings/settings-detail-area/settings-detail-area.directive.d.ts +5 -0
- package/settings/settings-dialog-body/settings-dialog-body.directive.d.ts +5 -0
- package/settings/settings-dialog-content/settings-dialog-content.directive.d.ts +5 -0
- package/settings/settings-header/settings-header.directive.d.ts +5 -0
- package/settings/settings-header-button/settings-header-button.directive.d.ts +5 -0
- package/settings/settings-list-area/settings-list-area.directive.d.ts +5 -0
- package/settings/settings-list-container/settings-list-container.directive.d.ts +5 -0
- package/settings/settings.component.d.ts +5 -0
- package/settings/settings.module.d.ts +20 -0
- package/shellbar/index.d.ts +4 -0
- package/shellbar/model/shellbar.d.ts +2 -0
- package/shellbar/shellbar-action/shellbar-action.component.d.ts +3 -0
- package/shellbar/shellbar-actions/shellbar-actions.component.d.ts +12 -6
- package/shellbar/shellbar-actions-mobile/shellbar-actions-mobile.component.d.ts +4 -1
- package/shellbar/shellbar-branding/shellbar-branding.component.d.ts +20 -0
- package/shellbar/shellbar-context-area/shellbar-context-area.component.d.ts +30 -0
- package/shellbar/shellbar-hide-priority.directive.d.ts +10 -0
- package/shellbar/shellbar-separator/shellbar-separator.component.d.ts +8 -0
- package/shellbar/shellbar-subtitle/shellbar-subtitle.component.d.ts +2 -0
- package/shellbar/shellbar.component.d.ts +45 -9
- package/shellbar/shellbar.module.d.ts +7 -2
- package/user-menu/components/user-menu-body.component.d.ts +63 -0
- package/user-menu/components/user-menu-content-container.component.d.ts +5 -0
- package/user-menu/components/user-menu-control.component.d.ts +14 -0
- package/user-menu/components/user-menu-footer.component.d.ts +5 -0
- package/user-menu/components/user-menu-list-item.component.d.ts +61 -0
- package/user-menu/components/user-menu-list.component.d.ts +5 -0
- package/user-menu/components/user-menu-sublist.component.d.ts +25 -0
- package/user-menu/directives/user-menu-header-container.directive.d.ts +5 -0
- package/user-menu/directives/user-menu-header.directive.d.ts +5 -0
- package/user-menu/directives/user-menu-subline.directive.d.ts +5 -0
- package/user-menu/directives/user-menu-user-name.directive.d.ts +5 -0
- package/user-menu/index.d.ts +13 -0
- package/user-menu/user-menu.component.d.ts +48 -0
- package/user-menu/user-menu.module.d.ts +22 -0
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, input, booleanAttribute, signal, viewChild, inject, ElementRef, DestroyRef, NgZone, ChangeDetectorRef, HostListener, Output, ChangeDetectionStrategy, ViewEncapsulation, Component, ContentChildren, contentChildren, contentChild, effect, ContentChild, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
|
+
import { RtlService, KeyboardSupportService } from '@fundamental-ngx/cdk/utils';
|
|
7
|
+
import { BarComponent, BarLeftDirective, BarRightDirective, ButtonBarComponent, BarElementDirective } from '@fundamental-ngx/core/bar';
|
|
8
|
+
import { contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';
|
|
9
|
+
import { TitleComponent } from '@fundamental-ngx/core/title';
|
|
10
|
+
import { Subject, startWith, observeOn, asyncScheduler, take, map, merge, takeUntil } from 'rxjs';
|
|
11
|
+
import { PopoverComponent, PopoverBodyComponent, PopoverControlComponent } from '@fundamental-ngx/core/popover';
|
|
12
|
+
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
13
|
+
import { map as map$1 } from 'rxjs/operators';
|
|
14
|
+
import { ContentDensityMode } from '@fundamental-ngx/core';
|
|
15
|
+
import { DialogService, DialogComponent, DialogBodyComponent, DialogFooterComponent } from '@fundamental-ngx/core/dialog';
|
|
16
|
+
|
|
17
|
+
let uniqueId = 0;
|
|
18
|
+
let uniqueTextId = 0;
|
|
19
|
+
class UserMenuListItemComponent {
|
|
20
|
+
constructor() {
|
|
21
|
+
/** Event emitter for keyDown event */
|
|
22
|
+
this.keyDown = new EventEmitter();
|
|
23
|
+
/** Event emitter for isOpenChange event that controls the submenu popover body */
|
|
24
|
+
this.isOpenChange = new EventEmitter();
|
|
25
|
+
/** Event emitter for showSubmenu event */
|
|
26
|
+
this.showSubmenu = new EventEmitter();
|
|
27
|
+
/** Event emitter for updateTitle event */
|
|
28
|
+
this.updateTitle = new EventEmitter();
|
|
29
|
+
/** Unique id for the menu list item. Default is provided. */
|
|
30
|
+
this.uniqueId = input(`fd-menu-list-item-${++uniqueId}`);
|
|
31
|
+
/** Icon name for the menu list item (optional) */
|
|
32
|
+
this.icon = input();
|
|
33
|
+
/** Required text for the menu list item */
|
|
34
|
+
this.text = input.required();
|
|
35
|
+
/** Unique id for the title. Default is provided. */
|
|
36
|
+
this.textId = input(`fd-menu-list-item-title-${++uniqueTextId}`);
|
|
37
|
+
/** Whether the item has a submenu */
|
|
38
|
+
this.hasSubmenu = input(false, { transform: booleanAttribute });
|
|
39
|
+
/** Template ref for user menu list item submenu */
|
|
40
|
+
this.submenu = input(null);
|
|
41
|
+
/** Whether the item is selected */
|
|
42
|
+
this.selected = input(false, { transform: booleanAttribute });
|
|
43
|
+
/** Whether the item's submenu is open */
|
|
44
|
+
this.isOpen = signal(false);
|
|
45
|
+
/** Whether the item is in mobile mode */
|
|
46
|
+
this.mobile = signal(false);
|
|
47
|
+
/** Reference to the popover */
|
|
48
|
+
this.popover = viewChild(PopoverComponent);
|
|
49
|
+
/** @hidden */
|
|
50
|
+
this.focused = new Subject();
|
|
51
|
+
/** Item's tabindex */
|
|
52
|
+
this._tabIndex$ = signal(null);
|
|
53
|
+
/** @hidden */
|
|
54
|
+
this._elementRef = inject(ElementRef);
|
|
55
|
+
/** @hidden */
|
|
56
|
+
this._destroyRef = inject(DestroyRef);
|
|
57
|
+
/** @hidden */
|
|
58
|
+
this._zone = inject(NgZone);
|
|
59
|
+
/** @hidden */
|
|
60
|
+
this._changeDetectionRef = inject(ChangeDetectorRef);
|
|
61
|
+
}
|
|
62
|
+
/** @hidden */
|
|
63
|
+
focusHandler() {
|
|
64
|
+
this.focused.next(this);
|
|
65
|
+
}
|
|
66
|
+
/** Handles submenu selection in mobile mode */
|
|
67
|
+
onShowDetailsView() {
|
|
68
|
+
if (this.submenu() && this.mobile()) {
|
|
69
|
+
this.showSubmenu.emit(this.submenu());
|
|
70
|
+
this.updateTitle.emit(this.text());
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/** @hidden Support for KeyboardSupportItemInterface */
|
|
74
|
+
click() {
|
|
75
|
+
const linkElement = this._elementRef.nativeElement.querySelector('.fd-menu__link');
|
|
76
|
+
linkElement.click();
|
|
77
|
+
}
|
|
78
|
+
/** @hidden */
|
|
79
|
+
focus() {
|
|
80
|
+
const linkElement = this._elementRef.nativeElement.querySelector('.fd-menu__link');
|
|
81
|
+
linkElement.focus();
|
|
82
|
+
}
|
|
83
|
+
/** @hidden */
|
|
84
|
+
isOpenChangeHandle(isOpen, popover) {
|
|
85
|
+
const firstTabbableElement = popover.popoverBody._elementRef.nativeElement.querySelector('.fd-menu__link');
|
|
86
|
+
const linkElement = this._elementRef.nativeElement.querySelector('.fd-menu__link');
|
|
87
|
+
if (this.isOpen() === isOpen) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.isOpen.set(isOpen);
|
|
91
|
+
this.isOpenChange.emit(isOpen);
|
|
92
|
+
this._onZoneStable().subscribe(() => {
|
|
93
|
+
this.isOpen() ? linkElement.classList.add('is-active') : linkElement.classList.remove('is-active');
|
|
94
|
+
firstTabbableElement.focus();
|
|
95
|
+
});
|
|
96
|
+
if (!this.isOpen()) {
|
|
97
|
+
linkElement.focus();
|
|
98
|
+
}
|
|
99
|
+
this._changeDetectionRef.detectChanges();
|
|
100
|
+
}
|
|
101
|
+
/** @hidden */
|
|
102
|
+
_onZoneStable() {
|
|
103
|
+
return this._zone.onStable.pipe(startWith(this._zone.isStable), observeOn(asyncScheduler), take(1), takeUntilDestroyed(this._destroyRef));
|
|
104
|
+
}
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
106
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: UserMenuListItemComponent, isStandalone: true, selector: "[fd-user-menu-list-item]", inputs: { uniqueId: { classPropertyName: "uniqueId", publicName: "uniqueId", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, textId: { classPropertyName: "textId", publicName: "textId", isSignal: true, isRequired: false, transformFunction: null }, hasSubmenu: { classPropertyName: "hasSubmenu", publicName: "hasSubmenu", isSignal: true, isRequired: false, transformFunction: null }, submenu: { classPropertyName: "submenu", publicName: "submenu", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { keyDown: "keyDown", isOpenChange: "isOpenChange", showSubmenu: "showSubmenu", updateTitle: "updateTitle" }, host: { attributes: { "role": "none" }, listeners: { "focusin": "focusHandler()" }, properties: { "attr.id": "uniqueId()", "attr.aria-labelledby": "textId()" }, classAttribute: "fd-menu__item" }, viewQueries: [{ propertyName: "popover", first: true, predicate: PopoverComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (hasSubmenu()) {\n @if (mobile()) {\n <button\n role=\"menuitem\"\n class=\"fd-menu__link\"\n [class.is-selected]=\"selected()\"\n [tabIndex]=\"_tabIndex$()\"\n (click)=\"onShowDetailsView()\"\n >\n @if (icon()) {\n <span class=\"fd-menu__addon-before\">\n <i [class]=\"'sap-icon--' + icon()\" role=\"presentation\"></i>\n </span>\n }\n\n <span class=\"fd-menu__title\" [id]=\"textId()\">{{ text() }}</span>\n <span class=\"fd-menu__addon-after fd-menu__addon-after--submenu\"></span>\n </button>\n } @else {\n <fd-popover\n #popover\n [noArrow]=\"true\"\n style=\"width: 100%\"\n placement=\"left-start\"\n [focusTrapped]=\"true\"\n [focusAutoCapture]=\"true\"\n [restoreFocusOnClose]=\"false\"\n [isOpen]=\"isOpen()\"\n (isOpenChange)=\"isOpenChangeHandle($event, popover)\"\n >\n <fd-popover-control>\n <button\n role=\"menuitem\"\n class=\"fd-menu__link fd-menu__link--popover\"\n [class.is-selected]=\"selected()\"\n [tabIndex]=\"_tabIndex$()\"\n >\n @if (icon()) {\n <span class=\"fd-menu__addon-before\">\n <i [class]=\"'sap-icon--' + icon()\" role=\"presentation\"></i>\n </span>\n }\n\n <span class=\"fd-menu__title\" [id]=\"textId()\">{{ text() }}</span>\n <span class=\"fd-menu__addon-after fd-menu__addon-after--submenu\"></span>\n </button>\n </fd-popover-control>\n <fd-popover-body>\n <ng-container *ngTemplateOutlet=\"submenu()\"></ng-container>\n </fd-popover-body>\n </fd-popover>\n }\n} @else {\n <button role=\"menuitem\" class=\"fd-menu__link\" [class.is-selected]=\"selected()\" [tabIndex]=\"_tabIndex$()\">\n @if (icon()) {\n <span class=\"fd-menu__addon-before\">\n <i [class]=\"'sap-icon--' + icon()\" role=\"presentation\"></i>\n </span>\n }\n\n <span class=\"fd-menu__title\" [id]=\"textId()\">{{ text() }}</span>\n </button>\n}\n", dependencies: [{ kind: "component", type: PopoverBodyComponent, selector: "fd-popover-body", inputs: ["minWidth", "maxWidth", "minHeight", "maxHeight"] }, { kind: "component", type: PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig", "preventSpaceKeyScroll"] }, { kind: "component", type: PopoverControlComponent, selector: "fd-popover-control, [fdPopoverControl]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
107
|
+
}
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuListItemComponent, decorators: [{
|
|
109
|
+
type: Component,
|
|
110
|
+
args: [{ selector: '[fd-user-menu-list-item]', host: {
|
|
111
|
+
class: 'fd-menu__item',
|
|
112
|
+
role: 'none',
|
|
113
|
+
'[attr.id]': 'uniqueId()',
|
|
114
|
+
'[attr.aria-labelledby]': 'textId()'
|
|
115
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PopoverBodyComponent, PopoverComponent, PopoverControlComponent, CommonModule], template: "@if (hasSubmenu()) {\n @if (mobile()) {\n <button\n role=\"menuitem\"\n class=\"fd-menu__link\"\n [class.is-selected]=\"selected()\"\n [tabIndex]=\"_tabIndex$()\"\n (click)=\"onShowDetailsView()\"\n >\n @if (icon()) {\n <span class=\"fd-menu__addon-before\">\n <i [class]=\"'sap-icon--' + icon()\" role=\"presentation\"></i>\n </span>\n }\n\n <span class=\"fd-menu__title\" [id]=\"textId()\">{{ text() }}</span>\n <span class=\"fd-menu__addon-after fd-menu__addon-after--submenu\"></span>\n </button>\n } @else {\n <fd-popover\n #popover\n [noArrow]=\"true\"\n style=\"width: 100%\"\n placement=\"left-start\"\n [focusTrapped]=\"true\"\n [focusAutoCapture]=\"true\"\n [restoreFocusOnClose]=\"false\"\n [isOpen]=\"isOpen()\"\n (isOpenChange)=\"isOpenChangeHandle($event, popover)\"\n >\n <fd-popover-control>\n <button\n role=\"menuitem\"\n class=\"fd-menu__link fd-menu__link--popover\"\n [class.is-selected]=\"selected()\"\n [tabIndex]=\"_tabIndex$()\"\n >\n @if (icon()) {\n <span class=\"fd-menu__addon-before\">\n <i [class]=\"'sap-icon--' + icon()\" role=\"presentation\"></i>\n </span>\n }\n\n <span class=\"fd-menu__title\" [id]=\"textId()\">{{ text() }}</span>\n <span class=\"fd-menu__addon-after fd-menu__addon-after--submenu\"></span>\n </button>\n </fd-popover-control>\n <fd-popover-body>\n <ng-container *ngTemplateOutlet=\"submenu()\"></ng-container>\n </fd-popover-body>\n </fd-popover>\n }\n} @else {\n <button role=\"menuitem\" class=\"fd-menu__link\" [class.is-selected]=\"selected()\" [tabIndex]=\"_tabIndex$()\">\n @if (icon()) {\n <span class=\"fd-menu__addon-before\">\n <i [class]=\"'sap-icon--' + icon()\" role=\"presentation\"></i>\n </span>\n }\n\n <span class=\"fd-menu__title\" [id]=\"textId()\">{{ text() }}</span>\n </button>\n}\n" }]
|
|
116
|
+
}], propDecorators: { keyDown: [{
|
|
117
|
+
type: Output
|
|
118
|
+
}], isOpenChange: [{
|
|
119
|
+
type: Output
|
|
120
|
+
}], showSubmenu: [{
|
|
121
|
+
type: Output
|
|
122
|
+
}], updateTitle: [{
|
|
123
|
+
type: Output
|
|
124
|
+
}], focusHandler: [{
|
|
125
|
+
type: HostListener,
|
|
126
|
+
args: ['focusin']
|
|
127
|
+
}] } });
|
|
128
|
+
|
|
129
|
+
class UserMenuBodyComponent {
|
|
130
|
+
constructor() {
|
|
131
|
+
/**
|
|
132
|
+
* Template ref of the submenu
|
|
133
|
+
*/
|
|
134
|
+
this.submenu = signal(null);
|
|
135
|
+
/**
|
|
136
|
+
* The text of the selected item
|
|
137
|
+
* Needed in mobile mode to update the title in the header
|
|
138
|
+
*/
|
|
139
|
+
this.selectedItemTitle = signal(null);
|
|
140
|
+
/**
|
|
141
|
+
* Template ref to the header of the user menu body.
|
|
142
|
+
* Needed in mobile mode
|
|
143
|
+
*/
|
|
144
|
+
this.bodyHeader = viewChild('bodyHeader');
|
|
145
|
+
/** @hidden */
|
|
146
|
+
this._rtlService = inject(RtlService);
|
|
147
|
+
/** @hidden */
|
|
148
|
+
this._refresh$ = new Subject();
|
|
149
|
+
/** @hidden */
|
|
150
|
+
this._destroyRef = inject(DestroyRef);
|
|
151
|
+
/** @hidden */
|
|
152
|
+
this._keyboardSupportService = inject(KeyboardSupportService);
|
|
153
|
+
}
|
|
154
|
+
/** @hidden */
|
|
155
|
+
onClick(event) {
|
|
156
|
+
event.stopPropagation();
|
|
157
|
+
}
|
|
158
|
+
/** @hidden */
|
|
159
|
+
keyDownHandler(event) {
|
|
160
|
+
if (this._keyboardSupportService.keyManager) {
|
|
161
|
+
this._keyboardSupportService.onKeyDown(event);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/** @hidden */
|
|
165
|
+
ngOnInit() {
|
|
166
|
+
this.navigationArrow$ = this._rtlService.rtl.pipe(map((isRtl) => (isRtl ? 'navigation-right-arrow' : 'navigation-left-arrow')));
|
|
167
|
+
}
|
|
168
|
+
/** @hidden */
|
|
169
|
+
ngAfterViewInit() {
|
|
170
|
+
this._keyboardSupportService.setKeyboardService(this._listItems, false, false);
|
|
171
|
+
this._listItems.changes.pipe(startWith(null), takeUntilDestroyed(this._destroyRef)).subscribe(() => {
|
|
172
|
+
this._setupInteractionListeners();
|
|
173
|
+
});
|
|
174
|
+
this._listItems.changes
|
|
175
|
+
.pipe(startWith(this._listItems), takeUntilDestroyed(this._destroyRef))
|
|
176
|
+
.subscribe((listItems) => {
|
|
177
|
+
listItems.forEach((item) => {
|
|
178
|
+
item.showSubmenu
|
|
179
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
180
|
+
.subscribe((submenuTpl) => {
|
|
181
|
+
this.selectItem(submenuTpl);
|
|
182
|
+
});
|
|
183
|
+
item.updateTitle.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((title) => {
|
|
184
|
+
this.updateTitle(title);
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Selects the item and sets the submenu template ref
|
|
191
|
+
*/
|
|
192
|
+
selectItem(submenuTpl) {
|
|
193
|
+
this.submenu.set(submenuTpl);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Updates the title of the selected item
|
|
197
|
+
*/
|
|
198
|
+
updateTitle(title) {
|
|
199
|
+
this.selectedItemTitle.set(title);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Clears the submenu template ref and the selected item title
|
|
203
|
+
* Closes the submenu and returns to the main view
|
|
204
|
+
*/
|
|
205
|
+
clearSubmenu() {
|
|
206
|
+
this.submenu.set(null);
|
|
207
|
+
this.selectedItemTitle.set(null);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Closes the dialog in mobile mode
|
|
211
|
+
*/
|
|
212
|
+
closeDialog(dialogRef) {
|
|
213
|
+
dialogRef.dismiss('Close');
|
|
214
|
+
this.clearSubmenu();
|
|
215
|
+
}
|
|
216
|
+
/** @hidden */
|
|
217
|
+
_setupInteractionListeners() {
|
|
218
|
+
this._refresh$.next();
|
|
219
|
+
this._refresh$.complete();
|
|
220
|
+
this._refresh$ = new Subject();
|
|
221
|
+
merge(...this._listItems.toArray().map((i) => i.focused))
|
|
222
|
+
.pipe(takeUntil(this._refresh$), takeUntilDestroyed(this._destroyRef))
|
|
223
|
+
.subscribe((focusedItem) => {
|
|
224
|
+
this._listItems.forEach((item) => {
|
|
225
|
+
item._tabIndex$.set(-1);
|
|
226
|
+
});
|
|
227
|
+
focusedItem._tabIndex$.set(0);
|
|
228
|
+
this._keyboardSupportService.keyManager.setActiveItem(focusedItem);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
232
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: UserMenuBodyComponent, isStandalone: true, selector: "fd-user-menu-body", host: { listeners: { "click": "onClick($event)", "keydown": "keyDownHandler($event)" }, classAttribute: "fd-user-menu__body" }, providers: [KeyboardSupportService, contentDensityObserverProviders()], queries: [{ propertyName: "_listItems", predicate: UserMenuListItemComponent, descendants: true }], viewQueries: [{ propertyName: "bodyHeader", first: true, predicate: ["bodyHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!submenu()) {\n <ng-content select=\"[fd-user-menu-header]\"></ng-content>\n <ng-content select=\"[fd-user-menu-content-container]\"></ng-content>\n} @else {\n <div class=\"fd-user-menu__details-view\">\n <ng-container *ngTemplateOutlet=\"submenu()\"></ng-container>\n </div>\n}\n\n<ng-template #bodyHeader let-dialogRef=\"dialogRef\">\n <div fd-bar [class.fd-user-menu__main-view-bar]=\"!submenu()\">\n @if (submenu()) {\n <div fd-bar-left>\n <fd-bar-element>\n <fd-button-bar ariaLabel=\"previous\" [glyph]=\"navigationArrow$ | async\" (click)=\"clearSubmenu()\">\n </fd-button-bar>\n </fd-bar-element>\n <fd-bar-element>\n <h5 fd-title>{{ selectedItemTitle() }}</h5>\n </fd-bar-element>\n </div>\n }\n <div fd-bar-right>\n <fd-bar-element>\n <fd-button-bar ariaLabel=\"previous\" glyph=\"decline\" (click)=\"closeDialog(dialogRef)\"> </fd-button-bar>\n </fd-bar-element>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: BarComponent, selector: "[fd-bar]", inputs: ["class", "barDesign", "inPage", "inHomePage", "size"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: TitleComponent, selector: "[fd-title], [fdTitle]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "directive", type: BarLeftDirective, selector: "[fd-bar-left]" }, { kind: "directive", type: BarRightDirective, selector: "[fd-bar-right]" }, { kind: "component", type: ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabelledby", "id"] }, { kind: "directive", type: BarElementDirective, selector: "fd-bar-element", inputs: ["fullWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
233
|
+
}
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuBodyComponent, decorators: [{
|
|
235
|
+
type: Component,
|
|
236
|
+
args: [{ selector: 'fd-user-menu-body', host: {
|
|
237
|
+
class: 'fd-user-menu__body'
|
|
238
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
239
|
+
BarComponent,
|
|
240
|
+
CommonModule,
|
|
241
|
+
TitleComponent,
|
|
242
|
+
BarLeftDirective,
|
|
243
|
+
BarRightDirective,
|
|
244
|
+
ButtonBarComponent,
|
|
245
|
+
BarElementDirective
|
|
246
|
+
], providers: [KeyboardSupportService, contentDensityObserverProviders()], template: "@if (!submenu()) {\n <ng-content select=\"[fd-user-menu-header]\"></ng-content>\n <ng-content select=\"[fd-user-menu-content-container]\"></ng-content>\n} @else {\n <div class=\"fd-user-menu__details-view\">\n <ng-container *ngTemplateOutlet=\"submenu()\"></ng-container>\n </div>\n}\n\n<ng-template #bodyHeader let-dialogRef=\"dialogRef\">\n <div fd-bar [class.fd-user-menu__main-view-bar]=\"!submenu()\">\n @if (submenu()) {\n <div fd-bar-left>\n <fd-bar-element>\n <fd-button-bar ariaLabel=\"previous\" [glyph]=\"navigationArrow$ | async\" (click)=\"clearSubmenu()\">\n </fd-button-bar>\n </fd-bar-element>\n <fd-bar-element>\n <h5 fd-title>{{ selectedItemTitle() }}</h5>\n </fd-bar-element>\n </div>\n }\n <div fd-bar-right>\n <fd-bar-element>\n <fd-button-bar ariaLabel=\"previous\" glyph=\"decline\" (click)=\"closeDialog(dialogRef)\"> </fd-button-bar>\n </fd-bar-element>\n </div>\n </div>\n</ng-template>\n" }]
|
|
247
|
+
}], propDecorators: { _listItems: [{
|
|
248
|
+
type: ContentChildren,
|
|
249
|
+
args: [UserMenuListItemComponent, { descendants: true }]
|
|
250
|
+
}], onClick: [{
|
|
251
|
+
type: HostListener,
|
|
252
|
+
args: ['click', ['$event']]
|
|
253
|
+
}], keyDownHandler: [{
|
|
254
|
+
type: HostListener,
|
|
255
|
+
args: ['keydown', ['$event']]
|
|
256
|
+
}] } });
|
|
257
|
+
|
|
258
|
+
class UserMenuContentContainerComponent {
|
|
259
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuContentContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
260
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: UserMenuContentContainerComponent, isStandalone: true, selector: "[fd-user-menu-content-container]", host: { classAttribute: "fd-user-menu__content-container" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
261
|
+
}
|
|
262
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuContentContainerComponent, decorators: [{
|
|
263
|
+
type: Component,
|
|
264
|
+
args: [{
|
|
265
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
266
|
+
selector: '[fd-user-menu-content-container]',
|
|
267
|
+
template: `<ng-content />`,
|
|
268
|
+
host: {
|
|
269
|
+
class: 'fd-user-menu__content-container'
|
|
270
|
+
},
|
|
271
|
+
encapsulation: ViewEncapsulation.None,
|
|
272
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
273
|
+
}]
|
|
274
|
+
}] });
|
|
275
|
+
|
|
276
|
+
class UserMenuControlComponent {
|
|
277
|
+
constructor() {
|
|
278
|
+
/** Event emitted event when control element is clicked */
|
|
279
|
+
this.clicked = new EventEmitter();
|
|
280
|
+
/** @hidden Saves element that is focused before dialog opened */
|
|
281
|
+
this._focusedElementBeforeDialogOpened = null;
|
|
282
|
+
}
|
|
283
|
+
/** @hidden */
|
|
284
|
+
onClick() {
|
|
285
|
+
this._focusedElementBeforeDialogOpened = _getFocusedElementPierceShadowDom();
|
|
286
|
+
this.clicked.emit();
|
|
287
|
+
}
|
|
288
|
+
/** @hidden */
|
|
289
|
+
_focus() {
|
|
290
|
+
this._focusedElementBeforeDialogOpened?.focus();
|
|
291
|
+
}
|
|
292
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
293
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: UserMenuControlComponent, isStandalone: true, selector: "fd-user-menu-control", outputs: { clicked: "clicked" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0, template: `<ng-content />`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
294
|
+
}
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuControlComponent, decorators: [{
|
|
296
|
+
type: Component,
|
|
297
|
+
args: [{
|
|
298
|
+
selector: 'fd-user-menu-control',
|
|
299
|
+
template: `<ng-content />`,
|
|
300
|
+
encapsulation: ViewEncapsulation.None,
|
|
301
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
302
|
+
imports: [CommonModule]
|
|
303
|
+
}]
|
|
304
|
+
}], propDecorators: { clicked: [{
|
|
305
|
+
type: Output
|
|
306
|
+
}], onClick: [{
|
|
307
|
+
type: HostListener,
|
|
308
|
+
args: ['click', ['$event']]
|
|
309
|
+
}] } });
|
|
310
|
+
|
|
311
|
+
class UserMenuFooterComponent {
|
|
312
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
313
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: UserMenuFooterComponent, isStandalone: true, selector: "fd-user-menu-footer", ngImport: i0, template: `<ng-content />`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
314
|
+
}
|
|
315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuFooterComponent, decorators: [{
|
|
316
|
+
type: Component,
|
|
317
|
+
args: [{
|
|
318
|
+
selector: 'fd-user-menu-footer',
|
|
319
|
+
template: `<ng-content />`,
|
|
320
|
+
encapsulation: ViewEncapsulation.None,
|
|
321
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
322
|
+
imports: [CommonModule]
|
|
323
|
+
}]
|
|
324
|
+
}] });
|
|
325
|
+
|
|
326
|
+
class UserMenuListComponent {
|
|
327
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
328
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: UserMenuListComponent, isStandalone: true, selector: "fd-user-menu-list", ngImport: i0, template: `
|
|
329
|
+
<nav class="fd-menu fd-menu--icons fd-user-menu__menu">
|
|
330
|
+
<ul class="fd-menu__list fd-user-menu__menu-list" role="menu">
|
|
331
|
+
<ng-content />
|
|
332
|
+
</ul>
|
|
333
|
+
</nav>
|
|
334
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
335
|
+
}
|
|
336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuListComponent, decorators: [{
|
|
337
|
+
type: Component,
|
|
338
|
+
args: [{
|
|
339
|
+
selector: 'fd-user-menu-list',
|
|
340
|
+
template: `
|
|
341
|
+
<nav class="fd-menu fd-menu--icons fd-user-menu__menu">
|
|
342
|
+
<ul class="fd-menu__list fd-user-menu__menu-list" role="menu">
|
|
343
|
+
<ng-content />
|
|
344
|
+
</ul>
|
|
345
|
+
</nav>
|
|
346
|
+
`,
|
|
347
|
+
encapsulation: ViewEncapsulation.None,
|
|
348
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
349
|
+
}]
|
|
350
|
+
}] });
|
|
351
|
+
|
|
352
|
+
class UserMenuSublistComponent {
|
|
353
|
+
constructor() {
|
|
354
|
+
/** Whether the sublist menu items have icons */
|
|
355
|
+
this.hasIcons = input(false, { transform: booleanAttribute });
|
|
356
|
+
/** @hidden */
|
|
357
|
+
this._refresh$ = new Subject();
|
|
358
|
+
/** @hidden */
|
|
359
|
+
this._destroyRef = inject(DestroyRef);
|
|
360
|
+
/** @hidden */
|
|
361
|
+
this._keyboardSupportService = inject((KeyboardSupportService));
|
|
362
|
+
}
|
|
363
|
+
/** @hidden */
|
|
364
|
+
onClick(event) {
|
|
365
|
+
event.stopPropagation();
|
|
366
|
+
}
|
|
367
|
+
/** @hidden */
|
|
368
|
+
keyDownHandler(event) {
|
|
369
|
+
if (this._keyboardSupportService.keyManager) {
|
|
370
|
+
this._keyboardSupportService.onKeyDown(event);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
/** @hidden */
|
|
374
|
+
ngAfterViewInit() {
|
|
375
|
+
this._keyboardSupportService.setKeyboardService(this._listItems, false, false);
|
|
376
|
+
this._listItems.changes.pipe(startWith(null), takeUntilDestroyed(this._destroyRef)).subscribe(() => {
|
|
377
|
+
this._setupInteractionListeners();
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
/** @hidden */
|
|
381
|
+
_setupInteractionListeners() {
|
|
382
|
+
this._refresh$.next();
|
|
383
|
+
this._refresh$.complete();
|
|
384
|
+
this._refresh$ = new Subject();
|
|
385
|
+
merge(...this._listItems.toArray().map((i) => i.focused))
|
|
386
|
+
.pipe(takeUntil(this._refresh$), takeUntilDestroyed(this._destroyRef))
|
|
387
|
+
.subscribe((focusedItem) => {
|
|
388
|
+
this._listItems.forEach((item) => {
|
|
389
|
+
item._tabIndex$.set(-1);
|
|
390
|
+
});
|
|
391
|
+
focusedItem._tabIndex$.set(0);
|
|
392
|
+
this._keyboardSupportService.keyManager.setActiveItem(focusedItem);
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuSublistComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
396
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.3", type: UserMenuSublistComponent, isStandalone: true, selector: "[fd-user-menu-sublist]", inputs: { hasIcons: { classPropertyName: "hasIcons", publicName: "hasIcons", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "keydown": "keyDownHandler($event)" }, properties: { "class.fd-menu--icons": "hasIcons()" }, classAttribute: "fd-menu fd-user-menu__menu" }, queries: [{ propertyName: "_listItems", predicate: UserMenuListItemComponent, descendants: true }], ngImport: i0, template: `<ul class="fd-menu__list fd-user-menu__menu-list" role="menu">
|
|
397
|
+
<ng-content />
|
|
398
|
+
</ul> `, isInline: true, styles: ["[fd-user-menu-sublist]{margin-block-start:0!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
399
|
+
}
|
|
400
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuSublistComponent, decorators: [{
|
|
401
|
+
type: Component,
|
|
402
|
+
args: [{ selector: '[fd-user-menu-sublist]', template: `<ul class="fd-menu__list fd-user-menu__menu-list" role="menu">
|
|
403
|
+
<ng-content />
|
|
404
|
+
</ul> `, host: {
|
|
405
|
+
class: 'fd-menu fd-user-menu__menu',
|
|
406
|
+
'[class.fd-menu--icons]': 'hasIcons()'
|
|
407
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["[fd-user-menu-sublist]{margin-block-start:0!important}\n"] }]
|
|
408
|
+
}], propDecorators: { _listItems: [{
|
|
409
|
+
type: ContentChildren,
|
|
410
|
+
args: [UserMenuListItemComponent, { descendants: true }]
|
|
411
|
+
}], onClick: [{
|
|
412
|
+
type: HostListener,
|
|
413
|
+
args: ['click', ['$event']]
|
|
414
|
+
}], keyDownHandler: [{
|
|
415
|
+
type: HostListener,
|
|
416
|
+
args: ['keydown', ['$event']]
|
|
417
|
+
}] } });
|
|
418
|
+
|
|
419
|
+
class UserMenuComponent {
|
|
420
|
+
/** @hidden */
|
|
421
|
+
constructor() {
|
|
422
|
+
/** Event thrown, when the user menu is opened or closed */
|
|
423
|
+
this.isOpenChange = new EventEmitter();
|
|
424
|
+
/** @hidden */
|
|
425
|
+
this.listItems = contentChildren(UserMenuListItemComponent, { descendants: true });
|
|
426
|
+
/** @hidden */
|
|
427
|
+
this.userMenuBody = contentChild(UserMenuBodyComponent, { descendants: true });
|
|
428
|
+
/** Whether the user menu is in mobile mode */
|
|
429
|
+
this.mobile = input(false, { transform: booleanAttribute });
|
|
430
|
+
/** Whether the user menu is open */
|
|
431
|
+
this.isOpen = signal(false);
|
|
432
|
+
/** @hidden */
|
|
433
|
+
this._rtlService = inject(RtlService);
|
|
434
|
+
/** @hidden */
|
|
435
|
+
this._dialogService = inject(DialogService);
|
|
436
|
+
/** @hidden */
|
|
437
|
+
this._changeDetectionRef = inject(ChangeDetectorRef);
|
|
438
|
+
effect(() => {
|
|
439
|
+
const isMobile = this.mobile();
|
|
440
|
+
this.listItems()?.forEach((item) => item.mobile.set(isMobile));
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
/** @hidden */
|
|
444
|
+
ngOnInit() {
|
|
445
|
+
this.navigationArrow$ = this._rtlService.rtl.pipe(map$1((isRtl) => (isRtl ? 'navigation-right-arrow' : 'navigation-left-arrow')));
|
|
446
|
+
}
|
|
447
|
+
/** @hidden */
|
|
448
|
+
ngAfterViewInit() {
|
|
449
|
+
const isMobile = this.mobile();
|
|
450
|
+
this.listItems()?.forEach((item) => item.mobile.set(isMobile));
|
|
451
|
+
}
|
|
452
|
+
/** Method that opens the user menu */
|
|
453
|
+
open() {
|
|
454
|
+
this.isOpenChangeHandle(true);
|
|
455
|
+
}
|
|
456
|
+
/** Method that closes the user menu */
|
|
457
|
+
close() {
|
|
458
|
+
this.isOpenChangeHandle(false);
|
|
459
|
+
if (this.listItems().length > 0) {
|
|
460
|
+
this.listItems().forEach((item) => {
|
|
461
|
+
item.isOpen.set(false);
|
|
462
|
+
item._elementRef?.nativeElement.querySelector('.fd-menu__link')?.classList.remove('is-active');
|
|
463
|
+
});
|
|
464
|
+
this.listItems()[0]?._tabIndex$.set(0);
|
|
465
|
+
}
|
|
466
|
+
this._clearSubmenu();
|
|
467
|
+
this._dialogRef?.close();
|
|
468
|
+
}
|
|
469
|
+
/** Method that opens the user menu in dialog (for mobile mode) */
|
|
470
|
+
openDialog(dialogTemplate) {
|
|
471
|
+
this._dialogRef = this._dialogService.open(dialogTemplate, {
|
|
472
|
+
mobile: true,
|
|
473
|
+
verticalPadding: false,
|
|
474
|
+
horizontalPadding: false,
|
|
475
|
+
ariaLabelledBy: 'fd-user-menu-header',
|
|
476
|
+
ariaDescribedBy: 'fd-user-menu-body',
|
|
477
|
+
contentDensity: ContentDensityMode.COZY
|
|
478
|
+
});
|
|
479
|
+
const refSub = this._dialogRef.afterClosed.subscribe({
|
|
480
|
+
error: (type) => {
|
|
481
|
+
if (type === 'escape') {
|
|
482
|
+
this._clearSubmenu();
|
|
483
|
+
refSub.unsubscribe();
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
/** @hidden */
|
|
489
|
+
isOpenChangeHandle(isOpen) {
|
|
490
|
+
if (this.isOpen() === isOpen) {
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
493
|
+
this.isOpen.set(isOpen);
|
|
494
|
+
this.isOpenChange.emit(isOpen);
|
|
495
|
+
if (!this.isOpen()) {
|
|
496
|
+
this.userMenuControl._focus();
|
|
497
|
+
}
|
|
498
|
+
this._changeDetectionRef.detectChanges();
|
|
499
|
+
}
|
|
500
|
+
/** @hidden */
|
|
501
|
+
_clearSubmenu() {
|
|
502
|
+
const userMenuBody = this.userMenuBody();
|
|
503
|
+
if (userMenuBody) {
|
|
504
|
+
userMenuBody.clearSubmenu();
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
508
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.3", type: UserMenuComponent, isStandalone: true, selector: "fd-user-menu", inputs: { mobile: { classPropertyName: "mobile", publicName: "mobile", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpenChange: "isOpenChange" }, host: { classAttribute: "fd-user-menu" }, providers: [KeyboardSupportService, contentDensityObserverProviders()], queries: [{ propertyName: "listItems", predicate: UserMenuListItemComponent, descendants: true, isSignal: true }, { propertyName: "userMenuBody", first: true, predicate: UserMenuBodyComponent, descendants: true, isSignal: true }, { propertyName: "userMenuControl", first: true, predicate: UserMenuControlComponent, descendants: true }], ngImport: i0, template: "@if (!mobile()) {\n <fd-popover\n [isOpen]=\"isOpen()\"\n (isOpenChange)=\"isOpenChangeHandle($event)\"\n [focusAutoCapture]=\"true\"\n [restoreFocusOnClose]=\"true\"\n [focusTrapped]=\"true\"\n >\n <fd-popover-control>\n <ng-container *ngTemplateOutlet=\"control\"></ng-container>\n </fd-popover-control>\n <fd-popover-body>\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n\n <div fd-popover-body-footer>\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </div>\n </fd-popover-body>\n </fd-popover>\n} @else {\n <span (click)=\"openDialog(dialogTemplate)\">\n <ng-container *ngTemplateOutlet=\"control\"></ng-container>\n </span>\n\n <ng-template [fdDialogTemplate] let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\n <fd-dialog-body style=\"padding: 0\">\n @if (userMenuBody()?.bodyHeader()) {\n <ng-container\n *ngTemplateOutlet=\"userMenuBody()?.bodyHeader() ?? null; context: { dialogRef: dialog }\"\n >\n </ng-container>\n }\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n </fd-dialog-body>\n <fd-dialog-footer>\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </fd-dialog-footer>\n </fd-dialog>\n </ng-template>\n}\n\n<ng-template #control>\n <ng-content select=\"fd-user-menu-control\" />\n</ng-template>\n\n<ng-template #body>\n <ng-content select=\"fd-user-menu-body\" />\n</ng-template>\n\n<ng-template #footer>\n <ng-content select=\"fd-user-menu-footer\" />\n</ng-template>\n", styles: ["@charset \"UTF-8\";.fd-user-menu{background:var(--sapGroup_ContentBackground)}.fd-user-menu .fd-user-menu__title-bar{--fdBar_Shadow:none}.fd-user-menu .fd-panel__header:has(.fd-panel__button[aria-expanded=false]){--fdPanel_Header_Border_Bottom_Left_Radius:0;--fdPanel_Header_Border_Bottom_Right_Radius:0}.fd-user-menu .fd-user-menu__popover-wrapper{overflow:visible}.fd-user-menu__body{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:.5rem;max-width:20rem;min-width:18rem;overflow:visible;padding-block:2.5rem .5rem;padding-inline:.5rem;position:relative}.fd-user-menu__body:after,.fd-user-menu__body:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu__header{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:.5rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.fd-user-menu__header:after,.fd-user-menu__header:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu__header-container,.fd-user-menu__subheader{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:.25rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:100%;text-align:center;-webkit-margin-after:.5rem;margin-block-end:.5rem}.fd-user-menu__header-container:after,.fd-user-menu__header-container:before,.fd-user-menu__subheader:after,.fd-user-menu__subheader:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu__user-name{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--sapTextColor);font-family:var(--fdUserMenu_User_Name_Font_Family);font-size:var(--sapFontLargeSize);line-height:1.4rem;max-height:2.8rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:normal}.fd-user-menu__user-name:after,.fd-user-menu__user-name:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu__subline,.fd-user-menu__user-info,.fd-user-menu__user-role{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;max-width:100%;overflow:hidden;padding-block:0;padding-inline:0;text-overflow:ellipsis;white-space:nowrap;width:100%}.fd-user-menu__subline:after,.fd-user-menu__subline:before,.fd-user-menu__user-info:after,.fd-user-menu__user-info:before,.fd-user-menu__user-role:after,.fd-user-menu__user-role:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu .fd-user-menu__menu{width:100%}.fd-user-menu .fd-user-menu__menu-list{border-radius:0;-webkit-box-shadow:none;box-shadow:none}.fd-user-menu .fd-user-menu__menu-list>:first-child,.fd-user-menu .fd-user-menu__menu-list>:last-child{border-radius:0}.fd-user-menu .fd-user-menu__menu-list.fd-user-menu__menu-list{border-radius:0;-webkit-box-shadow:none;box-shadow:none}.fd-user-menu .fd-user-menu__menu-list.fd-user-menu__menu-list>:first-child,.fd-user-menu .fd-user-menu__menu-list.fd-user-menu__menu-list>:last-child,.fd-user-menu .fd-user-menu__panel>div{border-radius:0}.fd-user-menu__content-container{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;--fdPanel_Margin_Bottom:.25rem}.fd-user-menu__content-container:after,.fd-user-menu__content-container:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu--mobile{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;-webkit-padding-before:0;padding-block-start:0}.fd-user-menu--mobile .fd-user-menu__body{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-padding-before:1rem;padding-block-start:1rem}.fd-user-menu--tool-header .fd-user-menu__user-name{color:var(-\\2013sapTitleColor);font-family:var(--sapFontBlackFamily);font-size:1.25rem;line-height:1.3}.fd-user-menu--tool-header .fd-user-menu__navigation-submenu{border:none;border-radius:.5rem;padding-block:.5rem;padding-inline:.5rem;top:-.5rem;-webkit-margin-end:.3875rem;background:var(--sapGroup_ContentBackground);-webkit-box-shadow:var(--sapMenu_Shadow1);box-shadow:var(--sapMenu_Shadow1);margin-inline-end:.3875rem}.fd-user-menu--tool-header .fd-user-menu__navigation-submenu-wrapper{overflow:visible}.fd-user-menu--tool-header .fd-user-menu__user-role{color:var(\\2013sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);line-height:var(--sapContent_LineHeight)}.fd-user-menu--tool-header .fd-user-menu__body{overflow:visible}.fd-user-menu--tool-header .fd-user-menu__body:has(.fd-user-menu__navigation-menu:first-child){padding-block:0}.fd-user-menu--tool-header .fd-user-menu__popover-body{background:var(--sapGroup_ContentBackground);border:none;border-radius:.75rem;-webkit-box-shadow:var(--sapMenu_Shadow2);box-shadow:var(--sapMenu_Shadow2);padding-block:.75rem;padding-inline:0}.fd-user-menu--tool-header .fd-user-menu__footer{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;padding-block:.75rem;padding-inline:1.125rem}.fd-user-menu--tool-header .fd-user-menu__footer:after,.fd-user-menu--tool-header .fd-user-menu__footer:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu--tool-header .fd-navigation__item.fd-navigation__item--title{--fdNavigation_Item_Title_Display:flex;-webkit-margin-after:1rem;margin-block-end:1rem}.fd-user-menu__menu.fd-menu{width:100%;margin-block-start:.25rem}.fd-menu__list.fd-user-menu__menu-list>.fd-menu__item{position:unset;width:100%}.fd-dialog__body .fd-user-menu__body{min-width:100%;max-width:100%;min-height:100%;max-height:100%}.fd-dialog__body .fd-user-menu__body .fd-menu__list.fd-user-menu__menu-list{min-width:100%}.fd-user-menu__details-view .fd-menu.fd-user-menu__menu{padding:1rem}.fd-user-menu__main-view-bar.fd-bar{box-shadow:none}.fd-menu__link{position:relative}.fd-menu__item:is(:focus,:focus-within,:focus-visible){outline:none}.fd-user-menu__menu-list.fd-user-menu__menu-list{box-shadow:none;border-radius:0}.fd-user-menu__menu-list.fd-user-menu__menu-list>*:first-child,.fd-user-menu__menu-list.fd-user-menu__menu-list>*:last-child{border-radius:0}.fd-user-menu__body{position:relative}.fd-user-menu__body:has(.fd-user-menu__details-view){padding:0}.fd-user-menu__user-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-width:100%;white-space:normal;line-height:1.4rem;max-height:2.8rem}.fd-panel__title,.fd-user-menu__subline{width:100%;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.fd-user-menu__header-container{max-width:100%}\n/*! Bundled license information:\n\nfundamental-styles/dist/user-menu.css:\n (*!\n * Fundamental Library Styles v0.39.2\n * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n *)\n*/\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig", "preventSpaceKeyScroll"] }, { kind: "component", type: PopoverBodyComponent, selector: "fd-popover-body", inputs: ["minWidth", "maxWidth", "minHeight", "maxHeight"] }, { kind: "component", type: PopoverControlComponent, selector: "fd-popover-control, [fdPopoverControl]" }, { kind: "component", type: DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig"] }, { kind: "component", type: DialogBodyComponent, selector: "fd-dialog-body", inputs: ["disablePaddings"] }, { kind: "component", type: DialogFooterComponent, selector: "fd-dialog-footer" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
509
|
+
}
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuComponent, decorators: [{
|
|
511
|
+
type: Component,
|
|
512
|
+
args: [{ selector: 'fd-user-menu', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
513
|
+
class: 'fd-user-menu'
|
|
514
|
+
}, imports: [
|
|
515
|
+
CommonModule,
|
|
516
|
+
PopoverComponent,
|
|
517
|
+
PopoverBodyComponent,
|
|
518
|
+
PopoverControlComponent,
|
|
519
|
+
DialogComponent,
|
|
520
|
+
DialogBodyComponent,
|
|
521
|
+
DialogFooterComponent
|
|
522
|
+
], providers: [KeyboardSupportService, contentDensityObserverProviders()], template: "@if (!mobile()) {\n <fd-popover\n [isOpen]=\"isOpen()\"\n (isOpenChange)=\"isOpenChangeHandle($event)\"\n [focusAutoCapture]=\"true\"\n [restoreFocusOnClose]=\"true\"\n [focusTrapped]=\"true\"\n >\n <fd-popover-control>\n <ng-container *ngTemplateOutlet=\"control\"></ng-container>\n </fd-popover-control>\n <fd-popover-body>\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n\n <div fd-popover-body-footer>\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </div>\n </fd-popover-body>\n </fd-popover>\n} @else {\n <span (click)=\"openDialog(dialogTemplate)\">\n <ng-container *ngTemplateOutlet=\"control\"></ng-container>\n </span>\n\n <ng-template [fdDialogTemplate] let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\n <fd-dialog-body style=\"padding: 0\">\n @if (userMenuBody()?.bodyHeader()) {\n <ng-container\n *ngTemplateOutlet=\"userMenuBody()?.bodyHeader() ?? null; context: { dialogRef: dialog }\"\n >\n </ng-container>\n }\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n </fd-dialog-body>\n <fd-dialog-footer>\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </fd-dialog-footer>\n </fd-dialog>\n </ng-template>\n}\n\n<ng-template #control>\n <ng-content select=\"fd-user-menu-control\" />\n</ng-template>\n\n<ng-template #body>\n <ng-content select=\"fd-user-menu-body\" />\n</ng-template>\n\n<ng-template #footer>\n <ng-content select=\"fd-user-menu-footer\" />\n</ng-template>\n", styles: ["@charset \"UTF-8\";.fd-user-menu{background:var(--sapGroup_ContentBackground)}.fd-user-menu .fd-user-menu__title-bar{--fdBar_Shadow:none}.fd-user-menu .fd-panel__header:has(.fd-panel__button[aria-expanded=false]){--fdPanel_Header_Border_Bottom_Left_Radius:0;--fdPanel_Header_Border_Bottom_Right_Radius:0}.fd-user-menu .fd-user-menu__popover-wrapper{overflow:visible}.fd-user-menu__body{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:.5rem;max-width:20rem;min-width:18rem;overflow:visible;padding-block:2.5rem .5rem;padding-inline:.5rem;position:relative}.fd-user-menu__body:after,.fd-user-menu__body:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu__header{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:.5rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.fd-user-menu__header:after,.fd-user-menu__header:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu__header-container,.fd-user-menu__subheader{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:.25rem;-webkit-box-align:center;-ms-flex-align:center;align-items:center;max-width:100%;text-align:center;-webkit-margin-after:.5rem;margin-block-end:.5rem}.fd-user-menu__header-container:after,.fd-user-menu__header-container:before,.fd-user-menu__subheader:after,.fd-user-menu__subheader:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu__user-name{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--sapTextColor);font-family:var(--fdUserMenu_User_Name_Font_Family);font-size:var(--sapFontLargeSize);line-height:1.4rem;max-height:2.8rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:normal}.fd-user-menu__user-name:after,.fd-user-menu__user-name:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu__subline,.fd-user-menu__user-info,.fd-user-menu__user-role{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;max-width:100%;overflow:hidden;padding-block:0;padding-inline:0;text-overflow:ellipsis;white-space:nowrap;width:100%}.fd-user-menu__subline:after,.fd-user-menu__subline:before,.fd-user-menu__user-info:after,.fd-user-menu__user-info:before,.fd-user-menu__user-role:after,.fd-user-menu__user-role:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu .fd-user-menu__menu{width:100%}.fd-user-menu .fd-user-menu__menu-list{border-radius:0;-webkit-box-shadow:none;box-shadow:none}.fd-user-menu .fd-user-menu__menu-list>:first-child,.fd-user-menu .fd-user-menu__menu-list>:last-child{border-radius:0}.fd-user-menu .fd-user-menu__menu-list.fd-user-menu__menu-list{border-radius:0;-webkit-box-shadow:none;box-shadow:none}.fd-user-menu .fd-user-menu__menu-list.fd-user-menu__menu-list>:first-child,.fd-user-menu .fd-user-menu__menu-list.fd-user-menu__menu-list>:last-child,.fd-user-menu .fd-user-menu__panel>div{border-radius:0}.fd-user-menu__content-container{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;--fdPanel_Margin_Bottom:.25rem}.fd-user-menu__content-container:after,.fd-user-menu__content-container:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu--mobile{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;-webkit-padding-before:0;padding-block-start:0}.fd-user-menu--mobile .fd-user-menu__body{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-padding-before:1rem;padding-block-start:1rem}.fd-user-menu--tool-header .fd-user-menu__user-name{color:var(-\\2013sapTitleColor);font-family:var(--sapFontBlackFamily);font-size:1.25rem;line-height:1.3}.fd-user-menu--tool-header .fd-user-menu__navigation-submenu{border:none;border-radius:.5rem;padding-block:.5rem;padding-inline:.5rem;top:-.5rem;-webkit-margin-end:.3875rem;background:var(--sapGroup_ContentBackground);-webkit-box-shadow:var(--sapMenu_Shadow1);box-shadow:var(--sapMenu_Shadow1);margin-inline-end:.3875rem}.fd-user-menu--tool-header .fd-user-menu__navigation-submenu-wrapper{overflow:visible}.fd-user-menu--tool-header .fd-user-menu__user-role{color:var(\\2013sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);line-height:var(--sapContent_LineHeight)}.fd-user-menu--tool-header .fd-user-menu__body{overflow:visible}.fd-user-menu--tool-header .fd-user-menu__body:has(.fd-user-menu__navigation-menu:first-child){padding-block:0}.fd-user-menu--tool-header .fd-user-menu__popover-body{background:var(--sapGroup_ContentBackground);border:none;border-radius:.75rem;-webkit-box-shadow:var(--sapMenu_Shadow2);box-shadow:var(--sapMenu_Shadow2);padding-block:.75rem;padding-inline:0}.fd-user-menu--tool-header .fd-user-menu__footer{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;padding-block:.75rem;padding-inline:1.125rem}.fd-user-menu--tool-header .fd-user-menu__footer:after,.fd-user-menu--tool-header .fd-user-menu__footer:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-user-menu--tool-header .fd-navigation__item.fd-navigation__item--title{--fdNavigation_Item_Title_Display:flex;-webkit-margin-after:1rem;margin-block-end:1rem}.fd-user-menu__menu.fd-menu{width:100%;margin-block-start:.25rem}.fd-menu__list.fd-user-menu__menu-list>.fd-menu__item{position:unset;width:100%}.fd-dialog__body .fd-user-menu__body{min-width:100%;max-width:100%;min-height:100%;max-height:100%}.fd-dialog__body .fd-user-menu__body .fd-menu__list.fd-user-menu__menu-list{min-width:100%}.fd-user-menu__details-view .fd-menu.fd-user-menu__menu{padding:1rem}.fd-user-menu__main-view-bar.fd-bar{box-shadow:none}.fd-menu__link{position:relative}.fd-menu__item:is(:focus,:focus-within,:focus-visible){outline:none}.fd-user-menu__menu-list.fd-user-menu__menu-list{box-shadow:none;border-radius:0}.fd-user-menu__menu-list.fd-user-menu__menu-list>*:first-child,.fd-user-menu__menu-list.fd-user-menu__menu-list>*:last-child{border-radius:0}.fd-user-menu__body{position:relative}.fd-user-menu__body:has(.fd-user-menu__details-view){padding:0}.fd-user-menu__user-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-width:100%;white-space:normal;line-height:1.4rem;max-height:2.8rem}.fd-panel__title,.fd-user-menu__subline{width:100%;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.fd-user-menu__header-container{max-width:100%}\n/*! Bundled license information:\n\nfundamental-styles/dist/user-menu.css:\n (*!\n * Fundamental Library Styles v0.39.2\n * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n *)\n*/\n"] }]
|
|
523
|
+
}], ctorParameters: () => [], propDecorators: { isOpenChange: [{
|
|
524
|
+
type: Output
|
|
525
|
+
}], userMenuControl: [{
|
|
526
|
+
type: ContentChild,
|
|
527
|
+
args: [UserMenuControlComponent]
|
|
528
|
+
}] } });
|
|
529
|
+
|
|
530
|
+
class UserMenuHeaderContainerDirective {
|
|
531
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuHeaderContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
532
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.3", type: UserMenuHeaderContainerDirective, isStandalone: true, selector: "[fd-user-menu-header-container]", host: { classAttribute: "fd-user-menu__header-container" }, ngImport: i0 }); }
|
|
533
|
+
}
|
|
534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuHeaderContainerDirective, decorators: [{
|
|
535
|
+
type: Directive,
|
|
536
|
+
args: [{
|
|
537
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
538
|
+
selector: '[fd-user-menu-header-container]',
|
|
539
|
+
host: {
|
|
540
|
+
class: 'fd-user-menu__header-container'
|
|
541
|
+
}
|
|
542
|
+
}]
|
|
543
|
+
}] });
|
|
544
|
+
|
|
545
|
+
class UserMenuHeaderDirective {
|
|
546
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
547
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.3", type: UserMenuHeaderDirective, isStandalone: true, selector: "[fd-user-menu-header]", host: { classAttribute: "fd-user-menu__header" }, ngImport: i0 }); }
|
|
548
|
+
}
|
|
549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuHeaderDirective, decorators: [{
|
|
550
|
+
type: Directive,
|
|
551
|
+
args: [{
|
|
552
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
553
|
+
selector: '[fd-user-menu-header]',
|
|
554
|
+
host: {
|
|
555
|
+
class: 'fd-user-menu__header'
|
|
556
|
+
}
|
|
557
|
+
}]
|
|
558
|
+
}] });
|
|
559
|
+
|
|
560
|
+
class UserMenuSublineDirective {
|
|
561
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuSublineDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
562
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.3", type: UserMenuSublineDirective, isStandalone: true, selector: "[fd-user-menu-subline]", host: { classAttribute: "fd-user-menu__subline" }, ngImport: i0 }); }
|
|
563
|
+
}
|
|
564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuSublineDirective, decorators: [{
|
|
565
|
+
type: Directive,
|
|
566
|
+
args: [{
|
|
567
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
568
|
+
selector: '[fd-user-menu-subline]',
|
|
569
|
+
host: {
|
|
570
|
+
class: 'fd-user-menu__subline'
|
|
571
|
+
}
|
|
572
|
+
}]
|
|
573
|
+
}] });
|
|
574
|
+
|
|
575
|
+
class UserMenuUserNameDirective {
|
|
576
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuUserNameDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
577
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.3", type: UserMenuUserNameDirective, isStandalone: true, selector: "[fd-user-menu-user-name]", host: { classAttribute: "fd-user-menu__user-name" }, ngImport: i0 }); }
|
|
578
|
+
}
|
|
579
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuUserNameDirective, decorators: [{
|
|
580
|
+
type: Directive,
|
|
581
|
+
args: [{
|
|
582
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
583
|
+
selector: '[fd-user-menu-user-name]',
|
|
584
|
+
host: {
|
|
585
|
+
class: 'fd-user-menu__user-name'
|
|
586
|
+
}
|
|
587
|
+
}]
|
|
588
|
+
}] });
|
|
589
|
+
|
|
590
|
+
const components = [
|
|
591
|
+
UserMenuComponent,
|
|
592
|
+
UserMenuControlComponent,
|
|
593
|
+
UserMenuBodyComponent,
|
|
594
|
+
UserMenuFooterComponent,
|
|
595
|
+
UserMenuListComponent,
|
|
596
|
+
UserMenuSublistComponent,
|
|
597
|
+
UserMenuListItemComponent,
|
|
598
|
+
UserMenuContentContainerComponent,
|
|
599
|
+
UserMenuHeaderDirective,
|
|
600
|
+
UserMenuHeaderContainerDirective,
|
|
601
|
+
UserMenuUserNameDirective,
|
|
602
|
+
UserMenuSublineDirective
|
|
603
|
+
];
|
|
604
|
+
/**
|
|
605
|
+
* @deprecated
|
|
606
|
+
* Use direct imports of components and directives.
|
|
607
|
+
*/
|
|
608
|
+
class UserMenuModule {
|
|
609
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
610
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.3", ngImport: i0, type: UserMenuModule, imports: [UserMenuComponent,
|
|
611
|
+
UserMenuControlComponent,
|
|
612
|
+
UserMenuBodyComponent,
|
|
613
|
+
UserMenuFooterComponent,
|
|
614
|
+
UserMenuListComponent,
|
|
615
|
+
UserMenuSublistComponent,
|
|
616
|
+
UserMenuListItemComponent,
|
|
617
|
+
UserMenuContentContainerComponent,
|
|
618
|
+
UserMenuHeaderDirective,
|
|
619
|
+
UserMenuHeaderContainerDirective,
|
|
620
|
+
UserMenuUserNameDirective,
|
|
621
|
+
UserMenuSublineDirective], exports: [UserMenuComponent,
|
|
622
|
+
UserMenuControlComponent,
|
|
623
|
+
UserMenuBodyComponent,
|
|
624
|
+
UserMenuFooterComponent,
|
|
625
|
+
UserMenuListComponent,
|
|
626
|
+
UserMenuSublistComponent,
|
|
627
|
+
UserMenuListItemComponent,
|
|
628
|
+
UserMenuContentContainerComponent,
|
|
629
|
+
UserMenuHeaderDirective,
|
|
630
|
+
UserMenuHeaderContainerDirective,
|
|
631
|
+
UserMenuUserNameDirective,
|
|
632
|
+
UserMenuSublineDirective] }); }
|
|
633
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuModule, imports: [UserMenuComponent,
|
|
634
|
+
UserMenuControlComponent,
|
|
635
|
+
UserMenuBodyComponent,
|
|
636
|
+
UserMenuFooterComponent,
|
|
637
|
+
UserMenuListItemComponent] }); }
|
|
638
|
+
}
|
|
639
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: UserMenuModule, decorators: [{
|
|
640
|
+
type: NgModule,
|
|
641
|
+
args: [{
|
|
642
|
+
imports: [...components],
|
|
643
|
+
exports: [...components]
|
|
644
|
+
}]
|
|
645
|
+
}] });
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Generated bundle index. Do not edit.
|
|
649
|
+
*/
|
|
650
|
+
|
|
651
|
+
export { UserMenuBodyComponent, UserMenuComponent, UserMenuContentContainerComponent, UserMenuControlComponent, UserMenuFooterComponent, UserMenuHeaderContainerDirective, UserMenuHeaderDirective, UserMenuListComponent, UserMenuListItemComponent, UserMenuModule, UserMenuSublineDirective, UserMenuSublistComponent, UserMenuUserNameDirective };
|
|
652
|
+
//# sourceMappingURL=fundamental-ngx-core-user-menu.mjs.map
|