@jmruthers/pace-core 0.5.191 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +7 -1
- package/cursor-rules/00-pace-core-compliance.mdc +372 -0
- package/cursor-rules/01-standards-compliance.mdc +275 -0
- package/cursor-rules/02-project-structure.mdc +200 -0
- package/cursor-rules/03-solid-principles.mdc +341 -0
- package/cursor-rules/04-testing-standards.mdc +315 -0
- package/cursor-rules/05-bug-reports-and-features.mdc +246 -0
- package/cursor-rules/06-code-quality.mdc +392 -0
- package/cursor-rules/07-tech-stack-compliance.mdc +309 -0
- package/cursor-rules/CHANGELOG.md +101 -0
- package/cursor-rules/README.md +191 -0
- package/dist/{AuthService-CbP_utw2.d.ts → AuthService-DjnJHDtC.d.ts} +1 -0
- package/dist/{DataTable-Be6dH_dR.d.ts → DataTable-CH1U5Tpy.d.ts} +1 -1
- package/dist/{DataTable-WKRZD47S.js → DataTable-DQ7RSOHE.js} +8 -7
- package/dist/{PublicPageProvider-ULXC_u6U.d.ts → PublicPageProvider-ce4xlHYA.d.ts} +37 -156
- package/dist/{UnifiedAuthProvider-BYA9qB-o.d.ts → UnifiedAuthProvider-185Ih4dj.d.ts} +2 -0
- package/dist/{UnifiedAuthProvider-FTSG5XH7.js → UnifiedAuthProvider-ATAP5UTR.js} +3 -3
- package/dist/{api-IHKALJZD.js → api-N774RPUA.js} +2 -2
- package/dist/{chunk-6C4YBBJM.js → chunk-3QRJFVBR.js} +1 -1
- package/dist/chunk-3QRJFVBR.js.map +1 -0
- package/dist/{chunk-OETXORNB.js → chunk-3XTALGJF.js} +211 -136
- package/dist/chunk-3XTALGJF.js.map +1 -0
- package/dist/{chunk-6TQDD426.js → chunk-4N5C5XZU.js} +47 -228
- package/dist/chunk-4N5C5XZU.js.map +1 -0
- package/dist/{chunk-LOMZXPSN.js → chunk-4ZC4GX36.js} +47 -74
- package/dist/chunk-4ZC4GX36.js.map +1 -0
- package/dist/{chunk-6LTQQAT6.js → chunk-BYFSK72L.js} +357 -158
- package/dist/chunk-BYFSK72L.js.map +1 -0
- package/dist/{chunk-XYXSXPUK.js → chunk-EXUD6RNJ.js} +50 -10
- package/dist/chunk-EXUD6RNJ.js.map +1 -0
- package/dist/{chunk-VKB2CO4Z.js → chunk-GLK6VM3F.js} +244 -249
- package/dist/chunk-GLK6VM3F.js.map +1 -0
- package/dist/{chunk-HW3OVDUF.js → chunk-J36DSWQK.js} +1 -1
- package/dist/{chunk-HW3OVDUF.js.map → chunk-J36DSWQK.js.map} +1 -1
- package/dist/{chunk-XNYQOL3Z.js → chunk-JBKQ3SAO.js} +9 -18
- package/dist/chunk-JBKQ3SAO.js.map +1 -0
- package/dist/{chunk-ROXMHMY2.js → chunk-KNC55RTG.js} +13 -3
- package/dist/{chunk-ROXMHMY2.js.map → chunk-KNC55RTG.js.map} +1 -1
- package/dist/{chunk-QWWZ5CAQ.js → chunk-LXQLPRQ2.js} +2 -2
- package/dist/{chunk-ULHIJK66.js → chunk-T33XF5ZC.js} +255 -140
- package/dist/chunk-T33XF5ZC.js.map +1 -0
- package/dist/{chunk-VRGWKHDB.js → chunk-XM25TVIE.js} +100 -33
- package/dist/chunk-XM25TVIE.js.map +1 -0
- package/dist/components.d.ts +4 -4
- package/dist/components.js +9 -9
- package/dist/hooks.d.ts +6 -6
- package/dist/hooks.js +20 -25
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.js +18 -21
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +3 -3
- package/dist/providers.js +2 -2
- package/dist/rbac/index.d.ts +2 -20
- package/dist/rbac/index.js +7 -9
- package/dist/{usePublicRouteParams-TZe0gy-4.d.ts → usePublicRouteParams-BJAlWfuJ.d.ts} +3 -3
- package/dist/{useToast-C8gR5ir4.d.ts → useToast-AyaT-x7p.d.ts} +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +3 -3
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/Logger.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +2 -2
- package/docs/api/classes/RBACAuditManager.md +2 -2
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +2 -2
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +10 -10
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/enums/LogLevel.md +1 -1
- package/docs/api/enums/RBACErrorCode.md +1 -1
- package/docs/api/enums/RPCFunction.md +1 -1
- package/docs/api/interfaces/AddressFieldProps.md +1 -1
- package/docs/api/interfaces/AddressFieldRef.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/AutocompleteOptions.md +1 -1
- package/docs/api/interfaces/AvatarProps.md +1 -1
- package/docs/api/interfaces/BadgeProps.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CalendarProps.md +1 -1
- 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 +1 -1
- 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 +24 -11
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- 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 +2 -2
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- 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 +1 -1
- 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 +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +2 -2
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/ParsedAddress.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +4 -4
- package/docs/api/interfaces/ProgressProps.md +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
- package/docs/api/interfaces/RBACRoleRevokeParams.md +2 -2
- package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
- package/docs/api/interfaces/RBACRoleValidateParams.md +2 -2
- package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
- package/docs/api/interfaces/RBACRolesListParams.md +1 -1
- package/docs/api/interfaces/RBACRolesListResult.md +2 -2
- 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 +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RoleManagementResult.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +2 -2
- package/docs/api/interfaces/RouteConfig.md +2 -2
- package/docs/api/interfaces/RuntimeComplianceResult.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
- package/docs/api/interfaces/SetupIssue.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- 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 +60 -38
- 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 +2 -2
- 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 +2 -2
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +2 -2
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +194 -209
- package/docs/getting-started/cursor-rules.md +262 -0
- package/docs/getting-started/installation-guide.md +6 -1
- package/docs/getting-started/quick-start.md +6 -1
- package/docs/migration/MIGRATION_GUIDE.md +4 -4
- package/docs/migration/REACT_19_MIGRATION.md +227 -0
- package/docs/migration/database-changes-december-2025.md +2 -1
- package/docs/rbac/event-based-apps.md +124 -6
- package/docs/standards/README.md +39 -0
- package/docs/troubleshooting/migration.md +4 -4
- package/examples/PublicPages/PublicEventPage.tsx +1 -1
- package/package.json +11 -6
- package/scripts/audit-consuming-app.cjs +961 -0
- package/scripts/check-pace-core-compliance.cjs +315 -61
- package/scripts/install-cursor-rules.cjs +236 -0
- package/src/__tests__/helpers/test-providers.tsx +1 -1
- package/src/__tests__/helpers/test-utils.tsx +1 -1
- package/src/__tests__/rls-policies.test.ts +3 -1
- package/src/components/Badge/Badge.tsx +2 -4
- package/src/components/Button/Button.tsx +5 -4
- package/src/components/Calendar/Calendar.tsx +1 -1
- package/src/components/DataTable/DataTable.test.tsx +57 -93
- package/src/components/DataTable/DataTable.tsx +2 -2
- package/src/components/DataTable/__tests__/DataTable.default-state.test.tsx +172 -45
- package/src/components/DataTable/__tests__/DataTable.grouping-aggregation.test.tsx +121 -28
- package/src/components/DataTable/__tests__/DataTableCore.test-setup.ts +9 -8
- package/src/components/DataTable/__tests__/DataTableCore.test.tsx +20 -52
- package/src/components/DataTable/__tests__/a11y.basic.test.tsx +170 -34
- package/src/components/DataTable/__tests__/keyboard.test.tsx +75 -12
- package/src/components/DataTable/__tests__/pagination.modes.test.tsx +88 -16
- package/src/components/DataTable/__tests__/ssr.strict-mode.test.tsx +12 -12
- package/src/components/DataTable/components/AccessDeniedPage.tsx +1 -1
- package/src/components/DataTable/components/BulkOperationsDropdown.tsx +1 -1
- package/src/components/DataTable/components/DataTableCore.tsx +4 -7
- package/src/components/DataTable/components/DataTableModals.tsx +1 -1
- package/src/components/DataTable/components/EditableRow.tsx +1 -1
- package/src/components/DataTable/components/UnifiedTableBody.tsx +86 -17
- package/src/components/DataTable/components/__tests__/DataTableModals.test.tsx +23 -23
- package/src/components/DataTable/components/__tests__/EditableRow.test.tsx +11 -11
- package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +36 -36
- package/src/components/DataTable/components/__tests__/GroupHeader.test.tsx +27 -27
- package/src/components/DataTable/components/__tests__/ImportModal.test.tsx +39 -39
- package/src/components/DataTable/components/__tests__/UnifiedTableBody.test.tsx +33 -33
- package/src/components/DataTable/components/__tests__/ViewRowModal.test.tsx +29 -29
- package/src/components/DataTable/hooks/useColumnReordering.ts +2 -2
- package/src/components/DataTable/hooks/useDataTablePermissions.ts +75 -10
- package/src/components/DataTable/hooks/useKeyboardNavigation.ts +2 -2
- package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +8 -14
- package/src/components/Dialog/Dialog.tsx +6 -5
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +1 -1
- package/src/components/EventSelector/EventSelector.tsx +1 -1
- package/src/components/FileDisplay/FileDisplay.test.tsx +4 -3
- package/src/components/FileDisplay/FileDisplay.tsx +16 -4
- package/src/components/Footer/Footer.tsx +1 -1
- package/src/components/Form/Form.test.tsx +36 -15
- package/src/components/Form/Form.tsx +30 -26
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/InactivityWarningModal/InactivityWarningModal.test.tsx +40 -40
- package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +1 -1
- package/src/components/Input/Input.tsx +28 -30
- package/src/components/Label/Label.tsx +1 -1
- package/src/components/LoadingSpinner/LoadingSpinner.tsx +1 -1
- package/src/components/LoginForm/LoginForm.test.tsx +42 -42
- package/src/components/LoginForm/LoginForm.tsx +8 -8
- package/src/components/NavigationMenu/NavigationMenu.test.tsx +6 -4
- package/src/components/NavigationMenu/NavigationMenu.tsx +2 -11
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +0 -1
- package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +1 -1
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +75 -52
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +98 -69
- package/src/components/PaceAppLayout/README.md +1 -1
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +1 -8
- package/src/components/PasswordChange/PasswordChangeForm.test.tsx +33 -33
- package/src/components/PasswordChange/PasswordChangeForm.tsx +1 -1
- package/src/components/Progress/Progress.tsx +1 -1
- package/src/components/ProtectedRoute/ProtectedRoute.test.tsx +5 -9
- package/src/components/ProtectedRoute/ProtectedRoute.tsx +0 -1
- package/src/components/PublicLayout/PublicPageLayout.tsx +1 -1
- package/src/components/PublicLayout/PublicPageProvider.tsx +0 -1
- package/src/components/Select/Select.tsx +33 -22
- package/src/components/SessionRestorationLoader/SessionRestorationLoader.tsx +1 -1
- package/src/components/Table/Table.tsx +1 -1
- package/src/components/Textarea/Textarea.tsx +27 -29
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/Tooltip/Tooltip.tsx +1 -1
- package/src/components/UserMenu/UserMenu.tsx +1 -1
- package/src/hooks/__tests__/hooks.integration.test.tsx +80 -55
- package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +14 -7
- package/src/hooks/__tests__/useStorage.unit.test.ts +36 -36
- package/src/hooks/public/usePublicEvent.ts +1 -1
- package/src/hooks/public/usePublicEventLogo.ts +1 -1
- package/src/hooks/public/usePublicRouteParams.ts +1 -1
- package/src/hooks/services/useAuthService.ts +21 -3
- package/src/hooks/services/useEventService.ts +21 -3
- package/src/hooks/services/useInactivityService.ts +21 -3
- package/src/hooks/services/useOrganisationService.ts +21 -3
- package/src/hooks/useDataTableState.ts +8 -18
- package/src/hooks/useFileDisplay.ts +10 -17
- package/src/hooks/useFocusManagement.ts +2 -2
- package/src/hooks/useFocusTrap.ts +4 -4
- package/src/hooks/useFormDialog.ts +8 -7
- package/src/hooks/useInactivityTracker.ts +1 -1
- package/src/hooks/usePermissionCache.ts +1 -1
- package/src/hooks/useSecureDataAccess.test.ts +16 -9
- package/src/hooks/useSecureDataAccess.ts +22 -6
- package/src/hooks/useToast.ts +2 -2
- package/src/providers/__tests__/OrganisationProvider.test.tsx +57 -13
- package/src/providers/__tests__/ProviderLifecycle.test.tsx +21 -6
- package/src/providers/__tests__/UnifiedAuthProvider.test.tsx +10 -10
- package/src/providers/services/EventServiceProvider.tsx +0 -8
- package/src/providers/services/UnifiedAuthProvider.tsx +196 -46
- package/src/providers/services/__tests__/AuthServiceProvider.integration.test.tsx +13 -3
- package/src/rbac/__tests__/adapters.comprehensive.test.tsx +34 -40
- package/src/rbac/__tests__/isSuperAdmin.real.test.ts +82 -0
- package/src/rbac/adapters.tsx +3 -22
- package/src/rbac/api.test.ts +2 -2
- package/src/rbac/api.ts +7 -1
- package/src/rbac/components/EnhancedNavigationMenu.tsx +3 -16
- package/src/rbac/components/NavigationGuard.tsx +2 -11
- package/src/rbac/components/NavigationProvider.tsx +1 -2
- package/src/rbac/components/PagePermissionGuard.tsx +1 -1
- package/src/rbac/components/PagePermissionProvider.tsx +1 -1
- package/src/rbac/components/PermissionEnforcer.tsx +46 -13
- package/src/rbac/components/RoleBasedRouter.tsx +1 -1
- package/src/rbac/components/SecureDataProvider.tsx +1 -2
- package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +7 -43
- package/src/rbac/components/__tests__/NavigationGuard.test.tsx +4 -11
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +3 -3
- package/src/rbac/components/__tests__/SecureDataProvider.fixed.test.tsx +1 -1
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +1 -1
- package/src/rbac/engine.ts +14 -2
- package/src/rbac/hooks/index.ts +0 -3
- package/src/rbac/hooks/usePermissions.ts +51 -11
- package/src/rbac/hooks/useRBAC.ts +3 -13
- package/src/rbac/hooks/useResolvedScope.test.ts +75 -54
- package/src/rbac/hooks/useResolvedScope.ts +58 -33
- package/src/rbac/hooks/useSecureSupabase.ts +4 -9
- package/src/rbac/secureClient.ts +43 -0
- package/src/services/EventService.ts +4 -57
- package/src/services/InactivityService.ts +127 -34
- package/src/services/OrganisationService.ts +68 -10
- package/src/utils/security/secureDataAccess.test.ts +31 -20
- package/src/utils/security/secureDataAccess.ts +4 -3
- package/dist/chunk-6C4YBBJM.js.map +0 -1
- package/dist/chunk-6LTQQAT6.js.map +0 -1
- package/dist/chunk-6TQDD426.js.map +0 -1
- package/dist/chunk-LOMZXPSN.js.map +0 -1
- package/dist/chunk-OETXORNB.js.map +0 -1
- package/dist/chunk-ULHIJK66.js.map +0 -1
- package/dist/chunk-VKB2CO4Z.js.map +0 -1
- package/dist/chunk-VRGWKHDB.js.map +0 -1
- package/dist/chunk-XNYQOL3Z.js.map +0 -1
- package/dist/chunk-XYXSXPUK.js.map +0 -1
- package/scripts/check-pace-core-compliance.js +0 -512
- package/src/rbac/hooks/useSuperAdminBypass.ts +0 -126
- package/src/utils/context/superAdminOverride.ts +0 -58
- /package/dist/{DataTable-WKRZD47S.js.map → DataTable-DQ7RSOHE.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-FTSG5XH7.js.map → UnifiedAuthProvider-ATAP5UTR.js.map} +0 -0
- /package/dist/{api-IHKALJZD.js.map → api-N774RPUA.js.map} +0 -0
- /package/dist/{chunk-QWWZ5CAQ.js.map → chunk-LXQLPRQ2.js.map} +0 -0
- /package/examples/{rbac → RBAC}/CompleteRBACExample.tsx +0 -0
- /package/examples/{rbac → RBAC}/EventBasedApp.tsx +0 -0
- /package/examples/{rbac → RBAC}/PermissionExample.tsx +0 -0
- /package/examples/{rbac → RBAC}/index.ts +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { Component, ReactNode } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
import { P as ParsedAddress, A as AutocompleteOptions } from './types-CEpcvwwF.js';
|
|
4
5
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
6
|
import { F as FileCategory, e as FileUploadResult, U as UploadProgress, c as FileUploadOptions, a as FileReference } from './file-reference-BavO2eQj.js';
|
|
6
7
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
7
8
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
8
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
10
10
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
11
11
|
import { DayPickerProps, DateRange } from 'react-day-picker';
|
|
@@ -128,56 +128,6 @@ declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttribut
|
|
|
128
128
|
declare const CardActions: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLElement> & React$1.RefAttributes<HTMLElement>>;
|
|
129
129
|
type CardActionsProps = React$1.HTMLAttributes<HTMLElement>;
|
|
130
130
|
|
|
131
|
-
/**
|
|
132
|
-
* @file Input Component Suite
|
|
133
|
-
* @package @jmruthers/pace-core
|
|
134
|
-
* @module Input
|
|
135
|
-
* @since 0.1.0
|
|
136
|
-
*
|
|
137
|
-
* A comprehensive input component suite including Input and InputGroup.
|
|
138
|
-
* Provides flexible, accessible input components with consistent styling and behavior.
|
|
139
|
-
*
|
|
140
|
-
* Features:
|
|
141
|
-
* - Multiple input variants (default, destructive)
|
|
142
|
-
* - Multiple input sizes (sm, md, lg)
|
|
143
|
-
* - Error state styling
|
|
144
|
-
* - Input grouping with consistent spacing
|
|
145
|
-
* - Horizontal and vertical orientation support
|
|
146
|
-
* - Forwarded ref support
|
|
147
|
-
* - Composition support
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```tsx
|
|
151
|
-
* // Basic input
|
|
152
|
-
* <Input placeholder="Enter text" />
|
|
153
|
-
*
|
|
154
|
-
* // Input with variants and sizes
|
|
155
|
-
* <Input
|
|
156
|
-
* variant="destructive"
|
|
157
|
-
* size="lg"
|
|
158
|
-
* placeholder="Error input"
|
|
159
|
-
* />
|
|
160
|
-
*
|
|
161
|
-
* // Input group
|
|
162
|
-
* <InputGroup orientation="horizontal" spacing="md">
|
|
163
|
-
* <Input placeholder="First name" />
|
|
164
|
-
* <Input placeholder="Last name" />
|
|
165
|
-
* </InputGroup>
|
|
166
|
-
*
|
|
167
|
-
* // Vertical input group
|
|
168
|
-
* <InputGroup orientation="vertical" spacing="lg">
|
|
169
|
-
* <Input placeholder="Email" type="email" />
|
|
170
|
-
* <Input placeholder="Password" type="password" />
|
|
171
|
-
* </InputGroup>
|
|
172
|
-
* ```
|
|
173
|
-
*
|
|
174
|
-
* @accessibility
|
|
175
|
-
* - Proper ARIA attributes and roles
|
|
176
|
-
* - Keyboard navigation support
|
|
177
|
-
* - Screen reader friendly
|
|
178
|
-
* - Focus management
|
|
179
|
-
*/
|
|
180
|
-
|
|
181
131
|
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
182
132
|
/**
|
|
183
133
|
* Input variant style
|
|
@@ -220,7 +170,12 @@ interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>,
|
|
|
220
170
|
* />
|
|
221
171
|
* ```
|
|
222
172
|
*/
|
|
223
|
-
declare
|
|
173
|
+
declare function Input({ className, variant, size, error, type, ref, ...props }: InputProps & {
|
|
174
|
+
ref?: React$1.Ref<HTMLInputElement>;
|
|
175
|
+
}): react_jsx_runtime.JSX.Element;
|
|
176
|
+
declare namespace Input {
|
|
177
|
+
var displayName: string;
|
|
178
|
+
}
|
|
224
179
|
|
|
225
180
|
/**
|
|
226
181
|
* @file AddressField Component Types
|
|
@@ -400,7 +355,7 @@ declare const AddressField: React$1.ForwardRefExoticComponent<AddressFieldProps
|
|
|
400
355
|
*
|
|
401
356
|
* @dependencies
|
|
402
357
|
* - @radix-ui/react-label - Core label functionality
|
|
403
|
-
* - React
|
|
358
|
+
* - React 19+ - Hooks and refs
|
|
404
359
|
* - Tailwind CSS - Styling
|
|
405
360
|
*/
|
|
406
361
|
|
|
@@ -440,48 +395,6 @@ interface LabelProps extends React$1.ComponentPropsWithoutRef<typeof LabelPrimit
|
|
|
440
395
|
*/
|
|
441
396
|
declare const Label: React$1.ForwardRefExoticComponent<LabelProps & React$1.RefAttributes<HTMLLabelElement>>;
|
|
442
397
|
|
|
443
|
-
/**
|
|
444
|
-
* @file Textarea Component
|
|
445
|
-
* @package @jmruthers/pace-core
|
|
446
|
-
* @module Textarea
|
|
447
|
-
* @since 0.5.141
|
|
448
|
-
*
|
|
449
|
-
* A multi-line text input component with consistent styling matching the Input component.
|
|
450
|
-
* Provides flexible, accessible textarea component with consistent styling and behavior.
|
|
451
|
-
*
|
|
452
|
-
* Features:
|
|
453
|
-
* - Multiple textarea variants (default, destructive)
|
|
454
|
-
* - Multiple textarea sizes (sm, md, lg)
|
|
455
|
-
* - Error state styling
|
|
456
|
-
* - Forwarded ref support
|
|
457
|
-
* - Consistent styling with Input component
|
|
458
|
-
*
|
|
459
|
-
* @example
|
|
460
|
-
* ```tsx
|
|
461
|
-
* // Basic textarea
|
|
462
|
-
* <Textarea placeholder="Enter your message..." />
|
|
463
|
-
*
|
|
464
|
-
* // Textarea with variants and sizes
|
|
465
|
-
* <Textarea
|
|
466
|
-
* variant="destructive"
|
|
467
|
-
* size="lg"
|
|
468
|
-
* placeholder="Error textarea"
|
|
469
|
-
* />
|
|
470
|
-
*
|
|
471
|
-
* // Textarea with error state
|
|
472
|
-
* <Textarea
|
|
473
|
-
* placeholder="Comments"
|
|
474
|
-
* error={true}
|
|
475
|
-
* />
|
|
476
|
-
* ```
|
|
477
|
-
*
|
|
478
|
-
* @accessibility
|
|
479
|
-
* - Proper ARIA attributes and roles
|
|
480
|
-
* - Keyboard navigation support
|
|
481
|
-
* - Screen reader friendly
|
|
482
|
-
* - Focus management
|
|
483
|
-
*/
|
|
484
|
-
|
|
485
398
|
interface TextareaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
486
399
|
/**
|
|
487
400
|
* Textarea variant style
|
|
@@ -524,7 +437,12 @@ interface TextareaProps extends React$1.TextareaHTMLAttributes<HTMLTextAreaEleme
|
|
|
524
437
|
* />
|
|
525
438
|
* ```
|
|
526
439
|
*/
|
|
527
|
-
declare
|
|
440
|
+
declare function Textarea({ className, variant, size, error, ref, ...props }: TextareaProps & {
|
|
441
|
+
ref?: React$1.Ref<HTMLTextAreaElement>;
|
|
442
|
+
}): react_jsx_runtime.JSX.Element;
|
|
443
|
+
declare namespace Textarea {
|
|
444
|
+
var displayName: string;
|
|
445
|
+
}
|
|
528
446
|
|
|
529
447
|
/**
|
|
530
448
|
* @file Alert Component Suite
|
|
@@ -652,50 +570,6 @@ interface AvatarProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
652
570
|
*/
|
|
653
571
|
declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
654
572
|
|
|
655
|
-
/**
|
|
656
|
-
* @file Badge Component
|
|
657
|
-
* @package @jmruthers/pace-core
|
|
658
|
-
* @module Components
|
|
659
|
-
* @since 0.1.0
|
|
660
|
-
*
|
|
661
|
-
* A small, non-interactive visual label component for displaying concise information
|
|
662
|
-
* such as status indicators, tags, or labels. Acts as a visual alternative to buttons
|
|
663
|
-
* for non-interactive content.
|
|
664
|
-
*
|
|
665
|
-
* Features:
|
|
666
|
-
* - 27 combined variants (3 styles × 3 colors × 3 shades)
|
|
667
|
-
* - Non-interactive by default (renders as <span>)
|
|
668
|
-
* - Supports all pace-core color palettes (main, sec, acc)
|
|
669
|
-
* - Customizable styling via className prop
|
|
670
|
-
* - Accessible and screen reader friendly
|
|
671
|
-
*
|
|
672
|
-
* @example
|
|
673
|
-
* ```tsx
|
|
674
|
-
* // Basic badge with default variant
|
|
675
|
-
* <Badge>New</Badge>
|
|
676
|
-
*
|
|
677
|
-
* // Badge with specific variant
|
|
678
|
-
* <Badge variant="solid-main-normal">Active</Badge>
|
|
679
|
-
*
|
|
680
|
-
* // Outline variant
|
|
681
|
-
* <Badge variant="outline-sec-muted">Pending</Badge>
|
|
682
|
-
*
|
|
683
|
-
* // Soft variant with accent color
|
|
684
|
-
* <Badge variant="soft-acc-strong">Featured</Badge>
|
|
685
|
-
*
|
|
686
|
-
* // Custom styling
|
|
687
|
-
* <Badge variant="solid-main-normal" className="px-4">
|
|
688
|
-
* Custom Badge
|
|
689
|
-
* </Badge>
|
|
690
|
-
* ```
|
|
691
|
-
*
|
|
692
|
-
* @accessibility
|
|
693
|
-
* - Renders as semantic <span> element
|
|
694
|
-
* - No focus styles (non-interactive by default)
|
|
695
|
-
* - Screen reader friendly through semantic HTML
|
|
696
|
-
* - Can be wrapped in interactive elements if needed
|
|
697
|
-
*/
|
|
698
|
-
|
|
699
573
|
type BadgeVariant = 'solid-main-muted' | 'solid-main-normal' | 'solid-main-strong' | 'solid-sec-muted' | 'solid-sec-normal' | 'solid-sec-strong' | 'solid-acc-muted' | 'solid-acc-normal' | 'solid-acc-strong' | 'outline-main-muted' | 'outline-main-normal' | 'outline-main-strong' | 'outline-sec-muted' | 'outline-sec-normal' | 'outline-sec-strong' | 'outline-acc-muted' | 'outline-acc-normal' | 'outline-acc-strong' | 'soft-main-muted' | 'soft-main-normal' | 'soft-main-strong' | 'soft-sec-muted' | 'soft-sec-normal' | 'soft-sec-strong' | 'soft-acc-muted' | 'soft-acc-normal' | 'soft-acc-strong';
|
|
700
574
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
701
575
|
/** Visual variant of the badge (style-color-shade) */
|
|
@@ -721,7 +595,12 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
|
|
|
721
595
|
* <Badge variant="soft-acc-strong">Featured</Badge>
|
|
722
596
|
* ```
|
|
723
597
|
*/
|
|
724
|
-
declare
|
|
598
|
+
declare function Badge({ className, variant, ref, ...props }: BadgeProps & {
|
|
599
|
+
ref?: React$1.Ref<HTMLSpanElement>;
|
|
600
|
+
}): react_jsx_runtime.JSX.Element;
|
|
601
|
+
declare namespace Badge {
|
|
602
|
+
var displayName: string;
|
|
603
|
+
}
|
|
725
604
|
|
|
726
605
|
/**
|
|
727
606
|
* @file Checkbox Component
|
|
@@ -923,7 +802,7 @@ declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.Re
|
|
|
923
802
|
* - Minimal DOM structure (native HTML element)
|
|
924
803
|
*
|
|
925
804
|
* @dependencies
|
|
926
|
-
* - React
|
|
805
|
+
* - React 19+ - Hooks and refs
|
|
927
806
|
* - Tailwind CSS - Styling
|
|
928
807
|
*/
|
|
929
808
|
|
|
@@ -1673,7 +1552,7 @@ declare function Toaster(): react_jsx_runtime.JSX.Element;
|
|
|
1673
1552
|
*
|
|
1674
1553
|
* @dependencies
|
|
1675
1554
|
* - @radix-ui/react-tooltip - Core tooltip functionality
|
|
1676
|
-
* - React
|
|
1555
|
+
* - React 19+ - Hooks and refs
|
|
1677
1556
|
* - Tailwind CSS - Styling and animations
|
|
1678
1557
|
*/
|
|
1679
1558
|
|
|
@@ -1829,7 +1708,7 @@ interface FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName e
|
|
|
1829
1708
|
field: ControllerRenderProps<TFieldValues, TName>;
|
|
1830
1709
|
fieldState: ControllerFieldState;
|
|
1831
1710
|
formState: UseFormStateReturn<TFieldValues>;
|
|
1832
|
-
}) => React__default.ReactElement
|
|
1711
|
+
}) => React__default.ReactElement<any>;
|
|
1833
1712
|
/**
|
|
1834
1713
|
* Test ID
|
|
1835
1714
|
*/
|
|
@@ -1999,7 +1878,7 @@ declare function FormField<TFieldValues extends FieldValues = FieldValues, TName
|
|
|
1999
1878
|
* - Minimal re-renders
|
|
2000
1879
|
*
|
|
2001
1880
|
* @dependencies
|
|
2002
|
-
* - React
|
|
1881
|
+
* - React 19+ - Hooks and memo
|
|
2003
1882
|
* - Button component
|
|
2004
1883
|
* - Input component
|
|
2005
1884
|
* - Label component
|
|
@@ -2239,7 +2118,7 @@ declare const LoginForm: React__default.NamedExoticComponent<LoginFormProps>;
|
|
|
2239
2118
|
* - Responsive design considerations
|
|
2240
2119
|
*
|
|
2241
2120
|
* @dependencies
|
|
2242
|
-
* - React
|
|
2121
|
+
* - React 19+ - Component framework and hooks
|
|
2243
2122
|
* - Lucide React - Icon components
|
|
2244
2123
|
* - Radix UI - Dropdown menu primitives
|
|
2245
2124
|
* - React Router (optional) - For navigation handling
|
|
@@ -2581,7 +2460,7 @@ declare const NavigationMenu: React$1.ForwardRefExoticComponent<NavigationMenuPr
|
|
|
2581
2460
|
* - Proper error handling
|
|
2582
2461
|
*
|
|
2583
2462
|
* @dependencies
|
|
2584
|
-
* - React
|
|
2463
|
+
* - React 19+ - Hooks and state
|
|
2585
2464
|
* - Button component
|
|
2586
2465
|
* - Input component
|
|
2587
2466
|
* - Label component
|
|
@@ -2828,7 +2707,7 @@ declare function Header({ logoUrl, logoAlt, logo, navItems, user, onSignOut, onC
|
|
|
2828
2707
|
* - Clear link identification
|
|
2829
2708
|
*
|
|
2830
2709
|
* @dependencies
|
|
2831
|
-
* - React
|
|
2710
|
+
* - React 19+ - Component framework
|
|
2832
2711
|
* - Tailwind CSS - Styling
|
|
2833
2712
|
*/
|
|
2834
2713
|
|
|
@@ -2960,7 +2839,7 @@ declare const Footer: React__default.NamedExoticComponent<FooterProps>;
|
|
|
2960
2839
|
* - Optimized avatar rendering
|
|
2961
2840
|
*
|
|
2962
2841
|
* @dependencies
|
|
2963
|
-
* - React
|
|
2842
|
+
* - React 19+ - Hooks and memo
|
|
2964
2843
|
* - @supabase/supabase-js - User type
|
|
2965
2844
|
* - lucide-react - Icons
|
|
2966
2845
|
* - DropdownMenu components
|
|
@@ -3314,7 +3193,7 @@ declare function PaceAppLayout({ appName, navItems, showEventSelector, showOrgSe
|
|
|
3314
3193
|
* - Automatic redirect prevention loops
|
|
3315
3194
|
*
|
|
3316
3195
|
* @dependencies
|
|
3317
|
-
* - React
|
|
3196
|
+
* - React 19+ - Hooks and effects
|
|
3318
3197
|
* - React Router v6 - Navigation
|
|
3319
3198
|
* - UnifiedAuthProvider - Authentication
|
|
3320
3199
|
* - LoginForm component
|
|
@@ -3405,7 +3284,7 @@ interface ProtectedRouteProps {
|
|
|
3405
3284
|
* @param props - Configuration for route protection
|
|
3406
3285
|
* @returns React element with route protection logic
|
|
3407
3286
|
*/
|
|
3408
|
-
declare function ProtectedRoute({ requireEvent, allowSuperAdminBypass, noEventsFallback, loadingFallback, loginPath }: ProtectedRouteProps): string | number | true | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element;
|
|
3287
|
+
declare function ProtectedRoute({ requireEvent, allowSuperAdminBypass, noEventsFallback, loadingFallback, loginPath }: ProtectedRouteProps): string | number | bigint | true | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element;
|
|
3409
3288
|
|
|
3410
3289
|
/**
|
|
3411
3290
|
* State interface for the ErrorBoundary component
|
|
@@ -3468,7 +3347,7 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryS
|
|
|
3468
3347
|
private reportError;
|
|
3469
3348
|
private handleRetry;
|
|
3470
3349
|
componentWillUnmount(): void;
|
|
3471
|
-
render(): string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
3350
|
+
render(): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
3472
3351
|
}
|
|
3473
3352
|
|
|
3474
3353
|
/**
|
|
@@ -3525,7 +3404,7 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryS
|
|
|
3525
3404
|
* - Efficient rendering
|
|
3526
3405
|
*
|
|
3527
3406
|
* @dependencies
|
|
3528
|
-
* - React
|
|
3407
|
+
* - React 19+ - Component framework
|
|
3529
3408
|
* - Tailwind CSS - Styling and animations
|
|
3530
3409
|
*/
|
|
3531
3410
|
|
|
@@ -3584,7 +3463,7 @@ declare const LoadingSpinner: React__default.FC<LoadingSpinnerProps>;
|
|
|
3584
3463
|
* - High contrast support
|
|
3585
3464
|
*
|
|
3586
3465
|
* @dependencies
|
|
3587
|
-
* - React
|
|
3466
|
+
* - React 19+ - Component framework
|
|
3588
3467
|
* - LoadingSpinner - Spinner component
|
|
3589
3468
|
* - Tailwind CSS - Styling
|
|
3590
3469
|
*/
|
|
@@ -3705,6 +3584,8 @@ interface FileDisplayProps {
|
|
|
3705
3584
|
displayOnly?: boolean;
|
|
3706
3585
|
showDelete?: boolean;
|
|
3707
3586
|
className?: string;
|
|
3587
|
+
/** Classes to apply to the first child element of <figure> (img, p, or other elements) */
|
|
3588
|
+
imgClassName?: string;
|
|
3708
3589
|
children?: React__default.ReactNode;
|
|
3709
3590
|
/** Custom loading component to render during data fetching */
|
|
3710
3591
|
loadingComponent?: React__default.ComponentType;
|
|
@@ -3750,7 +3631,7 @@ interface FileDisplayProps {
|
|
|
3750
3631
|
* @param props.category - Optional category filter. When specified, only displays files matching this category and uses single file display variant.
|
|
3751
3632
|
* @returns React element with file display
|
|
3752
3633
|
*/
|
|
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;
|
|
3634
|
+
declare function FileDisplay({ table_name, record_id, organisation_id, category, displayOnly, showDelete, className, imgClassName, children, loadingComponent, errorComponent, showFallback, generateFallbackText, fallbackText, fallbackSourceText, fallbackSize, enableChildren, showMetadata }: FileDisplayProps): react_jsx_runtime.JSX.Element;
|
|
3754
3635
|
|
|
3755
3636
|
declare function useFileReference(supabase: SupabaseClient): {
|
|
3756
3637
|
isLoading: boolean;
|
|
@@ -3934,7 +3815,7 @@ type UseFileReferenceForRecordReturn = {
|
|
|
3934
3815
|
* - Caption for table description
|
|
3935
3816
|
*
|
|
3936
3817
|
* @dependencies
|
|
3937
|
-
* - React
|
|
3818
|
+
* - React 19+ - Hooks and refs
|
|
3938
3819
|
* - Tailwind CSS - Styling
|
|
3939
3820
|
*/
|
|
3940
3821
|
|
|
@@ -44,6 +44,7 @@ interface UnifiedAuthContextType {
|
|
|
44
44
|
error: AuthError | null;
|
|
45
45
|
}>;
|
|
46
46
|
selectedOrganisation: Organisation | null;
|
|
47
|
+
selectedOrganisationId: string | null;
|
|
47
48
|
organisations: Organisation[];
|
|
48
49
|
userMemberships: OrganisationMembership[];
|
|
49
50
|
organisationLoading: boolean;
|
|
@@ -59,6 +60,7 @@ interface UnifiedAuthContextType {
|
|
|
59
60
|
getPrimaryOrganisation: () => Organisation | null;
|
|
60
61
|
events: Event[];
|
|
61
62
|
selectedEvent: Event | null;
|
|
63
|
+
selectedEventId: string | null;
|
|
62
64
|
eventLoading: boolean;
|
|
63
65
|
eventError: Error | null;
|
|
64
66
|
setSelectedEvent: (event: Event | null) => void;
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
UnifiedAuthContext,
|
|
3
3
|
UnifiedAuthProvider,
|
|
4
4
|
useUnifiedAuth
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-BYFSK72L.js";
|
|
6
|
+
import "./chunk-KNC55RTG.js";
|
|
7
7
|
import "./chunk-63FOKYGO.js";
|
|
8
8
|
import "./chunk-QXHPKYJV.js";
|
|
9
9
|
import "./chunk-VBXEHIUJ.js";
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
UnifiedAuthProvider,
|
|
15
15
|
useUnifiedAuth
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=UnifiedAuthProvider-
|
|
17
|
+
//# sourceMappingURL=UnifiedAuthProvider-ATAP5UTR.js.map
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
isSuperAdmin,
|
|
22
22
|
resolveAppContext,
|
|
23
23
|
setupRBAC
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KNC55RTG.js";
|
|
25
25
|
import "./chunk-63FOKYGO.js";
|
|
26
26
|
import "./chunk-PWLANIRT.js";
|
|
27
27
|
import "./chunk-7D4SUZUM.js";
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
resolveAppContext,
|
|
50
50
|
setupRBAC
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=api-
|
|
52
|
+
//# sourceMappingURL=api-N774RPUA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useToast.ts","../src/components/DataTable/utils/performanceUtils.ts","../src/components/DataTable/utils/errorHandling.ts","../src/hooks/useDataTablePerformance.ts"],"sourcesContent":["\n/**\n * @file Toast hook for managing toast notifications\n * @package @jmruthers/pace-core\n * @module Hooks\n * @since 0.1.0\n *\n * Toast notifications automatically dismiss after 5 seconds by default.\n * The duration is fixed to the pace-core default to ensure consistent behaviour.\n */\n\nimport * as React from \"react\"\n\n/** Maximum number of toasts to show at once */\nconst TOAST_LIMIT = 5\n/** Delay before removing a dismissed toast */\nconst TOAST_REMOVE_DELAY = 1000\n/** Default duration for auto-dismissing toasts (5 seconds) */\nconst DEFAULT_TOAST_DURATION = 5000\n\nexport interface ToastProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n variant?: 'default' | 'destructive' | 'success';\n onClose?: () => void;\n action?: React.ReactElement<any>;\n}\n\n/**\n * Extended toast props with additional properties\n * @interface ToasterToast\n */\ntype ToasterToast = ToastProps & {\n /** Unique identifier for the toast */\n id: string\n /** Duration before automatic dismissal in milliseconds */\n duration?: number\n /** Optional title content */\n title?: React.ReactNode\n /** Optional description content */\n description?: React.ReactNode\n /** Optional action button */\n action?: React.ReactElement<any>\n /** Open state */\n open?: boolean\n /** Open change handler */\n onOpenChange?: (open: boolean) => void\n /** Dismiss function */\n dismiss?: () => void\n}\n\n/**\n * State interface for toast management\n */\ninterface State {\n /** Array of active toasts */\n toasts: ToasterToast[]\n}\n\n/** Map of toast IDs to their removal timeouts */\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>()\n\n/** Current toast state */\nlet memoryState: State = {\n toasts: [],\n}\n\n/** List of state change listeners */\nconst listeners: Array<(state: State) => void> = []\n\n/**\n * Reset the toast state and clear all timeouts\n */\nexport function reset() {\n memoryState = { toasts: [] }\n toastTimeouts.forEach((timeout) => clearTimeout(timeout))\n toastTimeouts.clear()\n}\n\n/**\n * Dispatch a state change\n * @param action - Action to dispatch\n */\nfunction dispatch(action: {\n type: \"ADD_TOAST\" | \"UPDATE_TOAST\" | \"DISMISS_TOAST\" | \"REMOVE_TOAST\"\n toast?: ToasterToast\n toastId?: string\n}) {\n memoryState = reducer(memoryState, action)\n listeners.forEach((listener) => {\n listener(memoryState)\n })\n}\n\n/**\n * Generate a unique ID for a toast\n * @returns Unique ID string\n */\nfunction genId() {\n return Math.random().toString(36).substring(2, 9)\n}\n\n/**\n * Add a toast to the removal queue\n * @param toastId - ID of the toast to remove\n */\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId)\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId,\n })\n }, TOAST_REMOVE_DELAY)\n\n toastTimeouts.set(toastId, timeout)\n}\n\n/**\n * State reducer for toast management\n * @param state - Current state\n * @param action - Action to process\n * @returns New state\n */\nfunction reducer(state: State, action: {\n type: \"ADD_TOAST\" | \"UPDATE_TOAST\" | \"DISMISS_TOAST\" | \"REMOVE_TOAST\"\n toast?: ToasterToast\n toastId?: string\n}): State {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast!, ...state.toasts].slice(0, TOAST_LIMIT),\n }\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast?.id ? { ...t, ...action.toast } : t\n ),\n }\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action\n\n if (toastId) {\n addToRemoveQueue(toastId)\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false,\n }\n : t\n ),\n }\n }\n\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: [],\n }\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId),\n }\n }\n}\n\n/**\n * Toast configuration without ID\n * Duration is fixed to DEFAULT_TOAST_DURATION and cannot be overridden\n */\ntype Toast = Omit<ToasterToast, \"id\" | \"duration\">\n\n/**\n * Creates a new toast notification\n * @param props - Toast configuration. Duration is automatically set to 5 seconds (5000ms) and cannot be customized.\n * @returns Object with toast ID and control methods\n */\nfunction toast(props: Toast) {\n const id = genId()\n\n const update = (props: Partial<Omit<ToasterToast, \"id\" | \"duration\">>) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, duration: DEFAULT_TOAST_DURATION, id },\n })\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n duration: DEFAULT_TOAST_DURATION,\n id,\n open: true,\n dismiss,\n onOpenChange: (open) => {\n if (!open) dismiss()\n },\n },\n })\n\n return {\n id: id,\n dismiss,\n update,\n }\n}\n\n/**\n * Hook for managing toast notifications\n * @returns Object with toast state and control methods\n */\nfunction useToast() {\n const [state, setState] = React.useState<State>(memoryState)\n\n React.useEffect(() => {\n listeners.push(setState)\n return () => {\n const index = listeners.indexOf(setState)\n if (index > -1) {\n listeners.splice(index, 1)\n }\n }\n }, [state])\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n }\n}\n\nexport { useToast, toast }\nexport type { ToasterToast }\n","/**\n * @file Performance Utilities for DataTable\n * @package @jmruthers/pace-core\n * @module Components/DataTable/Utils/Performance\n * @since 0.3.0\n */\n\nimport type { \n DataRecord, \n PaginationMode, \n ChunkingConfig, \n SearchIndexConfig\n} from '../types';\n\n// ============================================================================\n// PAGINATION MODE DETECTION\n// ============================================================================\n\n/**\n * Determines the optimal pagination mode based on dataset size\n * \n * IMPORTANT: This function NEVER returns 'server' mode - it only returns 'client' or 'hybrid'.\n * Server mode should ONLY be used when serverSide config is explicitly provided.\n * Returning 'server' without serverSide config breaks pagination because TanStack Table\n * expects pre-paginated data but receives all client-side data.\n * \n * For large datasets (>10k rows), returns 'hybrid' which still uses client-side pagination\n * but with optimizations. If true server-side pagination is needed, serverSide config must be provided.\n */\nexport function determinePaginationMode(\n dataLength: number,\n serverSideThreshold: number = 10000\n): 'client' | 'hybrid' {\n if (dataLength <= 1000) return 'client';\n // Even for very large datasets, use 'hybrid' mode (client-side pagination with optimizations)\n // unless serverSide config is explicitly provided (handled in useDataTablePerformance)\n return 'hybrid';\n}\n\n/**\n * Gets optimal page size options based on pagination mode and dataset size\n */\nexport function getOptimalPageSizeOptions(\n mode: PaginationMode,\n dataLength: number\n): number[] {\n switch (mode) {\n case 'client':\n return dataLength <= 100 ? [10, 25, 50] : [10, 25, 50, 100];\n case 'hybrid':\n return [50, 100, 250, 500];\n case 'server':\n return [25, 50, 100, 250];\n default:\n return [10, 25, 50, 100];\n }\n}\n\n// ============================================================================\n// DATA CHUNKING\n// ============================================================================\n\n/**\n * Splits data into chunks for memory management\n */\nexport function chunkData<TData extends DataRecord>(\n data: TData[],\n chunkSize: number\n): TData[][] {\n const chunks: TData[][] = [];\n for (let i = 0; i < data.length; i += chunkSize) {\n chunks.push(data.slice(i, i + chunkSize));\n }\n return chunks;\n}\n\n/**\n * Manages data chunks with LRU cache\n */\nexport class DataChunkManager<TData extends DataRecord> {\n private chunks: Map<number, TData[]> = new Map();\n private accessOrder: number[] = [];\n private maxChunks: number;\n private chunkSize: number;\n\n constructor(config: ChunkingConfig) {\n this.maxChunks = config.maxChunksInMemory;\n this.chunkSize = config.chunkSize;\n }\n\n getChunk(chunkIndex: number, allData: TData[]): TData[] {\n // Check if chunk is already in memory\n if (this.chunks.has(chunkIndex)) {\n this.updateAccessOrder(chunkIndex);\n return this.chunks.get(chunkIndex)!;\n }\n\n // Calculate chunk bounds\n const startIndex = chunkIndex * this.chunkSize;\n const endIndex = Math.min(startIndex + this.chunkSize, allData.length);\n const chunk = allData.slice(startIndex, endIndex);\n\n // Add chunk to memory\n this.addChunk(chunkIndex, chunk);\n return chunk;\n }\n\n private addChunk(chunkIndex: number, chunk: TData[]): void {\n // Remove oldest chunk if at capacity\n if (this.chunks.size >= this.maxChunks && !this.chunks.has(chunkIndex)) {\n const oldestChunk = this.accessOrder.shift();\n if (oldestChunk !== undefined) {\n this.chunks.delete(oldestChunk);\n }\n }\n\n this.chunks.set(chunkIndex, chunk);\n this.updateAccessOrder(chunkIndex);\n }\n\n private updateAccessOrder(chunkIndex: number): void {\n const existingIndex = this.accessOrder.indexOf(chunkIndex);\n if (existingIndex > -1) {\n this.accessOrder.splice(existingIndex, 1);\n }\n this.accessOrder.push(chunkIndex);\n }\n\n clear(): void {\n this.chunks.clear();\n this.accessOrder = [];\n }\n\n getMemoryUsage(): number {\n let totalSize = 0;\n for (const chunk of this.chunks.values()) {\n totalSize += JSON.stringify(chunk).length;\n }\n return totalSize / (1024 * 1024); // Convert to MB\n }\n}\n\n// ============================================================================\n// SEARCH INDEXING\n// ============================================================================\n\n/**\n * Creates a search index for fast text searching\n */\nexport class SearchIndex<TData extends DataRecord> {\n private index: Map<string, Set<number>> = new Map();\n private data: TData[] = [];\n private indexedFields: string[];\n private fuzzySearch: boolean;\n private fuzzyThreshold: number;\n\n constructor(config: SearchIndexConfig) {\n this.indexedFields = config.indexedFields;\n this.fuzzySearch = config.fuzzySearch ?? false;\n this.fuzzyThreshold = config.fuzzyThreshold ?? 0.6;\n }\n\n buildIndex(data: TData[]): void {\n this.data = data;\n this.index.clear();\n\n data.forEach((row, rowIndex) => {\n this.indexedFields.forEach(field => {\n const value = this.getNestedValue(row, field);\n if (value != null) {\n const searchableText = String(value).toLowerCase();\n const words = this.tokenize(searchableText);\n \n words.forEach(word => {\n if (!this.index.has(word)) {\n this.index.set(word, new Set());\n }\n this.index.get(word)!.add(rowIndex);\n });\n }\n });\n });\n }\n\n search(query: string): number[] {\n if (!query.trim()) return [];\n\n const searchTerms = this.tokenize(query.toLowerCase());\n const matchingSets: Set<number>[] = [];\n\n searchTerms.forEach(term => {\n const matches = new Set<number>();\n \n // Exact matches\n if (this.index.has(term)) {\n this.index.get(term)!.forEach(index => matches.add(index));\n }\n\n // Fuzzy matches\n if (this.fuzzySearch) {\n for (const [indexedTerm, indices] of this.index.entries()) {\n if (this.calculateSimilarity(term, indexedTerm) >= this.fuzzyThreshold) {\n indices.forEach(index => matches.add(index));\n }\n }\n }\n\n matchingSets.push(matches);\n });\n\n // Find intersection of all matching sets\n if (matchingSets.length === 0) return [];\n \n let result = matchingSets[0];\n for (let i = 1; i < matchingSets.length; i++) {\n result = new Set([...result].filter(x => matchingSets[i].has(x)));\n }\n\n return Array.from(result);\n }\n\n private getNestedValue(obj: unknown, path: string): unknown {\n return path.split('.').reduce((current: unknown, key: string) => {\n if (current && typeof current === 'object' && key in current) {\n return (current as Record<string, unknown>)[key];\n }\n return undefined;\n }, obj);\n }\n\n private tokenize(text: string): string[] {\n return text\n .replace(/[^\\w\\s]/g, ' ')\n .split(/\\s+/)\n .filter(word => word.length > 0);\n }\n\n private calculateSimilarity(str1: string, str2: string): number {\n const longer = str1.length > str2.length ? str1 : str2;\n const shorter = str1.length > str2.length ? str2 : str1;\n \n if (longer.length === 0) return 1.0;\n \n const editDistance = this.levenshteinDistance(longer, shorter);\n return (longer.length - editDistance) / longer.length;\n }\n\n private levenshteinDistance(str1: string, str2: string): number {\n const matrix = Array(str2.length + 1).fill(null).map(() => \n Array(str1.length + 1).fill(null)\n );\n\n for (let i = 0; i <= str1.length; i++) matrix[0][i] = i;\n for (let j = 0; j <= str2.length; j++) matrix[j][0] = j;\n\n for (let j = 1; j <= str2.length; j++) {\n for (let i = 1; i <= str1.length; i++) {\n const substitutionCost = str1[i - 1] === str2[j - 1] ? 0 : 1;\n matrix[j][i] = Math.min(\n matrix[j][i - 1] + 1, // insertion\n matrix[j - 1][i] + 1, // deletion\n matrix[j - 1][i - 1] + substitutionCost // substitution\n );\n }\n }\n\n return matrix[str2.length][str1.length];\n }\n}\n\n\n// ============================================================================\n// DEBOUNCE UTILITIES\n// ============================================================================\n\n/**\n * Creates a debounced function\n */\nexport function debounce<T extends (...args: unknown[]) => unknown>(\n func: T,\n delay: number\n): (...args: Parameters<T>) => void {\n let timeoutId: NodeJS.Timeout;\n \n return (...args: Parameters<T>) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => func(...args), delay);\n };\n}\n\n/**\n * Creates a throttled function\n */\nexport function throttle<T extends (...args: unknown[]) => unknown>(\n func: T,\n delay: number\n): (...args: Parameters<T>) => void {\n let lastCall = 0;\n \n return (...args: Parameters<T>) => {\n const now = Date.now();\n if (now - lastCall >= delay) {\n lastCall = now;\n func(...args);\n }\n };\n}\n\n// ============================================================================\n// MEMORY MANAGEMENT\n// ============================================================================\n\n/**\n * Intersection Observer for tracking visible rows\n */\nexport class VisibilityTracker {\n private observer: IntersectionObserver | null = null;\n private visibleElements = new Set<Element>();\n private callbacks = new Set<(visibleCount: number) => void>();\n\n constructor() {\n if (typeof IntersectionObserver !== 'undefined') {\n this.observer = new IntersectionObserver(\n (entries) => {\n entries.forEach(entry => {\n if (entry.isIntersecting) {\n this.visibleElements.add(entry.target);\n } else {\n this.visibleElements.delete(entry.target);\n }\n });\n \n this.callbacks.forEach(callback => {\n callback(this.visibleElements.size);\n });\n },\n { threshold: 0.1 }\n );\n }\n }\n\n observe(element: Element): void {\n this.observer?.observe(element);\n }\n\n unobserve(element: Element): void {\n this.observer?.unobserve(element);\n this.visibleElements.delete(element);\n }\n\n onVisibilityChange(callback: (visibleCount: number) => void): () => void {\n this.callbacks.add(callback);\n return () => this.callbacks.delete(callback);\n }\n\n getVisibleCount(): number {\n return this.visibleElements.size;\n }\n\n destroy(): void {\n this.observer?.disconnect();\n this.visibleElements.clear();\n this.callbacks.clear();\n }\n} ","/**\n * @file Error Handling Stubs\n * @package @jmruthers/pace-core\n * @module Components/DataTable/Utils/Stubs\n * \n * Minimal stubs for removed error handling utilities.\n * This file exists only to prevent import errors in useDataTablePerformance.\n */\n\nexport interface FallbackConfig {\n enabled: boolean;\n}\n\nexport const DEFAULT_FALLBACK_CONFIG: FallbackConfig = {\n enabled: false\n};\n\nexport enum DataTableErrorType {\n VIRTUALIZATION = 'virtualization',\n SEARCH_INDEX = 'search_index',\n DATA_CHUNK = 'data_chunk',\n SERVER_FETCH = 'server_fetch',\n MEMORY = 'memory'\n}\n\nexport class DataTableError extends Error {\n constructor(\n message: string,\n public type: DataTableErrorType,\n public recoverable: boolean = true\n ) {\n super(message);\n this.name = 'DataTableError';\n }\n}\n\nexport class ErrorRecoveryManager {\n constructor(private config: FallbackConfig) {}\n \n async handleError(error: DataTableError) {\n return { recovered: false, strategy: null };\n }\n \n clearErrorLog(): void {\n // Stub method\n }\n}\n\nexport class MemoryMonitor {\n constructor(private threshold: number = 100) {}\n \n getCurrentUsage(): number {\n return 0;\n }\n \n checkThreshold(): boolean {\n return true;\n }\n \n stopMonitoring(): void {\n // Stub method\n }\n}\n\nexport class CircuitBreaker {\n constructor() {}\n \n isOpen(): boolean {\n return false;\n }\n \n recordSuccess(): void {}\n \n recordFailure(): void {}\n \n reset(): void {}\n}\n\nexport function safeExecute<T>(fn: () => T, fallback: T): T {\n try {\n return fn();\n } catch {\n return fallback;\n }\n}\n\n","/**\n * @file DataTable Performance Hook\n * @package @jmruthers/pace-core\n * @module Hooks/DataTablePerformance\n * @since 0.3.0\n */\n\nimport { useState, useEffect, useCallback, useMemo, useRef } from 'react';\nimport type { \n DataRecord,\n PaginationMode,\n PerformanceConfig,\n ServerSideConfig,\n ServerSideParams,\n ServerSideResponse,\n ChunkingConfig,\n SearchIndexConfig,\n} from '../components/DataTable/types';\nimport {\n determinePaginationMode,\n getOptimalPageSizeOptions,\n DataChunkManager,\n SearchIndex,\n debounce,\n VisibilityTracker\n} from '../components/DataTable/utils/performanceUtils';\nimport {\n ErrorRecoveryManager,\n DataTableError,\n DataTableErrorType,\n safeExecute,\n MemoryMonitor,\n CircuitBreaker,\n DEFAULT_FALLBACK_CONFIG,\n type FallbackConfig\n} from '../components/DataTable/utils/errorHandling';\nimport { logger } from '../utils/core/logger';\n\nexport interface UseDataTablePerformanceOptions<TData extends DataRecord> {\n data: TData[];\n performance?: PerformanceConfig;\n serverSide?: ServerSideConfig<TData>;\n chunking?: ChunkingConfig;\n searchIndex?: SearchIndexConfig;\n // Enhanced error handling options\n fallbackConfig?: FallbackConfig;\n onError?: (error: DataTableError) => void;\n enableErrorRecovery?: boolean;\n}\n\nexport interface UseDataTablePerformanceReturn<TData extends DataRecord> {\n // Performance state\n paginationMode: PaginationMode;\n isVirtualized: boolean;\n pageSizeOptions: number[];\n \n // Data management\n processedData: TData[];\n totalCount: number;\n isLoading: boolean;\n \n // Search functionality\n searchQuery: string;\n setSearchQuery: (query: string) => void;\n searchResults: number[];\n \n // Server-side functionality\n fetchServerData: (params: ServerSideParams) => Promise<void>;\n serverData: ServerSideResponse<TData> | null;\n \n // Performance monitoring\n memoryUsage: number;\n \n // Error handling and recovery\n errorState: {\n hasErrors: boolean;\n errorCount: number;\n lastError: DataTableError | null;\n fallbacksActive: string[];\n };\n retryLastOperation: () => Promise<void>;\n clearErrors: () => void;\n \n // Cleanup\n cleanup: () => void;\n}\n\n/**\n * Hook for managing DataTable performance optimizations\n */\nexport function useDataTablePerformance<TData extends DataRecord>({\n data,\n performance = {},\n serverSide,\n chunking,\n searchIndex,\n fallbackConfig = DEFAULT_FALLBACK_CONFIG,\n onError,\n enableErrorRecovery = true\n}: UseDataTablePerformanceOptions<TData>): UseDataTablePerformanceReturn<TData> {\n // ============================================================================\n // STATE MANAGEMENT\n // ============================================================================\n \n const [isLoading, setIsLoading] = useState(false);\n const [searchQuery, setSearchQuery] = useState('');\n const [searchResults, setSearchResults] = useState<number[]>([]);\n const [serverData, setServerData] = useState<ServerSideResponse<TData> | null>(null);\n const [memoryUsage, setMemoryUsage] = useState(0);\n \n // Error handling state\n const [errorState, setErrorState] = useState({\n hasErrors: false,\n errorCount: 0,\n lastError: null as DataTableError | null,\n fallbacksActive: [] as string[],\n });\n const [lastFailedOperation, setLastFailedOperation] = useState<(() => Promise<any>) | null>(null);\n\n // ============================================================================\n // REFS AND MANAGERS\n // ============================================================================\n \n const chunkManagerRef = useRef<DataChunkManager<TData> | null>(null);\n const searchIndexRef = useRef<SearchIndex<TData> | null>(null);\n const visibilityTrackerRef = useRef<VisibilityTracker | null>(null);\n \n // Error handling managers\n const errorRecoveryManagerRef = useRef<ErrorRecoveryManager>(new ErrorRecoveryManager(fallbackConfig));\n const memoryMonitorRef = useRef<MemoryMonitor | null>(null);\n const circuitBreakerRef = useRef<CircuitBreaker>(new CircuitBreaker());\n\n // ============================================================================\n // COMPUTED VALUES\n // ============================================================================\n \n const paginationMode = useMemo(() => {\n // CRITICAL FIX: Only use 'server' mode if serverSide config is explicitly provided.\n // determinePaginationMode now never returns 'server' - it only returns 'client' or 'hybrid'.\n // This fixes pagination issues where large datasets would auto-detect 'server' mode\n // but have no serverSide config, causing pagination controls to break.\n if (serverSide) return 'server';\n return determinePaginationMode(data?.length || 0, performance.serverSideThreshold);\n }, [data?.length, performance.serverSideThreshold, serverSide]);\n\n // Virtualization is now handled internally by UnifiedTableBody\n const isVirtualized = false;\n\n const pageSizeOptions = useMemo(() => {\n return getOptimalPageSizeOptions(paginationMode, data?.length || 0);\n }, [paginationMode, data?.length]);\n\n // ============================================================================\n // DATA PROCESSING\n // ============================================================================\n \n const processedData = useMemo(() => {\n if (serverSide && serverData) {\n return serverData.data;\n }\n\n let filteredData = data;\n \n // Apply search filtering - ensure we don't exclude zero values\n if (searchQuery && searchResults.length > 0) {\n filteredData = searchResults.map(index => data[index]);\n }\n\n // Important: Ensure we don't accidentally filter out rows with zero values\n // This was causing \"no data\" issues when rows contained zero values in numeric columns\n // The filtering should be explicit, not implicit based on falsy values\n\n return filteredData;\n }, [data, serverData, searchQuery, searchResults, serverSide]);\n\n const totalCount = useMemo(() => {\n if (serverSide && serverData) {\n return serverData.totalCount;\n }\n return processedData?.length || 0;\n }, [serverData, processedData?.length, serverSide]);\n\n // ============================================================================\n // CHUNK MANAGEMENT\n // ============================================================================\n \n useEffect(() => {\n if (chunking && !chunkManagerRef.current) {\n chunkManagerRef.current = new DataChunkManager<TData>(chunking);\n }\n }, [chunking]);\n\n // ============================================================================\n // SEARCH INDEX MANAGEMENT\n // ============================================================================\n \n useEffect(() => {\n if (searchIndex && !searchIndexRef.current) {\n searchIndexRef.current = new SearchIndex<TData>(searchIndex);\n }\n\n if (searchIndexRef.current && data.length > 0) {\n searchIndexRef.current.buildIndex(data);\n }\n }, [searchIndex, data]);\n\n // Debounced search function\n const debouncedSearch = useCallback(\n debounce(((query: string) => {\n if (!searchIndexRef.current) return;\n \n if (!query.trim()) {\n setSearchResults([]);\n return;\n }\n\n const results = searchIndexRef.current.search(query);\n setSearchResults(results);\n }) as unknown as (...args: unknown[]) => unknown, performance.debounceSearch ?? 300) as (query: string) => void,\n [performance.debounceSearch]\n );\n\n // Handle search query changes\n useEffect(() => {\n debouncedSearch(searchQuery);\n }, [searchQuery, debouncedSearch]);\n\n // ============================================================================\n // SERVER-SIDE DATA FETCHING\n // ============================================================================\n \n const fetchServerData = useCallback(async (params: ServerSideParams) => {\n if (!serverSide) return;\n\n setIsLoading(true);\n try {\n const response = await serverSide.fetchData(params);\n setServerData(response);\n } catch (error) {\n logger.error('useDataTablePerformance', 'Failed to fetch server data:', error);\n } finally {\n setIsLoading(false);\n }\n }, [serverSide]);\n\n // ============================================================================\n // PERFORMANCE MONITORING\n // ============================================================================\n \n useEffect(() => {\n if (!visibilityTrackerRef.current) {\n visibilityTrackerRef.current = new VisibilityTracker();\n }\n\n const tracker = visibilityTrackerRef.current;\n const unsubscribe = tracker.onVisibilityChange((visibleCount) => {\n // Performance monitoring removed\n });\n\n return unsubscribe;\n }, [totalCount, isVirtualized, paginationMode]);\n\n // Update memory usage\n useEffect(() => {\n const updateMemoryUsage = () => {\n let usage = 0;\n \n if (chunkManagerRef.current) {\n usage += chunkManagerRef.current.getMemoryUsage();\n }\n \n // Add general memory estimation\n usage += (JSON.stringify(processedData || []).length) / (1024 * 1024);\n \n setMemoryUsage(usage);\n };\n\n updateMemoryUsage();\n \n // Only set up interval in non-test environments to prevent memory leaks during testing\n const interval = import.meta.env.MODE !== 'test' \n ? setInterval(updateMemoryUsage, 5000) \n : null;\n \n return () => {\n if (interval) {\n clearInterval(interval);\n }\n };\n }, [processedData]);\n\n // ============================================================================\n // ERROR HANDLING FUNCTIONS\n // ============================================================================\n \n const handleError = useCallback(async (error: DataTableError, operation?: () => Promise<any>) => {\n if (enableErrorRecovery) {\n try {\n const recovery = await errorRecoveryManagerRef.current.handleError(error);\n setErrorState(prev => ({\n hasErrors: true,\n errorCount: prev.errorCount + 1,\n lastError: error,\n fallbacksActive: [...prev.fallbacksActive, error.type],\n }));\n \n if (operation) {\n setLastFailedOperation(() => operation);\n }\n \n onError?.(error);\n return recovery;\n } catch (recoveryError) {\n logger.error('useDataTablePerformance', 'Error recovery failed:', recoveryError);\n }\n }\n throw error;\n }, [enableErrorRecovery, onError]);\n\n const retryLastOperation = useCallback(async () => {\n if (lastFailedOperation) {\n try {\n await lastFailedOperation();\n setLastFailedOperation(null);\n setErrorState(prev => ({ ...prev, hasErrors: false }));\n } catch (error) {\n logger.error('useDataTablePerformance', 'Retry failed:', error);\n }\n }\n }, [lastFailedOperation]);\n\n const clearErrors = useCallback(() => {\n setErrorState({\n hasErrors: false,\n errorCount: 0,\n lastError: null,\n fallbacksActive: [],\n });\n setLastFailedOperation(null);\n errorRecoveryManagerRef.current.clearErrorLog();\n }, []);\n\n // ============================================================================\n // CLEANUP\n // ============================================================================\n \n const cleanup = useCallback(() => {\n chunkManagerRef.current?.clear();\n visibilityTrackerRef.current?.destroy();\n memoryMonitorRef.current?.stopMonitoring();\n }, []);\n\n useEffect(() => {\n return cleanup;\n }, [cleanup]);\n\n // ============================================================================\n // RETURN VALUES\n // ============================================================================\n \n return {\n // Performance state\n paginationMode,\n isVirtualized,\n pageSizeOptions,\n \n // Data management\n processedData,\n totalCount,\n isLoading,\n \n // Search functionality\n searchQuery,\n setSearchQuery,\n searchResults,\n \n // Server-side functionality\n fetchServerData,\n serverData,\n \n // Performance monitoring\n memoryUsage,\n \n // Error handling and recovery\n errorState,\n retryLastOperation,\n clearErrors,\n \n // Cleanup\n cleanup\n };\n} "],"mappings":";;;;;AAWA,YAAY,WAAW;AAGvB,IAAM,cAAc;AAEpB,IAAM,qBA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