mmo-workflow
1 symbol · generated 30 Sep 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 | |
| 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 | |
| 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:145Get the data of the workflow
- Type
object
config
accessormmo-workflow.jhs:161Get the config of the workflow
- Type
array
readonly
accessormmo-workflow.jhs:183Get the readonly of the workflow
- Type
boolean
entity
readonlyaccessormmo-workflow.jhs:289Get the entity of the workflow
step
accessormmo-workflow.jhs:337Get the step of the workflow
- Type
number
Methods18
constructor()
mmo-workflow.jhs:94init()
mmo-workflow.jhs:101block()
mmo-workflow.jhs:209Freeze the workflow while something is running: the buttons refuse clicks and the shell shows it.
| returns | void |
unblock()
mmo-workflow.jhs:220Give the workflow back to the user (block).
| returns | void |
save()
mmo-workflow.jhs:230Save the workflow
loadEntityFromUrl(path, collection, entityClass)
mmo-workflow.jhs:256Load 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:296Set the validated of the workflow
getContentById(id)
mmo-workflow.jhs:309Get the content by id
| id | string | - The id of the content |
| returns | Element | The content |
next()
mmo-workflow.jhs:322Go to the next step
previous()
mmo-workflow.jhs:329Go to the previous step
loadStep(value, show)
mmo-workflow.jhs:435Show 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:473Update the validity of the workflow
| step = null | number | - The step |
| returns | boolean | The validity |
isValid()
mmo-workflow.jhs:545Whether 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:556Render the timeline of the workflow
| root | HTMLUListElement | - The stepper <ul> element |
| content | array | - The content of the workflow |
renderTitle(root, content)
mmo-workflow.jhs:597Render 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:617Render 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:636Render 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:668Render 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> |