UNPKG

@odoo/o-spreadsheet

Version:
45 lines (44 loc) 1.74 kB
import { Action, MenuItemOrSeparator } from "../../actions/action"; import { Component } from "../../owl3_compatibility_layer"; import { Pixel } from "../../types/misc"; import { Rect } from "../../types/rendering"; import { SpreadsheetChildEnv } from "../../types/spreadsheet_env"; export type MenuItemRects = { [menuItemId: string]: Rect; }; export interface MenuState { isOpen: boolean; parentMenu?: Action; scrollOffset?: Pixel; menuItems: Action[]; isHoveringChild?: boolean; } export declare class Menu extends Component<SpreadsheetChildEnv> { static template: string; static components: {}; protected props: import("@odoo/owl").Props<{ menuItems: MenuItemOrSeparator[]; onClose: () => void; onClickMenu?: ((menu: Action, ev: PointerEvent) => void) | undefined; onMouseEnter?: ((menu: Action, ev: PointerEvent) => void) | undefined; onMouseLeave?: ((menu: Action, ev: PointerEvent) => void) | undefined; width?: number | undefined; hoveredMenuId?: string | undefined; isHoveredMenuFocused?: boolean | undefined; onScroll?: ((ev: CustomEvent) => void) | undefined; onKeyDown?: ((ev: KeyboardEvent) => void) | undefined; disableKeyboardNavigation?: boolean | undefined; }>; private menuRef; setup(): void; get childrenHaveIcon(): boolean; getIconName(menu: Action): string; getShortcut(menu: Action): string | undefined; getColor(menu: Action): string; getIconColor(menu: Action): string; getName(menu: Action): string; isRoot(menu: Action): boolean; isEnabled(menu: Action): boolean; get menuStyle(): string; onClickMenu(menu: Action, ev: PointerEvent): void; }