@jmruthers/pace-core 0.5.93 → 0.5.95

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 (170) hide show
  1. package/dist/{DataTable-HC5S4RKB.js → DataTable-XENXNMCP.js} +6 -6
  2. package/dist/{PublicLoadingSpinner-n74JgA9h.d.ts → PublicLoadingSpinner-B84QWsvB.d.ts} +31 -3
  3. package/dist/{UnifiedAuthProvider-ZM7VUC45.js → UnifiedAuthProvider-H7RI4KYD.js} +3 -3
  4. package/dist/{chunk-AZ2QJYKU.js → chunk-2KLAOD4M.js} +3 -3
  5. package/dist/{chunk-HW5BGOWB.js → chunk-2ZYHCFUO.js} +4 -4
  6. package/dist/{chunk-AAM57AEU.js → chunk-5RYPBJYL.js} +16 -19
  7. package/dist/chunk-5RYPBJYL.js.map +1 -0
  8. package/dist/{chunk-XIBSVWJW.js → chunk-7TQDRDSM.js} +5 -5
  9. package/dist/{chunk-TZXYSZT3.js → chunk-EPKHU5SS.js} +314 -245
  10. package/dist/{chunk-TZXYSZT3.js.map → chunk-EPKHU5SS.js.map} +1 -1
  11. package/dist/{chunk-GP3HU6WS.js → chunk-G7UUVEAP.js} +3 -3
  12. package/dist/{chunk-M52CQP5W.js → chunk-MKMKUCPF.js} +762 -12
  13. package/dist/chunk-MKMKUCPF.js.map +1 -0
  14. package/dist/{chunk-OXFOS62D.js → chunk-MVNOAHOP.js} +2 -2
  15. package/dist/{chunk-AYC2P377.js → chunk-ORACUZ7H.js} +2 -2
  16. package/dist/{chunk-SVMPR5IV.js → chunk-V5CTX4FR.js} +963 -788
  17. package/dist/chunk-V5CTX4FR.js.map +1 -0
  18. package/dist/{chunk-6WFM22A4.js → chunk-ZGCVJ7WW.js} +2 -2
  19. package/dist/components.d.ts +1 -1
  20. package/dist/components.js +8 -8
  21. package/dist/hooks.d.ts +94 -3
  22. package/dist/hooks.js +20 -8
  23. package/dist/hooks.js.map +1 -1
  24. package/dist/index.d.ts +2 -2
  25. package/dist/index.js +17 -11
  26. package/dist/index.js.map +1 -1
  27. package/dist/providers.js +2 -2
  28. package/dist/rbac/index.js +7 -7
  29. package/dist/{usePublicRouteParams-BlgwXweB.d.ts → usePublicRouteParams-BwMR2uub.d.ts} +93 -1
  30. package/dist/utils.js +1 -1
  31. package/docs/api/classes/ColumnFactory.md +1 -1
  32. package/docs/api/classes/ErrorBoundary.md +1 -1
  33. package/docs/api/classes/InvalidScopeError.md +1 -1
  34. package/docs/api/classes/MissingUserContextError.md +1 -1
  35. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  36. package/docs/api/classes/PermissionDeniedError.md +1 -1
  37. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  38. package/docs/api/classes/RBACAuditManager.md +1 -1
  39. package/docs/api/classes/RBACCache.md +1 -1
  40. package/docs/api/classes/RBACEngine.md +1 -1
  41. package/docs/api/classes/RBACError.md +1 -1
  42. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  43. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  44. package/docs/api/classes/StorageUtils.md +1 -1
  45. package/docs/api/enums/FileCategory.md +1 -1
  46. package/docs/api/interfaces/AggregateConfig.md +1 -1
  47. package/docs/api/interfaces/ButtonProps.md +1 -1
  48. package/docs/api/interfaces/CardProps.md +1 -1
  49. package/docs/api/interfaces/ColorPalette.md +1 -1
  50. package/docs/api/interfaces/ColorShade.md +1 -1
  51. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  52. package/docs/api/interfaces/DataRecord.md +1 -1
  53. package/docs/api/interfaces/DataTableAction.md +1 -1
  54. package/docs/api/interfaces/DataTableColumn.md +1 -1
  55. package/docs/api/interfaces/DataTableProps.md +1 -1
  56. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  57. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  58. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  59. package/docs/api/interfaces/EventLogoProps.md +1 -1
  60. package/docs/api/interfaces/FileDisplayProps.md +52 -11
  61. package/docs/api/interfaces/FileMetadata.md +1 -1
  62. package/docs/api/interfaces/FileReference.md +1 -1
  63. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  64. package/docs/api/interfaces/FileUploadOptions.md +1 -1
  65. package/docs/api/interfaces/FileUploadProps.md +1 -1
  66. package/docs/api/interfaces/FooterProps.md +1 -1
  67. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  68. package/docs/api/interfaces/InputProps.md +1 -1
  69. package/docs/api/interfaces/LabelProps.md +1 -1
  70. package/docs/api/interfaces/LoginFormProps.md +1 -1
  71. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  72. package/docs/api/interfaces/NavigationContextType.md +1 -1
  73. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  74. package/docs/api/interfaces/NavigationItem.md +1 -1
  75. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  76. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  77. package/docs/api/interfaces/Organisation.md +1 -1
  78. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  79. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  80. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  81. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  82. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  83. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  84. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  85. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  86. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  87. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  88. package/docs/api/interfaces/PaletteData.md +1 -1
  89. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  90. package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
  91. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  92. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  93. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  94. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  95. package/docs/api/interfaces/PublicPageHeaderProps.md +24 -11
  96. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  97. package/docs/api/interfaces/RBACConfig.md +1 -1
  98. package/docs/api/interfaces/RBACLogger.md +1 -1
  99. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  100. package/docs/api/interfaces/RoleBasedRouterProps.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/StorageConfig.md +1 -1
  106. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  107. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  108. package/docs/api/interfaces/StorageListOptions.md +1 -1
  109. package/docs/api/interfaces/StorageListResult.md +1 -1
  110. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  111. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  112. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  113. package/docs/api/interfaces/StyleImport.md +1 -1
  114. package/docs/api/interfaces/SwitchProps.md +1 -1
  115. package/docs/api/interfaces/ToastActionElement.md +1 -1
  116. package/docs/api/interfaces/ToastProps.md +1 -1
  117. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  118. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  119. package/docs/api/interfaces/UseEventLogoOptions.md +1 -1
  120. package/docs/api/interfaces/UseEventLogoReturn.md +1 -1
  121. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  122. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  123. package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
  124. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  125. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  126. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  127. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +47 -0
  128. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +120 -0
  129. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  130. package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
  131. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  132. package/docs/api/interfaces/UserEventAccess.md +1 -1
  133. package/docs/api/interfaces/UserMenuProps.md +1 -1
  134. package/docs/api/interfaces/UserProfile.md +1 -1
  135. package/docs/api/modules.md +102 -16
  136. package/docs/implementation-guides/file-reference-system.md +15 -0
  137. package/docs/implementation-guides/file-upload-storage.md +16 -0
  138. package/package.json +1 -1
  139. package/src/components/DataTable/__tests__/DataTableCore.test.tsx +9 -7
  140. package/src/components/DataTable/components/DataTableCore.tsx +35 -10
  141. package/src/components/DataTable/components/EditableRow.tsx +62 -22
  142. package/src/components/DataTable/components/UnifiedTableBody.tsx +25 -101
  143. package/src/components/FileDisplay/FileDisplay.test.tsx +263 -39
  144. package/src/components/FileDisplay/FileDisplay.tsx +667 -103
  145. package/src/components/PublicLayout/PublicPageHeader.tsx +15 -8
  146. package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +71 -28
  147. package/src/components/Select/Select.test.tsx +83 -6
  148. package/src/components/Select/Select.tsx +236 -16
  149. package/src/examples/CorrectPublicPageImplementation.tsx +16 -13
  150. package/src/examples/PublicEventPage.tsx +9 -6
  151. package/src/examples/PublicPageApp.tsx +9 -6
  152. package/src/examples/PublicPageUsageExample.tsx +9 -7
  153. package/src/hooks/index.ts +4 -0
  154. package/src/hooks/public/index.ts +2 -0
  155. package/src/hooks/public/usePublicFileDisplay.ts +355 -0
  156. package/src/hooks/useFileDisplay.ts +370 -0
  157. package/src/hooks/useFileUrl.ts +130 -0
  158. package/src/services/AuthService.ts +19 -22
  159. package/dist/chunk-AAM57AEU.js.map +0 -1
  160. package/dist/chunk-M52CQP5W.js.map +0 -1
  161. package/dist/chunk-SVMPR5IV.js.map +0 -1
  162. /package/dist/{DataTable-HC5S4RKB.js.map → DataTable-XENXNMCP.js.map} +0 -0
  163. /package/dist/{UnifiedAuthProvider-ZM7VUC45.js.map → UnifiedAuthProvider-H7RI4KYD.js.map} +0 -0
  164. /package/dist/{chunk-AZ2QJYKU.js.map → chunk-2KLAOD4M.js.map} +0 -0
  165. /package/dist/{chunk-HW5BGOWB.js.map → chunk-2ZYHCFUO.js.map} +0 -0
  166. /package/dist/{chunk-XIBSVWJW.js.map → chunk-7TQDRDSM.js.map} +0 -0
  167. /package/dist/{chunk-GP3HU6WS.js.map → chunk-G7UUVEAP.js.map} +0 -0
  168. /package/dist/{chunk-OXFOS62D.js.map → chunk-MVNOAHOP.js.map} +0 -0
  169. /package/dist/{chunk-AYC2P377.js.map → chunk-ORACUZ7H.js.map} +0 -0
  170. /package/dist/{chunk-6WFM22A4.js.map → chunk-ZGCVJ7WW.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / StyleImport
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / StyleImport
2
2
 
3
3
  # Interface: StyleImport
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / SwitchProps
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / SwitchProps
2
2
 
3
3
  # Interface: SwitchProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / ToastActionElement
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / ToastActionElement
2
2
 
3
3
  # Interface: ToastActionElement
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / ToastProps
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / ToastProps
2
2
 
3
3
  # Interface: ToastProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UnifiedAuthContextType
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UnifiedAuthContextType
2
2
 
3
3
  # Interface: UnifiedAuthContextType
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UnifiedAuthProviderProps
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UnifiedAuthProviderProps
2
2
 
3
3
  # Interface: UnifiedAuthProviderProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UseEventLogoOptions
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UseEventLogoOptions
2
2
 
3
3
  # Interface: UseEventLogoOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UseEventLogoReturn
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UseEventLogoReturn
2
2
 
3
3
  # Interface: UseEventLogoReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UseInactivityTrackerOptions
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UseInactivityTrackerOptions
2
2
 
3
3
  # Interface: UseInactivityTrackerOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UseInactivityTrackerReturn
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UseInactivityTrackerReturn
2
2
 
3
3
  # Interface: UseInactivityTrackerReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UsePublicEventLogoOptions
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UsePublicEventLogoOptions
2
2
 
3
3
  # Interface: UsePublicEventLogoOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UsePublicEventLogoReturn
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UsePublicEventLogoReturn
2
2
 
3
3
  # Interface: UsePublicEventLogoReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UsePublicEventOptions
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UsePublicEventOptions
2
2
 
3
3
  # Interface: UsePublicEventOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UsePublicEventReturn
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UsePublicEventReturn
2
2
 
3
3
  # Interface: UsePublicEventReturn
4
4
 
@@ -0,0 +1,47 @@
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UsePublicFileDisplayOptions
2
+
3
+ # Interface: UsePublicFileDisplayOptions
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [cacheTtl](UsePublicFileDisplayOptions.md#cachettl)
10
+ - [enableCache](UsePublicFileDisplayOptions.md#enablecache)
11
+ - [supabase](UsePublicFileDisplayOptions.md#supabase)
12
+
13
+ ## Properties
14
+
15
+ ### cacheTtl
16
+
17
+ • `Optional` **cacheTtl**: `number`
18
+
19
+ Cache TTL in milliseconds (default: 30 minutes)
20
+
21
+ #### Defined in
22
+
23
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:69](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L69)
24
+
25
+ ___
26
+
27
+ ### enableCache
28
+
29
+ • `Optional` **enableCache**: `boolean`
30
+
31
+ Whether to enable caching (default: true)
32
+
33
+ #### Defined in
34
+
35
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:71](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L71)
36
+
37
+ ___
38
+
39
+ ### supabase
40
+
41
+ • **supabase**: `default`\<`Database`, ``"public"``, ``"public"``, `never`, {}\>
42
+
43
+ Supabase client instance (required)
44
+
45
+ #### Defined in
46
+
47
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:73](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L73)
@@ -0,0 +1,120 @@
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UsePublicFileDisplayReturn
2
+
3
+ # Interface: UsePublicFileDisplayReturn
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [fileUrl](UsePublicFileDisplayReturn.md#fileurl)
10
+ - [fileReference](UsePublicFileDisplayReturn.md#filereference)
11
+ - [fileReferences](UsePublicFileDisplayReturn.md#filereferences)
12
+ - [fileUrls](UsePublicFileDisplayReturn.md#fileurls)
13
+ - [fileCount](UsePublicFileDisplayReturn.md#filecount)
14
+ - [isLoading](UsePublicFileDisplayReturn.md#isloading)
15
+ - [error](UsePublicFileDisplayReturn.md#error)
16
+ - [refetch](UsePublicFileDisplayReturn.md#refetch)
17
+
18
+ ## Properties
19
+
20
+ ### fileUrl
21
+
22
+ • **fileUrl**: ``null`` \| `string`
23
+
24
+ Single file URL if category is provided and file found, null otherwise
25
+
26
+ #### Defined in
27
+
28
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:50](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L50)
29
+
30
+ ___
31
+
32
+ ### fileReference
33
+
34
+ • **fileReference**: ``null`` \| [`FileReference`](FileReference.md)
35
+
36
+ Single file reference if category is provided and file found, null otherwise
37
+
38
+ #### Defined in
39
+
40
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:52](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L52)
41
+
42
+ ___
43
+
44
+ ### fileReferences
45
+
46
+ • **fileReferences**: [`FileReference`](FileReference.md)[]
47
+
48
+ Array of all file references for the record (when category not provided or for multiple files)
49
+
50
+ #### Defined in
51
+
52
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:54](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L54)
53
+
54
+ ___
55
+
56
+ ### fileUrls
57
+
58
+ • **fileUrls**: `Map`\<`string`, `string`\>
59
+
60
+ Map of file IDs to URLs for multiple files
61
+
62
+ #### Defined in
63
+
64
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:56](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L56)
65
+
66
+ ___
67
+
68
+ ### fileCount
69
+
70
+ • **fileCount**: `number`
71
+
72
+ Total count of files for the record
73
+
74
+ #### Defined in
75
+
76
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:58](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L58)
77
+
78
+ ___
79
+
80
+ ### isLoading
81
+
82
+ • **isLoading**: `boolean`
83
+
84
+ Whether the data is currently loading
85
+
86
+ #### Defined in
87
+
88
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:60](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L60)
89
+
90
+ ___
91
+
92
+ ### error
93
+
94
+ • **error**: ``null`` \| `Error`
95
+
96
+ Any error that occurred during loading
97
+
98
+ #### Defined in
99
+
100
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:62](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L62)
101
+
102
+ ___
103
+
104
+ ### refetch
105
+
106
+ • **refetch**: () => `Promise`\<`void`\>
107
+
108
+ Function to manually refetch the data
109
+
110
+ #### Type declaration
111
+
112
+ ▸ (): `Promise`\<`void`\>
113
+
114
+ ##### Returns
115
+
116
+ `Promise`\<`void`\>
117
+
118
+ #### Defined in
119
+
120
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:64](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L64)
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UsePublicRouteParamsReturn
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UsePublicRouteParamsReturn
2
2
 
3
3
  # Interface: UsePublicRouteParamsReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UseResolvedScopeOptions
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UseResolvedScopeOptions
2
2
 
3
3
  # Interface: UseResolvedScopeOptions
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UseResolvedScopeReturn
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UseResolvedScopeReturn
2
2
 
3
3
  # Interface: UseResolvedScopeReturn
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UserEventAccess
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UserEventAccess
2
2
 
3
3
  # Interface: UserEventAccess
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UserMenuProps
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UserMenuProps
2
2
 
3
3
  # Interface: UserMenuProps
4
4
 
@@ -1,4 +1,4 @@
1
- [@jmruthers/pace-core - v0.5.93](../README.md) / [Exports](../modules.md) / UserProfile
1
+ [@jmruthers/pace-core - v0.5.95](../README.md) / [Exports](../modules.md) / UserProfile
2
2
 
3
3
  # Interface: UserProfile
4
4
 
@@ -1,6 +1,6 @@
1
- [@jmruthers/pace-core - v0.5.93](README.md) / Exports
1
+ [@jmruthers/pace-core - v0.5.95](README.md) / Exports
2
2
 
3
- # @jmruthers/pace-core - v0.5.93
3
+ # @jmruthers/pace-core - v0.5.95
4
4
 
5
5
  **`File`**
6
6
 
@@ -88,6 +88,8 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
88
88
  - [UsePublicEventOptions](interfaces/UsePublicEventOptions.md)
89
89
  - [UsePublicEventLogoReturn](interfaces/UsePublicEventLogoReturn.md)
90
90
  - [UsePublicEventLogoOptions](interfaces/UsePublicEventLogoOptions.md)
91
+ - [UsePublicFileDisplayReturn](interfaces/UsePublicFileDisplayReturn.md)
92
+ - [UsePublicFileDisplayOptions](interfaces/UsePublicFileDisplayOptions.md)
91
93
  - [UsePublicRouteParamsReturn](interfaces/UsePublicRouteParamsReturn.md)
92
94
  - [UseEventLogoReturn](interfaces/UseEventLogoReturn.md)
93
95
  - [UseEventLogoOptions](interfaces/UseEventLogoOptions.md)
@@ -278,6 +280,9 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
278
280
  - [usePublicEventLogo](modules.md#usepubliceventlogo)
279
281
  - [clearPublicLogoCache](modules.md#clearpubliclogocache)
280
282
  - [getPublicLogoCacheStats](modules.md#getpubliclogocachestats)
283
+ - [usePublicFileDisplay](modules.md#usepublicfiledisplay)
284
+ - [clearPublicFileDisplayCache](modules.md#clearpublicfiledisplaycache)
285
+ - [getPublicFileDisplayCacheStats](modules.md#getpublicfiledisplaycachestats)
281
286
  - [usePublicRouteParams](modules.md#usepublicrouteparams)
282
287
  - [usePublicEventCode](modules.md#usepubliceventcode)
283
288
  - [generatePublicRoutePath](modules.md#generatepublicroutepath)
@@ -1645,21 +1650,33 @@ ___
1645
1650
 
1646
1651
  ### FileDisplay
1647
1652
 
1648
- ▸ **FileDisplay**(`«destructured»`): `Element`
1653
+ ▸ **FileDisplay**(`props`): `Element`
1654
+
1655
+ Component for displaying file references with context-awareness
1656
+
1657
+ This component is context-aware and automatically detects whether it's being used
1658
+ in a public or authenticated context. It fetches and displays files from storage.
1659
+
1660
+ When `supabase` prop is provided, it uses the explicit client (backwards compatible).
1661
+ When `supabase` prop is not provided, it automatically detects context and uses:
1662
+ - PublicPageProvider context for public pages
1663
+ - UnifiedAuthProvider context for authenticated pages
1649
1664
 
1650
1665
  #### Parameters
1651
1666
 
1652
- | Name | Type |
1653
- | :------ | :------ |
1654
- | `«destructured»` | [`FileDisplayProps`](interfaces/FileDisplayProps.md) |
1667
+ | Name | Type | Description |
1668
+ | :------ | :------ | :------ |
1669
+ | `props` | [`FileDisplayProps`](interfaces/FileDisplayProps.md) | File display configuration |
1655
1670
 
1656
1671
  #### Returns
1657
1672
 
1658
1673
  `Element`
1659
1674
 
1675
+ React element with file display
1676
+
1660
1677
  #### Defined in
1661
1678
 
1662
- [packages/core/src/components/FileDisplay/FileDisplay.tsx:19](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L19)
1679
+ [packages/core/src/components/FileDisplay/FileDisplay.tsx:825](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L825)
1663
1680
 
1664
1681
  ___
1665
1682
 
@@ -2898,7 +2915,7 @@ React element with public page header
2898
2915
 
2899
2916
  #### Defined in
2900
2917
 
2901
- [packages/core/src/components/PublicLayout/PublicPageHeader.tsx:85](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageHeader.tsx#L85)
2918
+ [packages/core/src/components/PublicLayout/PublicPageHeader.tsx:89](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageHeader.tsx#L89)
2902
2919
 
2903
2920
  ___
2904
2921
 
@@ -3040,7 +3057,7 @@ ___
3040
3057
 
3041
3058
  #### Defined in
3042
3059
 
3043
- [packages/core/src/components/Select/Select.tsx:87](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L87)
3060
+ [packages/core/src/components/Select/Select.tsx:167](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L167)
3044
3061
 
3045
3062
  ___
3046
3063
 
@@ -3060,7 +3077,7 @@ ___
3060
3077
 
3061
3078
  #### Defined in
3062
3079
 
3063
- [packages/core/src/components/Select/Select.tsx:147](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L147)
3080
+ [packages/core/src/components/Select/Select.tsx:342](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L342)
3064
3081
 
3065
3082
  ___
3066
3083
 
@@ -3080,7 +3097,7 @@ ___
3080
3097
 
3081
3098
  #### Defined in
3082
3099
 
3083
- [packages/core/src/components/Select/Select.tsx:270](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L270)
3100
+ [packages/core/src/components/Select/Select.tsx:465](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L465)
3084
3101
 
3085
3102
  ___
3086
3103
 
@@ -3100,7 +3117,7 @@ ___
3100
3117
 
3101
3118
  #### Defined in
3102
3119
 
3103
- [packages/core/src/components/Select/Select.tsx:287](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L287)
3120
+ [packages/core/src/components/Select/Select.tsx:482](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L482)
3104
3121
 
3105
3122
  ___
3106
3123
 
@@ -3120,7 +3137,7 @@ ___
3120
3137
 
3121
3138
  #### Defined in
3122
3139
 
3123
- [packages/core/src/components/Select/Select.tsx:378](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L378)
3140
+ [packages/core/src/components/Select/Select.tsx:585](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L585)
3124
3141
 
3125
3142
  ___
3126
3143
 
@@ -3140,7 +3157,7 @@ ___
3140
3157
 
3141
3158
  #### Defined in
3142
3159
 
3143
- [packages/core/src/components/Select/Select.tsx:466](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L466)
3160
+ [packages/core/src/components/Select/Select.tsx:686](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L686)
3144
3161
 
3145
3162
  ___
3146
3163
 
@@ -3160,7 +3177,7 @@ ___
3160
3177
 
3161
3178
  #### Defined in
3162
3179
 
3163
- [packages/core/src/components/Select/Select.tsx:477](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L477)
3180
+ [packages/core/src/components/Select/Select.tsx:697](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L697)
3164
3181
 
3165
3182
  ___
3166
3183
 
@@ -3180,7 +3197,7 @@ ___
3180
3197
 
3181
3198
  #### Defined in
3182
3199
 
3183
- [packages/core/src/components/Select/Select.tsx:488](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L488)
3200
+ [packages/core/src/components/Select/Select.tsx:708](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L708)
3184
3201
 
3185
3202
  ___
3186
3203
 
@@ -3931,6 +3948,75 @@ Get cache statistics for debugging
3931
3948
 
3932
3949
  ___
3933
3950
 
3951
+ ### usePublicFileDisplay
3952
+
3953
+ ▸ **usePublicFileDisplay**(`table_name`, `record_id`, `organisation_id`, `category`, `options`): [`UsePublicFileDisplayReturn`](interfaces/UsePublicFileDisplayReturn.md)
3954
+
3955
+ Hook for accessing public file references
3956
+
3957
+ This hook provides access to file references without requiring
3958
+ authentication. It only returns public files and generates public URLs.
3959
+
3960
+ #### Parameters
3961
+
3962
+ | Name | Type | Description |
3963
+ | :------ | :------ | :------ |
3964
+ | `table_name` | `undefined` \| `string` | The table name containing the file reference |
3965
+ | `record_id` | `undefined` \| `string` | The record ID that owns the file(s) |
3966
+ | `organisation_id` | `undefined` \| `string` | The organisation ID for storage path |
3967
+ | `category` | `undefined` \| [`FileCategory`](enums/FileCategory.md) | Optional file category to filter by (for single file mode) |
3968
+ | `options` | [`UsePublicFileDisplayOptions`](interfaces/UsePublicFileDisplayOptions.md) | Configuration options for caching and behavior |
3969
+
3970
+ #### Returns
3971
+
3972
+ [`UsePublicFileDisplayReturn`](interfaces/UsePublicFileDisplayReturn.md)
3973
+
3974
+ Object containing file data, loading state, error, and refetch function
3975
+
3976
+ #### Defined in
3977
+
3978
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:89](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L89)
3979
+
3980
+ ___
3981
+
3982
+ ### clearPublicFileDisplayCache
3983
+
3984
+ ▸ **clearPublicFileDisplayCache**(): `void`
3985
+
3986
+ Clear all cached public file data
3987
+ Useful for testing or when you need to force refresh all data
3988
+
3989
+ #### Returns
3990
+
3991
+ `void`
3992
+
3993
+ #### Defined in
3994
+
3995
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:337](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L337)
3996
+
3997
+ ___
3998
+
3999
+ ### getPublicFileDisplayCacheStats
4000
+
4001
+ ▸ **getPublicFileDisplayCacheStats**(): `Object`
4002
+
4003
+ Get cache statistics for debugging
4004
+
4005
+ #### Returns
4006
+
4007
+ `Object`
4008
+
4009
+ | Name | Type |
4010
+ | :------ | :------ |
4011
+ | `size` | `number` |
4012
+ | `keys` | `string`[] |
4013
+
4014
+ #### Defined in
4015
+
4016
+ [packages/core/src/hooks/public/usePublicFileDisplay.ts:348](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicFileDisplay.ts#L348)
4017
+
4018
+ ___
4019
+
3934
4020
  ### usePublicRouteParams
3935
4021
 
3936
4022
  ▸ **usePublicRouteParams**(`options?`): [`UsePublicRouteParamsReturn`](interfaces/UsePublicRouteParamsReturn.md)
@@ -217,6 +217,7 @@ import { FileUpload, FileCategory } from '@jmruthers/pace-core';
217
217
 
218
218
  #### FileDisplay Component
219
219
 
220
+ **With Category Filter (Single File):**
220
221
  ```tsx
221
222
  import { FileDisplay, FileCategory } from '@jmruthers/pace-core';
222
223
 
@@ -239,6 +240,20 @@ import { FileDisplay, FileCategory } from '@jmruthers/pace-core';
239
240
  </FileDisplay>
240
241
  ```
241
242
 
243
+ **Image-Only Display (Simplified):**
244
+ ```tsx
245
+ // Display just the first image without category filtering or metadata
246
+ <FileDisplay
247
+ supabase={supabase}
248
+ table_name="event"
249
+ record_id={eventId}
250
+ organisation_id={orgId}
251
+ displayOnly={true}
252
+ />
253
+ // When displayOnly is true, shows first file (prefers images) in simplified format
254
+ // without wrappers, borders, or metadata. Perfect for clean logo/image displays.
255
+ ```
256
+
242
257
  ### React Hooks
243
258
 
244
259
  #### useFileReference Hook
@@ -210,6 +210,7 @@ interface FileDisplayProps {
210
210
  record_id: string;
211
211
  organisation_id: string;
212
212
  category?: FileCategory;
213
+ displayOnly?: boolean;
213
214
  showUpload?: boolean;
214
215
  showDelete?: boolean;
215
216
  className?: string;
@@ -257,6 +258,21 @@ interface FileDisplayProps {
257
258
  </FileDisplay>
258
259
  ```
259
260
 
261
+ **Image-Only Display (Simplified):**
262
+ ```tsx
263
+ // Display just the first image file without metadata or wrappers
264
+ <FileDisplay
265
+ supabase={supabase}
266
+ table_name="event"
267
+ record_id={eventId}
268
+ organisation_id={organisationId}
269
+ displayOnly={true}
270
+ className="max-w-xs"
271
+ />
272
+ // When displayOnly is true and the file is an image, renders a simplified <img> tag
273
+ // without wrapper divs, borders, or metadata. Prefers image files over other types.
274
+ ```
275
+
260
276
  ## Hooks
261
277
 
262
278
  ### useFileReference
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jmruthers/pace-core",
3
- "version": "0.5.93",
3
+ "version": "0.5.95",
4
4
  "description": "Clean, modern React component library with Tailwind v4 styling and native utilities",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -365,10 +365,11 @@ describe('DataTableCore Component', () => {
365
365
  />
366
366
  );
367
367
 
368
- // Check that column headers are rendered by looking for the text content
369
- expect(screen.getByText('Name')).toBeInTheDocument();
370
- expect(screen.getByText('Age')).toBeInTheDocument();
371
- expect(screen.getByText('Email')).toBeInTheDocument();
368
+ // Check that column headers are rendered by looking for the columnheader role
369
+ // This avoids matching text in hidden SelectItems (column visibility selector)
370
+ expect(screen.getByRole('columnheader', { name: 'Name' })).toBeInTheDocument();
371
+ expect(screen.getByRole('columnheader', { name: 'Age' })).toBeInTheDocument();
372
+ expect(screen.getByRole('columnheader', { name: 'Email' })).toBeInTheDocument();
372
373
  });
373
374
 
374
375
  it('renders sortable column headers when sorting is enabled', () => {
@@ -386,9 +387,10 @@ describe('DataTableCore Component', () => {
386
387
  );
387
388
 
388
389
  // Check that column headers are rendered and sorting is enabled
389
- expect(screen.getByText('Name')).toBeInTheDocument();
390
- expect(screen.getByText('Age')).toBeInTheDocument();
391
- expect(screen.getByText('Email')).toBeInTheDocument();
390
+ // Use columnheader role to avoid matching hidden SelectItem labels
391
+ expect(screen.getByRole('columnheader', { name: /Name/i })).toBeInTheDocument();
392
+ expect(screen.getByRole('columnheader', { name: /Age/i })).toBeInTheDocument();
393
+ expect(screen.getByRole('columnheader', { name: /Email/i })).toBeInTheDocument();
392
394
  });
393
395
  });
394
396