@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
package/dist/hooks.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
export { clearPublicEventCache, clearPublicLogoCache, extractEventCodeFromPath, generatePublicRoutePath, getPublicEventCacheStats, getPublicLogoCacheStats, useFormDialog, useOrganisationPermissions, usePublicEvent, usePublicEventCode, usePublicEventLogo, usePublicRouteParams, useZodForm } from './chunk-
|
|
2
|
-
import { getPublicUrl, getSignedUrl, listFiles, uploadFile, deleteFile, archiveFile } from './chunk-
|
|
3
|
-
export { cleanupQueryCache, clearFileDisplayCache, clearPublicFileDisplayCache, getFileDisplayCacheStats, getPublicFileDisplayCacheStats, invalidateFileDisplayCache, queryCacheHelpers, useAddressAutocomplete, useDebounce, useEventTheme, useFileDisplay, usePreventTabReload, usePublicFileDisplay, useQueryCache } from './chunk-
|
|
4
|
-
export { useEvents, useOptionalEvents, useOrganisationSecurity } from './chunk-
|
|
1
|
+
export { clearPublicEventCache, clearPublicLogoCache, extractEventCodeFromPath, generatePublicRoutePath, getPublicEventCacheStats, getPublicLogoCacheStats, useFormDialog, useOrganisationPermissions, usePublicEvent, usePublicEventCode, usePublicEventLogo, usePublicRouteParams, useZodForm } from './chunk-M7QE7XOA.js';
|
|
2
|
+
import { getPublicUrl, getSignedUrl, listFiles, uploadFile, deleteFile, archiveFile } from './chunk-AP5FG7W4.js';
|
|
3
|
+
export { cleanupQueryCache, clearFileDisplayCache, clearPublicFileDisplayCache, getFileDisplayCacheStats, getPublicFileDisplayCacheStats, invalidateFileDisplayCache, queryCacheHelpers, useAddressAutocomplete, useDebounce, useEventTheme, useFileDisplay, usePreventTabReload, usePublicFileDisplay, useQueryCache } from './chunk-AP5FG7W4.js';
|
|
4
|
+
export { useEvents, useOptionalEvents, useOrganisationSecurity } from './chunk-QWIG36BZ.js';
|
|
5
5
|
export { useDataTablePerformance, useFocusTrap, useIsPrint, useToast } from './chunk-ENLXB7GP.js';
|
|
6
|
-
export { useAppConfig } from './chunk-
|
|
6
|
+
export { useAppConfig } from './chunk-2GBDPPUC.js';
|
|
7
7
|
import './chunk-C7NSAPTL.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-S57OLCLO.js';
|
|
9
9
|
import './chunk-D6BMFMQZ.js';
|
|
10
|
-
import './chunk-
|
|
10
|
+
import './chunk-YFGNMB67.js';
|
|
11
11
|
import './chunk-QRYSEPHB.js';
|
|
12
12
|
import './chunk-6QYDGKQY.js';
|
|
13
13
|
import './chunk-4SXLQIZO.js';
|
|
14
14
|
export { useComponentPerformance } from './chunk-SACF5YSM.js';
|
|
15
15
|
import { performanceBudgetMonitor, PERFORMANCE_BUDGETS } from './chunk-XPFVT3GN.js';
|
|
16
16
|
import './chunk-RMLY6KB5.js';
|
|
17
|
+
import './chunk-GHCUP64P.js';
|
|
17
18
|
import { createLogger } from './chunk-BTHN5MKC.js';
|
|
18
19
|
import './chunk-44CNXN4P.js';
|
|
19
20
|
import './chunk-3RG5ZIWI.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ import { a as SessionRestorationState } from './auth-JvdRVaud.js';
|
|
|
12
12
|
import { A as ApiResult } from './api-result-USV1Czr-.js';
|
|
13
13
|
export { a as ApiError, e as err, b as isErr, i as isOk, o as ok } from './api-result-USV1Czr-.js';
|
|
14
14
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
15
|
-
export { A as AccessLevel, E as EventAppRole, G as GlobalRole, I as InvalidScopeError, M as MissingUserContextError, O as Operation, e as OrganisationContextRequiredError, c as OrganisationRole, P as Permission, a as PermissionCheck, d as PermissionDeniedError, b as PermissionMap, R as RBACError, f as RBACNotInitializedError, S as Scope, U as UUID } from './types-
|
|
16
|
-
export { A as AccessLevelContext, s as AuditEventType, P as PermissionSource, d as RBACAccessValidateParams, e as RBACAccessValidateResult, q as RBACAuditLogParams, r as RBACAuditLogResult, t as RBACContext, w as RBACErrorCode, v as RBACFunctionResponse, f as RBACPageAccessCheckParams, R as RBACPermissionCheckParams, a as RBACPermissionCheckResult, b as RBACPermissionsGetParams, c as RBACPermissionsGetResult, u as RBACResult, g as RBACRoleGrantParams, h as RBACRoleGrantResult, i as RBACRoleRevokeParams, j as RBACRoleRevokeResult, m as RBACRoleValidateParams, n as RBACRoleValidateResult, k as RBACRolesListParams, l as RBACRolesListResult, o as RBACSessionTrackParams, p as RBACSessionTrackResult, x as RPCFunction, S as SessionType } from './functions-
|
|
15
|
+
export { A as AccessLevel, E as EventAppRole, G as GlobalRole, I as InvalidScopeError, M as MissingUserContextError, O as Operation, e as OrganisationContextRequiredError, c as OrganisationRole, P as Permission, a as PermissionCheck, d as PermissionDeniedError, b as PermissionMap, R as RBACError, f as RBACNotInitializedError, S as Scope, U as UUID } from './types-CGHrxfqc.js';
|
|
16
|
+
export { A as AccessLevelContext, s as AuditEventType, P as PermissionSource, d as RBACAccessValidateParams, e as RBACAccessValidateResult, q as RBACAuditLogParams, r as RBACAuditLogResult, t as RBACContext, w as RBACErrorCode, v as RBACFunctionResponse, f as RBACPageAccessCheckParams, R as RBACPermissionCheckParams, a as RBACPermissionCheckResult, b as RBACPermissionsGetParams, c as RBACPermissionsGetResult, u as RBACResult, g as RBACRoleGrantParams, h as RBACRoleGrantResult, i as RBACRoleRevokeParams, j as RBACRoleRevokeResult, m as RBACRoleValidateParams, n as RBACRoleValidateResult, k as RBACRolesListParams, l as RBACRolesListResult, o as RBACSessionTrackParams, p as RBACSessionTrackResult, x as RPCFunction, S as SessionType } from './functions-hF5ImHCr.js';
|
|
17
17
|
export { ALL_PERMISSIONS, AccessDenied, AccessDeniedProps, AllPermissions, CACHE_PATTERNS, EVENT_APP_PERMISSIONS, EventAppRoleData, GLOBAL_PERMISSIONS, GrantEventAppRoleParams, NavigationGuard, NavigationGuardProps, ORGANISATION_PERMISSIONS, PAGE_PERMISSIONS, PagePermissionGuard, PagePermissionGuardProps, RBACAuditManager, RBACCache, RBACConfig, RBACEngine, RBACLogger, RBACPerformanceMetrics, ResourcePermissions, RevokeEventAppRoleParams, RoleManagementResult, SECURE_CLIENT_SYMBOL, SecureSupabaseClient, UseResolvedScopeOptions, UseResolvedScopeReturn, UseResourcePermissionsOptions, clearInFlightRequests, createAuditManager, createRBACConfig, createRBACEngine, createRBACExpressMiddleware, createRBACMiddleware, createSecureClient, disablePerformanceMonitoring, emitAuditEvent, enablePerformanceMonitoring, fromSupabaseClient, getAccessLevel, getGlobalAuditManager, getInFlightRequestCount, getPerformanceMetrics, getPerformanceSummary, getPermissionMap, getRBACConfig, getRBACLogger, getRoleContext, hasAllPermissions, hasAnyPermission, isDebugMode, isDevelopmentMode, isPerformanceMonitoringEnabled, isPermitted, isPermittedCached, isRBACInitialized, isSecureClient, isValidPermission, rbacCache, recordAuditEvent, recordPermissionCheck, resetPerformanceMetrics, resolveAppContext, setGlobalAuditManager, setupRBAC, useAccessLevel, useCan, useMultiplePermissions, usePermissions, useRBAC, useResolvedScope, useResourcePermissions, useRoleManagement, useSecureSupabase, warnIfInsecureClient, withAccessLevelGuard, withPermissionGuard, withRoleGuard } from './rbac/index.js';
|
|
18
|
-
import { aI as DataTableAction, aH as DataTableColumn } from './usePublicPageContext-
|
|
19
|
-
export { A as AddressField, k as AddressFieldProps, l as AddressFieldRef, aK as AggregateConfig, o as Alert, q as AlertDescription, p as AlertTitle, r as Avatar, s as AvatarProps, t as Badge, u as BadgeProps, v as BadgeVariant, B as Button, a as ButtonProps, am as Calendar, an as CalendarProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, w as Checkbox, b5 as ContextSelector, b6 as ContextSelectorProps, aF as DataTable, bC as DataTableFeatureConfig, aG as DataTableProps, aJ as DataTableToolbarButton, ao as DatePickerWithTimezone, ap as DatePickerWithTimezoneProps, M as Dialog, V as DialogBody, a4 as DialogBodyProps, Q as DialogClose, a1 as DialogCloseProps, R as DialogContent, $ as DialogContentProps, Y as DialogDescription, W as DialogFooter, a3 as DialogFooterProps, U as DialogHeader, a2 as DialogHeaderProps, N as DialogPortal, a0 as DialogPortalProps, Z as DialogProps, a5 as DialogSize, X as DialogTitle, O as DialogTrigger, _ as DialogTriggerProps, aL as EmptyStateConfig, b8 as ErrorBoundary, ba as ErrorBoundaryProps, b9 as ErrorBoundaryProvider, bc as ErrorBoundaryProviderProps, bb as ErrorBoundaryState, bD as ExportOptions, bj as FileDisplay, bk as FileDisplayProps, bh as FileUpload, bi as FileUploadProps, aT as Footer, aU as FooterProps, aM as Form, aN as FormField, aP as FormFieldProps, aO as FormProps, bd as GlobalErrorHandler, aS as Header, bF as ImportHandlerResult, bE as ImportSummary, I as Input, j as InputProps, L as Label, m as LabelProps, be as LoadingSpinner, aQ as LoginForm, aR as LoginFormProps, b4 as NavigationMenu, bz as PaceAppLayout, bt as PaceAppLayoutPermissionConfig, by as PaceAppLayoutProps, bs as PaceAppLayoutRouteConfigItem, bu as PaceAppLayoutRoutingConfig, bB as PaceLoginPage, bA as PaceLoginPageProps, bH as PasswordChangeForm, P as Progress, y as ProgressProps, b2 as ProtectedRoute, b3 as ProtectedRouteProps, aX as PublicPageFooter, b1 as PublicPageFooterProps, aW as PublicPageHeader, b0 as PublicPageHeaderProps, aV as PublicPageLayout, a$ as PublicPageLayoutProps, aY as PublicPageProvider, a6 as Select, aa as SelectContent, a7 as SelectGroup, ac as SelectItem, ab as SelectLabel, ad as SelectSeparator, a9 as SelectTrigger, a8 as SelectValue, bf as SessionRestorationLoader, bg as SessionRestorationLoaderProps, S as Switch, x as SwitchProps, z as Table, E as TableBody, F as TableCaption, G as TableCell, H as TableFooter, J as TableHead, D as TableHeader, K as TableRow, ae as Tabs, ah as TabsContent, al as TabsContentProps, af as TabsList, aj as TabsListProps, ai as TabsProps, ag as TabsTrigger, ak as TabsTriggerProps, T as Textarea, n as TextareaProps, aq as Toast, as as ToastAction, ay as ToastActionElement, ax as ToastClose, aw as ToastDescription, az as ToastProps, at as ToastProvider, av as ToastTitle, au as ToastViewport, ar as Toaster, aA as Tooltip, aC as TooltipContent, aD as TooltipProvider, aE as TooltipRoot, aB as TooltipTrigger, br as UseFileReferenceForRecordReturn, bp as UseFileReferenceOptions, bq as UseFileReferenceReturn, b7 as UserMenu, bG as UserMenuProps, bl as useFileReference, bn as useFileReferenceById, bm as useFileReferenceForRecord, bo as useFilesByCategory, a_ as useIsPublicPage, aZ as usePublicPageContext } from './usePublicPageContext-
|
|
18
|
+
import { aI as DataTableAction, aH as DataTableColumn } from './usePublicPageContext-BQrHf95t.js';
|
|
19
|
+
export { A as AddressField, k as AddressFieldProps, l as AddressFieldRef, aK as AggregateConfig, o as Alert, q as AlertDescription, p as AlertTitle, r as Avatar, s as AvatarProps, t as Badge, u as BadgeProps, v as BadgeVariant, B as Button, a as ButtonProps, am as Calendar, an as CalendarProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, w as Checkbox, b5 as ContextSelector, b6 as ContextSelectorProps, aF as DataTable, bC as DataTableFeatureConfig, aG as DataTableProps, aJ as DataTableToolbarButton, ao as DatePickerWithTimezone, ap as DatePickerWithTimezoneProps, M as Dialog, V as DialogBody, a4 as DialogBodyProps, Q as DialogClose, a1 as DialogCloseProps, R as DialogContent, $ as DialogContentProps, Y as DialogDescription, W as DialogFooter, a3 as DialogFooterProps, U as DialogHeader, a2 as DialogHeaderProps, N as DialogPortal, a0 as DialogPortalProps, Z as DialogProps, a5 as DialogSize, X as DialogTitle, O as DialogTrigger, _ as DialogTriggerProps, aL as EmptyStateConfig, b8 as ErrorBoundary, ba as ErrorBoundaryProps, b9 as ErrorBoundaryProvider, bc as ErrorBoundaryProviderProps, bb as ErrorBoundaryState, bD as ExportOptions, bj as FileDisplay, bk as FileDisplayProps, bh as FileUpload, bi as FileUploadProps, aT as Footer, aU as FooterProps, aM as Form, aN as FormField, aP as FormFieldProps, aO as FormProps, bd as GlobalErrorHandler, aS as Header, bF as ImportHandlerResult, bE as ImportSummary, I as Input, j as InputProps, L as Label, m as LabelProps, be as LoadingSpinner, aQ as LoginForm, aR as LoginFormProps, b4 as NavigationMenu, bz as PaceAppLayout, bt as PaceAppLayoutPermissionConfig, by as PaceAppLayoutProps, bs as PaceAppLayoutRouteConfigItem, bu as PaceAppLayoutRoutingConfig, bB as PaceLoginPage, bA as PaceLoginPageProps, bH as PasswordChangeForm, P as Progress, y as ProgressProps, b2 as ProtectedRoute, b3 as ProtectedRouteProps, aX as PublicPageFooter, b1 as PublicPageFooterProps, aW as PublicPageHeader, b0 as PublicPageHeaderProps, aV as PublicPageLayout, a$ as PublicPageLayoutProps, aY as PublicPageProvider, a6 as Select, aa as SelectContent, a7 as SelectGroup, ac as SelectItem, ab as SelectLabel, ad as SelectSeparator, a9 as SelectTrigger, a8 as SelectValue, bf as SessionRestorationLoader, bg as SessionRestorationLoaderProps, S as Switch, x as SwitchProps, z as Table, E as TableBody, F as TableCaption, G as TableCell, H as TableFooter, J as TableHead, D as TableHeader, K as TableRow, ae as Tabs, ah as TabsContent, al as TabsContentProps, af as TabsList, aj as TabsListProps, ai as TabsProps, ag as TabsTrigger, ak as TabsTriggerProps, T as Textarea, n as TextareaProps, aq as Toast, as as ToastAction, ay as ToastActionElement, ax as ToastClose, aw as ToastDescription, az as ToastProps, at as ToastProvider, av as ToastTitle, au as ToastViewport, ar as Toaster, aA as Tooltip, aC as TooltipContent, aD as TooltipProvider, aE as TooltipRoot, aB as TooltipTrigger, br as UseFileReferenceForRecordReturn, bp as UseFileReferenceOptions, bq as UseFileReferenceReturn, b7 as UserMenu, bG as UserMenuProps, bl as useFileReference, bn as useFileReferenceById, bm as useFileReferenceForRecord, bo as useFilesByCategory, a_ as useIsPublicPage, aZ as usePublicPageContext } from './usePublicPageContext-BQrHf95t.js';
|
|
20
20
|
import { D as DataRecord } from './pagination-BW1mqywp.js';
|
|
21
21
|
export { G as GetRowId, u as useToast } from './pagination-BW1mqywp.js';
|
|
22
22
|
import { ColumnDef } from '@tanstack/react-table';
|
|
@@ -26,7 +26,7 @@ export { F as FileCategory, b as FileMetadata, a as FileReference, c as FileUplo
|
|
|
26
26
|
export { StyleImport, getAllStylePaths, getStylePath, styleConfig } from './styles/index.js';
|
|
27
27
|
export { ColorPalette, ColorShade, PaletteData, applyPalette, clearPalette, parseAndNormalizeEventColours } from './theming/runtime.js';
|
|
28
28
|
export { A as AutocompleteOptions, P as ParsedAddress } from './types-Dr8sNhER.js';
|
|
29
|
-
export { a as NavigationItem, N as NavigationMenuProps, b as NavigationMode } from './types-
|
|
29
|
+
export { a as NavigationItem, N as NavigationMenuProps, b as NavigationMode } from './types-Besvoyzb.js';
|
|
30
30
|
import 'clsx';
|
|
31
31
|
import './database.generated-qkdoiVrJ.js';
|
|
32
32
|
import 'react-hook-form';
|
package/dist/index.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
export { ALL_PERMISSIONS, EVENT_APP_PERMISSIONS, GLOBAL_PERMISSIONS, NavigationGuard, ORGANISATION_PERMISSIONS, PAGE_PERMISSIONS, PagePermissionGuard, RBACErrorCode, RPCFunction, createRBACExpressMiddleware, createRBACMiddleware, isValidPermission, useResourcePermissions, useRoleManagement, withAccessLevelGuard, withPermissionGuard, withRoleGuard } from './chunk-
|
|
2
|
-
export { AddressField, AppSwitcher, Avatar, Badge, Calendar, ContextSelector, DEFAULT_APP_PORT_MAP, DatePickerWithTimezone, ErrorBoundary, ErrorBoundaryProvider, FileDisplay, FileUpload, Footer, Form, FormField, Header, LoginForm, NavigationMenu, PaceAppLayout, PaceLoginPage, PasswordChangeForm, ProtectedRoute, PublicPageFooter, PublicPageHeader, PublicPageLayout, PublicPageProvider, SessionRestorationLoader, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, UserMenu, buildAppUrl, getAllAppPorts, getAppPort, useAccessibleApps, useFileReference, useFileReferenceById, useFileReferenceForRecord, useFilesByCategory } from './chunk-
|
|
3
|
-
export { AccessDenied, SECURE_CLIENT_SYMBOL, SecureSupabaseClient, createSecureClient, fromSupabaseClient, isSecureClient, useRBAC, useSecureSupabase, warnIfInsecureClient } from './chunk-
|
|
4
|
-
import { Dialog, DialogContent, DialogHeader } from './chunk-
|
|
5
|
-
export { Checkbox, ColumnFactory, DataTable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, Input, Label, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, average, count, exportToCSV, exportToCSVWithTableRows, generateCSVContent, max, min, sum } from './chunk-
|
|
6
|
-
import { Card, Button } from './chunk-
|
|
7
|
-
export { Alert, AlertDescription, AlertTitle, Button, Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, useAccessLevel, useCan, useMultiplePermissions, usePermissions, useResolvedScope } from './chunk-
|
|
8
|
-
export { clearPublicEventCache, clearPublicLogoCache, extractEventCodeFromPath, generatePublicRoutePath, getPublicEventCacheStats, getPublicLogoCacheStats, useFormDialog, useOrganisationPermissions, usePublicEvent, usePublicEventCode, usePublicEventLogo, usePublicRouteParams, useZodForm } from './chunk-
|
|
9
|
-
import { generateFilePath, generateUniqueFileName, extractFileMetadata, uploadFile, getPublicUrl, getSignedUrl, deleteFile, downloadFile, listFiles, archiveFile } from './chunk-
|
|
10
|
-
export { APP_PATH_MAPPING, DEFAULT_FILE_SIZE_LIMIT, FILE_SIZE_LIMITS, STORAGE_CONFIG, archiveFile, clearPublicFileDisplayCache, deleteFile, downloadFile, extractFileMetadata, generateFilePath, generateFileUrlsBatch, generateUniqueFileName, getBucketName, getFileSizeLimit, getPublicFileDisplayCacheStats, getPublicUrl, getSignedUrl, listFiles, uploadFile, useEventTheme, usePublicFileDisplay, validateFileSize } from './chunk-
|
|
11
|
-
export { useEvents, useOptionalEvents, useOrganisationSecurity } from './chunk-
|
|
1
|
+
export { ALL_PERMISSIONS, EVENT_APP_PERMISSIONS, GLOBAL_PERMISSIONS, NavigationGuard, ORGANISATION_PERMISSIONS, PAGE_PERMISSIONS, PagePermissionGuard, RBACErrorCode, RPCFunction, createRBACExpressMiddleware, createRBACMiddleware, isValidPermission, useResourcePermissions, useRoleManagement, withAccessLevelGuard, withPermissionGuard, withRoleGuard } from './chunk-MVVWZ7JV.js';
|
|
2
|
+
export { AddressField, AppSwitcher, Avatar, Badge, Calendar, ContextSelector, DEFAULT_APP_PORT_MAP, DatePickerWithTimezone, ErrorBoundary, ErrorBoundaryProvider, FileDisplay, FileUpload, Footer, Form, FormField, Header, LoginForm, NavigationMenu, PaceAppLayout, PaceLoginPage, PasswordChangeForm, ProtectedRoute, PublicPageFooter, PublicPageHeader, PublicPageLayout, PublicPageProvider, SessionRestorationLoader, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, UserMenu, buildAppUrl, getAllAppPorts, getAppPort, useAccessibleApps, useFileReference, useFileReferenceById, useFileReferenceForRecord, useFilesByCategory } from './chunk-HQTYP6BX.js';
|
|
3
|
+
export { AccessDenied, SECURE_CLIENT_SYMBOL, SecureSupabaseClient, createSecureClient, fromSupabaseClient, isSecureClient, useRBAC, useSecureSupabase, warnIfInsecureClient } from './chunk-NJ7FGQWB.js';
|
|
4
|
+
import { Dialog, DialogContent, DialogHeader } from './chunk-Y2LWSLLB.js';
|
|
5
|
+
export { Checkbox, ColumnFactory, DataTable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, Input, Label, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, average, count, exportToCSV, exportToCSVWithTableRows, generateCSVContent, max, min, sum } from './chunk-Y2LWSLLB.js';
|
|
6
|
+
import { Card, Button } from './chunk-H6RTU4DZ.js';
|
|
7
|
+
export { Alert, AlertDescription, AlertTitle, Button, Card, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, useAccessLevel, useCan, useMultiplePermissions, usePermissions, useResolvedScope } from './chunk-H6RTU4DZ.js';
|
|
8
|
+
export { clearPublicEventCache, clearPublicLogoCache, extractEventCodeFromPath, generatePublicRoutePath, getPublicEventCacheStats, getPublicLogoCacheStats, useFormDialog, useOrganisationPermissions, usePublicEvent, usePublicEventCode, usePublicEventLogo, usePublicRouteParams, useZodForm } from './chunk-M7QE7XOA.js';
|
|
9
|
+
import { generateFilePath, generateUniqueFileName, extractFileMetadata, uploadFile, getPublicUrl, getSignedUrl, deleteFile, downloadFile, listFiles, archiveFile } from './chunk-AP5FG7W4.js';
|
|
10
|
+
export { APP_PATH_MAPPING, DEFAULT_FILE_SIZE_LIMIT, FILE_SIZE_LIMITS, STORAGE_CONFIG, archiveFile, clearPublicFileDisplayCache, deleteFile, downloadFile, extractFileMetadata, generateFilePath, generateFileUrlsBatch, generateUniqueFileName, getBucketName, getFileSizeLimit, getPublicFileDisplayCacheStats, getPublicUrl, getSignedUrl, listFiles, uploadFile, useEventTheme, usePublicFileDisplay, validateFileSize } from './chunk-AP5FG7W4.js';
|
|
11
|
+
export { useEvents, useOptionalEvents, useOrganisationSecurity } from './chunk-QWIG36BZ.js';
|
|
12
12
|
export { useToast } from './chunk-ENLXB7GP.js';
|
|
13
|
-
export { useAppConfig, useIsPublicPage, usePublicPageContext } from './chunk-
|
|
13
|
+
export { useAppConfig, useIsPublicPage, usePublicPageContext } from './chunk-2GBDPPUC.js';
|
|
14
14
|
import './chunk-C7NSAPTL.js';
|
|
15
|
-
export { EventServiceProvider, InactivityServiceProvider, OrganisationServiceProvider, UnifiedAuthProvider, useAuthService, useEventService, useInactivityService, useOrganisationService, useOrganisations, useSessionRestoration, useUnifiedAuth } from './chunk-
|
|
15
|
+
export { EventServiceProvider, InactivityServiceProvider, OrganisationServiceProvider, UnifiedAuthProvider, useAuthService, useEventService, useInactivityService, useOrganisationService, useOrganisations, useSessionRestoration, useUnifiedAuth } from './chunk-S57OLCLO.js';
|
|
16
16
|
export { applyPalette, clearPalette, parseAndNormalizeEventColours } from './chunk-D6BMFMQZ.js';
|
|
17
|
-
export { CACHE_PATTERNS, RBACCache, RBACEngine, clearInFlightRequests, createRBACConfig, createRBACEngine, disablePerformanceMonitoring, enablePerformanceMonitoring, getAccessLevel, getInFlightRequestCount, getPerformanceMetrics, getPerformanceSummary, getPermissionMap, getRBACConfig, getRBACLogger, getRoleContext, hasAllPermissions, hasAnyPermission, isDebugMode, isDevelopmentMode, isPerformanceMonitoringEnabled, isPermitted, isPermittedCached, isRBACInitialized, rbacCache, recordAuditEvent, recordPermissionCheck, resetPerformanceMetrics, resolveAppContext, setupRBAC } from './chunk-
|
|
17
|
+
export { CACHE_PATTERNS, RBACCache, RBACEngine, clearInFlightRequests, createRBACConfig, createRBACEngine, disablePerformanceMonitoring, enablePerformanceMonitoring, getAccessLevel, getInFlightRequestCount, getPerformanceMetrics, getPerformanceSummary, getPermissionMap, getRBACConfig, getRBACLogger, getRoleContext, hasAllPermissions, hasAnyPermission, isDebugMode, isDevelopmentMode, isPerformanceMonitoringEnabled, isPermitted, isPermittedCached, isRBACInitialized, rbacCache, recordAuditEvent, recordPermissionCheck, resetPerformanceMetrics, resolveAppContext, setupRBAC } from './chunk-YFGNMB67.js';
|
|
18
18
|
export { RBACAuditManager, createAuditManager, emitAuditEvent, getGlobalAuditManager, setGlobalAuditManager } from './chunk-QRYSEPHB.js';
|
|
19
19
|
export { FileCategory } from './chunk-6QYDGKQY.js';
|
|
20
20
|
import './chunk-4SXLQIZO.js';
|
|
21
21
|
export { createBaseClient, emailSchema, getAppConfig, getCurrentAppId, getCurrentAppName, nameSchema, passwordSchema, phoneSchema, sanitizeFormData, sanitizeUserInput, setAppConfig, urlSchema, useSessionTracking } from './chunk-2DL2WSOE.js';
|
|
22
22
|
export { formatCompactNumber, formatCurrency, formatDate, formatDateTime, formatFileSize, formatInTimeZone, formatNumber, formatPercent, formatTime, formatTimeInTimeZone, fromZonedTime, getTimeZoneDifference, getTimezoneAbbreviation, getUserTimeZone, roundToNearestMinutes, toZonedTime } from './chunk-XOJME5T7.js';
|
|
23
23
|
export { sanitizeHtml } from './chunk-DDMPHZ3D.js';
|
|
24
|
-
import { cn } from './chunk-
|
|
25
|
-
export { LoadingSpinner, cn } from './chunk-
|
|
24
|
+
import { cn } from './chunk-VFLR5K2H.js';
|
|
25
|
+
export { LoadingSpinner, cn } from './chunk-VFLR5K2H.js';
|
|
26
26
|
import './chunk-XPFVT3GN.js';
|
|
27
27
|
import './chunk-RMLY6KB5.js';
|
|
28
|
+
import './chunk-GHCUP64P.js';
|
|
28
29
|
import { logger } from './chunk-BTHN5MKC.js';
|
|
29
30
|
export { LogLevel, Logger, createLogger, logger } from './chunk-BTHN5MKC.js';
|
|
30
31
|
export { err, isErr, isOk, ok } from './chunk-44CNXN4P.js';
|
package/dist/providers.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import './chunk-C7NSAPTL.js';
|
|
2
|
-
export { AuthServiceProvider, EventServiceProvider, InactivityServiceContext, InactivityServiceProvider, OrganisationServiceContext, OrganisationServiceProvider, UnifiedAuthContext, UnifiedAuthProvider, useUnifiedAuth } from './chunk-
|
|
2
|
+
export { AuthServiceProvider, EventServiceProvider, InactivityServiceContext, InactivityServiceProvider, OrganisationServiceContext, OrganisationServiceProvider, UnifiedAuthContext, UnifiedAuthProvider, useUnifiedAuth } from './chunk-S57OLCLO.js';
|
|
3
3
|
import './chunk-D6BMFMQZ.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-YFGNMB67.js';
|
|
5
5
|
import './chunk-QRYSEPHB.js';
|
|
6
6
|
import './chunk-4SXLQIZO.js';
|
|
7
7
|
import './chunk-RMLY6KB5.js';
|
|
8
|
+
import './chunk-GHCUP64P.js';
|
|
8
9
|
import './chunk-BTHN5MKC.js';
|
|
9
10
|
import './chunk-44CNXN4P.js';
|
|
10
11
|
import './chunk-3RG5ZIWI.js';
|
package/dist/rbac/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { U as UUID, g as PermissionCacheKey, h as AuditEventSource, i as RBACAuditEvent, a as PermissionCheck, S as Scope, A as AccessLevel, b as PermissionMap, j as RBACAppContext, k as RBACRoleContext, l as UserRBACContext, P as Permission } from '../types-
|
|
2
|
-
export { E as EventAppRole, G as GlobalRole, I as InvalidScopeError, M as MissingUserContextError, O as Operation, e as OrganisationContextRequiredError, c as OrganisationRole, d as PermissionDeniedError, R as RBACError, f as RBACNotInitializedError } from '../types-
|
|
3
|
-
export { A as AccessLevelContext, s as AuditEventType, P as PermissionSource, d as RBACAccessValidateParams, e as RBACAccessValidateResult, q as RBACAuditLogParams, r as RBACAuditLogResult, t as RBACContext, w as RBACErrorCode, v as RBACFunctionResponse, f as RBACPageAccessCheckParams, R as RBACPermissionCheckParams, a as RBACPermissionCheckResult, b as RBACPermissionsGetParams, c as RBACPermissionsGetResult, u as RBACResult, g as RBACRoleGrantParams, h as RBACRoleGrantResult, i as RBACRoleRevokeParams, j as RBACRoleRevokeResult, m as RBACRoleValidateParams, n as RBACRoleValidateResult, k as RBACRolesListParams, l as RBACRolesListResult, o as RBACSessionTrackParams, p as RBACSessionTrackResult, x as RPCFunction, S as SessionType } from '../functions-
|
|
1
|
+
import { U as UUID, g as PermissionCacheKey, h as AuditEventSource, i as RBACAuditEvent, a as PermissionCheck, S as Scope, A as AccessLevel, b as PermissionMap, j as RBACAppContext, k as RBACRoleContext, l as UserRBACContext, P as Permission } from '../types-CGHrxfqc.js';
|
|
2
|
+
export { E as EventAppRole, G as GlobalRole, I as InvalidScopeError, M as MissingUserContextError, O as Operation, e as OrganisationContextRequiredError, c as OrganisationRole, d as PermissionDeniedError, R as RBACError, f as RBACNotInitializedError } from '../types-CGHrxfqc.js';
|
|
3
|
+
export { A as AccessLevelContext, s as AuditEventType, P as PermissionSource, d as RBACAccessValidateParams, e as RBACAccessValidateResult, q as RBACAuditLogParams, r as RBACAuditLogResult, t as RBACContext, w as RBACErrorCode, v as RBACFunctionResponse, f as RBACPageAccessCheckParams, R as RBACPermissionCheckParams, a as RBACPermissionCheckResult, b as RBACPermissionsGetParams, c as RBACPermissionsGetResult, u as RBACResult, g as RBACRoleGrantParams, h as RBACRoleGrantResult, i as RBACRoleRevokeParams, j as RBACRoleRevokeResult, m as RBACRoleValidateParams, n as RBACRoleValidateResult, k as RBACRolesListParams, l as RBACRolesListResult, o as RBACSessionTrackParams, p as RBACSessionTrackResult, x as RPCFunction, S as SessionType } from '../functions-hF5ImHCr.js';
|
|
4
4
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
5
5
|
import { D as Database } from '../database.generated-qkdoiVrJ.js';
|
|
6
6
|
import { A as ApiResult } from '../api-result-USV1Czr-.js';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
import React__default from 'react';
|
|
9
|
-
import { a as NavigationItem } from '../types-
|
|
9
|
+
import { a as NavigationItem } from '../types-Besvoyzb.js';
|
|
10
10
|
import '../core-CUElvH_C.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -1130,8 +1130,8 @@ interface ResourcePermissions {
|
|
|
1130
1130
|
canDelete: (resource: string) => boolean;
|
|
1131
1131
|
/** Check if user can read resources of this type */
|
|
1132
1132
|
canRead: (resource: string) => boolean;
|
|
1133
|
-
/** The resolved scope object (for advanced use cases) */
|
|
1134
|
-
scope: Scope;
|
|
1133
|
+
/** The resolved scope object (for advanced use cases); null when not yet resolved. */
|
|
1134
|
+
scope: Scope | null;
|
|
1135
1135
|
/** Whether any permission check is currently loading */
|
|
1136
1136
|
isLoading: boolean;
|
|
1137
1137
|
/** Error from any permission check or scope resolution */
|
|
@@ -1174,7 +1174,7 @@ declare function useAccessLevel(userId: UUID, scope: Scope): {
|
|
|
1174
1174
|
* Hook to check if user can perform an action
|
|
1175
1175
|
*
|
|
1176
1176
|
* @param userId - User ID
|
|
1177
|
-
* @param scope - Scope for permission checking
|
|
1177
|
+
* @param scope - Scope for permission checking; null means scope not yet resolved — permission check stays in loading, no RPC is called
|
|
1178
1178
|
* @param permission - Permission to check
|
|
1179
1179
|
* @param pageId - Optional page ID
|
|
1180
1180
|
* @param useCache - Whether to use cached results
|
|
@@ -1193,7 +1193,7 @@ declare function useAccessLevel(userId: UUID, scope: Scope): {
|
|
|
1193
1193
|
* }
|
|
1194
1194
|
* ```
|
|
1195
1195
|
*/
|
|
1196
|
-
declare function useCan(userId: UUID, scope: Scope, permission: Permission, pageId?: UUID, useCache?: boolean,
|
|
1196
|
+
declare function useCan(userId: UUID, scope: Scope | null, permission: Permission, pageId?: UUID, useCache?: boolean,
|
|
1197
1197
|
/**
|
|
1198
1198
|
* Pre-computed super admin flag to avoid duplicate super admin checks.
|
|
1199
1199
|
* Callers should check super admin once and pass the result to all useCan hooks.
|
|
@@ -1211,7 +1211,7 @@ precomputedSuperAdmin?: boolean | null, appName?: string): {
|
|
|
1211
1211
|
* Hook to check multiple permissions at once
|
|
1212
1212
|
*
|
|
1213
1213
|
* @param userId - User ID
|
|
1214
|
-
* @param scope - Scope for permission checking
|
|
1214
|
+
* @param scope - Scope for permission checking; null means scope not yet resolved — stays loading, no API call
|
|
1215
1215
|
* @param permissions - Array of permissions to check
|
|
1216
1216
|
* @param useCache - Whether to use cached results
|
|
1217
1217
|
* @returns Multiple permission check results
|
|
@@ -1238,7 +1238,7 @@ precomputedSuperAdmin?: boolean | null, appName?: string): {
|
|
|
1238
1238
|
* }
|
|
1239
1239
|
* ```
|
|
1240
1240
|
*/
|
|
1241
|
-
declare function useMultiplePermissions(userId: UUID, scope: Scope, permissions: Permission[], useCache?: boolean): {
|
|
1241
|
+
declare function useMultiplePermissions(userId: UUID, scope: Scope | null, permissions: Permission[], useCache?: boolean): {
|
|
1242
1242
|
results: Record<Permission, boolean>;
|
|
1243
1243
|
isLoading: boolean;
|
|
1244
1244
|
error: Error | null;
|
package/dist/rbac/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export { ALL_PERMISSIONS, EVENT_APP_PERMISSIONS, GLOBAL_PERMISSIONS, NavigationGuard, ORGANISATION_PERMISSIONS, PAGE_PERMISSIONS, PagePermissionGuard, RBACErrorCode, RPCFunction, createRBACExpressMiddleware, createRBACMiddleware, isValidPermission, useResourcePermissions, useRoleManagement, withAccessLevelGuard, withPermissionGuard, withRoleGuard } from '../chunk-
|
|
2
|
-
export { AccessDenied, SECURE_CLIENT_SYMBOL, SecureSupabaseClient, createSecureClient, fromSupabaseClient, isSecureClient, useRBAC, useSecureSupabase, warnIfInsecureClient } from '../chunk-
|
|
3
|
-
export { useAccessLevel, useCan, useMultiplePermissions, usePermissions, useResolvedScope } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
export { ALL_PERMISSIONS, EVENT_APP_PERMISSIONS, GLOBAL_PERMISSIONS, NavigationGuard, ORGANISATION_PERMISSIONS, PAGE_PERMISSIONS, PagePermissionGuard, RBACErrorCode, RPCFunction, createRBACExpressMiddleware, createRBACMiddleware, isValidPermission, useResourcePermissions, useRoleManagement, withAccessLevelGuard, withPermissionGuard, withRoleGuard } from '../chunk-MVVWZ7JV.js';
|
|
2
|
+
export { AccessDenied, SECURE_CLIENT_SYMBOL, SecureSupabaseClient, createSecureClient, fromSupabaseClient, isSecureClient, useRBAC, useSecureSupabase, warnIfInsecureClient } from '../chunk-NJ7FGQWB.js';
|
|
3
|
+
export { useAccessLevel, useCan, useMultiplePermissions, usePermissions, useResolvedScope } from '../chunk-H6RTU4DZ.js';
|
|
4
|
+
import '../chunk-QWIG36BZ.js';
|
|
5
|
+
import '../chunk-2GBDPPUC.js';
|
|
6
6
|
import '../chunk-C7NSAPTL.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-S57OLCLO.js';
|
|
8
8
|
import '../chunk-D6BMFMQZ.js';
|
|
9
|
-
export { CACHE_PATTERNS, RBACCache, RBACEngine, clearInFlightRequests, createRBACConfig, createRBACEngine, disablePerformanceMonitoring, enablePerformanceMonitoring, getAccessLevel, getInFlightRequestCount, getPerformanceMetrics, getPerformanceSummary, getPermissionMap, getRBACConfig, getRBACLogger, getRoleContext, hasAllPermissions, hasAnyPermission, isDebugMode, isDevelopmentMode, isPerformanceMonitoringEnabled, isPermitted, isPermittedCached, isRBACInitialized, rbacCache, recordAuditEvent, recordPermissionCheck, resetPerformanceMetrics, resolveAppContext, setupRBAC } from '../chunk-
|
|
9
|
+
export { CACHE_PATTERNS, RBACCache, RBACEngine, clearInFlightRequests, createRBACConfig, createRBACEngine, disablePerformanceMonitoring, enablePerformanceMonitoring, getAccessLevel, getInFlightRequestCount, getPerformanceMetrics, getPerformanceSummary, getPermissionMap, getRBACConfig, getRBACLogger, getRoleContext, hasAllPermissions, hasAnyPermission, isDebugMode, isDevelopmentMode, isPerformanceMonitoringEnabled, isPermitted, isPermittedCached, isRBACInitialized, rbacCache, recordAuditEvent, recordPermissionCheck, resetPerformanceMetrics, resolveAppContext, setupRBAC } from '../chunk-YFGNMB67.js';
|
|
10
10
|
export { RBACAuditManager, createAuditManager, emitAuditEvent, getGlobalAuditManager, setGlobalAuditManager } from '../chunk-QRYSEPHB.js';
|
|
11
11
|
import '../chunk-4SXLQIZO.js';
|
|
12
|
-
import '../chunk-
|
|
12
|
+
import '../chunk-VFLR5K2H.js';
|
|
13
13
|
import '../chunk-RMLY6KB5.js';
|
|
14
|
+
import '../chunk-GHCUP64P.js';
|
|
14
15
|
import '../chunk-BTHN5MKC.js';
|
|
15
16
|
import '../chunk-44CNXN4P.js';
|
|
16
17
|
import '../chunk-3RG5ZIWI.js';
|
|
@@ -18,6 +18,9 @@ type AccessLevel = 'viewer' | 'participant' | 'planner' | 'admin' | 'super';
|
|
|
18
18
|
/**
|
|
19
19
|
* Scope defines the context for permission checks.
|
|
20
20
|
* Can include organisation, event, and/or app identifiers.
|
|
21
|
+
*
|
|
22
|
+
* Convention: For permission-check APIs (e.g. useCan, useMultiplePermissions), pass Scope | null.
|
|
23
|
+
* null means scope not yet resolved — the hook stays in loading and does not call the RPC.
|
|
21
24
|
*/
|
|
22
25
|
type Scope = {
|
|
23
26
|
organisationId?: UUID;
|
package/dist/types.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ export { l as BucketInfo, B as BulkUploadResult, F as FileCategory, b as FileMet
|
|
|
8
8
|
export { C as ChangePasswordFormValues, o as ContactFormData, F as FormData, k as LoginFormData, L as LoginFormValues, P as ProfileFormData, m as RegistrationFormData, R as RegistrationFormValues, S as SecureLoginFormValues, j as SecureRegistrationFormValues, U as UserProfileFormValues, V as ValidationError, a as ValidationResult, g as changePasswordSchema, t as combineSchemas, i as contactFormSchema, d as dateSchema, e as emailSchema, l as loginSchema, n as nameSchema, f as passwordResetSchema, b as passwordSchema, p as phoneSchema, q as pickSchema, r as registrationSchema, c as secureLoginSchema, s as securePasswordSchema, u as urlSchema, h as userProfileSchema } from './validation-g5n0hDkh.js';
|
|
9
9
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
10
10
|
export { D as Database, J as Json } from './database.generated-qkdoiVrJ.js';
|
|
11
|
-
export { A as AccessLevelContext, s as AuditEventType, P as PermissionSource, d as RBACAccessValidateParams, e as RBACAccessValidateResult, q as RBACAuditLogParams, r as RBACAuditLogResult, t as RBACContext, w as RBACErrorCode, v as RBACFunctionResponse, f as RBACPageAccessCheckParams, R as RBACPermissionCheckParams, a as RBACPermissionCheckResult, b as RBACPermissionsGetParams, c as RBACPermissionsGetResult, u as RBACResult, g as RBACRoleGrantParams, h as RBACRoleGrantResult, i as RBACRoleRevokeParams, j as RBACRoleRevokeResult, m as RBACRoleValidateParams, n as RBACRoleValidateResult, k as RBACRolesListParams, l as RBACRolesListResult, o as RBACSessionTrackParams, p as RBACSessionTrackResult, S as SessionType } from './functions-
|
|
11
|
+
export { A as AccessLevelContext, s as AuditEventType, P as PermissionSource, d as RBACAccessValidateParams, e as RBACAccessValidateResult, q as RBACAuditLogParams, r as RBACAuditLogResult, t as RBACContext, w as RBACErrorCode, v as RBACFunctionResponse, f as RBACPageAccessCheckParams, R as RBACPermissionCheckParams, a as RBACPermissionCheckResult, b as RBACPermissionsGetParams, c as RBACPermissionsGetResult, u as RBACResult, g as RBACRoleGrantParams, h as RBACRoleGrantResult, i as RBACRoleRevokeParams, j as RBACRoleRevokeResult, m as RBACRoleValidateParams, n as RBACRoleValidateResult, k as RBACRolesListParams, l as RBACRolesListResult, o as RBACSessionTrackParams, p as RBACSessionTrackResult, S as SessionType } from './functions-hF5ImHCr.js';
|
|
12
12
|
import 'zod';
|
|
13
|
-
import './types-
|
|
13
|
+
import './types-CGHrxfqc.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @file Security-related Types
|
|
@@ -14,7 +14,7 @@ import { D as DataRecord, P as PerformanceConfig, S as ServerSideConfig, b as Pa
|
|
|
14
14
|
import { ColumnDef } from '@tanstack/react-table';
|
|
15
15
|
import { FieldValues, DefaultValues, SubmitHandler, SubmitErrorHandler, UseFormReturn, FieldPath, ControllerRenderProps, ControllerFieldState, UseFormStateReturn } from 'react-hook-form';
|
|
16
16
|
import { z } from 'zod';
|
|
17
|
-
import { N as NavigationMenuProps, a as NavigationItem } from './types-
|
|
17
|
+
import { N as NavigationMenuProps, a as NavigationItem } from './types-Besvoyzb.js';
|
|
18
18
|
import { User, SupabaseClient, createClient } from '@supabase/supabase-js';
|
|
19
19
|
import { O as Organisation, h as Event } from './event-BfCox3N2.js';
|
|
20
20
|
|
package/dist/utils.js
CHANGED
|
@@ -2,11 +2,12 @@ import { sanitizeUserInput, emailSchema, nameSchema, sanitizeFormData } from './
|
|
|
2
2
|
export { calculatePasswordStrength, createBaseClient, dateSchema, emailSchema, getAppConfig, getCurrentAppId, nameSchema, passwordSchema, phoneSchema, sanitizeFormData, sanitizeUserInput, setAppConfig, urlSchema, useSessionTracking } from './chunk-2DL2WSOE.js';
|
|
3
3
|
export { CachedAppIdResolver, appIcons, appsWithIcons, cachedAppIdResolver, formatCompactNumber, formatCurrency, formatDate, formatDateOnlyForDisplay, formatDateTime, formatDateTimeForDisplay, formatDateTimeForMap, formatDateTimeForTable, formatFileSize, formatInTimeZone, formatNumber, formatPercent, formatTime, formatTimeInTimeZone, fromZonedTime, getAppIcon, getAppId, getAppIds, getTimeZoneDifference, getTimezoneAbbreviation, getUserTimeZone, hasAppIcon, roundToNearestMinutes, toZonedTime } from './chunk-XOJME5T7.js';
|
|
4
4
|
export { renderSafeHtml, sanitizeHtml, validateHtml } from './chunk-DDMPHZ3D.js';
|
|
5
|
-
import { LoadingSpinner } from './chunk-
|
|
6
|
-
export { cn
|
|
5
|
+
import { LoadingSpinner } from './chunk-VFLR5K2H.js';
|
|
6
|
+
export { cn } from './chunk-VFLR5K2H.js';
|
|
7
7
|
export { useComponentPerformance } from './chunk-SACF5YSM.js';
|
|
8
8
|
export { PERFORMANCE_BUDGETS, clearInFlightRequests, clearOrganisationContext, createAddressFromPlaceResult, deduplicatedQuery, fetchPlaceAutocomplete, fetchPlaceDetails, generateRequestKey, getAddressByPlaceId, getInFlightRequestStats, getOrCreateRequest, getOrganisationContext, isGoogleMapsLoaded, isOrganisationContextAvailable, loadGoogleMapsScript, parseAddressComponents, performanceBudgetMonitor, setOrganisationContext } from './chunk-XPFVT3GN.js';
|
|
9
9
|
import { secureStorage } from './chunk-RMLY6KB5.js';
|
|
10
|
+
export { getAppNameFromBuildTime, getAppNameFromEnvironment, getAppNameFromGlobal, getAppNameFromPackageJson, getCurrentAppName, getCurrentAppNameWithFallback, setRBACAppName } from './chunk-GHCUP64P.js';
|
|
10
11
|
import { createLogger, Logger, logger } from './chunk-BTHN5MKC.js';
|
|
11
12
|
export { LogLevel, Logger, createLogger, logger } from './chunk-BTHN5MKC.js';
|
|
12
13
|
export { changePasswordSchema, combineSchemas, contactFormSchema, loginSchema, passwordResetSchema, pickSchema, registrationSchema, secureLoginSchema, securePasswordSchema, userProfileSchema } from './chunk-MBADTM7L.js';
|
|
@@ -777,7 +778,7 @@ function createLazyComponent(importFn, componentName, options = {}) {
|
|
|
777
778
|
|
|
778
779
|
// src/utils/dynamic/lazyLoad.tsx
|
|
779
780
|
var LazyDataTable = createLazyComponent(
|
|
780
|
-
() => import('./DataTable-
|
|
781
|
+
() => import('./DataTable-AQAHSFLM.js').then((module) => ({ default: module.DataTable })),
|
|
781
782
|
"DataTable"
|
|
782
783
|
);
|
|
783
784
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../../../globals.md) / DialogPortal
|
|
6
|
+
|
|
7
|
+
# DialogPortal
|
|
8
|
+
|
|
9
|
+
DialogPortal component
|
|
10
|
+
Portals dialog content to document.body
|
|
11
|
+
|
|
12
|
+
## Variables
|
|
13
|
+
|
|
14
|
+
- [displayName](variables/displayName.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[**@jmruthers/pace-core v0.6.12**](../../../../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@jmruthers/pace-core](../../../../globals.md) / [DialogPortal](../README.md) / displayName
|
|
6
|
+
|
|
7
|
+
# Variable: displayName
|
|
8
|
+
|
|
9
|
+
> **displayName**: `string` \| `undefined`
|
|
10
|
+
|
|
11
|
+
Defined in: [components/Dialog/Dialog.tsx:369](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L369)
|
package/docs/api/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
**@jmruthers/pace-core v0.6.12**
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
1
5
|
# @jmruthers/pace-core
|
|
2
6
|
|
|
3
7
|
React component library with Tailwind v4.
|
|
@@ -10,8 +14,8 @@ npm install @jmruthers/pace-core
|
|
|
10
14
|
|
|
11
15
|
## Documentation
|
|
12
16
|
|
|
13
|
-
See [Documentation]() for complete setup and usage guides.
|
|
17
|
+
See [Documentation](_media/README.md) for complete setup and usage guides.
|
|
14
18
|
|
|
15
19
|
## License
|
|
16
20
|
|
|
17
|
-
MIT License - see [LICENSE]() for details.
|
|
21
|
+
MIT License - see [LICENSE](./LICENSE) for details.
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# PACE Core Documentation
|
|
2
|
+
|
|
3
|
+
PACE Core is the application foundation that ships with `@jmruthers/pace-core`. It combines authentication, role based access control (RBAC), data-focused UI components, inactivity controls, and Tailwind v4 theming so teams can build secure admin surfaces quickly.
|
|
4
|
+
|
|
5
|
+
- **Package entry point:** [`packages/core/src/index.ts`](../src/index.ts)
|
|
6
|
+
- **Live exports:** components, providers, hooks, RBAC helpers, utilities, and styles
|
|
7
|
+
- **Primary consumers:** React + Vite (Tailwind v4)
|
|
8
|
+
|
|
9
|
+
Use this page as the launchpad for the rest of the documentation set.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
### 1. Install the library and peers
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @jmruthers/pace-core \
|
|
19
|
+
react react-dom \
|
|
20
|
+
@tanstack/react-table \
|
|
21
|
+
@radix-ui/react-checkbox @radix-ui/react-label @radix-ui/react-slot \
|
|
22
|
+
@radix-ui/react-switch @radix-ui/react-tabs @radix-ui/react-toast @radix-ui/react-tooltip \
|
|
23
|
+
clsx lucide-react react-day-picker react-hook-form react-router-dom tailwind-merge tailwindcss zod
|
|
24
|
+
|
|
25
|
+
npm install -D @tailwindcss/vite tailwindcss@^4.0.0
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> **📦 Dependencies Guide**: See [Dependencies Guide](./getting-started/dependencies.md) for complete details on which packages to install and which are already included.
|
|
29
|
+
>
|
|
30
|
+
> **🔍 Auditing your dependencies?** Start with [AUDIT-YOUR-DEPENDENCIES.md](./getting-started/AUDIT-YOUR-DEPENDENCIES.md) for a quick overview.
|
|
31
|
+
|
|
32
|
+
**Important**:
|
|
33
|
+
- ❌ **DO NOT install** `@supabase/supabase-js`, `@radix-ui/*`, or `lucide-react` - they're included in pace-core. Use pace-core exports instead:
|
|
34
|
+
- `createBaseClient()` from `@jmruthers/pace-core` (instead of `createClient` from `@supabase/supabase-js`)
|
|
35
|
+
- pace-core components (instead of `@radix-ui/*` primitives)
|
|
36
|
+
- `@jmruthers/pace-core/icons` (instead of `lucide-react`)
|
|
37
|
+
- ⚠️ `@tanstack/react-query` is a **peer dependency** - you MUST install it (required for QueryClient configuration)
|
|
38
|
+
- ⚠️ All listed packages above are **required peer dependencies** - you must install them
|
|
39
|
+
- ❌ Installing included dependencies will create duplicates and cause conflicts
|
|
40
|
+
|
|
41
|
+
The peer dependencies list is derived from [`package.json`](../package.json). See [Dependencies Guide](./getting-started/dependencies.md) for the complete breakdown.
|
|
42
|
+
|
|
43
|
+
### 2. Enable Tailwind v4 in Vite
|
|
44
|
+
|
|
45
|
+
PACE Core ships a helper you can reuse from any consuming app:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
// vite.config.ts
|
|
49
|
+
import { defineConfig } from 'vite';
|
|
50
|
+
import react from '@vitejs/plugin-react';
|
|
51
|
+
import createPaceCoreViteConfig from '@jmruthers/pace-core/vite-plugin-tailwind-v4';
|
|
52
|
+
|
|
53
|
+
export default defineConfig(({ mode }) =>
|
|
54
|
+
createPaceCoreViteConfig({
|
|
55
|
+
plugins: [react()],
|
|
56
|
+
define: { __APP_MODE__: JSON.stringify(mode) },
|
|
57
|
+
server: { port: 5173 },
|
|
58
|
+
})
|
|
59
|
+
);
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
When you need manual control, include `./node_modules/@jmruthers/pace-core/src/**/*.{js,ts,jsx,tsx}` in Tailwind's content array so component classes are discovered.
|
|
63
|
+
|
|
64
|
+
### 3. Import styles and wrap your app
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
// src/main.tsx
|
|
68
|
+
import React from 'react';
|
|
69
|
+
import ReactDOM from 'react-dom/client';
|
|
70
|
+
import { createClient } from '@supabase/supabase-js';
|
|
71
|
+
import {
|
|
72
|
+
UnifiedAuthProvider,
|
|
73
|
+
InactivityWarningModal,
|
|
74
|
+
useUnifiedAuth,
|
|
75
|
+
} from '@jmruthers/pace-core';
|
|
76
|
+
import '@jmruthers/pace-core/styles/core.css';
|
|
77
|
+
|
|
78
|
+
const supabase = createClient(
|
|
79
|
+
import.meta.env.VITE_SUPABASE_URL!,
|
|
80
|
+
import.meta.env.VITE_SUPABASE_PUBLISHABLE_KEY!
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
function AppShell() {
|
|
84
|
+
const { user, signOut, showWarning, handleStaySignedIn, handleSignOutNow } =
|
|
85
|
+
useUnifiedAuth();
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<>
|
|
89
|
+
{showWarning && (
|
|
90
|
+
<InactivityWarningModal
|
|
91
|
+
onStaySignedIn={handleStaySignedIn}
|
|
92
|
+
onSignOutNow={handleSignOutNow}
|
|
93
|
+
/>
|
|
94
|
+
)}
|
|
95
|
+
<header className="flex items-center justify-between p-4">
|
|
96
|
+
<span>{user?.email ?? 'Not signed in'}</span>
|
|
97
|
+
<button onClick={() => signOut()}>Sign out</button>
|
|
98
|
+
</header>
|
|
99
|
+
</>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
104
|
+
<React.StrictMode>
|
|
105
|
+
<UnifiedAuthProvider
|
|
106
|
+
supabaseClient={supabase}
|
|
107
|
+
appName="PACE Admin"
|
|
108
|
+
idleTimeoutMs={30 * 60_000}
|
|
109
|
+
warnBeforeMs={60_000}
|
|
110
|
+
onIdleLogout={() => window.location.assign('/sign-in')}
|
|
111
|
+
>
|
|
112
|
+
<AppShell />
|
|
113
|
+
</UnifiedAuthProvider>
|
|
114
|
+
</React.StrictMode>
|
|
115
|
+
);
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`UnifiedAuthProvider` layers the Auth, Organisation, Event, and Inactivity service providers defined under [`src/providers/services`](../src/providers/services/). Idle timeouts are mandatory—the provider will refuse to run in production without them.
|
|
119
|
+
|
|
120
|
+
### 4. Render data-centric UI
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
import { DataTable } from '@jmruthers/pace-core';
|
|
124
|
+
|
|
125
|
+
const columns = [
|
|
126
|
+
{ accessorKey: 'name', header: 'Name' },
|
|
127
|
+
{ accessorKey: 'status', header: 'Status' },
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
<DataTable
|
|
131
|
+
data={[{ id: 'evt-1', name: 'Conference', status: 'published' }]}
|
|
132
|
+
columns={columns}
|
|
133
|
+
features={{ search: true, pagination: true, sorting: true }}
|
|
134
|
+
rbac={{
|
|
135
|
+
resource: 'events',
|
|
136
|
+
actions: []
|
|
137
|
+
}}
|
|
138
|
+
/>;
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
The table props and supporting types live beside the implementation in [`src/components/DataTable`](../src/components/DataTable/).
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Developer path
|
|
146
|
+
|
|
147
|
+
1. **Install & configure** – follow the steps above, then read the [Installation guide](./getting-started/installation-guide.md).
|
|
148
|
+
2. **Wire authentication** – configure Supabase keys, inactivity handling, and RBAC using the [Authentication concept](./core-concepts/authentication.md) and [RBAC quick start](./rbac/quick-start.md).
|
|
149
|
+
3. **Adopt layout and navigation** – reference the [App layout guide](./implementation-guides/app-layout.md) and [Navigation patterns](./implementation-guides/navigation.md).
|
|
150
|
+
4. **Integrate domain features** – use [Organisation security](./implementation-guides/organisation-security.md), [Inactivity tracking](./implementation-guides/inactivity-tracking.md), and [Data tables](./implementation-guides/data-tables.md) as needed.
|
|
151
|
+
5. **Validate & ship** – confirm best practices with [Testing](./testing/README.md), [Operations Standards](./standards/9-operations-standards.md#cicd-integration) (deployment), and [Security Standards](./standards/6-security-rbac-standards.md).
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Documentation map
|
|
156
|
+
|
|
157
|
+
A curated table of contents lives in [documentation-index.md](./documentation-index.md). Each section mirrors the directory layout under `packages/core/docs/` so new topics can be slotted in without rewriting existing pages.
|
|
158
|
+
|
|
159
|
+
Highlights:
|
|
160
|
+
|
|
161
|
+
- **API Reference** – Components, hooks, providers, types, and utilities (`./api-reference/`).
|
|
162
|
+
- **Core concepts** – Authentication, permissions, organisations, and events (`./core-concepts/`).
|
|
163
|
+
- **Implementation guides** – Step-by-step walkthroughs for common features (`./implementation-guides/`).
|
|
164
|
+
- **RBAC** – Dedicated module documentation, migration notes, and recipes (`./rbac/`).
|
|
165
|
+
- **Styling & theming** – Design system overview and usage examples (`./styles/`).
|
|
166
|
+
- **Operations** – Testing, troubleshooting, security, and migration playbooks (`./testing/`, `./troubleshooting/`, `./security/`, `./migration/`).
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Known gaps & next steps
|
|
171
|
+
|
|
172
|
+
The review surfaced a few topics that could be enhanced in future iterations:
|
|
173
|
+
|
|
174
|
+
- **Component theming examples** covering Tailwind tokens and `@jmruthers/pace-core/styles/app.css.example`.
|
|
175
|
+
- **Troubleshooting Supabase integration** beyond the existing organisation context guide—e.g., auth callback routing and environment configuration.
|
|
176
|
+
- **Upgrade notes for v0.6.0+** once the next release lands so the migration area stays current.
|
|
177
|
+
|
|
178
|
+
Track outstanding items in the docs backlog so the index remains trustworthy.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Maintaining this documentation
|
|
183
|
+
|
|
184
|
+
- Keep navigation links in sync with the directory structure—update [`documentation-index.md`](./documentation-index.md) whenever a new page lands.
|
|
185
|
+
- Prefer task-based guides that start with runnable code and finish with validation steps.
|
|
186
|
+
- Use the [Documentation Standard](./standards/README.md) before publishing to guarantee tone, formatting, and linking conventions stay consistent.
|