Compare commits
111
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df194dcb65 | ||
|
|
fcb1e535ca | ||
|
|
e71800bd1d | ||
|
|
256349d23e | ||
|
|
bb1e64218a | ||
|
|
731d6cf55b | ||
|
|
a2c5e1f394 | ||
|
|
2d80fcf447 | ||
|
|
d027002cb9 | ||
|
|
4625067352 | ||
|
|
5a8f93e376 | ||
|
|
6e902b91fd | ||
|
|
7471a37220 | ||
|
|
9b0cb2582e | ||
|
|
43cd6a85b1 | ||
|
|
47f4e3e6c8 | ||
|
|
dfb1190e7b | ||
|
|
6292a64d82 | ||
|
|
e397ee3b2d | ||
|
|
9690401dad | ||
|
|
63f894f526 | ||
|
|
345be1aa23 | ||
|
|
e14b0c0214 | ||
|
|
d073a2e804 | ||
|
|
8f41a39a6e | ||
|
|
df6ba88040 | ||
|
|
0b34b37aaf | ||
|
|
694e610ebb | ||
|
|
3503fd90ab | ||
|
|
0c21f7b772 | ||
|
|
53ed4eea07 | ||
|
|
605398505a | ||
|
|
4f728a3514 | ||
|
|
3e7a82edc2 | ||
|
|
a871288c1c | ||
|
|
5f8e3865e3 | ||
|
|
d25a4b548a | ||
|
|
f031142848 | ||
|
|
b9b39a2679 | ||
|
|
eb891c8cef | ||
|
|
974501fea8 | ||
|
|
40b12f0c47 | ||
|
|
33ea2bd672 | ||
|
|
ff4a25c1b2 | ||
|
|
cfe33b8111 | ||
|
|
7d3548d597 | ||
|
|
9381d82ae5 | ||
|
|
839634a3ee | ||
|
|
0e6d23c1e1 | ||
|
|
8fc680fcb9 | ||
|
|
54eb584fd7 | ||
|
|
c16f4a1b42 | ||
|
|
0adc966608 | ||
|
|
733420c90d | ||
|
|
e4c4bb7f86 | ||
|
|
2159c3881f | ||
|
|
bf837e187b | ||
|
|
88074b9144 | ||
|
|
e1e5e8afce | ||
|
|
7090bf7a3a | ||
|
|
6641575423 | ||
|
|
93ea54da57 | ||
|
|
5906304b43 | ||
|
|
9d703f0640 | ||
|
|
c8011123f8 | ||
|
|
38ed29327e | ||
|
|
a921a3cc71 | ||
|
|
511562c502 | ||
|
|
90f45c2c8d | ||
|
|
0cc03cf512 | ||
|
|
158e9c4044 | ||
|
|
334cce8af3 | ||
|
|
266036a6ec | ||
|
|
0cb4491920 | ||
|
|
710bddd8e4 | ||
|
|
4122545cff | ||
|
|
e58ff43014 | ||
|
|
c3624d8aca | ||
|
|
bf30315217 | ||
|
|
46a344db74 | ||
|
|
5de7699182 | ||
|
|
7f4e13c5e0 | ||
|
|
1dd5df8074 | ||
|
|
b15edd0e90 | ||
|
|
34e3989ef6 | ||
|
|
9c032b9b0b | ||
|
|
50810fec47 | ||
|
|
f39f27efee | ||
|
|
67ce4fd1b0 | ||
|
|
bd43063230 | ||
|
|
bfb96b7dde | ||
|
|
7d10993b66 | ||
|
|
dadb236bc3 | ||
|
|
fd270d27da | ||
|
|
8cd1a65189 | ||
|
|
c359aae479 | ||
|
|
d90c63ceb4 | ||
|
|
313afec294 | ||
|
|
10276f7fd5 | ||
|
|
860740f3fe | ||
|
|
2de301dbed | ||
|
|
e55630f986 | ||
|
|
301e44997f | ||
|
|
0ed56594ff | ||
|
|
080c919569 | ||
|
|
2efe358891 | ||
|
|
451d8ae191 | ||
|
|
11d3247a8c | ||
|
|
e41869a9e7 | ||
|
|
03fe8696ec | ||
|
|
f7d5f40c0f |
No files matched your search
Executable
+17
@@ -0,0 +1,17 @@
|
|||||||
|
.well-known
|
||||||
|
/brol
|
||||||
|
/ui/app/config/config.json
|
||||||
|
log2mail.php
|
||||||
|
/ui/log2mail.php
|
||||||
|
/ui/*.sh
|
||||||
|
/ui/s3sync*.*
|
||||||
|
/ui/s3sync*
|
||||||
|
*.sh
|
||||||
|
.sparcStudio
|
||||||
|
.~lock*
|
||||||
|
/ui/squeezed/*
|
||||||
|
/ui/app/assets/videos/*
|
||||||
|
/AGENTS.md
|
||||||
|
/CLAUDE.md
|
||||||
|
.vscode
|
||||||
|
.cursor
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
+177
-7
@@ -1,3 +1,34 @@
|
|||||||
|
dialog.bz-modal-dialog{
|
||||||
|
padding: 0;
|
||||||
|
border: 2px solid #050;
|
||||||
|
border-radius: 5px;
|
||||||
|
min-width: 15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog.bz-modal-dialog header{
|
||||||
|
background: #050;
|
||||||
|
text-align: center;
|
||||||
|
color: white;
|
||||||
|
padding: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog.bz-modal-dialog section{
|
||||||
|
padding: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog.bz-modal-dialog footer{
|
||||||
|
border-top: 1px solid #CCC;
|
||||||
|
padding: .5em;
|
||||||
|
justify-content: center;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto auto;
|
||||||
|
grid-gap: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
dialog.bz-modal-dialog footer button{
|
||||||
|
min-width: 5em;
|
||||||
|
}
|
||||||
|
|
||||||
bz-select {
|
bz-select {
|
||||||
display: block;
|
display: block;
|
||||||
margin: .5em 0 .5em 0;
|
margin: .5em 0 .5em 0;
|
||||||
@@ -23,7 +54,7 @@ bz-select > button::after {
|
|||||||
content: "\00BB";
|
content: "\00BB";
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0.5em;
|
right: clamp(-1em, calc(100% - 1em), 0.5em);
|
||||||
top: 0;
|
top: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
@@ -41,7 +72,17 @@ bz-select > div.options-container{
|
|||||||
transition: max-height 0.4s ease;
|
transition: max-height 0.4s ease;
|
||||||
}
|
}
|
||||||
bz-select > div.options-container.open{ pointer-events: auto; max-height: 10em;}
|
bz-select > div.options-container.open{ pointer-events: auto; max-height: 10em;}
|
||||||
bz-select option{
|
div.options-container.portaled{
|
||||||
|
pointer-events: none;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 10000;
|
||||||
|
max-height: 0;
|
||||||
|
overflow: auto;
|
||||||
|
transition: max-height 0.4s ease;
|
||||||
|
}
|
||||||
|
div.options-container.portaled.open{ pointer-events: auto; max-height: 10em;}
|
||||||
|
bz-select option,
|
||||||
|
div.options-container option{
|
||||||
background-color: #DDD;
|
background-color: #DDD;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
color: #000;
|
color: #000;
|
||||||
@@ -57,12 +98,14 @@ bz-select option{
|
|||||||
margin-top 0.3s ease,
|
margin-top 0.3s ease,
|
||||||
opacity 0.3s ease;
|
opacity 0.3s ease;
|
||||||
}
|
}
|
||||||
bz-select option.open{
|
bz-select option.open,
|
||||||
|
div.options-container option.open{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
bz-select option:hover{
|
bz-select option:hover,
|
||||||
|
div.options-container option:hover{
|
||||||
background-color: #44F;
|
background-color: #44F;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
@@ -184,7 +227,7 @@ bz-slidepane[side="right"] div.handle {
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
width: 11px;
|
width: 11px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: repeating-linear-gradient( to right, rgba(255,255,255,1) 0, rgba(255,255,255,1) 2px, rgba(0,0,0,0.2) 3px, rgba(0,0,0,0.2) 4px );
|
background: repeating-linear-gradient( to right, rgba(255,255,255,1) 0, rgba(255,255,255,1) 2px, rgba(0,0,0,0.5) 3px, rgba(0,0,0,0.5) 4px );
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
cursor: ew-resize;
|
cursor: ew-resize;
|
||||||
}
|
}
|
||||||
@@ -195,14 +238,16 @@ bz-graflow {
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 50vh;
|
height: 100vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
bz-graflow .bzgf-main-container{
|
bz-graflow .bzgf-main-container{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* BZGRAFLOW_CORE_START */
|
/* BZGRAFLOW_CORE_START */
|
||||||
@@ -221,7 +266,7 @@ bz-graflow .bzgf-nodes-container{ /* used to keep the nodes container pointer-ev
|
|||||||
}
|
}
|
||||||
bz-graflow .bzgf-nodes-container > * { /* allow the nodes to be moved ! */
|
bz-graflow .bzgf-nodes-container > * { /* allow the nodes to be moved ! */
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
bz-graflow .bzgf-nodes-container .bzgf-node{ position:absolute; }
|
bz-graflow .bzgf-nodes-container .bzgf-node{ position:absolute; }
|
||||||
bz-graflow .bzgf-nodes-container .bzgf-fake-node{
|
bz-graflow .bzgf-nodes-container .bzgf-fake-node{
|
||||||
@@ -247,4 +292,129 @@ bz-graflow button.bzgf-zoom-out{
|
|||||||
left: 5px;
|
left: 5px;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
}
|
}
|
||||||
|
bz-graflow path.bzgf-wirecoat{
|
||||||
|
pointer-events: auto;
|
||||||
|
stroke-width: 6;
|
||||||
|
stroke: #0000!important;
|
||||||
|
}
|
||||||
|
bz-graflow path.bzgf-wirecoat:hover{
|
||||||
|
stroke: #FF08!important;
|
||||||
|
}
|
||||||
|
bz-graflow .bzgf-nodes-container .port.selectable:hover{
|
||||||
|
border: 5px solid #FF08!important;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
bz-graflow .graflow-error{ background:red;color:black;position: absolute;top: 0;left: 50%;transform: translateX(-50%); }
|
||||||
|
|
||||||
/* BZGRAFLOW_CORE_END */
|
/* BZGRAFLOW_CORE_END */
|
||||||
|
|
||||||
|
bz-grafloweditor {
|
||||||
|
width: 98vw;
|
||||||
|
height: 98vh;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
bz-grafloweditor .bzgfe-main-container{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 15vw auto;
|
||||||
|
grid-gap: 1px;
|
||||||
|
background: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
bz-grafloweditor .bzgfe-nodes-container{
|
||||||
|
overflow: auto;
|
||||||
|
border: 2px solid #000;
|
||||||
|
display: grid;
|
||||||
|
grid-auto-flow: row;
|
||||||
|
justify-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
bz-grafloweditor bz-graflow{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
bz-grafloweditor .bzgfe-nodes-container .bzgf-node{
|
||||||
|
position: relative;
|
||||||
|
margin: 5px auto;
|
||||||
|
}
|
||||||
|
bz-grafloweditor bz-slidepane { z-index: 10; background-color: #0008!important;}
|
||||||
|
bz-grafloweditor bz-slidepane .inner-console{
|
||||||
|
padding: 5px;
|
||||||
|
background: #FFF;
|
||||||
|
}
|
||||||
|
bz-grafloweditor .inner-console section{
|
||||||
|
display: grid;
|
||||||
|
grid-auto-flow: row;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background-color: #DDD;
|
||||||
|
padding: 5px;
|
||||||
|
margin: 5px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
bz-grafloweditor .inner-console section .cols-2{
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
grid-gap: 1em;
|
||||||
|
background-color: #CCC;
|
||||||
|
min-height: 2.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
bz-grafloweditor .inner-console section .cols-2 label{
|
||||||
|
text-align: right;
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
bz-grafloweditor .inner-console section .cols-2 input{
|
||||||
|
max-height: 2em;
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bz-gantt{
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
--row: 25px;
|
||||||
|
--bar-gap: 4px; /* space above & below each bar inside its row */
|
||||||
|
--chart-left: calc(var(--tasks-width, 7em) + 1em); /* where the chart area starts */
|
||||||
|
}
|
||||||
|
bz-gantt ul.tasks{
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
bz-gantt ul.tasks li{
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-wrap: nowrap;
|
||||||
|
height: var(--row);
|
||||||
|
line-height: calc(var(--row) - 1px);
|
||||||
|
border-bottom: 1px dotted #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
bz-gantt.gantt bz-graflow{
|
||||||
|
position: absolute;
|
||||||
|
left: var(--chart-left);
|
||||||
|
top: calc(var(--chart-top, var(--row)) + var(--bar-gap)); /* first task row, measured in refresh(), plus bar centering gap */
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: auto; /* cancel the global bz-graflow 100vw/100vh defaults, */
|
||||||
|
height: auto; /* so the box stretches between its anchored edges */
|
||||||
|
}
|
||||||
|
bz-gantt li.header div.day:first-of-type{ border-left: 1px dotted #555; }
|
||||||
|
bz-gantt li.header div.day{
|
||||||
|
position: absolute;
|
||||||
|
/* anchored to bz-gantt (nearest positioned ancestor): spans all rows */
|
||||||
|
top: var(--bar-gap);
|
||||||
|
bottom: 0;
|
||||||
|
border-right: 1px dotted #555;
|
||||||
|
font-size: .8em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
bz-gantt li.header div.day.today{
|
||||||
|
background: #AD8;
|
||||||
|
z-index: 999;
|
||||||
|
opacity: .3;
|
||||||
|
}
|
||||||
+206
-25
@@ -11,10 +11,60 @@
|
|||||||
* as long as the copyright notice and license are kept.
|
* as long as the copyright notice and license are kept.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
function BZModalDialog(title, message) {
|
||||||
|
const getFields = (dlg) => {
|
||||||
|
const form = dlg.querySelector('form')
|
||||||
|
if (!form) return {}
|
||||||
|
const fd = new FormData(form)
|
||||||
|
const out = {}
|
||||||
|
for (const [key, value] of fd.entries()) {
|
||||||
|
if (Object.prototype.hasOwnProperty.call(out, key)) {
|
||||||
|
out[key] = Array.isArray(out[key]) ? [...out[key], value] : [out[key], value]
|
||||||
|
} else {
|
||||||
|
out[key] = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
return new Promise(resolve => {
|
||||||
|
const dlg = document.createElement('dialog')
|
||||||
|
dlg.classList.add('bz-modal-dialog')
|
||||||
|
dlg.innerHTML = `
|
||||||
|
<form method="dialog">
|
||||||
|
<header>${title}</header>
|
||||||
|
<section>${message}</section>
|
||||||
|
<footer>
|
||||||
|
<button value="cancel">Cancel</button>
|
||||||
|
<button value="ok">OK</button>
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
|
`
|
||||||
|
dlg.addEventListener('close', () => {
|
||||||
|
const ok = dlg.returnValue.toLowerCase() === 'ok'
|
||||||
|
if(ok) {
|
||||||
|
resolve(getFields(dlg))
|
||||||
|
} else {
|
||||||
|
resolve(ok)
|
||||||
|
}
|
||||||
|
dlg.remove()
|
||||||
|
})
|
||||||
|
document.body.appendChild(dlg)
|
||||||
|
dlg.showModal()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
class Buildoz extends HTMLElement {
|
class Buildoz extends HTMLElement {
|
||||||
|
|
||||||
|
// static is evaluated when the class is defined, therefore while buildoz.js is executing.
|
||||||
|
// therefore document.currentScript refers to buildoz.js (but not later!!)
|
||||||
|
static _buildozUrl = document.currentScript?.src ?? ''
|
||||||
|
|
||||||
constructor(){
|
constructor(){
|
||||||
super() // always call super() first!
|
super() // always call super() first!
|
||||||
this.attrs = {}
|
this.attrs = {}
|
||||||
|
|
||||||
|
// Usefull for relative dependencies, to keep lib fully portable
|
||||||
|
this.buildozUrl = Buildoz._buildozUrl // was defined in the past
|
||||||
}
|
}
|
||||||
|
|
||||||
static get observedAttributes(){ //observable attributes triggering attributeChangedCallback
|
static get observedAttributes(){ //observable attributes triggering attributeChangedCallback
|
||||||
@@ -48,6 +98,17 @@ class Buildoz extends HTMLElement {
|
|||||||
getBZAttribute(attrName){ // Little helper for defaults
|
getBZAttribute(attrName){ // Little helper for defaults
|
||||||
return(this.getAttribute(attrName) || this.defaultAttrs[attrName] )
|
return(this.getAttribute(attrName) || this.defaultAttrs[attrName] )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fireEvent(eventName, detail){
|
||||||
|
let myname = this.tagName.toLocaleLowerCase()
|
||||||
|
myname = myname.substring(myname.indexOf('-')+1)
|
||||||
|
const eventFullName = `bz:${myname}:${eventName}`
|
||||||
|
this.dispatchEvent(new CustomEvent(eventFullName, {
|
||||||
|
detail,
|
||||||
|
bubbles: true,
|
||||||
|
composed: true,
|
||||||
|
}))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BZselect extends Buildoz {
|
class BZselect extends Buildoz {
|
||||||
@@ -74,7 +135,7 @@ class BZselect extends Buildoz {
|
|||||||
if(!this.optionscontainer) this.optionscontainer = document.createElement('div')
|
if(!this.optionscontainer) this.optionscontainer = document.createElement('div')
|
||||||
this.optionscontainer.classList.add('options-container')
|
this.optionscontainer.classList.add('options-container')
|
||||||
this.append(this.optionscontainer)
|
this.append(this.optionscontainer)
|
||||||
this.options = this.querySelectorAll('option')
|
this.syncOptions()
|
||||||
if(this.#fillFromMarkup){ //can only do it once and only if fillOptions was not already called !!
|
if(this.#fillFromMarkup){ //can only do it once and only if fillOptions was not already called !!
|
||||||
for(const opt of this.options){
|
for(const opt of this.options){
|
||||||
this.optionscontainer.append(opt) // Will move is to the right parent
|
this.optionscontainer.append(opt) // Will move is to the right parent
|
||||||
@@ -86,6 +147,15 @@ class BZselect extends Buildoz {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disconnectedCallback() {
|
||||||
|
if(this.open || this._closing) this.closeDropdown(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
syncOptions() {
|
||||||
|
if(this.optionscontainer) this.options = this.optionscontainer.querySelectorAll('option')
|
||||||
|
else this.options = []
|
||||||
|
}
|
||||||
|
|
||||||
// static get observedAttributes(){ // Only if you want actions on attr change
|
// static get observedAttributes(){ // Only if you want actions on attr change
|
||||||
// return([...super.observedAttributes, 'disabled'])
|
// return([...super.observedAttributes, 'disabled'])
|
||||||
// }
|
// }
|
||||||
@@ -111,19 +181,104 @@ class BZselect extends Buildoz {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toggle(){
|
toggle(){
|
||||||
for(const opt of this.options){
|
if(this.open) this.closeDropdown()
|
||||||
if(this.open) {
|
else this.openDropdown()
|
||||||
opt.classList.remove('open')
|
}
|
||||||
this.optionscontainer.classList.remove('open')
|
|
||||||
} else {
|
openDropdown() {
|
||||||
document.querySelectorAll('bz-select').forEach((sel) => {
|
document.querySelectorAll('bz-select').forEach((sel) => {
|
||||||
if((sel!==this) && sel.open) sel.toggle()
|
if((sel!==this) && sel.open) sel.closeDropdown(true)
|
||||||
})
|
})
|
||||||
opt.classList.add('open')
|
this.optionscontainer.classList.add('portaled')
|
||||||
|
document.body.appendChild(this.optionscontainer)
|
||||||
|
this.positionPortal()
|
||||||
|
this.bindPortalListeners()
|
||||||
|
this.open = true
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
if(!this.open) return
|
||||||
this.optionscontainer.classList.add('open')
|
this.optionscontainer.classList.add('open')
|
||||||
|
for(const opt of this.options) opt.classList.add('open')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
closeDropdown(immediate = false) {
|
||||||
|
if(!this.open) return
|
||||||
|
this.unbindPortalListeners()
|
||||||
|
for(const opt of this.options) opt.classList.remove('open')
|
||||||
|
this.optionscontainer.classList.remove('open')
|
||||||
|
if(immediate) {
|
||||||
|
this.clearCloseTransition()
|
||||||
|
this.finishCloseDropdown()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this._closing = true
|
||||||
|
this._onTransitionEnd = (evt) => {
|
||||||
|
if(evt.target !== this.optionscontainer) return
|
||||||
|
if(evt.propertyName !== 'max-height') return
|
||||||
|
this.finishCloseDropdownAfterTransition()
|
||||||
|
}
|
||||||
|
this.optionscontainer.addEventListener('transitionend', this._onTransitionEnd)
|
||||||
|
this._closeTimer = setTimeout(() => this.finishCloseDropdownAfterTransition(), 450)
|
||||||
|
}
|
||||||
|
|
||||||
|
finishCloseDropdownAfterTransition() {
|
||||||
|
if(!this._closing) return
|
||||||
|
this.clearCloseTransition()
|
||||||
|
this.finishCloseDropdown()
|
||||||
|
}
|
||||||
|
|
||||||
|
clearCloseTransition() {
|
||||||
|
this._closing = false
|
||||||
|
if(this._closeTimer) clearTimeout(this._closeTimer)
|
||||||
|
this._closeTimer = null
|
||||||
|
if(this._onTransitionEnd) {
|
||||||
|
this.optionscontainer.removeEventListener('transitionend', this._onTransitionEnd)
|
||||||
|
this._onTransitionEnd = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.open = !this.open
|
|
||||||
|
finishCloseDropdown() {
|
||||||
|
this.optionscontainer.classList.remove('portaled')
|
||||||
|
this.clearPortalStyles()
|
||||||
|
if(this.optionscontainer.parentElement !== this) this.append(this.optionscontainer)
|
||||||
|
this.open = false
|
||||||
|
}
|
||||||
|
|
||||||
|
positionPortal() {
|
||||||
|
const rect = this.button.getBoundingClientRect()
|
||||||
|
this.optionscontainer.style.top = `${rect.bottom}px`
|
||||||
|
this.optionscontainer.style.left = `${rect.left}px`
|
||||||
|
this.optionscontainer.style.width = `${rect.width}px`
|
||||||
|
}
|
||||||
|
|
||||||
|
clearPortalStyles() {
|
||||||
|
this.optionscontainer.style.top = ''
|
||||||
|
this.optionscontainer.style.left = ''
|
||||||
|
this.optionscontainer.style.width = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
bindPortalListeners() {
|
||||||
|
this._repositionBound = this.positionPortal.bind(this)
|
||||||
|
window.addEventListener('scroll', this._repositionBound, true)
|
||||||
|
window.addEventListener('resize', this._repositionBound)
|
||||||
|
this._outsideClickBound = (evt) => {
|
||||||
|
if(this.open && !this.contains(evt.target) && !this.optionscontainer.contains(evt.target)) {
|
||||||
|
this.closeDropdown()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this._outsideClickTimer = setTimeout(() => {
|
||||||
|
document.addEventListener('click', this._outsideClickBound, true)
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
unbindPortalListeners() {
|
||||||
|
if(this._repositionBound) window.removeEventListener('scroll', this._repositionBound, true)
|
||||||
|
if(this._repositionBound) window.removeEventListener('resize', this._repositionBound)
|
||||||
|
if(this._outsideClickBound) document.removeEventListener('click', this._outsideClickBound, true)
|
||||||
|
if(this._outsideClickTimer) clearTimeout(this._outsideClickTimer)
|
||||||
|
this._outsideClickTimer = null
|
||||||
}
|
}
|
||||||
|
|
||||||
onClick(evt){
|
onClick(evt){
|
||||||
@@ -135,7 +290,7 @@ class BZselect extends Buildoz {
|
|||||||
onOption(value, silent=false){
|
onOption(value, silent=false){
|
||||||
if(this.getAttribute('disabled') !== null) return
|
if(this.getAttribute('disabled') !== null) return
|
||||||
this.value = value
|
this.value = value
|
||||||
if(!silent) this.toggle()
|
if(!silent && this.open) this.closeDropdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
addOption(value, markup){
|
addOption(value, markup){
|
||||||
@@ -146,16 +301,16 @@ class BZselect extends Buildoz {
|
|||||||
opt.addEventListener('click',this.onClick.bind(this))
|
opt.addEventListener('click',this.onClick.bind(this))
|
||||||
if(!this.optionscontainer) this.optionscontainer = document.createElement('div')
|
if(!this.optionscontainer) this.optionscontainer = document.createElement('div')
|
||||||
this.optionscontainer.append(opt)
|
this.optionscontainer.append(opt)
|
||||||
this.options = this.querySelectorAll('option')
|
this.syncOptions()
|
||||||
this.#fillFromMarkup = false
|
this.#fillFromMarkup = false
|
||||||
}
|
}
|
||||||
|
|
||||||
fillOptions(opts, erase = true){
|
fillOptions(opts, erase = true){
|
||||||
// Caution: you cannot count on connectedCallback to have run already, because one might fill before adding to the DOM
|
// Caution: you cannot count on connectedCallback to have run already, because one might fill before adding to the DOM
|
||||||
if(erase){
|
if(erase){
|
||||||
this.options = this.querySelectorAll('option')
|
this.syncOptions()
|
||||||
this.options.forEach(node => { node.remove() })
|
this.options.forEach(node => { node.remove() })
|
||||||
this.options = this.querySelectorAll('option')
|
this.syncOptions()
|
||||||
this.onOption('', true) // unselect last
|
this.onOption('', true) // unselect last
|
||||||
}
|
}
|
||||||
for(const opt of opts) this.addOption(opt.value, opt.markup)
|
for(const opt of opts) this.addOption(opt.value, opt.markup)
|
||||||
@@ -271,6 +426,8 @@ class BZslidePane extends Buildoz {
|
|||||||
}
|
}
|
||||||
this.dragMove = this.dragMove.bind(this)
|
this.dragMove = this.dragMove.bind(this)
|
||||||
this.dragEnd = this.dragEnd.bind(this)
|
this.dragEnd = this.dragEnd.bind(this)
|
||||||
|
this.lastClientX = 0
|
||||||
|
this.lastClientY = 0
|
||||||
// Fill with innerHTML or other DOM manip should not allow coating to be removed
|
// Fill with innerHTML or other DOM manip should not allow coating to be removed
|
||||||
this._observer = new MutationObserver(muts => { this.coat() })
|
this._observer = new MutationObserver(muts => { this.coat() })
|
||||||
}
|
}
|
||||||
@@ -301,36 +458,61 @@ class BZslidePane extends Buildoz {
|
|||||||
evt.target.setPointerCapture(evt.pointerId)
|
evt.target.setPointerCapture(evt.pointerId)
|
||||||
this.dragStartX = evt.clientX
|
this.dragStartX = evt.clientX
|
||||||
this.dragStartY = evt.clientY
|
this.dragStartY = evt.clientY
|
||||||
|
this.lastClientX = evt.clientX
|
||||||
|
this.lastClientY = evt.clientY
|
||||||
this.handle.addEventListener('pointermove', this.dragMove)
|
this.handle.addEventListener('pointermove', this.dragMove)
|
||||||
this.handle.addEventListener('pointerup', this.dragEnd)
|
this.handle.addEventListener('pointerup', this.dragEnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
dragMove(evt){
|
dragMove(evt){
|
||||||
const box = this.getBoundingClientRect()
|
const box = this.getBoundingClientRect()
|
||||||
const parentBox = this.parentElement.getBoundingClientRect()
|
const boundaryEl = this.offsetParent || this.parentElement
|
||||||
let width, height
|
const parentBox = boundaryEl.getBoundingClientRect()
|
||||||
|
let width, height, min, max
|
||||||
switch(this.getAttribute('side')){
|
switch(this.getAttribute('side')){
|
||||||
case 'top':
|
case 'top':
|
||||||
height = (evt.clientY > box.top) ? (evt.clientY - box.top) : 0
|
min = parseInt(this.getBZAttribute('minheight')) || 0
|
||||||
if(height>(parentBox.height/2)) height = Math.floor(parentBox.height/2)
|
if(evt.clientY > (box.top + min)) height = (evt.clientY - box.top)
|
||||||
|
else if(evt.clientY < this.lastClientY) height = min
|
||||||
|
else if(evt.clientY > this.lastClientY) height = 0
|
||||||
|
else break
|
||||||
|
max = parseInt(this.getBZAttribute('maxheight')) || Math.floor(parentBox.height/2)
|
||||||
|
height = Math.min(height, parentBox.height, max)
|
||||||
this.style.height = height+'px'
|
this.style.height = height+'px'
|
||||||
break
|
break
|
||||||
case 'bottom':
|
case 'bottom':
|
||||||
height = (evt.clientY < box.bottom) ? (box.bottom - evt.clientY) : 0
|
min = parseInt(this.getBZAttribute('minheight')) || 0
|
||||||
if(height>(parentBox.height/2)) height = Math.floor(parentBox.height/2)
|
if(evt.clientY < (box.bottom - min)) height = (box.bottom - evt.clientY)
|
||||||
|
else if(evt.clientY > this.lastClientY) height = min
|
||||||
|
else if(evt.clientY < this.lastClientY) height = 0
|
||||||
|
else break
|
||||||
|
max = parseInt(this.getBZAttribute('maxheight')) || Math.floor(parentBox.height/2)
|
||||||
|
height = Math.min(height, parentBox.height, max)
|
||||||
this.style.height = height+'px'
|
this.style.height = height+'px'
|
||||||
break
|
break
|
||||||
case 'left':
|
case 'left':
|
||||||
width = (evt.clientX > box.left) ? (evt.clientX - box.left) : 0
|
min = parseInt(this.getBZAttribute('minwidth')) || 0
|
||||||
if(width>(parentBox.width/2)) width = Math.floor(parentBox.width/2)
|
if(evt.clientX < (box.left + min)) width = (evt.clientX - box.left)
|
||||||
|
else if(evt.clientX > this.lastClientX) width = min
|
||||||
|
else if(evt.clientX < this.lastClientX) width = 0
|
||||||
|
else break
|
||||||
|
max = parseInt(this.getBZAttribute('maxwidth')) || Math.floor(parentBox.width/2)
|
||||||
|
width = Math.min(width, parentBox.width, max)
|
||||||
this.style.width = width+'px'
|
this.style.width = width+'px'
|
||||||
break
|
break
|
||||||
case'right':
|
case 'right':
|
||||||
width = (evt.clientX < box.right) ? (box.right - evt.clientX) : 0
|
min = parseInt(this.getBZAttribute('minwidth')) || 0
|
||||||
if(width>(parentBox.width/2)) width = Math.floor(parentBox.width/2)
|
if(evt.clientX < (box.right - min)) width = (box.right - evt.clientX)
|
||||||
|
else if(evt.clientX < this.lastClientX) width = min
|
||||||
|
else if(evt.clientX > this.lastClientX) width = 0
|
||||||
|
else break
|
||||||
|
max = parseInt(this.getBZAttribute('maxwidth')) || Math.floor(parentBox.width/2)
|
||||||
|
width = Math.min(width, parentBox.width, max)
|
||||||
this.style.width = width+'px'
|
this.style.width = width+'px'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
this.lastClientX = evt.clientX
|
||||||
|
this.lastClientY = evt.clientY
|
||||||
}
|
}
|
||||||
|
|
||||||
dragEnd(evt){
|
dragEnd(evt){
|
||||||
@@ -340,4 +522,3 @@ class BZslidePane extends Buildoz {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Buildoz.define('slidepane', BZslidePane)
|
Buildoz.define('slidepane', BZslidePane)
|
||||||
|
|
||||||
+236
@@ -0,0 +1,236 @@
|
|||||||
|
/**
|
||||||
|
* _ ___ Another
|
||||||
|
* / |/ (_)______ __ _____
|
||||||
|
* / / / __(_-</ // (_-<
|
||||||
|
* /_/|_/_/\__/___/\_, /___/
|
||||||
|
* /___/
|
||||||
|
* production !
|
||||||
|
*
|
||||||
|
* Licensed under the MIT License:
|
||||||
|
* This code is free to use and modify,
|
||||||
|
* as long as the copyright notice and license are kept.
|
||||||
|
*/
|
||||||
|
class BZgantt extends Buildoz {
|
||||||
|
|
||||||
|
constructor(){
|
||||||
|
super()
|
||||||
|
this.defaultAttrs = { }
|
||||||
|
}
|
||||||
|
|
||||||
|
async connectedCallback(){
|
||||||
|
await customElements.whenDefined('bz-graflow')
|
||||||
|
super.connectedCallback()
|
||||||
|
this.rowHeight = parseFloat(getComputedStyle(this).getPropertyValue('--row')) || 30
|
||||||
|
|
||||||
|
this.ul = document.createElement('ul')
|
||||||
|
this.ul.classList.add('tasks')
|
||||||
|
this.append(this.ul)
|
||||||
|
this.graflow = document.createElement('bz-graflow')
|
||||||
|
this._syncAttributesToGraflow()
|
||||||
|
this.append(this.graflow)
|
||||||
|
|
||||||
|
this.fireEvent('domConnected', { gantt: this })
|
||||||
|
this.dayWidth = this.getBZAttribute('daywidth') || 20
|
||||||
|
this.dayWidthPadding = 10
|
||||||
|
if(this.getBZAttribute('nodesfile')) this.nodesfile = this.getBZAttribute('nodesfile')
|
||||||
|
else this.initGantt()
|
||||||
|
const dataSrc = this.getBZAttribute('src')
|
||||||
|
if(dataSrc) this.loadData(dataSrc)
|
||||||
|
else this.gantt = { "tasks": [] }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
_syncAttributesToGraflow(){
|
||||||
|
for(const attr of this.attributes){
|
||||||
|
if(attr.name === 'flow') continue
|
||||||
|
this.graflow.setAttribute(attr.name, attr.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async loadData(dataSrc){
|
||||||
|
let buf, ganttObj
|
||||||
|
if(dataSrc instanceof Blob){
|
||||||
|
buf = await dataSrc.text()
|
||||||
|
try{
|
||||||
|
ganttObj = JSON.parse(buf)
|
||||||
|
} catch(err){
|
||||||
|
this.error('Could not parse gantt data JSON!?', err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else if(typeof dataSrc == 'string') {
|
||||||
|
const url = dataSrc
|
||||||
|
const fetchUrl = (typeof url === 'string' && !url.startsWith('blob:') && !url.startsWith('data:'))
|
||||||
|
? (url + '?' + crypto.randomUUID())
|
||||||
|
: url
|
||||||
|
const res = await fetch(fetchUrl)
|
||||||
|
buf = await res.text()
|
||||||
|
try{
|
||||||
|
ganttObj = JSON.parse(buf)
|
||||||
|
} catch(err){
|
||||||
|
this.error('Could not parse gantt data JSON!?', err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else if(typeof dataSrc == 'object') {
|
||||||
|
ganttObj = structuredClone(dataSrc)
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!ganttObj.nodesFile){
|
||||||
|
if(this.getBZAttribute('nodesfile')) ganttObj.nodesFile = this.getBZAttribute('nodesfile')
|
||||||
|
else {
|
||||||
|
this.error('No nodesFile in JSON!?')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.tasks = ganttObj.tasks
|
||||||
|
this.reorder_tasks()
|
||||||
|
await this.graflow.loadNodes(ganttObj.nodesFile)
|
||||||
|
this.refresh()
|
||||||
|
this.fireEvent('ganttDataLoaded', {
|
||||||
|
component: this,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
reorder_tasks(){
|
||||||
|
const byId = new Map(this.tasks.map(t => [t.id, t]))
|
||||||
|
const children = new Map(this.tasks.map(t => [t.id, []]))
|
||||||
|
for(const task of this.tasks){
|
||||||
|
for(const dep of task.dependsOn ?? []){
|
||||||
|
if(children.has(dep)) children.get(dep).push(task)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Subtree weight: number of (unique) descendants of a task
|
||||||
|
const descendants = new Map()
|
||||||
|
const countDescendants = (task, seen) => {
|
||||||
|
for(const child of children.get(task.id)){
|
||||||
|
if(seen.has(child.id)) continue
|
||||||
|
seen.add(child.id)
|
||||||
|
countDescendants(child, seen)
|
||||||
|
}
|
||||||
|
return(seen.size)
|
||||||
|
}
|
||||||
|
for(const task of this.tasks) descendants.set(task.id, countDescendants(task, new Set()))
|
||||||
|
const byWeight = (a, b) => descendants.get(a.id) - descendants.get(b.id)
|
||||||
|
|
||||||
|
// Depth-first walk, a task is placed once all its dependencies are placed
|
||||||
|
const ordered = []
|
||||||
|
const placed = new Set()
|
||||||
|
const ready = task => (task.dependsOn ?? []).every(dep => placed.has(dep) || !byId.has(dep))
|
||||||
|
const visit = task => {
|
||||||
|
if(placed.has(task.id) || !ready(task)) return
|
||||||
|
placed.add(task.id)
|
||||||
|
ordered.push(task)
|
||||||
|
for(const child of [...children.get(task.id)].sort(byWeight)) visit(child)
|
||||||
|
}
|
||||||
|
const roots = this.tasks.filter(t => !(t.dependsOn?.length)).sort(byWeight)
|
||||||
|
for(const root of roots) visit(root)
|
||||||
|
|
||||||
|
// Leftovers (circular dependencies) keep their original order
|
||||||
|
for(const task of this.tasks) if(!placed.has(task.id)) ordered.push(task)
|
||||||
|
this.tasks = ordered
|
||||||
|
}
|
||||||
|
|
||||||
|
getDayIndex(firstDate, date){
|
||||||
|
return Math.ceil((date-firstDate)/86400000)
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFlow(){
|
||||||
|
let firstDate = new Date(this.tasks[0].start)
|
||||||
|
let lastDate = new Date(this.tasks[0].end)
|
||||||
|
for(const task of this.tasks){
|
||||||
|
const startDate = new Date(task.start)
|
||||||
|
const endDate = new Date(task.end)
|
||||||
|
if(startDate < firstDate) firstDate = startDate
|
||||||
|
if(endDate > lastDate) lastDate = endDate
|
||||||
|
}
|
||||||
|
|
||||||
|
const flow = { "nodes": [], "links": [] }
|
||||||
|
let curY = 0
|
||||||
|
const endIdx = this.getDayIndex(firstDate, lastDate)
|
||||||
|
for(const task of this.tasks){
|
||||||
|
const startIdx = this.getDayIndex(firstDate, new Date(task.start))
|
||||||
|
const taskEndIdx = this.getDayIndex(firstDate, new Date(task.end))
|
||||||
|
const markup = {}
|
||||||
|
for(const [key, value] of Object.entries(task)){
|
||||||
|
if(value == null || typeof value === 'object') continue
|
||||||
|
markup[`task.${key}`] = value
|
||||||
|
}
|
||||||
|
if(!markup['task.color']) markup['task.color'] = '#CCC'
|
||||||
|
markup.width = (startIdx<taskEndIdx) ? (taskEndIdx-startIdx) * this.dayWidth : this.dayWidth
|
||||||
|
flow.nodes.push({
|
||||||
|
"nodeType": "bar",
|
||||||
|
"id": task.id,
|
||||||
|
"coords": {
|
||||||
|
"x": (startIdx * this.dayWidth) + (startIdx > 0 ? this.dayWidthPadding : 0),
|
||||||
|
"y": curY,
|
||||||
|
},
|
||||||
|
"markup": markup
|
||||||
|
})
|
||||||
|
for(const dep of task.dependsOn ?? []){
|
||||||
|
flow.links.push({ "from": [dep, "out1"], "to": [task.id, "inp1"] })
|
||||||
|
}
|
||||||
|
curY += this.rowHeight
|
||||||
|
}
|
||||||
|
return([flow, firstDate, endIdx])
|
||||||
|
}
|
||||||
|
|
||||||
|
refresh(){
|
||||||
|
this.ul.innerHTML = ''
|
||||||
|
this.headerLi = document.createElement('li')
|
||||||
|
this.headerLi.classList.add('header')
|
||||||
|
this.ul.appendChild(this.headerLi)
|
||||||
|
|
||||||
|
for(const task of this.tasks){
|
||||||
|
const li = document.createElement('li')
|
||||||
|
li.textContent = task.name
|
||||||
|
li.setAttribute('data-id', task.id)
|
||||||
|
this.ul.appendChild(li)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Publish the widest label width, used by CSS to place the graflow
|
||||||
|
const range = document.createRange()
|
||||||
|
let maxWidth = 0
|
||||||
|
for(const li of this.ul.children){
|
||||||
|
range.selectNodeContents(li)
|
||||||
|
maxWidth = Math.max(maxWidth, range.getBoundingClientRect().width)
|
||||||
|
}
|
||||||
|
this.style.setProperty('--tasks-width', Math.ceil(maxWidth) + 'px')
|
||||||
|
|
||||||
|
const taskLis = [...this.ul.children].slice(1)
|
||||||
|
const row = parseFloat(getComputedStyle(this).getPropertyValue('--row')) || this.rowHeight || 25
|
||||||
|
if(taskLis[0] && taskLis[0].offsetHeight){
|
||||||
|
this.rowHeight = taskLis[1] ? (taskLis[1].offsetTop - taskLis[0].offsetTop) : taskLis[0].offsetHeight
|
||||||
|
this.style.setProperty('--chart-top', `${taskLis[0].offsetTop}px`)
|
||||||
|
} else {
|
||||||
|
this.rowHeight = row
|
||||||
|
this.style.setProperty('--chart-top', `${row}px`)
|
||||||
|
}
|
||||||
|
|
||||||
|
const [flow, firstDate, endIdx] = this.buildFlow()
|
||||||
|
|
||||||
|
let dayDate = new Date(firstDate)
|
||||||
|
for(let idx=0; idx<=endIdx; idx++){
|
||||||
|
const dayDiv = document.createElement('div')
|
||||||
|
dayDiv.classList.add('day')
|
||||||
|
dayDiv.style.left = `calc(var(--chart-left) + ${idx * (this.dayWidth + this.dayWidthPadding)}px)`
|
||||||
|
dayDiv.style.width = (this.dayWidth + this.dayWidthPadding) + 'px'
|
||||||
|
dayDiv.innerHTML = ' ' + dayDate.getDate()
|
||||||
|
if(dayDate.toISOString().substring(0,10) == (new Date()).toISOString().substring(0,10)) dayDiv.classList.add('today')
|
||||||
|
dayDiv.setAttribute('title', new Intl.DateTimeFormat('fr-FR', {
|
||||||
|
timeZone: 'Europe/Paris',
|
||||||
|
day: '2-digit',
|
||||||
|
month: '2-digit',
|
||||||
|
year: '2-digit'
|
||||||
|
}).format(dayDate))
|
||||||
|
dayDate.setDate(dayDate.getDate() + 1)
|
||||||
|
this.headerLi.appendChild(dayDiv)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.graflow.loadFlow({
|
||||||
|
"nodesFile": this.nodesfile,
|
||||||
|
"flow": flow
|
||||||
|
})
|
||||||
|
this.graflow.refresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Buildoz.define('gantt', BZgantt)
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
/**
|
||||||
|
* _ ___ Another
|
||||||
|
* / |/ (_)______ __ _____
|
||||||
|
* / / / __(_-</ // (_-<
|
||||||
|
* /_/|_/_/\__/___/\_, /___/
|
||||||
|
* /___/
|
||||||
|
* production !
|
||||||
|
*
|
||||||
|
* Licensed under the MIT License:
|
||||||
|
* This code is free to use and modify,
|
||||||
|
* as long as the copyright notice and license are kept.
|
||||||
|
*/
|
||||||
|
class BZgrafloweditor extends Buildoz{
|
||||||
|
constructor(){
|
||||||
|
super()
|
||||||
|
this.defaultAttrs = { }
|
||||||
|
}
|
||||||
|
|
||||||
|
async connectedCallback() {
|
||||||
|
await customElements.whenDefined('bz-graflow')
|
||||||
|
await customElements.whenDefined('bz-slidepane')
|
||||||
|
await customElements.whenDefined('bz-select')
|
||||||
|
super.connectedCallback()
|
||||||
|
const nodesUrl = this.getBZAttribute('nodes')
|
||||||
|
this.mainContainer = document.createElement('div')
|
||||||
|
this.mainContainer.classList.add('bzgfe-main-container')
|
||||||
|
this.nodesContainer = document.createElement('div')
|
||||||
|
this.nodesContainer.classList.add('bzgfe-nodes-container')
|
||||||
|
this.mainContainer.append(this.nodesContainer)
|
||||||
|
this.slidePane = document.createElement('bz-slidepane')
|
||||||
|
this.slidePane.setAttribute('side', 'right')
|
||||||
|
this.slidePane.setAttribute('data-output', 'console')
|
||||||
|
this.slidePane.setAttribute('maxwidth', '350')
|
||||||
|
this.slidePane.setAttribute('minwidth', '200')
|
||||||
|
this.fillconsole()
|
||||||
|
//this.mainContainer.append(this.slidePane)
|
||||||
|
this.graflow = document.createElement('bz-graflow')
|
||||||
|
this.graflow.setAttribute('nodes', nodesUrl)
|
||||||
|
this.graflow.setAttribute('edit', "nodesmove,editwires,dropnodes")
|
||||||
|
this.graflow.setAttribute('align', "center")
|
||||||
|
this.graflow.setAttribute('wiretype', "bezier")
|
||||||
|
this.graflow.setAttribute('tension', "30")
|
||||||
|
this.graflow.setAttribute('gapx', "80")
|
||||||
|
this.graflow.setAttribute('gapy', "80")
|
||||||
|
this.graflow.addEventListener('bz:graflow:domConnected', this.setupDropZone.bind(this))
|
||||||
|
this.graflow.append(this.slidePane)
|
||||||
|
this.mainContainer.append(this.graflow)
|
||||||
|
this.append(this.mainContainer)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace1H"]').addEventListener('click',
|
||||||
|
(evt) => { this.graflow.autoPlace('horizontal', null, null, 1000, null) }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace1V"]').addEventListener('click',
|
||||||
|
(evt) => { this.graflow.autoPlace('vertical', null, null, 1000, null) }
|
||||||
|
)
|
||||||
|
document.querySelector('input[name="tension"]').addEventListener('change',
|
||||||
|
(evt) => { this.graflow.setAttribute('tension', evt.target.value); this.graflow.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('input[name="gapx"]').addEventListener('change',
|
||||||
|
(evt) => { this.graflow.setAttribute('gapx', evt.target.value); this.graflow.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('input[name="gapy"]').addEventListener('change',
|
||||||
|
(evt) => { this.graflow.setAttribute('gapy', evt.target.value); this.graflow.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('bz-select[name="wiretype"]').addEventListener('change',
|
||||||
|
(evt) => { this.graflow.setAttribute('wiretype', evt.target.value); this.graflow.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('bz-select[name="align"]').addEventListener('change',
|
||||||
|
(evt) => { this.graflow.setAttribute('align', evt.target.value); this.graflow.refresh() }
|
||||||
|
)
|
||||||
|
this.graflow.addEventListener('bz:graflow:nodesLoaded', this.refreshNodes.bind(this))
|
||||||
|
this.graflow.loadNodes(nodesUrl)
|
||||||
|
}
|
||||||
|
|
||||||
|
fillconsole(){
|
||||||
|
this.slidePane.innerHTML = `
|
||||||
|
<div class="inner-console">
|
||||||
|
<section>
|
||||||
|
<button data-trigger="onAutoplace1H">Auto-place Horizontal</button>
|
||||||
|
<button data-trigger="onAutoplace1V">Auto-place Vertical</button>
|
||||||
|
<div class="cols-2"><label>GapX</label><input name="gapx" type="number" size="2" value="80"></div>
|
||||||
|
<div class="cols-2"><label>GapY</label><input name="gapy" type="number" size="2" value="80"></div>
|
||||||
|
<div class="cols-2">
|
||||||
|
<label>Alignment</label>
|
||||||
|
<bz-select name="align">
|
||||||
|
<option value="center" selected>Center</option>
|
||||||
|
<option value="first">First</option>
|
||||||
|
<option value="last">Last</option>
|
||||||
|
<option value="parent">Parent</option>
|
||||||
|
</bz-select>
|
||||||
|
</div>
|
||||||
|
<div class="cols-2">
|
||||||
|
<label>Wire Type</label>
|
||||||
|
<bz-select name="wiretype">
|
||||||
|
<option value="ortho">Ortho</option>
|
||||||
|
<option value="straight">Straight</option>
|
||||||
|
<option value="bezier" selected>Bezier</option>
|
||||||
|
</bz-select>
|
||||||
|
</div>
|
||||||
|
<div class="cols-2"><label>Tension</label><input name="tension" type="number" size="2" value="30"></div>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<button data-trigger="onImportFlow">Import Flow</button>
|
||||||
|
<button data-trigger="onExportFlow">Export Flow</button>
|
||||||
|
<input type="file" name="importFlow" accept="application/json" style="display: none;">
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
this.onImportFlow = this.onImportFlow.bind(this)
|
||||||
|
this.onExportFlow = this.onExportFlow.bind(this)
|
||||||
|
this.slidePane.querySelector('button[data-trigger="onExportFlow"]').addEventListener('click', (e) => this.onExportFlow(e)) // indirect so override works !
|
||||||
|
this.slidePane.querySelector('button[data-trigger="onImportFlow"]').addEventListener('click', (e) => this.onImportFlow(e))// indirect so override works !
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshNodes(e){
|
||||||
|
for(const nodeType in this.graflow.nodesRegistry){
|
||||||
|
const nodeDef = this.graflow.nodesRegistry[nodeType]
|
||||||
|
if(nodeDef.dataset.editor=='exclude') continue
|
||||||
|
const node = nodeDef.cloneNode(true)
|
||||||
|
this.makeNodeDraggable(node)
|
||||||
|
this.nodesContainer.append(node)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
makeNodeDraggable(node){
|
||||||
|
node.draggable = true
|
||||||
|
node.style.cursor = 'pointer'
|
||||||
|
node.addEventListener('dragstart', (evt) => {
|
||||||
|
evt.dataTransfer.setData('text/plain', node.dataset.nodetype)
|
||||||
|
evt.dataTransfer.effectAllowed = 'copy'
|
||||||
|
evt.dataTransfer.setDragImage(node, evt.offsetX, evt.offsetY)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onNodeDragEnd(evt){
|
||||||
|
console.log('drag end', evt)
|
||||||
|
evt.dataTransfer.clearData()
|
||||||
|
}
|
||||||
|
|
||||||
|
setupDropZone(){
|
||||||
|
const dropZone = this.graflow.wiresContainer
|
||||||
|
const nodesContainer = this.graflow.nodesContainer
|
||||||
|
dropZone.addEventListener('dragover', (evt) => {
|
||||||
|
evt.preventDefault()
|
||||||
|
evt.dataTransfer.dropEffect = 'copy'
|
||||||
|
})
|
||||||
|
dropZone.addEventListener('drop', (evt) => {
|
||||||
|
evt.preventDefault()
|
||||||
|
const nodeType = evt.dataTransfer.getData('text/plain')
|
||||||
|
if(!nodeType || !(nodeType in this.graflow.nodesRegistry)) return
|
||||||
|
const rect = nodesContainer.getBoundingClientRect()
|
||||||
|
const x = evt.clientX - rect.left + nodesContainer.scrollLeft
|
||||||
|
const y = evt.clientY - rect.top + nodesContainer.scrollTop
|
||||||
|
const id = 'n' + crypto.randomUUID().replace(/-/g, '').slice(0, 8)
|
||||||
|
this.graflow.addNode({ id, nodeType, coords: { x, y } })
|
||||||
|
for(const node of this.graflow.flow.nodes){
|
||||||
|
if(node.id == id){
|
||||||
|
node.coords.x = x
|
||||||
|
node.coords.y = y
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.graflow.refresh()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onImportFlow(e){
|
||||||
|
const fileInput = this.slidePane.querySelector('input[name="importFlow"]')
|
||||||
|
fileInput.addEventListener('change', (evt) => {
|
||||||
|
const file = evt.target.files[0]
|
||||||
|
if(file) this.graflow.loadFlow(file)
|
||||||
|
fileInput.value = ''
|
||||||
|
}, { once: true })
|
||||||
|
fileInput.click()
|
||||||
|
}
|
||||||
|
|
||||||
|
onExportFlow(e){
|
||||||
|
const flowDeep = JSON.parse(JSON.stringify(this.graflow.flow))
|
||||||
|
delete flowDeep.longLinks
|
||||||
|
const exportObj = {
|
||||||
|
nodesFile: this.getBZAttribute('nodes'),
|
||||||
|
flow: flowDeep
|
||||||
|
}
|
||||||
|
const flowJson = JSON.stringify(exportObj, null, 2)
|
||||||
|
const flowBlob = new Blob([flowJson], { type: 'application/json' })
|
||||||
|
const flowUrl = URL.createObjectURL(flowBlob)
|
||||||
|
const flowLink = document.createElement('a')
|
||||||
|
flowLink.href = flowUrl
|
||||||
|
flowLink.download = 'flow.json'
|
||||||
|
flowLink.click()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Buildoz.define('grafloweditor', BZgrafloweditor)
|
||||||
+509
-139
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,46 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<script src="../bzGraflow-editor.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
bz-graflow{
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
bz-graflow.compunet{ grid-column: 1 / -1; width: 100vw; height: 60vh; background:black; }
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<bz-grafloweditor nodes="./nodesLib/nodesTest1.html" >
|
||||||
|
</bz-grafloweditor>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<script src="../bzGraflow-editor.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
bz-graflow{
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
bz-graflow.compunet{ grid-column: 1 / -1; width: 100vw; height: 60vh; background:black; }
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
const editor = document.querySelector('bz-grafloweditor')
|
||||||
|
editor.onImportFlow = async (e) => {
|
||||||
|
const fileList = ['testFlow1', 'testFlow2', 'testFlow3']
|
||||||
|
const result = await BZModalDialog('Select your flow...', `
|
||||||
|
Available flows:
|
||||||
|
<select name="flow" style="min-width: 10em;justify-self: center;">
|
||||||
|
${fileList.map(file => `<option value="${file}">${file}</option>`).join('')}
|
||||||
|
</select>
|
||||||
|
`)
|
||||||
|
console.log('result', result)
|
||||||
|
}
|
||||||
|
editor.onExportFlow = (e) => {
|
||||||
|
console.log('onExportFlow')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<bz-grafloweditor nodes="./nodesLib/nodesTest1.html" >
|
||||||
|
</bz-grafloweditor>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"nodesFile": "./nodesLib/nodesGantt.html",
|
||||||
|
"flow": {
|
||||||
|
"nodes":[
|
||||||
|
{ "nodeType": "bar",
|
||||||
|
"id": "t1",
|
||||||
|
"coords": { "x": 20, "y": 0},
|
||||||
|
"markup": { "task": "Task 1", "color": "#0F0", "width": 160 }
|
||||||
|
},
|
||||||
|
{ "nodeType": "bar",
|
||||||
|
"id": "t2",
|
||||||
|
"coords": { "x": 510, "y": 180},
|
||||||
|
"markup": { "task": "Task 2", "color": "#CCF", "width": 60 }
|
||||||
|
},
|
||||||
|
{ "nodeType": "bar",
|
||||||
|
"id": "t3",
|
||||||
|
"coords": { "x": 570, "y": 240},
|
||||||
|
"markup": { "task": "Task 3", "color": "#FFC", "width": 100 }
|
||||||
|
},
|
||||||
|
{ "nodeType": "bar",
|
||||||
|
"id": "t4",
|
||||||
|
"coords": { "x": 20, "y": 60},
|
||||||
|
"markup": { "task": "Task 4", "color": "#FCF", "width": 260 }
|
||||||
|
},
|
||||||
|
{ "nodeType": "bar",
|
||||||
|
"id": "t5",
|
||||||
|
"coords": { "x": 280, "y": 90},
|
||||||
|
"markup": { "task": "Task 5", "color": "#CFF", "width": 30 }
|
||||||
|
},
|
||||||
|
{ "nodeType": "bar",
|
||||||
|
"id": "t6",
|
||||||
|
"coords": { "x": 310, "y": 120},
|
||||||
|
"markup": { "task": "Task 6", "color": "#FFC", "width": 40 }
|
||||||
|
},
|
||||||
|
{ "nodeType": "bar",
|
||||||
|
"id": "t7",
|
||||||
|
"coords": { "x": 180, "y": 30},
|
||||||
|
"markup": { "task": "Task 7", "color": "#FCF", "width": 80 }
|
||||||
|
},
|
||||||
|
{ "nodeType": "bar",
|
||||||
|
"id": "t8",
|
||||||
|
"coords": { "x": 350, "y": 150},
|
||||||
|
"markup": { "task": "Task 8", "color": "#CFF", "width": 160 }
|
||||||
|
},
|
||||||
|
{ "nodeType": "bar",
|
||||||
|
"id": "t9",
|
||||||
|
"coords": { "x": 510, "y": 210},
|
||||||
|
"markup": { "task": "Task 9", "color": "#FFC", "width": 60 }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{ "from": ["t1", "out1"], "to": ["t7", "inp1"] },
|
||||||
|
{ "from": ["t7", "out1"], "to": ["t5", "inp1"] },
|
||||||
|
{ "from": ["t8", "out1"], "to": ["t2", "inp1"] },
|
||||||
|
{ "from": ["t9", "out1"], "to": ["t3", "inp1"] },
|
||||||
|
{ "from": ["t4", "out1"], "to": ["t5", "inp1"] },
|
||||||
|
{ "from": ["t5", "out1"], "to": ["t6", "inp1"] },
|
||||||
|
{ "from": ["t6", "out1"], "to": ["t8", "inp1"] },
|
||||||
|
{ "from": ["t8", "out1"], "to": ["t9", "inp1"] }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"nodesFile": "./nodesLib/nodesTest1.html",
|
||||||
|
"flow": {
|
||||||
|
"nodes":[
|
||||||
|
{ "nodeType": "inc",
|
||||||
|
"id": "aze",
|
||||||
|
"coords": { "x": 220, "y": 120}
|
||||||
|
},
|
||||||
|
{ "nodeType": "inc",
|
||||||
|
"subflow": {
|
||||||
|
"url": "./flows/testFlowEic.json",
|
||||||
|
"portLinks": [
|
||||||
|
{ "refNodeType": "refnodein", "refnodePort": "out1",
|
||||||
|
"parentPort": "in1",
|
||||||
|
"subflowNode":"aze2", "subflowPort": "in1",
|
||||||
|
"direction": "in"
|
||||||
|
},
|
||||||
|
{ "refNodeType": "refnodeout", "refnodePort": "in1",
|
||||||
|
"parentPort": "out1",
|
||||||
|
"subflowNode":"aze5", "subflowPort": "out1",
|
||||||
|
"direction": "out"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"id": "aze2",
|
||||||
|
"coords": { "x": 220, "y": 10}
|
||||||
|
},
|
||||||
|
{ "nodeType": "factor",
|
||||||
|
"id": "qsd",
|
||||||
|
"coords": { "x": 470, "y": 170}
|
||||||
|
},
|
||||||
|
{ "nodeType": "factor",
|
||||||
|
"id": "qsd2",
|
||||||
|
"coords": { "x": 470, "y": 50}
|
||||||
|
},
|
||||||
|
{ "nodeType": "wadder",
|
||||||
|
"id": "wcx",
|
||||||
|
"coords": { "x": 720, "y": 50}
|
||||||
|
},
|
||||||
|
{ "nodeType": "multiplier",
|
||||||
|
"id": "ert",
|
||||||
|
"coords": { "x": 550, "y": 350}
|
||||||
|
},
|
||||||
|
{ "nodeType": "input",
|
||||||
|
"id": "0000",
|
||||||
|
"coords": { "x": 20, "y": 350}
|
||||||
|
},
|
||||||
|
{ "nodeType": "console",
|
||||||
|
"id": "9999",
|
||||||
|
"coords": { "x": 800, "y": 350}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{ "from": ["0000", "out1"], "to": ["aze", "inp1"] },
|
||||||
|
{ "from": ["aze2", "out1"], "to": ["qsd2", "inp1"] },
|
||||||
|
{ "from": ["aze", "out1"], "to": ["qsd", "inp1"] },
|
||||||
|
{ "from": ["qsd2", "out1"], "to": ["ert", "inp2"] },
|
||||||
|
{ "from": ["0000", "out1"], "to": ["aze2", "inp1"] },
|
||||||
|
{ "from": ["qsd2", "out1"], "to": ["wcx", "inp2"] },
|
||||||
|
{ "from": ["wcx", "out1"], "to": ["ert", "inp1"] },
|
||||||
|
{ "from": ["qsd", "out1"], "to": ["wcx", "inp1"] },
|
||||||
|
{ "from": ["ert", "out1"], "to": ["9999", "inp1"] }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"nodesFile": "./nodesLib/nodesTest1.html",
|
||||||
|
"flow": {
|
||||||
|
"nodes":[
|
||||||
|
{ "nodeType": "inc",
|
||||||
|
"id": "aze",
|
||||||
|
"coords": { "x": 220, "y": 120}
|
||||||
|
},
|
||||||
|
{ "nodeType": "inc",
|
||||||
|
"id": "aze2",
|
||||||
|
"coords": { "x": 220, "y": 10}
|
||||||
|
},
|
||||||
|
{ "nodeType": "factor",
|
||||||
|
"id": "qsd",
|
||||||
|
"coords": { "x": 470, "y": 170}
|
||||||
|
},
|
||||||
|
{ "nodeType": "factor",
|
||||||
|
"id": "qsd2",
|
||||||
|
"coords": { "x": 470, "y": 50}
|
||||||
|
},
|
||||||
|
{ "nodeType": "wadder",
|
||||||
|
"id": "wcx",
|
||||||
|
"coords": { "x": 720, "y": 50}
|
||||||
|
},
|
||||||
|
{ "nodeType": "multiplier",
|
||||||
|
"id": "ert",
|
||||||
|
"coords": { "x": 550, "y": 350}
|
||||||
|
},
|
||||||
|
{ "nodeType": "input",
|
||||||
|
"id": "0000",
|
||||||
|
"coords": { "x": 20, "y": 350}
|
||||||
|
},
|
||||||
|
{ "nodeType": "console",
|
||||||
|
"id": "9999",
|
||||||
|
"coords": { "x": 800, "y": 350}
|
||||||
|
},
|
||||||
|
{ "nodeType": "square",
|
||||||
|
"id": "prng",
|
||||||
|
"coords": { "x": 250, "y": 400}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{ "from": ["0000", "out1"], "to": ["aze", "inp1"] },
|
||||||
|
{ "from": ["aze2", "out1"], "to": ["qsd2", "inp1"] },
|
||||||
|
{ "from": ["aze", "out1"], "to": ["qsd", "inp1"] },
|
||||||
|
{ "from": ["qsd2", "out1"], "to": ["ert", "inp2"] },
|
||||||
|
{ "from": ["0000", "out1"], "to": ["aze2", "inp1"] },
|
||||||
|
{ "from": ["qsd2", "out1"], "to": ["wcx", "inp2"] },
|
||||||
|
{ "from": ["wcx", "out1"], "to": ["ert", "inp1"] },
|
||||||
|
{ "from": ["qsd", "out1"], "to": ["wcx", "inp1"] },
|
||||||
|
{ "from": ["ert", "out1"], "to": ["9999", "inp1"] }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,271 @@
|
|||||||
|
{
|
||||||
|
"nodesFile": "./nodesLib/nodes16ports.html",
|
||||||
|
"flow": {
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p1center",
|
||||||
|
"coords": {
|
||||||
|
"x": 300,
|
||||||
|
"y": 200
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "Center",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p1west",
|
||||||
|
"coords": {
|
||||||
|
"x": 200,
|
||||||
|
"y": 200
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "West",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p1north",
|
||||||
|
"coords": {
|
||||||
|
"x": 300,
|
||||||
|
"y": 100
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "North",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p1east",
|
||||||
|
"coords": {
|
||||||
|
"x": 400,
|
||||||
|
"y": 200
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "East",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p1south",
|
||||||
|
"coords": {
|
||||||
|
"x": 300,
|
||||||
|
"y": 300
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "South",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p2center",
|
||||||
|
"coords": {
|
||||||
|
"x": 800,
|
||||||
|
"y": 200
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "Center",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p2west",
|
||||||
|
"coords": {
|
||||||
|
"x": 700,
|
||||||
|
"y": 200
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "West",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p2north",
|
||||||
|
"coords": {
|
||||||
|
"x": 800,
|
||||||
|
"y": 100
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "North",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p2east",
|
||||||
|
"coords": {
|
||||||
|
"x": 900,
|
||||||
|
"y": 200
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "East",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p2south",
|
||||||
|
"coords": {
|
||||||
|
"x": 800,
|
||||||
|
"y": 300
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "South",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p3center",
|
||||||
|
"coords": {
|
||||||
|
"x": 300,
|
||||||
|
"y": 600
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "Center",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p3west",
|
||||||
|
"coords": {
|
||||||
|
"x": 200,
|
||||||
|
"y": 600
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "West",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p3north",
|
||||||
|
"coords": {
|
||||||
|
"x": 300,
|
||||||
|
"y": 500
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "North",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p3east",
|
||||||
|
"coords": {
|
||||||
|
"x": 400,
|
||||||
|
"y": 600
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "East",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p3south",
|
||||||
|
"coords": {
|
||||||
|
"x": 300,
|
||||||
|
"y": 700
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "South",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p4center",
|
||||||
|
"coords": {
|
||||||
|
"x": 800,
|
||||||
|
"y": 600
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "Center",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p4west",
|
||||||
|
"coords": {
|
||||||
|
"x": 700,
|
||||||
|
"y": 600
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "West",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p4north",
|
||||||
|
"coords": {
|
||||||
|
"x": 800,
|
||||||
|
"y": 500
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "North",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p4east",
|
||||||
|
"coords": {
|
||||||
|
"x": 900,
|
||||||
|
"y": 600
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "East",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "square",
|
||||||
|
"id": "p4south",
|
||||||
|
"coords": {
|
||||||
|
"x": 800,
|
||||||
|
"y": 700
|
||||||
|
},
|
||||||
|
"markup": {
|
||||||
|
"title": "South",
|
||||||
|
"subtitle": "."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{ "from": ["p1center", "s"], "to": ["p1south", "n"] },
|
||||||
|
{ "from": ["p1center", "e"], "to": ["p1east", "w"] },
|
||||||
|
{ "from": ["p1center", "n"], "to": ["p1north", "s"] },
|
||||||
|
{ "from": ["p1center", "w"], "to": ["p1west", "e"] },
|
||||||
|
|
||||||
|
{ "from": ["p2center", "s"], "to": ["p2south", "e"] },
|
||||||
|
{ "from": ["p2center", "e"], "to": ["p2east", "n"] },
|
||||||
|
{ "from": ["p2center", "n"], "to": ["p2north", "w"] },
|
||||||
|
{ "from": ["p2center", "w"], "to": ["p2west", "s"] },
|
||||||
|
|
||||||
|
{ "from": ["p3center", "s"], "to": ["p3south", "s"] },
|
||||||
|
{ "from": ["p3center", "e"], "to": ["p3east", "e"] },
|
||||||
|
{ "from": ["p3center", "n"], "to": ["p3north", "n"] },
|
||||||
|
{ "from": ["p3center", "w"], "to": ["p3west", "w"] },
|
||||||
|
|
||||||
|
{ "from": ["p4center", "s"], "to": ["p4south", "w"] },
|
||||||
|
{ "from": ["p4center", "e"], "to": ["p4east", "s"] },
|
||||||
|
{ "from": ["p4center", "n"], "to": ["p4north", "e"] },
|
||||||
|
{ "from": ["p4center", "w"], "to": ["p4west", "n"] }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"nodesFile": "./nodesLib/nodesTest2.html",
|
||||||
|
"flow": {
|
||||||
|
"nodes":[
|
||||||
|
{ "nodeType": "process",
|
||||||
|
"id": "aze2",
|
||||||
|
"xcoords": { "x": 220, "y": 120},
|
||||||
|
"markup": { "text": "x = alph - 1" }
|
||||||
|
},
|
||||||
|
{ "nodeType": "condition",
|
||||||
|
"id": "qsd",
|
||||||
|
"xcoords": { "x": 250, "y": 270},
|
||||||
|
"markup": { "text": "x > 0" }
|
||||||
|
},
|
||||||
|
{ "nodeType": "preparation",
|
||||||
|
"id": "qsd2",
|
||||||
|
"xcoords": { "x": 250, "y": 470},
|
||||||
|
"markup": { "text": "prepare SQL" }
|
||||||
|
},
|
||||||
|
{ "nodeType": "database",
|
||||||
|
"id": "wcx",
|
||||||
|
"xcoords": { "x": 500, "y": 450},
|
||||||
|
"markup": { "text": "MySQL<br>Store" }
|
||||||
|
},
|
||||||
|
{ "nodeType": "end",
|
||||||
|
"id": "ert",
|
||||||
|
"xcoords": { "x": 250, "y": 650},
|
||||||
|
"markup": { "text": "End" }
|
||||||
|
},
|
||||||
|
{ "nodeType": "start",
|
||||||
|
"id": "aze",
|
||||||
|
"xcoords": { "x": 220, "y": 20},
|
||||||
|
"markup": { "text": "StartMike" }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{ "from": ["aze", "out1"], "to": ["aze2", "inout1"], "endArrow":true },
|
||||||
|
{ "from": ["aze2", "inout2"], "to": ["qsd", "inp1"], "endArrow":true },
|
||||||
|
{ "from": ["qsd", "out1"], "to": ["aze2", "inout3"], "endArrow":true },
|
||||||
|
{ "from": ["qsd", "out2"], "to": ["qsd2", "inp1"], "endArrow":true },
|
||||||
|
{ "from": ["qsd2", "inout2"], "to": ["wcx", "inout1"], "startArrow":true , "endArrow":true },
|
||||||
|
{ "from": ["qsd2", "out1"], "to": ["ert", "inp1"], "endArrow":true },
|
||||||
|
{ "from": ["qsd2", "inout1"], "to": ["qsd2", "inout1"], "endArrow":true },
|
||||||
|
{ "from": ["aze2", "inout4"], "to": ["wcx", "inout1"], "endArrow":true }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"nodesFile": "./nodesLib/nodesEIC.html",
|
||||||
|
"flow": {
|
||||||
|
"nodes":[
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "aze",
|
||||||
|
"ncoords": { "x": 50, "y": 120},
|
||||||
|
"markup": {
|
||||||
|
"title": "Build attendees list",
|
||||||
|
"subtitle": "Build an attendees list to email"
|
||||||
|
},
|
||||||
|
"data": { "a": "a1", "b":"b1"}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "aze2",
|
||||||
|
"ncoords": { "x": 100, "y": 220},
|
||||||
|
"markup": {
|
||||||
|
"title": "Select message",
|
||||||
|
"subtitle": "Select an email template"
|
||||||
|
},
|
||||||
|
"data": { "a": "a2", "b":"b2"}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "aze3",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "Data mapping",
|
||||||
|
"subtitle": "Associate content variables with attendees data"
|
||||||
|
},
|
||||||
|
"data": { "a": "a3", "b":"b3"},
|
||||||
|
"subflow": {
|
||||||
|
"url": "./flows/testFlowICMP.json",
|
||||||
|
"portLinks": [
|
||||||
|
{ "refNodeType": "refnodein", "refnodePort": "out1",
|
||||||
|
"parentPort": "in1",
|
||||||
|
"subflowNode":"cid", "subflowPort": "in3",
|
||||||
|
"direction": "in"
|
||||||
|
},
|
||||||
|
{ "refNodeType": "refnodeout", "refnodePort": "in1",
|
||||||
|
"parentPort": "out1",
|
||||||
|
"subflowNode":"signature", "subflowPort": "out2",
|
||||||
|
"direction": "out"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "aze4",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "Schedule mailing",
|
||||||
|
"subtitle": "Choose time to send the mail"
|
||||||
|
},
|
||||||
|
"data": { "a": "a3", "b":"b3"}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "aze5",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "Stats",
|
||||||
|
"subtitle": "Access mailing statistics"
|
||||||
|
},
|
||||||
|
"data": { "a": "a3", "b":"b3"}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{ "from": ["aze2", "out1"], "to": ["aze", "in1"] },
|
||||||
|
{ "from": ["aze2", "out2"], "to": ["aze3", "in1"] },
|
||||||
|
{ "from": ["aze", "out1"], "to": ["aze4", "in1"] },
|
||||||
|
{ "from": ["aze3", "out1"], "to": ["aze4", "in2"] },
|
||||||
|
{ "from": ["aze4", "out1"], "to": ["aze5", "in1"] }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
{
|
||||||
|
"nodesFile": "./nodesLib/nodesEIC.html",
|
||||||
|
"flow": {
|
||||||
|
"nodes":[
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "config",
|
||||||
|
"ncoords": { "x": 50, "y": 120},
|
||||||
|
"markup": {
|
||||||
|
"title": "Configure event",
|
||||||
|
"subtitle": "",
|
||||||
|
"severity": "warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "mailinvit",
|
||||||
|
"ncoords": { "x": 100, "y": 220},
|
||||||
|
"markup": {
|
||||||
|
"title": "Candidates invitation mailing",
|
||||||
|
"subtitle": "",
|
||||||
|
"severity": "success"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "applicationsurvey",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "Application survey",
|
||||||
|
"subtitle": "",
|
||||||
|
"severity": "success"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "enrollment",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "Candidates enrollment",
|
||||||
|
"subtitle": "",
|
||||||
|
"severity": "secondary"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "mailwelcome",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "Welcome mailing",
|
||||||
|
"subtitle": "",
|
||||||
|
"severity": "warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "mailrejection",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "Rejection mailing",
|
||||||
|
"subtitle": "",
|
||||||
|
"severity": "warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "event",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "Event",
|
||||||
|
"subtitle": "",
|
||||||
|
"severity": "secondary"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "mailstatisfaction",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "Satisfaction survey mailing",
|
||||||
|
"subtitle": "",
|
||||||
|
"severity": "success"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "satisfactionsurvey",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "Satisfaction survey",
|
||||||
|
"subtitle": "",
|
||||||
|
"severity": "warning"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{ "from": ["config", "out1"], "to": ["mailinvit", "in1"] },
|
||||||
|
{ "from": ["mailinvit", "out1"], "to": ["applicationsurvey", "in1"] },
|
||||||
|
{ "from": ["applicationsurvey", "out1"], "to": ["enrollment", "in1"] },
|
||||||
|
{ "from": ["enrollment", "out1"], "to": ["mailwelcome", "in1"] },
|
||||||
|
{ "from": ["enrollment", "out1"], "to": ["mailrejection", "in1"] },
|
||||||
|
{ "from": ["mailwelcome", "out1"], "to": ["event", "in1"] },
|
||||||
|
{ "from": ["event", "out1"], "to": ["mailstatisfaction", "in1"] },
|
||||||
|
{ "from": ["mailstatisfaction", "out1"], "to": ["satisfactionsurvey", "in1"] }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
{
|
||||||
|
"nodesFile": "./nodesLib/nodesEIC.html",
|
||||||
|
"flow": {
|
||||||
|
"nodes":[
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "eval",
|
||||||
|
"markup": {
|
||||||
|
"title": "Evaluations",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "info"
|
||||||
|
},
|
||||||
|
"data": { "node": "eval", "nodeId":null}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "gap",
|
||||||
|
"ncoords": { "x": 100, "y": 220},
|
||||||
|
"markup": {
|
||||||
|
"title": "GAP",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "accent"
|
||||||
|
},
|
||||||
|
"data": { "a": "a2", "b":"b2"}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "cid",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "CID",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "primary"
|
||||||
|
},
|
||||||
|
"data": { "a": "a3", "b":"b3"}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "allocation",
|
||||||
|
"markup": {
|
||||||
|
"title": "Case Allocation",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "success"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "signature",
|
||||||
|
"markup": {
|
||||||
|
"title": "Grant Signature",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "danger"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "grant"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "progress-meeting",
|
||||||
|
"markup": {
|
||||||
|
"title": "Progress Meetings",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "grant",
|
||||||
|
"instanciable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "techdd",
|
||||||
|
"markup": {
|
||||||
|
"title": "Tech Due Diligences",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "kyc",
|
||||||
|
"markup": {
|
||||||
|
"title": "KYC",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "aifm-advisory",
|
||||||
|
"markup": {
|
||||||
|
"title": "AIFM Advisory Commitee",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "aifm-investment",
|
||||||
|
"markup": {
|
||||||
|
"title": "AIFM Investment Commitee",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity",
|
||||||
|
"parent": "aifm-advisory"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "agreement",
|
||||||
|
"markup": {
|
||||||
|
"title": "Investment Agreement",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "warning"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity",
|
||||||
|
"parent": "aifm-investment"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{ "from": ["eval", "out2"], "to": ["gap", "in1"] },
|
||||||
|
{ "from": ["eval", "out1"], "to": ["cid", "in1"] },
|
||||||
|
{ "from": ["eval", "out3"], "to": ["allocation", "in1"] },
|
||||||
|
{ "from": ["gap", "out1"], "to": ["signature", "in1"] },
|
||||||
|
{ "from": ["signature", "out1"], "to": ["progress-meeting", "in1"] },
|
||||||
|
{ "from": ["cid", "out1"], "to": ["techdd", "in1"] },
|
||||||
|
{ "from": ["allocation", "out1"], "to": ["techdd", "in3"] },
|
||||||
|
{ "from": ["allocation", "out2"], "to": ["kyc", "in2"] },
|
||||||
|
{ "from": ["techdd", "out1"], "to": ["aifm-advisory", "in1"] },
|
||||||
|
{ "from": ["kyc", "out1"], "to": ["aifm-advisory", "in3"] },
|
||||||
|
{ "from": ["aifm-advisory", "out1"], "to": ["aifm-investment", "in1"] },
|
||||||
|
{ "from": ["aifm-investment", "out1"], "to": ["agreement", "in1"] },
|
||||||
|
{ "from": ["gap", "out3"], "to": ["aifm-investment", "in1"] }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
{
|
||||||
|
"nodesFile": "./nodesLib/nodesEIC2.html",
|
||||||
|
"flow": {
|
||||||
|
"nodes":[
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "eval",
|
||||||
|
"markup": {
|
||||||
|
"title": "Evaluations",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": { "node": "eval", "nodeId":null}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "gap",
|
||||||
|
"ncoords": { "x": 100, "y": 220},
|
||||||
|
"markup": {
|
||||||
|
"title": "GAP",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": { "a": "a2", "b":"b2"}
|
||||||
|
},
|
||||||
|
{ "nodeType": "eicBasic",
|
||||||
|
"id": "cid",
|
||||||
|
"ncoords": { "x": 150, "y": 320},
|
||||||
|
"markup": {
|
||||||
|
"title": "CID",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": { "a": "a3", "b":"b3"}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "allocation",
|
||||||
|
"markup": {
|
||||||
|
"title": "Case Allocation",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "signature",
|
||||||
|
"markup": {
|
||||||
|
"title": "Grant Signature",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "grant"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "progress-meeting",
|
||||||
|
"markup": {
|
||||||
|
"title": "Progress Meetings",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "grant",
|
||||||
|
"instanciable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "techdd",
|
||||||
|
"markup": {
|
||||||
|
"title": "Tech Due Diligences",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "kyc",
|
||||||
|
"markup": {
|
||||||
|
"title": "KYC",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "aifm-advisory",
|
||||||
|
"markup": {
|
||||||
|
"title": "AIFM Advisory Commitee",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "aifm-investment",
|
||||||
|
"markup": {
|
||||||
|
"title": "AIFM Investment Commitee",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity",
|
||||||
|
"parent": "aifm-advisory"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeType": "eicBasic",
|
||||||
|
"id": "agreement",
|
||||||
|
"markup": {
|
||||||
|
"title": "Investment Agreement",
|
||||||
|
"subtitle": "...",
|
||||||
|
"severity": "secondary"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"track": "equity",
|
||||||
|
"parent": "aifm-investment"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{ "from": ["eval", "out1"], "to": ["gap", "in1"] , "endArrow":true},
|
||||||
|
{ "from": ["eval", "out1"], "to": ["cid", "in1"] , "endArrow":true},
|
||||||
|
{ "from": ["eval", "out1"], "to": ["allocation", "in1"] , "endArrow":true},
|
||||||
|
{ "from": ["gap", "out1"], "to": ["signature", "in1"] , "endArrow":true},
|
||||||
|
{ "from": ["signature", "out1"], "to": ["progress-meeting", "in1"] , "endArrow":true},
|
||||||
|
{ "from": ["cid", "out1"], "to": ["techdd", "in1"] , "endArrow":true, "startArrow":true},
|
||||||
|
{ "from": ["allocation", "out1"], "to": ["techdd", "in1"] , "endArrow":true, "startArrow":true},
|
||||||
|
{ "from": ["allocation", "out1"], "to": ["kyc", "in1"] , "endArrow":true, "startArrow":true},
|
||||||
|
{ "from": ["techdd", "out1"], "to": ["aifm-advisory", "in1"] },
|
||||||
|
{ "from": ["kyc", "out1"], "to": ["aifm-advisory", "in1"] , "endArrow":true},
|
||||||
|
{ "from": ["aifm-advisory", "out1"], "to": ["aifm-investment", "in1"] , "endArrow":true},
|
||||||
|
{ "from": ["aifm-investment", "out1"], "to": ["agreement", "in1"] , "endArrow":true},
|
||||||
|
{ "from": ["gap", "out1"], "to": ["aifm-investment", "in1"] , "endArrow":true}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<style>
|
||||||
|
.bzgf-node {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
padding: .5em;
|
||||||
|
}
|
||||||
|
.bzgf-node .body{
|
||||||
|
z-index: 1;
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background: var(--eicui-base-color-grey-25);
|
||||||
|
border:2px solid var(--eicui-base-color-grey-50);
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
.bzgf-node .title {
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--app-color-black);
|
||||||
|
margin: .5em auto .2em auto;
|
||||||
|
}
|
||||||
|
.bzgf-node .subtitle {
|
||||||
|
font-size: .9em;
|
||||||
|
color: var(--eicui-base-color-primary-100);
|
||||||
|
width: 90%;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
.bzgf-node .port{
|
||||||
|
position: absolute;
|
||||||
|
height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
background: var(--eicui-base-color-info-25);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node [data-direction="n"]{ top: -4px; left: 50%; transform: translateX(-50%);}
|
||||||
|
.bzgf-node [data-direction="s"]{ bottom: -4px; left: 50%; transform: translateX(-50%);}
|
||||||
|
.bzgf-node [data-direction="w"]{ left: -4px; top: 50%; transform: translateY(-50%);}
|
||||||
|
.bzgf-node [data-direction="e"]{ right: -4px; top: 50%; transform: translateY(-50%);}
|
||||||
|
|
||||||
|
.bzgf-wire{ stroke: var(--eicui-base-color-info); stroke-width: 4px; stroke-dasharray: 10,5; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="square">
|
||||||
|
<div class="body">
|
||||||
|
<div class="title">{title}</div>
|
||||||
|
<div class="subtitle">{subtitle}</div>
|
||||||
|
</div>
|
||||||
|
<div class="port" data-id="w" data-direction="w"></div>
|
||||||
|
<div class="port" data-id="n" data-direction="n"></div>
|
||||||
|
<div class="port" data-id="e" data-direction="e"></div>
|
||||||
|
<div class="port" data-id="s" data-direction="s"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
<style>
|
||||||
|
.bzgf-node {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
width: 160px;
|
||||||
|
height: 80px;
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
padding: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.bzgf-node div.body[primary] { background-color: var(--eicui-base-color-primary); color:white;}
|
||||||
|
div.bzgf-node div.body[info] { background-color: var(--eicui-base-color-info); color:white;}
|
||||||
|
div.bzgf-node div.body[success] { background-color: var(--eicui-base-color-success); color:white;}
|
||||||
|
div.bzgf-node div.body[warning] { background-color: var(--eicui-base-color-warning);}
|
||||||
|
div.bzgf-node div.body[danger] { background-color: var(--eicui-base-color-danger);}
|
||||||
|
div.bzgf-node div.body[accent] { background-color: var(--eicui-base-color-accent);}
|
||||||
|
|
||||||
|
.bzgf-node .body{
|
||||||
|
z-index: 1;
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background: var(--eicui-base-color-grey-25);
|
||||||
|
border:2px solid var(--eicui-base-color-grey-50);
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
.bzgf-node .title {
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--app-color-black);
|
||||||
|
margin: .5em auto .2em auto;
|
||||||
|
}
|
||||||
|
.bzgf-node .subtitle {
|
||||||
|
|
||||||
|
font-size: .9em;
|
||||||
|
color: var(--eicui-base-color-primary-100);
|
||||||
|
width: 90%;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
.bzgf-node .port{
|
||||||
|
position: absolute;
|
||||||
|
height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
background: var(--eicui-base-color-info-25);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node [data-direction="n"]{ top: -4px; left: 50%; transform: translateX(-50%);}
|
||||||
|
.bzgf-node [data-direction="s"]{ bottom: -4px; left: 50%; transform: translateX(-50%);}
|
||||||
|
.bzgf-node [data-direction="w"]{ left: -4px; top: 50%; transform: translateY(-50%);}
|
||||||
|
.bzgf-node [data-direction="e"]{ right: -4px; top: 50%; transform: translateY(-50%);}
|
||||||
|
|
||||||
|
|
||||||
|
.bzgf-node [data-id="in2"]{ top: 25%; }
|
||||||
|
.bzgf-node [data-id="in3"]{ top: 75%; }
|
||||||
|
|
||||||
|
.bzgf-node [data-id="out2"]{ top: 25%; }
|
||||||
|
.bzgf-node [data-id="out3"]{ top: 75%; }
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="refnodein"], .bzgf-node[data-nodetype="refnodeout"] {
|
||||||
|
width:3em;
|
||||||
|
height:3em;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="refnodein"] .body, .bzgf-node[data-nodetype="refnodeout"] .body{
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 3em;
|
||||||
|
height: 3em;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="refnodein"] .body, .bzgf-node[data-nodetype="refnodeout"] .body{ background: var(--eicui-base-color-grey-25); }
|
||||||
|
|
||||||
|
.bzgf-wire{ stroke: var(--eicui-base-color-info); stroke-width: 4px; stroke-dasharray: 10,5; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="eicBasic">
|
||||||
|
<div class="body" {severity}>
|
||||||
|
<div class="title">{title}</div>
|
||||||
|
<div class="subtitle">{subtitle}</div>
|
||||||
|
</div>
|
||||||
|
<div class="port" data-type="in" data-id="in1" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="in" data-id="in2" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="in" data-id="in3" data-direction="w"></div>
|
||||||
|
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
<div class="port" data-type="out" data-id="out2" data-direction="e"></div>
|
||||||
|
<div class="port" data-type="out" data-id="out3" data-direction="e"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="refnodein">
|
||||||
|
<div class="body">{parentport}</div>
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="refnodeout">
|
||||||
|
<div class="body">{parentport}</div>
|
||||||
|
<div class="port" data-type="in" data-id="in1" data-direction="w"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
<style>
|
||||||
|
.bzgf-node {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
width: 160px;
|
||||||
|
height: 80px;
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
padding: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.bzgf-node[primary] { background-color: var(--eicui-base-color-primary);}
|
||||||
|
div.bzgf-node[info] { background-color: var(--eicui-base-color-info);}
|
||||||
|
div.bzgf-node[success] { background-color: var(--eicui-base-color-success);}
|
||||||
|
div.bzgf-node[warning] { background-color: var(--eicui-base-color-warning);}
|
||||||
|
div.bzgf-node[danger] { background-color: var(--eicui-base-color-danger);}
|
||||||
|
div.bzgf-node[accent] { background-color: var(--eicui-base-color-accent);}
|
||||||
|
|
||||||
|
.bzgf-node .body{
|
||||||
|
z-index: 1;
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background: var(--eicui-base-color-grey-25);
|
||||||
|
border:2px solid var(--eicui-base-color-grey-50);
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
.bzgf-node .title {
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--app-color-black);
|
||||||
|
margin: .5em auto .2em auto;
|
||||||
|
}
|
||||||
|
.bzgf-node .subtitle {
|
||||||
|
font-size: .9em;
|
||||||
|
color: var(--eicui-base-color-primary-100);
|
||||||
|
width: 90%;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
.bzgf-node .port{
|
||||||
|
position: absolute;
|
||||||
|
height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
background: var(--eicui-base-color-info-25);
|
||||||
|
opacity: 0;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node [data-direction="n"]{ top: -4px; left: 50%; transform: translateX(-50%);}
|
||||||
|
.bzgf-node [data-direction="s"]{ bottom: -4px; left: 50%; transform: translateX(-50%);}
|
||||||
|
.bzgf-node [data-direction="w"]{ left: -4px; top: 50%; transform: translateY(-50%);}
|
||||||
|
.bzgf-node [data-direction="e"]{ right: -4px; top: 50%; transform: translateY(-50%);}
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="refnodein"], .bzgf-node[data-nodetype="refnodeout"] {
|
||||||
|
width:3em;
|
||||||
|
height:3em;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="refnodein"] .body, .bzgf-node[data-nodetype="refnodeout"] .body{
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 3em;
|
||||||
|
height: 3em;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="refnodein"] .body, .bzgf-node[data-nodetype="refnodeout"] .body{ background: var(--eicui-base-color-grey-25); }
|
||||||
|
|
||||||
|
.bzgf-wire{ stroke: var(--eicui-base-color-info); stroke-width: 4px; stroke-dasharray: 10,5; }
|
||||||
|
|
||||||
|
path.arrow-head{ fill: var(--eicui-base-color-info); }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<svg style="display:none" aria-hidden="true">
|
||||||
|
<template id="svg-arrows">
|
||||||
|
<defs>
|
||||||
|
<marker id="arrow"
|
||||||
|
viewBox="0 0 16 16"
|
||||||
|
refX="16"
|
||||||
|
refY="8"
|
||||||
|
markerWidth="16"
|
||||||
|
markerHeight="16"
|
||||||
|
orient="auto-start-reverse"
|
||||||
|
markerUnits="userSpaceOnUse">
|
||||||
|
<path d="M0,0 L16,8 L0,16 Z" class="arrow-head"/>
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
|
</template>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="eicBasic">
|
||||||
|
<div class="body">
|
||||||
|
<div class="title">{title}</div>
|
||||||
|
<div class="subtitle">{subtitle}</div>
|
||||||
|
</div>
|
||||||
|
<div class="port" data-type="in" data-id="in1" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="refnodein">
|
||||||
|
<div class="body">{parentport}</div>
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="refnodeout">
|
||||||
|
<div class="body">{parentport}</div>
|
||||||
|
<div class="port" data-type="in" data-id="in1" data-direction="w"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<style>
|
||||||
|
.bzgf-node {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node .body{
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
height: calc(var(--row, 30px) - 2 * var(--bar-gap, 8px));
|
||||||
|
line-height: calc(var(--row, 30px) - 2 * var(--bar-gap, 8px));
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: .9em;
|
||||||
|
padding: 0 2px 0 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node .port{
|
||||||
|
position: absolute;
|
||||||
|
height: 1px;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node [data-direction="w"]{ left: -4px; top: 50%; }
|
||||||
|
.bzgf-node [data-direction="e"]{ right: -4px; top: 50%; }
|
||||||
|
|
||||||
|
.bzgf-wire{ stroke: #AAA; stroke-width: 1; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="bar">
|
||||||
|
<div class="port" data-type="in" data-id="inp1" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
<div class="body" style="background-color:{color};width:{width}px;" title="{task}">{task}</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,229 @@
|
|||||||
|
<style>
|
||||||
|
.bzgf-node {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-width:2px;
|
||||||
|
border-style: solid;
|
||||||
|
border-radius: 6px;
|
||||||
|
width: 160px;
|
||||||
|
height: 80px;
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
padding: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node .title {
|
||||||
|
font-weight: bold;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 2em;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.bzgf-node .body { margin-top: 2em; }
|
||||||
|
.bzgf-node .body input {
|
||||||
|
width:4em;
|
||||||
|
font-size: .9em;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
}
|
||||||
|
.bzgf-node .body div{ font-size: 12px; text-align: left; line-height: 24px; }
|
||||||
|
.bzgf-node .port{
|
||||||
|
position: absolute;
|
||||||
|
height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
border: 1px solid black;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
.bzgf-node .port[data-type="in"] { background: #0F0; }
|
||||||
|
.bzgf-node .port[data-type="out"] { background: #FF0; }
|
||||||
|
|
||||||
|
.bzgf-node [data-direction="w"]{ left: -7px; top: calc(50% + 1em); transform: translateY(-50%);}
|
||||||
|
.bzgf-node [data-direction="e"]{ right: -7px; top: calc(50% + 1em); transform: translateY(-50%);}
|
||||||
|
.bzgf-node [data-direction="n"]{ top: -7px; left: 50%; transform: translateX(-50%);}
|
||||||
|
.bzgf-node [data-direction="s"]{ bottom: -7px; left: 50%; transform: translateX(-50%);}
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="inc"]{
|
||||||
|
background: #DFD;
|
||||||
|
border-color: #090;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="inc"] .title{ background: #090; }
|
||||||
|
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="wadder"]{
|
||||||
|
background: #DFD;
|
||||||
|
border-color: #090;
|
||||||
|
height:150px
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="wadder"] .body{ display: grid; grid-gap: 4px; margin-left:0.5em; grid-template-columns: 1fr 1fr; align-items: center; }
|
||||||
|
.bzgf-node[data-nodetype="wadder"] .title{ background: #090; }
|
||||||
|
.bzgf-node[data-nodetype="wadder"] .port[data-id="inp1"] { top:51px; }
|
||||||
|
.bzgf-node[data-nodetype="wadder"] .port[data-id="inp2"] { top:75px; }
|
||||||
|
.bzgf-node[data-nodetype="wadder"] .port[data-id="inp3"] { top:99px; }
|
||||||
|
.bzgf-node[data-nodetype="wadder"] .port[data-id="inp4"] { top:123px; }
|
||||||
|
.bzgf-node[data-nodetype="wadder"] .port[data-id="inp5"] { top:147px; }
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="factor"]{
|
||||||
|
background: #DDF;
|
||||||
|
border-color: #009;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="factor"] .title{ background: #009; }
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="multiplier"]{
|
||||||
|
background: #DDF;
|
||||||
|
border-color: #009;
|
||||||
|
height:110px
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="multiplier"] .body{
|
||||||
|
font-size:40px;
|
||||||
|
font-weight: bold;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="multiplier"] .title{ background: #009; }
|
||||||
|
.bzgf-node[data-nodetype="multiplier"] .port[data-id="inp1"] { top:37px; }
|
||||||
|
.bzgf-node[data-nodetype="multiplier"] .port[data-id="inp2"] { top:63px; }
|
||||||
|
.bzgf-node[data-nodetype="multiplier"] .port[data-id="inp3"] { top:89px; }
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="input"],
|
||||||
|
.bzgf-node[data-nodetype="console"]{
|
||||||
|
background: #CCC;
|
||||||
|
border-color: #555;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="input"] .title,
|
||||||
|
.bzgf-node[data-nodetype="console"] .title{ background: #555; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="square"]{
|
||||||
|
background: #FAA;
|
||||||
|
border-color: #A00;
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="square"] .title{ background: #555; }
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="refnodein"], .bzgf-node[data-nodetype="refnodeout"] {
|
||||||
|
width:3em;
|
||||||
|
height:3em;
|
||||||
|
padding: 2px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="refnodein"] .body, .bzgf-node[data-nodetype="refnodeout"] .body{
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 3em;
|
||||||
|
height: 3em;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="refnodein"] .port, .bzgf-node[data-nodetype="refnodeout"] .port{
|
||||||
|
top: 50%;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="refnodein"] .body{ background: #0F0; }
|
||||||
|
.bzgf-node[data-nodetype="refnodeout"] .body{ background: #FF0; }
|
||||||
|
|
||||||
|
.bzgf-wire{ stroke: #0AF; stroke-width: 2; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="inc">
|
||||||
|
<div class="title">Fixed Increment</div>
|
||||||
|
<div class="port" data-type="in" data-id="inp1" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
<div class="body">
|
||||||
|
<label>Increment:</label><input name="incvalue" type="text" value="1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="factor">
|
||||||
|
<div class="title">Fixed factor</div>
|
||||||
|
<div class="port" data-type="in" data-id="inp1" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
<div class="body">
|
||||||
|
<label>Factor:</label><input name="factvalue" type="text" value="0.5">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="wadder">
|
||||||
|
<div class="title">Adder</div>
|
||||||
|
<div class="port" data-type="in" data-id="inp1" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="in" data-id="inp2" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="in" data-id="inp3" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="in" data-id="inp4" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="in" data-id="inp5" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
<div class="body">
|
||||||
|
<div>
|
||||||
|
<div>x <input type="text" name="weight1" value="1"></div>
|
||||||
|
<div>x <input type="text" name="weight2" value="1"></div>
|
||||||
|
<div>x <input type="text" name="weight3" value="1"></div>
|
||||||
|
<div>x <input type="text" name="weight4" value="1"></div>
|
||||||
|
<div>x <input type="text" name="weight5" value="1"></div>
|
||||||
|
</div>
|
||||||
|
<div style="font-size:40px;font-weight: bold;transform: translateY(-50%);">∑</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="multiplier">
|
||||||
|
<div class="title">Multiply</div>
|
||||||
|
<div class="port" data-type="in" data-id="inp1" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="in" data-id="inp2" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="in" data-id="inp3" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
<div class="body">x</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="console">
|
||||||
|
<div class="title">Console</div>
|
||||||
|
<div class="port" data-type="in" data-id="inp1" data-direction="w"></div>
|
||||||
|
<div class="body"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="input">
|
||||||
|
<div class="title">input</div>
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
<div class="body">
|
||||||
|
<label>Value:</label><input name="value" type="text" value="1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="square">
|
||||||
|
<div class="title">PRNG</div>
|
||||||
|
<div class="body"></div>
|
||||||
|
<div class="port" data-type="out" data-id="w" data-direction="w"></div>
|
||||||
|
<div class="port" data-type="out" data-id="n" data-direction="n"></div>
|
||||||
|
<div class="port" data-type="out" data-id="e" data-direction="e"></div>
|
||||||
|
<div class="port" data-type="out" data-id="s" data-direction="s"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="refnodein" data-editor="exclude">
|
||||||
|
<div class="body">{parentport}</div>
|
||||||
|
<div class="port" data-type="out" data-id="out1" data-direction="e"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="refnodeout" data-editor="exclude">
|
||||||
|
<div class="body">{parentport}</div>
|
||||||
|
<div class="port" data-type="in" data-id="in1" data-direction="w"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,237 @@
|
|||||||
|
<style>
|
||||||
|
.bzgf-node {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
border-width:2px;
|
||||||
|
border-style: solid;
|
||||||
|
border-radius: 6px;
|
||||||
|
width: 160px;
|
||||||
|
height: 80px;
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
position: absolute;
|
||||||
|
padding: .5em;
|
||||||
|
background: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node .text {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%) translateY(-50%);
|
||||||
|
width: 100%;
|
||||||
|
height: 2em;
|
||||||
|
color: white;
|
||||||
|
transform: translateX(-50%), translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node .port{
|
||||||
|
position: absolute;
|
||||||
|
height: 6px;
|
||||||
|
width: 6px;
|
||||||
|
background: #FFF;
|
||||||
|
z-index: 99;
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node [data-direction="w"]{ left: -7px; top: 50%; transform: translateY(-50%);}
|
||||||
|
.bzgf-node [data-direction="e"]{ right: -7px; top: 50%; transform: translateY(-50%);}
|
||||||
|
.bzgf-node [data-direction="n"]{ top: -7px; left: 50%; transform: translateX(-50%);}
|
||||||
|
.bzgf-node [data-direction="s"]{ bottom: -7px; left: 50%; transform: translateX(-50%);}
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="start"],
|
||||||
|
.bzgf-node[data-nodetype="end"]{
|
||||||
|
border: 1px solid white;
|
||||||
|
width: 100px;
|
||||||
|
height: 30px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="start"] .text,
|
||||||
|
.bzgf-node[data-nodetype="end"] .text{ width: 80%; }
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="condition"]{
|
||||||
|
border: none;
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="condition"] .frame{
|
||||||
|
border: 1px solid white;
|
||||||
|
transform: rotate(-45deg) scale(0.7071);
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="condition"] .port[data-direction="w"]{ left: -5px; }
|
||||||
|
.bzgf-node[data-nodetype="condition"] [data-direction="e"]{ right: -5px; }
|
||||||
|
.bzgf-node[data-nodetype="condition"] [data-direction="n"]{ top: -5px; }
|
||||||
|
.bzgf-node[data-nodetype="condition"] [data-direction="s"]{ bottom: -5px; }
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="process"]{
|
||||||
|
border: 1px solid white;
|
||||||
|
width: 150px;
|
||||||
|
height: 70px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="process"] .text{ width: 80%; }
|
||||||
|
.bzgf-node[data-nodetype="process"] .dbline{
|
||||||
|
border: 1px solid white;
|
||||||
|
width: 75%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: -1px;
|
||||||
|
left: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="database"]{
|
||||||
|
border: 1px solid white;
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
isolation: isolate;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="database"] .top{
|
||||||
|
z-index: 2;
|
||||||
|
height: 20%;
|
||||||
|
border: 1px solid white;
|
||||||
|
border-radius: 50%;
|
||||||
|
position: absolute;
|
||||||
|
top: -10%;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
background: black;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="database"] .text{
|
||||||
|
background: black;
|
||||||
|
width: 87%;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="database"] .bottom{
|
||||||
|
z-index: 0;
|
||||||
|
height: 20%;
|
||||||
|
border: 1px solid white;
|
||||||
|
border-radius: 50%;
|
||||||
|
position: absolute;
|
||||||
|
bottom: -10%;
|
||||||
|
left: 0;
|
||||||
|
width: 99%;
|
||||||
|
background: black;
|
||||||
|
clip-path: polygon( 0% 110%, 100% 110%, 100% 50%, 0% 50%);
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="database"] [data-direction="n"]{ top: -17px; }
|
||||||
|
.bzgf-node[data-nodetype="database"] [data-direction="s"]{ bottom: -17px; }
|
||||||
|
|
||||||
|
.bzgf-node[data-nodetype="preparation"]{
|
||||||
|
width: 150px;
|
||||||
|
height: 80px;
|
||||||
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="preparation"] .text{ width: 85%; }
|
||||||
|
.bzgf-node[data-nodetype="preparation"] .outerframe{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
background: white;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
place-items: center;
|
||||||
|
clip-path: polygon(
|
||||||
|
10% 0%,
|
||||||
|
90% 0%,
|
||||||
|
100% 50%,
|
||||||
|
90% 100%,
|
||||||
|
10% 100%,
|
||||||
|
0% 50%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
.bzgf-node[data-nodetype="preparation"] .innerframe{
|
||||||
|
width: calc(100% - 2px);
|
||||||
|
height: calc(100% - 2px);
|
||||||
|
position: absolute;
|
||||||
|
top: 1px;
|
||||||
|
left: 1px;
|
||||||
|
background: black;
|
||||||
|
clip-path: inherit;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.bzgf-wire{ stroke: #FF0; stroke-width: 2; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<svg style="display:none" aria-hidden="true">
|
||||||
|
<template id="svg-arrows">
|
||||||
|
<defs>
|
||||||
|
<marker id="arrow"
|
||||||
|
viewBox="0 0 10 10"
|
||||||
|
refX="10"
|
||||||
|
refY="5"
|
||||||
|
markerWidth="10"
|
||||||
|
markerHeight="10"
|
||||||
|
orient="auto-start-reverse"
|
||||||
|
markerUnits="userSpaceOnUse">
|
||||||
|
<path d="M0,0 L10,5 L0,10 Z" fill="#FF0"/>
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
|
</template>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="start">
|
||||||
|
<div class="text">{text}</div>
|
||||||
|
<div class="port" data-id="out1" data-direction="s"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="end">
|
||||||
|
<div class="text">{text}</div>
|
||||||
|
<div class="port" data-id="inp1" data-direction="n"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="condition">
|
||||||
|
<div class="frame"></div>
|
||||||
|
<div class="text">{text}</div>
|
||||||
|
<div class="port" data-id="inp1" data-direction="n"></div>
|
||||||
|
<div class="port" data-id="out1" data-direction="w"></div>
|
||||||
|
<div class="port" data-id="out2" data-direction="s"></div>
|
||||||
|
<div class="port" data-id="out3" data-direction="e"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="process">
|
||||||
|
<div class="dbline"></div>
|
||||||
|
<div class="text">{text}</div>
|
||||||
|
<div class="port" data-id="inout1" data-direction="n"></div>
|
||||||
|
<div class="port" data-id="inout2" data-direction="s"></div>
|
||||||
|
<div class="port" data-id="inout3" data-direction="w"></div>
|
||||||
|
<div class="port" data-id="inout4" data-direction="e"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="database">
|
||||||
|
<div class="top"></div>
|
||||||
|
<div class="bottom"></div>
|
||||||
|
<div class="text">{text}</div>
|
||||||
|
<div class="port" data-id="inout1" data-direction="n"></div>
|
||||||
|
<div class="port" data-id="inout2" data-direction="s"></div>
|
||||||
|
<div class="port" data-id="inout3" data-direction="w"></div>
|
||||||
|
<div class="port" data-id="inout4" data-direction="e"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="bzgf-node" data-nodetype="preparation">
|
||||||
|
<div class="outerframe">
|
||||||
|
<div class="innerframe">
|
||||||
|
<div class="text">{text}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="port" data-id="inp1" data-direction="n"></div>
|
||||||
|
<div class="port" data-id="out1" data-direction="s"></div>
|
||||||
|
<div class="port" data-id="inout1" data-direction="w"></div>
|
||||||
|
<div class="port" data-id="inout2" data-direction="e"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<style>
|
||||||
|
table {
|
||||||
|
margin: 0 auto;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
th, td {
|
||||||
|
border: 1px solid black;
|
||||||
|
max-width: 10em;
|
||||||
|
min-width: 7em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
th{
|
||||||
|
background: #555;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
tr > td:first-child {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>Style</th>
|
||||||
|
<th>isolated</th>
|
||||||
|
<th>subflow</th>
|
||||||
|
<th>autofit</th>
|
||||||
|
<th>wireStyle</th>
|
||||||
|
<th>align</th>
|
||||||
|
<th>oriented</th>
|
||||||
|
<th>nodesmove</th>
|
||||||
|
<th>editwires</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><a target="test1" href="./test1.html">test1</a></td>
|
||||||
|
<td>Graflow P42</td>
|
||||||
|
<td>YES</td>
|
||||||
|
<td>2 depths</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="test2" href="./test2.html">test2</a></td>
|
||||||
|
<td>Graflow Organigram</td>
|
||||||
|
<td>YES</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>X</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="test3" href="./test3.html">test3</a></td>
|
||||||
|
<td>Graflow EIC simple</td>
|
||||||
|
<td>NO</td>
|
||||||
|
<td>1 depth</td>
|
||||||
|
<td></td>
|
||||||
|
<td>Straight</td>
|
||||||
|
<td>First</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="test4" href="./test4.html">test4</a></td>
|
||||||
|
<td>Graflow EIC-ICMP</td>
|
||||||
|
<td>NO</td>
|
||||||
|
<td></td>
|
||||||
|
<td>X</td>
|
||||||
|
<td>Bezier</td>
|
||||||
|
<td>Center</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="test4.5" href="./test4.5.html">test4.5</a></td>
|
||||||
|
<td>Graflow EIC-ICMP II</td>
|
||||||
|
<td>NO</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>Ortho</td>
|
||||||
|
<td>Parent</td>
|
||||||
|
<td>X</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="test5" href="./test5.html">test5</a></td>
|
||||||
|
<td>Graflow P42</td>
|
||||||
|
<td>YES</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>X</td>
|
||||||
|
<td>X</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="test6" href="./test6.html">test6</a></td>
|
||||||
|
<td>Graflow 16 ports test</td>
|
||||||
|
<td>NO</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>X</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="test6" href="./test7.html">test7</a></td>
|
||||||
|
<td>Gantt chart 1</td>
|
||||||
|
<td>YES</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>Bezier</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>Style</th>
|
||||||
|
<th>Import / Export</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><a target="etest1" href="./etest1.html">Editor test 1</a></td>
|
||||||
|
<td>P42</td>
|
||||||
|
<td>JSON local file</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a target="etest2" href="./etest2.html">Editor test 2</a></td>
|
||||||
|
<td>EIC</td>
|
||||||
|
<td>API to MySQL</tr>
|
||||||
|
</tr>
|
||||||
|
<!-- <tr>
|
||||||
|
<td><a target="etest3" href="./etest3.html">Editor test 3</a></td>
|
||||||
|
<td>16 ports</td>
|
||||||
|
</tr> -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.demooptions{
|
||||||
|
padding: 2px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 2px;
|
||||||
|
width: 10em;
|
||||||
|
background: #FFFB;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
z-index:99999;
|
||||||
|
font-size: .7em;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
.demooptions button{
|
||||||
|
text-transform: none;
|
||||||
|
margin: 2px;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
bz-graflow{
|
||||||
|
overflow: scroll;
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
bz-graflow.compunet{ grid-column: 1 / -1; width: 100vw; height: 60vh; background:black; }
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
let grflw1 = document.querySelector('bz-graflow.compunet')
|
||||||
|
grflw1.addEventListener('bz:graflow:subflowLoaded',
|
||||||
|
(evt) => { grflw1 = evt.detail.component }
|
||||||
|
)
|
||||||
|
grflw1.addEventListener('bz:graflow:subflowExited',
|
||||||
|
(evt) => { grflw1 = evt.target }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace1H"]').addEventListener('click',
|
||||||
|
(evt) => { grflw1.autoPlace('horizontal', 80, 30, 1000, document.querySelector('[data-id="compunet"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace1V"]').addEventListener('click',
|
||||||
|
(evt) => { grflw1.autoPlace('vertical', 80, 30, 1000, document.querySelector('[data-id="compunet"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('input[data-id="compunet"]').addEventListener('change',
|
||||||
|
(evt) => { grflw1.setAttribute('tension', evt.target.value); grflw1.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('select[name="wiretype"]').addEventListener('change',
|
||||||
|
(evt) => { grflw1.setAttribute('wiretype', evt.target.value); grflw1.refresh() }
|
||||||
|
)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<bz-graflow class="compunet" flow="./flows/testFlow1.1.json" tension="60" isolated>
|
||||||
|
<div class="demooptions"> <!-- just for demo purposes -->
|
||||||
|
<button data-trigger="onAutoplace1H">Auto-place Horizontal</button>
|
||||||
|
<button data-trigger="onAutoplace1V">Auto-place Vertical</button>
|
||||||
|
<select name="align" data-id="compunet">
|
||||||
|
<option value="center">Center</option>
|
||||||
|
<option value="first">First</option>
|
||||||
|
<option value="last">Last</option>
|
||||||
|
<option value="parent">Parent</option>
|
||||||
|
</select>
|
||||||
|
<select name="wiretype">
|
||||||
|
<option value="ortho">Ortho</option>
|
||||||
|
<option value="straight">Straight</option>
|
||||||
|
<option value="bezier" selected>Bezier</option>
|
||||||
|
</select>
|
||||||
|
<div class="cols-2"><label>tension</label><input data-id="compunet" type="number" size="2" value="60"></div>
|
||||||
|
</div>
|
||||||
|
</bz-graflow>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.demooptions{
|
||||||
|
padding: 2px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 2px;
|
||||||
|
width: 10em;
|
||||||
|
background: #FFFB;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
z-index:99999;
|
||||||
|
font-size: .7em;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
.demooptions button{
|
||||||
|
text-transform: none;
|
||||||
|
margin: 2px;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
bz-graflow{
|
||||||
|
overflow: scroll;
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
bz-graflow.organi{ width: 40vw; height: 100vh; background:black; }
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
let grflw3 = document.querySelector('bz-graflow.organi')
|
||||||
|
grflw3.addEventListener('bz:graflow:subflowLoaded',
|
||||||
|
(evt) => { grflw3 = evt.detail.component }
|
||||||
|
)
|
||||||
|
grflw3.addEventListener('bz:graflow:subflowExited',
|
||||||
|
(evt) => { grflw3 = evt.target }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace3H"]').addEventListener('click',
|
||||||
|
(evt) => { grflw3.autoPlace('horizontal', 80, 80, 1000, document.querySelector('[data-id="organi"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace3V"]').addEventListener('click',
|
||||||
|
(evt) => { grflw3.autoPlace('vertical', 80, 30, 1000, document.querySelector('[data-id="organi"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('input[data-id="organi"]').addEventListener('change',
|
||||||
|
(evt) => { grflw3.setAttribute('tension', evt.target.value); grflw3.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('select[name="wiretype"]').addEventListener('change',
|
||||||
|
(evt) => { grflw3.setAttribute('wiretype', evt.target.value); grflw3.refresh() }
|
||||||
|
)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<bz-graflow class="organi" flow="./flows/testFlow2.json" tension="60" isolated>
|
||||||
|
<div class="demooptions">
|
||||||
|
<button data-trigger="onAutoplace3H">Auto-place Horizontal</button>
|
||||||
|
<button data-trigger="onAutoplace3V">Auto-place Vertical</button>
|
||||||
|
<select name="align" data-id="organi">
|
||||||
|
<option value="center">Center</option>
|
||||||
|
<option value="first">First</option>
|
||||||
|
<option value="last">Last</option>
|
||||||
|
<option value="parent">Parent</option>
|
||||||
|
</select>
|
||||||
|
<select name="wiretype">
|
||||||
|
<option value="ortho">Ortho</option>
|
||||||
|
<option value="straight">Straight</option>
|
||||||
|
<option value="bezier" selected>Bezier</option>
|
||||||
|
<option value="parent">Parent</option>
|
||||||
|
</select>
|
||||||
|
<div class="cols-2"><label>tension</label><input data-id="organi" type="number" size="2" value="60"></div>
|
||||||
|
</div>
|
||||||
|
</bz-graflow>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.demooptions{
|
||||||
|
padding: 2px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 2px;
|
||||||
|
width: 10em;
|
||||||
|
background: #FFFB;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
z-index:99999;
|
||||||
|
font-size: .7em;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
.demooptions button{
|
||||||
|
text-transform: none;
|
||||||
|
margin: 2px;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
bz-graflow{
|
||||||
|
overflow: scroll;
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
bz-graflow.eic{ grid-column: 1 / -1; width: 120vw; height: 40vh; background: var(--eicui-base-color-grey-10); }
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
let grflw2 = document.querySelector('bz-graflow.eic')
|
||||||
|
grflw2.setAttribute('tension', document.querySelector('input[data-id="eic"]').value)
|
||||||
|
grflw2.setAttribute('align', document.querySelector('select[name="align"]').value)
|
||||||
|
grflw2.setAttribute('wiretype', document.querySelector('select[name="wiretype"]').value)
|
||||||
|
grflw2.addEventListener('bz:graflow:refresh',
|
||||||
|
(evt) => { grflw2.style.transform = 'scale(.75)'; }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace2H"]').addEventListener('click',
|
||||||
|
(evt) => { grflw2.autoPlace('horizontal', 100, 30, 1000, document.querySelector('[data-id="eic"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace2V"]').addEventListener('click',
|
||||||
|
(evt) => { grflw2.autoPlace('vertical', 80, 80, 1000, document.querySelector('[data-id="eic"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('input[data-id="eic"]').addEventListener('change',
|
||||||
|
(evt) => { grflw2.setAttribute('tension', evt.target.value); grflw2.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('select[name="wiretype"]').addEventListener('change',
|
||||||
|
(evt) => { grflw2.setAttribute('wiretype', evt.target.value); grflw2.refresh() }
|
||||||
|
)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<bz-graflow class="eic" flow="./flows/testFlowEvent1.json" tension="50">
|
||||||
|
<div class="demooptions"> <!-- just for demo purposes -->
|
||||||
|
<button data-trigger="onAutoplace2H">Auto-place Horizontal</button>
|
||||||
|
<button data-trigger="onAutoplace2V">Auto-place Vertical</button>
|
||||||
|
<select name="align" data-id="eic">
|
||||||
|
<option value="center">Center</option>
|
||||||
|
<option value="first" selected>First</option>
|
||||||
|
<option value="last">Last</option>
|
||||||
|
<option value="parent">Parent</option>
|
||||||
|
</select>
|
||||||
|
<select name="wiretype">
|
||||||
|
<option value="ortho">Ortho</option>
|
||||||
|
<option value="straight">Straight</option>
|
||||||
|
<option value="bezier" selected>Bezier</option>
|
||||||
|
</select>
|
||||||
|
<div class="cols-2"><label>tension</label><input data-id="eic" type="number" size="2" value="50"></div>
|
||||||
|
</div>
|
||||||
|
</bz-graflow>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.demooptions{
|
||||||
|
padding: 2px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 2px;
|
||||||
|
width: 10em;
|
||||||
|
background: #FFFB;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
z-index:99999;
|
||||||
|
font-size: .7em;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
.demooptions button{
|
||||||
|
text-transform: none;
|
||||||
|
margin: 2px;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
bz-graflow{
|
||||||
|
overflow: scroll;
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
bz-graflow.eic{ grid-column: 1 / -1; width: 80vw; height: 60vh; background: var(--eicui-base-color-grey-10); }
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
let grflw2 = document.querySelector('bz-graflow.eic')
|
||||||
|
grflw2.setAttribute('tension', document.querySelector('input[data-id="eic"]').value)
|
||||||
|
grflw2.setAttribute('align', document.querySelector('select[name="align"]').value)
|
||||||
|
grflw2.setAttribute('wiretype', document.querySelector('select[name="wiretype"]').value)
|
||||||
|
grflw2.addEventListener('bz:graflow:subflowLoaded',
|
||||||
|
(evt) => { grflw2 = evt.detail.component }
|
||||||
|
)
|
||||||
|
grflw2.addEventListener('bz:graflow:subflowExited',
|
||||||
|
(evt) => { grflw2 = evt.target }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace2H"]').addEventListener('click',
|
||||||
|
(evt) => { grflw2.autoPlace('horizontal', 100, 30, 1000, document.querySelector('[data-id="eic"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace2V"]').addEventListener('click',
|
||||||
|
(evt) => { grflw2.autoPlace('vertical', 80, 80, 1000, document.querySelector('[data-id="eic"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('input[data-id="eic"]').addEventListener('change',
|
||||||
|
(evt) => { grflw2.setAttribute('tension', evt.target.value); grflw2.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('select[name="wiretype"]').addEventListener('change',
|
||||||
|
(evt) => { grflw2.setAttribute('wiretype', evt.target.value); grflw2.refresh() }
|
||||||
|
)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<bz-graflow class="eic" flow="./flows/testFlowEic.json" tension="60" autofit="500">
|
||||||
|
<div class="demooptions"> <!-- just for demo purposes -->
|
||||||
|
<button data-trigger="onAutoplace2H">Auto-place Horizontal</button>
|
||||||
|
<button data-trigger="onAutoplace2V">Auto-place Vertical</button>
|
||||||
|
<select name="align" data-id="eic">
|
||||||
|
<option value="center">Center</option>
|
||||||
|
<option value="first" selected>First</option>
|
||||||
|
<option value="last">Last</option>
|
||||||
|
<option value="parent">Parent</option>
|
||||||
|
</select>
|
||||||
|
<select name="wiretype">
|
||||||
|
<option value="ortho">Ortho</option>
|
||||||
|
<option value="straight"selected>Straight</option>
|
||||||
|
<option value="bezier">Bezier</option>
|
||||||
|
</select>
|
||||||
|
<div class="cols-2"><label>tension</label><input data-id="eic" type="number" size="2" value="1"></div>
|
||||||
|
</div>
|
||||||
|
</bz-graflow>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.demooptions{
|
||||||
|
padding: 2px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 2px;
|
||||||
|
width: 10em;
|
||||||
|
background: #FFFB;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
z-index:999999;
|
||||||
|
font-size: .7em;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
.demooptions button{
|
||||||
|
text-transform: none;
|
||||||
|
margin: 2px;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
bz-graflow{
|
||||||
|
overflow: scroll;
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
bz-graflow.icmp{ grid-column: 1 / -1; width: 100vw; height: 80vh; background: var(--eicui-base-color-grey-10); }
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
let grflw4 = document.querySelector('bz-graflow.icmp')
|
||||||
|
grflw4.setAttribute('tension', document.querySelector('input[data-id="icmp"]').value)
|
||||||
|
grflw4.setAttribute('align', document.querySelector('select[name="align"]').value)
|
||||||
|
grflw4.setAttribute('wiretype', document.querySelector('select[name="wiretype"]').value)
|
||||||
|
grflw4.addEventListener('bz:graflow:subflowLoaded',
|
||||||
|
(evt) => { grflw4 = evt.detail.component }
|
||||||
|
)
|
||||||
|
grflw4.addEventListener('bz:graflow:subflowExited',
|
||||||
|
(evt) => { grflw4 = evt.target }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace4H"]').addEventListener('click',
|
||||||
|
(evt) => { grflw4.autoPlace('horizontal', 100, 30, 1000, document.querySelector('[data-id="icmp"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace4V"]').addEventListener('click',
|
||||||
|
(evt) => { grflw4.autoPlace('vertical', 80, 80, 1000, document.querySelector('[data-id="icmp"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('input[data-id="icmp"]').addEventListener('change',
|
||||||
|
(evt) => { grflw4.setAttribute('tension', evt.target.value); grflw4.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('select[name="wiretype"]').addEventListener('change',
|
||||||
|
(evt) => { grflw4.setAttribute('wiretype', evt.target.value); grflw4.refresh() }
|
||||||
|
)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<bz-graflow class="icmp" flow="./flows/testFlowICMP2.json" tension="20" align="first" wiretype="ortho" gapx="100" gapy="30">
|
||||||
|
<div class="demooptions"> <!-- just for demo purposes -->
|
||||||
|
<button data-trigger="onAutoplace4H">Auto-place Horizontal</button>
|
||||||
|
<button data-trigger="onAutoplace4V">Auto-place Vertical</button>
|
||||||
|
<select name="align" data-id="icmp">
|
||||||
|
<option value="center">Center</option>
|
||||||
|
<option value="first">First</option>
|
||||||
|
<option value="last">Last</option>
|
||||||
|
<option value="parent" selected>Parent</option>
|
||||||
|
</select>
|
||||||
|
<select name="wiretype">
|
||||||
|
<option value="ortho" selected>Ortho</option>
|
||||||
|
<option value="straight">Straight</option>
|
||||||
|
<option value="bezier">Bezier</option>
|
||||||
|
</select>
|
||||||
|
<div class="cols-2"><label>tension</label><input data-id="icmp" type="number" size="2" value="20"></div>
|
||||||
|
</div>
|
||||||
|
</bz-graflow>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.demooptions{
|
||||||
|
padding: 2px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 2px;
|
||||||
|
width: 10em;
|
||||||
|
background: #FFFB;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
z-index:999999;
|
||||||
|
font-size: .7em;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
.demooptions button{
|
||||||
|
text-transform: none;
|
||||||
|
margin: 2px;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
bz-graflow{
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
/* Fill the demo frame — autofit sizes to the graflow box, not the parent */
|
||||||
|
bz-graflow.icmp{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: var(--eicui-base-color-grey-10);
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
resize: both;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 90vw;
|
||||||
|
height: 80vh;
|
||||||
|
min-width: 400px;
|
||||||
|
min-height: 240px;
|
||||||
|
padding: 0;
|
||||||
|
position: relative;
|
||||||
|
border: 2px solid #A00;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.container::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
right: 3px;
|
||||||
|
bottom: 3px;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
pointer-events: none;
|
||||||
|
background:
|
||||||
|
repeating-linear-gradient(
|
||||||
|
135deg,
|
||||||
|
transparent 0px,
|
||||||
|
transparent 3px,
|
||||||
|
#A00 3px,
|
||||||
|
#A00 6px
|
||||||
|
);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
const severities = ['primary', 'info', 'success', 'warning', 'danger', 'accent']
|
||||||
|
|
||||||
|
let grflw4 = document.querySelector('bz-graflow.icmp')
|
||||||
|
grflw4.addEventListener('bz:graflow:subflowLoaded',
|
||||||
|
(evt) => { grflw4 = evt.detail.component }
|
||||||
|
)
|
||||||
|
grflw4.addEventListener('bz:graflow:subflowExited',
|
||||||
|
(evt) => { grflw4 = evt.target }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace4H"]').addEventListener('click',
|
||||||
|
(evt) => { grflw4.autoPlace('horizontal', 100, 30, 1000, document.querySelector('[data-id="icmp"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace4V"]').addEventListener('click',
|
||||||
|
(evt) => { grflw4.autoPlace('vertical', 80, 80, 1000, document.querySelector('[data-id="icmp"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('input[data-id="icmp"]').addEventListener('change',
|
||||||
|
(evt) => { grflw4.setAttribute('tension', evt.target.value); grflw4.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('select[name="wiretype"]').addEventListener('change',
|
||||||
|
(evt) => { grflw4.setAttribute('wiretype', evt.target.value); grflw4.refresh() }
|
||||||
|
)
|
||||||
|
|
||||||
|
const el = document.querySelector('.container')
|
||||||
|
const ro = new ResizeObserver(([entry]) => {
|
||||||
|
const grfl = entry.target.querySelector('bz-graflow')
|
||||||
|
grfl.autofit()
|
||||||
|
})
|
||||||
|
ro.observe(el)
|
||||||
|
|
||||||
|
let aifmi = null; let sidx=0;
|
||||||
|
const sevanimation = () => {
|
||||||
|
severities.forEach(severity => aifmi.removeAttribute(severity))
|
||||||
|
aifmi.setAttribute(severities[sidx], '')
|
||||||
|
sidx++
|
||||||
|
if (sidx >= severities.length) sidx = 0
|
||||||
|
setTimeout(sevanimation, 1000)
|
||||||
|
}
|
||||||
|
grflw4.addEventListener('bz:graflow:refreshed',() => {
|
||||||
|
if(aifmi) return
|
||||||
|
aifmi = grflw4.stagedNodes['aifm-investment'].querySelector('.body')
|
||||||
|
sevanimation()
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<bz-graflow class="icmp" flow="./flows/testFlowICMP.json" tension="60">
|
||||||
|
<div class="demooptions">
|
||||||
|
<button data-trigger="onAutoplace4H">Auto-place Horizontal</button>
|
||||||
|
<button data-trigger="onAutoplace4V">Auto-place Vertical</button>
|
||||||
|
<select name="align" data-id="icmp">
|
||||||
|
<option value="center">Center</option>
|
||||||
|
<option value="first">First</option>
|
||||||
|
<option value="last">Last</option>
|
||||||
|
<option value="parent">Parent</option>
|
||||||
|
</select>
|
||||||
|
<select name="wiretype">
|
||||||
|
<option value="ortho">Ortho</option>
|
||||||
|
<option value="straight">Straight</option>
|
||||||
|
<option value="bezier" selected>Bezier</option>
|
||||||
|
</select>
|
||||||
|
<div class="cols-2"><label>tension</label><input data-id="icmp" type="number" size="2" value="60"></div>
|
||||||
|
</div>
|
||||||
|
</bz-graflow>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.demooptions{
|
||||||
|
padding: 2px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 2px;
|
||||||
|
width: 10em;
|
||||||
|
background: #FFFB;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
z-index:999999;
|
||||||
|
font-size: .7em;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
.demooptions button{
|
||||||
|
text-transform: none;
|
||||||
|
margin: 2px;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
bz-graflow{
|
||||||
|
overflow: scroll;
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
bz-graflow.compunet{ grid-column: 1 / -1; width: 100vw; height: 60vh; background:black; }
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
let grflw1 = document.querySelector('bz-graflow.compunet')
|
||||||
|
grflw1.addEventListener('bz:graflow:subflowLoaded',
|
||||||
|
(evt) => { grflw1 = evt.detail.component }
|
||||||
|
)
|
||||||
|
grflw1.addEventListener('bz:graflow:subflowExited',
|
||||||
|
(evt) => { grflw1 = evt.target }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace1H"]').addEventListener('click',
|
||||||
|
(evt) => { grflw1.autoPlace('horizontal', 80, 30, 1000, document.querySelector('[data-id="compunet"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace1V"]').addEventListener('click',
|
||||||
|
(evt) => { grflw1.autoPlace('vertical', 80, 30, 1000, document.querySelector('[data-id="compunet"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('input[data-id="compunet"]').addEventListener('change',
|
||||||
|
(evt) => { grflw1.setAttribute('tension', evt.target.value); grflw1.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('select[name="wiretype"]').addEventListener('change',
|
||||||
|
(evt) => { grflw1.setAttribute('wiretype', evt.target.value); grflw1.refresh() }
|
||||||
|
)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<bz-graflow class="compunet" flow="./flows/testFlow1.json" tension="60" isolated edit="nodesmove,editwires,dropnodes" >
|
||||||
|
<div class="demooptions"> <!-- just for demo purposes -->
|
||||||
|
<button data-trigger="onAutoplace1H">Auto-place Horizontal</button>
|
||||||
|
<button data-trigger="onAutoplace1V">Auto-place Vertical</button>
|
||||||
|
<select name="align" data-id="compunet">
|
||||||
|
<option value="center">Center</option>
|
||||||
|
<option value="first">First</option>
|
||||||
|
<option value="last">Last</option>
|
||||||
|
<option value="parent">Parent</option>
|
||||||
|
</select>
|
||||||
|
<select name="wiretype">
|
||||||
|
<option value="ortho">Ortho</option>
|
||||||
|
<option value="straight">Straight</option>
|
||||||
|
<option value="bezier" selected>Bezier</option>
|
||||||
|
</select>
|
||||||
|
<div class="cols-2"><label>tension</label><input data-id="compunet" type="number" size="2" value="60"></div>
|
||||||
|
</div>
|
||||||
|
</bz-graflow>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
display: grid;
|
||||||
|
grid-gap: 5px;
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.demooptions{
|
||||||
|
padding: 2px;
|
||||||
|
position: absolute;
|
||||||
|
top: 2px;
|
||||||
|
right: 2px;
|
||||||
|
width: 10em;
|
||||||
|
background: #FFFB;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
z-index:999999;
|
||||||
|
font-size: .7em;
|
||||||
|
border: 1px solid #999;
|
||||||
|
}
|
||||||
|
.demooptions button{
|
||||||
|
text-transform: none;
|
||||||
|
margin: 2px;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
bz-graflow{
|
||||||
|
overflow: scroll;
|
||||||
|
border: 2px solid black;
|
||||||
|
}
|
||||||
|
bz-graflow.compunet{ grid-column: 1 / -1; width: 100vw; height: 100vh; background:black; }
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
let grflw1 = document.querySelector('bz-graflow.compunet')
|
||||||
|
grflw1.setAttribute('tension', document.querySelector('input[data-id="compunet"]').value)
|
||||||
|
grflw1.setAttribute('align', document.querySelector('select[name="align"]').value)
|
||||||
|
grflw1.setAttribute('wiretype', document.querySelector('select[name="wiretype"]').value)
|
||||||
|
grflw1.addEventListener('bz:graflow:subflowLoaded',
|
||||||
|
(evt) => { grflw1 = evt.detail.component }
|
||||||
|
)
|
||||||
|
grflw1.addEventListener('bz:graflow:subflowExited',
|
||||||
|
(evt) => { grflw1 = evt.target }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace1H"]').addEventListener('click',
|
||||||
|
(evt) => { grflw1.autoPlace('horizontal', 80, 30, 1000, document.querySelector('[data-id="compunet"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('[data-trigger="onAutoplace1V"]').addEventListener('click',
|
||||||
|
(evt) => { grflw1.autoPlace('vertical', 80, 30, 1000, document.querySelector('[data-id="compunet"]').value) }
|
||||||
|
)
|
||||||
|
document.querySelector('input[data-id="compunet"]').addEventListener('change',
|
||||||
|
(evt) => { grflw1.setAttribute('tension', evt.target.value); grflw1.refresh() }
|
||||||
|
)
|
||||||
|
document.querySelector('select[name="wiretype"]').addEventListener('change',
|
||||||
|
(evt) => { grflw1.setAttribute('wiretype', evt.target.value); grflw1.refresh() }
|
||||||
|
)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<bz-graflow class="compunet" flow="./flows/testFlow16ports.json" tension="60" isolated edit="nodesmove" >
|
||||||
|
<div class="demooptions"> <!-- just for demo purposes -->
|
||||||
|
<button data-trigger="onAutoplace1H">Auto-place Horizontal</button>
|
||||||
|
<button data-trigger="onAutoplace1V">Auto-place Vertical</button>
|
||||||
|
<select name="align" data-id="compunet">
|
||||||
|
<option value="center">Center</option>
|
||||||
|
<option value="first">First</option>
|
||||||
|
<option value="last">Last</option>
|
||||||
|
<option value="parent">Parent</option>
|
||||||
|
</select>
|
||||||
|
<select name="wiretype">
|
||||||
|
<option value="ortho" selected>Ortho</option>
|
||||||
|
<option value="straight">Straight</option>
|
||||||
|
<option value="bezier">Bezier</option>
|
||||||
|
</select>
|
||||||
|
<div class="cols-2"><label>tension</label><input data-id="compunet" type="number" size="2" value="20"></div>
|
||||||
|
</div>
|
||||||
|
</bz-graflow>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.gantt-wrap{
|
||||||
|
position: relative;
|
||||||
|
--row: 30px;
|
||||||
|
}
|
||||||
|
ul.tasks{
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
ul.tasks li{
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-wrap: nowrap;
|
||||||
|
height: var(--row);
|
||||||
|
line-height: calc(var(--row) - 1px);
|
||||||
|
border-bottom: 1px dotted #555;
|
||||||
|
}
|
||||||
|
bz-graflow.gantt{
|
||||||
|
position: absolute;
|
||||||
|
left: 10em;
|
||||||
|
top: 6px;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
let grflw1 = document.querySelector('bz-graflow.gantt')
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="gantt-wrap">
|
||||||
|
<ul class="tasks">
|
||||||
|
<li>Task 1</li>
|
||||||
|
<li>Task 7</li>
|
||||||
|
<li>Task 4</li>
|
||||||
|
<li>Task 5</li>
|
||||||
|
<li>Task 6</li>
|
||||||
|
<li>Task 8</li>
|
||||||
|
<li>Task 2</li>
|
||||||
|
<li>Task 9</li>
|
||||||
|
<li>Task 3</li>
|
||||||
|
</ul>
|
||||||
|
<bz-graflow class="gantt" flow="./flows/gantt.json" tension="60" isolated></bz-graflow>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>graflow</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../../eicui/eicui-2.0.css">
|
||||||
|
<link type="text/css" rel="stylesheet" href="../buildoz.css">
|
||||||
|
<script src="../buildoz.js"></script>
|
||||||
|
<script src="../bzGraflow.js"></script>
|
||||||
|
<script src="../bzGantt.js"></script>
|
||||||
|
<style>
|
||||||
|
@font-face { /*FF does not indirectly load if inside a shawdow-dom */
|
||||||
|
font-family: 'glyphs';
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot');
|
||||||
|
src: url('/assets/styles/fonts/glyphs.eot') format('embedded-opentype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.ttf') format('truetype'),
|
||||||
|
url('/assets/styles/fonts/glyphs.woff') format('woff'),
|
||||||
|
url('/assets/styles/fonts/glyphs.svg') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: block;
|
||||||
|
}
|
||||||
|
body{
|
||||||
|
background:#888;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
const ganttData = {
|
||||||
|
"tasks": [
|
||||||
|
{ "id": "t1", "name": "Task 1", "start": "2026-08-25", "end":"2026-08-29", "color": "#8F8" },
|
||||||
|
{ "id": "t2", "name": "Task 2", "start": "2026-09-08", "end":"2026-09-13", "color": "#F8F", "dependsOn": ["t8"] },
|
||||||
|
{ "id": "t3", "name": "Task 3", "start": "2026-09-13", "end":"2026-09-18", "color": "#FF8", "dependsOn": ["t9"] },
|
||||||
|
{ "id": "t4", "name": "Task 4", "start": "2026-08-25", "end":"2026-09-03", "color": "#F88" },
|
||||||
|
{ "id": "t5", "name": "Task 5", "start": "2026-08-29", "end":"2026-08-31", "color": "#88F", "dependsOn": ["t4", "t7"] },
|
||||||
|
{ "id": "t6", "name": "Task 6", "start": "2026-08-31", "end":"2026-09-01", "color": "#8F8", "dependsOn": ["t5"] },
|
||||||
|
{ "id": "t7", "name": "Task 7", "start": "2026-08-29", "end":"2026-09-01", "color": "#88F", "dependsOn": ["t1"] },
|
||||||
|
{ "id": "t8", "name": "Task 8 which is quite long", "start": "2026-09-01", "end":"2026-09-08", "color": "#8F8", "dependsOn": ["t6"] },
|
||||||
|
{ "id": "t9", "name": "Task 9", "start": "2026-09-08", "end":"2026-09-11", "color": "#F8F", "dependsOn": ["t8"] },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('load',()=>{
|
||||||
|
let gantt = document.querySelector('bz-gantt.gantt')
|
||||||
|
gantt.loadData(ganttData)
|
||||||
|
gantt.refresh()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<bz-gantt class="gantt" nodesfile="./nodesLib/nodesGantt.html" tension="60" isolated></bz-gantt>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in new issue
Block a user