@jmruthers/pace-core 0.5.121 → 0.5.123
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-D4646R4b.d.ts → AuthService-DYuQPJj6.d.ts} +0 -9
- package/dist/{DataTable-DGZDJUYM.js → DataTable-WTS4IRF2.js} +7 -8
- package/dist/{PublicLoadingSpinner-DgDWTFqn.d.ts → PublicLoadingSpinner-CaoRbHvJ.d.ts} +30 -4
- package/dist/{UnifiedAuthProvider-UACKFATV.js → UnifiedAuthProvider-6C47WIML.js} +3 -4
- package/dist/{chunk-D6BOFXYR.js → chunk-35ZDPMBM.js} +3 -3
- package/dist/{chunk-CGURJ27Z.js → chunk-4MXVZVNS.js} +2 -2
- package/dist/{chunk-ZYJ6O5CA.js → chunk-C43QIDN3.js} +2 -2
- package/dist/{chunk-VKOCWWVY.js → chunk-CX5M4ZAG.js} +1 -6
- package/dist/{chunk-VKOCWWVY.js 3.map → chunk-CX5M4ZAG.js.map} +1 -1
- package/dist/{chunk-HFBOFZ3Z.js → chunk-DHMFMXFV.js} +258 -243
- package/dist/chunk-DHMFMXFV.js.map +1 -0
- package/dist/{chunk-RIEJGKD3.js → chunk-ESJTIADP.js} +15 -6
- package/dist/{chunk-RIEJGKD3.js.map → chunk-ESJTIADP.js.map} +1 -1
- package/dist/{chunk-SMJZMKYN.js → chunk-GEVIB2UB.js} +43 -10
- package/dist/chunk-GEVIB2UB.js.map +1 -0
- package/dist/{chunk-TDNI6ZWL.js → chunk-IJOZZOGT.js} +7 -7
- package/dist/chunk-IJOZZOGT.js.map +1 -0
- package/dist/{chunk-GZRXOUBE.js → chunk-M6DDYFUD.js} +2 -2
- package/dist/chunk-M6DDYFUD.js.map +1 -0
- package/dist/{chunk-B4GZ2BXO.js → chunk-NZGLXZGP.js} +3 -3
- package/dist/{chunk-NZ32EONV.js → chunk-QWNJCQXZ.js} +2 -2
- package/dist/{chunk-FKFHZUGF.js → chunk-XN6GWKMV.js} +43 -56
- package/dist/chunk-XN6GWKMV.js.map +1 -0
- package/dist/{chunk-BHWIUEYH.js → chunk-ZBLK676C.js} +1 -61
- package/dist/chunk-ZBLK676C.js.map +1 -0
- package/dist/{chunk-QPI2CCBA.js → chunk-ZPJMYGEP.js} +149 -96
- package/dist/chunk-ZPJMYGEP.js.map +1 -0
- package/dist/components.d.ts +1 -1
- package/dist/components.js +11 -11
- package/dist/{formatting-B1jSqgl-.d.ts → formatting-DFcCxUEk.d.ts} +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +9 -8
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +19 -17
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +2 -3
- package/dist/rbac/index.js +7 -8
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.js +5 -3
- package/dist/theming/runtime.d.ts +73 -1
- package/dist/theming/runtime.js +5 -5
- package/dist/{usePublicRouteParams-BdF8bZgs.d.ts → usePublicRouteParams-Dyt1tzI9.d.ts} +60 -8
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +5 -5
- 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 +6 -6
- 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 +6 -6
- 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/EventAppRoleData.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/GrantEventAppRoleParams.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 +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +7 -7
- package/docs/api/interfaces/PublicErrorBoundaryState.md +5 -5
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +7 -7
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +51 -12
- package/docs/api/interfaces/PublicPageLayoutProps.md +72 -12
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RoleManagementResult.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/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayReturn.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 +140 -30
- package/docs/best-practices/README.md +1 -1
- package/docs/implementation-guides/datatable-filtering.md +313 -0
- package/docs/implementation-guides/datatable-rbac-usage.md +317 -0
- package/docs/implementation-guides/hierarchical-datatable.md +850 -0
- package/docs/implementation-guides/large-datasets.md +281 -0
- package/docs/implementation-guides/performance.md +403 -0
- package/docs/implementation-guides/public-pages.md +4 -4
- package/docs/migration/quick-migration-guide.md +320 -0
- package/docs/rbac/quick-start.md +16 -16
- package/docs/troubleshooting/README.md +4 -4
- package/docs/troubleshooting/cake-page-permission-guard-issue-summary.md +1 -1
- package/docs/troubleshooting/debugging.md +1117 -0
- package/docs/troubleshooting/migration.md +918 -0
- package/examples/public-pages/CorrectPublicPageImplementation.tsx +30 -30
- package/examples/public-pages/PublicEventPage.tsx +41 -41
- package/examples/public-pages/PublicPageApp.tsx +33 -33
- package/examples/public-pages/PublicPageUsageExample.tsx +30 -30
- package/package.json +4 -4
- package/src/__tests__/hooks/usePermissions.test.ts +265 -0
- package/src/components/DataTable/DataTable.test.tsx +9 -38
- package/src/components/DataTable/DataTable.tsx +0 -7
- package/src/components/DataTable/components/DataTableCore.tsx +66 -136
- package/src/components/DataTable/components/DataTableModals.tsx +25 -22
- package/src/components/DataTable/components/EditableRow.tsx +118 -42
- package/src/components/DataTable/components/UnifiedTableBody.tsx +129 -76
- package/src/components/DataTable/components/__tests__/DataTableModals.test.tsx +33 -14
- package/src/components/DataTable/utils/__tests__/exportUtils.test.ts +17 -5
- package/src/components/DataTable/utils/exportUtils.ts +3 -2
- package/src/components/Dialog/Dialog.tsx +1 -1
- package/src/components/Dialog/README.md +24 -24
- package/src/components/Dialog/examples/BasicHtmlTest.tsx +2 -2
- package/src/components/Dialog/examples/DebugHtmlExample.tsx +6 -6
- package/src/components/Dialog/examples/HtmlDialogExample.tsx +2 -2
- package/src/components/Dialog/examples/SimpleHtmlTest.tsx +3 -3
- package/src/components/Dialog/examples/__tests__/SimpleHtmlTest.test.tsx +4 -4
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +12 -1
- package/src/components/PublicLayout/EventLogo.tsx +175 -0
- package/src/components/PublicLayout/PublicErrorBoundary.tsx +22 -18
- package/src/components/PublicLayout/PublicLoadingSpinner.tsx +22 -14
- package/src/components/PublicLayout/PublicPageHeader.tsx +133 -40
- package/src/components/PublicLayout/PublicPageLayout.tsx +75 -72
- package/src/components/PublicLayout/__tests__/PublicErrorBoundary.test.tsx +1 -1
- package/src/components/PublicLayout/__tests__/PublicLoadingSpinner.test.tsx +8 -8
- package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +23 -16
- package/src/components/PublicLayout/__tests__/PublicPageLayout.test.tsx +86 -14
- package/src/examples/CorrectPublicPageImplementation.tsx +30 -30
- package/src/examples/PublicEventPage.tsx +41 -41
- package/src/examples/PublicPageApp.tsx +33 -33
- package/src/examples/PublicPageUsageExample.tsx +30 -30
- package/src/hooks/__tests__/usePublicEvent.unit.test.ts +583 -0
- package/src/hooks/__tests__/usePublicRouteParams.unit.test.ts +10 -3
- package/src/hooks/index.ts +1 -1
- package/src/hooks/public/usePublicEventLogo.ts +285 -0
- package/src/hooks/public/usePublicRouteParams.ts +21 -4
- package/src/hooks/useEventTheme.test.ts +119 -43
- package/src/hooks/useEventTheme.ts +84 -55
- package/src/index.ts +3 -1
- package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +630 -0
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +667 -0
- package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +647 -0
- package/src/rbac/components/__tests__/SecureDataProvider.fixed.test.tsx +496 -0
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +496 -0
- package/src/rbac/secureClient.ts +4 -2
- package/src/services/EventService.ts +0 -66
- package/src/services/__tests__/EventService.eventColours.test.ts +44 -40
- package/src/styles/index.ts +1 -1
- package/src/theming/__tests__/parseEventColours.test.ts +209 -0
- package/src/theming/parseEventColours.ts +123 -0
- package/src/theming/runtime.ts +3 -0
- package/src/types/__tests__/file-reference.test.ts +447 -0
- package/src/utils/formatDate.test.ts +11 -11
- package/src/utils/formatting.ts +3 -2
- package/dist/chunk-BDZUMRBD.js 3.map +0 -1
- package/dist/chunk-BHWIUEYH.js.map +0 -1
- package/dist/chunk-CGURJ27Z.js.map +0 -1
- package/dist/chunk-FKFHZUGF.js.map +0 -1
- package/dist/chunk-GKHF54DI 2.js +0 -619
- package/dist/chunk-GKHF54DI.js 2.map +0 -1
- package/dist/chunk-GZRXOUBE.js.map +0 -1
- package/dist/chunk-HFBOFZ3Z.js.map +0 -1
- package/dist/chunk-NZ32EONV.js.map +0 -1
- package/dist/chunk-O3NWNXDY 2.js +0 -76
- package/dist/chunk-QPI2CCBA.js.map +0 -1
- package/dist/chunk-SMJZMKYN.js.map +0 -1
- package/dist/chunk-TDNI6ZWL.js 2.map +0 -1
- package/dist/chunk-TDNI6ZWL.js.map +0 -1
- package/dist/chunk-VKOCWWVY.js.map +0 -1
- package/dist/chunk-WP5I5GLN 2.js +0 -1564
- package/dist/index 3.js +0 -856
- package/dist/providers 3.js +0 -38
- package/dist/providers.js 3.map +0 -1
- package/dist/types 3.js +0 -128
- package/dist/types.js 3.map +0 -1
- package/dist/useInactivityTracker-MRUU55XI.js 3.map +0 -1
- package/dist/utils.js 3.map +0 -1
- package/dist/validation 3.js +0 -479
- package/src/styles/semantic.css +0 -24
- /package/dist/{DataTable-DGZDJUYM.js.map → DataTable-WTS4IRF2.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-UACKFATV.js.map → UnifiedAuthProvider-6C47WIML.js.map} +0 -0
- /package/dist/{chunk-D6BOFXYR.js.map → chunk-35ZDPMBM.js.map} +0 -0
- /package/dist/{chunk-CGURJ27Z.js 2.map → chunk-4MXVZVNS.js.map} +0 -0
- /package/dist/{chunk-ZYJ6O5CA.js.map → chunk-C43QIDN3.js.map} +0 -0
- /package/dist/{chunk-B4GZ2BXO.js.map → chunk-NZGLXZGP.js.map} +0 -0
- /package/dist/{chunk-NZ32EONV.js 2.map → chunk-QWNJCQXZ.js.map} +0 -0
|
@@ -25,13 +25,13 @@ import {
|
|
|
25
25
|
SelectSeparator,
|
|
26
26
|
SelectTrigger,
|
|
27
27
|
SelectValue
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-DHMFMXFV.js";
|
|
29
29
|
import {
|
|
30
30
|
useCan,
|
|
31
31
|
usePermissions,
|
|
32
32
|
useRBAC,
|
|
33
33
|
useResolvedScope
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-35ZDPMBM.js";
|
|
35
35
|
import {
|
|
36
36
|
isSuperAdmin
|
|
37
37
|
} from "./chunk-WP5I5GLN.js";
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
useIsPublicPage,
|
|
51
51
|
usePublicFileDisplay,
|
|
52
52
|
usePublicPageContext
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-XN6GWKMV.js";
|
|
54
54
|
import {
|
|
55
55
|
useToast
|
|
56
56
|
} from "./chunk-GKHF54DI.js";
|
|
@@ -58,11 +58,11 @@ import {
|
|
|
58
58
|
init_useOrganisations,
|
|
59
59
|
useEvents,
|
|
60
60
|
useOrganisations
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-4MXVZVNS.js";
|
|
62
62
|
import {
|
|
63
63
|
UnifiedAuthProvider_exports,
|
|
64
64
|
init_UnifiedAuthProvider as init_UnifiedAuthProvider2
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-C43QIDN3.js";
|
|
66
66
|
import {
|
|
67
67
|
EventServiceContext,
|
|
68
68
|
EventServiceProvider,
|
|
@@ -72,13 +72,10 @@ import {
|
|
|
72
72
|
useEventService,
|
|
73
73
|
useSessionRestoration,
|
|
74
74
|
useUnifiedAuth
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-ZBLK676C.js";
|
|
76
76
|
import {
|
|
77
77
|
LoadingSpinner
|
|
78
78
|
} from "./chunk-CDQ3PX7L.js";
|
|
79
|
-
import {
|
|
80
|
-
cn
|
|
81
|
-
} from "./chunk-PYUXFQJ3.js";
|
|
82
79
|
import {
|
|
83
80
|
getCurrentAppName
|
|
84
81
|
} from "./chunk-JCQZ6LA7.js";
|
|
@@ -86,9 +83,11 @@ import {
|
|
|
86
83
|
performanceBudgetMonitor
|
|
87
84
|
} from "./chunk-O3NWNXDY.js";
|
|
88
85
|
import {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
cn
|
|
87
|
+
} from "./chunk-PYUXFQJ3.js";
|
|
88
|
+
import {
|
|
89
|
+
clearPalette
|
|
90
|
+
} from "./chunk-GEVIB2UB.js";
|
|
92
91
|
import {
|
|
93
92
|
__esm,
|
|
94
93
|
__export,
|
|
@@ -1670,7 +1669,7 @@ function PaceAppLayout({
|
|
|
1670
1669
|
}
|
|
1671
1670
|
}
|
|
1672
1671
|
if (hasAccess && currentRoute.roles && currentRoute.roles.length > 0 && user?.id) {
|
|
1673
|
-
const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-
|
|
1672
|
+
const { useUnifiedAuth: useUnifiedAuth2 } = await import("./UnifiedAuthProvider-6C47WIML.js");
|
|
1674
1673
|
hasAccess = true;
|
|
1675
1674
|
}
|
|
1676
1675
|
if (!isMounted) return;
|
|
@@ -1744,7 +1743,20 @@ function PaceAppLayout({
|
|
|
1744
1743
|
return /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsxs10("div", { className: "text-center", children: [
|
|
1745
1744
|
/* @__PURE__ */ jsx14("h2", { className: "text-xl font-semibold text-acc-600 mb-2", children: "Access Denied" }),
|
|
1746
1745
|
/* @__PURE__ */ jsx14("p", { className: "text-sec-600 mb-4", children: "You don't have permission to access this page." }),
|
|
1747
|
-
/* @__PURE__ */
|
|
1746
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex gap-2 justify-center", children: [
|
|
1747
|
+
/* @__PURE__ */ jsx14(Button, { onClick: () => navigate("/"), children: "Go Home" }),
|
|
1748
|
+
/* @__PURE__ */ jsx14(
|
|
1749
|
+
Button,
|
|
1750
|
+
{
|
|
1751
|
+
variant: "outline",
|
|
1752
|
+
onClick: async () => {
|
|
1753
|
+
await handleSignOut();
|
|
1754
|
+
navigate("/login");
|
|
1755
|
+
},
|
|
1756
|
+
children: "Sign out"
|
|
1757
|
+
}
|
|
1758
|
+
)
|
|
1759
|
+
] })
|
|
1748
1760
|
] }) });
|
|
1749
1761
|
}
|
|
1750
1762
|
return /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
@@ -1780,7 +1792,6 @@ function PaceAppLayout({
|
|
|
1780
1792
|
// src/components/PaceLoginPage/PaceLoginPage.tsx
|
|
1781
1793
|
import { useEffect as useEffect4, useState as useState6, useContext } from "react";
|
|
1782
1794
|
import { useNavigate as useNavigate2, useLocation as useLocation2 } from "react-router-dom";
|
|
1783
|
-
init_runtime();
|
|
1784
1795
|
init_EventServiceProvider();
|
|
1785
1796
|
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1786
1797
|
var PaceLoginPage = ({
|
|
@@ -3935,6 +3946,7 @@ var TableCaption = React19.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3935
3946
|
TableCaption.displayName = "TableCaption";
|
|
3936
3947
|
|
|
3937
3948
|
// src/components/PublicLayout/PublicPageHeader.tsx
|
|
3949
|
+
import { Link as Link2 } from "react-router-dom";
|
|
3938
3950
|
import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3939
3951
|
function PublicPageHeader({
|
|
3940
3952
|
event,
|
|
@@ -3946,21 +3958,62 @@ function PublicPageHeader({
|
|
|
3946
3958
|
className = "",
|
|
3947
3959
|
children,
|
|
3948
3960
|
customAppLogo,
|
|
3949
|
-
customEventLogo
|
|
3961
|
+
customEventLogo,
|
|
3962
|
+
logoUrl,
|
|
3963
|
+
logoAlt,
|
|
3964
|
+
logoHref
|
|
3950
3965
|
}) {
|
|
3951
3966
|
const { appName } = useAppConfig();
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3967
|
+
return /* @__PURE__ */ jsxs19("header", { className: cn(
|
|
3968
|
+
" px-4 w-[min(var(--app-width),100%)] mx-auto bg-background border-b border-sec-200 grid grid-cols-[auto_1fr_auto] place-items-center gap-2",
|
|
3969
|
+
className
|
|
3970
|
+
), children: [
|
|
3971
|
+
showAppLogo && /* @__PURE__ */ jsx24(Fragment7, { children: customAppLogo ? logoHref ? /* @__PURE__ */ jsx24(Link2, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: customAppLogo }) : customAppLogo : logoUrl ? logoHref ? /* @__PURE__ */ jsx24(Link2, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: /* @__PURE__ */ jsx24(
|
|
3972
|
+
"img",
|
|
3973
|
+
{
|
|
3974
|
+
className: "max-w-36 object-contain row-span-2",
|
|
3975
|
+
src: logoUrl,
|
|
3976
|
+
alt: logoAlt || appName
|
|
3977
|
+
}
|
|
3978
|
+
) }) : /* @__PURE__ */ jsx24(
|
|
3979
|
+
"img",
|
|
3980
|
+
{
|
|
3981
|
+
className: "max-w-36 object-contain row-span-2",
|
|
3982
|
+
src: logoUrl,
|
|
3983
|
+
alt: logoAlt || appName
|
|
3984
|
+
}
|
|
3985
|
+
) : appName ? logoHref ? /* @__PURE__ */ jsx24(Link2, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: /* @__PURE__ */ jsx24(
|
|
3986
|
+
"img",
|
|
3987
|
+
{
|
|
3988
|
+
className: "max-w-36 object-contain row-span-2",
|
|
3989
|
+
src: `/${appName.toLowerCase()}_logo_wide.svg`,
|
|
3990
|
+
alt: logoAlt || appName
|
|
3991
|
+
}
|
|
3992
|
+
) }) : /* @__PURE__ */ jsx24(
|
|
3993
|
+
"img",
|
|
3994
|
+
{
|
|
3995
|
+
className: "max-w-36 object-contain row-span-2",
|
|
3996
|
+
src: `/${appName.toLowerCase()}_logo_wide.svg`,
|
|
3997
|
+
alt: logoAlt || appName
|
|
3998
|
+
}
|
|
3999
|
+
) : logoHref ? /* @__PURE__ */ jsx24(Link2, { to: logoHref, className: "cursor-pointer hover:opacity-80 transition-opacity", children: /* @__PURE__ */ jsx24(
|
|
4000
|
+
"img",
|
|
4001
|
+
{
|
|
4002
|
+
src: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='%23000'/%3E%3Ctext x='16' y='20' text-anchor='middle' fill='white' font-family='Arial' font-size='14' font-weight='bold'%3EL%3C/text%3E%3C/svg%3E",
|
|
4003
|
+
alt: logoAlt || "Logo",
|
|
4004
|
+
className: "max-w-36 object-contain row-span-2"
|
|
4005
|
+
}
|
|
4006
|
+
) }) : /* @__PURE__ */ jsx24(
|
|
4007
|
+
"img",
|
|
4008
|
+
{
|
|
4009
|
+
src: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' fill='%23000'/%3E%3Ctext x='16' y='20' text-anchor='middle' fill='white' font-family='Arial' font-size='14' font-weight='bold'%3EL%3C/text%3E%3C/svg%3E",
|
|
4010
|
+
alt: logoAlt || "Logo",
|
|
4011
|
+
className: "max-w-36 object-contain row-span-2"
|
|
4012
|
+
}
|
|
4013
|
+
) }),
|
|
4014
|
+
event && /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
4015
|
+
/* @__PURE__ */ jsx24("h1", { children: event.event_name }),
|
|
4016
|
+
showEventLogo && event && /* @__PURE__ */ jsx24(Fragment7, { children: customEventLogo || /* @__PURE__ */ jsx24(
|
|
3964
4017
|
FileDisplay,
|
|
3965
4018
|
{
|
|
3966
4019
|
table_name: "event",
|
|
@@ -3970,26 +4023,21 @@ function PublicPageHeader({
|
|
|
3970
4023
|
displayOnly: true,
|
|
3971
4024
|
showFallback: true,
|
|
3972
4025
|
fallbackSize: "md",
|
|
3973
|
-
className: "
|
|
4026
|
+
className: "max-w-36 row-span-2",
|
|
3974
4027
|
generateFallbackText: (fileName) => {
|
|
3975
4028
|
if (!event.event_name) return "EV";
|
|
3976
4029
|
return event.event_name.split(/[\s\-_]+/).map((word) => word.charAt(0).toUpperCase()).join("").substring(0, 3);
|
|
3977
4030
|
}
|
|
3978
4031
|
}
|
|
3979
|
-
) })
|
|
4032
|
+
) }),
|
|
4033
|
+
event.event_venue && /* @__PURE__ */ jsx24("h4", { children: event.event_venue })
|
|
3980
4034
|
] }),
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
/* @__PURE__ */ jsx24("h2", { className: "text-2xl font-semibold text-gray-800 mb-2", children: title }),
|
|
3988
|
-
description && /* @__PURE__ */ jsx24("p", { className: "text-lg text-gray-600 max-w-3xl mx-auto", children: description })
|
|
3989
|
-
] }),
|
|
3990
|
-
children && /* @__PURE__ */ jsx24("div", { className: "mt-4", children })
|
|
3991
|
-
] }) })
|
|
3992
|
-
] }) });
|
|
4035
|
+
title && /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
4036
|
+
/* @__PURE__ */ jsx24("h1", { children: title }),
|
|
4037
|
+
description && /* @__PURE__ */ jsx24("p", { className: "text-lg text-sec-600 max-w-3xl mx-auto", children: description })
|
|
4038
|
+
] }),
|
|
4039
|
+
children && /* @__PURE__ */ jsx24(Fragment7, { children })
|
|
4040
|
+
] });
|
|
3993
4041
|
}
|
|
3994
4042
|
|
|
3995
4043
|
// src/components/PublicLayout/PublicPageFooter.tsx
|
|
@@ -4031,7 +4079,7 @@ function PublicLoadingSpinner({
|
|
|
4031
4079
|
}) {
|
|
4032
4080
|
const sizeClass = sizeClasses[size];
|
|
4033
4081
|
const displayMessage = customMessage || message;
|
|
4034
|
-
const content = /* @__PURE__ */ jsxs21("div", { className:
|
|
4082
|
+
const content = /* @__PURE__ */ jsxs21("div", { className: cn("flex flex-col items-center", className), children: [
|
|
4035
4083
|
showLogo && /* @__PURE__ */ jsx26("div", { className: "mb-4", children: /* @__PURE__ */ jsx26(
|
|
4036
4084
|
"img",
|
|
4037
4085
|
{
|
|
@@ -4044,17 +4092,20 @@ function PublicLoadingSpinner({
|
|
|
4044
4092
|
/* @__PURE__ */ jsx26(
|
|
4045
4093
|
"div",
|
|
4046
4094
|
{
|
|
4047
|
-
className:
|
|
4095
|
+
className: cn(
|
|
4096
|
+
sizeClass,
|
|
4097
|
+
"border-2 border-sec-200 border-t-main-600 rounded-full animate-spin"
|
|
4098
|
+
),
|
|
4048
4099
|
role: "status",
|
|
4049
4100
|
"aria-label": "Loading"
|
|
4050
4101
|
}
|
|
4051
4102
|
),
|
|
4052
4103
|
/* @__PURE__ */ jsx26("span", { className: "sr-only", children: displayMessage })
|
|
4053
4104
|
] }),
|
|
4054
|
-
displayMessage && /* @__PURE__ */ jsx26("p", { className: "mt-4 text-sm text-
|
|
4105
|
+
displayMessage && /* @__PURE__ */ jsx26("p", { className: "mt-4 text-sm text-sec-600 text-center", children: displayMessage })
|
|
4055
4106
|
] });
|
|
4056
4107
|
if (centered) {
|
|
4057
|
-
return /* @__PURE__ */ jsx26("div", { className: "min-h-screen bg-
|
|
4108
|
+
return /* @__PURE__ */ jsx26("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ jsx26("div", { className: "max-w-md mx-auto px-4", children: content }) });
|
|
4058
4109
|
}
|
|
4059
4110
|
return content;
|
|
4060
4111
|
}
|
|
@@ -4063,7 +4114,10 @@ function PublicLoadingSpinnerFullPage({
|
|
|
4063
4114
|
eventName,
|
|
4064
4115
|
className = ""
|
|
4065
4116
|
}) {
|
|
4066
|
-
return /* @__PURE__ */ jsx26("div", { className:
|
|
4117
|
+
return /* @__PURE__ */ jsx26("div", { className: cn(
|
|
4118
|
+
"min-h-screen bg-background flex items-center justify-center",
|
|
4119
|
+
className
|
|
4120
|
+
), children: /* @__PURE__ */ jsxs21("div", { className: "max-w-md mx-auto text-center px-4", children: [
|
|
4067
4121
|
/* @__PURE__ */ jsx26("div", { className: "mb-8", children: /* @__PURE__ */ jsx26(
|
|
4068
4122
|
"img",
|
|
4069
4123
|
{
|
|
@@ -4072,20 +4126,20 @@ function PublicLoadingSpinnerFullPage({
|
|
|
4072
4126
|
alt: "PACE Core"
|
|
4073
4127
|
}
|
|
4074
4128
|
) }),
|
|
4075
|
-
eventName && /* @__PURE__ */ jsx26("h1", { className: "text-2xl font-bold text-
|
|
4129
|
+
eventName && /* @__PURE__ */ jsx26("h1", { className: "text-2xl font-bold text-sec-900 mb-4", children: eventName }),
|
|
4076
4130
|
/* @__PURE__ */ jsx26("div", { className: "relative mb-6", children: /* @__PURE__ */ jsx26(
|
|
4077
4131
|
"div",
|
|
4078
4132
|
{
|
|
4079
|
-
className: "h-12 w-12 border-4 border-
|
|
4133
|
+
className: "h-12 w-12 border-4 border-sec-200 border-t-main-600 rounded-full animate-spin mx-auto",
|
|
4080
4134
|
role: "status",
|
|
4081
4135
|
"aria-label": "Loading"
|
|
4082
4136
|
}
|
|
4083
4137
|
) }),
|
|
4084
|
-
/* @__PURE__ */ jsx26("p", { className: "text-lg text-
|
|
4138
|
+
/* @__PURE__ */ jsx26("p", { className: "text-lg text-sec-600", children: message }),
|
|
4085
4139
|
/* @__PURE__ */ jsxs21("div", { className: "mt-4 flex justify-center space-x-1", children: [
|
|
4086
|
-
/* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-
|
|
4087
|
-
/* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-
|
|
4088
|
-
/* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-
|
|
4140
|
+
/* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "0ms" } }),
|
|
4141
|
+
/* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "150ms" } }),
|
|
4142
|
+
/* @__PURE__ */ jsx26("div", { className: "h-2 w-2 bg-main-600 rounded-full animate-bounce", style: { animationDelay: "300ms" } })
|
|
4089
4143
|
] })
|
|
4090
4144
|
] }) });
|
|
4091
4145
|
}
|
|
@@ -4093,83 +4147,82 @@ function PublicLoadingSkeleton({
|
|
|
4093
4147
|
lines = 3,
|
|
4094
4148
|
className = ""
|
|
4095
4149
|
}) {
|
|
4096
|
-
return /* @__PURE__ */ jsx26("div", { className:
|
|
4150
|
+
return /* @__PURE__ */ jsx26("div", { className: cn("animate-pulse", className), children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ jsx26(
|
|
4097
4151
|
"div",
|
|
4098
4152
|
{
|
|
4099
|
-
className:
|
|
4153
|
+
className: cn(
|
|
4154
|
+
"h-4 bg-sec-200 rounded mb-2",
|
|
4155
|
+
index === lines - 1 ? "w-3/4" : "w-full"
|
|
4156
|
+
)
|
|
4100
4157
|
},
|
|
4101
4158
|
index
|
|
4102
4159
|
)) });
|
|
4103
4160
|
}
|
|
4104
4161
|
|
|
4105
4162
|
// src/components/PublicLayout/PublicPageLayout.tsx
|
|
4106
|
-
import {
|
|
4107
|
-
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4163
|
+
import { Fragment as Fragment9, jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4108
4164
|
function PublicPageLayout({
|
|
4109
4165
|
eventCode,
|
|
4110
4166
|
children,
|
|
4111
4167
|
event = null,
|
|
4168
|
+
isLoading = false,
|
|
4169
|
+
error = null,
|
|
4170
|
+
refetch,
|
|
4112
4171
|
showFooter = true,
|
|
4113
4172
|
className = "",
|
|
4114
4173
|
errorFallback: ErrorFallback,
|
|
4115
4174
|
loadingFallback: LoadingFallback = PublicLoadingSpinner,
|
|
4116
4175
|
customHeader,
|
|
4117
4176
|
customFooter,
|
|
4118
|
-
showValidationErrors = true
|
|
4177
|
+
showValidationErrors = true,
|
|
4178
|
+
loadingMessage
|
|
4119
4179
|
}) {
|
|
4120
|
-
|
|
4121
|
-
const
|
|
4122
|
-
|
|
4123
|
-
};
|
|
4124
|
-
const layoutClasses = useMemo10(() => {
|
|
4125
|
-
const baseClasses = "min-h-screen bg-white flex flex-col";
|
|
4126
|
-
return `${baseClasses} ${className}`.trim();
|
|
4127
|
-
}, [className]);
|
|
4180
|
+
useEventTheme(event);
|
|
4181
|
+
const handleRefetch = refetch || (async () => {
|
|
4182
|
+
});
|
|
4128
4183
|
if (isLoading) {
|
|
4129
|
-
|
|
4184
|
+
if (LoadingFallback === PublicLoadingSpinner) {
|
|
4185
|
+
return /* @__PURE__ */ jsx27(
|
|
4186
|
+
PublicLoadingSpinner,
|
|
4187
|
+
{
|
|
4188
|
+
className: "items-center justify-center",
|
|
4189
|
+
message: loadingMessage
|
|
4190
|
+
}
|
|
4191
|
+
);
|
|
4192
|
+
}
|
|
4193
|
+
return /* @__PURE__ */ jsx27(LoadingFallback, {});
|
|
4130
4194
|
}
|
|
4131
4195
|
if (error && showValidationErrors) {
|
|
4132
|
-
|
|
4133
|
-
/* @__PURE__ */ jsx27(
|
|
4134
|
-
|
|
4196
|
+
if (ErrorFallback) {
|
|
4197
|
+
return /* @__PURE__ */ jsx27(ErrorFallback, { error, retry: handleRefetch });
|
|
4198
|
+
}
|
|
4199
|
+
return /* @__PURE__ */ jsx27("main", { className: "flex flex-col items-center justify-center px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children: /* @__PURE__ */ jsxs22("div", { className: "text-center", children: [
|
|
4200
|
+
/* @__PURE__ */ jsx27("h1", { children: "Event Not Found" }),
|
|
4201
|
+
/* @__PURE__ */ jsxs22("p", { children: [
|
|
4135
4202
|
'The event code "',
|
|
4136
4203
|
eventCode,
|
|
4137
4204
|
'" is invalid or the event is not available for public viewing.'
|
|
4138
4205
|
] }),
|
|
4139
|
-
/* @__PURE__ */ jsx27(
|
|
4140
|
-
|
|
4141
|
-
{
|
|
4142
|
-
onClick: refetch,
|
|
4143
|
-
className: "px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",
|
|
4144
|
-
children: "Try Again"
|
|
4145
|
-
}
|
|
4146
|
-
)
|
|
4147
|
-
] }) }) });
|
|
4206
|
+
/* @__PURE__ */ jsx27(Button, { onClick: handleRefetch, children: "Try Again" })
|
|
4207
|
+
] }) });
|
|
4148
4208
|
}
|
|
4149
|
-
if (!event) {
|
|
4150
|
-
return /* @__PURE__ */ jsx27("
|
|
4151
|
-
/* @__PURE__ */ jsx27("h1", {
|
|
4152
|
-
/* @__PURE__ */ jsx27("p", {
|
|
4153
|
-
/* @__PURE__ */ jsx27(
|
|
4154
|
-
|
|
4155
|
-
{
|
|
4156
|
-
onClick: refetch,
|
|
4157
|
-
className: "px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",
|
|
4158
|
-
children: "Try Again"
|
|
4159
|
-
}
|
|
4160
|
-
)
|
|
4161
|
-
] }) }) });
|
|
4209
|
+
if (!event && showValidationErrors) {
|
|
4210
|
+
return /* @__PURE__ */ jsx27("main", { className: "flex flex-col items-center justify-center px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children: /* @__PURE__ */ jsxs22("div", { className: "text-center", children: [
|
|
4211
|
+
/* @__PURE__ */ jsx27("h1", { children: "Event Not Available" }),
|
|
4212
|
+
/* @__PURE__ */ jsx27("p", { children: "This event is not available for public viewing." }),
|
|
4213
|
+
handleRefetch && /* @__PURE__ */ jsx27(Button, { onClick: handleRefetch, children: "Try Again" })
|
|
4214
|
+
] }) });
|
|
4162
4215
|
}
|
|
4163
|
-
return /* @__PURE__ */ jsx27(PublicErrorBoundary, { children: /* @__PURE__ */ jsxs22(
|
|
4216
|
+
return /* @__PURE__ */ jsx27(PublicErrorBoundary, { children: /* @__PURE__ */ jsxs22(Fragment9, { children: [
|
|
4164
4217
|
customHeader || /* @__PURE__ */ jsx27(
|
|
4165
4218
|
PublicPageHeader,
|
|
4166
4219
|
{
|
|
4167
|
-
event,
|
|
4220
|
+
event: event || void 0,
|
|
4168
4221
|
eventCode
|
|
4169
4222
|
}
|
|
4170
4223
|
),
|
|
4171
4224
|
/* @__PURE__ */ jsx27("main", { className: "px-4 w-[min(var(--app-width),100%)] mx-auto py-8", children }),
|
|
4172
|
-
showFooter && (customFooter || /* @__PURE__ */ jsx27(PublicPageFooter, { event }))
|
|
4225
|
+
showFooter && event && (customFooter || /* @__PURE__ */ jsx27(PublicPageFooter, { event }))
|
|
4173
4226
|
] }) });
|
|
4174
4227
|
}
|
|
4175
4228
|
function usePublicPageContext2() {
|
|
@@ -4513,4 +4566,4 @@ export {
|
|
|
4513
4566
|
PublicPageDiagnostic,
|
|
4514
4567
|
PublicPageContextChecker
|
|
4515
4568
|
};
|
|
4516
|
-
//# sourceMappingURL=chunk-
|
|
4569
|
+
//# sourceMappingURL=chunk-ZPJMYGEP.js.map
|