@finos/legend-data-cube
Version:
83 lines • 3.57 kB
TypeScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export type WindowSpecification = {
x: number;
y: number;
width: number;
height: number;
};
export type WindowConfiguration = {
x?: number | undefined;
y?: number | undefined;
width?: number | undefined;
height?: number | undefined;
minWidth?: number | undefined;
minHeight?: number | undefined;
center?: boolean | undefined;
};
export declare class LayoutConfiguration {
title: string;
readonly contentRenderer: (config: LayoutConfiguration) => React.ReactNode;
window: WindowConfiguration;
constructor(title: string, contentRenderer: (config: LayoutConfiguration) => React.ReactNode);
}
export declare class WindowState {
readonly uuid: string;
readonly configuration: LayoutConfiguration;
readonly onClose?: (() => void) | undefined;
ownerId?: string | undefined;
specification?: WindowSpecification | undefined;
constructor(configuration: LayoutConfiguration, onClose?: (() => void) | undefined, ownerId?: string | undefined);
setSpecification(val: WindowSpecification): void;
}
export declare const WINDOW_DEFAULT_OFFSET = 50;
export declare const WINDOW_DEFAULT_WIDTH = 800;
export declare const WINDOW_DEFAULT_HEIGHT = 600;
export declare const WINDOW_DEFAULT_MIN_WIDTH = 300;
export declare const WINDOW_DEFAULT_MIN_HEIGHT = 300;
export declare const DEFAULT_TOOL_PANEL_WINDOW_CONFIG: WindowConfiguration;
export declare const DEFAULT_ALERT_WINDOW_CONFIG: WindowConfiguration;
export declare class DisplayState {
private readonly layout;
readonly configuration: LayoutConfiguration;
readonly ownerId?: string | undefined;
window?: WindowState | undefined;
constructor(layout: LayoutManager, title: string, contentRenderer: (config: LayoutConfiguration) => React.ReactNode, ownerId?: string | undefined);
get isOpen(): boolean;
open(): void;
close(): void;
}
export declare class LayoutManager {
windows: WindowState[];
constructor();
newDisplay(title: string, contentRenderer: (config: LayoutConfiguration) => React.ReactNode, windowConfiguration?: WindowConfiguration | undefined, ownerId?: string | undefined): DisplayState;
newWindow(window: WindowState, ownerId?: string | undefined): void;
bringWindowFront(window: WindowState): void;
closeWindow(window: WindowState): void;
closeWindows(windows: WindowState[]): void;
}
export declare class DataCubeLayoutService {
readonly uuid: string;
readonly manager: LayoutManager;
constructor(manager?: LayoutManager | undefined);
get windows(): WindowState[];
newDisplay(title: string, contentRenderer: (config: LayoutConfiguration) => React.ReactNode, windowConfiguration?: WindowConfiguration | undefined): DisplayState;
newWindow(window: WindowState): void;
bringWindowFront(window: WindowState): void;
closeWindow(window: WindowState): void;
dispose(): void;
}
//# sourceMappingURL=DataCubeLayoutService.d.ts.map