@jsenv/navi 0.27.58 → 0.27.59
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/dist/jsenv_navi.js +13 -4
- package/dist/jsenv_navi.js.map +4 -4
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -14285,9 +14285,14 @@ This prevents cross-test pollution and ensures clean state.`,
|
|
|
14285
14285
|
// 1. We're navigating within the same route family (not to completely unrelated routes)
|
|
14286
14286
|
// 2. AND no matching route extracts this parameter from URL
|
|
14287
14287
|
// 3. AND parameter has no default value (making it truly optional)
|
|
14288
|
+
// 4. AND parameter is a path segment (not a search param)
|
|
14289
|
+
// Search params represent user preferences/choices and must survive
|
|
14290
|
+
// navigation away — only path segments are explicitly removed from
|
|
14291
|
+
// the URL when the route stops matching.
|
|
14288
14292
|
if (
|
|
14289
14293
|
matchingRouteInSameFamily &&
|
|
14290
|
-
!parameterExtractedByMatchingRoute
|
|
14294
|
+
!parameterExtractedByMatchingRoute &&
|
|
14295
|
+
pathConnectionMap.has(paramName)
|
|
14291
14296
|
) {
|
|
14292
14297
|
const defaultValue = connection.getDefaultValue();
|
|
14293
14298
|
if (defaultValue === undefined) {
|
|
@@ -14309,6 +14314,10 @@ This prevents cross-test pollution and ensures clean state.`,
|
|
|
14309
14314
|
console.debug(
|
|
14310
14315
|
`[route] Different route family: preserving ${paramName} signal value: ${paramSignal.value}`,
|
|
14311
14316
|
);
|
|
14317
|
+
} else if (queryConnectionMap.has(paramName)) {
|
|
14318
|
+
console.debug(
|
|
14319
|
+
`[route] Search param ${paramName}: preserving signal value (user choice): ${paramSignal.value}`,
|
|
14320
|
+
);
|
|
14312
14321
|
} else {
|
|
14313
14322
|
console.debug(
|
|
14314
14323
|
`[route] Parameter ${paramName} extracted by matching route: preserving signal value: ${paramSignal.value}`,
|
|
@@ -35663,6 +35672,9 @@ const Dialog = props => {
|
|
|
35663
35672
|
};
|
|
35664
35673
|
closeRequestHandler(e, closePermission, detail);
|
|
35665
35674
|
if (denied) {
|
|
35675
|
+
if (e.type === "cancel") {
|
|
35676
|
+
e.preventDefault();
|
|
35677
|
+
}
|
|
35666
35678
|
closePermission.allow = () => {
|
|
35667
35679
|
close(e, detail);
|
|
35668
35680
|
};
|
|
@@ -35713,9 +35725,6 @@ const Dialog = props => {
|
|
|
35713
35725
|
}
|
|
35714
35726
|
},
|
|
35715
35727
|
onCancel: e => {
|
|
35716
|
-
// The browser fires "cancel" (then closes the dialog) when the user presses Escape.
|
|
35717
|
-
// Prevent the native close so we control the close flow and dispatch navi_dialog_close.
|
|
35718
|
-
e.preventDefault();
|
|
35719
35728
|
onRequestClose(e);
|
|
35720
35729
|
},
|
|
35721
35730
|
onnavi_request_open: e => {
|