@jmruthers/pace-core 0.5.75 → 0.5.76
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/{DataTable-HWZQGASI.js → DataTable-4GAVPIEG.js} +48 -30
- package/dist/{PublicLoadingSpinner-BKNBT6b6.d.ts → PublicLoadingSpinner-BiNER8F5.d.ts} +28 -17
- package/dist/{chunk-33PHABLB.js → chunk-AFGTSUAD.js} +10 -127
- package/dist/chunk-AFGTSUAD.js.map +1 -0
- package/dist/{chunk-2DFZ432F.js → chunk-K34IM5CT.js} +3 -5
- package/dist/{chunk-2DFZ432F.js.map → chunk-K34IM5CT.js.map} +1 -1
- package/dist/{chunk-2CHATWBF.js → chunk-KHJS6VIA.js} +199 -35
- package/dist/chunk-KHJS6VIA.js.map +1 -0
- package/dist/{chunk-ZTT2AXMX.js → chunk-KK73ZB4E.js} +2 -2
- package/dist/{chunk-CY3AHGO4.js → chunk-M5IWZRBT.js} +1750 -2815
- package/dist/chunk-M5IWZRBT.js.map +1 -0
- package/dist/{chunk-DAXLNIDY.js → chunk-Y6TXWPJO.js} +6 -4
- package/dist/{chunk-DAXLNIDY.js.map → chunk-Y6TXWPJO.js.map} +1 -1
- package/dist/{chunk-YNUBMSMV.js → chunk-YCKPEMJA.js} +186 -263
- package/dist/chunk-YCKPEMJA.js.map +1 -0
- package/dist/components.d.ts +1 -1
- package/dist/components.js +7 -6
- package/dist/components.js.map +1 -1
- package/dist/hooks.d.ts +17 -40
- package/dist/hooks.js +6 -6
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -10
- package/dist/index.js.map +1 -1
- package/dist/rbac/index.d.ts +54 -1
- package/dist/rbac/index.js +5 -4
- package/dist/utils.js +1 -1
- package/docs/TERMINOLOGY.md +231 -0
- 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 +1 -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/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/EventLogoProps.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +1 -1
- 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/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 +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACContextType.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACProviderProps.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/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/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +47 -0
- package/docs/api/interfaces/UseResolvedScopeReturn.md +47 -0
- 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 +57 -11
- package/docs/api-reference/providers.md +26 -7
- package/docs/best-practices/README.md +20 -0
- package/docs/best-practices/accessibility.md +566 -0
- package/docs/best-practices/performance-expansion.md +473 -0
- package/docs/core-concepts/authentication.md +15 -7
- package/docs/documentation-index.md +1 -1
- package/docs/documentation-templates.md +539 -0
- package/docs/getting-started/quick-start.md +16 -66
- package/docs/implementation-guides/component-styling.md +410 -0
- package/docs/implementation-guides/data-tables.md +1 -1
- package/docs/style-guide.md +39 -0
- package/package.json +1 -1
- package/src/__tests__/TEST_GUIDE_CURSOR.md +290 -0
- package/src/__tests__/helpers/supabaseMock.ts +48 -2
- package/src/components/DataTable/__tests__/DataTable.default-state.test.tsx +17 -6
- package/src/components/DataTable/__tests__/DataTableCore.test.tsx +73 -9
- package/src/components/DataTable/components/DataTableCore.tsx +280 -475
- package/src/components/DataTable/components/UnifiedTableBody.tsx +120 -153
- package/src/components/DataTable/components/index.ts +1 -2
- package/src/components/DataTable/context/__tests__/DataTableContext.test.tsx +208 -275
- package/src/components/DataTable/core/index.ts +1 -8
- package/src/components/DataTable/hooks/__tests__/useColumnOrderPersistence.test.ts +525 -0
- package/src/components/DataTable/hooks/__tests__/useColumnReordering.test.ts +570 -0
- package/src/components/DataTable/hooks/__tests__/useHierarchicalState.test.ts +214 -0
- package/src/components/DataTable/hooks/__tests__/useTableColumns.test.ts +224 -0
- package/src/components/DataTable/hooks/index.ts +6 -0
- package/src/components/DataTable/hooks/useColumnReordering.ts +1 -0
- package/src/components/DataTable/hooks/useDataTablePermissions.ts +149 -0
- package/src/components/DataTable/hooks/useDataTableState.ts +12 -6
- package/src/components/DataTable/hooks/useHierarchicalState.ts +26 -8
- package/src/components/DataTable/hooks/useTableColumns.ts +153 -0
- package/src/components/DataTable/index.ts +1 -9
- package/src/components/DataTable/utils/__tests__/COVERAGE_NOTE.md +89 -0
- package/src/components/DataTable/utils/__tests__/exportUtils.test.ts +3 -6
- package/src/components/DataTable/utils/__tests__/flexibleImport.test.ts +462 -0
- package/src/components/DataTable/utils/__tests__/hierarchicalSorting.test.ts +247 -0
- package/src/components/DataTable/utils/__tests__/hierarchicalUtils.test.ts +8 -6
- package/src/components/DataTable/utils/__tests__/performanceUtils.test.ts +466 -0
- package/src/components/DataTable/utils/__tests__/rowUtils.test.ts +265 -0
- package/src/components/DataTable/utils/errorHandling.ts +52 -460
- package/src/components/DataTable/utils/exportUtils.ts +46 -15
- package/src/components/DataTable/utils/hierarchicalSorting.ts +50 -3
- package/src/components/DataTable/utils/hierarchicalUtils.ts +167 -34
- package/src/components/DataTable/utils/index.ts +5 -0
- package/src/components/DataTable/utils/rowUtils.ts +68 -0
- package/src/components/EventSelector/EventSelector.test.tsx +672 -0
- package/src/components/Label/__tests__/Label.test.tsx +434 -0
- package/src/components/PublicLayout/__tests__/PublicPageContextChecker.test.tsx +190 -0
- package/src/components/PublicLayout/__tests__/PublicPageDebugger.test.tsx +185 -0
- package/src/components/PublicLayout/__tests__/PublicPageProvider.test.tsx +313 -0
- package/src/components/Select/Select.test.tsx +143 -120
- package/src/components/Select/Select.tsx +47 -212
- package/src/components/Select/hooks.ts +36 -1
- package/src/components/Select/index.ts +2 -1
- package/src/hooks/services/__tests__/useServiceHooks.test.tsx +137 -0
- package/src/hooks/useSecureDataAccess.test.ts +32 -29
- package/src/providers/__tests__/ProviderLifecycle.test.tsx +341 -0
- package/src/rbac/hooks/__tests__/usePermissions.integration.test.ts +437 -0
- package/src/rbac/hooks/index.ts +2 -0
- package/src/rbac/hooks/useResolvedScope.ts +232 -0
- package/src/services/__tests__/InactivityService.lifecycle.test.ts +411 -0
- package/src/services/__tests__/OrganisationService.pagination.test.ts +375 -0
- package/src/types/__tests__/README.md +114 -0
- package/src/types/__tests__/validation.test.ts +731 -0
- package/src/utils/__tests__/file-reference.test.ts +383 -0
- package/src/utils/__tests__/performanceBenchmark.test.ts +175 -0
- package/src/utils/appNameResolver.test.ts +54 -0
- package/src/validation/__tests__/csrf.unit.test.ts +63 -0
- package/src/validation/__tests__/passwordSchema.unit.test.ts +105 -0
- package/dist/chunk-2CHATWBF.js.map +0 -1
- package/dist/chunk-33PHABLB.js.map +0 -1
- package/dist/chunk-CY3AHGO4.js.map +0 -1
- package/dist/chunk-TYHR5X4W.js +0 -33
- package/dist/chunk-TYHR5X4W.js.map +0 -1
- package/dist/chunk-YNUBMSMV.js.map +0 -1
- package/dist/eventContext-BBA42P6G.js +0 -14
- package/dist/eventContext-BBA42P6G.js.map +0 -1
- package/docs/documentation-style-checklist.md +0 -294
- package/src/components/DataTable/components/DataTableBody.tsx +0 -488
- package/src/components/DataTable/components/DraggableColumnHeader.tsx +0 -144
- package/src/components/DataTable/components/VirtualizedDataTable.tsx +0 -515
- package/src/components/DataTable/core/ActionManager.ts +0 -235
- package/src/components/DataTable/core/ColumnManager.ts +0 -215
- package/src/components/DataTable/core/DataManager.ts +0 -188
- package/src/components/DataTable/core/DataTableContext.tsx +0 -181
- package/src/components/DataTable/core/LocalDataAdapter.ts +0 -264
- package/src/components/DataTable/core/PluginRegistry.ts +0 -229
- package/src/components/DataTable/core/StateManager.ts +0 -311
- package/src/components/DataTable/core/__tests__/ActionManager.test.ts +0 -634
- package/src/components/DataTable/core/__tests__/ColumnManager.test.ts +0 -193
- package/src/components/DataTable/core/__tests__/DataManager.test.ts +0 -519
- package/src/components/DataTable/core/__tests__/StateManager.test.ts +0 -714
- package/src/components/DataTable/core/interfaces.ts +0 -338
- package/src/components/DataTable/utils/debugTools.ts +0 -583
- package/src/components/Select/Select.bug-test.tsx +0 -69
- package/src/components/Select/Select.refactored.tsx +0 -497
- /package/dist/{DataTable-HWZQGASI.js.map → DataTable-4GAVPIEG.js.map} +0 -0
- /package/dist/{chunk-ZTT2AXMX.js.map → chunk-KK73ZB4E.js.map} +0 -0
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ActionButtons,
|
|
3
|
-
ActionManagerImpl,
|
|
4
3
|
BulkOperationsDropdown,
|
|
5
4
|
ColumnFactory,
|
|
6
|
-
ColumnManagerImpl,
|
|
7
5
|
ColumnVisibilityDropdown,
|
|
8
|
-
DataManager,
|
|
9
6
|
DataTable,
|
|
10
7
|
DataTableCore,
|
|
11
8
|
DataTableErrorBoundary,
|
|
12
9
|
DataTableModals,
|
|
13
|
-
DataTableProvider,
|
|
14
10
|
DataTableToolbar,
|
|
15
11
|
EditableRow,
|
|
16
12
|
EmptyState,
|
|
@@ -19,34 +15,47 @@ import {
|
|
|
19
15
|
GroupingDropdown,
|
|
20
16
|
ImportModal,
|
|
21
17
|
LoadingState,
|
|
22
|
-
LocalDataAdapter,
|
|
23
18
|
PaginationControls,
|
|
24
|
-
PluginRegistryImpl,
|
|
25
|
-
StateManagerImpl,
|
|
26
19
|
UnifiedTableBody,
|
|
20
|
+
calculateAllDepths,
|
|
21
|
+
calculateAllIndentation,
|
|
22
|
+
calculateIndentation,
|
|
23
|
+
createHierarchicalStructure,
|
|
27
24
|
exportToCSV,
|
|
28
25
|
generateCSVContent,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
getCellRenderer,
|
|
27
|
+
getHierarchicalSortConfig,
|
|
28
|
+
getRowDepth,
|
|
29
|
+
getRowIdSafe,
|
|
30
|
+
groupHierarchicalData,
|
|
31
|
+
hasValidRowId,
|
|
32
|
+
isHierarchicalSortableColumn,
|
|
33
|
+
shouldShowColumnForRow,
|
|
34
|
+
sortHierarchicalDataByStructure,
|
|
35
|
+
sortHierarchicalDataWithSorting,
|
|
36
|
+
validateHierarchicalData
|
|
37
|
+
} from "./chunk-M5IWZRBT.js";
|
|
38
|
+
import "./chunk-KHJS6VIA.js";
|
|
37
39
|
import "./chunk-FGMFQSHX.js";
|
|
38
40
|
import "./chunk-B2WTCLCV.js";
|
|
39
41
|
import {
|
|
42
|
+
CircuitBreaker,
|
|
43
|
+
DEFAULT_FALLBACK_CONFIG,
|
|
40
44
|
DataChunkManager,
|
|
45
|
+
DataTableError,
|
|
46
|
+
DataTableErrorType,
|
|
47
|
+
ErrorRecoveryManager,
|
|
48
|
+
MemoryMonitor,
|
|
41
49
|
SearchIndex,
|
|
42
50
|
VisibilityTracker,
|
|
43
51
|
chunkData,
|
|
44
52
|
debounce,
|
|
45
53
|
determinePaginationMode,
|
|
46
54
|
getOptimalPageSizeOptions,
|
|
55
|
+
safeExecute,
|
|
47
56
|
throttle,
|
|
48
57
|
useDataTablePerformance
|
|
49
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-YCKPEMJA.js";
|
|
50
59
|
import "./chunk-LW7MMEAQ.js";
|
|
51
60
|
import "./chunk-URUTVZ7N.js";
|
|
52
61
|
import "./chunk-WN6XJWOS.js";
|
|
@@ -57,46 +66,55 @@ import "./chunk-XLZ7U46Z.js";
|
|
|
57
66
|
import "./chunk-PLDDJCW6.js";
|
|
58
67
|
export {
|
|
59
68
|
ActionButtons,
|
|
60
|
-
ActionManagerImpl as ActionManager,
|
|
61
69
|
BulkOperationsDropdown,
|
|
70
|
+
CircuitBreaker,
|
|
62
71
|
ColumnFactory,
|
|
63
|
-
ColumnManagerImpl as ColumnManager,
|
|
64
72
|
ColumnVisibilityDropdown,
|
|
73
|
+
DEFAULT_FALLBACK_CONFIG,
|
|
65
74
|
DataChunkManager,
|
|
66
|
-
DataManager,
|
|
67
75
|
DataTable,
|
|
68
76
|
DataTableCore,
|
|
77
|
+
DataTableError,
|
|
69
78
|
DataTableErrorBoundary,
|
|
79
|
+
DataTableErrorType,
|
|
70
80
|
DataTableModals,
|
|
71
|
-
DataTableProvider,
|
|
72
81
|
DataTableToolbar,
|
|
73
82
|
EditableRow,
|
|
74
83
|
EmptyState,
|
|
75
84
|
EnhancedPaginationControls,
|
|
85
|
+
ErrorRecoveryManager,
|
|
76
86
|
GroupHeader,
|
|
77
87
|
GroupingDropdown,
|
|
78
88
|
ImportModal,
|
|
79
89
|
LoadingState,
|
|
80
|
-
|
|
90
|
+
MemoryMonitor,
|
|
81
91
|
PaginationControls,
|
|
82
|
-
PluginRegistryImpl as PluginRegistry,
|
|
83
92
|
SearchIndex,
|
|
84
|
-
StateManagerImpl as StateManager,
|
|
85
93
|
UnifiedTableBody,
|
|
86
94
|
VisibilityTracker,
|
|
95
|
+
calculateAllDepths,
|
|
96
|
+
calculateAllIndentation,
|
|
97
|
+
calculateIndentation,
|
|
87
98
|
chunkData,
|
|
99
|
+
createHierarchicalStructure,
|
|
88
100
|
debounce,
|
|
89
101
|
determinePaginationMode,
|
|
90
102
|
exportToCSV,
|
|
91
103
|
generateCSVContent,
|
|
104
|
+
getCellRenderer,
|
|
105
|
+
getHierarchicalSortConfig,
|
|
92
106
|
getOptimalPageSizeOptions,
|
|
107
|
+
getRowDepth,
|
|
108
|
+
getRowIdSafe,
|
|
109
|
+
groupHierarchicalData,
|
|
110
|
+
hasValidRowId,
|
|
111
|
+
isHierarchicalSortableColumn,
|
|
112
|
+
safeExecute,
|
|
113
|
+
shouldShowColumnForRow,
|
|
114
|
+
sortHierarchicalDataByStructure,
|
|
115
|
+
sortHierarchicalDataWithSorting,
|
|
93
116
|
throttle,
|
|
94
|
-
useActionManager,
|
|
95
|
-
useColumnManager,
|
|
96
|
-
useDataManager,
|
|
97
|
-
useDataTableContext,
|
|
98
117
|
useDataTablePerformance,
|
|
99
|
-
|
|
100
|
-
useStateManager
|
|
118
|
+
validateHierarchicalData
|
|
101
119
|
};
|
|
102
|
-
//# sourceMappingURL=DataTable-
|
|
120
|
+
//# sourceMappingURL=DataTable-4GAVPIEG.js.map
|
|
@@ -856,32 +856,43 @@ declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & Re
|
|
|
856
856
|
declare const DialogDescription: React.ForwardRefExoticComponent<DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
857
857
|
|
|
858
858
|
/**
|
|
859
|
-
* @file Select
|
|
859
|
+
* @file Select Hooks - Custom hooks for Select component state management
|
|
860
860
|
* @package @jmruthers/pace-core
|
|
861
|
-
* @module Components/Select
|
|
862
|
-
* @since 0.
|
|
863
|
-
*
|
|
864
|
-
* A simple select component using semantic HTML structure
|
|
865
|
-
* with proper DOM nesting and accessibility.
|
|
861
|
+
* @module Components/Select/Hooks
|
|
862
|
+
* @since 0.4.0
|
|
866
863
|
*
|
|
867
|
-
*
|
|
868
|
-
* -
|
|
869
|
-
* -
|
|
870
|
-
* -
|
|
871
|
-
* - Simple positioning and styling
|
|
872
|
-
* - Better accessibility and SEO
|
|
873
|
-
* - Backward compatible API
|
|
864
|
+
* Custom hooks for Select component following SOLID principles:
|
|
865
|
+
* - Single Responsibility: Each hook handles one concern
|
|
866
|
+
* - Open/Closed: Easy to extend without modification
|
|
867
|
+
* - Dependency Inversion: Abstractions over concrete implementations
|
|
874
868
|
*/
|
|
875
869
|
|
|
876
|
-
interface
|
|
870
|
+
interface UseSelectStateProps {
|
|
877
871
|
value?: string;
|
|
878
872
|
defaultValue?: string;
|
|
879
873
|
selectedText?: string;
|
|
880
|
-
onValueChange?: (value: string) => void;
|
|
881
874
|
open?: boolean;
|
|
882
875
|
defaultOpen?: boolean;
|
|
883
|
-
onOpenChange?: (open: boolean) => void;
|
|
884
876
|
disabled?: boolean;
|
|
877
|
+
onValueChange?: (value: string) => void;
|
|
878
|
+
onOpenChange?: (open: boolean) => void;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* @file Select Component - Refactored SOLID Implementation
|
|
883
|
+
* @package @jmruthers/pace-core
|
|
884
|
+
* @module Components/Select
|
|
885
|
+
* @since 0.4.0
|
|
886
|
+
*
|
|
887
|
+
* Refactored Select component following SOLID principles:
|
|
888
|
+
* - Single Responsibility: Each component has one clear purpose
|
|
889
|
+
* - Open/Closed: Easy to extend without modification
|
|
890
|
+
* - Liskov Substitution: Components can be substituted
|
|
891
|
+
* - Interface Segregation: Small, focused interfaces
|
|
892
|
+
* - Dependency Inversion: Depends on abstractions, not concretions
|
|
893
|
+
*/
|
|
894
|
+
|
|
895
|
+
interface SelectProps extends Omit<React.HTMLAttributes<HTMLFormElement>, 'onChange' | 'onKeyDown' | 'onFocus' | 'onBlur'> {
|
|
885
896
|
children: React.ReactNode;
|
|
886
897
|
className?: string;
|
|
887
898
|
}
|
|
@@ -908,7 +919,7 @@ interface SelectItemProps {
|
|
|
908
919
|
className?: string;
|
|
909
920
|
onClick?: (e: React.MouseEvent) => void;
|
|
910
921
|
}
|
|
911
|
-
declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLFormElement>>;
|
|
922
|
+
declare const Select: React.ForwardRefExoticComponent<SelectProps & UseSelectStateProps & React.RefAttributes<HTMLFormElement>>;
|
|
912
923
|
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
913
924
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
914
925
|
declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLUListElement>>;
|
|
@@ -34,124 +34,8 @@ var init_OrganisationProvider = __esm({
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
// src/hooks/useToast.ts
|
|
38
|
-
import * as React from "react";
|
|
39
|
-
var TOAST_LIMIT = 5;
|
|
40
|
-
var TOAST_REMOVE_DELAY = 1e3;
|
|
41
|
-
var toastTimeouts = /* @__PURE__ */ new Map();
|
|
42
|
-
var memoryState = {
|
|
43
|
-
toasts: []
|
|
44
|
-
};
|
|
45
|
-
var listeners = [];
|
|
46
|
-
function dispatch(action) {
|
|
47
|
-
memoryState = reducer(memoryState, action);
|
|
48
|
-
listeners.forEach((listener) => {
|
|
49
|
-
listener(memoryState);
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function genId() {
|
|
53
|
-
return Math.random().toString(36).substring(2, 9);
|
|
54
|
-
}
|
|
55
|
-
var addToRemoveQueue = (toastId) => {
|
|
56
|
-
if (toastTimeouts.has(toastId)) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
const timeout = setTimeout(() => {
|
|
60
|
-
toastTimeouts.delete(toastId);
|
|
61
|
-
dispatch({
|
|
62
|
-
type: "REMOVE_TOAST",
|
|
63
|
-
toastId
|
|
64
|
-
});
|
|
65
|
-
}, TOAST_REMOVE_DELAY);
|
|
66
|
-
toastTimeouts.set(toastId, timeout);
|
|
67
|
-
};
|
|
68
|
-
function reducer(state, action) {
|
|
69
|
-
switch (action.type) {
|
|
70
|
-
case "ADD_TOAST":
|
|
71
|
-
return {
|
|
72
|
-
...state,
|
|
73
|
-
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
|
|
74
|
-
};
|
|
75
|
-
case "UPDATE_TOAST":
|
|
76
|
-
return {
|
|
77
|
-
...state,
|
|
78
|
-
toasts: state.toasts.map(
|
|
79
|
-
(t) => t.id === action.toast?.id ? { ...t, ...action.toast } : t
|
|
80
|
-
)
|
|
81
|
-
};
|
|
82
|
-
case "DISMISS_TOAST": {
|
|
83
|
-
const { toastId } = action;
|
|
84
|
-
if (toastId) {
|
|
85
|
-
addToRemoveQueue(toastId);
|
|
86
|
-
}
|
|
87
|
-
return {
|
|
88
|
-
...state,
|
|
89
|
-
toasts: state.toasts.map(
|
|
90
|
-
(t) => t.id === toastId || toastId === void 0 ? {
|
|
91
|
-
...t,
|
|
92
|
-
open: false
|
|
93
|
-
} : t
|
|
94
|
-
)
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
case "REMOVE_TOAST":
|
|
98
|
-
if (action.toastId === void 0) {
|
|
99
|
-
return {
|
|
100
|
-
...state,
|
|
101
|
-
toasts: []
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
return {
|
|
105
|
-
...state,
|
|
106
|
-
toasts: state.toasts.filter((t) => t.id !== action.toastId)
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function toast({ ...props }) {
|
|
111
|
-
const id = genId();
|
|
112
|
-
const update = (props2) => dispatch({
|
|
113
|
-
type: "UPDATE_TOAST",
|
|
114
|
-
toast: { ...props2, id }
|
|
115
|
-
});
|
|
116
|
-
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
|
117
|
-
dispatch({
|
|
118
|
-
type: "ADD_TOAST",
|
|
119
|
-
toast: {
|
|
120
|
-
...props,
|
|
121
|
-
id,
|
|
122
|
-
open: true,
|
|
123
|
-
dismiss,
|
|
124
|
-
onOpenChange: (open) => {
|
|
125
|
-
if (!open) dismiss();
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
return {
|
|
130
|
-
id,
|
|
131
|
-
dismiss,
|
|
132
|
-
update
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
function useToast() {
|
|
136
|
-
const [state, setState] = React.useState(memoryState);
|
|
137
|
-
React.useEffect(() => {
|
|
138
|
-
listeners.push(setState);
|
|
139
|
-
return () => {
|
|
140
|
-
const index = listeners.indexOf(setState);
|
|
141
|
-
if (index > -1) {
|
|
142
|
-
listeners.splice(index, 1);
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
}, [state]);
|
|
146
|
-
return {
|
|
147
|
-
...state,
|
|
148
|
-
toast,
|
|
149
|
-
dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
37
|
// src/components/PublicLayout/PublicErrorBoundary.tsx
|
|
154
|
-
import
|
|
38
|
+
import React, { Component } from "react";
|
|
155
39
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
156
40
|
var PublicErrorBoundary = class extends Component {
|
|
157
41
|
constructor(props) {
|
|
@@ -253,11 +137,11 @@ var PublicErrorBoundary = class extends Component {
|
|
|
253
137
|
}
|
|
254
138
|
};
|
|
255
139
|
function useErrorBoundary() {
|
|
256
|
-
const [error, setError] =
|
|
257
|
-
const resetError =
|
|
140
|
+
const [error, setError] = React.useState(null);
|
|
141
|
+
const resetError = React.useCallback(() => {
|
|
258
142
|
setError(null);
|
|
259
143
|
}, []);
|
|
260
|
-
const captureError =
|
|
144
|
+
const captureError = React.useCallback((error2) => {
|
|
261
145
|
setError(error2);
|
|
262
146
|
}, []);
|
|
263
147
|
if (error) {
|
|
@@ -392,7 +276,7 @@ function useAppConfig() {
|
|
|
392
276
|
}
|
|
393
277
|
|
|
394
278
|
// src/hooks/public/usePublicEventLogo.ts
|
|
395
|
-
import { useState
|
|
279
|
+
import { useState, useEffect, useCallback, useMemo as useMemo3 } from "react";
|
|
396
280
|
var publicDataCache = /* @__PURE__ */ new Map();
|
|
397
281
|
function defaultGenerateFallbackText(eventName) {
|
|
398
282
|
if (!eventName) return "EV";
|
|
@@ -407,9 +291,9 @@ function usePublicEventLogo(eventId, eventName, organisationId, options) {
|
|
|
407
291
|
generateFallbackText = defaultGenerateFallbackText,
|
|
408
292
|
supabase
|
|
409
293
|
} = options;
|
|
410
|
-
const [logoUrl, setLogoUrl] =
|
|
411
|
-
const [isLoading, setIsLoading] =
|
|
412
|
-
const [error, setError] =
|
|
294
|
+
const [logoUrl, setLogoUrl] = useState(null);
|
|
295
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
296
|
+
const [error, setError] = useState(null);
|
|
413
297
|
const fallbackText = useMemo3(() => {
|
|
414
298
|
return eventName ? generateFallbackText(eventName) : "EV";
|
|
415
299
|
}, [eventName, generateFallbackText]);
|
|
@@ -479,7 +363,7 @@ function usePublicEventLogo(eventId, eventName, organisationId, options) {
|
|
|
479
363
|
setIsLoading(false);
|
|
480
364
|
}
|
|
481
365
|
}, [eventId, organisationId, supabase, cacheTtl, enableCache, validateImage]);
|
|
482
|
-
|
|
366
|
+
useEffect(() => {
|
|
483
367
|
if (eventId && organisationId) {
|
|
484
368
|
fetchLogo();
|
|
485
369
|
} else {
|
|
@@ -522,7 +406,6 @@ function getPublicLogoCacheStats() {
|
|
|
522
406
|
export {
|
|
523
407
|
OrganisationProvider_exports,
|
|
524
408
|
init_OrganisationProvider,
|
|
525
|
-
useToast,
|
|
526
409
|
PublicErrorBoundary,
|
|
527
410
|
useErrorBoundary,
|
|
528
411
|
DefaultPublicErrorFallback,
|
|
@@ -534,4 +417,4 @@ export {
|
|
|
534
417
|
clearPublicLogoCache,
|
|
535
418
|
getPublicLogoCacheStats
|
|
536
419
|
};
|
|
537
|
-
//# sourceMappingURL=chunk-
|
|
420
|
+
//# sourceMappingURL=chunk-AFGTSUAD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/providers/OrganisationProvider.tsx","../src/components/PublicLayout/PublicErrorBoundary.tsx","../src/components/PublicLayout/PublicPageProvider.tsx","../src/hooks/useAppConfig.ts","../src/hooks/public/usePublicEventLogo.ts"],"sourcesContent":["/**\n * @file Re-export for OrganisationProvider\n * @package @jmruthers/pace-core\n * @module Providers\n * @since 0.1.0\n * \n * Re-exports the service-based OrganisationProvider for backward compatibility.\n */\n\nexport { OrganisationServiceProvider as OrganisationProvider } from './services/OrganisationServiceProvider';\nexport type { OrganisationServiceProviderProps as OrganisationProviderProps } from './services/OrganisationServiceProvider';\n\n// Re-export context and hook\nexport { OrganisationServiceContext, useOrganisationService } from './services/OrganisationServiceProvider';\nexport type { OrganisationServiceContextType } from './services/OrganisationServiceProvider';\n\n// Re-export convenience hook for backward compatibility\nexport { useOrganisations } from '../hooks/useOrganisations';\n\n","/**\n * @file Public Error Boundary Component\n * @package @jmruthers/pace-core\n * @module Components/PublicLayout\n * @since 1.0.0\n *\n * An error boundary component specifically designed for public pages.\n * Provides graceful error handling and recovery for public content.\n *\n * Features:\n * - Graceful error handling\n * - User-friendly error messages\n * - Recovery mechanisms\n * - Accessibility compliant\n * - TypeScript support\n *\n * @example\n * ```tsx\n * import { PublicErrorBoundary } from '@jmruthers/pace-core';\n *\n * function PublicEventPage() {\n * return (\n * <PublicErrorBoundary>\n * <PublicPageContent />\n * </PublicErrorBoundary>\n * );\n * }\n * ```\n *\n * @accessibility\n * - WCAG 2.1 AA compliant\n * - Screen reader friendly error messages\n * - Keyboard accessible recovery actions\n * - High contrast support\n *\n * @dependencies\n * - React 18+ - Component framework\n * - Error boundary patterns\n * - Tailwind CSS - Styling\n */\n\nimport React, { Component, ErrorInfo, ReactNode } from 'react';\n\nexport interface PublicErrorBoundaryProps {\n /** Child components to wrap */\n children: ReactNode;\n /** Custom error fallback component */\n fallback?: React.ComponentType<PublicErrorBoundaryState>;\n /** Custom CSS classes for error display */\n className?: string;\n /** Whether to show error details in development */\n showErrorDetails?: boolean;\n /** Custom error message */\n customErrorMessage?: string;\n /** Custom recovery action */\n onRecover?: () => void;\n}\n\nexport interface PublicErrorBoundaryState {\n /** Whether an error has occurred */\n hasError: boolean;\n /** The error that occurred */\n error: Error | null;\n /** Error information */\n errorInfo: ErrorInfo | null;\n /** Function to reset the error state */\n resetError: () => void;\n}\n\n/**\n * Error boundary component for public pages\n * \n * This component catches JavaScript errors anywhere in the child component tree,\n * logs those errors, and displays a fallback UI instead of the component tree that crashed.\n * \n * @param props - Error boundary configuration\n * @returns React element with error boundary wrapper\n */\nexport class PublicErrorBoundary extends Component<PublicErrorBoundaryProps, PublicErrorBoundaryState> {\n constructor(props: PublicErrorBoundaryProps) {\n super(props);\n this.state = {\n hasError: false,\n error: null,\n errorInfo: null,\n resetError: this.resetError.bind(this)\n };\n }\n\n static getDerivedStateFromError(error: Error): Partial<PublicErrorBoundaryState> {\n // Update state so the next render will show the fallback UI\n return {\n hasError: true,\n error\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // Log the error to console in development\n if (import.meta.env.MODE === 'development') {\n console.error('PublicErrorBoundary caught an error:', error, errorInfo);\n }\n\n // Update state with error info\n this.setState({\n error,\n errorInfo\n });\n\n // You can also log the error to an error reporting service here\n // Example: logErrorToService(error, errorInfo);\n }\n\n resetError = () => {\n this.setState({\n hasError: false,\n error: null,\n errorInfo: null\n });\n };\n\n render() {\n if (this.state.hasError) {\n // Custom fallback component\n if (this.props.fallback) {\n return <this.props.fallback {...this.state} />;\n }\n\n // Default error UI\n return (\n <div className={`min-h-screen bg-white flex items-center justify-center ${this.props.className || ''}`}>\n <div className=\"max-w-md mx-auto text-center px-4\">\n <div className=\"mb-6\">\n <div className=\"mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-red-100 mb-4\">\n <svg\n className=\"h-6 w-6 text-red-600\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z\"\n />\n </svg>\n </div>\n <h1 className=\"text-2xl font-bold text-gray-900 mb-2\">\n Something went wrong\n </h1>\n <p className=\"text-gray-600 mb-6\">\n {this.props.customErrorMessage || \n 'We encountered an error while loading this page. Please try again.'}\n </p>\n </div>\n\n {/* Error details in development */}\n {this.props.showErrorDetails && this.state.error && (\n <div className=\"mb-6 p-4 bg-red-50 border border-red-200 rounded-md text-left\">\n <h3 className=\"text-sm font-medium text-red-800 mb-2\">\n Error Details (Development Only)\n </h3>\n <pre className=\"text-xs text-red-700 whitespace-pre-wrap\">\n {this.state.error.toString()}\n {this.state.errorInfo?.componentStack}\n </pre>\n </div>\n )}\n\n {/* Recovery actions */}\n <div className=\"space-y-3\">\n <button\n onClick={this.resetError}\n className=\"w-full px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2\"\n >\n Try Again\n </button>\n \n <button\n onClick={() => window.location.reload()}\n className=\"w-full px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2\"\n >\n Reload Page\n </button>\n\n {this.props.onRecover && (\n <button\n onClick={this.props.onRecover}\n className=\"w-full px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2\"\n >\n Alternative Action\n </button>\n )}\n </div>\n\n {/* Help text */}\n <div className=\"mt-6 text-sm text-gray-500\">\n <p>\n If this problem persists, please contact support or try accessing the page later.\n </p>\n </div>\n </div>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n\n/**\n * Hook for accessing error boundary state\n * Useful for components that need to know if they're inside an error boundary\n */\nexport function useErrorBoundary() {\n const [error, setError] = React.useState<Error | null>(null);\n\n const resetError = React.useCallback(() => {\n setError(null);\n }, []);\n\n const captureError = React.useCallback((error: Error) => {\n setError(error);\n }, []);\n\n // Throw error synchronously during render so error boundary can catch it\n if (error) {\n throw error;\n }\n\n return { captureError, resetError };\n}\n\n/**\n * Default error fallback component\n */\nexport function DefaultPublicErrorFallback({ \n error, \n resetError \n}: PublicErrorBoundaryState) {\n return (\n <div className=\"min-h-screen bg-white flex items-center justify-center\">\n <div className=\"max-w-md mx-auto text-center px-4\">\n <div className=\"mb-6\">\n <div className=\"mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-red-100 mb-4\">\n <svg\n className=\"h-6 w-6 text-red-600\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z\"\n />\n </svg>\n </div>\n <h1 className=\"text-2xl font-bold text-gray-900 mb-2\">\n Page Error\n </h1>\n <p className=\"text-gray-600 mb-6\">\n We encountered an error while loading this page.\n </p>\n </div>\n\n <button\n onClick={resetError}\n className=\"w-full px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2\"\n >\n Try Again\n </button>\n </div>\n </div>\n );\n}\n","/**\n * @file Public Page Provider\n * @package @jmruthers/pace-core\n * @module Components/PublicLayout\n * @since 1.0.0\n *\n * A completely isolated provider for public pages that doesn't trigger\n * any authentication context. This ensures public pages work independently\n * of the main application's authentication system.\n *\n * Features:\n * - No authentication required\n * - No organisation context\n * - No event context\n * - Completely isolated from main app context\n * - Environment variable access for public data\n * - Error boundary integration\n *\n * @example\n * ```tsx\n * import { PublicPageProvider } from '@jmruthers/pace-core';\n * \n * function PublicApp() {\n * return (\n * <PublicPageProvider>\n * <Routes>\n * <Route path=\"/events/:eventCode/recipe-grid-report\" element={<PublicRecipePage />} />\n * </Routes>\n * </PublicPageProvider>\n * );\n * }\n * ```\n */\n\nimport React, { createContext, useContext, ReactNode, useMemo } from 'react';\nimport { createClient } from '@supabase/supabase-js';\nimport type { Database } from '../../types/database';\nimport { PublicErrorBoundary } from './PublicErrorBoundary';\n\ninterface PublicPageContextType {\n isPublicPage: true;\n supabase: ReturnType<typeof createClient<Database>> | null;\n environment: {\n supabaseUrl: string | null;\n supabaseKey: string | null;\n };\n}\n\nconst PublicPageContext = createContext<PublicPageContextType | undefined>(undefined);\n\nexport interface PublicPageProviderProps {\n children: ReactNode;\n}\n\n/**\n * Provider for public pages that completely isolates them from authentication context\n * \n * This provider:\n * - Does not initialize any authentication providers\n * - Provides environment variables for public data access\n * - Includes error boundary for graceful error handling\n * - Is completely separate from the main app context\n */\nexport function PublicPageProvider({ children }: PublicPageProviderProps) {\n // Get environment variables for public data access\n // Handle both Vite (import.meta.env) and Node.js (process.env) environments\n const getEnvVar = (key: string): string | undefined => {\n // Check Vite environment first (browser)\n if (typeof import.meta !== 'undefined' && (import.meta as any).env) {\n return (import.meta as any).env[key];\n }\n // Check Node.js environment (server-side)\n if (typeof import.meta !== 'undefined' && import.meta.env) {\n return import.meta.env[key];\n }\n return undefined;\n };\n\n const supabaseUrl = getEnvVar('VITE_SUPABASE_URL') || \n getEnvVar('NEXT_PUBLIC_SUPABASE_URL') || \n null;\n \n const supabaseKey = getEnvVar('VITE_SUPABASE_ANON_KEY') || \n getEnvVar('NEXT_PUBLIC_SUPABASE_ANON_KEY') || \n null;\n\n // Create Supabase client if environment variables are available\n const supabase = useMemo(() => {\n if (!supabaseUrl || !supabaseKey) {\n console.warn('[PublicPageProvider] Missing Supabase environment variables. Please ensure VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY are set in your environment.');\n return null;\n }\n return createClient<Database>(supabaseUrl, supabaseKey);\n }, [supabaseUrl, supabaseKey]);\n\n const contextValue: PublicPageContextType = {\n isPublicPage: true,\n supabase,\n environment: {\n supabaseUrl,\n supabaseKey\n }\n };\n\n return (\n <PublicPageContext.Provider value={contextValue}>\n <PublicErrorBoundary>\n {children}\n </PublicErrorBoundary>\n </PublicPageContext.Provider>\n );\n}\n\n/**\n * Hook to access public page context\n * \n * @returns Public page context with environment variables\n */\nexport function usePublicPageContext(): PublicPageContextType {\n const context = useContext(PublicPageContext);\n \n if (!context) {\n throw new Error('usePublicPageContext must be used within a PublicPageProvider');\n }\n \n return context;\n}\n\n/**\n * Hook to check if we're in a public page context\n * \n * @returns True if we're in a public page context\n */\nexport function useIsPublicPage(): boolean {\n const context = useContext(PublicPageContext);\n return context !== undefined;\n}\n","/**\n * @file useAppConfig Hook\n * @package @jmruthers/pace-core\n * @module Hooks/useAppConfig\n * @since 0.4.0\n *\n * Hook for accessing app configuration like direct access support and event requirements.\n * This is a convenience hook that extracts app config from the UnifiedAuthProvider.\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { supportsDirectAccess, requiresEvent, isLoading } = useAppConfig();\n * \n * if (isLoading) return <div>Loading...</div>;\n * \n * return (\n * <div>\n * {supportsDirectAccess && (\n * <div>This app supports direct access!</div>\n * )}\n * {requiresEvent && (\n * <EventSelector />\n * )}\n * </div>\n * );\n * }\n * ```\n */\n\nimport { useMemo } from 'react';\nimport { useUnifiedAuth } from '../providers/UnifiedAuthProvider';\nimport { useIsPublicPage } from '../components/PublicLayout/PublicPageProvider';\n\nexport interface UseAppConfigReturn {\n supportsDirectAccess: boolean;\n requiresEvent: boolean;\n isLoading: boolean;\n appName: string;\n}\n\n/**\n * Hook to access app configuration\n * Works in both authenticated and public contexts\n * @returns App configuration and loading state\n */\nexport function useAppConfig(): UseAppConfigReturn {\n // Check if we're in a public page context first\n const isPublicPage = useIsPublicPage();\n \n if (isPublicPage) {\n // For public pages, try to get app name from environment variables\n const getAppName = (): string => {\n // Check Vite environment first (browser)\n if (typeof import.meta !== 'undefined' && (import.meta as any).env) {\n return (import.meta as any).env.VITE_APP_NAME || \n (import.meta as any).env.NEXT_PUBLIC_APP_NAME || \n 'PACE';\n }\n // Check Node.js environment (server-side)\n if (typeof import.meta !== 'undefined' && import.meta.env) {\n return import.meta.env.VITE_APP_NAME || \n import.meta.env.NEXT_PUBLIC_APP_NAME || \n 'PACE';\n }\n return 'PACE';\n };\n \n return useMemo(() => ({\n supportsDirectAccess: false, // Public pages don't support direct access\n requiresEvent: true, // Public pages always require an event\n isLoading: false,\n appName: getAppName()\n }), []);\n }\n \n // For authenticated pages, use UnifiedAuthProvider\n try {\n const { appConfig, appName } = useUnifiedAuth();\n return useMemo(() => ({\n supportsDirectAccess: !(appConfig?.requires_event ?? true),\n requiresEvent: appConfig?.requires_event ?? true,\n isLoading: appConfig === null,\n appName\n }), [appConfig?.requires_event, appName]);\n } catch (error) {\n // Fallback if UnifiedAuthProvider is not available\n return useMemo(() => ({\n supportsDirectAccess: false,\n requiresEvent: true,\n isLoading: false,\n appName: 'PACE'\n }), []);\n }\n} ","/**\n * @file Public Event Logo Hook\n * @package @jmruthers/pace-core\n * @module Hooks/Public\n * @since 1.0.0\n *\n * A React hook for accessing public event logo URLs without authentication.\n * Provides logo URLs with fallback handling for public pages.\n *\n * Features:\n * - No authentication required\n * - Automatic fallback to event initials\n * - Caching for performance\n * - Error handling and loading states\n * - TypeScript support\n * - Image validation\n *\n * @example\n * ```tsx\n * import { usePublicEventLogo } from '@jmruthers/pace-core';\n *\n * function EventHeader() {\n * const { logoUrl, fallbackText, isLoading, error } = usePublicEventLogo(\n * eventId, \n * eventName, \n * organisationId\n * );\n *\n * if (isLoading) return <div>Loading logo...</div>;\n * if (error) return <div>Error: {error.message}</div>;\n *\n * return (\n * <div>\n * {logoUrl ? (\n * <img src={logoUrl} alt={`${eventName} logo`} />\n * ) : (\n * <div className=\"logo-fallback\">{fallbackText}</div>\n * )}\n * </div>\n * );\n * }\n * ```\n *\n * @accessibility\n * - No direct accessibility concerns (hook)\n * - Enables accessible logo display with proper alt text\n * - Supports screen reader friendly fallbacks\n *\n * @security\n * - Only returns public-safe logo URLs\n * - Validates image existence before returning URL\n * - No sensitive information exposed\n * - Rate limiting applied at storage level\n *\n * @performance\n * - Built-in caching with TTL\n * - Image validation and optimization\n * - Minimal re-renders with stable references\n * - Lazy loading support\n *\n * @dependencies\n * - React 18+ - Hooks and effects\n * - @supabase/supabase-js - Storage integration\n * - Event types - Type definitions\n */\n\nimport { useState, useEffect, useCallback, useMemo } from 'react';\nimport type { SupabaseClient } from '@supabase/supabase-js';\nimport type { Database } from '../../types/database';\n\n// Simple in-memory cache for public data\nconst publicDataCache = new Map<string, { data: any; timestamp: number; ttl: number }>();\n\nexport interface UsePublicEventLogoReturn {\n /** The logo URL if available, null if not found or error */\n logoUrl: string | null;\n /** Fallback text (event initials) if no logo is available */\n fallbackText: string;\n /** Whether the logo is currently loading */\n isLoading: boolean;\n /** Any error that occurred during loading */\n error: Error | null;\n /** Function to manually refetch the logo */\n refetch: () => Promise<void>;\n}\n\nexport interface UsePublicEventLogoOptions {\n /** Cache TTL in milliseconds (default: 30 minutes) */\n cacheTtl?: number;\n /** Whether to enable caching (default: true) */\n enableCache?: boolean;\n /** Whether to validate image existence (default: true) */\n validateImage?: boolean;\n /** Custom fallback text generator */\n generateFallbackText?: (eventName: string) => string;\n /** Supabase client instance (required) */\n supabase: SupabaseClient<Database>;\n}\n\n/**\n * Generate fallback text from event name (first letter of each word)\n */\nfunction defaultGenerateFallbackText(eventName: string): string {\n if (!eventName) return 'EV';\n \n return eventName\n .split(' ')\n .map(word => word.charAt(0).toUpperCase())\n .join('')\n .substring(0, 3); // Max 3 characters\n}\n\n/**\n * Hook for accessing public event logo URLs\n * \n * This hook provides access to event logo URLs without requiring\n * authentication. It includes fallback handling and image validation.\n * \n * @param eventId - The event ID to fetch logo for\n * @param eventName - The event name for fallback text generation\n * @param organisationId - The organisation ID for storage path\n * @param options - Configuration options for caching and behavior\n * @returns Object containing logo URL, fallback text, loading state, error, and refetch function\n */\nexport function usePublicEventLogo(\n eventId: string | undefined,\n eventName: string | undefined,\n organisationId: string | undefined,\n options: UsePublicEventLogoOptions\n): UsePublicEventLogoReturn {\n const {\n cacheTtl = 30 * 60 * 1000, // 30 minutes\n enableCache = true,\n validateImage = true,\n generateFallbackText = defaultGenerateFallbackText,\n supabase\n } = options;\n\n const [logoUrl, setLogoUrl] = useState<string | null>(null);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n const [error, setError] = useState<Error | null>(null);\n\n // Generate fallback text\n const fallbackText = useMemo(() => {\n return eventName ? generateFallbackText(eventName) : 'EV';\n }, [eventName, generateFallbackText]);\n\n const fetchLogo = useCallback(async (): Promise<void> => {\n if (!eventId || !organisationId || !supabase) {\n setLogoUrl(null);\n setIsLoading(false);\n return;\n }\n\n // Validate UUID format for organisationId to prevent database errors\n const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n if (!uuidRegex.test(organisationId)) {\n console.warn('[usePublicEventLogo] Invalid organisationId format (not a valid UUID):', organisationId);\n // Don't return early - let the database handle the validation\n // This allows for more graceful error handling\n }\n\n // Check cache first\n const cacheKey = `public_logo_${eventId}_${organisationId}`;\n if (enableCache) {\n const cached = publicDataCache.get(cacheKey);\n if (cached && Date.now() - cached.timestamp < cached.ttl) {\n setLogoUrl(cached.data);\n setIsLoading(false);\n setError(null);\n return;\n }\n }\n\n try {\n setIsLoading(true);\n setError(null);\n\n // Call the public logo RPC function\n const { data, error: rpcError } = await (supabase as any).rpc('get_public_event_logo', {\n event_id_param: eventId,\n organisation_id_param: organisationId\n });\n\n if (rpcError) {\n throw new Error(rpcError.message || 'Failed to fetch logo');\n }\n\n if (!data || data.length === 0 || !data[0] || !data[0].logo_url) {\n setLogoUrl(null);\n return;\n }\n\n const logoUrl = data[0].logo_url;\n\n // Validate image existence if requested\n if (validateImage) {\n try {\n const response = await fetch(logoUrl, { method: 'HEAD' });\n if (!response.ok) {\n console.warn('[usePublicEventLogo] Logo URL not accessible:', logoUrl);\n setLogoUrl(null);\n return;\n }\n } catch (fetchError) {\n console.warn('[usePublicEventLogo] Error validating logo URL:', fetchError);\n setLogoUrl(null);\n return;\n }\n }\n\n setLogoUrl(logoUrl);\n\n // Cache the result\n if (enableCache) {\n publicDataCache.set(cacheKey, {\n data: logoUrl,\n timestamp: Date.now(),\n ttl: cacheTtl\n });\n }\n\n } catch (err) {\n console.error('[usePublicEventLogo] Error fetching logo:', err);\n const error = err instanceof Error ? err : new Error('Unknown error occurred');\n setError(error);\n setLogoUrl(null);\n } finally {\n setIsLoading(false);\n }\n }, [eventId, organisationId, supabase, cacheTtl, enableCache, validateImage]);\n\n // Fetch logo when parameters change\n useEffect(() => {\n if (eventId && organisationId) {\n fetchLogo();\n } else {\n setLogoUrl(null);\n setIsLoading(false);\n setError(null);\n }\n }, [fetchLogo, eventId, organisationId]);\n\n const refetch = useCallback(async (): Promise<void> => {\n if (!eventId || !organisationId) return;\n \n // Clear cache for this logo\n if (enableCache) {\n const cacheKey = `public_logo_${eventId}_${organisationId}`;\n publicDataCache.delete(cacheKey);\n }\n await fetchLogo();\n }, [fetchLogo, eventId, organisationId, enableCache]);\n\n return {\n logoUrl,\n fallbackText,\n isLoading,\n error,\n refetch\n };\n}\n\n/**\n * Clear all cached public logo data\n * Useful for testing or when you need to force refresh all data\n */\nexport function clearPublicLogoCache(): void {\n for (const [key] of publicDataCache) {\n if (key.startsWith('public_logo_')) {\n publicDataCache.delete(key);\n }\n }\n}\n\n/**\n * Get cache statistics for debugging\n */\nexport function getPublicLogoCacheStats(): { size: number; keys: string[] } {\n const keys = Array.from(publicDataCache.keys()).filter(key => key.startsWith('public_logo_'));\n return {\n size: keys.length,\n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AAC9D,YAAMC,SAAQ,eAAe,QAAQ,MAAM,IAAI,MAAM,wBAAwB;AAC7E,eAASA,MAAK;AACd,iBAAW,IAAI;AAAA,IACjB,UAAE;AACA,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,SAAS,gBAAgB,UAAU,UAAU,aAAa,aAAa,CAAC;AAG5E,YAAU,MAAM;AACd,QAAI,WAAW,gBAAgB;AAC7B,gBAAU;AAAA,IACZ,OAAO;AACL,iBAAW,IAAI;AACf,mBAAa,KAAK;AAClB,eAAS,IAAI;AAAA,IACf;AAAA,EACF,GAAG,CAAC,WAAW,SAAS,cAAc,CAAC;AAEvC,QAAM,UAAU,YAAY,YAA2B;AACrD,QAAI,CAAC,WAAW,CAAC,eAAgB;AAGjC,QAAI,aAAa;AACf,YAAM,WAAW,eAAe,OAAO,IAAI,cAAc;AACzD,sBAAgB,OAAO,QAAQ;AAAA,IACjC;AACA,UAAM,UAAU;AAAA,EAClB,GAAG,CAAC,WAAW,SAAS,gBAAgB,WAAW,CAAC;AAEpD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAMO,SAAS,uBAA6B;AAC3C,aAAW,CAAC,GAAG,KAAK,iBAAiB;AACnC,QAAI,IAAI,WAAW,cAAc,GAAG;AAClC,sBAAgB,OAAO,GAAG;AAAA,IAC5B;AAAA,EACF;AACF;AAKO,SAAS,0BAA4D;AAC1E,QAAM,OAAO,MAAM,KAAK,gBAAgB,KAAK,CAAC,EAAE,OAAO,SAAO,IAAI,WAAW,cAAc,CAAC;AAC5F,SAAO;AAAA,IACL,MAAM,KAAK;AAAA,IACX;AAAA,EACF;AACF;","names":["error","jsx","useMemo","useMemo","useMemo","logoUrl","error"]}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
createScopeFromEvent
|
|
3
|
-
} from "./chunk-TYHR5X4W.js";
|
|
4
|
-
import {
|
|
2
|
+
createScopeFromEvent,
|
|
5
3
|
useAccessLevel,
|
|
6
4
|
useCan
|
|
7
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KHJS6VIA.js";
|
|
8
6
|
import {
|
|
9
7
|
OrganisationContextRequiredError,
|
|
10
8
|
RBACCache,
|
|
@@ -2292,4 +2290,4 @@ export {
|
|
|
2292
2290
|
getPermissionsForRole,
|
|
2293
2291
|
ALL_PERMISSIONS
|
|
2294
2292
|
};
|
|
2295
|
-
//# sourceMappingURL=chunk-
|
|
2293
|
+
//# sourceMappingURL=chunk-K34IM5CT.js.map
|