@jmruthers/pace-core 0.5.72 → 0.5.73
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/{DataTable-RCFGXSPQ.js → DataTable-INW5YIFV.js} +7 -5
- package/dist/UnifiedAuthProvider-6SYT5WFN.js +14 -0
- package/dist/UnifiedAuthProvider-6SYT5WFN.js.map +1 -0
- package/dist/{chunk-67FGPOHX.js → chunk-2PRPDH66.js} +6 -4
- package/dist/{chunk-67FGPOHX.js.map → chunk-2PRPDH66.js.map} +1 -1
- package/dist/chunk-3SP4P7NS.js +82 -0
- package/dist/chunk-3SP4P7NS.js.map +1 -0
- package/dist/{chunk-BUM2ZPYC.js → chunk-43C63KLH.js} +4 -4
- package/dist/{chunk-WMYLD5WP.js → chunk-5A4RL4BC.js} +4 -4
- package/dist/{chunk-2PDTIGS4.js → chunk-BYG6OSTC.js} +97 -48
- package/dist/chunk-BYG6OSTC.js.map +1 -0
- package/dist/{chunk-6RBH67W7.js → chunk-CDDYJCYU.js} +2 -77
- package/dist/chunk-CDDYJCYU.js.map +1 -0
- package/dist/{chunk-XC4ZCSO4.js → chunk-F24P24TZ.js} +6 -4
- package/dist/{chunk-XC4ZCSO4.js.map → chunk-F24P24TZ.js.map} +1 -1
- package/dist/{chunk-4CET7YQI.js → chunk-GBC5PC3N.js} +9 -945
- package/dist/chunk-GBC5PC3N.js.map +1 -0
- package/dist/{chunk-GDIBOLKV.js → chunk-LANO5IFV.js} +6 -4
- package/dist/{chunk-GDIBOLKV.js.map → chunk-LANO5IFV.js.map} +1 -1
- package/dist/{chunk-C353TCFY.js → chunk-M4UMXYNK.js} +2 -2
- package/dist/chunk-RJNE764D.js +953 -0
- package/dist/chunk-RJNE764D.js.map +1 -0
- package/dist/{chunk-MTI7X73I.js → chunk-UC2BWIK7.js} +7 -5
- package/dist/{chunk-MTI7X73I.js.map → chunk-UC2BWIK7.js.map} +1 -1
- package/dist/components.js +9 -7
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +7 -5
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +19 -16
- package/dist/index.js.map +1 -1
- package/dist/providers.js +10 -7
- package/dist/rbac/index.js +7 -5
- package/dist/utils.js +8 -6
- package/dist/utils.js.map +1 -1
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +1 -1
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +1 -1
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +1 -1
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventContextType.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/EventProviderProps.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +1 -1
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACContextType.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACProviderProps.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +1 -1
- package/docs/api/interfaces/RouteConfig.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/SwitchProps.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +2 -2
- package/package.json +1 -1
- package/src/components/NavigationMenu/NavigationMenu.tsx +32 -2
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +81 -46
- package/dist/chunk-2PDTIGS4.js.map +0 -1
- package/dist/chunk-4CET7YQI.js.map +0 -1
- package/dist/chunk-6RBH67W7.js.map +0 -1
- /package/dist/{DataTable-RCFGXSPQ.js.map → DataTable-INW5YIFV.js.map} +0 -0
- /package/dist/{chunk-BUM2ZPYC.js.map → chunk-43C63KLH.js.map} +0 -0
- /package/dist/{chunk-WMYLD5WP.js.map → chunk-5A4RL4BC.js.map} +0 -0
- /package/dist/{chunk-C353TCFY.js.map → chunk-M4UMXYNK.js.map} +0 -0
package/docs/api/modules.md
CHANGED
package/package.json
CHANGED
|
@@ -532,8 +532,38 @@ export const NavigationMenu = React.forwardRef<
|
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
// Check if user has permission to access this navigation item
|
|
535
|
-
|
|
536
|
-
|
|
535
|
+
if (!authContext) {
|
|
536
|
+
// No auth context - allow access (for unauthenticated scenarios)
|
|
537
|
+
if (onNavigate) {
|
|
538
|
+
onNavigate(item);
|
|
539
|
+
} else if (item.href) {
|
|
540
|
+
window.location.href = item.href;
|
|
541
|
+
}
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// Check if item should be visible (already filtered)
|
|
546
|
+
const isItemVisible = filteredItems.some(filtered => filtered.id === item.id);
|
|
547
|
+
|
|
548
|
+
// Check permissions if the item requires them
|
|
549
|
+
let hasPermission = true; // Default to true if no permission requirements
|
|
550
|
+
|
|
551
|
+
if (item.permissions && item.permissions.length > 0) {
|
|
552
|
+
hasPermission = item.permissions.some(permission => {
|
|
553
|
+
if (typeof permission !== 'string') return true;
|
|
554
|
+
return authContext.hasPermission(permission);
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
if (!hasPermission) {
|
|
559
|
+
// Check roles if permissions check failed or item has role requirements
|
|
560
|
+
if (item.roles && item.roles.length > 0) {
|
|
561
|
+
hasPermission = item.roles.some(role => {
|
|
562
|
+
if (typeof role !== 'string') return true;
|
|
563
|
+
return authContext.hasRole(role);
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
}
|
|
537
567
|
|
|
538
568
|
if (!hasPermission) {
|
|
539
569
|
// Handle access denied
|