/* * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * For full license text, see the LICENSE.txt file */ /** * The `lightning/inputLocation` component represents a geolocation compound field that accepts a latitude and longitude value. * @see {@link https://developer.salesforce.com/docs/component-library/bundle/lightning-input-location/documentation |Lightning Input Location Documentation} */ declare module "lightning/inputlocation" { import { LightningElement } from "lwc"; /** * Represents a geolocation compound field that accepts a latitude and longitude value. */ export default class LightningInputLocation extends LightningElement { /** * The label of the geolocation compound field. */ label: string; /** * Help text detailing the purpose and function of the input. */ fieldLevelHelp: string; /** * The latitude value. Latitude values must be within -90 and 90. */ latitude: string; /** * The longitude value. Longitude values must be within -180 and 180. */ longitude: string; /** * If present, the geolocation fields are disabled and users cannot interact with them. */ disabled: boolean; /** * If present, the geolocations fields are read-only and cannot be edited. */ readOnly: boolean; /** * If present, the geolocation fields must be filled out before the form is submitted. * An error message is displayed if a user interacts with the field * and does not provide a value. */ required: boolean; /** * The variant changes the appearance of a geolocation compound field. * Accepted variants include standard, label-hidden, label-inline, and label-stacked. * This value defaults to standard. * Use label-hidden to hide the label but make it available to assistive technology. * Use label-inline to horizontally align the label and geolocation fields. * Use label-stacked to place the label above the geolocation fields. * @default standard */ variant: "standard" | "label-hidden" | "label-inline" | "label-stacked"; /** * Represents the validity states that an element can be in, with respect to constraint validation. */ validity: ValidityState; /** * Sets focus on the latitude field. */ focus(): void; /** * Removes keyboard focus from the latitude and longitude fields. */ blur(): void; /** * Returns the valid attribute value (Boolean) on the ValidityState object. */ checkValidity(): boolean; /** * Displays error messages on the latitude or longitude field if the coordinates are invalid. */ showHelpMessageIfInvalid(): void; /** * Sets a custom error message to be displayed for the latitude or longitude field when * the value is submitted. */ setCustomValidityForField(message: string, fieldName: string): void; /** * Displays the error messages and returns false if the input is invalid. * If the input is valid, reportValidity() clears displayed error messages and returns true. */ reportValidity(): boolean; } }