@luigi-project/core-modular 0.0.19-dev.202610160047 → 0.0.19-dev.202610170048
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 +20 -8
- package/luigi.js.map +1 -1
- package/package.json +1 -1
- package/utilities/helpers/routing-helpers.d.ts +15 -1
package/luigi.js
CHANGED
|
@@ -7481,6 +7481,15 @@ 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 t = {
|
|
7486
|
+
size: e.size,
|
|
7487
|
+
width: e.width,
|
|
7488
|
+
height: e.height,
|
|
7489
|
+
title: e.title
|
|
7490
|
+
};
|
|
7491
|
+
return e.keepPrevious && (t.keepPrevious = e.keepPrevious), t;
|
|
7492
|
+
},
|
|
7484
7493
|
getHashQueryParamSeparator() {
|
|
7485
7494
|
return this.defaultQueryParamSeparator;
|
|
7486
7495
|
},
|
|
@@ -8708,7 +8717,9 @@ var fi = {
|
|
|
8708
8717
|
l = e, u = U.getURLWithoutModalData(t, i), u && (l += "?" + u);
|
|
8709
8718
|
} else l = o.pathname, u = U.getURLWithoutModalData(o.search, i), u && (l += "?" + U.getURLWithoutModalData(o.search, i));
|
|
8710
8719
|
if (c = U.handleHistoryState(c, l), a !== e) {
|
|
8711
|
-
|
|
8720
|
+
r[i] = e;
|
|
8721
|
+
let a = U.getBookmarkableModalParams(t);
|
|
8722
|
+
if (a && Object.keys(a).length && (r[`${i}Params`] = JSON.stringify(a)), s) {
|
|
8712
8723
|
let e = location.hash.indexOf(n);
|
|
8713
8724
|
e !== -1 && (o.hash = o.hash.slice(0, e)), o.hash = `${o.hash}${n}${U.encodeParams(r)}`;
|
|
8714
8725
|
} else o.search = `?${U.encodeParams(r)}`;
|
|
@@ -8754,13 +8765,15 @@ var fi = {
|
|
|
8754
8765
|
}
|
|
8755
8766
|
updateModalDataInUrl(e, t, n) {
|
|
8756
8767
|
let r = U.getHashQueryParamSeparator(), i = U.getQueryParams(this.luigi), a = U.getModalViewParamName(this.luigi);
|
|
8757
|
-
i[a] = e
|
|
8758
|
-
let o =
|
|
8768
|
+
i[a] = e;
|
|
8769
|
+
let o = U.getBookmarkableModalParams(t);
|
|
8770
|
+
o && Object.keys(o).length && (i[`${a}Params`] = JSON.stringify(o));
|
|
8771
|
+
let s = new URL(location.href);
|
|
8759
8772
|
if (this.luigi.getConfigValue("routing.useHashRouting")) {
|
|
8760
8773
|
let e = location.hash.indexOf(r);
|
|
8761
|
-
e !== -1 && (
|
|
8762
|
-
} else
|
|
8763
|
-
n ? history.pushState(window.state, "",
|
|
8774
|
+
e !== -1 && (s.hash = s.hash.slice(0, e)), s.hash = `${s.hash}${r}${U.encodeParams(i)}`;
|
|
8775
|
+
} else s.search = `?${U.encodeParams(i)}`;
|
|
8776
|
+
n ? history.pushState(window.state, "", s.href) : history.replaceState(window.state, "", s.href);
|
|
8764
8777
|
}
|
|
8765
8778
|
checkInvalidateCache(e, t) {
|
|
8766
8779
|
if (!e) return;
|
|
@@ -9537,8 +9550,7 @@ var fi = {
|
|
|
9537
9550
|
let e = U.getContentViewParamPrefix(this.luigi), t = Object.entries(o).map(([t, n]) => e + encodeURIComponent(t) + "=" + encodeURIComponent(n)).join("&");
|
|
9538
9551
|
s += (s.includes("?") ? "&" : "?") + t;
|
|
9539
9552
|
}
|
|
9540
|
-
|
|
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, {
|
|
9553
|
+
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
9554
|
nodeParams: o,
|
|
9543
9555
|
pathParams: {},
|
|
9544
9556
|
searchParams: {}
|