@jmruthers/pace-core 0.5.39 → 0.5.41

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.
Files changed (101) hide show
  1. package/dist/rbac/cli/policy-manager.js +278 -0
  2. package/dist/rbac/cli/policy-manager.js.map +1 -0
  3. package/docs/api/classes/ErrorBoundary.md +1 -1
  4. package/docs/api/classes/InvalidScopeError.md +1 -1
  5. package/docs/api/classes/MissingUserContextError.md +1 -1
  6. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  7. package/docs/api/classes/PermissionDeniedError.md +1 -1
  8. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  9. package/docs/api/classes/RBACAuditManager.md +1 -1
  10. package/docs/api/classes/RBACCache.md +1 -1
  11. package/docs/api/classes/RBACEngine.md +1 -1
  12. package/docs/api/classes/RBACError.md +1 -1
  13. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  14. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  15. package/docs/api/interfaces/AggregateConfig.md +1 -1
  16. package/docs/api/interfaces/ButtonProps.md +1 -1
  17. package/docs/api/interfaces/CardProps.md +1 -1
  18. package/docs/api/interfaces/ColorPalette.md +1 -1
  19. package/docs/api/interfaces/ColorShade.md +1 -1
  20. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  21. package/docs/api/interfaces/DataTableAction.md +1 -1
  22. package/docs/api/interfaces/DataTableColumn.md +1 -1
  23. package/docs/api/interfaces/DataTableProps.md +1 -1
  24. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  25. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  26. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  27. package/docs/api/interfaces/EventContextType.md +1 -1
  28. package/docs/api/interfaces/EventLogoProps.md +1 -1
  29. package/docs/api/interfaces/EventProviderProps.md +1 -1
  30. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  31. package/docs/api/interfaces/FileUploadProps.md +1 -1
  32. package/docs/api/interfaces/FooterProps.md +1 -1
  33. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  34. package/docs/api/interfaces/InputProps.md +1 -1
  35. package/docs/api/interfaces/LabelProps.md +1 -1
  36. package/docs/api/interfaces/LoginFormProps.md +1 -1
  37. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  38. package/docs/api/interfaces/NavigationContextType.md +1 -1
  39. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  40. package/docs/api/interfaces/NavigationItem.md +1 -1
  41. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  42. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  43. package/docs/api/interfaces/Organisation.md +1 -1
  44. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  45. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  46. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  47. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  48. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  49. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  50. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  51. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  52. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  53. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  54. package/docs/api/interfaces/PaletteData.md +1 -1
  55. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  56. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  57. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  58. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  59. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  60. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  61. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  62. package/docs/api/interfaces/RBACConfig.md +1 -1
  63. package/docs/api/interfaces/RBACContextType.md +1 -1
  64. package/docs/api/interfaces/RBACLogger.md +1 -1
  65. package/docs/api/interfaces/RBACProviderProps.md +1 -1
  66. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  67. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  68. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  69. package/docs/api/interfaces/RouteConfig.md +1 -1
  70. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  71. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  72. package/docs/api/interfaces/StorageConfig.md +1 -1
  73. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  74. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  75. package/docs/api/interfaces/StorageListOptions.md +1 -1
  76. package/docs/api/interfaces/StorageListResult.md +1 -1
  77. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  78. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  79. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  80. package/docs/api/interfaces/StyleImport.md +1 -1
  81. package/docs/api/interfaces/ToastActionElement.md +1 -1
  82. package/docs/api/interfaces/ToastProps.md +1 -1
  83. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  84. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  85. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  86. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  87. package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
  88. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  89. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  90. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  91. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  92. package/docs/api/interfaces/UserEventAccess.md +1 -1
  93. package/docs/api/interfaces/UserMenuProps.md +1 -1
  94. package/docs/api/interfaces/UserProfile.md +1 -1
  95. package/docs/api/modules.md +2 -2
  96. package/docs/implementation-guides/data-tables.md +189 -0
  97. package/docs/rbac/README-rbac-rls-integration.md +358 -0
  98. package/docs/rbac/examples/rbac-rls-integration-example.md +332 -0
  99. package/docs/rbac/rbac-rls-integration.md +377 -0
  100. package/package.json +19 -3
  101. package/src/rbac/cli/policy-manager.ts +443 -0
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / OrganisationContextType
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / OrganisationContextType
2
2
 
3
3
  # Interface: OrganisationContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / OrganisationMembership
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / OrganisationMembership
2
2
 
3
3
  # Interface: OrganisationMembership
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / OrganisationProviderProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / OrganisationProviderProps
2
2
 
3
3
  # Interface: OrganisationProviderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / OrganisationSecurityError
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / OrganisationSecurityError
2
2
 
