@odoo/o-spreadsheet
Version:
A spreadsheet component
84 lines (83 loc) • 2.47 kB
TypeScript
import { Component } from "@odoo/owl";
import { Pixel, Rect } from "../../types";
import { PopoverPropsPosition } from "../../types/cell_popovers";
import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
export interface PopoverProps {
/**
* Rectangle around which the popover is displayed.
* Coordinates are expressed as absolute DOM position.
*/
anchorRect: Rect;
/** The popover can be positioned below the anchor Rectangle, or to the right of the rectangle */
positioning: PopoverPropsPosition;
maxWidth?: Pixel;
maxHeight?: Pixel;
/** Offset to apply to the vertical position of the popover.*/
verticalOffset: number;
onMouseWheel?: () => void;
onPopoverMoved?: () => void;
onPopoverHidden?: () => void;
class?: string;
}
export declare class Popover extends Component<PopoverProps, SpreadsheetChildEnv> {
static template: string;
static props: {
anchorRect: ObjectConstructor;
containerRect: {
type: ObjectConstructor;
optional: boolean;
};
positioning: {
type: StringConstructor;
optional: boolean;
};
maxWidth: {
type: NumberConstructor;
optional: boolean;
};
maxHeight: {
type: NumberConstructor;
optional: boolean;
};
verticalOffset: {
type: NumberConstructor;
optional: boolean;
};
onMouseWheel: {
type: FunctionConstructor;
optional: boolean;
};
onPopoverHidden: {
type: FunctionConstructor;
optional: boolean;
};
onPopoverMoved: {
type: FunctionConstructor;
optional: boolean;
};
zIndex: {
type: NumberConstructor;
optional: boolean;
};
class: {
type: StringConstructor;
optional: boolean;
};
slots: ObjectConstructor;
};
static defaultProps: {
positioning: string;
verticalOffset: number;
onMouseWheel: () => void;
onPopoverMoved: () => void;
onPopoverHidden: () => void;
};
private popoverRef;
private popoverContentRef;
private currentPosition;
private currentDisplayValue;
private spreadsheetRect;
private containerRect;
setup(): void;
private computePopoverPosition;
}