@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.
- package/README.md +219 -213
- package/REFERENCE.md +272 -6
- package/dist/renderengine-workspace.umd.js +11980 -7421
- package/dist/renderengine.umd.js +8991 -5784
- package/examples/archimate.html +68 -66
- package/examples/data-model.html +534 -0
- package/package.json +70 -68
- package/src/bian.js +182 -0
- package/src/charting/CheckboxTreeSelector.js +373 -304
- package/src/charting/DiagramEditor.js +53 -32
- package/src/charting/DiagramTypeRegistry.js +13 -3
- package/src/charting/ModelCheckDialog.js +63 -0
- package/src/charting/ModelChecker.js +26 -0
- package/src/charting/ViewTabStrip.js +94 -81
- package/src/charting/archimate/ArchimateCanvasEditor.js +825 -815
- package/src/charting/archimate/ArchimateElementTemplate.js +208 -195
- package/src/charting/datamodel/BianLandscapeReader.js +185 -0
- package/src/charting/datamodel/BianSemanticApiReader.js +183 -0
- package/src/charting/datamodel/DataModel.js +645 -0
- package/src/charting/datamodel/DataModelChecker.js +92 -0
- package/src/charting/datamodel/DataModelCompared.js +127 -0
- package/src/charting/datamodel/DataModelContext.js +108 -0
- package/src/charting/datamodel/DataModelFileFormat.js +33 -0
- package/src/charting/datamodel/DataModelPerspective.js +129 -0
- package/src/charting/datamodel/DataType.js +108 -0
- package/src/charting/datamodel/EnumerationType.js +51 -0
- package/src/charting/datamodel/LevelMapping.js +38 -0
- package/src/charting/datamodel/LevelSchema.js +41 -0
- package/src/charting/datamodel/ServiceDomain.js +177 -0
- package/src/charting/datamodel/ServiceLandscape.js +104 -0
- package/src/charting/datamodel/StructuredType.js +63 -0
- package/src/charting/datamodel/index.js +15 -0
- package/src/charting/diagramModel/MergeModelCommand.js +43 -37
- package/src/charting/diagramModel/OpenViewList.js +75 -0
- package/src/charting/diagramModel/ViewSetChecker.js +22 -34
- package/src/charting/diagrams/DataModelDiagram.js +160 -86
- package/src/charting/diagrams/DataModelRelationshipStrategy.js +94 -38
- package/src/charting/diagrams/EdgeGeometry.js +578 -553
- package/src/charting/diagrams/GraphDiagram.js +11 -1
- package/src/charting/diagrams/NodeGeometry.js +169 -158
- package/src/charting/diagrams/nesting.js +31 -0
- package/src/charting/glyphs/PersonGlyph.js +24 -23
- package/src/charting/modelTree/ModelTree.js +202 -164
- package/src/charting/modelTree/ModelTreePanel.js +36 -3
- package/src/charting/modelTree/TreeViewMode.js +131 -110
- package/src/charting/modelTree/modes/FlatTreeMode.js +32 -46
- package/src/charting/modelTree/modes/LayerGroupedTreeMode.js +47 -62
- package/src/charting/modelTree/modes/TypeGroupedTreeMode.js +46 -60
- package/src/datamodel.js +132 -122
- package/src/diagramCatalog.js +35 -30
- package/src/index.js +2666 -2659
- package/src/workspace/EditorShell.js +166 -67
- package/src/workspace/PanelLayout.js +56 -0
- package/src/workspace/index.js +1 -0
- package/src/workspace/layout/TabsNode.js +205 -191
- package/src/workspace/parts/ArchimateCanvasPart.js +10 -9
- package/src/workspace/parts/ChartPart.js +6 -1
- package/src/workspace/parts/DataModelPart.js +544 -0
- package/src/workspace/parts/DiagramEditorPart.js +2 -8
- package/src/workspace/parts/EditorPart.js +461 -407
- package/src/workspace/parts/ModelFile.js +216 -187
- package/src/workspace/parts/ModelsPart.js +483 -192
- package/src/workspace/storage/BackupFolder.js +145 -0
- package/src/workspace/storage/KeyValueStore.js +92 -0
- package/src/workspace/storage/ModelLibrary.js +65 -0
- package/src/workspace/workArea.js +417 -413
- package/src/yaml/YamlReader.js +372 -0
package/examples/archimate.html
CHANGED
|
@@ -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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{ id: '
|
|
39
|
-
{ id: '
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{ source: '
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</
|
|
66
|
-
|
|
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>
|