removed unused viewer

This commit is contained in:
jasquat 2022-08-11 15:50:03 -04:00
parent 841bf8c1bd
commit 68017939ea
4 changed files with 115 additions and 28 deletions

121
package-lock.json generated
View File

@ -27,7 +27,7 @@
"bootstrap": "^5.2.0-beta1",
"bpmn-js": "^9.3.2",
"bpmn-js-properties-panel": "^1.2.0",
"bpmn-js-spiffworkflow": "^0.0.8",
"bpmn-js-spiffworkflow": "/home/jason/projects/github/sartography/bpmn-js-spiffworkflow",
"craco": "^0.0.3",
"date-fns": "^2.28.0",
"diagram-js": "^8.5.0",
@ -71,6 +71,62 @@
"../bpmn-js-properties-panel": {
"extraneous": true
},
"../bpmn-js-spiffworkflow": {
"version": "0.0.8",
"license": "MIT",
"dependencies": {
"@bpmn-io/properties-panel": "^0.18.0",
"bpmn-js": "^9.2.2",
"bpmn-js-properties-panel": "^1.1.1",
"diagram-js": "^8.5.0",
"inherits": "^2.0.4",
"inherits-browser": "^0.0.1",
"min-dash": "^3.8.1",
"min-dom": "^3.2.1",
"moddle": "^5.0.3",
"tiny-svg": "^2.2.3"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@babel/plugin-transform-react-jsx": "^7.17.12",
"@babel/preset-env": "^7.18.6",
"@babel/preset-react": "^7.18.2",
"@testing-library/preact": "^2.0.1",
"@testing-library/preact-hooks": "^1.1.0",
"@types/mocha": "^9.1.1",
"babel-loader": "^8.2.5",
"chai": "^4.3.6",
"copy-webpack-plugin": "^11.0.0",
"eslint": "^8.18.0",
"eslint_d": "^12.2.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-bpmn-io": "^0.14.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-sonarjs": "^0.13.0",
"file-saver": "^2.0.5",
"karma": "^6.3.4",
"karma-chrome-launcher": "^3.1.1",
"karma-coverage": "^2.2.0",
"karma-env-preprocessor": "^0.1.1",
"karma-mocha": "^2.0.1",
"karma-sinon-chai": "^2.0.2",
"karma-webpack": "^5.0.0",
"mocha": "^10.0.0",
"mocha-test-container-support": "^0.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"raw-loader": "^4.0.2",
"sinon": "^14.0.0",
"sinon-chai": "^3.7.0",
"sirv-cli": "^2.0.2",
"stringify": "^5.2.0",
"webpack": "^5.73.0",
"webpack-cli": "^4.9.2"
}
},
"node_modules/@ampproject/remapping": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
@ -7079,20 +7135,8 @@
}
},
"node_modules/bpmn-js-spiffworkflow": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/bpmn-js-spiffworkflow/-/bpmn-js-spiffworkflow-0.0.8.tgz",
"integrity": "sha512-svDDl3w0L4cGVoqiJKyUT5N15HrOnPEUn6Vt7YburczxTOVxBd/x85sodgrDHraRG/aWXDWYbtf4lIGoUdeQDw==",
"dependencies": {
"bpmn-js": "^9.2.2",
"bpmn-js-properties-panel": "^1.1.1",
"diagram-js": "^8.5.0",
"inherits": "^2.0.4",
"inherits-browser": "^0.0.1",
"min-dash": "^3.8.1",
"min-dom": "^3.2.1",
"moddle": "^5.0.3",
"tiny-svg": "^2.2.3"
}
"resolved": "../bpmn-js-spiffworkflow",
"link": true
},
"node_modules/bpmn-moddle": {
"version": "7.1.2",
@ -31104,19 +31148,56 @@
}
},
"bpmn-js-spiffworkflow": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/bpmn-js-spiffworkflow/-/bpmn-js-spiffworkflow-0.0.8.tgz",
"integrity": "sha512-svDDl3w0L4cGVoqiJKyUT5N15HrOnPEUn6Vt7YburczxTOVxBd/x85sodgrDHraRG/aWXDWYbtf4lIGoUdeQDw==",
"version": "file:../bpmn-js-spiffworkflow",
"requires": {
"@babel/core": "^7.18.6",
"@babel/plugin-transform-react-jsx": "^7.17.12",
"@babel/preset-env": "^7.18.6",
"@babel/preset-react": "^7.18.2",
"@bpmn-io/properties-panel": "^0.18.0",
"@testing-library/preact": "^2.0.1",
"@testing-library/preact-hooks": "^1.1.0",
"@types/mocha": "^9.1.1",
"babel-loader": "^8.2.5",
"bpmn-js": "^9.2.2",
"bpmn-js-properties-panel": "^1.1.1",
"chai": "^4.3.6",
"copy-webpack-plugin": "^11.0.0",
"diagram-js": "^8.5.0",
"eslint": "^8.18.0",
"eslint_d": "^12.2.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-bpmn-io": "^0.14.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-sonarjs": "^0.13.0",
"file-saver": "^2.0.5",
"inherits": "^2.0.4",
"inherits-browser": "^0.0.1",
"karma": "^6.3.4",
"karma-chrome-launcher": "^3.1.1",
"karma-coverage": "^2.2.0",
"karma-env-preprocessor": "^0.1.1",
"karma-mocha": "^2.0.1",
"karma-sinon-chai": "^2.0.2",
"karma-webpack": "^5.0.0",
"min-dash": "^3.8.1",
"min-dom": "^3.2.1",
"mocha": "^10.0.0",
"mocha-test-container-support": "^0.2.0",
"moddle": "^5.0.3",
"tiny-svg": "^2.2.3"
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"raw-loader": "^4.0.2",
"sinon": "^14.0.0",
"sinon-chai": "^3.7.0",
"sirv-cli": "^2.0.2",
"stringify": "^5.2.0",
"tiny-svg": "^2.2.3",
"webpack": "^5.73.0",
"webpack-cli": "^4.9.2"
}
},
"bpmn-moddle": {
@ -40291,7 +40372,7 @@
"@csstools/postcss-stepped-value-functions": "^1.0.0",
"@csstools/postcss-trigonometric-functions": "^1.0.1",
"@csstools/postcss-unset-value": "^1.0.1",
"autoprefixer": "^10.4.7",
"autoprefixer": "10.4.5",
"browserslist": "^4.21.0",
"css-blank-pseudo": "^3.0.3",
"css-has-pseudo": "^3.0.4",

View File

@ -22,7 +22,7 @@
"bootstrap": "^5.2.0-beta1",
"bpmn-js": "^9.3.2",
"bpmn-js-properties-panel": "^1.2.0",
"bpmn-js-spiffworkflow": "^0.0.8",
"bpmn-js-spiffworkflow": "/home/jason/projects/github/sartography/bpmn-js-spiffworkflow",
"craco": "^0.0.3",
"date-fns": "^2.28.0",
"diagram-js": "^8.5.0",

View File

@ -200,6 +200,13 @@ export default function ReactDiagramEditor({
console.log('ERROR:', err);
}
function checkTaskCanBeHighlighted(taskBpmnId: string) {
return (
!taskSpecsThatCannotBeHighlighted.includes(taskBpmnId) &&
!taskBpmnId.match(/EndJoin/)
);
}
function onImportDone(event: any) {
const { error } = event;
@ -227,23 +234,20 @@ export default function ReactDiagramEditor({
// https://github.com/bpmn-io/bpmn-js-examples/tree/master/colors
if (activeTaskBpmnIds) {
activeTaskBpmnIds.forEach((activeTaskBpmnId) => {
canvas.addMarker(activeTaskBpmnId, 'active-task-highlight');
if (checkTaskCanBeHighlighted(activeTaskBpmnId)) {
canvas.addMarker(activeTaskBpmnId, 'active-task-highlight');
}
});
}
if (completedTasksBpmnIds) {
completedTasksBpmnIds.forEach((completedTaskBpmnId) => {
if (
!taskSpecsThatCannotBeHighlighted.includes(completedTaskBpmnId) &&
!completedTaskBpmnId.match(/EndJoin/)
) {
if (checkTaskCanBeHighlighted(completedTaskBpmnId)) {
canvas.addMarker(completedTaskBpmnId, 'completed-task-highlight');
}
});
}
}
(diagramModelerState as any).on('import.done', onImportDone);
function displayDiagram(
diagramModelerToUse: any,
diagramXMLToDisplay: any
@ -273,6 +277,8 @@ export default function ReactDiagramEditor({
});
}
(diagramModelerState as any).on('import.done', onImportDone);
const diagramXMLToUse = diagramXML || diagramXMLString;
if (diagramXMLToUse) {
if (!diagramXMLString) {