Module

Lumi.Components.Wizard

Package
purescript-lumi-components
Repository
lumihq/purescript-lumi-components

#Wizard Source

newtype Wizard step (props :: Type) value a

A Wizard is a sequential computation of FormBuilders, representing, each one, a wizard step that can depend on the result of previous steps to produce a final result.

Wizard is a monadic DSL that contains only a single instruction: step.

Instances

#step Source

step :: forall value props step. step -> (FormBuilder { readonly :: Boolean | props } value) ~> (Wizard step { readonly :: Boolean | props } value)

Lift a FormBuilder and an associated identifier of type step into a Wizard step.

#revalidate Source

revalidate :: forall a value props step. Wizard step props value a -> props -> value -> Maybe a

Revalidate a Wizard, returning the final result if, with the given value, all steps produce valid results.

#WizardStep Source

newtype WizardStep step (props :: Type) value a

WizardStep is a suspended Wizard computation, that is, a Wizard whose execution has been stopped at some step. It can be thought of as a Wizard zipper.

Instances

#stepIdentifier Source

stepIdentifier :: forall a value props step. WizardStep step props value a -> Maybe step

Retrieve the identifier for the focused step of a WizardStep. Returns Nothing if the WizardStep represents a finalized Wizard.

#liftStep Source

liftStep :: forall value props step. (Wizard step props value) ~> (WizardStep step props value)

Lifts a Wizard into a WizardStep that focuses on its first step.

#resumeStep Source

resumeStep :: forall a value props step. WizardStep step props value a -> props -> value -> Maybe (Either (WizardStep step props value a) a)

Resume a suspended WizardStep, if the current step produces a valid result, returning either the next WizardStep or the final result.

#previousStep Source

previousStep :: forall a value props step. WizardStep step props value a -> Maybe (WizardStep step props value a)

Return the previous step, if there is one.

#gotoStep Source

gotoStep :: forall a value props step. Ord step => step -> Wizard step props value a -> props -> value -> Maybe (WizardStep step props value a)

Given that the step identifiers for the supplied Wizard are ordered, go to the first step in a Wizard that is assigned to the given identifier, if found.

#wizard Source

wizard :: forall a value props step. { forceTopLabels :: Boolean, inlineTable :: Boolean, onChange :: (value -> value) -> Effect Unit, step :: WizardStep step (Record props) value a, value :: value | props } -> JSX

A component that renders a WizardStep (a suspended Wizard).

Modules
JSS
Lumi.Components.Border
Lumi.Components.Breadcrumb
Lumi.Components.Button
Lumi.Components.ButtonGroup
Lumi.Components.Card
Lumi.Components.CardGrid
Lumi.Components.Color
Lumi.Components.Column
Lumi.Components.Divider
Lumi.Components.DropdownButton
Lumi.Components.EditableTable
Lumi.Components.FetchCache
Lumi.Components.FixedPrecisionInput
Lumi.Components.Form
Lumi.Components.Form.Defaults
Lumi.Components.Form.Internal
Lumi.Components.Form.Table
Lumi.Components.Form.Validation
Lumi.Components.Icon
Lumi.Components.Images
Lumi.Components.Input
Lumi.Components.InputGroup
Lumi.Components.LabeledField
Lumi.Components.Layouts
Lumi.Components.Layouts.Centered
Lumi.Components.Layouts.OneColumnWithHeader
Lumi.Components.Layouts.Tabs
Lumi.Components.Link
Lumi.Components.List
Lumi.Components.Loader
Lumi.Components.Lockup
Lumi.Components.Modal
Lumi.Components.NativeSelect
Lumi.Components.Navigation
Lumi.Components.Orientation
Lumi.Components.Pagination
Lumi.Components.Pill
Lumi.Components.Progress
Lumi.Components.Responsive
Lumi.Components.Row
Lumi.Components.Select
Lumi.Components.Select.Backend
Lumi.Components.Size
Lumi.Components.Slider
Lumi.Components.Spacing
Lumi.Components.Status
Lumi.Components.StatusSlat
Lumi.Components.Styles
Lumi.Components.Svg
Lumi.Components.Tab
Lumi.Components.Table
Lumi.Components.Table.FilterDropdown
Lumi.Components.Text
Lumi.Components.Textarea
Lumi.Components.Toast
Lumi.Components.Tooltip
Lumi.Components.Upload
Lumi.Components.Utility.ReactRouter
Lumi.Components.Wizard
Lumi.Components.ZIndex