@jmruthers/pace-core 0.5.141 → 0.5.143

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 (158) hide show
  1. package/dist/{DataTable-EGIN2NKK.js → DataTable-SKCX4SCB.js} +6 -6
  2. package/dist/{UnifiedAuthProvider-XIQQ7LVU.js → UnifiedAuthProvider-BMJAP6Z7.js} +3 -3
  3. package/dist/{chunk-22WKWKRX.js → chunk-2AKRP5QZ.js} +4 -4
  4. package/dist/{chunk-4C7EXCAR.js → chunk-CRGFNQ2L.js} +4 -4
  5. package/dist/{chunk-WKTQM2IC.js → chunk-E6ZCVF4T.js} +4 -4
  6. package/dist/{chunk-INQLMHPF.js → chunk-ERGKJX4D.js} +2 -2
  7. package/dist/{chunk-6LAAY47Q.js → chunk-MSHEVJXS.js} +2 -2
  8. package/dist/{chunk-MA6EPSGZ.js → chunk-PKW27QVS.js} +2 -2
  9. package/dist/{chunk-T6JN6LH6.js → chunk-R53TUSFK.js} +3 -3
  10. package/dist/{chunk-PZV3XZKJ.js → chunk-SFVL7ZFI.js} +5 -5
  11. package/dist/{chunk-3R472UXR.js → chunk-VOJBGZYI.js} +3 -3
  12. package/dist/{chunk-ALUN6O3G.js → chunk-VP44VQJ6.js} +25 -14
  13. package/dist/chunk-VP44VQJ6.js.map +1 -0
  14. package/dist/{chunk-YCWDTTUK.js → chunk-WM26XK7I.js} +22 -8
  15. package/dist/chunk-WM26XK7I.js.map +1 -0
  16. package/dist/components.js +8 -8
  17. package/dist/hooks.js +7 -7
  18. package/dist/index.js +11 -11
  19. package/dist/providers.js +2 -2
  20. package/dist/rbac/index.js +7 -7
  21. package/dist/utils.js +1 -1
  22. package/docs/api/classes/ColumnFactory.md +1 -1
  23. package/docs/api/classes/ErrorBoundary.md +1 -1
  24. package/docs/api/classes/InvalidScopeError.md +1 -1
  25. package/docs/api/classes/MissingUserContextError.md +1 -1
  26. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  27. package/docs/api/classes/PermissionDeniedError.md +1 -1
  28. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  29. package/docs/api/classes/RBACAuditManager.md +1 -1
  30. package/docs/api/classes/RBACCache.md +1 -1
  31. package/docs/api/classes/RBACEngine.md +1 -1
  32. package/docs/api/classes/RBACError.md +1 -1
  33. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  34. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  35. package/docs/api/classes/StorageUtils.md +1 -1
  36. package/docs/api/enums/FileCategory.md +1 -1
  37. package/docs/api/interfaces/AggregateConfig.md +1 -1
  38. package/docs/api/interfaces/BadgeProps.md +1 -1
  39. package/docs/api/interfaces/ButtonProps.md +1 -1
  40. package/docs/api/interfaces/CalendarProps.md +1 -1
  41. package/docs/api/interfaces/CardProps.md +1 -1
  42. package/docs/api/interfaces/ColorPalette.md +1 -1
  43. package/docs/api/interfaces/ColorShade.md +1 -1
  44. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  45. package/docs/api/interfaces/DataRecord.md +1 -1
  46. package/docs/api/interfaces/DataTableAction.md +1 -1
  47. package/docs/api/interfaces/DataTableColumn.md +1 -1
  48. package/docs/api/interfaces/DataTableProps.md +1 -1
  49. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  50. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  51. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  52. package/docs/api/interfaces/EventAppRoleData.md +1 -1
  53. package/docs/api/interfaces/EventLogoProps.md +1 -1
  54. package/docs/api/interfaces/ExportColumn.md +1 -1
  55. package/docs/api/interfaces/ExportOptions.md +1 -1
  56. package/docs/api/interfaces/FileDisplayProps.md +1 -1
  57. package/docs/api/interfaces/FileMetadata.md +1 -1
  58. package/docs/api/interfaces/FileReference.md +1 -1
  59. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  60. package/docs/api/interfaces/FileUploadOptions.md +1 -1
  61. package/docs/api/interfaces/FileUploadProps.md +1 -1
  62. package/docs/api/interfaces/FooterProps.md +1 -1
  63. package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
  64. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  65. package/docs/api/interfaces/InputProps.md +1 -1
  66. package/docs/api/interfaces/LabelProps.md +1 -1
  67. package/docs/api/interfaces/LoginFormProps.md +1 -1
  68. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  69. package/docs/api/interfaces/NavigationContextType.md +1 -1
  70. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  71. package/docs/api/interfaces/NavigationItem.md +1 -1
  72. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  73. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  74. package/docs/api/interfaces/Organisation.md +1 -1
  75. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  76. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  77. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  78. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  79. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  80. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  81. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  82. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  83. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  84. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  85. package/docs/api/interfaces/PaletteData.md +1 -1
  86. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  87. package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
  88. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  89. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  90. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  91. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  92. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  93. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  94. package/docs/api/interfaces/RBACConfig.md +1 -1
  95. package/docs/api/interfaces/RBACLogger.md +1 -1
  96. package/docs/api/interfaces/ResourcePermissions.md +1 -1
  97. package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
  98. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  99. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  100. package/docs/api/interfaces/RoleManagementResult.md +1 -1
  101. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  102. package/docs/api/interfaces/RouteConfig.md +1 -1
  103. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  104. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  105. package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
  106. package/docs/api/interfaces/StorageConfig.md +1 -1
  107. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  108. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  109. package/docs/api/interfaces/StorageListOptions.md +1 -1
  110. package/docs/api/interfaces/StorageListResult.md +1 -1
  111. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  112. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  113. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  114. package/docs/api/interfaces/StyleImport.md +1 -1
  115. package/docs/api/interfaces/SwitchProps.md +1 -1
  116. package/docs/api/interfaces/TabsContentProps.md +1 -1
  117. package/docs/api/interfaces/TabsListProps.md +1 -1
  118. package/docs/api/interfaces/TabsProps.md +1 -1
  119. package/docs/api/interfaces/TabsTriggerProps.md +1 -1
  120. package/docs/api/interfaces/TextareaProps.md +1 -1
  121. package/docs/api/interfaces/ToastActionElement.md +1 -1
  122. package/docs/api/interfaces/ToastProps.md +1 -1
  123. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  124. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  125. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  126. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  127. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  128. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  129. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
  130. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  131. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  132. package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
  133. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  134. package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
  135. package/docs/api/interfaces/UserEventAccess.md +1 -1
  136. package/docs/api/interfaces/UserMenuProps.md +1 -1
  137. package/docs/api/interfaces/UserProfile.md +1 -1
  138. package/docs/api/modules.md +2 -2
  139. package/docs/rbac/README.md +11 -5
  140. package/docs/rbac/event-based-apps.md +872 -0
  141. package/package.json +1 -1
  142. package/src/components/NavigationMenu/NavigationMenu.tsx +32 -7
  143. package/src/services/EventService.ts +29 -8
  144. package/src/services/__tests__/EventService.test.ts +48 -8
  145. package/dist/chunk-ALUN6O3G.js.map +0 -1
  146. package/dist/chunk-YCWDTTUK.js.map +0 -1
  147. package/src/rbac/docs/event-based-apps.md +0 -285
  148. /package/dist/{DataTable-EGIN2NKK.js.map → DataTable-SKCX4SCB.js.map} +0 -0
  149. /package/dist/{UnifiedAuthProvider-XIQQ7LVU.js.map → UnifiedAuthProvider-BMJAP6Z7.js.map} +0 -0
  150. /package/dist/{chunk-22WKWKRX.js.map → chunk-2AKRP5QZ.js.map} +0 -0
  151. /package/dist/{chunk-4C7EXCAR.js.map → chunk-CRGFNQ2L.js.map} +0 -0
  152. /package/dist/{chunk-WKTQM2IC.js.map → chunk-E6ZCVF4T.js.map} +0 -0
  153. /package/dist/{chunk-INQLMHPF.js.map → chunk-ERGKJX4D.js.map} +0 -0
  154. /package/dist/{chunk-6LAAY47Q.js.map → chunk-MSHEVJXS.js.map} +0 -0
  155. /package/dist/{chunk-MA6EPSGZ.js.map → chunk-PKW27QVS.js.map} +0 -0
  156. /package/dist/{chunk-T6JN6LH6.js.map → chunk-R53TUSFK.js.map} +0 -0
  157. /package/dist/{chunk-PZV3XZKJ.js.map → chunk-SFVL7ZFI.js.map} +0 -0
  158. /package/dist/{chunk-3R472UXR.js.map → chunk-VOJBGZYI.js.map} +0 -0
