@jmruthers/pace-core 0.5.136 → 0.5.139

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 (292) hide show
  1. package/dist/{DataTable-CYOHOX3O.js → DataTable-JXFCA2BJ.js} +10 -9
  2. package/dist/{EventLogo-801uofbR.d.ts → EventLogo-rFL_kRjk.d.ts} +73 -1
  3. package/dist/{UnifiedAuthProvider-5E5TUNMS.js → UnifiedAuthProvider-XIQQ7LVU.js} +4 -5
  4. package/dist/{chunk-YLKIDTUK.js → chunk-22WKWKRX.js} +4 -4
  5. package/dist/{chunk-TVYPTYOY.js → chunk-4C7EXCAR.js} +60 -24
  6. package/dist/chunk-4C7EXCAR.js.map +1 -0
  7. package/dist/{chunk-NOHEVYVX.js → chunk-5JMOHWDI.js} +417 -319
  8. package/dist/chunk-5JMOHWDI.js.map +1 -0
  9. package/dist/{chunk-FHWWBIHA.js → chunk-6DXZ6V5Q.js} +5 -5
  10. package/dist/{chunk-2TWNJ46Y.js → chunk-6LAAY47Q.js} +2 -2
  11. package/dist/{chunk-444EZN6N.js → chunk-7QCC6MCP.js} +88 -1
  12. package/dist/chunk-7QCC6MCP.js.map +1 -0
  13. package/dist/chunk-BJPBT3CU.js +21 -0
  14. package/dist/chunk-BJPBT3CU.js.map +1 -0
  15. package/dist/{chunk-L6PGMCMD.js → chunk-BOOI7GK2.js} +38 -12
  16. package/dist/chunk-BOOI7GK2.js.map +1 -0
  17. package/dist/{chunk-XARJS7CD.js → chunk-INQLMHPF.js} +2 -2
  18. package/dist/chunk-JISYG63F.js +70 -0
  19. package/dist/chunk-JISYG63F.js.map +1 -0
  20. package/dist/{chunk-SL2YQDR6.js → chunk-MA6EPSGZ.js} +2 -2
  21. package/dist/{chunk-5DPZ5EAT.js → chunk-OWAG3GSU.js} +1 -3
  22. package/dist/{chunk-LTV3XIJJ.js → chunk-T6JN6LH6.js} +4 -4
  23. package/dist/{chunk-HJGGOMQ6.js → chunk-TLT2ZR3L.js} +147 -103
  24. package/dist/chunk-TLT2ZR3L.js.map +1 -0
  25. package/dist/{chunk-4MT5BGGL.js → chunk-YCWDTTUK.js} +4 -6
  26. package/dist/{chunk-4MT5BGGL.js.map → chunk-YCWDTTUK.js.map} +1 -1
  27. package/dist/components.d.ts +1 -1
  28. package/dist/components.js +12 -11
  29. package/dist/components.js.map +1 -1
  30. package/dist/hooks.js +8 -9
  31. package/dist/hooks.js.map +1 -1
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +15 -14
  34. package/dist/index.js.map +1 -1
  35. package/dist/providers.js +3 -4
  36. package/dist/rbac/index.js +8 -9
  37. package/dist/schema-DTDZQe2u.d.ts +28 -0
  38. package/dist/types.d.ts +152 -3
  39. package/dist/types.js +51 -16
  40. package/dist/types.js.map +1 -1
  41. package/dist/utils.d.ts +89 -4
  42. package/dist/utils.js +214 -96
  43. package/dist/utils.js.map +1 -1
  44. package/dist/validation.d.ts +1 -343
  45. package/dist/validation.js +3 -100
  46. package/docs/api/classes/ColumnFactory.md +1 -1
  47. package/docs/api/classes/ErrorBoundary.md +1 -1
  48. package/docs/api/classes/InvalidScopeError.md +1 -1
  49. package/docs/api/classes/MissingUserContextError.md +1 -1
  50. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  51. package/docs/api/classes/PermissionDeniedError.md +1 -1
  52. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  53. package/docs/api/classes/RBACAuditManager.md +1 -1
  54. package/docs/api/classes/RBACCache.md +1 -1
  55. package/docs/api/classes/RBACEngine.md +1 -1
  56. package/docs/api/classes/RBACError.md +1 -1
  57. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  58. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  59. package/docs/api/classes/StorageUtils.md +1 -1
  60. package/docs/api/enums/FileCategory.md +1 -1
  61. package/docs/api/interfaces/AggregateConfig.md +1 -1
  62. package/docs/api/interfaces/BadgeProps.md +27 -0
  63. package/docs/api/interfaces/ButtonProps.md +1 -1
  64. package/docs/api/interfaces/CardProps.md +1 -1
  65. package/docs/api/interfaces/ColorPalette.md +1 -1
  66. package/docs/api/interfaces/ColorShade.md +1 -1
  67. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  68. package/docs/api/interfaces/DataRecord.md +1 -1
  69. package/docs/api/interfaces/DataTableAction.md +1 -1
  70. package/docs/api/interfaces/DataTableColumn.md +1 -1
  71. package/docs/api/interfaces/DataTableProps.md +1 -1
  72. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  73. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  74. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  75. package/docs/api/interfaces/EventAppRoleData.md +1 -1
  76. package/docs/api/interfaces/EventLogoProps.md +1 -1
  77. package/docs/api/interfaces/ExportColumn.md +1 -1
  78. package/docs/api/interfaces/ExportOptions.md +1 -1
  79. package/docs/api/interfaces/FileDisplayProps.md +1 -1
  80. package/docs/api/interfaces/FileMetadata.md +1 -1
  81. package/docs/api/interfaces/FileReference.md +1 -1
  82. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  83. package/docs/api/interfaces/FileUploadOptions.md +1 -1
  84. package/docs/api/interfaces/FileUploadProps.md +1 -1
  85. package/docs/api/interfaces/FooterProps.md +1 -1
  86. package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
  87. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  88. package/docs/api/interfaces/InputProps.md +1 -1
  89. package/docs/api/interfaces/LabelProps.md +1 -1
  90. package/docs/api/interfaces/LoginFormProps.md +1 -1
  91. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  92. package/docs/api/interfaces/NavigationContextType.md +1 -1
  93. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  94. package/docs/api/interfaces/NavigationItem.md +1 -1
  95. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  96. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  97. package/docs/api/interfaces/Organisation.md +1 -1
  98. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  99. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  100. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  101. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  102. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  103. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  104. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  105. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  106. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  107. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  108. package/docs/api/interfaces/PaletteData.md +1 -1
  109. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  110. package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
  111. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  112. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  113. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  114. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  115. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  116. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  117. package/docs/api/interfaces/RBACConfig.md +1 -1
  118. package/docs/api/interfaces/RBACLogger.md +1 -1
  119. package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
  120. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  121. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  122. package/docs/api/interfaces/RoleManagementResult.md +1 -1
  123. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  124. package/docs/api/interfaces/RouteConfig.md +1 -1
  125. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  126. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  127. package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
  128. package/docs/api/interfaces/StorageConfig.md +1 -1
  129. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  130. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  131. package/docs/api/interfaces/StorageListOptions.md +1 -1
  132. package/docs/api/interfaces/StorageListResult.md +1 -1
  133. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  134. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  135. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  136. package/docs/api/interfaces/StyleImport.md +1 -1
  137. package/docs/api/interfaces/SwitchProps.md +1 -1
  138. package/docs/api/interfaces/ToastActionElement.md +1 -1
  139. package/docs/api/interfaces/ToastProps.md +1 -1
  140. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  141. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  142. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  143. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  144. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  145. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  146. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
  147. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  148. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  149. package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
  150. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  151. package/docs/api/interfaces/UserEventAccess.md +1 -1
  152. package/docs/api/interfaces/UserMenuProps.md +1 -1
  153. package/docs/api/interfaces/UserProfile.md +1 -1
  154. package/docs/api/modules.md +84 -15
  155. package/docs/architecture/README.md +0 -1
  156. package/docs/styles/README.md +0 -2
  157. package/examples/RBAC/CompleteRBACExample.tsx +324 -0
  158. package/examples/RBAC/EventBasedApp.tsx +239 -0
  159. package/examples/RBAC/PermissionExample.tsx +151 -0
  160. package/examples/RBAC/index.ts +13 -0
  161. package/examples/public-pages/CorrectPublicPageImplementation.tsx +301 -0
  162. package/examples/public-pages/PublicEventPage.tsx +274 -0
  163. package/examples/public-pages/PublicPageApp.tsx +308 -0
  164. package/examples/public-pages/PublicPageUsageExample.tsx +216 -0
  165. package/examples/public-pages/index.ts +14 -0
  166. package/package.json +1 -10
  167. package/src/__tests__/TEST_STANDARD.md +92 -0
  168. package/src/components/Badge/Badge.test.tsx +314 -0
  169. package/src/components/Badge/Badge.tsx +304 -0
  170. package/src/components/Badge/index.ts +3 -0
  171. package/src/components/DataTable/__tests__/DataTableCore.test-setup.ts +217 -0
  172. package/src/components/DataTable/__tests__/styles.test.ts +1 -1
  173. package/src/components/DataTable/components/ColumnFilter.tsx +8 -4
  174. package/src/components/DataTable/components/DataTableBody.tsx +461 -0
  175. package/src/components/DataTable/components/DraggableColumnHeader.tsx +144 -0
  176. package/src/components/DataTable/components/FilterRow.tsx +9 -3
  177. package/src/components/DataTable/components/PaginationControls.tsx +1 -0
  178. package/src/components/DataTable/components/VirtualizedDataTable.tsx +513 -0
  179. package/src/components/DataTable/components/__tests__/AccessDeniedPage.test.tsx +14 -68
  180. package/src/components/DataTable/components/__tests__/ColumnFilter.test.tsx +62 -0
  181. package/src/components/DataTable/components/__tests__/FilterRow.test.tsx +43 -0
  182. package/src/components/DataTable/core/ActionManager.ts +235 -0
  183. package/src/components/DataTable/core/ColumnManager.ts +205 -0
  184. package/src/components/DataTable/core/DataManager.ts +188 -0
  185. package/src/components/DataTable/core/DataTableContext.tsx +181 -0
  186. package/src/components/DataTable/core/LocalDataAdapter.ts +273 -0
  187. package/src/components/DataTable/core/PluginRegistry.ts +229 -0
  188. package/src/components/DataTable/core/StateManager.ts +311 -0
  189. package/src/components/DataTable/core/interfaces.ts +338 -0
  190. package/src/components/DataTable/styles.ts +27 -6
  191. package/src/components/DataTable/utils/__tests__/columnUtils.test.ts +94 -0
  192. package/src/components/DataTable/utils/columnUtils.ts +40 -0
  193. package/src/components/DataTable/utils/debugTools.ts +609 -0
  194. package/src/components/DataTable/utils/index.ts +1 -0
  195. package/src/components/Dialog/README.md +804 -0
  196. package/src/components/Dialog/utils/__tests__/safeHtml.unit.test.ts +611 -0
  197. package/src/components/Dialog/utils/safeHtml.ts +185 -0
  198. package/src/components/Footer/Footer.test.tsx +1 -1
  199. package/src/components/Form/Form.test.tsx +1 -1
  200. package/src/components/Form/FormErrorSummary.tsx +113 -0
  201. package/src/components/Form/FormFieldset.tsx +127 -0
  202. package/src/components/Form/FormLiveRegion.tsx +198 -0
  203. package/src/components/LoginForm/LoginForm.test.tsx +1 -1
  204. package/src/components/PaceAppLayout/__tests__/PaceAppLayout.performance.test.tsx +76 -10
  205. package/src/components/PaceLoginPage/PaceLoginPage.tsx +1 -1
  206. package/src/components/PasswordReset/PasswordResetForm.test.tsx +597 -0
  207. package/src/components/PasswordReset/PasswordResetForm.tsx +201 -0
  208. package/src/components/PublicLayout/PublicPageDebugger.tsx +104 -0
  209. package/src/components/PublicLayout/PublicPageDiagnostic.tsx +162 -0
  210. package/src/components/PublicLayout/__tests__/PublicPageFooter.test.tsx +1 -1
  211. package/src/components/Select/Select.test.tsx +1 -1
  212. package/src/components/Select/Select.tsx +20 -8
  213. package/src/components/Table/__tests__/Table.test.tsx +1 -1
  214. package/src/components/index.ts +3 -0
  215. package/src/hooks/__tests__/useFileUrl.unit.test.ts +83 -85
  216. package/src/index.ts +4 -0
  217. package/src/rbac/hooks/useCan.test.ts +24 -0
  218. package/src/rbac/hooks/usePermissions.ts +49 -12
  219. package/src/styles/core.css +3 -0
  220. package/src/utils/appConfig.ts +47 -0
  221. package/src/utils/appIdResolver.test.ts +499 -0
  222. package/src/utils/appIdResolver.ts +130 -0
  223. package/src/utils/appNameResolver.simple.test.ts +212 -0
  224. package/src/utils/appNameResolver.test.ts +121 -0
  225. package/src/utils/appNameResolver.ts +191 -0
  226. package/src/utils/audit.ts +127 -0
  227. package/src/utils/auth-utils.ts +96 -0
  228. package/src/utils/bundleAnalysis.ts +129 -0
  229. package/src/utils/cn.ts +7 -0
  230. package/src/utils/debugLogger.ts +67 -0
  231. package/src/utils/deviceFingerprint.ts +215 -0
  232. package/src/utils/dynamicUtils.ts +105 -0
  233. package/src/utils/file-reference.test.ts +788 -0
  234. package/src/utils/file-reference.ts +519 -0
  235. package/src/utils/formatDate.test.ts +237 -0
  236. package/src/utils/formatting.ts +133 -0
  237. package/src/utils/index.ts +7 -0
  238. package/src/utils/lazyLoad.tsx +44 -0
  239. package/src/utils/logger.ts +179 -0
  240. package/src/utils/organisationContext.test.ts +322 -0
  241. package/src/utils/organisationContext.ts +153 -0
  242. package/src/utils/performanceBenchmark.ts +64 -0
  243. package/src/utils/performanceBudgets.ts +110 -0
  244. package/src/utils/permissionTypes.ts +37 -0
  245. package/src/utils/permissionUtils.test.ts +393 -0
  246. package/src/utils/permissionUtils.ts +34 -0
  247. package/src/utils/sanitization.ts +264 -0
  248. package/src/utils/schemaUtils.ts +37 -0
  249. package/src/utils/secureDataAccess.test.ts +711 -0
  250. package/src/utils/secureDataAccess.ts +377 -0
  251. package/src/utils/secureErrors.ts +79 -0
  252. package/src/utils/secureStorage.ts +244 -0
  253. package/src/utils/security.ts +156 -0
  254. package/src/utils/securityMonitor.ts +45 -0
  255. package/src/utils/sessionTracking.ts +126 -0
  256. package/src/utils/validation.ts +111 -0
  257. package/src/utils/validationUtils.ts +120 -0
  258. package/src/validation/index.ts +2 -2
  259. package/dist/chunk-444EZN6N.js.map +0 -1
  260. package/dist/chunk-APIBCTL2.js +0 -670
  261. package/dist/chunk-APIBCTL2.js.map +0 -1
  262. package/dist/chunk-HJGGOMQ6.js.map +0 -1
  263. package/dist/chunk-K2WWTH7O.js +0 -94
  264. package/dist/chunk-K2WWTH7O.js.map +0 -1
  265. package/dist/chunk-L6PGMCMD.js.map +0 -1
  266. package/dist/chunk-LMC26NLJ.js +0 -84
  267. package/dist/chunk-LMC26NLJ.js.map +0 -1
  268. package/dist/chunk-NOHEVYVX.js.map +0 -1
  269. package/dist/chunk-TVYPTYOY.js.map +0 -1
  270. package/dist/validation-8npbysjg.d.ts +0 -177
  271. /package/dist/{DataTable-CYOHOX3O.js.map → DataTable-JXFCA2BJ.js.map} +0 -0
  272. /package/dist/{UnifiedAuthProvider-5E5TUNMS.js.map → UnifiedAuthProvider-XIQQ7LVU.js.map} +0 -0
  273. /package/dist/{chunk-YLKIDTUK.js.map → chunk-22WKWKRX.js.map} +0 -0
  274. /package/dist/{chunk-FHWWBIHA.js.map → chunk-6DXZ6V5Q.js.map} +0 -0
  275. /package/dist/{chunk-2TWNJ46Y.js.map → chunk-6LAAY47Q.js.map} +0 -0
  276. /package/dist/{chunk-XARJS7CD.js.map → chunk-INQLMHPF.js.map} +0 -0
  277. /package/dist/{chunk-SL2YQDR6.js.map → chunk-MA6EPSGZ.js.map} +0 -0
  278. /package/dist/{chunk-5DPZ5EAT.js.map → chunk-OWAG3GSU.js.map} +0 -0
  279. /package/dist/{chunk-LTV3XIJJ.js.map → chunk-T6JN6LH6.js.map} +0 -0
  280. /package/examples/{components → components 2}/DataTable/HierarchicalActionsExample.tsx +0 -0
  281. /package/examples/{components → components 2}/DataTable/HierarchicalExample.tsx +0 -0
  282. /package/examples/{components → components 2}/DataTable/InitialPageSizeExample.tsx +0 -0
  283. /package/examples/{components → components 2}/DataTable/PerformanceExample.tsx +0 -0
  284. /package/examples/{components → components 2}/DataTable/index.ts +0 -0
  285. /package/examples/{components → components 2}/Dialog/BasicHtmlTest.tsx +0 -0
  286. /package/examples/{components → components 2}/Dialog/DebugHtmlExample.tsx +0 -0
  287. /package/examples/{components → components 2}/Dialog/HtmlDialogExample.tsx +0 -0
  288. /package/examples/{components → components 2}/Dialog/ScrollableDialogExample.tsx +0 -0
  289. /package/examples/{components → components 2}/Dialog/SimpleHtmlTest.tsx +0 -0
  290. /package/examples/{components → components 2}/Dialog/SmartDialogExample.tsx +0 -0
  291. /package/examples/{components → components 2}/Dialog/index.ts +0 -0
  292. /package/examples/{components → components 2}/index.ts +0 -0
