@jmruthers/pace-core 0.5.86 → 0.5.88
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/{AuthService-Df3IozMG.d.ts → AuthService-DcTI5Ov4.d.ts} +9 -0
- package/dist/{DataTable-DKGTBLWT.js → DataTable-PWBMKMOG.js} +8 -8
- package/dist/{PublicLoadingSpinner-CnUaz0vG.d.ts → PublicLoadingSpinner-BQXD1fbO.d.ts} +161 -131
- package/dist/{UnifiedAuthProvider-K2IZAY5F.js → UnifiedAuthProvider-5D3HEQND.js} +4 -4
- package/dist/{UnifiedAuthProvider-B391Aqum.d.ts → UnifiedAuthProvider-BVKmQd9u.d.ts} +4 -0
- package/dist/auth-DReDSLq9.d.ts +16 -0
- package/dist/{chunk-CBSD3BZ3.js → chunk-3RZBKQ5Y.js} +2 -6
- package/dist/{chunk-CBSD3BZ3.js.map → chunk-3RZBKQ5Y.js.map} +1 -1
- package/dist/{chunk-NTW3KGS4.js → chunk-6UHXQH7P.js} +5 -5
- package/dist/{chunk-YVUZWLQG.js → chunk-AQGF5OG7.js} +3 -3
- package/dist/{chunk-CVMVPYAL.js → chunk-BDZUMRBD.js} +3 -5
- package/dist/chunk-BDZUMRBD.js.map +1 -0
- package/dist/{chunk-QCCJ3P4W.js → chunk-BNXBJOGL.js} +5 -5
- package/dist/{chunk-IBMPGOCN.js → chunk-CJIZS3UE.js} +1430 -783
- package/dist/chunk-CJIZS3UE.js.map +1 -0
- package/dist/{chunk-S3JKDMD5.js → chunk-CXKMRKRF.js} +4 -4
- package/dist/{chunk-5BN3YGNK.js → chunk-DP5X5ORK.js} +217 -27
- package/dist/chunk-DP5X5ORK.js.map +1 -0
- package/dist/{chunk-KUYWZVR2.js → chunk-H3P2RGKZ.js} +353 -9
- package/dist/chunk-H3P2RGKZ.js.map +1 -0
- package/dist/{chunk-RIXPZJUB.js → chunk-KTPG5VCH.js} +2 -2
- package/dist/{chunk-YCKPEMJA.js → chunk-QPCAGLUS.js} +2 -3
- package/dist/chunk-QPCAGLUS.js.map +1 -0
- package/dist/{chunk-WUXCWRL6.js → chunk-XJ2HZOBU.js} +6 -1
- package/dist/chunk-XJ2HZOBU.js.map +1 -0
- package/dist/{chunk-V5SWX6KL.js → chunk-XXVM53P4.js} +4 -4
- package/dist/{chunk-I2VVV5PQ.js → chunk-YY4YYM3E.js} +2 -2
- package/dist/components.d.ts +6 -55
- package/dist/components.js +25 -206
- package/dist/components.js.map +1 -1
- package/dist/{file-reference-9xUOnwyt.d.ts → file-reference-C9isKNPn.d.ts} +67 -2
- package/dist/hooks.js +10 -9
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +152 -26
- package/dist/index.js +65 -195
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +5 -3
- package/dist/providers.js +3 -3
- package/dist/rbac/index.js +8 -8
- package/dist/types.d.ts +2 -1
- package/dist/types.js +3 -3
- package/dist/utils.js +2 -2
- package/docs/DOCUMENTATION_AUDIT.md +6 -6
- package/docs/DOCUMENTATION_STANDARD.md +137 -0
- package/docs/README.md +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 +83 -40
- package/docs/api/enums/FileCategory.md +56 -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 +11 -11
- package/docs/api/interfaces/FileDisplayProps.md +10 -10
- 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 +8 -8
- package/docs/api/interfaces/FileUploadProps.md +137 -42
- 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 +83 -50
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +13 -13
- package/docs/api/interfaces/UseEventLogoOptions.md +74 -0
- package/docs/api/interfaces/UseEventLogoReturn.md +81 -0
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +6 -6
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +6 -6
- 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 +11 -11
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +292 -97
- package/docs/api-reference/components.md +1 -18
- package/docs/api-reference/hooks.md +1 -4
- package/docs/best-practices/testing.md +2 -0
- package/docs/documentation-index.md +1 -1
- package/docs/getting-started/faq.md +1 -1
- package/docs/implementation-guides/file-reference-system.md +592 -58
- package/docs/implementation-guides/file-upload-storage.md +137 -73
- package/docs/rbac/super-admin-guide.md +18 -70
- package/docs/testing/README.md +2 -0
- package/package.json +1 -1
- package/src/__tests__/TEST_STANDARD.md +674 -0
- package/src/__tests__/helpers/test-utils.tsx +3 -2
- package/src/components/DataTable/__tests__/{DataTable.comprehensive.test.tsx.skip → DataTable.comprehensive.test.tsx} +17 -18
- package/src/components/DataTable/__tests__/{DataTable.test.tsx.skip → DataTable.test.tsx} +14 -22
- package/src/components/DataTable/__tests__/{ssr.strict-mode.test.tsx.skip → ssr.strict-mode.test.tsx} +42 -47
- package/src/components/DataTable/components/__tests__/COVERAGE_NOTE.md +1 -1
- package/src/components/DataTable/examples/__tests__/PerformanceExample.test.tsx +13 -4
- package/src/components/DataTable/utils/__tests__/COVERAGE_NOTE.md +1 -1
- package/src/components/DataTable/utils/__tests__/performanceUtils.test.ts +10 -6
- package/src/components/DataTable/utils/performanceUtils.ts +12 -3
- package/src/components/FileDisplay/FileDisplay.test.tsx +257 -0
- package/src/components/{FileDisplay.tsx → FileDisplay/FileDisplay.tsx} +111 -10
- package/src/components/FileDisplay/index.tsx +4 -0
- package/src/components/FileUpload/FileUpload.test.tsx +171 -621
- package/src/components/FileUpload/FileUpload.tsx +512 -168
- package/src/components/FileUpload/index.tsx +4 -0
- package/src/components/Progress/Progress.test.tsx +38 -0
- package/src/components/PublicLayout/EventLogo.tsx +220 -39
- package/src/components/PublicLayout/PublicPageProvider.tsx +1 -1
- package/src/components/Select/Select.test.tsx +1 -1
- package/src/components/SessionRestorationLoader.tsx +48 -0
- package/src/components/Toast/Toast.tsx +13 -8
- package/src/components/index.ts +16 -16
- package/src/hooks/__tests__/ServiceHooks.test.tsx +615 -0
- package/src/hooks/public/usePublicEventLogo.ts +17 -7
- package/src/hooks/useDataTablePerformance.ts +4 -0
- package/src/hooks/useEventLogo.ts +316 -0
- package/src/hooks/useEvents.ts +0 -5
- package/src/hooks/useFileReference.test.ts +659 -0
- package/src/hooks/useFileReference.ts +207 -3
- package/src/hooks/useSessionRestoration.ts +64 -0
- package/src/index.ts +17 -5
- package/src/providers/{UnifiedAuthProvider.test.simple.tsx → UnifiedAuthProvider.smoke.test.tsx} +81 -60
- package/src/providers/services/AuthServiceProvider.tsx +27 -3
- package/src/providers/services/UnifiedAuthProvider.tsx +34 -5
- package/src/rbac/{engine.test.simple.ts → RBACEngine.smoke.test.ts} +17 -12
- package/src/services/AuthService.ts +142 -20
- package/src/services/EventService.ts +0 -4
- package/src/types/auth.ts +15 -0
- package/src/types/file-reference.ts +73 -1
- package/src/types/index.ts +1 -0
- package/src/utils/__tests__/organisationContext.unit.test.ts +2 -4
- package/src/utils/appNameResolver.simple.test.ts +99 -29
- package/src/utils/file-reference.test.ts +535 -0
- package/src/utils/file-reference.ts +200 -30
- package/src/utils/organisationContext.test.ts +5 -19
- package/src/utils/organisationContext.ts +3 -5
- package/src/utils/storage/README.md +269 -262
- package/src/utils/storage/config.ts +9 -0
- package/src/utils/storage/helpers.test.ts +631 -0
- package/src/utils/storage/helpers.ts +112 -14
- package/src/utils/storage/index.ts +3 -0
- package/src/validation/__tests__/sanitization.unit.test.ts +1 -1
- package/src/validation/__tests__/schemaUtils.unit.test.ts +1 -1
- package/src/validation/__tests__/user.unit.test.ts +1 -1
- package/dist/chunk-5BN3YGNK.js.map +0 -1
- package/dist/chunk-CVMVPYAL.js.map +0 -1
- package/dist/chunk-IBMPGOCN.js.map +0 -1
- package/dist/chunk-KUYWZVR2.js.map +0 -1
- package/dist/chunk-WUXCWRL6.js.map +0 -1
- package/dist/chunk-YCKPEMJA.js.map +0 -1
- package/docs/CONTENT_AUDIT_REPORT.md +0 -253
- package/docs/STYLE_GUIDE.md +0 -37
- package/examples/RBAC/__tests__/PermissionExample.test.tsx +0 -150
- package/examples/public-pages/__tests__/PublicPageUsageExample.test.tsx +0 -159
- package/src/__tests__/TEST_GUIDE_CURSOR.md +0 -1605
- package/src/__tests__/TEST_GUIDE_HUMAN.md +0 -103
- package/src/components/FileUpload/FileUpload.example.tsx +0 -218
- package/src/components/FileUpload/index.ts +0 -6
- package/src/components/FileUpload.tsx +0 -176
- package/src/components/Progress/index.ts +0 -3
- package/src/components/PublicLayout/__tests__/EventLogo.test.tsx +0 -666
- package/src/components/SuperAdminGuard.tsx +0 -116
- package/src/components/__tests__/FileDisplay.test.tsx +0 -575
- package/src/components/__tests__/FileUpload.test.tsx +0 -446
- package/src/components/__tests__/SuperAdminGuard.test.tsx +0 -627
- package/src/components/examples/PermissionExample.tsx +0 -173
- package/src/hooks/__tests__/usePublicEvent.unit.test.ts +0 -583
- package/src/hooks/__tests__/usePublicEventLogo.unit.test.ts +0 -640
- package/src/types/__tests__/file-reference.test.ts +0 -447
- package/src/utils/__tests__/file-reference.test.ts +0 -383
- /package/dist/{DataTable-DKGTBLWT.js.map → DataTable-PWBMKMOG.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-K2IZAY5F.js.map → UnifiedAuthProvider-5D3HEQND.js.map} +0 -0
- /package/dist/{chunk-NTW3KGS4.js.map → chunk-6UHXQH7P.js.map} +0 -0
- /package/dist/{chunk-YVUZWLQG.js.map → chunk-AQGF5OG7.js.map} +0 -0
- /package/dist/{chunk-QCCJ3P4W.js.map → chunk-BNXBJOGL.js.map} +0 -0
- /package/dist/{chunk-S3JKDMD5.js.map → chunk-CXKMRKRF.js.map} +0 -0
- /package/dist/{chunk-RIXPZJUB.js.map → chunk-KTPG5VCH.js.map} +0 -0
- /package/dist/{chunk-V5SWX6KL.js.map → chunk-XXVM53P4.js.map} +0 -0
- /package/dist/{chunk-I2VVV5PQ.js.map → chunk-YY4YYM3E.js.map} +0 -0
- /package/src/providers/{OrganisationProvider.test.simple.tsx → OrganisationProvider.context.test.tsx} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { a as UnifiedAuthContextType, c as UnifiedAuthProvider, b as UnifiedAuthProviderProps, U as UserEventAccess, u as useUnifiedAuth } from './UnifiedAuthProvider-
|
|
2
|
-
import { m as InactivityService, n as EventService, o as OrganisationService, A as AuthService } from './AuthService-
|
|
3
|
-
export { d as EventProvider, k as InactivityProvider, g as OrganisationProvider } from './AuthService-
|
|
1
|
+
export { a as UnifiedAuthContextType, c as UnifiedAuthProvider, b as UnifiedAuthProviderProps, U as UserEventAccess, u as useUnifiedAuth } from './UnifiedAuthProvider-BVKmQd9u.js';
|
|
2
|
+
import { m as InactivityService, n as EventService, o as OrganisationService, A as AuthService } from './AuthService-DcTI5Ov4.js';
|
|
3
|
+
export { d as EventProvider, k as InactivityProvider, g as OrganisationProvider } from './AuthService-DcTI5Ov4.js';
|
|
4
4
|
import { e as OrganisationContextType } from './organisation-D6qRDtbF.js';
|
|
5
5
|
export { O as Organisation, a as OrganisationMembership, f as OrganisationProviderProps, g as OrganisationSecurityError, U as UserProfile } from './organisation-D6qRDtbF.js';
|
|
6
6
|
import { E as Event } from './unified-DQ4VcT7H.js';
|
|
7
|
+
import { S as SessionRestorationState } from './auth-DReDSLq9.js';
|
|
7
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
9
|
export { ALL_PERMISSIONS, AccessLevel, AccessLevelGuard, AllPermissions, CACHE_PATTERNS, DataAccessRecord, EVENT_APP_PERMISSIONS, EnhancedNavigationMenu, EnhancedNavigationMenuProps, EventAppRole, GLOBAL_PERMISSIONS, GlobalRole, InvalidScopeError, LogLevel, MissingUserContextError, NavigationAccessRecord, NavigationContextType, NavigationGuard, NavigationGuardProps, NavigationProvider, NavigationProviderProps, ORGANISATION_PERMISSIONS, Operation, OrganisationContextRequiredError, OrganisationRole, PAGE_PERMISSIONS, PageAccessRecord, PagePermissionContextType, PagePermissionGuard, PagePermissionGuardProps, PagePermissionProvider, PagePermissionProviderProps, Permission, PermissionCheck, PermissionDeniedError, PermissionEnforcer, PermissionEnforcerProps, PermissionGuard, PermissionMap, RBACAuditManager, RBACCache, RBACConfig, RBACEngine, RBACError, RBACLogger, RBACNotInitializedError, RoleBasedRouter, RoleBasedRouterContextType, RoleBasedRouterProps, RouteAccessRecord, RouteConfig, Scope, SecureDataContextType, SecureDataProvider, SecureDataProviderProps, SecureSupabaseClient, UUID, UseResolvedScopeOptions, UseResolvedScopeReturn, createAuditManager, createRBACConfig, createRBACEngine, createRBACExpressMiddleware, createRBACMiddleware, createSecureClient, emitAuditEvent, fromSupabaseClient, getAccessLevel, getGlobalAuditManager, getPermissionMap, getPermissionsForRole, getRBACConfig, getRBACLogger, getRoleContext, hasAllPermissions, hasAnyPermission, hasAnyPermissionCached, hasPermission, hasPermissionCached, isDebugMode, isDevelopmentMode, isPermitted, isPermittedCached, isValidPermission, rbacCache, resolveAppContext, setGlobalAuditManager, setupRBAC, useAccessLevel, useCachedPermissions, useCan, useHasAllPermissions, useHasAnyPermission, useMultiplePermissions, useNavigationPermissions, usePagePermissions, usePermissions, useRBAC, useResolvedScope, useRoleBasedRouter, useSecureData, withAccessLevelGuard, withPermissionGuard, withRoleGuard } from './rbac/index.js';
|
|
9
|
-
|
|
10
|
-
export { A as Alert, m as AlertDescription, l as AlertTitle, n as Avatar, p as AvatarFallback, o as AvatarImage, B as Button, a as ButtonProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, q as Checkbox, b3 as DefaultPublicErrorFallback, D as Dialog, K as DialogBody, G as DialogClose, H as DialogContent, O as DialogDescription, M as DialogFooter, J as DialogHeader, E as DialogOverlay, z as DialogPortal, N as DialogTitle, F as DialogTrigger, az as ErrorBoundary, a_ as EventLogo, a$ as EventLogoCompact, b0 as EventLogoLarge, ba as EventLogoProps, aD as EventSelector, aF as FileDisplay, aG as FileDisplayProps, ar as Footer, as as FooterProps, am as Form, aq as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aC as LoadingSpinner, ao as LoginForm, ap as LoginFormProps, av as NavigationItem, at as NavigationMenu, au as NavigationMenuProps, aw as OrganisationSelector, bf as PaceAppLayout, be as PaceAppLayoutProps, bh as PaceLoginPage, bg as PaceLoginPageProps, aE as PasswordResetForm, P as Progress, b1 as PublicErrorBoundary, bb as PublicErrorBoundaryProps, bc as PublicErrorBoundaryState, b6 as PublicLoadingSkeleton, b4 as PublicLoadingSpinner, b5 as PublicLoadingSpinnerFullPage, bd as PublicLoadingSpinnerProps, aZ as PublicPageContextChecker, aX as PublicPageDebugger, aY as PublicPageDiagnostic, aW as PublicPageFooter, b9 as PublicPageFooterProps, aS as PublicPageHeader, b8 as PublicPageHeaderProps, aQ as PublicPageLayout, b7 as PublicPageLayoutProps, aT as PublicPageProvider, $ as Select, a3 as SelectContent, a0 as SelectGroup, a5 as SelectItem, a4 as SelectLabel, a6 as SelectSeparator, a2 as SelectTrigger, a1 as SelectValue, br as StorageFileInfo, S as Switch, r as SwitchProps, T as Table, t as TableBody, u as TableCaption, v as TableCell, w as TableFooter, x as TableHead, s as TableHeader, y as TableRow, a7 as Toast, a9 as ToastAction, af as ToastActionElement, ae as ToastClose, ad as ToastDescription, ag as ToastProps, aa as ToastProvider, ac as ToastTitle, ab as ToastViewport, a8 as Toaster, ah as Tooltip, aj as TooltipContent, ak as TooltipProvider, al as TooltipRoot, ai as TooltipTrigger, aP as UseFileReferenceForRecordReturn, aN as UseFileReferenceOptions, aO as UseFileReferenceReturn, ay as UserMenu, bq as UserMenuProps, b2 as useErrorBoundary, aL as useFileReference, aM as useFileReferenceForRecord, aI as useFileUpload, aV as useIsPublicPage, aR as usePublicPageContext, aU as usePublicPageProviderContext, aH as useStorage } from './PublicLoadingSpinner-CnUaz0vG.js';
|
|
10
|
+
export { A as Alert, m as AlertDescription, l as AlertTitle, n as Avatar, p as AvatarFallback, o as AvatarImage, B as Button, a as ButtonProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, q as Checkbox, b9 as DefaultPublicErrorFallback, D as Dialog, K as DialogBody, G as DialogClose, H as DialogContent, O as DialogDescription, M as DialogFooter, J as DialogHeader, E as DialogOverlay, z as DialogPortal, N as DialogTitle, F as DialogTrigger, az as ErrorBoundary, b4 as EventLogo, b5 as EventLogoCompact, b6 as EventLogoLarge, bg as EventLogoProps, aE as EventSelector, aI as FileDisplay, aJ as FileDisplayProps, aG as FileUpload, aH as FileUploadProps, ar as Footer, as as FooterProps, am as Form, aq as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aC as LoadingSpinner, ao as LoginForm, ap as LoginFormProps, av as NavigationItem, at as NavigationMenu, au as NavigationMenuProps, aw as OrganisationSelector, bl as PaceAppLayout, bk as PaceAppLayoutProps, bn as PaceLoginPage, bm as PaceLoginPageProps, aF as PasswordResetForm, P as Progress, b7 as PublicErrorBoundary, bh as PublicErrorBoundaryProps, bi as PublicErrorBoundaryState, bc as PublicLoadingSkeleton, ba as PublicLoadingSpinner, bb as PublicLoadingSpinnerFullPage, bj as PublicLoadingSpinnerProps, b3 as PublicPageContextChecker, b1 as PublicPageDebugger, b2 as PublicPageDiagnostic, b0 as PublicPageFooter, bf as PublicPageFooterProps, aY as PublicPageHeader, be as PublicPageHeaderProps, aW as PublicPageLayout, bd as PublicPageLayoutProps, aZ as PublicPageProvider, $ as Select, a3 as SelectContent, a0 as SelectGroup, a5 as SelectItem, a4 as SelectLabel, a6 as SelectSeparator, a2 as SelectTrigger, a1 as SelectValue, aD as SessionRestorationLoader, S as Switch, r as SwitchProps, T as Table, t as TableBody, u as TableCaption, v as TableCell, w as TableFooter, x as TableHead, s as TableHeader, y as TableRow, a7 as Toast, a9 as ToastAction, af as ToastActionElement, ae as ToastClose, ad as ToastDescription, ag as ToastProps, aa as ToastProvider, ac as ToastTitle, ab as ToastViewport, a8 as Toaster, ah as Tooltip, aj as TooltipContent, ak as TooltipProvider, al as TooltipRoot, ai as TooltipTrigger, aV as UseEventLogoOptions, aU as UseEventLogoReturn, aQ as UseFileReferenceForRecordReturn, aO as UseFileReferenceOptions, aP as UseFileReferenceReturn, ay as UserMenu, bo as UserMenuProps, aS as clearEventLogoCache, aT as getEventLogoCacheStats, b8 as useErrorBoundary, aR as useEventLogo, aK as useFileReference, aM as useFileReferenceById, aL as useFileReferenceForRecord, aN as useFilesByCategory, a$ as useIsPublicPage, aX as usePublicPageContext, a_ as usePublicPageProviderContext } from './PublicLoadingSpinner-BQXD1fbO.js';
|
|
11
11
|
export { u as useToast } from './useToast-Bm6TnSK-.js';
|
|
12
12
|
export { D as DataTable, a as DataTableProps } from './DataTable-BE0OXZKQ.js';
|
|
13
13
|
import { D as DataRecord, f as DataTableAction } from './types-BDg1mAGG.js';
|
|
@@ -15,11 +15,11 @@ export { A as AggregateConfig, a as DataTableColumn, g as DataTableToolbarButton
|
|
|
15
15
|
import { ColumnDef } from '@tanstack/react-table';
|
|
16
16
|
export { r as UsePublicEventLogoOptions, q as UsePublicEventLogoReturn, p as UsePublicEventOptions, o as UsePublicEventReturn, s as UsePublicRouteParamsReturn, f as clearPublicEventCache, i as clearPublicLogoCache, n as extractEventCodeFromPath, m as generatePublicRoutePath, g as getPublicEventCacheStats, j as getPublicLogoCacheStats, c as useAppConfig, u as useEventTheme, a as useOrganisationPermissions, b as useOrganisationSecurity, e as usePublicEvent, l as usePublicEventCode, h as usePublicEventLogo, k as usePublicRouteParams } from './usePublicRouteParams-BlgwXweB.js';
|
|
17
17
|
export { a as cn, c as createSecureDataAccess, j as formatCompactNumber, e as formatCurrency, f as formatDate, k as formatFileSize, h as formatNumber, i as formatPercent, g as getAppConfig, d as getCurrentAppId, b as getCurrentAppName, s as setAppConfig } from './formatting-BfDeV-ja.js';
|
|
18
|
-
|
|
18
|
+
export { b as FileCategory, a as FileMetadata, F as FileReference, c as FileUploadOptions } from './file-reference-C9isKNPn.js';
|
|
19
19
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
20
|
-
export { b as FileCategory, a as FileMetadata, F as FileReference, c as FileUploadOptions } from './file-reference-9xUOnwyt.js';
|
|
21
20
|
export { StyleImport, getAllStylePaths, getStylePath, styleConfig } from './styles/index.js';
|
|
22
21
|
export { ColorPalette, ColorShade, PaletteData, applyPalette, clearPalette, generateSSRThemeCSS, getCurrentThemeData, isDynamicThemingActive } from './theming/runtime.js';
|
|
22
|
+
import 'react';
|
|
23
23
|
import './database-BXAfr2Y_.js';
|
|
24
24
|
import '@radix-ui/react-label';
|
|
25
25
|
import '@radix-ui/react-avatar';
|
|
@@ -166,6 +166,25 @@ declare function useOrganisationService(): OrganisationService;
|
|
|
166
166
|
|
|
167
167
|
declare function useAuthService(): AuthService;
|
|
168
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @file useSessionRestoration Hook
|
|
171
|
+
* @package @jmruthers/pace-core
|
|
172
|
+
* @module Hooks
|
|
173
|
+
* @since 0.1.0
|
|
174
|
+
*
|
|
175
|
+
* Provides reactive session restoration state from the AuthService.
|
|
176
|
+
* Handles timeout detection to prevent infinite loading loops when
|
|
177
|
+
* Supabase session hydration from localStorage takes too long.
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
interface UseSessionRestorationResult extends SessionRestorationState {
|
|
181
|
+
/** Indicates whether the restoration process exceeded the timeout window */
|
|
182
|
+
hasTimedOut: boolean;
|
|
183
|
+
/** Timeout duration in milliseconds */
|
|
184
|
+
timeoutMs: number;
|
|
185
|
+
}
|
|
186
|
+
declare function useSessionRestoration(): UseSessionRestorationResult;
|
|
187
|
+
|
|
169
188
|
/**
|
|
170
189
|
* @file Inactivity Warning Modal
|
|
171
190
|
* @package @jmruthers/pace-core
|
|
@@ -521,24 +540,87 @@ interface PasswordChangeFormProps {
|
|
|
521
540
|
}
|
|
522
541
|
declare function PasswordChangeForm({ onSubmit, className }: PasswordChangeFormProps): react_jsx_runtime.JSX.Element;
|
|
523
542
|
|
|
524
|
-
|
|
525
|
-
|
|
543
|
+
/**
|
|
544
|
+
* Storage utility types for pace-core
|
|
545
|
+
*/
|
|
546
|
+
interface StorageUploadOptions {
|
|
547
|
+
/** The app name from rbac_apps */
|
|
526
548
|
appName: string;
|
|
549
|
+
/** Organisation ID for scoping */
|
|
527
550
|
orgId: string;
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
551
|
+
/** Whether the file should be publicly accessible */
|
|
552
|
+
isPublic?: boolean;
|
|
553
|
+
/** Optional tags for categorisation */
|
|
554
|
+
tags?: string[];
|
|
555
|
+
/** Optional custom path within the app/org structure */
|
|
556
|
+
customPath?: string;
|
|
557
|
+
/** Optional metadata to store with the file */
|
|
558
|
+
metadata?: Record<string, any>;
|
|
559
|
+
}
|
|
560
|
+
interface StorageFileMetadata {
|
|
561
|
+
mimeType: string;
|
|
562
|
+
size: number;
|
|
563
|
+
width?: number;
|
|
564
|
+
height?: number;
|
|
565
|
+
hash?: string;
|
|
566
|
+
orgId: string;
|
|
567
|
+
appName: string;
|
|
568
|
+
uploadedBy: string;
|
|
569
|
+
uploadedAt: string;
|
|
570
|
+
tags?: string[];
|
|
571
|
+
isPublic: boolean;
|
|
572
|
+
customMetadata?: Record<string, any>;
|
|
573
|
+
}
|
|
574
|
+
interface StorageUploadResult {
|
|
575
|
+
success: boolean;
|
|
576
|
+
path?: string;
|
|
577
|
+
publicUrl?: string;
|
|
578
|
+
metadata?: StorageFileMetadata;
|
|
579
|
+
error?: string;
|
|
580
|
+
}
|
|
581
|
+
interface StorageUrlOptions {
|
|
582
|
+
/** The app name from rbac_apps */
|
|
583
|
+
appName: string;
|
|
584
|
+
/** Organisation ID for scoping */
|
|
585
|
+
orgId: string;
|
|
586
|
+
/** Expiry time in seconds for signed URLs (default: 3600) */
|
|
587
|
+
expiresIn?: number;
|
|
588
|
+
}
|
|
589
|
+
interface StorageListOptions {
|
|
590
|
+
/** The app name from rbac_apps */
|
|
591
|
+
appName: string;
|
|
592
|
+
/** Organisation ID for scoping */
|
|
593
|
+
orgId: string;
|
|
594
|
+
/** Optional path prefix to filter by */
|
|
595
|
+
pathPrefix?: string;
|
|
596
|
+
/** Optional tags to filter by */
|
|
597
|
+
tags?: string[];
|
|
598
|
+
/** Maximum number of files to return */
|
|
599
|
+
limit?: number;
|
|
600
|
+
/** Offset for pagination */
|
|
601
|
+
offset?: number;
|
|
602
|
+
}
|
|
603
|
+
interface StorageFileInfo {
|
|
604
|
+
name: string;
|
|
605
|
+
path: string;
|
|
606
|
+
size: number;
|
|
607
|
+
mimeType: string;
|
|
608
|
+
lastModified: string;
|
|
609
|
+
metadata: StorageFileMetadata;
|
|
610
|
+
}
|
|
611
|
+
interface StorageListResult {
|
|
612
|
+
files: StorageFileInfo[];
|
|
613
|
+
totalCount: number;
|
|
614
|
+
hasMore: boolean;
|
|
615
|
+
}
|
|
616
|
+
interface FileSizeLimits {
|
|
617
|
+
[mimeType: string]: number;
|
|
618
|
+
}
|
|
619
|
+
interface StorageConfig {
|
|
620
|
+
bucketName: string;
|
|
621
|
+
fileSizeLimits: FileSizeLimits;
|
|
622
|
+
defaultFileSizeLimit: number;
|
|
540
623
|
}
|
|
541
|
-
declare function FileUpload({ supabase, appName, orgId, onUploadComplete, onUploadStart, accept, maxSize, multiple, disabled, className, children }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
542
624
|
|
|
543
625
|
/**
|
|
544
626
|
* Storage configuration for pace-core
|
|
@@ -565,6 +647,12 @@ declare const STORAGE_CONFIG: StorageConfig;
|
|
|
565
647
|
* Get the file size limit for a given MIME type
|
|
566
648
|
*/
|
|
567
649
|
declare function getFileSizeLimit(mimeType: string): number;
|
|
650
|
+
/**
|
|
651
|
+
* Get the bucket name based on whether the file is public or private
|
|
652
|
+
* @param isPublic - Whether the file should be publicly accessible
|
|
653
|
+
* @returns The bucket name: 'public-files' for public files, 'files' for private files
|
|
654
|
+
*/
|
|
655
|
+
declare function getBucketName(isPublic: boolean): 'files' | 'public-files';
|
|
568
656
|
/**
|
|
569
657
|
* Validate file size against limits
|
|
570
658
|
*/
|
|
@@ -595,10 +683,19 @@ declare function extractFileMetadata(file: File, options: StorageUploadOptions,
|
|
|
595
683
|
declare function uploadFile(supabase: SupabaseClient, file: File, options: StorageUploadOptions): Promise<StorageUploadResult>;
|
|
596
684
|
/**
|
|
597
685
|
* Get a public URL for a file
|
|
686
|
+
* @param supabase - Supabase client instance
|
|
687
|
+
* @param path - File path within the bucket
|
|
688
|
+
* @param isPublic - Whether the file is in the public-files bucket (default: true)
|
|
689
|
+
* @returns Public URL for the file
|
|
598
690
|
*/
|
|
599
|
-
declare function getPublicUrl(supabase: SupabaseClient, path: string): string;
|
|
691
|
+
declare function getPublicUrl(supabase: SupabaseClient, path: string, isPublic?: boolean): string;
|
|
600
692
|
/**
|
|
601
693
|
* Get a signed URL for a protected file
|
|
694
|
+
* Private files are always in the 'files' bucket, so this always uses 'files' bucket
|
|
695
|
+
* @param supabase - Supabase client instance
|
|
696
|
+
* @param path - File path within the bucket
|
|
697
|
+
* @param options - URL options including expiry time
|
|
698
|
+
* @returns Signed URL with expiration timestamp, or null if failed
|
|
602
699
|
*/
|
|
603
700
|
declare function getSignedUrl(supabase: SupabaseClient, path: string, options: StorageUrlOptions): Promise<{
|
|
604
701
|
url: string;
|
|
@@ -606,21 +703,49 @@ declare function getSignedUrl(supabase: SupabaseClient, path: string, options: S
|
|
|
606
703
|
} | null>;
|
|
607
704
|
/**
|
|
608
705
|
* Delete a file from storage
|
|
706
|
+
* @param supabase - Supabase client instance
|
|
707
|
+
* @param path - File path within the bucket
|
|
708
|
+
* @param isPublic - Whether the file is in the public-files bucket (default: false)
|
|
709
|
+
* @returns Success status and optional error message
|
|
609
710
|
*/
|
|
610
|
-
declare function deleteFile(supabase: SupabaseClient, path: string): Promise<{
|
|
711
|
+
declare function deleteFile(supabase: SupabaseClient, path: string, isPublic?: boolean): Promise<{
|
|
611
712
|
success: boolean;
|
|
612
713
|
error?: string;
|
|
613
714
|
}>;
|
|
614
715
|
/**
|
|
615
716
|
* List files in an organization scope
|
|
717
|
+
* @param supabase - Supabase client instance
|
|
718
|
+
* @param options - List options including bucket selection via isPublic
|
|
719
|
+
* @returns List of files with metadata
|
|
616
720
|
*/
|
|
617
|
-
declare function listFiles(supabase: SupabaseClient, options: StorageListOptions
|
|
721
|
+
declare function listFiles(supabase: SupabaseClient, options: StorageListOptions & {
|
|
722
|
+
isPublic?: boolean;
|
|
723
|
+
}): Promise<StorageListResult>;
|
|
724
|
+
/**
|
|
725
|
+
* Download a file from storage
|
|
726
|
+
* @param supabase - Supabase client instance
|
|
727
|
+
* @param path - File path within the bucket
|
|
728
|
+
* @param isPublic - Whether the file is in the public-files bucket (default: false)
|
|
729
|
+
* @returns File blob with metadata, or null if failed
|
|
730
|
+
*/
|
|
731
|
+
declare function downloadFile(supabase: SupabaseClient, path: string, isPublic?: boolean): Promise<{
|
|
732
|
+
blob: Blob;
|
|
733
|
+
metadata: {
|
|
734
|
+
name: string;
|
|
735
|
+
size: number;
|
|
736
|
+
type: string;
|
|
737
|
+
};
|
|
738
|
+
} | null>;
|
|
618
739
|
/**
|
|
619
740
|
* Move a file to archived location (soft delete)
|
|
741
|
+
* @param supabase - Supabase client instance
|
|
742
|
+
* @param path - File path within the bucket
|
|
743
|
+
* @param options - Archive options including bucket selection via isPublic
|
|
620
744
|
*/
|
|
621
745
|
declare function archiveFile(supabase: SupabaseClient, path: string, options: {
|
|
622
746
|
appName: string;
|
|
623
747
|
orgId: string;
|
|
748
|
+
isPublic?: boolean;
|
|
624
749
|
}): Promise<{
|
|
625
750
|
success: boolean;
|
|
626
751
|
error?: string;
|
|
@@ -643,8 +768,9 @@ declare class StorageUtils {
|
|
|
643
768
|
static getPublicUrl: typeof getPublicUrl;
|
|
644
769
|
static getSignedUrl: typeof getSignedUrl;
|
|
645
770
|
static deleteFile: typeof deleteFile;
|
|
771
|
+
static downloadFile: typeof downloadFile;
|
|
646
772
|
static listFiles: typeof listFiles;
|
|
647
773
|
static archiveFile: typeof archiveFile;
|
|
648
774
|
}
|
|
649
775
|
|
|
650
|
-
export { APP_PATH_MAPPING, ColumnFactory, DEFAULT_FILE_SIZE_LIMIT, DataRecord, DataTableAction, FILE_SIZE_LIMITS,
|
|
776
|
+
export { APP_PATH_MAPPING, ColumnFactory, DEFAULT_FILE_SIZE_LIMIT, DataRecord, DataTableAction, FILE_SIZE_LIMITS, type FileSizeLimits, InactivityWarningModal, type InactivityWarningModalProps, OrganisationContextType, PasswordChangeForm, STORAGE_CONFIG, type StorageConfig, type StorageFileInfo, type StorageFileMetadata, type StorageListOptions, type StorageListResult, type StorageUploadOptions, type StorageUploadResult, type StorageUrlOptions, StorageUtils, type UseInactivityTrackerOptions, type UseInactivityTrackerReturn, archiveFile, deleteFile, downloadFile, extractFileMetadata, generateFilePath, generateUniqueFileName, getBucketName, getFileSizeLimit, getPublicUrl, getSignedUrl, listFiles, uploadFile, useAuthService, useEventService, useEvents, useInactivityService, useInactivityTracker, useOrganisationService, useOrganisations, useSessionRestoration, validateFileSize };
|