@stemy/ngx-utils 19.4.13 → 19.4.14
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.
|
@@ -788,12 +788,11 @@ class StateService {
|
|
|
788
788
|
return event;
|
|
789
789
|
}), filter(e => e instanceof NavigationEnd))
|
|
790
790
|
.subscribe(() => {
|
|
791
|
-
const routerStateSnapshot = this.router.routerState.snapshot;
|
|
792
791
|
let context = this.contexts?.getContext("primary");
|
|
793
792
|
let segments = [];
|
|
794
793
|
const components = [];
|
|
795
794
|
const snapshots = [];
|
|
796
|
-
while (context) {
|
|
795
|
+
while (context && context.route) {
|
|
797
796
|
const snapshot = context.route.snapshot;
|
|
798
797
|
snapshots.push(snapshot);
|
|
799
798
|
segments = segments.concat(snapshot.url);
|
|
@@ -5887,17 +5886,18 @@ class DropdownDirective {
|
|
|
5887
5886
|
setTimeout(() => this.hide(), event.type == "touchend" ? 250 : 100);
|
|
5888
5887
|
};
|
|
5889
5888
|
this.onKeyDown = (event) => {
|
|
5890
|
-
const input = event.target;
|
|
5891
|
-
const notInput = input
|
|
5892
|
-
if ("Tab" === event.key ||
|
|
5889
|
+
const input = (event.composedPath()?.shift() || event.target);
|
|
5890
|
+
const notInput = !input || (input.tagName !== "INPUT" && input.tagName !== "TEXTAREA");
|
|
5891
|
+
if ("Tab" === event.key || notInput) {
|
|
5893
5892
|
event.stopPropagation();
|
|
5894
5893
|
event.preventDefault();
|
|
5895
5894
|
}
|
|
5896
5895
|
if ("Esc" === event.key || "Escape" === event.key) {
|
|
5897
5896
|
this.hide();
|
|
5898
|
-
return;
|
|
5897
|
+
return false;
|
|
5899
5898
|
}
|
|
5900
5899
|
this.onKeyboard.emit(event);
|
|
5900
|
+
return true;
|
|
5901
5901
|
};
|
|
5902
5902
|
}
|
|
5903
5903
|
ngOnDestroy() {
|
|
@@ -6666,7 +6666,7 @@ class DynamicTableComponent {
|
|
|
6666
6666
|
this.hasQuery = this.cols.some(col => this.realColumns[col].filter);
|
|
6667
6667
|
if (changes.orderBy && this.realColumns && this.cols) {
|
|
6668
6668
|
const sortable = this.cols.filter(c => this.realColumns[c].sort);
|
|
6669
|
-
this.orderBy = this.orderBy
|
|
6669
|
+
this.orderBy = sortable.includes(this.orderBy) ? this.orderBy : sortable[0] || null;
|
|
6670
6670
|
}
|
|
6671
6671
|
if (!changes.data && !changes.parallelData && !changes.dataLoader && !changes.itemsPerPage && !changes.orderBy && !changes.orderDescending)
|
|
6672
6672
|
return;
|