@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
|
@@ -70,7 +70,7 @@ describe('[component] DataTable', () => {
|
|
|
70
70
|
const testData = createTestData(3);
|
|
71
71
|
const testColumns = createTestColumns();
|
|
72
72
|
const defaultRBAC = { pageId: 'test-page-id' };
|
|
73
|
-
const
|
|
73
|
+
const baseProps = {
|
|
74
74
|
data: testData,
|
|
75
75
|
columns: testColumns,
|
|
76
76
|
rbac: defaultRBAC,
|
|
@@ -90,7 +90,7 @@ describe('[component] DataTable', () => {
|
|
|
90
90
|
|
|
91
91
|
describe('Rendering', () => {
|
|
92
92
|
it('renders DataTableCore with required props', () => {
|
|
93
|
-
render(<DataTable {...
|
|
93
|
+
render(<DataTable {...baseProps} />);
|
|
94
94
|
|
|
95
95
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
96
96
|
expect(getMockedDataTableCore()).toHaveBeenCalledTimes(1);
|
|
@@ -99,7 +99,7 @@ describe('[component] DataTable', () => {
|
|
|
99
99
|
it('renders with title and description', () => {
|
|
100
100
|
render(
|
|
101
101
|
<DataTable
|
|
102
|
-
{...
|
|
102
|
+
{...baseProps}
|
|
103
103
|
title="Test Table"
|
|
104
104
|
description="Test description"
|
|
105
105
|
/>
|
|
@@ -111,14 +111,14 @@ describe('[component] DataTable', () => {
|
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
it('renders with custom variant', () => {
|
|
114
|
-
render(<DataTable {...
|
|
114
|
+
render(<DataTable {...baseProps} variant="compact" />);
|
|
115
115
|
|
|
116
116
|
const core = screen.getByTestId('data-table-core');
|
|
117
117
|
expect(core).toHaveAttribute('data-variant', 'compact');
|
|
118
118
|
});
|
|
119
119
|
|
|
120
120
|
it('renders with custom className', () => {
|
|
121
|
-
render(<DataTable {...
|
|
121
|
+
render(<DataTable {...baseProps} className="custom-table-class" />);
|
|
122
122
|
|
|
123
123
|
const core = screen.getByTestId('data-table-core');
|
|
124
124
|
expect(core).toHaveAttribute('data-class-name', 'custom-table-class');
|
|
@@ -127,7 +127,7 @@ describe('[component] DataTable', () => {
|
|
|
127
127
|
|
|
128
128
|
describe('Feature Configuration', () => {
|
|
129
129
|
it('normalizes undefined features to default disabled features', () => {
|
|
130
|
-
render(<DataTable {...
|
|
130
|
+
render(<DataTable {...baseProps} />);
|
|
131
131
|
|
|
132
132
|
const core = screen.getByTestId('data-table-core');
|
|
133
133
|
const features = JSON.parse(core.getAttribute('data-features') || '{}');
|
|
@@ -157,7 +157,7 @@ describe('[component] DataTable', () => {
|
|
|
157
157
|
pagination: true,
|
|
158
158
|
};
|
|
159
159
|
|
|
160
|
-
render(<DataTable {...
|
|
160
|
+
render(<DataTable {...baseProps} features={partialFeatures} />);
|
|
161
161
|
|
|
162
162
|
const core = screen.getByTestId('data-table-core');
|
|
163
163
|
const features = JSON.parse(core.getAttribute('data-features') || '{}');
|
|
@@ -170,7 +170,7 @@ describe('[component] DataTable', () => {
|
|
|
170
170
|
|
|
171
171
|
it('passes fully normalized features to DataTableCore', () => {
|
|
172
172
|
const features = createFullFeatures();
|
|
173
|
-
render(<DataTable {...
|
|
173
|
+
render(<DataTable {...baseProps} features={features} />);
|
|
174
174
|
|
|
175
175
|
const core = screen.getByTestId('data-table-core');
|
|
176
176
|
const normalizedFeatures = JSON.parse(core.getAttribute('data-features') || '{}');
|
|
@@ -192,11 +192,11 @@ describe('[component] DataTable', () => {
|
|
|
192
192
|
|
|
193
193
|
it('memoizes normalized features when features prop does not change', () => {
|
|
194
194
|
const features = createDefaultFeatures();
|
|
195
|
-
const { rerender } = render(<DataTable {...
|
|
195
|
+
const { rerender } = render(<DataTable {...baseProps} features={features} />);
|
|
196
196
|
|
|
197
197
|
expect(getMockedDataTableCore()).toHaveBeenCalledTimes(1);
|
|
198
198
|
|
|
199
|
-
rerender(<DataTable {...
|
|
199
|
+
rerender(<DataTable {...baseProps} features={features} />);
|
|
200
200
|
|
|
201
201
|
// Should not re-normalize if features object reference is the same
|
|
202
202
|
expect(getMockedDataTableCore()).toHaveBeenCalledTimes(2);
|
|
@@ -205,14 +205,14 @@ describe('[component] DataTable', () => {
|
|
|
205
205
|
|
|
206
206
|
describe('RBAC Configuration', () => {
|
|
207
207
|
it('passes rbac with pageId to DataTableCore', () => {
|
|
208
|
-
render(<DataTable {...
|
|
208
|
+
render(<DataTable {...baseProps} rbac={{ pageId: 'custom-page-id' }} />);
|
|
209
209
|
|
|
210
210
|
const core = screen.getByTestId('data-table-core');
|
|
211
211
|
expect(core).toHaveAttribute('data-page-id', 'custom-page-id');
|
|
212
212
|
});
|
|
213
213
|
|
|
214
214
|
it('passes rbac with pageName to DataTableCore', () => {
|
|
215
|
-
render(<DataTable {...
|
|
215
|
+
render(<DataTable {...baseProps} rbac={{ pageName: 'custom-page-name' }} />);
|
|
216
216
|
|
|
217
217
|
const core = screen.getByTestId('data-table-core');
|
|
218
218
|
expect(core).toHaveAttribute('data-page-name', 'custom-page-name');
|
|
@@ -223,7 +223,7 @@ describe('[component] DataTable', () => {
|
|
|
223
223
|
it('logs debug information in development mode', () => {
|
|
224
224
|
// Note: Debug logging has been removed from DataTable component
|
|
225
225
|
// The component now uses a logger utility instead of console.log
|
|
226
|
-
render(<DataTable {...
|
|
226
|
+
render(<DataTable {...baseProps} />);
|
|
227
227
|
|
|
228
228
|
// Verify component renders correctly
|
|
229
229
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
@@ -241,7 +241,7 @@ describe('[component] DataTable', () => {
|
|
|
241
241
|
mockLogger.info.mockClear();
|
|
242
242
|
|
|
243
243
|
// Render without features prop - should trigger the warning in development mode
|
|
244
|
-
render(<DataTable {...
|
|
244
|
+
render(<DataTable {...baseProps} />);
|
|
245
245
|
|
|
246
246
|
// Wait for useEffect to run - it runs after render
|
|
247
247
|
// The effect checks: if (!features && import.meta.env?.MODE === 'development')
|
|
@@ -259,7 +259,7 @@ describe('[component] DataTable', () => {
|
|
|
259
259
|
});
|
|
260
260
|
|
|
261
261
|
it('does not log info message when features are provided', () => {
|
|
262
|
-
render(<DataTable {...
|
|
262
|
+
render(<DataTable {...baseProps} features={createDefaultFeatures()} />);
|
|
263
263
|
|
|
264
264
|
expect(mockLogger.info).not.toHaveBeenCalled();
|
|
265
265
|
});
|
|
@@ -270,7 +270,7 @@ describe('[component] DataTable', () => {
|
|
|
270
270
|
deletion: false,
|
|
271
271
|
});
|
|
272
272
|
|
|
273
|
-
render(<DataTable {...
|
|
273
|
+
render(<DataTable {...baseProps} features={invalidFeatures} />);
|
|
274
274
|
|
|
275
275
|
expect(mockLogger.warn).toHaveBeenCalledWith(
|
|
276
276
|
'deleteSelected requires deletion to be enabled'
|
|
@@ -283,7 +283,7 @@ describe('[component] DataTable', () => {
|
|
|
283
283
|
deletion: true,
|
|
284
284
|
});
|
|
285
285
|
|
|
286
|
-
render(<DataTable {...
|
|
286
|
+
render(<DataTable {...baseProps} features={validFeatures} />);
|
|
287
287
|
|
|
288
288
|
expect(mockLogger.warn).not.toHaveBeenCalled();
|
|
289
289
|
});
|
|
@@ -292,81 +292,57 @@ describe('[component] DataTable', () => {
|
|
|
292
292
|
describe('Event Handlers', () => {
|
|
293
293
|
it('passes onEditRow handler to DataTableCore', () => {
|
|
294
294
|
const onEditRow = vi.fn();
|
|
295
|
-
render(<DataTable {...
|
|
295
|
+
render(<DataTable {...baseProps} onEditRow={onEditRow} />);
|
|
296
296
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
onEditRow,
|
|
300
|
-
}),
|
|
301
|
-
expect.anything()
|
|
302
|
-
);
|
|
297
|
+
const mockCall = getMockedDataTableCore().mock.calls[0];
|
|
298
|
+
expect(mockCall[0]).toHaveProperty('onEditRow', onEditRow);
|
|
303
299
|
});
|
|
304
300
|
|
|
305
301
|
it('passes onDeleteRow handler to DataTableCore', () => {
|
|
306
302
|
const onDeleteRow = vi.fn();
|
|
307
|
-
render(<DataTable {...
|
|
303
|
+
render(<DataTable {...baseProps} onDeleteRow={onDeleteRow} />);
|
|
308
304
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
onDeleteRow,
|
|
312
|
-
}),
|
|
313
|
-
expect.anything()
|
|
314
|
-
);
|
|
305
|
+
const mockCall = getMockedDataTableCore().mock.calls[0];
|
|
306
|
+
expect(mockCall[0]).toHaveProperty('onDeleteRow', onDeleteRow);
|
|
315
307
|
});
|
|
316
308
|
|
|
317
309
|
it('passes onCreateRow handler to DataTableCore', () => {
|
|
318
310
|
const onCreateRow = vi.fn();
|
|
319
|
-
render(<DataTable {...
|
|
311
|
+
render(<DataTable {...baseProps} onCreateRow={onCreateRow} />);
|
|
320
312
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
onCreateRow,
|
|
324
|
-
}),
|
|
325
|
-
expect.anything()
|
|
326
|
-
);
|
|
313
|
+
const mockCall = getMockedDataTableCore().mock.calls[0];
|
|
314
|
+
expect(mockCall[0]).toHaveProperty('onCreateRow', onCreateRow);
|
|
327
315
|
});
|
|
328
316
|
|
|
329
317
|
it('passes onImport handler to DataTableCore', () => {
|
|
330
318
|
const onImport = vi.fn();
|
|
331
|
-
render(<DataTable {...
|
|
319
|
+
render(<DataTable {...baseProps} onImport={onImport} />);
|
|
332
320
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
onImport,
|
|
336
|
-
}),
|
|
337
|
-
expect.anything()
|
|
338
|
-
);
|
|
321
|
+
const mockCall = getMockedDataTableCore().mock.calls[0];
|
|
322
|
+
expect(mockCall[0]).toHaveProperty('onImport', onImport);
|
|
339
323
|
});
|
|
340
324
|
|
|
341
325
|
it('passes onRowSelectionChange handler to DataTableCore', () => {
|
|
342
326
|
const onRowSelectionChange = vi.fn();
|
|
343
|
-
render(<DataTable {...
|
|
327
|
+
render(<DataTable {...baseProps} onRowSelectionChange={onRowSelectionChange} />);
|
|
344
328
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
onRowSelectionChange,
|
|
348
|
-
}),
|
|
349
|
-
expect.anything()
|
|
350
|
-
);
|
|
329
|
+
const mockCall = getMockedDataTableCore().mock.calls[0];
|
|
330
|
+
expect(mockCall[0]).toHaveProperty('onRowSelectionChange', onRowSelectionChange);
|
|
351
331
|
});
|
|
352
332
|
|
|
353
333
|
it('passes onDeleteSelected handler to DataTableCore', () => {
|
|
354
334
|
const onDeleteSelected = vi.fn();
|
|
355
|
-
render(<DataTable {...
|
|
335
|
+
render(<DataTable {...baseProps} onDeleteSelected={onDeleteSelected} />);
|
|
356
336
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
onDeleteSelected,
|
|
360
|
-
}),
|
|
361
|
-
expect.anything()
|
|
362
|
-
);
|
|
337
|
+
const mockCall = getMockedDataTableCore().mock.calls[0];
|
|
338
|
+
expect(mockCall[0]).toHaveProperty('onDeleteSelected', onDeleteSelected);
|
|
363
339
|
});
|
|
364
340
|
});
|
|
365
341
|
|
|
366
342
|
describe('Data Handling', () => {
|
|
367
343
|
it('handles empty data array', () => {
|
|
368
344
|
// Note: Debug logging has been removed from DataTable component
|
|
369
|
-
render(<DataTable {...
|
|
345
|
+
render(<DataTable {...baseProps} data={[]} />);
|
|
370
346
|
|
|
371
347
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
372
348
|
});
|
|
@@ -374,7 +350,7 @@ describe('[component] DataTable', () => {
|
|
|
374
350
|
it('handles single data item', () => {
|
|
375
351
|
// Note: Debug logging has been removed from DataTable component
|
|
376
352
|
const singleData = testDataScenarios.single;
|
|
377
|
-
render(<DataTable {...
|
|
353
|
+
render(<DataTable {...baseProps} data={singleData} />);
|
|
378
354
|
|
|
379
355
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
380
356
|
});
|
|
@@ -382,14 +358,14 @@ describe('[component] DataTable', () => {
|
|
|
382
358
|
it('handles large dataset', () => {
|
|
383
359
|
// Note: Debug logging has been removed from DataTable component
|
|
384
360
|
const largeData = testDataScenarios.large;
|
|
385
|
-
render(<DataTable {...
|
|
361
|
+
render(<DataTable {...baseProps} data={largeData} />);
|
|
386
362
|
|
|
387
363
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
388
364
|
});
|
|
389
365
|
|
|
390
366
|
it('handles data with null values', () => {
|
|
391
367
|
const dataWithNulls = testDataScenarios.withNulls;
|
|
392
|
-
render(<DataTable {...
|
|
368
|
+
render(<DataTable {...baseProps} data={dataWithNulls} />);
|
|
393
369
|
|
|
394
370
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
395
371
|
});
|
|
@@ -402,14 +378,10 @@ describe('[component] DataTable', () => {
|
|
|
402
378
|
enableChunking: true,
|
|
403
379
|
};
|
|
404
380
|
|
|
405
|
-
render(<DataTable {...
|
|
381
|
+
render(<DataTable {...baseProps} performance={performance} />);
|
|
406
382
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
performance,
|
|
410
|
-
}),
|
|
411
|
-
expect.anything()
|
|
412
|
-
);
|
|
383
|
+
const mockCall = getMockedDataTableCore().mock.calls[0];
|
|
384
|
+
expect(mockCall[0]).toHaveProperty('performance', performance);
|
|
413
385
|
});
|
|
414
386
|
|
|
415
387
|
it('passes serverSide config to DataTableCore', () => {
|
|
@@ -418,32 +390,24 @@ describe('[component] DataTable', () => {
|
|
|
418
390
|
enableServerSorting: true,
|
|
419
391
|
};
|
|
420
392
|
|
|
421
|
-
render(<DataTable {...
|
|
393
|
+
render(<DataTable {...baseProps} serverSide={serverSide} />);
|
|
422
394
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
serverSide,
|
|
426
|
-
}),
|
|
427
|
-
expect.anything()
|
|
428
|
-
);
|
|
395
|
+
const mockCall = getMockedDataTableCore().mock.calls[0];
|
|
396
|
+
expect(mockCall[0]).toHaveProperty('serverSide', serverSide);
|
|
429
397
|
});
|
|
430
398
|
|
|
431
399
|
it('passes paginationMode to DataTableCore', () => {
|
|
432
|
-
render(<DataTable {...
|
|
400
|
+
render(<DataTable {...baseProps} paginationMode="server" />);
|
|
433
401
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
paginationMode: 'server',
|
|
437
|
-
}),
|
|
438
|
-
expect.anything()
|
|
439
|
-
);
|
|
402
|
+
const mockCall = getMockedDataTableCore().mock.calls[0];
|
|
403
|
+
expect(mockCall[0]).toHaveProperty('paginationMode', 'server');
|
|
440
404
|
});
|
|
441
405
|
});
|
|
442
406
|
|
|
443
407
|
describe('Component Integration', () => {
|
|
444
408
|
it('passes all props to DataTableCore except features', () => {
|
|
445
409
|
const allProps = {
|
|
446
|
-
...
|
|
410
|
+
...baseProps,
|
|
447
411
|
title: 'Test Table',
|
|
448
412
|
description: 'Test description',
|
|
449
413
|
variant: 'compact' as const,
|
|
@@ -490,7 +454,7 @@ describe('[component] DataTable', () => {
|
|
|
490
454
|
|
|
491
455
|
describe('Memory Management', () => {
|
|
492
456
|
it('cleans up resources on unmount', () => {
|
|
493
|
-
const { unmount } = render(<DataTable {...
|
|
457
|
+
const { unmount } = render(<DataTable {...baseProps} />);
|
|
494
458
|
|
|
495
459
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
496
460
|
|
|
@@ -499,11 +463,11 @@ describe('[component] DataTable', () => {
|
|
|
499
463
|
});
|
|
500
464
|
|
|
501
465
|
it('handles rapid mount/unmount cycles', () => {
|
|
502
|
-
const { unmount: unmount1 } = render(<DataTable {...
|
|
466
|
+
const { unmount: unmount1 } = render(<DataTable {...baseProps} />);
|
|
503
467
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
504
468
|
unmount1();
|
|
505
469
|
|
|
506
|
-
const { unmount: unmount2 } = render(<DataTable {...
|
|
470
|
+
const { unmount: unmount2 } = render(<DataTable {...baseProps} />);
|
|
507
471
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
508
472
|
unmount2();
|
|
509
473
|
|
|
@@ -514,27 +478,27 @@ describe('[component] DataTable', () => {
|
|
|
514
478
|
describe('Edge Cases', () => {
|
|
515
479
|
it('handles missing columns gracefully', () => {
|
|
516
480
|
// Note: Debug logging has been removed from DataTable component
|
|
517
|
-
render(<DataTable {...
|
|
481
|
+
render(<DataTable {...baseProps} columns={[]} />);
|
|
518
482
|
|
|
519
483
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
520
484
|
});
|
|
521
485
|
|
|
522
486
|
it('handles undefined rbac pageId and pageName', () => {
|
|
523
487
|
// Note: Debug logging has been removed from DataTable component
|
|
524
|
-
render(<DataTable {...
|
|
488
|
+
render(<DataTable {...baseProps} rbac={{}} />);
|
|
525
489
|
|
|
526
490
|
expect(screen.getByTestId('data-table-core')).toBeInTheDocument();
|
|
527
491
|
});
|
|
528
492
|
|
|
529
493
|
it('handles rapid feature prop changes', () => {
|
|
530
|
-
const { rerender } = render(<DataTable {...
|
|
494
|
+
const { rerender } = render(<DataTable {...baseProps} features={{ search: true }} />);
|
|
531
495
|
|
|
532
496
|
expect(getMockedDataTableCore()).toHaveBeenCalledTimes(1);
|
|
533
497
|
|
|
534
|
-
rerender(<DataTable {...
|
|
498
|
+
rerender(<DataTable {...baseProps} features={{ search: false }} />);
|
|
535
499
|
expect(getMockedDataTableCore()).toHaveBeenCalledTimes(2);
|
|
536
500
|
|
|
537
|
-
rerender(<DataTable {...
|
|
501
|
+
rerender(<DataTable {...baseProps} features={{ search: true, pagination: true }} />);
|
|
538
502
|
expect(getMockedDataTableCore()).toHaveBeenCalledTimes(3);
|
|
539
503
|
});
|
|
540
504
|
});
|
|
@@ -424,7 +424,7 @@ export interface DataTableProps<TData extends DataRecord> {
|
|
|
424
424
|
/** Whether the table is in a loading state */
|
|
425
425
|
isLoading?: boolean;
|
|
426
426
|
/** Custom component to display when table is empty */
|
|
427
|
-
emptyState?: EmptyStateConfig | React.ReactElement
|
|
427
|
+
emptyState?: EmptyStateConfig | React.ReactElement<any>;
|
|
428
428
|
/** Array of aggregation functions for grouped data */
|
|
429
429
|
aggregates?: AggregateConfig[];
|
|
430
430
|
|
|
@@ -463,7 +463,7 @@ export interface DataTableProps<TData extends DataRecord> {
|
|
|
463
463
|
* Features are configured through the unified `features` prop for maximum flexibility.
|
|
464
464
|
*/
|
|
465
465
|
export function DataTable<TData extends DataRecord>(props: DataTableProps<TData>) {
|
|
466
|
-
const logger =
|
|
466
|
+
const logger = createLogger('DataTable');
|
|
467
467
|
const { features, ...rest } = props;
|
|
468
468
|
|
|
469
469
|
const normalizedFeatures = React.useMemo(
|