@@ -60,8 +60,8 @@ import {
60
60
  sum,
61
61
  validateHierarchicalData,
62
62
  validatePaginationConfig
63
- } from "./chunk-WKTQM2IC.js";
64
- import "./chunk-3R472UXR.js";
63
+ } from "./chunk-E6ZCVF4T.js";
64
+ import "./chunk-VOJBGZYI.js";
65
65
  import "./chunk-BVYWGZVV.js";
66
66
  import "./chunk-SBVILCCA.js";
67
67
  import {
@@ -82,9 +82,9 @@ import {
82
82
  throttle,
83
83
  useDataTablePerformance
84
84
  } from "./chunk-BESYRHQM.js";
85
- import "./chunk-MA6EPSGZ.js";
86
- import "./chunk-6LAAY47Q.js";
87
- import "./chunk-YCWDTTUK.js";
85
+ import "./chunk-PKW27QVS.js";
86
+ import "./chunk-MSHEVJXS.js";
87
+ import "./chunk-WM26XK7I.js";
88
88
  import "./chunk-OWAG3GSU.js";
89
89
  import "./chunk-Q5QRDWKI.js";
90
90
  import "./chunk-56XJ3TU6.js";
@@ -170,4 +170,4 @@ export {
170
170
  validateHierarchicalData,
171
171
  validatePaginationConfig
172
172
  };
173
- //# sourceMappingURL=DataTable-EGIN2NKK.js.map
173
+ //# sourceMappingURL=DataTable-SKCX4SCB.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  init_UnifiedAuthProvider
3
- } from "./chunk-6LAAY47Q.js";
3
+ } from "./chunk-MSHEVJXS.js";
4
4
  import {
5
5
  UnifiedAuthProvider,
6
6
  useUnifiedAuth
7
- } from "./chunk-YCWDTTUK.js";
7
+ } from "./chunk-WM26XK7I.js";
8
8
  import "./chunk-7QCC6MCP.js";