@@ -39,6 +39,7 @@ import {
39
39
  generateCSVContent,
40
40
  getAriaSortValue,
41
41
  getCellRenderer,
42
+ getColumnHeaderText,
42
43
  getHierarchicalSortConfig,
43
44
  getPageSizeOptions,
44
45
  getPaginationBinding,
@@ -59,8 +60,8 @@ import {
59
60
  sum,
60
61
  validateHierarchicalData,
61
62
  validatePaginationConfig
62
- } from "./chunk-HJGGOMQ6.js";
63
- import "./chunk-L6PGMCMD.js";
63
+ } from "./chunk-TLT2ZR3L.js";
64
+ import "./chunk-BOOI7GK2.js";
64
65
  import "./chunk-BVYWGZVV.js";
65
66
  import "./chunk-SBVILCCA.js";
66
67
  import {
@@ -81,14 +82,13 @@ import {
81
82
  throttle,
82
83
  useDataTablePerformance
83
84
  } from "./chunk-BESYRHQM.js";
84
- import "./chunk-SL2YQDR6.js";
85
- import "./chunk-2TWNJ46Y.js";
86
- import "./chunk-4MT5BGGL.js";
85
+ import "./chunk-MA6EPSGZ.js";
86
+ import "./chunk-6LAAY47Q.js";
87
+ import "./chunk-YCWDTTUK.js";
88
+ import "./chunk-OWAG3GSU.js";
87
89
  import "./chunk-Q5QRDWKI.js";
88
- import "./chunk-5DPZ5EAT.js";
89
90
  import "./chunk-56XJ3TU6.js";
90
- import "./chunk-K2WWTH7O.js";
91
- import "./chunk-444EZN6N.js";
91
+ import "./chunk-7QCC6MCP.js";
92
92
  import "./chunk-XDNLUEXI.js";
93
93
  import "./chunk-PLDDJCW6.js";
94
94
  export {
@@ -144,6 +144,7 @@ export {
144
144
  generateCSVContent,
145
145
  getAriaSortValue,
146
146
  getCellRenderer,
147
+ getColumnHeaderText,
147
148
  getHierarchicalSortConfig,
148
149
  getOptimalPageSizeOptions,
149
150
  getPageSizeOptions,
@@ -169,4 +170,4 @@ export {
169
170
  validateHierarchicalData,
170
171
  validatePaginationConfig
171
172
  };
172
- //# sourceMappingURL=DataTable-CYOHOX3O.js.map
173
+ //# sourceMappingURL=DataTable-JXFCA2BJ.js.map
@@ -421,6 +421,77 @@ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.Avata
421
421
  declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
422
422
  declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
423
423
 
424
+ /**
425
+ * @file Badge Component
426
+ * @package @jmruthers/pace-core
427
+ * @module Components
428
+ * @since 0.1.0
429
+ *
430
+ * A small, non-interactive visual label component for displaying concise information
431
+ * such as status indicators, tags, or labels. Acts as a visual alternative to buttons
432
+ * for non-interactive content.
433
+ *
434
+ * Features:
435
+ * - 27 combined variants (3 styles × 3 colors × 3 shades)
436
+ * - Non-interactive by default (renders as <span>)
437
+ * - Supports all pace-core color palettes (main, sec, acc)
438
+ * - Customizable styling via className prop
439
+ * - Accessible and screen reader friendly
440
+ *
441
+ * @example
442
+ * ```tsx
443
+ * // Basic badge with default variant
444
+ * <Badge>New</Badge>
445
+ *
446
+ * // Badge with specific variant
447
+ * <Badge variant="solid-main-normal">Active</Badge>
448
+ *
449
+ * // Outline variant
450
+ * <Badge variant="outline-sec-muted">Pending</Badge>
451
+ *
452
+ * // Soft variant with accent color
453
+ * <Badge variant="soft-acc-strong">Featured</Badge>
454
+ *
455
+ * // Custom styling
456
+ * <Badge variant="solid-main-normal" className="px-4">
457
+ * Custom Badge
458
+ * </Badge>
459
+ * ```
460
+ *
461
+ * @accessibility
462
+ * - Renders as semantic <span> element
463
+ * - No focus styles (non-interactive by default)
464
+ * - Screen reader friendly through semantic HTML
465
+ * - Can be wrapped in interactive elements if needed
466
+ */
467
+
468
+ type BadgeVariant = 'solid-main-muted' | 'solid-main-normal' | 'solid-main-strong' | 'solid-sec-muted' | 'solid-sec-normal' | 'solid-sec-strong' | 'solid-acc-muted' | 'solid-acc-normal' | 'solid-acc-strong' | 'outline-main-muted' | 'outline-main-normal' | 'outline-main-strong' | 'outline-sec-muted' | 'outline-sec-normal' | 'outline-sec-strong' | 'outline-acc-muted' | 'outline-acc-normal' | 'outline-acc-strong' | 'soft-main-muted' | 'soft-main-normal' | 'soft-main-strong' | 'soft-sec-muted' | 'soft-sec-normal' | 'soft-sec-strong' | 'soft-acc-muted' | 'soft-acc-normal' | 'soft-acc-strong';
469
+ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
470
+ /** Visual variant of the badge (style-color-shade) */
471
+ variant?: BadgeVariant;
472
+ }
473
+ /**
474
+ * Badge Component
475
+ * A small, non-interactive visual label for displaying concise information.
476
+ *
477
+ * @component
478
+ * @example
479
+ * ```tsx
480
+ * // Default variant
481
+ * <Badge>New</Badge>
482
+ *
483
+ * // Specific variant
484
+ * <Badge variant="solid-main-normal">Active</Badge>
485
+ *
486
+ * // Outline variant
487
+ * <Badge variant="outline-sec-muted">Pending</Badge>
488
+ *
489
+ * // Soft variant
490
+ * <Badge variant="soft-acc-strong">Featured</Badge>
491
+ * ```
492
+ */
493
+ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
494
+
424
495
  /**
425
496
  * @file Checkbox Component
426
497
  * @package @jmruthers/pace-core
@@ -895,6 +966,7 @@ interface UseSelectStateProps {
895
966
  interface SelectProps extends Omit<React.HTMLAttributes<HTMLFormElement>, 'onChange' | 'onKeyDown' | 'onFocus' | 'onBlur'> {
896
967
  children: React.ReactNode;
897
968
  className?: string;
969
+ direction?: 'up' | 'down';
898
970
  }
899
971
  interface SelectTriggerProps extends Omit<ButtonProps, 'onClick' | 'onKeyDown'> {
900
972
  children: React.ReactNode;
@@ -3516,4 +3588,4 @@ declare function EventLogoCompact(props: EventLogoProps): react_jsx_runtime.JSX.
3516
3588
  */
3517
3589
  declare function EventLogoLarge(props: EventLogoProps): react_jsx_runtime.JSX.Element;
3518
3590
 
3519
- export { Select as $, Alert as A, Button as B, Card as C, Dialog as D, DialogOverlay as E, DialogTrigger as F, DialogClose as G, DialogContent as H, Input as I, DialogHeader as J, DialogBody as K, Label as L, DialogFooter as M, DialogTitle as N, DialogDescription as O, Progress as P, type DialogProps as Q, type DialogTriggerProps as R, Switch as S, Table as T, type DialogContentProps as U, type DialogOverlayProps as V, type DialogHeaderProps as W, type DialogFooterProps as X, type DialogTitleProps as Y, type DialogDescriptionProps as Z, type DialogSize as _, type ButtonProps as a, PublicErrorBoundary as a$, SelectGroup as a0, SelectValue as a1, SelectTrigger as a2, SelectContent as a3, SelectLabel as a4, SelectItem as a5, SelectSeparator as a6, Toast as a7, Toaster as a8, ToastAction as a9, UserMenu as aA, ErrorBoundary as aB, type ErrorBoundaryProps as aC, type ErrorBoundaryState as aD, LoadingSpinner as aE, SessionRestorationLoader as aF, type SessionRestorationLoaderProps as aG, EventSelector as aH, FileUpload as aI, type FileUploadProps as aJ, FileDisplay as aK, type FileDisplayProps as aL, useFileReference as aM, useFileReferenceForRecord as aN, useFileReferenceById as aO, useFilesByCategory as aP, type UseFileReferenceOptions as aQ, type UseFileReferenceReturn as aR, type UseFileReferenceForRecordReturn as aS, PublicPageLayout as aT, usePublicPageContext$1 as aU, PublicPageHeader as aV, PublicPageProvider as aW, usePublicPageContext as aX, useIsPublicPage as aY, PublicPageFooter as aZ, PublicPageContextChecker as a_, ToastProvider as aa, ToastViewport as ab, ToastTitle as ac, ToastDescription as ad, ToastClose as ae, type ToastActionElement as af, type ToastProps as ag, Tooltip as ah, TooltipTrigger as ai, TooltipContent as aj, TooltipProvider as ak, TooltipRoot as al, Form as am, type FormProps as an, LoginForm as ao, type LoginFormProps as ap, Header as aq, Footer as ar, type FooterProps as as, ProtectedRoute as at, type ProtectedRouteProps as au, NavigationMenu as av, type NavigationMenuProps as aw, type NavigationItem as ax, OrganisationSelector as ay, type OrganisationSelectorProps as az, CardHeader as b, useErrorBoundary as b0, DefaultPublicErrorFallback as b1, PublicLoadingSpinner as b2, PublicLoadingSpinnerFullPage as b3, PublicLoadingSkeleton as b4, EventLogo as b5, EventLogoCompact as b6, EventLogoLarge as b7, type EventLogoProps as b8, type PublicPageLayoutProps as b9, type PublicPageHeaderProps as ba, type PublicPageFooterProps as bb, type PublicErrorBoundaryProps as bc, type PublicErrorBoundaryState as bd, type PublicLoadingSpinnerProps as be, type PaceAppLayoutProps as bf, PaceAppLayout as bg, type PaceLoginPageProps as bh, PaceLoginPage as bi, type UserMenuProps as bj, 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, AlertTitle as l, AlertDescription as m, Avatar as n, AvatarImage as o, AvatarFallback as p, Checkbox as q, type SwitchProps as r, TableHeader as s, TableBody as t, TableCaption as u, TableCell as v, TableFooter as w, TableHead as x, TableRow as y, DialogPortal as z };
3591
+ export { type DialogTitleProps as $, Alert as A, Button as B, Card as C, TableHead as D, TableRow as E, Dialog as F, DialogPortal as G, DialogOverlay as H, Input as I, DialogTrigger as J, DialogClose as K, Label as L, DialogContent as M, DialogHeader as N, DialogBody as O, Progress as P, DialogFooter as Q, DialogTitle as R, Switch as S, Table as T, DialogDescription as U, type DialogProps as V, type DialogTriggerProps as W, type DialogContentProps as X, type DialogOverlayProps as Y, type DialogHeaderProps as Z, type DialogFooterProps as _, type ButtonProps as a, useIsPublicPage as a$, type DialogDescriptionProps as a0, type DialogSize as a1, Select as a2, SelectGroup as a3, SelectValue as a4, SelectTrigger as a5, SelectContent as a6, SelectLabel as a7, SelectItem as a8, SelectSeparator as a9, type NavigationItem as aA, OrganisationSelector as aB, type OrganisationSelectorProps as aC, UserMenu as aD, ErrorBoundary as aE, type ErrorBoundaryProps as aF, type ErrorBoundaryState as aG, LoadingSpinner as aH, SessionRestorationLoader as aI, type SessionRestorationLoaderProps as aJ, EventSelector as aK, FileUpload as aL, type FileUploadProps as aM, FileDisplay as aN, type FileDisplayProps as aO, useFileReference as aP, useFileReferenceForRecord as aQ, useFileReferenceById as aR, useFilesByCategory as aS, type UseFileReferenceOptions as aT, type UseFileReferenceReturn as aU, type UseFileReferenceForRecordReturn as aV, PublicPageLayout as aW, usePublicPageContext$1 as aX, PublicPageHeader as aY, PublicPageProvider as aZ, usePublicPageContext as a_, Toast as aa, Toaster as ab, ToastAction as ac, ToastProvider as ad, ToastViewport as ae, ToastTitle as af, ToastDescription as ag, ToastClose as ah, type ToastActionElement as ai, type ToastProps as aj, Tooltip as ak, TooltipTrigger as al, TooltipContent as am, TooltipProvider as an, TooltipRoot as ao, Form as ap, type FormProps as aq, LoginForm as ar, type LoginFormProps as as, Header as at, Footer as au, type FooterProps as av, ProtectedRoute as aw, type ProtectedRouteProps as ax, NavigationMenu as ay, type NavigationMenuProps as az, CardHeader as b, PublicPageFooter as b0, PublicPageContextChecker as b1, PublicErrorBoundary as b2, useErrorBoundary as b3, DefaultPublicErrorFallback as b4, PublicLoadingSpinner as b5, PublicLoadingSpinnerFullPage as b6, PublicLoadingSkeleton as b7, EventLogo as b8, EventLogoCompact as b9, EventLogoLarge as ba, type EventLogoProps as bb, type PublicPageLayoutProps as bc, type PublicPageHeaderProps as bd, type PublicPageFooterProps as be, type PublicErrorBoundaryProps as bf, type PublicErrorBoundaryState as bg, type PublicLoadingSpinnerProps as bh, type PaceAppLayoutProps as bi, PaceAppLayout as bj, type PaceLoginPageProps as bk, PaceLoginPage as bl, type UserMenuProps as bm, 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, 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, TableHeader as v, TableBody as w, TableCaption as x, TableCell as y, TableFooter as z };
@@ -1,12 +1,11 @@
1
1
  import {
2
2
  init_UnifiedAuthProvider
3
- } from "./chunk-2TWNJ46Y.js";
3
+ } from "./chunk-6LAAY47Q.js";
4
4
  import {
5
5
  UnifiedAuthProvider,
6
6
  useUnifiedAuth
7
- } from "./chunk-4MT5BGGL.js";
8
- import "./chunk-K2WWTH7O.js";
9
- import "./chunk-444EZN6N.js";
7
+ } from "./chunk-YCWDTTUK.js";
8
+ import "./chunk-7QCC6MCP.js";
10
9
  import "./chunk-XDNLUEXI.js";
