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/cjs/index.js CHANGED
@@ -2026,7 +2026,8 @@ var updateQueryParams = function (newLink) {
2026
2026
  var hrefLinkParams = newLink.split(/\?|&/);
2027
2027
  var hrefParams = Object.fromEntries(new URLSearchParams(hrefLinkParams.slice(1).join("&")).entries());
2028
2028
  var searchParams = Object.fromEntries(searchQuery.entries());
2029
- var route = hrefLinkParams[0];
2029
+ // @ts-ignore
2030
+ var route = searchQuery.size ? hrefLinkParams[0] : window.location.pathname;
2030
2031
  Object.keys(searchParams).forEach(function (key, index) {
2031
2032
  if (key in hrefParams) {
2032
2033
  searchParams[key] = hrefParams[key];
@@ -2037,7 +2038,8 @@ var updateQueryParams = function (newLink) {
2037
2038
  }
2038
2039
  });
2039
2040
  Object.keys(hrefParams).forEach(function (key) {
2040
- route += "&".concat(key, "=").concat(hrefParams[key]);
2041
+ // @ts-ignore
2042
+ route += "".concat(searchQuery.size ? "&" : "?").concat(key, "=").concat(hrefParams[key]);
2041
2043
  });
2042
2044
  window.history.pushState({ route: route }, "", route);
2043
2045
  };
@@ -2093,9 +2095,12 @@ var Loader = /** @class */ (function () {
2093
2095
  function Loader(isLoading, delayTime) {
2094
2096
  var _this = this;
2095
2097
  this.startLoading = function (message, withoutCleanError) {
2098
+ var runMode = kuiUtilsSettings.getSettings().runMode;
2096
2099
  _this.isLoading = true;
2097
2100
  _this.loadingMessage = message;
2098
- _this.timeBeforeLoading = new Date().getTime();
2101
+ if (runMode !== "test") {
2102
+ _this.timeBeforeLoading = new Date().getTime();
2103
+ }
2099
2104
  if (!withoutCleanError)
2100
2105
  _this.cleanError();
2101
2106
  };