@peter.prib/renderengine 0.10.0 → 0.13.0
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 +10 -4
- package/dist/renderengine-workspace.umd.js +5779 -3731
- package/dist/renderengine.umd.js +5757 -3725
- package/documentation/REFERENCE.md +3291 -3077
- package/package.json +2 -2
- package/src/charting/Axis.js +47 -5
- package/src/charting/Chart.js +25 -0
- package/src/charting/ChartChooser.js +5 -4
- package/src/charting/DiagramEditor.js +239 -34
- package/src/charting/Legend.js +16 -0
- package/src/charting/ModelFileFormat.js +47 -0
- package/src/charting/archimate/ArchimateCanvasEditor.js +1108 -1012
- package/src/charting/archimate/deleteFromModel.js +57 -0
- package/src/charting/archimate/elementMenuItems.js +3 -1
- package/src/charting/archimate/heatMaps.js +169 -0
- package/src/charting/archimate/index.js +1 -0
- package/src/charting/charts/BarChart.js +5 -5
- package/src/charting/charts/BarChartBase.js +21 -3
- package/src/charting/charts/GroupedBarChart.js +42 -22
- package/src/charting/charts/LineChart.js +9 -8
- package/src/charting/charts/PieChart.js +2 -2
- package/src/charting/charts/TableChart.js +34 -5
- package/src/charting/diagrams/ArchimateModel.js +33 -0
- package/src/charting/diagrams/DeleteFromModelCommand.js +81 -0
- package/src/charting/diagrams/EdgeGeometry.js +16 -0
- package/src/charting/edgeStyle/EdgeStyleSchema.js +6 -2
- package/src/charting/pivot/PivotChart.js +50 -0
- package/src/charting/pivot/PivotGridChart.js +191 -0
- package/src/charting/pivot/PivotView.js +740 -0
- package/src/charting/table/TableView.js +84 -15
- package/src/charting/table/TableViewChart.js +5 -3
- package/src/charting/templates/Template.js +10 -0
- package/src/exportImage.js +45 -18
- package/src/index.js +2899 -2807
- package/src/workspace/parts/ArchimateCanvasPart.js +3 -0
- package/src/workspace/parts/DiagramEditorPart.js +2 -0
- package/src/workspace/parts/ModelHosted.js +15 -4
|
@@ -253,6 +253,8 @@ export class ArchimateCanvasPart extends EditorPart {
|
|
|
253
253
|
if (previous) {
|
|
254
254
|
this.editor.showGrid = previous.showGrid;
|
|
255
255
|
this.editor.gridSize = previous.gridSize;
|
|
256
|
+
this.editor.showExportArea = previous.showExportArea;
|
|
257
|
+
this.editor.exportOptions = previous.exportOptions;
|
|
256
258
|
}
|
|
257
259
|
|
|
258
260
|
// A canvas's palette is Archi's canvas palette; another view's, ArchiMate's element types.
|
|
@@ -351,6 +353,7 @@ export class ArchimateCanvasPart extends EditorPart {
|
|
|
351
353
|
this.editor?.selectTemplate(instanceId);
|
|
352
354
|
},
|
|
353
355
|
addToView: (el) => this.editor?.showElement(el.id, this.editor.visibleCentre()),
|
|
356
|
+
deleteFromModel: (el) => this.editor?.askDeleteFromModel([el.id]),
|
|
354
357
|
});
|
|
355
358
|
}
|
|
356
359
|
|
|
@@ -89,6 +89,8 @@ export class DiagramEditorPart extends EditorPart {
|
|
|
89
89
|
if (previous) {
|
|
90
90
|
this.editor.showGrid = previous.showGrid;
|
|
91
91
|
this.editor.gridSize = previous.gridSize;
|
|
92
|
+
this.editor.showExportArea = previous.showExportArea;
|
|
93
|
+
this.editor.exportOptions = previous.exportOptions;
|
|
92
94
|
}
|
|
93
95
|
this.editor.initPaletteForDiagramType(palette, model.templateType);
|
|
94
96
|
this.menuBar?.dispose();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModelFile } from './ModelFile.js';
|
|
2
2
|
import { EditorPart } from './EditorPart.js';
|
|
3
|
-
import { modelFileMenuItems } from '../../charting/ModelFileFormat.js';
|
|
3
|
+
import { modelFileMenuItems, askPasteImport } from '../../charting/ModelFileFormat.js';
|
|
4
4
|
import { pickFile } from '../../charting/toolbar/pickFile.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -121,9 +121,20 @@ export const ModelHosted = (Base) => class extends Base {
|
|
|
121
121
|
|
|
122
122
|
/** Import ▸: each format that only reads (another tool's export), opened as a new model. */
|
|
123
123
|
importItems() {
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
return [
|
|
125
|
+
...modelFileMenuItems(this.fileFormats().filter(f => f.exports === false), {
|
|
126
|
+
model: () => this.model, only: 'import', onImport: (model) => this.onImported(model), document: () => this.document,
|
|
127
|
+
}),
|
|
128
|
+
...this.pasteItems(),
|
|
129
|
+
];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Paste …: a model in each of its text formats from pasted text (an assistant's answer, say), as Open… would bring it. */
|
|
133
|
+
pasteItems() {
|
|
134
|
+
return this.fileFormats().filter(f => f.imports && !f.readsBytes).map(format => ({
|
|
135
|
+
label: `From pasted text (${format.label})…`,
|
|
136
|
+
action: () => askPasteImport(format, { onImport: (model) => this.onImported(model), document: this.document ?? globalThis.document }),
|
|
137
|
+
}));
|
|
127
138
|
}
|
|
128
139
|
|
|
129
140
|
/**
|