import type { CSSResultGroup } from 'lit'; import TerraElement from '../../internal/terra-element.js'; import TerraDropdown from '../dropdown/dropdown.component.js'; import TerraInput from '../input/input.component.js'; import TerraMap from '../map/map.component.js'; import { LatLng } from '../map/models/LatLng.js'; import type { LatLngBounds } from '../map/models/LatLngBounds.js'; /** * @summary A component that allows input of coordinates and rendering of map. * @documentation https://terra-ui.netlify.app/components/spatial-picker * @status stable * @since 1.0 */ export default class TerraSpatialPicker extends TerraElement { static styles: CSSResultGroup; static dependencies: { 'terra-map': typeof TerraMap; 'terra-input': typeof TerraInput; 'terra-dropdown': typeof TerraDropdown; }; minZoom: number; maxZoom: number; zoom: number; hasNavigation: boolean; hasCoordTracker: boolean; hasShapeSelector: boolean; /** * Whether bounding box selection is allowed via the draw toolbar. * Mirrors the terra-map attribute name for consistency. */ showBoundingBoxSelection: boolean; /** * Whether polygon selection is allowed via the draw toolbar. * Mirrors the terra-map attribute name for consistency. */ showPolygonSelection: boolean; /** * @deprecated Use show-bounding-box-selection instead. */ set hideBoundingBoxSelection(value: boolean); get hideBoundingBoxSelection(): boolean; /** * Whether point selection is allowed via the draw toolbar. */ showPointSelection: boolean; /** * @deprecated Use show-point-selection instead. */ set hidePointSelection(value: boolean); get hidePointSelection(): boolean; /** Initial/current value of the picker. */ initialValue: string | LatLng | LatLngBounds; hideLabel: boolean; label: string; /** * Spatial constraints extent: 'west, south, east, north'. * Draws a visual overlay on the map and rejects draws outside this area. */ spatialConstraints: string; isExpanded: boolean; worldWrap: boolean; inline: boolean; showMapOnFocus: boolean; urlState: boolean; helpText: string; /** * Whether to show a close button in the dropdown header (only applies when inline is false) */ showClose: boolean; /** The canonical serialized value passed down to terra-map. */ private mapValue; error: string; dropdownRef: import("lit-html/directives/ref.js").Ref; terraInput: TerraInput; map: TerraMap; private get _allowedTypes(); firstUpdated(): void; setValue(value: string | LatLng | LatLngBounds): void; clear(): void; open(): void; close(): void; setOpen(open: boolean): void; private _input; private _change; private _keydown; private _blur; private _focus; private _click; private _handleMapChange; private handleDropdownShow; private handleDropdownHide; /** * Parse, validate and commit a raw string value. */ private _validateAndCommit; /** * Apply a value without going through the validation pipeline * (used for initialValue / setValue where we still want to display what * was given, but we do want to show an error if it's malformed). */ private _applyValue; /** * Commit a validated value: sync UI, mapValue, URL, and emit. */ private _commit; private _clearValue; private _emitChange; private _updateURLParam; renderMap(): import("lit-html").TemplateResult<1>; private _inputTemplate; render(): import("lit-html").TemplateResult<1>; }