@acorex-platform/framework-client 0.0.37 → 0.0.38
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/fesm2022/acorex-platform-framework-client-common.mjs +24 -4
- package/fesm2022/acorex-platform-framework-client-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-core.mjs +62 -3
- package/fesm2022/acorex-platform-framework-client-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-C74cBc-K.mjs → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-CvaOWbJx.mjs} +49 -48
- package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-CvaOWbJx.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-B6nG9dIS.mjs → acorex-platform-framework-client-layout-entity-attachments-page.component-Ds63Rt2n.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-B6nG9dIS.mjs.map → acorex-platform-framework-client-layout-entity-attachments-page.component-Ds63Rt2n.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-DLQA_Q2Y.mjs → acorex-platform-framework-client-layout-entity-bulk-entity.command-C0pohwdo.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-DLQA_Q2Y.mjs.map → acorex-platform-framework-client-layout-entity-bulk-entity.command-C0pohwdo.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-B4wC1iqZ.mjs → acorex-platform-framework-client-layout-entity-gallery-page.component-o2HuZrDN.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-B4wC1iqZ.mjs.map → acorex-platform-framework-client-layout-entity-gallery-page.component-o2HuZrDN.mjs.map} +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +1 -1
- package/fesm2022/acorex-platform-framework-client-runtime.mjs +46 -2
- package/fesm2022/acorex-platform-framework-client-runtime.mjs.map +1 -1
- package/package.json +2 -2
- package/types/acorex-platform-framework-client-common.d.ts +5 -0
- package/types/acorex-platform-framework-client-core.d.ts +19 -9
- package/types/acorex-platform-framework-client-layout-entity.d.ts +4 -0
- package/types/acorex-platform-framework-client-runtime.d.ts +8 -0
- package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-C74cBc-K.mjs.map +0 -1
|
@@ -9410,6 +9410,17 @@ class AXPMenuRouteAccessService {
|
|
|
9410
9410
|
if (this.hasDeclaredRoutePolicy(route)) {
|
|
9411
9411
|
return this.evaluateDeclaredRoutePolicy(route);
|
|
9412
9412
|
}
|
|
9413
|
+
return this.canAccessUrl(url);
|
|
9414
|
+
}
|
|
9415
|
+
/**
|
|
9416
|
+
* Menu-policy check for a URL (no route snapshot). Used by Open Details before navigate.
|
|
9417
|
+
* No matching menu item → allowed (lookup targets that are not in the menu).
|
|
9418
|
+
*/
|
|
9419
|
+
async canAccessUrl(url) {
|
|
9420
|
+
const normalizedUrl = this.normalizeUrl(url);
|
|
9421
|
+
if (SKIP_ROUTE_PATHS.has(normalizedUrl) || SKIP_ROUTE_PREFIXES.some((prefix) => normalizedUrl.startsWith(prefix))) {
|
|
9422
|
+
return true;
|
|
9423
|
+
}
|
|
9413
9424
|
// Avoid building/caching a shell-less menu tree before session is Authorized.
|
|
9414
9425
|
if (!this.sessionService.isAuthorized) {
|
|
9415
9426
|
return true;
|
|
@@ -9419,10 +9430,7 @@ class AXPMenuRouteAccessService {
|
|
|
9419
9430
|
if (!menuMatch) {
|
|
9420
9431
|
return true;
|
|
9421
9432
|
}
|
|
9422
|
-
|
|
9423
|
-
return true;
|
|
9424
|
-
}
|
|
9425
|
-
return false;
|
|
9433
|
+
return this.menuVisibility.isMenuBranchVisible(menuMatch.item, menuMatch.ancestors);
|
|
9426
9434
|
}
|
|
9427
9435
|
//#endregion
|
|
9428
9436
|
//#region ---- Utility Methods ----
|
|
@@ -9493,6 +9501,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
9493
9501
|
}] });
|
|
9494
9502
|
|
|
9495
9503
|
const APP_CHOOSER_ROUTE = '/auth/account/app-chooser';
|
|
9504
|
+
/** In-app navigations (e.g. Open Details) stay put instead of redirecting to 401. */
|
|
9505
|
+
function axpShouldStayOnCurrentPage(router, targetUrl) {
|
|
9506
|
+
const currentPath = router.url.split('#')[0]?.split('?')[0] ?? '';
|
|
9507
|
+
const targetPath = targetUrl.split('#')[0]?.split('?')[0] ?? '';
|
|
9508
|
+
if (!currentPath || currentPath === '/' || currentPath === targetPath) {
|
|
9509
|
+
return false;
|
|
9510
|
+
}
|
|
9511
|
+
return !currentPath.startsWith('/auth') && !currentPath.startsWith('/error');
|
|
9512
|
+
}
|
|
9496
9513
|
/**
|
|
9497
9514
|
|
|
9498
9515
|
* Blocks navigation when the target route is not accessible for the current user.
|
|
@@ -9519,6 +9536,9 @@ const AXPMenuRouteGuard = (route, state) => {
|
|
|
9519
9536
|
if (isAllowed instanceof UrlTree) {
|
|
9520
9537
|
return isAllowed;
|
|
9521
9538
|
}
|
|
9539
|
+
if (axpShouldStayOnCurrentPage(router, state.url)) {
|
|
9540
|
+
return false;
|
|
9541
|
+
}
|
|
9522
9542
|
return router.parseUrl(AXP_UNAUTHORIZED_ROUTE);
|
|
9523
9543
|
}));
|
|
9524
9544
|
};
|