pyegeria 5.3.4.17__py3-none-any.whl → 5.3.4.19__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/mermaid_utilities.py +3 -3
- pyegeria/test_m.html +110 -119
- {pyegeria-5.3.4.17.dist-info → pyegeria-5.3.4.19.dist-info}/METADATA +1 -1
- {pyegeria-5.3.4.17.dist-info → pyegeria-5.3.4.19.dist-info}/RECORD +7 -7
- {pyegeria-5.3.4.17.dist-info → pyegeria-5.3.4.19.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.4.17.dist-info → pyegeria-5.3.4.19.dist-info}/WHEEL +0 -0
- {pyegeria-5.3.4.17.dist-info → pyegeria-5.3.4.19.dist-info}/entry_points.txt +0 -0
pyegeria/mermaid_utilities.py
CHANGED
@@ -85,7 +85,7 @@ def parse_mermaid_code(mermaid_code):
|
|
85
85
|
return title, guid, mermaid_code
|
86
86
|
|
87
87
|
|
88
|
-
def
|
88
|
+
def construct_mermaid_html(mermaid_str: str) -> str:
|
89
89
|
"""Function to display a HTML code in a Jupyter notebook"""
|
90
90
|
title_label, guid, mermaid_code = parse_mermaid_code(mermaid_str)
|
91
91
|
|
@@ -210,7 +210,7 @@ def old_construct_mermaid_html(mermaid_str: str) -> str:
|
|
210
210
|
return html_section1 + html_section2 + html_section3 + mermaid_code + html_section4
|
211
211
|
|
212
212
|
|
213
|
-
def
|
213
|
+
def not_working_construct_mermaid_html(mermaid_str: str) -> str:
|
214
214
|
"""Function to display a HTML code in a Jupyter notebook
|
215
215
|
|
216
216
|
Constructs HTML for a single Mermaid graph with pan and zoom support.
|
@@ -274,7 +274,7 @@ def construct_mermaid_html(mermaid_str: str) -> str:
|
|
274
274
|
<!-- Mermaid diagram will be dynamically rendered here -->
|
275
275
|
{header_html}
|
276
276
|
<div id="{graph_id}" class="mermaid">
|
277
|
-
{
|
277
|
+
{escaped_mermaid_code}
|
278
278
|
</div>
|
279
279
|
</div>
|
280
280
|
|
pyegeria/test_m.html
CHANGED
@@ -1,50 +1,61 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
color: white;
|
25
|
-
border: none;
|
26
|
-
padding: 5px 10px;
|
27
|
-
border-radius: 3px;
|
28
|
-
cursor: pointer;
|
29
|
-
font-size: 14px;
|
30
|
-
}
|
31
|
-
.svg-pan-zoom_controls button:hover {
|
32
|
-
background-color: #0056b3;
|
33
|
-
}
|
34
|
-
</style>
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<style type="text/css">
|
6
|
+
#mySvgId {
|
7
|
+
width: 100%;
|
8
|
+
height: 600px;
|
9
|
+
overflow: scroll;
|
10
|
+
border: 2px solid #ccc;
|
11
|
+
position: relative;
|
12
|
+
margin-bottom: 10px;
|
13
|
+
}
|
14
|
+
svg {
|
15
|
+
cursor: grab;
|
16
|
+
}
|
17
|
+
|
18
|
+
</style>
|
19
|
+
</head>
|
20
|
+
|
21
|
+
<title>Component for Solution Blueprint - Clinical Trial Management Solution Blueprint </title>
|
22
|
+
<h3>Component for Solution Blueprint - Clinical Trial Management Solution Blueprint </h3>
|
23
|
+
GUID : c4f8d707-7c85-4125-b5fd-c3257a2ef2ef
|
35
24
|
|
36
|
-
<div id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef-597f-container" class="diagram-container">
|
37
|
-
<!-- Mermaid diagram will be dynamically rendered here -->
|
38
25
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
26
|
+
<body>
|
27
|
+
|
28
|
+
<div id="graphDiv"></div>
|
29
|
+
<script src="https://bumbu.me/svg-pan-zoom/dist/svg-pan-zoom.min.js"></script>
|
30
|
+
<script type="module">
|
31
|
+
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
|
32
|
+
|
33
|
+
mermaid.initialize({startOnLoad: false});
|
34
|
+
await mermaid.run({
|
35
|
+
querySelector: '.mermaid',
|
36
|
+
postRenderCallback: (id) => {
|
37
|
+
const container = document.getElementById("diagram-container");
|
38
|
+
const svgElement = container.querySelector("svg");
|
39
|
+
|
40
|
+
// Initialize Panzoom
|
41
|
+
const panzoomInstance = Panzoom(svgElement, {
|
42
|
+
maxScale: 5,
|
43
|
+
minScale: 0.5,
|
44
|
+
step: 0.1,
|
45
|
+
});
|
46
|
+
|
47
|
+
// Add mouse wheel zoom
|
48
|
+
container.addEventListener("wheel", (event) => {
|
49
|
+
panzoomInstance.zoomWithWheel(event);
|
50
|
+
});
|
51
|
+
}
|
52
|
+
});
|
53
|
+
|
54
|
+
|
55
|
+
const drawDiagram = async function () {
|
56
|
+
const element = document.querySelector('#graphDiv');
|
57
|
+
const graphDefinition = `
|
58
|
+
flowchart TD
|
48
59
|
%%{init: {"flowchart": {"htmlLabels": false}} }%%
|
49
60
|
|
50
61
|
subgraph c4f8d707-7c85-4125-b5fd-c3257a2ef2ef [Components and Actors]
|
@@ -144,79 +155,59 @@ style b5c8da4c-f925-4cf1-8294-e43cd2c1a584 color:#FFFFFF, fill:#838cc7, stroke:#
|
|
144
155
|
style f6bc847b-868d-43cc-b767-41f5fe3e47d1 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
|
145
156
|
style d48f579f-76d3-4c49-b1b4-575f5645a9d0 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
146
157
|
style f37f3735-28a1-4e03-9ff5-3fe2f137f661 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
|
147
|
-
style fb32bef2-e79f-4893-b500-2e547f24d482 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
158
|
+
style fb32bef2-e79f-4893-b500-2e547f24d482 color:#FFFFFF, fill:#838cc7, stroke:#3079ab`;
|
159
|
+
const {svg} = await mermaid.render('mySvgId', graphDefinition);
|
160
|
+
element.innerHTML = svg.replace(/( )*max-width:( 0-9\.)*px;/i, '');
|
161
|
+
|
162
|
+
var doPan = false;
|
163
|
+
var eventsHandler;
|
164
|
+
var panZoom;
|
165
|
+
var mousepos;
|
166
|
+
|
167
|
+
eventsHandler = {
|
168
|
+
haltEventListeners: ['mousedown', 'mousemove', 'mouseup']
|
169
|
+
|
170
|
+
, mouseDownHandler: function (ev) {
|
171
|
+
if (event.target.className == "[object SVGAnimatedString]") {
|
172
|
+
doPan = true;
|
173
|
+
mousepos = {x: ev.clientX, y: ev.clientY}
|
174
|
+
}
|
175
|
+
;
|
164
176
|
}
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
// Handle controls
|
203
|
-
document.getElementById(`${graph_id}-zoom-in`).addEventListener("click", () => panZoom.zoomIn());
|
204
|
-
document.getElementById(`${graph_id}-zoom-out`).addEventListener("click", () => panZoom.zoomOut());
|
205
|
-
document.getElementById(`${graph_id}-reset`).addEventListener("click", () => {
|
206
|
-
panZoom.resetZoom();
|
207
|
-
panZoom.center();
|
208
|
-
});
|
209
|
-
}, 500);
|
210
|
-
}
|
211
|
-
|
212
|
-
if (typeof mermaid === "undefined") {
|
213
|
-
const script = document.createElement('script');
|
214
|
-
script.src = "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js";
|
215
|
-
script.onload = () => initializeMermaid(graph_id);
|
216
|
-
document.head.appendChild(script);
|
217
|
-
} else {
|
218
|
-
initializeMermaid(graph_id);
|
219
|
-
}
|
220
|
-
});
|
221
|
-
</script>
|
222
|
-
|
177
|
+
|
178
|
+
, mouseMoveHandler: function (ev) {
|
179
|
+
if (doPan) {
|
180
|
+
panZoom.panBy({x: ev.clientX - mousepos.x, y: ev.clientY - mousepos.y});
|
181
|
+
mousepos = {x: ev.clientX, y: ev.clientY};
|
182
|
+
window.getSelection().removeAllRanges();
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
, mouseUpHandler: function (ev) {
|
187
|
+
doPan = false;
|
188
|
+
}
|
189
|
+
|
190
|
+
, init: function (options) {
|
191
|
+
options.svgElement.addEventListener('mousedown', this.mouseDownHandler, false);
|
192
|
+
options.svgElement.addEventListener('mousemove', this.mouseMoveHandler, false);
|
193
|
+
options.svgElement.addEventListener('mouseup', this.mouseUpHandler, false);
|
194
|
+
}
|
195
|
+
|
196
|
+
, destroy: function (options) {
|
197
|
+
options.svgElement.removeEventListener('mousedown', this.mouseDownHandler, false);
|
198
|
+
options.svgElement.removeEventListener('mousemove', this.mouseMoveHandler, false);
|
199
|
+
options.svgElement.removeEventListener('mouseup', this.mouseUpHandler, false);
|
200
|
+
}
|
201
|
+
}
|
202
|
+
panZoom = svgPanZoom('#mySvgId', {
|
203
|
+
zoomEnabled: true
|
204
|
+
, controlIconsEnabled: true
|
205
|
+
, fit: 1
|
206
|
+
, center: 1
|
207
|
+
, customEventsHandler: eventsHandler
|
208
|
+
})
|
209
|
+
};
|
210
|
+
await drawDiagram();
|
211
|
+
</script>
|
212
|
+
</body>
|
213
|
+
|
@@ -245,7 +245,7 @@ pyegeria/full_omag_server_config.py,sha256=CQqLCy_3DZFvJZEOcGf50HWdFaWpiAIs6z-kK
|
|
245
245
|
pyegeria/glossary_browser_omvs.py,sha256=ci57LXFjIAXWw6XXFu8pIbeR_3y4hl_x4F2-HHdy7VM,93585
|
246
246
|
pyegeria/glossary_manager_omvs.py,sha256=GJQo5E3bxv8JL84wTGqJKMrMo7QqNAPtyJJgvGpI_lU,132558
|
247
247
|
pyegeria/m_test.py,sha256=BDKRLsHsAWnwCbzHkkvfsc8ZIJ0k-jmwPPNuTSgW6Qo,7659
|
248
|
-
pyegeria/mermaid_utilities.py,sha256=
|
248
|
+
pyegeria/mermaid_utilities.py,sha256=J9ITzj5tIe8lsQxyr0EcCf8TpioUU3u0UKDmMrwtY68,47116
|
249
249
|
pyegeria/metadata_explorer_omvs.py,sha256=xHnZTQKbd6XwOhYia-RiIisrvZcqHi0SL1l6OCf04Gk,86911
|
250
250
|
pyegeria/my_profile_omvs.py,sha256=d0oJYCJG7pS9BINPuGciVa00ac0jwPHNANXDCLginEc,34720
|
251
251
|
pyegeria/platform_services.py,sha256=xlF5p5HPKDGTFFDsuxm2RLhr8vjZPv4T7e2qCkDgKXE,41654
|
@@ -255,14 +255,14 @@ pyegeria/runtime_manager_omvs.py,sha256=Z5wY9ignNjil8O6yjihZftxkGoh9A4PQDcXhoIsO
|
|
255
255
|
pyegeria/server_operations.py,sha256=vmiUDU_Xa0U8pa0Fdb-QKkoeSqs7WfMwIpG_XU3xgeI,16784
|
256
256
|
pyegeria/solution_architect_omvs.py,sha256=x6CfPTyn1l2DFYVEFP0t_rT9uVjoFr596hBBeuVaMRg,22093
|
257
257
|
pyegeria/template_manager_omvs.py,sha256=PfJ9dOfmBvf59DgRdZ9Dl1Kl_UYqjF-JncXVnbCqLZU,42408
|
258
|
-
pyegeria/test_m.html,sha256=
|
258
|
+
pyegeria/test_m.html,sha256=q9HCstV2Ar-QiAqswte6hQ8EJuKqr5s99MUuXSxs7a8,11461
|
259
259
|
pyegeria/test_m1.html,sha256=XS_1IAtfG4ZlZk45QTkrFWWpjQMVlO21ScDMX2Frl3g,14086
|
260
260
|
pyegeria/test_mer.ipynb,sha256=G7hpHn07IXnt_VKvnTDvljwwHB7RfC0etOMyZKt1icQ,30809
|
261
261
|
pyegeria/utils.py,sha256=GCt1C0bp0Xng1ahzbZhzV9qQwH7Dj93IaCt2dvWb-sg,5417
|
262
262
|
pyegeria/valid_metadata_omvs.py,sha256=kL3bEkoBtNCaQKjziFwRAqQyleu-i2ua_REIogfulFw,65031
|
263
263
|
pyegeria/x_action_author_omvs.py,sha256=6b725SPsC52AI7ols7Qq8MsBlZuAXr_BgJ_-ychVRCw,6386
|
264
|
-
pyegeria-5.3.4.
|
265
|
-
pyegeria-5.3.4.
|
266
|
-
pyegeria-5.3.4.
|
267
|
-
pyegeria-5.3.4.
|
268
|
-
pyegeria-5.3.4.
|
264
|
+
pyegeria-5.3.4.19.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
265
|
+
pyegeria-5.3.4.19.dist-info/METADATA,sha256=j13ebgHIRFpOq5Z_M3g-AKeC1f7Fc5gbc2kMEmay_w0,2736
|
266
|
+
pyegeria-5.3.4.19.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
267
|
+
pyegeria-5.3.4.19.dist-info/entry_points.txt,sha256=LS9g5JPSBL0whnyAcGhLZCAyUp6PkPU6fjHP9Aso1V4,6176
|
268
|
+
pyegeria-5.3.4.19.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|