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

UI.Wizard


type alias Config msg model =
{ pageIndicatorTemplate : String
, nextButtonTemplate : String
, prevButtonTemplate : String
, finishButtonTemplate : String
, reviewButtonTemplate : String
, title : String
, onNextStep : State -> msg
, onGotoStep : { stepId : Basics.Int } -> State -> msg
, onNextPage : State -> msg
, onState : State -> msg
, onFinish : State -> msg
, onReview : State -> msg
, stepRenderer : model -> List (Html msg)
, currentPageRenderer : model -> List (Html msg)
, beforePageRenderer : model -> List (Html msg)
, afterPageRenderer : model -> List (Html msg)
, showReview : Basics.Bool 
}

Configuration for the Wizard.


type alias Page model =
{ title : String
, status : Engage.UI.Error.Status
, model : model 
}

A Page type


type alias ShoppingCart msg =
{ content : Html msg }

A ShoppingCart type


type SinglePageType
    = SinglePageInfo
    | SinglePageForm

A SinglePageType type


type State

A State type


type Step model

Wizard Step data

defaultConfig : { onState : State -> msg, onNextStep : State -> msg, onGotoStep : { stepId : Basics.Int } -> State -> msg, onNextPage : State -> msg, onFinish : State -> msg, onReview : State -> msg } -> Config msg model

Get the default config

getStepError : Step model -> Engage.UI.Error.Status

Get the Step error Status

getStepModel : Step model -> model

Get the Step model

getStepTitle : Step model -> String

Get the Step title

initialState : State

Get the initial State

multiPages : { title : String, pages : Engage.SelectDict.SelectDict Basics.Int (Page model) } -> Step model

Get a multi pages Step

singlePage : { singlePageType : SinglePageType, title : String, status : Engage.UI.Error.Status, model : model } -> Step model

Get a single page Step

wizard : { namespace : Engage.Namespace.Namespace, config : Config msg model, state : State, shoppingCart : ShoppingCart msg, isLoading : Basics.Bool, localize : String -> String } -> Engage.SelectDict.SelectDict Basics.Int (Step model) -> Html msg

Get the wizard view