@jmruthers/pace-core 0.5.188 → 0.5.190
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core-usage-manifest.json +0 -4
- package/dist/{AuthService-B-cd2MA4.d.ts → AuthService-CbP_utw2.d.ts} +7 -3
- package/dist/{DataTable-GUFUNZ3N.js → DataTable-ON3IXISJ.js} +8 -8
- package/dist/{PublicPageProvider-DrLDztHt.d.ts → PublicPageProvider-C4uxosp6.d.ts} +129 -40
- package/dist/{UnifiedAuthProvider-BG0AL5eE.d.ts → UnifiedAuthProvider-BYA9qB-o.d.ts} +4 -3
- package/dist/{UnifiedAuthProvider-643PUAIM.js → UnifiedAuthProvider-X5NXANVI.js} +4 -2
- package/dist/{api-YP7XD5L6.js → api-I6UCQ5S6.js} +4 -2
- package/dist/{chunk-DDM4CCYT.js → chunk-4QYC5L4K.js} +60 -35
- package/dist/chunk-4QYC5L4K.js.map +1 -0
- package/dist/{chunk-IM4QE42D.js → chunk-73HSNNOQ.js} +141 -326
- package/dist/chunk-73HSNNOQ.js.map +1 -0
- package/dist/{chunk-YHCN776L.js → chunk-DZWK57KZ.js} +2 -75
- package/dist/chunk-DZWK57KZ.js.map +1 -0
- package/dist/{chunk-3GOZZZYH.js → chunk-HQVPB5MZ.js} +238 -301
- package/dist/chunk-HQVPB5MZ.js.map +1 -0
- package/dist/{chunk-THRPYOFK.js → chunk-HW3OVDUF.js} +5 -5
- package/dist/chunk-HW3OVDUF.js.map +1 -0
- package/dist/{chunk-F2IMUDXZ.js → chunk-I7PSE6JW.js} +75 -2
- package/dist/chunk-I7PSE6JW.js.map +1 -0
- package/dist/{chunk-VGZZXKBR.js → chunk-J2XXC7R5.js} +280 -52
- package/dist/chunk-J2XXC7R5.js.map +1 -0
- package/dist/{chunk-UNOTYLQF.js → chunk-NIU6J6OX.js} +772 -725
- package/dist/chunk-NIU6J6OX.js.map +1 -0
- package/dist/{chunk-HESYZWZW.js → chunk-QWWZ5CAQ.js} +2 -2
- package/dist/{chunk-HEHYGYOX.js → chunk-RUYZKXOD.js} +401 -46
- package/dist/chunk-RUYZKXOD.js.map +1 -0
- package/dist/{chunk-2UUZZJFT.js → chunk-SDMHPX3X.js} +176 -160
- package/dist/{chunk-2UUZZJFT.js.map → chunk-SDMHPX3X.js.map} +1 -1
- package/dist/{chunk-IPCH26AG.js → chunk-STYK4OH2.js} +11 -11
- package/dist/chunk-STYK4OH2.js.map +1 -0
- package/dist/{chunk-EFCLXK7F.js → chunk-VVBAW5A5.js} +4201 -3809
- package/dist/chunk-VVBAW5A5.js.map +1 -0
- package/dist/chunk-Y4BUBBHD.js +614 -0
- package/dist/chunk-Y4BUBBHD.js.map +1 -0
- package/dist/{chunk-SAUPYVLF.js → chunk-ZSAAAMVR.js} +1 -1
- package/dist/chunk-ZSAAAMVR.js.map +1 -0
- package/dist/components.d.ts +3 -5
- package/dist/components.js +19 -23
- package/dist/components.js.map +1 -1
- package/dist/eslint-rules/pace-core-compliance.cjs +0 -2
- package/dist/{file-reference-D037xOFK.d.ts → file-reference-BavO2eQj.d.ts} +13 -10
- package/dist/hooks.d.ts +10 -5
- package/dist/hooks.js +14 -8
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +13 -12
- package/dist/index.js +79 -73
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +3 -3
- package/dist/providers.js +3 -1
- package/dist/rbac/index.d.ts +76 -12
- package/dist/rbac/index.js +12 -9
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/{usePublicRouteParams-CTDELQ7H.d.ts → usePublicRouteParams-DxIDS4bC.d.ts} +16 -9
- package/dist/utils.js +16 -16
- package/docs/README.md +2 -2
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +2 -2
- package/docs/api/classes/Logger.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +2 -2
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +1 -1
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +4 -4
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +2 -2
- package/docs/api/classes/SecureSupabaseClient.md +21 -16
- package/docs/api/classes/StorageUtils.md +7 -4
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/enums/LogLevel.md +1 -1
- package/docs/api/enums/RBACErrorCode.md +1 -1
- package/docs/api/enums/RPCFunction.md +1 -1
- package/docs/api/interfaces/AddressFieldProps.md +1 -1
- package/docs/api/interfaces/AddressFieldRef.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/AutocompleteOptions.md +1 -1
- package/docs/api/interfaces/AvatarProps.md +128 -0
- package/docs/api/interfaces/BadgeProps.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CalendarProps.md +20 -6
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/ComplianceResult.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +9 -9
- package/docs/api/interfaces/DataRecord.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/DatabaseComplianceResult.md +1 -1
- package/docs/api/interfaces/DatabaseIssue.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventAppRoleData.md +1 -1
- package/docs/api/interfaces/ExportColumn.md +1 -1
- package/docs/api/interfaces/ExportOptions.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +62 -16
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +2 -2
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +26 -12
- package/docs/api/interfaces/FileUploadProps.md +30 -19
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/FormFieldProps.md +1 -1
- package/docs/api/interfaces/FormProps.md +1 -1
- package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoggerConfig.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +10 -10
- package/docs/api/interfaces/NavigationContextType.md +9 -9
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +7 -7
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PageAccessRecord.md +8 -8
- package/docs/api/interfaces/PagePermissionContextType.md +8 -8
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +7 -7
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/ParsedAddress.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/ProgressProps.md +3 -11
- package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/QuickFix.md +1 -1
- package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
- package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
- package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
- package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACContext.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
- package/docs/api/interfaces/RBACPerformanceMetrics.md +1 -1
- package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
- package/docs/api/interfaces/RBACPermissionCheckResult.md +1 -1
- package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
- package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
- package/docs/api/interfaces/RBACResult.md +1 -1
- package/docs/api/interfaces/RBACRoleGrantParams.md +1 -1
- package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
- package/docs/api/interfaces/RBACRoleRevokeParams.md +1 -1
- package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
- package/docs/api/interfaces/RBACRoleValidateParams.md +1 -1
- package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
- package/docs/api/interfaces/RBACRolesListParams.md +1 -1
- package/docs/api/interfaces/RBACRolesListResult.md +1 -1
- package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
- package/docs/api/interfaces/RBACSessionTrackResult.md +1 -1
- package/docs/api/interfaces/ResourcePermissions.md +1 -1
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +8 -8
- package/docs/api/interfaces/RoleBasedRouterProps.md +10 -10
- package/docs/api/interfaces/RoleManagementResult.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +10 -10
- package/docs/api/interfaces/RouteConfig.md +10 -10
- package/docs/api/interfaces/RuntimeComplianceResult.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +9 -9
- package/docs/api/interfaces/SecureDataProviderProps.md +8 -8
- package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
- package/docs/api/interfaces/SetupIssue.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +4 -4
- package/docs/api/interfaces/StorageFileInfo.md +7 -7
- package/docs/api/interfaces/StorageFileMetadata.md +25 -14
- package/docs/api/interfaces/StorageListOptions.md +22 -9
- package/docs/api/interfaces/StorageListResult.md +4 -4
- package/docs/api/interfaces/StorageUploadOptions.md +21 -8
- package/docs/api/interfaces/StorageUploadResult.md +6 -6
- package/docs/api/interfaces/StorageUrlOptions.md +19 -6
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/SwitchProps.md +1 -1
- package/docs/api/interfaces/TabsContentProps.md +1 -1
- package/docs/api/interfaces/TabsListProps.md +1 -1
- package/docs/api/interfaces/TabsProps.md +1 -1
- package/docs/api/interfaces/TabsTriggerProps.md +1 -1
- package/docs/api/interfaces/TextareaProps.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +53 -53
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +13 -13
- package/docs/api/interfaces/UseFormDialogOptions.md +1 -1
- package/docs/api/interfaces/UseFormDialogReturn.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +4 -4
- package/docs/api/interfaces/UseResolvedScopeReturn.md +4 -4
- package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +11 -11
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +155 -135
- package/docs/api-reference/components.md +72 -29
- package/docs/api-reference/providers.md +2 -2
- package/docs/api-reference/rpc-functions.md +1 -0
- package/docs/best-practices/README.md +1 -1
- package/docs/best-practices/deployment.md +8 -8
- package/docs/getting-started/examples/README.md +2 -2
- package/docs/getting-started/installation-guide.md +4 -4
- package/docs/getting-started/quick-start.md +3 -3
- package/docs/migration/MIGRATION_GUIDE.md +3 -3
- package/docs/rbac/compliance/compliance-guide.md +2 -2
- package/docs/rbac/event-based-apps.md +2 -2
- package/docs/rbac/getting-started.md +2 -2
- package/docs/rbac/quick-start.md +2 -2
- package/docs/security/README.md +4 -4
- package/docs/standards/07-rbac-and-rls-standard.md +430 -7
- package/docs/troubleshooting/README.md +2 -2
- package/docs/troubleshooting/migration.md +3 -3
- package/package.json +1 -4
- package/scripts/check-pace-core-compliance.cjs +1 -1
- package/scripts/check-pace-core-compliance.js +1 -1
- package/src/__tests__/fixtures/supabase.ts +301 -0
- package/src/__tests__/public-recipe-view.test.ts +9 -9
- package/src/__tests__/rls-policies.test.ts +197 -61
- package/src/components/AddressField/AddressField.test.tsx +42 -0
- package/src/components/AddressField/AddressField.tsx +71 -60
- package/src/components/AddressField/README.md +1 -0
- package/src/components/Alert/Alert.test.tsx +50 -10
- package/src/components/Alert/Alert.tsx +5 -3
- package/src/components/Avatar/Avatar.test.tsx +252 -226
- package/src/components/Avatar/Avatar.tsx +179 -53
- package/src/components/Avatar/index.ts +1 -1
- package/src/components/Button/Button.test.tsx +2 -1
- package/src/components/Button/Button.tsx +3 -3
- package/src/components/Calendar/Calendar.test.tsx +53 -37
- package/src/components/Calendar/Calendar.tsx +409 -82
- package/src/components/Card/Card.test.tsx +7 -4
- package/src/components/Card/Card.tsx +3 -6
- package/src/components/Checkbox/Checkbox.tsx +2 -2
- package/src/components/DataTable/components/ActionButtons.tsx +5 -5
- package/src/components/DataTable/components/BulkOperationsDropdown.tsx +2 -2
- package/src/components/DataTable/components/ColumnFilter.tsx +1 -1
- package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +3 -3
- package/src/components/DataTable/components/DataTableBody.tsx +12 -12
- package/src/components/DataTable/components/DataTableCore.tsx +3 -3
- package/src/components/DataTable/components/DataTableToolbar.tsx +5 -5
- package/src/components/DataTable/components/DraggableColumnHeader.tsx +3 -3
- package/src/components/DataTable/components/EditableRow.tsx +2 -2
- package/src/components/DataTable/components/EmptyState.tsx +3 -3
- package/src/components/DataTable/components/GroupHeader.tsx +2 -2
- package/src/components/DataTable/components/GroupingDropdown.tsx +1 -1
- package/src/components/DataTable/components/ImportModal.tsx +4 -4
- package/src/components/DataTable/components/LoadingState.tsx +1 -1
- package/src/components/DataTable/components/PaginationControls.tsx +11 -11
- package/src/components/DataTable/components/UnifiedTableBody.tsx +9 -9
- package/src/components/DataTable/components/ViewRowModal.tsx +2 -2
- package/src/components/DataTable/components/__tests__/AccessDeniedPage.test.tsx +11 -37
- package/src/components/DataTable/components/__tests__/DataTableToolbar.test.tsx +157 -0
- package/src/components/DataTable/components/__tests__/LoadingState.test.tsx +2 -1
- package/src/components/DataTable/components/__tests__/VirtualizedDataTable.test.tsx +128 -0
- package/src/components/DataTable/core/__tests__/ActionManager.test.ts +19 -0
- package/src/components/DataTable/core/__tests__/ColumnFactory.test.ts +51 -0
- package/src/components/DataTable/core/__tests__/ColumnManager.test.ts +84 -0
- package/src/components/DataTable/core/__tests__/DataManager.test.ts +14 -0
- package/src/components/DataTable/core/__tests__/DataTableContext.test.tsx +136 -0
- package/src/components/DataTable/core/__tests__/LocalDataAdapter.test.ts +16 -0
- package/src/components/DataTable/core/__tests__/PluginRegistry.test.ts +18 -0
- package/src/components/DataTable/hooks/useDataTablePermissions.ts +28 -7
- package/src/components/DataTable/utils/__tests__/hierarchicalUtils.test.ts +30 -1
- package/src/components/DataTable/utils/hierarchicalUtils.ts +38 -10
- package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +8 -3
- package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.tsx +4 -4
- package/src/components/Dialog/Dialog.tsx +2 -2
- package/src/components/EventSelector/EventSelector.tsx +7 -7
- package/src/components/FileDisplay/FileDisplay.tsx +291 -179
- package/src/components/FileUpload/FileUpload.tsx +7 -4
- package/src/components/Header/Header.test.tsx +28 -0
- package/src/components/Header/Header.tsx +22 -9
- package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +2 -2
- package/src/components/LoadingSpinner/LoadingSpinner.test.tsx +19 -14
- package/src/components/LoadingSpinner/LoadingSpinner.tsx +5 -5
- package/src/components/NavigationMenu/NavigationMenu.test.tsx +127 -1
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +8 -8
- package/src/components/PaceAppLayout/PaceAppLayout.integration.test.tsx +4 -0
- package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +3 -0
- package/src/components/PaceAppLayout/PaceAppLayout.security.test.tsx +3 -0
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +16 -6
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +37 -3
- package/src/components/PaceAppLayout/test-setup.tsx +1 -0
- package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +66 -45
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +6 -4
- package/src/components/Progress/Progress.test.tsx +18 -19
- package/src/components/Progress/Progress.tsx +31 -32
- package/src/components/PublicLayout/PublicLayout.test.tsx +6 -6
- package/src/components/PublicLayout/PublicPageProvider.tsx +5 -3
- package/src/components/Select/Select.tsx +5 -5
- package/src/components/Switch/Switch.test.tsx +2 -1
- package/src/components/Switch/Switch.tsx +1 -1
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/Tooltip/Tooltip.test.tsx +8 -2
- package/src/components/UserMenu/UserMenu.test.tsx +7 -9
- package/src/components/UserMenu/UserMenu.tsx +10 -8
- package/src/components/index.ts +2 -1
- package/src/eslint-rules/pace-core-compliance.cjs +0 -2
- package/src/eslint-rules/pace-core-compliance.js +0 -2
- package/src/hooks/__tests__/hooks.integration.test.tsx +4 -1
- package/src/hooks/__tests__/useAppConfig.unit.test.ts +76 -5
- package/src/hooks/__tests__/useDataTableState.test.ts +76 -0
- package/src/hooks/__tests__/useFileUrl.unit.test.ts +25 -69
- package/src/hooks/__tests__/useFileUrlCache.test.ts +129 -0
- package/src/hooks/__tests__/usePreventTabReload.test.ts +88 -0
- package/src/hooks/__tests__/{usePublicEvent.unit.test.ts → usePublicEvent.test.ts} +28 -1
- package/src/hooks/__tests__/useQueryCache.test.ts +144 -0
- package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +58 -16
- package/src/hooks/index.ts +1 -1
- package/src/hooks/public/usePublicEvent.ts +2 -2
- package/src/hooks/public/usePublicFileDisplay.ts +173 -87
- package/src/hooks/useAppConfig.ts +24 -5
- package/src/hooks/useFileDisplay.ts +297 -34
- package/src/hooks/useFileReference.ts +56 -11
- package/src/hooks/useFileUrl.ts +1 -1
- package/src/hooks/useInactivityTracker.ts +16 -7
- package/src/hooks/usePermissionCache.test.ts +85 -8
- package/src/hooks/useQueryCache.ts +21 -0
- package/src/hooks/useSecureDataAccess.test.ts +80 -35
- package/src/hooks/useSecureDataAccess.ts +80 -37
- package/src/index.ts +2 -1
- package/src/providers/services/EventServiceProvider.tsx +37 -17
- package/src/providers/services/InactivityServiceProvider.tsx +4 -4
- package/src/providers/services/OrganisationServiceProvider.tsx +8 -1
- package/src/providers/services/UnifiedAuthProvider.tsx +115 -29
- package/src/rbac/__tests__/auth-rbac.e2e.test.tsx +451 -0
- package/src/rbac/__tests__/engine.comprehensive.test.ts +12 -0
- package/src/rbac/__tests__/rbac-engine-core-logic.test.ts +8 -0
- package/src/rbac/__tests__/rbac-engine-simplified.test.ts +4 -0
- package/src/rbac/api.ts +240 -36
- package/src/rbac/cache-invalidation.ts +21 -7
- package/src/rbac/compliance/quick-fix-suggestions.ts +1 -1
- package/src/rbac/components/NavigationGuard.tsx +23 -63
- package/src/rbac/components/NavigationProvider.test.tsx +52 -23
- package/src/rbac/components/NavigationProvider.tsx +13 -11
- package/src/rbac/components/PagePermissionGuard.tsx +77 -203
- package/src/rbac/components/PagePermissionProvider.tsx +13 -11
- package/src/rbac/components/PermissionEnforcer.tsx +24 -62
- package/src/rbac/components/RoleBasedRouter.tsx +14 -12
- package/src/rbac/components/SecureDataProvider.tsx +13 -11
- package/src/rbac/components/__tests__/NavigationGuard.test.tsx +104 -41
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +49 -12
- package/src/rbac/components/__tests__/PagePermissionGuard.race-condition.test.tsx +22 -1
- package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +161 -82
- package/src/rbac/components/__tests__/PagePermissionGuard.verification.test.tsx +22 -1
- package/src/rbac/components/__tests__/PermissionEnforcer.test.tsx +77 -30
- package/src/rbac/components/__tests__/RoleBasedRouter.test.tsx +39 -5
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +47 -4
- package/src/rbac/engine.ts +4 -2
- package/src/rbac/hooks/__tests__/useSecureSupabase.test.ts +144 -52
- package/src/rbac/hooks/index.ts +3 -0
- package/src/rbac/hooks/useCan.test.ts +101 -53
- package/src/rbac/hooks/usePermissions.ts +108 -41
- package/src/rbac/hooks/useRBAC.test.ts +11 -3
- package/src/rbac/hooks/useRBAC.ts +83 -40
- package/src/rbac/hooks/useResolvedScope.test.ts +189 -63
- package/src/rbac/hooks/useResolvedScope.ts +128 -70
- package/src/rbac/hooks/useSecureSupabase.ts +36 -19
- package/src/rbac/hooks/useSuperAdminBypass.ts +126 -0
- package/src/rbac/request-deduplication.ts +1 -1
- package/src/rbac/secureClient.ts +72 -12
- package/src/rbac/security.ts +29 -23
- package/src/rbac/types.ts +10 -0
- package/src/rbac/utils/__tests__/contextValidator.test.ts +150 -0
- package/src/rbac/utils/__tests__/deep-equal.test.ts +53 -0
- package/src/rbac/utils/__tests__/eventContext.test.ts +6 -1
- package/src/rbac/utils/contextValidator.ts +288 -0
- package/src/rbac/utils/eventContext.ts +48 -2
- package/src/services/EventService.ts +165 -21
- package/src/services/OrganisationService.ts +37 -2
- package/src/services/__tests__/EventService.test.ts +26 -21
- package/src/types/file-reference.ts +13 -10
- package/src/utils/app/appNameResolver.test.ts +346 -73
- package/src/utils/context/superAdminOverride.ts +58 -0
- package/src/utils/file-reference/index.ts +61 -33
- package/src/utils/google-places/googlePlacesUtils.test.ts +98 -0
- package/src/utils/google-places/loadGoogleMapsScript.test.ts +83 -0
- package/src/utils/storage/helpers.test.ts +1 -1
- package/src/utils/storage/helpers.ts +38 -19
- package/src/utils/storage/types.ts +15 -8
- package/src/utils/validation/__tests__/csrf.test.ts +105 -0
- package/src/utils/validation/__tests__/sqlInjectionProtection.test.ts +92 -0
- package/src/vite-env.d.ts +2 -2
- package/dist/chunk-3GOZZZYH.js.map +0 -1
- package/dist/chunk-DDM4CCYT.js.map +0 -1
- package/dist/chunk-E7UAOUMY.js +0 -75
- package/dist/chunk-E7UAOUMY.js.map +0 -1
- package/dist/chunk-EFCLXK7F.js.map +0 -1
- package/dist/chunk-F2IMUDXZ.js.map +0 -1
- package/dist/chunk-HEHYGYOX.js.map +0 -1
- package/dist/chunk-IM4QE42D.js.map +0 -1
- package/dist/chunk-IPCH26AG.js.map +0 -1
- package/dist/chunk-SAUPYVLF.js.map +0 -1
- package/dist/chunk-THRPYOFK.js.map +0 -1
- package/dist/chunk-UNOTYLQF.js.map +0 -1
- package/dist/chunk-VGZZXKBR.js.map +0 -1
- package/dist/chunk-YHCN776L.js.map +0 -1
- package/src/hooks/__tests__/usePermissionCache.simple.test.ts +0 -192
- package/src/hooks/__tests__/usePermissionCache.unit.test.ts +0 -741
- package/src/hooks/__tests__/usePublicEvent.simple.test.ts +0 -703
- package/src/rbac/hooks/useRBAC.simple.test.ts +0 -95
- package/src/rbac/utils/__tests__/eventContext.unit.test.ts +0 -428
- /package/dist/{DataTable-GUFUNZ3N.js.map → DataTable-ON3IXISJ.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-643PUAIM.js.map → UnifiedAuthProvider-X5NXANVI.js.map} +0 -0
- /package/dist/{api-YP7XD5L6.js.map → api-I6UCQ5S6.js.map} +0 -0
- /package/dist/{chunk-HESYZWZW.js.map → chunk-QWWZ5CAQ.js.map} +0 -0
package/core-usage-manifest.json
CHANGED
|
@@ -213,10 +213,6 @@
|
|
|
213
213
|
"module": "@radix-ui/react-label",
|
|
214
214
|
"reason": "Use Label component from pace-core instead"
|
|
215
215
|
},
|
|
216
|
-
{
|
|
217
|
-
"module": "@radix-ui/react-progress",
|
|
218
|
-
"reason": "Use Progress component from pace-core instead"
|
|
219
|
-
},
|
|
220
216
|
{
|
|
221
217
|
"module": "@radix-ui/react-slot",
|
|
222
218
|
"reason": "Use Button component from pace-core which handles slot composition"
|
|
@@ -103,6 +103,8 @@ declare class EventService extends BaseService implements IEventService {
|
|
|
103
103
|
private appName;
|
|
104
104
|
private selectedOrganisation;
|
|
105
105
|
private setSelectedEventId;
|
|
106
|
+
private isSuperAdmin;
|
|
107
|
+
private appConfig;
|
|
106
108
|
private isInitializedRef;
|
|
107
109
|
private isFetchingRef;
|
|
108
110
|
private hasAutoSelectedRef;
|
|
@@ -349,11 +351,13 @@ interface InactivityServiceProviderProps {
|
|
|
349
351
|
supabaseClient: SupabaseClient;
|
|
350
352
|
user: User | null;
|
|
351
353
|
session: Session | null;
|
|
352
|
-
idleTimeoutMs
|
|
353
|
-
warnBeforeMs
|
|
354
|
+
idleTimeoutMs: number;
|
|
355
|
+
warnBeforeMs: number;
|
|
354
356
|
onIdleLogout: (reason: 'inactivity') => void;
|
|
355
357
|
}
|
|
356
|
-
declare function InactivityServiceProvider({ children, supabaseClient, user, session, idleTimeoutMs,
|
|
358
|
+
declare function InactivityServiceProvider({ children, supabaseClient, user, session, idleTimeoutMs, // REQUIRED: No default - must be explicitly provided
|
|
359
|
+
warnBeforeMs, // REQUIRED: No default - must be explicitly provided
|
|
360
|
+
onIdleLogout }: InactivityServiceProviderProps): react_jsx_runtime.JSX.Element;
|
|
357
361
|
|
|
358
362
|
/**
|
|
359
363
|
* @file Authentication Service Interface
|
|
@@ -60,10 +60,8 @@ import {
|
|
|
60
60
|
sum,
|
|
61
61
|
validateHierarchicalData,
|
|
62
62
|
validatePaginationConfig
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-HEHYGYOX.js";
|
|
66
|
-
import "./chunk-63FOKYGO.js";
|
|
63
|
+
} from "./chunk-SDMHPX3X.js";
|
|
64
|
+
import "./chunk-HQVPB5MZ.js";
|
|
67
65
|
import {
|
|
68
66
|
CircuitBreaker,
|
|
69
67
|
DEFAULT_FALLBACK_CONFIG,
|
|
@@ -82,11 +80,13 @@ import {
|
|
|
82
80
|
throttle,
|
|
83
81
|
useDataTablePerformance
|
|
84
82
|
} from "./chunk-6C4YBBJM.js";
|
|
85
|
-
import "./chunk-
|
|
86
|
-
import "./chunk-
|
|
83
|
+
import "./chunk-Y4BUBBHD.js";
|
|
84
|
+
import "./chunk-J2XXC7R5.js";
|
|
85
|
+
import "./chunk-RUYZKXOD.js";
|
|
86
|
+
import "./chunk-63FOKYGO.js";
|
|
87
87
|
import "./chunk-QXHPKYJV.js";
|
|
88
88
|
import "./chunk-R77UEZ4E.js";
|
|
89
|
-
import "./chunk-
|
|
89
|
+
import "./chunk-I7PSE6JW.js";
|
|
90
90
|
import "./chunk-VBXEHIUJ.js";
|
|
91
91
|
import "./chunk-PWLANIRT.js";
|
|
92
92
|
import "./chunk-7D4SUZUM.js";
|
|
@@ -169,4 +169,4 @@ export {
|
|
|
169
169
|
validateHierarchicalData,
|
|
170
170
|
validatePaginationConfig
|
|
171
171
|
};
|
|
172
|
-
//# sourceMappingURL=DataTable-
|
|
172
|
+
//# sourceMappingURL=DataTable-ON3IXISJ.js.map
|
|
@@ -2,14 +2,13 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { Component, ReactNode } from 'react';
|
|
3
3
|
import { P as ParsedAddress, A as AutocompleteOptions } from './types-Bwgl--Xo.js';
|
|
4
4
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
|
-
import
|
|
5
|
+
import { F as FileCategory, e as FileUploadResult, U as UploadProgress, c as FileUploadOptions, a as FileReference } from './file-reference-BavO2eQj.js';
|
|
6
6
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
7
7
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
8
|
-
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
9
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
9
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
11
10
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
12
|
-
import { DayPickerProps } from 'react-day-picker';
|
|
11
|
+
import { DayPickerProps, DateRange } from 'react-day-picker';
|
|
13
12
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
14
13
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
15
14
|
import { FieldValues, DefaultValues, SubmitHandler, SubmitErrorHandler, UseFormReturn, FieldPath, ControllerRenderProps, ControllerFieldState, UseFormStateReturn } from 'react-hook-form';
|
|
@@ -17,7 +16,6 @@ import { z } from 'zod';
|
|
|
17
16
|
import { User, SupabaseClient, createClient } from '@supabase/supabase-js';
|
|
18
17
|
import { P as Permission, A as AccessLevel } from './types-UU913iLA.js';
|
|
19
18
|
import { E as Event, O as Organisation } from './event-CW5YB_2p.js';
|
|
20
|
-
import { F as FileCategory, e as FileUploadResult, U as UploadProgress, c as FileUploadOptions, a as FileReference } from './file-reference-D037xOFK.js';
|
|
21
19
|
|
|
22
20
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
23
21
|
/** Visual variant of the button */
|
|
@@ -297,8 +295,15 @@ interface AddressFieldRef {
|
|
|
297
295
|
* - Debounced input with caching
|
|
298
296
|
* - Keyboard navigation (Arrow keys, Enter, Escape)
|
|
299
297
|
* - Accessible ARIA attributes
|
|
298
|
+
* - Semantic HTML (description list for suggestions)
|
|
300
299
|
* - Loading and error states
|
|
301
300
|
* - place_id storage for later retrieval
|
|
301
|
+
*
|
|
302
|
+
* @accessibility
|
|
303
|
+
* - Uses semantic HTML: `<dl>`, `<dt>`, `<dd>` for address suggestions
|
|
304
|
+
* - Proper ARIA attributes for combobox pattern
|
|
305
|
+
* - Keyboard navigation support
|
|
306
|
+
* - Screen reader friendly
|
|
302
307
|
*/
|
|
303
308
|
|
|
304
309
|
/**
|
|
@@ -533,6 +538,7 @@ declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$
|
|
|
533
538
|
* Features:
|
|
534
539
|
* - Multiple visual variants (default, destructive, inline)
|
|
535
540
|
* - Title and description support
|
|
541
|
+
* - Semantic HTML: renders as `<aside>` element
|
|
536
542
|
* - ARIA role="alert" for accessibility
|
|
537
543
|
* - Keyboard and screen reader accessible
|
|
538
544
|
* - Composable with icons and actions
|
|
@@ -563,25 +569,29 @@ declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$
|
|
|
563
569
|
* ```
|
|
564
570
|
*
|
|
565
571
|
* @accessibility
|
|
572
|
+
* - Uses semantic HTML: `<aside>` element for better semantic meaning
|
|
566
573
|
* - Uses role="alert" for screen reader announcement
|
|
567
574
|
* - Title and description are semantically structured
|
|
568
575
|
* - Supports keyboard navigation and focus
|
|
569
576
|
*/
|
|
570
577
|
|
|
571
|
-
declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<
|
|
578
|
+
declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & {
|
|
572
579
|
variant?: "default" | "destructive" | "inline";
|
|
573
|
-
} & React$1.RefAttributes<
|
|
580
|
+
} & React$1.RefAttributes<HTMLElement>>;
|
|
574
581
|
declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
575
582
|
declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
576
583
|
|
|
577
584
|
/**
|
|
578
|
-
* @file Avatar Component
|
|
585
|
+
* @file Avatar Component
|
|
579
586
|
* @package @jmruthers/pace-core
|
|
580
587
|
* @module Components
|
|
581
588
|
* @since 0.1.0
|
|
582
589
|
*
|
|
583
|
-
* A
|
|
584
|
-
*
|
|
590
|
+
* A simple and accessible avatar component for displaying user profile images or initials.
|
|
591
|
+
* Supports three approaches for image display:
|
|
592
|
+
* - File reference props (uses FileDisplay for Supabase storage)
|
|
593
|
+
* - File ID (uses file reference lookup)
|
|
594
|
+
* - Direct URL (simple img tag for public images)
|
|
585
595
|
*
|
|
586
596
|
* Features:
|
|
587
597
|
* - Circular avatar display
|
|
@@ -592,16 +602,31 @@ declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAt
|
|
|
592
602
|
*
|
|
593
603
|
* @example
|
|
594
604
|
* ```tsx
|
|
595
|
-
* //
|
|
596
|
-
* <Avatar
|
|
597
|
-
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
605
|
+
* // Avatar with direct URL
|
|
606
|
+
* <Avatar
|
|
607
|
+
* src="/user.jpg"
|
|
608
|
+
* alt="User"
|
|
609
|
+
* fallback="AB"
|
|
610
|
+
* />
|
|
611
|
+
*
|
|
612
|
+
* // Avatar with file reference props
|
|
613
|
+
* <Avatar
|
|
614
|
+
* table_name="user_profiles"
|
|
615
|
+
* record_id={userId}
|
|
616
|
+
* organisation_id={orgId}
|
|
617
|
+
* category={FileCategory.PROFILE_PHOTOS}
|
|
618
|
+
* fallback="JD"
|
|
619
|
+
* />
|
|
620
|
+
*
|
|
621
|
+
* // Avatar with file ID
|
|
622
|
+
* <Avatar
|
|
623
|
+
* fileId={fileReferenceId}
|
|
624
|
+
* organisation_id={orgId}
|
|
625
|
+
* fallback="JD"
|
|
626
|
+
* />
|
|
600
627
|
*
|
|
601
628
|
* // Avatar with fallback only
|
|
602
|
-
* <Avatar
|
|
603
|
-
* <AvatarFallback>JD</AvatarFallback>
|
|
604
|
-
* </Avatar>
|
|
629
|
+
* <Avatar fallback="JD" />
|
|
605
630
|
* ```
|
|
606
631
|
*
|
|
607
632
|
* @accessibility
|
|
@@ -610,9 +635,22 @@ declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAt
|
|
|
610
635
|
* - Keyboard focusable and navigable
|
|
611
636
|
*/
|
|
612
637
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
638
|
+
interface AvatarProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
639
|
+
table_name?: string;
|
|
640
|
+
record_id?: string;
|
|
641
|
+
organisation_id?: string;
|
|
642
|
+
category?: FileCategory;
|
|
643
|
+
fileId?: string;
|
|
644
|
+
src?: string;
|
|
645
|
+
alt?: string;
|
|
646
|
+
fallback: string;
|
|
647
|
+
className?: string;
|
|
648
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Avatar component for displaying user profile images or initials
|
|
652
|
+
*/
|
|
653
|
+
declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
616
654
|
|
|
617
655
|
/**
|
|
618
656
|
* @file Badge Component
|
|
@@ -832,16 +870,16 @@ declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.Re
|
|
|
832
870
|
* @module Components/Progress
|
|
833
871
|
* @since 0.1.0
|
|
834
872
|
*
|
|
835
|
-
* An accessible progress bar component built on
|
|
873
|
+
* An accessible progress bar component built on the native HTML `<progress>` element.
|
|
836
874
|
* Provides smooth animations and proper ARIA attributes for screen readers.
|
|
837
875
|
*
|
|
838
876
|
* Features:
|
|
839
877
|
* - Smooth progress animations
|
|
840
878
|
* - Customizable value and max range
|
|
841
|
-
* -
|
|
879
|
+
* - Native accessibility support (role="progressbar" automatically applied)
|
|
842
880
|
* - Customizable styling and appearance
|
|
843
881
|
* - Responsive design
|
|
844
|
-
* -
|
|
882
|
+
* - Indeterminate state support
|
|
845
883
|
*
|
|
846
884
|
* @example
|
|
847
885
|
* ```tsx
|
|
@@ -868,22 +906,23 @@ declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.Re
|
|
|
868
906
|
* }, []);
|
|
869
907
|
*
|
|
870
908
|
* <Progress value={progress} />
|
|
909
|
+
*
|
|
910
|
+
* // Indeterminate progress (no value)
|
|
911
|
+
* <Progress />
|
|
871
912
|
* ```
|
|
872
913
|
*
|
|
873
914
|
* @accessibility
|
|
874
915
|
* - WCAG 2.1 AA compliant
|
|
875
|
-
* -
|
|
916
|
+
* - Native `<progress>` element provides role="progressbar" automatically
|
|
876
917
|
* - Screen reader announcements for progress changes
|
|
877
|
-
* - Keyboard navigation support
|
|
878
918
|
* - High contrast support
|
|
879
919
|
*
|
|
880
920
|
* @performance
|
|
881
921
|
* - CSS transitions for smooth animations
|
|
882
922
|
* - Efficient re-rendering
|
|
883
|
-
* - Minimal DOM structure
|
|
923
|
+
* - Minimal DOM structure (native HTML element)
|
|
884
924
|
*
|
|
885
925
|
* @dependencies
|
|
886
|
-
* - @radix-ui/react-progress - Core progress functionality
|
|
887
926
|
* - React 18+ - Hooks and refs
|
|
888
927
|
* - Tailwind CSS - Styling
|
|
889
928
|
*/
|
|
@@ -891,15 +930,15 @@ declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.Re
|
|
|
891
930
|
/**
|
|
892
931
|
* Props for the Progress component
|
|
893
932
|
*/
|
|
894
|
-
interface ProgressProps extends React$1.
|
|
895
|
-
/** Current progress value (0 to max) */
|
|
933
|
+
interface ProgressProps extends React$1.HTMLAttributes<HTMLProgressElement> {
|
|
934
|
+
/** Current progress value (0 to max). Omit for indeterminate state. */
|
|
896
935
|
value?: number;
|
|
897
936
|
/** Maximum progress value (default: 100) */
|
|
898
937
|
max?: number;
|
|
899
938
|
}
|
|
900
939
|
/**
|
|
901
940
|
* Progress component
|
|
902
|
-
* An accessible progress bar with smooth animations
|
|
941
|
+
* An accessible progress bar with smooth animations using native HTML `<progress>` element
|
|
903
942
|
*
|
|
904
943
|
* @param props - Progress configuration and styling
|
|
905
944
|
* @param ref - Forwarded ref to the progress element
|
|
@@ -910,7 +949,7 @@ interface ProgressProps extends React$1.ComponentPropsWithoutRef<typeof Progress
|
|
|
910
949
|
* <Progress value={75} max={100} />
|
|
911
950
|
* ```
|
|
912
951
|
*/
|
|
913
|
-
declare const Progress: React$1.ForwardRefExoticComponent<ProgressProps & React$1.RefAttributes<
|
|
952
|
+
declare const Progress: React$1.ForwardRefExoticComponent<ProgressProps & React$1.RefAttributes<HTMLProgressElement>>;
|
|
914
953
|
|
|
915
954
|
/**
|
|
916
955
|
* Dialog size variants
|
|
@@ -1329,7 +1368,7 @@ declare const TabsContent: React$1.ForwardRefExoticComponent<TabsContentProps &
|
|
|
1329
1368
|
* Features:
|
|
1330
1369
|
* - Single, range, and multiple date selection modes
|
|
1331
1370
|
* - Date disabling (past dates, weekends, etc.)
|
|
1332
|
-
* - Localization support
|
|
1371
|
+
* - Localization support (defaults to Australian locale with Monday as first day of week)
|
|
1333
1372
|
* - Keyboard navigation
|
|
1334
1373
|
* - Accessible date selection
|
|
1335
1374
|
* - Customizable styling
|
|
@@ -1376,13 +1415,18 @@ declare const TabsContent: React$1.ForwardRefExoticComponent<TabsContentProps &
|
|
|
1376
1415
|
|
|
1377
1416
|
interface CalendarProps extends Omit<DayPickerProps, 'className' | 'classNames' | 'styles' | 'onSelect'> {
|
|
1378
1417
|
/**
|
|
1379
|
-
* Additional CSS classes to apply to the calendar
|
|
1418
|
+
* Additional CSS classes to apply to the calendar table
|
|
1380
1419
|
*/
|
|
1381
1420
|
className?: string;
|
|
1382
1421
|
/**
|
|
1383
1422
|
* Custom classNames for DayPicker sub-components
|
|
1384
1423
|
*/
|
|
1385
1424
|
classNames?: DayPickerProps['classNames'];
|
|
1425
|
+
/**
|
|
1426
|
+
* Currently selected value; mirrors DayPicker's `selected` prop so callers
|
|
1427
|
+
* can control the selection state.
|
|
1428
|
+
*/
|
|
1429
|
+
selected?: Date | Date[] | DateRange | undefined;
|
|
1386
1430
|
/**
|
|
1387
1431
|
* Date selection handler. Signature depends on mode:
|
|
1388
1432
|
* - mode="single": (date: Date | undefined) => void
|
|
@@ -1399,13 +1443,22 @@ interface CalendarProps extends Omit<DayPickerProps, 'className' | 'classNames'
|
|
|
1399
1443
|
* A flexible, accessible calendar component for date selection.
|
|
1400
1444
|
* Built on react-day-picker with pace-core styling.
|
|
1401
1445
|
*
|
|
1446
|
+
* Defaults to Australian locale (en-AU) with Monday as the first day of the week.
|
|
1447
|
+
* The locale can be overridden by passing a `locale` prop.
|
|
1448
|
+
*
|
|
1449
|
+
* Month navigation is automatically managed internally when `month` and `onMonthChange` props
|
|
1450
|
+
* are not provided. The displayed month will sync with the selected date when available,
|
|
1451
|
+
* or default to the current month. Navigation buttons (prev/next) work automatically.
|
|
1452
|
+
*
|
|
1453
|
+
* For controlled month state, pass `month` and `onMonthChange` props.
|
|
1454
|
+
*
|
|
1402
1455
|
* @param props - Calendar configuration and styling
|
|
1403
1456
|
* @param ref - Forwarded ref (not used directly, but maintained for API consistency)
|
|
1404
1457
|
* @returns JSX.Element - The rendered calendar element
|
|
1405
1458
|
*
|
|
1406
1459
|
* @example
|
|
1407
1460
|
* ```tsx
|
|
1408
|
-
* // Single date selection
|
|
1461
|
+
* // Single date selection (uses default Australian locale)
|
|
1409
1462
|
* <Calendar
|
|
1410
1463
|
* mode="single"
|
|
1411
1464
|
* selected={date}
|
|
@@ -1419,9 +1472,28 @@ interface CalendarProps extends Omit<DayPickerProps, 'className' | 'classNames'
|
|
|
1419
1472
|
* onSelect={setDate}
|
|
1420
1473
|
* disabled={(date) => date < new Date()}
|
|
1421
1474
|
* />
|
|
1475
|
+
*
|
|
1476
|
+
* // Override locale (e.g., US locale with Sunday as first day)
|
|
1477
|
+
* import { enUS } from 'date-fns/locale';
|
|
1478
|
+
* <Calendar
|
|
1479
|
+
* mode="single"
|
|
1480
|
+
* selected={date}
|
|
1481
|
+
* onSelect={setDate}
|
|
1482
|
+
* locale={enUS}
|
|
1483
|
+
* />
|
|
1484
|
+
*
|
|
1485
|
+
* // Controlled month state (optional - month is auto-managed if not provided)
|
|
1486
|
+
* const [month, setMonth] = useState(new Date());
|
|
1487
|
+
* <Calendar
|
|
1488
|
+
* mode="single"
|
|
1489
|
+
* selected={date}
|
|
1490
|
+
* onSelect={setDate}
|
|
1491
|
+
* month={month}
|
|
1492
|
+
* onMonthChange={setMonth}
|
|
1493
|
+
* />
|
|
1422
1494
|
* ```
|
|
1423
1495
|
*/
|
|
1424
|
-
declare const Calendar: React$1.ForwardRefExoticComponent<CalendarProps & React$1.RefAttributes<
|
|
1496
|
+
declare const Calendar: React$1.ForwardRefExoticComponent<CalendarProps & React$1.RefAttributes<HTMLTableElement>>;
|
|
1425
1497
|
|
|
1426
1498
|
declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
|
|
1427
1499
|
/**
|
|
@@ -3595,7 +3667,8 @@ interface FileUploadProps {
|
|
|
3595
3667
|
supabase: SupabaseClient;
|
|
3596
3668
|
table_name: string;
|
|
3597
3669
|
record_id: string;
|
|
3598
|
-
organisation_id
|
|
3670
|
+
organisation_id?: string | null;
|
|
3671
|
+
userId?: string;
|
|
3599
3672
|
app_id?: string;
|
|
3600
3673
|
category: FileCategory;
|
|
3601
3674
|
folder: string;
|
|
@@ -3614,13 +3687,19 @@ interface FileUploadProps {
|
|
|
3614
3687
|
onProgress?: (progress: UploadProgress) => void;
|
|
3615
3688
|
children?: React__default.ReactNode;
|
|
3616
3689
|
}
|
|
3617
|
-
declare function FileUpload({ supabase, table_name, record_id, organisation_id, app_id, category, folder, pageContext, event_id, accept, maxSize, // 10MB default
|
|
3690
|
+
declare function FileUpload({ supabase, table_name, record_id, organisation_id, userId, app_id, category, folder, pageContext, event_id, accept, maxSize, // 10MB default
|
|
3618
3691
|
multiple, disabled, isPublic, className, showPreview, showProgress, onUploadSuccess, onUploadError, onProgress, children }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
3619
3692
|
|
|
3620
3693
|
interface FileDisplayProps {
|
|
3621
3694
|
table_name: string;
|
|
3622
3695
|
record_id: string;
|
|
3623
|
-
|
|
3696
|
+
/**
|
|
3697
|
+
* Optional organisation ID. When not provided (undefined), the component will automatically
|
|
3698
|
+
* search for files in both user-scoped (organisation_id = null) and organisation-scoped contexts.
|
|
3699
|
+
* If both types of files exist, organisation-scoped files are preferred.
|
|
3700
|
+
* When explicitly set to null, only user-scoped files are searched.
|
|
3701
|
+
*/
|
|
3702
|
+
organisation_id?: string;
|
|
3624
3703
|
category?: FileCategory;
|
|
3625
3704
|
/** Display only a single file instead of all files. Uses first file (prefers images) from all files, without category filtering */
|
|
3626
3705
|
displayOnly?: boolean;
|
|
@@ -3640,8 +3719,18 @@ interface FileDisplayProps {
|
|
|
3640
3719
|
generateFallbackText?: (fileName?: string) => string;
|
|
3641
3720
|
/** Explicit fallback text to display (overrides generateFallbackText) */
|
|
3642
3721
|
fallbackText?: string;
|
|
3722
|
+
/** Source text to use for generating fallback text (overrides filename) */
|
|
3723
|
+
fallbackSourceText?: string;
|
|
3643
3724
|
/** Size variant for fallback display (only applies when showFallback is true) */
|
|
3644
3725
|
fallbackSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3726
|
+
/**
|
|
3727
|
+
* Enable children rendering in displayOnly mode. When true, uses standard display path
|
|
3728
|
+
* (with children support) even if showDelete is false. The delete button will only appear
|
|
3729
|
+
* if showDelete is also true.
|
|
3730
|
+
*/
|
|
3731
|
+
enableChildren?: boolean;
|
|
3732
|
+
/** Whether to show metadata (filename, filesize, mimetype) in figcaption. Defaults to true. */
|
|
3733
|
+
showMetadata?: boolean;
|
|
3645
3734
|
}
|
|
3646
3735
|
/**
|
|
3647
3736
|
* Component for displaying file references with context-awareness
|
|
@@ -3661,7 +3750,7 @@ interface FileDisplayProps {
|
|
|
3661
3750
|
* @param props.category - Optional category filter. When specified, only displays files matching this category and uses single file display variant.
|
|
3662
3751
|
* @returns React element with file display
|
|
3663
3752
|
*/
|
|
3664
|
-
declare function FileDisplay({ table_name, record_id, organisation_id, category, displayOnly, showDelete, className, children, loadingComponent, errorComponent, showFallback, generateFallbackText, fallbackText, fallbackSize }: FileDisplayProps): react_jsx_runtime.JSX.Element;
|
|
3753
|
+
declare function FileDisplay({ table_name, record_id, organisation_id, category, displayOnly, showDelete, className, children, loadingComponent, errorComponent, showFallback, generateFallbackText, fallbackText, fallbackSourceText, fallbackSize, enableChildren, showMetadata }: FileDisplayProps): react_jsx_runtime.JSX.Element;
|
|
3665
3754
|
|
|
3666
3755
|
declare function useFileReference(supabase: SupabaseClient): {
|
|
3667
3756
|
isLoading: boolean;
|
|
@@ -4002,4 +4091,4 @@ declare function usePublicPageContext(): PublicPageContextType;
|
|
|
4002
4091
|
*/
|
|
4003
4092
|
declare function useIsPublicPage(): boolean;
|
|
4004
4093
|
|
|
4005
|
-
export { type
|
|
4094
|
+
export { type DialogTriggerProps as $, AddressField as A, Button as B, Card as C, TableHeader as D, TableBody as E, TableCaption as F, TableCell as G, TableFooter as H, Input as I, TableHead as J, TableRow as K, Label as L, Dialog as M, DialogPortal as N, DialogOverlay as O, Progress as P, DialogTrigger as Q, DialogClose as R, Switch as S, Textarea as T, DialogContent as U, DialogHeader as V, DialogBody as W, DialogFooter as X, DialogTitle as Y, DialogDescription as Z, type DialogProps as _, type ButtonProps as a, EventSelector as a$, type DialogContentProps as a0, type DialogOverlayProps as a1, type DialogHeaderProps as a2, type DialogFooterProps as a3, type DialogTitleProps as a4, type DialogDescriptionProps as a5, type DialogSize as a6, Select as a7, SelectGroup as a8, SelectValue as a9, TooltipTrigger as aA, TooltipContent as aB, TooltipProvider as aC, TooltipRoot as aD, Form as aE, FormField as aF, type FormProps as aG, type FormFieldProps as aH, LoginForm as aI, type LoginFormProps as aJ, Header as aK, Footer as aL, type FooterProps as aM, ProtectedRoute as aN, type ProtectedRouteProps as aO, NavigationMenu as aP, type NavigationMenuProps as aQ, type NavigationItem as aR, OrganisationSelector as aS, type OrganisationSelectorProps as aT, UserMenu as aU, ErrorBoundary as aV, type ErrorBoundaryProps as aW, type ErrorBoundaryState as aX, LoadingSpinner as aY, SessionRestorationLoader as aZ, type SessionRestorationLoaderProps as a_, SelectTrigger as aa, SelectContent as ab, SelectLabel as ac, SelectItem as ad, SelectSeparator as ae, Tabs as af, TabsList as ag, TabsTrigger as ah, TabsContent as ai, type TabsProps as aj, type TabsListProps as ak, type TabsTriggerProps as al, type TabsContentProps as am, Calendar as an, type CalendarProps as ao, Toast as ap, Toaster as aq, ToastAction as ar, ToastProvider as as, ToastViewport as at, ToastTitle as au, ToastDescription as av, ToastClose as aw, type ToastActionElement as ax, type ToastProps as ay, Tooltip as az, CardHeader as b, FileUpload as b0, type FileUploadProps as b1, FileDisplay as b2, type FileDisplayProps as b3, useFileReference as b4, useFileReferenceForRecord as b5, useFileReferenceById as b6, useFilesByCategory as b7, type UseFileReferenceOptions as b8, type UseFileReferenceReturn as b9, type UseFileReferenceForRecordReturn as ba, PublicPageLayout as bb, PublicPageHeader as bc, PublicPageFooter as bd, PublicPageProvider as be, usePublicPageContext as bf, useIsPublicPage as bg, type PublicPageLayoutProps as bh, type PublicPageHeaderProps as bi, type PublicPageFooterProps as bj, type PaceAppLayoutProps as bk, PaceAppLayout as bl, type PaceLoginPageProps as bm, PaceLoginPage as bn, type NavigationMode as bo, type UserMenuProps as bp, PasswordChangeForm as bq, CardFooter as c, CardTitle as d, CardDescription as e, CardContent as f, CardActions as g, type CardProps as h, type CardActionsProps as i, type InputProps as j, type AddressFieldProps as k, type AddressFieldRef as l, type LabelProps as m, type TextareaProps as n, Alert as o, AlertTitle as p, AlertDescription as q, Avatar as r, type AvatarProps as s, Badge as t, type BadgeProps as u, type BadgeVariant as v, Checkbox as w, type SwitchProps as x, type ProgressProps as y, Table as z };
|
|
@@ -107,8 +107,9 @@ interface UnifiedAuthProviderProps {
|
|
|
107
107
|
dangerouslyDisableInactivity?: boolean;
|
|
108
108
|
}
|
|
109
109
|
declare function UnifiedAuthProvider({ children, supabaseClient, appName, appConfig, // Default to requiring events
|
|
110
|
-
persistState, enablePersistence, requireOrganisationContext, idleTimeoutMs, //
|
|
111
|
-
warnBeforeMs, //
|
|
112
|
-
onIdleLogout,
|
|
110
|
+
persistState, enablePersistence, requireOrganisationContext, idleTimeoutMs, // REQUIRED: No default - must be explicitly provided
|
|
111
|
+
warnBeforeMs, // REQUIRED: No default - must be explicitly provided
|
|
112
|
+
onIdleLogout, // REQUIRED: No default - must be explicitly provided
|
|
113
|
+
renderInactivityWarning, dangerouslyDisableInactivity }: UnifiedAuthProviderProps): react_jsx_runtime.JSX.Element;
|
|
113
114
|
|
|
114
115
|
export { type UserEventAccess as U, type UnifiedAuthContextType as a, UnifiedAuthContext as b, type UnifiedAuthProviderProps as c, UnifiedAuthProvider as d, useUnifiedAuth as u };
|
|
@@ -2,7 +2,9 @@ import {
|
|
|
2
2
|
UnifiedAuthContext,
|
|
3
3
|
UnifiedAuthProvider,
|
|
4
4
|
useUnifiedAuth
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-J2XXC7R5.js";
|
|
6
|
+
import "./chunk-RUYZKXOD.js";
|
|
7
|
+
import "./chunk-63FOKYGO.js";
|
|
6
8
|
import "./chunk-QXHPKYJV.js";
|
|
7
9
|
import "./chunk-VBXEHIUJ.js";
|
|
8
10
|
import "./chunk-PWLANIRT.js";
|
|
@@ -12,4 +14,4 @@ export {
|
|
|
12
14
|
UnifiedAuthProvider,
|
|
13
15
|
useUnifiedAuth
|
|
14
16
|
};
|
|
15
|
-
//# sourceMappingURL=UnifiedAuthProvider-
|
|
17
|
+
//# sourceMappingURL=UnifiedAuthProvider-X5NXANVI.js.map
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
clearCache,
|
|
4
4
|
getAccessLevel,
|
|
5
5
|
getAppConfig,
|
|
6
|
+
getAppConfigByName,
|
|
6
7
|
getAppConfigWithClient,
|
|
7
8
|
getPermissionMap,
|
|
8
9
|
getRoleContext,
|
|
@@ -20,7 +21,7 @@ import {
|
|
|
20
21
|
isSuperAdmin,
|
|
21
22
|
resolveAppContext,
|
|
22
23
|
setupRBAC
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RUYZKXOD.js";
|
|
24
25
|
import "./chunk-63FOKYGO.js";
|
|
25
26
|
import "./chunk-PWLANIRT.js";
|
|
26
27
|
import "./chunk-7D4SUZUM.js";
|
|
@@ -29,6 +30,7 @@ export {
|
|
|
29
30
|
clearCache,
|
|
30
31
|
getAccessLevel,
|
|
31
32
|
getAppConfig,
|
|
33
|
+
getAppConfigByName,
|
|
32
34
|
getAppConfigWithClient,
|
|
33
35
|
getPermissionMap,
|
|
34
36
|
getRoleContext,
|
|
@@ -47,4 +49,4 @@ export {
|
|
|
47
49
|
resolveAppContext,
|
|
48
50
|
setupRBAC
|
|
49
51
|
};
|
|
50
|
-
//# sourceMappingURL=api-
|
|
52
|
+
//# sourceMappingURL=api-I6UCQ5S6.js.map
|