pyegeria 5.3.3.13.dev1__py3-none-any.whl → 5.3.3.13.dev2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyegeria/__init__.py +2 -1
- pyegeria/commands/tech/list_information_supply_chains.py +5 -3
- pyegeria/commands/tech/work/mermaid_graphs/Clinical Trial Subject Onboarding.html +32 -32
- pyegeria/commands/tech/work/mermaid_graphs/Clinical Trial Treatment Validation.html +35 -35
- pyegeria/commands/tech/work/mermaid_graphs/Employee Expense Payment.html +20 -20
- pyegeria/commands/tech/work/mermaid_graphs/New Drug Product Information Distribution.html +21 -21
- pyegeria/commands/tech/work/mermaid_graphs/New Employee Onboarding.html +20 -20
- pyegeria/commands/tech/work/mermaid_graphs/Personalized Treatment Ordering.html +21 -21
- pyegeria/commands/tech/work/mermaid_graphs/Physical Inventory Tracking.html +23 -23
- pyegeria/commands/tech/work/mermaid_graphs/Sustainability Reporting.html +20 -20
- pyegeria/commands/tech/work/mermaid_graphs/{{displayName}}.html +17 -17
- pyegeria/mermaid_utilities.py +13 -0
- {pyegeria-5.3.3.13.dev1.dist-info → pyegeria-5.3.3.13.dev2.dist-info}/METADATA +1 -1
- {pyegeria-5.3.3.13.dev1.dist-info → pyegeria-5.3.3.13.dev2.dist-info}/RECORD +17 -17
- {pyegeria-5.3.3.13.dev1.dist-info → pyegeria-5.3.3.13.dev2.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.3.13.dev1.dist-info → pyegeria-5.3.3.13.dev2.dist-info}/WHEEL +0 -0
- {pyegeria-5.3.3.13.dev1.dist-info → pyegeria-5.3.3.13.dev2.dist-info}/entry_points.txt +0 -0
@@ -13,38 +13,38 @@
|
|
13
13
|
svg {
|
14
14
|
cursor: grab;
|
15
15
|
}
|
16
|
-
|
16
|
+
|
17
17
|
</style>
|
18
18
|
</head>
|
19
|
-
|
19
|
+
|
20
20
|
<body>
|
21
21
|
<div id="graphDiv"></div>
|
22
22
|
<script src="https://bumbu.me/svg-pan-zoom/dist/svg-pan-zoom.min.js"></script>
|
23
23
|
<script type="module">
|
24
24
|
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
25
|
-
|
25
|
+
|
26
26
|
mermaid.initialize({startOnLoad: false});
|
27
27
|
await mermaid.run({
|
28
28
|
querySelector: '.mermaid',
|
29
29
|
postRenderCallback: (id) => {
|
30
30
|
const container = document.getElementById("diagram-container");
|
31
31
|
const svgElement = container.querySelector("svg");
|
32
|
-
|
32
|
+
|
33
33
|
// Initialize Panzoom
|
34
34
|
const panzoomInstance = Panzoom(svgElement, {
|
35
35
|
maxScale: 5,
|
36
36
|
minScale: 0.5,
|
37
37
|
step: 0.1,
|
38
38
|
});
|
39
|
-
|
39
|
+
|
40
40
|
// Add mouse wheel zoom
|
41
41
|
container.addEventListener("wheel", (event) => {
|
42
42
|
panzoomInstance.zoomWithWheel(event);
|
43
43
|
});
|
44
44
|
}
|
45
45
|
});
|
46
|
-
|
47
|
-
|
46
|
+
|
47
|
+
|
48
48
|
const drawDiagram = async function () {
|
49
49
|
const element = document.querySelector('#graphDiv');
|
50
50
|
const graphDefinition = `
|
@@ -53,12 +53,12 @@
|
|
53
53
|
|
54
54
|
022009d9-53cb-4469-afeb-16ee81d8f9bc@{ shape: flip-tri, label: "*Information Supply Chain*
|
55
55
|
**New Employee Onboarding**"}
|
56
|
-
|
56
|
+
6dce4c2f-29bd-44f0-a968-9084fc331b78@{ shape: text, label: "*Description*
|
57
57
|
**Adding information about a new employee to all appropriate systems and directories.**"}
|
58
|
-
022009d9-53cb-4469-afeb-16ee81d8f9bc~~~
|
59
|
-
|
58
|
+
022009d9-53cb-4469-afeb-16ee81d8f9bc~~~6dce4c2f-29bd-44f0-a968-9084fc331b78
|
59
|
+
cde7bdad-bf9e-48b2-8a39-00e8c871f023@{ shape: text, label: "*Purpose*
|
60
60
|
**Ensure a new employee is productive and engaged in a timely manner.**"}
|
61
|
-
|
61
|
+
6dce4c2f-29bd-44f0-a968-9084fc331b78~~~cde7bdad-bf9e-48b2-8a39-00e8c871f023
|
62
62
|
88c42780-6fb1-49e2-a584-8af90cdc7728@{ shape: rounded, label: "*Software Server*
|
63
63
|
**System:coco-hrim**"}
|
64
64
|
ae0c7768-c01e-4bd1-8a47-fbacfccf2f63@{ shape: rounded, label: "*Software Server*
|
@@ -73,25 +73,25 @@ a47906f0-67f0-46ed-890d-85cb049ffa60@{ shape: rounded, label: "*Software Server*
|
|
73
73
|
12c9d1a4-2a5d-4e7c-a640-97f206270425@{ shape: rounded, label: "*Software Server*
|
74
74
|
**System:UK payroll**"}
|
75
75
|
88c42780-6fb1-49e2-a584-8af90cdc7728-->|"payment authorization [Data Flow]"|12c9d1a4-2a5d-4e7c-a640-97f206270425
|
76
|
-
style c8d0730b-a276-474d-8e09-c454ef22d09b color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
77
76
|
style 022009d9-53cb-4469-afeb-16ee81d8f9bc color:#FFFFFF, fill:#004563, stroke:#b7c0c7
|
77
|
+
style 6dce4c2f-29bd-44f0-a968-9084fc331b78 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
78
|
+
style cde7bdad-bf9e-48b2-8a39-00e8c871f023 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
78
79
|
style ae0c7768-c01e-4bd1-8a47-fbacfccf2f63 color:#000000, fill:#e0ab18, stroke:#004563
|
79
80
|
style 88c42780-6fb1-49e2-a584-8af90cdc7728 color:#000000, fill:#e0ab18, stroke:#004563
|
80
81
|
style 12c9d1a4-2a5d-4e7c-a640-97f206270425 color:#000000, fill:#e0ab18, stroke:#004563
|
81
|
-
style ac1013e3-b3ab-445b-9cc6-229cdbdc7321 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
82
82
|
style a47906f0-67f0-46ed-890d-85cb049ffa60 color:#000000, fill:#e0ab18, stroke:#004563
|
83
83
|
style 35bef6c5-25d7-47b1-91db-f9bce0238612 color:#000000, fill:#e0ab18, stroke:#004563`;
|
84
84
|
const {svg} = await mermaid.render('mySvgId', graphDefinition);
|
85
85
|
element.innerHTML = svg.replace(/( )*max-width:( 0-9\.)*px;/i, '');
|
86
|
-
|
86
|
+
|
87
87
|
var doPan = false;
|
88
88
|
var eventsHandler;
|
89
89
|
var panZoom;
|
90
90
|
var mousepos;
|
91
|
-
|
91
|
+
|
92
92
|
eventsHandler = {
|
93
93
|
haltEventListeners: ['mousedown', 'mousemove', 'mouseup']
|
94
|
-
|
94
|
+
|
95
95
|
, mouseDownHandler: function (ev) {
|
96
96
|
if (event.target.className == "[object SVGAnimatedString]") {
|
97
97
|
doPan = true;
|
@@ -99,7 +99,7 @@ style 35bef6c5-25d7-47b1-91db-f9bce0238612 color:#000000, fill:#e0ab18, stroke:#
|
|
99
99
|
}
|
100
100
|
;
|
101
101
|
}
|
102
|
-
|
102
|
+
|
103
103
|
, mouseMoveHandler: function (ev) {
|
104
104
|
if (doPan) {
|
105
105
|
panZoom.panBy({x: ev.clientX - mousepos.x, y: ev.clientY - mousepos.y});
|
@@ -107,17 +107,17 @@ style 35bef6c5-25d7-47b1-91db-f9bce0238612 color:#000000, fill:#e0ab18, stroke:#
|
|
107
107
|
window.getSelection().removeAllRanges();
|
108
108
|
}
|
109
109
|
}
|
110
|
-
|
110
|
+
|
111
111
|
, mouseUpHandler: function (ev) {
|
112
112
|
doPan = false;
|
113
113
|
}
|
114
|
-
|
114
|
+
|
115
115
|
, init: function (options) {
|
116
116
|
options.svgElement.addEventListener('mousedown', this.mouseDownHandler, false);
|
117
117
|
options.svgElement.addEventListener('mousemove', this.mouseMoveHandler, false);
|
118
118
|
options.svgElement.addEventListener('mouseup', this.mouseUpHandler, false);
|
119
119
|
}
|
120
|
-
|
120
|
+
|
121
121
|
, destroy: function (options) {
|
122
122
|
options.svgElement.removeEventListener('mousedown', this.mouseDownHandler, false);
|
123
123
|
options.svgElement.removeEventListener('mousemove', this.mouseMoveHandler, false);
|
@@ -13,38 +13,38 @@
|
|
13
13
|
svg {
|
14
14
|
cursor: grab;
|
15
15
|
}
|
16
|
-
|
16
|
+
|
17
17
|
</style>
|
18
18
|
</head>
|
19
|
-
|
19
|
+
|
20
20
|
<body>
|
21
21
|
<div id="graphDiv"></div>
|
22
22
|
<script src="https://bumbu.me/svg-pan-zoom/dist/svg-pan-zoom.min.js"></script>
|
23
23
|
<script type="module">
|
24
24
|
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
25
|
-
|
25
|
+
|
26
26
|
mermaid.initialize({startOnLoad: false});
|
27
27
|
await mermaid.run({
|
28
28
|
querySelector: '.mermaid',
|
29
29
|
postRenderCallback: (id) => {
|
30
30
|
const container = document.getElementById("diagram-container");
|
31
31
|
const svgElement = container.querySelector("svg");
|
32
|
-
|
32
|
+
|
33
33
|
// Initialize Panzoom
|
34
34
|
const panzoomInstance = Panzoom(svgElement, {
|
35
35
|
maxScale: 5,
|
36
36
|
minScale: 0.5,
|
37
37
|
step: 0.1,
|
38
38
|
});
|
39
|
-
|
39
|
+
|
40
40
|
// Add mouse wheel zoom
|
41
41
|
container.addEventListener("wheel", (event) => {
|
42
42
|
panzoomInstance.zoomWithWheel(event);
|
43
43
|
});
|
44
44
|
}
|
45
45
|
});
|
46
|
-
|
47
|
-
|
46
|
+
|
47
|
+
|
48
48
|
const drawDiagram = async function () {
|
49
49
|
const element = document.querySelector('#graphDiv');
|
50
50
|
const graphDefinition = `
|
@@ -53,12 +53,12 @@
|
|
53
53
|
|
54
54
|
adbae740-57a3-41b8-a722-266b895794e6@{ shape: flip-tri, label: "*Information Supply Chain*
|
55
55
|
**Personalized Treatment Ordering**"}
|
56
|
-
|
56
|
+
6b6468b9-c34c-4c1e-9159-69e8ae7486da@{ shape: text, label: "*Description*
|
57
57
|
**Delivering information about a new personalized medicine order so that it fulfilled and invoiced.**"}
|
58
|
-
adbae740-57a3-41b8-a722-266b895794e6~~~
|
59
|
-
|
58
|
+
adbae740-57a3-41b8-a722-266b895794e6~~~6b6468b9-c34c-4c1e-9159-69e8ae7486da
|
59
|
+
016a9f2a-66ac-4890-83c6-22b0aa870787@{ shape: text, label: "*Purpose*
|
60
60
|
**Ensuring orders are fulfilled effectively.**"}
|
61
|
-
|
61
|
+
6b6468b9-c34c-4c1e-9159-69e8ae7486da~~~016a9f2a-66ac-4890-83c6-22b0aa870787
|
62
62
|
bdf60c10-e8f8-4b49-9f92-e0c6a40b0d7b@{ shape: rounded, label: "*Software Server*
|
63
63
|
**System:ed-mfg-control**"}
|
64
64
|
25e2e56d-2e2f-4f6f-a1ed-019dd76d589a@{ shape: rounded, label: "*Software Server*
|
@@ -81,22 +81,22 @@ style c24e9ea0-171a-46d8-a5d8-3fedcfe97aa4 color:#000000, fill:#e0ab18, stroke:#
|
|
81
81
|
style a2e43afa-386a-4acd-ba1d-7773b368c34a color:#000000, fill:#e0ab18, stroke:#004563
|
82
82
|
style adbae740-57a3-41b8-a722-266b895794e6 color:#FFFFFF, fill:#004563, stroke:#b7c0c7
|
83
83
|
style bdf60c10-e8f8-4b49-9f92-e0c6a40b0d7b color:#000000, fill:#e0ab18, stroke:#004563
|
84
|
-
style 5e41b108-88e2-42a1-a328-5e3fb40d5a89 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
85
84
|
style 11071e76-23a8-4f3d-bd07-3b9aa9781bda color:#000000, fill:#e0ab18, stroke:#004563
|
86
|
-
style
|
85
|
+
style 016a9f2a-66ac-4890-83c6-22b0aa870787 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
87
86
|
style 0f59833f-8a8a-488b-808a-9ea24618bb6c color:#000000, fill:#e0ab18, stroke:#004563
|
88
|
-
style 25e2e56d-2e2f-4f6f-a1ed-019dd76d589a color:#000000, fill:#e0ab18, stroke:#004563
|
87
|
+
style 25e2e56d-2e2f-4f6f-a1ed-019dd76d589a color:#000000, fill:#e0ab18, stroke:#004563
|
88
|
+
style 6b6468b9-c34c-4c1e-9159-69e8ae7486da color:#000000, fill:#F9F7ED, stroke:#b7c0c7`;
|
89
89
|
const {svg} = await mermaid.render('mySvgId', graphDefinition);
|
90
90
|
element.innerHTML = svg.replace(/( )*max-width:( 0-9\.)*px;/i, '');
|
91
|
-
|
91
|
+
|
92
92
|
var doPan = false;
|
93
93
|
var eventsHandler;
|
94
94
|
var panZoom;
|
95
95
|
var mousepos;
|
96
|
-
|
96
|
+
|
97
97
|
eventsHandler = {
|
98
98
|
haltEventListeners: ['mousedown', 'mousemove', 'mouseup']
|
99
|
-
|
99
|
+
|
100
100
|
, mouseDownHandler: function (ev) {
|
101
101
|
if (event.target.className == "[object SVGAnimatedString]") {
|
102
102
|
doPan = true;
|
@@ -104,7 +104,7 @@ style 25e2e56d-2e2f-4f6f-a1ed-019dd76d589a color:#000000, fill:#e0ab18, stroke:#
|
|
104
104
|
}
|
105
105
|
;
|
106
106
|
}
|
107
|
-
|
107
|
+
|
108
108
|
, mouseMoveHandler: function (ev) {
|
109
109
|
if (doPan) {
|
110
110
|
panZoom.panBy({x: ev.clientX - mousepos.x, y: ev.clientY - mousepos.y});
|
@@ -112,17 +112,17 @@ style 25e2e56d-2e2f-4f6f-a1ed-019dd76d589a color:#000000, fill:#e0ab18, stroke:#
|
|
112
112
|
window.getSelection().removeAllRanges();
|
113
113
|
}
|
114
114
|
}
|
115
|
-
|
115
|
+
|
116
116
|
, mouseUpHandler: function (ev) {
|
117
117
|
doPan = false;
|
118
118
|
}
|
119
|
-
|
119
|
+
|
120
120
|
, init: function (options) {
|
121
121
|
options.svgElement.addEventListener('mousedown', this.mouseDownHandler, false);
|
122
122
|
options.svgElement.addEventListener('mousemove', this.mouseMoveHandler, false);
|
123
123
|
options.svgElement.addEventListener('mouseup', this.mouseUpHandler, false);
|
124
124
|
}
|
125
|
-
|
125
|
+
|
126
126
|
, destroy: function (options) {
|
127
127
|
options.svgElement.removeEventListener('mousedown', this.mouseDownHandler, false);
|
128
128
|
options.svgElement.removeEventListener('mousemove', this.mouseMoveHandler, false);
|
@@ -13,38 +13,38 @@
|
|
13
13
|
svg {
|
14
14
|
cursor: grab;
|
15
15
|
}
|
16
|
-
|
16
|
+
|
17
17
|
</style>
|
18
18
|
</head>
|
19
|
-
|
19
|
+
|
20
20
|
<body>
|
21
21
|
<div id="graphDiv"></div>
|
22
22
|
<script src="https://bumbu.me/svg-pan-zoom/dist/svg-pan-zoom.min.js"></script>
|
23
23
|
<script type="module">
|
24
24
|
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
25
|
-
|
25
|
+
|
26
26
|
mermaid.initialize({startOnLoad: false});
|
27
27
|
await mermaid.run({
|
28
28
|
querySelector: '.mermaid',
|
29
29
|
postRenderCallback: (id) => {
|
30
30
|
const container = document.getElementById("diagram-container");
|
31
31
|
const svgElement = container.querySelector("svg");
|
32
|
-
|
32
|
+
|
33
33
|
// Initialize Panzoom
|
34
34
|
const panzoomInstance = Panzoom(svgElement, {
|
35
35
|
maxScale: 5,
|
36
36
|
minScale: 0.5,
|
37
37
|
step: 0.1,
|
38
38
|
});
|
39
|
-
|
39
|
+
|
40
40
|
// Add mouse wheel zoom
|
41
41
|
container.addEventListener("wheel", (event) => {
|
42
42
|
panzoomInstance.zoomWithWheel(event);
|
43
43
|
});
|
44
44
|
}
|
45
45
|
});
|
46
|
-
|
47
|
-
|
46
|
+
|
47
|
+
|
48
48
|
const drawDiagram = async function () {
|
49
49
|
const element = document.querySelector('#graphDiv');
|
50
50
|
const graphDefinition = `
|
@@ -53,15 +53,15 @@
|
|
53
53
|
|
54
54
|
7480a3b1-8d6c-4062-ae59-f3b81e146ed0@{ shape: flip-tri, label: "*Information Supply Chain*
|
55
55
|
**Physical Inventory Tracking**"}
|
56
|
-
|
56
|
+
4eee01b9-66f1-435e-8924-09235062413e@{ shape: text, label: "*Description*
|
57
57
|
**Managing information take tracks physical goods from suppliers, to depot and manufacturing.**"}
|
58
|
-
7480a3b1-8d6c-4062-ae59-f3b81e146ed0~~~
|
59
|
-
|
58
|
+
7480a3b1-8d6c-4062-ae59-f3b81e146ed0~~~4eee01b9-66f1-435e-8924-09235062413e
|
59
|
+
12ee0351-e01a-4312-a5ff-a2d2a721e92d@{ shape: text, label: "*Purpose*
|
60
60
|
**Ensuring effective management of physical inventory.**"}
|
61
|
-
|
62
|
-
|
61
|
+
4eee01b9-66f1-435e-8924-09235062413e~~~12ee0351-e01a-4312-a5ff-a2d2a721e92d
|
62
|
+
85423a2d-f935-46cd-8be1-2eb4f4239f22@{ shape: text, label: "*Purpose*
|
63
63
|
**Ensuring hazardous materials are properly identified, reported and managed.**"}
|
64
|
-
|
64
|
+
12ee0351-e01a-4312-a5ff-a2d2a721e92d~~~85423a2d-f935-46cd-8be1-2eb4f4239f22
|
65
65
|
db144477-e6cb-4fd1-9521-4a577de9af04@{ shape: rounded, label: "*Software Server*
|
66
66
|
**System:procurement03**"}
|
67
67
|
11071e76-23a8-4f3d-bd07-3b9aa9781bda@{ shape: rounded, label: "*Software Server*
|
@@ -111,27 +111,27 @@ style c24e9ea0-171a-46d8-a5d8-3fedcfe97aa4 color:#000000, fill:#e0ab18, stroke:#
|
|
111
111
|
style bdf60c10-e8f8-4b49-9f92-e0c6a40b0d7b color:#000000, fill:#e0ab18, stroke:#004563
|
112
112
|
style 9e29ee1f-01d3-482c-9d1b-8b3f36ce62d2 color:#000000, fill:#e0ab18, stroke:#004563
|
113
113
|
style 7480a3b1-8d6c-4062-ae59-f3b81e146ed0 color:#FFFFFF, fill:#004563, stroke:#b7c0c7
|
114
|
-
style 140d83bf-0cab-4dd8-aad3-955e828af113 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
115
114
|
style db144477-e6cb-4fd1-9521-4a577de9af04 color:#000000, fill:#e0ab18, stroke:#004563
|
116
115
|
style 11071e76-23a8-4f3d-bd07-3b9aa9781bda color:#000000, fill:#e0ab18, stroke:#004563
|
117
116
|
style cbe8c0bb-0e27-4d2a-825f-f017ee939028 color:#000000, fill:#e0ab18, stroke:#004563
|
117
|
+
style 12ee0351-e01a-4312-a5ff-a2d2a721e92d color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
118
118
|
style 25e2e56d-2e2f-4f6f-a1ed-019dd76d589a color:#000000, fill:#e0ab18, stroke:#004563
|
119
|
-
style 75448140-126f-4590-900f-a669acb37e73 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
120
119
|
style 467dd9a0-89d6-4796-a058-c079bf54b6c7 color:#000000, fill:#e0ab18, stroke:#004563
|
121
120
|
style 23fb5e33-11c9-4eb6-91d6-f2e873f8da68 color:#000000, fill:#e0ab18, stroke:#004563
|
121
|
+
style 4eee01b9-66f1-435e-8924-09235062413e color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
122
122
|
style 0f59833f-8a8a-488b-808a-9ea24618bb6c color:#000000, fill:#e0ab18, stroke:#004563
|
123
|
-
style
|
123
|
+
style 85423a2d-f935-46cd-8be1-2eb4f4239f22 color:#000000, fill:#F9F7ED, stroke:#b7c0c7`;
|
124
124
|
const {svg} = await mermaid.render('mySvgId', graphDefinition);
|
125
125
|
element.innerHTML = svg.replace(/( )*max-width:( 0-9\.)*px;/i, '');
|
126
|
-
|
126
|
+
|
127
127
|
var doPan = false;
|
128
128
|
var eventsHandler;
|
129
129
|
var panZoom;
|
130
130
|
var mousepos;
|
131
|
-
|
131
|
+
|
132
132
|
eventsHandler = {
|
133
133
|
haltEventListeners: ['mousedown', 'mousemove', 'mouseup']
|
134
|
-
|
134
|
+
|
135
135
|
, mouseDownHandler: function (ev) {
|
136
136
|
if (event.target.className == "[object SVGAnimatedString]") {
|
137
137
|
doPan = true;
|
@@ -139,7 +139,7 @@ style 9e6c5dab-a341-456d-a194-787d100e5fac color:#000000, fill:#F9F7ED, stroke:#
|
|
139
139
|
}
|
140
140
|
;
|
141
141
|
}
|
142
|
-
|
142
|
+
|
143
143
|
, mouseMoveHandler: function (ev) {
|
144
144
|
if (doPan) {
|
145
145
|
panZoom.panBy({x: ev.clientX - mousepos.x, y: ev.clientY - mousepos.y});
|
@@ -147,17 +147,17 @@ style 9e6c5dab-a341-456d-a194-787d100e5fac color:#000000, fill:#F9F7ED, stroke:#
|
|
147
147
|
window.getSelection().removeAllRanges();
|
148
148
|
}
|
149
149
|
}
|
150
|
-
|
150
|
+
|
151
151
|
, mouseUpHandler: function (ev) {
|
152
152
|
doPan = false;
|
153
153
|
}
|
154
|
-
|
154
|
+
|
155
155
|
, init: function (options) {
|
156
156
|
options.svgElement.addEventListener('mousedown', this.mouseDownHandler, false);
|
157
157
|
options.svgElement.addEventListener('mousemove', this.mouseMoveHandler, false);
|
158
158
|
options.svgElement.addEventListener('mouseup', this.mouseUpHandler, false);
|
159
159
|
}
|
160
|
-
|
160
|
+
|
161
161
|
, destroy: function (options) {
|
162
162
|
options.svgElement.removeEventListener('mousedown', this.mouseDownHandler, false);
|
163
163
|
options.svgElement.removeEventListener('mousemove', this.mouseMoveHandler, false);
|
@@ -13,38 +13,38 @@
|
|
13
13
|
svg {
|
14
14
|
cursor: grab;
|
15
15
|
}
|
16
|
-
|
16
|
+
|
17
17
|
</style>
|
18
18
|
</head>
|
19
|
-
|
19
|
+
|
20
20
|
<body>
|
21
21
|
<div id="graphDiv"></div>
|
22
22
|
<script src="https://bumbu.me/svg-pan-zoom/dist/svg-pan-zoom.min.js"></script>
|
23
23
|
<script type="module">
|
24
24
|
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
25
|
-
|
25
|
+
|
26
26
|
mermaid.initialize({startOnLoad: false});
|
27
27
|
await mermaid.run({
|
28
28
|
querySelector: '.mermaid',
|
29
29
|
postRenderCallback: (id) => {
|
30
30
|
const container = document.getElementById("diagram-container");
|
31
31
|
const svgElement = container.querySelector("svg");
|
32
|
-
|
32
|
+
|
33
33
|
// Initialize Panzoom
|
34
34
|
const panzoomInstance = Panzoom(svgElement, {
|
35
35
|
maxScale: 5,
|
36
36
|
minScale: 0.5,
|
37
37
|
step: 0.1,
|
38
38
|
});
|
39
|
-
|
39
|
+
|
40
40
|
// Add mouse wheel zoom
|
41
41
|
container.addEventListener("wheel", (event) => {
|
42
42
|
panzoomInstance.zoomWithWheel(event);
|
43
43
|
});
|
44
44
|
}
|
45
45
|
});
|
46
|
-
|
47
|
-
|
46
|
+
|
47
|
+
|
48
48
|
const drawDiagram = async function () {
|
49
49
|
const element = document.querySelector('#graphDiv');
|
50
50
|
const graphDefinition = `
|
@@ -53,12 +53,12 @@
|
|
53
53
|
|
54
54
|
dd15b286-a38d-4f03-8625-aaded8596048@{ shape: flip-tri, label: "*Information Supply Chain*
|
55
55
|
**Sustainability Reporting**"}
|
56
|
-
|
56
|
+
81fb3cc9-6bdb-4961-80e6-df61df658d14@{ shape: text, label: "*Description*
|
57
57
|
**Delivering information to the sustainability reporting tools.**"}
|
58
|
-
dd15b286-a38d-4f03-8625-aaded8596048~~~
|
59
|
-
|
58
|
+
dd15b286-a38d-4f03-8625-aaded8596048~~~81fb3cc9-6bdb-4961-80e6-df61df658d14
|
59
|
+
3cd22769-b940-4154-a3d3-f78546a03301@{ shape: text, label: "*Purpose*
|
60
60
|
**Ensuring sustainability reporting is accurate.**"}
|
61
|
-
|
61
|
+
81fb3cc9-6bdb-4961-80e6-df61df658d14~~~3cd22769-b940-4154-a3d3-f78546a03301
|
62
62
|
af07dc2b-ae07-442b-9b06-43d4ef52138a@{ shape: hex, label: "*Information Supply Chain Segment*
|
63
63
|
**Sustainability Report Delivery**"}
|
64
64
|
a491accc-aaaa-455b-893e-b6f7b0bf0afb@{ shape: hex, label: "*Information Supply Chain Segment*
|
@@ -124,13 +124,12 @@ ad8eab54-c2f7-494d-82d0-bf5985e5a58d-->|"travel inventory [Data Flow]"|8a578f0d-
|
|
124
124
|
467dd9a0-89d6-4796-a058-c079bf54b6c7@{ shape: rounded, label: "*Software Server*
|
125
125
|
**System:coco-inventory**"}
|
126
126
|
467dd9a0-89d6-4796-a058-c079bf54b6c7-->|"goods movement [Data Flow]"|8a578f0d-f7ae-4255-b4a5-236241fa5449
|
127
|
-
style 2801cb02-b053-4f82-a5c2-55d9c2e4057b color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
128
127
|
style dd15b286-a38d-4f03-8625-aaded8596048 color:#FFFFFF, fill:#004563, stroke:#b7c0c7
|
129
128
|
style ad8eab54-c2f7-494d-82d0-bf5985e5a58d color:#000000, fill:#e0ab18, stroke:#004563
|
130
129
|
style 9e29ee1f-01d3-482c-9d1b-8b3f36ce62d2 color:#000000, fill:#e0ab18, stroke:#004563
|
131
130
|
style 11071e76-23a8-4f3d-bd07-3b9aa9781bda color:#000000, fill:#e0ab18, stroke:#004563
|
131
|
+
style 81fb3cc9-6bdb-4961-80e6-df61df658d14 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
132
132
|
style 8a578f0d-f7ae-4255-b4a5-236241fa5449 color:#000000, fill:#e0ab18, stroke:#004563
|
133
|
-
style 5f858e06-3421-4029-acee-4b14d8968ab1 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
134
133
|
style fc55ef2d-a88d-44ee-94cb-3fca9b9af8b4 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
135
134
|
style 25fd5be7-692d-4752-9dc7-30068a7d665e color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
136
135
|
style 3dbe7e96-c9e5-4336-a29a-9342258e50f8 color:#000000, fill:#e0ab18, stroke:#004563
|
@@ -142,21 +141,22 @@ style d50a6f1f-49d2-47c3-a55e-5844464bd26f color:#FFFFFF, fill:#838cc7, stroke:#
|
|
142
141
|
style 6e786315-ae54-445b-b516-f3c1f0e5f289 color:#000000, fill:#e0ab18, stroke:#004563
|
143
142
|
style 467dd9a0-89d6-4796-a058-c079bf54b6c7 color:#000000, fill:#e0ab18, stroke:#004563
|
144
143
|
style 50768e61-43b6-4241-96a3-4c413582ec1f color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
144
|
+
style 3cd22769-b940-4154-a3d3-f78546a03301 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
145
145
|
style a491accc-aaaa-455b-893e-b6f7b0bf0afb color:#004563, fill:#b7c0c7, stroke:#004563
|
146
146
|
style 5a2927f3-eed6-4509-bceb-2c29aa415090 color:#000000, fill:#e0ab18, stroke:#004563
|
147
147
|
style 2c0f5a4e-bb02-4081-a80e-3072ca99a1aa color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
148
148
|
style 9fb47e51-4121-495d-be31-f766a1f70856 color:#004563, fill:#b7c0c7, stroke:#004563`;
|
149
149
|
const {svg} = await mermaid.render('mySvgId', graphDefinition);
|
150
150
|
element.innerHTML = svg.replace(/( )*max-width:( 0-9\.)*px;/i, '');
|
151
|
-
|
151
|
+
|
152
152
|
var doPan = false;
|
153
153
|
var eventsHandler;
|
154
154
|
var panZoom;
|
155
155
|
var mousepos;
|
156
|
-
|
156
|
+
|
157
157
|
eventsHandler = {
|
158
158
|
haltEventListeners: ['mousedown', 'mousemove', 'mouseup']
|
159
|
-
|
159
|
+
|
160
160
|
, mouseDownHandler: function (ev) {
|
161
161
|
if (event.target.className == "[object SVGAnimatedString]") {
|
162
162
|
doPan = true;
|
@@ -164,7 +164,7 @@ style 9fb47e51-4121-495d-be31-f766a1f70856 color:#004563, fill:#b7c0c7, stroke:#
|
|
164
164
|
}
|
165
165
|
;
|
166
166
|
}
|
167
|
-
|
167
|
+
|
168
168
|
, mouseMoveHandler: function (ev) {
|
169
169
|
if (doPan) {
|
170
170
|
panZoom.panBy({x: ev.clientX - mousepos.x, y: ev.clientY - mousepos.y});
|
@@ -172,17 +172,17 @@ style 9fb47e51-4121-495d-be31-f766a1f70856 color:#004563, fill:#b7c0c7, stroke:#
|
|
172
172
|
window.getSelection().removeAllRanges();
|
173
173
|
}
|
174
174
|
}
|
175
|
-
|
175
|
+
|
176
176
|
, mouseUpHandler: function (ev) {
|
177
177
|
doPan = false;
|
178
178
|
}
|
179
|
-
|
179
|
+
|
180
180
|
, init: function (options) {
|
181
181
|
options.svgElement.addEventListener('mousedown', this.mouseDownHandler, false);
|
182
182
|
options.svgElement.addEventListener('mousemove', this.mouseMoveHandler, false);
|
183
183
|
options.svgElement.addEventListener('mouseup', this.mouseUpHandler, false);
|
184
184
|
}
|
185
|
-
|
185
|
+
|
186
186
|
, destroy: function (options) {
|
187
187
|
options.svgElement.removeEventListener('mousedown', this.mouseDownHandler, false);
|
188
188
|
options.svgElement.removeEventListener('mousemove', this.mouseMoveHandler, false);
|
@@ -13,38 +13,38 @@
|
|
13
13
|
svg {
|
14
14
|
cursor: grab;
|
15
15
|
}
|
16
|
-
|
16
|
+
|
17
17
|
</style>
|
18
18
|
</head>
|
19
|
-
|
19
|
+
|
20
20
|
<body>
|
21
21
|
<div id="graphDiv"></div>
|
22
22
|
<script src="https://bumbu.me/svg-pan-zoom/dist/svg-pan-zoom.min.js"></script>
|
23
23
|
<script type="module">
|
24
24
|
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
25
|
-
|
25
|
+
|
26
26
|
mermaid.initialize({startOnLoad: false});
|
27
27
|
await mermaid.run({
|
28
28
|
querySelector: '.mermaid',
|
29
29
|
postRenderCallback: (id) => {
|
30
30
|
const container = document.getElementById("diagram-container");
|
31
31
|
const svgElement = container.querySelector("svg");
|
32
|
-
|
32
|
+
|
33
33
|
// Initialize Panzoom
|
34
34
|
const panzoomInstance = Panzoom(svgElement, {
|
35
35
|
maxScale: 5,
|
36
36
|
minScale: 0.5,
|
37
37
|
step: 0.1,
|
38
38
|
});
|
39
|
-
|
39
|
+
|
40
40
|
// Add mouse wheel zoom
|
41
41
|
container.addEventListener("wheel", (event) => {
|
42
42
|
panzoomInstance.zoomWithWheel(event);
|
43
43
|
});
|
44
44
|
}
|
45
45
|
});
|
46
|
-
|
47
|
-
|
46
|
+
|
47
|
+
|
48
48
|
const drawDiagram = async function () {
|
49
49
|
const element = document.querySelector('#graphDiv');
|
50
50
|
const graphDefinition = `
|
@@ -53,22 +53,22 @@
|
|
53
53
|
|
54
54
|
ba3ab0dd-3ec5-4ec5-9db9-f3dc56e3a732@{ shape: flip-tri, label: "*Information Supply Chain*
|
55
55
|
**{{displayName}}**"}
|
56
|
-
|
56
|
+
40130bec-d839-48cc-992a-3b2a2fc82caa@{ shape: text, label: "*Description*
|
57
57
|
**{{description}}**"}
|
58
|
-
ba3ab0dd-3ec5-4ec5-9db9-f3dc56e3a732~~~
|
58
|
+
ba3ab0dd-3ec5-4ec5-9db9-f3dc56e3a732~~~40130bec-d839-48cc-992a-3b2a2fc82caa
|
59
59
|
style ba3ab0dd-3ec5-4ec5-9db9-f3dc56e3a732 color:#FFFFFF, fill:#004563, stroke:#b7c0c7
|
60
|
-
style
|
60
|
+
style 40130bec-d839-48cc-992a-3b2a2fc82caa color:#000000, fill:#F9F7ED, stroke:#b7c0c7`;
|
61
61
|
const {svg} = await mermaid.render('mySvgId', graphDefinition);
|
62
62
|
element.innerHTML = svg.replace(/( )*max-width:( 0-9\.)*px;/i, '');
|
63
|
-
|
63
|
+
|
64
64
|
var doPan = false;
|
65
65
|
var eventsHandler;
|
66
66
|
var panZoom;
|
67
67
|
var mousepos;
|
68
|
-
|
68
|
+
|
69
69
|
eventsHandler = {
|
70
70
|
haltEventListeners: ['mousedown', 'mousemove', 'mouseup']
|
71
|
-
|
71
|
+
|
72
72
|
, mouseDownHandler: function (ev) {
|
73
73
|
if (event.target.className == "[object SVGAnimatedString]") {
|
74
74
|
doPan = true;
|
@@ -76,7 +76,7 @@ style bf39a57a-9241-42f8-8ce6-29880175e032 color:#000000, fill:#F9F7ED, stroke:#
|
|
76
76
|
}
|
77
77
|
;
|
78
78
|
}
|
79
|
-
|
79
|
+
|
80
80
|
, mouseMoveHandler: function (ev) {
|
81
81
|
if (doPan) {
|
82
82
|
panZoom.panBy({x: ev.clientX - mousepos.x, y: ev.clientY - mousepos.y});
|
@@ -84,17 +84,17 @@ style bf39a57a-9241-42f8-8ce6-29880175e032 color:#000000, fill:#F9F7ED, stroke:#
|
|
84
84
|
window.getSelection().removeAllRanges();
|
85
85
|
}
|
86
86
|
}
|
87
|
-
|
87
|
+
|
88
88
|
, mouseUpHandler: function (ev) {
|
89
89
|
doPan = false;
|
90
90
|
}
|
91
|
-
|
91
|
+
|
92
92
|
, init: function (options) {
|
93
93
|
options.svgElement.addEventListener('mousedown', this.mouseDownHandler, false);
|
94
94
|
options.svgElement.addEventListener('mousemove', this.mouseMoveHandler, false);
|
95
95
|
options.svgElement.addEventListener('mouseup', this.mouseUpHandler, false);
|
96
96
|
}
|
97
|
-
|
97
|
+
|
98
98
|
, destroy: function (options) {
|
99
99
|
options.svgElement.removeEventListener('mousedown', this.mouseDownHandler, false);
|
100
100
|
options.svgElement.removeEventListener('mousemove', this.mouseMoveHandler, false);
|
pyegeria/mermaid_utilities.py
CHANGED
@@ -235,6 +235,19 @@ def construct_mermaid_html(mermaid_str: str) -> str:
|
|
235
235
|
|
236
236
|
return html_prefix + mermaid_code + html_postfix
|
237
237
|
|
238
|
+
def save_mermaid_html(title: str, mermaid_str: str, folder:str = EGERIA_MERMAID_FOLDER):
|
239
|
+
"""Save a Mermaid diagram to a file"""
|
240
|
+
if not os.path.exists(folder):
|
241
|
+
os.makedirs(folder)
|
242
|
+
mermaid_file = os.path.join(folder, title + ".html")
|
243
|
+
|
244
|
+
payload = construct_mermaid_html(mermaid_str)
|
245
|
+
|
246
|
+
with open(mermaid_file, "w") as f:
|
247
|
+
f.write(payload)
|
248
|
+
return mermaid_file
|
249
|
+
|
250
|
+
|
238
251
|
|
239
252
|
|
240
253
|
def save_mermaid_graph(title, mermaid_str, folder:str = EGERIA_MERMAID_FOLDER):
|