11
10
  import "./chunk-PLDDJCW6.js";
12
11
  init_UnifiedAuthProvider();
@@ -14,4 +13,4 @@ export {
14
13
  UnifiedAuthProvider,
15
14
  useUnifiedAuth
16
15
  };
17
- //# sourceMappingURL=UnifiedAuthProvider-5E5TUNMS.js.map
16
+ //# sourceMappingURL=UnifiedAuthProvider-XIQQ7LVU.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  init_OrganisationProvider,
3
3
  usePublicPageContext
4
- } from "./chunk-TVYPTYOY.js";
4
+ } from "./chunk-4C7EXCAR.js";
5
5
  import {
6
6
  init_useOrganisations,
7
7
  useOrganisations
8
- } from "./chunk-SL2YQDR6.js";
8
+ } from "./chunk-MA6EPSGZ.js";
9
9
  import {
10
10
  useUnifiedAuth
11
- } from "./chunk-4MT5BGGL.js";
11
+ } from "./chunk-YCWDTTUK.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-YLKIDTUK.js.map
665
+ //# sourceMappingURL=chunk-22WKWKRX.js.map
@@ -2,24 +2,20 @@ import {
2
2
  init_useOrganisations,
3
3
  useEvents,
4
4
  useOrganisations
5
- } from "./chunk-SL2YQDR6.js";
5
+ } from "./chunk-MA6EPSGZ.js";
6
6
  import {
7
7
  init_UnifiedAuthProvider
8
- } from "./chunk-2TWNJ46Y.js";
8
+ } from "./chunk-6LAAY47Q.js";
9
9
  import {
10
10
  OrganisationServiceContext,
11
11
  OrganisationServiceProvider,
12
12
  init_OrganisationServiceProvider,
13
13
  useOrganisationService,
14
14
  useUnifiedAuth
15
- } from "./chunk-4MT5BGGL.js";
15
+ } from "./chunk-YCWDTTUK.js";
16
16
  import {
17
17
  cn
18
18
  } from "./chunk-56XJ3TU6.js";
