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