9
9
  import "./chunk-XDNLUEXI.js";
10
10
  import "./chunk-PLDDJCW6.js";
@@ -13,4 +13,4 @@ export {
13
13
  UnifiedAuthProvider,
14
14
  useUnifiedAuth
15
15
  };
16
- //# sourceMappingURL=UnifiedAuthProvider-XIQQ7LVU.js.map
16
+ //# sourceMappingURL=UnifiedAuthProvider-BMJAP6Z7.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  init_OrganisationProvider,
3
3
  usePublicPageContext
4
- } from "./chunk-4C7EXCAR.js";
4
+ } from "./chunk-CRGFNQ2L.js";
5
5
  import {
6
6
  init_useOrganisations,
7
7
  useOrganisations
8
- } from "./chunk-MA6EPSGZ.js";
8
+ } from "./chunk-PKW27QVS.js";
9
9
  import {
10
10
  useUnifiedAuth
11
- } from "./chunk-YCWDTTUK.js";
11
+ } from "./chunk-WM26XK7I.js";
12
12
  import {
13
13
  init_logger,
14
14
  logger
@@ -662,4 +662,4 @@ export {
662
662
  generatePublicRoutePath,
663
663
  extractEventCodeFromPath
664
664
  };
665
- //# sourceMappingURL=chunk-22WKWKRX.js.map
665
+ //# sourceMappingURL=chunk-2AKRP5QZ.js.map
@@ -2,17 +2,17 @@ import {
2
2
  init_useOrganisations,
3
3
  useEvents,
4
4
  useOrganisations
5
- } from "./chunk-MA6EPSGZ.js";
5
+ } from "./chunk-PKW27QVS.js";
6
6
  import {
7
7
  init_UnifiedAuthProvider
8
- } from "./chunk-6LAAY47Q.js";
8
+ } from "./chunk-MSHEVJXS.js";
9
9
  import {
10
10
  OrganisationServiceContext,
11
11
  OrganisationServiceProvider,
12
12
  init_OrganisationServiceProvider,
13
13
  useOrganisationService,
14
14
  useUnifiedAuth
15
- } from "./chunk-YCWDTTUK.js";
15
+ } from "./chunk-WM26XK7I.js";
16
16
  import {
17
17
  cn
18
18
  } from "./chunk-56XJ3TU6.js";