3
3
  # Interface: OrganisationSecurityError
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PaceAppLayoutProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PaceAppLayoutProps
2
2
 
3
3
  # Interface: PaceAppLayoutProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PaceLoginPageProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PaceLoginPageProps
2
2
 
3
3
  # Interface: PaceLoginPageProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PageAccessRecord
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PageAccessRecord
2
2
 
3
3
  # Interface: PageAccessRecord
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PagePermissionContextType
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PagePermissionContextType
2
2
 
3
3
  # Interface: PagePermissionContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PagePermissionGuardProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PagePermissionGuardProps
2
2
 
3
3
  # Interface: PagePermissionGuardProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PagePermissionProviderProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PagePermissionProviderProps
2
2
 
3
3
  # Interface: PagePermissionProviderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PaletteData
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PaletteData
2
2
 
3
3
  # Interface: PaletteData
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PermissionEnforcerProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PermissionEnforcerProps
2
2
 
3
3
  # Interface: PermissionEnforcerProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PublicErrorBoundaryProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PublicErrorBoundaryProps
2
2
 
3
3
  # Interface: PublicErrorBoundaryProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PublicErrorBoundaryState
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PublicErrorBoundaryState
2
2
 
3
3
  # Interface: PublicErrorBoundaryState
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PublicLoadingSpinnerProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PublicLoadingSpinnerProps
2
2
 
3
3
  # Interface: PublicLoadingSpinnerProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PublicPageFooterProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PublicPageFooterProps
2
2
 
3
3
  # Interface: PublicPageFooterProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PublicPageHeaderProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PublicPageHeaderProps
2
2
 
3
3
  # Interface: PublicPageHeaderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / PublicPageLayoutProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / PublicPageLayoutProps
2
2
 
3
3
  # Interface: PublicPageLayoutProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / RBACConfig
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / RBACConfig
2
2
 
3
3
  # Interface: RBACConfig
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / RBACContextType
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / RBACContextType
2
2
 
3
3
  # Interface: RBACContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / RBACLogger
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / RBACLogger
2
2
 
3
3
  # Interface: RBACLogger
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / RBACProviderProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / RBACProviderProps
2
2
 
3
3
  # Interface: RBACProviderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / RoleBasedRouterContextType
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / RoleBasedRouterContextType
2
2
 
3
3
  # Interface: RoleBasedRouterContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / RoleBasedRouterProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / RoleBasedRouterProps
2
2
 
3
3
  # Interface: RoleBasedRouterProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / RouteAccessRecord
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / RouteAccessRecord
2
2
 
3
3
  # Interface: RouteAccessRecord
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / RouteConfig
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / RouteConfig
2
2
 
3
3
  # Interface: RouteConfig
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / SecureDataContextType
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / SecureDataContextType
2
2
 
3
3
  # Interface: SecureDataContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / SecureDataProviderProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / SecureDataProviderProps
2
2
 
3
3
  # Interface: SecureDataProviderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / StorageConfig
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / StorageConfig
2
2
 
3
3
  # Interface: StorageConfig
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / StorageFileInfo
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / StorageFileInfo
2
2
 
3
3
  # Interface: StorageFileInfo
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / StorageFileMetadata
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / StorageFileMetadata
2
2
 
3
3
  # Interface: StorageFileMetadata
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / StorageListOptions
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / StorageListOptions
2
2
 
3
3
  # Interface: StorageListOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / StorageListResult
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / StorageListResult
2
2
 
3
3
  # Interface: StorageListResult
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / StorageUploadOptions
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / StorageUploadOptions
2
2
 
3
3
  # Interface: StorageUploadOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / StorageUploadResult
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / StorageUploadResult
2
2
 
3
3
  # Interface: StorageUploadResult
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / StorageUrlOptions
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / StorageUrlOptions
2
2
 
3
3
  # Interface: StorageUrlOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / StyleImport
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / StyleImport
2
2
 
3
3
  # Interface: StyleImport
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / ToastActionElement
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / ToastActionElement
2
2
 
3
3
  # Interface: ToastActionElement
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / ToastProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / ToastProps
2
2
 
3
3
  # Interface: ToastProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UnifiedAuthContextType
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UnifiedAuthContextType
2
2
 
3
3
  # Interface: UnifiedAuthContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UnifiedAuthProviderProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UnifiedAuthProviderProps
2
2
 
3
3
  # Interface: UnifiedAuthProviderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UseInactivityTrackerOptions
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UseInactivityTrackerOptions
2
2
 
3
3
  # Interface: UseInactivityTrackerOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UseInactivityTrackerReturn
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UseInactivityTrackerReturn
2
2
 
