@netgrif/components-core 6.4.0-beta.6 → 6.4.0-beta.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/esm2020/lib/navigation/navigation-double-drawer/abstract-navigation-double-drawer.mjs +33 -11
- package/fesm2015/netgrif-components-core.mjs +32 -10
- package/fesm2015/netgrif-components-core.mjs.map +1 -1
- package/fesm2020/netgrif-components-core.mjs +32 -10
- package/fesm2020/netgrif-components-core.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -27613,8 +27613,9 @@ class AbstractNavigationDoubleDrawerComponent {
|
|
|
27613
27613
|
return;
|
|
27614
27614
|
}
|
|
27615
27615
|
this._currentNode = node;
|
|
27616
|
-
if (!node)
|
|
27616
|
+
if (!node) {
|
|
27617
27617
|
return;
|
|
27618
|
+
}
|
|
27618
27619
|
if (node.parentId && !node.parent) {
|
|
27619
27620
|
if (node.parentId === this._uriService.root.id) {
|
|
27620
27621
|
node.parent = this._uriService.root;
|
|
@@ -27630,7 +27631,14 @@ class AbstractNavigationDoubleDrawerComponent {
|
|
|
27630
27631
|
});
|
|
27631
27632
|
}
|
|
27632
27633
|
}
|
|
27633
|
-
this.
|
|
27634
|
+
if (this.nodeLoading$.isActive) {
|
|
27635
|
+
this.nodeLoading$.subscribe(() => {
|
|
27636
|
+
this.resolveMenuItems(node);
|
|
27637
|
+
});
|
|
27638
|
+
}
|
|
27639
|
+
else {
|
|
27640
|
+
this.resolveMenuItems(node);
|
|
27641
|
+
}
|
|
27634
27642
|
}
|
|
27635
27643
|
resolveMenuItems(node) {
|
|
27636
27644
|
if (this._uriService.isRoot(node)) {
|
|
@@ -27741,16 +27749,30 @@ class AbstractNavigationDoubleDrawerComponent {
|
|
|
27741
27749
|
this._uriService.activeNode = this._currentNode.parent;
|
|
27742
27750
|
}
|
|
27743
27751
|
onItemClick(item) {
|
|
27744
|
-
if (
|
|
27745
|
-
|
|
27746
|
-
this.
|
|
27747
|
-
this._uriService.activeNode =
|
|
27748
|
-
}
|
|
27749
|
-
|
|
27750
|
-
|
|
27752
|
+
if (item.resource === undefined) {
|
|
27753
|
+
// custom view represented only in nae.json
|
|
27754
|
+
if (item.processUri === this.currentNode.uriPath) {
|
|
27755
|
+
this._uriService.activeNode = this._currentNode;
|
|
27756
|
+
}
|
|
27757
|
+
else {
|
|
27758
|
+
this._uriService.activeNode = this._currentNode.parent;
|
|
27759
|
+
}
|
|
27751
27760
|
}
|
|
27752
27761
|
else {
|
|
27753
|
-
|
|
27762
|
+
const path = item.resource.immediateData.find(f => f.stringId === GroupNavigationConstants.ITEM_FIELD_ID_NODE_PATH)?.value;
|
|
27763
|
+
if (this.hasItemChildren(item) && !this.leftLoading$.isActive && !this.rightLoading$.isActive) {
|
|
27764
|
+
this._uriService.getNodeByPath(path).subscribe(node => {
|
|
27765
|
+
this._uriService.activeNode = node;
|
|
27766
|
+
}, error => {
|
|
27767
|
+
this._log.error(error);
|
|
27768
|
+
});
|
|
27769
|
+
}
|
|
27770
|
+
else if (!path.includes(this.currentNode.uriPath)) {
|
|
27771
|
+
this._uriService.activeNode = this._currentNode.parent;
|
|
27772
|
+
}
|
|
27773
|
+
else {
|
|
27774
|
+
this._uriService.activeNode = this._currentNode;
|
|
27775
|
+
}
|
|
27754
27776
|
}
|
|
27755
27777
|
}
|
|
27756
27778
|
hasItemChildren(item) {
|