EngageSoftware / elm-engage-common / Engage.UI.Input

UI.Input

Text

text : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> String -> msg, status : Engage.UI.Error.Status, requiredText : Maybe String } -> State -> String -> Html msg

Get a text view

textArea : { namespace : Engage.Namespace.Namespace, id : String, helpText : String, labelText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> String -> msg, status : Engage.UI.Error.Status, requiredText : Maybe String } -> State -> String -> Html msg

Get a text area view

textWithAttributes : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> String -> msg, status : Engage.UI.Error.Status, requiredText : Maybe String } -> List (Html.Attribute msg) -> State -> String -> Html msg

Get a text with attributes view

textWithSize : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> String -> msg, status : Engage.UI.Error.Status, size : Engage.Styles.Class.Size, requiredText : Maybe String } -> State -> String -> Html msg

Get a text with size view

Password

password : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> String -> msg, status : Engage.UI.Error.Status, requiredText : Maybe String, strengthMeter : Maybe (List String), hasFocus : Maybe (Basics.Bool -> msg) } -> State -> String -> Html msg

Get a password input

passwordWithAttributes : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> String -> msg, status : Engage.UI.Error.Status, requiredText : Maybe String, strengthMeter : Maybe (List String), hasFocus : Maybe (Basics.Bool -> msg) } -> List (Html.Attribute msg) -> State -> String -> Html msg

Get a password with attributes input

Numbers

number : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> Maybe Basics.Int -> msg, status : Engage.UI.Error.Status, maxValue : Maybe Basics.Int, minValue : Maybe Basics.Int, requiredText : Maybe String } -> State -> Maybe Basics.Int -> Html msg

Get a number input

smallNumber : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> Maybe Basics.Int -> msg, status : Engage.UI.Error.Status, maxValue : Maybe Basics.Int, minValue : Maybe Basics.Int, requiredText : Maybe String } -> State -> Maybe Basics.Int -> Html msg

Get a small number view

bigNumber : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : State -> String -> msg, maxLength : Maybe Basics.Int, status : Engage.UI.Error.Status, requiredText : Maybe String } -> State -> String -> Html msg

Get a big number view

Checkboxes

checkBoxList : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> Set String -> msg, status : Engage.UI.Error.Status, items : List { id : String, content : Html msg }, requiredText : Maybe String } -> State -> Set String -> Html msg

Get a checkbox list view

checkbox : { namespace : Engage.Namespace.Namespace, labelText : String, helpText : String, onCheck : { onlyStateChange : Basics.Bool } -> State -> Basics.Bool -> msg, status : Engage.UI.Error.Status, state : State, requiredText : Maybe String } -> Basics.Bool -> Html msg

Get a checkbox view

checkboxWithAttributes : { namespace : Engage.Namespace.Namespace, labelText : String, helpText : String, onCheck : { onlyStateChange : Basics.Bool } -> State -> Basics.Bool -> msg, status : Engage.UI.Error.Status, state : State, requiredText : Maybe String } -> List (Html.Attribute msg) -> Basics.Bool -> Html msg

Get a checkbox with attributes view

File

file : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, browseText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> FileInfo -> msg, status : Engage.UI.Error.Status, requiredText : Maybe String } -> State -> FileInfo -> Html msg

Get a file view


type alias FileInfo =
{ name : String
, fileType : String
, progressPercentage : Maybe Basics.Float 
}

The FileInfo type

Phone

phone : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> PhoneState -> Engage.Entity.PhoneNumber.PhoneNumber -> Platform.Cmd.Cmd msg -> msg, status : Engage.UI.Error.Status, requiredText : Maybe String } -> PhoneState -> Engage.Entity.PhoneNumber.PhoneNumber -> Html msg

Get the phone view


type alias PhoneState =
{ message : Engage.UI.Message.State
, phoneInput : IntlPhoneInput.State 
}

A PhoneState type

initialPhoneState : PhoneState

Get the initial PhoneState

Misc

radioList : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : { onlyStateChange : Basics.Bool } -> State -> String -> msg, status : Engage.UI.Error.Status, items : List { id : String, content : Html msg }, requiredText : Maybe String } -> State -> String -> Html msg

Get a radio list view

reset : State

Reset the State

date : { namespace : Engage.Namespace.Namespace, id : String, labelText : String, helpText : String, onChange : State -> Maybe Date -> msg, onFocusChange : Maybe (Basics.Bool -> msg), status : Engage.UI.Error.Status, requiredText : Maybe String } -> State -> Maybe Date -> Html msg

Get the date input view

State


type State

A State type

initialState : State

Get the initial State