@@ -1690,4 +1690,4 @@ export {
1690
1690
  clearPublicFileDisplayCache,
1691
1691
  getPublicFileDisplayCacheStats
1692
1692
  };
1693
- //# sourceMappingURL=chunk-4C7EXCAR.js.map
1693
+ //# sourceMappingURL=chunk-CRGFNQ2L.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  useCan,
3
3
  useResolvedScope
4
- } from "./chunk-3R472UXR.js";
4
+ } from "./chunk-VOJBGZYI.js";
5
5
  import {
6
6
  toast,
7
7
  useDataTablePerformance
8
8
  } from "./chunk-BESYRHQM.js";
9
9
  import {
10
10
  init_UnifiedAuthProvider
11
- } from "./chunk-6LAAY47Q.js";
11
+ } from "./chunk-MSHEVJXS.js";
12
12
  import {
13
13
  useUnifiedAuth
14
- } from "./chunk-YCWDTTUK.js";
14
+ } from "./chunk-WM26XK7I.js";
15
15
  import {
16
16
  renderSafeHtml
17
17
  } from "./chunk-OWAG3GSU.js";
@@ -12726,4 +12726,4 @@ lodash/lodash.js:
12726
12726
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
12727
12727
  *)
12728
12728
  */
12729
- //# sourceMappingURL=chunk-WKTQM2IC.js.map
12729
+ //# sourceMappingURL=chunk-E6ZCVF4T.js.map
@@ -4,7 +4,7 @@ import {
4
4
  init_InactivityServiceProvider,
5
5
  init_OrganisationServiceProvider,
6
6
  init_UnifiedAuthProvider
7
- } from "./chunk-YCWDTTUK.js";
7
+ } from "./chunk-WM26XK7I.js";
8
8
 
9
9
  // src/providers/index.ts
10
10
  init_UnifiedAuthProvider();
@@ -12,4 +12,4 @@ init_EventServiceProvider();
12
12
  init_OrganisationServiceProvider();
13
13
  init_InactivityServiceProvider();
14
14
  init_AuthServiceProvider();
15
- //# sourceMappingURL=chunk-INQLMHPF.js.map
15
+ //# sourceMappingURL=chunk-ERGKJX4D.js.map
@@ -2,7 +2,7 @@ import {
2
2
  UnifiedAuthProvider,
3
3
  init_UnifiedAuthProvider,
4
4
  useUnifiedAuth
5
- } from "./chunk-YCWDTTUK.js";
5
+ } from "./chunk-WM26XK7I.js";
6
6
  import {
7
7
  __esm,
8
8
  __export
@@ -24,4 +24,4 @@ export {
24
24
  UnifiedAuthProvider_exports,
25
25
  init_UnifiedAuthProvider2 as init_UnifiedAuthProvider
26
26
  };
27
- //# sourceMappingURL=chunk-6LAAY47Q.js.map
27
+ //# sourceMappingURL=chunk-MSHEVJXS.js.map
@@ -3,7 +3,7 @@ import {
3
3
  init_useOrganisationService,
4
4
  useEventService2 as useEventService,
5
5
  useOrganisationService2 as useOrganisationService
6
- } from "./chunk-YCWDTTUK.js";
6
+ } from "./chunk-WM26XK7I.js";
7
7
  import {
8
8
  __esm
9
9
  } from "./chunk-PLDDJCW6.js";
@@ -58,4 +58,4 @@ export {
58
58
  init_useOrganisations,
59
59
  useEvents
60
60
  };
61
- //# sourceMappingURL=chunk-MA6EPSGZ.js.map
61
+ //# sourceMappingURL=chunk-PKW27QVS.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  init_useOrganisations,
3
3
  useOrganisations
