Skip to content

Commit

Permalink
[INFRA] Bump version 0.6.0 (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbouffard authored Nov 2, 2020
1 parent f83b7c9 commit faf3cc4
Show file tree
Hide file tree
Showing 34 changed files with 468 additions and 12,328 deletions.
1 change: 0 additions & 1 deletion demo/0.5.1-alpha/bpmn-visualization.js

This file was deleted.

12,293 changes: 0 additions & 12,293 deletions demo/0.5.1-alpha/index.es.js

This file was deleted.

1 change: 1 addition & 0 deletions demo/0.6.0/index.es.js

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions demo/0.6.0/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>BPMN Visualization Demo</title>
<link href="./static/css/main.css" rel="stylesheet">
<link rel="shortcut icon" href="./static/img/favicon.ico">
</head>
<body>
<div id="controls" class="controls">
<div id="options-panel">
<div>
<h3>Options</h3>
<label>Fit on load:
<select name="fitTypes" id="fitType-selected">
<option value="None" selected="yes">None</option>
<option value="HorizontalVertical">Horizontal-Vertical</option>
<option value="Horizontal">Horizontal</option>
<option value="Vertical">Vertical</option>
<option value="Center">Center</option>
</select>
</label>
</div>
</div>
<div id="file-panel">
<div id="file-selector">
<input type="file" id="bpmn-file" name="file"/>
<label for="bpmn-file" class="btn"><span>open BPMN file</span></label>
</div>
<p class="info">(either drop a file here)</p>
</div>
</div>

<div style="position:relative; width:100%; height:800px">
<div id="graph"/>
</div>


<!-- load global settings -->
<script src="./static/js/configureMxGraphGlobals.js"></script>
<!-- load mxGraph client library -->
<script src="./static/js/mxClient.min.js"></script>
<!-- load demo -->
<script src="./static/js/demo.js" type="module"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions demo/0.6.0/lib-integration.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>BPMN Visualization Lib Integration</title>
<link rel="shortcut icon" href="./static/img/favicon.ico">
</head>
<body>
<div id="bpmn-visualization-viewport"></div>

<!-- load global settings -->
<script src="./static/js/configureMxGraphGlobals.js"></script>
<!-- load mxGraph client library -->
<script src="./static/js/mxClient.min.js"></script>
<!-- load app -->
<script src="./static/js/lib-integration.js" type="module"></script>
</body>
</html>
62 changes: 62 additions & 0 deletions demo/0.6.0/navigation-diagram.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>BPMN Visualization - Diagram Navigation</title>
<link rel="shortcut icon" href="./static/img/favicon.ico">
<style>
#bpmn-viewport {
top: 20px;
bottom: 20px;
left: 50px;
right: 20px;
border-style: solid;
border-color: #B0B0B0;
border-width: 1px;
position: absolute;
overflow: hidden;
}

.info {
position: relative;
display: inline-block;
}
.tooltip {
visibility: hidden;
width: 160px;
background-color: black;
color: #fff;
fill: #B0B0B0;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
top: -5px;
left: 110%;
font-family: monospace;
}
.info:hover .tooltip {
visibility: visible;
}
</style>
</head>
<body>
<div class="info">
<!-- https://icons.getbootstrap.com/icons/info-square-fill/ -->
<svg width="2em" height="2em" viewBox="0 0 16 16" class="bi bi-info-square-fill" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M0 2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2zm8.93 4.588l-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM8 5.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/>
</svg>
<span class="tooltip">Drag and Drop a BPMN file</span>
</div>

<div id="bpmn-viewport"></div>

