@jmruthers/pace-core 0.6.11 → 0.6.12
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-EFYP2QLE.js → DataTable-AQAHSFLM.js} +7 -6
- package/dist/{api-BZR2CYXL.js → api-6OQXYT67.js} +2 -1
- package/dist/{chunk-L5LFKKLJ.js → chunk-2GBDPPUC.js} +1 -1
- package/dist/{chunk-J2KQK6DG.js → chunk-AP5FG7W4.js} +2 -2
- package/dist/{chunk-UZNAFKGW.js → chunk-GHCUP64P.js} +1 -21
- package/dist/{chunk-V7FTM2LU.js → chunk-H6RTU4DZ.js} +37 -19
- package/dist/{chunk-KJXRL3XE.js → chunk-HQTYP6BX.js} +79 -45
- package/dist/{chunk-YFTFFJIV.js → chunk-M7QE7XOA.js} +3 -3
- package/dist/{chunk-YYTWKVHO.js → chunk-MVVWZ7JV.js} +25 -30
- package/dist/{chunk-PCSHBLPB.js → chunk-NJ7FGQWB.js} +5 -5
- package/dist/{chunk-WY6Y7KC3.js → chunk-QWIG36BZ.js} +3 -3
- package/dist/{chunk-4R3T5ENU.js → chunk-S57OLCLO.js} +9 -6
- package/dist/chunk-VFLR5K2H.js +23 -0
- package/dist/{chunk-2OEVOGGR.js → chunk-Y2LWSLLB.js} +41 -25
- package/dist/{chunk-7A6IMHH2.js → chunk-YFGNMB67.js} +75 -6
- package/dist/components.d.ts +3 -3
- package/dist/components.js +13 -12
- package/dist/{functions-DH45k8ec.d.ts → functions-hF5ImHCr.d.ts} +1 -1
- package/dist/hooks.js +8 -7
- package/dist/index.d.ts +5 -5
- package/dist/index.js +17 -16
- package/dist/providers.js +3 -2
- package/dist/rbac/index.d.ts +10 -10
- package/dist/rbac/index.js +9 -8
- package/dist/{types-BE2sEHKd.d.ts → types-Besvoyzb.d.ts} +1 -1
- package/dist/{types-CvOPXWWZ.d.ts → types-CGHrxfqc.d.ts} +3 -0
- package/dist/types.d.ts +2 -2
- package/dist/{usePublicPageContext-B91dGYW1.d.ts → usePublicPageContext-BQrHf95t.d.ts} +1 -1
- package/dist/utils.js +4 -3
- package/docs/api/@jmruthers/namespaces/DialogPortal/README.md +14 -0
- package/docs/api/@jmruthers/namespaces/DialogPortal/variables/displayName.md +11 -0
- package/docs/api/README.md +6 -2
- package/docs/api/_media/README.md +186 -0
- package/docs/api/classes/ColumnFactory.md +225 -0
- package/docs/api/classes/Logger.md +246 -0
- package/docs/api/classes/RBACAuditManager.md +299 -0
- package/docs/api/classes/RBACCache.md +389 -0
- package/docs/api/classes/RBACEngine.md +181 -0
- package/docs/api/classes/SecureSupabaseClient.md +168 -0
- package/docs/api/classes/StorageUtils.md +324 -0
- package/docs/api/enumerations/FileCategory.md +137 -0
- package/docs/api/enumerations/LogLevel.md +43 -0
- package/docs/api/enumerations/RBACErrorCode.md +169 -0
- package/docs/api/enumerations/RPCFunction.md +89 -0
- package/docs/api/functions/AccessDenied.md +30 -0
- package/docs/api/functions/AppSwitcher.md +21 -0
- package/docs/api/functions/Badge.md +42 -0
- package/docs/api/functions/ContextSelector.md +43 -0
- package/docs/api/functions/DataTable.md +36 -0
- package/docs/api/functions/DatePickerWithTimezone.md +28 -0
- package/docs/api/functions/DialogBody.md +24 -0
- package/docs/api/functions/DialogFooter.md +24 -0
- package/docs/api/functions/DialogHeader.md +24 -0
- package/docs/api/functions/ErrorBoundaryProvider.md +28 -0
- package/docs/api/functions/EventServiceProvider.md +28 -0
- package/docs/api/functions/FileDisplay.md +25 -0
- package/docs/api/functions/FileUpload.md +21 -0
- package/docs/api/functions/Form.md +50 -0
- package/docs/api/functions/FormField.md +102 -0
- package/docs/api/functions/Header.md +21 -0
- package/docs/api/functions/InactivityServiceProvider.md +28 -0
- package/docs/api/functions/InactivityWarningModal.md +21 -0
- package/docs/api/functions/Input.md +49 -0
- package/docs/api/functions/NavigationGuard.md +31 -0
- package/docs/api/functions/OrganisationServiceProvider.md +28 -0
- package/docs/api/functions/PaceAppLayout.md +169 -0
- package/docs/api/functions/PasswordChangeForm.md +21 -0
- package/docs/api/functions/ProtectedRoute.md +37 -0
- package/docs/api/functions/PublicPageFooter.md +21 -0
- package/docs/api/functions/PublicPageHeader.md +21 -0
- package/docs/api/functions/PublicPageLayout.md +33 -0
- package/docs/api/functions/PublicPageProvider.md +30 -0
- package/docs/api/functions/Textarea.md +49 -0
- package/docs/api/functions/Toaster.md +34 -0
- package/docs/api/functions/UnifiedAuthProvider.md +28 -0
- package/docs/api/functions/applyPalette.md +33 -0
- package/docs/api/functions/archiveFile.md +47 -0
- package/docs/api/functions/average.md +63 -0
- package/docs/api/functions/buildAppUrl.md +46 -0
- package/docs/api/functions/clearInFlightRequests.md +17 -0
- package/docs/api/functions/clearPalette.md +18 -0
- package/docs/api/functions/clearPublicEventCache.md +18 -0
- package/docs/api/functions/clearPublicFileDisplayCache.md +18 -0
- package/docs/api/functions/clearPublicLogoCache.md +18 -0
- package/docs/api/functions/cn.md +21 -0
- package/docs/api/functions/count.md +56 -0
- package/docs/api/functions/createAuditManager.md +45 -0
- package/docs/api/functions/createBaseClient.md +75 -0
- package/docs/api/functions/createLogger.md +95 -0
- package/docs/api/functions/createRBACConfig.md +21 -0
- package/docs/api/functions/createRBACEngine.md +33 -0
- package/docs/api/functions/createRBACExpressMiddleware.md +84 -0
- package/docs/api/functions/createRBACMiddleware.md +88 -0
- package/docs/api/functions/createSecureClient.md +80 -0
- package/docs/api/functions/createSecureDataAccess.md +39 -0
- package/docs/api/functions/deleteFile.md +33 -0
- package/docs/api/functions/disablePerformanceMonitoring.md +17 -0
- package/docs/api/functions/downloadFile.md +33 -0
- package/docs/api/functions/emitAuditEvent.md +27 -0
- package/docs/api/functions/enablePerformanceMonitoring.md +17 -0
- package/docs/api/functions/err.md +23 -0
- package/docs/api/functions/exportToCSV.md +56 -0
- package/docs/api/functions/exportToCSVWithTableRows.md +46 -0
- package/docs/api/functions/extractEventCodeFromPath.md +24 -0
- package/docs/api/functions/extractFileMetadata.md +33 -0
- package/docs/api/functions/formatCompactNumber.md +27 -0
- package/docs/api/functions/formatCurrency.md +31 -0
- package/docs/api/functions/formatDate.md +23 -0
- package/docs/api/functions/formatDateTime.md +24 -0
- package/docs/api/functions/formatFileSize.md +23 -0
- package/docs/api/functions/formatInTimeZone.md +46 -0
- package/docs/api/functions/formatNumber.md +31 -0
- package/docs/api/functions/formatPercent.md +64 -0
- package/docs/api/functions/formatTime.md +24 -0
- package/docs/api/functions/formatTimeInTimeZone.md +40 -0
- package/docs/api/functions/fromSupabaseClient.md +49 -0
- package/docs/api/functions/fromZonedTime.md +41 -0
- package/docs/api/functions/generateCSVContent.md +55 -0
- package/docs/api/functions/generateFilePath.md +29 -0
- package/docs/api/functions/generateFileUrlsBatch.md +33 -0
- package/docs/api/functions/generatePublicRoutePath.md +27 -0
- package/docs/api/functions/generateUniqueFileName.md +24 -0
- package/docs/api/functions/getAccessLevel.md +48 -0
- package/docs/api/functions/getAllAppPorts.md +19 -0
- package/docs/api/functions/getAllStylePaths.md +15 -0
- package/docs/api/functions/getAppConfig.md +17 -0
- package/docs/api/functions/getAppPort.md +34 -0
- package/docs/api/functions/getBucketName.md +27 -0
- package/docs/api/functions/getCurrentAppId.md +17 -0
- package/docs/api/functions/getCurrentAppName.md +17 -0
- package/docs/api/functions/getFileSizeLimit.md +23 -0
- package/docs/api/functions/getGlobalAuditManager.md +19 -0
- package/docs/api/functions/getInFlightRequestCount.md +19 -0
- package/docs/api/functions/getPerformanceMetrics.md +17 -0
- package/docs/api/functions/getPerformanceSummary.md +17 -0
- package/docs/api/functions/getPermissionMap.md +52 -0
- package/docs/api/functions/getPublicEventCacheStats.md +25 -0
- package/docs/api/functions/getPublicFileDisplayCacheStats.md +25 -0
- package/docs/api/functions/getPublicLogoCacheStats.md +25 -0
- package/docs/api/functions/getPublicUrl.md +39 -0
- package/docs/api/functions/getRBACConfig.md +15 -0
- package/docs/api/functions/getRBACLogger.md +15 -0
- package/docs/api/functions/getRoleContext.md +31 -0
- package/docs/api/functions/getSignedUrl.md +34 -0
- package/docs/api/functions/getStylePath.md +21 -0
- package/docs/api/functions/getTimeZoneDifference.md +40 -0
- package/docs/api/functions/getTimezoneAbbreviation.md +40 -0
- package/docs/api/functions/getUserTimeZone.md +26 -0
- package/docs/api/functions/hasAllPermissions.md +41 -0
- package/docs/api/functions/hasAnyPermission.md +41 -0
- package/docs/api/functions/isDebugMode.md +15 -0
- package/docs/api/functions/isDevelopmentMode.md +15 -0
- package/docs/api/functions/isErr.md +29 -0
- package/docs/api/functions/isOk.md +29 -0
- package/docs/api/functions/isPerformanceMonitoringEnabled.md +17 -0
- package/docs/api/functions/isPermitted.md +58 -0
- package/docs/api/functions/isPermittedCached.md +36 -0
- package/docs/api/functions/isRBACInitialized.md +19 -0
- package/docs/api/functions/isSecureClient.md +38 -0
- package/docs/api/functions/isValidPermission.md +27 -0
- package/docs/api/functions/listFiles.md +29 -0
- package/docs/api/functions/max.md +63 -0
- package/docs/api/functions/min.md +63 -0
- package/docs/api/functions/ok.md +29 -0
- package/docs/api/functions/parseAndNormalizeEventColours.md +105 -0
- package/docs/api/functions/recordAuditEvent.md +23 -0
- package/docs/api/functions/recordPermissionCheck.md +31 -0
- package/docs/api/functions/resetPerformanceMetrics.md +17 -0
- package/docs/api/functions/resolveAppContext.md +27 -0
- package/docs/api/functions/roundToNearestMinutes.md +41 -0
- package/docs/api/functions/sanitizeFormData.md +49 -0
- package/docs/api/functions/sanitizeHtml.md +39 -0
- package/docs/api/functions/sanitizeUserInput.md +27 -0
- package/docs/api/functions/setAppConfig.md +23 -0
- package/docs/api/functions/setGlobalAuditManager.md +25 -0
- package/docs/api/functions/setupRBAC.md +31 -0
- package/docs/api/functions/sum.md +63 -0
- package/docs/api/functions/toZonedTime.md +41 -0
- package/docs/api/functions/uploadFile.md +32 -0
- package/docs/api/functions/useAccessLevel.md +71 -0
- package/docs/api/functions/useAccessibleApps.md +55 -0
- package/docs/api/functions/useAppConfig.md +20 -0
- package/docs/api/functions/useAuthService.md +15 -0
- package/docs/api/functions/useCan.md +99 -0
- package/docs/api/functions/useEventService.md +15 -0
- package/docs/api/functions/useEventTheme.md +26 -0
- package/docs/api/functions/useEvents.md +45 -0
- package/docs/api/functions/useFileReference.md +264 -0
- package/docs/api/functions/useFileReferenceById.md +63 -0
- package/docs/api/functions/useFileReferenceForRecord.md +129 -0
- package/docs/api/functions/useFilesByCategory.md +80 -0
- package/docs/api/functions/useFormDialog.md +62 -0
- package/docs/api/functions/useInactivityService.md +15 -0
- package/docs/api/functions/useInactivityTracker.md +21 -0
- package/docs/api/functions/useIsPublicPage.md +19 -0
- package/docs/api/functions/useMultiplePermissions.md +88 -0
- package/docs/api/functions/useOptionalEvents.md +31 -0
- package/docs/api/functions/useOrganisationPermissions.md +27 -0
- package/docs/api/functions/useOrganisationSecurity.md +15 -0
- package/docs/api/functions/useOrganisationService.md +15 -0
- package/docs/api/functions/useOrganisations.md +48 -0
- package/docs/api/functions/usePermissions.md +130 -0
- package/docs/api/functions/usePublicEvent.md +36 -0
- package/docs/api/functions/usePublicEventCode.md +32 -0
- package/docs/api/functions/usePublicEventLogo.md +48 -0
- package/docs/api/functions/usePublicFileDisplay.md +54 -0
- package/docs/api/functions/usePublicPageContext.md +19 -0
- package/docs/api/functions/usePublicRouteParams.md +31 -0
- package/docs/api/functions/useRBAC.md +21 -0
- package/docs/api/functions/useResolvedScope.md +46 -0
- package/docs/api/functions/useResourcePermissions.md +25 -0
- package/docs/api/functions/useRoleManagement.md +121 -0
- package/docs/api/functions/useSecureSupabase.md +51 -0
- package/docs/api/functions/useSessionRestoration.md +15 -0
- package/docs/api/functions/useSessionTracking.md +62 -0
- package/docs/api/functions/useToast.md +83 -0
- package/docs/api/functions/useUnifiedAuth.md +24 -0
- package/docs/api/functions/useZodForm.md +27 -0
- package/docs/api/functions/validateFileSize.md +31 -0
- package/docs/api/functions/warnIfInsecureClient.md +40 -0
- package/docs/api/functions/withAccessLevelGuard.md +67 -0
- package/docs/api/functions/withPermissionGuard.md +73 -0
- package/docs/api/functions/withRoleGuard.md +86 -0
- package/docs/api/globals.md +502 -0
- package/docs/api/interfaces/AccessDeniedProps.md +87 -0
- package/docs/api/interfaces/AccessibleApp.md +41 -0
- package/docs/api/interfaces/AddressFieldProps.md +195 -0
- package/docs/api/interfaces/AddressFieldRef.md +67 -0
- package/docs/api/interfaces/AggregateConfig.md +35 -0
- package/docs/api/interfaces/AppSwitcherProps.md +51 -0
- package/docs/api/interfaces/AuthSessionData.md +27 -0
- package/docs/api/interfaces/AutocompleteOptions.md +61 -0
- package/docs/api/interfaces/AvatarProps.md +97 -0
- package/docs/api/interfaces/BadgeProps.md +30 -0
- package/docs/api/interfaces/BuildAppUrlOptions.md +41 -0
- package/docs/api/interfaces/ButtonProps.md +46 -0
- package/docs/api/interfaces/CalendarProps.md +60 -0
- package/docs/api/interfaces/CardProps.md +56 -0
- package/docs/api/interfaces/ColorPalette.md +13 -0
- package/docs/api/interfaces/ColorShade.md +58 -0
- package/docs/api/interfaces/ContextSelectorProps.md +131 -0
- package/docs/api/interfaces/DataRecord.md +16 -0
- package/docs/api/interfaces/DataTableAction.md +198 -0
- package/docs/api/interfaces/DataTableColumn.md +422 -0
- package/docs/api/interfaces/DataTableProps.md +511 -0
- package/docs/api/interfaces/DataTableToolbarButton.md +75 -0
- package/docs/api/interfaces/DatePickerWithTimezoneProps.md +75 -0
- package/docs/api/interfaces/DialogBodyProps.md +55 -0
- package/docs/api/interfaces/DialogCloseProps.md +25 -0
- package/docs/api/interfaces/DialogContentProps.md +160 -0
- package/docs/api/interfaces/DialogFooterProps.md +25 -0
- package/docs/api/interfaces/DialogHeaderProps.md +25 -0
- package/docs/api/interfaces/DialogPortalProps.md +19 -0
- package/docs/api/interfaces/DialogProps.md +53 -0
- package/docs/api/interfaces/DialogTriggerProps.md +53 -0
- package/docs/api/interfaces/EmptyStateConfig.md +55 -0
- package/docs/api/interfaces/ErrorBoundaryProps.md +131 -0
- package/docs/api/interfaces/ErrorBoundaryProviderProps.md +31 -0
- package/docs/api/interfaces/ErrorBoundaryState.md +61 -0
- package/docs/api/interfaces/EventAppRoleData.md +54 -0
- package/docs/api/interfaces/ExportColumn.md +69 -0
- package/docs/api/interfaces/ExportOptions.md +109 -0
- package/docs/api/interfaces/FileDisplayProps.md +192 -0
- package/docs/api/interfaces/FileMetadata.md +97 -0
- package/docs/api/interfaces/FileReference.md +89 -0
- package/docs/api/interfaces/FileSizeLimits.md +13 -0
- package/docs/api/interfaces/FileUploadOptions.md +107 -0
- package/docs/api/interfaces/FooterProps.md +37 -0
- package/docs/api/interfaces/FormFieldProps.md +171 -0
- package/docs/api/interfaces/FormProps.md +93 -0
- package/docs/api/interfaces/GrantEventAppRoleParams.md +97 -0
- package/docs/api/interfaces/ImportSummary.md +49 -0
- package/docs/api/interfaces/InactivityWarningModalProps.md +87 -0
- package/docs/api/interfaces/InputProps.md +46 -0
- package/docs/api/interfaces/InvalidScopeError.md +37 -0
- package/docs/api/interfaces/LabelProps.md +85 -0
- package/docs/api/interfaces/LoggerConfig.md +51 -0
- package/docs/api/interfaces/LoginFormProps.md +146 -0
- package/docs/api/interfaces/MissingUserContextError.md +37 -0
- package/docs/api/interfaces/NavigationGuardProps.md +109 -0
- package/docs/api/interfaces/NavigationItem.md +91 -0
- package/docs/api/interfaces/NavigationMenuProps.md +169 -0
- package/docs/api/interfaces/Organisation.md +105 -0
- package/docs/api/interfaces/OrganisationContextRequiredError.md +37 -0
- package/docs/api/interfaces/OrganisationMembership.md +105 -0
- package/docs/api/interfaces/OrganisationSecurityError.md +49 -0
- package/docs/api/interfaces/PaceAppLayoutPermissionConfig.md +127 -0
- package/docs/api/interfaces/PaceAppLayoutRouteConfigItem.md +91 -0
- package/docs/api/interfaces/PaceAppLayoutRoutingConfig.md +79 -0
- package/docs/api/interfaces/PaceLoginPageProps.md +41 -0
- package/docs/api/interfaces/PagePermissionGuardProps.md +143 -0
- package/docs/api/interfaces/PaletteData.md +33 -0
- package/docs/api/interfaces/ParsedAddress.md +91 -0
- package/docs/api/interfaces/PermissionDeniedError.md +37 -0
- package/docs/api/interfaces/ProgressProps.md +35 -0
- package/docs/api/interfaces/ProtectedRouteProps.md +67 -0
- package/docs/api/interfaces/PublicPageFooterProps.md +97 -0
- package/docs/api/interfaces/PublicPageHeaderProps.md +99 -0
- package/docs/api/interfaces/PublicPageLayoutProps.md +153 -0
- package/docs/api/interfaces/RBACAccessValidateParams.md +41 -0
- package/docs/api/interfaces/RBACAccessValidateResult.md +33 -0
- package/docs/api/interfaces/RBACAuditLogParams.md +65 -0
- package/docs/api/interfaces/RBACAuditLogResult.md +41 -0
- package/docs/api/interfaces/RBACContext.md +41 -0
- package/docs/api/interfaces/RBACError.md +37 -0
- package/docs/api/interfaces/RBACLogger.md +97 -0
- package/docs/api/interfaces/RBACNotInitializedError.md +37 -0
- package/docs/api/interfaces/RBACPageAccessCheckParams.md +57 -0
- package/docs/api/interfaces/RBACPerformanceMetrics.md +109 -0
- package/docs/api/interfaces/RBACPermissionCheckParams.md +57 -0
- package/docs/api/interfaces/RBACPermissionCheckResult.md +41 -0
- package/docs/api/interfaces/RBACPermissionsGetParams.md +49 -0
- package/docs/api/interfaces/RBACPermissionsGetResult.md +49 -0
- package/docs/api/interfaces/RBACResult.md +47 -0
- package/docs/api/interfaces/RBACRoleGrantParams.md +49 -0
- package/docs/api/interfaces/RBACRoleGrantResult.md +41 -0
- package/docs/api/interfaces/RBACRoleRevokeParams.md +49 -0
- package/docs/api/interfaces/RBACRoleRevokeResult.md +41 -0
- package/docs/api/interfaces/RBACRoleValidateParams.md +41 -0
- package/docs/api/interfaces/RBACRoleValidateResult.md +49 -0
- package/docs/api/interfaces/RBACRolesListParams.md +41 -0
- package/docs/api/interfaces/RBACRolesListResult.md +57 -0
- package/docs/api/interfaces/RBACSessionTrackParams.md +57 -0
- package/docs/api/interfaces/RBACSessionTrackResult.md +41 -0
- package/docs/api/interfaces/ResourcePermissions.md +119 -0
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +81 -0
- package/docs/api/interfaces/RoleManagementResult.md +41 -0
- package/docs/api/interfaces/SessionRestorationLoaderProps.md +29 -0
- package/docs/api/interfaces/StorageConfig.md +33 -0
- package/docs/api/interfaces/StorageFileInfo.md +57 -0
- package/docs/api/interfaces/StorageFileMetadata.md +113 -0
- package/docs/api/interfaces/StorageListOptions.md +79 -0
- package/docs/api/interfaces/StorageListResult.md +33 -0
- package/docs/api/interfaces/StorageUploadOptions.md +81 -0
- package/docs/api/interfaces/StorageUploadResult.md +49 -0
- package/docs/api/interfaces/StorageUploadSuccess.md +35 -0
- package/docs/api/interfaces/StorageUrlOptions.md +49 -0
- package/docs/api/interfaces/StyleImport.md +17 -0
- package/docs/api/interfaces/SwitchProps.md +30 -0
- package/docs/api/interfaces/TabsContentProps.md +13 -0
- package/docs/api/interfaces/TabsListProps.md +13 -0
- package/docs/api/interfaces/TabsProps.md +13 -0
- package/docs/api/interfaces/TabsTriggerProps.md +41 -0
- package/docs/api/interfaces/TextareaProps.md +43 -0
- package/docs/api/interfaces/ToastActionElement.md +16 -0
- package/docs/api/interfaces/ToastProps.md +13 -0
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +129 -0
- package/docs/api/interfaces/UseAccessibleAppsReturn.md +55 -0
- package/docs/api/interfaces/UseFormDialogOptions.md +49 -0
- package/docs/api/interfaces/UseFormDialogReturn.md +95 -0
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +103 -0
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +91 -0
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +69 -0
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +66 -0
- package/docs/api/interfaces/UsePublicEventOptions.md +29 -0
- package/docs/api/interfaces/UsePublicEventReturn.md +56 -0
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +39 -0
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +96 -0
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +76 -0
- package/docs/api/interfaces/UseResolvedScopeOptions.md +49 -0
- package/docs/api/interfaces/UseResolvedScopeReturn.md +39 -0
- package/docs/api/interfaces/UseResourcePermissionsOptions.md +29 -0
- package/docs/api/interfaces/UserEventAccess.md +92 -0
- package/docs/api/interfaces/UserMenuProps.md +69 -0
- package/docs/api/interfaces/UserProfile.md +49 -0
- package/docs/api/type-aliases/AccessLevel.md +11 -0
- package/docs/api/type-aliases/AccessLevelContext.md +14 -0
- package/docs/api/type-aliases/AllPermissions.md +11 -0
- package/docs/api/type-aliases/ApiError.md +37 -0
- package/docs/api/type-aliases/ApiResult.md +19 -0
- package/docs/api/type-aliases/AuditEventType.md +11 -0
- package/docs/api/type-aliases/BadgeVariant.md +18 -0
- package/docs/api/type-aliases/DataTableFeatureConfig.md +14 -0
- package/docs/api/type-aliases/DialogSize.md +13 -0
- package/docs/api/type-aliases/EventAppRole.md +11 -0
- package/docs/api/type-aliases/FileUploadProps.md +15 -0
- package/docs/api/type-aliases/GetRowId.md +33 -0
- package/docs/api/type-aliases/GlobalErrorHandler.md +35 -0
- package/docs/api/type-aliases/GlobalRole.md +11 -0
- package/docs/api/type-aliases/ImportHandlerResult.md +13 -0
- package/docs/api/type-aliases/NavigationMode.md +13 -0
- package/docs/api/type-aliases/Operation.md +11 -0
- package/docs/api/type-aliases/OrganisationContextType.md +13 -0
- package/docs/api/type-aliases/OrganisationRole.md +11 -0
- package/docs/api/type-aliases/PaceAppLayoutProps.md +14 -0
- package/docs/api/type-aliases/Permission.md +11 -0
- package/docs/api/type-aliases/PermissionCheck.md +46 -0
- package/docs/api/type-aliases/PermissionMap.md +11 -0
- package/docs/api/type-aliases/PermissionSource.md +13 -0
- package/docs/api/type-aliases/RBACConfig.md +13 -0
- package/docs/api/type-aliases/RBACFunctionResponse.md +57 -0
- package/docs/api/type-aliases/Scope.md +41 -0
- package/docs/api/type-aliases/SessionType.md +11 -0
- package/docs/api/type-aliases/UUID.md +11 -0
- package/docs/api/type-aliases/UnifiedAuthContextType.md +13 -0
- package/docs/api/type-aliases/UseFileReferenceForRecordReturn.md +161 -0
- package/docs/api/type-aliases/UseFileReferenceOptions.md +35 -0
- package/docs/api/type-aliases/UseFileReferenceReturn.md +13 -0
- package/docs/api/variables/ALL_PERMISSIONS.md +281 -0
- package/docs/api/variables/APP_PATH_MAPPING.md +14 -0
- package/docs/api/variables/AddressField.md +41 -0
- package/docs/api/variables/Alert.md +11 -0
- package/docs/api/variables/AlertDescription.md +11 -0
- package/docs/api/variables/AlertTitle.md +11 -0
- package/docs/api/variables/Avatar.md +13 -0
- package/docs/api/variables/Button.md +31 -0
- package/docs/api/variables/CACHE_PATTERNS.md +89 -0
- package/docs/api/variables/Calendar.md +74 -0
- package/docs/api/variables/Card.md +11 -0
- package/docs/api/variables/CardActions.md +11 -0
- package/docs/api/variables/CardContent.md +11 -0
- package/docs/api/variables/CardDescription.md +11 -0
- package/docs/api/variables/CardFooter.md +11 -0
- package/docs/api/variables/CardHeader.md +11 -0
- package/docs/api/variables/CardTitle.md +11 -0
- package/docs/api/variables/Checkbox.md +11 -0
- package/docs/api/variables/DEFAULT_APP_PORT_MAP.md +14 -0
- package/docs/api/variables/DEFAULT_FILE_SIZE_LIMIT.md +13 -0
- package/docs/api/variables/Dialog.md +14 -0
- package/docs/api/variables/DialogClose.md +14 -0
- package/docs/api/variables/DialogContent.md +28 -0
- package/docs/api/variables/DialogDescription.md +14 -0
- package/docs/api/variables/DialogPortal.md +14 -0
- package/docs/api/variables/DialogTitle.md +14 -0
- package/docs/api/variables/DialogTrigger.md +14 -0
- package/docs/api/variables/EVENT_APP_PERMISSIONS.md +109 -0
- package/docs/api/variables/ErrorBoundary.md +15 -0
- package/docs/api/variables/FILE_SIZE_LIMITS.md +13 -0
- package/docs/api/variables/Footer.md +11 -0
- package/docs/api/variables/GLOBAL_PERMISSIONS.md +29 -0
- package/docs/api/variables/Label.md +34 -0
- package/docs/api/variables/LoadingSpinner.md +28 -0
- package/docs/api/variables/LoginForm.md +34 -0
- package/docs/api/variables/NavigationMenu.md +203 -0
- package/docs/api/variables/ORGANISATION_PERMISSIONS.md +89 -0
- package/docs/api/variables/PAGE_PERMISSIONS.md +93 -0
- package/docs/api/variables/PaceLoginPage.md +40 -0
- package/docs/api/variables/PagePermissionGuard.md +11 -0
- package/docs/api/variables/Progress.md +32 -0
- package/docs/api/variables/SECURE_CLIENT_SYMBOL.md +14 -0
- package/docs/api/variables/STORAGE_CONFIG.md +13 -0
- package/docs/api/variables/Select.md +26 -0
- package/docs/api/variables/SelectContent.md +26 -0
- package/docs/api/variables/SelectGroup.md +26 -0
- package/docs/api/variables/SelectItem.md +26 -0
- package/docs/api/variables/SelectLabel.md +26 -0
- package/docs/api/variables/SelectSeparator.md +26 -0
- package/docs/api/variables/SelectTrigger.md +26 -0
- package/docs/api/variables/SelectValue.md +26 -0
- package/docs/api/variables/SessionRestorationLoader.md +11 -0
- package/docs/api/variables/Switch.md +23 -0
- package/docs/api/variables/Table.md +35 -0
- package/docs/api/variables/TableBody.md +11 -0
- package/docs/api/variables/TableCaption.md +11 -0
- package/docs/api/variables/TableCell.md +11 -0
- package/docs/api/variables/TableFooter.md +11 -0
- package/docs/api/variables/TableHead.md +11 -0
- package/docs/api/variables/TableHeader.md +11 -0
- package/docs/api/variables/TableRow.md +11 -0
- package/docs/api/variables/Tabs.md +25 -0
- package/docs/api/variables/TabsContent.md +24 -0
- package/docs/api/variables/TabsList.md +25 -0
- package/docs/api/variables/TabsTrigger.md +34 -0
- package/docs/api/variables/Toast.md +36 -0
- package/docs/api/variables/ToastAction.md +32 -0
- package/docs/api/variables/ToastClose.md +32 -0
- package/docs/api/variables/ToastDescription.md +32 -0
- package/docs/api/variables/ToastProvider.md +11 -0
- package/docs/api/variables/ToastTitle.md +32 -0
- package/docs/api/variables/ToastViewport.md +26 -0
- package/docs/api/variables/Tooltip.md +34 -0
- package/docs/api/variables/TooltipContent.md +34 -0
- package/docs/api/variables/TooltipProvider.md +11 -0
- package/docs/api/variables/TooltipRoot.md +11 -0
- package/docs/api/variables/TooltipTrigger.md +11 -0
- package/docs/api/variables/UserMenu.md +11 -0
- package/docs/api/variables/emailSchema.md +13 -0
- package/docs/api/variables/logger.md +203 -0
- package/docs/api/variables/nameSchema.md +13 -0
- package/docs/api/variables/passwordSchema.md +13 -0
- package/docs/api/variables/phoneSchema.md +13 -0
- package/docs/api/variables/rbacCache.md +16 -0
- package/docs/api/variables/styleConfig.md +25 -0
- package/docs/api/variables/urlSchema.md +13 -0
- package/docs/api-reference/hooks.md +2 -0
- package/docs/implementation-guides/data-tables.md +8 -0
- package/docs/rbac/getting-started.md +7 -0
- package/docs/rbac/troubleshooting.md +5 -1
- package/package.json +3 -3
- package/src/components/DataTable/hooks/useDataTableEffectiveActions.ts +29 -19
- package/src/components/DataTable/hooks/useDataTableScope.test.ts +5 -13
- package/src/components/DataTable/hooks/useDataTableScope.ts +16 -14
- package/src/components/Dialog/useDialogLifecycle.test.ts +4 -1
- package/src/components/FileDisplay/useFileDisplay.unit.test.ts +12 -8
- package/src/components/PaceAppLayout/PaceAppLayout.edge-cases.test.tsx +33 -9
- package/src/components/PaceAppLayout/useFilteredNavItems.ts +22 -7
- package/src/components/PaceAppLayout/usePaceAppLayoutConfig.ts +44 -23
- package/src/components/PaceAppLayout/usePaceAppLayoutPermissions.ts +1 -1
- package/src/components/PaceAppLayout/usePaceAppLayoutScope.ts +6 -4
- package/src/components/PaceAppLayout/useRoleBasedRouteAccess.ts +2 -2
- package/src/hooks/useAppConfig.unit.test.ts +74 -66
- package/src/hooks/useComponentPerformance.unit.test.tsx +6 -4
- package/src/hooks/useFileUrl.unit.test.ts +1 -3
- package/src/hooks/useInactivityTracker.unit.test.ts +6 -2
- package/src/hooks/usePerformanceMonitor.unit.test.ts +6 -16
- package/src/hooks/usePublicEvent.simple.test.ts +32 -47
- package/src/hooks/usePublicEvent.test.ts +9 -15
- package/src/providers/services/AuthServiceProvider.test.tsx +10 -5
- package/src/providers/services/EventServiceProvider.test.tsx +8 -3
- package/src/providers/services/InactivityServiceProvider.test.tsx +8 -3
- package/src/providers/services/OrganisationServiceProvider.test.tsx +8 -3
- package/src/rbac/README.md +7 -5
- package/src/rbac/api.test.ts +113 -56
- package/src/rbac/api.ts +80 -10
- package/src/rbac/components/NavigationGuard.tsx +2 -1
- package/src/rbac/components/PagePermissionGuard.test.tsx +23 -10
- package/src/rbac/engine.ts +23 -1
- package/src/rbac/hooks/permissions/runPermissionCheck.ts +18 -4
- package/src/rbac/hooks/permissions/useCan.test.ts +59 -20
- package/src/rbac/hooks/permissions/useCan.ts +7 -3
- package/src/rbac/hooks/permissions/useMultiplePermissions.ts +18 -9
- package/src/rbac/hooks/useCan.test.ts +2 -3
- package/src/rbac/hooks/usePageGuardScope.ts +6 -4
- package/src/rbac/hooks/usePagePermissionCheck.ts +4 -4
- package/src/rbac/hooks/useResolvedScope.ts +16 -10
- package/src/rbac/hooks/useResourcePermissions.test.ts +48 -58
- package/src/rbac/hooks/useResourcePermissions.ts +11 -20
- package/src/rbac/types.ts +3 -0
- package/src/services/AuthService.edge-cases.test.ts +2 -2
- package/src/services/EventService.ts +9 -4
- package/src/utils/file-reference/file-reference.test.ts +25 -14
- package/src/utils/supabase/createBaseClient.test.ts +30 -13
- package/docs/api/modules.md +0 -10028
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / InactivityWarningModal
|
|
6
|
+
|
|
7
|
+
# Function: InactivityWarningModal()
|
|
8
|
+
|
|
9
|
+
> **InactivityWarningModal**(`__namedParameters`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/InactivityWarningModal/InactivityWarningModal.tsx:73](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/InactivityWarningModal/InactivityWarningModal.tsx#L73)
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
### \_\_namedParameters
|
|
16
|
+
|
|
17
|
+
[`InactivityWarningModalProps`](../interfaces/InactivityWarningModalProps.md)
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`Element`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / Input
|
|
6
|
+
|
|
7
|
+
# Function: Input()
|
|
8
|
+
|
|
9
|
+
> **Input**(`props`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/Input/Input.tsx:108](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Input/Input.tsx#L108)
|
|
12
|
+
|
|
13
|
+
Input component
|
|
14
|
+
A flexible, accessible input component with multiple variants and sizes
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
### props
|
|
19
|
+
|
|
20
|
+
[`InputProps`](../interfaces/InputProps.md) & `object`
|
|
21
|
+
|
|
22
|
+
Input configuration and styling
|
|
23
|
+
|
|
24
|
+
## Returns
|
|
25
|
+
|
|
26
|
+
`Element`
|
|
27
|
+
|
|
28
|
+
JSX.Element - The rendered input element
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
// Basic input
|
|
34
|
+
<Input placeholder="Enter your name" />
|
|
35
|
+
|
|
36
|
+
// Input with error state
|
|
37
|
+
<Input
|
|
38
|
+
placeholder="Email"
|
|
39
|
+
type="email"
|
|
40
|
+
error={true}
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
// Large input with destructive variant
|
|
44
|
+
<Input
|
|
45
|
+
variant="destructive"
|
|
46
|
+
size="lg"
|
|
47
|
+
placeholder="Error input"
|
|
48
|
+
/>
|
|
49
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / NavigationGuard
|
|
6
|
+
|
|
7
|
+
# Function: NavigationGuard()
|
|
8
|
+
|
|
9
|
+
> **NavigationGuard**(`props`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [rbac/components/NavigationGuard.tsx:117](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/components/NavigationGuard.tsx#L117)
|
|
12
|
+
|
|
13
|
+
NavigationGuard - Enforces navigation-level permissions
|
|
14
|
+
|
|
15
|
+
This component ensures that users can only access navigation items they have permission for.
|
|
16
|
+
It integrates with the existing RBAC system and provides strict enforcement to
|
|
17
|
+
prevent apps from bypassing navigation permission checks.
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
### props
|
|
22
|
+
|
|
23
|
+
[`NavigationGuardProps`](../interfaces/NavigationGuardProps.md)
|
|
24
|
+
|
|
25
|
+
Component props
|
|
26
|
+
|
|
27
|
+
## Returns
|
|
28
|
+
|
|
29
|
+
`Element`
|
|
30
|
+
|
|
31
|
+
React element with navigation permission enforcement
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / OrganisationServiceProvider
|
|
6
|
+
|
|
7
|
+
# Function: OrganisationServiceProvider()
|
|
8
|
+
|
|
9
|
+
> **OrganisationServiceProvider**(`props`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [providers/services/OrganisationServiceProvider.tsx:34](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/services/OrganisationServiceProvider.tsx#L34)
|
|
12
|
+
|
|
13
|
+
React provider for OrganisationService.
|
|
14
|
+
Provides organisation service instance to React components.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
### props
|
|
19
|
+
|
|
20
|
+
`OrganisationServiceProviderProps`
|
|
21
|
+
|
|
22
|
+
Organisation service provider configuration
|
|
23
|
+
|
|
24
|
+
## Returns
|
|
25
|
+
|
|
26
|
+
`Element`
|
|
27
|
+
|
|
28
|
+
The organisation service provider
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / PaceAppLayout
|
|
6
|
+
|
|
7
|
+
# Function: PaceAppLayout()
|
|
8
|
+
|
|
9
|
+
> **PaceAppLayout**(`props`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/PaceAppLayout/PaceAppLayout.tsx:426](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PaceAppLayout/PaceAppLayout.tsx#L426)
|
|
12
|
+
|
|
13
|
+
A consistent layout component for all PACE suite applications that provides a standard
|
|
14
|
+
structure with header, main content area, and footer.
|
|
15
|
+
|
|
16
|
+
NEW: This component now includes layout-level permission enforcement to ensure
|
|
17
|
+
consuming apps can't forget to implement permission checks on individual pages.
|
|
18
|
+
|
|
19
|
+
This component is designed to work with React Router's nested routing pattern using
|
|
20
|
+
Outlet to render child routes. It provides integrated authentication, navigation,
|
|
21
|
+
and user management functionality.
|
|
22
|
+
|
|
23
|
+
**Super Admin Access:** When `enforcePermissions={true}`, PaceAppLayout automatically
|
|
24
|
+
checks if the user is a super admin before enforcing permissions. Super admins bypass
|
|
25
|
+
all permission checks and can access any route without violations. The component extracts
|
|
26
|
+
base page names from route paths (e.g., `/organisation/scouts-victoria` → `"organisation"`)
|
|
27
|
+
for permission checking, which can be overridden using `pageIdMapping`.
|
|
28
|
+
|
|
29
|
+
**Important:** The appName prop should use an APP_NAME constant declared in your App.tsx
|
|
30
|
+
file. This ensures consistency with public pages (via PublicPageProvider) which should
|
|
31
|
+
also receive the same APP_NAME constant. The logo URL is automatically constructed as
|
|
32
|
+
`/${appName.toLowerCase()}_logo_wide.svg` from the public folder.
|
|
33
|
+
|
|
34
|
+
Features:
|
|
35
|
+
- React Router v6 integration with nested routing
|
|
36
|
+
- Unified authentication integration
|
|
37
|
+
- Consistent header with navigation and user menu
|
|
38
|
+
- Flexible main content area with Outlet
|
|
39
|
+
- Footer with application branding
|
|
40
|
+
- User sign-out and password change functionality
|
|
41
|
+
- Responsive design and accessibility compliant
|
|
42
|
+
- Layout-level permission enforcement
|
|
43
|
+
- Permission-based navigation filtering
|
|
44
|
+
- Automatic page permission validation
|
|
45
|
+
- Super admin bypass (super admins automatically bypass all permission checks)
|
|
46
|
+
|
|
47
|
+
## Parameters
|
|
48
|
+
|
|
49
|
+
### props
|
|
50
|
+
|
|
51
|
+
[`PaceAppLayoutProps`](../type-aliases/PaceAppLayoutProps.md)
|
|
52
|
+
|
|
53
|
+
Layout configuration including app name for branding and permission settings
|
|
54
|
+
|
|
55
|
+
## Returns
|
|
56
|
+
|
|
57
|
+
`Element`
|
|
58
|
+
|
|
59
|
+
React element with complete application layout structure and permission enforcement
|
|
60
|
+
|
|
61
|
+
## Examples
|
|
62
|
+
|
|
63
|
+
Basic React Router setup with permission enforcement (RECOMMENDED):
|
|
64
|
+
```tsx
|
|
65
|
+
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
|
66
|
+
import { UnifiedAuthProvider } from '@jmruthers/pace-core/providers';
|
|
67
|
+
import { PaceAppLayout, PaceLoginPage, PublicPageApp } from '@jmruthers/pace-core';
|
|
68
|
+
|
|
69
|
+
const APP_NAME = 'CORE';
|
|
70
|
+
|
|
71
|
+
function App() {
|
|
72
|
+
return (
|
|
73
|
+
<UnifiedAuthProvider supabaseClient={supabase} appName={APP_NAME}>
|
|
74
|
+
<Router>
|
|
75
|
+
<Routes>
|
|
76
|
+
<Route path="/login" element={<PaceLoginPage appName={APP_NAME} />} />
|
|
77
|
+
<Route path="/events/*" element={<PublicPageApp appName={APP_NAME} />} />
|
|
78
|
+
<Route path="/" element={
|
|
79
|
+
<PaceAppLayout
|
|
80
|
+
appName={APP_NAME}
|
|
81
|
+
enforcePermissions={true}
|
|
82
|
+
defaultPermission="read"
|
|
83
|
+
/>
|
|
84
|
+
}>
|
|
85
|
+
<Route index element={<HomePage />} />
|
|
86
|
+
<Route path="dashboard" element={<DashboardPage />} />
|
|
87
|
+
<Route path="meals" element={<MealsPage />} />
|
|
88
|
+
</Route>
|
|
89
|
+
</Routes>
|
|
90
|
+
</Router>
|
|
91
|
+
</UnifiedAuthProvider>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Custom navigation items with permission filtering (works independently of route enforcement):
|
|
97
|
+
```tsx
|
|
98
|
+
import { NavigationItem } from '@jmruthers/pace-core';
|
|
99
|
+
|
|
100
|
+
function App() {
|
|
101
|
+
const customNavItems: NavigationItem[] = [
|
|
102
|
+
{ id: 'components', label: 'Components', href: '/components', icon: 'Component' },
|
|
103
|
+
{ id: 'styles', label: 'Styles', href: '/styles', icon: 'Palette' },
|
|
104
|
+
{ id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }
|
|
105
|
+
];
|
|
106
|
+
|
|
107
|
+
return (
|
|
108
|
+
<Router>
|
|
109
|
+
<Routes>
|
|
110
|
+
<Route path="/" element={
|
|
111
|
+
<PaceAppLayout
|
|
112
|
+
appName="My Custom App"
|
|
113
|
+
navItems={customNavItems}
|
|
114
|
+
// Permission filtering is always enabled - no prop needed
|
|
115
|
+
routePermissions={{
|
|
116
|
+
'/components': 'read',
|
|
117
|
+
'/styles': 'read',
|
|
118
|
+
'/meals': 'read'
|
|
119
|
+
}}
|
|
120
|
+
// Optionally enable route-level enforcement (separate from navigation filtering)
|
|
121
|
+
// enforcePermissions={true}
|
|
122
|
+
/>
|
|
123
|
+
}>
|
|
124
|
+
<Route path="components" element={<ComponentsPage />} />
|
|
125
|
+
<Route path="styles" element={<StylesPage />} />
|
|
126
|
+
<Route path="meals" element={<MealsPage />} />
|
|
127
|
+
</Route>
|
|
128
|
+
</Routes>
|
|
129
|
+
</Router>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Route-specific permissions with custom page IDs:
|
|
135
|
+
```tsx
|
|
136
|
+
function AdminApp() {
|
|
137
|
+
return (
|
|
138
|
+
<Router>
|
|
139
|
+
<Routes>
|
|
140
|
+
<Route path="/" element={
|
|
141
|
+
<PaceAppLayout
|
|
142
|
+
appName="Admin Panel"
|
|
143
|
+
enforcePermissions={true}
|
|
144
|
+
routePermissions={{
|
|
145
|
+
'/dashboard': 'read',
|
|
146
|
+
'/user-management': 'read',
|
|
147
|
+
'/system-settings': 'update'
|
|
148
|
+
}}
|
|
149
|
+
pageIdMapping={{
|
|
150
|
+
'/dashboard': 'dashboard',
|
|
151
|
+
'/user-management': 'user-management',
|
|
152
|
+
'/system-settings': 'system-admin'
|
|
153
|
+
}}
|
|
154
|
+
permissionFallback={<AccessDeniedPage />}
|
|
155
|
+
/>
|
|
156
|
+
}>
|
|
157
|
+
<Route path="dashboard" element={<DashboardPage />} />
|
|
158
|
+
<Route path="user-management" element={<UserManagementPage />} />
|
|
159
|
+
<Route path="system-settings" element={<SystemSettingsPage />} />
|
|
160
|
+
</Route>
|
|
161
|
+
</Routes>
|
|
162
|
+
</Router>
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Since
|
|
168
|
+
|
|
169
|
+
0.1.0
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / PasswordChangeForm
|
|
6
|
+
|
|
7
|
+
# Function: PasswordChangeForm()
|
|
8
|
+
|
|
9
|
+
> **PasswordChangeForm**(`__namedParameters`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/PasswordChange/PasswordChangeForm.tsx:133](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PasswordChange/PasswordChangeForm.tsx#L133)
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
### \_\_namedParameters
|
|
16
|
+
|
|
17
|
+
`PasswordChangeFormProps`
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`Element`
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / ProtectedRoute
|
|
6
|
+
|
|
7
|
+
# Function: ProtectedRoute()
|
|
8
|
+
|
|
9
|
+
> **ProtectedRoute**(`props`): `string` \| `number` \| `bigint` \| `boolean` \| `Iterable`\<`ReactNode`, `any`, `any`\> \| `Promise`\<`AwaitedReactNode`\> \| `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/ProtectedRoute/ProtectedRoute.tsx:125](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/ProtectedRoute/ProtectedRoute.tsx#L125)
|
|
12
|
+
|
|
13
|
+
ProtectedRoute component that handles authentication and optional event selection.
|
|
14
|
+
|
|
15
|
+
This component solves the chicken-and-egg problem where apps check for `selectedEvent`
|
|
16
|
+
before rendering, which blocks the event selector (typically in the header) from being visible.
|
|
17
|
+
|
|
18
|
+
Strategy:
|
|
19
|
+
1. Check authentication first - redirect to login if not authenticated
|
|
20
|
+
2. Allow rendering during event loading - prevents blocking UI
|
|
21
|
+
3. If events exist but none selected - allow rendering so selector is visible
|
|
22
|
+
4. If no events available - show error message
|
|
23
|
+
5. Individual pages should handle "no selected event" state gracefully
|
|
24
|
+
|
|
25
|
+
## Parameters
|
|
26
|
+
|
|
27
|
+
### props
|
|
28
|
+
|
|
29
|
+
[`ProtectedRouteProps`](../interfaces/ProtectedRouteProps.md)
|
|
30
|
+
|
|
31
|
+
Configuration for route protection
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`string` \| `number` \| `bigint` \| `boolean` \| `Iterable`\<`ReactNode`, `any`, `any`\> \| `Promise`\<`AwaitedReactNode`\> \| `Element`
|
|
36
|
+
|
|
37
|
+
React element with route protection logic
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / PublicPageFooter
|
|
6
|
+
|
|
7
|
+
# Function: PublicPageFooter()
|
|
8
|
+
|
|
9
|
+
> **PublicPageFooter**(`__namedParameters`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/PublicLayout/PublicPageLayout.tsx:237](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageLayout.tsx#L237)
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
### \_\_namedParameters
|
|
16
|
+
|
|
17
|
+
[`PublicPageFooterProps`](../interfaces/PublicPageFooterProps.md)
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`Element`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / PublicPageHeader
|
|
6
|
+
|
|
7
|
+
# Function: PublicPageHeader()
|
|
8
|
+
|
|
9
|
+
> **PublicPageHeader**(`__namedParameters`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/PublicLayout/PublicPageLayout.tsx:134](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageLayout.tsx#L134)
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
### \_\_namedParameters
|
|
16
|
+
|
|
17
|
+
[`PublicPageHeaderProps`](../interfaces/PublicPageHeaderProps.md)
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`Element`
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / PublicPageLayout
|
|
6
|
+
|
|
7
|
+
# Function: PublicPageLayout()
|
|
8
|
+
|
|
9
|
+
> **PublicPageLayout**(`props`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/PublicLayout/PublicPageLayout.tsx:350](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageLayout.tsx#L350)
|
|
12
|
+
|
|
13
|
+
Layout component for public pages that don't require authentication
|
|
14
|
+
|
|
15
|
+
This component provides a consistent structure for public event pages
|
|
16
|
+
with event-specific branding, error handling, and loading states.
|
|
17
|
+
|
|
18
|
+
Automatically applies event colors from the event's event_colours field
|
|
19
|
+
when an event is provided, ensuring consistent theming across public pages.
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
### props
|
|
24
|
+
|
|
25
|
+
[`PublicPageLayoutProps`](../interfaces/PublicPageLayoutProps.md)
|
|
26
|
+
|
|
27
|
+
Layout configuration and content
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
`Element`
|
|
32
|
+
|
|
33
|
+
React element with complete public page layout
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / PublicPageProvider
|
|
6
|
+
|
|
7
|
+
# Function: PublicPageProvider()
|
|
8
|
+
|
|
9
|
+
> **PublicPageProvider**(`__namedParameters`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/PublicLayout/PublicPageProvider.tsx:60](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageProvider.tsx#L60)
|
|
12
|
+
|
|
13
|
+
Provider for public pages that completely isolates them from authentication context
|
|
14
|
+
|
|
15
|
+
This provider:
|
|
16
|
+
- Does not initialize any authentication providers
|
|
17
|
+
- Provides environment variables for public data access
|
|
18
|
+
- Includes error boundary for graceful error handling
|
|
19
|
+
- Is completely separate from the main app context
|
|
20
|
+
- Provides appName for consistent logo display
|
|
21
|
+
|
|
22
|
+
## Parameters
|
|
23
|
+
|
|
24
|
+
### \_\_namedParameters
|
|
25
|
+
|
|
26
|
+
`PublicPageProviderProps`
|
|
27
|
+
|
|
28
|
+
## Returns
|
|
29
|
+
|
|
30
|
+
`Element`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / Textarea
|
|
6
|
+
|
|
7
|
+
# Function: Textarea()
|
|
8
|
+
|
|
9
|
+
> **Textarea**(`props`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/Textarea/Textarea.tsx:96](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Textarea/Textarea.tsx#L96)
|
|
12
|
+
|
|
13
|
+
Textarea component
|
|
14
|
+
A flexible, accessible textarea component with multiple variants and sizes.
|
|
15
|
+
Matches the Input component API and styling for consistency.
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
### props
|
|
20
|
+
|
|
21
|
+
[`TextareaProps`](../interfaces/TextareaProps.md) & `object`
|
|
22
|
+
|
|
23
|
+
Textarea configuration and styling
|
|
24
|
+
|
|
25
|
+
## Returns
|
|
26
|
+
|
|
27
|
+
`Element`
|
|
28
|
+
|
|
29
|
+
JSX.Element - The rendered textarea element
|
|
30
|
+
|
|
31
|
+
## Example
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
// Basic textarea
|
|
35
|
+
<Textarea placeholder="Enter your message..." />
|
|
36
|
+
|
|
37
|
+
// Textarea with error state
|
|
38
|
+
<Textarea
|
|
39
|
+
placeholder="Comments"
|
|
40
|
+
error={true}
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
// Large textarea with destructive variant
|
|
44
|
+
<Textarea
|
|
45
|
+
variant="destructive"
|
|
46
|
+
size="lg"
|
|
47
|
+
placeholder="Error textarea"
|
|
48
|
+
/>
|
|
49
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / Toaster
|
|
6
|
+
|
|
7
|
+
# Function: Toaster()
|
|
8
|
+
|
|
9
|
+
> **Toaster**(): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/Toast/Toast.tsx:295](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Toast/Toast.tsx#L295)
|
|
12
|
+
|
|
13
|
+
Toaster component
|
|
14
|
+
Container component that renders actual toast notifications
|
|
15
|
+
Should be placed at the root of your application
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
`Element`
|
|
20
|
+
|
|
21
|
+
JSX.Element - The toast provider with viewport and rendered toasts
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
function App() {
|
|
27
|
+
return (
|
|
28
|
+
<ToastProvider>
|
|
29
|
+
<YourApp />
|
|
30
|
+
<Toaster />
|
|
31
|
+
</ToastProvider>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / UnifiedAuthProvider
|
|
6
|
+
|
|
7
|
+
# Function: UnifiedAuthProvider()
|
|
8
|
+
|
|
9
|
+
> **UnifiedAuthProvider**(`props`): `Element`
|
|
10
|
+
|
|
11
|
+
Defined in: [providers/services/UnifiedAuthProvider.tsx:398](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/services/UnifiedAuthProvider.tsx#L398)
|
|
12
|
+
|
|
13
|
+
Unified authentication provider.
|
|
14
|
+
Provides authentication, organisation, event, and inactivity tracking services.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
### props
|
|
19
|
+
|
|
20
|
+
[`UnifiedAuthProviderProps`](../interfaces/UnifiedAuthProviderProps.md)
|
|
21
|
+
|
|
22
|
+
Unified auth provider configuration
|
|
23
|
+
|
|
24
|
+
## Returns
|
|
25
|
+
|
|
26
|
+
`Element`
|
|
27
|
+
|
|
28
|
+
The unified auth provider
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / applyPalette
|
|
6
|
+
|
|
7
|
+
# Function: applyPalette()
|
|
8
|
+
|
|
9
|
+
> **applyPalette**(`palette`, `eventName?`): `void`
|
|
10
|
+
|
|
11
|
+
Defined in: [theming/runtime.ts:133](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/theming/runtime.ts#L133)
|
|
12
|
+
|
|
13
|
+
Applies a complete palette to the document by setting CSS variables on :root.
|
|
14
|
+
Uses document.documentElement.style.setProperty() for runtime updates.
|
|
15
|
+
When eventName is provided, also sets --print-event-name for print styles.
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
### palette
|
|
20
|
+
|
|
21
|
+
[`PaletteData`](../interfaces/PaletteData.md)
|
|
22
|
+
|
|
23
|
+
Complete palette data with main, sec, and acc palettes
|
|
24
|
+
|
|
25
|
+
### eventName?
|
|
26
|
+
|
|
27
|
+
`string`
|
|
28
|
+
|
|
29
|
+
Optional event name to set as --print-event-name (e.g. for print headers/footers)
|
|
30
|
+
|
|
31
|
+
## Returns
|
|
32
|
+
|
|
33
|
+
`void`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../globals.md) / archiveFile
|
|
6
|
+
|
|
7
|
+
# Function: archiveFile()
|
|
8
|
+
|
|
9
|
+
> **archiveFile**(`supabase`, `path`, `options`): `Promise`\<[`ApiResult`](../type-aliases/ApiResult.md)\<`void`\>\>
|
|
10
|
+
|
|
11
|
+
Defined in: [utils/storage/helpers.ts:660](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L660)
|
|
12
|
+
|
|
13
|
+
Move a file to archived location (soft delete).
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### supabase
|
|
18
|
+
|
|
19
|
+
`SupabaseClient`
|
|
20
|
+
|
|
21
|
+
### path
|
|
22
|
+
|
|
23
|
+
`string`
|
|
24
|
+
|
|
25
|
+
### options
|
|
26
|
+
|
|
27
|
+
#### appName
|
|
28
|
+
|
|
29
|
+
`string`
|
|
30
|
+
|
|
31
|
+
#### orgId?
|
|
32
|
+
|
|
33
|
+
`string`
|
|
34
|
+
|
|
35
|
+
#### userId?
|
|
36
|
+
|
|
37
|
+
`string`
|
|
38
|
+
|
|
39
|
+
#### isPublic?
|
|
40
|
+
|
|
41
|
+
`boolean`
|
|
42
|
+
|
|
43
|
+
## Returns
|
|
44
|
+
|
|
45
|
+
`Promise`\<[`ApiResult`](../type-aliases/ApiResult.md)\<`void`\>\>
|
|
46
|
+
|
|
47
|
+
ApiResult<void> on success.
|