@jmruthers/pace-core 0.5.101 → 0.5.102
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.
- package/dist/{PublicLoadingSpinner-C2h8zg67.d.ts → PublicLoadingSpinner-Cvgk-V0F.d.ts} +22 -55
- package/dist/{chunk-2ZYHCFUO.js → chunk-7ME4Z5OY.js} +148 -12
- package/dist/chunk-7ME4Z5OY.js.map +1 -0
- package/dist/{chunk-MKMKUCPF.js → chunk-SZWRW5FD.js} +20 -139
- package/dist/chunk-SZWRW5FD.js.map +1 -0
- package/dist/{chunk-A5DFMP3O.js → chunk-UDWTCBSH.js} +127 -498
- package/dist/chunk-UDWTCBSH.js.map +1 -0
- package/dist/components.d.ts +1 -1
- package/dist/components.js +2 -8
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +5 -5
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -12
- package/dist/index.js.map +1 -1
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +1 -1
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +1 -1
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +1 -1
- package/docs/api/classes/StorageUtils.md +2 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +1 -1
- package/docs/api/interfaces/DataRecord.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +77 -35
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +11 -24
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +1 -1
- package/docs/api/interfaces/RouteConfig.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/SwitchProps.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
- package/docs/api/interfaces/UseEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UseEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +29 -96
- package/docs/implementation-guides/file-reference-system.md +53 -2
- package/package.json +1 -1
- package/src/components/FileDisplay/FileDisplay.test.tsx +1 -1
- package/src/components/FileDisplay/FileDisplay.tsx +189 -300
- package/src/components/PublicLayout/PublicPageHeader.tsx +14 -9
- package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +25 -35
- package/src/components/PublicLayout/index.ts +2 -5
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/examples/PublicEventPage.tsx +17 -7
- package/src/examples/PublicPageApp.tsx +18 -8
- package/src/hooks/useFileReference.ts +10 -1
- package/src/utils/file-reference.ts +24 -7
- package/src/utils/storage/helpers.ts +12 -1
- package/dist/chunk-2ZYHCFUO.js.map +0 -1
- package/dist/chunk-A5DFMP3O.js.map +0 -1
- package/dist/chunk-MKMKUCPF.js.map +0 -1
- package/docs/api/interfaces/EventLogoProps.md +0 -152
- package/src/components/PublicLayout/EventLogo.tsx +0 -474
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.102](../README.md) / [Exports](../modules.md) / StorageUtils
|
|
2
2
|
|
|
3
3
|
# Class: StorageUtils
|
|
4
4
|
|
|
@@ -71,6 +71,7 @@ ___
|
|
|
71
71
|
▸ (`originalName`): `string`
|
|
72
72
|
|
|
73
73
|
Generate a unique filename with timestamp and UUID
|
|
74
|
+
Sanitizes the original filename to remove spaces and invalid characters for storage compatibility
|
|
74
75
|
|
|
75
76
|
##### Parameters
|
|
76
77
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.102](../README.md) / [Exports](../modules.md) / FileDisplayProps
|
|
2
2
|
|
|
3
3
|
# Interface: FileDisplayProps
|
|
4
4
|
|
|
@@ -6,40 +6,30 @@
|
|
|
6
6
|
|
|
7
7
|
### Properties
|
|
8
8
|
|
|
9
|
-
- [supabase](FileDisplayProps.md#supabase)
|
|
10
9
|
- [table\_name](FileDisplayProps.md#table_name)
|
|
11
10
|
- [record\_id](FileDisplayProps.md#record_id)
|
|
12
11
|
- [organisation\_id](FileDisplayProps.md#organisation_id)
|
|
13
12
|
- [category](FileDisplayProps.md#category)
|
|
14
13
|
- [displayOnly](FileDisplayProps.md#displayonly)
|
|
15
|
-
- [showUpload](FileDisplayProps.md#showupload)
|
|
16
14
|
- [showDelete](FileDisplayProps.md#showdelete)
|
|
17
15
|
- [className](FileDisplayProps.md#classname)
|
|
18
16
|
- [children](FileDisplayProps.md#children)
|
|
19
17
|
- [loadingComponent](FileDisplayProps.md#loadingcomponent)
|
|
20
18
|
- [errorComponent](FileDisplayProps.md#errorcomponent)
|
|
19
|
+
- [showFallback](FileDisplayProps.md#showfallback)
|
|
20
|
+
- [generateFallbackText](FileDisplayProps.md#generatefallbacktext)
|
|
21
|
+
- [fallbackText](FileDisplayProps.md#fallbacktext)
|
|
22
|
+
- [fallbackSize](FileDisplayProps.md#fallbacksize)
|
|
21
23
|
|
|
22
24
|
## Properties
|
|
23
25
|
|
|
24
|
-
### supabase
|
|
25
|
-
|
|
26
|
-
• `Optional` **supabase**: `default`\<`any`, ``"public"``, ``"public"``, `any`, `any`\>
|
|
27
|
-
|
|
28
|
-
Supabase client instance. Optional when used in PublicPageProvider or UnifiedAuthProvider context
|
|
29
|
-
|
|
30
|
-
#### Defined in
|
|
31
|
-
|
|
32
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:16](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L16)
|
|
33
|
-
|
|
34
|
-
___
|
|
35
|
-
|
|
36
26
|
### table\_name
|
|
37
27
|
|
|
38
28
|
• **table\_name**: `string`
|
|
39
29
|
|
|
40
30
|
#### Defined in
|
|
41
31
|
|
|
42
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:
|
|
32
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:42](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L42)
|
|
43
33
|
|
|
44
34
|
___
|
|
45
35
|
|
|
@@ -49,7 +39,7 @@ ___
|
|
|
49
39
|
|
|
50
40
|
#### Defined in
|
|
51
41
|
|
|
52
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:
|
|
42
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:43](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L43)
|
|
53
43
|
|
|
54
44
|
___
|
|
55
45
|
|
|
@@ -59,7 +49,7 @@ ___
|
|
|
59
49
|
|
|
60
50
|
#### Defined in
|
|
61
51
|
|
|
62
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:
|
|
52
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:44](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L44)
|
|
63
53
|
|
|
64
54
|
___
|
|
65
55
|
|
|
@@ -69,7 +59,7 @@ ___
|
|
|
69
59
|
|
|
70
60
|
#### Defined in
|
|
71
61
|
|
|
72
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:
|
|
62
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:45](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L45)
|
|
73
63
|
|
|
74
64
|
___
|
|
75
65
|
|
|
@@ -81,17 +71,7 @@ Display only a single file instead of all files. Uses first file (prefers images
|
|
|
81
71
|
|
|
82
72
|
#### Defined in
|
|
83
73
|
|
|
84
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:
|
|
85
|
-
|
|
86
|
-
___
|
|
87
|
-
|
|
88
|
-
### showUpload
|
|
89
|
-
|
|
90
|
-
• `Optional` **showUpload**: `boolean`
|
|
91
|
-
|
|
92
|
-
#### Defined in
|
|
93
|
-
|
|
94
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:23](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L23)
|
|
74
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:47](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L47)
|
|
95
75
|
|
|
96
76
|
___
|
|
97
77
|
|
|
@@ -101,7 +81,7 @@ ___
|
|
|
101
81
|
|
|
102
82
|
#### Defined in
|
|
103
83
|
|
|
104
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:
|
|
84
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:48](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L48)
|
|
105
85
|
|
|
106
86
|
___
|
|
107
87
|
|
|
@@ -111,7 +91,7 @@ ___
|
|
|
111
91
|
|
|
112
92
|
#### Defined in
|
|
113
93
|
|
|
114
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:
|
|
94
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:49](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L49)
|
|
115
95
|
|
|
116
96
|
___
|
|
117
97
|
|
|
@@ -121,7 +101,7 @@ ___
|
|
|
121
101
|
|
|
122
102
|
#### Defined in
|
|
123
103
|
|
|
124
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:
|
|
104
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:50](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L50)
|
|
125
105
|
|
|
126
106
|
___
|
|
127
107
|
|
|
@@ -133,7 +113,7 @@ Custom loading component to render during data fetching
|
|
|
133
113
|
|
|
134
114
|
#### Defined in
|
|
135
115
|
|
|
136
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:
|
|
116
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:52](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L52)
|
|
137
117
|
|
|
138
118
|
___
|
|
139
119
|
|
|
@@ -145,4 +125,66 @@ Custom error component to render when an error occurs
|
|
|
145
125
|
|
|
146
126
|
#### Defined in
|
|
147
127
|
|
|
148
|
-
[packages/core/src/components/FileDisplay/FileDisplay.tsx:
|
|
128
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:54](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L54)
|
|
129
|
+
|
|
130
|
+
___
|
|
131
|
+
|
|
132
|
+
### showFallback
|
|
133
|
+
|
|
134
|
+
• `Optional` **showFallback**: `boolean`
|
|
135
|
+
|
|
136
|
+
Whether to show fallback UI when no file is available or image fails to load
|
|
137
|
+
|
|
138
|
+
#### Defined in
|
|
139
|
+
|
|
140
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:56](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L56)
|
|
141
|
+
|
|
142
|
+
___
|
|
143
|
+
|
|
144
|
+
### generateFallbackText
|
|
145
|
+
|
|
146
|
+
• `Optional` **generateFallbackText**: (`fileName?`: `string`) => `string`
|
|
147
|
+
|
|
148
|
+
Custom function to generate fallback text from file name or other context
|
|
149
|
+
|
|
150
|
+
#### Type declaration
|
|
151
|
+
|
|
152
|
+
▸ (`fileName?`): `string`
|
|
153
|
+
|
|
154
|
+
##### Parameters
|
|
155
|
+
|
|
156
|
+
| Name | Type |
|
|
157
|
+
| :------ | :------ |
|
|
158
|
+
| `fileName?` | `string` |
|
|
159
|
+
|
|
160
|
+
##### Returns
|
|
161
|
+
|
|
162
|
+
`string`
|
|
163
|
+
|
|
164
|
+
#### Defined in
|
|
165
|
+
|
|
166
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:58](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L58)
|
|
167
|
+
|
|
168
|
+
___
|
|
169
|
+
|
|
170
|
+
### fallbackText
|
|
171
|
+
|
|
172
|
+
• `Optional` **fallbackText**: `string`
|
|
173
|
+
|
|
174
|
+
Explicit fallback text to display (overrides generateFallbackText)
|
|
175
|
+
|
|
176
|
+
#### Defined in
|
|
177
|
+
|
|
178
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:60](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L60)
|
|
179
|
+
|
|
180
|
+
___
|
|
181
|
+
|
|
182
|
+
### fallbackSize
|
|
183
|
+
|
|
184
|
+
• `Optional` **fallbackSize**: ``"sm"`` \| ``"lg"`` \| ``"md"`` \| ``"xl"`` \| ``"xs"`` \| ``"2xl"``
|
|
185
|
+
|
|
186
|
+
Size variant for fallback display (only applies when showFallback is true)
|
|
187
|
+
|
|
188
|
+
#### Defined in
|
|
189
|
+
|
|
190
|
+
[packages/core/src/components/FileDisplay/FileDisplay.tsx:62](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileDisplay/FileDisplay.tsx#L62)
|