@jmruthers/pace-core 0.5.184 → 0.5.186

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 (319) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +60 -1
  3. package/core-usage-manifest.json +312 -0
  4. package/dist/{DataTable-QAB34V6K.js → DataTable-IX2NBUTP.js} +6 -6
  5. package/dist/{DataTable-Bz8ffqyA.d.ts → DataTable-Z9NLVJh0.d.ts} +1 -1
  6. package/dist/{index-Bl--n7-T.d.ts → PublicPageProvider-DIzEzwKl.d.ts} +23 -10
  7. package/dist/{UnifiedAuthProvider-7F6T4B6K.js → UnifiedAuthProvider-A4BCQRJY.js} +4 -2
  8. package/dist/{UnifiedAuthProvider-F86d7dSi.d.ts → UnifiedAuthProvider-BG0AL5eE.d.ts} +2 -1
  9. package/dist/{api-ROMBCNKU.js → api-BMFCXVQX.js} +2 -2
  10. package/dist/{chunk-RA3JUFMW.js → chunk-445GEP27.js} +154 -4
  11. package/dist/{chunk-RA3JUFMW.js.map → chunk-445GEP27.js.map} +1 -1
  12. package/dist/{chunk-W22JP75J.js → chunk-DAGICKHT.js} +9 -7
  13. package/dist/chunk-DAGICKHT.js.map +1 -0
  14. package/dist/{chunk-FUEYYMX5.js → chunk-FXFJRTKI.js} +24 -3
  15. package/dist/chunk-FXFJRTKI.js.map +1 -0
  16. package/dist/{chunk-CSOFYHAG.js → chunk-GRIQLQ52.js} +374 -60
  17. package/dist/chunk-GRIQLQ52.js.map +1 -0
  18. package/dist/{chunk-NQPMQGS2.js → chunk-HDCUMOOI.js} +497 -399
  19. package/dist/chunk-HDCUMOOI.js.map +1 -0
  20. package/dist/chunk-HESYZWZW.js +388 -0
  21. package/dist/chunk-HESYZWZW.js.map +1 -0
  22. package/dist/{chunk-QUVSNGIP.js → chunk-HGPQUCBC.js} +34 -9
  23. package/dist/{chunk-QUVSNGIP.js.map → chunk-HGPQUCBC.js.map} +1 -1
  24. package/dist/{chunk-PWAHJW4G.js → chunk-OALXJH4Y.js} +86 -33
  25. package/dist/chunk-OALXJH4Y.js.map +1 -0
  26. package/dist/{chunk-MI7HBHN3.js → chunk-TC7D3CR3.js} +89 -9
  27. package/dist/chunk-TC7D3CR3.js.map +1 -0
  28. package/dist/chunk-THRPYOFK.js +215 -0
  29. package/dist/chunk-THRPYOFK.js.map +1 -0
  30. package/dist/{chunk-M7W4CP3M.js → chunk-U6WNSFX5.js} +2 -1
  31. package/dist/chunk-U6WNSFX5.js.map +1 -0
  32. package/dist/{chunk-UHNYIBXL.js → chunk-UQWSHFVX.js} +1 -1
  33. package/dist/chunk-UQWSHFVX.js.map +1 -0
  34. package/dist/{chunk-QCDXODCA.js → chunk-XAUHJD3L.js} +2 -2
  35. package/dist/components.d.ts +182 -6
  36. package/dist/components.js +157 -11
  37. package/dist/components.js.map +1 -1
  38. package/dist/{database.generated-CBmg2950.d.ts → database.generated-DI89OQeI.d.ts} +63 -9
  39. package/dist/eslint-rules/pace-core-compliance.cjs +406 -0
  40. package/dist/{file-reference-D06mEEWW.d.ts → file-reference-PRTSLxKx.d.ts} +10 -1
  41. package/dist/hooks.d.ts +52 -15
  42. package/dist/hooks.js +12 -22
  43. package/dist/hooks.js.map +1 -1
  44. package/dist/index.d.ts +12 -12
  45. package/dist/index.js +82 -18
  46. package/dist/index.js.map +1 -1
  47. package/dist/providers.d.ts +1 -1
  48. package/dist/providers.js +3 -1
  49. package/dist/rbac/index.d.ts +206 -15
  50. package/dist/rbac/index.js +28 -6
  51. package/dist/timezone-_pgH8qrY.d.ts +530 -0
  52. package/dist/{types-_x1f4QBF.d.ts → types-DUyCRSTj.d.ts} +1 -1
  53. package/dist/types.d.ts +2 -2
  54. package/dist/types.js +1 -1
  55. package/dist/{usePublicRouteParams-JJczomYq.d.ts → usePublicRouteParams-D71QLlg4.d.ts} +114 -3
  56. package/dist/utils.d.ts +110 -152
  57. package/dist/utils.js +128 -138
  58. package/dist/utils.js.map +1 -1
  59. package/docs/api/README.md +60 -1
  60. package/docs/api/classes/ColumnFactory.md +1 -1
  61. package/docs/api/classes/ErrorBoundary.md +1 -1
  62. package/docs/api/classes/InvalidScopeError.md +1 -1
  63. package/docs/api/classes/Logger.md +178 -0
  64. package/docs/api/classes/MissingUserContextError.md +1 -1
  65. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  66. package/docs/api/classes/PermissionDeniedError.md +1 -1
  67. package/docs/api/classes/RBACAuditManager.md +2 -2
  68. package/docs/api/classes/RBACCache.md +1 -1
  69. package/docs/api/classes/RBACEngine.md +2 -2
  70. package/docs/api/classes/RBACError.md +1 -1
  71. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  72. package/docs/api/classes/SecureSupabaseClient.md +5 -5
  73. package/docs/api/classes/StorageUtils.md +1 -1
  74. package/docs/api/enums/FileCategory.md +1 -1
  75. package/docs/api/enums/LogLevel.md +54 -0
  76. package/docs/api/enums/RBACErrorCode.md +1 -1
  77. package/docs/api/enums/RPCFunction.md +1 -1
  78. package/docs/api/interfaces/AggregateConfig.md +1 -1
  79. package/docs/api/interfaces/BadgeProps.md +1 -1
  80. package/docs/api/interfaces/ButtonProps.md +1 -1
  81. package/docs/api/interfaces/CalendarProps.md +18 -2
  82. package/docs/api/interfaces/CardProps.md +1 -1
  83. package/docs/api/interfaces/ColorPalette.md +1 -1
  84. package/docs/api/interfaces/ColorShade.md +1 -1
  85. package/docs/api/interfaces/ComplianceResult.md +30 -0
  86. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  87. package/docs/api/interfaces/DataRecord.md +1 -1
  88. package/docs/api/interfaces/DataTableAction.md +1 -1
  89. package/docs/api/interfaces/DataTableColumn.md +1 -1
  90. package/docs/api/interfaces/DataTableProps.md +1 -1
  91. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  92. package/docs/api/interfaces/DatabaseComplianceResult.md +85 -0
  93. package/docs/api/interfaces/DatabaseIssue.md +41 -0
  94. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  95. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  96. package/docs/api/interfaces/EventAppRoleData.md +6 -6
  97. package/docs/api/interfaces/ExportColumn.md +1 -1
  98. package/docs/api/interfaces/ExportOptions.md +1 -1
  99. package/docs/api/interfaces/FileDisplayProps.md +1 -1
  100. package/docs/api/interfaces/FileMetadata.md +1 -1
  101. package/docs/api/interfaces/FileReference.md +1 -1
  102. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  103. package/docs/api/interfaces/FileUploadOptions.md +48 -8
  104. package/docs/api/interfaces/FileUploadProps.md +46 -13
  105. package/docs/api/interfaces/FooterProps.md +1 -1
  106. package/docs/api/interfaces/FormFieldProps.md +1 -1
  107. package/docs/api/interfaces/FormProps.md +1 -1
  108. package/docs/api/interfaces/GrantEventAppRoleParams.md +9 -9
  109. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  110. package/docs/api/interfaces/InputProps.md +1 -1
  111. package/docs/api/interfaces/LabelProps.md +1 -1
  112. package/docs/api/interfaces/LoggerConfig.md +62 -0
  113. package/docs/api/interfaces/LoginFormProps.md +1 -1
  114. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  115. package/docs/api/interfaces/NavigationContextType.md +1 -1
  116. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  117. package/docs/api/interfaces/NavigationItem.md +1 -1
  118. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  119. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  120. package/docs/api/interfaces/Organisation.md +1 -1
  121. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  122. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  123. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  124. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  125. package/docs/api/interfaces/PaceAppLayoutProps.md +36 -23
  126. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  127. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  128. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  129. package/docs/api/interfaces/PagePermissionGuardProps.md +11 -11
  130. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  131. package/docs/api/interfaces/PaletteData.md +1 -1
  132. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  133. package/docs/api/interfaces/ProgressProps.md +1 -1
  134. package/docs/api/interfaces/ProtectedRouteProps.md +6 -6
  135. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  136. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  137. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  138. package/docs/api/interfaces/QuickFix.md +52 -0
  139. package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
  140. package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
  141. package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
  142. package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
  143. package/docs/api/interfaces/RBACConfig.md +4 -4
  144. package/docs/api/interfaces/RBACContext.md +1 -1
  145. package/docs/api/interfaces/RBACLogger.md +1 -1
  146. package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
  147. package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
  148. package/docs/api/interfaces/RBACPermissionCheckResult.md +1 -1
  149. package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
  150. package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
  151. package/docs/api/interfaces/RBACResult.md +1 -1
  152. package/docs/api/interfaces/RBACRoleGrantParams.md +1 -1
  153. package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
  154. package/docs/api/interfaces/RBACRoleRevokeParams.md +1 -1
  155. package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
  156. package/docs/api/interfaces/RBACRoleValidateParams.md +1 -1
  157. package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
  158. package/docs/api/interfaces/RBACRolesListParams.md +1 -1
  159. package/docs/api/interfaces/RBACRolesListResult.md +1 -1
  160. package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
  161. package/docs/api/interfaces/RBACSessionTrackResult.md +1 -1
  162. package/docs/api/interfaces/ResourcePermissions.md +1 -1
  163. package/docs/api/interfaces/RevokeEventAppRoleParams.md +7 -7
  164. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  165. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  166. package/docs/api/interfaces/RoleManagementResult.md +5 -5
  167. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  168. package/docs/api/interfaces/RouteConfig.md +1 -1
  169. package/docs/api/interfaces/RuntimeComplianceResult.md +55 -0
  170. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  171. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  172. package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
  173. package/docs/api/interfaces/SetupIssue.md +41 -0
  174. package/docs/api/interfaces/StorageConfig.md +1 -1
  175. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  176. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  177. package/docs/api/interfaces/StorageListOptions.md +1 -1
  178. package/docs/api/interfaces/StorageListResult.md +1 -1
  179. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  180. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  181. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  182. package/docs/api/interfaces/StyleImport.md +1 -1
  183. package/docs/api/interfaces/SwitchProps.md +1 -1
  184. package/docs/api/interfaces/TabsContentProps.md +1 -1
  185. package/docs/api/interfaces/TabsListProps.md +1 -1
  186. package/docs/api/interfaces/TabsProps.md +1 -1
  187. package/docs/api/interfaces/TabsTriggerProps.md +1 -1
  188. package/docs/api/interfaces/TextareaProps.md +1 -1
  189. package/docs/api/interfaces/ToastActionElement.md +1 -1
  190. package/docs/api/interfaces/ToastProps.md +1 -1
  191. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  192. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  193. package/docs/api/interfaces/UseFormDialogOptions.md +62 -0
  194. package/docs/api/interfaces/UseFormDialogReturn.md +117 -0
  195. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  196. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  197. package/docs/api/interfaces/UsePublicEventLogoOptions.md +2 -2
  198. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  199. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  200. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  201. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +2 -2
  202. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  203. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  204. package/docs/api/interfaces/UseResolvedScopeOptions.md +2 -2
  205. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  206. package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
  207. package/docs/api/interfaces/UserEventAccess.md +1 -1
  208. package/docs/api/interfaces/UserMenuProps.md +1 -1
  209. package/docs/api/interfaces/UserProfile.md +1 -1
  210. package/docs/api/modules.md +746 -50
  211. package/docs/api-reference/components.md +26 -12
  212. package/docs/api-reference/hooks.md +111 -0
  213. package/docs/api-reference/rpc-functions.md +1 -1
  214. package/docs/api-reference/utilities.md +184 -0
  215. package/docs/getting-started/installation-guide.md +75 -16
  216. package/docs/getting-started/quick-start.md +61 -11
  217. package/docs/implementation-guides/authentication.md +88 -12
  218. package/docs/implementation-guides/file-reference-system.md +26 -3
  219. package/docs/implementation-guides/file-upload-storage.md +30 -1
  220. package/docs/rbac/README.md +1 -0
  221. package/docs/rbac/compliance/compliance-guide.md +544 -0
  222. package/docs/rbac/getting-started.md +158 -33
  223. package/docs/standards/pace-core-compliance.md +432 -0
  224. package/eslint-config-pace-core.cjs +93 -0
  225. package/package.json +15 -3
  226. package/scripts/analyze-bundle.js +232 -0
  227. package/scripts/build-css.js +56 -0
  228. package/scripts/build-docs-incremental.js +1015 -0
  229. package/scripts/check-pace-core-compliance.cjs +2353 -0
  230. package/scripts/check-pace-core-compliance.js +512 -0
  231. package/scripts/generate-docs.js +157 -0
  232. package/scripts/setup-build-cache.js +73 -0
  233. package/scripts/utils/command-runner.js +131 -0
  234. package/scripts/utils/env.js +33 -0
  235. package/scripts/utils/index.js +10 -0
  236. package/scripts/utils/logger.js +88 -0
  237. package/scripts/utils/path-helpers.js +37 -0
  238. package/scripts/validate-formats.js +133 -0
  239. package/scripts/validate-master.js +155 -0
  240. package/scripts/validate-pre-publish.js +140 -0
  241. package/scripts/validate-theme.js +142 -0
  242. package/src/components/Calendar/Calendar.tsx +8 -1
  243. package/src/components/Card/Card.tsx +47 -8
  244. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +314 -0
  245. package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.tsx +126 -0
  246. package/src/components/DatePickerWithTimezone/README.md +135 -0
  247. package/src/components/DatePickerWithTimezone/index.ts +10 -0
  248. package/src/components/DateTimeField/DateTimeField.test.tsx +358 -0
  249. package/src/components/DateTimeField/DateTimeField.tsx +232 -0
  250. package/src/components/DateTimeField/README.md +148 -0
  251. package/src/components/DateTimeField/index.ts +10 -0
  252. package/src/components/FileUpload/FileUpload.test.tsx +2 -0
  253. package/src/components/FileUpload/FileUpload.tsx +10 -1
  254. package/src/components/Header/Header.test.tsx +47 -18
  255. package/src/components/Header/Header.tsx +22 -7
  256. package/src/components/PaceAppLayout/PaceAppLayout.tsx +29 -20
  257. package/src/components/PaceAppLayout/README.md +9 -0
  258. package/src/components/ProtectedRoute/ProtectedRoute.test.tsx +37 -8
  259. package/src/components/ProtectedRoute/ProtectedRoute.tsx +146 -5
  260. package/src/components/index.ts +8 -0
  261. package/src/eslint-rules/pace-core-compliance.cjs +406 -0
  262. package/src/eslint-rules/pace-core-compliance.js +640 -0
  263. package/src/hooks/__tests__/useFormDialog.test.ts +478 -0
  264. package/src/hooks/index.ts +5 -0
  265. package/src/hooks/useFileReference.test.ts +2 -0
  266. package/src/hooks/useFormDialog.ts +147 -0
  267. package/src/hooks/usePreventTabReload.ts +106 -0
  268. package/src/hooks/useSecureDataAccess.ts +2 -2
  269. package/src/index.ts +27 -0
  270. package/src/providers/services/OrganisationServiceProvider.tsx +6 -5
  271. package/src/providers/services/UnifiedAuthProvider.tsx +24 -3
  272. package/src/rbac/__tests__/rbac-role-isolation.test.ts +456 -0
  273. package/src/rbac/__tests__/scenarios.user-role.test.tsx +3 -0
  274. package/src/rbac/compliance/database-validator.ts +165 -0
  275. package/src/rbac/compliance/index.ts +38 -0
  276. package/src/rbac/compliance/quick-fix-suggestions.ts +209 -0
  277. package/src/rbac/compliance/runtime-compliance.ts +77 -0
  278. package/src/rbac/compliance/setup-validator.ts +131 -0
  279. package/src/rbac/components/PagePermissionGuard.tsx +8 -64
  280. package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +35 -21
  281. package/src/rbac/docs/event-based-apps.md +285 -0
  282. package/src/rbac/errors.ts +11 -0
  283. package/src/rbac/hooks/useRoleManagement.ts +292 -12
  284. package/src/rbac/index.ts +30 -0
  285. package/src/services/OrganisationService.ts +4 -0
  286. package/src/styles/core.css +5 -5
  287. package/src/types/database.generated.ts +63 -9
  288. package/src/types/file-reference.ts +9 -0
  289. package/src/utils/__tests__/timezone.test.ts +345 -0
  290. package/src/utils/file-reference/__tests__/file-reference.test.ts +60 -4
  291. package/src/utils/file-reference/index.ts +13 -2
  292. package/src/utils/formatting/formatDateTimeTimezone.test.ts +167 -0
  293. package/src/utils/formatting/formatting.ts +179 -0
  294. package/src/utils/index.ts +27 -1
  295. package/src/utils/location/index.ts +16 -0
  296. package/src/utils/location/location.test.ts +286 -0
  297. package/src/utils/location/location.ts +175 -0
  298. package/src/utils/security/secureDataAccess.ts +1 -1
  299. package/src/utils/storage/helpers.ts +68 -0
  300. package/src/utils/timezone/index.ts +17 -0
  301. package/src/utils/timezone/timezone.test.ts +349 -0
  302. package/src/utils/timezone/timezone.ts +281 -0
  303. package/dist/chunk-CSOFYHAG.js.map +0 -1
  304. package/dist/chunk-FUEYYMX5.js.map +0 -1
  305. package/dist/chunk-HKIT6O7W.js +0 -198
  306. package/dist/chunk-HKIT6O7W.js.map +0 -1
  307. package/dist/chunk-KUEN3HFB.js +0 -94
  308. package/dist/chunk-KUEN3HFB.js.map +0 -1
  309. package/dist/chunk-M7W4CP3M.js.map +0 -1
  310. package/dist/chunk-MI7HBHN3.js.map +0 -1
  311. package/dist/chunk-NQPMQGS2.js.map +0 -1
  312. package/dist/chunk-PWAHJW4G.js.map +0 -1
  313. package/dist/chunk-UHNYIBXL.js.map +0 -1
  314. package/dist/chunk-W22JP75J.js.map +0 -1
  315. package/dist/formatting-5wETwiGF.d.ts +0 -162
  316. /package/dist/{DataTable-QAB34V6K.js.map → DataTable-IX2NBUTP.js.map} +0 -0
  317. /package/dist/{UnifiedAuthProvider-7F6T4B6K.js.map → UnifiedAuthProvider-A4BCQRJY.js.map} +0 -0
  318. /package/dist/{api-ROMBCNKU.js.map → api-BMFCXVQX.js.map} +0 -0
  319. /package/dist/{chunk-QCDXODCA.js.map → chunk-XAUHJD3L.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+ - **useFormDialog Hook**: Generic React hook for managing form dialog state (open/close, form data, reset behavior). Supports both controlled and uncontrolled usage patterns with type-safe form data management.
12
+ - **DateTimeField Component**: Form input component for datetime values with automatic UTC ↔ timezone conversion
13
+ - Supports both ISO string and Date object values
14
+ - Automatic timezone conversion
15
+ - Prevents unwanted conversions during user editing
16
+ - Shows timezone information when not UTC
17
+ - Accessible form field with proper labels
18
+ - **DatePickerWithTimezone Component**: Date picker component with timezone information display
19
+ - Calendar date selection with timezone context
20
+ - Shows "Local" when timezone matches user timezone
21
+ - Optional "Done" button
22
+ - Accessible date selection
23
+ - **Timezone Utilities**: Comprehensive timezone conversion and formatting utilities:
24
+ - `formatInTimeZone` - Format dates in specific timezones using date-fns format strings
25
+ - `getTimezoneAbbreviation` - Get timezone abbreviations (EST, PST, etc.)
26
+ - `formatTimeInTimeZone` - Format time only in a specific timezone
27
+ - `getUserTimeZone` - Get user's browser timezone
28
+ - `toZonedTime` - Convert UTC to timezone's local time representation
29
+ - `fromZonedTime` - Convert local time in timezone to UTC
30
+ - `roundToNearestMinutes` - Round dates to nearest X minutes
31
+ - `getTimeZoneDifference` - Calculate time difference between timezones in hours
32
+ - **Location Utilities**: Geographic coordinate handling utilities:
33
+ - `formatCoordinates` - Format lat/lng to 6 decimal places
34
+ - `hasValidCoordinates` - Validate coordinate object
35
+ - `areCoordinatesEqual` - Compare coordinates with tolerance
36
+ - `getGoogleMapsUrl` - Generate Google Maps search URL
37
+ - **Timezone-Aware Formatting**: Extended formatting utilities with timezone support:
38
+ - `formatDateTimeForDisplay` - Format UTC date for display with timezone
39
+ - `formatDateOnlyForDisplay` - Format date only (no time)
40
+ - `formatDateTimeForTable` - Compact format for tables
41
+ - `formatDateTimeForMap` - Format for map displays
42
+ - **date-fns Dependency**: Added `date-fns` ^3.0.0 (previously only `date-fns-tz` was present)
43
+ - **date-fns-tz Dependency**: Added `date-fns-tz` as a dependency for robust timezone handling
44
+
45
+ ### Changed
46
+ - **Core Usage Manifest**: Updated to include `useFormDialog` hook and all timezone utility functions for compliance checking
47
+
10
48
  ## [0.5.110] - 2025-01-27
11
49
 
12
50
  ### Added
package/README.md CHANGED
@@ -90,7 +90,10 @@ root.render(
90
90
 
91
91
  ### 3. Configure Vite with Tailwind v4
92
92
 
93
- **NEW in v0.4.17+:** Pace-core uses Tailwind v4's CSS-first approach with corrected `@source` directives. This automatically scans the published source files without requiring complex Vite configuration.
93
+ **⚠️ CRITICAL**: This configuration is required for:
94
+ 1. **Tailwind CSS scanning** - Ensures components are styled
95
+ 2. **React context consistency** - Prevents "useUnifiedAuth must be used within a UnifiedAuthProvider" errors
96
+ 3. **Router context availability** - Prevents "useNavigate() may be used only in the context of a <Router>" errors
94
97
 
95
98
  ```typescript
96
99
  // vite.config.ts
@@ -114,6 +117,23 @@ export default defineConfig({
114
117
  alias: {
115
118
  "@": path.resolve(__dirname, "./src"),
116
119
  },
120
+ // CRITICAL: Dedupe React and React Router to ensure single instances
121
+ // This prevents Router context issues when pace-core uses react-router-dom
122
+ dedupe: ['react', 'react-dom', 'react-router-dom']
123
+ },
124
+ // CRITICAL: Exclude pace-core from pre-bundling to prevent React context mismatches
125
+ // Pre-bundling creates separate React instances, causing context errors
126
+ optimizeDeps: {
127
+ include: [
128
+ 'react',
129
+ 'react-dom',
130
+ 'react/jsx-runtime',
131
+ '@radix-ui/react-slot'
132
+ ],
133
+ // CRITICAL: Exclude pace-core from pre-bundling
134
+ // This ensures pace-core uses the same React instance as your app
135
+ // NOTE: react-router-dom should be INCLUDED, not excluded (excluding causes "module is not defined" errors)
136
+ exclude: ['@jmruthers/pace-core']
117
137
  },
118
138
  server: {
119
139
  port: 3000,
@@ -235,6 +255,45 @@ export default defineConfig({
235
255
 
236
256
  ## 🔍 Troubleshooting
237
257
 
258
+ ### Issue: "useUnifiedAuth must be used within a UnifiedAuthProvider"
259
+
260
+ **Cause**: Vite is pre-bundling `@jmruthers/pace-core`, creating separate React instances
261
+
262
+ **Solution**:
263
+ 1. Add to `vite.config.ts`:
264
+ ```typescript
265
+ optimizeDeps: {
266
+ exclude: ['@jmruthers/pace-core', 'react-router-dom']
267
+ }
268
+ ```
269
+ 2. Clear Vite cache: `rm -rf node_modules/.vite`
270
+ 3. Restart dev server
271
+
272
+ ### Issue: "useNavigate() may be used only in the context of a <Router> component"
273
+
274
+ **Cause**: Incorrect provider nesting - BrowserRouter should wrap UnifiedAuthProvider
275
+
276
+ **Solution**:
277
+ 1. Ensure correct nesting order in `main.tsx`:
278
+ ```tsx
279
+ <QueryClientProvider>
280
+ <BrowserRouter>
281
+ <UnifiedAuthProvider>
282
+ <OrganisationProvider>
283
+ <App />
284
+ </OrganisationProvider>
285
+ </UnifiedAuthProvider>
286
+ </BrowserRouter>
287
+ </QueryClientProvider>
288
+ ```
289
+ 2. Do NOT put BrowserRouter inside UnifiedAuthProvider
290
+ 3. Add to `vite.config.ts`:
291
+ ```typescript
292
+ resolve: {
293
+ dedupe: ['react', 'react-dom', 'react-router-dom']
294
+ }
295
+ ```
296
+
238
297
  ### Issue: Only 292 CSS rules instead of 800+
239
298
 
240
299
  **Solution**:
@@ -0,0 +1,312 @@
1
+ {
2
+ "packageName": "@jmruthers/pace-core",
3
+ "version": 1,
4
+ "components": [
5
+ "Alert",
6
+ "Avatar",
7
+ "Badge",
8
+ "Button",
9
+ "Calendar",
10
+ "Card",
11
+ "Checkbox",
12
+ "DataTable",
13
+ "Dialog",
14
+ "ErrorBoundary",
15
+ "EventSelector",
16
+ "FileDisplay",
17
+ "FileUpload",
18
+ "Footer",
19
+ "Form",
20
+ "Header",
21
+ "InactivityWarningModal",
22
+ "Input",
23
+ "Label",
24
+ "LoadingSpinner",
25
+ "LoginForm",
26
+ "NavigationMenu",
27
+ "OrganisationSelector",
28
+ "PaceAppLayout",
29
+ "PaceLoginPage",
30
+ "PasswordChangeForm",
31
+ "PagePermissionGuard",
32
+ "PermissionGuard",
33
+ "PermissionEnforcer",
34
+ "NavigationGuard",
35
+ "Progress",
36
+ "ProtectedRoute",
37
+ "PublicLayout",
38
+ "Select",
39
+ "SessionRestorationLoader",
40
+ "Switch",
41
+ "Table",
42
+ "Tabs",
43
+ "Textarea",
44
+ "Toast",
45
+ "Tooltip",
46
+ "UserMenu",
47
+ "DateTimeField",
48
+ "DatePickerWithTimezone"
49
+ ],
50
+ "hooks": [
51
+ "useAppConfig",
52
+ "useAuthService",
53
+ "useComponentPerformance",
54
+ "useDataTablePerformance",
55
+ "useDataTableState",
56
+ "useDebounce",
57
+ "useEventService",
58
+ "useEventTheme",
59
+ "useEvents",
60
+ "useFileDisplay",
61
+ "useFileReference",
62
+ "useFileReferenceById",
63
+ "useFileReferenceForRecord",
64
+ "useFilesByCategory",
65
+ "useFocusManagement",
66
+ "useFocusTrap",
67
+ "useInactivityService",
68
+ "useInactivityTracker",
69
+ "useIsMobile",
70
+ "useFormDialog",
71
+ "useKeyboardShortcuts",
72
+ "useOrganisationPermissions",
73
+ "useOrganisationSecurity",
74
+ "useOrganisationService",
75
+ "useOrganisations",
76
+ "usePerformanceMonitor",
77
+ "usePublicEvent",
78
+ "usePublicEventLogo",
79
+ "usePublicFileDisplay",
80
+ "usePublicRouteParams",
81
+ "useRBAC",
82
+ "useResolvedScope",
83
+ "useResourcePermissions",
84
+ "usePermissions",
85
+ "useCan",
86
+ "useAccessLevel",
87
+ "useMultiplePermissions",
88
+ "useHasAnyPermission",
89
+ "useHasAllPermissions",
90
+ "useCachedPermissions",
91
+ "useRoleManagement",
92
+ "useSecureSupabase",
93
+ "useSecureDataAccess",
94
+ "useSessionRestoration",
95
+ "useSessionTracking",
96
+ "useStorage",
97
+ "useToast",
98
+ "useUnifiedAuth",
99
+ "useZodForm",
100
+ "useAuthService"
101
+ ],
102
+ "utils": [
103
+ "auditLogger",
104
+ "auditLog",
105
+ "logAuthEvent",
106
+ "logPermissionEvent",
107
+ "logSecurityEvent",
108
+ "logAuditEvent",
109
+ "bundleAnalyzer",
110
+ "validateImportPattern",
111
+ "trackDynamicImport",
112
+ "cn",
113
+ "createLazyComponent",
114
+ "LazyDataTable",
115
+ "createLazyUtility",
116
+ "loadLodash",
117
+ "loadDateUtils",
118
+ "loadChartUtils",
119
+ "loadFormUtils",
120
+ "loadCSVUtils",
121
+ "lazyLodash",
122
+ "lazyDateUtils",
123
+ "lazyChartUtils",
124
+ "lazyFormUtils",
125
+ "lazyCSVUtils",
126
+ "generateDeviceFingerprint",
127
+ "validateDeviceFingerprint",
128
+ "formatDate",
129
+ "formatTime",
130
+ "formatDateTime",
131
+ "formatCurrency",
132
+ "formatNumber",
133
+ "formatPercent",
134
+ "formatCompactNumber",
135
+ "formatFileSize",
136
+ "getAppConfig",
137
+ "setAppConfig",
138
+ "getCurrentAppId",
139
+ "getCurrentAppName",
140
+ "getSecurityHeaders",
141
+ "validateSecurityHeaders",
142
+ "hasPermission",
143
+ "hasAnyPermission",
144
+ "hasAllPermissions",
145
+ "transformPermissionMapToBoolean",
146
+ "parsePermission",
147
+ "PermissionType",
148
+ "isPermitted",
149
+ "isPermittedCached",
150
+ "getAccessLevel",
151
+ "getPermissionMap",
152
+ "setupRBAC",
153
+ "isRBACInitialized",
154
+ "createPerformanceBenchmark",
155
+ "measureRenderPerformance",
156
+ "performanceBudgetMonitor",
157
+ "PERFORMANCE_BUDGETS",
158
+ "clearOrganisationContext",
159
+ "getOrganisationContext",
160
+ "isOrganisationContextAvailable",
161
+ "setOrganisationContext",
162
+ "createSecureDataAccess",
163
+ "securityMonitor",
164
+ "sanitizeUserInput",
165
+ "sanitizeFormData",
166
+ "validateUserInput",
167
+ "usernameSchema",
168
+ "emailSchema",
169
+ "nameSchema",
170
+ "phoneSchema",
171
+ "urlSchema",
172
+ "passwordSchema",
173
+ "pickSchema",
174
+ "combineSchemas",
175
+ "Logger",
176
+ "logger",
177
+ "createLogger",
178
+ "LogLevel",
179
+ "DebugLogger",
180
+ "formatInTimeZone",
181
+ "getTimezoneAbbreviation",
182
+ "formatTimeInTimeZone",
183
+ "getUserTimeZone",
184
+ "toZonedTime",
185
+ "fromZonedTime",
186
+ "roundToNearestMinutes",
187
+ "getTimeZoneDifference",
188
+ "formatCoordinates",
189
+ "hasValidCoordinates",
190
+ "areCoordinatesEqual",
191
+ "getGoogleMapsUrl",
192
+ "formatDateTimeForDisplay",
193
+ "formatDateOnlyForDisplay",
194
+ "formatDateTimeForTable",
195
+ "formatDateTimeForMap"
196
+ ],
197
+ "restrictedImports": [
198
+ {
199
+ "module": "@radix-ui/react-avatar",
200
+ "reason": "Use Avatar component from pace-core instead"
201
+ },
202
+ {
203
+ "module": "@radix-ui/react-checkbox",
204
+ "reason": "Use Checkbox component from pace-core instead"
205
+ },
206
+ {
207
+ "module": "@radix-ui/react-dialog",
208
+ "reason": "Use Dialog component from pace-core instead",
209
+ "importExample": "import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '@jmruthers/pace-core';",
210
+ "usageExample": "<Dialog><DialogTrigger>Open</DialogTrigger><DialogContent>...</DialogContent></Dialog>"
211
+ },
212
+ {
213
+ "module": "@radix-ui/react-label",
214
+ "reason": "Use Label component from pace-core instead"
215
+ },
216
+ {
217
+ "module": "@radix-ui/react-progress",
218
+ "reason": "Use Progress component from pace-core instead"
219
+ },
220
+ {
221
+ "module": "@radix-ui/react-slot",
222
+ "reason": "Use Button component from pace-core which handles slot composition"
223
+ },
224
+ {
225
+ "module": "@radix-ui/react-switch",
226
+ "reason": "Use Switch component from pace-core instead"
227
+ },
228
+ {
229
+ "module": "@radix-ui/react-tabs",
230
+ "reason": "Use Tabs component from pace-core instead"
231
+ },
232
+ {
233
+ "module": "@radix-ui/react-toast",
234
+ "reason": "Use Toast component and useToast hook from pace-core instead"
235
+ },
236
+ {
237
+ "module": "@radix-ui/react-tooltip",
238
+ "reason": "Use Tooltip component from pace-core instead"
239
+ },
240
+ {
241
+ "module": "@radix-ui/react-popover",
242
+ "reason": "Popover component is not yet available in pace-core. Please request it to be added, or use Dialog or Tooltip as alternatives",
243
+ "notAvailable": true,
244
+ "alternatives": ["Dialog", "Tooltip"],
245
+ "importExample": null,
246
+ "usageExample": null
247
+ },
248
+ {
249
+ "module": "react-day-picker",
250
+ "reason": "Use Calendar component from pace-core instead"
251
+ },
252
+ {
253
+ "module": "@tanstack/react-table",
254
+ "reason": "Use DataTable component and related hooks from pace-core instead. DataTable wraps and standardizes table functionality",
255
+ "replacements": {
256
+ "useReactTable": "DataTable (component)",
257
+ "useTable": "DataTable (component)",
258
+ "getCoreRowModel": "DataTable (handled internally)",
259
+ "getFilteredRowModel": "DataTable (handled internally)",
260
+ "getPaginationRowModel": "DataTable (handled internally)",
261
+ "getSortedRowModel": "DataTable (handled internally)"
262
+ },
263
+ "importExample": "import { DataTable, type DataTableColumn, type DataTableProps } from '@jmruthers/pace-core';",
264
+ "usageExample": "<DataTable columns={columns} data={data} />"
265
+ },
266
+ {
267
+ "module": "react-hook-form",
268
+ "reason": "Use Form component and useZodForm hook from pace-core instead",
269
+ "replacements": {
270
+ "useForm": "useZodForm",
271
+ "FormProvider": "Form (component)",
272
+ "Controller": "FormField (component)",
273
+ "useController": "FormField (component)",
274
+ "useFormContext": "Form (component provides context)",
275
+ "useWatch": "Form (component provides context)",
276
+ "useFormState": "Form (component provides context)",
277
+ "useFieldArray": "Form (component provides context)"
278
+ },
279
+ "importExample": "import { Form, FormField, useZodForm, z } from '@jmruthers/pace-core';",
280
+ "usageExample": "const form = useZodForm({ schema: z.object({...}), defaultValues: {...} });"
281
+ },
282
+ {
283
+ "module": "zod",
284
+ "reason": "Import z from pace-core instead of zod directly. pace-core re-exports zod for schema creation",
285
+ "replacements": {
286
+ "z": "z (re-exported from pace-core)"
287
+ },
288
+ "importExample": "import { z } from '@jmruthers/pace-core';",
289
+ "usageExample": "const schema = z.object({ name: z.string().min(1) });"
290
+ },
291
+ {
292
+ "module": "date-fns-tz",
293
+ "reason": "Use timezone utilities from pace-core instead. pace-core provides formatInTimeZone, toZonedTime, fromZonedTime, and other timezone utilities",
294
+ "replacements": {
295
+ "formatInTimeZone": "formatInTimeZone (from pace-core)",
296
+ "toZonedTime": "toZonedTime (from pace-core)",
297
+ "fromZonedTime": "fromZonedTime (from pace-core)",
298
+ "getTimezoneAbbreviation": "getTimezoneAbbreviation (from pace-core)",
299
+ "formatTimeInTimeZone": "formatTimeInTimeZone (from pace-core)",
300
+ "getUserTimeZone": "getUserTimeZone (from pace-core)"
301
+ },
302
+ "importExample": "import { formatInTimeZone, toZonedTime, fromZonedTime, getUserTimeZone } from '@jmruthers/pace-core/utils/timezone';",
303
+ "usageExample": "const formatted = formatInTimeZone(date, 'America/New_York', 'MMM dd, yyyy HH:mm');"
304
+ }
305
+ ],
306
+ "notes": [
307
+ "This file is used by tooling to enforce pace-core usage across consuming apps.",
308
+ "Only include stable primitives; avoid app-specific items.",
309
+ "Restricted imports are third-party libraries that pace-core wraps and standardizes. Consuming apps should use pace-core's API instead of importing these directly."
310
+ ]
311
+ }
312
+
@@ -60,9 +60,9 @@ import {
60
60
  sum,
61
61
  validateHierarchicalData,
62
62
  validatePaginationConfig
63
- } from "./chunk-QUVSNGIP.js";
64
- import "./chunk-RA3JUFMW.js";
65
- import "./chunk-M7W4CP3M.js";
63
+ } from "./chunk-HGPQUCBC.js";
64
+ import "./chunk-445GEP27.js";
65
+ import "./chunk-U6WNSFX5.js";
66
66
  import "./chunk-FSFQFJCU.js";
67
67
  import {
68
68
  CircuitBreaker,
@@ -82,8 +82,8 @@ import {
82
82
  throttle,
83
83
  useDataTablePerformance
84
84
  } from "./chunk-6C4YBBJM.js";
85
- import "./chunk-QCDXODCA.js";
86
- import "./chunk-FUEYYMX5.js";
85
+ import "./chunk-XAUHJD3L.js";
86
+ import "./chunk-FXFJRTKI.js";
87
87
  import "./chunk-QXHPKYJV.js";
88
88
  import "./chunk-R77UEZ4E.js";
89
89
  import "./chunk-F2IMUDXZ.js";
@@ -169,4 +169,4 @@ export {
169
169
  validateHierarchicalData,
170
170
  validatePaginationConfig
171
171
  };
172
- //# sourceMappingURL=DataTable-QAB34V6K.js.map
172
+ //# sourceMappingURL=DataTable-IX2NBUTP.js.map
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { D as DataRecord, a as DataTableColumn, b as DataTableRBACConfig, c as DataTableFeatureConfig, H as HierarchicalConfig, P as PerformanceConfig, S as ServerSideConfig, d as PaginationMode, C as ChunkingConfig, e as SearchIndexConfig, E as ExportOptions, G as GetRowId, f as EmptyStateConfig, A as AggregateConfig, g as DataTableAction } from './types-_x1f4QBF.js';
2
+ import { c as DataRecord, D as DataTableColumn, d as DataTableRBACConfig, e as DataTableFeatureConfig, H as HierarchicalConfig, P as PerformanceConfig, S as ServerSideConfig, f as PaginationMode, C as ChunkingConfig, g as SearchIndexConfig, h as ExportOptions, G as GetRowId, E as EmptyStateConfig, A as AggregateConfig, a as DataTableAction } from './types-DUyCRSTj.js';
3
3
  import React__default from 'react';
4
4
 
5
5
  /**
@@ -1,4 +1,3 @@
1
- import './UnifiedAuthProvider-F86d7dSi.js';
2
1
  import * as React from 'react';
3
2
  import React__default, { Component, ReactNode } from 'react';
4
3
  import * as LabelPrimitive from '@radix-ui/react-label';
@@ -11,16 +10,13 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
11
10
  import * as TabsPrimitive from '@radix-ui/react-tabs';
12
11
  import { DayPickerProps } from 'react-day-picker';
13
12
  import * as ToastPrimitives from '@radix-ui/react-toast';
14
- import './useToast-C8gR5ir4.js';
15
13
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
16
- import './DataTable-Bz8ffqyA.js';
17
- import './types-_x1f4QBF.js';
18
14
  import { FieldValues, DefaultValues, SubmitHandler, SubmitErrorHandler, UseFormReturn, FieldPath, ControllerRenderProps, ControllerFieldState, UseFormStateReturn } from 'react-hook-form';
19
15
  import { z } from 'zod';
20
16
  import { User, SupabaseClient, createClient } from '@supabase/supabase-js';
21
17
  import { P as Permission, A as AccessLevel } from './types-UU913iLA.js';
22
18
  import { E as Event, O as Organisation } from './event-CW5YB_2p.js';
23
- import { b as FileCategory, e as FileUploadResult, U as UploadProgress, c as FileUploadOptions, F as FileReference } from './file-reference-D06mEEWW.js';
19
+ import { F as FileCategory, e as FileUploadResult, U as UploadProgress, c as FileUploadOptions, a as FileReference } from './file-reference-PRTSLxKx.js';
24
20
 
25
21
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
26
22
  /** Visual variant of the button */
@@ -1276,7 +1272,7 @@ declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & Re
1276
1272
  * - Date announcements
1277
1273
  */
1278
1274
 
1279
- interface CalendarProps extends Omit<DayPickerProps, 'className' | 'classNames' | 'styles'> {
1275
+ interface CalendarProps extends Omit<DayPickerProps, 'className' | 'classNames' | 'styles' | 'onSelect'> {
1280
1276
  /**
1281
1277
  * Additional CSS classes to apply to the calendar wrapper
1282
1278
  */
@@ -1285,6 +1281,16 @@ interface CalendarProps extends Omit<DayPickerProps, 'className' | 'classNames'
1285
1281
  * Custom classNames for DayPicker sub-components
1286
1282
  */
1287
1283
  classNames?: DayPickerProps['classNames'];
1284
+ /**
1285
+ * Date selection handler. Signature depends on mode:
1286
+ * - mode="single": (date: Date | undefined) => void
1287
+ * - mode="range": (range: { from: Date; to?: Date } | undefined) => void
1288
+ * - mode="multiple": (dates: Date[]) => void
1289
+ */
1290
+ onSelect?: ((date: Date | undefined) => void) | ((range: {
1291
+ from: Date;
1292
+ to?: Date;
1293
+ } | undefined) => void) | ((dates: Date[]) => void);
1288
1294
  }
1289
1295
  /**
1290
1296
  * Calendar component
@@ -2451,6 +2457,8 @@ interface HeaderProps {
2451
2457
  className?: string;
2452
2458
  /** Show/hide event selector */
2453
2459
  showEventSelector?: boolean;
2460
+ /** Show/hide organisation selector */
2461
+ showOrgSelector?: boolean;
2454
2462
  /** Show/hide user menu */
2455
2463
  showUserMenu?: boolean;
2456
2464
  /** Current path for navigation highlighting */
@@ -2561,7 +2569,7 @@ interface HeaderProps {
2561
2569
  *
2562
2570
  * @since 0.1.0
2563
2571
  */
2564
- declare function Header({ logoUrl, logoAlt, logo, navItems, user, onSignOut, onChangePassword, actions, userMenu, className, showEventSelector, showUserMenu, currentPath, onNavigate, logoHref }: HeaderProps): react_jsx_runtime.JSX.Element;
2572
+ declare function Header({ logoUrl, logoAlt, logo, navItems, user, onSignOut, onChangePassword, actions, userMenu, className, showEventSelector, showOrgSelector, showUserMenu, currentPath, onNavigate, logoHref }: HeaderProps): react_jsx_runtime.JSX.Element;
2565
2573
 
2566
2574
  /**
2567
2575
  * @file Footer Component
@@ -2808,6 +2816,8 @@ interface PaceAppLayoutProps {
2808
2816
  navItems?: NavigationItem[];
2809
2817
  /** Show/hide event selector in the header */
2810
2818
  showEventSelector?: boolean;
2819
+ /** Show/hide organisation selector in the header */
2820
+ showOrgSelector?: boolean;
2811
2821
  /** Custom actions to display in the header (between event selector and user menu) */
2812
2822
  headerActions?: React__default.ReactNode;
2813
2823
  /** Custom logo component (overrides default logo) */
@@ -3015,7 +3025,7 @@ interface PaceAppLayoutProps {
3015
3025
  *
3016
3026
  * @since 0.1.0
3017
3027
  */
3018
- declare function PaceAppLayout({ appName, navItems, showEventSelector, headerActions, customLogo, logoHref, customUserMenu, headerClassName, showUserMenu, enforcePermissions, defaultPermission, routePermissions, permissionFallback, pageIdMapping, strictMode, enforcePagePermissions, pagePermissionFallback, auditLog, onPageAccessDenied, onStrictModeViolation, roleBasedRouting, routeConfig, fallbackRoute, onRouteAccessDenied, onRouteStrictModeViolation }: PaceAppLayoutProps): react_jsx_runtime.JSX.Element;
3028
+ declare function PaceAppLayout({ appName, navItems, showEventSelector, showOrgSelector, headerActions, customLogo, logoHref, customUserMenu, headerClassName, showUserMenu, enforcePermissions, defaultPermission, routePermissions, permissionFallback, pageIdMapping, strictMode, enforcePagePermissions, pagePermissionFallback, auditLog, onPageAccessDenied, onStrictModeViolation, roleBasedRouting, routeConfig, fallbackRoute, onRouteAccessDenied, onRouteStrictModeViolation }: PaceAppLayoutProps): react_jsx_runtime.JSX.Element;
3019
3029
 
3020
3030
  /**
3021
3031
  * @file PACE Login Page Component
@@ -3486,6 +3496,9 @@ interface FileUploadProps {
3486
3496
  organisation_id: string;
3487
3497
  app_id?: string;
3488
3498
  category: FileCategory;
3499
+ folder: string;
3500
+ pageContext: string;
3501
+ event_id?: string;
3489
3502
  accept?: string;
3490
3503
  maxSize?: number;
3491
3504
  multiple?: boolean;
@@ -3499,7 +3512,7 @@ interface FileUploadProps {
3499
3512
  onProgress?: (progress: UploadProgress) => void;
3500
3513
  children?: React__default.ReactNode;
3501
3514
  }
3502
- declare function FileUpload({ supabase, table_name, record_id, organisation_id, app_id, category, accept, maxSize, // 10MB default
3515
+ declare function FileUpload({ supabase, table_name, record_id, organisation_id, app_id, category, folder, pageContext, event_id, accept, maxSize, // 10MB default
3503
3516
  multiple, disabled, isPublic, className, showPreview, showProgress, onUploadSuccess, onUploadError, onProgress, children }: FileUploadProps): react_jsx_runtime.JSX.Element;
3504
3517
 
3505
3518
  interface FileDisplayProps {
@@ -3884,4 +3897,4 @@ declare function usePublicPageContext(): PublicPageContextType;
3884
3897
  */
3885
3898
  declare function useIsPublicPage(): boolean;
3886
3899
 
3887
- export { type TabsProps as $, Alert as A, Button as B, Card as C, Dialog as D, DialogContent as E, DialogHeader as F, DialogBody as G, DialogFooter as H, Input as I, DialogTitle as J, DialogDescription as K, Label as L, Select as M, SelectGroup as N, SelectValue as O, Progress as P, SelectTrigger as Q, SelectContent as R, Switch as S, Textarea as T, SelectLabel as U, SelectItem as V, SelectSeparator as W, Tabs as X, TabsList as Y, TabsTrigger as Z, TabsContent as _, type ButtonProps as a, TableCell as a$, type TabsListProps as a0, type TabsTriggerProps as a1, type TabsContentProps as a2, Calendar as a3, type CalendarProps as a4, Toast as a5, Toaster as a6, ToastAction as a7, ToastProvider as a8, ToastViewport as a9, type PaceAppLayoutProps as aA, PaceLoginPage as aB, type PaceLoginPageProps as aC, ProtectedRoute as aD, type ProtectedRouteProps as aE, ErrorBoundary as aF, LoadingSpinner as aG, SessionRestorationLoader as aH, type SessionRestorationLoaderProps as aI, EventSelector as aJ, OrganisationSelector as aK, PasswordChangeForm as aL, FileUpload as aM, type FileUploadProps as aN, FileDisplay as aO, type FileDisplayProps as aP, useFileReference as aQ, useFileReferenceForRecord as aR, useFileReferenceById as aS, useFilesByCategory as aT, type UseFileReferenceOptions as aU, type UseFileReferenceReturn as aV, type UseFileReferenceForRecordReturn as aW, Table as aX, TableHeader as aY, TableBody as aZ, TableCaption as a_, ToastTitle as aa, ToastDescription as ab, ToastClose as ac, type ToastActionElement as ad, type ToastProps as ae, Tooltip as af, TooltipTrigger as ag, TooltipContent as ah, TooltipProvider as ai, TooltipRoot as aj, Form as ak, FormField as al, type FormProps as am, type FormFieldProps as an, LoginForm as ao, type LoginFormProps as ap, Header as aq, Footer as ar, type FooterProps as as, NavigationMenu as at, type NavigationMenuProps as au, type NavigationItem as av, type NavigationMode as aw, UserMenu as ax, type UserMenuProps as ay, PaceAppLayout as az, CardHeader as b, TableFooter as b0, TableHead as b1, TableRow as b2, PublicPageLayout as b3, PublicPageHeader as b4, PublicPageFooter as b5, PublicPageProvider as b6, usePublicPageContext as b7, useIsPublicPage as b8, type PublicPageLayoutProps as b9, type PublicPageHeaderProps as ba, type PublicPageFooterProps as bb, type CardActionsProps as bc, type DialogProps as bd, type DialogTriggerProps as be, type DialogContentProps as bf, type DialogOverlayProps as bg, type DialogHeaderProps as bh, type DialogFooterProps as bi, type DialogTitleProps as bj, type DialogDescriptionProps as bk, type DialogSize as bl, type OrganisationSelectorProps as bm, type ErrorBoundaryProps as bn, type ErrorBoundaryState as bo, CardFooter as c, CardTitle as d, CardDescription as e, CardContent as f, CardActions as g, type CardProps as h, type InputProps as i, type LabelProps as j, type TextareaProps as k, AlertTitle as l, AlertDescription as m, Avatar as n, AvatarImage as o, AvatarFallback as p, Badge as q, type BadgeProps as r, type BadgeVariant as s, Checkbox as t, type SwitchProps as u, type ProgressProps as v, DialogPortal as w, DialogOverlay as x, DialogTrigger as y, DialogClose as z };
3900
+ export { type DialogOverlayProps as $, Alert as A, Button as B, Card as C, TableCaption as D, TableCell as E, TableFooter as F, TableHead as G, TableRow as H, Input as I, Dialog as J, DialogPortal as K, Label as L, DialogOverlay as M, DialogTrigger as N, DialogClose as O, Progress as P, DialogContent as Q, DialogHeader as R, Switch as S, Textarea as T, DialogBody as U, DialogFooter as V, DialogTitle as W, DialogDescription as X, type DialogProps as Y, type DialogTriggerProps as Z, type DialogContentProps as _, type ButtonProps as a, type FileUploadProps as a$, type DialogHeaderProps as a0, type DialogFooterProps as a1, type DialogTitleProps as a2, type DialogDescriptionProps as a3, type DialogSize as a4, Select as a5, SelectGroup as a6, SelectValue as a7, SelectTrigger as a8, SelectContent as a9, TooltipProvider as aA, TooltipRoot as aB, Form as aC, FormField as aD, type FormProps as aE, type FormFieldProps as aF, LoginForm as aG, type LoginFormProps as aH, Header as aI, Footer as aJ, type FooterProps as aK, ProtectedRoute as aL, type ProtectedRouteProps as aM, NavigationMenu as aN, type NavigationMenuProps as aO, type NavigationItem as aP, OrganisationSelector as aQ, type OrganisationSelectorProps as aR, UserMenu as aS, ErrorBoundary as aT, type ErrorBoundaryProps as aU, type ErrorBoundaryState as aV, LoadingSpinner as aW, SessionRestorationLoader as aX, type SessionRestorationLoaderProps as aY, EventSelector as aZ, FileUpload as a_, SelectLabel as aa, SelectItem as ab, SelectSeparator as ac, Tabs as ad, TabsList as ae, TabsTrigger as af, TabsContent as ag, type TabsProps as ah, type TabsListProps as ai, type TabsTriggerProps as aj, type TabsContentProps as ak, Calendar as al, type CalendarProps as am, Toast as an, Toaster as ao, ToastAction as ap, ToastProvider as aq, ToastViewport as ar, ToastTitle as as, ToastDescription as at, ToastClose as au, type ToastActionElement as av, type ToastProps as aw, Tooltip as ax, TooltipTrigger as ay, TooltipContent as az, CardHeader as b, FileDisplay as b0, type FileDisplayProps as b1, useFileReference as b2, useFileReferenceForRecord as b3, useFileReferenceById as b4, useFilesByCategory as b5, type UseFileReferenceOptions as b6, type UseFileReferenceReturn as b7, type UseFileReferenceForRecordReturn as b8, PublicPageLayout as b9, PublicPageHeader as ba, PublicPageFooter as bb, PublicPageProvider as bc, usePublicPageContext as bd, useIsPublicPage as be, type PublicPageLayoutProps as bf, type PublicPageHeaderProps as bg, type PublicPageFooterProps as bh, type PaceAppLayoutProps as bi, PaceAppLayout as bj, type PaceLoginPageProps as bk, PaceLoginPage as bl, type NavigationMode as bm, type UserMenuProps as bn, PasswordChangeForm as bo, CardFooter as c, CardTitle as d, CardDescription as e, CardContent as f, CardActions as g, type CardProps as h, type CardActionsProps as i, type InputProps as j, type LabelProps as k, type TextareaProps as l, AlertTitle as m, AlertDescription as n, Avatar as o, AvatarImage as p, AvatarFallback as q, Badge as r, type BadgeProps as s, type BadgeVariant as t, Checkbox as u, type SwitchProps as v, type ProgressProps as w, Table as x, TableHeader as y, TableBody as z };
@@ -1,13 +1,15 @@
1
1
  import {
2
+ UnifiedAuthContext,
2
3
  UnifiedAuthProvider,
3
4
  useUnifiedAuth
4
- } from "./chunk-FUEYYMX5.js";
5
+ } from "./chunk-FXFJRTKI.js";
5
6
  import "./chunk-QXHPKYJV.js";
6
7
  import "./chunk-VBXEHIUJ.js";
7
8
  import "./chunk-PWLANIRT.js";
8
9
  import "./chunk-7D4SUZUM.js";
9
10
  export {
11
+ UnifiedAuthContext,
10
12
  UnifiedAuthProvider,
11
13
  useUnifiedAuth
12
14
  };
13
- //# sourceMappingURL=UnifiedAuthProvider-7F6T4B6K.js.map
15
+ //# sourceMappingURL=UnifiedAuthProvider-A4BCQRJY.js.map
@@ -84,6 +84,7 @@ interface UnifiedAuthContextType {
84
84
  sessionRestorationTimedOut: boolean;
85
85
  sessionRestorationTimeoutMs: number;
86
86
  }
87
+ declare const UnifiedAuthContext: React__default.Context<UnifiedAuthContextType | undefined>;
87
88
  declare const useUnifiedAuth: () => UnifiedAuthContextType;
88
89
  interface UnifiedAuthProviderProps {
89
90
  children: React__default.ReactNode;
@@ -110,4 +111,4 @@ persistState, enablePersistence, requireOrganisationContext, idleTimeoutMs, // 3
110
111
  warnBeforeMs, // 60 seconds
111
112
  onIdleLogout, renderInactivityWarning, dangerouslyDisableInactivity }: UnifiedAuthProviderProps): react_jsx_runtime.JSX.Element;
112
113
 
113
- export { type UserEventAccess as U, type UnifiedAuthContextType as a, type UnifiedAuthProviderProps as b, UnifiedAuthProvider as c, useUnifiedAuth as u };
114
+ export { type UserEventAccess as U, type UnifiedAuthContextType as a, UnifiedAuthContext as b, type UnifiedAuthProviderProps as c, UnifiedAuthProvider as d, useUnifiedAuth as u };
@@ -20,7 +20,7 @@ import {
20
20
  isSuperAdmin,
21
21
  resolveAppContext,
22
22
  setupRBAC
23
- } from "./chunk-M7W4CP3M.js";
23
+ } from "./chunk-U6WNSFX5.js";
24
24
  import "./chunk-FSFQFJCU.js";
25
25
  import "./chunk-PWLANIRT.js";
26
26
  import "./chunk-7D4SUZUM.js";
@@ -47,4 +47,4 @@ export {
47
47
  resolveAppContext,
48
48
  setupRBAC
49
49
  };
50
- //# sourceMappingURL=api-ROMBCNKU.js.map
50
+ //# sourceMappingURL=api-BMFCXVQX.js.map