@luigi-project/core-modular 0.0.19-dev.202610150045 → 0.0.19-dev.202610151915

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/luigi.js CHANGED
@@ -7481,6 +7481,10 @@ var fi = {
7481
7481
  let t = this.getQueryParam(`${this.getModalViewParamName(e)}Params`, e);
7482
7482
  return t && JSON.parse(t);
7483
7483
  },
7484
+ getBookmarkableModalParams(e) {
7485
+ let { nodeParams: t, closebtn_data_testid: n, ...r } = e || {};
7486
+ return r;
7487
+ },
7484
7488
  getHashQueryParamSeparator() {
7485
7489
  return this.defaultQueryParamSeparator;
7486
7490
  },
@@ -8708,7 +8712,9 @@ var fi = {
8708
8712
  l = e, u = U.getURLWithoutModalData(t, i), u && (l += "?" + u);
8709
8713
  } else l = o.pathname, u = U.getURLWithoutModalData(o.search, i), u && (l += "?" + U.getURLWithoutModalData(o.search, i));
8710
8714
  if (c = U.handleHistoryState(c, l), a !== e) {
8711
- if (r[i] = e, t && Object.keys(t).length && (r[`${i}Params`] = JSON.stringify(t)), s) {
8715
+ r[i] = e;
8716
+ let a = U.getBookmarkableModalParams(t);
8717
+ if (a && Object.keys(a).length && (r[`${i}Params`] = JSON.stringify(a)), s) {
8712
8718
  let e = location.hash.indexOf(n);
8713
8719
  e !== -1 && (o.hash = o.hash.slice(0, e)), o.hash = `${o.hash}${n}${U.encodeParams(r)}`;
8714
8720
  } else o.search = `?${U.encodeParams(r)}`;
@@ -8754,13 +8760,15 @@ var fi = {
8754
8760
  }
8755
8761
  updateModalDataInUrl(e, t, n) {
8756
8762
  let r = U.getHashQueryParamSeparator(), i = U.getQueryParams(this.luigi), a = U.getModalViewParamName(this.luigi);
8757
- i[a] = e, t && Object.keys(t).length && (i[`${a}Params`] = JSON.stringify(t));
8758
- let o = new URL(location.href);
8763
+ i[a] = e;
8764
+ let o = U.getBookmarkableModalParams(t);
8765
+ o && Object.keys(o).length && (i[`${a}Params`] = JSON.stringify(o));
8766
+ let s = new URL(location.href);
8759
8767
  if (this.luigi.getConfigValue("routing.useHashRouting")) {
8760
8768
  let e = location.hash.indexOf(r);
8761
- e !== -1 && (o.hash = o.hash.slice(0, e)), o.hash = `${o.hash}${r}${U.encodeParams(i)}`;
8762
- } else o.search = `?${U.encodeParams(i)}`;
8763
- n ? history.pushState(window.state, "", o.href) : history.replaceState(window.state, "", o.href);
8769
+ e !== -1 && (s.hash = s.hash.slice(0, e)), s.hash = `${s.hash}${r}${U.encodeParams(i)}`;
8770
+ } else s.search = `?${U.encodeParams(i)}`;
8771
+ n ? history.pushState(window.state, "", s.href) : history.replaceState(window.state, "", s.href);
8764
8772
  }
8765
8773
  checkInvalidateCache(e, t) {
8766
8774
  if (!e) return;
@@ -9537,8 +9545,7 @@ var fi = {
9537
9545
  let e = U.getContentViewParamPrefix(this.luigi), t = Object.entries(o).map(([t, n]) => e + encodeURIComponent(t) + "=" + encodeURIComponent(n)).join("&");
9538
9546
  s += (s.includes("?") ? "&" : "?") + t;
9539
9547
  }
9540
- let { nodeParams: c, ...l } = a;
9541
- this.luigi.getConfigValue("routing.showModalPathInUrl") && this.modalService.getModalStackLength() === 0 && this.routingService.appendModalDataToUrl(s, l), this.luigi.getEngine()._ui.openModal(this.luigi, i, a, n, {
9548
+ this.luigi.getConfigValue("routing.showModalPathInUrl") && this.modalService.getModalStackLength() === 0 && this.routingService.appendModalDataToUrl(s, a), this.luigi.getEngine()._ui.openModal(this.luigi, i, a, n, {
9542
9549
  nodeParams: o,
9543
9550
  pathParams: {},
9544
9551
  searchParams: {}