pyegeria 5.3.4.5__py3-none-any.whl → 5.3.4.6__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.
@@ -233,185 +233,107 @@ def construct_mermaid_html(mermaid_str: str) -> str:
233
233
 
234
234
  graph_id = title_label.replace(" ", "_")
235
235
  escaped_header = html.escape(title_label) if title_label else "" # Sanitize the header safely
236
+ escaped_mermaid_code = html.escape(mermaid_code)
236
237
 
237
- header_html = f"<h2 class='diagram-header'>{escaped_header}</h2>\nGUID: {guid}" if title_label else ""
238
+ header_html = f"<h2 class='diagram-header'>{escaped_header}</h2>\nGUID: {guid}" if {title_label} else ""
238
239
 
239
240
  # Construct the HTML content with Mermaid.js initialization and zoom/pan support
240
241
  mermaid_html = f"""
241
- <!DOCTYPE html>
242
- <html lang="en">
243
- <head>
244
- <meta charset="UTF-8">
245
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
246
- <title>Mermaid Diagram with Centered Pan and Zoom</title>
247
- <!-- Load Mermaid.js -->
248
- <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
249
- <style>
250
- body {{
251
- font-family: Arial, sans-serif;
252
- background-color: #f4f4f4;
253
- margin: 0;
254
- padding: 0;
255
- display: flex;
256
- justify-content: center;
257
- align-items: center;
258
- height: 100vh;
259
- }}
260
- .diagram-container {{
261
- width: 90%;
262
- max-width: 800px;
263
- padding: 20px;
264
- border: 1px solid #ddd;
265
- border-radius: 12px;
266
- background-color: white;
267
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
268
- text-align: center;
269
- position: relative;
270
- }}
271
- .diagram-header {{
272
- margin-bottom: 20px;
273
- font-size: 1.8rem;
274
- font-weight: bold;
275
- color: #007acc;
276
- }}
277
- .pan-zoom-container {{
278
- position: relative;
279
- width: 100%;
280
- height: 500px;
281
- overflow: hidden;
282
- border: 1px solid #ccc;
283
- background-color: #f9f9f9;
284
- cursor: grab;
285
- }}
286
- .pan-zoom-content {{
287
- position: absolute;
288
- transform-origin: 0 0;
289
- cursor: grab;
290
- }}
291
- .pan-zoom-content:active {{
292
- cursor: grabbing;
293
- }}
294
- </style>
295
- </head>
296
- <body>
297
- <div class="diagram-container">
298
- {header_html}
299
- <div class="pan-zoom-container">
300
- <div id="{graph_id}" class="mermaid pan-zoom-content">
301
- {mermaid_code}
302
- </div>
242
+ <div class="diagram-container" style="width: 90%; max-width: 800px; margin: auto; padding: 20px; background: white; border: 1px solid #ddd; border-radius: 12px; position: relative;">
243
+ {header_html}
244
+ <div class="pan-zoom-container" style="width: 100%; height: 500px; overflow: hidden; position: relative; background: #f9f9f9; border: 1px solid #ccc; cursor: grab;">
245
+ <div id="{graph_id}" class="mermaid pan-zoom-content" style="position: absolute; transform-origin: 0 0; cursor: grab;">
246
+ {escaped_mermaid_code}
303
247
  </div>
304
248
  </div>
249
+ </div>
250
+ <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
251
+ <script>
252
+ // Initialize Mermaid.js and set up pan/zoom
253
+ mermaid.initialize({{ startOnLoad: true }});
254
+
255
+ const container = document.querySelector('.pan-zoom-container');
256
+ const content = document.querySelector('.pan-zoom-content');
257
+ const rect = content.getBoundingClientRect();
258
+
259
+ let scale = 1; // Current zoom level
260
+ let panX = 0; // X-axis pan offset
261
+ let panY = 0; // Y-axis pan offset
262
+ let isDragging = false;
263
+ let startX, startY;
264
+
265
+ // Helper: Apply transformations
266
+ const applyTransform = () => {{
267
+ content.style.transform = `translate(${{panX}}px, ${{panY}}px) scale(${{scale}})`;
268
+ }};
269
+
270
+ // Helper: Center the diagram and fit it to the container
271
+ const centerAndFitDiagram = () => {{
272
+ const containerRect = container.getBoundingClientRect();
273
+ const rect = content.getBoundingClientRect();
274
+
275
+ scale = Math.min(
276
+ containerRect.width / rect.width,
277
+ containerRect.height / rect.height
278
+ );
279
+
280
+ panX = (containerRect.width - rect.width * scale) / 2;
281
+ panY = (containerRect.height - rect.height * scale) / 2;
282
+
283
+ applyTransform();
284
+ console.log("Diagram centered and fitted.");
285
+ }};
286
+
287
+ // Add zoom functionality
288
+ container.addEventListener('wheel', function(event) {{
289
+ event.preventDefault();
290
+ const zoomSpeed = 0.1;
291
+ const previousScale = scale;
292
+
293
+ if (event.deltaY < 0) {{
294
+ scale = Math.min(scale + zoomSpeed, 4);
295
+ }} else {{
296
+ scale = Math.max(scale - zoomSpeed, 0.5);
297
+ }}
305
298
 
306
- <script>
307
- document.addEventListener("DOMContentLoaded", function() {{
308
- // Initialize Mermaid.js
309
- console.log("Initializing Mermaid...");
310
- mermaid.initialize({{ startOnLoad: true }});
311
-
312
- const container = document.querySelector('.pan-zoom-container');
313
- const content = document.querySelector('.pan-zoom-content');
314
- let rect; // Bounding box of the rendered diagram
315
- let scale = 1; // Current zoom level
316
- let panX = 0; // Pan offset in X direction
317
- let panY = 0; // Pan offset in Y direction
318
- let isDragging = false;
319
- let startX, startY;
320
-
321
- // Helper: Apply transformations
322
- const applyTransform = () => {{
323
- content.style.transform = `translate(${{panX}}px, ${{panY}}px) scale(${{scale}})`;
324
- }};
325
-
326
- // Helper: Center the diagram and fit it to the container
327
- const centerAndFitDiagram = () => {{
328
- rect = content.getBoundingClientRect();
329
- const containerRect = container.getBoundingClientRect();
330
-
331
- // Calculate the required scale to fit the diagram
332
- scale = Math.min(
333
- containerRect.width / rect.width,
334
- containerRect.height / rect.height
335
- );
336
-
337
- // Adjust pan to center the diagram
338
- panX = (containerRect.width - rect.width * scale) / 2;
339
- panY = (containerRect.height - rect.height * scale) / 2;
340
-
341
- applyTransform();
342
- console.log("Diagram centered and fitted to container.");
343
- }};
344
-
345
- // Add pan/zoom functionality
346
- const zoomCenteredOnDiagram = (event, deltaZoom) => {{
347
- rect = content.getBoundingClientRect();
348
- const containerRect = container.getBoundingClientRect();
349
-
350
- // Center of the diagram
351
- const diagramCenterX = rect.left + rect.width / 2;
352
- const diagramCenterY = rect.top + rect.height / 2;
353
-
354
- const zoomX = (diagramCenterX - containerRect.left) * deltaZoom;
355
- const zoomY = (diagramCenterY - containerRect.top) * deltaZoom;
356
-
357
- panX -= zoomX;
358
- panY -= zoomY;
359
- }};
360
-
361
- container.addEventListener('wheel', function(event) {{
362
- event.preventDefault();
363
- const zoomSpeed = 0.1;
364
- const previousScale = scale;
365
-
366
- // Zoom in or out
367
- if (event.deltaY < 0) {{
368
- scale = Math.min(scale + zoomSpeed, 4); // Limit zoom-in
369
- }} else {{
370
- scale = Math.max(scale - zoomSpeed, 0.5); // Limit zoom-out
371
- }}
372
-
373
- // Calculate deltaZoom and adjust pan
374
- const deltaZoom = scale / previousScale - 1;
375
- zoomCenteredOnDiagram(event, deltaZoom);
376
-
377
- applyTransform();
378
- }});
379
-
380
- container.addEventListener('mousedown', function(event) {{
381
- isDragging = true;
382
- startX = event.clientX - panX;
383
- startY = event.clientY - panY;
384
- container.style.cursor = "grabbing";
385
- }});
386
-
387
- container.addEventListener('mousemove', function(event) {{
388
- if (!isDragging) return;
389
-
390
- panX = event.clientX - startX;
391
- panY = event.clientY - startY;
392
-
393
- applyTransform();
394
- }});
395
-
396
- container.addEventListener('mouseup', function() {{
397
- isDragging = false;
398
- container.style.cursor = "grab";
399
- }});
400
-
401
- container.addEventListener('mouseleave', function() {{
402
- isDragging = false;
403
- container.style.cursor = "grab";
404
- }});
405
-
406
- // Ensure Mermaid renders the diagram, then fit and center it
407
- setTimeout(centerAndFitDiagram, 100); // Delay to ensure Mermaid.js rendering is complete
408
- }});
409
- </script>
410
- </body>
411
- </html>
412
- """
299
+ const zoomRatio = scale / previousScale;
300
+ panX -= (event.clientX - container.getBoundingClientRect().left) * (zoomRatio - 1);
301
+ panY -= (event.clientY - container.getBoundingClientRect().top) * (zoomRatio - 1);
413
302
 
