@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
99 lines (98 loc) • 3.03 kB
TypeScript
import GirafeResizableElement from '../../base/GirafeResizableElement';
import { type TabHeader } from './tools/selectiontabulatormanager';
/**
* Represents a selection grid component based on GridJs.
* Display itself when it should be visible and have selected features.
* To be visible, it has to be the defined selectionComponent.
* @extends GirafeResizableElement
*/
declare class SelectionGridComponent extends GirafeResizableElement {
template: () => import("uhtml").Hole;
private readonly eventsCallbacks;
private readonly selectionTabulatorManager;
private readonly csvManager;
private readonly mapManager;
private isVisibleComponentSetup;
private readonly debounceOnFeaturesSelected;
visible: boolean;
currentTabId: string;
showCsvButton: boolean;
constructor();
connectedCallback(): void;
/**
* Render the component regarding its visibility.
*/
render(): void;
/**
* @returns The current array of TabHeader objects.
*/
getTabHeaders(): TabHeader[];
/**
* Activates the specified tab, renders the grid, and displays the grid for the specified id.
*/
displayGrid(id: string, replaceData?: boolean): void;
/**
* Clean the grid, closes the panel and deselect the selected features.
*/
closePanel(): void;
/**
* Selects all rows in the grid.
*/
selectAll(): void;
/**
* Deselects all rows in the grid.
*/
selectNone(): void;
/**
* Inverts the selection of all rows in the grid.
*/
invertSelection(): void;
/**
* Zooms to the extent of the selected rows in the grid.
*/
zoomToSelection(): void;
/**
* Generates a CSV file from the selected rows in the grid.
*/
generateCSV(): void;
/**
* Renders the component by calling the necessary methods.
* @private
*/
private renderComponent;
/**
* Sets up the components state and side-kicks.
* This must be called once at the first (visible) rendering.
* @private
*/
private setupVisibleComponent;
/**
* Render a placeholder, not visible component on hide.
* Removes event registration.
* @private
*/
private renderEmptyComponent;
/**
* Event about visibility that must be always listened by this component, even hidden.
* @private
*/
private registerVisibilityEvents;
/**
* Listen events that must be listened if the component is visible.
* @private
*/
private registerEvents;
/**
* Handles the selected features and updates the grid data accordingly or
* close the panel if no data is selected.
* @private
*/
private onFeaturesSelected;
/**
* Toggles the panel visibility. If visible, tries to display a grid with selected feature.
* Can only be visible if the component is the wanted selection component.
* @private
*/
private togglePanel;
}
export default SelectionGridComponent;