@fayz-ai/saas 0.6.6 → 0.7.0
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/README.md +1 -1
- package/dist/hooks/useModuleNavigation.d.ts.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/shell/hooks/useModuleNavigation.d.ts.map +1 -1
- package/package.json +8 -5
- package/src/hooks/useModuleNavigation.ts +7 -1
- package/src/shell/hooks/useModuleNavigation.ts +7 -1
package/dist/index.js
CHANGED
|
@@ -8844,13 +8844,17 @@ function useModuleNavigation(hashBase, depthMap, homeView = "summary") {
|
|
|
8844
8844
|
const rest = hash.slice(hashBase.length + 1);
|
|
8845
8845
|
const segments = rest.split("/");
|
|
8846
8846
|
if (segments.length === 1 && segments[0] === homeView) return homeView;
|
|
8847
|
-
const ACTION_KEYWORDS = ["edit", "detail", "view"];
|
|
8847
|
+
const ACTION_KEYWORDS = ["edit", "detail", "view", "post"];
|
|
8848
8848
|
if (segments.length >= 3) {
|
|
8849
8849
|
const maybeAction = segments[segments.length - 2];
|
|
8850
8850
|
if (ACTION_KEYWORDS.includes(maybeAction)) {
|
|
8851
8851
|
return segments.slice(0, -2).join("-") + "-" + maybeAction + ":" + segments[segments.length - 1];
|
|
8852
8852
|
}
|
|
8853
8853
|
}
|
|
8854
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
8855
|
+
if (segments.length >= 2 && UUID_RE.test(segments[segments.length - 1])) {
|
|
8856
|
+
return segments.slice(0, -1).join("-") + ":" + segments[segments.length - 1];
|
|
8857
|
+
}
|
|
8854
8858
|
return segments.join("-");
|
|
8855
8859
|
}
|
|
8856
8860
|
return homeView;
|