Components

ProcessEditor

<ProcessEditor appStarted loadedContract loadContract loadContractError setLoadContractError />

Constructor

# <ProcessEditor appStarted loadedContract loadContract loadContractError setLoadContractError />

Enables to create and edit a contract process model. Changes can be saved.

PropTypes:
Name Type Required Description Default
appStarted bool No App started indicator from store.
loadedContract object No Loaded contract from store.
loadContract func Yes Action to load a contract in the store.
loadContractError bool No Load contract error indicator from store.
setLoadContractError func Yes Action to set load contract error indicator in the store.

View Source components/ProcessEditor.js, line 49

Members

Object

# inner constant canvasRef

Canvas HTML element for modeler reference hook.

View Source components/ProcessEditor.js, line 81

Object

# inner constant commandStackRef

Command stack of modeler reference hook. Enables handling of undo/redo.

View Source components/ProcessEditor.js, line 97

Object

# inner constant linkSaveSVGRef

Link for SVG reference hook.

View Source components/ProcessEditor.js, line 371

Object

# inner constant linkSaveXMLRef

Link for XML reference hook.

View Source components/ProcessEditor.js, line 379

Object

# inner constant modelerRef

Process modeler object reference hook.

View Source components/ProcessEditor.js, line 65

Object

# inner constant processEditorContainerRef

Process editor container HTML element reference hook.

View Source components/ProcessEditor.js, line 73

Object

# inner constant propertiesPanelRef

Properties panel HTML element for modeler reference hook.

View Source components/ProcessEditor.js, line 89

Object

# inner constant toggleModalButtonRef

Toggle save changes modal reference hook.

View Source components/ProcessEditor.js, line 336

Object

# inner constant toggleSavedToastRef

Toggle saved modal reference hook.

View Source components/ProcessEditor.js, line 328

Methods

# inner createNewDiagram()

Attempts to create a diagram in XML with process modeler.

View Source components/ProcessEditor.js, line 255

# inner encodeDownload(link, name, data)

Encodes the download of files.

Parameters:
Name Type Description
link Object
name string
data *

View Source components/ProcessEditor.js, line 422

# inner handleKeyDown(e)

Handles CTRL + Z and CTRL + SHIFT + Z with the command stack of the modeler.

Parameters:
Name Type Description
e Object

Triggering event.

View Source components/ProcessEditor.js, line 130

# inner handleRedo()

Handles redo with the command stack of the modeler.

View Source components/ProcessEditor.js, line 148

# inner handleResize(event, size)

Updates the value of "viewerHeight" when user drags the corner of Resizable component.

Parameters:
Name Type Description
event Object

Triggered event.

size Object

Updated size of Resizable component.

View Source components/ProcessEditor.js, line 121

# inner handleUndo()

Handles undo with the command stack of the modeler.

View Source components/ProcessEditor.js, line 141

# inner onDrop()

Handles file drop. Displays a modal to confirm replacement of model.

View Source components/ProcessEditor.js, line 180

# inner onDropAccepted()

Handles accepted file drop.

View Source components/ProcessEditor.js, line 187

# inner openDiagram(xml)

Attempts to open a diagram in XML with process modeler.

Parameters:
Name Type Description
xml string

View Source components/ProcessEditor.js, line 226

# inner redirectIfNotReady()

Redirects the user to "Home" if there's no loaded contract or a load contract error.

View Source components/ProcessEditor.js, line 441

# async inner saveModel()

Attempts to save the current state of the modeler as "loadedContract" in the store.

View Source components/ProcessEditor.js, line 349

# async inner saveSVG()

Attempts to save the current SVG from the state of the model.

View Source components/ProcessEditor.js, line 399

# async inner saveXML()

Attempts to save the current XML from the state of the model.

View Source components/ProcessEditor.js, line 384

# inner setLoadContractErrorResult(result)

Sets load contract error both on reference hook and store.

Parameters:
Name Type Description
result boolean

View Source components/ProcessEditor.js, line 285