pyegeria 5.3.4.12__py3-none-any.whl → 5.3.4.14__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 +251 -118
- pyegeria/test_m.html +137 -123
- {pyegeria-5.3.4.12.dist-info → pyegeria-5.3.4.14.dist-info}/METADATA +1 -1
- {pyegeria-5.3.4.12.dist-info → pyegeria-5.3.4.14.dist-info}/RECORD +7 -7
- {pyegeria-5.3.4.12.dist-info → pyegeria-5.3.4.14.dist-info}/LICENSE +0 -0
- {pyegeria-5.3.4.12.dist-info → pyegeria-5.3.4.14.dist-info}/WHEEL +0 -0
- {pyegeria-5.3.4.12.dist-info → pyegeria-5.3.4.14.dist-info}/entry_points.txt +0 -0
pyegeria/mermaid_utilities.py
CHANGED
@@ -226,139 +226,272 @@ def construct_mermaid_html(mermaid_str: str) -> str:
|
|
226
226
|
graph_id = f"mermaid-graph-{guid}"
|
227
227
|
escaped_header = html.escape(title_label) if title_label else "" # Sanitize the header safely
|
228
228
|
escaped_mermaid_code = html.escape(mermaid_code)
|
229
|
+
header_html = f"""
|
230
|
+
<h3 id="{graph_id}-heading" style="margin: 20px 0; font-size: 1.5em; text-align: center;">
|
231
|
+
{escaped_header}
|
232
|
+
</h3>
|
233
|
+
<p id="{graph_id}-subheading" style="margin: 0; padding: 5px; font-size: 1em; text-align: center; color: gray; flex: 0 0 auto;">
|
234
|
+
GUID: {guid}
|
235
|
+
</p>
|
236
|
+
""" if title_label else ""
|
229
237
|
|
230
238
|
html_content = f"""
|
231
|
-
<style>
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
}}
|
241
|
-
|
242
|
-
/* Style for zoom controls */
|
243
|
-
.svg-pan-zoom_controls {{
|
244
|
-
position: absolute;
|
245
|
-
top: 10px;
|
246
|
-
right: 10px;
|
247
|
-
display: flex;
|
248
|
-
flex-direction: column;
|
249
|
-
gap: 5px;
|
250
|
-
}}
|
251
|
-
.svg-pan-zoom_controls button {{
|
252
|
-
background-color: #007bff;
|
253
|
-
color: white;
|
254
|
-
border: none;
|
255
|
-
padding: 5px 10px;
|
256
|
-
border-radius: 3px;
|
257
|
-
cursor: pointer;
|
258
|
-
font-size: 14px;
|
259
|
-
}}
|
260
|
-
.svg-pan-zoom_controls button:hover {{
|
261
|
-
background-color: #0056b3;
|
262
|
-
}}
|
263
|
-
</style>
|
264
|
-
|
265
|
-
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
266
|
-
<script>
|
267
|
-
document.addEventListener("DOMContentLoaded", () => {{
|
268
|
-
// Define graph ID dynamically passed via Python
|
269
|
-
const graph_id = "{graph_id}";
|
270
|
-
|
271
|
-
// Function to load external scripts dynamically
|
272
|
-
function loadScript(url, callback) {{
|
273
|
-
const script = document.createElement('script');
|
274
|
-
script.src = url;
|
275
|
-
script.async = true;
|
276
|
-
script.onload = callback;
|
277
|
-
script.onerror = () => console.error("Error loading script:", url);
|
278
|
-
document.head.appendChild(script);
|
239
|
+
<style>
|
240
|
+
/* Style the diagram container */
|
241
|
+
.diagram-container {{
|
242
|
+
position: relative;
|
243
|
+
width: 90%; /* Adjust container width */
|
244
|
+
height: 500px; /* Fixed height */
|
245
|
+
margin: 0 auto;
|
246
|
+
border: 1px solid #ccc;
|
247
|
+
overflow: hidden; /* Prevents content overflow */
|
279
248
|
}}
|
280
249
|
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
250
|
+
/* Style custom zoom controls */
|
251
|
+
.svg-pan-zoom-controls {{
|
252
|
+
position: absolute;
|
253
|
+
top: 10px;
|
254
|
+
right: 10px;
|
255
|
+
display: flex;
|
256
|
+
flex-direction: column;
|
257
|
+
gap: 5px;
|
258
|
+
z-index: 10; /* Ensures controls are above other elements */
|
259
|
+
}}
|
289
260
|
|
290
|
-
|
291
|
-
|
292
|
-
|
261
|
+
.svg-pan-zoom-controls button {{
|
262
|
+
background-color: #007bff;
|
263
|
+
color: white;
|
264
|
+
border: none;
|
265
|
+
padding: 5px 10px;
|
266
|
+
border-radius: 3px;
|
267
|
+
cursor: pointer;
|
268
|
+
font-size: 14px;
|
269
|
+
}}
|
270
|
+
.svg-pan-zoom-controls button:hover {{
|
271
|
+
background-color: #0056b3;
|
272
|
+
}}
|
273
|
+
</style>
|
274
|
+
|
275
|
+
<div id="{graph_id}-container" class="diagram-container">
|
276
|
+
<!-- Title/Heading (optional; include as needed) -->
|
277
|
+
{header_html}
|
278
|
+
<!-- Mermaid rendering area -->
|
279
|
+
<div id="{graph_id}" class="mermaid">
|
280
|
+
{mermaid_code}
|
281
|
+
</div>
|
282
|
+
</div>
|
283
|
+
|
284
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
285
|
+
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
293
286
|
|
294
|
-
|
295
|
-
|
287
|
+
<script>
|
288
|
+
(function() {{
|
289
|
+
const graph_id = "{graph_id}";
|
290
|
+
let panZoomInstance; // Store reference to the panZoom instance
|
296
291
|
|
297
|
-
|
298
|
-
|
299
|
-
|
292
|
+
// Function to initialize Mermaid
|
293
|
+
function initializeMermaid(graph_id) {{
|
294
|
+
const container = document.getElementById(`${{graph_id}}-container`);
|
295
|
+
const diagram = document.getElementById(`${{graph_id}}`);
|
296
|
+
|
297
|
+
if (!container || !diagram) {{
|
298
|
+
console.error(`Container or diagram not found for ID "${{graph_id}}"`);
|
300
299
|
return;
|
301
300
|
}}
|
302
301
|
|
303
|
-
//
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
//
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
302
|
+
// Initialize Mermaid
|
303
|
+
mermaid.initialize({{ startOnLoad: false }});
|
304
|
+
mermaid.init(undefined, diagram);
|
305
|
+
|
306
|
+
// Set a small delay to allow Mermaid rendering to complete before initializing Pan-Zoom
|
307
|
+
setTimeout(() => {{
|
308
|
+
const svg = container.querySelector("svg");
|
309
|
+
if (!svg) {{
|
310
|
+
console.error(`SVG not found for graph ID "${{graph_id}}"`);
|
311
|
+
return;
|
312
|
+
}}
|
313
|
+
|
314
|
+
// Force the SVG to fit the container by setting width, height, and viewBox
|
315
|
+
svg.setAttribute("width", "100%");
|
316
|
+
svg.setAttribute("height", "100%");
|
317
|
+
svg.setAttribute("preserveAspectRatio", "xMidYMid meet");
|
318
|
+
svg.style.display = "block";
|
319
|
+
|
320
|
+
if (!svg.hasAttribute("viewBox")) {{
|
321
|
+
const bbox = svg.getBBox();
|
322
|
+
svg.setAttribute("viewBox", `0 0 ${{bbox.width}} ${{bbox.height}}`);
|
323
|
+
}}
|
324
|
+
|
325
|
+
// Initialize Pan-Zoom functionality
|
326
|
+
panZoomInstance = svgPanZoom(svg, {{
|
327
|
+
zoomEnabled: true,
|
328
|
+
controlIconsEnabled: false, // Use custom controls
|
329
|
+
fit: true,
|
330
|
+
center: true,
|
331
|
+
contain: true,
|
332
|
+
minZoom: 0.5,
|
333
|
+
maxZoom: 10
|
334
|
+
}});
|
335
|
+
|
336
|
+
// Add custom controls
|
337
|
+
const controlsContainer = document.createElement("div");
|
338
|
+
controlsContainer.className = "svg-pan-zoom-controls";
|
339
|
+
controlsContainer.innerHTML = `
|
340
|
+
<button type="button" id="${{graph_id}}-zoom-in">+</button>
|
341
|
+
<button type="button" id="${{graph_id}}-zoom-out">-</button>
|
342
|
+
<button type="button" id="${{graph_id}}-reset">Reset</button>
|
343
|
+
`;
|
344
|
+
container.appendChild(controlsContainer);
|
345
|
+
|
346
|
+
// Add event listeners for the controls
|
347
|
+
document.getElementById(`${{graph_id}}-zoom-in`).addEventListener("click", () => {{
|
348
|
+
if (panZoomInstance) panZoomInstance.zoomIn();
|
349
|
+
}});
|
350
|
+
document.getElementById(`${{graph_id}}-zoom-out`).addEventListener("click", () => {{
|
351
|
+
if (panZoomInstance) panZoomInstance.zoomOut();
|
352
|
+
}});
|
353
|
+
document.getElementById(`${{graph_id}}-reset`).addEventListener("click", () => {{
|
354
|
+
if (panZoomInstance) {{
|
355
|
+
panZoomInstance.resetZoom();
|
356
|
+
panZoomInstance.center();
|
357
|
+
}}
|
358
|
+
}});
|
359
|
+
}}, 500); // Delay of 500ms for Mermaid and SVG rendering
|
360
|
+
}}
|
340
361
|
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
362
|
+
// Load Mermaid.js if not already loaded
|
363
|
+
if (typeof mermaid === "undefined") {{
|
364
|
+
const script = document.createElement("script");
|
365
|
+
script.src = "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js";
|
366
|
+
script.onload = () => initializeMermaid(graph_id);
|
367
|
+
document.head.appendChild(script);
|
368
|
+
}} else {{
|
345
369
|
initializeMermaid(graph_id);
|
346
|
-
}}
|
347
|
-
}}
|
348
|
-
|
349
|
-
|
350
|
-
}});
|
351
|
-
</script>
|
370
|
+
}}
|
371
|
+
}})();
|
372
|
+
</script>
|
373
|
+
"""
|
352
374
|
|
353
|
-
<div id="{graph_id}-container" class="diagram-container">
|
354
|
-
<!-- Mermaid diagram will be dynamically rendered here -->
|
355
|
-
<div id="{graph_id}" class="mermaid">
|
356
|
-
{mermaid_code}
|
357
|
-
</div>
|
358
|
-
</div>
|
359
|
-
"""
|
360
375
|
|
361
376
|
return html_content
|
377
|
+
|
378
|
+
# html_content = f"""
|
379
|
+
# <style>
|
380
|
+
# /* Style for the diagram container */
|
381
|
+
# .diagram-container {{
|
382
|
+
# position: relative;
|
383
|
+
# width: 100%; /* Adjust the diagram container width */
|
384
|
+
# height: 500px; /* Set a fixed height for the container */
|
385
|
+
# margin: 0 auto;
|
386
|
+
# border: 1px solid #ccc; /* Optional border for visualization */
|
387
|
+
# overflow: hidden; /* Prevent content overflow outside the container */
|
388
|
+
# }}
|
389
|
+
#
|
390
|
+
# /* Style for zoom controls */
|
391
|
+
# .svg-pan-zoom_controls {{
|
392
|
+
# position: absolute;
|
393
|
+
# top: 10px;
|
394
|
+
# right: 10px;
|
395
|
+
# display: flex;
|
396
|
+
# flex-direction: column;
|
397
|
+
# gap: 5px;
|
398
|
+
# }}
|
399
|
+
# .svg-pan-zoom_controls button {{
|
400
|
+
# background-color: #007bff;
|
401
|
+
# color: white;
|
402
|
+
# border: none;
|
403
|
+
# padding: 5px 10px;
|
404
|
+
# border-radius: 3px;
|
405
|
+
# cursor: pointer;
|
406
|
+
# font-size: 14px;
|
407
|
+
# }}
|
408
|
+
# .svg-pan-zoom_controls button:hover {{
|
409
|
+
# background-color: #0056b3;
|
410
|
+
# }}
|
411
|
+
# </style>
|
412
|
+
#
|
413
|
+
# <div id="{graph_id}-container" class="diagram-container">
|
414
|
+
# <!-- Mermaid diagram will be dynamically rendered here -->
|
415
|
+
# <div id="{graph_id}" class="mermaid">
|
416
|
+
# {mermaid_code}
|
417
|
+
# </div>
|
418
|
+
# </div>
|
419
|
+
#
|
420
|
+
# <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
421
|
+
# <script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
422
|
+
# <script>
|
423
|
+
# document.addEventListener("DOMContentLoaded", () => {{
|
424
|
+
# // Initialize Mermaid and Pan-Zoom functionality
|
425
|
+
# const graph_id = "{graph_id}";
|
426
|
+
#
|
427
|
+
# function initializeMermaid(graph_id) {{
|
428
|
+
# const containerElement = document.getElementById(`${{graph_id}}-container`);
|
429
|
+
#
|
430
|
+
# if (!containerElement) {{
|
431
|
+
# console.error(`Container with ID "${{graph_id}}-container" not found.`);
|
432
|
+
# return;
|
433
|
+
# }}
|
434
|
+
#
|
435
|
+
# // Configure Mermaid
|
436
|
+
# mermaid.initialize({{ startOnLoad: false, logLevel: "debug" }});
|
437
|
+
# mermaid.init(undefined, `#${{graph_id}}`);
|
438
|
+
#
|
439
|
+
# setTimeout(() => {{
|
440
|
+
# const svg = containerElement.querySelector("svg");
|
441
|
+
# if (!svg) {{
|
442
|
+
# console.error(`SVG not rendered for ID "${{graph_id}}".`);
|
443
|
+
# return;
|
444
|
+
# }}
|
445
|
+
#
|
446
|
+
# // Set initial size
|
447
|
+
# svg.setAttribute("width", "100%");
|
448
|
+
# svg.setAttribute("height", "100%");
|
449
|
+
#
|
450
|
+
# // Initialize Pan-Zoom
|
451
|
+
# const panZoom = svgPanZoom(svg, {{
|
452
|
+
# zoomEnabled: true,
|
453
|
+
# controlIconsEnabled: false,
|
454
|
+
# fit: true,
|
455
|
+
# center: true,
|
456
|
+
# minZoom: 0.5,
|
457
|
+
# maxZoom: 10,
|
458
|
+
# contain: true
|
459
|
+
# }});
|
460
|
+
#
|
461
|
+
# // Add custom controls
|
462
|
+
# const controlsContainer = document.createElement("div");
|
463
|
+
# controlsContainer.className = "svg-pan-zoom_controls";
|
464
|
+
# controlsContainer.innerHTML = `
|
465
|
+
# <button id="${{graph_id}}-zoom-in">+</button>
|
466
|
+
# <button id="${{graph_id}}-zoom-out">-</button>
|
467
|
+
# <button id="${{graph_id}}-reset">Reset</button>
|
468
|
+
# `;
|
469
|
+
# containerElement.appendChild(controlsContainer);
|
470
|
+
#
|
471
|
+
# // Handle controls
|
472
|
+
# document.getElementById(`${{graph_id}}-zoom-in`).addEventListener("click", () => panZoom.zoomIn());
|
473
|
+
# document.getElementById(`${{graph_id}}-zoom-out`).addEventListener("click", () => panZoom.zoomOut());
|
474
|
+
# document.getElementById(`${{graph_id}}-reset`).addEventListener("click", () => {{
|
475
|
+
# panZoom.resetZoom();
|
476
|
+
# panZoom.center();
|
477
|
+
# }});
|
478
|
+
# }}, 500);
|
479
|
+
# }}
|
480
|
+
#
|
481
|
+
# if (typeof mermaid === "undefined") {{
|
482
|
+
# const script = document.createElement('script');
|
483
|
+
# script.src = "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js";
|
484
|
+
# script.onload = () => initializeMermaid(graph_id);
|
485
|
+
# document.head.appendChild(script);
|
486
|
+
# }} else {{
|
487
|
+
# initializeMermaid(graph_id);
|
488
|
+
# }}
|
489
|
+
# }});
|
490
|
+
# </script>
|
491
|
+
#
|
492
|
+
# """
|
493
|
+
#
|
494
|
+
# return html_content
|
362
495
|
# This one almost works - no controls and diagram too small
|
363
496
|
# html_content = f"""
|
364
497
|
# <!DOCTYPE html>
|
pyegeria/test_m.html
CHANGED
@@ -1,130 +1,53 @@
|
|
1
1
|
|
2
|
-
<style>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
/* Style for zoom controls */
|
14
|
-
.svg-pan-zoom_controls {
|
15
|
-
position: absolute;
|
16
|
-
top: 10px;
|
17
|
-
right: 10px;
|
18
|
-
display: flex;
|
19
|
-
flex-direction: column;
|
20
|
-
gap: 5px;
|
21
|
-
}
|
22
|
-
.svg-pan-zoom_controls button {
|
23
|
-
background-color: #007bff;
|
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>
|
35
|
-
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
37
|
-
<script>
|
38
|
-
document.addEventListener("DOMContentLoaded", () => {
|
39
|
-
// Define graph ID dynamically passed via Python
|
40
|
-
const graph_id = "mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef";
|
41
|
-
|
42
|
-
// Function to load external scripts dynamically
|
43
|
-
function loadScript(url, callback) {
|
44
|
-
const script = document.createElement('script');
|
45
|
-
script.src = url;
|
46
|
-
script.async = true;
|
47
|
-
script.onload = callback;
|
48
|
-
script.onerror = () => console.error("Error loading script:", url);
|
49
|
-
document.head.appendChild(script);
|
2
|
+
<style>
|
3
|
+
/* Style the diagram container */
|
4
|
+
.diagram-container {
|
5
|
+
position: relative;
|
6
|
+
width: 90%; /* Adjust container width */
|
7
|
+
height: 500px; /* Fixed height */
|
8
|
+
margin: 0 auto;
|
9
|
+
border: 1px solid #ccc;
|
10
|
+
overflow: hidden; /* Prevents content overflow */
|
50
11
|
}
|
51
12
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
// Configure Mermaid
|
62
|
-
mermaid.initialize({ startOnLoad: false, logLevel: "debug" });
|
63
|
-
mermaid.init(undefined, `#${graph_id}`);
|
64
|
-
|
65
|
-
setTimeout(() => {
|
66
|
-
const svg = containerElement.querySelector("svg");
|
67
|
-
|
68
|
-
// Ensure SVG exists
|
69
|
-
if (!svg) {
|
70
|
-
console.error(`SVG not rendered for ID "${graph_id}".`);
|
71
|
-
return;
|
72
|
-
}
|
73
|
-
|
74
|
-
// Set initial size for SVG
|
75
|
-
svg.setAttribute("width", "100%");
|
76
|
-
svg.setAttribute("height", "100%");
|
77
|
-
|
78
|
-
// Ensure the container fits the diagram properly
|
79
|
-
containerElement.style.overflow = "hidden";
|
80
|
-
|
81
|
-
// Initialize Pan-Zoom
|
82
|
-
const panZoom = svgPanZoom(svg, {
|
83
|
-
zoomEnabled: true,
|
84
|
-
controlIconsEnabled: false, // Disable default controls
|
85
|
-
fit: true,
|
86
|
-
center: true,
|
87
|
-
minZoom: 0.5,
|
88
|
-
maxZoom: 10,
|
89
|
-
contain: true // Ensure diagram stays within view
|
90
|
-
});
|
91
|
-
|
92
|
-
// Add custom controls
|
93
|
-
const controlsContainer = document.createElement("div");
|
94
|
-
controlsContainer.className = "svg-pan-zoom_controls";
|
95
|
-
controlsContainer.innerHTML = `
|
96
|
-
<button id="${graph_id}-zoom-in">+</button>
|
97
|
-
<button id="${graph_id}-zoom-out">-</button>
|
98
|
-
<button id="${graph_id}-reset">Reset</button>
|
99
|
-
`;
|
100
|
-
containerElement.appendChild(controlsContainer);
|
101
|
-
|
102
|
-
// Handle controls
|
103
|
-
document.getElementById(`${graph_id}-zoom-in`).addEventListener("click", () => panZoom.zoomIn());
|
104
|
-
document.getElementById(`${graph_id}-zoom-out`).addEventListener("click", () => panZoom.zoomOut());
|
105
|
-
document.getElementById(`${graph_id}-reset`).addEventListener("click", () => {
|
106
|
-
panZoom.resetZoom();
|
107
|
-
panZoom.center();
|
108
|
-
});
|
109
|
-
}, 500); // Delay to ensure Mermaid finishes rendering
|
13
|
+
/* Style custom zoom controls */
|
14
|
+
.svg-pan-zoom-controls {
|
15
|
+
position: absolute;
|
16
|
+
top: 10px;
|
17
|
+
right: 10px;
|
18
|
+
display: flex;
|
19
|
+
flex-direction: column;
|
20
|
+
gap: 5px;
|
21
|
+
z-index: 10; /* Ensures controls are above other elements */
|
110
22
|
}
|
111
23
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
24
|
+
.svg-pan-zoom-controls button {
|
25
|
+
background-color: #007bff;
|
26
|
+
color: white;
|
27
|
+
border: none;
|
28
|
+
padding: 5px 10px;
|
29
|
+
border-radius: 3px;
|
30
|
+
cursor: pointer;
|
31
|
+
font-size: 14px;
|
120
32
|
}
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
<div id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef" class="
|
127
|
-
|
33
|
+
.svg-pan-zoom-controls button:hover {
|
34
|
+
background-color: #0056b3;
|
35
|
+
}
|
36
|
+
</style>
|
37
|
+
|
38
|
+
<div id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef-container" class="diagram-container">
|
39
|
+
<!-- Title/Heading (optional; include as needed) -->
|
40
|
+
|
41
|
+
<h3 id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef-heading" style="margin: 20px 0; font-size: 1.5em; text-align: center;">
|
42
|
+
Component for Solution Blueprint - Clinical Trial Management Solution Blueprint
|
43
|
+
</h3>
|
44
|
+
<p id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef-subheading" style="margin: 0; padding: 5px; font-size: 1em; text-align: center; color: gray; flex: 0 0 auto;">
|
45
|
+
GUID: c4f8d707-7c85-4125-b5fd-c3257a2ef2ef
|
46
|
+
</p>
|
47
|
+
|
48
|
+
<!-- Mermaid rendering area -->
|
49
|
+
<div id="mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef" class="mermaid">
|
50
|
+
flowchart TD
|
128
51
|
%%{init: {"flowchart": {"htmlLabels": false}} }%%
|
129
52
|
|
130
53
|
subgraph c4f8d707-7c85-4125-b5fd-c3257a2ef2ef [Components and Actors]
|
@@ -224,6 +147,97 @@ style b5c8da4c-f925-4cf1-8294-e43cd2c1a584 color:#FFFFFF, fill:#838cc7, stroke:#
|
|
224
147
|
style f6bc847b-868d-43cc-b767-41f5fe3e47d1 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
|
225
148
|
style d48f579f-76d3-4c49-b1b4-575f5645a9d0 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
226
149
|
style f37f3735-28a1-4e03-9ff5-3fe2f137f661 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
|
227
|
-
style fb32bef2-e79f-4893-b500-2e547f24d482 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
150
|
+
style fb32bef2-e79f-4893-b500-2e547f24d482 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
|
151
|
+
</div>
|
228
152
|
</div>
|
229
|
-
|
153
|
+
|
154
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
155
|
+
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
156
|
+
|
157
|
+
<script>
|
158
|
+
(function() {
|
159
|
+
const graph_id = "mermaid-graph-c4f8d707-7c85-4125-b5fd-c3257a2ef2ef";
|
160
|
+
let panZoomInstance; // Store reference to the panZoom instance
|
161
|
+
|
162
|
+
// Function to initialize Mermaid
|
163
|
+
function initializeMermaid(graph_id) {
|
164
|
+
const container = document.getElementById(`${graph_id}-container`);
|
165
|
+
const diagram = document.getElementById(`${graph_id}`);
|
166
|
+
|
167
|
+
if (!container || !diagram) {
|
168
|
+
console.error(`Container or diagram not found for ID "${graph_id}"`);
|
169
|
+
return;
|
170
|
+
}
|
171
|
+
|
172
|
+
// Initialize Mermaid
|
173
|
+
mermaid.initialize({ startOnLoad: false });
|
174
|
+
mermaid.init(undefined, diagram);
|
175
|
+
|
176
|
+
// Set a small delay to allow Mermaid rendering to complete before initializing Pan-Zoom
|
177
|
+
setTimeout(() => {
|
178
|
+
const svg = container.querySelector("svg");
|
179
|
+
if (!svg) {
|
180
|
+
console.error(`SVG not found for graph ID "${graph_id}"`);
|
181
|
+
return;
|
182
|
+
}
|
183
|
+
|
184
|
+
// Force the SVG to fit the container by setting width, height, and viewBox
|
185
|
+
svg.setAttribute("width", "100%");
|
186
|
+
svg.setAttribute("height", "100%");
|
187
|
+
svg.setAttribute("preserveAspectRatio", "xMidYMid meet");
|
188
|
+
svg.style.display = "block";
|
189
|
+
|
190
|
+
if (!svg.hasAttribute("viewBox")) {
|
191
|
+
const bbox = svg.getBBox();
|
192
|
+
svg.setAttribute("viewBox", `0 0 ${bbox.width} ${bbox.height}`);
|
193
|
+
}
|
194
|
+
|
195
|
+
// Initialize Pan-Zoom functionality
|
196
|
+
panZoomInstance = svgPanZoom(svg, {
|
197
|
+
zoomEnabled: true,
|
198
|
+
controlIconsEnabled: false, // Use custom controls
|
199
|
+
fit: true,
|
200
|
+
center: true,
|
201
|
+
contain: true,
|
202
|
+
minZoom: 0.5,
|
203
|
+
maxZoom: 10
|
204
|
+
});
|
205
|
+
|
206
|
+
// Add custom controls
|
207
|
+
const controlsContainer = document.createElement("div");
|
208
|
+
controlsContainer.className = "svg-pan-zoom-controls";
|
209
|
+
controlsContainer.innerHTML = `
|
210
|
+
<button type="button" id="${graph_id}-zoom-in">+</button>
|
211
|
+
<button type="button" id="${graph_id}-zoom-out">-</button>
|
212
|
+
<button type="button" id="${graph_id}-reset">Reset</button>
|
213
|
+
`;
|
214
|
+
container.appendChild(controlsContainer);
|
215
|
+
|
216
|
+
// Add event listeners for the controls
|
217
|
+
document.getElementById(`${graph_id}-zoom-in`).addEventListener("click", () => {
|
218
|
+
if (panZoomInstance) panZoomInstance.zoomIn();
|
219
|
+
});
|
220
|
+
document.getElementById(`${graph_id}-zoom-out`).addEventListener("click", () => {
|
221
|
+
if (panZoomInstance) panZoomInstance.zoomOut();
|
222
|
+
});
|
223
|
+
document.getElementById(`${graph_id}-reset`).addEventListener("click", () => {
|
224
|
+
if (panZoomInstance) {
|
225
|
+
panZoomInstance.resetZoom();
|
226
|
+
panZoomInstance.center();
|
227
|
+
}
|
228
|
+
});
|
229
|
+
}, 500); // Delay of 500ms for Mermaid and SVG rendering
|
230
|
+
}
|
231
|
+
|
232
|
+
// Load Mermaid.js if not already loaded
|
233
|
+
if (typeof mermaid === "undefined") {
|
234
|
+
const script = document.createElement("script");
|
235
|
+
script.src = "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js";
|
236
|
+
script.onload = () => initializeMermaid(graph_id);
|
237
|
+
document.head.appendChild(script);
|
238
|
+
} else {
|
239
|
+
initializeMermaid(graph_id);
|
240
|
+
}
|
241
|
+
})();
|
242
|
+
</script>
|
243
|
+
|
@@ -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=hDLpCOmLDsh9gkqmx2jTEXRjUGYgN3wkkWzpmiN-HoA,40281
|
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=equ-hAZ8yn8g5pzzmslQaO_k75GWaWg9OxeHpCBG_4U,13531
|
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.14.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
265
|
+
pyegeria-5.3.4.14.dist-info/METADATA,sha256=FftxyngR6Meq7NLfYJODC0jOAA3LLqja0sulciEPzcs,2736
|
266
|
+
pyegeria-5.3.4.14.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
267
|
+
pyegeria-5.3.4.14.dist-info/entry_points.txt,sha256=LS9g5JPSBL0whnyAcGhLZCAyUp6PkPU6fjHP9Aso1V4,6176
|
268
|
+
pyegeria-5.3.4.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|