archgraph-argo 0.19.0 → 0.19.1
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.
|
@@ -698,6 +698,7 @@ function syncGraphToQea(graph, qeaPath, opts) {
|
|
|
698
698
|
RectRight: 40 + col * 260 + 180, RectBottom: 40 + row * 160 + 90,
|
|
699
699
|
Sequence: seq,
|
|
700
700
|
});
|
|
701
|
+
placedObjs.add(Number(oid));
|
|
701
702
|
seq++;
|
|
702
703
|
}
|
|
703
704
|
if (newObjs.length > 0 && !o.dryRun) {
|
|
@@ -731,6 +732,7 @@ function syncGraphToQea(graph, qeaPath, opts) {
|
|
|
731
732
|
if (cid === undefined || cid < 0) { continue; }
|
|
732
733
|
if (placedLinks.has(Number(cid))) { continue; }
|
|
733
734
|
newLinks.push({ DiagramID: diagramId, ConnectorID: Number(cid), Style: '', Geometry: '' });
|
|
735
|
+
placedLinks.add(Number(cid));
|
|
734
736
|
}
|
|
735
737
|
if (newLinks.length > 0 && !o.dryRun) {
|
|
736
738
|
insertMany(db, 't_diagramlinks', ['DiagramID', 'ConnectorID', 'Style', 'Geometry'], newLinks);
|
|
@@ -116,12 +116,19 @@ function validateGraphSemantics(document, errors) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
const includedElementIds = new Set(view.included_elements || []);
|
|
119
|
+
if (includedElementIds.size !== (view.included_elements || []).length) {
|
|
120
|
+
errors.push(`views '${view.view_id}' must not contain duplicate included_elements`);
|
|
121
|
+
}
|
|
119
122
|
for (const elementId of view.included_elements || []) {
|
|
120
123
|
elementIdsIncludedInViews.add(elementId);
|
|
121
124
|
if (!elementById.has(elementId)) {
|
|
122
125
|
errors.push(`views '${view.view_id}' references missing included element '${elementId}'`);
|
|
123
126
|
}
|
|
124
127
|
}
|
|
128
|
+
const includedRelationshipIds = new Set(view.included_relationships || []);
|
|
129
|
+
if (includedRelationshipIds.size !== (view.included_relationships || []).length) {
|
|
130
|
+
errors.push(`views '${view.view_id}' must not contain duplicate included_relationships`);
|
|
131
|
+
}
|
|
125
132
|
for (const relationshipId of view.included_relationships || []) {
|
|
126
133
|
relationshipIdsIncludedInViews.add(relationshipId);
|
|
127
134
|
const rel = relationshipById.get(relationshipId);
|
|
@@ -1519,11 +1519,18 @@ function applyMutations(document, mutations) {
|
|
|
1519
1519
|
requestedId: mutation.view.view_id,
|
|
1520
1520
|
});
|
|
1521
1521
|
} else {
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1522
|
+
const newView = clone(mutation.view);
|
|
1523
|
+
if (Array.isArray(newView.included_elements)) {
|
|
1524
|
+
newView.included_elements = addUnique([], newView.included_elements);
|
|
1525
|
+
}
|
|
1526
|
+
if (Array.isArray(newView.included_relationships)) {
|
|
1527
|
+
newView.included_relationships = addUnique([], newView.included_relationships);
|
|
1528
|
+
}
|
|
1529
|
+
nextDocument.views.push(newView);
|
|
1530
|
+
upsertSubdiagramViewIntoElement(nextDocument, newView.parent_element_id, newView);
|
|
1531
|
+
touchedViewIds.add(newView.view_id);
|
|
1532
|
+
viewLimitCheckIds.add(newView.view_id);
|
|
1533
|
+
mutationSummaries.push({ type: mutation.type, id: newView.view_id });
|
|
1527
1534
|
}
|
|
1528
1535
|
continue;
|
|
1529
1536
|
}
|
|
@@ -1538,7 +1545,14 @@ function applyMutations(document, mutations) {
|
|
|
1538
1545
|
}
|
|
1539
1546
|
const oldParentId = view.parent_element_id;
|
|
1540
1547
|
const oldViewId = view.view_id;
|
|
1541
|
-
|
|
1548
|
+
const patch = clone(mutation.patch);
|
|
1549
|
+
if (Array.isArray(patch.included_elements)) {
|
|
1550
|
+
patch.included_elements = addUnique([], patch.included_elements);
|
|
1551
|
+
}
|
|
1552
|
+
if (Array.isArray(patch.included_relationships)) {
|
|
1553
|
+
patch.included_relationships = addUnique([], patch.included_relationships);
|
|
1554
|
+
}
|
|
1555
|
+
Object.assign(view, patch);
|
|
1542
1556
|
if (oldParentId !== view.parent_element_id) {
|
|
1543
1557
|
removeSubdiagramViewFromElement(nextDocument, oldParentId, oldViewId);
|
|
1544
1558
|
}
|
package/package.json
CHANGED