@odoo/o-spreadsheet
Version:
A spreadsheet component
83 lines (82 loc) • 2.92 kB
TypeScript
import { Component } from "@odoo/owl";
import { Model } from "../../model";
import { Store } from "../../store_engine";
import { HeaderGroup, Pixel } from "../../types";
import { SpreadsheetChildEnv } from "../../types/spreadsheet_env";
import { NotificationStoreMethods } from "../../types/stores/notification_store_methods";
import { BottomBar } from "../bottom_bar/bottom_bar";
import { SpreadsheetDashboard } from "../dashboard/dashboard";
import { FullScreenFigure } from "../full_screen_figure/full_screen_figure";
import { Grid } from "../grid/grid";
import { HeaderGroupContainer } from "../header_group/header_group_container";
import { SidePanelStore } from "../side_panel/side_panel/side_panel_store";
import { SidePanels } from "../side_panel/side_panels/side_panels";
import { SmallBottomBar } from "../small_bottom_bar/small_bottom_bar";
import { SpreadsheetPrint } from "../spreadsheet_print/spreadsheet_print";
import { TopBar } from "../top_bar/top_bar";
export interface SpreadsheetProps extends Partial<NotificationStoreMethods> {
model: Model;
colorScheme?: "dark" | "light";
}
export declare class Spreadsheet extends Component<SpreadsheetProps, SpreadsheetChildEnv> {
static template: string;
static props: {
model: ObjectConstructor;
notifyUser: {
type: FunctionConstructor;
optional: boolean;
};
raiseError: {
type: FunctionConstructor;
optional: boolean;
};
askConfirmation: {
type: FunctionConstructor;
optional: boolean;
};
colorScheme: {
type: StringConstructor;
optional: boolean;
};
};
static components: {
TopBar: typeof TopBar;
Grid: typeof Grid;
BottomBar: typeof BottomBar;
SmallBottomBar: typeof SmallBottomBar;
SidePanels: typeof SidePanels;
SpreadsheetDashboard: typeof SpreadsheetDashboard;
HeaderGroupContainer: typeof HeaderGroupContainer;
FullScreenFigure: typeof FullScreenFigure;
SpreadsheetPrint: typeof SpreadsheetPrint;
};
sidePanel: Store<SidePanelStore>;
spreadsheetRef: {
el: HTMLElement | null;
};
spreadsheetRect: import("../..").Rect;
state: {
printModeEnabled: boolean;
};
private _focusGrid?;
private isViewportTooSmall;
private notificationStore;
private composerFocusStore;
get model(): Model;
getStyle(): string;
setup(): void;
private bindModelEvents;
private unbindModelEvents;
private checkViewportSize;
focusGrid(): void;
get gridHeight(): Pixel;
get gridContainerStyle(): string;
get rowLayers(): HeaderGroup[][];
get colLayers(): HeaderGroup[][];
getGridSize(): {
width: number;
height: number;
};
getSpreadSheetClasses(): string;
exitPrintMode(): void;
}