@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
68 lines (67 loc) • 3.27 kB
TypeScript
import GirafeHTMLElement from '../../base/GirafeHTMLElement.js';
import LayerWms from '../../models/layers/layerwms.js';
import ColumnAliasHelper from '../../tools/utils/aliases.js';
import IGirafePanel from '../../tools/state/igirafepanel.js';
import LayerFilterElement from './layerfilterelement.js';
import FilterConditionElement from './filterconditionelement.js';
declare class AdvancedFilterComponent extends GirafeHTMLElement implements IGirafePanel {
protected templateUrl: string | null;
protected styleUrls: string[] | null;
template: () => import("uhtml").Hole;
isPanelVisible: boolean;
panelTitle: string;
panelTogglePath: string;
loading: boolean;
private readonly debouncedUpdateFilterItems;
layers: LayerWms[];
layerFilterElements: LayerFilterElement[];
columnAliasHelper: ColumnAliasHelper;
layerIsRefreshing: Map<number, boolean>;
private csvDownloader;
constructor();
render(): void;
registerEvents(): void;
private updateFilterableLayerList;
/**
* Updates the list of filter elements based on the current state of the layers in the layer tree.
*/
private updateFilterItemsByLayerState;
/**
* Determines whether the given layer is selectable based on its visibility and absence in other filter elements.
*/
isLayerSelectable(filterElement: LayerFilterElement, layer: LayerWms): boolean;
/**
* Combine layer name and name of the parent group for easier identification.
*/
getLayerDisplayName(layer: LayerWms): string;
onFilterAdded(): void;
private addEmptyFilterElement;
/**
* Uses the already existing filter object in the layer to create a filter element in the UI.
*/
private addFilterElementFromLayer;
onFilterRemoved(filterElement: LayerFilterElement): void;
/**
* Removes a filter element from the UI and optionally from the layer.
* Note that the filter should only be removed from the layer if this was triggered by a user action in this component.
*/
private removeFilterElement;
private onFilterChangedInLayerTree;
onLayerChanged(filterElement: LayerFilterElement, e: Event): Promise<void>;
onConditionRemoved(filterElement: LayerFilterElement, condition: FilterConditionElement): void;
onConditionAdded(filterElement: LayerFilterElement): void;
onLogicalOperatorChanged(condition: FilterConditionElement, e: Event): void;
onAttributeChanged(filterElement: LayerFilterElement, condition: FilterConditionElement, e: Event): void;
onOperatorChanged(condition: FilterConditionElement, e: Event): void;
onValueChanged(condition: FilterConditionElement, e: Event): void;
onValue2Changed(condition: FilterConditionElement, e: Event): void;
onChoiceChanged(condition: FilterConditionElement, _e: Event): void;
onConditionApplied(filterElement: LayerFilterElement, condition: FilterConditionElement): void;
onFilterInverted(filterElement: LayerFilterElement): void;
private applyFilter;
onDownloadLayerData(filterElements?: LayerFilterElement[]): Promise<void>;
hasNonAppliedFilters(): boolean;
togglePanel(visible: boolean): void;
protected connectedCallback(): void;
}
export default AdvancedFilterComponent;