3
3
  # Interface: UseInactivityTrackerReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UsePublicEventLogoOptions
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UsePublicEventLogoOptions
2
2
 
3
3
  # Interface: UsePublicEventLogoOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UsePublicEventLogoReturn
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UsePublicEventLogoReturn
2
2
 
3
3
  # Interface: UsePublicEventLogoReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UsePublicEventOptions
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UsePublicEventOptions
2
2
 
3
3
  # Interface: UsePublicEventOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UsePublicEventReturn
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UsePublicEventReturn
2
2
 
3
3
  # Interface: UsePublicEventReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UsePublicRouteParamsReturn
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UsePublicRouteParamsReturn
2
2
 
3
3
  # Interface: UsePublicRouteParamsReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UserEventAccess
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UserEventAccess
2
2
 
3
3
  # Interface: UserEventAccess
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UserMenuProps
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UserMenuProps
2
2
 
3
3
  # Interface: UserMenuProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.39](../README.md) / [Exports](../modules.md) / UserProfile
1
+ [@jmruthers/pace-core - v0.5.41](../README.md) / [Exports](../modules.md) / UserProfile
2
2
 
3
3
  # Interface: UserProfile
4
4
 
@@ -1,6 +1,6 @@
1
- [@jmruthers/pace-core - v0.5.39](README.md) / Exports
1
+ [@jmruthers/pace-core - v0.5.41](README.md) / Exports
2
2
 
3
- # @jmruthers/pace-core - v0.5.39
3
+ # @jmruthers/pace-core - v0.5.41
4
4
 
5
5
  **`File`**
6
6
 
@@ -155,6 +155,9 @@ The DataTable component has a comprehensive prop interface. Here are the key pro
155
155
  - `columnOrder?: string[]` - **Column ordering** - Array of column IDs in desired order
156
156
 
157
157
  ### Event Handlers
158
+
159
+ ⚠️ **Critical**: DataTable is a controlled component. You must update your local state after CRUD operations to keep the UI in sync.
160
+
158
161
  - `onEditRow?: (row: TData, data: Partial<TData>) => void` - Row edit handler
159
162
  - `onDeleteRow?: (row: TData) => void` - Row deletion handler (also used as fallback for bulk delete)
160
163
  - `onCreateRow?: (data: Partial<TData>) => void` - Row creation handler
@@ -175,6 +178,184 @@ The DataTable component has a comprehensive prop interface. Here are the key pro
175
178
  ### Row Actions
176
179
  - `actions?: any[]` - Custom row actions for each row
177
180
 
