@jmruthers/pace-core 0.6.2 → 0.6.3
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/CHANGELOG.md +45 -0
- package/cursor-rules/00-pace-core-compliance.mdc +34 -2
- package/dist/{AuthService-BPvc3Ka0.d.ts → AuthService-Cb34EQs3.d.ts} +9 -1
- package/dist/{DataTable-TPTKCX4D.js → DataTable-THFPBKTP.js} +9 -8
- package/dist/{PublicPageProvider-DC6kCaqf.d.ts → PublicPageProvider-DEMpysFR.d.ts} +45 -67
- package/dist/{UnifiedAuthProvider-CVcTjx-d.d.ts → UnifiedAuthProvider-CKvHP1MK.d.ts} +1 -8
- package/dist/{UnifiedAuthProvider-CH6Z342H.js → UnifiedAuthProvider-KAGUYQ4J.js} +5 -4
- package/dist/{api-MVVQZLJI.js → api-IAGWF3ZG.js} +10 -10
- package/dist/{audit-B5P6FFIR.js → audit-V53FV5AG.js} +2 -2
- package/dist/{chunk-SFZUDBL5.js → chunk-2T2IG7T7.js} +70 -56
- package/dist/chunk-2T2IG7T7.js.map +1 -0
- package/dist/{chunk-MMZ7JXPU.js → chunk-6Z7LTB3D.js} +13 -21
- package/dist/{chunk-MMZ7JXPU.js.map → chunk-6Z7LTB3D.js.map} +1 -1
- package/dist/{chunk-6J4GEEJR.js → chunk-CNCQDFLN.js} +53 -27
- package/dist/chunk-CNCQDFLN.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +11 -0
- package/dist/{chunk-EHMR7VYL.js → chunk-DWUBLJJM.js} +361 -187
- package/dist/chunk-DWUBLJJM.js.map +1 -0
- package/dist/{chunk-2UOI2FG5.js → chunk-HFZBI76P.js} +4 -4
- package/dist/{chunk-F2IMUDXZ.js → chunk-M7MPQISP.js} +2 -2
- package/dist/{chunk-3XC4CPTD.js → chunk-PQBSKX33.js} +244 -5727
- package/dist/chunk-PQBSKX33.js.map +1 -0
- package/dist/chunk-QRPVRXYT.js +226 -0
- package/dist/chunk-QRPVRXYT.js.map +1 -0
- package/dist/{chunk-24UVZUZG.js → chunk-RWEBCB47.js} +129 -387
- package/dist/chunk-RWEBCB47.js.map +1 -0
- package/dist/{chunk-XWQCNGTQ.js → chunk-YDQHOZNA.js} +173 -79
- package/dist/chunk-YDQHOZNA.js.map +1 -0
- package/dist/{chunk-NECFR5MM.js → chunk-ZNIWI3UC.js} +562 -644
- package/dist/chunk-ZNIWI3UC.js.map +1 -0
- package/dist/components.d.ts +2 -2
- package/dist/components.js +12 -13
- package/dist/contextValidator-3JNZKUTX.js +9 -0
- package/dist/contextValidator-3JNZKUTX.js.map +1 -0
- package/dist/eslint-rules/pace-core-compliance.cjs +106 -0
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +7 -6
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +21 -16
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +3 -3
- package/dist/providers.js +4 -3
- package/dist/rbac/index.d.ts +67 -27
- package/dist/rbac/index.js +15 -8
- package/dist/styles/index.js +1 -1
- package/dist/theming/runtime.js +1 -1
- package/dist/types.js +1 -1
- package/dist/{usePublicRouteParams-1oMokgLF.d.ts → usePublicRouteParams-i3qtoBgg.d.ts} +7 -16
- package/dist/utils.js +5 -7
- package/dist/utils.js.map +1 -1
- package/docs/api/README.md +14 -16
- package/docs/api/modules.md +3796 -2513
- package/docs/components/context-selector.md +126 -0
- package/docs/migration/RBAC_SCOPE_MIGRATION.md +385 -0
- package/docs/pace-mint-fix-auto-selection.md +218 -0
- package/docs/pace-mint-rbac-setup.md +391 -0
- package/docs/rbac/secure-client-protection.md +330 -0
- package/package.json +3 -3
- package/scripts/audit/core/checks/compliance.cjs +72 -0
- package/scripts/audit/core/checks/dependencies.cjs +559 -28
- package/scripts/audit/core/checks/documentation.cjs +68 -3
- package/scripts/audit/core/checks/environment.cjs +2 -14
- package/scripts/audit/core/checks/error-handling.cjs +47 -6
- package/src/components/ContextSelector/ContextSelector.tsx +384 -0
- package/src/components/ContextSelector/index.ts +3 -0
- package/src/components/DataTable/components/RowComponent.tsx +19 -19
- package/src/components/DataTable/components/UnifiedTableBody.tsx +2 -2
- package/src/components/DataTable/hooks/useDataTablePermissions.ts +8 -6
- package/src/components/Dialog/Dialog.tsx +29 -1
- package/src/components/FileDisplay/FileDisplay.tsx +42 -10
- package/src/components/Header/Header.test.tsx +43 -73
- package/src/components/Header/Header.tsx +44 -45
- package/src/components/PaceAppLayout/PaceAppLayout.integration.test.tsx +10 -19
- package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +2 -2
- package/src/components/PaceAppLayout/PaceAppLayout.security.test.tsx +5 -5
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +9 -9
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +135 -33
- package/src/components/PaceAppLayout/README.md +14 -17
- package/src/components/PaceAppLayout/test-setup.tsx +2 -2
- package/src/components/index.ts +5 -5
- package/src/eslint-rules/pace-core-compliance.cjs +106 -0
- package/src/hooks/__tests__/useAppConfig.unit.test.ts +4 -98
- package/src/hooks/useAppConfig.ts +15 -30
- package/src/hooks/useFileDisplay.ts +77 -50
- package/src/index.ts +4 -5
- package/src/providers/services/AuthServiceProvider.tsx +17 -7
- package/src/providers/services/EventServiceProvider.tsx +33 -5
- package/src/providers/services/UnifiedAuthProvider.tsx +90 -134
- package/src/rbac/__tests__/adapters.comprehensive.test.tsx +1 -1
- package/src/rbac/adapters.tsx +2 -2
- package/src/rbac/api.test.ts +59 -51
- package/src/rbac/api.ts +178 -132
- package/src/rbac/components/PagePermissionGuard.tsx +38 -10
- package/src/rbac/hooks/__tests__/useSecureSupabase.test.ts +32 -21
- package/src/rbac/hooks/permissions/useAccessLevel.ts +1 -1
- package/src/rbac/hooks/permissions/useCan.ts +41 -11
- package/src/rbac/hooks/permissions/useHasAllPermissions.ts +1 -1
- package/src/rbac/hooks/permissions/useHasAnyPermission.ts +1 -1
- package/src/rbac/hooks/permissions/useMultiplePermissions.ts +1 -1
- package/src/rbac/hooks/useCan.test.ts +0 -9
- package/src/rbac/hooks/useRBAC.test.ts +1 -5
- package/src/rbac/hooks/useRBAC.ts +36 -37
- package/src/rbac/hooks/useResolvedScope.test.ts +120 -35
- package/src/rbac/hooks/useResolvedScope.ts +35 -40
- package/src/rbac/hooks/useSecureSupabase.ts +7 -7
- package/src/rbac/index.ts +7 -0
- package/src/rbac/secureClient.test.ts +22 -18
- package/src/rbac/secureClient.ts +103 -16
- package/src/rbac/security.ts +0 -17
- package/src/rbac/types.ts +1 -0
- package/src/rbac/utils/__tests__/contextValidator.test.ts +64 -86
- package/src/rbac/utils/clientSecurity.ts +93 -0
- package/src/rbac/utils/contextValidator.ts +77 -168
- package/src/services/AuthService.ts +39 -7
- package/src/services/EventService.ts +186 -54
- package/src/services/OrganisationService.ts +81 -14
- package/src/services/__tests__/EventService.test.ts +1 -2
- package/src/services/base/BaseService.ts +3 -0
- package/src/utils/dynamic/dynamicUtils.ts +7 -4
- package/dist/chunk-24UVZUZG.js.map +0 -1
- package/dist/chunk-3XC4CPTD.js.map +0 -1
- package/dist/chunk-6J4GEEJR.js.map +0 -1
- package/dist/chunk-7D4SUZUM.js +0 -38
- package/dist/chunk-EHMR7VYL.js.map +0 -1
- package/dist/chunk-NECFR5MM.js.map +0 -1
- package/dist/chunk-SFZUDBL5.js.map +0 -1
- package/dist/chunk-XWQCNGTQ.js.map +0 -1
- package/docs/api/classes/ColumnFactory.md +0 -243
- package/docs/api/classes/InvalidScopeError.md +0 -73
- package/docs/api/classes/Logger.md +0 -178
- package/docs/api/classes/MissingUserContextError.md +0 -66
- package/docs/api/classes/OrganisationContextRequiredError.md +0 -66
- package/docs/api/classes/PermissionDeniedError.md +0 -73
- package/docs/api/classes/RBACAuditManager.md +0 -297
- package/docs/api/classes/RBACCache.md +0 -322
- package/docs/api/classes/RBACEngine.md +0 -171
- package/docs/api/classes/RBACError.md +0 -76
- package/docs/api/classes/RBACNotInitializedError.md +0 -66
- package/docs/api/classes/SecureSupabaseClient.md +0 -163
- package/docs/api/classes/StorageUtils.md +0 -328
- package/docs/api/enums/FileCategory.md +0 -184
- package/docs/api/enums/LogLevel.md +0 -54
- package/docs/api/enums/RBACErrorCode.md +0 -228
- package/docs/api/enums/RPCFunction.md +0 -118
- package/docs/api/interfaces/AddressFieldProps.md +0 -241
- package/docs/api/interfaces/AddressFieldRef.md +0 -94
- package/docs/api/interfaces/AggregateConfig.md +0 -43
- package/docs/api/interfaces/AutocompleteOptions.md +0 -75
- package/docs/api/interfaces/AvatarProps.md +0 -128
- package/docs/api/interfaces/BadgeProps.md +0 -34
- package/docs/api/interfaces/ButtonProps.md +0 -56
- package/docs/api/interfaces/CalendarProps.md +0 -73
- package/docs/api/interfaces/CardProps.md +0 -69
- package/docs/api/interfaces/ColorPalette.md +0 -7
- package/docs/api/interfaces/ColorShade.md +0 -66
- package/docs/api/interfaces/ComplianceResult.md +0 -30
- package/docs/api/interfaces/DataAccessRecord.md +0 -96
- package/docs/api/interfaces/DataRecord.md +0 -11
- package/docs/api/interfaces/DataTableAction.md +0 -252
- package/docs/api/interfaces/DataTableColumn.md +0 -504
- package/docs/api/interfaces/DataTableProps.md +0 -625
- package/docs/api/interfaces/DataTableToolbarButton.md +0 -96
- package/docs/api/interfaces/DatabaseComplianceResult.md +0 -85
- package/docs/api/interfaces/DatabaseIssue.md +0 -41
- package/docs/api/interfaces/EmptyStateConfig.md +0 -61
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +0 -235
- package/docs/api/interfaces/ErrorBoundaryProps.md +0 -147
- package/docs/api/interfaces/ErrorBoundaryProviderProps.md +0 -36
- package/docs/api/interfaces/ErrorBoundaryState.md +0 -75
- package/docs/api/interfaces/EventAppRoleData.md +0 -71
- package/docs/api/interfaces/ExportColumn.md +0 -90
- package/docs/api/interfaces/ExportOptions.md +0 -126
- package/docs/api/interfaces/FileDisplayProps.md +0 -249
- package/docs/api/interfaces/FileMetadata.md +0 -129
- package/docs/api/interfaces/FileReference.md +0 -118
- package/docs/api/interfaces/FileSizeLimits.md +0 -7
- package/docs/api/interfaces/FileUploadOptions.md +0 -139
- package/docs/api/interfaces/FileUploadProps.md +0 -296
- package/docs/api/interfaces/FooterProps.md +0 -107
- package/docs/api/interfaces/FormFieldProps.md +0 -166
- package/docs/api/interfaces/FormProps.md +0 -113
- package/docs/api/interfaces/GrantEventAppRoleParams.md +0 -122
- package/docs/api/interfaces/InactivityWarningModalProps.md +0 -115
- package/docs/api/interfaces/InputProps.md +0 -56
- package/docs/api/interfaces/LabelProps.md +0 -107
- package/docs/api/interfaces/LoggerConfig.md +0 -62
- package/docs/api/interfaces/LoginFormProps.md +0 -187
- package/docs/api/interfaces/NavigationAccessRecord.md +0 -107
- package/docs/api/interfaces/NavigationContextType.md +0 -164
- package/docs/api/interfaces/NavigationGuardProps.md +0 -139
- package/docs/api/interfaces/NavigationItem.md +0 -120
- package/docs/api/interfaces/NavigationMenuProps.md +0 -221
- package/docs/api/interfaces/NavigationProviderProps.md +0 -117
- package/docs/api/interfaces/Organisation.md +0 -140
- package/docs/api/interfaces/OrganisationContextType.md +0 -388
- package/docs/api/interfaces/OrganisationMembership.md +0 -140
- package/docs/api/interfaces/OrganisationProviderProps.md +0 -76
- package/docs/api/interfaces/OrganisationSecurityError.md +0 -62
- package/docs/api/interfaces/PaceAppLayoutProps.md +0 -409
- package/docs/api/interfaces/PaceLoginPageProps.md +0 -49
- package/docs/api/interfaces/PageAccessRecord.md +0 -85
- package/docs/api/interfaces/PagePermissionContextType.md +0 -140
- package/docs/api/interfaces/PagePermissionGuardProps.md +0 -153
- package/docs/api/interfaces/PagePermissionProviderProps.md +0 -119
- package/docs/api/interfaces/PaletteData.md +0 -41
- package/docs/api/interfaces/ParsedAddress.md +0 -120
- package/docs/api/interfaces/PermissionEnforcerProps.md +0 -153
- package/docs/api/interfaces/ProgressProps.md +0 -42
- package/docs/api/interfaces/ProtectedRouteProps.md +0 -78
- package/docs/api/interfaces/PublicPageFooterProps.md +0 -112
- package/docs/api/interfaces/PublicPageHeaderProps.md +0 -125
- package/docs/api/interfaces/PublicPageLayoutProps.md +0 -185
- package/docs/api/interfaces/QuickFix.md +0 -52
- package/docs/api/interfaces/RBACAccessValidateParams.md +0 -52
- package/docs/api/interfaces/RBACAccessValidateResult.md +0 -41
- package/docs/api/interfaces/RBACAuditLogParams.md +0 -85
- package/docs/api/interfaces/RBACAuditLogResult.md +0 -52
- package/docs/api/interfaces/RBACConfig.md +0 -133
- package/docs/api/interfaces/RBACContext.md +0 -52
- package/docs/api/interfaces/RBACLogger.md +0 -112
- package/docs/api/interfaces/RBACPageAccessCheckParams.md +0 -74
- package/docs/api/interfaces/RBACPerformanceMetrics.md +0 -138
- package/docs/api/interfaces/RBACPermissionCheckParams.md +0 -74
- package/docs/api/interfaces/RBACPermissionCheckResult.md +0 -52
- package/docs/api/interfaces/RBACPermissionsGetParams.md +0 -63
- package/docs/api/interfaces/RBACPermissionsGetResult.md +0 -63
- package/docs/api/interfaces/RBACResult.md +0 -58
- package/docs/api/interfaces/RBACRoleGrantParams.md +0 -63
- package/docs/api/interfaces/RBACRoleGrantResult.md +0 -52
- package/docs/api/interfaces/RBACRoleRevokeParams.md +0 -63
- package/docs/api/interfaces/RBACRoleRevokeResult.md +0 -52
- package/docs/api/interfaces/RBACRoleValidateParams.md +0 -52
- package/docs/api/interfaces/RBACRoleValidateResult.md +0 -63
- package/docs/api/interfaces/RBACRolesListParams.md +0 -52
- package/docs/api/interfaces/RBACRolesListResult.md +0 -74
- package/docs/api/interfaces/RBACSessionTrackParams.md +0 -74
- package/docs/api/interfaces/RBACSessionTrackResult.md +0 -52
- package/docs/api/interfaces/ResourcePermissions.md +0 -155
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +0 -100
- package/docs/api/interfaces/RoleBasedRouterContextType.md +0 -151
- package/docs/api/interfaces/RoleBasedRouterProps.md +0 -156
- package/docs/api/interfaces/RoleManagementResult.md +0 -52
- package/docs/api/interfaces/RouteAccessRecord.md +0 -107
- package/docs/api/interfaces/RouteConfig.md +0 -134
- package/docs/api/interfaces/RuntimeComplianceResult.md +0 -55
- package/docs/api/interfaces/SecureDataContextType.md +0 -168
- package/docs/api/interfaces/SecureDataProviderProps.md +0 -132
- package/docs/api/interfaces/SessionRestorationLoaderProps.md +0 -34
- package/docs/api/interfaces/SetupIssue.md +0 -41
- package/docs/api/interfaces/StorageConfig.md +0 -41
- package/docs/api/interfaces/StorageFileInfo.md +0 -74
- package/docs/api/interfaces/StorageFileMetadata.md +0 -151
- package/docs/api/interfaces/StorageListOptions.md +0 -99
- package/docs/api/interfaces/StorageListResult.md +0 -41
- package/docs/api/interfaces/StorageUploadOptions.md +0 -101
- package/docs/api/interfaces/StorageUploadResult.md +0 -63
- package/docs/api/interfaces/StorageUrlOptions.md +0 -60
- package/docs/api/interfaces/StyleImport.md +0 -19
- package/docs/api/interfaces/SwitchProps.md +0 -34
- package/docs/api/interfaces/TabsContentProps.md +0 -9
- package/docs/api/interfaces/TabsListProps.md +0 -9
- package/docs/api/interfaces/TabsProps.md +0 -9
- package/docs/api/interfaces/TabsTriggerProps.md +0 -50
- package/docs/api/interfaces/TextareaProps.md +0 -53
- package/docs/api/interfaces/ToastActionElement.md +0 -12
- package/docs/api/interfaces/ToastProps.md +0 -9
- package/docs/api/interfaces/UnifiedAuthContextType.md +0 -823
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +0 -173
- package/docs/api/interfaces/UseFormDialogOptions.md +0 -62
- package/docs/api/interfaces/UseFormDialogReturn.md +0 -117
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +0 -138
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +0 -123
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +0 -87
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +0 -84
- package/docs/api/interfaces/UsePublicEventOptions.md +0 -34
- package/docs/api/interfaces/UsePublicEventReturn.md +0 -71
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +0 -47
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +0 -123
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +0 -97
- package/docs/api/interfaces/UseResolvedScopeOptions.md +0 -47
- package/docs/api/interfaces/UseResolvedScopeReturn.md +0 -47
- package/docs/api/interfaces/UseResourcePermissionsOptions.md +0 -34
- package/docs/api/interfaces/UserEventAccess.md +0 -121
- package/docs/api/interfaces/UserMenuProps.md +0 -88
- package/docs/api/interfaces/UserProfile.md +0 -63
- package/src/components/EventSelector/EventSelector.test.tsx +0 -720
- package/src/components/EventSelector/EventSelector.tsx +0 -423
- package/src/components/EventSelector/index.ts +0 -3
- package/src/components/OrganisationSelector/OrganisationSelector.test.tsx +0 -784
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +0 -327
- package/src/components/OrganisationSelector/index.ts +0 -9
- /package/dist/{DataTable-TPTKCX4D.js.map → DataTable-THFPBKTP.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-CH6Z342H.js.map → UnifiedAuthProvider-KAGUYQ4J.js.map} +0 -0
- /package/dist/{api-MVVQZLJI.js.map → api-IAGWF3ZG.js.map} +0 -0
- /package/dist/{audit-B5P6FFIR.js.map → audit-V53FV5AG.js.map} +0 -0
- /package/dist/{chunk-7D4SUZUM.js.map → chunk-DGUM43GV.js.map} +0 -0
- /package/dist/{chunk-2UOI2FG5.js.map → chunk-HFZBI76P.js.map} +0 -0
- /package/dist/{chunk-F2IMUDXZ.js.map → chunk-M7MPQISP.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
- **Unified Context Selector**: New `ContextSelector` component that intelligently shows all accessible organisations and events in a single dropdown. Replaces the need for separate `OrganisationSelector`, `EventSelector`, and `HybridContextSelector` components.
|
|
12
|
+
- Automatically determines what to show based on user's roles and permissions
|
|
13
|
+
- Shows superset of all accessible orgs and events
|
|
14
|
+
- Works for all app types (org-based, event-based, hybrid)
|
|
15
|
+
- Used by default in `Header` and `PaceAppLayout` components
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Header Component**: Now uses unified `ContextSelector` by default instead of separate `OrganisationSelector` and `EventSelector`
|
|
19
|
+
- New prop: `showContextSelector` (default: `true`) - replaces `showEventSelector` and `showOrgSelector`
|
|
20
|
+
- **PaceAppLayout Component**: Now uses unified `ContextSelector` by default
|
|
21
|
+
- New prop: `showContextSelector` (default: `true`)
|
|
22
|
+
|
|
23
|
+
### Removed
|
|
24
|
+
- **OrganisationSelector**: Removed - use `ContextSelector` instead
|
|
25
|
+
- **EventSelector**: Removed - use `ContextSelector` instead
|
|
26
|
+
- **HybridContextSelector**: Removed - use `ContextSelector` instead
|
|
27
|
+
- **Header.showEventSelector**: Removed - use `showContextSelector` instead
|
|
28
|
+
- **Header.showOrgSelector**: Removed - use `showContextSelector` instead
|
|
29
|
+
- **PaceAppLayout.showEventSelector**: Removed - use `showContextSelector` instead
|
|
30
|
+
- **PaceAppLayout.showOrgSelector**: Removed - use `showContextSelector` instead
|
|
31
|
+
|
|
32
|
+
### Breaking Changes
|
|
33
|
+
- **RBAC Scope Migration**: App-level scope (`rbac_apps.requires_event`) has been removed. All scope is now page-level only (`rbac_app_pages.scope_type`).
|
|
34
|
+
- **Removed**: `UnifiedAuthProvider.appConfig` prop - scope is now determined per page
|
|
35
|
+
- **Removed**: `useAppConfig().requiresEvent` and `useAppConfig().supportsDirectAccess` - use `getPageScopeType()` instead
|
|
36
|
+
- **Removed**: `ContextValidator.validateScope()` - use `ContextValidator.resolveScopeForPage()` instead
|
|
37
|
+
- **Removed**: `ContextValidator.resolveRequiredContext()` - use `ContextValidator.resolveScopeForPage()` instead
|
|
38
|
+
- **Removed**: `ContextValidator.isContextReady()` - context readiness is now checked per page
|
|
39
|
+
- **Removed**: `RBACSecurityValidator.validateContextRequirements()` - no longer needed
|
|
40
|
+
- **Removed**: `getAppConfigByName()` - use `getPageScopeType()` instead
|
|
41
|
+
- **Changed**: `useRBAC()` now requires `pageId` parameter for proper scope resolution
|
|
42
|
+
- **Changed**: `getPermissionMap()`, `getRoleContext()`, and `getAccessLevel()` no longer accept `appConfig` parameter
|
|
43
|
+
|
|
44
|
+
### Migration Required
|
|
45
|
+
**⚠️ CRITICAL**: All consuming apps must migrate to page-level scope. See [RBAC Scope Migration Guide](./docs/migration/RBAC_SCOPE_MIGRATION.md) for detailed instructions.
|
|
46
|
+
|
|
47
|
+
**Quick Steps:**
|
|
48
|
+
1. Run database migration: `supabase/migrations/20251231130000_migrate_scope_to_page_level.sql`
|
|
49
|
+
2. Update all pages in `rbac_app_pages` to have explicit `scope_type` set
|
|
50
|
+
3. Remove `appConfig` prop from `UnifiedAuthProvider`
|
|
51
|
+
4. Update `useRBAC(pageId)` calls to pass `pageId` parameter
|
|
52
|
+
5. Replace `useAppConfig().requiresEvent` with `getPageScopeType(pageId)`
|
|
53
|
+
6. Update any code using deprecated `ContextValidator` methods
|
|
54
|
+
|
|
10
55
|
### Removed
|
|
11
56
|
- **DataTable Debug Tools Exports**: Removed all public exports from `packages/core/src/components/DataTable/utils/debugTools.ts` as they were unused. The debug tools functionality remains available internally for development but is no longer exported. Removed exports include:
|
|
12
57
|
- `DebugLevel` enum
|
|
@@ -79,9 +79,41 @@ This guide ensures consuming apps use pace-core components, hooks, and utilities
|
|
|
79
79
|
|
|
80
80
|
**You MUST use `useSecureSupabase()` for all database operations.** Never use the base Supabase client directly.
|
|
81
81
|
|
|
82
|
+
**CRITICAL SECURITY REQUIREMENT:** Using `createClient()` from `@supabase/supabase-js` directly bypasses organisation context enforcement and RLS policies, which can lead to:
|
|
83
|
+
- Cross-organisation data access
|
|
84
|
+
- Security vulnerabilities
|
|
85
|
+
- Data leakage between organisations
|
|
86
|
+
|
|
82
87
|
```tsx
|
|
83
|
-
// ❌ WRONG:
|
|
84
|
-
|
|
88
|
+
// ❌ WRONG: Direct Supabase client creation
|
|
89
|
+
import { createClient } from '@supabase/supabase-js';
|
|
90
|
+
const supabase = createClient(url, key);
|
|
91
|
+
// This bypasses organisation context and RLS policies!
|
|
92
|
+
|
|
93
|
+
// ✅ CORRECT: Use secure Supabase client
|
|
94
|
+
import { useSecureSupabase } from '@jmruthers/pace-core/rbac';
|
|
95
|
+
const secureSupabase = useSecureSupabase();
|
|
96
|
+
// Organisation context is automatically enforced
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Detection and Enforcement
|
|
100
|
+
|
|
101
|
+
pace-core provides multiple layers of protection:
|
|
102
|
+
|
|
103
|
+
1. **ESLint Rule**: The `no-direct-supabase-client` rule detects `createClient` calls and reports errors
|
|
104
|
+
2. **Runtime Warnings**: Development mode warnings when insecure clients are detected
|
|
105
|
+
3. **Type Safety**: Use `isSecureClient()` to verify clients are secure
|
|
106
|
+
|
|
107
|
+
```tsx
|
|
108
|
+
// Verify client is secure (optional, but recommended)
|
|
109
|
+
import { isSecureClient, warnIfInsecureClient } from '@jmruthers/pace-core/rbac/utils/clientSecurity';
|
|
110
|
+
|
|
111
|
+
const supabase = useSecureSupabase();
|
|
112
|
+
warnIfInsecureClient(supabase, 'MyComponent'); // Warns in dev if insecure
|
|
113
|
+
|
|
114
|
+
if (isSecureClient(supabase)) {
|
|
115
|
+
// Client is secure, safe to use
|
|
116
|
+
}
|
|
85
117
|
```
|
|
86
118
|
|
|
87
119
|
## MUST: Setup RBAC Before Use
|
|
@@ -93,6 +93,8 @@ interface IEventService {
|
|
|
93
93
|
*/
|
|
94
94
|
|
|
95
95
|
declare class EventService extends BaseService implements IEventService {
|
|
96
|
+
private static instanceCount;
|
|
97
|
+
private instanceId;
|
|
96
98
|
private events;
|
|
97
99
|
private selectedEvent;
|
|
98
100
|
private _isLoading;
|
|
@@ -104,12 +106,12 @@ declare class EventService extends BaseService implements IEventService {
|
|
|
104
106
|
private selectedOrganisation;
|
|
105
107
|
private setSelectedEventId;
|
|
106
108
|
private isSuperAdmin;
|
|
107
|
-
private appConfig;
|
|
108
109
|
private isInitializedRef;
|
|
109
110
|
private isFetchingRef;
|
|
110
111
|
private hasAutoSelectedRef;
|
|
111
112
|
private userClearedEventRef;
|
|
112
113
|
constructor(supabaseClient: SupabaseClient, user: User | null, session: Session | null, appName: string, selectedOrganisation: Organisation | null, setSelectedEventId: (eventId: string | null) => void);
|
|
114
|
+
getInstanceId(): number;
|
|
113
115
|
private getStorageKey;
|
|
114
116
|
updateDependencies(supabaseClient: SupabaseClient, user: User | null, session: Session | null, appName: string, selectedOrganisation: Organisation | null, setSelectedEventId: (eventId: string | null) => void): Promise<void>;
|
|
115
117
|
getEvents(): Event[];
|
|
@@ -215,6 +217,8 @@ interface IOrganisationService {
|
|
|
215
217
|
*/
|
|
216
218
|
|
|
217
219
|
declare class OrganisationService extends BaseService implements IOrganisationService {
|
|
220
|
+
private static instanceCount;
|
|
221
|
+
private instanceId;
|
|
218
222
|
private _selectedOrganisation;
|
|
219
223
|
private _organisations;
|
|
220
224
|
private _userMemberships;
|
|
@@ -232,6 +236,7 @@ declare class OrganisationService extends BaseService implements IOrganisationSe
|
|
|
232
236
|
private hasFailedRef;
|
|
233
237
|
private abortControllerRef;
|
|
234
238
|
constructor(supabaseClient: SupabaseClient, user: User | null, session: Session | null);
|
|
239
|
+
getInstanceId(): number;
|
|
235
240
|
getSelectedOrganisation(): Organisation | null;
|
|
236
241
|
getOrganisations(): Organisation[];
|
|
237
242
|
getUserMemberships(): OrganisationMembership[];
|
|
@@ -457,6 +462,8 @@ interface IAuthService {
|
|
|
457
462
|
*/
|
|
458
463
|
|
|
459
464
|
declare class AuthService extends BaseService implements IAuthService {
|
|
465
|
+
private static instanceCount;
|
|
466
|
+
private instanceId;
|
|
460
467
|
private user;
|
|
461
468
|
private session;
|
|
462
469
|
private authLoading;
|
|
@@ -471,6 +478,7 @@ declare class AuthService extends BaseService implements IAuthService {
|
|
|
471
478
|
private errorHandler;
|
|
472
479
|
private unhandledRejectionHandler;
|
|
473
480
|
constructor(supabaseClient: SupabaseClient, appName?: string);
|
|
481
|
+
getInstanceId(): number;
|
|
474
482
|
getUser(): User | null;
|
|
475
483
|
getSession(): Session | null;
|
|
476
484
|
isAuthenticated(): boolean;
|
|
@@ -60,8 +60,8 @@ import {
|
|
|
60
60
|
sum,
|
|
61
61
|
validateHierarchicalData,
|
|
62
62
|
validatePaginationConfig
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import "./chunk-
|
|
63
|
+
} from "./chunk-PQBSKX33.js";
|
|
64
|
+
import "./chunk-YDQHOZNA.js";
|
|
65
65
|
import {
|
|
66
66
|
CircuitBreaker,
|
|
67
67
|
DEFAULT_FALLBACK_CONFIG,
|
|
@@ -80,18 +80,19 @@ import {
|
|
|
80
80
|
throttle,
|
|
81
81
|
useDataTablePerformance
|
|
82
82
|
} from "./chunk-6SOIHG6Z.js";
|
|
83
|
-
import "./chunk-
|
|
83
|
+
import "./chunk-6Z7LTB3D.js";
|
|
84
84
|
import "./chunk-KQCRWDSA.js";
|
|
85
|
-
import "./chunk-
|
|
86
|
-
import "./chunk-
|
|
85
|
+
import "./chunk-DWUBLJJM.js";
|
|
86
|
+
import "./chunk-RWEBCB47.js";
|
|
87
87
|
import "./chunk-63FOKYGO.js";
|
|
88
|
+
import "./chunk-QRPVRXYT.js";
|
|
88
89
|
import "./chunk-QXHPKYJV.js";
|
|
89
90
|
import "./chunk-M43Y4SSO.js";
|
|
90
|
-
import "./chunk-
|
|
91
|
+
import "./chunk-M7MPQISP.js";
|
|
91
92
|
import "./chunk-FMUCXFII.js";
|
|
92
93
|
import "./chunk-VBXEHIUJ.js";
|
|
93
94
|
import "./chunk-PWLANIRT.js";
|
|
94
|
-
import "./chunk-
|
|
95
|
+
import "./chunk-DGUM43GV.js";
|
|
95
96
|
export {
|
|
96
97
|
ActionButtons,
|
|
97
98
|
BulkOperationsDropdown,
|
|
@@ -171,4 +172,4 @@ export {
|
|
|
171
172
|
validateHierarchicalData,
|
|
172
173
|
validatePaginationConfig
|
|
173
174
|
};
|
|
174
|
-
//# sourceMappingURL=DataTable-
|
|
175
|
+
//# sourceMappingURL=DataTable-THFPBKTP.js.map
|
|
@@ -15,7 +15,7 @@ import { FieldValues, DefaultValues, SubmitHandler, SubmitErrorHandler, UseFormR
|
|
|
15
15
|
import { z } from 'zod';
|
|
16
16
|
import { User, SupabaseClient, createClient } from '@supabase/supabase-js';
|
|
17
17
|
import { P as Permission, A as AccessLevel } from './types-BeoeWV5I.js';
|
|
18
|
-
import {
|
|
18
|
+
import { O as Organisation, E as Event } from './event-CW5YB_2p.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Button component props
|
|
@@ -2648,10 +2648,12 @@ interface HeaderProps {
|
|
|
2648
2648
|
userMenu?: React__default.ReactNode;
|
|
2649
2649
|
/** Custom className */
|
|
2650
2650
|
className?: string;
|
|
2651
|
-
/** Show/hide event selector */
|
|
2652
|
-
|
|
2653
|
-
/** Show
|
|
2654
|
-
|
|
2651
|
+
/** Show/hide context selector (unified org/event selector) - default: true */
|
|
2652
|
+
showContextSelector?: boolean;
|
|
2653
|
+
/** Show organisations in context selector - default: true */
|
|
2654
|
+
showOrganisations?: boolean;
|
|
2655
|
+
/** Show events in context selector - default: true */
|
|
2656
|
+
showEvents?: boolean;
|
|
2655
2657
|
/** Show/hide user menu */
|
|
2656
2658
|
showUserMenu?: boolean;
|
|
2657
2659
|
/** Current path for navigation highlighting */
|
|
@@ -2749,7 +2751,7 @@ interface HeaderProps {
|
|
|
2749
2751
|
* <Header
|
|
2750
2752
|
* logoUrl="/simple-logo.svg"
|
|
2751
2753
|
* logoAlt="Simple App"
|
|
2752
|
-
*
|
|
2754
|
+
* showContextSelector={false}
|
|
2753
2755
|
* user={currentUser}
|
|
2754
2756
|
* onSignOut={handleSignOut}
|
|
2755
2757
|
* />
|
|
@@ -2769,7 +2771,7 @@ interface HeaderProps {
|
|
|
2769
2771
|
* @param props - Header configuration
|
|
2770
2772
|
* @returns The rendered header
|
|
2771
2773
|
*/
|
|
2772
|
-
declare function Header({ logoUrl, logoAlt, logo, navItems, user, onSignOut, onChangePassword, actions, userMenu, className,
|
|
2774
|
+
declare function Header({ logoUrl, logoAlt, logo, navItems, user, onSignOut, onChangePassword, actions, userMenu, className, showContextSelector, showOrganisations, showEvents, showUserMenu, currentPath, onNavigate, logoHref }: HeaderProps): react_jsx_runtime.JSX.Element;
|
|
2773
2775
|
|
|
2774
2776
|
/**
|
|
2775
2777
|
* @file Footer Component
|
|
@@ -3024,10 +3026,12 @@ interface PaceAppLayoutProps {
|
|
|
3024
3026
|
appName: string;
|
|
3025
3027
|
/** Optional navigation items for the header menu. If not provided, uses default navigation. */
|
|
3026
3028
|
navItems?: NavigationItem[];
|
|
3027
|
-
/** Show/hide
|
|
3028
|
-
|
|
3029
|
-
/** Show
|
|
3030
|
-
|
|
3029
|
+
/** Show/hide unified context selector (shows all accessible orgs and events) - default: true */
|
|
3030
|
+
showContextSelector?: boolean;
|
|
3031
|
+
/** Show organisations in context selector - default: true */
|
|
3032
|
+
showOrganisations?: boolean;
|
|
3033
|
+
/** Show events in context selector - default: true */
|
|
3034
|
+
showEvents?: boolean;
|
|
3031
3035
|
/** Custom actions to display in the header (between event selector and user menu) */
|
|
3032
3036
|
headerActions?: React__default.ReactNode;
|
|
3033
3037
|
/** Custom logo component (overrides default logo) */
|
|
@@ -3235,7 +3239,7 @@ interface PaceAppLayoutProps {
|
|
|
3235
3239
|
*
|
|
3236
3240
|
* @since 0.1.0
|
|
3237
3241
|
*/
|
|
3238
|
-
declare function PaceAppLayout({ appName, navItems,
|
|
3242
|
+
declare function PaceAppLayout({ appName, navItems, showContextSelector, showOrganisations, showEvents, headerActions, customLogo, logoHref, customUserMenu, headerClassName, showUserMenu, enforcePermissions, defaultPermission, routePermissions, permissionFallback, pageIdMapping, strictMode, enforcePagePermissions, pagePermissionFallback, auditLog, onPageAccessDenied, onStrictModeViolation, roleBasedRouting, routeConfig, fallbackRoute, onRouteAccessDenied, onRouteStrictModeViolation }: PaceAppLayoutProps): react_jsx_runtime.JSX.Element;
|
|
3239
3243
|
|
|
3240
3244
|
/**
|
|
3241
3245
|
* @file PACE Login Page Component
|
|
@@ -3694,76 +3698,50 @@ interface SessionRestorationLoaderProps {
|
|
|
3694
3698
|
declare const SessionRestorationLoader: React__default.FC<SessionRestorationLoaderProps>;
|
|
3695
3699
|
|
|
3696
3700
|
/**
|
|
3697
|
-
* Props for the
|
|
3701
|
+
* Props for the ContextSelector component.
|
|
3698
3702
|
*/
|
|
3699
|
-
interface
|
|
3703
|
+
interface ContextSelectorProps {
|
|
3700
3704
|
/** Placeholder text for the dropdown */
|
|
3701
3705
|
placeholder?: string;
|
|
3702
3706
|
/** Additional CSS classes */
|
|
3703
3707
|
className?: string;
|
|
3704
|
-
/** Callback fired when an
|
|
3705
|
-
|
|
3706
|
-
/**
|
|
3707
|
-
|
|
3708
|
+
/** Callback fired when an organisation is selected */
|
|
3709
|
+
onOrganisationSelect?: (org: Organisation) => void;
|
|
3710
|
+
/** Callback fired when an event is selected */
|
|
3711
|
+
onEventSelect?: (event: Event) => void;
|
|
3712
|
+
/** Show friendly message when no items available */
|
|
3713
|
+
showNoItemsMessage?: boolean;
|
|
3708
3714
|
/** Show retry button on errors */
|
|
3709
3715
|
showRetryButton?: boolean;
|
|
3710
|
-
/** Show event details in dropdown */
|
|
3711
|
-
showEventDetails?: boolean;
|
|
3712
|
-
/** Show indicator for next/upcoming events */
|
|
3713
|
-
showNextEventIndicator?: boolean;
|
|
3714
|
-
}
|
|
3715
|
-
/**
|
|
3716
|
-
* EventSelector component for selecting events with built-in access control
|
|
3717
|
-
*
|
|
3718
|
-
* This component provides secure event selection with:
|
|
3719
|
-
* - Database integration via rbac_event_app_roles table
|
|
3720
|
-
* - Auto-selection of next upcoming event by date
|
|
3721
|
-
* - Cross-device sync via Supabase user session metadata
|
|
3722
|
-
* - localStorage fallback for offline scenarios
|
|
3723
|
-
* - Comprehensive error handling and user feedback
|
|
3724
|
-
*
|
|
3725
|
-
* @component
|
|
3726
|
-
* @example
|
|
3727
|
-
* <UnifiedAuthProvider supabaseClient={supabase} appName="PACE">
|
|
3728
|
-
* <EventSelector onEventChange={(event) => console.log(event)} />
|
|
3729
|
-
* </UnifiedAuthProvider>
|
|
3730
|
-
*/
|
|
3731
|
-
declare function EventSelector({ placeholder, className, onEventChange, showNoEventsMessage, showRetryButton, showEventDetails, showNextEventIndicator }: EventSelectorProps): react_jsx_runtime.JSX.Element | null;
|
|
3732
|
-
|
|
3733
|
-
/**
|
|
3734
|
-
* Props for the OrganisationSelector component.
|
|
3735
|
-
*/
|
|
3736
|
-
interface OrganisationSelectorProps {
|
|
3737
|
-
/** Placeholder text for the dropdown */
|
|
3738
|
-
placeholder?: string;
|
|
3739
|
-
/** Additional CSS classes */
|
|
3740
|
-
className?: string;
|
|
3741
|
-
/** Callback fired when organisation changes, providing full organisation object */
|
|
3742
|
-
onOrganisationChange?: (org: Organisation) => void;
|
|
3743
|
-
/** Show friendly message when no organisations available */
|
|
3744
|
-
showNoOrganisationsMessage?: boolean;
|
|
3745
|
-
/** Show retry button on errors */
|
|
3746
|
-
showRetryButton?: boolean;
|
|
3747
|
-
/** Show user's role in each organisation */
|
|
3748
|
-
showRole?: boolean;
|
|
3749
3716
|
/** Compact display mode */
|
|
3750
3717
|
compact?: boolean;
|
|
3751
3718
|
/** Disabled state */
|
|
3752
3719
|
disabled?: boolean;
|
|
3720
|
+
/** Show organisations section (default: true) */
|
|
3721
|
+
showOrganisations?: boolean;
|
|
3722
|
+
/** Show events section (default: true) */
|
|
3723
|
+
showEvents?: boolean;
|
|
3753
3724
|
}
|
|
3754
3725
|
/**
|
|
3755
|
-
*
|
|
3726
|
+
* ContextSelector component for selecting organisations or events
|
|
3727
|
+
*
|
|
3728
|
+
* This is the unified intelligent selector that shows all organisations and events
|
|
3729
|
+
* a user can access. It automatically determines what to show based on the user's
|
|
3730
|
+
* roles and permissions - no need to configure separate org/event selectors.
|
|
3756
3731
|
*
|
|
3757
|
-
*
|
|
3758
|
-
* -
|
|
3759
|
-
* -
|
|
3760
|
-
* -
|
|
3761
|
-
* - Real-time organisation switching
|
|
3762
|
-
* - Accessible interface design
|
|
3732
|
+
* The selector intelligently shows:
|
|
3733
|
+
* - All organisations the user has access to (via organisation roles)
|
|
3734
|
+
* - All events the user has access to (via event-app roles or organisation membership)
|
|
3735
|
+
* - Everything for super admins
|
|
3763
3736
|
*
|
|
3764
|
-
*
|
|
3737
|
+
* @component
|
|
3738
|
+
* @example
|
|
3739
|
+
* <ContextSelector
|
|
3740
|
+
* onOrganisationSelect={(org) => switchOrganisation(org)}
|
|
3741
|
+
* onEventSelect={(event) => setSelectedEvent(event)}
|
|
3742
|
+
* />
|
|
3765
3743
|
*/
|
|
3766
|
-
declare function
|
|
3744
|
+
declare function ContextSelector({ placeholder, className, onOrganisationSelect, onEventSelect, showNoItemsMessage, showRetryButton, compact, disabled, showOrganisations, showEvents }: ContextSelectorProps): react_jsx_runtime.JSX.Element | null;
|
|
3767
3745
|
|
|
3768
3746
|
/**
|
|
3769
3747
|
* Props for the FileUpload component.
|
|
@@ -4217,4 +4195,4 @@ declare function usePublicPageContext(): PublicPageContextType;
|
|
|
4217
4195
|
*/
|
|
4218
4196
|
declare function useIsPublicPage(): boolean;
|
|
4219
4197
|
|
|
4220
|
-
export { type DialogTriggerProps as $, AddressField as A, Button as B, Card as C, TableHeader as D, TableBody as E, TableCaption as F, TableCell as G, TableFooter as H, Input as I, TableHead as J, TableRow as K, Label as L, Dialog as M, DialogPortal as N, DialogOverlay as O, Progress as P, DialogTrigger as Q, DialogClose as R, Switch as S, Textarea as T, DialogContent as U, DialogHeader as V, DialogBody as W, DialogFooter as X, DialogTitle as Y, DialogDescription as Z, type DialogProps as _, type ButtonProps as a, LoadingSpinner as a$, type DialogContentProps as a0, type DialogOverlayProps as a1, type DialogHeaderProps as a2, type DialogFooterProps as a3, type DialogTitleProps as a4, type DialogDescriptionProps as a5, type DialogSize as a6, Select as a7, SelectGroup as a8, SelectValue as a9, TooltipTrigger as aA, TooltipContent as aB, TooltipProvider as aC, TooltipRoot as aD, Form as aE, FormField as aF, type FormProps as aG, type FormFieldProps as aH, LoginForm as aI, type LoginFormProps as aJ, Header as aK, Footer as aL, type FooterProps as aM, ProtectedRoute as aN, type ProtectedRouteProps as aO, NavigationMenu as aP, type NavigationMenuProps as aQ, type NavigationItem as aR,
|
|
4198
|
+
export { type DialogTriggerProps as $, AddressField as A, Button as B, Card as C, TableHeader as D, TableBody as E, TableCaption as F, TableCell as G, TableFooter as H, Input as I, TableHead as J, TableRow as K, Label as L, Dialog as M, DialogPortal as N, DialogOverlay as O, Progress as P, DialogTrigger as Q, DialogClose as R, Switch as S, Textarea as T, DialogContent as U, DialogHeader as V, DialogBody as W, DialogFooter as X, DialogTitle as Y, DialogDescription as Z, type DialogProps as _, type ButtonProps as a, LoadingSpinner as a$, type DialogContentProps as a0, type DialogOverlayProps as a1, type DialogHeaderProps as a2, type DialogFooterProps as a3, type DialogTitleProps as a4, type DialogDescriptionProps as a5, type DialogSize as a6, Select as a7, SelectGroup as a8, SelectValue as a9, TooltipTrigger as aA, TooltipContent as aB, TooltipProvider as aC, TooltipRoot as aD, Form as aE, FormField as aF, type FormProps as aG, type FormFieldProps as aH, LoginForm as aI, type LoginFormProps as aJ, Header as aK, Footer as aL, type FooterProps as aM, ProtectedRoute as aN, type ProtectedRouteProps as aO, NavigationMenu as aP, type NavigationMenuProps as aQ, type NavigationItem as aR, ContextSelector as aS, type ContextSelectorProps as aT, UserMenu as aU, ErrorBoundary as aV, ErrorBoundaryProvider as aW, type ErrorBoundaryProps as aX, type ErrorBoundaryState as aY, type ErrorBoundaryProviderProps as aZ, type GlobalErrorHandler as a_, SelectTrigger as aa, SelectContent as ab, SelectLabel as ac, SelectItem as ad, SelectSeparator as ae, Tabs as af, TabsList as ag, TabsTrigger as ah, TabsContent as ai, type TabsProps as aj, type TabsListProps as ak, type TabsTriggerProps as al, type TabsContentProps as am, Calendar as an, type CalendarProps as ao, Toast as ap, Toaster as aq, ToastAction as ar, ToastProvider as as, ToastViewport as at, ToastTitle as au, ToastDescription as av, ToastClose as aw, type ToastActionElement as ax, type ToastProps as ay, Tooltip as az, CardHeader as b, SessionRestorationLoader as b0, type SessionRestorationLoaderProps as b1, FileUpload as b2, type FileUploadProps as b3, FileDisplay as b4, type FileDisplayProps as b5, useFileReference as b6, useFileReferenceForRecord as b7, useFileReferenceById as b8, useFilesByCategory as b9, type UseFileReferenceOptions as ba, type UseFileReferenceReturn as bb, type UseFileReferenceForRecordReturn as bc, PublicPageLayout as bd, PublicPageHeader as be, PublicPageFooter as bf, PublicPageProvider as bg, usePublicPageContext as bh, useIsPublicPage as bi, type PublicPageLayoutProps as bj, type PublicPageHeaderProps as bk, type PublicPageFooterProps as bl, type PaceAppLayoutProps as bm, PaceAppLayout as bn, type PaceLoginPageProps as bo, PaceLoginPage as bp, type NavigationMode as bq, type UserMenuProps as br, PasswordChangeForm as bs, CardFooter as c, CardTitle as d, CardDescription as e, CardContent as f, CardActions as g, type CardProps as h, type CardActionsProps as i, type InputProps as j, type AddressFieldProps as k, type AddressFieldRef as l, type LabelProps as m, type TextareaProps as n, Alert as o, AlertTitle as p, AlertDescription as q, Avatar as r, type AvatarProps as s, Badge as t, type BadgeProps as u, type BadgeVariant as v, Checkbox as w, type SwitchProps as x, type ProgressProps as y, Table as z };
|
|
@@ -85,9 +85,6 @@ interface UnifiedAuthContextType {
|
|
|
85
85
|
handleIdleLogout: () => Promise<void>;
|
|
86
86
|
handleStaySignedIn: () => void;
|
|
87
87
|
handleSignOutNow: () => Promise<void>;
|
|
88
|
-
appConfig: {
|
|
89
|
-
requires_event: boolean;
|
|
90
|
-
} | null;
|
|
91
88
|
isLoading: boolean;
|
|
92
89
|
hasErrors: boolean;
|
|
93
90
|
sessionRestoration: SessionRestorationState;
|
|
@@ -117,9 +114,6 @@ interface UnifiedAuthProviderProps {
|
|
|
117
114
|
persistState?: boolean;
|
|
118
115
|
enablePersistence?: boolean;
|
|
119
116
|
requireOrganisationContext?: boolean;
|
|
120
|
-
appConfig?: {
|
|
121
|
-
requires_event: boolean;
|
|
122
|
-
} | null;
|
|
123
117
|
idleTimeoutMs: number;
|
|
124
118
|
warnBeforeMs: number;
|
|
125
119
|
onIdleLogout: (reason: 'inactivity') => void;
|
|
@@ -137,8 +131,7 @@ interface UnifiedAuthProviderProps {
|
|
|
137
131
|
* @param props - Unified auth provider configuration
|
|
138
132
|
* @returns The unified auth provider
|
|
139
133
|
*/
|
|
140
|
-
declare function UnifiedAuthProvider({ children, supabaseClient, appName,
|
|
141
|
-
persistState, enablePersistence, requireOrganisationContext, idleTimeoutMs, // REQUIRED: No default - must be explicitly provided
|
|
134
|
+
declare function UnifiedAuthProvider({ children, supabaseClient, appName, persistState, enablePersistence, requireOrganisationContext, idleTimeoutMs, // REQUIRED: No default - must be explicitly provided
|
|
142
135
|
warnBeforeMs, // REQUIRED: No default - must be explicitly provided
|
|
143
136
|
onIdleLogout, // REQUIRED: No default - must be explicitly provided
|
|
144
137
|
renderInactivityWarning, dangerouslyDisableInactivity }: UnifiedAuthProviderProps): react_jsx_runtime.JSX.Element;
|
|
@@ -2,16 +2,17 @@ import {
|
|
|
2
2
|
UnifiedAuthContext,
|
|
3
3
|
UnifiedAuthProvider,
|
|
4
4
|
useUnifiedAuth
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-DWUBLJJM.js";
|
|
6
|
+
import "./chunk-RWEBCB47.js";
|
|
7
7
|
import "./chunk-63FOKYGO.js";
|
|
8
|
+
import "./chunk-QRPVRXYT.js";
|
|
8
9
|
import "./chunk-QXHPKYJV.js";
|
|
9
10
|
import "./chunk-VBXEHIUJ.js";
|
|
10
11
|
import "./chunk-PWLANIRT.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-DGUM43GV.js";
|
|
12
13
|
export {
|
|
13
14
|
UnifiedAuthContext,
|
|
14
15
|
UnifiedAuthProvider,
|
|
15
16
|
useUnifiedAuth
|
|
16
17
|
};
|
|
17
|
-
//# sourceMappingURL=UnifiedAuthProvider-
|
|
18
|
+
//# sourceMappingURL=UnifiedAuthProvider-KAGUYQ4J.js.map
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
OrganisationContextRequiredError,
|
|
3
2
|
clearCache,
|
|
4
3
|
getAccessLevel,
|
|
5
|
-
|
|
6
|
-
getAppConfigByName,
|
|
7
|
-
getAppConfigWithClient,
|
|
4
|
+
getPageScopeType,
|
|
8
5
|
getPermissionMap,
|
|
9
6
|
getRoleContext,
|
|
10
7
|
hasAllPermissions,
|
|
@@ -18,20 +15,22 @@ import {
|
|
|
18
15
|
isOrganisationAdmin,
|
|
19
16
|
isPermitted,
|
|
20
17
|
isPermittedCached,
|
|
18
|
+
isRBACInitialized,
|
|
21
19
|
isSuperAdmin,
|
|
22
20
|
resolveAppContext,
|
|
23
21
|
setupRBAC
|
|
24
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RWEBCB47.js";
|
|
25
23
|
import "./chunk-63FOKYGO.js";
|
|
24
|
+
import {
|
|
25
|
+
OrganisationContextRequiredError
|
|
26
|
+
} from "./chunk-QRPVRXYT.js";
|
|
26
27
|
import "./chunk-PWLANIRT.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-DGUM43GV.js";
|
|
28
29
|
export {
|
|
29
30
|
OrganisationContextRequiredError,
|
|
30
31
|
clearCache,
|
|
31
32
|
getAccessLevel,
|
|
32
|
-
|
|
33
|
-
getAppConfigByName,
|
|
34
|
-
getAppConfigWithClient,
|
|
33
|
+
getPageScopeType,
|
|
35
34
|
getPermissionMap,
|
|
36
35
|
getRoleContext,
|
|
37
36
|
hasAllPermissions,
|
|
@@ -45,8 +44,9 @@ export {
|
|
|
45
44
|
isOrganisationAdmin,
|
|
46
45
|
isPermitted,
|
|
47
46
|
isPermittedCached,
|
|
47
|
+
isRBACInitialized,
|
|
48
48
|
isSuperAdmin,
|
|
49
49
|
resolveAppContext,
|
|
50
50
|
setupRBAC
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=api-
|
|
52
|
+
//# sourceMappingURL=api-IAGWF3ZG.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
setGlobalAuditManager
|
|
7
7
|
} from "./chunk-63FOKYGO.js";
|
|
8
8
|
import "./chunk-PWLANIRT.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-DGUM43GV.js";
|
|
10
10
|
export {
|
|
11
11
|
RBACAuditManager,
|
|
12
12
|
createAuditManager,
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
getGlobalAuditManager,
|
|
15
15
|
setGlobalAuditManager
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=audit-
|
|
17
|
+
//# sourceMappingURL=audit-V53FV5AG.js.map
|