@jmruthers/pace-core 0.5.1 → 0.5.3
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-GX3XERFJ.js → DataTable-ZQDRE46Q.js} +7 -6
- package/dist/{PublicLoadingSpinner-DztrzuJr.d.ts → PublicLoadingSpinner-Bq_-BeK-.d.ts} +1 -1
- package/dist/RBACProvider-BO4ilsQB.d.ts +63 -0
- package/dist/{UnifiedAuthProvider-w66zSCUf.d.ts → UnifiedAuthProvider-DGQsy-vY.d.ts} +2 -59
- package/dist/{api-ETQ6YJ3C.js → api-H5A3H4IR.js} +2 -2
- package/dist/{chunk-T3XIA4AJ.js → chunk-5H3C2SWM.js} +14 -16
- package/dist/chunk-5H3C2SWM.js.map +1 -0
- package/dist/chunk-5SIXIV7R.js +1925 -0
- package/dist/chunk-5SIXIV7R.js.map +1 -0
- package/dist/chunk-GNTALZV3.js +17 -0
- package/dist/chunk-GNTALZV3.js.map +1 -0
- package/dist/{chunk-C5G2A4PO.js → chunk-GWSBHC4J.js} +6 -6
- package/dist/{chunk-XJK2J4N6.js → chunk-HD7PYDUV.js} +4 -6
- package/dist/{chunk-XJK2J4N6.js.map → chunk-HD7PYDUV.js.map} +1 -1
- package/dist/{chunk-TGDCLPP2.js → chunk-HXX35Q2M.js} +6 -21
- package/dist/chunk-HXX35Q2M.js.map +1 -0
- package/dist/{chunk-5EL3KHOQ.js → chunk-K6B7BLSE.js} +2 -2
- package/dist/{chunk-GSNM5D6H.js → chunk-M4RW7PIP.js} +4 -4
- package/dist/{chunk-U6JDHVC2.js → chunk-PVMYVQSM.js} +6 -8
- package/dist/{chunk-U6JDHVC2.js.map → chunk-PVMYVQSM.js.map} +1 -1
- package/dist/{chunk-6CR3MRZN.js → chunk-QKHFMQ5R.js} +372 -11
- package/dist/{chunk-6CR3MRZN.js.map → chunk-QKHFMQ5R.js.map} +1 -1
- package/dist/chunk-QVYBYGT2.js +428 -0
- package/dist/chunk-QVYBYGT2.js.map +1 -0
- package/dist/{chunk-OEGRKULD.js → chunk-WJARTBCT.js} +56 -1
- package/dist/chunk-WJARTBCT.js.map +1 -0
- package/dist/components.d.ts +4 -3
- package/dist/components.js +16 -162
- package/dist/components.js.map +1 -1
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +7 -9
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.js +152 -17
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +3 -2
- package/dist/providers.js +6 -12
- package/dist/rbac/index.d.ts +167 -98
- package/dist/rbac/index.js +48 -1881
- package/dist/rbac/index.js.map +1 -1
- package/dist/styles/core.css +0 -58
- package/dist/types.d.ts +2 -2
- package/dist/{unified-CM7T0aTK.d.ts → unified-CMPjE_fv.d.ts} +1 -1
- package/dist/{usePublicRouteParams-B6i0KtXW.d.ts → usePublicRouteParams-B2OcAsur.d.ts} +1 -1
- package/dist/utils.js +12 -14
- package/dist/utils.js.map +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +73 -0
- package/docs/api/classes/MissingUserContextError.md +66 -0
- package/docs/api/classes/OrganisationContextRequiredError.md +66 -0
- package/docs/api/classes/PermissionDeniedError.md +73 -0
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +270 -0
- package/docs/api/classes/RBACCache.md +284 -0
- package/docs/api/classes/RBACEngine.md +141 -0
- package/docs/api/classes/RBACError.md +76 -0
- package/docs/api/classes/RBACNotInitializedError.md +66 -0
- package/docs/api/classes/SecureSupabaseClient.md +135 -0
- 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 +96 -0
- 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 +235 -0
- package/docs/api/interfaces/EventContextType.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/EventProviderProps.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.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 +107 -0
- package/docs/api/interfaces/NavigationContextType.md +164 -0
- package/docs/api/interfaces/NavigationGuardProps.md +139 -0
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +117 -0
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +2 -2
- 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 +85 -0
- package/docs/api/interfaces/PagePermissionContextType.md +140 -0
- package/docs/api/interfaces/PagePermissionGuardProps.md +153 -0
- package/docs/api/interfaces/PagePermissionProviderProps.md +119 -0
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +153 -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 +99 -0
- package/docs/api/interfaces/RBACContextType.md +474 -0
- package/docs/api/interfaces/RBACLogger.md +112 -0
- package/docs/api/interfaces/RBACProviderProps.md +107 -0
- package/docs/api/interfaces/RoleBasedRouterContextType.md +151 -0
- package/docs/api/interfaces/RoleBasedRouterProps.md +156 -0
- package/docs/api/interfaces/RouteAccessRecord.md +107 -0
- package/docs/api/interfaces/RouteConfig.md +121 -0
- package/docs/api/interfaces/SecureDataContextType.md +168 -0
- package/docs/api/interfaces/SecureDataProviderProps.md +132 -0
- 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/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +85 -85
- 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/UserEventAccess.md +11 -11
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +2244 -3
- package/docs/migration-guide.md +43 -18
- package/docs/styles/README.md +187 -98
- package/docs/usage.md +32 -7
- package/package.json +2 -2
- package/src/components/Footer/Footer.test.tsx +482 -0
- package/src/components/Form/Form.test.tsx +1158 -0
- package/src/components/Header/Header.test.tsx +582 -0
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/InactivityWarningModal/InactivityWarningModal.test.tsx +489 -0
- package/src/components/Input/Input.test.tsx +466 -0
- package/src/components/LoadingSpinner/LoadingSpinner.test.tsx +450 -0
- package/src/components/LoginForm/LoginForm.test.tsx +816 -0
- package/src/components/NavigationMenu/NavigationMenu.test.tsx +883 -0
- package/src/components/OrganisationSelector/OrganisationSelector.test.tsx +748 -0
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +891 -0
- package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +475 -0
- package/src/components/PasswordReset/PasswordChangeForm.test.tsx +621 -0
- package/src/components/PasswordReset/PasswordResetForm.test.tsx +605 -0
- package/src/components/Select/Select.test.tsx +948 -0
- package/src/components/SuperAdminGuard.tsx +1 -1
- package/src/components/Toast/Toast.test.tsx +586 -0
- package/src/components/Tooltip/Tooltip.test.tsx +852 -0
- package/src/components/UserMenu/UserMenu.test.tsx +702 -0
- package/src/components/UserMenu/UserMenu.tsx +2 -2
- package/src/hooks/useDebounce.test.ts +375 -0
- package/src/hooks/useOrganisationPermissions.test.ts +528 -0
- package/src/hooks/useOrganisationSecurity.test.ts +734 -0
- package/src/hooks/usePermissionCache.test.ts +542 -0
- package/src/hooks/usePermissionCache.ts +1 -1
- package/src/index.ts +2 -3
- package/src/providers/UnifiedAuthProvider.tsx +2 -2
- package/src/providers/index.ts +3 -1
- package/src/rbac/__tests__/integration.test.tsx +218 -0
- package/src/rbac/api.test.ts +441 -0
- package/src/rbac/hooks/index.ts +21 -0
- package/src/rbac/hooks/useCan.test.ts +461 -0
- package/src/rbac/hooks/usePermissions.test.ts +359 -0
- package/src/rbac/hooks/usePermissions.ts +567 -0
- package/src/rbac/hooks/useRBAC.simple.test.ts +90 -0
- package/src/rbac/hooks/useRBAC.test.ts +503 -0
- package/src/{hooks → rbac/hooks}/useRBAC.ts +7 -7
- package/src/rbac/index.ts +5 -10
- package/src/{providers → rbac/providers}/RBACProvider.tsx +6 -6
- package/src/rbac/providers/__tests__/RBACProvider.test.tsx +687 -0
- package/src/rbac/providers/index.ts +11 -0
- package/src/styles/core.css +0 -58
- package/src/utils/formatDate.test.ts +241 -0
- package/dist/chunk-AUE24LVR.js +0 -268
- package/dist/chunk-AUE24LVR.js.map +0 -1
- package/dist/chunk-COBPIXXQ.js +0 -379
- package/dist/chunk-COBPIXXQ.js.map +0 -1
- package/dist/chunk-OEGRKULD.js.map +0 -1
- package/dist/chunk-OYRY44Q2.js +0 -62
- package/dist/chunk-OYRY44Q2.js.map +0 -1
- package/dist/chunk-T3XIA4AJ.js.map +0 -1
- package/dist/chunk-TGDCLPP2.js.map +0 -1
- package/src/components/RBAC/PagePermissionGuard.tsx +0 -287
- package/src/components/RBAC/RBACGuard.tsx +0 -143
- package/src/components/RBAC/RBACProvider.tsx +0 -186
- package/src/components/RBAC/RoleBasedContent.tsx +0 -129
- package/src/components/RBAC/index.ts +0 -23
- package/src/rbac/hooks.ts +0 -570
- /package/dist/{DataTable-GX3XERFJ.js.map → DataTable-ZQDRE46Q.js.map} +0 -0
- /package/dist/{api-ETQ6YJ3C.js.map → api-H5A3H4IR.js.map} +0 -0
- /package/dist/{chunk-C5G2A4PO.js.map → chunk-GWSBHC4J.js.map} +0 -0
- /package/dist/{chunk-5EL3KHOQ.js.map → chunk-K6B7BLSE.js.map} +0 -0
- /package/dist/{chunk-GSNM5D6H.js.map → chunk-M4RW7PIP.js.map} +0 -0
|
@@ -32,10 +32,11 @@ import {
|
|
|
32
32
|
useDataTableContext,
|
|
33
33
|
usePluginRegistry,
|
|
34
34
|
useStateManager
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-M4RW7PIP.js";
|
|
36
|
+
import "./chunk-QVYBYGT2.js";
|
|
37
|
+
import "./chunk-GWSBHC4J.js";
|
|
38
38
|
import "./chunk-7BNPOCLL.js";
|
|
39
|
+
import "./chunk-HXX35Q2M.js";
|
|
39
40
|
import {
|
|
40
41
|
DataChunkManager,
|
|
41
42
|
SearchIndex,
|
|
@@ -47,9 +48,9 @@ import {
|
|
|
47
48
|
throttle,
|
|
48
49
|
useDataTablePerformance
|
|
49
50
|
} from "./chunk-SS3E6QLB.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-QKHFMQ5R.js";
|
|
51
52
|
import "./chunk-YDJW5XTN.js";
|
|
52
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-WJARTBCT.js";
|
|
53
54
|
import "./chunk-PLDDJCW6.js";
|
|
54
55
|
export {
|
|
55
56
|
ActionButtons,
|
|
@@ -95,4 +96,4 @@ export {
|
|
|
95
96
|
usePluginRegistry,
|
|
96
97
|
useStateManager
|
|
97
98
|
};
|
|
98
|
-
//# sourceMappingURL=DataTable-
|
|
99
|
+
//# sourceMappingURL=DataTable-ZQDRE46Q.js.map
|
|
@@ -11,7 +11,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
11
11
|
import { FieldValues, DefaultValues, SubmitHandler, SubmitErrorHandler, UseFormReturn } from 'react-hook-form';
|
|
12
12
|
import { z } from 'zod';
|
|
13
13
|
import { User, SupabaseClient, createClient } from '@supabase/supabase-js';
|
|
14
|
-
import { r as Event } from './unified-
|
|
14
|
+
import { r as Event } from './unified-CMPjE_fv.js';
|
|
15
15
|
import { O as Organisation } from './organisation-CO3Sh3_D.js';
|
|
16
16
|
|
|
17
17
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { SupabaseClient, User, Session } from '@supabase/supabase-js';
|
|
4
|
+
import { A as AccessLevel } from './unified-CMPjE_fv.js';
|
|
5
|
+
|
|
6
|
+
interface AppConfig {
|
|
7
|
+
supports_direct_access: boolean;
|
|
8
|
+
requires_event: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface UserEventAccess {
|
|
11
|
+
event_id: string;
|
|
12
|
+
event_name: string;
|
|
13
|
+
event_description?: string | null;
|
|
14
|
+
start_date: string;
|
|
15
|
+
end_date: string;
|
|
16
|
+
event_status: string;
|
|
17
|
+
app_id: string;
|
|
18
|
+
access_level: string;
|
|
19
|
+
granted_at: string;
|
|
20
|
+
organisation_id: string;
|
|
21
|
+
}
|
|
22
|
+
interface RBACContextType {
|
|
23
|
+
permissions: Record<string, boolean>;
|
|
24
|
+
roles: string[];
|
|
25
|
+
accessLevel: AccessLevel;
|
|
26
|
+
rbacLoading: boolean;
|
|
27
|
+
rbacError: Error | null;
|
|
28
|
+
selectedEventId: string | null;
|
|
29
|
+
appConfig: AppConfig | null;
|
|
30
|
+
userEventAccess: UserEventAccess[];
|
|
31
|
+
eventAccessLoading: boolean;
|
|
32
|
+
selectedOrganisationId: string | null;
|
|
33
|
+
requireOrganisationContext: () => string;
|
|
34
|
+
hasPermission: (permission: string, orgId?: string) => boolean;
|
|
35
|
+
hasAnyPermission: (permissions: string[], orgId?: string) => boolean;
|
|
36
|
+
hasAllPermissions: (permissions: string[], orgId?: string) => boolean;
|
|
37
|
+
hasRole: (role: string) => boolean;
|
|
38
|
+
hasAccessLevel: (level: AccessLevel) => boolean;
|
|
39
|
+
canAccess: (resource: string, action: string, orgId?: string) => boolean;
|
|
40
|
+
validatePermission: (permission: string, orgId?: string) => Promise<boolean>;
|
|
41
|
+
validateAccess: (resource: string, action: string, orgId?: string) => Promise<boolean>;
|
|
42
|
+
refreshPermissions: (eventId?: string, orgId?: string) => Promise<void>;
|
|
43
|
+
setSelectedEventId: (eventId: string | null) => void;
|
|
44
|
+
loadUserEventAccess: (orgId?: string) => Promise<void>;
|
|
45
|
+
getUserEventAccess: (eventId: string) => UserEventAccess | undefined;
|
|
46
|
+
rbacEnabled: boolean;
|
|
47
|
+
rbacContext?: any;
|
|
48
|
+
}
|
|
49
|
+
declare const useRBAC: () => RBACContextType;
|
|
50
|
+
interface RBACProviderProps {
|
|
51
|
+
children: React__default.ReactNode;
|
|
52
|
+
supabaseClient?: SupabaseClient;
|
|
53
|
+
user: User | null;
|
|
54
|
+
session: Session | null;
|
|
55
|
+
appName: string;
|
|
56
|
+
enableRBAC?: boolean;
|
|
57
|
+
persistState?: boolean;
|
|
58
|
+
enablePersistence?: boolean;
|
|
59
|
+
requireOrganisationContext?: boolean;
|
|
60
|
+
}
|
|
61
|
+
declare function RBACProvider({ children, supabaseClient, user, session, appName, enableRBAC, persistState, enablePersistence, requireOrganisationContext: _requireOrganisationContext, }: RBACProviderProps): react_jsx_runtime.JSX.Element;
|
|
62
|
+
|
|
63
|
+
export { type RBACContextType as R, type UserEventAccess as U, RBACProvider as a, type RBACProviderProps as b, useRBAC as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { User, Session, AuthError, SupabaseClient } from '@supabase/supabase-js';
|
|
4
|
-
import {
|
|
4
|
+
import { R as RBACContextType } from './RBACProvider-BO4ilsQB.js';
|
|
5
5
|
|
|
6
6
|
interface AuthContextType {
|
|
7
7
|
user: User | null;
|
|
@@ -37,63 +37,6 @@ interface AuthProviderProps {
|
|
|
37
37
|
}
|
|
38
38
|
declare function AuthProvider({ children, supabaseClient }: AuthProviderProps): react_jsx_runtime.JSX.Element;
|
|
39
39
|
|
|
40
|
-
interface AppConfig {
|
|
41
|
-
supports_direct_access: boolean;
|
|
42
|
-
requires_event: boolean;
|
|
43
|
-
}
|
|
44
|
-
interface UserEventAccess {
|
|
45
|
-
event_id: string;
|
|
46
|
-
event_name: string;
|
|
47
|
-
event_description?: string | null;
|
|
48
|
-
start_date: string;
|
|
49
|
-
end_date: string;
|
|
50
|
-
event_status: string;
|
|
51
|
-
app_id: string;
|
|
52
|
-
access_level: string;
|
|
53
|
-
granted_at: string;
|
|
54
|
-
organisation_id: string;
|
|
55
|
-
}
|
|
56
|
-
interface RBACContextType {
|
|
57
|
-
permissions: Record<string, boolean>;
|
|
58
|
-
roles: string[];
|
|
59
|
-
accessLevel: AccessLevel;
|
|
60
|
-
rbacLoading: boolean;
|
|
61
|
-
rbacError: Error | null;
|
|
62
|
-
selectedEventId: string | null;
|
|
63
|
-
appConfig: AppConfig | null;
|
|
64
|
-
userEventAccess: UserEventAccess[];
|
|
65
|
-
eventAccessLoading: boolean;
|
|
66
|
-
selectedOrganisationId: string | null;
|
|
67
|
-
requireOrganisationContext: () => string;
|
|
68
|
-
hasPermission: (permission: string, orgId?: string) => boolean;
|
|
69
|
-
hasAnyPermission: (permissions: string[], orgId?: string) => boolean;
|
|
70
|
-
hasAllPermissions: (permissions: string[], orgId?: string) => boolean;
|
|
71
|
-
hasRole: (role: string) => boolean;
|
|
72
|
-
hasAccessLevel: (level: AccessLevel) => boolean;
|
|
73
|
-
canAccess: (resource: string, action: string, orgId?: string) => boolean;
|
|
74
|
-
validatePermission: (permission: string, orgId?: string) => Promise<boolean>;
|
|
75
|
-
validateAccess: (resource: string, action: string, orgId?: string) => Promise<boolean>;
|
|
76
|
-
refreshPermissions: (eventId?: string, orgId?: string) => Promise<void>;
|
|
77
|
-
setSelectedEventId: (eventId: string | null) => void;
|
|
78
|
-
loadUserEventAccess: (orgId?: string) => Promise<void>;
|
|
79
|
-
getUserEventAccess: (eventId: string) => UserEventAccess | undefined;
|
|
80
|
-
rbacEnabled: boolean;
|
|
81
|
-
rbacContext?: any;
|
|
82
|
-
}
|
|
83
|
-
declare const useRBAC: () => RBACContextType;
|
|
84
|
-
interface RBACProviderProps {
|
|
85
|
-
children: React__default.ReactNode;
|
|
86
|
-
supabaseClient?: SupabaseClient;
|
|
87
|
-
user: User | null;
|
|
88
|
-
session: Session | null;
|
|
89
|
-
appName: string;
|
|
90
|
-
enableRBAC?: boolean;
|
|
91
|
-
persistState?: boolean;
|
|
92
|
-
enablePersistence?: boolean;
|
|
93
|
-
requireOrganisationContext?: boolean;
|
|
94
|
-
}
|
|
95
|
-
declare function RBACProvider({ children, supabaseClient, user, session, appName, enableRBAC, persistState, enablePersistence, requireOrganisationContext: _requireOrganisationContext, }: RBACProviderProps): react_jsx_runtime.JSX.Element;
|
|
96
|
-
|
|
97
40
|
interface InactivityContextType {
|
|
98
41
|
showInactivityWarning: boolean;
|
|
99
42
|
inactivityTimeRemaining: number;
|
|
@@ -157,4 +100,4 @@ declare function UnifiedAuthProvider({ children, supabaseClient, appName, persis
|
|
|
157
100
|
warnBeforeMs, // 60 seconds
|
|
158
101
|
onIdleLogout, renderInactivityWarning, dangerouslyDisableInactivity }: UnifiedAuthProviderProps): react_jsx_runtime.JSX.Element;
|
|
159
102
|
|
|
160
|
-
export { type AuthContextType as A, type InactivityContextType as I,
|
|
103
|
+
export { type AuthContextType as A, type InactivityContextType as I, UnifiedAuthProvider as U, type UnifiedAuthProviderProps as a, type UnifiedAuthContextType as b, useAuth as c, type AuthProviderProps as d, AuthProvider as e, useInactivity as f, type InactivityProviderProps as g, InactivityProvider as h, useUnifiedAuth as u };
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isPermittedCached,
|
|
17
17
|
isSuperAdmin,
|
|
18
18
|
setupRBAC
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GWSBHC4J.js";
|
|
20
20
|
import "./chunk-7BNPOCLL.js";
|
|
21
21
|
import "./chunk-PLDDJCW6.js";
|
|
22
22
|
export {
|
|
@@ -38,4 +38,4 @@ export {
|
|
|
38
38
|
isSuperAdmin,
|
|
39
39
|
setupRBAC
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=api-
|
|
41
|
+
//# sourceMappingURL=api-H5A3H4IR.js.map
|
|
@@ -15,26 +15,21 @@ import {
|
|
|
15
15
|
SelectSeparator,
|
|
16
16
|
SelectTrigger,
|
|
17
17
|
SelectValue
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-M4RW7PIP.js";
|
|
19
19
|
import {
|
|
20
20
|
isPermitted
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GWSBHC4J.js";
|
|
22
22
|
import {
|
|
23
23
|
EventProvider_exports,
|
|
24
24
|
init_EventProvider,
|
|
25
25
|
useEvents
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HXX35Q2M.js";
|
|
27
27
|
import {
|
|
28
28
|
PublicErrorBoundary,
|
|
29
29
|
useAppConfig,
|
|
30
30
|
usePublicEventLogo,
|
|
31
31
|
usePublicPageContext
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import {
|
|
34
|
-
OrganisationProvider_exports,
|
|
35
|
-
init_OrganisationProvider,
|
|
36
|
-
useOrganisations
|
|
37
|
-
} from "./chunk-COBPIXXQ.js";
|
|
32
|
+
} from "./chunk-K6B7BLSE.js";
|
|
38
33
|
import {
|
|
39
34
|
Button,
|
|
40
35
|
Dialog,
|
|
@@ -43,11 +38,14 @@ import {
|
|
|
43
38
|
DialogOverlay,
|
|
44
39
|
DialogTitle,
|
|
45
40
|
DialogTrigger,
|
|
41
|
+
OrganisationProvider_exports,
|
|
46
42
|
UnifiedAuthProvider_exports,
|
|
47
43
|
init_Button,
|
|
44
|
+
init_OrganisationProvider,
|
|
48
45
|
init_UnifiedAuthProvider,
|
|
46
|
+
useOrganisations,
|
|
49
47
|
useUnifiedAuth
|
|
50
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-QKHFMQ5R.js";
|
|
51
49
|
import {
|
|
52
50
|
LoadingSpinner
|
|
53
51
|
} from "./chunk-CDQ3PX7L.js";
|
|
@@ -57,7 +55,7 @@ import {
|
|
|
57
55
|
import {
|
|
58
56
|
cn,
|
|
59
57
|
init_cn
|
|
60
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-WJARTBCT.js";
|
|
61
59
|
import {
|
|
62
60
|
__require,
|
|
63
61
|
__toCommonJS
|
|
@@ -712,11 +710,11 @@ var UserMenu = React7.memo(function UserMenu2({
|
|
|
712
710
|
return /* @__PURE__ */ jsxs5(Dialog, { open: isPasswordDialogOpen, onOpenChange: setPasswordDialogOpen, children: [
|
|
713
711
|
/* @__PURE__ */ jsxs5(Select, { className, children: [
|
|
714
712
|
/* @__PURE__ */ jsx9(SelectTrigger, { asChild: true, children: /* @__PURE__ */ jsxs5(Button, { variant: "outline", className: "flex items-center gap-2", "aria-label": userInfo.displayName, children: [
|
|
715
|
-
showAvatar && /* @__PURE__ */ jsxs5(Avatar, { className: "
|
|
713
|
+
showAvatar && /* @__PURE__ */ jsxs5(Avatar, { className: "size-7", children: [
|
|
716
714
|
/* @__PURE__ */ jsx9(AvatarImage, { src: userInfo.avatarUrl, alt: userInfo.displayName }),
|
|
717
715
|
/* @__PURE__ */ jsx9(AvatarFallback, { children: userInfo.initial })
|
|
718
716
|
] }),
|
|
719
|
-
/* @__PURE__ */ jsx9("span", {
|
|
717
|
+
/* @__PURE__ */ jsx9("span", { children: userInfo.displayName }),
|
|
720
718
|
/* @__PURE__ */ jsx9(ChevronDown, { className: "h-4 w-4" })
|
|
721
719
|
] }) }),
|
|
722
720
|
/* @__PURE__ */ jsxs5(SelectContent, { children: [
|
|
@@ -1073,7 +1071,7 @@ function Header({
|
|
|
1073
1071
|
EventSelector,
|
|
1074
1072
|
{
|
|
1075
1073
|
placeholder: "Select event",
|
|
1076
|
-
className: "justify-self-end
|
|
1074
|
+
className: "justify-self-end w-96",
|
|
1077
1075
|
"data-testid": "event-selector"
|
|
1078
1076
|
}
|
|
1079
1077
|
),
|
|
@@ -1162,7 +1160,7 @@ function PaceAppLayout({
|
|
|
1162
1160
|
eventId: user.user_metadata?.eventId || user.app_metadata?.eventId,
|
|
1163
1161
|
appId: user.user_metadata?.appId || user.app_metadata?.appId
|
|
1164
1162
|
};
|
|
1165
|
-
const { isSuperAdmin } = await import("./api-
|
|
1163
|
+
const { isSuperAdmin } = await import("./api-H5A3H4IR.js");
|
|
1166
1164
|
const isSuper = await isSuperAdmin(user.id);
|
|
1167
1165
|
if (isSuper) {
|
|
1168
1166
|
return true;
|
|
@@ -3292,4 +3290,4 @@ export {
|
|
|
3292
3290
|
PublicPageDiagnostic,
|
|
3293
3291
|
PublicPageContextChecker
|
|
3294
3292
|
};
|
|
3295
|
-
//# sourceMappingURL=chunk-
|
|
3293
|
+
//# sourceMappingURL=chunk-5H3C2SWM.js.map
|