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
pyegeria/__init__.py
CHANGED
@@ -68,7 +68,8 @@ from .create_tech_guid_lists import build_global_guid_lists
|
|
68
68
|
from .classification_manager_omvs import ClassificationManager
|
69
69
|
from .feedback_manager_omvs import FeedbackManager
|
70
70
|
from .metadata_explorer_omvs import MetadataExplorer
|
71
|
-
from .mermaid_utilities import load_mermaid, render_mermaid, generate_process_graph, save_mermaid_graph
|
71
|
+
from .mermaid_utilities import (load_mermaid, render_mermaid, generate_process_graph, save_mermaid_graph,
|
72
|
+
save_mermaid_html,construct_mermaid_html,parse_mermaid_code)
|
72
73
|
from .egeria_my_client import EgeriaMy
|
73
74
|
|
74
75
|
from .solution_architect_omvs import SolutionArchitect
|
@@ -21,10 +21,12 @@ from rich.text import Text
|
|
21
21
|
from rich.tree import Tree
|
22
22
|
from pyegeria.solution_architect_omvs import SolutionArchitect
|
23
23
|
from pyegeria import (
|
24
|
-
ProjectManager,
|
25
24
|
UserNotAuthorizedException,
|
26
25
|
PropertyServerException,
|
27
|
-
InvalidParameterException,
|
26
|
+
InvalidParameterException,
|
27
|
+
save_mermaid_graph,
|
28
|
+
save_mermaid_html,
|
29
|
+
|
28
30
|
)
|
29
31
|
|
30
32
|
from pyegeria._exceptions import (
|
@@ -98,7 +100,7 @@ def supply_chain_viewer(
|
|
98
100
|
sc_unique_name = f"{sc_qname}\n\n\t\t/\n\n{sc_guid}"
|
99
101
|
sc_mermaid = sc.get("mermaidGraph",'---')
|
100
102
|
if sc_mermaid != '---':
|
101
|
-
link =
|
103
|
+
link = save_mermaid_html(sc_name, sc_mermaid, EGERIA_MERMAID_FOLDER )
|
102
104
|
sc_mermaid_link = f"file://:{link}"
|
103
105
|
# print("Visit my [link=https://www.willmcgugan.com]blog[/link]!")
|
104
106
|
# sc_scope = Text(f"{sc_scope}\n\t\t/\n{sc_mermaid_link}")
|
@@ -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,42 +53,42 @@
|
|
53
53
|
|
54
54
|
39a035f0-3b2b-45fe-adb8-ee8a19581f6a@{ shape: flip-tri, label: "*Information Supply Chain*
|
55
55
|
**Clinical Trial Subject Onboarding**"}
|
56
|
-
|
56
|
+
b5691fb0-7569-43c1-bd4c-11198a11e733@{ shape: text, label: "*Description*
|
57
57
|
**Delivering the data necessary to add a person as a subject in a clinical trial.**"}
|
58
|
-
39a035f0-3b2b-45fe-adb8-ee8a19581f6a~~~
|
59
|
-
|
58
|
+
39a035f0-3b2b-45fe-adb8-ee8a19581f6a~~~b5691fb0-7569-43c1-bd4c-11198a11e733
|
59
|
+
2338ad35-78eb-4920-8003-d522b3cecf6b@{ shape: text, label: "*Purpose*
|
60
60
|
**Ensure patient subject is aware of the process and potential risks in participation.**"}
|
61
|
-
|
62
|
-
|
61
|
+
b5691fb0-7569-43c1-bd4c-11198a11e733~~~2338ad35-78eb-4920-8003-d522b3cecf6b
|
62
|
+
9f146a62-59f4-482b-8384-48b20ca76fa3@{ shape: text, label: "*Purpose*
|
63
63
|
**Ensure patient subject has given permission for Coco Pharmaceuticals to acquire, store and process their personal data needed for the clinical trial.**"}
|
64
|
-
|
65
|
-
|
64
|
+
2338ad35-78eb-4920-8003-d522b3cecf6b~~~9f146a62-59f4-482b-8384-48b20ca76fa3
|
65
|
+
bd1d332d-6e86-4953-8f83-b0a03b5e738c@{ shape: text, label: "*Purpose*
|
66
66
|
**Ensure incoming data is validated and catalogued.**"}
|
67
|
-
|
68
|
-
|
67
|
+
9f146a62-59f4-482b-8384-48b20ca76fa3~~~bd1d332d-6e86-4953-8f83-b0a03b5e738c
|
68
|
+
b58f5eba-9cf8-492d-bc86-966611bc7603@{ shape: text, label: "*Purpose*
|
69
69
|
**Ensure data and process owners are informed of key milestones and issues requiring attention.**"}
|
70
|
-
|
71
|
-
|
70
|
+
bd1d332d-6e86-4953-8f83-b0a03b5e738c~~~b58f5eba-9cf8-492d-bc86-966611bc7603
|
71
|
+
1fd73811-9f3d-4599-9a22-1300e0931eff@{ shape: text, label: "*Purpose*
|
72
72
|
**Ensure the process of data capture and validation is transparent and auditable.**"}
|
73
|
-
|
73
|
+
b58f5eba-9cf8-492d-bc86-966611bc7603~~~1fd73811-9f3d-4599-9a22-1300e0931eff
|
74
74
|
style 39a035f0-3b2b-45fe-adb8-ee8a19581f6a color:#FFFFFF, fill:#004563, stroke:#b7c0c7
|
75
|
-
style
|
76
|
-
style
|
77
|
-
style
|
78
|
-
style
|
79
|
-
style
|
80
|
-
style
|
75
|
+
style 1fd73811-9f3d-4599-9a22-1300e0931eff color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
76
|
+
style b5691fb0-7569-43c1-bd4c-11198a11e733 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
77
|
+
style 9f146a62-59f4-482b-8384-48b20ca76fa3 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
78
|
+
style 2338ad35-78eb-4920-8003-d522b3cecf6b color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
79
|
+
style b58f5eba-9cf8-492d-bc86-966611bc7603 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
80
|
+
style bd1d332d-6e86-4953-8f83-b0a03b5e738c color:#000000, fill:#F9F7ED, stroke:#b7c0c7`;
|
81
81
|
const {svg} = await mermaid.render('mySvgId', graphDefinition);
|
82
82
|
element.innerHTML = svg.replace(/( )*max-width:( 0-9\.)*px;/i, '');
|
83
|
-
|
83
|
+
|
84
84
|
var doPan = false;
|
85
85
|
var eventsHandler;
|
86
86
|
var panZoom;
|
87
87
|
var mousepos;
|
88
|
-
|
88
|
+
|
89
89
|
eventsHandler = {
|
90
90
|
haltEventListeners: ['mousedown', 'mousemove', 'mouseup']
|
91
|
-
|
91
|
+
|
92
92
|
, mouseDownHandler: function (ev) {
|
93
93
|
if (event.target.className == "[object SVGAnimatedString]") {
|
94
94
|
doPan = true;
|
@@ -96,7 +96,7 @@ style 9f334ebf-ea2d-495e-8b8b-b425fbe75697 color:#000000, fill:#F9F7ED, stroke:#
|
|
96
96
|
}
|
97
97
|
;
|
98
98
|
}
|
99
|
-
|
99
|
+
|
100
100
|
, mouseMoveHandler: function (ev) {
|
101
101
|
if (doPan) {
|
102
102
|
panZoom.panBy({x: ev.clientX - mousepos.x, y: ev.clientY - mousepos.y});
|
@@ -104,17 +104,17 @@ style 9f334ebf-ea2d-495e-8b8b-b425fbe75697 color:#000000, fill:#F9F7ED, stroke:#
|
|
104
104
|
window.getSelection().removeAllRanges();
|
105
105
|
}
|
106
106
|
}
|
107
|
-
|
107
|
+
|
108
108
|
, mouseUpHandler: function (ev) {
|
109
109
|
doPan = false;
|
110
110
|
}
|
111
|
-
|
111
|
+
|
112
112
|
, init: function (options) {
|
113
113
|
options.svgElement.addEventListener('mousedown', this.mouseDownHandler, false);
|
114
114
|
options.svgElement.addEventListener('mousemove', this.mouseMoveHandler, false);
|
115
115
|
options.svgElement.addEventListener('mouseup', this.mouseUpHandler, false);
|
116
116
|
}
|
117
|
-
|
117
|
+
|
118
118
|
, destroy: function (options) {
|
119
119
|
options.svgElement.removeEventListener('mousedown', this.mouseDownHandler, false);
|
120
120
|
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,27 +53,27 @@
|
|
53
53
|
|
54
54
|
1f71e403-1187-4f03-a1dd-ae7dc105f06f@{ shape: flip-tri, label: "*Information Supply Chain*
|
55
55
|
**Clinical Trial Treatment Validation**"}
|
56
|
-
|
56
|
+
c5135483-a30c-4dfc-8729-54d306b0d2cc@{ shape: text, label: "*Description*
|
57
57
|
**Delivering data relating to a clinical trial from the hospitals to the Coco Researchers so that they can then determine the efficacy of the treatment to report to the regulators.**"}
|
58
|
-
1f71e403-1187-4f03-a1dd-ae7dc105f06f~~~
|
59
|
-
|
58
|
+
1f71e403-1187-4f03-a1dd-ae7dc105f06f~~~c5135483-a30c-4dfc-8729-54d306b0d2cc
|
59
|
+
8033331a-7342-4a66-b85a-0aa1bd35b203@{ shape: text, label: "*Purpose*
|
60
60
|
**Deliver patient measurement data from hospitals to data scientists in research.**"}
|
61
|
-
|
62
|
-
|
61
|
+
c5135483-a30c-4dfc-8729-54d306b0d2cc~~~8033331a-7342-4a66-b85a-0aa1bd35b203
|
62
|
+
25ca6519-ef83-4789-a8a9-ef08e8d195a0@{ shape: text, label: "*Purpose*
|
63
63
|
**Ensure incoming data is only from certified hospitals.**"}
|
64
|
-
|
65
|
-
|
64
|
+
8033331a-7342-4a66-b85a-0aa1bd35b203~~~25ca6519-ef83-4789-a8a9-ef08e8d195a0
|
65
|
+
68c30b1a-d716-4a34-b656-7b53f21e0d38@{ shape: text, label: "*Purpose*
|
66
66
|
**Ensure incoming data is validated and catalogued.**"}
|
67
|
-
|
68
|
-
|
67
|
+
25ca6519-ef83-4789-a8a9-ef08e8d195a0~~~68c30b1a-d716-4a34-b656-7b53f21e0d38
|
68
|
+
2e6b651b-1235-411d-87f7-5bbb25e91057@{ shape: text, label: "*Purpose*
|
69
69
|
**Ensure data and process owners are informed of key milestones and issues requiring attention.**"}
|
70
|
-
|
71
|
-
|
70
|
+
68c30b1a-d716-4a34-b656-7b53f21e0d38~~~2e6b651b-1235-411d-87f7-5bbb25e91057
|
71
|
+
ded87798-758f-4cc2-895f-95467009fe41@{ shape: text, label: "*Purpose*
|
72
72
|
**Ensure the process of data capture and treatment validation is transparent and auditable.**"}
|
73
|
-
|
74
|
-
|
73
|
+
2e6b651b-1235-411d-87f7-5bbb25e91057~~~ded87798-758f-4cc2-895f-95467009fe41
|
74
|
+
baf2f019-afff-487d-9a40-4fcdce8f8b84@{ shape: text, label: "*Purpose*
|
75
75
|
**Ensure the treatment validation report is complete and regulatory compliant.**"}
|
76
|
-
|
76
|
+
ded87798-758f-4cc2-895f-95467009fe41~~~baf2f019-afff-487d-9a40-4fcdce8f8b84
|
77
77
|
38635d38-f728-400d-a8ec-7c26e68b7c0f@{ shape: hex, label: "*Information Supply Chain Segment*
|
78
78
|
**Weekly Measurements Onboarding**"}
|
79
79
|
38635d38-f728-400d-a8ec-7c26e68b7c0f-->|"capture and catalog,
|
@@ -135,40 +135,40 @@ d48f579f-76d3-4c49-b1b4-575f5645a9d0-->|"retrieve patient data,
|
|
135
135
|
72a86eec-9734-4bc0-babb-4fec0aa7c9ff-->|"publish results,
|
136
136
|
[Solution Linking Wire]"|0bf2547c-937c-41b6-814f-6284849271a1
|
137
137
|
style 48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
138
|
-
style 6cb2b6ca-c44a-4c93-9a9d-96c83e448788 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
139
138
|
style e4303326-e418-4f77-b8e7-fd5d34717594 color:#004563, fill:#b7c0c7, stroke:#004563
|
140
|
-
style 4a162932-19da-408c-9130-90f4feee4c8b color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
141
139
|
style 4fc47e60-f1b5-469c-b666-e1f4570e749f color:#004563, fill:#b7c0c7, stroke:#004563
|
142
|
-
style
|
143
|
-
style
|
140
|
+
style 2e6b651b-1235-411d-87f7-5bbb25e91057 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
141
|
+
style ded87798-758f-4cc2-895f-95467009fe41 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
144
142
|
style 7f5dca65-50b4-4103-9ac7-3a406a09047a color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
145
143
|
style ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
144
|
+
style c5135483-a30c-4dfc-8729-54d306b0d2cc color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
146
145
|
style a5d4d638-6836-47e5-99d0-fdcde637e13f color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
147
146
|
style 72a86eec-9734-4bc0-babb-4fec0aa7c9ff color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
147
|
+
style baf2f019-afff-487d-9a40-4fcdce8f8b84 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
148
148
|
style 38635d38-f728-400d-a8ec-7c26e68b7c0f color:#004563, fill:#b7c0c7, stroke:#004563
|
149
149
|
style 7edca02c-e726-4570-815c-280bdf5498b9 color:#004563, fill:#b7c0c7, stroke:#004563
|
150
150
|
style b5c8da4c-f925-4cf1-8294-e43cd2c1a584 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
151
151
|
style 0bf2547c-937c-41b6-814f-6284849271a1 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
152
|
-
style 95071c88-d98d-486c-9843-f85d1577b689 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
153
152
|
style d48f579f-76d3-4c49-b1b4-575f5645a9d0 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
154
153
|
style 1f71e403-1187-4f03-a1dd-ae7dc105f06f color:#FFFFFF, fill:#004563, stroke:#b7c0c7
|
155
|
-
style
|
156
|
-
style
|
154
|
+
style 25ca6519-ef83-4789-a8a9-ef08e8d195a0 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
155
|
+
style 8033331a-7342-4a66-b85a-0aa1bd35b203 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
157
156
|
style 04ae768e-3816-47bc-bddb-c9ae25018684 color:#004563, fill:#b7c0c7, stroke:#004563
|
157
|
+
style 68c30b1a-d716-4a34-b656-7b53f21e0d38 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
158
158
|
style 26c07ca4-3b8e-484b-812b-36c1ace4b275 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
159
159
|
style 1c150d6e-30cf-481c-9afb-3b06c9c9e78f color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
160
160
|
style 07705e15-efff-4f80-8992-f04ac85e0ef1 color:#FFFFFF, fill:#838cc7, stroke:#3079ab`;
|
161
161
|
const {svg} = await mermaid.render('mySvgId', graphDefinition);
|
162
162
|
element.innerHTML = svg.replace(/( )*max-width:( 0-9\.)*px;/i, '');
|
163
|
-
|
163
|
+
|
164
164
|
var doPan = false;
|
165
165
|
var eventsHandler;
|
166
166
|
var panZoom;
|
167
167
|
var mousepos;
|
168
|
-
|
168
|
+
|
169
169
|
eventsHandler = {
|
170
170
|
haltEventListeners: ['mousedown', 'mousemove', 'mouseup']
|
171
|
-
|
171
|
+
|
172
172
|
, mouseDownHandler: function (ev) {
|
173
173
|
if (event.target.className == "[object SVGAnimatedString]") {
|
174
174
|
doPan = true;
|
@@ -176,7 +176,7 @@ style 07705e15-efff-4f80-8992-f04ac85e0ef1 color:#FFFFFF, fill:#838cc7, stroke:#
|
|
176
176
|
}
|
177
177
|
;
|
178
178
|
}
|
179
|
-
|
179
|
+
|
180
180
|
, mouseMoveHandler: function (ev) {
|
181
181
|
if (doPan) {
|
182
182
|
panZoom.panBy({x: ev.clientX - mousepos.x, y: ev.clientY - mousepos.y});
|
@@ -184,17 +184,17 @@ style 07705e15-efff-4f80-8992-f04ac85e0ef1 color:#FFFFFF, fill:#838cc7, stroke:#
|
|
184
184
|
window.getSelection().removeAllRanges();
|
185
185
|
}
|
186
186
|
}
|
187
|
-
|
187
|
+
|
188
188
|
, mouseUpHandler: function (ev) {
|
189
189
|
doPan = false;
|
190
190
|
}
|
191
|
-
|
191
|
+
|
192
192
|
, init: function (options) {
|
193
193
|
options.svgElement.addEventListener('mousedown', this.mouseDownHandler, false);
|
194
194
|
options.svgElement.addEventListener('mousemove', this.mouseMoveHandler, false);
|
195
195
|
options.svgElement.addEventListener('mouseup', this.mouseUpHandler, false);
|
196
196
|
}
|
197
|
-
|
197
|
+
|
198
198
|
, destroy: function (options) {
|
199
199
|
options.svgElement.removeEventListener('mousedown', this.mouseDownHandler, false);
|
200
200
|
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,33 +53,33 @@
|
|
53
53
|
|
54
54
|
79d1d83f-6a37-4c32-bf3f-eb8b4358027c@{ shape: flip-tri, label: "*Information Supply Chain*
|
55
55
|
**Employee Expense Payment**"}
|
56
|
-
|
56
|
+
36905eb3-ebc3-4f78-92bd-81ab7f04b0c8@{ shape: text, label: "*Description*
|
57
57
|
**Managing the collection of expense data, its approval and the subsequent payment authorization flows.**"}
|
58
|
-
79d1d83f-6a37-4c32-bf3f-eb8b4358027c~~~
|
59
|
-
|
58
|
+
79d1d83f-6a37-4c32-bf3f-eb8b4358027c~~~36905eb3-ebc3-4f78-92bd-81ab7f04b0c8
|
59
|
+
64023ff1-9b61-4655-aa0c-6310961f6d19@{ shape: text, label: "*Purpose*
|
60
60
|
**Ensure employees are reimbursed for their expenses in a timely manner.**"}
|
61
|
-
|
61
|
+
36905eb3-ebc3-4f78-92bd-81ab7f04b0c8~~~64023ff1-9b61-4655-aa0c-6310961f6d19
|
62
62
|
88c42780-6fb1-49e2-a584-8af90cdc7728@{ shape: rounded, label: "*Software Server*
|
63
63
|
**System:coco-hrim**"}
|
64
64
|
ad8eab54-c2f7-494d-82d0-bf5985e5a58d@{ shape: rounded, label: "*Software Server*
|
65
65
|
**System:coco-expenses**"}
|
66
66
|
88c42780-6fb1-49e2-a584-8af90cdc7728-->|"payment authorization [Data Flow]"|ad8eab54-c2f7-494d-82d0-bf5985e5a58d
|
67
|
-
style 7a30a560-1ce4-46c0-805b-d1d717d4880c color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
68
67
|
style ad8eab54-c2f7-494d-82d0-bf5985e5a58d color:#000000, fill:#e0ab18, stroke:#004563
|
69
68
|
style 79d1d83f-6a37-4c32-bf3f-eb8b4358027c color:#FFFFFF, fill:#004563, stroke:#b7c0c7
|
69
|
+
style 64023ff1-9b61-4655-aa0c-6310961f6d19 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
70
70
|
style 88c42780-6fb1-49e2-a584-8af90cdc7728 color:#000000, fill:#e0ab18, stroke:#004563
|
71
|
-
style
|
71
|
+
style 36905eb3-ebc3-4f78-92bd-81ab7f04b0c8 color:#000000, fill:#F9F7ED, stroke:#b7c0c7`;
|
72
72
|
const {svg} = await mermaid.render('mySvgId', graphDefinition);
|
73
73
|
element.innerHTML = svg.replace(/( )*max-width:( 0-9\.)*px;/i, '');
|
74
|
-
|
74
|
+
|
75
75
|
var doPan = false;
|
76
76
|
var eventsHandler;
|
77
77
|
var panZoom;
|
78
78
|
var mousepos;
|
79
|
-
|
79
|
+
|
80
80
|
eventsHandler = {
|
81
81
|
haltEventListeners: ['mousedown', 'mousemove', 'mouseup']
|
82
|
-
|
82
|
+
|
83
83
|
, mouseDownHandler: function (ev) {
|
84
84
|
if (event.target.className == "[object SVGAnimatedString]") {
|
85
85
|
doPan = true;
|
@@ -87,7 +87,7 @@ style ecd2e143-1430-46df-a366-4643a073f846 color:#000000, fill:#F9F7ED, stroke:#
|
|
87
87
|
}
|
88
88
|
;
|
89
89
|
}
|
90
|
-
|
90
|
+
|
91
91
|
, mouseMoveHandler: function (ev) {
|
92
92
|
if (doPan) {
|
93
93
|
panZoom.panBy({x: ev.clientX - mousepos.x, y: ev.clientY - mousepos.y});
|
@@ -95,17 +95,17 @@ style ecd2e143-1430-46df-a366-4643a073f846 color:#000000, fill:#F9F7ED, stroke:#
|
|
95
95
|
window.getSelection().removeAllRanges();
|
96
96
|
}
|
97
97
|
}
|
98
|
-
|
98
|
+
|
99
99
|
, mouseUpHandler: function (ev) {
|
100
100
|
doPan = false;
|
101
101
|
}
|
102
|
-
|
102
|
+
|
103
103
|
, init: function (options) {
|
104
104
|
options.svgElement.addEventListener('mousedown', this.mouseDownHandler, false);
|
105
105
|
options.svgElement.addEventListener('mousemove', this.mouseMoveHandler, false);
|
106
106
|
options.svgElement.addEventListener('mouseup', this.mouseUpHandler, false);
|
107
107
|
}
|
108
|
-
|
108
|
+
|
109
109
|
, destroy: function (options) {
|
110
110
|
options.svgElement.removeEventListener('mousedown', this.mouseDownHandler, false);
|
111
111
|
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
|
b0491fd4-6324-4ed8-9a1c-7cbd9892e21b@{ shape: flip-tri, label: "*Information Supply Chain*
|
55
55
|
**New Drug Product Information Distribution**"}
|
56
|
-
|
56
|
+
63306fd5-4973-4764-89be-ef4ca645d67b@{ shape: text, label: "*Description*
|
57
57
|
**Managing the distribution of information about a new product.**"}
|
58
|
-
b0491fd4-6324-4ed8-9a1c-7cbd9892e21b~~~
|
59
|
-
|
58
|
+
b0491fd4-6324-4ed8-9a1c-7cbd9892e21b~~~63306fd5-4973-4764-89be-ef4ca645d67b
|
59
|
+
961a3438-3969-468f-b0e9-055ea0405fd9@{ shape: text, label: "*Purpose*
|
60
60
|
**Ensuring information about a new product is distributed to all of the appropriate system so that it is visible for ordering, manufacturing and invoicing.**"}
|
61
|
-
|
61
|
+
63306fd5-4973-4764-89be-ef4ca645d67b~~~961a3438-3969-468f-b0e9-055ea0405fd9
|
62
62
|
c24e9ea0-171a-46d8-a5d8-3fedcfe97aa4@{ shape: rounded, label: "*Software Server*
|
63
63
|
**System:MFCTRL9482**"}
|
64
64
|
987df321-d940-4ce5-9ae1-8258736f0445@{ shape: rounded, label: "*Software Server*
|
@@ -75,26 +75,26 @@ dd424526-24e9-4a10-a575-0700dfb8743a@{ shape: rounded, label: "*Software Server*
|
|
75
75
|
a2e43afa-386a-4acd-ba1d-7773b368c34a@{ shape: rounded, label: "*Software Server*
|
76
76
|
**System:globalCRM**"}
|
77
77
|
dd424526-24e9-4a10-a575-0700dfb8743a-->|"new product offering [Data Flow]"|a2e43afa-386a-4acd-ba1d-7773b368c34a
|
78
|
+
style 63306fd5-4973-4764-89be-ef4ca645d67b color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
78
79
|
style b0491fd4-6324-4ed8-9a1c-7cbd9892e21b color:#FFFFFF, fill:#004563, stroke:#b7c0c7
|
79
80
|
style c24e9ea0-171a-46d8-a5d8-3fedcfe97aa4 color:#000000, fill:#e0ab18, stroke:#004563
|
80
81
|
style a2e43afa-386a-4acd-ba1d-7773b368c34a color:#000000, fill:#e0ab18, stroke:#004563
|
82
|
+
style 961a3438-3969-468f-b0e9-055ea0405fd9 color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
81
83
|
style 987df321-d940-4ce5-9ae1-8258736f0445 color:#000000, fill:#e0ab18, stroke:#004563
|
82
84
|
style c7b1467a-dea2-4288-95e5-8e1bc3ab2ed3 color:#000000, fill:#e0ab18, stroke:#004563
|
83
|
-
style f12a37d0-2228-459a-b30b-1d8444b6caea color:#000000, fill:#F9F7ED, stroke:#b7c0c7
|
84
85
|
style dd424526-24e9-4a10-a575-0700dfb8743a color:#000000, fill:#e0ab18, stroke:#004563
|
85
|
-
style afefd870-5616-4f35-a557-774b88b96bef color:#000000, fill:#e0ab18, stroke:#004563
|
86
|
-
style 82a0934c-9b54-4c72-bb95-ddbe85ec02a1 color:#000000, fill:#F9F7ED, stroke:#b7c0c7`;
|
86
|
+
style afefd870-5616-4f35-a557-774b88b96bef color:#000000, fill:#e0ab18, stroke:#004563`;
|
87
87
|
const {svg} = await mermaid.render('mySvgId', graphDefinition);
|
88
88
|
element.innerHTML = svg.replace(/( )*max-width:( 0-9\.)*px;/i, '');
|
89
|
-
|
89
|
+
|
90
90
|
var doPan = false;
|
91
91
|
var eventsHandler;
|
92
92
|
var panZoom;
|
93
93
|
var mousepos;
|
94
|
-
|
94
|
+
|
95
95
|
eventsHandler = {
|
96
96
|
haltEventListeners: ['mousedown', 'mousemove', 'mouseup']
|
97
|
-
|
97
|
+
|
98
98
|
, mouseDownHandler: function (ev) {
|
99
99
|
if (event.target.className == "[object SVGAnimatedString]") {
|
100
100
|
doPan = true;
|
@@ -102,7 +102,7 @@ style 82a0934c-9b54-4c72-bb95-ddbe85ec02a1 color:#000000, fill:#F9F7ED, stroke:#
|
|
102
102
|
}
|
103
103
|
;
|
104
104
|
}
|
105
|
-
|
105
|
+
|
106
106
|
, mouseMoveHandler: function (ev) {
|
107
107
|
if (doPan) {
|
108
108
|
panZoom.panBy({x: ev.clientX - mousepos.x, y: ev.clientY - mousepos.y});
|
@@ -110,17 +110,17 @@ style 82a0934c-9b54-4c72-bb95-ddbe85ec02a1 color:#000000, fill:#F9F7ED, stroke:#
|
|
110
110
|
window.getSelection().removeAllRanges();
|
111
111
|
}
|
112
112
|
}
|
113
|
-
|
113
|
+
|
114
114
|
, mouseUpHandler: function (ev) {
|
115
115
|
doPan = false;
|
116
116
|
}
|
117
|
-
|
117
|
+
|
118
118
|
, init: function (options) {
|
119
119
|
options.svgElement.addEventListener('mousedown', this.mouseDownHandler, false);
|
120
120
|
options.svgElement.addEventListener('mousemove', this.mouseMoveHandler, false);
|
121
121
|
options.svgElement.addEventListener('mouseup', this.mouseUpHandler, false);
|
122
122
|
}
|
123
|
-
|
123
|
+
|
124
124
|
, destroy: function (options) {
|
125
125
|
options.svgElement.removeEventListener('mousedown', this.mouseDownHandler, false);
|
126
126
|
options.svgElement.removeEventListener('mousemove', this.mouseMoveHandler, false);
|