kui-utils 0.0.15 → 0.0.17

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/index.js CHANGED
@@ -2000,7 +2000,8 @@ var updateQueryParams = function (newLink) {
2000
2000
  var hrefLinkParams = newLink.split(/\?|&/);
2001
2001
  var hrefParams = Object.fromEntries(new URLSearchParams(hrefLinkParams.slice(1).join("&")).entries());
2002
2002
  var searchParams = Object.fromEntries(searchQuery.entries());
2003
- var route = hrefLinkParams[0];
2003
+ // @ts-ignore
2004
+ var route = searchQuery.size ? hrefLinkParams[0] : window.location.pathname;
2004
2005
  Object.keys(searchParams).forEach(function (key, index) {
2005
2006
  if (key in hrefParams) {
2006
2007
  searchParams[key] = hrefParams[key];
@@ -2011,7 +2012,8 @@ var updateQueryParams = function (newLink) {
2011
2012
  }
2012
2013
  });
2013
2014
  Object.keys(hrefParams).forEach(function (key) {
2014
- route += "&".concat(key, "=").concat(hrefParams[key]);
2015
+ // @ts-ignore
2016
+ route += "".concat(searchQuery.size ? "&" : "?").concat(key, "=").concat(hrefParams[key]);
2015
2017
  });
2016
2018
  window.history.pushState({ route: route }, "", route);
2017
2019
  };
@@ -2067,9 +2069,12 @@ var Loader = /** @class */ (function () {
2067
2069
  function Loader(isLoading, delayTime) {
2068
2070
  var _this = this;
2069
2071
  this.startLoading = function (message, withoutCleanError) {
2072
+ var runMode = kuiUtilsSettings.getSettings().runMode;
2070
2073
  _this.isLoading = true;
2071
2074
  _this.loadingMessage = message;
2072
- _this.timeBeforeLoading = new Date().getTime();
2075
+ if (runMode !== "test") {
2076
+ _this.timeBeforeLoading = new Date().getTime();
2077
+ }
2073
2078
  if (!withoutCleanError)
2074
2079
  _this.cleanError();
2075
2080
  };