4
- } from "./chunk-MA6EPSGZ.js";
4
+ } from "./chunk-PKW27QVS.js";
5
5
  import {
6
6
  EventServiceContext,
7
7
  init_EventServiceProvider,
8
8
  useUnifiedAuth
9
- } from "./chunk-YCWDTTUK.js";
9
+ } from "./chunk-WM26XK7I.js";
10
10
  import {
11
11
  init_organisationContext,
12
12
  setOrganisationContext
@@ -394,4 +394,4 @@ function useSecureDataAccess() {
394
394
  export {
395
395
  useSecureDataAccess
396
396
  };
397
- //# sourceMappingURL=chunk-T6JN6LH6.js.map
397
+ //# sourceMappingURL=chunk-R53TUSFK.js.map
@@ -3,7 +3,7 @@ import {
3
3
  useAccessLevel,
4
4
  useCan,
5
5
  useMultiplePermissions
6
- } from "./chunk-3R472UXR.js";
6
+ } from "./chunk-VOJBGZYI.js";
7
7
  import {
8
8
  OrganisationContextRequiredError,
9
9
  RBACCache,
@@ -12,13 +12,13 @@ import {
12
12
  } from "./chunk-BVYWGZVV.js";
13
13
  import {
14
14
  useSecureDataAccess
15
- } from "./chunk-T6JN6LH6.js";
15
+ } from "./chunk-R53TUSFK.js";
16
16
  import {
17
17
  init_UnifiedAuthProvider
18
- } from "./chunk-6LAAY47Q.js";
18
+ } from "./chunk-MSHEVJXS.js";
19
19
  import {
20
20
  useUnifiedAuth
21
- } from "./chunk-YCWDTTUK.js";
21
+ } from "./chunk-WM26XK7I.js";
22
22
  import {
23
23
  getCurrentAppName
24
24
  } from "./chunk-Q5QRDWKI.js";
@@ -1898,4 +1898,4 @@ export {
1898
1898
  getPermissionsForRole,
1899
1899
  ALL_PERMISSIONS
1900
1900
  };
1901
- //# sourceMappingURL=chunk-PZV3XZKJ.js.map
1901
+ //# sourceMappingURL=chunk-SFVL7ZFI.js.map
@@ -11,11 +11,11 @@ import {
11
11
  init_useOrganisations,
12
12
  useEvents,
13
13
  useOrganisations
14
- } from "./chunk-MA6EPSGZ.js";
14
+ } from "./chunk-PKW27QVS.js";
15
15
  import {
16
16
  init_UnifiedAuthProvider,
17
17
  useUnifiedAuth
18
- } from "./chunk-YCWDTTUK.js";
18
+ } from "./chunk-WM26XK7I.js";
19
19
  import {
20
20
  getCurrentAppName
21
21
  } from "./chunk-Q5QRDWKI.js";
@@ -968,4 +968,4 @@ export {
968
968
  useResourcePermissions,
969
969
  useRoleManagement
970
970
  };
971
- //# sourceMappingURL=chunk-3R472UXR.js.map
971
+ //# sourceMappingURL=chunk-VOJBGZYI.js.map
@@ -25,13 +25,13 @@ import {
25
25
  SelectSeparator,
26
26
  SelectTrigger,
27
27
  SelectValue
28
- } from "./chunk-WKTQM2IC.js";
28
+ } from "./chunk-E6ZCVF4T.js";
29
29
  import {
30
30
  useCan,
31
31
  usePermissions,
32
32
  useRBAC,
33
33
  useResolvedScope
34
- } from "./chunk-3R472UXR.js";
34
+ } from "./chunk-VOJBGZYI.js";
35
35
  import {
36
36
  isSuperAdmin
37
37
  } from "./chunk-BVYWGZVV.js";
@@ -50,7 +50,7 @@ import {
50
50
  useIsPublicPage,
51
51
  usePublicFileDisplay,
52
52
  usePublicPageContext
53
- } from "./chunk-4C7EXCAR.js";
53
+ } from "./chunk-CRGFNQ2L.js";
54
54
  import {
55
55
  useToast
56
56
  } from "./chunk-BESYRHQM.js";
