@peter.prib/renderengine 0.2.5 → 0.2.7

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.
Files changed (67) hide show
  1. package/README.md +219 -213
  2. package/REFERENCE.md +272 -6
  3. package/dist/renderengine-workspace.umd.js +11980 -7421
  4. package/dist/renderengine.umd.js +8991 -5784
  5. package/examples/archimate.html +68 -66
  6. package/examples/data-model.html +534 -0
  7. package/package.json +70 -68
  8. package/src/bian.js +182 -0
  9. package/src/charting/CheckboxTreeSelector.js +373 -304
  10. package/src/charting/DiagramEditor.js +53 -32
  11. package/src/charting/DiagramTypeRegistry.js +13 -3
  12. package/src/charting/ModelCheckDialog.js +63 -0
  13. package/src/charting/ModelChecker.js +26 -0
  14. package/src/charting/ViewTabStrip.js +94 -81
  15. package/src/charting/archimate/ArchimateCanvasEditor.js +825 -815
  16. package/src/charting/archimate/ArchimateElementTemplate.js +208 -195
  17. package/src/charting/datamodel/BianLandscapeReader.js +185 -0
  18. package/src/charting/datamodel/BianSemanticApiReader.js +183 -0
  19. package/src/charting/datamodel/DataModel.js +645 -0
  20. package/src/charting/datamodel/DataModelChecker.js +92 -0
  21. package/src/charting/datamodel/DataModelCompared.js +127 -0
  22. package/src/charting/datamodel/DataModelContext.js +108 -0
  23. package/src/charting/datamodel/DataModelFileFormat.js +33 -0
  24. package/src/charting/datamodel/DataModelPerspective.js +129 -0
  25. package/src/charting/datamodel/DataType.js +108 -0
  26. package/src/charting/datamodel/EnumerationType.js +51 -0
  27. package/src/charting/datamodel/LevelMapping.js +38 -0
  28. package/src/charting/datamodel/LevelSchema.js +41 -0
  29. package/src/charting/datamodel/ServiceDomain.js +177 -0
  30. package/src/charting/datamodel/ServiceLandscape.js +104 -0
  31. package/src/charting/datamodel/StructuredType.js +63 -0
  32. package/src/charting/datamodel/index.js +15 -0
  33. package/src/charting/diagramModel/MergeModelCommand.js +43 -37
  34. package/src/charting/diagramModel/OpenViewList.js +75 -0
  35. package/src/charting/diagramModel/ViewSetChecker.js +22 -34
  36. package/src/charting/diagrams/DataModelDiagram.js +160 -86
  37. package/src/charting/diagrams/DataModelRelationshipStrategy.js +94 -38
  38. package/src/charting/diagrams/EdgeGeometry.js +578 -553
  39. package/src/charting/diagrams/GraphDiagram.js +11 -1
  40. package/src/charting/diagrams/NodeGeometry.js +169 -158
  41. package/src/charting/diagrams/nesting.js +31 -0
  42. package/src/charting/glyphs/PersonGlyph.js +24 -23
  43. package/src/charting/modelTree/ModelTree.js +202 -164
  44. package/src/charting/modelTree/ModelTreePanel.js +36 -3
  45. package/src/charting/modelTree/TreeViewMode.js +131 -110
  46. package/src/charting/modelTree/modes/FlatTreeMode.js +32 -46
  47. package/src/charting/modelTree/modes/LayerGroupedTreeMode.js +47 -62
  48. package/src/charting/modelTree/modes/TypeGroupedTreeMode.js +46 -60
  49. package/src/datamodel.js +132 -122
  50. package/src/diagramCatalog.js +35 -30
  51. package/src/index.js +2666 -2659
  52. package/src/workspace/EditorShell.js +166 -67
  53. package/src/workspace/PanelLayout.js +56 -0
  54. package/src/workspace/index.js +1 -0
  55. package/src/workspace/layout/TabsNode.js +205 -191
  56. package/src/workspace/parts/ArchimateCanvasPart.js +10 -9
  57. package/src/workspace/parts/ChartPart.js +6 -1
  58. package/src/workspace/parts/DataModelPart.js +544 -0
  59. package/src/workspace/parts/DiagramEditorPart.js +2 -8
  60. package/src/workspace/parts/EditorPart.js +461 -407
  61. package/src/workspace/parts/ModelFile.js +216 -187
  62. package/src/workspace/parts/ModelsPart.js +483 -192
  63. package/src/workspace/storage/BackupFolder.js +145 -0
  64. package/src/workspace/storage/KeyValueStore.js +92 -0
  65. package/src/workspace/storage/ModelLibrary.js +65 -0
  66. package/src/workspace/workArea.js +417 -413
  67. package/src/yaml/YamlReader.js +372 -0
