@jmruthers/pace-core 0.5.78 → 0.5.79
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-ETGVF4Y5.js → DataTable-BCBW5SCL.js} +6 -6
- package/dist/{UnifiedAuthProvider-P5SOJAQ6.js → UnifiedAuthProvider-TSHK77PL.js} +3 -3
- package/dist/{chunk-VSOKOFRF.js → chunk-3WFKFBVQ.js} +4 -4
- package/dist/{chunk-QGVSOUJ2.js → chunk-CALYF6HH.js} +2 -2
- package/dist/{chunk-FT2M4R4F.js → chunk-GXWREXH7.js} +8 -3
- package/dist/{chunk-FT2M4R4F.js.map → chunk-GXWREXH7.js.map} +1 -1
- package/dist/{chunk-FL4ZCQLD.js → chunk-HQ7KTKC3.js} +2 -2
- package/dist/{chunk-LRQ6RBJC.js → chunk-IQFITAE3.js} +3 -3
- package/dist/{chunk-5BO3MI5Y.js → chunk-JYCP4L55.js} +3 -3
- package/dist/{chunk-2OGV6IRV.js → chunk-LVV6J6ZF.js} +5 -5
- package/dist/{chunk-PTR5PMPE.js → chunk-OBXLAL3J.js} +4 -4
- package/dist/{chunk-ZMNXIJP4.js → chunk-RMK6FOHF.js} +4 -4
- package/dist/{chunk-YVVGHRGI.js → chunk-TI67X46U.js} +14 -7
- package/dist/chunk-TI67X46U.js.map +1 -0
- package/dist/{chunk-MNJXXD6C.js → chunk-WYKXRCXB.js} +10 -5
- package/dist/chunk-WYKXRCXB.js.map +1 -0
- package/dist/components.js +8 -8
- package/dist/hooks.js +7 -7
- package/dist/index.js +11 -11
- package/dist/providers.js +2 -2
- package/dist/rbac/index.js +7 -7
- package/dist/utils.js +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 +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/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/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/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/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 +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 +3 -3
- package/package.json +1 -1
- package/src/components/EventSelector/EventSelector.tsx +8 -0
- package/src/hooks/useEvents.ts +8 -1
- package/src/providers/services/UnifiedAuthProvider.tsx +2 -5
- package/src/services/EventService.ts +8 -0
- package/dist/chunk-MNJXXD6C.js.map +0 -1
- package/dist/chunk-YVVGHRGI.js.map +0 -1
- /package/dist/{DataTable-ETGVF4Y5.js.map → DataTable-BCBW5SCL.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-P5SOJAQ6.js.map → UnifiedAuthProvider-TSHK77PL.js.map} +0 -0
- /package/dist/{chunk-VSOKOFRF.js.map → chunk-3WFKFBVQ.js.map} +0 -0
- /package/dist/{chunk-QGVSOUJ2.js.map → chunk-CALYF6HH.js.map} +0 -0
- /package/dist/{chunk-FL4ZCQLD.js.map → chunk-HQ7KTKC3.js.map} +0 -0
- /package/dist/{chunk-LRQ6RBJC.js.map → chunk-IQFITAE3.js.map} +0 -0
- /package/dist/{chunk-5BO3MI5Y.js.map → chunk-JYCP4L55.js.map} +0 -0
- /package/dist/{chunk-2OGV6IRV.js.map → chunk-LVV6J6ZF.js.map} +0 -0
- /package/dist/{chunk-PTR5PMPE.js.map → chunk-OBXLAL3J.js.map} +0 -0
- /package/dist/{chunk-ZMNXIJP4.js.map → chunk-RMK6FOHF.js.map} +0 -0
|
@@ -53,8 +53,8 @@ import {
|
|
|
53
53
|
sortHierarchicalDataWithSorting,
|
|
54
54
|
validateHierarchicalData,
|
|
55
55
|
validatePaginationConfig
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import "./chunk-
|
|
56
|
+
} from "./chunk-RMK6FOHF.js";
|
|
57
|
+
import "./chunk-IQFITAE3.js";
|
|
58
58
|
import "./chunk-S63MFSY6.js";
|
|
59
59
|
import "./chunk-Q7APDV6H.js";
|
|
60
60
|
import {
|
|
@@ -75,9 +75,9 @@ import {
|
|
|
75
75
|
throttle,
|
|
76
76
|
useDataTablePerformance
|
|
77
77
|
} from "./chunk-YCKPEMJA.js";
|
|
78
|
-
import "./chunk-
|
|
79
|
-
import "./chunk-
|
|
80
|
-
import "./chunk-
|
|
78
|
+
import "./chunk-GXWREXH7.js";
|
|
79
|
+
import "./chunk-HQ7KTKC3.js";
|
|
80
|
+
import "./chunk-WYKXRCXB.js";
|
|
81
81
|
import "./chunk-PYUXFQJ3.js";
|
|
82
82
|
import "./chunk-JCQZ6LA7.js";
|
|
83
83
|
import "./chunk-CVMVPYAL.js";
|
|
@@ -154,4 +154,4 @@ export {
|
|
|
154
154
|
validateHierarchicalData,
|
|
155
155
|
validatePaginationConfig
|
|
156
156
|
};
|
|
157
|
-
//# sourceMappingURL=DataTable-
|
|
157
|
+
//# sourceMappingURL=DataTable-BCBW5SCL.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_UnifiedAuthProvider
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HQ7KTKC3.js";
|
|
4
4
|
import {
|
|
5
5
|
UnifiedAuthProvider,
|
|
6
6
|
useUnifiedAuth
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WYKXRCXB.js";
|
|
8
8
|
import "./chunk-CVMVPYAL.js";
|
|
9
9
|
import "./chunk-PLDDJCW6.js";
|
|
10
10
|
init_UnifiedAuthProvider();
|
|
@@ -12,4 +12,4 @@ export {
|
|
|
12
12
|
UnifiedAuthProvider,
|
|
13
13
|
useUnifiedAuth
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=UnifiedAuthProvider-
|
|
15
|
+
//# sourceMappingURL=UnifiedAuthProvider-TSHK77PL.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_useOrganisations,
|
|
3
3
|
useOrganisations
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GXWREXH7.js";
|
|
5
5
|
import {
|
|
6
6
|
init_UnifiedAuthProvider
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HQ7KTKC3.js";
|
|
8
8
|
import {
|
|
9
9
|
OrganisationServiceContext,
|
|
10
10
|
OrganisationServiceProvider,
|
|
11
11
|
init_OrganisationServiceProvider,
|
|
12
12
|
useOrganisationService,
|
|
13
13
|
useUnifiedAuth
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WYKXRCXB.js";
|
|
15
15
|
import {
|
|
16
16
|
__esm,
|
|
17
17
|
__export
|
|
@@ -417,4 +417,4 @@ export {
|
|
|
417
417
|
clearPublicLogoCache,
|
|
418
418
|
getPublicLogoCacheStats
|
|
419
419
|
};
|
|
420
|
-
//# sourceMappingURL=chunk-
|
|
420
|
+
//# sourceMappingURL=chunk-3WFKFBVQ.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
init_InactivityServiceProvider,
|
|
5
5
|
init_OrganisationServiceProvider,
|
|
6
6
|
init_UnifiedAuthProvider
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WYKXRCXB.js";
|
|
8
8
|
|
|
9
9
|
// src/providers/index.ts
|
|
10
10
|
init_UnifiedAuthProvider();
|
|
@@ -12,4 +12,4 @@ init_EventServiceProvider();
|
|
|
12
12
|
init_OrganisationServiceProvider();
|
|
13
13
|
init_InactivityServiceProvider();
|
|
14
14
|
init_AuthServiceProvider();
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-CALYF6HH.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
init_useOrganisationService,
|
|
4
4
|
useEventService2 as useEventService,
|
|
5
5
|
useOrganisationService2 as useOrganisationService
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WYKXRCXB.js";
|
|
7
7
|
import {
|
|
8
8
|
__esm
|
|
9
9
|
} from "./chunk-PLDDJCW6.js";
|
|
@@ -41,8 +41,13 @@ var init_useOrganisations = __esm({
|
|
|
41
41
|
init_useEventService();
|
|
42
42
|
function useEvents() {
|
|
43
43
|
const eventService = useEventService();
|
|
44
|
+
const events = eventService.getEvents();
|
|
45
|
+
console.log("[useEvents] Hook called, returning events:", {
|
|
46
|
+
count: events.length,
|
|
47
|
+
events: events.map((e) => ({ id: e.event_id, name: e.event_name }))
|
|
48
|
+
});
|
|
44
49
|
return {
|
|
45
|
-
events
|
|
50
|
+
events,
|
|
46
51
|
selectedEvent: eventService.getSelectedEvent(),
|
|
47
52
|
isLoading: eventService.isLoading(),
|
|
48
53
|
error: eventService.getError(),
|
|
@@ -56,4 +61,4 @@ export {
|
|
|
56
61
|
init_useOrganisations,
|
|
57
62
|
useEvents
|
|
58
63
|
};
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
64
|
+
//# sourceMappingURL=chunk-GXWREXH7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/hooks/useOrganisations.ts","../src/hooks/useEvents.ts"],"sourcesContent":["/**\n * @file Organisation Hook\n * @package @jmruthers/pace-core\n * @module Hooks\n * @since 0.1.0\n *\n * Convenience hook for accessing organisation context.\n * This hook provides a simple interface for working with organisations.\n * \n * Note: This is a convenience wrapper around the OrganisationService.\n * For better performance, consider using useOrganisationService directly.\n */\n\nimport { useOrganisationService } from './services/useOrganisationService';\nimport { Organisation, OrganisationMembership, OrganisationContextType } from '../types/organisation';\n\n/**\n * Hook to access organisation context\n * \n * @returns Organisation context with selected organisation, organisations list, and helper methods\n * @throws {Error} If used outside OrganisationServiceProvider\n * \n * @example\n * ```tsx\n * function MyComponent() {\n * const { selectedOrganisation, organisations, switchOrganisation } = useOrganisations();\n * \n * return (\n * <div>\n * <h1>Current Organisation: {selectedOrganisation.display_name}</h1>\n * {organisations.map(org => (\n * <button key={org.id} onClick={() => switchOrganisation(org.id)}>\n * {org.display_name}\n * </button>\n * ))}\n * </div>\n * );\n * }\n * ```\n */\nexport function useOrganisations(): OrganisationContextType {\n const organisationService = useOrganisationService();\n\n const selectedOrg = organisationService.getSelectedOrganisation();\n \n return {\n selectedOrganisation: selectedOrg as Organisation | null,\n organisations: organisationService.getOrganisations(),\n userMemberships: organisationService.getUserMemberships(),\n isLoading: organisationService.isLoading(),\n error: organisationService.getError(),\n hasValidOrganisationContext: organisationService.hasValidOrganisationContext(),\n isContextReady: organisationService.isContextReady(),\n setSelectedOrganisation: (org: Organisation | null) => organisationService.setSelectedOrganisation(org),\n switchOrganisation: (orgId: string) => organisationService.switchOrganisation(orgId),\n getUserRole: (orgId?: string) => organisationService.getUserRole(orgId),\n validateOrganisationAccess: (orgId: string) => organisationService.validateOrganisationAccess(orgId),\n refreshOrganisations: () => organisationService.refreshOrganisations(),\n ensureOrganisationContext: () => organisationService.ensureOrganisationContext(),\n isOrganisationSecure: () => organisationService.isOrganisationSecure(),\n getPrimaryOrganisation: () => organisationService.getPrimaryOrganisation(),\n };\n}\n\n","/**\n * @file Event Hook\n * @package @jmruthers/pace-core\n * @module Hooks\n * @since 0.1.0\n *\n * Convenience hook for accessing event context.\n * This hook provides a simple interface for working with events.\n * \n * Note: This is a convenience wrapper around the EventService.\n * For better performance, consider using useEventService directly.\n */\n\nimport { useEventService } from './services/useEventService';\nimport { Event } from '../types/unified';\n\nexport interface EventContextType {\n events: Event[];\n selectedEvent: Event | null;\n isLoading: boolean;\n error: Error | null;\n setSelectedEvent: (event: Event | null) => void;\n refreshEvents: () => Promise<void>;\n}\n\n/**\n * Hook to access event context\n * \n * @returns Event context with events, selected event, and helper methods\n * @throws {Error} If used outside EventServiceProvider\n * \n * @example\n * ```tsx\n * function MyComponent() {\n * const { events, selectedEvent, setSelectedEvent } = useEvents();\n * \n * return (\n * <div>\n * {events.map(event => (\n * <button key={event.id} onClick={() => setSelectedEvent(event)}>\n * {event.event_name}\n * </button>\n * ))}\n * </div>\n * );\n * }\n * ```\n */\nexport function useEvents(): EventContextType {\n const eventService = useEventService();\n\n
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useOrganisations.ts","../src/hooks/useEvents.ts"],"sourcesContent":["/**\n * @file Organisation Hook\n * @package @jmruthers/pace-core\n * @module Hooks\n * @since 0.1.0\n *\n * Convenience hook for accessing organisation context.\n * This hook provides a simple interface for working with organisations.\n * \n * Note: This is a convenience wrapper around the OrganisationService.\n * For better performance, consider using useOrganisationService directly.\n */\n\nimport { useOrganisationService } from './services/useOrganisationService';\nimport { Organisation, OrganisationMembership, OrganisationContextType } from '../types/organisation';\n\n/**\n * Hook to access organisation context\n * \n * @returns Organisation context with selected organisation, organisations list, and helper methods\n * @throws {Error} If used outside OrganisationServiceProvider\n * \n * @example\n * ```tsx\n * function MyComponent() {\n * const { selectedOrganisation, organisations, switchOrganisation } = useOrganisations();\n * \n * return (\n * <div>\n * <h1>Current Organisation: {selectedOrganisation.display_name}</h1>\n * {organisations.map(org => (\n * <button key={org.id} onClick={() => switchOrganisation(org.id)}>\n * {org.display_name}\n * </button>\n * ))}\n * </div>\n * );\n * }\n * ```\n */\nexport function useOrganisations(): OrganisationContextType {\n const organisationService = useOrganisationService();\n\n const selectedOrg = organisationService.getSelectedOrganisation();\n \n return {\n selectedOrganisation: selectedOrg as Organisation | null,\n organisations: organisationService.getOrganisations(),\n userMemberships: organisationService.getUserMemberships(),\n isLoading: organisationService.isLoading(),\n error: organisationService.getError(),\n hasValidOrganisationContext: organisationService.hasValidOrganisationContext(),\n isContextReady: organisationService.isContextReady(),\n setSelectedOrganisation: (org: Organisation | null) => organisationService.setSelectedOrganisation(org),\n switchOrganisation: (orgId: string) => organisationService.switchOrganisation(orgId),\n getUserRole: (orgId?: string) => organisationService.getUserRole(orgId),\n validateOrganisationAccess: (orgId: string) => organisationService.validateOrganisationAccess(orgId),\n refreshOrganisations: () => organisationService.refreshOrganisations(),\n ensureOrganisationContext: () => organisationService.ensureOrganisationContext(),\n isOrganisationSecure: () => organisationService.isOrganisationSecure(),\n getPrimaryOrganisation: () => organisationService.getPrimaryOrganisation(),\n };\n}\n\n","/**\n * @file Event Hook\n * @package @jmruthers/pace-core\n * @module Hooks\n * @since 0.1.0\n *\n * Convenience hook for accessing event context.\n * This hook provides a simple interface for working with events.\n * \n * Note: This is a convenience wrapper around the EventService.\n * For better performance, consider using useEventService directly.\n */\n\nimport { useEventService } from './services/useEventService';\nimport { Event } from '../types/unified';\n\nexport interface EventContextType {\n events: Event[];\n selectedEvent: Event | null;\n isLoading: boolean;\n error: Error | null;\n setSelectedEvent: (event: Event | null) => void;\n refreshEvents: () => Promise<void>;\n}\n\n/**\n * Hook to access event context\n * \n * @returns Event context with events, selected event, and helper methods\n * @throws {Error} If used outside EventServiceProvider\n * \n * @example\n * ```tsx\n * function MyComponent() {\n * const { events, selectedEvent, setSelectedEvent } = useEvents();\n * \n * return (\n * <div>\n * {events.map(event => (\n * <button key={event.id} onClick={() => setSelectedEvent(event)}>\n * {event.event_name}\n * </button>\n * ))}\n * </div>\n * );\n * }\n * ```\n */\nexport function useEvents(): EventContextType {\n const eventService = useEventService();\n\n const events = eventService.getEvents();\n \n console.log('[useEvents] Hook called, returning events:', {\n count: events.length,\n events: events.map(e => ({ id: e.event_id, name: e.event_name }))\n });\n\n return {\n events,\n selectedEvent: eventService.getSelectedEvent(),\n isLoading: eventService.isLoading(),\n error: eventService.getError(),\n setSelectedEvent: (event: Event | null) => eventService.setSelectedEvent(event),\n refreshEvents: () => eventService.refreshEvents(),\n };\n}\n\n"],"mappings":";;;;;;;;;;;AAwCO,SAAS,mBAA4C;AAC1D,QAAM,sBAAsB,uBAAuB;AAEnD,QAAM,cAAc,oBAAoB,wBAAwB;AAEhE,SAAO;AAAA,IACL,sBAAsB;AAAA,IACtB,eAAe,oBAAoB,iBAAiB;AAAA,IACpD,iBAAiB,oBAAoB,mBAAmB;AAAA,IACxD,WAAW,oBAAoB,UAAU;AAAA,IACzC,OAAO,oBAAoB,SAAS;AAAA,IACpC,6BAA6B,oBAAoB,4BAA4B;AAAA,IAC7E,gBAAgB,oBAAoB,eAAe;AAAA,IACnD,yBAAyB,CAAC,QAA6B,oBAAoB,wBAAwB,GAAG;AAAA,IACtG,oBAAoB,CAAC,UAAkB,oBAAoB,mBAAmB,KAAK;AAAA,IACnF,aAAa,CAAC,UAAmB,oBAAoB,YAAY,KAAK;AAAA,IACtE,4BAA4B,CAAC,UAAkB,oBAAoB,2BAA2B,KAAK;AAAA,IACnG,sBAAsB,MAAM,oBAAoB,qBAAqB;AAAA,IACrE,2BAA2B,MAAM,oBAAoB,0BAA0B;AAAA,IAC/E,sBAAsB,MAAM,oBAAoB,qBAAqB;AAAA,IACrE,wBAAwB,MAAM,oBAAoB,uBAAuB;AAAA,EAC3E;AACF;AA9DA;AAAA;AAAA;AAaA;AAAA;AAAA;;;ACAA;AAmCO,SAAS,YAA8B;AAC5C,QAAM,eAAe,gBAAgB;AAErC,QAAM,SAAS,aAAa,UAAU;AAEtC,UAAQ,IAAI,8CAA8C;AAAA,IACxD,OAAO,OAAO;AAAA,IACd,QAAQ,OAAO,IAAI,QAAM,EAAE,IAAI,EAAE,UAAU,MAAM,EAAE,WAAW,EAAE;AAAA,EAClE,CAAC;AAED,SAAO;AAAA,IACL;AAAA,IACA,eAAe,aAAa,iBAAiB;AAAA,IAC7C,WAAW,aAAa,UAAU;AAAA,IAClC,OAAO,aAAa,SAAS;AAAA,IAC7B,kBAAkB,CAAC,UAAwB,aAAa,iBAAiB,KAAK;AAAA,IAC9E,eAAe,MAAM,aAAa,cAAc;AAAA,EAClD;AACF;","names":[]}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
UnifiedAuthProvider,
|
|
3
3
|
init_UnifiedAuthProvider,
|
|
4
4
|
useUnifiedAuth
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WYKXRCXB.js";
|
|
6
6
|
import {
|
|
7
7
|
__esm,
|
|
8
8
|
__export
|
|
@@ -24,4 +24,4 @@ export {
|
|
|
24
24
|
UnifiedAuthProvider_exports,
|
|
25
25
|
init_UnifiedAuthProvider2 as init_UnifiedAuthProvider
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-HQ7KTKC3.js.map
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
init_useOrganisations,
|
|
12
12
|
useEvents,
|
|
13
13
|
useOrganisations
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GXWREXH7.js";
|
|
15
15
|
import {
|
|
16
16
|
init_UnifiedAuthProvider,
|
|
17
17
|
useUnifiedAuth
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WYKXRCXB.js";
|
|
19
19
|
import {
|
|
20
20
|
getCurrentAppName
|
|
21
21
|
} from "./chunk-JCQZ6LA7.js";
|
|
@@ -729,4 +729,4 @@ export {
|
|
|
729
729
|
useHasAllPermissions,
|
|
730
730
|
useCachedPermissions
|
|
731
731
|
};
|
|
732
|
-
//# sourceMappingURL=chunk-
|
|
732
|
+
//# sourceMappingURL=chunk-IQFITAE3.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_useOrganisations,
|
|
3
3
|
useOrganisations
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GXWREXH7.js";
|
|
5
5
|
import {
|
|
6
6
|
useUnifiedAuth
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WYKXRCXB.js";
|
|
8
8
|
import {
|
|
9
9
|
init_organisationContext,
|
|
10
10
|
setOrganisationContext
|
|
@@ -380,4 +380,4 @@ function useSecureDataAccess() {
|
|
|
380
380
|
export {
|
|
381
381
|
useSecureDataAccess
|
|
382
382
|
};
|
|
383
|
-
//# sourceMappingURL=chunk-
|
|
383
|
+
//# sourceMappingURL=chunk-JYCP4L55.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createScopeFromEvent,
|
|
3
3
|
useAccessLevel,
|
|
4
4
|
useCan
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IQFITAE3.js";
|
|
6
6
|
import {
|
|
7
7
|
OrganisationContextRequiredError,
|
|
8
8
|
RBACCache,
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
} from "./chunk-S63MFSY6.js";
|
|
12
12
|
import {
|
|
13
13
|
useSecureDataAccess
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JYCP4L55.js";
|
|
15
15
|
import {
|
|
16
16
|
init_UnifiedAuthProvider
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HQ7KTKC3.js";
|
|
18
18
|
import {
|
|
19
19
|
useUnifiedAuth
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WYKXRCXB.js";
|
|
21
21
|
import {
|
|
22
22
|
getCurrentAppName
|
|
23
23
|
} from "./chunk-JCQZ6LA7.js";
|
|
@@ -1860,4 +1860,4 @@ export {
|
|
|
1860
1860
|
getPermissionsForRole,
|
|
1861
1861
|
ALL_PERMISSIONS
|
|
1862
1862
|
};
|
|
1863
|
-
//# sourceMappingURL=chunk-
|
|
1863
|
+
//# sourceMappingURL=chunk-LVV6J6ZF.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_OrganisationProvider,
|
|
3
3
|
usePublicPageContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3WFKFBVQ.js";
|
|
5
5
|
import {
|
|
6
6
|
init_useOrganisations,
|
|
7
7
|
useEvents,
|
|
8
8
|
useOrganisations
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GXWREXH7.js";
|
|
10
10
|
import {
|
|
11
11
|
useUnifiedAuth
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WYKXRCXB.js";
|
|
13
13
|
import {
|
|
14
14
|
applyPalette,
|
|
15
15
|
clearPalette
|
|
@@ -699,4 +699,4 @@ export {
|
|
|
699
699
|
generatePublicRoutePath,
|
|
700
700
|
extractEventCodeFromPath
|
|
701
701
|
};
|
|
702
|
-
//# sourceMappingURL=chunk-
|
|
702
|
+
//# sourceMappingURL=chunk-OBXLAL3J.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCan,
|
|
3
3
|
useResolvedScope
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IQFITAE3.js";
|
|
5
5
|
import {
|
|
6
6
|
toast,
|
|
7
7
|
useDataTablePerformance
|
|
8
8
|
} from "./chunk-YCKPEMJA.js";
|
|
9
9
|
import {
|
|
10
10
|
init_UnifiedAuthProvider
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HQ7KTKC3.js";
|
|
12
12
|
import {
|
|
13
13
|
useUnifiedAuth
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WYKXRCXB.js";
|
|
15
15
|
import {
|
|
16
16
|
cn
|
|
17
17
|
} from "./chunk-PYUXFQJ3.js";
|
|
@@ -11793,4 +11793,4 @@ lodash/lodash.js:
|
|
|
11793
11793
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
11794
11794
|
*)
|
|
11795
11795
|
*/
|
|
11796
|
-
//# sourceMappingURL=chunk-
|
|
11796
|
+
//# sourceMappingURL=chunk-RMK6FOHF.js.map
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
SelectSeparator,
|
|
23
23
|
SelectTrigger,
|
|
24
24
|
SelectValue
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-RMK6FOHF.js";
|
|
26
26
|
import {
|
|
27
27
|
isPermitted,
|
|
28
28
|
isSuperAdmin
|
|
@@ -34,25 +34,25 @@ import {
|
|
|
34
34
|
useAppConfig,
|
|
35
35
|
usePublicEventLogo,
|
|
36
36
|
usePublicPageContext
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-3WFKFBVQ.js";
|
|
38
38
|
import {
|
|
39
39
|
useToast
|
|
40
40
|
} from "./chunk-YCKPEMJA.js";
|
|
41
41
|
import {
|
|
42
42
|
useEvents,
|
|
43
43
|
useOrganisations
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-GXWREXH7.js";
|
|
45
45
|
import {
|
|
46
46
|
UnifiedAuthProvider_exports,
|
|
47
47
|
init_UnifiedAuthProvider
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-HQ7KTKC3.js";
|
|
49
49
|
import {
|
|
50
50
|
EventServiceContext,
|
|
51
51
|
EventServiceProvider,
|
|
52
52
|
init_EventServiceProvider,
|
|
53
53
|
useEventService,
|
|
54
54
|
useUnifiedAuth
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-WYKXRCXB.js";
|
|
56
56
|
import {
|
|
57
57
|
LoadingSpinner
|
|
58
58
|
} from "./chunk-CDQ3PX7L.js";
|
|
@@ -504,6 +504,13 @@ function EventSelector({
|
|
|
504
504
|
setSelectedEvent,
|
|
505
505
|
refreshEvents
|
|
506
506
|
} = useEvents();
|
|
507
|
+
console.log("[EventSelector] Component render:", {
|
|
508
|
+
eventsCount: events.length,
|
|
509
|
+
events: events.map((e) => ({ id: e.event_id, name: e.event_name })),
|
|
510
|
+
selectedEvent: selectedEvent ? { id: selectedEvent.event_id, name: selectedEvent.event_name } : null,
|
|
511
|
+
isLoading,
|
|
512
|
+
error: error?.message
|
|
513
|
+
});
|
|
507
514
|
const handleValueChange = (eventId) => {
|
|
508
515
|
const event = events.find((e) => (e.event_id || e.id) === eventId);
|
|
509
516
|
if (event) {
|
|
@@ -1391,7 +1398,7 @@ function PaceAppLayout({
|
|
|
1391
1398
|
}
|
|
1392
1399
|
}
|
|
1393
1400
|
if (hasAccess && currentRoute.roles && currentRoute.roles.length > 0 && user?.id) {
|
|
1394
|
-
const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-
|
|
1401
|
+
const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-TSHK77PL.js");
|
|
1395
1402
|
hasAccess = true;
|
|
1396
1403
|
}
|
|
1397
1404
|
if (!isMounted) return;
|
|
@@ -3876,4 +3883,4 @@ export {
|
|
|
3876
3883
|
PublicPageDiagnostic,
|
|
3877
3884
|
PublicPageContextChecker
|
|
3878
3885
|
};
|
|
3879
|
-
//# sourceMappingURL=chunk-
|
|
3886
|
+
//# sourceMappingURL=chunk-TI67X46U.js.map
|