Renamed to specialelektronik/elm-autocomplete. It is published under that name, and new versions come out there.
Versions published as special-elektronik/elm-autocomplete still install under that name. 1 version of 1 come from the new location (see their notes).
Rerouted (renamed, needs approval). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/Specialelektronik/elm-autocomplete.
What we checked: The repo moved to github.com/Specialelektronik/elm-autocomplete and tag 1.0.0 is there; its commit 55fb359107cc is from 2020-08-12 16:10 UTC, after the version was published (2020-08-11 12:25 UTC); elm.json differs from package.elm-lang.org's; the exposed modules match docs.json; the zip's SHA-1 is not the published one and nothing else confirms its contents.
We could not verify this copy against what was published, so the Lamdera compiler asks before using it (y/n). Without a terminal, as in CI, it stops with an error unless approved:
lamdera make --auto-approve-package-rerouting approves rerouted versions for that run,LAMDERA_AUTO_APPROVE_PACKAGE_REROUTING=1 does the same for every run in that environment,LAMDERA_CACHE=off skips the Lamdera package server altogether: packages come from package.elm-lang.org and GitHub only, as with elm, and a rerouted version then fails to download.Details · package.elm-lang.org's zip: https://github.com/special-elektronik/elm-autocomplete/zipball/1.0.0/
An opinionated autocomplete component that fits our needs. It's broken into its own package because we need to use it in multiple applications. The autocomplete waits for at least 3 characters and 200 milliseconds before any command is triggered.
The Autocomplete needs a config:
transform: Into what Msg should be encode all internal autocomplete messages to?
fetch: The autocomplete let your application handle the fetching of suggestions. Supply a function that takes a string and returns a Command. To store the suggestions, call setSuggestions when the command completes with an OK.
submit: The message that will be triggered when the user submits a query. Perhaps you want to send the user to a search result page? This does not means that there is a matching suggestion. Imagine the user enters "Karls" and the suggestions return "Karlstad" and "Karlshamn" but the user really want to search for "Karlslund"
chose: The message that will be triggered when the user chooses a suggestion
focus: The message what will be triggered when the user focuses in the input element.
Initialize the component with an optional query
Update the Autocomplete and optionally return a Msg that the parent function should issue.
NOTE: If the maybeMsg is Just, than the cmd must be Cmd.none and ignored by the parent function.
Update the component with your suggestions
Opaque type for internal messages
View the input tag
Retrieve values intented for the view. The index field potentially holds the index of the selected suggestion.
The components internal state, the parameter
ais the type of suggestions that you would like the autocomplete to return. It could be as simple as a string och any other type you'd like.