import * as i0 from '@angular/core'; import { ElementRef, AfterContentInit, ChangeDetectorRef, EventEmitter, Renderer2, QueryList, OnInit } from '@angular/core'; import { Subject } from 'rxjs'; import { DefaultMenuItem } from '@fundamental-ngx/core/menu'; import { Nullable } from '@fundamental-ngx/cdk/utils'; import * as i9 from '@fundamental-ngx/core/icon'; import { IconComponent } from '@fundamental-ngx/core/icon'; import { ScrollStrategy, Overlay } from '@angular/cdk/overlay'; import * as i7 from '@fundamental-ngx/core/popover'; import { PopoverComponent } from '@fundamental-ngx/core/popover'; import * as i8 from '@angular/router'; import * as i10 from '@fundamental-ngx/core/content-density'; declare class NestedListHeaderDirective { private _elementRef; /** Id of the element. */ id: string | null; /** @hidden */ cxNestedListHeaderClass: boolean; /** @hidden */ constructor(_elementRef: ElementRef); /** Get the header title */ get title(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NestedListIconComponent extends IconComponent { /** Role attribute */ role: string; /** @hidden */ fdNestedListIconClass: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NestedListTitleDirective { private elementRef; /** @hidden */ fdNestedListTitleClass: boolean; /** @hidden */ constructor(elementRef: ElementRef); /** Returns element's InnerText */ getInnerText(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NestedListExpandIconComponent { private _itemService; private _changeDetRef; /** @hidden */ fdNestedListArrowClass: boolean; /** @hidden */ get fdNestedListDownArrowClass(): boolean; /** @hidden */ get fdNestedListRightArrowClass(): any; /** * @hidden * Attribute controlled by the parent `NestedItemComponent` */ expanded: boolean; /** @hidden */ ariaHidden: boolean; /** @hidden */ constructor(_itemService: NestedItemService, _changeDetRef: ChangeDetectorRef); /** Mouse event handler */ onClick(event?: MouseEvent): void; /** Handler for focus events */ onFocus(): void; /** @hidden */ changeExpandedState(expanded: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NestedListButtonDirective implements AfterContentInit { /** @hidden */ fdNestedListButtonClass: boolean; /** @hidden */ _expandIcon: NestedListExpandIconComponent; /** @hidden */ onClick(event: Event): void; /** @hidden */ ngAfterContentInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NestedLinkComponent { changeDetRef: ChangeDetectorRef; private _renderer; private _elementRef; private _itemService; /** Function that is called on click event dispatch on this element. */ onClickCallback: () => void; /** Whether this element is selected*/ selected: boolean; /** @hidden */ _ariaLabel: string; /** @hidden */ ariaDescribedby: Nullable; /** Event thrown, when selected state is changed */ selectedChange: EventEmitter; /** @hidden */ cxNestedListItemClass: boolean; /** @hidden */ role: string; /** * @hidden * Reference to title element, it is used, to get title for condensed mode. */ title: NestedListTitleDirective; /** @hidden */ _nestedListButton: NestedListButtonDirective; /** @hidden */ _expandIcon: NestedListExpandIconComponent; /** @hidden */ constructor(changeDetRef: ChangeDetectorRef, _renderer: Renderer2, _elementRef: ElementRef, _itemService: NestedItemService); /** @hidden */ get elementRef(): ElementRef; /** Handler for keyboard events */ onKeyDown(event: Event): void; /** Handler for mouse events */ onClick(): void; /** Handler for focus events */ onFocus(): void; /** Method to trigger selected state change */ changeSelected(selected: boolean): void; /** Set focus on the element. */ focus(): void; /** Dispatches the click event on the element */ click(): void; /** Returns the title value of the title directive */ getTitle(): string; /** @hidden */ private get _collapseOnly(); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Interface, to reduce amount of circular dependency warnings */ interface NestedItemInterface extends DefaultMenuItem { expanded: boolean; keyboardTriggered: EventEmitter; triggerOpen: () => void; triggerClose: () => void; linkItem: NestedLinkComponent; allChildrenItems: NestedItemInterface[]; hasChildren: boolean; containsId: (id: string) => boolean; click: () => void; focus: () => void; } /** Interface, to reduce amount of circular dependency warnings */ interface NestedListPopoverInterface { parentItemElement: NestedItemInterface; open: boolean; handleOpenChange: (boolean: any) => void; } /** Interface, to reduce amount of circular dependency warnings */ interface NestedListInterface { nestedItems: QueryList; hidden: boolean; detectChanges: () => void; } /** Contains references to popover or list nested components, that are placed as direct children of item component */ declare class NestedItemService { /** @hidden */ list: NestedListInterface; /** @hidden */ popover?: NestedListPopoverInterface; /** Subject fired when expand icon is clicked */ toggle: Subject; /** Subject fired, when child elements are focused */ focus: Subject; /** Subject fired, when content or link is clicked */ click: Subject; /** KeyDown handler, it is triggered from link, content and item elements */ keyDown: Subject; } declare class NestedListContentDirective implements AfterContentInit { changeDetRef: ChangeDetectorRef; private _elementRef; private _itemService; /** Whether this element is selected*/ selected: boolean; /** @hidden */ role: string; /** @hidden */ ariaExpanded: boolean; /** Event thrown, when selected state is changed */ selectedChange: EventEmitter; /** Event that is thrown, when any keyboard event is dispatched on this element */ readonly keyboardTriggered: EventEmitter; /** Event that is thrown, when this element is clicked */ readonly clicked: EventEmitter; /** @hidden */ cxNestedListContentClass: boolean; /** * @hidden * Attribute controlled by the parent `NestedItemComponent` */ hasChildren: boolean; /** @hidden */ nestedLink: NestedLinkComponent; /** @hidden */ nestedExpandIcon: NestedListExpandIconComponent; /** @hidden */ private readonly _destroyRef; /** @hidden */ constructor(changeDetRef: ChangeDetectorRef, _elementRef: ElementRef, _itemService: NestedItemService); /** Keyboard Event Handler */ onKeyDown(event: KeyboardEvent): void; /** Handler for mouse events */ onClick(): void; /** @hidden */ ngAfterContentInit(): void; /** Method to trigger selected state change */ changeSelected(selected: boolean): void; /** Set focus on the element. */ focus(): void; /** Dispatches the click event on the element */ click(): void; /** Add subscription for child focusing */ private _setFocusSubscription; /** Hide link child element from tab key */ private _makeLinkUnFocusable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Nested list keyboard service, which uses MenuKeyboardService, to deal with ArrowUp, ArrowDown, Space, Enter. * Also has own handling of ArrowLeft and ArrowRight, to open/close the menu if it has any children. */ declare class NestedListKeyboardService { /** * Event, that is thrown always, when the open/close i being called on item components. * Also triggers changing of elements, to remove closed/hidden elements */ readonly refresh$: Subject; /** @hidden */ private readonly keyboardService; /** @hidden */ private readonly _rtlService; /** * Function called after refresh$ event is triggered. * Refresh the list of NestedItems, that the keyboard support should be provided for */ refreshItems(lists: NestedListInterface[]): void; /** Recursive function to get all of the NestedItem elements in correct order. */ private _getItems; /** Method that calls the recursive function, getItems() and gathers all of the items in the NestedList */ private _getAllListItems; /** * Keyboard handle function. Uses keyboard support service from MenuComponent, to deal with ArrowUp, ArrowDown, Space, Enter. * For ArrowRight, if item is not expanded and has children (list or popup), the open function is triggered. * Otherwise it follows ArrowDown functionality. * For ArrowLeft, if item is expanded and has children (list or popup), the close function is triggered. * Otherwise it follows ArrowUp functionality */ private _handleKeyDown; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class NestedListStateService { /** * @hidden * The condensed state is modified by the parent and read by nested lists. */ condensed: boolean; /** * @hidden */ selectable: boolean; /** @hidden */ onSelected: Subject; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class NestedListComponent implements AfterContentInit, NestedListInterface { private _nestedItemService; private _nestedListStateService; private _nestedListKeyboardService; private _elementRef; private _changeDetectionRef; /** In case the user wants to no use icons for items in this list */ textOnly: boolean; /** Aria defines role description for the Nested List Tree. */ ariaRoledescriptionTree: string; /** Aria defines role description for the Nested List MenuBar. */ ariaRoledescriptionMenuBar: string; /** Aria defines aria label for the selected item when the list with disabled selection. */ ariaLabelSelected: string; /** @hidden */ fdNestedListItemClass: boolean; /** @hidden */ hidden: boolean; /** * @hidden * This variable is mostly to keep track of this list's children. There is not usage of it inside this directive, * but it's used by services and NestedItemComponent by itself, */ nestedItems: QueryList; /** @hidden */ protected _nestedListHeader: NestedListHeaderDirective; /** @hidden */ protected _nestedLists: QueryList; /** @hidden */ protected _role: string; /** @hidden */ protected _ariaRoledescription: Nullable; /** @hidden */ protected _ariaHaspopup: Nullable; /** @hidden */ protected _tabindex: string; /** @hidden */ private readonly _destroyRef; /** @hidden */ private readonly _translationResolver; /** @hidden */ private readonly _langSignal; /** @hidden */ private readonly _injector; /** @hidden */ constructor(_nestedItemService: NestedItemService, _nestedListStateService: NestedListStateService, _nestedListKeyboardService: NestedListKeyboardService, _elementRef: ElementRef, _changeDetectionRef: ChangeDetectorRef); /** @hidden */ ngAfterContentInit(): void; /** @hidden */ detectChanges(): void; /** @hidden */ private _handleNestedLevel; /** * @hidden * Method, that checks how deep is the list element */ private _getNestedLevel; /** @hidden */ private _setAriaAttributes; /** @hidden */ private _setAccessibilityProperties; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NestedItemComponent implements AfterContentInit, NestedItemInterface { private _itemService; private _keyboardService; private _stateService; elementRef: ElementRef; /** Whether item should be expanded */ set expanded(expanded: boolean); /** @hidden */ get expanded(): boolean; /** @hidden */ group: boolean; /** Event thrown, when expanded state is changed */ readonly expandedChange: EventEmitter; /** Event thrown, when any keyboard event is dispatched on this, or link element */ readonly keyboardTriggered: EventEmitter; /** @hidden */ fdNestedListItemClass: boolean; /** Whether this item is a header item. */ header: boolean; /** Whether this item is only meant for display purposes, meaning it cannot be used for navigation or shown as selected. */ display: boolean; /** * @Input * Applies `aria-hidden` to the element. * Set to `true` for non-focusable elements without focusable children to hide them from assistive technologies. */ ariaHidden: boolean; /** * @hidden * Reference to the link directive, to allow manipulating the properties of this element. */ linkItem: NestedLinkComponent; /** * @hidden * Mostly used, when this item has list * Reference to the content directive, to allow manipulating the properties of this element. */ contentItem: NestedListContentDirective; /** @hidden */ expandIcon: NestedListExpandIconComponent; /** @hidden */ _nestedList: NestedListComponent; /** @hidden */ _ariaLevel: Nullable; /** @hidden */ _title: string; /** @hidden */ _display: string; /** @hidden */ protected _role: string; /** @hidden */ protected _ariaExpanded: Nullable; /** @hidden */ protected _ariaSelected: Nullable; /** @hidden */ protected _ariaDisabled: boolean; /** @hidden */ protected _ariaLabel: string; /** @hidden */ _narrow: boolean; /** @hidden */ private _expanded; /** @hidden */ private readonly _destroyRef; /** @hidden */ private readonly _cdr; /** Unique element ID */ private readonly _elementId; /** @hidden */ constructor(_itemService: NestedItemService, _keyboardService: NestedListKeyboardService, _stateService: NestedListStateService, elementRef: ElementRef); /** @hidden */ ngAfterContentInit(): void; /** Check if the item element has any child */ get hasChildren(): boolean; /** Get all of the children item elements */ get allChildrenItems(): NestedItemInterface[]; /** Method that expand the item and propagate it to children */ triggerOpen(): void; /** Method that close the item and propagate it to children */ triggerClose(): void; /** Method that toggle the item and propagate it to children */ toggle(): void; /** Method that dispatches `click` event on link item*/ click(): void; /** Method that focuses link item*/ focus(): void; /** Method that provides information if element, or children of this element has passed id */ containsId(id: string): boolean; /** * @hidden * Propagate open state to all of the children */ private propagateOpenChange; /** @hidden */ private _shouldRefreshKeyboardService; /** @hidden */ private _setUpSubscriptions; /** @hidden */ private _propagateHasChildrenProperty; /** Pass this element to popover child item, to allow control `expanded` value */ private _passItemReferences; /** Change of selected state of content or link, if there is any children with I */ private _selectedChange; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_group: unknown; } interface NestedListItem { headerTitle?: string; list?: NestedListModel; link?: NestedListLink; expanded?: boolean; } interface NestedListModel { textOnly?: boolean; items: NestedListItem[]; } interface NestedListLink { icon?: string; title: string; callback?: () => void; href?: string; routerLink?: string; selected?: boolean; } declare class NestedListPopoverComponent implements NestedListPopoverInterface, OnInit { private _keyboardNestService; private _itemService; private _overlay; /** @hidden */ popoverComponent: PopoverComponent; /** @hidden */ popoverClass: boolean; /** @hidden */ linkDirective: NestedLinkComponent; /** * @hidden * Reference to parent item, to propagate open and close change from popover. */ parentItemElement: NestedItemInterface; /** @hidden */ placement: i0.Signal<"left-start" | "right-start">; /** @hidden */ open: boolean; /** @hidden */ _closeScrollStrategy: ScrollStrategy; /** @hidden */ private readonly _rtlService; /** @hidden */ constructor(_keyboardNestService: NestedListKeyboardService, _itemService: NestedItemService, _overlay: Overlay); /** @hidden */ ngOnInit(): void; /** * Method called, when open state is changed, from popover component (escape key, outside click). */ handleOpenChange(open: boolean): void; /** @hidden */ private _listenOnKeyboardRefresh; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Component for internal usage, allows to generate the nested list from defined object. */ declare class PreparedNestedListComponent { /** * @hidden * For internal usage. * Defines if the component is first */ first: boolean; /** Defines if list should be displayed in condensed mode */ condensed: boolean; /** List configuration*/ list: Nullable; /** * @hidden */ _nestedListComponent: NestedListComponent; /** * In prepared nested list, nested items should be taken as reference of View, not Content. * There is direct reference to these directives here. */ get nestedListComponent(): NestedListComponent; /** @hidden */ _expandedChange(expanded: boolean, item: NestedListItem): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @deprecated * Use direct imports of components and directives. */ declare class CxNestedListModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { CxNestedListModule, NestedItemComponent, NestedItemService, NestedLinkComponent, NestedListButtonDirective, NestedListComponent, NestedListContentDirective, NestedListExpandIconComponent, NestedListHeaderDirective, NestedListIconComponent, NestedListKeyboardService, NestedListPopoverComponent, NestedListStateService, NestedListTitleDirective, PreparedNestedListComponent }; export type { NestedListItem, NestedListLink, NestedListModel };