@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
37 lines (36 loc) • 1.41 kB
TypeScript
import GirafeResizableElement from '../../base/GirafeResizableElement';
/**
* A panel component that extends GirafeResizableElement.
* Used as main Left and Right panels on the app.
* It has a state toggle manager that can activate or deactivate
* toggle paths based on changes in its state.
* It also has methods to shows/hide itself based on the state toggle paths and state.
*
* To have the toggle on the state working, the component must have this structure, with
* a slot="main" and children with the data-toggle-path set:
* <girafe-lr-panel>
* <any slot="main" data-toggle-path="my.state.path1.to.boolean"></any>
* <any slot="main" data-toggle-path="my.state.path2.to.boolean"></any>
* </girafe-lr-panel>
*/
declare class LRPanelComponent extends GirafeResizableElement {
template: () => import("uhtml").Hole;
private readonly stateToggleManager;
title: string;
private panelTitles;
get hasMultipleChilds(): boolean;
constructor();
/**
* Closes the panel by deactivating all state toggles and hiding itself.
*/
closePanel(): void;
/**
* Retrieve the (valid boolean) toggle paths from child elements of the main slot.
*/
private retrieveTogglePaths;
/**
* Subscribes to changes in togglePaths and shows or hides the component based on the changes.
*/
private showOnChildChange;
}
export default LRPanelComponent;