181
+ ## CRUD Operations Implementation
182
+
183
+ ### Understanding Controlled Components
184
+
185
+ The DataTable is a **controlled component** that displays whatever data you pass to it. When implementing CRUD operations, you must manage both the database operations AND the local state updates to keep the UI in sync.
186
+
187
+ **Two-step process for all CRUD operations:**
188
+ 1. **Perform the database operation** (create, update, delete)
189
+ 2. **Update your local state** to reflect the changes
190
+
191
+ ### Complete CRUD Examples
192
+
193
+ #### State Management Setup
194
+
195
+ ```typescript
196
+ import { useState, useEffect } from 'react';
197
+ import { DataTable } from '@jmruthers/pace-core';
198
+
199
+ function MealsPage() {
200
+ const [meals, setMeals] = useState<Meal[]>([]);
201
+ const [loading, setLoading] = useState(true);
202
+
203
+ // Load initial data
204
+ useEffect(() => {
205
+ loadMeals().then(setMeals).finally(() => setLoading(false));
206
+ }, []);
207
+
208
+ // ... rest of component
209
+ }
210
+ ```
211
+
212
+ #### Create Operation
213
+
214
+ ```typescript
215
+ const handleCreateRow = async (data: Partial<Meal>) => {
216
+ try {
217
+ // 1. Create in database
218
+ const newMeal = await supabase
219
+ .from('meals')
220
+ .insert(data)
221
+ .select()
222
+ .single();
223
+
224
+ if (newMeal.error) throw newMeal.error;
225
+
226
+ // 2. Update local state - ADD the new row
227
+ setMeals(prevMeals => [...prevMeals, newMeal.data]);
228
+
229
+ console.log('Meal created successfully');
230
+ } catch (error) {
231
+ console.error('Failed to create meal:', error);
232
+ // Show error message to user
233
+ }
234
+ };
235
+ ```
236
+
237
+ #### Update Operation
238
+
239
+ ```typescript
240
+ const handleEditRow = async (row: Meal, data: Partial<Meal>) => {
241
+ try {
242
+ // 1. Update in database
243
+ const { error } = await supabase
244
+ .from('meals')
245
+ .update(data)
246
+ .eq('meal_id', row.meal_id);
247
+
248
+ if (error) throw error;
249
+
250
+ // 2. Update local state - REPLACE the updated row
251
+ setMeals(prevMeals =>
252
+ prevMeals.map(meal =>
253
+ meal.meal_id === row.meal_id
254
+ ? { ...meal, ...data }
255
+ : meal
256
+ )
257
+ );
258
+
259
+ console.log('Meal updated successfully');
260
+ } catch (error) {
261
+ console.error('Failed to update meal:', error);
262
+ // Show error message to user
263
+ }
264
+ };
265
+ ```
266
+
267
+ #### Delete Operation
268
+
269
+ ```typescript
270
+ const handleDeleteRow = async (row: Meal) => {
271
+ try {
272
+ // 1. Delete from database
273
+ const { error } = await supabase
274
+ .from('meals')
275
+ .delete()
276
+ .eq('meal_id', row.meal_id);
277
+
278
+ if (error) throw error;
279
+
280
+ // 2. Update local state - REMOVE the deleted row
281
+ setMeals(prevMeals =>
282
+ prevMeals.filter(meal => meal.meal_id !== row.meal_id)
283
+ );
284
+
285
+ console.log('Meal deleted successfully');
286
+ } catch (error) {
287
+ console.error('Failed to delete meal:', error);
288
+ // Show error message to user
289
+ }
290
+ };
291
+ ```
292
+
293
+ #### Bulk Delete Operation
294
+
295
+ ```typescript
296
+ const handleDeleteSelected = async (selectedRows: Record<string, boolean>) => {
297
+ try {
298
+ const selectedIds = Object.keys(selectedRows).filter(id => selectedRows[id]);
299
+
300
+ if (selectedIds.length === 0) return;
301
+
302
+ // 1. Delete from database
303
+ const { error } = await supabase
304
+ .from('meals')
305
+ .delete()
306
+ .in('meal_id', selectedIds);
307
+
308
+ if (error) throw error;
309
+
310
+ // 2. Update local state - REMOVE all selected rows
311
+ setMeals(prevMeals =>
312
+ prevMeals.filter(meal => !selectedIds.includes(meal.meal_id))
313
+ );
314
+
315
+ // 3. Clear selection
316
+ setSelectedRows({});
317
+
318
+ console.log(`${selectedIds.length} meals deleted successfully`);
319
+ } catch (error) {
320
+ console.error('Failed to delete selected meals:', error);
321
+ // Show error message to user
322
+ }
323
+ };
324
+ ```
325
+
326
+ ### Common Patterns
327
+
328
+ #### Optimistic Updates
329
+
330
+ For better UX, update the UI immediately and rollback on error:
331
+
332
+ ```typescript
333
+ const handleDeleteRow = async (row: Meal) => {
334
+ // 1. Optimistically update UI first
335
+ const originalMeals = meals;
336
+ setMeals(prevMeals =>
337
+ prevMeals.filter(meal => meal.meal_id !== row.meal_id)
338
+ );
339
+
340
+ try {
341
+ // 2. Delete from database
342
+ const { error } = await supabase
343
+ .from('meals')
344
+ .delete()
345
+ .eq('meal_id', row.meal_id);
346
+
347
+ if (error) throw error;
348
+
349
+ console.log('Meal deleted successfully');
350
+ } catch (error) {
351
+ // 3. Rollback on error
352
+ setMeals(originalMeals);
353
+ console.error('Failed to delete meal:', error);
354
+ // Show error message to user
355
+ }
356
+ };
357
+ ```
358
+
178
359
  ## Feature Configuration
179
360
 
180
361
  The DataTable component uses a unified `features` prop to control all table functionality. This provides a consistent and intuitive way to enable or disable features.
@@ -1899,6 +2080,14 @@ const columns: DataTableColumn<User>[] = [
1899
2080
  - **Debug selection state**: Add console logs to verify `onRowSelectionChange` is being called with correct data
1900
2081
  - **Fallback option**: If you don't provide `onDeleteSelected`, the table will fall back to calling `onDeleteRow` for each selected row
1901
2082
 
2083
+ #### 8. CRUD operations work but UI doesn't update
2084
+ - **DataTable is controlled**: You must update your local state after database operations
2085
+ - **Missing state updates**: Add state updates after successful CRUD operations
2086
+ - **See examples above**: Check the CRUD Operations Implementation section for complete examples
2087
+ - **Common issue**: Delete works but row doesn't disappear - you need to filter it from state
2088
+ - **Common issue**: Create works but new row doesn't appear - you need to add it to state
2089
+ - **Common issue**: Edit works but changes don't show - you need to update the row in state
2090
+
1902
2091
  ### Debug Mode
1903
2092
 
1904
2093
  Enable debug logging for DataTable issues: