@jmruthers/pace-core 0.5.163 → 0.5.165
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-E4OXEHSK.js → DataTable-HAATGNJY.js} +3 -3
- package/dist/{chunk-VX6OHZUX.js → chunk-23YYDN24.js} +2 -2
- package/dist/{chunk-T5VDEWVP.js → chunk-DDB2M4XO.js} +2 -2
- package/dist/{chunk-OMEXEOI6.js → chunk-GFSYFEVZ.js} +8 -8
- package/dist/chunk-GFSYFEVZ.js.map +1 -0
- package/dist/{chunk-2RTIUDN7.js → chunk-Q4NUEMNV.js} +7 -10
- package/dist/chunk-Q4NUEMNV.js.map +1 -0
- package/dist/components.js +3 -3
- package/dist/index.js +4 -4
- package/dist/rbac/index.js +2 -2
- package/dist/utils.js +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/BadgeProps.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CalendarProps.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/DataRecord.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/EventAppRoleData.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/ExportColumn.md +1 -1
- package/docs/api/interfaces/ExportOptions.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/GrantEventAppRoleParams.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/ProtectedRouteProps.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/RBACLogger.md +1 -1
- package/docs/api/interfaces/ResourcePermissions.md +1 -1
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RoleManagementResult.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/SessionRestorationLoaderProps.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/TabsContentProps.md +1 -1
- package/docs/api/interfaces/TabsListProps.md +1 -1
- package/docs/api/interfaces/TabsProps.md +1 -1
- package/docs/api/interfaces/TabsTriggerProps.md +1 -1
- package/docs/api/interfaces/TextareaProps.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/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UseResourcePermissionsOptions.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 +2 -2
- package/src/components/NavigationMenu/NavigationMenu.tsx +6 -10
- package/src/rbac/hooks/usePermissions.ts +7 -7
- package/dist/chunk-2RTIUDN7.js.map +0 -1
- package/dist/chunk-OMEXEOI6.js.map +0 -1
- /package/dist/{DataTable-E4OXEHSK.js.map → DataTable-HAATGNJY.js.map} +0 -0
- /package/dist/{chunk-VX6OHZUX.js.map → chunk-23YYDN24.js.map} +0 -0
- /package/dist/{chunk-T5VDEWVP.js.map → chunk-DDB2M4XO.js.map} +0 -0
package/docs/api/modules.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jmruthers/pace-core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.165",
|
|
4
4
|
"description": "Clean, modern React component library with Tailwind v4 styling and native utilities",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"build:docs:force": "node scripts/build-docs-incremental.js --force",
|
|
148
148
|
"build:all": "npm run build && npm run build:docs",
|
|
149
149
|
"validate:theme": "node scripts/validate-theme.js",
|
|
150
|
-
"prepublishOnly": "npm run build
|
|
150
|
+
"prepublishOnly": "npm run build",
|
|
151
151
|
"clean": "rimraf dist",
|
|
152
152
|
"_comment_test": "Test suite with various configurations",
|
|
153
153
|
"test": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192 --max-semi-space-size=128\" vitest run --config ../../vitest.config.ts",
|
|
@@ -595,17 +595,13 @@ export const NavigationMenu = React.forwardRef<
|
|
|
595
595
|
}, [filterByPermissions, stableScope.organisationId, stableScope.eventId, stableScope.appId, userId]);
|
|
596
596
|
|
|
597
597
|
// Create a stable scope reference that React can properly track
|
|
598
|
-
//
|
|
599
|
-
//
|
|
600
|
-
const orgId = stableScope.organisationId || '';
|
|
601
|
-
const eventId = stableScope.eventId;
|
|
602
|
-
const appId = stableScope.appId;
|
|
603
|
-
|
|
598
|
+
// CRITICAL: Use stableScope properties DIRECTLY in dependencies, not extracted values
|
|
599
|
+
// React needs to see the actual property changes to trigger re-memoization
|
|
604
600
|
const stableScopeForPermissions = React.useMemo(() => {
|
|
605
601
|
const scope = {
|
|
606
|
-
organisationId:
|
|
607
|
-
eventId: eventId,
|
|
608
|
-
appId: appId
|
|
602
|
+
organisationId: stableScope.organisationId || '',
|
|
603
|
+
eventId: stableScope.eventId,
|
|
604
|
+
appId: stableScope.appId
|
|
609
605
|
};
|
|
610
606
|
// Log when scope changes to verify React detects the change
|
|
611
607
|
if (filterByPermissions && scope.organisationId) {
|
|
@@ -617,7 +613,7 @@ export const NavigationMenu = React.forwardRef<
|
|
|
617
613
|
});
|
|
618
614
|
}
|
|
619
615
|
return scope;
|
|
620
|
-
}, [filterByPermissions,
|
|
616
|
+
}, [filterByPermissions, stableScope.organisationId, stableScope.eventId, stableScope.appId]);
|
|
621
617
|
|
|
622
618
|
const { permissions: permissionMap, hasAnyPermission, isLoading: permissionsLoading, error: permissionsError } = usePermissions(
|
|
623
619
|
userId as any,
|
|
@@ -78,13 +78,13 @@ export function usePermissions(userId: UUID, scope: Scope) {
|
|
|
78
78
|
React.useEffect(() => {
|
|
79
79
|
logger.warn('[usePermissions] Scope changed (useEffect)', {
|
|
80
80
|
userId,
|
|
81
|
-
organisationId:
|
|
82
|
-
eventId: eventId,
|
|
83
|
-
appId: appId,
|
|
84
|
-
hasAppId: !!appId,
|
|
85
|
-
hasOrganisationId: !!
|
|
81
|
+
organisationId: scope.organisationId,
|
|
82
|
+
eventId: scope.eventId,
|
|
83
|
+
appId: scope.appId,
|
|
84
|
+
hasAppId: !!scope.appId,
|
|
85
|
+
hasOrganisationId: !!scope.organisationId
|
|
86
86
|
});
|
|
87
|
-
}, [
|
|
87
|
+
}, [scope.organisationId, scope.eventId, scope.appId, userId]);
|
|
88
88
|
|
|
89
89
|
// Add timeout for missing organisation context (3 seconds)
|
|
90
90
|
useEffect(() => {
|
|
@@ -211,7 +211,7 @@ export function usePermissions(userId: UUID, scope: Scope) {
|
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
fetchPermissions();
|
|
214
|
-
}, [userId,
|
|
214
|
+
}, [userId, scope.organisationId, scope.eventId, scope.appId]);
|
|
215
215
|
|
|
216
216
|
const hasPermission = useCallback((permission: Permission): boolean => {
|
|
217
217
|
if (permissions['*']) {
|