Wizard
Manage a flow that is used as an integration instance.

Configuration
Set up a new instance with config parameters and set/get methods:
const wizard = appmixer.ui.Wizard(config)
wizard.set(key, value)
wizard.get(key)config.el ...
config.el ...config.flowId
config.flowIdType: String | Default: null
The ID of a flow that is opened in the wizard.
Instance
State
wizard.state(name, value)loader
loaderType: Boolean | Default: null
Toggle a custom loading state.
error
errorType: String | Default: null
Toggle a custom error message.
Events
wizard.on(event, handler)flow:start
flow:startwizard.on('flow:start', flowId => {/* ... */})Submit the form and start the flow.
flow:validation
flow:validationwizard.on('flow:validation', errors => {/* ... */})Flow validation errors changed.
cancel
cancelwizard.on('cancel', () => {/* ... */})Click a button to close the form.
close
closewizard.on('close', () => {/* ... */})Submit the form and wait for the flow to start.
Example
const wizard = appmixer.ui.Wizard({
el: '#wizard',
flowId: 'your-integration-id'
})
wizard.on('flow:start', async flowId => {
await appmixer.api.startFlow(flowId)
wizard.close()
})
wizard.open()Last updated
Was this helpful?