<!-- load global settings -->
<script src="./static/js/configureMxGraphGlobals.js"></script>
<!-- load mxGraph client library -->
<script src="./static/js/mxClient.min.js"></script>
<!-- load app -->
<script src="./static/js/navigation-diagram.js" type="module"></script>
</body>
</html>
33 changes: 33 additions & 0 deletions demo/0.6.0/non-regression.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>BPMN Visualization Non Regression</title>
<link rel="shortcut icon" href="./static/img/favicon.ico">
<style>
.graph-container {
top: 10px;
bottom: 10px;
left: 10px;
right: 10px;
position: absolute;
overflow: hidden;
}
.status-ko {
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<div id="fetch-status"></div>
<div id="viewport" class="graph-container"></div>

<!-- load global settings -->
<script src="./static/js/configureMxGraphGlobals.js"></script>
<!-- load mxGraph client library -->
<script src="./static/js/mxClient.min.js"></script>
<!-- load app -->
<script src="./static/js/non-regression.js" type="module"></script>
</body>
</html>
File renamed without changes.
Binary file added demo/0.6.0/static/img/favicon.ico
Binary file not shown.
70 changes: 70 additions & 0 deletions demo/0.6.0/static/js/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
* Copyright 2020 Bonitasoft S.A.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { documentReady, handleFileSelect, startBpmnVisualization, FitType, updateFitType } from '../../index.es.js';

// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function updateFitTypeSelection(event) {
updateFitType(event);

if (event.target.value === 'None') {
resetClass(container);
} else {
setFixedSizeClass(container);
}
}

// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function setFixedSizeClass(htmlElementId) {
const htmlElement = document.getElementById(htmlElementId);
htmlElement.classList.add('fixed-size');
}

// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function resetClass(htmlElementId) {
const htmlElement = document.getElementById(htmlElementId);
htmlElement.classList.remove('fixed-size');
}

// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function startDemo() {
const parameters = new URLSearchParams(window.location.search);

// Update the selected option at the initialization
const fitTypeSelected = document.getElementById('fitType-selected');
fitTypeSelected.addEventListener('change', updateFitTypeSelection, false);

const parameterFitType = parameters.get('fitType');
if (parameterFitType) {
fitTypeSelected.value = parameterFitType;
}

if (fitTypeSelected.value !== 'None') {
setFixedSizeClass('graph');
}

startBpmnVisualization({ container: 'graph', loadOptions: { fitType: FitType[fitTypeSelected.value] } });
document.getElementById('bpmn-file').addEventListener('change', handleFileSelect, false);

// Update control panel
if (parameters.get('hideControls') === 'true') {
const classList = document.getElementById('controls').classList;
classList.remove('controls');
classList.add('hidden');
}
}

// Start
documentReady(startDemo);
77 changes: 77 additions & 0 deletions demo/0.6.0/static/js/lib-integration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/**
* Copyright 2020 Bonitasoft S.A.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BpmnVisualization } from '../../index.es.js';

const parameters = new URLSearchParams(window.location.search);
const bpmnParameterValue = parameters.get('bpmn');

let bpmn;
if (bpmnParameterValue) {
bpmn = decodeURIComponent(bpmnParameterValue);
} else {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
bpmn = bpmnDefaultContent();
}
//
const bpmnVisualizationIntegration = new BpmnVisualization(window.document.getElementById('bpmn-visualization-viewport'));
bpmnVisualizationIntegration.load(bpmn);

// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function bpmnDefaultContent() {
return `<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0x0opj6" targetNamespace="http://example.bpmn.com/schema/bpmn">
<bpmn:process id="Process_1" isExecutable="false">
<bpmn:startEvent id="StartEvent_1" name="Start Event 1">
<bpmn:outgoing>Flow_1</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="Activity_1" name="Sequence Flow 1" />
<bpmn:task id="Activity_1" name="Task 1">
<bpmn:incoming>Flow_1</bpmn:incoming>
<bpmn:outgoing>Flow_2</bpmn:outgoing>
</bpmn:task>
<bpmn:endEvent id="EndEvent_1" name="End Event 1">
<bpmn:incoming>Flow_2</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_2" sourceRef="Activity_1" targetRef="EndEvent_1" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
<bpmndi:BPMNEdge id="BPMNEdge_Flow_1" bpmnElement="Flow_1">
<di:waypoint x="192" y="99" />
<di:waypoint x="250" y="99" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_Flow_2" bpmnElement="Flow_2">
<di:waypoint x="350" y="99" />
<di:waypoint x="412" y="99" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="BPMNShape_StartEvent_1" bpmnElement="StartEvent_1">
<dc:Bounds x="156" y="81" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="158" y="124" width="33" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_Activity_1" bpmnElement="Activity_1">
<dc:Bounds x="250" y="59" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_EndEvent_1" bpmnElement="EndEvent_1">
<dc:Bounds x="412" y="81" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="416" y="124" width="29" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>`;
}
File renamed without changes.
Loading

0 comments on commit faf3cc4

Please sign in to comment.