@@ -1,66 +1,68 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>ArchiMate Modeller</title>
7
- </head>
8
- <body>
9
- <!-- Deliberately empty: the workbench and the modeller part are built from
10
- JavaScript and JSON specs. A classic script (not type="module") so the
11
- page also opens straight off disk. The modeller is the diagram editor's
12
- canvas (ArchimateCanvasPart), one per model in a ModelsPart, so several
13
- models can be open at once (File > New model, Open… in a new tab);
14
- archimate-legacy.html keeps the graph-engine editor for comparison. -->
15
- <script>
16
- function runModeller() {
17
- const { el, registerBuiltinParts, ArchimateCanvasPart } = RenderEngineWorkspace;
18
-
19
- Object.assign(document.documentElement.style, { height: '100%' });
20
- Object.assign(document.body.style, { margin: '0', height: '100%', display: 'flex' });
21
-
22
- const ws = document.body.appendChild(el({
23
- tag: 'ws-workspace',
24
- attrs: { label: 'ArchiMate Modeller', theme: 'light' },
25
- style: { flex: '1 1 auto', minHeight: '0' },
26
- }));
27
- registerBuiltinParts(ws);
28
- ws.registerPart(ArchimateCanvasPart);
29
-
30
- // The models open at once: a tab each. The first is this sample; New model makes empty ones.
31
- ws.addParts([{
32
- id: 'models', type: 'models', editorType: 'archimate-canvas', newModel: { analysis: true },
33
- models: [{
34
- id: 'modeller', name: 'Sample model', analysis: true,
35
- elements: [
36
- { id: 'customer', name: 'Customer', layer: 'business', type: 'business-actor', icon: '👤' },
37
- { id: 'order', name: 'Order Process', layer: 'business', type: 'business-process' },
38
- { id: 'order-svc', name: 'Order Service', layer: 'application', type: 'application-service' },
39
- { id: 'db', name: 'Database', layer: 'technology', type: 'node', icon: '🗄️' },
40
- ],
41
- relationships: [
42
- { source: 'customer', target: 'order', kind: 'assignment' },
43
- { source: 'order-svc', target: 'order', kind: 'serving' },
44
- { source: 'db', target: 'order-svc', kind: 'serving' },
45
- ],
46
- views: [{
47
- id: 'default',
48
- name: 'Default View',
49
- elementIds: ['customer', 'order', 'order-svc', 'db'],
50
- layout: {
51
- customer: { x: 80, y: 80 },
52
- order: { x: 300, y: 80 },
53
- 'order-svc': { x: 300, y: 200 },
54
- db: { x: 80, y: 200 },
55
- },
56
- }],
57
- }],
58
- }]);
59
-
60
- ws.registerPerspective('Modelling', { type: 'part', partId: 'models' });
61
- ws.activatePerspective('Modelling');
62
- }
63
- </script>
64
- <script src="../dist/renderengine-workspace.umd.js" onload="runModeller()"></script>
65
- </body>
66
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>ArchiMate Modeller</title>
7
+ </head>
8
+ <body>
9
+ <!-- Deliberately empty: the workbench and the modeller part are built from
10
+ JavaScript and JSON specs. A classic script (not type="module") so the
11
+ page also opens straight off disk. The modeller is the diagram editor's
12
+ canvas (ArchimateCanvasPart), one per model in a ModelsPart, so several
13
+ models can be open at once (File > New model, Open… in a new tab);
14
+ archimate-legacy.html keeps the graph-engine editor for comparison. -->
15
+ <script>
16
+ function runModeller() {
17
+ const { el, registerBuiltinParts, ArchimateCanvasPart } = RenderEngineWorkspace;
18
+
19
+ Object.assign(document.documentElement.style, { height: '100%' });
20
+ Object.assign(document.body.style, { margin: '0', height: '100%', display: 'flex' });
21
+
22
+ const ws = document.body.appendChild(el({
23
+ tag: 'ws-workspace',
24
+ attrs: { label: 'ArchiMate Modeller', theme: 'light' },
25
+ style: { flex: '1 1 auto', minHeight: '0' },
26
+ }));
27
+ registerBuiltinParts(ws);
28
+ ws.registerPart(ArchimateCanvasPart);
29
+
30
+ // The models open at once: a tab each. The first is this sample; New model makes empty ones.
31
+ // keep: every model is kept in this browser as it is edited, and those open reopen next time;
32
+ // File > This browser backs them up (to a folder chosen once, such as one OneDrive or Google Drive syncs).
33
+ ws.addParts([{
34
+ id: 'models', type: 'models', editorType: 'archimate-canvas', newModel: { analysis: true }, keep: true,
35
+ models: [{
36
+ id: 'modeller', name: 'Sample model', analysis: true,
37
+ elements: [
38
+ { id: 'customer', name: 'Customer', layer: 'business', type: 'business-actor', icon: '👤' },
39
+ { id: 'order', name: 'Order Process', layer: 'business', type: 'business-process' },
40
+ { id: 'order-svc', name: 'Order Service', layer: 'application', type: 'application-service' },
41
+ { id: 'db', name: 'Database', layer: 'technology', type: 'node', icon: '🗄️' },
42
+ ],
43
+ relationships: [
44
+ { source: 'customer', target: 'order', kind: 'assignment' },
45
+ { source: 'order-svc', target: 'order', kind: 'serving' },
46
+ { source: 'db', target: 'order-svc', kind: 'serving' },
47
+ ],
48
+ views: [{
49
+ id: 'default',
50
+ name: 'Default View',
51
+ elementIds: ['customer', 'order', 'order-svc', 'db'],
52
+ layout: {
53
+ customer: { x: 80, y: 80 },
54
+ order: { x: 300, y: 80 },
55
+ 'order-svc': { x: 300, y: 200 },
56
+ db: { x: 80, y: 200 },
57
+ },
58
+ }],
59
+ }],
60
+ }]);
61
+
62
+ ws.registerPerspective('Modelling', { type: 'part', partId: 'models' });
63
+ ws.activatePerspective('Modelling');
64
+ }
65
+ </script>
66
+ <script src="../dist/renderengine-workspace.umd.js" onload="runModeller()"></script>
67
+ </body>
68
+ </html>