19
- import {
20
- init_organisationContext,
21
- setOrganisationContext
22
- } from "./chunk-K2WWTH7O.js";
23
19
  import {
24
20
  applyPalette,
25
21
  clearPalette,
@@ -728,10 +724,30 @@ async function archiveFile(supabase, path, options) {
728
724
  // src/hooks/useFileDisplay.ts
729
725
  import { useState, useEffect as useEffect2, useCallback } from "react";
730
726
 
731
- // src/utils/file-reference/index.ts
732
- init_organisationContext();
733
- init_logger();
734
- var log3 = createLogger("FileReferenceService");
727
+ // src/utils/organisationContext.ts
728
+ async function setOrganisationContext(supabase, organisationId) {
729
+ if (!supabase || !organisationId) {
730
+ return;
731
+ }
732
+ try {
733
+ const timeoutPromise = new Promise((_, reject) => {
734
+ setTimeout(() => reject(new Error("RPC timeout after 3 seconds")), 3e3);
735
+ });
736
+ const rpcPromise = supabase.rpc("set_organisation_context", {
737
+ org_id: organisationId
738
+ });
739
+ const { error } = await Promise.race([rpcPromise, timeoutPromise]);
740
+ if (error) {
741
+ console.log("[organisationContext] RPC function not available or failed, continuing without database context");
742
+ } else {
743
+ console.log("[organisationContext] Organisation context set in database successfully");
744
+ }
745
+ } catch (error) {
746
+ console.log("[organisationContext] Failed to set database context, continuing without it:", error);
747
+ }
748
+ }
749
+
750
+ // src/utils/file-reference.ts
735
751
  var FileReferenceServiceImpl = class {
736
752
  constructor(supabase) {
737
753
  this.supabase = supabase;
@@ -814,7 +830,7 @@ var FileReferenceServiceImpl = class {
814
830
  );
815
831
  return fileRef;
816
832
  } catch (error) {
817
- log3.error("Error creating file reference:", error);
833
+ console.error("Error creating file reference:", error);
818
834
  throw error;
819
835
  }
820
836
  }
@@ -829,7 +845,7 @@ var FileReferenceServiceImpl = class {
829
845
  }
830
846
  return data;
831
847
  } catch (error) {
832
- log3.error("Error getting file reference:", error);
848
+ console.error("Error getting file reference:", error);
833
849
  throw error;
834
850
  }
835
851
  }