303
+ applyTransform();
304
+ }});
414
305
 
306
+ // Add drag functionality for panning
307
+ container.addEventListener('mousedown', function(event) {{
308
+ isDragging = true;
309
+ startX = event.clientX - panX;
310
+ startY = event.clientY - panY;
311
+ container.style.cursor = "grabbing";
312
+ }});
313
+
314
+ container.addEventListener('mousemove', function(event) {{
315
+ if (!isDragging) return;
316
+
317
+ panX = event.clientX - startX;
318
+ panY = event.clientY - startY;
319
+
320
+ applyTransform();
321
+ }});
322
+
323
+ container.addEventListener('mouseup', function() {{
324
+ isDragging = false;
325
+ container.style.cursor = "grab";
326
+ }});
327
+
328
+ container.addEventListener('mouseleave', function() {{
329
+ isDragging = false;
330
+ container.style.cursor = "grab";
331
+ }});
332
+
333
+ // Center diagram after rendering by Mermaid
334
+ setTimeout(centerAndFitDiagram, 200);
335
+ </script>
336
+ """
415
337
 
416
338
  return mermaid_html
417
339
 
pyegeria/test_m.html CHANGED
@@ -1,140 +1,84 @@
1
1
 
2
- <!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Mermaid Diagram with Centered Pan and Zoom</title>
8
- <!-- Load Mermaid.js -->
9
- <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
10
- <style>
11
- body {
12
- font-family: Arial, sans-serif;
13
- background-color: #f4f4f4;
14
- margin: 0;
15
- padding: 0;
16
- display: flex;
17
- justify-content: center;
18
- align-items: center;
19
- height: 100vh;
20
- }
21
- .diagram-container {
22
- width: 90%;
23
- max-width: 800px;
24
- padding: 20px;
25
- border: 1px solid #ddd;
26
- border-radius: 12px;
27
- background-color: white;
28
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
29
- text-align: center;
30
- position: relative;
31
- }
32
- .diagram-header {
33
- margin-bottom: 20px;
34
- font-size: 1.8rem;
35
- font-weight: bold;
36
- color: #007acc;
37
- }
38
- .pan-zoom-container {
39
- position: relative;
40
- width: 100%;
41
- height: 500px;
42
- overflow: hidden;
43
- border: 1px solid #ccc;
44
- background-color: #f9f9f9;
45
- cursor: grab;
46
- }
47
- .pan-zoom-content {
48
- position: absolute;
49
- transform-origin: 0 0;
50
- cursor: grab;
51
- }
52
- .pan-zoom-content:active {
53
- cursor: grabbing;
54
- }
55
- </style>
56
- </head>
57
- <body>
58
- <div class="diagram-container">
59
- <h2 class='diagram-header'>Component for Solution Blueprint - Clinical Trial Management Solution Blueprint </h2>
2
+ <div class="diagram-container" style="width: 90%; max-width: 800px; margin: auto; padding: 20px; background: white; border: 1px solid #ddd; border-radius: 12px; position: relative;">
3
+ <h2 class='diagram-header'>Component for Solution Blueprint - Clinical Trial Management Solution Blueprint </h2>
60
4
  GUID: c4f8d707-7c85-4125-b5fd-c3257a2ef2ef
61
- <div class="pan-zoom-container">
62
- <div id="Component_for_Solution_Blueprint_-_Clinical_Trial_Management_Solution_Blueprint_" class="mermaid pan-zoom-content">
63
- flowchart TD
64
- %%{init: {"flowchart": {"htmlLabels": false}} }%%
5
+ <div class="pan-zoom-container" style="width: 100%; height: 500px; overflow: hidden; position: relative; background: #f9f9f9; border: 1px solid #ccc; cursor: grab;">
6
+ <div id="Component_for_Solution_Blueprint_-_Clinical_Trial_Management_Solution_Blueprint_" class="mermaid pan-zoom-content" style="position: absolute; transform-origin: 0 0; cursor: grab;">
7
+ flowchart TD
8
+ %%{init: {&quot;flowchart&quot;: {&quot;htmlLabels&quot;: false}} }%%
65
9
 
66
10
  subgraph c4f8d707-7c85-4125-b5fd-c3257a2ef2ef [Components and Actors]
67
- fc2de77f-7320-48ea-8750-d434c6e870db@{ shape: text, label: "*Description*
68
- **A description of how a clinical trial is managed in Coco Pharmaceuticals.**"}
69
- 37b8560d-84d4-434b-9b0d-105420fcc924@{ shape: subproc, label: "*Solution Component*
70
- **Certify Hospital**"}
71
- f37f3735-28a1-4e03-9ff5-3fe2f137f661@{ shape: trap-t, label: "*Solution Actor Role*
72
- **Clinical Trial Manager**"}
73
- f37f3735-28a1-4e03-9ff5-3fe2f137f661-->|"Certifier"|37b8560d-84d4-434b-9b0d-105420fcc924
74
- 72a86eec-9734-4bc0-babb-4fec0aa7c9ff@{ shape: docs, label: "*Solution Component*
75
- **Assemble Treatment Assessment Report**"}
76
- 48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5@{ shape: rect, label: "*Solution Component*
77
- **Treatment Efficacy Evidence**"}
78
- 48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5-->|"Solution Linking Wire"|72a86eec-9734-4bc0-babb-4fec0aa7c9ff
79
- f37f3735-28a1-4e03-9ff5-3fe2f137f661-->|"Author"|72a86eec-9734-4bc0-babb-4fec0aa7c9ff
80
- b5c8da4c-f925-4cf1-8294-e43cd2c1a584@{ shape: rect, label: "*Solution Component*
81
- **Analyse Patient Data**"}
82
- b5c8da4c-f925-4cf1-8294-e43cd2c1a584-->|"Solution Linking Wire"|48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5
83
- 7f5dca65-50b4-4103-9ac7-3a406a09047a@{ shape: subproc, label: "*Solution Component*
84
- **Weekly Measurements Onboarding Pipeline**"}
85
- 07705e15-efff-4f80-8992-f04ac85e0ef1@{ shape: rect, label: "*Solution Component*
86
- **Landing Folder Cataloguer**"}
87
- 07705e15-efff-4f80-8992-f04ac85e0ef1-->|"Solution Linking Wire"|7f5dca65-50b4-4103-9ac7-3a406a09047a
88
- f37f3735-28a1-4e03-9ff5-3fe2f137f661-->|"Steward"|7f5dca65-50b4-4103-9ac7-3a406a09047a
89
- b0290339-c96c-4b05-904f-12fc98e54e14@{ shape: trap-t, label: "*Solution Actor Role*
90
- **Certified Data Engineer**"}
91
- b0290339-c96c-4b05-904f-12fc98e54e14-->|"Steward"|7f5dca65-50b4-4103-9ac7-3a406a09047a
92
- d48f579f-76d3-4c49-b1b4-575f5645a9d0@{ shape: lin-cyl, label: "*Solution Component*
93
- **Treatment Validation Sandbox**"}
94
- 26c07ca4-3b8e-484b-812b-36c1ace4b275@{ shape: rect, label: "*Solution Component*
95
- **Populate Sandbox**"}
96
- 26c07ca4-3b8e-484b-812b-36c1ace4b275-->|"Solution Linking Wire"|d48f579f-76d3-4c49-b1b4-575f5645a9d0
97
- ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec@{ shape: processes, label: "*Solution Component*
98
- **Hospital Processes**"}
99
- a8bd84ca-0aae-4534-b0e8-87e8659467a6@{ shape: trap-t, label: "*Solution Actor Role*
100
- **Clinical Trial Participating Hospital Coordinator**"}
101
- a8bd84ca-0aae-4534-b0e8-87e8659467a6-->|"Coordinator on behalf of hospital"|ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec
102
- 30adaab5-8870-47a8-8ae9-facbf84cb05a@{ shape: trap-t, label: "*Solution Actor Role*
103
- **Clinical Trial Participating Hospital**"}
104
- 30adaab5-8870-47a8-8ae9-facbf84cb05a-->|"Owner"|ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec
105
- d48f579f-76d3-4c49-b1b4-575f5645a9d0-->|"Solution Linking Wire"|b5c8da4c-f925-4cf1-8294-e43cd2c1a584
106
- ece17806-836c-4756-b3a2-2d12dde215f6@{ shape: trap-t, label: "*Solution Actor Role*
107
- **New Treatment Data Scientist**"}
108
- ece17806-836c-4756-b3a2-2d12dde215f6-->|"Data Analyser"|b5c8da4c-f925-4cf1-8294-e43cd2c1a584
109
- 0c757e35-8a42-4d5f-b01b-c72a6cea65cc@{ shape: trap-t, label: "*Solution Actor Role*
110
- **New Treatment Researcher.**"}
111
- 0c757e35-8a42-4d5f-b01b-c72a6cea65cc-->|"Results Interpreter"|b5c8da4c-f925-4cf1-8294-e43cd2c1a584
112
- e9c2f911-ffcb-40c6-aeee-8c4d43811576@{ shape: subproc, label: "*Solution Component*
113
- **Onboard Hospital**"}
114
- b0290339-c96c-4b05-904f-12fc98e54e14-->|"Initiator"|e9c2f911-ffcb-40c6-aeee-8c4d43811576
115
- 849b0b42-f465-452b-813c-477d6398e082@{ shape: subproc, label: "*Solution Component*
116
- **Set up clinical trial**"}
117
- f37f3735-28a1-4e03-9ff5-3fe2f137f661-->|"Initiator"|849b0b42-f465-452b-813c-477d6398e082
118
- a5d4d638-6836-47e5-99d0-fdcde637e13f@{ shape: lin-cyl, label: "*Solution Component*
119
- **Weekly Measurements Data Lake Folder**"}
120
- 7f5dca65-50b4-4103-9ac7-3a406a09047a-->|"Solution Linking Wire"|a5d4d638-6836-47e5-99d0-fdcde637e13f
121
- 0bf2547c-937c-41b6-814f-6284849271a1@{ shape: odd, label: "*Solution Component*
122
- **Treatment Assessment Report Validation and Delivery**"}
123
- 72a86eec-9734-4bc0-babb-4fec0aa7c9ff-->|"Solution Linking Wire"|0bf2547c-937c-41b6-814f-6284849271a1
124
- f6bc847b-868d-43cc-b767-41f5fe3e47d1@{ shape: trap-t, label: "*Solution Actor Role*
125
- **Clinical Trial Sponsor**"}
126
- f6bc847b-868d-43cc-b767-41f5fe3e47d1-->|"Reviewer"|0bf2547c-937c-41b6-814f-6284849271a1
127
- a5d4d638-6836-47e5-99d0-fdcde637e13f-->|"Solution Linking Wire"|26c07ca4-3b8e-484b-812b-36c1ace4b275
128
- fb32bef2-e79f-4893-b500-2e547f24d482@{ shape: subproc, label: "*Solution Component*
129
- **Set up Data Lake Folder**"}
130
- b0290339-c96c-4b05-904f-12fc98e54e14-->|"Initiator"|fb32bef2-e79f-4893-b500-2e547f24d482
131
- 1c150d6e-30cf-481c-9afb-3b06c9c9e78f@{ shape: lin-cyl, label: "*Solution Component*
132
- **Hospital Landing Area Folder**"}
133
- ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec-->|"Solution Linking Wire"|1c150d6e-30cf-481c-9afb-3b06c9c9e78f
134
- 1c150d6e-30cf-481c-9afb-3b06c9c9e78f-->|"Solution Linking Wire"|07705e15-efff-4f80-8992-f04ac85e0ef1
135
- 11c7c850-c67c-41cc-9423-d74db47cbf3a@{ shape: subproc, label: "*Solution Component*
136
- **Nominate Hospital**"}
137
- f37f3735-28a1-4e03-9ff5-3fe2f137f661-->|"Initiator"|11c7c850-c67c-41cc-9423-d74db47cbf3a
11
+ fc2de77f-7320-48ea-8750-d434c6e870db@{ shape: text, label: &quot;*Description*
12
+ **A description of how a clinical trial is managed in Coco Pharmaceuticals.**&quot;}
13
+ 37b8560d-84d4-434b-9b0d-105420fcc924@{ shape: subproc, label: &quot;*Solution Component*
14
+ **Certify Hospital**&quot;}
15
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661@{ shape: trap-t, label: &quot;*Solution Actor Role*
16
+ **Clinical Trial Manager**&quot;}
17
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661--&gt;|&quot;Certifier&quot;|37b8560d-84d4-434b-9b0d-105420fcc924
18
+ 72a86eec-9734-4bc0-babb-4fec0aa7c9ff@{ shape: docs, label: &quot;*Solution Component*
19
+ **Assemble Treatment Assessment Report**&quot;}
20
+ 48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5@{ shape: rect, label: &quot;*Solution Component*
21
+ **Treatment Efficacy Evidence**&quot;}
22
+ 48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5--&gt;|&quot;Solution Linking Wire&quot;|72a86eec-9734-4bc0-babb-4fec0aa7c9ff
23
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661--&gt;|&quot;Author&quot;|72a86eec-9734-4bc0-babb-4fec0aa7c9ff
24
+ b5c8da4c-f925-4cf1-8294-e43cd2c1a584@{ shape: rect, label: &quot;*Solution Component*
25
+ **Analyse Patient Data**&quot;}
26
+ b5c8da4c-f925-4cf1-8294-e43cd2c1a584--&gt;|&quot;Solution Linking Wire&quot;|48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5
27
+ 7f5dca65-50b4-4103-9ac7-3a406a09047a@{ shape: subproc, label: &quot;*Solution Component*
28
+ **Weekly Measurements Onboarding Pipeline**&quot;}
29
+ 07705e15-efff-4f80-8992-f04ac85e0ef1@{ shape: rect, label: &quot;*Solution Component*
30
+ **Landing Folder Cataloguer**&quot;}
31
+ 07705e15-efff-4f80-8992-f04ac85e0ef1--&gt;|&quot;Solution Linking Wire&quot;|7f5dca65-50b4-4103-9ac7-3a406a09047a
32
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661--&gt;|&quot;Steward&quot;|7f5dca65-50b4-4103-9ac7-3a406a09047a
33
+ b0290339-c96c-4b05-904f-12fc98e54e14@{ shape: trap-t, label: &quot;*Solution Actor Role*
34
+ **Certified Data Engineer**&quot;}
35
+ b0290339-c96c-4b05-904f-12fc98e54e14--&gt;|&quot;Steward&quot;|7f5dca65-50b4-4103-9ac7-3a406a09047a
36
+ d48f579f-76d3-4c49-b1b4-575f5645a9d0@{ shape: lin-cyl, label: &quot;*Solution Component*
37
+ **Treatment Validation Sandbox**&quot;}
38
+ 26c07ca4-3b8e-484b-812b-36c1ace4b275@{ shape: rect, label: &quot;*Solution Component*
39
+ **Populate Sandbox**&quot;}
40
+ 26c07ca4-3b8e-484b-812b-36c1ace4b275--&gt;|&quot;Solution Linking Wire&quot;|d48f579f-76d3-4c49-b1b4-575f5645a9d0
41
+ ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec@{ shape: processes, label: &quot;*Solution Component*
42
+ **Hospital Processes**&quot;}
43
+ a8bd84ca-0aae-4534-b0e8-87e8659467a6@{ shape: trap-t, label: &quot;*Solution Actor Role*
44
+ **Clinical Trial Participating Hospital Coordinator**&quot;}
45
+ a8bd84ca-0aae-4534-b0e8-87e8659467a6--&gt;|&quot;Coordinator on behalf of hospital&quot;|ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec
46
+ 30adaab5-8870-47a8-8ae9-facbf84cb05a@{ shape: trap-t, label: &quot;*Solution Actor Role*
47
+ **Clinical Trial Participating Hospital**&quot;}
48
+ 30adaab5-8870-47a8-8ae9-facbf84cb05a--&gt;|&quot;Owner&quot;|ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec
49
+ d48f579f-76d3-4c49-b1b4-575f5645a9d0--&gt;|&quot;Solution Linking Wire&quot;|b5c8da4c-f925-4cf1-8294-e43cd2c1a584
50
+ ece17806-836c-4756-b3a2-2d12dde215f6@{ shape: trap-t, label: &quot;*Solution Actor Role*
51
+ **New Treatment Data Scientist**&quot;}
52
+ ece17806-836c-4756-b3a2-2d12dde215f6--&gt;|&quot;Data Analyser&quot;|b5c8da4c-f925-4cf1-8294-e43cd2c1a584
53
+ 0c757e35-8a42-4d5f-b01b-c72a6cea65cc@{ shape: trap-t, label: &quot;*Solution Actor Role*
54
+ **New Treatment Researcher.**&quot;}
55
+ 0c757e35-8a42-4d5f-b01b-c72a6cea65cc--&gt;|&quot;Results Interpreter&quot;|b5c8da4c-f925-4cf1-8294-e43cd2c1a584
56
+ e9c2f911-ffcb-40c6-aeee-8c4d43811576@{ shape: subproc, label: &quot;*Solution Component*
57
+ **Onboard Hospital**&quot;}
58
+ b0290339-c96c-4b05-904f-12fc98e54e14--&gt;|&quot;Initiator&quot;|e9c2f911-ffcb-40c6-aeee-8c4d43811576
59
+ 849b0b42-f465-452b-813c-477d6398e082@{ shape: subproc, label: &quot;*Solution Component*
60
+ **Set up clinical trial**&quot;}
61
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661--&gt;|&quot;Initiator&quot;|849b0b42-f465-452b-813c-477d6398e082
62
+ a5d4d638-6836-47e5-99d0-fdcde637e13f@{ shape: lin-cyl, label: &quot;*Solution Component*
63
+ **Weekly Measurements Data Lake Folder**&quot;}
64
+ 7f5dca65-50b4-4103-9ac7-3a406a09047a--&gt;|&quot;Solution Linking Wire&quot;|a5d4d638-6836-47e5-99d0-fdcde637e13f
65
+ 0bf2547c-937c-41b6-814f-6284849271a1@{ shape: odd, label: &quot;*Solution Component*
66
+ **Treatment Assessment Report Validation and Delivery**&quot;}
67
+ 72a86eec-9734-4bc0-babb-4fec0aa7c9ff--&gt;|&quot;Solution Linking Wire&quot;|0bf2547c-937c-41b6-814f-6284849271a1
68
+ f6bc847b-868d-43cc-b767-41f5fe3e47d1@{ shape: trap-t, label: &quot;*Solution Actor Role*
69
+ **Clinical Trial Sponsor**&quot;}
70
+ f6bc847b-868d-43cc-b767-41f5fe3e47d1--&gt;|&quot;Reviewer&quot;|0bf2547c-937c-41b6-814f-6284849271a1
71
+ a5d4d638-6836-47e5-99d0-fdcde637e13f--&gt;|&quot;Solution Linking Wire&quot;|26c07ca4-3b8e-484b-812b-36c1ace4b275
72
+ fb32bef2-e79f-4893-b500-2e547f24d482@{ shape: subproc, label: &quot;*Solution Component*
73
+ **Set up Data Lake Folder**&quot;}
74
+ b0290339-c96c-4b05-904f-12fc98e54e14--&gt;|&quot;Initiator&quot;|fb32bef2-e79f-4893-b500-2e547f24d482
75
+ 1c150d6e-30cf-481c-9afb-3b06c9c9e78f@{ shape: lin-cyl, label: &quot;*Solution Component*
76
+ **Hospital Landing Area Folder**&quot;}
77
+ ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec--&gt;|&quot;Solution Linking Wire&quot;|1c150d6e-30cf-481c-9afb-3b06c9c9e78f
78
+ 1c150d6e-30cf-481c-9afb-3b06c9c9e78f--&gt;|&quot;Solution Linking Wire&quot;|07705e15-efff-4f80-8992-f04ac85e0ef1
79
+ 11c7c850-c67c-41cc-9423-d74db47cbf3a@{ shape: subproc, label: &quot;*Solution Component*
80
+ **Nominate Hospital**&quot;}
81
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661--&gt;|&quot;Initiator&quot;|11c7c850-c67c-41cc-9423-d74db47cbf3a
138
82
  end
139
83
  style 48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
140
84
  style ece17806-836c-4756-b3a2-2d12dde215f6 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
@@ -161,113 +105,92 @@ style f6bc847b-868d-43cc-b767-41f5fe3e47d1 color:#FFFFFF, fill:#AA00FF, stroke:#
161
105
  style d48f579f-76d3-4c49-b1b4-575f5645a9d0 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
162
106
  style f37f3735-28a1-4e03-9ff5-3fe2f137f661 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
163
107
  style fb32bef2-e79f-4893-b500-2e547f24d482 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
164
- </div>
165
108
  </div>
166
109
  </div>
110
+ </div>
111
+ <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
112
+ <script>
113
+ // Initialize Mermaid.js and set up pan/zoom
114
+ mermaid.initialize({ startOnLoad: true });
115
+
116
+ const container = document.querySelector('.pan-zoom-container');
117
+ const content = document.querySelector('.pan-zoom-content');
118
+ const rect = content.getBoundingClientRect();
119
+
120
+ let scale = 1; // Current zoom level
121
+ let panX = 0; // X-axis pan offset
122
+ let panY = 0; // Y-axis pan offset
123
+ let isDragging = false;
124
+ let startX, startY;
125
+
126
+ // Helper: Apply transformations
127
+ const applyTransform = () => {
128
+ content.style.transform = `translate(${panX}px, ${panY}px) scale(${scale})`;
129
+ };
130
+
131
+ // Helper: Center the diagram and fit it to the container
132
+ const centerAndFitDiagram = () => {
133
+ const containerRect = container.getBoundingClientRect();
134
+ const rect = content.getBoundingClientRect();
135
+
136
+ scale = Math.min(
137
+ containerRect.width / rect.width,
138
+ containerRect.height / rect.height
139
+ );
140
+
141
+ panX = (containerRect.width - rect.width * scale) / 2;
142
+ panY = (containerRect.height - rect.height * scale) / 2;
143
+
144
+ applyTransform();
145
+ console.log("Diagram centered and fitted.");
146
+ };
147
+
148
+ // Add zoom functionality
149
+ container.addEventListener('wheel', function(event) {
150
+ event.preventDefault();
151
+ const zoomSpeed = 0.1;
152
+ const previousScale = scale;
153
+
154
+ if (event.deltaY < 0) {
155
+ scale = Math.min(scale + zoomSpeed, 4);
156
+ } else {
157
+ scale = Math.max(scale - zoomSpeed, 0.5);
158
+ }
167
159
 
168
- <script>
169
- document.addEventListener("DOMContentLoaded", function() {
170
- // Initialize Mermaid.js
171
- console.log("Initializing Mermaid...");
172
- mermaid.initialize({ startOnLoad: true });
173
-
174
- const container = document.querySelector('.pan-zoom-container');
175
- const content = document.querySelector('.pan-zoom-content');
176
- let rect; // Bounding box of the rendered diagram
177
- let scale = 1; // Current zoom level
178
- let panX = 0; // Pan offset in X direction
179
- let panY = 0; // Pan offset in Y direction
180
- let isDragging = false;
181
- let startX, startY;
182
-
183
- // Helper: Apply transformations
184
- const applyTransform = () => {
185
- content.style.transform = `translate(${panX}px, ${panY}px) scale(${scale})`;
186
- };
187
-
188
- // Helper: Center the diagram and fit it to the container
189
- const centerAndFitDiagram = () => {
190
- rect = content.getBoundingClientRect();
191
- const containerRect = container.getBoundingClientRect();
192
-
193
- // Calculate the required scale to fit the diagram
194
- scale = Math.min(
195
- containerRect.width / rect.width,
196
- containerRect.height / rect.height
197
- );
198
-
199
- // Adjust pan to center the diagram
200
- panX = (containerRect.width - rect.width * scale) / 2;
201
- panY = (containerRect.height - rect.height * scale) / 2;
202
-
203
- applyTransform();
204
- console.log("Diagram centered and fitted to container.");
205
- };
206
-
207
- // Add pan/zoom functionality
208
- const zoomCenteredOnDiagram = (event, deltaZoom) => {
209
- rect = content.getBoundingClientRect();
210
- const containerRect = container.getBoundingClientRect();
211
-
212
- // Center of the diagram
213
- const diagramCenterX = rect.left + rect.width / 2;
214
- const diagramCenterY = rect.top + rect.height / 2;
215
-
216
- const zoomX = (diagramCenterX - containerRect.left) * deltaZoom;
217
- const zoomY = (diagramCenterY - containerRect.top) * deltaZoom;
218
-
219
- panX -= zoomX;
220
- panY -= zoomY;
221
- };
222
-
223
- container.addEventListener('wheel', function(event) {
224
- event.preventDefault();
225
- const zoomSpeed = 0.1;
226
- const previousScale = scale;
227
-
228
- // Zoom in or out
229
- if (event.deltaY < 0) {
230
- scale = Math.min(scale + zoomSpeed, 4); // Limit zoom-in
231
- } else {
232
- scale = Math.max(scale - zoomSpeed, 0.5); // Limit zoom-out
233
- }
234
-
235
- // Calculate deltaZoom and adjust pan
236
- const deltaZoom = scale / previousScale - 1;
237
- zoomCenteredOnDiagram(event, deltaZoom);
160
+ const zoomRatio = scale / previousScale;
161
+ panX -= (event.clientX - container.getBoundingClientRect().left) * (zoomRatio - 1);
162
+ panY -= (event.clientY - container.getBoundingClientRect().top) * (zoomRatio - 1);
238
163
 
239
- applyTransform();
240
- });
164
+ applyTransform();
165
+ });
241
166
 
242
- container.addEventListener('mousedown', function(event) {
243
- isDragging = true;
244
- startX = event.clientX - panX;
245
- startY = event.clientY - panY;
246
- container.style.cursor = "grabbing";
247
- });
167
+ // Add drag functionality for panning
168
+ container.addEventListener('mousedown', function(event) {
169
+ isDragging = true;
170
+ startX = event.clientX - panX;
171
+ startY = event.clientY - panY;
172
+ container.style.cursor = "grabbing";
173
+ });
248
174
 
249
- container.addEventListener('mousemove', function(event) {
250
- if (!isDragging) return;
175
+ container.addEventListener('mousemove', function(event) {
176
+ if (!isDragging) return;
251
177
 
252
- panX = event.clientX - startX;
253
- panY = event.clientY - startY;
178
+ panX = event.clientX - startX;
179
+ panY = event.clientY - startY;
254
180
 
255
- applyTransform();
256
- });
181
+ applyTransform();
182
+ });
257
183
 
258
- container.addEventListener('mouseup', function() {
259
- isDragging = false;
260
- container.style.cursor = "grab";
261
- });
184
+ container.addEventListener('mouseup', function() {
185
+ isDragging = false;
186
+ container.style.cursor = "grab";
187
+ });
262
188
 
263
- container.addEventListener('mouseleave', function() {
264
- isDragging = false;
265
- container.style.cursor = "grab";
266
- });
189
+ container.addEventListener('mouseleave', function() {
190
+ isDragging = false;
191
+ container.style.cursor = "grab";
192
+ });
267
193
 
268
- // Ensure Mermaid renders the diagram, then fit and center it
269
- setTimeout(centerAndFitDiagram, 100); // Delay to ensure Mermaid.js rendering is complete
270
- });
271
- </script>
272
- </body>
273
- </html>
194
+ // Center diagram after rendering by Mermaid
195
+ setTimeout(centerAndFitDiagram, 200);
196
+ </script>
pyegeria/test_m1.html ADDED
@@ -0,0 +1,273 @@
1
+
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Mermaid Diagram with Centered Pan and Zoom</title>
8
+ <!-- Load Mermaid.js -->
9
+ <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
10
+ <style>
11
+ body {
12
+ font-family: Arial, sans-serif;
13
+ background-color: #f4f4f4;
14
+ margin: 0;
15
+ padding: 0;
16
+ display: flex;
17
+ justify-content: center;
18
+ align-items: center;
19
+ height: 100vh;
20
+ }
21
+ .diagram-container {
22
+ width: 90%;
23
+ max-width: 800px;
24
+ padding: 20px;
25
+ border: 1px solid #ddd;
26
+ border-radius: 12px;
27
+ background-color: white;
28
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
29
+ text-align: center;
30
+ position: relative;
31
+ }
32
+ .diagram-header {
33
+ margin-bottom: 20px;
34
+ font-size: 1.8rem;
35
+ font-weight: bold;
36
+ color: #007acc;
37
+ }
38
+ .pan-zoom-container {
39
+ position: relative;
40
+ width: 100%;
41
+ height: 500px;
42
+ overflow: hidden;
43
+ border: 1px solid #ccc;
44
+ background-color: #f9f9f9;
45
+ cursor: grab;
46
+ }
47
+ .pan-zoom-content {
48
+ position: absolute;
49
+ transform-origin: 0 0;
50
+ cursor: grab;
51
+ }
52
+ .pan-zoom-content:active {
53
+ cursor: grabbing;
54
+ }
55
+ </style>
56
+ </head>
57
+ <body>
58
+ <div class="diagram-container">
59
+ <h2 class='diagram-header'>Component for Solution Blueprint - Clinical Trial Management Solution Blueprint </h2>
60
+ GUID: c4f8d707-7c85-4125-b5fd-c3257a2ef2ef
61
+ <div class="pan-zoom-container">
62
+ <div id="Component_for_Solution_Blueprint_-_Clinical_Trial_Management_Solution_Blueprint_" class="mermaid pan-zoom-content">
63
+ flowchart TD
64
+ %%{init: {"flowchart": {"htmlLabels": false}} }%%
65
+
66
+ subgraph c4f8d707-7c85-4125-b5fd-c3257a2ef2ef [Components and Actors]
67
+ fc2de77f-7320-48ea-8750-d434c6e870db@{ shape: text, label: "*Description*
68
+ **A description of how a clinical trial is managed in Coco Pharmaceuticals.**"}
69
+ 37b8560d-84d4-434b-9b0d-105420fcc924@{ shape: subproc, label: "*Solution Component*
70
+ **Certify Hospital**"}
71
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661@{ shape: trap-t, label: "*Solution Actor Role*
72
+ **Clinical Trial Manager**"}
73
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661-->|"Certifier"|37b8560d-84d4-434b-9b0d-105420fcc924
74
+ 72a86eec-9734-4bc0-babb-4fec0aa7c9ff@{ shape: docs, label: "*Solution Component*
75
+ **Assemble Treatment Assessment Report**"}
76
+ 48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5@{ shape: rect, label: "*Solution Component*
77
+ **Treatment Efficacy Evidence**"}
78
+ 48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5-->|"Solution Linking Wire"|72a86eec-9734-4bc0-babb-4fec0aa7c9ff
79
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661-->|"Author"|72a86eec-9734-4bc0-babb-4fec0aa7c9ff
80
+ b5c8da4c-f925-4cf1-8294-e43cd2c1a584@{ shape: rect, label: "*Solution Component*
81
+ **Analyse Patient Data**"}
82
+ b5c8da4c-f925-4cf1-8294-e43cd2c1a584-->|"Solution Linking Wire"|48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5
83
+ 7f5dca65-50b4-4103-9ac7-3a406a09047a@{ shape: subproc, label: "*Solution Component*
84
+ **Weekly Measurements Onboarding Pipeline**"}
85
+ 07705e15-efff-4f80-8992-f04ac85e0ef1@{ shape: rect, label: "*Solution Component*
86
+ **Landing Folder Cataloguer**"}
87
+ 07705e15-efff-4f80-8992-f04ac85e0ef1-->|"Solution Linking Wire"|7f5dca65-50b4-4103-9ac7-3a406a09047a
88
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661-->|"Steward"|7f5dca65-50b4-4103-9ac7-3a406a09047a
89
+ b0290339-c96c-4b05-904f-12fc98e54e14@{ shape: trap-t, label: "*Solution Actor Role*
90
+ **Certified Data Engineer**"}
91
+ b0290339-c96c-4b05-904f-12fc98e54e14-->|"Steward"|7f5dca65-50b4-4103-9ac7-3a406a09047a
92
+ d48f579f-76d3-4c49-b1b4-575f5645a9d0@{ shape: lin-cyl, label: "*Solution Component*
93
+ **Treatment Validation Sandbox**"}
94
+ 26c07ca4-3b8e-484b-812b-36c1ace4b275@{ shape: rect, label: "*Solution Component*
95
+ **Populate Sandbox**"}
96
+ 26c07ca4-3b8e-484b-812b-36c1ace4b275-->|"Solution Linking Wire"|d48f579f-76d3-4c49-b1b4-575f5645a9d0
97
+ ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec@{ shape: processes, label: "*Solution Component*
98
+ **Hospital Processes**"}
99
+ a8bd84ca-0aae-4534-b0e8-87e8659467a6@{ shape: trap-t, label: "*Solution Actor Role*
100
+ **Clinical Trial Participating Hospital Coordinator**"}
101
+ a8bd84ca-0aae-4534-b0e8-87e8659467a6-->|"Coordinator on behalf of hospital"|ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec
102
+ 30adaab5-8870-47a8-8ae9-facbf84cb05a@{ shape: trap-t, label: "*Solution Actor Role*
103
+ **Clinical Trial Participating Hospital**"}
104
+ 30adaab5-8870-47a8-8ae9-facbf84cb05a-->|"Owner"|ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec
105
+ d48f579f-76d3-4c49-b1b4-575f5645a9d0-->|"Solution Linking Wire"|b5c8da4c-f925-4cf1-8294-e43cd2c1a584
106
+ ece17806-836c-4756-b3a2-2d12dde215f6@{ shape: trap-t, label: "*Solution Actor Role*
107
+ **New Treatment Data Scientist**"}
108
+ ece17806-836c-4756-b3a2-2d12dde215f6-->|"Data Analyser"|b5c8da4c-f925-4cf1-8294-e43cd2c1a584
109
+ 0c757e35-8a42-4d5f-b01b-c72a6cea65cc@{ shape: trap-t, label: "*Solution Actor Role*
110
+ **New Treatment Researcher.**"}
111
+ 0c757e35-8a42-4d5f-b01b-c72a6cea65cc-->|"Results Interpreter"|b5c8da4c-f925-4cf1-8294-e43cd2c1a584
112
+ e9c2f911-ffcb-40c6-aeee-8c4d43811576@{ shape: subproc, label: "*Solution Component*
113
+ **Onboard Hospital**"}
114
+ b0290339-c96c-4b05-904f-12fc98e54e14-->|"Initiator"|e9c2f911-ffcb-40c6-aeee-8c4d43811576
115
+ 849b0b42-f465-452b-813c-477d6398e082@{ shape: subproc, label: "*Solution Component*
116
+ **Set up clinical trial**"}
117
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661-->|"Initiator"|849b0b42-f465-452b-813c-477d6398e082
118
+ a5d4d638-6836-47e5-99d0-fdcde637e13f@{ shape: lin-cyl, label: "*Solution Component*
119
+ **Weekly Measurements Data Lake Folder**"}
120
+ 7f5dca65-50b4-4103-9ac7-3a406a09047a-->|"Solution Linking Wire"|a5d4d638-6836-47e5-99d0-fdcde637e13f
121
+ 0bf2547c-937c-41b6-814f-6284849271a1@{ shape: odd, label: "*Solution Component*
122
+ **Treatment Assessment Report Validation and Delivery**"}
123
+ 72a86eec-9734-4bc0-babb-4fec0aa7c9ff-->|"Solution Linking Wire"|0bf2547c-937c-41b6-814f-6284849271a1
124
+ f6bc847b-868d-43cc-b767-41f5fe3e47d1@{ shape: trap-t, label: "*Solution Actor Role*
125
+ **Clinical Trial Sponsor**"}
126
+ f6bc847b-868d-43cc-b767-41f5fe3e47d1-->|"Reviewer"|0bf2547c-937c-41b6-814f-6284849271a1
127
+ a5d4d638-6836-47e5-99d0-fdcde637e13f-->|"Solution Linking Wire"|26c07ca4-3b8e-484b-812b-36c1ace4b275
128
+ fb32bef2-e79f-4893-b500-2e547f24d482@{ shape: subproc, label: "*Solution Component*
129
+ **Set up Data Lake Folder**"}
130
+ b0290339-c96c-4b05-904f-12fc98e54e14-->|"Initiator"|fb32bef2-e79f-4893-b500-2e547f24d482
131
+ 1c150d6e-30cf-481c-9afb-3b06c9c9e78f@{ shape: lin-cyl, label: "*Solution Component*
132
+ **Hospital Landing Area Folder**"}
133
+ ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec-->|"Solution Linking Wire"|1c150d6e-30cf-481c-9afb-3b06c9c9e78f
134
+ 1c150d6e-30cf-481c-9afb-3b06c9c9e78f-->|"Solution Linking Wire"|07705e15-efff-4f80-8992-f04ac85e0ef1
135
+ 11c7c850-c67c-41cc-9423-d74db47cbf3a@{ shape: subproc, label: "*Solution Component*
136
+ **Nominate Hospital**"}
137
+ f37f3735-28a1-4e03-9ff5-3fe2f137f661-->|"Initiator"|11c7c850-c67c-41cc-9423-d74db47cbf3a
138
+ end
139
+ style 48bc201e-3d4e-4beb-bdb2-0fd9d134f6d5 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
140
+ style ece17806-836c-4756-b3a2-2d12dde215f6 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
141
+ style e9c2f911-ffcb-40c6-aeee-8c4d43811576 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
142
+ style a5d4d638-6836-47e5-99d0-fdcde637e13f color:#FFFFFF, fill:#838cc7, stroke:#3079ab
143
+ style 0bf2547c-937c-41b6-814f-6284849271a1 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
144
+ style 30adaab5-8870-47a8-8ae9-facbf84cb05a color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
145
+ style b0290339-c96c-4b05-904f-12fc98e54e14 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
146
+ style 26c07ca4-3b8e-484b-812b-36c1ace4b275 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
147
+ style 1c150d6e-30cf-481c-9afb-3b06c9c9e78f color:#FFFFFF, fill:#838cc7, stroke:#3079ab
148
+ style 07705e15-efff-4f80-8992-f04ac85e0ef1 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
149
+ style a8bd84ca-0aae-4534-b0e8-87e8659467a6 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
150
+ style 0c757e35-8a42-4d5f-b01b-c72a6cea65cc color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
151
+ style c4f8d707-7c85-4125-b5fd-c3257a2ef2ef color:#3079ab, fill:#b7c0c7, stroke:#3079ab
152
+ style 37b8560d-84d4-434b-9b0d-105420fcc924 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
153
+ style 11c7c850-c67c-41cc-9423-d74db47cbf3a color:#FFFFFF, fill:#838cc7, stroke:#3079ab
154
+ style fc2de77f-7320-48ea-8750-d434c6e870db color:#000000, fill:#F9F7ED, stroke:#b7c0c7
155
+ style 849b0b42-f465-452b-813c-477d6398e082 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
156
+ style 7f5dca65-50b4-4103-9ac7-3a406a09047a color:#FFFFFF, fill:#838cc7, stroke:#3079ab
157
+ style ee2bb773-e630-4cf9-bdf1-7c2dd64fe4ec color:#FFFFFF, fill:#838cc7, stroke:#3079ab
158
+ style 72a86eec-9734-4bc0-babb-4fec0aa7c9ff color:#FFFFFF, fill:#838cc7, stroke:#3079ab
159
+ style b5c8da4c-f925-4cf1-8294-e43cd2c1a584 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
160
+ style f6bc847b-868d-43cc-b767-41f5fe3e47d1 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
161
+ style d48f579f-76d3-4c49-b1b4-575f5645a9d0 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
162
+ style f37f3735-28a1-4e03-9ff5-3fe2f137f661 color:#FFFFFF, fill:#AA00FF, stroke:#E1D5E7
163
+ style fb32bef2-e79f-4893-b500-2e547f24d482 color:#FFFFFF, fill:#838cc7, stroke:#3079ab
164
+ </div>
165
+ </div>
166
+ </div>
167
+
168
+ <script>
169
+ document.addEventListener("DOMContentLoaded", function() {
170
+ // Initialize Mermaid.js
171
+ console.log("Initializing Mermaid...");
172
+ mermaid.initialize({ startOnLoad: true });
173
+
174
+ const container = document.querySelector('.pan-zoom-container');
175
+ const content = document.querySelector('.pan-zoom-content');
176
+ let rect; // Bounding box of the rendered diagram
177
+ let scale = 1; // Current zoom level
178
+ let panX = 0; // Pan offset in X direction
179
+ let panY = 0; // Pan offset in Y direction
180
+ let isDragging = false;
181
+ let startX, startY;
182
+
183
+ // Helper: Apply transformations
184
+ const applyTransform = () => {
185
+ content.style.transform = `translate(${panX}px, ${panY}px) scale(${scale})`;
186
+ };
187
+
188
+ // Helper: Center the diagram and fit it to the container
189
+ const centerAndFitDiagram = () => {
190
+ rect = content.getBoundingClientRect();
191
+ const containerRect = container.getBoundingClientRect();
192
+
193
+ // Calculate the required scale to fit the diagram
194
+ scale = Math.min(
195
+ containerRect.width / rect.width,
196
+ containerRect.height / rect.height
197
+ );
198
+
199
+ // Adjust pan to center the diagram
200
+ panX = (containerRect.width - rect.width * scale) / 2;
201
+ panY = (containerRect.height - rect.height * scale) / 2;
202
+
203
+ applyTransform();
204
+ console.log("Diagram centered and fitted to container.");
205
+ };
206
+
207
+ // Add pan/zoom functionality
208
+ const zoomCenteredOnDiagram = (event, deltaZoom) => {
209
+ rect = content.getBoundingClientRect();
210
+ const containerRect = container.getBoundingClientRect();
211
+
212
+ // Center of the diagram
213
+ const diagramCenterX = rect.left + rect.width / 2;
214
+ const diagramCenterY = rect.top + rect.height / 2;
215
+
216
+ const zoomX = (diagramCenterX - containerRect.left) * deltaZoom;
217
+ const zoomY = (diagramCenterY - containerRect.top) * deltaZoom;
218
+
219
+ panX -= zoomX;
220
+ panY -= zoomY;
221
+ };
222
+
223
+ container.addEventListener('wheel', function(event) {
224
+ event.preventDefault();
225
+ const zoomSpeed = 0.1;
226
+ const previousScale = scale;
227
+
228
+ // Zoom in or out
229
+ if (event.deltaY < 0) {
230
+ scale = Math.min(scale + zoomSpeed, 4); // Limit zoom-in
231
+ } else {
232
+ scale = Math.max(scale - zoomSpeed, 0.5); // Limit zoom-out
233
+ }
234
+
235
+ // Calculate deltaZoom and adjust pan
236
+ const deltaZoom = scale / previousScale - 1;
237
+ zoomCenteredOnDiagram(event, deltaZoom);
238
+
239
+ applyTransform();
240
+ });
241
+
242
+ container.addEventListener('mousedown', function(event) {
243
+ isDragging = true;
244
+ startX = event.clientX - panX;
245
+ startY = event.clientY - panY;
246
+ container.style.cursor = "grabbing";
247
+ });
248
+
249
+ container.addEventListener('mousemove', function(event) {
250
+ if (!isDragging) return;
251
+
252
+ panX = event.clientX - startX;
253
+ panY = event.clientY - startY;
254
+
255
+ applyTransform();
256
+ });
257
+
258
+ container.addEventListener('mouseup', function() {
259
+ isDragging = false;
260
+ container.style.cursor = "grab";
261
+ });
262
+
263
+ container.addEventListener('mouseleave', function() {
264
+ isDragging = false;
265
+ container.style.cursor = "grab";
266
+ });
267
+
268
+ // Ensure Mermaid renders the diagram, then fit and center it
269
+ setTimeout(centerAndFitDiagram, 100); // Delay to ensure Mermaid.js rendering is complete
270
+ });
271
+ </script>
272
+ </body>
273
+ </html>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyegeria
3
- Version: 5.3.4.5
3
+ Version: 5.3.4.6
4
4
  Summary: A python client for Egeria
5
5
  License: Apache 2.0
6
6
  Keywords: egeria,metadata,governance
@@ -502,7 +502,7 @@ pyegeria/feedback_manager_omvs.py,sha256=B66e3ZCaC_dirb0mcb2Nz3PYh2ZKsoMAYNOb3eu
502
502
  pyegeria/full_omag_server_config.py,sha256=CQqLCy_3DZFvJZEOcGf50HWdFaWpiAIs6z-kKyjvpDA,47464
503
503
  pyegeria/glossary_browser_omvs.py,sha256=RCvZ1l2xg6uZ1o4xGJUkIVJQO9NZG00F_jGSc4fAERU,93538
504
504
  pyegeria/glossary_manager_omvs.py,sha256=CN04lhnAFk_g4soE5V_jZ0GDrLPClhX5yX9iE0t6NDk,132440
505
- pyegeria/mermaid_utilities.py,sha256=J90HEKsVJ54mS7KT92hnGZtV1aqiJdOHHFHzg7yexyo,25629
505
+ pyegeria/mermaid_utilities.py,sha256=0p2pE9OUAejL-tNzZRSnNrWDfvDTdcU6WaUJPlwRxRE,22754
506
506
  pyegeria/metadata_explorer_omvs.py,sha256=u66o4IOhSo-i75KYeHogGql-gECBzZPT-RYbvfYuzoI,86932
507
507
  pyegeria/my_profile_omvs.py,sha256=i0e29KXRKZzZGgxuQI7c2_w7dyDuQWFIykky1Nqc0_8,34673
508
508
  pyegeria/platform_services.py,sha256=xlF5p5HPKDGTFFDsuxm2RLhr8vjZPv4T7e2qCkDgKXE,41654
@@ -512,13 +512,14 @@ pyegeria/runtime_manager_omvs.py,sha256=NrY2yJriu20eJfpKBSLq81cMMARZIllhukm9VNmL
512
512
  pyegeria/server_operations.py,sha256=vmiUDU_Xa0U8pa0Fdb-QKkoeSqs7WfMwIpG_XU3xgeI,16784
513
513
  pyegeria/solution_architect_omvs.py,sha256=AsyjQzfgSUriDymeP9W45iJqYux423xXDaqfHLEtWN4,22085
514
514
  pyegeria/template_manager_omvs.py,sha256=o_qCIFTRLK8b9C3N99taLji8VkDygo1Ss0fua35yfhA,42389
515
- pyegeria/test_m.html,sha256=XS_1IAtfG4ZlZk45QTkrFWWpjQMVlO21ScDMX2Frl3g,14086
515
+ pyegeria/test_m.html,sha256=EysP_GDFTiLtJZKXuNEvz-vdBwkIu1oOXwc_OLtdT18,11725
516
516
  pyegeria/test_m.py,sha256=BDKRLsHsAWnwCbzHkkvfsc8ZIJ0k-jmwPPNuTSgW6Qo,7659
517
+ pyegeria/test_m1.html,sha256=XS_1IAtfG4ZlZk45QTkrFWWpjQMVlO21ScDMX2Frl3g,14086
517
518
  pyegeria/utils.py,sha256=GCt1C0bp0Xng1ahzbZhzV9qQwH7Dj93IaCt2dvWb-sg,5417
518
519
  pyegeria/valid_metadata_omvs.py,sha256=UyIT4DfB1_QIG55Hmop7ozbsq8cNdrpYB7Tb6EOFiN8,65035
519
520
  pyegeria/x_action_author_omvs.py,sha256=6b725SPsC52AI7ols7Qq8MsBlZuAXr_BgJ_-ychVRCw,6386
520
- pyegeria-5.3.4.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
521
- pyegeria-5.3.4.5.dist-info/METADATA,sha256=YhBziury1whvtdqVS3t_onFlicmOCluTBw7zm5mts-s,2735
522
- pyegeria-5.3.4.5.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
523
- pyegeria-5.3.4.5.dist-info/entry_points.txt,sha256=E83aZ9RhrxffYGmHgBwhLdS5fvEeYhrIPp0FZRvaFOI,6180
524
- pyegeria-5.3.4.5.dist-info/RECORD,,
521
+ pyegeria-5.3.4.6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
522
+ pyegeria-5.3.4.6.dist-info/METADATA,sha256=W5OxgqZ-16hDB12c6aTrrfPbtOKmAluYsr_tMyu2QDk,2735
523
+ pyegeria-5.3.4.6.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
524
+ pyegeria-5.3.4.6.dist-info/entry_points.txt,sha256=E83aZ9RhrxffYGmHgBwhLdS5fvEeYhrIPp0FZRvaFOI,6180
525
+ pyegeria-5.3.4.6.dist-info/RECORD,,