@jmruthers/pace-core 0.5.91 → 0.5.92
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-VIP44OB6.js → DataTable-HC5S4RKB.js} +6 -6
- package/dist/{PublicLoadingSpinner-Dx5c2g3S.d.ts → PublicLoadingSpinner-n74JgA9h.d.ts} +50 -1
- package/dist/{UnifiedAuthProvider-6JRTOFPS.js → UnifiedAuthProvider-ZM7VUC45.js} +3 -3
- package/dist/{chunk-VJJNZKHO.js → chunk-5LAY74WM.js} +354 -281
- package/dist/chunk-5LAY74WM.js.map +1 -0
- package/dist/{chunk-G2SCPUKC.js → chunk-6WFM22A4.js} +2 -2
- package/dist/{chunk-AIV3VYBQ.js → chunk-AAM57AEU.js} +4 -2
- package/dist/chunk-AAM57AEU.js.map +1 -0
- package/dist/{chunk-7XBW2P7B.js → chunk-AYC2P377.js} +2 -2
- package/dist/{chunk-GD3ENUKD.js → chunk-AZ2QJYKU.js} +3 -3
- package/dist/{chunk-G2YT64FA.js → chunk-GP3HU6WS.js} +3 -3
- package/dist/{chunk-7NIERLC6.js → chunk-HW5BGOWB.js} +4 -4
- package/dist/{chunk-JDPFQV3V.js → chunk-M52CQP5W.js} +4 -4
- package/dist/{chunk-JQWSAYZC.js → chunk-OXFOS62D.js} +2 -2
- package/dist/{chunk-4DYK5KCK.js → chunk-TZXYSZT3.js} +4 -4
- package/dist/{chunk-XZHZYSAK.js → chunk-XIBSVWJW.js} +5 -5
- package/dist/components.d.ts +1 -1
- package/dist/components.js +10 -8
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +7 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- 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/ProtectedRouteProps.md +97 -0
- 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/UseEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UseEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/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 +38 -2
- package/package.json +1 -1
- package/src/components/EventSelector/EventSelector.tsx +19 -1
- package/src/components/ProtectedRoute/ProtectedRoute.tsx +224 -0
- package/src/components/ProtectedRoute/index.ts +3 -0
- package/src/components/index.ts +4 -1
- package/src/index.ts +3 -0
- package/src/providers/AuthProvider.simplified.tsx +108 -14
- package/src/services/EventService.ts +6 -1
- package/dist/chunk-AIV3VYBQ.js.map +0 -1
- package/dist/chunk-VJJNZKHO.js.map +0 -1
- /package/dist/{DataTable-VIP44OB6.js.map → DataTable-HC5S4RKB.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-6JRTOFPS.js.map → UnifiedAuthProvider-ZM7VUC45.js.map} +0 -0
- /package/dist/{chunk-G2SCPUKC.js.map → chunk-6WFM22A4.js.map} +0 -0
- /package/dist/{chunk-7XBW2P7B.js.map → chunk-AYC2P377.js.map} +0 -0
- /package/dist/{chunk-GD3ENUKD.js.map → chunk-AZ2QJYKU.js.map} +0 -0
- /package/dist/{chunk-G2YT64FA.js.map → chunk-GP3HU6WS.js.map} +0 -0
- /package/dist/{chunk-7NIERLC6.js.map → chunk-HW5BGOWB.js.map} +0 -0
- /package/dist/{chunk-JDPFQV3V.js.map → chunk-M52CQP5W.js.map} +0 -0
- /package/dist/{chunk-JQWSAYZC.js.map → chunk-OXFOS62D.js.map} +0 -0
- /package/dist/{chunk-4DYK5KCK.js.map → chunk-TZXYSZT3.js.map} +0 -0
- /package/dist/{chunk-XZHZYSAK.js.map → chunk-XIBSVWJW.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-TZXYSZT3.js";
|
|
57
|
+
import "./chunk-AZ2QJYKU.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-QPCAGLUS.js";
|
|
78
|
-
import "./chunk-
|
|
79
|
-
import "./chunk-
|
|
80
|
-
import "./chunk-
|
|
78
|
+
import "./chunk-OXFOS62D.js";
|
|
79
|
+
import "./chunk-AYC2P377.js";
|
|
80
|
+
import "./chunk-AAM57AEU.js";
|
|
81
81
|
import "./chunk-PYUXFQJ3.js";
|
|
82
82
|
import "./chunk-JCQZ6LA7.js";
|
|
83
83
|
import "./chunk-BDZUMRBD.js";
|
|
@@ -155,4 +155,4 @@ export {
|
|
|
155
155
|
validateHierarchicalData,
|
|
156
156
|
validatePaginationConfig
|
|
157
157
|
};
|
|
158
|
-
//# sourceMappingURL=DataTable-
|
|
158
|
+
//# sourceMappingURL=DataTable-HC5S4RKB.js.map
|
|
@@ -2564,6 +2564,55 @@ interface PaceLoginPageProps {
|
|
|
2564
2564
|
*/
|
|
2565
2565
|
declare const PaceLoginPage: React__default.FC<PaceLoginPageProps>;
|
|
2566
2566
|
|
|
2567
|
+
interface ProtectedRouteProps {
|
|
2568
|
+
/**
|
|
2569
|
+
* Whether an event is required for routes inside this component.
|
|
2570
|
+
* When true, routes will only render if an event is selected or can be selected.
|
|
2571
|
+
* When false, routes render regardless of event state.
|
|
2572
|
+
* @default true
|
|
2573
|
+
*/
|
|
2574
|
+
requireEvent?: boolean;
|
|
2575
|
+
/**
|
|
2576
|
+
* Whether super admins can bypass event requirement.
|
|
2577
|
+
* Note: This feature requires additional RBAC setup. For simple bypass, set requireEvent={false} instead.
|
|
2578
|
+
* @default false
|
|
2579
|
+
* @deprecated Use requireEvent={false} for routes that don't need events
|
|
2580
|
+
*/
|
|
2581
|
+
allowSuperAdminBypass?: boolean;
|
|
2582
|
+
/**
|
|
2583
|
+
* Custom component to render when no events are available.
|
|
2584
|
+
* If not provided, a default message is shown.
|
|
2585
|
+
*/
|
|
2586
|
+
noEventsFallback?: React__default.ReactNode;
|
|
2587
|
+
/**
|
|
2588
|
+
* Custom component to render while events are loading.
|
|
2589
|
+
* If not provided, a default loading spinner is shown.
|
|
2590
|
+
*/
|
|
2591
|
+
loadingFallback?: React__default.ReactNode;
|
|
2592
|
+
/**
|
|
2593
|
+
* Login redirect path when user is not authenticated.
|
|
2594
|
+
* @default '/login'
|
|
2595
|
+
*/
|
|
2596
|
+
loginPath?: string;
|
|
2597
|
+
}
|
|
2598
|
+
/**
|
|
2599
|
+
* ProtectedRoute component that handles authentication and optional event selection.
|
|
2600
|
+
*
|
|
2601
|
+
* This component solves the chicken-and-egg problem where apps check for `selectedEvent`
|
|
2602
|
+
* before rendering, which blocks the event selector (typically in the header) from being visible.
|
|
2603
|
+
*
|
|
2604
|
+
* Strategy:
|
|
2605
|
+
* 1. Check authentication first - redirect to login if not authenticated
|
|
2606
|
+
* 2. Allow rendering during event loading - prevents blocking UI
|
|
2607
|
+
* 3. If events exist but none selected - allow rendering so selector is visible
|
|
2608
|
+
* 4. If no events available - show error message
|
|
2609
|
+
* 5. Individual pages should handle "no selected event" state gracefully
|
|
2610
|
+
*
|
|
2611
|
+
* @param props - Configuration for route protection
|
|
2612
|
+
* @returns React element with route protection logic
|
|
2613
|
+
*/
|
|
2614
|
+
declare function ProtectedRoute({ requireEvent, allowSuperAdminBypass, noEventsFallback, loadingFallback, loginPath }: ProtectedRouteProps): string | number | true | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element;
|
|
2615
|
+
|
|
2567
2616
|
/**
|
|
2568
2617
|
* State interface for the ErrorBoundary component
|
|
2569
2618
|
* @public
|
|
@@ -3603,4 +3652,4 @@ declare function PublicLoadingSkeleton({ lines, className }: {
|
|
|
3603
3652
|
className?: string;
|
|
3604
3653
|
}): react_jsx_runtime.JSX.Element;
|
|
3605
3654
|
|
|
3606
|
-
export { Select as $, Alert as A, Button as B, Card as C, Dialog as D, DialogOverlay as E, DialogTrigger as F, DialogClose as G, DialogContent as H, Input as I, DialogHeader as J, DialogBody as K, Label as L, DialogFooter as M, DialogTitle as N, DialogDescription as O, Progress as P, type DialogProps as Q, type DialogTriggerProps as R, Switch as S, Table as T, type DialogContentProps as U, type DialogOverlayProps as V, type DialogHeaderProps as W, type DialogFooterProps as X, type DialogTitleProps as Y, type DialogDescriptionProps as Z, type DialogSize as _, type ButtonProps as a,
|
|
3655
|
+
export { Select as $, Alert as A, Button as B, Card as C, Dialog as D, DialogOverlay as E, DialogTrigger as F, DialogClose as G, DialogContent as H, Input as I, DialogHeader as J, DialogBody as K, Label as L, DialogFooter as M, DialogTitle as N, DialogDescription as O, Progress as P, type DialogProps as Q, type DialogTriggerProps as R, Switch as S, Table as T, type DialogContentProps as U, type DialogOverlayProps as V, type DialogHeaderProps as W, type DialogFooterProps as X, type DialogTitleProps as Y, type DialogDescriptionProps as Z, type DialogSize as _, type ButtonProps as a, PublicPageProvider as a$, SelectGroup as a0, SelectValue as a1, SelectTrigger as a2, SelectContent as a3, SelectLabel as a4, SelectItem as a5, SelectSeparator as a6, Toast as a7, Toaster as a8, ToastAction as a9, UserMenu as aA, ErrorBoundary as aB, type ErrorBoundaryProps as aC, type ErrorBoundaryState as aD, LoadingSpinner as aE, SessionRestorationLoader as aF, EventSelector as aG, PasswordResetForm as aH, FileUpload as aI, type FileUploadProps as aJ, FileDisplay as aK, type FileDisplayProps as aL, useFileReference as aM, useFileReferenceForRecord as aN, useFileReferenceById as aO, useFilesByCategory as aP, type UseFileReferenceOptions as aQ, type UseFileReferenceReturn as aR, type UseFileReferenceForRecordReturn as aS, useEventLogo as aT, clearEventLogoCache as aU, getEventLogoCacheStats as aV, type UseEventLogoReturn as aW, type UseEventLogoOptions as aX, PublicPageLayout as aY, usePublicPageContext$1 as aZ, PublicPageHeader as a_, ToastProvider as aa, ToastViewport as ab, ToastTitle as ac, ToastDescription as ad, ToastClose as ae, type ToastActionElement as af, type ToastProps as ag, Tooltip as ah, TooltipTrigger as ai, TooltipContent as aj, TooltipProvider as ak, TooltipRoot as al, Form as am, type FormProps as an, LoginForm as ao, type LoginFormProps as ap, Header as aq, Footer as ar, type FooterProps as as, ProtectedRoute as at, type ProtectedRouteProps as au, NavigationMenu as av, type NavigationMenuProps as aw, type NavigationItem as ax, OrganisationSelector as ay, type OrganisationSelectorProps as az, CardHeader as b, usePublicPageContext as b0, useIsPublicPage as b1, PublicPageFooter as b2, PublicPageDebugger as b3, PublicPageDiagnostic as b4, PublicPageContextChecker as b5, EventLogo as b6, EventLogoCompact as b7, EventLogoLarge as b8, PublicErrorBoundary as b9, useErrorBoundary as ba, DefaultPublicErrorFallback as bb, PublicLoadingSpinner as bc, PublicLoadingSpinnerFullPage as bd, PublicLoadingSkeleton as be, type PublicPageLayoutProps as bf, type PublicPageHeaderProps as bg, type PublicPageFooterProps as bh, type EventLogoProps as bi, type PublicErrorBoundaryProps as bj, type PublicErrorBoundaryState as bk, type PublicLoadingSpinnerProps as bl, type PaceAppLayoutProps as bm, PaceAppLayout as bn, type PaceLoginPageProps as bo, PaceLoginPage as bp, type UserMenuProps as bq, CardFooter as c, CardTitle as d, CardDescription as e, CardContent as f, CardActions as g, type CardProps as h, type CardActionsProps as i, type InputProps as j, type LabelProps as k, AlertTitle as l, AlertDescription as m, Avatar as n, AvatarImage as o, AvatarFallback as p, Checkbox as q, type SwitchProps as r, TableHeader as s, TableBody as t, TableCaption as u, TableCell as v, TableFooter as w, TableHead as x, TableRow as y, DialogPortal as z };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_UnifiedAuthProvider
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AYC2P377.js";
|
|
4
4
|
import {
|
|
5
5
|
UnifiedAuthProvider,
|
|
6
6
|
useUnifiedAuth
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AAM57AEU.js";
|
|
8
8
|
import "./chunk-BDZUMRBD.js";
|
|
9
9
|
import "./chunk-SMJZMKYN.js";
|
|
10
10
|
import "./chunk-PLDDJCW6.js";
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
UnifiedAuthProvider,
|
|
14
14
|
useUnifiedAuth
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=UnifiedAuthProvider-
|
|
16
|
+
//# sourceMappingURL=UnifiedAuthProvider-ZM7VUC45.js.map
|