@@ -58,11 +58,11 @@ import {
58
58
  init_useOrganisations,
59
59
  useEvents,
60
60
  useOrganisations
61
- } from "./chunk-MA6EPSGZ.js";
61
+ } from "./chunk-PKW27QVS.js";
62
62
  import {
63
63
  UnifiedAuthProvider_exports,
64
64
  init_UnifiedAuthProvider as init_UnifiedAuthProvider2
65
- } from "./chunk-6LAAY47Q.js";
65
+ } from "./chunk-MSHEVJXS.js";
66
66
  import {
67
67
  EventServiceContext,
68
68
  EventServiceProvider,
@@ -72,7 +72,7 @@ import {
72
72
  useEventService,
73
73
  useSessionRestoration,
74
74
  useUnifiedAuth
75
- } from "./chunk-YCWDTTUK.js";
75
+ } from "./chunk-WM26XK7I.js";
76
76
  import {
77
77
  LoadingSpinner,
78
78
  getAppId
@@ -1152,13 +1152,16 @@ var NavigationMenu = React12.forwardRef(({
1152
1152
  } catch (error) {
1153
1153
  logger.warn("NavigationMenu", "useRBAC not available, permission filtering disabled");
1154
1154
  }
1155
+ const eventLoadingRaw = authContext?.eventLoading;
1156
+ const eventLoading = eventLoadingRaw ?? false;
1157
+ const selectedEvent = authContext?.selectedEvent || null;
1158
+ const orgContextReady = authContext?.isContextReady ?? (authContext?.selectedOrganisation?.id ? true : false);
1155
1159
  const { supabase } = authContext || {};
1156
1160
  const { selectedOrganisation } = authContext || {};
1157
- const selectedEvent = authContext?.selectedEvent || null;
1158
1161
  const { resolvedScope, isLoading: scopeLoading } = useResolvedScope({
1159
- supabase: supabase || null,
1160
- selectedOrganisationId: selectedOrganisation?.id || null,
1161
- selectedEventId: selectedEvent?.event_id || null
1162
+ supabase: filterByPermissions ? supabase || null : null,
1163
+ selectedOrganisationId: filterByPermissions ? selectedOrganisation?.id || null : null,
1164
+ selectedEventId: filterByPermissions ? selectedEvent?.event_id || null : null
1162
1165
  });
1163
1166
  const stableScopeRef = React12.useRef({
1164
1167
  organisationId: "",
@@ -1194,7 +1197,9 @@ var NavigationMenu = React12.forwardRef(({
1194
1197
  const previousFilteredItemsRef = React12.useRef([]);
1195
1198
  const filteredItems = React12.useMemo(() => {
1196
1199
  if (filterByPermissions) {
1197
- if (!authContext || !rbacContext || scopeLoading || !resolvedScope?.organisationId) {
1200
+ const isOrgContextReady = orgContextReady && selectedOrganisation?.id;
1201
+ const isEventContextReady = eventLoadingRaw === void 0 ? true : !eventLoading;
1202
+ if (!authContext || !rbacContext || scopeLoading || !isOrgContextReady || !isEventContextReady) {
1198
1203
  return [];
1199
1204
  }
1200
1205
  if (permissionsLoading) {
@@ -1329,7 +1334,13 @@ var NavigationMenu = React12.forwardRef(({
1329
1334
  scopeLoading,
1330
1335
  permissionsLoading,
1331
1336
  resolvedScope,
1332
- auditLog
1337
+ auditLog,
1338
+ // Add event context state to dependencies so we re-check permissions when event context becomes available
1339
+ eventLoadingRaw,
1340
+ eventLoading,
1341
+ selectedEvent,
1342
+ orgContextReady,
1343
+ selectedOrganisation?.id
1333
1344
  ]);
1334
1345
  React12.useEffect(() => {
1335
1346
  if (auditLog && authContext) {
@@ -1916,7 +1927,7 @@ function PaceAppLayout({
1916
1927
  }
1917
1928
  }
1918
1929
  if (hasAccess && currentRoute.roles && currentRoute.roles.length > 0 && user?.id) {
1919
- const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-XIQQ7LVU.js");
1930
+ const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-BMJAP6Z7.js");
1920
1931
  hasAccess = true;
1921
1932
  }
1922
1933
  if (!isMounted) return;
@@ -4553,4 +4564,4 @@ export {
4553
4564
  EventLogoCompact,
4554
4565
  EventLogoLarge
4555
4566
  };
4556
- //# sourceMappingURL=chunk-ALUN6O3G.js.map
4567
+ //# sourceMappingURL=chunk-VP44VQJ6.js.map