mathiajusth/intl-phone-input/1.0.1

NOTE: the latest version is 1.0.2

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/mathiajusth/intl-phone-input is gone (deleted or private); Software Heritage has not archived the repo; no fork with tag 1.0.1 found (8 same-name repos checked); no cached copy. Use another version.

Details

IntlPhoneInput.Config

Contains types and helper functions for working with configuration of IntlPhoneInput

Config

type alias Config msg =
{ hash : String
, onChange : State -> PhoneNumber -> Cmd msg -> msg
, namespace : String
, countries : Dict String CountryData
, countriesSorter :
List ( String, CountryData ) -> List ( String, CountryData )
, dialCodeFormatter : String -> String
}

This record type holds all configuration of IntlPhoneInput.

config : String -> (State -> PhoneNumber -> Cmd msg -> msg) -> Config msg

Create the Config using a unique id value. The id is necessary if you have more than one IntlPhoneInput on your page.

type Msg
    = PhoneUpdated State PhoneNumber (Cmd Msg)


homePhoneConfig =
    config "HomePhone" PhoneUpdated

Helper Functions

getPhoneNumberInputId : Config msg -> String

Helper function to get the DOM id of the phone number <input /> element.