Reference to alerts container
Reference to accessibility announcer
Input blur event listener
Address Finder API cache
Ideal Postcodes API Client
Reference to container wrapping AddressFinder elements DOM element. This includes the main component, input fields and WAI-ARIA controls
Current search context
Current list of context suggestions
Reference to country icon
Reference to input DOM element
Country form input change listener
Reference to country toggle message
Reference to country select toggle button
Index of current elem in list selected
Reference to the DOM, to which this.scope belongs
Input focus event listener
Address Finder state machine
ID generation method
Reference to input DOM element
Input element input event listener
Caches input style prior to Address Finder attachment
Input keydown event listener
Reference to Address Suggestion list DOM element
Reference to inner container wrapping list and toolbar
Reference to Address Finder message DOM element
Current notification to be shown to user
Caches options
Scopes the DOM for fields which should receive address inputs
Caches previous placeholder value for input
Debounced method used to retrieve suggestions
Scopes the DOM for the entire controller
Current list of address suggestions
Reference to toolbar at bottom of finder list
Reference to clickable Unhide link
Unhide click event listener
Resolves a suggestion to full address and apply results to form
Adds Address Finder to DOM
Removes Address Finder from DOM
Sets message as a list item, no or empty string removes any message
Set address finder suggestions
Controller
The Autocomplete Controller class acts as the public class which you may wield to enable address autocomplete on your HTML address forms
When instantiated, the controller will serve as a bridge beteen the address suggestion view presented on the DOM and the Ideal Postcodes Address resolution HTTP APIs
The role of the controller is to bind to events produced by the user interface and take appropriate action including querying the API, modifying other aspects of the DOM.