-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into feature/plugin-depe…
…ndencies
- Loading branch information
Showing
46 changed files
with
1,529 additions
and
297 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules/* | ||
public/* | ||
!public/index.html | ||
bpmnlint-plugin-custom/node_modules/* | ||
!public/src | ||
bpmnlint-plugin-custom/node_modules/* |
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
Binary file added
BIN
+4.41 KB
components/bpmn-q/modeler-component/editor/resources/icons/xml-viewer-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 54 additions & 11 deletions
65
components/bpmn-q/modeler-component/editor/resources/styling/bpmn-fonts.css
Large diffs are not rendered by default.
Oops, something went wrong.
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
63 changes: 63 additions & 0 deletions
63
components/bpmn-q/modeler-component/editor/ui/XMLViewerButton.js
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,63 @@ | ||
import React, { useState } from "react"; | ||
import { getModeler } from "../ModelerHandler"; | ||
import ace from "ace-builds"; | ||
import { loadDiagram } from "../util/IoUtilities"; | ||
|
||
/** | ||
* React button which enables the XML Viewer. | ||
* | ||
* @returns {JSX.Element} | ||
* @constructor | ||
*/ | ||
export default function XMLViewerButton() { | ||
|
||
const [enabledXMLView, setEnabledXMLView] = useState(false); | ||
function enableXMLViewer(enabledXMLView) { | ||
let modelerContainer = document.getElementById('modeler-container'); | ||
let editor = document.getElementById('editor'); | ||
let editorWrap = document.getElementById('editor_wrap'); | ||
let panel = document.getElementById("properties"); | ||
let aceEditor = ace.edit(editor); | ||
if (!enabledXMLView) { | ||
modelerContainer.style.height = '93vh'; | ||
editor.style.display = 'block'; | ||
editor.style.height = '93vh'; | ||
panel.style.display = 'none'; | ||
editorWrap.style.display = 'block'; | ||
|
||
// Dynamically set the value of the editor | ||
let xml = getModeler().xml; | ||
if (xml.xml != undefined) { | ||
xml = xml.xml; | ||
} | ||
aceEditor.setValue(xml); | ||
} else { | ||
modelerContainer.style.height = '98vh'; | ||
editor.style.display = 'none'; | ||
panel.style.display = 'block'; | ||
editorWrap.style.display = 'none'; | ||
|
||
|
||
aceEditor.getSession().on('change', function () { | ||
update(); | ||
}); | ||
|
||
function update() { | ||
let xml = aceEditor.getSession().getValue(); | ||
loadDiagram(xml, getModeler()); | ||
} | ||
} | ||
|
||
setEnabledXMLView(!enabledXMLView) | ||
|
||
} | ||
|
||
return ( | ||
<button className="qwm-toolbar-btn" title="Trigger XML Viewer" | ||
onClick={() => enableXMLViewer(enabledXMLView)}> | ||
<span className="qwm-icon-xml-viewer"> | ||
<span className="qwm-indent">XML Viewer</span> | ||
</span> | ||
</button> | ||
); | ||
} |
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.