@@ -853,7 +869,7 @@ var FileReferenceServiceImpl = class {
853
869
  return await this.getSignedUrl(table_name, record_id, organisation_id);
854
870
  }
855
871
  } catch (error) {
856
- log3.error("Error getting file URL:", error);
872
+ console.error("Error getting file URL:", error);
857
873
  throw error;
858
874
  }
859
875
  }
@@ -878,7 +894,7 @@ var FileReferenceServiceImpl = class {
878
894
  });
879
895
  return signedUrlResult?.url || null;
880
896
  } catch (error) {
881
- log3.error("Error getting signed URL:", error);
897
+ console.error("Error getting signed URL:", error);
882
898
  throw error;
883
899
  }
884
900
  }
@@ -890,7 +906,7 @@ var FileReferenceServiceImpl = class {
890
906
  }
891
907
  return data;
892
908
  } catch (error) {
893
- log3.error("Error updating file reference:", error);
909
+ console.error("Error updating file reference:", error);
894
910
  throw error;
895
911
  }
896
912
  }
@@ -911,7 +927,7 @@ var FileReferenceServiceImpl = class {
911
927
  }
912
928
  return true;
913
929
  } catch (error) {
914
- log3.error("Error deleting file reference:", error);
930
+ console.error("Error deleting file reference:", error);
915
931
  throw error;
916
932
  }
