@elderbyte/ngx-starter 19.3.0 → 19.3.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.
|
@@ -35616,9 +35616,21 @@ class ElderTabGroupRoutingDirective {
|
|
|
35616
35616
|
handleFragmentParamsChange(params) {
|
|
35617
35617
|
const tabMarker = this.getTabMarker(params);
|
|
35618
35618
|
if (tabMarker) {
|
|
35619
|
-
this.
|
|
35619
|
+
this.tryActivateTabByMarkerHierarchy(tabMarker);
|
|
35620
35620
|
}
|
|
35621
35621
|
}
|
|
35622
|
+
tryActivateTabByMarkerHierarchy(tabMarkerHierarchy) {
|
|
35623
|
+
const markers = tabMarkerHierarchy.split(',');
|
|
35624
|
+
let success = false;
|
|
35625
|
+
for (const marker of markers) {
|
|
35626
|
+
success = this.activateTabByMarker(marker);
|
|
35627
|
+
if (success) {
|
|
35628
|
+
break;
|
|
35629
|
+
}
|
|
35630
|
+
}
|
|
35631
|
+
// remember tab marker in case of failure to retry later.
|
|
35632
|
+
this.lastFailedTabMarkerHierarchy = success ? null : tabMarkerHierarchy;
|
|
35633
|
+
}
|
|
35622
35634
|
activateTabByMarker(tabMarker) {
|
|
35623
35635
|
let success;
|
|
35624
35636
|
if (this.isIndexMarker(tabMarker)) {
|
|
@@ -35629,8 +35641,7 @@ class ElderTabGroupRoutingDirective {
|
|
|
35629
35641
|
// if no index is given we assume the marker is the id of the tab.
|
|
35630
35642
|
success = this.activateTabById(tabMarker);
|
|
35631
35643
|
}
|
|
35632
|
-
|
|
35633
|
-
this.lastFailedTabMarker = success ? null : tabMarker;
|
|
35644
|
+
return success;
|
|
35634
35645
|
}
|
|
35635
35646
|
activateTabByIndex(indexToActivate) {
|
|
35636
35647
|
if (indexToActivate !== this.activeTabIndex) {
|
|
@@ -35676,14 +35687,14 @@ class ElderTabGroupRoutingDirective {
|
|
|
35676
35687
|
}
|
|
35677
35688
|
handleTabChangeEvent(tabChangeEvent) {
|
|
35678
35689
|
this._log.trace('Handling tabChangeEvent: ', tabChangeEvent);
|
|
35679
|
-
this.
|
|
35690
|
+
this.lastFailedTabMarkerHierarchy = null;
|
|
35680
35691
|
this.activeElderTab = this.findElderTabByTab(tabChangeEvent.tab);
|
|
35681
35692
|
this.updateFragmentParam();
|
|
35682
35693
|
}
|
|
35683
35694
|
retryLastFailedActivation() {
|
|
35684
|
-
if (this.
|
|
35685
|
-
this._log.trace('Retrying to activate tab by marker:', this.
|
|
35686
|
-
this.
|
|
35695
|
+
if (this.lastFailedTabMarkerHierarchy) {
|
|
35696
|
+
this._log.trace('Retrying to activate tab by marker:', this.lastFailedTabMarkerHierarchy);
|
|
35697
|
+
this.tryActivateTabByMarkerHierarchy(this.lastFailedTabMarkerHierarchy);
|
|
35687
35698
|
}
|
|
35688
35699
|
}
|
|
35689
35700
|
setSelectedIndex(index) {
|