mmo-workflow
1 symbol · generated 5 Oct 2026
mmo-workflow
mmo-workflow.jhs:1Workflow element to display a workflow
- Extends
- CustomElement
Index
| readonly | if true, the workflow is readonly | |
| step | the current step of the workflow | |
| ViewDefault static readonly accessor | ||
| data accessor | Get the data of the workflow | |
| config accessor | Get the config of the workflow | |
| readonly accessor | Get the readonly of the workflow | |
| entity readonly accessor | Get the entity of the workflow | |
| step accessor | Get the step of the workflow | |
| constructor() | ||
| init() | ||
| block() | Freeze the workflow while something is running: the buttons refuse clicks and the shell shows it. | |
| unblock() | Give the workflow back to the user (block). | |
| save() | Save the workflow | |
| loadEntityFromUrl(path, collection, entityClass) | Load an entity from the parameters in the url | |
| setValidated() | Set the validated of the workflow | |
| getContentById(id) | Get the content by id | |
| next() | Go to the next step | |
| previous() | Go to the previous step | |
| goto(index) | Go to a step clicked in the stepper: unlike next/previous, a validation already passed is shown rather than skipped, so that its state can be read. | |
| loadStep(value, show) | Show one step: its view is rendered the first time it is reached, then kept. | |
| updateValidity(step) | Update the validity of the workflow | |
| stepOf(node) | The step whose view holds a node. | |
| isValid() | Whether the workflow can be validated as it stands. | |
| renderTimeline(root, content) | Render the timeline of the workflow | |
| renderTitle(root, content) | Render one title entry of the stepper: a heading between two steps. | |
| renderHtml(root, content) | Render one html entry of the stepper: a free block, for a note or a summary. | |
| renderStep(root, content) | Render a step/info item in the stepper | |
| renderValidation(root, content, valid) | Render a validation item in the stepper |
Attributes2
readonly
mmo-workflow.jhsif true, the workflow is readonly
readonly
step
mmo-workflow.jhsthe current step of the workflow
step
Properties6
ViewDefault
staticreadonlyaccessormmo-workflow.jhs:80data
accessormmo-workflow.jhs:148Get the data of the workflow
- Type
object
config
accessormmo-workflow.jhs:164Get the config of the workflow
- Type
array
readonly
accessormmo-workflow.jhs:186Get the readonly of the workflow
- Type
boolean
entity
readonlyaccessormmo-workflow.jhs:301Get the entity of the workflow
step
accessormmo-workflow.jhs:349Get the step of the workflow
- Type
number
Methods20
constructor()
mmo-workflow.jhs:94init()
mmo-workflow.jhs:101block()
mmo-workflow.jhs:212Freeze the workflow while something is running: the buttons refuse clicks and the shell shows it.
| returns | void |
unblock()
mmo-workflow.jhs:223Give the workflow back to the user (block).
| returns | void |
save()
mmo-workflow.jhs:233Save the workflow
loadEntityFromUrl(path, collection, entityClass)
mmo-workflow.jhs:259Load an entity from the parameters in the url
| path | string | - The path to store the entity in data |
| collection | string | - The entity's collection |
| entityClass | string | - The entity's class |
setValidated()
mmo-workflow.jhs:308Set the validated of the workflow
getContentById(id)
mmo-workflow.jhs:321Get the content by id
| id | string | - The id of the content |
| returns | Element | The content |
next()
mmo-workflow.jhs:334Go to the next step
previous()
mmo-workflow.jhs:341Go to the previous step
goto(index)
mmo-workflow.jhs:454Go to a step clicked in the stepper: unlike next/previous, a validation already passed is shown rather than skipped, so that its state can be read.
| index | number | - the step's index in the config |
| returns | void |
loadStep(value, show)
mmo-workflow.jhs:466Show one step: its view is rendered the first time it is reached, then kept.
| value | string | - the step's id |
| show = true | boolean | - false to prepare the view without showing it |
| returns | void |
updateValidity(step)
mmo-workflow.jhs:504Update the validity of the workflow
| step = null | number | - The step |
| returns | boolean | The validity |
stepOf(node)
mmo-workflow.jhs:593The step whose view holds a node.
| node | Node | |
| returns | ?number | null when no step's view holds it |
isValid()
mmo-workflow.jhs:604Whether the workflow can be validated as it stands.
| returns | boolean | true when every step the workflow has been through is valid |
renderTimeline(root, content)
mmo-workflow.jhs:615Render the timeline of the workflow
| root | HTMLUListElement | - The stepper <ul> element |
| content | array | - The content of the workflow |
renderTitle(root, content)
mmo-workflow.jhs:656Render one title entry of the stepper: a heading between two steps.
| root | HTMLElement | - the stepper |
| content | object | - the entry: text, icon, level |
| returns | HTMLElement |
renderHtml(root, content)
mmo-workflow.jhs:676Render one html entry of the stepper: a free block, for a note or a summary.
| root | HTMLElement | - the stepper |
| content | object | - the entry: text, id, and a tone class |
| returns | HTMLElement |
renderStep(root, content)
mmo-workflow.jhs:695Render a step/info item in the stepper
| root | HTMLUListElement | - The stepper <ul> element |
| content | object | - The content config |
| returns | HTMLLIElement | The created <li> |
renderValidation(root, content, valid)
mmo-workflow.jhs:729Render a validation item in the stepper
| root | HTMLUListElement | - The stepper <ul> element |
| content | object | - The content config |
| valid | boolean | - The validity |
| returns | HTMLLIElement | The created <li> |