@fundamental-ngx/core 0.35.5-rc.5 → 0.35.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/action-bar/package.json +1 -1
- package/action-sheet/package.json +1 -1
- package/alert/package.json +1 -1
- package/avatar/package.json +1 -1
- package/avatar-group/package.json +1 -1
- package/bar/package.json +1 -1
- package/breadcrumb/esm2020/breadcrumb.component.mjs +1 -1
- package/breadcrumb/fesm2015/fundamental-ngx-core-breadcrumb.mjs +1 -1
- package/breadcrumb/fesm2020/fundamental-ngx-core-breadcrumb.mjs +1 -1
- package/breadcrumb/package.json +1 -1
- package/busy-indicator/package.json +1 -1
- package/button/package.json +1 -1
- package/calendar/package.json +1 -1
- package/card/package.json +1 -1
- package/carousel/package.json +1 -1
- package/checkbox/package.json +1 -1
- package/combobox/package.json +1 -1
- package/content-density/package.json +4 -4
- package/date-picker/date-picker.component.d.ts +1 -10
- package/date-picker/date-picker.module.d.ts +2 -3
- package/date-picker/esm2020/date-picker.component.mjs +6 -30
- package/date-picker/esm2020/date-picker.module.mjs +1 -5
- package/date-picker/fesm2015/fundamental-ngx-core-date-picker.mjs +5 -33
- package/date-picker/fesm2015/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/date-picker/fesm2020/fundamental-ngx-core-date-picker.mjs +5 -33
- package/date-picker/fesm2020/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/date-picker/package.json +1 -1
- package/datetime/package.json +1 -1
- package/datetime-picker/package.json +1 -1
- package/dialog/package.json +1 -1
- package/dynamic-page/package.json +1 -1
- package/dynamic-side-content/package.json +1 -1
- package/esm2020/breadcrumb/breadcrumb.component.mjs +1 -1
- package/esm2020/date-picker/date-picker.component.mjs +6 -30
- package/esm2020/date-picker/date-picker.module.mjs +1 -5
- package/esm2020/menu/menu-item/menu-item.component.mjs +43 -7
- package/esm2020/menu/menu.component.mjs +37 -34
- package/esm2020/menu/services/menu.service.mjs +14 -13
- package/esm2020/shellbar/product-menu/product-menu.component.mjs +1 -1
- package/esm2020/shellbar/user-menu/shellbar-user-menu.component.mjs +1 -1
- package/esm2020/split-button/split-button.component.mjs +6 -6
- package/esm2020/tabs/tab-list.component.mjs +1 -1
- package/esm2020/tree/tree-child.component.mjs +2 -2
- package/facets/package.json +1 -1
- package/feed-input/package.json +1 -1
- package/feed-list-item/package.json +1 -1
- package/fesm2015/fundamental-ngx-core-breadcrumb.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-date-picker.mjs +5 -33
- package/fesm2015/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-menu.mjs +90 -50
- package/fesm2015/fundamental-ngx-core-menu.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-shellbar.mjs +2 -2
- package/fesm2015/fundamental-ngx-core-split-button.mjs +5 -5
- package/fesm2015/fundamental-ngx-core-split-button.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-tabs.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-tree.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-tree.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-breadcrumb.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-date-picker.mjs +5 -33
- package/fesm2020/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-menu.mjs +90 -50
- package/fesm2020/fundamental-ngx-core-menu.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-shellbar.mjs +2 -2
- package/fesm2020/fundamental-ngx-core-split-button.mjs +5 -5
- package/fesm2020/fundamental-ngx-core-split-button.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-tabs.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-tree.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-tree.mjs.map +1 -1
- package/file-uploader/package.json +1 -1
- package/fixed-card-layout/package.json +1 -1
- package/flexible-column-layout/package.json +1 -1
- package/form/package.json +1 -1
- package/formatted-text/package.json +1 -1
- package/grid-list/package.json +1 -1
- package/icon/package.json +1 -1
- package/illustrated-message/package.json +1 -1
- package/infinite-scroll/package.json +1 -1
- package/info-label/package.json +1 -1
- package/inline-help/package.json +1 -1
- package/input-group/package.json +1 -1
- package/layout-grid/package.json +1 -1
- package/layout-panel/package.json +1 -1
- package/link/package.json +1 -1
- package/list/package.json +1 -1
- package/menu/esm2020/menu-item/menu-item.component.mjs +43 -7
- package/menu/esm2020/menu.component.mjs +37 -34
- package/menu/esm2020/services/menu.service.mjs +14 -13
- package/menu/fesm2015/fundamental-ngx-core-menu.mjs +90 -50
- package/menu/fesm2015/fundamental-ngx-core-menu.mjs.map +1 -1
- package/menu/fesm2020/fundamental-ngx-core-menu.mjs +90 -50
- package/menu/fesm2020/fundamental-ngx-core-menu.mjs.map +1 -1
- package/menu/menu-item/menu-item.component.d.ts +27 -7
- package/menu/menu.component.d.ts +10 -10
- package/menu/package.json +1 -1
- package/menu/services/menu.service.d.ts +3 -3
- package/message-box/package.json +1 -1
- package/message-strip/package.json +1 -1
- package/message-toast/package.json +1 -1
- package/micro-process-flow/package.json +1 -1
- package/mobile-mode/package.json +1 -1
- package/multi-input/package.json +1 -1
- package/nested-list/package.json +1 -1
- package/notification/package.json +1 -1
- package/object-identifier/package.json +1 -1
- package/object-marker/package.json +1 -1
- package/object-number/package.json +1 -1
- package/object-status/package.json +1 -1
- package/overflow-layout/package.json +14 -14
- package/package.json +2 -2
- package/pagination/package.json +1 -1
- package/panel/package.json +1 -1
- package/popover/package.json +1 -1
- package/product-switch/package.json +1 -1
- package/progress-indicator/package.json +1 -1
- package/quick-view/package.json +1 -1
- package/radio/package.json +1 -1
- package/rating-indicator/package.json +1 -1
- package/resizable-card-layout/package.json +1 -1
- package/scroll-spy/package.json +1 -1
- package/scrollbar/package.json +1 -1
- package/segmented-button/package.json +1 -1
- package/select/package.json +1 -1
- package/shared/package.json +1 -1
- package/shellbar/esm2020/product-menu/product-menu.component.mjs +1 -1
- package/shellbar/esm2020/user-menu/shellbar-user-menu.component.mjs +1 -1
- package/shellbar/fesm2015/fundamental-ngx-core-shellbar.mjs +2 -2
- package/shellbar/fesm2020/fundamental-ngx-core-shellbar.mjs +2 -2
- package/shellbar/package.json +1 -1
- package/side-navigation/package.json +1 -1
- package/slider/package.json +1 -1
- package/split-button/esm2020/split-button.component.mjs +6 -6
- package/split-button/fesm2015/fundamental-ngx-core-split-button.mjs +5 -5
- package/split-button/fesm2015/fundamental-ngx-core-split-button.mjs.map +1 -1
- package/split-button/fesm2020/fundamental-ngx-core-split-button.mjs +5 -5
- package/split-button/fesm2020/fundamental-ngx-core-split-button.mjs.map +1 -1
- package/split-button/package.json +1 -1
- package/splitter/package.json +1 -1
- package/status-indicator/package.json +1 -1
- package/step-input/package.json +1 -1
- package/switch/package.json +1 -1
- package/table/package.json +1 -1
- package/tabs/esm2020/tab-list.component.mjs +1 -1
- package/tabs/fesm2015/fundamental-ngx-core-tabs.mjs +1 -1
- package/tabs/fesm2020/fundamental-ngx-core-tabs.mjs +1 -1
- package/tabs/package.json +1 -1
- package/text/package.json +1 -1
- package/theming/package.json +1 -1
- package/tile/package.json +1 -1
- package/time/package.json +1 -1
- package/time-picker/package.json +1 -1
- package/timeline/package.json +1 -1
- package/title/package.json +1 -1
- package/token/package.json +1 -1
- package/toolbar/package.json +1 -1
- package/tree/esm2020/tree-child.component.mjs +2 -2
- package/tree/fesm2015/fundamental-ngx-core-tree.mjs +1 -1
- package/tree/fesm2015/fundamental-ngx-core-tree.mjs.map +1 -1
- package/tree/fesm2020/fundamental-ngx-core-tree.mjs +1 -1
- package/tree/fesm2020/fundamental-ngx-core-tree.mjs.map +1 -1
- package/tree/package.json +1 -1
- package/upload-collection/package.json +1 -1
- package/utils/package.json +2 -2
- package/vertical-navigation/package.json +1 -1
- package/wizard/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-menu.mjs","sources":["../../../../../libs/core/src/lib/menu/directives/menu-title.directive.ts","../../../../../libs/core/src/lib/menu/directives/menu-interactive.directive.ts","../../../../../libs/core/src/lib/menu/services/menu.service.ts","../../../../../libs/core/src/lib/menu/menu-item/menu-item.component.ts","../../../../../libs/core/src/lib/menu/menu-item/menu-item.component.html","../../../../../libs/core/src/lib/menu/directives/menu-shortcut.directive.ts","../../../../../libs/core/src/lib/menu/directives/menu-trigger.directive.ts","../../../../../libs/core/src/lib/menu/directives/menu-addon.directive.ts","../../../../../libs/core/src/lib/menu/directives/deprecated-menu-compact.directive.ts","../../../../../libs/core/src/lib/menu/menu-separator/menu-separator.component.ts","../../../../../libs/core/src/lib/menu/menu.interface.ts","../../../../../libs/core/src/lib/menu/menu-mobile/menu-mobile.component.ts","../../../../../libs/core/src/lib/menu/menu-mobile/menu-mobile.component.html","../../../../../libs/core/src/lib/menu/menu-mobile/menu-mobile.module.ts","../../../../../libs/core/src/lib/menu/menu.component.ts","../../../../../libs/core/src/lib/menu/menu.component.html","../../../../../libs/core/src/lib/menu/menu.module.ts","../../../../../libs/core/src/lib/menu/default-menu-item.class.ts","../../../../../libs/core/src/lib/menu/menu-keyboard.service.ts","../../../../../libs/core/src/lib/menu/fundamental-ngx-core-menu.ts"],"sourcesContent":["import { Directive, ElementRef, HostBinding } from '@angular/core';\n\n/**\n * The directive that represents the menu title.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-menu-title]'\n})\nexport class MenuTitleDirective {\n /** @hidden */\n @HostBinding('class.fd-menu__title')\n fdMenuTitleClass = true;\n\n /** Returns element title text */\n @HostBinding('attr.title')\n get title(): string {\n return this._elementRef.nativeElement.textContent;\n }\n\n /** @hidden */\n constructor(private _elementRef: ElementRef) {}\n}\n","import { Directive, ElementRef, HostBinding } from '@angular/core';\nimport { Nullable } from '@fundamental-ngx/core/shared';\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-menu-interactive]',\n host: {\n role: 'menuitem'\n }\n})\nexport class MenuInteractiveDirective {\n /** @hidden */\n @HostBinding('attr.tabindex')\n tabindex = 0;\n\n /** @hidden */\n @HostBinding('class.is-disabled')\n disabled = false;\n\n /** @hidden */\n @HostBinding('attr.aria-controls')\n ariaControls: Nullable<string>;\n\n /** @hidden */\n @HostBinding('class.is-selected')\n @HostBinding('attr.aria-expanded')\n selected = false;\n\n /** @hidden */\n @HostBinding('attr.aria-haspopup')\n ariaHaspopup = false;\n\n /** @hidden */\n @HostBinding('class.fd-menu__link')\n readonly fdMenuLinkClass: boolean = true;\n\n /** @hidden */\n _fromSplitButton = false;\n\n /** @hidden */\n constructor(public elementRef: ElementRef) {}\n\n /** @hidden */\n setSelected(isSelected: boolean): void {\n this.selected = isSelected && (this.ariaHaspopup || this._fromSplitButton);\n }\n\n /** @hidden */\n setDisabled(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.tabindex = isDisabled ? -1 : 0;\n }\n\n /** @hidden */\n setSubmenu(hasSubmenu: boolean, itemId?: string): void {\n this.ariaHaspopup = hasSubmenu;\n this.ariaControls = hasSubmenu ? itemId || this.ariaControls : null;\n }\n}\n","import { ElementRef, Injectable, Optional, Renderer2 } from '@angular/core';\nimport { MenuItemComponent } from '../menu-item/menu-item.component';\nimport { MenuComponent } from '../menu.component';\nimport { KeyUtil, RtlService } from '@fundamental-ngx/core/utils';\nimport { Observable, Subject } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\nimport { DOWN_ARROW, ENTER, ESCAPE, LEFT_ARROW, RIGHT_ARROW, SPACE, UP_ARROW } from '@angular/cdk/keycodes';\n\ninterface MenuNode {\n item: MenuItemComponent | null;\n parent: MenuNode | null;\n children: MenuNode[];\n}\n\n/** `null` key is used for the root node */\ntype MenuMap = Map<MenuItemComponent | null, MenuNode>;\n\n@Injectable()\nexport class MenuService {\n /** Map of menu items to menu nodes */\n menuMap: MenuMap;\n\n /** Currently focused node */\n focusedNode: MenuNode | undefined;\n\n /** Collection of active menu nodes */\n activeNodePath: MenuNode[] = [];\n\n /** Collection of active menu nodes */\n private _isMobileMode: Subject<boolean> = new Subject();\n\n /** @hidden */\n private _menu: MenuComponent;\n\n /** @hidden */\n private _destroyKeyboardHandlerListener: () => void;\n\n /** @hidden */\n get _isRtl(): boolean {\n return this._rtlService?.rtl.value;\n }\n\n constructor(private _renderer: Renderer2, @Optional() private readonly _rtlService: RtlService) {}\n\n /** Reference to menu component */\n get menu(): MenuComponent {\n return this._menu;\n }\n\n /** Returns menu mode observable */\n get isMobileMode(): Observable<boolean> {\n return this._isMobileMode.pipe(distinctUntilChanged());\n }\n\n /** Sets menu mode */\n setMenuMode(value: boolean): void {\n this._isMobileMode.next(value);\n }\n\n /** Sets given menu item as focused */\n setFocused(menuItem: MenuItemComponent | null): void {\n this.focusedNode = this.menuMap.get(menuItem);\n this.focusedNode?.item?.focus();\n }\n\n /**\n * Sets state of a given menu item\n * @param isActive - Whether should be set as active or inactive\n * @param menuItem `MenuItemComponent` that should be set as active or inactive\n */\n setActive(isActive: boolean, menuItem: MenuItemComponent | null): void {\n if (!menuItem || (isActive && menuItem.disabled)) {\n return;\n }\n\n if (isActive) {\n this._addToActivePath(menuItem);\n } else {\n this._removeFromActivePath(menuItem);\n }\n this._emitActivePath();\n }\n\n /**\n * Close active sibling submenu if any\n * @param menuItem to look for active siblings\n */\n setInactiveSiblingMenuItem(menuItem: MenuItemComponent): void {\n this._removeActiveSibling(menuItem);\n this._emitActivePath();\n }\n\n /** Initializes menu service based on given Menu Component */\n setMenuRoot(menu: MenuComponent): void {\n this._menu = menu;\n this.menuMap = this._buildMenuMap(this._menu);\n }\n\n /** Clears Active Node Path and resets Focused Node */\n resetMenuState(): void {\n this._clearActivePath();\n this.focusedNode = undefined;\n this._emitActivePath();\n }\n\n /** - Updates the structure of the menu\n * - Validates Active Node Path\n * - Validates Focused Node */\n rebuildMenu(): void {\n this.menuMap = this._buildMenuMap(this._menu);\n\n const deadNode = this.activeNodePath.find((node) => !this.menuMap.has(node.item));\n if (deadNode?.item) {\n this.setActive(false, deadNode.item);\n }\n\n const invalidFocusedElement = this.focusedNode && !this.menuMap.get(this.focusedNode.item);\n if (invalidFocusedElement) {\n this.focusedNode =\n this.activeNodePath[this.activeNodePath.length - 1] || this.menuMap.get(null)!.children[0];\n }\n }\n\n /** Adds Menu keyboard support */\n addKeyboardSupport(elementRef: ElementRef): void {\n this.removeKeyboardSupport();\n this._setKeyboardSupport(elementRef);\n }\n\n /** Removes Menu keyboard support */\n removeKeyboardSupport(): void {\n if (this._destroyKeyboardHandlerListener) {\n this._destroyKeyboardHandlerListener();\n }\n }\n\n onDestroy(): void {\n this.removeKeyboardSupport();\n }\n\n /** @hidden Returns siblings of given node */\n private _nodeSiblings(node: MenuNode): MenuNode[] | undefined {\n return node.parent ? node.parent.children : this.menuMap.get(null)?.children;\n }\n\n /** @hidden Adds given element to the Active Node Path and setts as active*/\n private _addToActivePath(menuItem: MenuItemComponent): void {\n const menuNode = this.menuMap.get(menuItem);\n this._removeActiveSibling(menuItem);\n if (menuNode) {\n this.activeNodePath.push(menuNode);\n menuNode.item?.setSelected(true);\n }\n }\n\n /** @hidden Removes given element and all its successors from the Active Node Path and setts as inactive*/\n private _removeFromActivePath(menuItem: MenuItemComponent | null): void {\n const menuNode = this.menuMap.get(menuItem);\n if (menuNode) {\n const pathIndex = this.activeNodePath.findIndex((i) => i.item === menuNode.item);\n\n if (pathIndex !== -1) {\n this.activeNodePath\n .splice(pathIndex)\n .forEach((removedActiveNode) => removedActiveNode.item?.setSelected(false));\n }\n }\n }\n\n /** @hidden Removes all elements from the Active Node Path and sets them as closed */\n private _clearActivePath(): void {\n if (this.activeNodePath.length) {\n this._removeFromActivePath(this.activeNodePath[0].item);\n }\n }\n\n /** @hidden\n * - Builds Menu Nodes based on Menu Items\n * - Creates Map of the Menu Nodes */\n private _buildMenuMap(menu: MenuComponent): MenuMap {\n function buildNode(menuItem: MenuItemComponent): MenuNode {\n return {\n item: menuItem,\n parent: null,\n children: menuItem.submenu\n ? menuItem.submenu.menuItems.toArray().map((subMenuItem) => buildNode(subMenuItem))\n : []\n };\n }\n\n function setParents(node: MenuNode, parent: MenuNode | null): void {\n node.parent = parent;\n node.children.forEach((childNode) => setParents(childNode, node));\n }\n\n function toMap(node: MenuNode, map = new Map() as MenuMap): MenuMap {\n map.set(node.item, node);\n node.children.forEach((childNode) => toMap(childNode, map));\n return map;\n }\n\n /** root item */\n const menuTree: MenuNode = {\n item: null,\n parent: null,\n children: menu.menuItems.toArray().map((item) => buildNode(item))\n };\n\n setParents(menuTree, null);\n\n return toMap(menuTree);\n }\n\n /** @hidden Removes active sibling of a given menu item from the Active Path */\n private _removeActiveSibling(menuItem: MenuItemComponent): void {\n const menuNode = this.menuMap.get(menuItem);\n const children = menuNode?.parent?.children.map((i) => i.item);\n const activeSibling = this.activeNodePath.find((i) => children?.includes(i.item));\n const activeParentIndex = this.activeNodePath.indexOf(menuNode?.parent as MenuNode);\n\n if (activeSibling) {\n this._removeFromActivePath(activeParentIndex !== -1 ? activeSibling.item : this.activeNodePath[0].item);\n }\n }\n\n /** @hidden Adds keyboard support */\n private _setKeyboardSupport(elementRef: ElementRef): void {\n this._destroyKeyboardHandlerListener = this._renderer.listen(\n elementRef.nativeElement,\n 'keydown',\n (event: KeyboardEvent) => this._handleKey(event)\n );\n }\n\n private _handleKey(event: KeyboardEvent): void {\n const focusRight = (node): void => {\n setTimeout(() => this.setFocused(node.children[0].item));\n };\n let matched = true;\n\n if (!this.focusedNode) {\n return;\n }\n\n if (\n (KeyUtil.isKeyCode(event, RIGHT_ARROW) && !this._isRtl) ||\n (KeyUtil.isKeyCode(event, LEFT_ARROW) && this._isRtl)\n ) {\n if (this.focusedNode?.children.length) {\n this.setActive(true, this.focusedNode.item);\n focusRight(this.focusedNode);\n }\n } else if (\n (KeyUtil.isKeyCode(event, LEFT_ARROW) && !this._isRtl) ||\n (KeyUtil.isKeyCode(event, RIGHT_ARROW) && this._isRtl)\n ) {\n if (this.focusedNode.parent?.item) {\n this.setActive(false, this.focusedNode.parent.item);\n this.setFocused(this.focusedNode.parent.item);\n }\n } else if (KeyUtil.isKeyCode(event, DOWN_ARROW)) {\n const closest = this._closestEnabled(this.focusedNode, 'down');\n if (closest) {\n this.setFocused(closest.item);\n }\n } else if (KeyUtil.isKeyCode(event, UP_ARROW)) {\n const closest = this._closestEnabled(this.focusedNode, 'up');\n if (closest) {\n this.setFocused(closest.item);\n }\n } else if (KeyUtil.isKeyCode(event, [SPACE, ENTER])) {\n const focusedNode = this.focusedNode;\n this.setActive(true, focusedNode?.item);\n focusedNode.item?.click();\n if (focusedNode.children.length) {\n focusRight(focusedNode);\n }\n } else if (KeyUtil.isKeyCode(event, ESCAPE) && this.menu.closeOnEscapeKey) {\n this.menu.close();\n } else {\n matched = false;\n }\n\n if (matched) {\n event.preventDefault();\n }\n }\n\n /** @hidden Emits an array of active menu items */\n private _emitActivePath(): void {\n this.menu.activePath.emit(this.activeNodePath.map((node) => node.item) as MenuItemComponent[]);\n }\n\n /** @hidden Depending on direction returns closest enabled sibling of given node */\n private _closestEnabled(node: MenuNode, direction: 'up' | 'down'): MenuNode | null {\n const siblings =\n direction === 'up' ? [...(this._nodeSiblings(node) ?? [])].reverse() : this._nodeSiblings(node);\n\n if (siblings) {\n const startIndex = siblings.indexOf(node) + 1;\n\n for (let i = startIndex; i < siblings.length; i++) {\n if (siblings[i].item && !siblings[i].item!.disabled) {\n return siblings[i];\n }\n }\n }\n\n return null;\n }\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { defer, fromEvent, Observable, Subscription, timer } from 'rxjs';\nimport { filter, switchMap, takeUntil } from 'rxjs/operators';\n\nimport { MenuTitleDirective } from '../directives/menu-title.directive';\nimport { DefaultMenuItem } from '../default-menu-item.class';\nimport { MenuInteractiveDirective } from '../directives/menu-interactive.directive';\nimport { MenuService } from '../services/menu.service';\nimport { Nullable } from '@fundamental-ngx/core/shared';\n\nlet menuUniqueId = 0;\n\nexport interface BaseSubmenu {\n templateRef: TemplateRef<any>;\n menuItems: QueryList<any>;\n menuService: MenuService;\n ariaLabel: Nullable<string>;\n ariaLabelledby: Nullable<string>;\n}\n\nexport const SUBMENU = new InjectionToken<BaseSubmenu>('Submenu component dependency');\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'li[fd-menu-item]',\n exportAs: 'fd-menu-item',\n templateUrl: './menu-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'attr.role': 'menuitem',\n '[class.fd-menu__item]': 'true'\n }\n})\nexport class MenuItemComponent implements DefaultMenuItem, OnChanges, AfterContentInit, OnDestroy {\n /** Set the Menu Item as disabled/enabled */\n @Input()\n disabled = false;\n\n /** Menu Item id attribute value */\n @Input()\n itemId = `fd-menu-item-${menuUniqueId++}`;\n\n /** Reference to sub-menu component */\n @Input()\n submenu: BaseSubmenu | undefined;\n\n /** Emitted when the menu item is selected. */\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n onSelect: EventEmitter<void> = new EventEmitter<void>();\n\n /** @hidden Reference to the Menu Item title */\n @ContentChild(MenuTitleDirective)\n menuItemTitle: MenuTitleDirective;\n\n /** @hidden Reference to the Menu Item interactive element */\n @ContentChild(MenuInteractiveDirective)\n menuInteractive: MenuInteractiveDirective;\n\n /** @hidden Whether sub-menu is currently visible*/\n submenuVisible = false;\n\n /** @hidden */\n private _subscriptions: Subscription = new Subscription();\n\n /** @hidden */\n private _hoverSubscriptions: Subscription = new Subscription();\n\n /** @hidden */\n constructor(\n public elementRef: ElementRef,\n @Optional() public menuService: MenuService | null,\n private _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(SUBMENU) private _submenu: BaseSubmenu | null\n ) {}\n\n /** @hidden */\n ngAfterContentInit(): void {\n this._setMenuService();\n this._initialiseItemState();\n this._listenOnMenuLinkClick();\n this._listenOnOuterFocus();\n this._listenOnMenuMode();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['disabled'] && !changes['disabled'].firstChange) {\n this.menuInteractive.setDisabled(this.disabled);\n }\n if (changes['submenu'] && !changes['submenu'].firstChange) {\n this.menuInteractive.setSubmenu(!!this.submenu, this.submenu ? this.itemId : undefined);\n }\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n this._hoverSubscriptions.unsubscribe();\n }\n\n /** Whether menu item has popup (desktop mode) */\n get hasPopup(): boolean {\n return !!this.submenu && (!this.menuService?.menu || !this.menuService?.menu.mobile);\n }\n\n /** Focuses Menu Item interactive element */\n focus(): void {\n if (this.menuInteractive) {\n this.menuInteractive.elementRef.nativeElement.focus();\n }\n }\n\n /** Clicks Menu Item interactive element */\n click(): void {\n if (this.menuInteractive) {\n this.menuInteractive.elementRef.nativeElement.click();\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /** @hidden Sets menu item as selected/unselected based on isSelected flag */\n setSelected(isSelected: boolean, fromSplit?: boolean): void {\n this.menuInteractive.setSelected(isSelected);\n this.submenuVisible = isSelected && !!this.submenu;\n if (!fromSplit) {\n this.onSelect.emit();\n }\n this._changeDetectorRef.markForCheck();\n }\n\n /** @hidden Creates click listener on menu item interactive element */\n private _listenOnMenuLinkClick(): void {\n this._subscriptions.add(\n fromEvent(this.menuInteractive.elementRef.nativeElement, 'click').subscribe(() =>\n this.menuService?.setActive(true, this)\n )\n );\n }\n\n /** @hidden Creates hover listeners for activating/deactivating menu item */\n private _listenOnMenuLinkHover(): Subscription {\n const hoverSubscriptions: Subscription = new Subscription();\n\n const mouseEnter$: Observable<MouseEvent> = fromEvent(\n this.menuInteractive.elementRef.nativeElement,\n 'mouseenter'\n );\n const mouseLeave$: Observable<MouseEvent> = fromEvent(\n this.menuInteractive.elementRef.nativeElement,\n 'mouseleave'\n );\n\n const timerFactory$ = defer(() =>\n timer(this.menuService ? this.menuService.menu.openOnHoverTime : 0).pipe(takeUntil(mouseLeave$))\n );\n\n // Set active on hover\n hoverSubscriptions.add(\n mouseEnter$\n .pipe(\n filter(() => !!this.menuService),\n switchMap(() => timerFactory$)\n )\n .subscribe(() => {\n if (this.submenu) {\n // Open submenu\n this.menuService!.setActive(true, this);\n }\n if (!this.submenu) {\n // Close sibling submenu if opened\n this.menuService!.setInactiveSiblingMenuItem(this);\n }\n })\n );\n\n return hoverSubscriptions;\n }\n\n /** @hidden Initializes menu link state based on item initial state */\n private _initialiseItemState(): void {\n this.menuInteractive.setSubmenu(!!this.submenu, this.itemId);\n this.menuInteractive.setDisabled(this.disabled);\n }\n\n /** @hidden Checks for Menu Service dependency and passes it if further */\n private _setMenuService(): void {\n this.menuService = this.menuService || this._submenu?.menuService || null;\n if (this.submenu && this.menuService) {\n this.submenu.menuService = this.menuService;\n }\n }\n\n /** @hidden Listen on menu mode and set proper mode listeners */\n private _listenOnMenuMode(): void {\n this.menuService?.isMobileMode.subscribe((isMobile) => {\n this._hoverSubscriptions.unsubscribe();\n if (!isMobile) {\n this._hoverSubscriptions = this._listenOnMenuLinkHover();\n }\n });\n }\n\n /** @hidden Updates focused menu item on outer focus */\n private _listenOnOuterFocus(): void {\n this._subscriptions.add(\n fromEvent(this.menuInteractive.elementRef.nativeElement, 'focus').subscribe(() => {\n if (this.menuService && this.menuService.focusedNode !== this.menuService.menuMap.get(this)) {\n this.menuService.setFocused(this);\n }\n })\n );\n }\n}\n\n@Component({\n selector: 'fd-submenu',\n template: `\n <ng-template>\n <ng-content></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: SUBMENU, useExisting: SubmenuComponent }],\n exportAs: 'fdSubmenu'\n})\nexport class SubmenuComponent implements BaseSubmenu {\n /** Aria-label for navigation */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** Aria-Labelledby for element describing navigation */\n @Input()\n ariaLabelledby: Nullable<string>;\n\n /** @hidden Reference to template with Submenu items */\n @ViewChild(TemplateRef) templateRef: TemplateRef<any>;\n\n /** @hidden Reference to Submenu MenuItems */\n @ContentChildren(MenuItemComponent) menuItems: QueryList<MenuItemComponent>;\n\n /** @hidden Reference to MenuService used by MenuItems */\n menuService: MenuService;\n}\n","<ng-content></ng-content>\n\n<ng-container *ngIf=\"hasPopup && submenu\">\n <ul\n class=\"fd-menu__sublist\"\n role=\"menu\"\n [attr.id]=\"itemId\"\n [attr.aria-hidden]=\"!submenuVisible\"\n [attr.aria-label]=\"submenu.ariaLabel\"\n [attr.aria-labelledby]=\"submenu.ariaLabelledby\"\n >\n <ng-container *ngTemplateOutlet=\"submenu.templateRef\"></ng-container>\n </ul>\n</ng-container>\n","import { AfterViewInit, Directive, ElementRef, HostBinding, Input, OnDestroy } from '@angular/core';\nimport { MenuItemComponent } from '../menu-item/menu-item.component';\nimport { Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-menu-shortcut]'\n})\nexport class MenuShortcutDirective implements AfterViewInit, OnDestroy {\n /** Hide shortcuts in mobile mode */\n @Input()\n hideOnMobile = true;\n\n /** @hidden */\n @HostBinding('class.fd-menu__shortcut')\n readonly fdMenuShortcutClass: boolean = true;\n\n /** @hidden */\n private _subscriptions: Subscription = new Subscription();\n\n /** @hidden */\n constructor(private _menuItem: MenuItemComponent, private _elementRef: ElementRef) {}\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._hideOnMobile();\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** @hidden */\n private _hideOnMobile(): void {\n this._subscriptions.add(\n this._menuItem.menuService?.isMobileMode.pipe(filter(() => this.hideOnMobile)).subscribe((isMobile) => {\n if (isMobile) {\n this._elementRef.nativeElement.style.display = 'none';\n } else {\n this._elementRef.nativeElement.style.display = null;\n }\n })\n );\n }\n}\n","import { Directive, ElementRef, HostBinding, Input, OnDestroy } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { Nullable } from '@fundamental-ngx/core/shared';\n\nimport { MenuComponent } from '../menu.component';\n\n@Directive({\n selector: '[fdMenuTrigger]'\n})\nexport class MenuTriggerDirective implements OnDestroy {\n /** Set reference to Menu Component */\n @Input('fdMenuTrigger')\n set menu(menu: MenuComponent | undefined) {\n this._unsubscribeFromMenu();\n\n if (menu) {\n menu.trigger = this._elementRef;\n this._subscribeToMenu(menu);\n }\n\n this._setAriaAttributes(menu);\n }\n\n @HostBinding('attr.aria-haspopup')\n ariaHasPopup: Nullable<boolean>;\n\n @HostBinding('attr.aria-controls')\n ariaControls: Nullable<string>;\n\n @HostBinding('attr.aria-expanded')\n ariaExpanded: Nullable<boolean>;\n\n /** @hidden */\n private _menuSubscription: Subscription = new Subscription();\n\n /** @hidden */\n constructor(private _elementRef: ElementRef) {}\n\n /** @hidden */\n ngOnDestroy(): void {\n this._unsubscribeFromMenu();\n }\n\n /** @hidden */\n private _subscribeToMenu(menu: MenuComponent): void {\n this._menuSubscription.add(\n menu.isOpenChange.subscribe(() => {\n this._setAriaAttributes(menu);\n })\n );\n }\n\n /** @hidden */\n private _unsubscribeFromMenu(): void {\n this._menuSubscription.unsubscribe();\n this._menuSubscription = new Subscription();\n }\n\n /** @hidden */\n private _setAriaAttributes(menu?: MenuComponent): void {\n this.ariaHasPopup = !!menu;\n this.ariaExpanded = menu?.isOpen;\n this.ariaControls = menu?.isOpen ? menu.id : null;\n }\n}\n","import { Component, HostBinding, Input } from '@angular/core';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'fd-menu-addon',\n template: `\n <fd-icon [glyph]=\"glyph\" *ngIf=\"glyph\" role=\"presentation\"></fd-icon>\n <ng-content></ng-content>\n `\n})\n// eslint-disable-next-line @angular-eslint/component-class-suffix\nexport class MenuAddonDirective {\n /** Whether addon is used before or after text */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('position') set setAddonPosition(position: 'before' | 'after') {\n this.fdAddonBeforeClass = position === 'before';\n this.fdAddonAfterClass = position === 'after';\n }\n\n /** The icon name to display. See the icon page for the list of icons\n * here: https://sap.github.io/fundamental-ngx/icon\n * */\n @Input()\n glyph: string;\n\n /** Whether is used as submenu indicator */\n @Input()\n @HostBinding('class.fd-menu__addon-after--submenu')\n submenuIndicator = false;\n\n /** Sets Aria hidden attribute */\n @Input()\n @HostBinding('attr.aria-hidden')\n ariaHidden = true;\n\n /** @hidden */\n @HostBinding('class.fd-menu__addon-after')\n fdAddonAfterClass = true;\n\n /** @hidden */\n @HostBinding('class.fd-menu__addon-before')\n fdAddonBeforeClass = false;\n}\n","import { Directive, forwardRef } from '@angular/core';\nimport { CONTENT_DENSITY_DIRECTIVE, DeprecatedCompactDirective } from '@fundamental-ngx/core/content-density';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-menu[compact]',\n providers: [\n {\n provide: CONTENT_DENSITY_DIRECTIVE,\n useExisting: forwardRef(() => DeprecatedMenuCompactDirective)\n }\n ]\n})\nexport class DeprecatedMenuCompactDirective extends DeprecatedCompactDirective {\n constructor() {\n super('fd-menu');\n }\n}\n","import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'fd-menu-separator',\n template: '',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MenuSeparatorComponent {\n /** @hidden */\n @HostBinding('class.fd-menu__separator')\n readonly fdMenuSeparatorClass: boolean = true;\n}\n","import { EventEmitter, InjectionToken } from '@angular/core';\nimport { DialogConfig } from '@fundamental-ngx/core/dialog';\nimport { MenuItemComponent } from './menu-item/menu-item.component';\nimport { MobileMode } from '@fundamental-ngx/core/mobile-mode';\n\nexport const MENU_COMPONENT = new InjectionToken<string[]>('MenuInterface');\n\n/**\n * Menu Interface to have typing and avoid circular dependency between\n * MenuComponent <==> MenuMobileComponent\n */\nexport interface MenuInterface extends MobileMode {\n activePath: EventEmitter<MenuItemComponent[]>;\n dialogConfig: DialogConfig;\n isOpenChange: EventEmitter<boolean>;\n\n close(): void;\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n OnDestroy,\n OnInit,\n Optional,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { DialogService } from '@fundamental-ngx/core/dialog';\nimport { Observable, of } from 'rxjs';\nimport { MenuService } from '../services/menu.service';\nimport { MenuItemComponent } from '../menu-item/menu-item.component';\nimport { map, startWith, takeUntil } from 'rxjs/operators';\nimport { RtlService } from '@fundamental-ngx/core/utils';\nimport { MENU_COMPONENT, MenuInterface } from '../menu.interface';\nimport {\n MOBILE_MODE_CONFIG,\n MobileModeBase,\n MobileModeControl,\n MobileModeConfigToken\n} from '@fundamental-ngx/core/mobile-mode';\n\n@Component({\n selector: 'fd-menu-mobile',\n templateUrl: './menu-mobile.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class MenuMobileComponent extends MobileModeBase<MenuInterface> implements OnInit, OnDestroy {\n /** @hidden */\n @ViewChild('dialogTemplate') dialogTemplate: TemplateRef<any>;\n\n /** Current menu title */\n title: string;\n\n /** Whether current menu level is submenu */\n isSubmenu: boolean;\n\n /** @hidden External content */\n childContent: TemplateRef<any> | undefined = undefined;\n\n /** @hidden Currently rendered menu view */\n view: TemplateRef<any> | undefined;\n\n /** @hidden Navigation icon name based on RTL */\n navigationIcon$: Observable<string>;\n\n constructor(\n elementRef: ElementRef,\n dialogService: DialogService,\n private _menuService: MenuService,\n private _changeDetectorRef: ChangeDetectorRef,\n @Optional() private _rtlService: RtlService,\n @Inject(MENU_COMPONENT) menuComponent: MenuInterface,\n @Optional() @Inject(MOBILE_MODE_CONFIG) mobileModes: MobileModeConfigToken[]\n ) {\n super(elementRef, dialogService, menuComponent, MobileModeControl.MENU, mobileModes);\n }\n\n /** @hidden */\n ngOnInit(): void {\n this._listenOnActivePathChange();\n this._listenOnMenuOpenChange();\n this._listenOnTextDirection();\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n super.onDestroy();\n }\n\n /** Closes the Dialog and Menu component */\n close(): void {\n this.dialogRef.close();\n this._component.close();\n }\n\n /** Navigate back to parent level of submenu */\n backToParentLevel(): void {\n this._menuService.setActive(\n false,\n this._menuService.activeNodePath[this._menuService.activeNodePath.length - 1].item\n );\n }\n\n /** @hidden Opens the Dialog */\n private _openDialog(): void {\n this.dialogRef = this._dialogService.open(this.dialogTemplate, {\n mobile: true,\n verticalPadding: false,\n ...this.dialogConfig,\n escKeyCloseable: false,\n backdropClickCloseable: false,\n container: this._elementRef.nativeElement\n });\n }\n\n /** @hidden Listens on Active Path changes and updates mobile view */\n private _listenOnActivePathChange(): void {\n const initialItemPath: MenuItemComponent[] = this._menuService.activeNodePath\n .map((node) => node.item)\n .filter((v): v is MenuItemComponent => !!v);\n this._component.activePath\n .pipe(takeUntil(this._onDestroy$), startWith(initialItemPath))\n .subscribe((items) => this._setMenuView(items));\n }\n\n /** @hidden Sets menu view, title and isSubmenu flag */\n private _setMenuView(items: MenuItemComponent[]): void {\n const lastItem: MenuItemComponent = items[items.length - 1];\n this.isSubmenu = !!items.length;\n this.title = this._getDialogTitle(lastItem);\n this.view = this._getMenuView(lastItem);\n this._changeDetectorRef.markForCheck();\n }\n\n /** @hidden Opens/closes the Dialog based on Menu isOpenChange events */\n private _listenOnMenuOpenChange(): void {\n this._component.isOpenChange\n .pipe(takeUntil(this._onDestroy$))\n .subscribe((isOpen) => (isOpen ? this._openDialog() : this.dialogRef.close()));\n }\n\n /** @hidden Sets navigation arrow depending on text direction */\n private _listenOnTextDirection(): void {\n this.navigationIcon$ = this._rtlService\n ? this._rtlService.rtl.pipe(map((isRtl) => (isRtl ? 'navigation-right-arrow' : 'navigation-left-arrow')))\n : of('navigation-left-arrow');\n }\n\n /** @hidden Returns dialog title */\n private _getDialogTitle(menuItem: MenuItemComponent): string {\n if (this.isSubmenu) {\n return menuItem.menuItemTitle ? menuItem.menuItemTitle.title : '';\n }\n\n return this.mobileConfig.title || '';\n }\n\n /** @hidden Returns dialog content view */\n private _getMenuView(menuItem: MenuItemComponent): TemplateRef<any> | undefined {\n if (this.isSubmenu) {\n return menuItem.submenu ? menuItem.submenu.templateRef : this.view;\n }\n return this.childContent;\n }\n}\n","<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\n <fd-dialog-header>\n <ng-template fdTemplate=\"header\">\n <div fd-bar-left>\n <fd-bar-element *ngIf=\"isSubmenu\">\n <button\n fd-button\n fdType=\"transparent\"\n id=\"menu-mobile-navigate-back\"\n fdCozy\n [attr.aria-label]=\"'Go to previous menu level: ' + title\"\n [glyph]=\"navigationIcon$ | async\"\n (click)=\"backToParentLevel()\"\n ></button>\n </fd-bar-element>\n <fd-bar-element>\n <h1 fd-title>{{ title }}</h1>\n </fd-bar-element>\n </div>\n <div fd-bar-right>\n <fd-bar-element>\n <button\n *ngIf=\"this.mobileConfig.hasCloseButton\"\n fd-dialog-close-button\n [mobile]=\"true\"\n (click)=\"close()\"\n ></button>\n </fd-bar-element>\n </div>\n </ng-template>\n </fd-dialog-header>\n\n <fd-dialog-body>\n <ng-container *ngTemplateOutlet=\"(isSubmenu ? subMenuTemplate : view) || null\"> </ng-container>\n </fd-dialog-body>\n\n <fd-dialog-footer *ngIf=\"mobileConfig.approveButtonText || mobileConfig.cancelButtonText\">\n <fd-button-bar\n *ngIf=\"mobileConfig.approveButtonText\"\n fdType=\"emphasized\"\n [label]=\"mobileConfig.approveButtonText\"\n (click)=\"close()\"\n >\n </fd-button-bar>\n <fd-button-bar\n *ngIf=\"mobileConfig.cancelButtonText\"\n fd-initial-focus\n [label]=\"mobileConfig.cancelButtonText\"\n (click)=\"close()\"\n >\n </fd-button-bar>\n </fd-dialog-footer>\n </fd-dialog>\n</ng-template>\n\n<ng-template #subMenuTemplate>\n <nav class=\"fd-menu fd-menu--mobile\">\n <ul class=\"fd-menu__sublist\">\n <ng-container *ngTemplateOutlet=\"view || null\"></ng-container>\n </ul>\n </nav>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MenuMobileComponent } from './menu-mobile.component';\nimport { DialogModule } from '@fundamental-ngx/core/dialog';\nimport { ButtonModule } from '@fundamental-ngx/core/button';\n\n@NgModule({\n declarations: [MenuMobileComponent],\n imports: [CommonModule, DialogModule, ButtonModule],\n exports: [MenuMobileComponent],\n entryComponents: [MenuMobileComponent]\n})\nexport class MenuMobileModule {}\n","import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n Renderer2,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { DynamicComponentService } from '@fundamental-ngx/core/utils';\nimport { DialogConfig } from '@fundamental-ngx/core/dialog';\nimport { MobileModeConfig } from '@fundamental-ngx/core/mobile-mode';\nimport { BasePopoverClass, PopoverService } from '@fundamental-ngx/core/popover';\nimport { Nullable } from '@fundamental-ngx/core/shared';\n\nimport { MenuMobileComponent } from './menu-mobile/menu-mobile.component';\nimport { MenuMobileModule } from './menu-mobile/menu-mobile.module';\nimport { MenuService } from './services/menu.service';\nimport { MENU_COMPONENT, MenuInterface } from './menu.interface';\nimport { MenuItemComponent } from './menu-item/menu-item.component';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\n\nlet menuUniqueId = 0;\n\n/**\n * The component that represents a menu.\n */\n@Component({\n selector: 'fd-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['menu.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MenuService, PopoverService, contentDensityObserverProviders()]\n})\nexport class MenuComponent\n extends BasePopoverClass\n implements MenuInterface, AfterContentInit, AfterViewInit, OnDestroy, OnInit\n{\n /** Set menu in mobile mode */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('mobile')\n set setMobileMode(value: boolean) {\n this.mobile = value;\n this._menuService.setMenuMode(this.mobile);\n }\n\n /** Whether the popover is disabled. */\n @Input()\n disabled = false;\n\n /** Whether the popover should be focusTrapped. */\n @Input()\n focusTrapped = true;\n\n /** Open submenu on hover after given milliseconds */\n @Input()\n openOnHoverTime = 0;\n\n /** Display menu without integrated popover */\n @Input()\n mobileConfig: MobileModeConfig = { cancelButtonText: 'Cancel' };\n\n /** Aria-label for navigation */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** Aria-Labelledby for element describing navigation */\n @Input()\n ariaLabelledby: Nullable<string>;\n\n /** Id of the control. */\n @Input()\n id = `fd-menu-${menuUniqueId++}`;\n\n /** Emits array of active menu items */\n @Output()\n readonly activePath: EventEmitter<MenuItemComponent[]> = new EventEmitter<MenuItemComponent[]>();\n\n /** @hidden Reference to the menu root template */\n @ViewChild('menuRootTemplate')\n menuRootTemplate: TemplateRef<any>;\n\n /** @hidden Reference to all menu Items */\n @ContentChildren(MenuItemComponent, { descendants: true })\n menuItems: QueryList<MenuItemComponent>;\n\n /** Whether use menu in mobile mode */\n mobile = false;\n\n /** @hidden Whether Popover with the menu is opened */\n isOpen = false;\n\n /** @hidden Reference to external menu trigger */\n private _externalTrigger: ElementRef;\n\n /** @hidden */\n private _subscriptions: Subscription = new Subscription();\n\n /** @hidden */\n private _mobileModeComponentRef: ComponentRef<MenuMobileComponent>;\n\n /** @hidden */\n private _clickEventListener: null | (() => void);\n\n /** @hidden */\n constructor(\n public readonly elementRef: ElementRef,\n @Optional() public readonly dialogConfig: DialogConfig,\n private readonly _rendered: Renderer2,\n private readonly _menuService: MenuService,\n private readonly _changeDetectorRef: ChangeDetectorRef,\n private readonly _popoverService: PopoverService,\n private readonly _injector: Injector,\n private readonly _viewContainerRef: ViewContainerRef,\n @Optional() private readonly _dynamicComponentService: DynamicComponentService,\n readonly _contentDensityObserver: ContentDensityObserver\n ) {\n super();\n }\n\n /** @hidden */\n ngOnInit(): void {\n /** keep isOpen up to date */\n this.isOpenChange.subscribe((isOpen) => {\n this.isOpen = isOpen;\n if (!isOpen) {\n // when popover got closed by its own mechanism (e.x. click outside)\n // we need to clean up menu as well\n this._cleanUpMenuAfterClose();\n }\n this._changeDetectorRef.markForCheck();\n });\n }\n\n /** @hidden */\n ngAfterContentInit(): void {\n this._menuService.setMenuRoot(this);\n this._listenOnMenuItemsChange();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._menuService.isMobileMode.subscribe((isMobile) => {\n this._setupView();\n if (isMobile) {\n // Since it is mobile it's needed to disable popoverService\n this._popoverService.deactivate();\n }\n });\n this._menuService.setMenuMode(this.mobile);\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._destroyMobileComponent();\n this._destroyEventListeners();\n this._menuService.onDestroy();\n this._subscriptions.unsubscribe();\n this._popoverService.onDestroy();\n }\n\n get trigger(): ElementRef {\n return this._externalTrigger;\n }\n\n set trigger(trigger: ElementRef) {\n this._externalTrigger = trigger;\n this._popoverService.initialise(this._externalTrigger);\n this._destroyEventListeners();\n this._listenOnTriggerRefClicks();\n }\n\n /** Opens the menu */\n open(): void {\n if (this.mobile) {\n this.isOpen = true;\n this.isOpenChange.emit(this.isOpen);\n }\n if (!this.mobile) {\n this._popoverService.open();\n }\n this._changeDetectorRef.markForCheck();\n }\n\n /** Closes the menu */\n close(): void {\n if (this.mobile) {\n this.isOpen = false;\n this.isOpenChange.emit(this.isOpen);\n }\n if (!this.mobile) {\n this._popoverService.close();\n }\n this._cleanUpMenuAfterClose();\n this._focusTrigger();\n this._changeDetectorRef.markForCheck();\n }\n\n /** Toggles menu open/close state */\n toggle(): void {\n this.isOpen ? this.close() : this.open();\n }\n\n /** Method called to refresh position of opened popover */\n refreshPosition(): void {\n this._popoverService.refreshPosition();\n }\n\n /** @hidden */\n private _cleanUpMenuAfterClose(): void {\n this._menuService.resetMenuState();\n }\n\n /** @hidden Select and instantiate menu view mode */\n private _setupView(): void {\n if (this.mobile) {\n this._setupMobileMode();\n } else {\n this._setupPopoverService();\n }\n this._changeDetectorRef.detectChanges();\n }\n\n /** @hidden */\n private _setupPopoverService(): void {\n this._subscriptions.add(\n this._popoverService._onLoad.subscribe((elementRef) => this._manageKeyboardSupport(elementRef))\n );\n\n this._popoverService.templateContent = this.menuRootTemplate;\n this._popoverService.initialise(this._externalTrigger, this);\n }\n\n /** @hidden */\n private _manageKeyboardSupport(elementRef: ElementRef): void {\n this._menuService.addKeyboardSupport(elementRef);\n }\n\n /** @hidden Open Menu in mobile mode */\n private async _setupMobileMode(): Promise<void> {\n const injector = Injector.create({\n providers: [{ provide: MENU_COMPONENT, useValue: this }],\n parent: this._injector\n });\n\n this._mobileModeComponentRef = await this._dynamicComponentService.createDynamicModule(\n this.menuRootTemplate,\n MenuMobileModule,\n MenuMobileComponent,\n this._viewContainerRef,\n injector\n );\n\n this._listenOnTriggerRefClicks();\n }\n\n /** @hidden Listen on menu items change and rebuild menu */\n private _listenOnMenuItemsChange(): void {\n this._subscriptions.add(this.menuItems.changes.subscribe(() => this._menuService.rebuildMenu()));\n this.menuItems.forEach((m) => {\n if (m.submenu && m.submenu.menuItems) {\n this._subscriptions.add(m.submenu.menuItems.changes.subscribe(() => this._menuService.rebuildMenu()));\n }\n });\n }\n\n /**\n * @hidden\n * This is going to be removed in feature, on dialog and dynamic service component refactor\n */\n private _listenOnTriggerRefClicks(): void {\n this._destroyEventListeners();\n if (this.trigger && this.mobile) {\n this._clickEventListener = this._rendered.listen(this.trigger.nativeElement, 'click', () => this.toggle());\n }\n }\n\n /**\n * @hidden\n * This is going to be removed in feature, on dialog and dynamic service component refactor\n */\n private _destroyEventListeners(): void {\n if (this._clickEventListener) {\n this._clickEventListener();\n this._clickEventListener = null;\n }\n }\n\n /** @hidden */\n private _destroyMobileComponent(): void {\n if (this._mobileModeComponentRef) {\n this._mobileModeComponentRef.destroy();\n }\n }\n\n /** @hidden */\n private _focusTrigger(): void {\n if (this.focusTrapped && this.trigger) {\n this.trigger.nativeElement.focus();\n }\n }\n}\n","<ng-container #viewContainer></ng-container>\n\n<ng-template #menuRootTemplate>\n <nav\n class=\"fd-menu\"\n fdInitialFocus\n [enabled]=\"focusTrapped\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-label]=\"ariaLabel\"\n role=\"menu\"\n [class.fd-menu--compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-menu--mobile]=\"mobile\"\n >\n <ul role=\"none\" class=\"fd-menu__list fd-menu__list--no-shadow\">\n <ng-content></ng-content>\n </ul>\n </nav>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MenuComponent } from './menu.component';\nimport { MenuTitleDirective } from './directives/menu-title.directive';\nimport { MenuInteractiveDirective } from './directives/menu-interactive.directive';\nimport { MenuSeparatorComponent } from './menu-separator/menu-separator.component';\nimport { MenuAddonDirective } from './directives/menu-addon.directive';\nimport { MenuItemComponent, SubmenuComponent } from './menu-item/menu-item.component';\nimport { MenuShortcutDirective } from './directives/menu-shortcut.directive';\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\nimport { MenuTriggerDirective } from './directives/menu-trigger.directive';\nimport { IconModule } from '@fundamental-ngx/core/icon';\nimport { InitialFocusModule } from '@fundamental-ngx/core/utils';\nimport { DeprecatedMenuCompactDirective } from './directives/deprecated-menu-compact.directive';\nimport { ContentDensityModule } from '@fundamental-ngx/core/content-density';\n\n@NgModule({\n imports: [CommonModule, PopoverModule, IconModule, InitialFocusModule, ContentDensityModule],\n declarations: [\n MenuComponent,\n MenuItemComponent,\n MenuAddonDirective,\n MenuSeparatorComponent,\n MenuShortcutDirective,\n MenuInteractiveDirective,\n MenuTitleDirective,\n SubmenuComponent,\n MenuTriggerDirective,\n DeprecatedMenuCompactDirective\n ],\n exports: [\n MenuComponent,\n MenuItemComponent,\n SubmenuComponent,\n MenuSeparatorComponent,\n MenuShortcutDirective,\n MenuInteractiveDirective,\n MenuTitleDirective,\n MenuAddonDirective,\n MenuTriggerDirective,\n DeprecatedMenuCompactDirective,\n ContentDensityModule\n ]\n})\nexport class MenuModule {}\n","export abstract class DefaultMenuItem {\n abstract focus(): void;\n abstract click(): void;\n}\n","import { Subject } from 'rxjs';\nimport { Injectable, Output } from '@angular/core';\nimport { DefaultMenuItem } from './default-menu-item.class';\nimport { ListItemComponent } from '@fundamental-ngx/core/list';\nimport { KeyUtil } from '@fundamental-ngx/core/utils';\nimport { DOWN_ARROW, ENTER, SPACE, UP_ARROW } from '@angular/cdk/keycodes';\n\n@Injectable()\nexport class MenuKeyboardService {\n /** Event emitted when an item link is clicked.*/\n @Output()\n public readonly itemClicked: Subject<number> = new Subject<number>();\n\n /** Whether user wants to remove keyboard handling */\n disableKeydownHandling = false;\n\n /** Function that is supposed to be called, when focus escape before list */\n focusEscapeBeforeList: () => void;\n\n /** Function that is supposed to be called, when focus escape after list */\n focusEscapeAfterList: () => void;\n\n /** Function that should be called every time, keydown event is used on some menu item,\n * it provides whole functionality for handling\n * ArrowDown - focus, ArrowUp - focus, Space bar - simulate click, Enter key - simulate click.\n * @param event KeyboardEvent\n * @param index index of items starts from 0\n * @param menuItems array of menu item directives\n * */\n keyDownHandler(event: KeyboardEvent, index: number, menuItems: DefaultMenuItem[] | ListItemComponent[]): void {\n if (this.disableKeydownHandling) {\n return;\n }\n\n if (KeyUtil.isKeyCode(event, DOWN_ARROW)) {\n if (menuItems.length > index + 1) {\n menuItems[index + 1].focus();\n } else {\n if (this.focusEscapeAfterList) {\n this.focusEscapeAfterList();\n } else {\n menuItems[0].focus();\n }\n }\n event.preventDefault();\n } else if (KeyUtil.isKeyCode(event, UP_ARROW)) {\n if (index > 0) {\n menuItems[index - 1].focus();\n } else {\n if (this.focusEscapeBeforeList) {\n this.focusEscapeBeforeList();\n } else {\n menuItems[menuItems.length - 1].focus();\n }\n }\n event.preventDefault();\n } else if (KeyUtil.isKeyCode(event, [SPACE, ENTER])) {\n if (menuItems[index]) {\n menuItems[index].click();\n event.preventDefault();\n }\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["menuUniqueId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;;;MAOa,kBAAkB;;IAY3B,YAAoB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;;QAT3C,qBAAgB,GAAG,IAAI,CAAC;KASuB;;IAN/C,IACI,KAAK;QACL,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC;KACrD;;+GATQ,kBAAkB;mGAAlB,kBAAkB;2FAAlB,kBAAkB;kBAJ9B,SAAS;mBAAC;;oBAEP,QAAQ,EAAE,iBAAiB;iBAC9B;iGAIG,gBAAgB;sBADf,WAAW;uBAAC,sBAAsB;gBAK/B,KAAK;sBADR,WAAW;uBAAC,YAAY;;;MCNhB,wBAAwB;;IA8BjC,YAAmB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;;QA3BzC,aAAQ,GAAG,CAAC,CAAC;;QAIb,aAAQ,GAAG,KAAK,CAAC;;QASjB,aAAQ,GAAG,KAAK,CAAC;;QAIjB,iBAAY,GAAG,KAAK,CAAC;;QAIZ,oBAAe,GAAY,IAAI,CAAC;;QAGzC,qBAAgB,GAAG,KAAK,CAAC;KAGoB;;IAG7C,WAAW,CAAC,UAAmB;QAC3B,IAAI,CAAC,QAAQ,GAAG,UAAU,KAAK,IAAI,CAAC,YAAY,IAAI,I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qBAAM;oBACH,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;iBAC3C;aACJ;YACD,KAAK,CAAC,cAAc,EAAE,CAAC;SAC1B;aAAM,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE;YACjD,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;gBAClB,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;gBACzB,KAAK,CAAC,cAAc,EAAE,CAAC;aAC1B;SACJ;KACJ;;gHAtDQ,mBAAmB;oHAAnB,mBAAmB;2FAAnB,mBAAmB;kBAD/B,UAAU;8BAIS,WAAW;sBAD1B,MAAM;;;ACVX;;;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-menu.mjs","sources":["../../../../../libs/core/src/lib/menu/directives/menu-title.directive.ts","../../../../../libs/core/src/lib/menu/directives/menu-interactive.directive.ts","../../../../../libs/core/src/lib/menu/services/menu.service.ts","../../../../../libs/core/src/lib/menu/menu-item/menu-item.component.ts","../../../../../libs/core/src/lib/menu/menu-item/menu-item.component.html","../../../../../libs/core/src/lib/menu/directives/menu-shortcut.directive.ts","../../../../../libs/core/src/lib/menu/directives/menu-trigger.directive.ts","../../../../../libs/core/src/lib/menu/directives/menu-addon.directive.ts","../../../../../libs/core/src/lib/menu/directives/deprecated-menu-compact.directive.ts","../../../../../libs/core/src/lib/menu/menu-separator/menu-separator.component.ts","../../../../../libs/core/src/lib/menu/menu.interface.ts","../../../../../libs/core/src/lib/menu/menu-mobile/menu-mobile.component.ts","../../../../../libs/core/src/lib/menu/menu-mobile/menu-mobile.component.html","../../../../../libs/core/src/lib/menu/menu-mobile/menu-mobile.module.ts","../../../../../libs/core/src/lib/menu/menu.component.ts","../../../../../libs/core/src/lib/menu/menu.component.html","../../../../../libs/core/src/lib/menu/menu.module.ts","../../../../../libs/core/src/lib/menu/default-menu-item.class.ts","../../../../../libs/core/src/lib/menu/menu-keyboard.service.ts","../../../../../libs/core/src/lib/menu/fundamental-ngx-core-menu.ts"],"sourcesContent":["import { Directive, ElementRef, HostBinding } from '@angular/core';\n\n/**\n * The directive that represents the menu title.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-menu-title]'\n})\nexport class MenuTitleDirective {\n /** @hidden */\n @HostBinding('class.fd-menu__title')\n fdMenuTitleClass = true;\n\n /** Returns element title text */\n @HostBinding('attr.title')\n get title(): string {\n return this._elementRef.nativeElement.textContent;\n }\n\n /** @hidden */\n constructor(private _elementRef: ElementRef) {}\n}\n","import { Directive, ElementRef, HostBinding } from '@angular/core';\nimport { Nullable } from '@fundamental-ngx/core/shared';\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-menu-interactive]',\n host: {\n role: 'menuitem'\n }\n})\nexport class MenuInteractiveDirective {\n /** @hidden */\n @HostBinding('attr.tabindex')\n tabindex = 0;\n\n /** @hidden */\n @HostBinding('class.is-disabled')\n disabled = false;\n\n /** @hidden */\n @HostBinding('attr.aria-controls')\n ariaControls: Nullable<string>;\n\n /** @hidden */\n @HostBinding('class.is-selected')\n @HostBinding('attr.aria-expanded')\n selected = false;\n\n /** @hidden */\n @HostBinding('attr.aria-haspopup')\n ariaHaspopup = false;\n\n /** @hidden */\n @HostBinding('class.fd-menu__link')\n readonly fdMenuLinkClass: boolean = true;\n\n /** @hidden */\n _fromSplitButton = false;\n\n /** @hidden */\n constructor(public elementRef: ElementRef) {}\n\n /** @hidden */\n setSelected(isSelected: boolean): void {\n this.selected = isSelected && (this.ariaHaspopup || this._fromSplitButton);\n }\n\n /** @hidden */\n setDisabled(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.tabindex = isDisabled ? -1 : 0;\n }\n\n /** @hidden */\n setSubmenu(hasSubmenu: boolean, itemId?: string): void {\n this.ariaHaspopup = hasSubmenu;\n this.ariaControls = hasSubmenu ? itemId || this.ariaControls : null;\n }\n}\n","import { ElementRef, Injectable, Optional, Renderer2 } from '@angular/core';\nimport { MenuItemComponent } from '../menu-item/menu-item.component';\nimport { MenuComponent } from '../menu.component';\nimport { KeyUtil, RtlService } from '@fundamental-ngx/core/utils';\nimport { Observable, Subject } from 'rxjs';\nimport { distinctUntilChanged } from 'rxjs/operators';\nimport { DOWN_ARROW, ENTER, ESCAPE, LEFT_ARROW, RIGHT_ARROW, SPACE, UP_ARROW } from '@angular/cdk/keycodes';\n\ninterface MenuNode {\n item: MenuItemComponent | null;\n parent: MenuNode | null;\n children: MenuNode[];\n}\n\n/** `null` key is used for the root node */\ntype MenuMap = Map<MenuItemComponent | null, MenuNode>;\n\n@Injectable()\nexport class MenuService {\n /** Map of menu items to menu nodes */\n menuMap: MenuMap;\n\n /** Currently focused node */\n focusedNode: MenuNode | undefined;\n\n /** Collection of active menu nodes */\n activeNodePath: MenuNode[] = [];\n\n /** Collection of active menu nodes */\n private _isMobileMode = new Subject<boolean>();\n\n /** @hidden */\n private _menuComponent: MenuComponent;\n\n /** @hidden */\n private _destroyKeyboardHandlerListener: () => void;\n\n /** @hidden */\n get _isRtl(): boolean {\n return this._rtlService?.rtl.value;\n }\n\n constructor(private _renderer: Renderer2, @Optional() private readonly _rtlService: RtlService) {}\n\n /** Reference to menu component */\n get menuComponent(): MenuComponent {\n return this._menuComponent;\n }\n\n /** Returns menu mode observable */\n get isMobileMode(): Observable<boolean> {\n return this._isMobileMode.pipe(distinctUntilChanged());\n }\n\n /** Sets menu mode */\n setMenuMode(value: boolean): void {\n this._isMobileMode.next(value);\n }\n\n /** Sets given menu item as focused */\n setFocused(menuItem: MenuItemComponent | null): void {\n this.focusedNode = this.menuMap.get(menuItem);\n this.focusedNode?.item?.focus();\n }\n\n /**\n * Sets state of a given menu item\n * @param isActive - Whether should be set as active or inactive\n * @param menuItem `MenuItemComponent` that should be set as active or inactive\n */\n setActive(isActive: boolean, menuItem: MenuItemComponent | null): void {\n if (!menuItem || (isActive && menuItem.disabled)) {\n return;\n }\n\n if (isActive) {\n this._addToActivePath(menuItem);\n } else {\n this._removeFromActivePath(menuItem);\n }\n\n this._emitActivePath();\n }\n\n /**\n * Close active sibling submenu if any\n * @param menuItem to look for active siblings\n */\n setInactiveSiblingMenuItem(menuItem: MenuItemComponent): void {\n this._removeActiveSibling(menuItem);\n this._emitActivePath();\n }\n\n /** Initializes menu service based on given Menu Component */\n setMenuComponent(menu: MenuComponent): void {\n this._menuComponent = menu;\n this.menuMap = this._buildMenuMap(this._menuComponent);\n }\n\n /** Clears Active Node Path and resets Focused Node */\n resetMenuState(): void {\n this._clearActivePath();\n this.focusedNode = undefined;\n this._emitActivePath();\n }\n\n /** - Updates the structure of the menu\n * - Validates Active Node Path\n * - Validates Focused Node */\n rebuildMenu(): void {\n this.menuMap = this._buildMenuMap(this._menuComponent);\n\n const deadNode = this.activeNodePath.find((node) => !this.menuMap.has(node.item));\n if (deadNode?.item) {\n this.setActive(false, deadNode.item);\n }\n\n const invalidFocusedElement = this.focusedNode && !this.menuMap.get(this.focusedNode.item);\n if (invalidFocusedElement) {\n this.focusedNode =\n this.activeNodePath[this.activeNodePath.length - 1] || this.menuMap.get(null)!.children[0];\n }\n }\n\n /** Adds Menu keyboard support */\n addKeyboardSupport(elementRef: ElementRef): void {\n this.removeKeyboardSupport();\n this._setKeyboardSupport(elementRef);\n }\n\n /** Removes Menu keyboard support */\n removeKeyboardSupport(): void {\n if (this._destroyKeyboardHandlerListener) {\n this._destroyKeyboardHandlerListener();\n }\n }\n\n onDestroy(): void {\n this.removeKeyboardSupport();\n }\n\n /** @hidden Returns siblings of given node */\n private _nodeSiblings(node: MenuNode): MenuNode[] | undefined {\n return node.parent ? node.parent.children : this.menuMap.get(null)?.children;\n }\n\n /** @hidden Adds given element to the Active Node Path and setts as active*/\n private _addToActivePath(menuItem: MenuItemComponent): void {\n const menuNode = this.menuMap.get(menuItem);\n\n this._removeActiveSibling(menuItem);\n\n if (menuNode) {\n this.activeNodePath.push(menuNode);\n menuNode.item?.setSelected(true);\n }\n }\n\n /** @hidden Removes given element and all its successors from the Active Node Path and setts as inactive*/\n private _removeFromActivePath(menuItem: MenuItemComponent | null): void {\n const menuNode = this.menuMap.get(menuItem);\n if (menuNode) {\n const pathIndex = this.activeNodePath.findIndex((i) => i.item === menuNode.item);\n\n if (pathIndex !== -1) {\n this.activeNodePath\n .splice(pathIndex)\n .forEach((removedActiveNode) => removedActiveNode.item?.setSelected(false));\n }\n }\n }\n\n /** @hidden Removes all elements from the Active Node Path and sets them as closed */\n private _clearActivePath(): void {\n if (this.activeNodePath.length) {\n this._removeFromActivePath(this.activeNodePath[0].item);\n }\n }\n\n /** @hidden\n * - Builds Menu Nodes based on Menu Items\n * - Creates Map of the Menu Nodes */\n private _buildMenuMap(menu: MenuComponent): MenuMap {\n function buildNode(menuItem: MenuItemComponent): MenuNode {\n return {\n item: menuItem,\n parent: null,\n children: menuItem.submenu\n ? menuItem.submenu.menuItems.map((subMenuItem) => buildNode(subMenuItem))\n : []\n };\n }\n\n function setParents(node: MenuNode, parent: MenuNode | null): void {\n node.parent = parent;\n node.children.forEach((childNode) => setParents(childNode, node));\n }\n\n function toMap(node: MenuNode, map = new Map() as MenuMap): MenuMap {\n map.set(node.item, node);\n node.children.forEach((childNode) => toMap(childNode, map));\n return map;\n }\n\n const rootItems = menu._menuItems.filter((rootItem) => !rootItem.parentSubmenu);\n\n /** root item */\n const menuTree: MenuNode = {\n item: null,\n parent: null,\n children: rootItems.map((item) => buildNode(item))\n };\n\n setParents(menuTree, null);\n\n return toMap(menuTree);\n }\n\n /** @hidden Removes active sibling of a given menu item from the Active Path */\n private _removeActiveSibling(menuItem: MenuItemComponent): void {\n const menuNode = this.menuMap.get(menuItem);\n const children = menuNode?.parent?.children.map((i) => i.item);\n const activeSibling = this.activeNodePath.find((i) => children?.includes(i.item));\n\n if (activeSibling) {\n const activeParentIndex = this.activeNodePath.indexOf(menuNode?.parent as MenuNode);\n this._removeFromActivePath(activeParentIndex !== -1 ? activeSibling.item : this.activeNodePath[0].item);\n }\n }\n\n /** @hidden Adds keyboard support */\n private _setKeyboardSupport(elementRef: ElementRef): void {\n this._destroyKeyboardHandlerListener = this._renderer.listen(\n elementRef.nativeElement,\n 'keydown',\n (event: KeyboardEvent) => this._handleKey(event)\n );\n }\n\n private _handleKey(event: KeyboardEvent): void {\n const focusRight = (node): void => {\n setTimeout(() => this.setFocused(node.children[0].item));\n };\n let matched = true;\n\n if (!this.focusedNode) {\n return;\n }\n\n if (\n (KeyUtil.isKeyCode(event, RIGHT_ARROW) && !this._isRtl) ||\n (KeyUtil.isKeyCode(event, LEFT_ARROW) && this._isRtl)\n ) {\n if (this.focusedNode?.children.length) {\n this.setActive(true, this.focusedNode.item);\n focusRight(this.focusedNode);\n }\n } else if (\n (KeyUtil.isKeyCode(event, LEFT_ARROW) && !this._isRtl) ||\n (KeyUtil.isKeyCode(event, RIGHT_ARROW) && this._isRtl)\n ) {\n if (this.focusedNode.parent?.item) {\n this.setActive(false, this.focusedNode.parent.item);\n this.setFocused(this.focusedNode.parent.item);\n }\n } else if (KeyUtil.isKeyCode(event, DOWN_ARROW)) {\n const closest = this._closestEnabled(this.focusedNode, 'down');\n if (closest) {\n this.setFocused(closest.item);\n }\n } else if (KeyUtil.isKeyCode(event, UP_ARROW)) {\n const closest = this._closestEnabled(this.focusedNode, 'up');\n if (closest) {\n this.setFocused(closest.item);\n }\n } else if (KeyUtil.isKeyCode(event, [SPACE, ENTER])) {\n const focusedNode = this.focusedNode;\n this.setActive(true, focusedNode?.item);\n focusedNode.item?.click();\n if (focusedNode.children.length) {\n focusRight(focusedNode);\n }\n } else if (KeyUtil.isKeyCode(event, ESCAPE) && this.menuComponent.closeOnEscapeKey) {\n this.menuComponent.close();\n } else {\n matched = false;\n }\n\n if (matched) {\n event.preventDefault();\n }\n }\n\n /** @hidden Emits an array of active menu items */\n private _emitActivePath(): void {\n this.menuComponent.activePath.emit(this.activeNodePath.map((node) => node.item) as MenuItemComponent[]);\n }\n\n /** @hidden Depending on direction returns closest enabled sibling of given node */\n private _closestEnabled(node: MenuNode, direction: 'up' | 'down'): MenuNode | null {\n const siblings =\n direction === 'up' ? [...(this._nodeSiblings(node) ?? [])].reverse() : this._nodeSiblings(node);\n\n if (siblings) {\n const startIndex = siblings.indexOf(node) + 1;\n\n for (let i = startIndex; i < siblings.length; i++) {\n if (siblings[i].item && !siblings[i].item!.disabled) {\n return siblings[i];\n }\n }\n }\n\n return null;\n }\n}\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { defer, fromEvent, Observable, Subject, Subscription, timer } from 'rxjs';\nimport { filter, switchMap, takeUntil } from 'rxjs/operators';\n\nimport { MenuTitleDirective } from '../directives/menu-title.directive';\nimport { DefaultMenuItem } from '../default-menu-item.class';\nimport { MenuInteractiveDirective } from '../directives/menu-interactive.directive';\nimport { MenuService } from '../services/menu.service';\nimport { Nullable } from '@fundamental-ngx/core/shared';\n\nlet menuUniqueId = 0;\n\nexport interface BaseSubmenu {\n templateRef: TemplateRef<any>;\n menuItems: MenuItemComponent[];\n menuService: MenuService;\n ariaLabel: Nullable<string>;\n ariaLabelledby: Nullable<string>;\n _menuItemsChange$: Observable<void>;\n _registerItem(item: MenuItemComponent): void;\n _unregisterItem(item: MenuItemComponent): void;\n}\n\nexport const SUBMENU = new InjectionToken<BaseSubmenu>('Submenu component dependency');\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'li[fd-menu-item]',\n exportAs: 'fd-menu-item',\n templateUrl: './menu-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'attr.role': 'menuitem',\n '[class.fd-menu__item]': 'true'\n }\n})\nexport class MenuItemComponent implements DefaultMenuItem, OnInit, OnChanges, AfterContentInit, OnDestroy {\n /** Set the Menu Item as disabled/enabled */\n @Input()\n disabled = false;\n\n /** Menu Item id attribute value */\n @Input()\n itemId = `fd-menu-item-${menuUniqueId++}`;\n\n /** Reference to sub-menu component */\n @Input()\n submenu: BaseSubmenu | undefined;\n\n /** Reference to the parent submenu if nested menus created dynamically */\n @Input()\n parentSubmenu: BaseSubmenu | undefined;\n\n /** Emitted when the menu item is selected. */\n @Output()\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n onSelect: EventEmitter<void> = new EventEmitter<void>();\n\n /** @hidden Reference to the Menu Item title */\n @ContentChild(MenuTitleDirective)\n menuItemTitle: MenuTitleDirective;\n\n /** @hidden Reference to the Menu Item interactive element */\n @ContentChild(MenuInteractiveDirective)\n menuInteractive: MenuInteractiveDirective;\n\n /** @hidden Whether sub-menu is currently visible*/\n submenuVisible = false;\n\n /** @hidden */\n private _subscriptions: Subscription = new Subscription();\n\n /** @hidden */\n private _hoverSubscriptions: Subscription = new Subscription();\n\n /** @hidden */\n constructor(\n public elementRef: ElementRef,\n @Optional() public menuService: MenuService | null,\n private _changeDetectorRef: ChangeDetectorRef,\n @Optional() @Inject(SUBMENU) private _submenu: BaseSubmenu | null\n ) {}\n\n /** @hidden */\n ngOnInit(): void {\n if (this.parentSubmenu) {\n this._submenu = this.parentSubmenu;\n this._submenu._registerItem(this);\n }\n }\n\n /** @hidden */\n ngAfterContentInit(): void {\n this._setMenuService();\n this._initialiseItemState();\n this._listenOnMenuLinkClick();\n this._listenOnOuterFocus();\n this._listenOnMenuMode();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['disabled'] && !changes['disabled'].firstChange) {\n this.menuInteractive.setDisabled(this.disabled);\n }\n if (changes['submenu'] && !changes['submenu'].firstChange) {\n this.menuInteractive.setSubmenu(!!this.submenu, this.submenu ? this.itemId : undefined);\n }\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n if (this.parentSubmenu) {\n this._submenu?._unregisterItem(this);\n }\n\n this._subscriptions.unsubscribe();\n this._hoverSubscriptions.unsubscribe();\n }\n\n /** Whether menu item has popup (desktop mode) */\n get hasPopup(): boolean {\n return !!this.submenu && (!this.menuService?.menuComponent || !this.menuService?.menuComponent.mobile);\n }\n\n /** Focuses Menu Item interactive element */\n focus(): void {\n if (this.menuInteractive) {\n this.menuInteractive.elementRef.nativeElement.focus();\n }\n }\n\n /** Clicks Menu Item interactive element */\n click(): void {\n if (this.menuInteractive) {\n this.menuInteractive.elementRef.nativeElement.click();\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /** @hidden Sets menu item as selected/unselected based on isSelected flag */\n setSelected(isSelected: boolean, fromSplit?: boolean): void {\n this.menuInteractive.setSelected(isSelected);\n this.submenuVisible = isSelected && !!this.submenu;\n if (!fromSplit) {\n this.onSelect.emit();\n }\n this._changeDetectorRef.markForCheck();\n }\n\n /** @hidden Creates click listener on menu item interactive element */\n private _listenOnMenuLinkClick(): void {\n this._subscriptions.add(\n fromEvent(this.menuInteractive.elementRef.nativeElement, 'click').subscribe(() =>\n this.menuService?.setActive(true, this)\n )\n );\n }\n\n /** @hidden Creates hover listeners for activating/deactivating menu item */\n private _listenOnMenuLinkHover(): Subscription {\n const hoverSubscriptions: Subscription = new Subscription();\n\n const mouseEnter$: Observable<MouseEvent> = fromEvent(\n this.menuInteractive.elementRef.nativeElement,\n 'mouseenter'\n );\n const mouseLeave$: Observable<MouseEvent> = fromEvent(\n this.menuInteractive.elementRef.nativeElement,\n 'mouseleave'\n );\n\n const timerFactory$ = defer(() =>\n timer(this.menuService ? this.menuService.menuComponent.openOnHoverTime : 0).pipe(takeUntil(mouseLeave$))\n );\n\n // Set active on hover\n hoverSubscriptions.add(\n mouseEnter$\n .pipe(\n filter(() => !!this.menuService),\n switchMap(() => timerFactory$)\n )\n .subscribe(() => {\n if (this.submenu) {\n // Open submenu\n this.menuService!.setActive(true, this);\n }\n if (!this.submenu) {\n // Close sibling submenu if opened\n this.menuService!.setInactiveSiblingMenuItem(this);\n }\n })\n );\n\n return hoverSubscriptions;\n }\n\n /** @hidden Initializes menu link state based on item initial state */\n private _initialiseItemState(): void {\n this.menuInteractive.setSubmenu(!!this.submenu, this.itemId);\n this.menuInteractive.setDisabled(this.disabled);\n }\n\n /** @hidden Checks for Menu Service dependency and passes it if further */\n private _setMenuService(): void {\n this.menuService = this.menuService || this._submenu?.menuService || null;\n if (this.submenu && this.menuService) {\n this.submenu.menuService = this.menuService;\n }\n }\n\n /** @hidden Listen on menu mode and set proper mode listeners */\n private _listenOnMenuMode(): void {\n this.menuService?.isMobileMode.subscribe((isMobile) => {\n this._hoverSubscriptions.unsubscribe();\n if (!isMobile) {\n this._hoverSubscriptions = this._listenOnMenuLinkHover();\n }\n });\n }\n\n /** @hidden Updates focused menu item on outer focus */\n private _listenOnOuterFocus(): void {\n this._subscriptions.add(\n fromEvent(this.menuInteractive.elementRef.nativeElement, 'focus').subscribe(() => {\n if (this.menuService && this.menuService.focusedNode !== this.menuService.menuMap.get(this)) {\n this.menuService.setFocused(this);\n }\n })\n );\n }\n}\n\n@Component({\n selector: 'fd-submenu',\n template: `\n <ng-template>\n <ng-content></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: SUBMENU, useExisting: SubmenuComponent }],\n exportAs: 'fdSubmenu'\n})\nexport class SubmenuComponent implements BaseSubmenu, AfterContentInit {\n /** Aria-label for navigation */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** Aria-Labelledby for element describing navigation */\n @Input()\n ariaLabelledby: Nullable<string>;\n\n /** @hidden Reference to template with Submenu items */\n @ViewChild(TemplateRef) templateRef: TemplateRef<any>;\n\n /** @hidden Reference to Submenu MenuItems */\n @ContentChildren(MenuItemComponent)\n _projectedItems: QueryList<MenuItemComponent>;\n\n /** @hidden */\n _registeredItems: MenuItemComponent[] = [];\n\n /** @hidden Reference to MenuService used by MenuItems */\n menuService: MenuService;\n\n /** @hidden */\n _menuItemsChange$ = new Subject<void>();\n\n /** @hidden */\n get menuItems(): MenuItemComponent[] {\n return this._projectedItems.length ? this._projectedItems.toArray() : this._registeredItems;\n }\n\n /** @hidden */\n ngAfterContentInit(): void {\n this._projectedItems.changes.subscribe(() => this._menuItemsChange$.next());\n }\n\n /** @hidden method for manually registering item when it's not visible for @ContentChildren */\n _registerItem(item: MenuItemComponent): void {\n this._registeredItems.push(item);\n this._menuItemsChange$.next();\n }\n\n /** @hidden method for manually unregistering item when it's not visible for @ContentChildren */\n _unregisterItem(item: MenuItemComponent): void {\n this._registeredItems = this._registeredItems.filter((i) => i !== item);\n this._menuItemsChange$.next();\n }\n}\n","<ng-content></ng-content>\n\n<ng-container *ngIf=\"hasPopup && submenu\">\n <ul\n class=\"fd-menu__sublist\"\n role=\"menu\"\n [attr.id]=\"itemId\"\n [attr.aria-hidden]=\"!submenuVisible\"\n [attr.aria-label]=\"submenu.ariaLabel\"\n [attr.aria-labelledby]=\"submenu.ariaLabelledby\"\n >\n <ng-container *ngTemplateOutlet=\"submenu.templateRef\"></ng-container>\n </ul>\n</ng-container>\n","import { AfterViewInit, Directive, ElementRef, HostBinding, Input, OnDestroy } from '@angular/core';\nimport { MenuItemComponent } from '../menu-item/menu-item.component';\nimport { Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[fd-menu-shortcut]'\n})\nexport class MenuShortcutDirective implements AfterViewInit, OnDestroy {\n /** Hide shortcuts in mobile mode */\n @Input()\n hideOnMobile = true;\n\n /** @hidden */\n @HostBinding('class.fd-menu__shortcut')\n readonly fdMenuShortcutClass: boolean = true;\n\n /** @hidden */\n private _subscriptions: Subscription = new Subscription();\n\n /** @hidden */\n constructor(private _menuItem: MenuItemComponent, private _elementRef: ElementRef) {}\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._hideOnMobile();\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** @hidden */\n private _hideOnMobile(): void {\n this._subscriptions.add(\n this._menuItem.menuService?.isMobileMode.pipe(filter(() => this.hideOnMobile)).subscribe((isMobile) => {\n if (isMobile) {\n this._elementRef.nativeElement.style.display = 'none';\n } else {\n this._elementRef.nativeElement.style.display = null;\n }\n })\n );\n }\n}\n","import { Directive, ElementRef, HostBinding, Input, OnDestroy } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { Nullable } from '@fundamental-ngx/core/shared';\n\nimport { MenuComponent } from '../menu.component';\n\n@Directive({\n selector: '[fdMenuTrigger]'\n})\nexport class MenuTriggerDirective implements OnDestroy {\n /** Set reference to Menu Component */\n @Input('fdMenuTrigger')\n set menu(menu: MenuComponent | undefined) {\n this._unsubscribeFromMenu();\n\n if (menu) {\n menu.trigger = this._elementRef;\n this._subscribeToMenu(menu);\n }\n\n this._setAriaAttributes(menu);\n }\n\n @HostBinding('attr.aria-haspopup')\n ariaHasPopup: Nullable<boolean>;\n\n @HostBinding('attr.aria-controls')\n ariaControls: Nullable<string>;\n\n @HostBinding('attr.aria-expanded')\n ariaExpanded: Nullable<boolean>;\n\n /** @hidden */\n private _menuSubscription: Subscription = new Subscription();\n\n /** @hidden */\n constructor(private _elementRef: ElementRef) {}\n\n /** @hidden */\n ngOnDestroy(): void {\n this._unsubscribeFromMenu();\n }\n\n /** @hidden */\n private _subscribeToMenu(menu: MenuComponent): void {\n this._menuSubscription.add(\n menu.isOpenChange.subscribe(() => {\n this._setAriaAttributes(menu);\n })\n );\n }\n\n /** @hidden */\n private _unsubscribeFromMenu(): void {\n this._menuSubscription.unsubscribe();\n this._menuSubscription = new Subscription();\n }\n\n /** @hidden */\n private _setAriaAttributes(menu?: MenuComponent): void {\n this.ariaHasPopup = !!menu;\n this.ariaExpanded = menu?.isOpen;\n this.ariaControls = menu?.isOpen ? menu.id : null;\n }\n}\n","import { Component, HostBinding, Input } from '@angular/core';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'fd-menu-addon',\n template: `\n <fd-icon [glyph]=\"glyph\" *ngIf=\"glyph\" role=\"presentation\"></fd-icon>\n <ng-content></ng-content>\n `\n})\n// eslint-disable-next-line @angular-eslint/component-class-suffix\nexport class MenuAddonDirective {\n /** Whether addon is used before or after text */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('position') set setAddonPosition(position: 'before' | 'after') {\n this.fdAddonBeforeClass = position === 'before';\n this.fdAddonAfterClass = position === 'after';\n }\n\n /** The icon name to display. See the icon page for the list of icons\n * here: https://sap.github.io/fundamental-ngx/icon\n * */\n @Input()\n glyph: string;\n\n /** Whether is used as submenu indicator */\n @Input()\n @HostBinding('class.fd-menu__addon-after--submenu')\n submenuIndicator = false;\n\n /** Sets Aria hidden attribute */\n @Input()\n @HostBinding('attr.aria-hidden')\n ariaHidden = true;\n\n /** @hidden */\n @HostBinding('class.fd-menu__addon-after')\n fdAddonAfterClass = true;\n\n /** @hidden */\n @HostBinding('class.fd-menu__addon-before')\n fdAddonBeforeClass = false;\n}\n","import { Directive, forwardRef } from '@angular/core';\nimport { CONTENT_DENSITY_DIRECTIVE, DeprecatedCompactDirective } from '@fundamental-ngx/core/content-density';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-menu[compact]',\n providers: [\n {\n provide: CONTENT_DENSITY_DIRECTIVE,\n useExisting: forwardRef(() => DeprecatedMenuCompactDirective)\n }\n ]\n})\nexport class DeprecatedMenuCompactDirective extends DeprecatedCompactDirective {\n constructor() {\n super('fd-menu');\n }\n}\n","import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'fd-menu-separator',\n template: '',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MenuSeparatorComponent {\n /** @hidden */\n @HostBinding('class.fd-menu__separator')\n readonly fdMenuSeparatorClass: boolean = true;\n}\n","import { EventEmitter, InjectionToken } from '@angular/core';\nimport { DialogConfig } from '@fundamental-ngx/core/dialog';\nimport { MenuItemComponent } from './menu-item/menu-item.component';\nimport { MobileMode } from '@fundamental-ngx/core/mobile-mode';\n\nexport const MENU_COMPONENT = new InjectionToken<string[]>('MenuInterface');\n\n/**\n * Menu Interface to have typing and avoid circular dependency between\n * MenuComponent <==> MenuMobileComponent\n */\nexport interface MenuInterface extends MobileMode {\n activePath: EventEmitter<MenuItemComponent[]>;\n dialogConfig: DialogConfig;\n isOpenChange: EventEmitter<boolean>;\n\n close(): void;\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n OnDestroy,\n OnInit,\n Optional,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { DialogService } from '@fundamental-ngx/core/dialog';\nimport { Observable, of } from 'rxjs';\nimport { MenuService } from '../services/menu.service';\nimport { MenuItemComponent } from '../menu-item/menu-item.component';\nimport { map, startWith, takeUntil } from 'rxjs/operators';\nimport { RtlService } from '@fundamental-ngx/core/utils';\nimport { MENU_COMPONENT, MenuInterface } from '../menu.interface';\nimport {\n MOBILE_MODE_CONFIG,\n MobileModeBase,\n MobileModeControl,\n MobileModeConfigToken\n} from '@fundamental-ngx/core/mobile-mode';\n\n@Component({\n selector: 'fd-menu-mobile',\n templateUrl: './menu-mobile.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class MenuMobileComponent extends MobileModeBase<MenuInterface> implements OnInit, OnDestroy {\n /** @hidden */\n @ViewChild('dialogTemplate') dialogTemplate: TemplateRef<any>;\n\n /** Current menu title */\n title: string;\n\n /** Whether current menu level is submenu */\n isSubmenu: boolean;\n\n /** @hidden External content */\n childContent: TemplateRef<any> | undefined = undefined;\n\n /** @hidden Currently rendered menu view */\n view: TemplateRef<any> | undefined;\n\n /** @hidden Navigation icon name based on RTL */\n navigationIcon$: Observable<string>;\n\n constructor(\n elementRef: ElementRef,\n dialogService: DialogService,\n private _menuService: MenuService,\n private _changeDetectorRef: ChangeDetectorRef,\n @Optional() private _rtlService: RtlService,\n @Inject(MENU_COMPONENT) menuComponent: MenuInterface,\n @Optional() @Inject(MOBILE_MODE_CONFIG) mobileModes: MobileModeConfigToken[]\n ) {\n super(elementRef, dialogService, menuComponent, MobileModeControl.MENU, mobileModes);\n }\n\n /** @hidden */\n ngOnInit(): void {\n this._listenOnActivePathChange();\n this._listenOnMenuOpenChange();\n this._listenOnTextDirection();\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n super.onDestroy();\n }\n\n /** Closes the Dialog and Menu component */\n close(): void {\n this.dialogRef.close();\n this._component.close();\n }\n\n /** Navigate back to parent level of submenu */\n backToParentLevel(): void {\n this._menuService.setActive(\n false,\n this._menuService.activeNodePath[this._menuService.activeNodePath.length - 1].item\n );\n }\n\n /** @hidden Opens the Dialog */\n private _openDialog(): void {\n this.dialogRef = this._dialogService.open(this.dialogTemplate, {\n mobile: true,\n verticalPadding: false,\n ...this.dialogConfig,\n escKeyCloseable: false,\n backdropClickCloseable: false,\n container: this._elementRef.nativeElement\n });\n }\n\n /** @hidden Listens on Active Path changes and updates mobile view */\n private _listenOnActivePathChange(): void {\n const initialItemPath: MenuItemComponent[] = this._menuService.activeNodePath\n .map((node) => node.item)\n .filter((v): v is MenuItemComponent => !!v);\n this._component.activePath\n .pipe(takeUntil(this._onDestroy$), startWith(initialItemPath))\n .subscribe((items) => this._setMenuView(items));\n }\n\n /** @hidden Sets menu view, title and isSubmenu flag */\n private _setMenuView(items: MenuItemComponent[]): void {\n const lastItem: MenuItemComponent = items[items.length - 1];\n this.isSubmenu = !!items.length;\n this.title = this._getDialogTitle(lastItem);\n this.view = this._getMenuView(lastItem);\n this._changeDetectorRef.markForCheck();\n }\n\n /** @hidden Opens/closes the Dialog based on Menu isOpenChange events */\n private _listenOnMenuOpenChange(): void {\n this._component.isOpenChange\n .pipe(takeUntil(this._onDestroy$))\n .subscribe((isOpen) => (isOpen ? this._openDialog() : this.dialogRef.close()));\n }\n\n /** @hidden Sets navigation arrow depending on text direction */\n private _listenOnTextDirection(): void {\n this.navigationIcon$ = this._rtlService\n ? this._rtlService.rtl.pipe(map((isRtl) => (isRtl ? 'navigation-right-arrow' : 'navigation-left-arrow')))\n : of('navigation-left-arrow');\n }\n\n /** @hidden Returns dialog title */\n private _getDialogTitle(menuItem: MenuItemComponent): string {\n if (this.isSubmenu) {\n return menuItem.menuItemTitle ? menuItem.menuItemTitle.title : '';\n }\n\n return this.mobileConfig.title || '';\n }\n\n /** @hidden Returns dialog content view */\n private _getMenuView(menuItem: MenuItemComponent): TemplateRef<any> | undefined {\n if (this.isSubmenu) {\n return menuItem.submenu ? menuItem.submenu.templateRef : this.view;\n }\n return this.childContent;\n }\n}\n","<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #dialogTemplate>\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\n <fd-dialog-header>\n <ng-template fdTemplate=\"header\">\n <div fd-bar-left>\n <fd-bar-element *ngIf=\"isSubmenu\">\n <button\n fd-button\n fdType=\"transparent\"\n id=\"menu-mobile-navigate-back\"\n fdCozy\n [attr.aria-label]=\"'Go to previous menu level: ' + title\"\n [glyph]=\"navigationIcon$ | async\"\n (click)=\"backToParentLevel()\"\n ></button>\n </fd-bar-element>\n <fd-bar-element>\n <h1 fd-title>{{ title }}</h1>\n </fd-bar-element>\n </div>\n <div fd-bar-right>\n <fd-bar-element>\n <button\n *ngIf=\"this.mobileConfig.hasCloseButton\"\n fd-dialog-close-button\n [mobile]=\"true\"\n (click)=\"close()\"\n ></button>\n </fd-bar-element>\n </div>\n </ng-template>\n </fd-dialog-header>\n\n <fd-dialog-body>\n <ng-container *ngTemplateOutlet=\"(isSubmenu ? subMenuTemplate : view) || null\"> </ng-container>\n </fd-dialog-body>\n\n <fd-dialog-footer *ngIf=\"mobileConfig.approveButtonText || mobileConfig.cancelButtonText\">\n <fd-button-bar\n *ngIf=\"mobileConfig.approveButtonText\"\n fdType=\"emphasized\"\n [label]=\"mobileConfig.approveButtonText\"\n (click)=\"close()\"\n >\n </fd-button-bar>\n <fd-button-bar\n *ngIf=\"mobileConfig.cancelButtonText\"\n fd-initial-focus\n [label]=\"mobileConfig.cancelButtonText\"\n (click)=\"close()\"\n >\n </fd-button-bar>\n </fd-dialog-footer>\n </fd-dialog>\n</ng-template>\n\n<ng-template #subMenuTemplate>\n <nav class=\"fd-menu fd-menu--mobile\">\n <ul class=\"fd-menu__sublist\">\n <ng-container *ngTemplateOutlet=\"view || null\"></ng-container>\n </ul>\n </nav>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MenuMobileComponent } from './menu-mobile.component';\nimport { DialogModule } from '@fundamental-ngx/core/dialog';\nimport { ButtonModule } from '@fundamental-ngx/core/button';\n\n@NgModule({\n declarations: [MenuMobileComponent],\n imports: [CommonModule, DialogModule, ButtonModule],\n exports: [MenuMobileComponent],\n entryComponents: [MenuMobileComponent]\n})\nexport class MenuMobileModule {}\n","import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Injector,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n Renderer2,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { DynamicComponentService } from '@fundamental-ngx/core/utils';\nimport { DialogConfig } from '@fundamental-ngx/core/dialog';\nimport { MobileModeConfig } from '@fundamental-ngx/core/mobile-mode';\nimport { BasePopoverClass, PopoverService } from '@fundamental-ngx/core/popover';\nimport { Nullable } from '@fundamental-ngx/core/shared';\n\nimport { MenuMobileComponent } from './menu-mobile/menu-mobile.component';\nimport { MenuMobileModule } from './menu-mobile/menu-mobile.module';\nimport { MenuService } from './services/menu.service';\nimport { MENU_COMPONENT, MenuInterface } from './menu.interface';\nimport { MenuItemComponent } from './menu-item/menu-item.component';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\nlet menuUniqueId = 0;\n\n/**\n * The component that represents a menu.\n */\n@Component({\n selector: 'fd-menu',\n templateUrl: './menu.component.html',\n styleUrls: ['menu.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [MenuService, PopoverService, contentDensityObserverProviders()]\n})\nexport class MenuComponent\n extends BasePopoverClass\n implements MenuInterface, AfterContentInit, AfterViewInit, OnDestroy, OnInit\n{\n /** Set menu in mobile mode */\n @Input()\n set mobile(value: BooleanInput) {\n this._mobile = coerceBooleanProperty(value);\n this._menuService.setMenuMode(this.mobile);\n }\n get mobile(): boolean {\n return this._mobile;\n }\n\n /** Whether the popover is disabled. */\n @Input()\n disabled = false;\n\n /** Whether the popover should be focusTrapped. */\n @Input()\n focusTrapped = true;\n\n /** Open submenu on hover after given milliseconds */\n @Input()\n openOnHoverTime = 0;\n\n /** Display menu without integrated popover */\n @Input()\n mobileConfig: MobileModeConfig = { cancelButtonText: 'Cancel' };\n\n /** Aria-label for navigation */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** Aria-Labelledby for element describing navigation */\n @Input()\n ariaLabelledby: Nullable<string>;\n\n /** Id of the control. */\n @Input()\n id = `fd-menu-${menuUniqueId++}`;\n\n /** Emits array of active menu items */\n @Output()\n readonly activePath = new EventEmitter<MenuItemComponent[]>();\n\n /** @hidden Reference to the menu root template */\n @ViewChild('menuRootTemplate')\n _menuRootTemplate: TemplateRef<any>;\n\n /** @hidden Reference to all menu Items */\n @ContentChildren(MenuItemComponent)\n _menuItems: QueryList<MenuItemComponent>;\n\n /** @hidden Whether use a menu in mobile mode */\n private _mobile = false;\n\n /** @hidden Reference to external menu trigger */\n private _externalTrigger: ElementRef;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n private _mobileModeComponentRef: ComponentRef<MenuMobileComponent>;\n\n /** @hidden */\n private _clickEventListener: null | (() => void);\n\n /** @hidden */\n private get _popoverConfig(): BasePopoverClass {\n return {\n ...this,\n additionalBodyClass: (this.additionalBodyClass ?? '') + ' fd-popover--menu'\n };\n }\n\n /** @hidden */\n constructor(\n public readonly elementRef: ElementRef,\n @Optional() public readonly dialogConfig: DialogConfig,\n private readonly _rendered: Renderer2,\n private readonly _menuService: MenuService,\n private readonly _changeDetectorRef: ChangeDetectorRef,\n private readonly _popoverService: PopoverService,\n private readonly _injector: Injector,\n private readonly _viewContainerRef: ViewContainerRef,\n @Optional() private readonly _dynamicComponentService: DynamicComponentService,\n readonly _contentDensityObserver: ContentDensityObserver\n ) {\n super();\n }\n\n /** @hidden */\n ngOnInit(): void {\n /** keep isOpen up to date */\n this.isOpenChange.subscribe((isOpen) => {\n this.isOpen = isOpen;\n\n // when popover got closed by its own mechanism (e.x. click outside)\n // we need to clean up a menu as well\n if (!isOpen) {\n this._cleanUpMenuAfterClose();\n }\n\n this._changeDetectorRef.markForCheck();\n });\n }\n\n /** @hidden */\n ngAfterContentInit(): void {\n this._menuService.setMenuComponent(this);\n this._listenOnMenuItemsChange();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._menuService.isMobileMode.subscribe((isMobile) => {\n this._setupView();\n\n // Since it is mobile, it's needed to disable popoverService\n if (isMobile) {\n this._popoverService.deactivate();\n }\n });\n\n this._menuService.setMenuMode(this.mobile);\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._destroyMobileComponent();\n this._destroyEventListeners();\n this._menuService.onDestroy();\n this._subscriptions.unsubscribe();\n this._popoverService.onDestroy();\n }\n\n get trigger(): ElementRef {\n return this._externalTrigger;\n }\n\n set trigger(trigger: ElementRef) {\n this._externalTrigger = trigger;\n this._popoverService.initialise(this._externalTrigger);\n this._destroyEventListeners();\n this._listenOnTriggerRefClicks();\n }\n\n /** Opens the menu */\n open(): void {\n if (this.mobile) {\n this.isOpen = true;\n this.isOpenChange.emit(this.isOpen);\n } else {\n this._popoverService.open();\n }\n\n this._changeDetectorRef.markForCheck();\n }\n\n /** Closes the menu */\n close(): void {\n if (this.mobile) {\n this.isOpen = false;\n this.isOpenChange.emit(this.isOpen);\n } else {\n this._popoverService.close();\n }\n\n this._cleanUpMenuAfterClose();\n this._focusTrigger();\n this._changeDetectorRef.markForCheck();\n }\n\n /** Toggles menu open/close state */\n toggle(): void {\n this.isOpen ? this.close() : this.open();\n }\n\n /** Method called to refresh position of opened popover */\n refreshPosition(): void {\n this._popoverService.refreshPosition();\n }\n\n /** @hidden */\n private _cleanUpMenuAfterClose(): void {\n this._menuService.resetMenuState();\n }\n\n /** @hidden Select and instantiate menu view mode */\n private _setupView(): void {\n if (this.mobile) {\n this._setupMobileMode();\n } else {\n this._setupPopoverService();\n }\n\n this._changeDetectorRef.detectChanges();\n }\n\n /** @hidden */\n private _setupPopoverService(): void {\n this._subscriptions.add(\n this._popoverService._onLoad.subscribe((elementRef) => this._menuService.addKeyboardSupport(elementRef))\n );\n\n this._popoverService.templateContent = this._menuRootTemplate;\n this._popoverService.initialise(this._externalTrigger, this._popoverConfig);\n }\n\n /** @hidden Open Menu in mobile mode */\n private async _setupMobileMode(): Promise<void> {\n const injector = Injector.create({\n providers: [{ provide: MENU_COMPONENT, useValue: this }],\n parent: this._injector\n });\n\n this._mobileModeComponentRef = await this._dynamicComponentService.createDynamicModule(\n this._menuRootTemplate,\n MenuMobileModule,\n MenuMobileComponent,\n this._viewContainerRef,\n injector\n );\n\n this._listenOnTriggerRefClicks();\n }\n\n /** @hidden Listen on menu items change and rebuild menu */\n private _listenOnMenuItemsChange(): void {\n this._subscriptions.add(this._menuItems.changes.subscribe(() => this._menuService.rebuildMenu()));\n\n this._menuItems.forEach((menuItem) => {\n if (menuItem.submenu?.menuItems) {\n this._subscriptions.add(\n menuItem.submenu._menuItemsChange$.subscribe(() => this._menuService.rebuildMenu())\n );\n }\n });\n }\n\n /**\n * @hidden\n * This is going to be removed in feature, on dialog and dynamic service component refactor\n */\n private _listenOnTriggerRefClicks(): void {\n this._destroyEventListeners();\n\n if (this.trigger && this.mobile) {\n this._clickEventListener = this._rendered.listen(this.trigger.nativeElement, 'click', () => this.toggle());\n }\n }\n\n /**\n * @hidden\n * This is going to be removed in feature, on dialog and dynamic service component refactor\n */\n private _destroyEventListeners(): void {\n if (this._clickEventListener) {\n this._clickEventListener();\n this._clickEventListener = null;\n }\n }\n\n /** @hidden */\n private _destroyMobileComponent(): void {\n if (this._mobileModeComponentRef) {\n this._mobileModeComponentRef.destroy();\n }\n }\n\n /** @hidden */\n private _focusTrigger(): void {\n if (this.focusTrapped && this.trigger) {\n this.trigger.nativeElement.focus();\n }\n }\n}\n","<ng-container #viewContainer></ng-container>\n\n<ng-template #menuRootTemplate>\n <nav\n class=\"fd-menu\"\n fdInitialFocus\n [enabled]=\"focusTrapped\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-label]=\"ariaLabel\"\n role=\"menu\"\n [class.fd-menu--compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-menu--mobile]=\"mobile\"\n >\n <ul role=\"none\" class=\"fd-menu__list fd-menu__list--no-shadow\">\n <ng-content></ng-content>\n </ul>\n </nav>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MenuComponent } from './menu.component';\nimport { MenuTitleDirective } from './directives/menu-title.directive';\nimport { MenuInteractiveDirective } from './directives/menu-interactive.directive';\nimport { MenuSeparatorComponent } from './menu-separator/menu-separator.component';\nimport { MenuAddonDirective } from './directives/menu-addon.directive';\nimport { MenuItemComponent, SubmenuComponent } from './menu-item/menu-item.component';\nimport { MenuShortcutDirective } from './directives/menu-shortcut.directive';\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\nimport { MenuTriggerDirective } from './directives/menu-trigger.directive';\nimport { IconModule } from '@fundamental-ngx/core/icon';\nimport { InitialFocusModule } from '@fundamental-ngx/core/utils';\nimport { DeprecatedMenuCompactDirective } from './directives/deprecated-menu-compact.directive';\nimport { ContentDensityModule } from '@fundamental-ngx/core/content-density';\n\n@NgModule({\n imports: [CommonModule, PopoverModule, IconModule, InitialFocusModule, ContentDensityModule],\n declarations: [\n MenuComponent,\n MenuItemComponent,\n MenuAddonDirective,\n MenuSeparatorComponent,\n MenuShortcutDirective,\n MenuInteractiveDirective,\n MenuTitleDirective,\n SubmenuComponent,\n MenuTriggerDirective,\n DeprecatedMenuCompactDirective\n ],\n exports: [\n MenuComponent,\n MenuItemComponent,\n SubmenuComponent,\n MenuSeparatorComponent,\n MenuShortcutDirective,\n MenuInteractiveDirective,\n MenuTitleDirective,\n MenuAddonDirective,\n MenuTriggerDirective,\n DeprecatedMenuCompactDirective,\n ContentDensityModule\n ]\n})\nexport class MenuModule {}\n","export abstract class DefaultMenuItem {\n abstract focus(): void;\n abstract click(): void;\n}\n","import { Subject } from 'rxjs';\nimport { Injectable, Output } from '@angular/core';\nimport { DefaultMenuItem } from './default-menu-item.class';\nimport { ListItemComponent } from '@fundamental-ngx/core/list';\nimport { KeyUtil } from '@fundamental-ngx/core/utils';\nimport { DOWN_ARROW, ENTER, SPACE, UP_ARROW } from '@angular/cdk/keycodes';\n\n@Injectable()\nexport class MenuKeyboardService {\n /** Event emitted when an item link is clicked.*/\n @Output()\n public readonly itemClicked: Subject<number> = new Subject<number>();\n\n /** Whether user wants to remove keyboard handling */\n disableKeydownHandling = false;\n\n /** Function that is supposed to be called, when focus escape before list */\n focusEscapeBeforeList: () => void;\n\n /** Function that is supposed to be called, when focus escape after list */\n focusEscapeAfterList: () => void;\n\n /** Function that should be called every time, keydown event is used on some menu item,\n * it provides whole functionality for handling\n * ArrowDown - focus, ArrowUp - focus, Space bar - simulate click, Enter key - simulate click.\n * @param event KeyboardEvent\n * @param index index of items starts from 0\n * @param menuItems array of menu item directives\n * */\n keyDownHandler(event: KeyboardEvent, index: number, menuItems: DefaultMenuItem[] | ListItemComponent[]): void {\n if (this.disableKeydownHandling) {\n return;\n }\n\n if (KeyUtil.isKeyCode(event, DOWN_ARROW)) {\n if (menuItems.length > index + 1) {\n menuItems[index + 1].focus();\n } else {\n if (this.focusEscapeAfterList) {\n this.focusEscapeAfterList();\n } else {\n menuItems[0].focus();\n }\n }\n event.preventDefault();\n } else if (KeyUtil.isKeyCode(event, UP_ARROW)) {\n if (index > 0) {\n menuItems[index - 1].focus();\n } else {\n if (this.focusEscapeBeforeList) {\n this.focusEscapeBeforeList();\n } else {\n menuItems[menuItems.length - 1].focus();\n }\n }\n event.preventDefault();\n } else if (KeyUtil.isKeyCode(event, [SPACE, ENTER])) {\n if (menuItems[index]) {\n menuItems[index].click();\n event.preventDefault();\n }\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["menuUniqueId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;MAOa,kBAAkB;;IAY3B,YAAoB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;;QAT3C,qBAAgB,GAAG,IAAI,CAAC;KASuB;;IAN/C,IACI,KAAK;QACL,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC;KACrD;;+GATQ,kBAAkB;mGAAlB,kBAAkB;2FAAlB,kBAAkB;kBAJ9B,SAAS;mBAAC;;oBAEP,QAAQ,EAAE,iBAAiB;iBAC9B;iGAIG,gBAAgB;sBADf,WAAW;uBAAC,sBAAsB;gBAK/B,KAAK;sBADR,WAAW;uBAAC,YAAY;;;MCNhB,wBAAwB;;IA8BjC,YAAmB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;;QA3BzC,aAAQ,GAAG,CAAC,CAAC;;QAIb,aAAQ,GAAG,KAAK,CAAC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;gBACH,IAAI,IAAI,CAAC,qBAAqB,EAAE;oBAC5B,IAAI,CAAC,qBAAqB,EAAE,CAAC;iBAChC;qBAAM;oBACH,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;iBAC3C;aACJ;YACD,KAAK,CAAC,cAAc,EAAE,CAAC;SAC1B;aAAM,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE;YACjD,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;gBAClB,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;gBACzB,KAAK,CAAC,cAAc,EAAE,CAAC;aAC1B;SACJ;KACJ;;gHAtDQ,mBAAmB;oHAAnB,mBAAmB;2FAAnB,mBAAmB;kBAD/B,UAAU;8BAIS,WAAW;sBAD1B,MAAM;;;ACVX;;;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, OnChanges, OnDestroy, QueryList, SimpleChanges, TemplateRef } from '@angular/core';
|
|
1
|
+
import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, OnChanges, OnDestroy, OnInit, QueryList, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
|
2
3
|
import { MenuTitleDirective } from '../directives/menu-title.directive';
|
|
3
4
|
import { DefaultMenuItem } from '../default-menu-item.class';
|
|
4
5
|
import { MenuInteractiveDirective } from '../directives/menu-interactive.directive';
|
|
@@ -7,13 +8,16 @@ import { Nullable } from '@fundamental-ngx/core/shared';
|
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export interface BaseSubmenu {
|
|
9
10
|
templateRef: TemplateRef<any>;
|
|
10
|
-
menuItems:
|
|
11
|
+
menuItems: MenuItemComponent[];
|
|
11
12
|
menuService: MenuService;
|
|
12
13
|
ariaLabel: Nullable<string>;
|
|
13
14
|
ariaLabelledby: Nullable<string>;
|
|
15
|
+
_menuItemsChange$: Observable<void>;
|
|
16
|
+
_registerItem(item: MenuItemComponent): void;
|
|
17
|
+
_unregisterItem(item: MenuItemComponent): void;
|
|
14
18
|
}
|
|
15
19
|
export declare const SUBMENU: InjectionToken<BaseSubmenu>;
|
|
16
|
-
export declare class MenuItemComponent implements DefaultMenuItem, OnChanges, AfterContentInit, OnDestroy {
|
|
20
|
+
export declare class MenuItemComponent implements DefaultMenuItem, OnInit, OnChanges, AfterContentInit, OnDestroy {
|
|
17
21
|
elementRef: ElementRef;
|
|
18
22
|
menuService: MenuService | null;
|
|
19
23
|
private _changeDetectorRef;
|
|
@@ -24,6 +28,8 @@ export declare class MenuItemComponent implements DefaultMenuItem, OnChanges, Af
|
|
|
24
28
|
itemId: string;
|
|
25
29
|
/** Reference to sub-menu component */
|
|
26
30
|
submenu: BaseSubmenu | undefined;
|
|
31
|
+
/** Reference to the parent submenu if nested menus created dynamically */
|
|
32
|
+
parentSubmenu: BaseSubmenu | undefined;
|
|
27
33
|
/** Emitted when the menu item is selected. */
|
|
28
34
|
onSelect: EventEmitter<void>;
|
|
29
35
|
/** @hidden Reference to the Menu Item title */
|
|
@@ -39,6 +45,8 @@ export declare class MenuItemComponent implements DefaultMenuItem, OnChanges, Af
|
|
|
39
45
|
/** @hidden */
|
|
40
46
|
constructor(elementRef: ElementRef, menuService: MenuService | null, _changeDetectorRef: ChangeDetectorRef, _submenu: BaseSubmenu | null);
|
|
41
47
|
/** @hidden */
|
|
48
|
+
ngOnInit(): void;
|
|
49
|
+
/** @hidden */
|
|
42
50
|
ngAfterContentInit(): void;
|
|
43
51
|
/** @hidden */
|
|
44
52
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -65,9 +73,9 @@ export declare class MenuItemComponent implements DefaultMenuItem, OnChanges, Af
|
|
|
65
73
|
/** @hidden Updates focused menu item on outer focus */
|
|
66
74
|
private _listenOnOuterFocus;
|
|
67
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemComponent, [null, { optional: true; }, null, { optional: true; }]>;
|
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemComponent, "li[fd-menu-item]", ["fd-menu-item"], { "disabled": "disabled"; "itemId": "itemId"; "submenu": "submenu"; }, { "onSelect": "onSelect"; }, ["menuItemTitle", "menuInteractive"], ["*"]>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemComponent, "li[fd-menu-item]", ["fd-menu-item"], { "disabled": "disabled"; "itemId": "itemId"; "submenu": "submenu"; "parentSubmenu": "parentSubmenu"; }, { "onSelect": "onSelect"; }, ["menuItemTitle", "menuInteractive"], ["*"]>;
|
|
69
77
|
}
|
|
70
|
-
export declare class SubmenuComponent implements BaseSubmenu {
|
|
78
|
+
export declare class SubmenuComponent implements BaseSubmenu, AfterContentInit {
|
|
71
79
|
/** Aria-label for navigation */
|
|
72
80
|
ariaLabel: Nullable<string>;
|
|
73
81
|
/** Aria-Labelledby for element describing navigation */
|
|
@@ -75,9 +83,21 @@ export declare class SubmenuComponent implements BaseSubmenu {
|
|
|
75
83
|
/** @hidden Reference to template with Submenu items */
|
|
76
84
|
templateRef: TemplateRef<any>;
|
|
77
85
|
/** @hidden Reference to Submenu MenuItems */
|
|
78
|
-
|
|
86
|
+
_projectedItems: QueryList<MenuItemComponent>;
|
|
87
|
+
/** @hidden */
|
|
88
|
+
_registeredItems: MenuItemComponent[];
|
|
79
89
|
/** @hidden Reference to MenuService used by MenuItems */
|
|
80
90
|
menuService: MenuService;
|
|
91
|
+
/** @hidden */
|
|
92
|
+
_menuItemsChange$: Subject<void>;
|
|
93
|
+
/** @hidden */
|
|
94
|
+
get menuItems(): MenuItemComponent[];
|
|
95
|
+
/** @hidden */
|
|
96
|
+
ngAfterContentInit(): void;
|
|
97
|
+
/** @hidden method for manually registering item when it's not visible for @ContentChildren */
|
|
98
|
+
_registerItem(item: MenuItemComponent): void;
|
|
99
|
+
/** @hidden method for manually unregistering item when it's not visible for @ContentChildren */
|
|
100
|
+
_unregisterItem(item: MenuItemComponent): void;
|
|
81
101
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubmenuComponent, never>;
|
|
82
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SubmenuComponent, "fd-submenu", ["fdSubmenu"], { "ariaLabel": "ariaLabel"; "ariaLabelledby": "ariaLabelledby"; }, {}, ["
|
|
102
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SubmenuComponent, "fd-submenu", ["fdSubmenu"], { "ariaLabel": "ariaLabel"; "ariaLabelledby": "ariaLabelledby"; }, {}, ["_projectedItems"], ["*"]>;
|
|
83
103
|
}
|
package/menu/menu.component.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { MenuService } from './services/menu.service';
|
|
|
8
8
|
import { MenuInterface } from './menu.interface';
|
|
9
9
|
import { MenuItemComponent } from './menu-item/menu-item.component';
|
|
10
10
|
import { ContentDensityObserver } from '@fundamental-ngx/core/content-density';
|
|
11
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
/**
|
|
13
14
|
* The component that represents a menu.
|
|
@@ -24,7 +25,8 @@ export declare class MenuComponent extends BasePopoverClass implements MenuInter
|
|
|
24
25
|
private readonly _dynamicComponentService;
|
|
25
26
|
readonly _contentDensityObserver: ContentDensityObserver;
|
|
26
27
|
/** Set menu in mobile mode */
|
|
27
|
-
set
|
|
28
|
+
set mobile(value: BooleanInput);
|
|
29
|
+
get mobile(): boolean;
|
|
28
30
|
/** Whether the popover is disabled. */
|
|
29
31
|
disabled: boolean;
|
|
30
32
|
/** Whether the popover should be focusTrapped. */
|
|
@@ -42,13 +44,11 @@ export declare class MenuComponent extends BasePopoverClass implements MenuInter
|
|
|
42
44
|
/** Emits array of active menu items */
|
|
43
45
|
readonly activePath: EventEmitter<MenuItemComponent[]>;
|
|
44
46
|
/** @hidden Reference to the menu root template */
|
|
45
|
-
|
|
47
|
+
_menuRootTemplate: TemplateRef<any>;
|
|
46
48
|
/** @hidden Reference to all menu Items */
|
|
47
|
-
|
|
48
|
-
/** Whether use menu in mobile mode */
|
|
49
|
-
|
|
50
|
-
/** @hidden Whether Popover with the menu is opened */
|
|
51
|
-
isOpen: boolean;
|
|
49
|
+
_menuItems: QueryList<MenuItemComponent>;
|
|
50
|
+
/** @hidden Whether use a menu in mobile mode */
|
|
51
|
+
private _mobile;
|
|
52
52
|
/** @hidden Reference to external menu trigger */
|
|
53
53
|
private _externalTrigger;
|
|
54
54
|
/** @hidden */
|
|
@@ -58,6 +58,8 @@ export declare class MenuComponent extends BasePopoverClass implements MenuInter
|
|
|
58
58
|
/** @hidden */
|
|
59
59
|
private _clickEventListener;
|
|
60
60
|
/** @hidden */
|
|
61
|
+
private get _popoverConfig();
|
|
62
|
+
/** @hidden */
|
|
61
63
|
constructor(elementRef: ElementRef, dialogConfig: DialogConfig, _rendered: Renderer2, _menuService: MenuService, _changeDetectorRef: ChangeDetectorRef, _popoverService: PopoverService, _injector: Injector, _viewContainerRef: ViewContainerRef, _dynamicComponentService: DynamicComponentService, _contentDensityObserver: ContentDensityObserver);
|
|
62
64
|
/** @hidden */
|
|
63
65
|
ngOnInit(): void;
|
|
@@ -83,8 +85,6 @@ export declare class MenuComponent extends BasePopoverClass implements MenuInter
|
|
|
83
85
|
private _setupView;
|
|
84
86
|
/** @hidden */
|
|
85
87
|
private _setupPopoverService;
|
|
86
|
-
/** @hidden */
|
|
87
|
-
private _manageKeyboardSupport;
|
|
88
88
|
/** @hidden Open Menu in mobile mode */
|
|
89
89
|
private _setupMobileMode;
|
|
90
90
|
/** @hidden Listen on menu items change and rebuild menu */
|
|
@@ -104,5 +104,5 @@ export declare class MenuComponent extends BasePopoverClass implements MenuInter
|
|
|
104
104
|
/** @hidden */
|
|
105
105
|
private _focusTrigger;
|
|
106
106
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuComponent, [null, { optional: true; }, null, null, null, null, null, null, { optional: true; }, null]>;
|
|
107
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MenuComponent, "fd-menu", never, { "
|
|
107
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuComponent, "fd-menu", never, { "mobile": "mobile"; "disabled": "disabled"; "focusTrapped": "focusTrapped"; "openOnHoverTime": "openOnHoverTime"; "mobileConfig": "mobileConfig"; "ariaLabel": "ariaLabel"; "ariaLabelledby": "ariaLabelledby"; "id": "id"; }, { "activePath": "activePath"; }, ["_menuItems"], ["*"]>;
|
|
108
108
|
}
|
package/menu/package.json
CHANGED
|
@@ -23,14 +23,14 @@ export declare class MenuService {
|
|
|
23
23
|
/** Collection of active menu nodes */
|
|
24
24
|
private _isMobileMode;
|
|
25
25
|
/** @hidden */
|
|
26
|
-
private
|
|
26
|
+
private _menuComponent;
|
|
27
27
|
/** @hidden */
|
|
28
28
|
private _destroyKeyboardHandlerListener;
|
|
29
29
|
/** @hidden */
|
|
30
30
|
get _isRtl(): boolean;
|
|
31
31
|
constructor(_renderer: Renderer2, _rtlService: RtlService);
|
|
32
32
|
/** Reference to menu component */
|
|
33
|
-
get
|
|
33
|
+
get menuComponent(): MenuComponent;
|
|
34
34
|
/** Returns menu mode observable */
|
|
35
35
|
get isMobileMode(): Observable<boolean>;
|
|
36
36
|
/** Sets menu mode */
|
|
@@ -49,7 +49,7 @@ export declare class MenuService {
|
|
|
49
49
|
*/
|
|
50
50
|
setInactiveSiblingMenuItem(menuItem: MenuItemComponent): void;
|
|
51
51
|
/** Initializes menu service based on given Menu Component */
|
|
52
|
-
|
|
52
|
+
setMenuComponent(menu: MenuComponent): void;
|
|
53
53
|
/** Clears Active Node Path and resets Focused Node */
|
|
54
54
|
resetMenuState(): void;
|
|
55
55
|
/** - Updates the structure of the menu
|