917
933
  }
@@ -935,7 +951,7 @@ var FileReferenceServiceImpl = class {
935
951
  }
936
952
  return fullData || [];
937
953
  } catch (error) {
938
- log3.error("Error listing file references:", error);
954
+ console.error("Error listing file references:", error);
939
955
  throw error;
940
956
  }
941
957
  }
@@ -951,7 +967,7 @@ var FileReferenceServiceImpl = class {
951
967
  }
952
968
  return data || 0;
953
969
  } catch (error) {
954
- log3.error("Error getting file count:", error);
970
+ console.error("Error getting file count:", error);
955
971
  throw error;
956
972
  }
957
973
  }
@@ -969,12 +985,18 @@ var FileReferenceServiceImpl = class {
969
985
  }
970
986
  return data[0];
971
987
  } catch (error) {
972
- log3.error("Error getting file reference by ID:", error);
988
+ console.error("Error getting file reference by ID:", error);
973
989
  throw error;
974
990
  }
975
991
  }
976
992
  async getFilesByCategory(table_name, record_id, category, organisation_id) {
977
993
  try {
994
+ console.log("[FileReferenceService.getFilesByCategory] Calling RPC function:", {
995
+ table_name,
996
+ record_id,
997
+ category,
998
+ organisation_id
999
+ });
978
1000
  const { data, error } = await this.supabase.rpc("data_file_reference_by_category_list", {
979
1001
  p_table_name: table_name,
980
1002
  p_record_id: record_id,
@@ -982,7 +1004,7 @@ var FileReferenceServiceImpl = class {
982
1004
  p_organisation_id: organisation_id
983
1005
  });
984
1006
  if (error) {
985
- log3.error("RPC ERROR getting files by category:", {
1007
+ console.error("[FileReferenceService.getFilesByCategory] RPC ERROR:", {
986
1008
  error,
987
1009
  errorCode: error.code,
988
1010
  errorMessage: error.message,
@@ -995,14 +1017,21 @@ var FileReferenceServiceImpl = class {
995
1017
  });
996
1018
  throw new Error(`Failed to get files by category: ${error.message}. Category filtering uses file_metadata JSONB field, not a direct column. RPC function required.`);
997
1019
  }
1020
+ console.log("[FileReferenceService.getFilesByCategory] RPC response received:", {
1021
+ dataLength: data?.length || 0,
1022
+ data: data ? data.slice(0, 2) : null,
1023
+ // Log first 2 items for debugging
1024
+ fullDataAvailable: data?.every((item) => item.id && item.file_path && item.file_metadata)
1025
+ });
998
1026
  if (!data || data.length === 0) {
1027
+ console.log("[FileReferenceService.getFilesByCategory] No data from RPC, returning empty array");
999
1028
  return [];
1000
1029
  }
1001
1030
  const fileReferences = data.filter((item) => {
1002
1031
  const fileCategory = item.file_metadata?.category;
1003
1032
  const matches = fileCategory === category;
1004
1033
  if (!matches) {
1005
- log3.warn("File category mismatch in RPC response:", {
1034
+ console.warn("[FileReferenceService.getFilesByCategory] File category mismatch in RPC response:", {
1006
1035
  fileId: item.id,
1007
1036
  expectedCategory: category,
1008
1037
  actualCategory: fileCategory
@@ -1026,9 +1055,16 @@ var FileReferenceServiceImpl = class {
1026
1055
  };
1027
1056
  return fileRef;
1028
1057
  });
1058
+ console.log("[FileReferenceService.getFilesByCategory] Constructed file references from RPC response:", {
1059
+ count: fileReferences.length,
1060
+ firstFileId: fileReferences[0]?.id,
1061
+ firstFilePath: fileReferences[0]?.file_path,
1062
+ firstFileIsPublic: fileReferences[0]?.is_public,
1063
+ firstFileHasAllRequiredFields: !!(fileReferences[0]?.id && fileReferences[0]?.file_path && fileReferences[0]?.file_metadata && fileReferences[0]?.table_name && fileReferences[0]?.record_id && fileReferences[0]?.organisation_id)
1064
+ });
1029
1065
  return fileReferences;
1030
1066
  } catch (error) {
1031
- log3.error("Error getting files by category:", error);
1067
+ console.error("Error getting files by category:", error);
1032
1068
  throw error;
1033
1069
  }
1034
1070
  }
@@ -1654,4 +1690,4 @@ export {
1654
1690
  clearPublicFileDisplayCache,
1655
1691
  getPublicFileDisplayCacheStats
1656
1692
  };
1657
- //# sourceMappingURL=chunk-TVYPTYOY.js.map
1693
+ //# sourceMappingURL=chunk-4C7EXCAR.js.map