EngageSoftware/elm-engage-common/8.2.8

NOTE: the latest version is 8.2.10

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 : 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 : Bool
}

Configuration for the Wizard.

  • pageIndicatorTemplate: uses mustache templates. Default: "Page {{ current }} of {{ total }}"
  • onState: callback function for when internal state of the wizard changes.
type alias Page model =
{ title : String
, status : Status
, model : model
}

A Page type

type alias ShoppingCart msg =
{ content : Html msg }

A ShoppingCart type

= SinglePageInfo
| SinglePageForm

A SinglePageType type

type State

A State type

type Step model

Wizard Step data

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

Get the default config

Get the Step error Status

getStepModel : Step model -> model

Get the Step model

getStepTitle : Step model -> String

Get the Step title

Get the initial State

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

Get a multi pages Step

{ singlePageType : SinglePageType
, title : String
, status : Status
, model : model
}
-> Step model

Get a single page Step

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

Get the wizard view