@praxisui/visual-builder 10.0.0-rc.48 → 10.0.0-rc.49
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-17T22:43:07.679Z",
|
|
4
4
|
"packageName": "@praxisui/visual-builder",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.49",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 1,
|
|
@@ -1542,6 +1542,24 @@ class RuleBuilderService {
|
|
|
1542
1542
|
this._nodeSelected.next(nodeId);
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
|
+
resolveSnapshotSelection(snapshotState, fallbackSelectedNodeId) {
|
|
1546
|
+
const candidateId = snapshotState.selectedNodeId && snapshotState.nodes[snapshotState.selectedNodeId]
|
|
1547
|
+
? snapshotState.selectedNodeId
|
|
1548
|
+
: !snapshotState.selectedNodeId &&
|
|
1549
|
+
fallbackSelectedNodeId &&
|
|
1550
|
+
snapshotState.nodes[fallbackSelectedNodeId]
|
|
1551
|
+
? fallbackSelectedNodeId
|
|
1552
|
+
: undefined;
|
|
1553
|
+
const nodes = Object.keys(snapshotState.nodes).reduce((acc, id) => {
|
|
1554
|
+
const node = snapshotState.nodes[id];
|
|
1555
|
+
acc[id] =
|
|
1556
|
+
Boolean(node.selected) === (id === candidateId)
|
|
1557
|
+
? node
|
|
1558
|
+
: { ...node, selected: id === candidateId };
|
|
1559
|
+
return acc;
|
|
1560
|
+
}, {});
|
|
1561
|
+
return { nodes, selectedNodeId: candidateId };
|
|
1562
|
+
}
|
|
1545
1563
|
/**
|
|
1546
1564
|
* Undo last change
|
|
1547
1565
|
*/
|
|
@@ -1552,9 +1570,12 @@ class RuleBuilderService {
|
|
|
1552
1570
|
const snapshot = currentState.history[currentState.historyPosition - 1];
|
|
1553
1571
|
if (!snapshot)
|
|
1554
1572
|
return;
|
|
1573
|
+
const selection = this.resolveSnapshotSelection(snapshot.state, currentState.selectedNodeId);
|
|
1555
1574
|
this.updateState({
|
|
1556
1575
|
...currentState,
|
|
1557
1576
|
...snapshot.state,
|
|
1577
|
+
nodes: selection.nodes,
|
|
1578
|
+
selectedNodeId: selection.selectedNodeId,
|
|
1558
1579
|
history: currentState.history,
|
|
1559
1580
|
historyPosition: currentState.historyPosition - 1,
|
|
1560
1581
|
isDirty: true,
|
|
@@ -1573,9 +1594,12 @@ class RuleBuilderService {
|
|
|
1573
1594
|
const snapshot = currentState.history[currentState.historyPosition + 1];
|
|
1574
1595
|
if (!snapshot)
|
|
1575
1596
|
return;
|
|
1597
|
+
const selection = this.resolveSnapshotSelection(snapshot.state, currentState.selectedNodeId);
|
|
1576
1598
|
this.updateState({
|
|
1577
1599
|
...currentState,
|
|
1578
1600
|
...snapshot.state,
|
|
1601
|
+
nodes: selection.nodes,
|
|
1602
|
+
selectedNodeId: selection.selectedNodeId,
|
|
1579
1603
|
history: currentState.history,
|
|
1580
1604
|
historyPosition: currentState.historyPosition + 1,
|
|
1581
1605
|
isDirty: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/visual-builder",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.49",
|
|
4
4
|
"description": "Visual rule and expression builder for Praxis UI with JSON Logic authoring, validation and context variables.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"@angular/cdk": "^21.0.0",
|
|
9
9
|
"@angular/material": "^21.0.0",
|
|
10
10
|
"@angular/forms": "^21.0.0",
|
|
11
|
-
"@praxisui/settings-panel": "^10.0.0-rc.
|
|
12
|
-
"@praxisui/ai": "^10.0.0-rc.
|
|
13
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
14
|
-
"@praxisui/metadata-editor": "^10.0.0-rc.
|
|
11
|
+
"@praxisui/settings-panel": "^10.0.0-rc.49",
|
|
12
|
+
"@praxisui/ai": "^10.0.0-rc.49",
|
|
13
|
+
"@praxisui/core": "^10.0.0-rc.49",
|
|
14
|
+
"@praxisui/metadata-editor": "^10.0.0-rc.49",
|
|
15
15
|
"rxjs": "~7.8.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|