UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

65 lines (64 loc) • 2.66 kB
import GirafeHTMLElement from '../../base/GirafeHTMLElement.js'; import IGirafePanel from '../../tools/state/igirafepanel.js'; import { CellContent, LayoutType } from '../../tools/state/layout.js'; declare class LayoutComponent extends GirafeHTMLElement implements IGirafePanel { protected templateUrl: string | null; protected styleUrls: string[] | null; template: () => import("uhtml").Hole; isPanelVisible: boolean; panelTitle: string; panelTogglePath: string; /** The Components the user can choose between for each Cell of the Grid. */ get availableComponents(): ({ readonly id: "map-2d"; readonly tagName: "girafe-map-2d"; readonly label: "2D Map"; } | { readonly id: "map-3d"; readonly tagName: "girafe-map-3d"; readonly label: "3D Map"; } | { readonly id: "streetview-google"; readonly tagName: "girafe-streetview-google"; readonly label: "Google Street View"; readonly provider: "google"; })[]; constructor(); private get layout(); /** The Layouts the user can choose between, as configured in the application. */ get allowedLayouts(): LayoutType[]; /** The Layouts the user can choose between, with the icon illustrating each of them. */ get layoutButtons(): { type: LayoutType; icon: string; }[]; /** The Cells of the current Layout, one line of the schema per row of the Grid. */ get cellRows(): { index: number; content: CellContent; }[][]; private registerEvents; togglePanel(visible: boolean): void; private onLayoutChanged; /** * uHtml only updates the <selected> attribute of the options, which the browser ignores * as soon as the user has interacted with a select. The values are therefore applied explicitly, * so that the panel also follows the changes made outside of it (shared state, other components). */ private syncSelects; onLayoutSelect(selectedLayout: LayoutType): void; /** * Places a Component in a Cell of the Grid. * A Component can only be displayed once: if it is already displayed in another Cell, * both Cells are swapped, so that the Component that was in the target Cell is not lost. */ onCellSelect(event: Event, cellIndex: number): void; /** Whether one of the Cells displays a 3D Map, which the shadows options depend on. */ get is3dDisplayed(): boolean; private onShadowsToggle; private setDateTimePicker; private update3dMapTimestamp; protected connectedCallback(): void; render(): void; } export default LayoutComponent;