@jmruthers/pace-core 0.5.78 → 0.5.80
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-OOZS7YTJ.js} +6 -6
- package/dist/{UnifiedAuthProvider-P5SOJAQ6.js → UnifiedAuthProvider-K2IZAY5F.js} +3 -3
- package/dist/{chunk-MNJXXD6C.js → chunk-5BN3YGNK.js} +166 -57
- package/dist/chunk-5BN3YGNK.js.map +1 -0
- package/dist/{chunk-FT2M4R4F.js → chunk-CBSD3BZ3.js} +8 -3
- package/dist/{chunk-FT2M4R4F.js.map → chunk-CBSD3BZ3.js.map} +1 -1
- package/dist/{chunk-QGVSOUJ2.js → chunk-I2VVV5PQ.js} +2 -2
- package/dist/{chunk-VSOKOFRF.js → chunk-KUYWZVR2.js} +4 -4
- package/dist/{chunk-YVVGHRGI.js → chunk-MJWN5JKI.js} +14 -7
- package/dist/chunk-MJWN5JKI.js.map +1 -0
- package/dist/{chunk-ZMNXIJP4.js → chunk-MVFZYTIZ.js} +142 -75
- package/dist/{chunk-ZMNXIJP4.js.map → chunk-MVFZYTIZ.js.map} +1 -1
- package/dist/{chunk-2OGV6IRV.js → chunk-NTW3KGS4.js} +5 -5
- package/dist/{chunk-FL4ZCQLD.js → chunk-RIXPZJUB.js} +2 -2
- package/dist/{chunk-5BO3MI5Y.js → chunk-S3JKDMD5.js} +3 -3
- package/dist/{chunk-PTR5PMPE.js → chunk-V5SWX6KL.js} +4 -4
- package/dist/{chunk-LRQ6RBJC.js → chunk-YVUZWLQG.js} +3 -3
- 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/docs/architecture/rpc-function-standards.md +757 -0
- package/package.json +1 -1
- package/src/components/DataTable/components/DataTableCore.tsx +105 -18
- package/src/components/DataTable/components/PaginationControls.tsx +78 -77
- package/src/components/DataTable/hooks/useDataTableConfiguration.ts +29 -16
- package/src/components/DataTable/hooks/useEffectiveColumnOrder.ts +6 -4
- package/src/components/DataTable/hooks/useTableColumns.ts +20 -19
- package/src/components/DataTable/hooks/useTableHandlers.ts +8 -3
- package/src/components/EventSelector/EventSelector.tsx +8 -0
- package/src/hooks/useEvents.ts +8 -1
- package/src/providers/services/UnifiedAuthProvider.tsx +177 -59
- package/src/services/EventService.ts +8 -0
- package/src/styles/core.css +1 -2
- package/dist/chunk-MNJXXD6C.js.map +0 -1
- package/dist/chunk-YVVGHRGI.js.map +0 -1
- package/src/styles/base.css +0 -208
- /package/dist/{DataTable-ETGVF4Y5.js.map → DataTable-OOZS7YTJ.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-P5SOJAQ6.js.map → UnifiedAuthProvider-K2IZAY5F.js.map} +0 -0
- /package/dist/{chunk-QGVSOUJ2.js.map → chunk-I2VVV5PQ.js.map} +0 -0
- /package/dist/{chunk-VSOKOFRF.js.map → chunk-KUYWZVR2.js.map} +0 -0
- /package/dist/{chunk-2OGV6IRV.js.map → chunk-NTW3KGS4.js.map} +0 -0
- /package/dist/{chunk-FL4ZCQLD.js.map → chunk-RIXPZJUB.js.map} +0 -0
- /package/dist/{chunk-5BO3MI5Y.js.map → chunk-S3JKDMD5.js.map} +0 -0
- /package/dist/{chunk-PTR5PMPE.js.map → chunk-V5SWX6KL.js.map} +0 -0
- /package/dist/{chunk-LRQ6RBJC.js.map → chunk-YVUZWLQG.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-MVFZYTIZ.js";
|
|
57
|
+
import "./chunk-YVUZWLQG.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-CBSD3BZ3.js";
|
|
79
|
+
import "./chunk-RIXPZJUB.js";
|
|
80
|
+
import "./chunk-5BN3YGNK.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-OOZS7YTJ.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_UnifiedAuthProvider
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RIXPZJUB.js";
|
|
4
4
|
import {
|
|
5
5
|
UnifiedAuthProvider,
|
|
6
6
|
useUnifiedAuth
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5BN3YGNK.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-K2IZAY5F.js.map
|
|
@@ -1001,6 +1001,10 @@ var init_EventService = __esm({
|
|
|
1001
1001
|
}
|
|
1002
1002
|
// Event state getters
|
|
1003
1003
|
getEvents() {
|
|
1004
|
+
console.log("[EventService] getEvents() called, returning:", {
|
|
1005
|
+
count: this.events.length,
|
|
1006
|
+
events: this.events.map((e) => ({ id: e.event_id, name: e.event_name }))
|
|
1007
|
+
});
|
|
1004
1008
|
return this.events;
|
|
1005
1009
|
}
|
|
1006
1010
|
getSelectedEvent() {
|
|
@@ -1165,6 +1169,10 @@ var init_EventService = __esm({
|
|
|
1165
1169
|
start_date: event.event_date
|
|
1166
1170
|
}));
|
|
1167
1171
|
this.events = transformedEvents;
|
|
1172
|
+
console.log("[EventService] Set events in service:", {
|
|
1173
|
+
count: transformedEvents.length,
|
|
1174
|
+
events: transformedEvents.map((e) => ({ id: e.event_id, name: e.event_name }))
|
|
1175
|
+
});
|
|
1168
1176
|
this.error = null;
|
|
1169
1177
|
this.hasAutoSelectedRef = false;
|
|
1170
1178
|
const persistedEventLoaded = await this.loadPersistedEvent(transformedEvents);
|
|
@@ -1713,8 +1721,8 @@ var init_useInactivityService = __esm({
|
|
|
1713
1721
|
});
|
|
1714
1722
|
|
|
1715
1723
|
// src/providers/services/UnifiedAuthProvider.tsx
|
|
1716
|
-
import { createContext as createContext5, useContext as useContext9, useMemo as useMemo5 } from "react";
|
|
1717
|
-
import {
|
|
1724
|
+
import { createContext as createContext5, useContext as useContext9, useMemo as useMemo5, useCallback, useRef as useRef4 } from "react";
|
|
1725
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1718
1726
|
function UnifiedAuthContextProvider({
|
|
1719
1727
|
children,
|
|
1720
1728
|
appName,
|
|
@@ -1747,16 +1755,68 @@ function UnifiedAuthContextProvider({
|
|
|
1747
1755
|
const orgLoading = organisationService.isLoading();
|
|
1748
1756
|
const eventLoading = eventService.isLoading();
|
|
1749
1757
|
const totalLoading = authLoading || orgLoading || eventLoading;
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1758
|
+
const authError = authService.getError();
|
|
1759
|
+
const supabase = authService.getSupabaseClient();
|
|
1760
|
+
const selectedOrganisation = organisationService.getSelectedOrganisation();
|
|
1761
|
+
const organisations = organisationService.getOrganisations();
|
|
1762
|
+
const userMemberships = organisationService.getUserMemberships();
|
|
1763
|
+
const organisationError = organisationService.getError();
|
|
1764
|
+
const hasValidOrganisationContext = organisationService.hasValidOrganisationContext();
|
|
1765
|
+
const isContextReady = organisationService.isContextReady();
|
|
1766
|
+
const events = eventService.getEvents();
|
|
1767
|
+
const selectedEvent = eventService.getSelectedEvent();
|
|
1768
|
+
const eventError = eventService.getError();
|
|
1769
|
+
const showInactivityWarning = inactivityService.getShowInactivityWarning();
|
|
1770
|
+
const inactivityTimeRemaining = inactivityService.getInactivityTimeRemaining();
|
|
1771
|
+
const isIdle = inactivityService.isIdle();
|
|
1772
|
+
const timeRemaining = inactivityService.getTimeRemaining();
|
|
1773
|
+
const showWarning = inactivityService.isWarningShown();
|
|
1774
|
+
const isTracking = inactivityService.isTracking();
|
|
1775
|
+
const hasErrors = !!(authError || organisationError || eventError);
|
|
1776
|
+
const signIn = useCallback((email, password) => authService.signIn(email, password), [authService]);
|
|
1777
|
+
const signUp = useCallback((email, password) => authService.signUp(email, password), [authService]);
|
|
1778
|
+
const signOut = useCallback(() => authService.signOut(), [authService]);
|
|
1779
|
+
const resetPassword = useCallback((email) => authService.resetPassword(email), [authService]);
|
|
1780
|
+
const updatePassword = useCallback((password) => authService.updatePassword(password), [authService]);
|
|
1781
|
+
const refreshSession = useCallback(() => authService.refreshSession(), [authService]);
|
|
1782
|
+
const switchOrganisation = useCallback((orgId) => organisationService.switchOrganisation(orgId), [organisationService]);
|
|
1783
|
+
const getUserRole = useCallback((orgId) => organisationService.getUserRole(orgId), [organisationService]);
|
|
1784
|
+
const validateOrganisationAccess = useCallback((orgId) => organisationService.validateOrganisationAccess(orgId), [organisationService]);
|
|
1785
|
+
const refreshOrganisations = useCallback(() => organisationService.refreshOrganisations(), [organisationService]);
|
|
1786
|
+
const ensureOrganisationContext = useCallback(() => organisationService.ensureOrganisationContext(), [organisationService]);
|
|
1787
|
+
const isOrganisationSecure = useCallback(() => organisationService.isOrganisationSecure(), [organisationService]);
|
|
1788
|
+
const getPrimaryOrganisation = useCallback(() => organisationService.getPrimaryOrganisation(), [organisationService]);
|
|
1789
|
+
const setSelectedEvent = useCallback((event) => eventService.setSelectedEvent(event), [eventService]);
|
|
1790
|
+
const refreshEvents = useCallback(() => eventService.refreshEvents(), [eventService]);
|
|
1791
|
+
const resetActivity = useCallback(() => inactivityService.resetActivity(), [inactivityService]);
|
|
1792
|
+
const startTracking = useCallback(() => inactivityService.startTracking(), [inactivityService]);
|
|
1793
|
+
const stopTracking = useCallback(() => inactivityService.stopTracking(), [inactivityService]);
|
|
1794
|
+
const handleIdleLogout = useCallback(() => inactivityService.handleIdleLogout(), [inactivityService]);
|
|
1795
|
+
const handleStaySignedIn = useCallback(() => inactivityService.handleStaySignedIn(), [inactivityService]);
|
|
1796
|
+
const handleSignOutNow = useCallback(() => inactivityService.handleSignOutNow(), [inactivityService]);
|
|
1797
|
+
const prevStateRef = useRef4(null);
|
|
1798
|
+
const isDev = import.meta.env.DEV || import.meta.env.MODE === "development";
|
|
1799
|
+
if (isDev) {
|
|
1800
|
+
const currentState = {
|
|
1801
|
+
isAuthenticated: isAuth,
|
|
1802
|
+
userEmail: currentUser?.email,
|
|
1803
|
+
totalLoading
|
|
1804
|
+
};
|
|
1805
|
+
const prevState = prevStateRef.current;
|
|
1806
|
+
if (!prevState || prevState.isAuthenticated !== currentState.isAuthenticated || prevState.userEmail !== currentState.userEmail || prevState.totalLoading !== currentState.totalLoading) {
|
|
1807
|
+
console.log("[UnifiedAuthContext] Auth state changed:", {
|
|
1808
|
+
isAuthenticated: isAuth,
|
|
1809
|
+
user: currentUser?.email,
|
|
1810
|
+
session: currentSession ? "exists" : "null",
|
|
1811
|
+
totalLoading,
|
|
1812
|
+
authLoading,
|
|
1813
|
+
orgLoading,
|
|
1814
|
+
eventLoading,
|
|
1815
|
+
orgContextReady: isContextReady
|
|
1816
|
+
});
|
|
1817
|
+
prevStateRef.current = currentState;
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1760
1820
|
const contextValue = useMemo5(() => {
|
|
1761
1821
|
return {
|
|
1762
1822
|
// Auth state
|
|
@@ -1764,62 +1824,114 @@ function UnifiedAuthContextProvider({
|
|
|
1764
1824
|
session: currentSession,
|
|
1765
1825
|
isAuthenticated: isAuth,
|
|
1766
1826
|
authLoading,
|
|
1767
|
-
authError
|
|
1768
|
-
error:
|
|
1827
|
+
authError,
|
|
1828
|
+
error: authError,
|
|
1769
1829
|
// Alias for backward compatibility
|
|
1770
|
-
supabase
|
|
1830
|
+
supabase,
|
|
1771
1831
|
// Auth methods
|
|
1772
|
-
signIn
|
|
1773
|
-
signUp
|
|
1774
|
-
signOut
|
|
1775
|
-
resetPassword
|
|
1776
|
-
updatePassword
|
|
1777
|
-
refreshSession
|
|
1832
|
+
signIn,
|
|
1833
|
+
signUp,
|
|
1834
|
+
signOut,
|
|
1835
|
+
resetPassword,
|
|
1836
|
+
updatePassword,
|
|
1837
|
+
refreshSession,
|
|
1778
1838
|
// Organisation state
|
|
1779
|
-
selectedOrganisation
|
|
1780
|
-
organisations
|
|
1781
|
-
userMemberships
|
|
1839
|
+
selectedOrganisation,
|
|
1840
|
+
organisations,
|
|
1841
|
+
userMemberships,
|
|
1782
1842
|
organisationLoading: orgLoading,
|
|
1783
|
-
organisationError
|
|
1784
|
-
hasValidOrganisationContext
|
|
1785
|
-
isContextReady
|
|
1843
|
+
organisationError,
|
|
1844
|
+
hasValidOrganisationContext,
|
|
1845
|
+
isContextReady,
|
|
1786
1846
|
// Organisation methods
|
|
1787
|
-
switchOrganisation
|
|
1788
|
-
getUserRole
|
|
1789
|
-
validateOrganisationAccess
|
|
1790
|
-
refreshOrganisations
|
|
1791
|
-
ensureOrganisationContext
|
|
1792
|
-
isOrganisationSecure
|
|
1793
|
-
getPrimaryOrganisation
|
|
1847
|
+
switchOrganisation,
|
|
1848
|
+
getUserRole,
|
|
1849
|
+
validateOrganisationAccess,
|
|
1850
|
+
refreshOrganisations,
|
|
1851
|
+
ensureOrganisationContext,
|
|
1852
|
+
isOrganisationSecure,
|
|
1853
|
+
getPrimaryOrganisation,
|
|
1794
1854
|
// Event state
|
|
1795
|
-
events
|
|
1796
|
-
selectedEvent
|
|
1855
|
+
events,
|
|
1856
|
+
selectedEvent,
|
|
1797
1857
|
eventLoading,
|
|
1798
|
-
eventError
|
|
1858
|
+
eventError,
|
|
1799
1859
|
// Event methods
|
|
1800
|
-
setSelectedEvent
|
|
1801
|
-
refreshEvents
|
|
1860
|
+
setSelectedEvent,
|
|
1861
|
+
refreshEvents,
|
|
1802
1862
|
// Inactivity state
|
|
1803
|
-
showInactivityWarning
|
|
1804
|
-
inactivityTimeRemaining
|
|
1805
|
-
isIdle
|
|
1806
|
-
timeRemaining
|
|
1807
|
-
showWarning
|
|
1808
|
-
isTracking
|
|
1863
|
+
showInactivityWarning,
|
|
1864
|
+
inactivityTimeRemaining,
|
|
1865
|
+
isIdle,
|
|
1866
|
+
timeRemaining,
|
|
1867
|
+
showWarning,
|
|
1868
|
+
isTracking,
|
|
1809
1869
|
// Inactivity methods
|
|
1810
|
-
resetActivity
|
|
1811
|
-
startTracking
|
|
1812
|
-
stopTracking
|
|
1813
|
-
handleIdleLogout
|
|
1814
|
-
handleStaySignedIn
|
|
1815
|
-
handleSignOutNow
|
|
1870
|
+
resetActivity,
|
|
1871
|
+
startTracking,
|
|
1872
|
+
stopTracking,
|
|
1873
|
+
handleIdleLogout,
|
|
1874
|
+
handleStaySignedIn,
|
|
1875
|
+
handleSignOutNow,
|
|
1816
1876
|
// Additional unified properties
|
|
1817
1877
|
appName,
|
|
1818
1878
|
appConfig,
|
|
1819
1879
|
isLoading: totalLoading,
|
|
1820
|
-
hasErrors
|
|
1880
|
+
hasErrors
|
|
1821
1881
|
};
|
|
1822
|
-
}, [
|
|
1882
|
+
}, [
|
|
1883
|
+
// All primitive values extracted from services
|
|
1884
|
+
// Note: Arrays/objects from services are stable references (same reference unless data changes)
|
|
1885
|
+
currentUser,
|
|
1886
|
+
currentSession,
|
|
1887
|
+
isAuth,
|
|
1888
|
+
authLoading,
|
|
1889
|
+
authError,
|
|
1890
|
+
supabase,
|
|
1891
|
+
selectedOrganisation,
|
|
1892
|
+
organisations,
|
|
1893
|
+
userMemberships,
|
|
1894
|
+
orgLoading,
|
|
1895
|
+
organisationError,
|
|
1896
|
+
hasValidOrganisationContext,
|
|
1897
|
+
isContextReady,
|
|
1898
|
+
events,
|
|
1899
|
+
selectedEvent,
|
|
1900
|
+
eventLoading,
|
|
1901
|
+
eventError,
|
|
1902
|
+
showInactivityWarning,
|
|
1903
|
+
inactivityTimeRemaining,
|
|
1904
|
+
isIdle,
|
|
1905
|
+
timeRemaining,
|
|
1906
|
+
showWarning,
|
|
1907
|
+
isTracking,
|
|
1908
|
+
totalLoading,
|
|
1909
|
+
hasErrors,
|
|
1910
|
+
appName,
|
|
1911
|
+
appConfig,
|
|
1912
|
+
// Stable function references from useCallback (services are stable, so callbacks are too)
|
|
1913
|
+
signIn,
|
|
1914
|
+
signUp,
|
|
1915
|
+
signOut,
|
|
1916
|
+
resetPassword,
|
|
1917
|
+
updatePassword,
|
|
1918
|
+
refreshSession,
|
|
1919
|
+
switchOrganisation,
|
|
1920
|
+
getUserRole,
|
|
1921
|
+
validateOrganisationAccess,
|
|
1922
|
+
refreshOrganisations,
|
|
1923
|
+
ensureOrganisationContext,
|
|
1924
|
+
isOrganisationSecure,
|
|
1925
|
+
getPrimaryOrganisation,
|
|
1926
|
+
setSelectedEvent,
|
|
1927
|
+
refreshEvents,
|
|
1928
|
+
resetActivity,
|
|
1929
|
+
startTracking,
|
|
1930
|
+
stopTracking,
|
|
1931
|
+
handleIdleLogout,
|
|
1932
|
+
handleStaySignedIn,
|
|
1933
|
+
handleSignOutNow
|
|
1934
|
+
]);
|
|
1823
1935
|
return /* @__PURE__ */ jsx5(UnifiedAuthContext.Provider, { value: contextValue, children });
|
|
1824
1936
|
}
|
|
1825
1937
|
function EventServiceProviderWrapper({
|
|
@@ -1831,9 +1943,6 @@ function EventServiceProviderWrapper({
|
|
|
1831
1943
|
}) {
|
|
1832
1944
|
const organisationService = useOrganisationService2();
|
|
1833
1945
|
const selectedOrganisation = organisationService.getSelectedOrganisation();
|
|
1834
|
-
if (!user || !session) {
|
|
1835
|
-
return /* @__PURE__ */ jsx5(Fragment, { children });
|
|
1836
|
-
}
|
|
1837
1946
|
return /* @__PURE__ */ jsx5(
|
|
1838
1947
|
EventServiceProvider,
|
|
1839
1948
|
{
|
|
@@ -1996,4 +2105,4 @@ export {
|
|
|
1996
2105
|
UnifiedAuthProvider,
|
|
1997
2106
|
init_UnifiedAuthProvider
|
|
1998
2107
|
};
|
|
1999
|
-
//# sourceMappingURL=chunk-
|
|
2108
|
+
//# sourceMappingURL=chunk-5BN3YGNK.js.map
|