@jmruthers/pace-core 0.5.189 → 0.5.190
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/core-usage-manifest.json +0 -4
- package/dist/{AuthService-B-cd2MA4.d.ts → AuthService-CbP_utw2.d.ts} +7 -3
- package/dist/{DataTable-GUFUNZ3N.js → DataTable-ON3IXISJ.js} +8 -8
- package/dist/{PublicPageProvider-B8HaLe69.d.ts → PublicPageProvider-C4uxosp6.d.ts} +83 -24
- package/dist/{UnifiedAuthProvider-BG0AL5eE.d.ts → UnifiedAuthProvider-BYA9qB-o.d.ts} +4 -3
- package/dist/{UnifiedAuthProvider-643PUAIM.js → UnifiedAuthProvider-X5NXANVI.js} +4 -2
- package/dist/{api-YP7XD5L6.js → api-I6UCQ5S6.js} +4 -2
- package/dist/{chunk-DDM4CCYT.js → chunk-4QYC5L4K.js} +60 -35
- package/dist/chunk-4QYC5L4K.js.map +1 -0
- package/dist/{chunk-IM4QE42D.js → chunk-73HSNNOQ.js} +141 -326
- package/dist/chunk-73HSNNOQ.js.map +1 -0
- package/dist/{chunk-YHCN776L.js → chunk-DZWK57KZ.js} +2 -75
- package/dist/chunk-DZWK57KZ.js.map +1 -0
- package/dist/{chunk-3GOZZZYH.js → chunk-HQVPB5MZ.js} +238 -301
- package/dist/chunk-HQVPB5MZ.js.map +1 -0
- package/dist/{chunk-THRPYOFK.js → chunk-HW3OVDUF.js} +5 -5
- package/dist/chunk-HW3OVDUF.js.map +1 -0
- package/dist/{chunk-F2IMUDXZ.js → chunk-I7PSE6JW.js} +75 -2
- package/dist/chunk-I7PSE6JW.js.map +1 -0
- package/dist/{chunk-VGZZXKBR.js → chunk-J2XXC7R5.js} +280 -52
- package/dist/chunk-J2XXC7R5.js.map +1 -0
- package/dist/{chunk-UCQSRW7Z.js → chunk-NIU6J6OX.js} +425 -378
- package/dist/chunk-NIU6J6OX.js.map +1 -0
- package/dist/{chunk-HESYZWZW.js → chunk-QWWZ5CAQ.js} +2 -2
- package/dist/{chunk-HEHYGYOX.js → chunk-RUYZKXOD.js} +401 -46
- package/dist/chunk-RUYZKXOD.js.map +1 -0
- package/dist/{chunk-2UUZZJFT.js → chunk-SDMHPX3X.js} +176 -160
- package/dist/{chunk-2UUZZJFT.js.map → chunk-SDMHPX3X.js.map} +1 -1
- package/dist/{chunk-MX64ZF6I.js → chunk-STYK4OH2.js} +11 -11
- package/dist/chunk-STYK4OH2.js.map +1 -0
- package/dist/{chunk-YGPFYGA6.js → chunk-VVBAW5A5.js} +822 -498
- package/dist/chunk-VVBAW5A5.js.map +1 -0
- package/dist/chunk-Y4BUBBHD.js +614 -0
- package/dist/chunk-Y4BUBBHD.js.map +1 -0
- package/dist/{chunk-SAUPYVLF.js → chunk-ZSAAAMVR.js} +1 -1
- package/dist/chunk-ZSAAAMVR.js.map +1 -0
- package/dist/components.d.ts +3 -4
- package/dist/components.js +19 -19
- package/dist/components.js.map +1 -1
- package/dist/eslint-rules/pace-core-compliance.cjs +0 -2
- package/dist/{file-reference-D037xOFK.d.ts → file-reference-BavO2eQj.d.ts} +13 -10
- package/dist/hooks.d.ts +10 -5
- package/dist/hooks.js +14 -8
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +13 -11
- package/dist/index.js +79 -69
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +3 -3
- package/dist/providers.js +3 -1
- package/dist/rbac/index.d.ts +76 -12
- package/dist/rbac/index.js +12 -9
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/{usePublicRouteParams-CTDELQ7H.d.ts → usePublicRouteParams-DxIDS4bC.d.ts} +16 -9
- package/dist/utils.js +16 -16
- package/docs/README.md +2 -2
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +2 -2
- package/docs/api/classes/Logger.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +2 -2
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.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 +4 -4
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +2 -2
- package/docs/api/classes/SecureSupabaseClient.md +21 -16
- package/docs/api/classes/StorageUtils.md +7 -4
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/enums/LogLevel.md +1 -1
- package/docs/api/enums/RBACErrorCode.md +1 -1
- package/docs/api/enums/RPCFunction.md +1 -1
- package/docs/api/interfaces/AddressFieldProps.md +1 -1
- package/docs/api/interfaces/AddressFieldRef.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/AutocompleteOptions.md +1 -1
- package/docs/api/interfaces/AvatarProps.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 +20 -6
- 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/ComplianceResult.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +9 -9
- 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/DatabaseComplianceResult.md +1 -1
- package/docs/api/interfaces/DatabaseIssue.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/ExportColumn.md +1 -1
- package/docs/api/interfaces/ExportOptions.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +62 -16
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +2 -2
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +26 -12
- package/docs/api/interfaces/FileUploadProps.md +30 -19
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/FormFieldProps.md +1 -1
- package/docs/api/interfaces/FormProps.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/LoggerConfig.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +10 -10
- package/docs/api/interfaces/NavigationContextType.md +9 -9
- 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 +7 -7
- 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 +8 -8
- package/docs/api/interfaces/PagePermissionContextType.md +8 -8
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +7 -7
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/ParsedAddress.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/ProgressProps.md +3 -11
- package/docs/api/interfaces/ProtectedRouteProps.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/QuickFix.md +1 -1
- package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
- package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
- package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
- package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACContext.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
- package/docs/api/interfaces/RBACPerformanceMetrics.md +1 -1
- package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
- package/docs/api/interfaces/RBACPermissionCheckResult.md +1 -1
- package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
- package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
- package/docs/api/interfaces/RBACResult.md +1 -1
- package/docs/api/interfaces/RBACRoleGrantParams.md +1 -1
- package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
- package/docs/api/interfaces/RBACRoleRevokeParams.md +1 -1
- package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
- package/docs/api/interfaces/RBACRoleValidateParams.md +1 -1
- package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
- package/docs/api/interfaces/RBACRolesListParams.md +1 -1
- package/docs/api/interfaces/RBACRolesListResult.md +1 -1
- package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
- package/docs/api/interfaces/RBACSessionTrackResult.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 +8 -8
- package/docs/api/interfaces/RoleBasedRouterProps.md +10 -10
- package/docs/api/interfaces/RoleManagementResult.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +10 -10
- package/docs/api/interfaces/RouteConfig.md +10 -10
- package/docs/api/interfaces/RuntimeComplianceResult.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +9 -9
- package/docs/api/interfaces/SecureDataProviderProps.md +8 -8
- package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
- package/docs/api/interfaces/SetupIssue.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +4 -4
- package/docs/api/interfaces/StorageFileInfo.md +7 -7
- package/docs/api/interfaces/StorageFileMetadata.md +25 -14
- package/docs/api/interfaces/StorageListOptions.md +22 -9
- package/docs/api/interfaces/StorageListResult.md +4 -4
- package/docs/api/interfaces/StorageUploadOptions.md +21 -8
- package/docs/api/interfaces/StorageUploadResult.md +6 -6
- package/docs/api/interfaces/StorageUrlOptions.md +19 -6
- 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 +53 -53
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +13 -13
- package/docs/api/interfaces/UseFormDialogOptions.md +1 -1
- package/docs/api/interfaces/UseFormDialogReturn.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/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 +4 -4
- package/docs/api/interfaces/UseResolvedScopeReturn.md +4 -4
- package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +11 -11
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +151 -92
- package/docs/api-reference/components.md +15 -7
- package/docs/api-reference/providers.md +2 -2
- package/docs/api-reference/rpc-functions.md +1 -0
- package/docs/best-practices/README.md +1 -1
- package/docs/best-practices/deployment.md +8 -8
- package/docs/getting-started/examples/README.md +2 -2
- package/docs/getting-started/installation-guide.md +4 -4
- package/docs/getting-started/quick-start.md +3 -3
- package/docs/migration/MIGRATION_GUIDE.md +3 -3
- package/docs/rbac/compliance/compliance-guide.md +2 -2
- package/docs/rbac/event-based-apps.md +2 -2
- package/docs/rbac/getting-started.md +2 -2
- package/docs/rbac/quick-start.md +2 -2
- package/docs/security/README.md +4 -4
- package/docs/standards/07-rbac-and-rls-standard.md +430 -7
- package/docs/troubleshooting/README.md +2 -2
- package/docs/troubleshooting/migration.md +3 -3
- package/package.json +1 -3
- package/scripts/check-pace-core-compliance.cjs +1 -1
- package/scripts/check-pace-core-compliance.js +1 -1
- package/src/__tests__/fixtures/supabase.ts +301 -0
- package/src/__tests__/public-recipe-view.test.ts +9 -9
- package/src/__tests__/rls-policies.test.ts +197 -61
- package/src/components/AddressField/AddressField.test.tsx +42 -0
- package/src/components/AddressField/AddressField.tsx +71 -60
- package/src/components/AddressField/README.md +1 -0
- package/src/components/Alert/Alert.test.tsx +50 -10
- package/src/components/Alert/Alert.tsx +5 -3
- package/src/components/Avatar/Avatar.test.tsx +95 -43
- package/src/components/Avatar/Avatar.tsx +16 -16
- package/src/components/Button/Button.test.tsx +2 -1
- package/src/components/Button/Button.tsx +3 -3
- package/src/components/Calendar/Calendar.test.tsx +53 -37
- package/src/components/Calendar/Calendar.tsx +409 -82
- package/src/components/Card/Card.test.tsx +7 -4
- package/src/components/Card/Card.tsx +3 -6
- package/src/components/Checkbox/Checkbox.tsx +2 -2
- package/src/components/DataTable/components/ActionButtons.tsx +5 -5
- package/src/components/DataTable/components/BulkOperationsDropdown.tsx +2 -2
- package/src/components/DataTable/components/ColumnFilter.tsx +1 -1
- package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +3 -3
- package/src/components/DataTable/components/DataTableBody.tsx +12 -12
- package/src/components/DataTable/components/DataTableCore.tsx +3 -3
- package/src/components/DataTable/components/DataTableToolbar.tsx +5 -5
- package/src/components/DataTable/components/DraggableColumnHeader.tsx +3 -3
- package/src/components/DataTable/components/EditableRow.tsx +2 -2
- package/src/components/DataTable/components/EmptyState.tsx +3 -3
- package/src/components/DataTable/components/GroupHeader.tsx +2 -2
- package/src/components/DataTable/components/GroupingDropdown.tsx +1 -1
- package/src/components/DataTable/components/ImportModal.tsx +4 -4
- package/src/components/DataTable/components/LoadingState.tsx +1 -1
- package/src/components/DataTable/components/PaginationControls.tsx +11 -11
- package/src/components/DataTable/components/UnifiedTableBody.tsx +9 -9
- package/src/components/DataTable/components/ViewRowModal.tsx +2 -2
- package/src/components/DataTable/components/__tests__/AccessDeniedPage.test.tsx +11 -37
- package/src/components/DataTable/components/__tests__/DataTableToolbar.test.tsx +157 -0
- package/src/components/DataTable/components/__tests__/LoadingState.test.tsx +2 -1
- package/src/components/DataTable/components/__tests__/VirtualizedDataTable.test.tsx +128 -0
- package/src/components/DataTable/core/__tests__/ActionManager.test.ts +19 -0
- package/src/components/DataTable/core/__tests__/ColumnFactory.test.ts +51 -0
- package/src/components/DataTable/core/__tests__/ColumnManager.test.ts +84 -0
- package/src/components/DataTable/core/__tests__/DataManager.test.ts +14 -0
- package/src/components/DataTable/core/__tests__/DataTableContext.test.tsx +136 -0
- package/src/components/DataTable/core/__tests__/LocalDataAdapter.test.ts +16 -0
- package/src/components/DataTable/core/__tests__/PluginRegistry.test.ts +18 -0
- package/src/components/DataTable/hooks/useDataTablePermissions.ts +28 -7
- package/src/components/DataTable/utils/__tests__/hierarchicalUtils.test.ts +30 -1
- package/src/components/DataTable/utils/hierarchicalUtils.ts +38 -10
- package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +8 -3
- package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.tsx +4 -4
- package/src/components/Dialog/Dialog.tsx +2 -2
- package/src/components/EventSelector/EventSelector.tsx +7 -7
- package/src/components/FileDisplay/FileDisplay.tsx +291 -179
- package/src/components/FileUpload/FileUpload.tsx +7 -4
- package/src/components/Header/Header.test.tsx +28 -0
- package/src/components/Header/Header.tsx +22 -9
- package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +2 -2
- package/src/components/LoadingSpinner/LoadingSpinner.test.tsx +19 -14
- package/src/components/LoadingSpinner/LoadingSpinner.tsx +5 -5
- package/src/components/NavigationMenu/NavigationMenu.test.tsx +127 -1
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +8 -8
- package/src/components/PaceAppLayout/PaceAppLayout.integration.test.tsx +4 -0
- package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +3 -0
- package/src/components/PaceAppLayout/PaceAppLayout.security.test.tsx +3 -0
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +16 -6
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +37 -3
- package/src/components/PaceAppLayout/test-setup.tsx +1 -0
- package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +66 -45
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +6 -4
- package/src/components/Progress/Progress.test.tsx +18 -19
- package/src/components/Progress/Progress.tsx +31 -32
- package/src/components/PublicLayout/PublicLayout.test.tsx +6 -6
- package/src/components/PublicLayout/PublicPageProvider.tsx +5 -3
- package/src/components/Select/Select.tsx +5 -5
- package/src/components/Switch/Switch.test.tsx +2 -1
- package/src/components/Switch/Switch.tsx +1 -1
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/Tooltip/Tooltip.test.tsx +8 -2
- package/src/components/UserMenu/UserMenu.tsx +3 -3
- package/src/eslint-rules/pace-core-compliance.cjs +0 -2
- package/src/eslint-rules/pace-core-compliance.js +0 -2
- package/src/hooks/__tests__/hooks.integration.test.tsx +4 -1
- package/src/hooks/__tests__/useAppConfig.unit.test.ts +76 -5
- package/src/hooks/__tests__/useDataTableState.test.ts +76 -0
- package/src/hooks/__tests__/useFileUrl.unit.test.ts +25 -69
- package/src/hooks/__tests__/useFileUrlCache.test.ts +129 -0
- package/src/hooks/__tests__/usePreventTabReload.test.ts +88 -0
- package/src/hooks/__tests__/{usePublicEvent.unit.test.ts → usePublicEvent.test.ts} +28 -1
- package/src/hooks/__tests__/useQueryCache.test.ts +144 -0
- package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +58 -16
- package/src/hooks/index.ts +1 -1
- package/src/hooks/public/usePublicEvent.ts +2 -2
- package/src/hooks/public/usePublicFileDisplay.ts +173 -87
- package/src/hooks/useAppConfig.ts +24 -5
- package/src/hooks/useFileDisplay.ts +297 -34
- package/src/hooks/useFileReference.ts +56 -11
- package/src/hooks/useFileUrl.ts +1 -1
- package/src/hooks/useInactivityTracker.ts +16 -7
- package/src/hooks/usePermissionCache.test.ts +85 -8
- package/src/hooks/useQueryCache.ts +21 -0
- package/src/hooks/useSecureDataAccess.test.ts +80 -35
- package/src/hooks/useSecureDataAccess.ts +80 -37
- package/src/providers/services/EventServiceProvider.tsx +37 -17
- package/src/providers/services/InactivityServiceProvider.tsx +4 -4
- package/src/providers/services/OrganisationServiceProvider.tsx +8 -1
- package/src/providers/services/UnifiedAuthProvider.tsx +115 -29
- package/src/rbac/__tests__/auth-rbac.e2e.test.tsx +451 -0
- package/src/rbac/__tests__/engine.comprehensive.test.ts +12 -0
- package/src/rbac/__tests__/rbac-engine-core-logic.test.ts +8 -0
- package/src/rbac/__tests__/rbac-engine-simplified.test.ts +4 -0
- package/src/rbac/api.ts +240 -36
- package/src/rbac/cache-invalidation.ts +21 -7
- package/src/rbac/compliance/quick-fix-suggestions.ts +1 -1
- package/src/rbac/components/NavigationGuard.tsx +23 -63
- package/src/rbac/components/NavigationProvider.test.tsx +52 -23
- package/src/rbac/components/NavigationProvider.tsx +13 -11
- package/src/rbac/components/PagePermissionGuard.tsx +77 -203
- package/src/rbac/components/PagePermissionProvider.tsx +13 -11
- package/src/rbac/components/PermissionEnforcer.tsx +24 -62
- package/src/rbac/components/RoleBasedRouter.tsx +14 -12
- package/src/rbac/components/SecureDataProvider.tsx +13 -11
- package/src/rbac/components/__tests__/NavigationGuard.test.tsx +104 -41
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +49 -12
- package/src/rbac/components/__tests__/PagePermissionGuard.race-condition.test.tsx +22 -1
- package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +161 -82
- package/src/rbac/components/__tests__/PagePermissionGuard.verification.test.tsx +22 -1
- package/src/rbac/components/__tests__/PermissionEnforcer.test.tsx +77 -30
- package/src/rbac/components/__tests__/RoleBasedRouter.test.tsx +39 -5
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +47 -4
- package/src/rbac/engine.ts +4 -2
- package/src/rbac/hooks/__tests__/useSecureSupabase.test.ts +144 -52
- package/src/rbac/hooks/index.ts +3 -0
- package/src/rbac/hooks/useCan.test.ts +101 -53
- package/src/rbac/hooks/usePermissions.ts +108 -41
- package/src/rbac/hooks/useRBAC.test.ts +11 -3
- package/src/rbac/hooks/useRBAC.ts +83 -40
- package/src/rbac/hooks/useResolvedScope.test.ts +189 -63
- package/src/rbac/hooks/useResolvedScope.ts +128 -70
- package/src/rbac/hooks/useSecureSupabase.ts +36 -19
- package/src/rbac/hooks/useSuperAdminBypass.ts +126 -0
- package/src/rbac/request-deduplication.ts +1 -1
- package/src/rbac/secureClient.ts +72 -12
- package/src/rbac/security.ts +29 -23
- package/src/rbac/types.ts +10 -0
- package/src/rbac/utils/__tests__/contextValidator.test.ts +150 -0
- package/src/rbac/utils/__tests__/deep-equal.test.ts +53 -0
- package/src/rbac/utils/__tests__/eventContext.test.ts +6 -1
- package/src/rbac/utils/contextValidator.ts +288 -0
- package/src/rbac/utils/eventContext.ts +48 -2
- package/src/services/EventService.ts +165 -21
- package/src/services/OrganisationService.ts +37 -2
- package/src/services/__tests__/EventService.test.ts +26 -21
- package/src/types/file-reference.ts +13 -10
- package/src/utils/app/appNameResolver.test.ts +346 -73
- package/src/utils/context/superAdminOverride.ts +58 -0
- package/src/utils/file-reference/index.ts +61 -33
- package/src/utils/google-places/googlePlacesUtils.test.ts +98 -0
- package/src/utils/google-places/loadGoogleMapsScript.test.ts +83 -0
- package/src/utils/storage/helpers.test.ts +1 -1
- package/src/utils/storage/helpers.ts +38 -19
- package/src/utils/storage/types.ts +15 -8
- package/src/utils/validation/__tests__/csrf.test.ts +105 -0
- package/src/utils/validation/__tests__/sqlInjectionProtection.test.ts +92 -0
- package/src/vite-env.d.ts +2 -2
- package/dist/chunk-3GOZZZYH.js.map +0 -1
- package/dist/chunk-DDM4CCYT.js.map +0 -1
- package/dist/chunk-E7UAOUMY.js +0 -75
- package/dist/chunk-E7UAOUMY.js.map +0 -1
- package/dist/chunk-F2IMUDXZ.js.map +0 -1
- package/dist/chunk-HEHYGYOX.js.map +0 -1
- package/dist/chunk-IM4QE42D.js.map +0 -1
- package/dist/chunk-MX64ZF6I.js.map +0 -1
- package/dist/chunk-SAUPYVLF.js.map +0 -1
- package/dist/chunk-THRPYOFK.js.map +0 -1
- package/dist/chunk-UCQSRW7Z.js.map +0 -1
- package/dist/chunk-VGZZXKBR.js.map +0 -1
- package/dist/chunk-YGPFYGA6.js.map +0 -1
- package/dist/chunk-YHCN776L.js.map +0 -1
- package/src/hooks/__tests__/usePermissionCache.simple.test.ts +0 -192
- package/src/hooks/__tests__/usePermissionCache.unit.test.ts +0 -741
- package/src/hooks/__tests__/usePublicEvent.simple.test.ts +0 -703
- package/src/rbac/hooks/useRBAC.simple.test.ts +0 -95
- package/src/rbac/utils/__tests__/eventContext.unit.test.ts +0 -428
- /package/dist/{DataTable-GUFUNZ3N.js.map → DataTable-ON3IXISJ.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-643PUAIM.js.map → UnifiedAuthProvider-X5NXANVI.js.map} +0 -0
- /package/dist/{api-YP7XD5L6.js.map → api-I6UCQ5S6.js.map} +0 -0
- /package/dist/{chunk-HESYZWZW.js.map → chunk-QWWZ5CAQ.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.190](../README.md) / [Exports](../modules.md) / SecureSupabaseClient
|
|
2
2
|
|
|
3
3
|
# Class: SecureSupabaseClient
|
|
4
4
|
|
|
@@ -7,6 +7,9 @@ Secure Supabase Client that enforces organisation context
|
|
|
7
7
|
This client automatically injects organisation context into all requests
|
|
8
8
|
and prevents queries that don't have the required context.
|
|
9
9
|
|
|
10
|
+
Note: Callers should derive organisationId from eventId before creating this client
|
|
11
|
+
if working with event-required apps. The client requires organisationId.
|
|
12
|
+
|
|
10
13
|
## Table of contents
|
|
11
14
|
|
|
12
15
|
### Constructors
|
|
@@ -26,17 +29,18 @@ and prevents queries that don't have the required context.
|
|
|
26
29
|
|
|
27
30
|
### constructor
|
|
28
31
|
|
|
29
|
-
• **new SecureSupabaseClient**(`supabaseUrl`, `supabaseKey`, `organisationId`, `eventId?`, `appId?`): [`SecureSupabaseClient`](SecureSupabaseClient.md)
|
|
32
|
+
• **new SecureSupabaseClient**(`supabaseUrl`, `supabaseKey`, `organisationId`, `eventId?`, `appId?`, `isSuperAdmin?`): [`SecureSupabaseClient`](SecureSupabaseClient.md)
|
|
30
33
|
|
|
31
34
|
#### Parameters
|
|
32
35
|
|
|
33
|
-
| Name | Type |
|
|
34
|
-
| :------ | :------ |
|
|
35
|
-
| `supabaseUrl` | `string` |
|
|
36
|
-
| `supabaseKey` | `string` |
|
|
37
|
-
| `organisationId` | `string` |
|
|
38
|
-
| `eventId?` | `string` |
|
|
39
|
-
| `appId?` | `string` |
|
|
36
|
+
| Name | Type | Default value |
|
|
37
|
+
| :------ | :------ | :------ |
|
|
38
|
+
| `supabaseUrl` | `string` | `undefined` |
|
|
39
|
+
| `supabaseKey` | `string` | `undefined` |
|
|
40
|
+
| `organisationId` | `string` | `undefined` |
|
|
41
|
+
| `eventId?` | `string` | `undefined` |
|
|
42
|
+
| `appId?` | `string` | `undefined` |
|
|
43
|
+
| `isSuperAdmin` | `boolean` | `false` |
|
|
40
44
|
|
|
41
45
|
#### Returns
|
|
42
46
|
|
|
@@ -44,7 +48,7 @@ and prevents queries that don't have the required context.
|
|
|
44
48
|
|
|
45
49
|
#### Defined in
|
|
46
50
|
|
|
47
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
51
|
+
[packages/core/src/rbac/secureClient.ts:35](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L35)
|
|
48
52
|
|
|
49
53
|
## Methods
|
|
50
54
|
|
|
@@ -63,7 +67,7 @@ Supabase client without custom headers for Edge Function calls
|
|
|
63
67
|
|
|
64
68
|
#### Defined in
|
|
65
69
|
|
|
66
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
70
|
+
[packages/core/src/rbac/secureClient.ts:134](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L134)
|
|
67
71
|
|
|
68
72
|
___
|
|
69
73
|
|
|
@@ -79,7 +83,7 @@ Get the current organisation ID
|
|
|
79
83
|
|
|
80
84
|
#### Defined in
|
|
81
85
|
|
|
82
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
86
|
+
[packages/core/src/rbac/secureClient.ts:243](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L243)
|
|
83
87
|
|
|
84
88
|
___
|
|
85
89
|
|
|
@@ -95,7 +99,7 @@ Get the current event ID
|
|
|
95
99
|
|
|
96
100
|
#### Defined in
|
|
97
101
|
|
|
98
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
102
|
+
[packages/core/src/rbac/secureClient.ts:250](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L250)
|
|
99
103
|
|
|
100
104
|
___
|
|
101
105
|
|
|
@@ -111,7 +115,7 @@ Get the current app ID
|
|
|
111
115
|
|
|
112
116
|
#### Defined in
|
|
113
117
|
|
|
114
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
118
|
+
[packages/core/src/rbac/secureClient.ts:257](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L257)
|
|
115
119
|
|
|
116
120
|
___
|
|
117
121
|
|
|
@@ -129,6 +133,7 @@ Create a new client with updated context
|
|
|
129
133
|
| `updates.organisationId?` | `string` |
|
|
130
134
|
| `updates.eventId?` | `string` |
|
|
131
135
|
| `updates.appId?` | `string` |
|
|
136
|
+
| `updates.isSuperAdmin?` | `boolean` |
|
|
132
137
|
|
|
133
138
|
#### Returns
|
|
134
139
|
|
|
@@ -136,7 +141,7 @@ Create a new client with updated context
|
|
|
136
141
|
|
|
137
142
|
#### Defined in
|
|
138
143
|
|
|
139
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
144
|
+
[packages/core/src/rbac/secureClient.ts:264](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L264)
|
|
140
145
|
|
|
141
146
|
___
|
|
142
147
|
|
|
@@ -152,4 +157,4 @@ Get the underlying Supabase client (for internal use only)
|
|
|
152
157
|
|
|
153
158
|
#### Defined in
|
|
154
159
|
|
|
155
|
-
[packages/core/src/rbac/secureClient.ts:
|
|
160
|
+
[packages/core/src/rbac/secureClient.ts:284](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/secureClient.ts#L284)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.190](../README.md) / [Exports](../modules.md) / StorageUtils
|
|
2
2
|
|
|
3
3
|
# Class: StorageUtils
|
|
4
4
|
|
|
@@ -43,7 +43,9 @@ StorageUtils class for convenient access to storage functions
|
|
|
43
43
|
|
|
44
44
|
▸ (`options`, `fileName`): `string`
|
|
45
45
|
|
|
46
|
-
Generate a file path based on organization-first structure
|
|
46
|
+
Generate a file path based on organization-first or user-first structure
|
|
47
|
+
- If orgId is provided: {orgId}/{folder}/filename
|
|
48
|
+
- If userId is provided (and orgId is not): users/{userId}/{folder}/filename
|
|
47
49
|
|
|
48
50
|
##### Parameters
|
|
49
51
|
|
|
@@ -297,7 +299,7 @@ ___
|
|
|
297
299
|
|
|
298
300
|
### archiveFile
|
|
299
301
|
|
|
300
|
-
▪ `Static` **archiveFile**: (`supabase`: `default`\<`any`, ``"public"``, ``"public"``, `any`, `any`\>, `path`: `string`, `options`: \{ `appName`: `string` ; `orgId
|
|
302
|
+
▪ `Static` **archiveFile**: (`supabase`: `default`\<`any`, ``"public"``, ``"public"``, `any`, `any`\>, `path`: `string`, `options`: \{ `appName`: `string` ; `orgId?`: `string` ; `userId?`: `string` ; `isPublic?`: `boolean` }) => `Promise`\<\{ `success`: `boolean` ; `error?`: `string` }\> = `archiveFile`
|
|
301
303
|
|
|
302
304
|
#### Type declaration
|
|
303
305
|
|
|
@@ -313,7 +315,8 @@ Move a file to archived location (soft delete)
|
|
|
313
315
|
| `path` | `string` | File path within the bucket |
|
|
314
316
|
| `options` | `Object` | Archive options including bucket selection via isPublic |
|
|
315
317
|
| `options.appName` | `string` | - |
|
|
316
|
-
| `options.orgId
|
|
318
|
+
| `options.orgId?` | `string` | - |
|
|
319
|
+
| `options.userId?` | `string` | - |
|
|
317
320
|
| `options.isPublic?` | `boolean` | - |
|
|
318
321
|
|
|
319
322
|
##### Returns
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.190](../README.md) / [Exports](../modules.md) / CalendarProps
|
|
2
2
|
|
|
3
3
|
# Interface: CalendarProps
|
|
4
4
|
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
- [className](CalendarProps.md#classname)
|
|
16
16
|
- [classNames](CalendarProps.md#classnames)
|
|
17
|
+
- [selected](CalendarProps.md#selected)
|
|
17
18
|
- [onSelect](CalendarProps.md#onselect)
|
|
18
19
|
|
|
19
20
|
## Properties
|
|
@@ -22,23 +23,36 @@
|
|
|
22
23
|
|
|
23
24
|
• `Optional` **className**: `string`
|
|
24
25
|
|
|
25
|
-
Additional CSS classes to apply to the calendar
|
|
26
|
+
Additional CSS classes to apply to the calendar table
|
|
26
27
|
|
|
27
28
|
#### Defined in
|
|
28
29
|
|
|
29
|
-
[packages/core/src/components/Calendar/Calendar.tsx:
|
|
30
|
+
[packages/core/src/components/Calendar/Calendar.tsx:96](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Calendar/Calendar.tsx#L96)
|
|
30
31
|
|
|
31
32
|
___
|
|
32
33
|
|
|
33
34
|
### classNames
|
|
34
35
|
|
|
35
|
-
• `Optional` **classNames**: `Partial`\<`
|
|
36
|
+
• `Optional` **classNames**: `Partial`\<`ClassNames`\> & `Partial`\<`DeprecatedUI`\<`string`\>\>
|
|
36
37
|
|
|
37
38
|
Custom classNames for DayPicker sub-components
|
|
38
39
|
|
|
39
40
|
#### Defined in
|
|
40
41
|
|
|
41
|
-
[packages/core/src/components/Calendar/Calendar.tsx:
|
|
42
|
+
[packages/core/src/components/Calendar/Calendar.tsx:100](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Calendar/Calendar.tsx#L100)
|
|
43
|
+
|
|
44
|
+
___
|
|
45
|
+
|
|
46
|
+
### selected
|
|
47
|
+
|
|
48
|
+
• `Optional` **selected**: `Date` \| `Date`[] \| `DateRange`
|
|
49
|
+
|
|
50
|
+
Currently selected value; mirrors DayPicker's `selected` prop so callers
|
|
51
|
+
can control the selection state.
|
|
52
|
+
|
|
53
|
+
#### Defined in
|
|
54
|
+
|
|
55
|
+
[packages/core/src/components/Calendar/Calendar.tsx:105](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Calendar/Calendar.tsx#L105)
|
|
42
56
|
|
|
43
57
|
___
|
|
44
58
|
|
|
@@ -53,4 +67,4 @@ Date selection handler. Signature depends on mode:
|
|
|
53
67
|
|
|
54
68
|
#### Defined in
|
|
55
69
|
|
|
56
|
-
[packages/core/src/components/Calendar/Calendar.tsx:
|
|
70
|
+
[packages/core/src/components/Calendar/Calendar.tsx:112](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Calendar/Calendar.tsx#L112)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.190](../README.md) / [Exports](../modules.md) / DataAccessRecord
|
|
2
2
|
|
|
3
3
|
# Interface: DataAccessRecord
|
|
4
4
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
#### Defined in
|
|
25
25
|
|
|
26
|
-
[packages/core/src/rbac/components/SecureDataProvider.tsx:
|
|
26
|
+
[packages/core/src/rbac/components/SecureDataProvider.tsx:67](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L67)
|
|
27
27
|
|
|
28
28
|
___
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ ___
|
|
|
33
33
|
|
|
34
34
|
#### Defined in
|
|
35
35
|
|
|
36
|
-
[packages/core/src/rbac/components/SecureDataProvider.tsx:
|
|
36
|
+
[packages/core/src/rbac/components/SecureDataProvider.tsx:68](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L68)
|
|
37
37
|
|
|
38
38
|
___
|
|
39
39
|
|
|
@@ -43,7 +43,7 @@ ___
|
|
|
43
43
|
|
|
44
44
|
#### Defined in
|
|
45
45
|
|
|
46
|
-
[packages/core/src/rbac/components/SecureDataProvider.tsx:
|
|
46
|
+
[packages/core/src/rbac/components/SecureDataProvider.tsx:69](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L69)
|
|
47
47
|
|
|
48
48
|
___
|
|
49
49
|
|
|
@@ -53,7 +53,7 @@ ___
|
|
|
53
53
|
|
|
54
54
|
#### Defined in
|
|
55
55
|
|
|
56
|
-
[packages/core/src/rbac/components/SecureDataProvider.tsx:
|
|
56
|
+
[packages/core/src/rbac/components/SecureDataProvider.tsx:70](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L70)
|
|
57
57
|
|
|
58
58
|
___
|
|
59
59
|
|
|
@@ -63,7 +63,7 @@ ___
|
|
|
63
63
|
|
|
64
64
|
#### Defined in
|
|
65
65
|
|
|
66
|
-
[packages/core/src/rbac/components/SecureDataProvider.tsx:
|
|
66
|
+
[packages/core/src/rbac/components/SecureDataProvider.tsx:71](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L71)
|
|
67
67
|
|
|
68
68
|
___
|
|
69
69
|
|
|
@@ -73,7 +73,7 @@ ___
|
|
|
73
73
|
|
|
74
74
|
#### Defined in
|
|
75
75
|
|
|
76
|
-
[packages/core/src/rbac/components/SecureDataProvider.tsx:
|
|
76
|
+
[packages/core/src/rbac/components/SecureDataProvider.tsx:72](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L72)
|
|
77
77
|
|
|
78
78
|
___
|
|
79
79
|
|
|
@@ -83,7 +83,7 @@ ___
|
|
|
83
83
|
|
|
84
84
|
#### Defined in
|
|
85
85
|
|
|
86
|
-
[packages/core/src/rbac/components/SecureDataProvider.tsx:
|
|
86
|
+
[packages/core/src/rbac/components/SecureDataProvider.tsx:73](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L73)
|
|
87
87
|
|
|
88
88
|
___
|
|
89
89
|
|
|
@@ -93,4 +93,4 @@ ___
|
|
|
93
93
|
|
|
94
94
|
#### Defined in
|
|
95
95
|
|
|
96
|
-
[packages/core/src/rbac/components/SecureDataProvider.tsx:
|
|
96
|
+
[packages/core/src/rbac/components/SecureDataProvider.tsx:74](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/SecureDataProvider.tsx#L74)
|