@stemy/ngx-utils 19.4.12 → 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);
@@ -1913,7 +1912,7 @@ class LoaderUtils {
1913
1912
  const time = new Date().getTime();
1914
1913
  const script = document.createElement("script");
1915
1914
  script.type = type;
1916
- script.src = `${src}?time=${time}`;
1915
+ script.src = src?.startsWith("data:") ? src : `${src}?time=${time}`;
1917
1916
  script.async = async;
1918
1917
  return script;
1919
1918
  });
@@ -1924,7 +1923,7 @@ class LoaderUtils {
1924
1923
  const link = document.createElement("link");
1925
1924
  link.rel = "stylesheet";
1926
1925
  link.type = "text/css";
1927
- link.href = `${src}?time=${time}`;
1926
+ link.href = src?.startsWith("data:") ? src : `${src}?time=${time}`;
1928
1927
  return link;
1929
1928
  });
1930
1929
  }
@@ -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 && input.tagName !== "INPUT" && input.tagName !== "TEXTAREA";
5892
- if ("Tab" === event.key || !input || notInput) {
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 in sortable ? this.orderBy : sortable[0] || null;
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;