import { CoreComponent } from "cmf.core/src/core"; import { LinkMetadata } from "cmf.core/src/domain/extensions/navigation"; import * as ng from "@angular/core"; import * as ngRouter from "@angular/router"; /** * Just a simple interface to identify an action id and context object to navigate */ export interface Action { id: string; context: any; } /** * Context menu item component for opening a new page. This component should be used inside the context menu component. * There are several places in the code that require opening a new page when navigating, * so this component encapsulates de logic being navigating to a new page. * * ## Example * * Assume this HTML Template * * ```html * * * (...) * * * (...) * * * *
  • * (...) * * *
  • *
    *
    * ``` */ export declare class ContextMenuOpenInNewPage extends CoreComponent { private _viewContainerRef; private _router; private _elementRef; /** * When filled, tells the component that it should issue a new navigation via navigateByLink. */ linkMetadata: LinkMetadata; /** * Another option to tell this component how to navigate to another page is to simply pass an object with the action id and context */ action: Action; constructor(_viewContainerRef: ng.ViewContainerRef, _router: ngRouter.Router, _elementRef: ng.ElementRef); /** * This handler just requests navigating to another page. The url is already defined in the LinkMetadata (if there is one). If there is an url, then the component will issue a navigateByUrl */ navigateToAnotherPage(): void; } export declare class ContextMenuOpenInNewPageModule { }