-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
294 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>🚢 UMD Example - Sequential Workflow Editor</title> | ||
<style> | ||
body { | ||
font: 14px/1.5 Arial, Tahoma, Serif; | ||
} | ||
a { | ||
color: blue; | ||
text-decoration: underline; | ||
} | ||
a:hover { | ||
text-decoration: none; | ||
} | ||
#placeholder { | ||
display: block; | ||
border: 1px solid #ccc; | ||
padding: 10px; | ||
} | ||
</style> | ||
|
||
<script src="../../model/dist/index.umd.js"></script> | ||
<script src="../../editor/dist/index.umd.js"></script> | ||
</head> | ||
<body> | ||
<h1>🚢 UMD Example - Sequential Workflow Editor</h1> | ||
|
||
<p> | ||
This demo shows basic usage of | ||
<a href="https://github.com/nocode-js/sequential-workflow-editor" target="_blank">Sequential Workflow Editor</a> | ||
in a browser using UMD bundles. | ||
</p> | ||
|
||
<div id="placeholder"></div> | ||
|
||
<script> | ||
const fooModel = sequentialWorkflowEditorModel.createStepModel('foo', 'task', step => { | ||
step.property('isEnabled').value(sequentialWorkflowEditorModel.createBooleanValueModel({})); | ||
}); | ||
|
||
const definitionModel = sequentialWorkflowEditorModel.createDefinitionModel(model => { | ||
model.valueTypes(['string']); | ||
model.root(() => {}); | ||
model.steps([fooModel]); | ||
}); | ||
|
||
const editorProvider = sequentialWorkflowEditor.EditorProvider.create(definitionModel, { | ||
uidGenerator: () => String(Math.random()) | ||
}); | ||
|
||
const step = { | ||
id: '0x1', | ||
name: 'test', | ||
type: 'foo', | ||
componentType: 'task', | ||
properties: { isEnabled: true } | ||
}; | ||
const definition = { | ||
properties: {}, | ||
sequence: [step] | ||
}; | ||
|
||
const placeholder = document.getElementById('placeholder'); | ||
const context = { | ||
notifyPropertiesChanged() {}, | ||
notifyNameChanged() {} | ||
}; | ||
const editor = editorProvider.createStepEditorProvider()(step, context, definition); | ||
placeholder.appendChild(editor); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.