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.flowId
Type: String
| Default: null
The ID of a flow that is opened in the wizard.
Instance
State
wizard.state(name, value)
loader
loader
Type: Boolean
| Default: null
Toggle a custom loading state.
error
error
Type: String
| Default: null
Toggle a custom error message.
Events
wizard.on(event, handler)
flow:start
flow:start
wizard.on('flow:start', flowId => {/* ... */})
Submit the form and start the flow.
flow:validation
flow:validation
wizard.on('flow:validation', errors => {/* ... */})
Flow validation errors changed.
cancel
cancel
wizard.on('cancel', () => {/* ... */})
Click a button to close the form.
close
close
wizard.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?