@jmruthers/pace-core 0.4.1 → 0.5.1
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/CHANGELOG.md +26 -1
- package/README.md +231 -229
- package/dist/{DataTable-2LB6HI6V.js → DataTable-GX3XERFJ.js} +14 -17
- package/dist/{DataTable-BDBqkU-i.d.ts → DataTable-ltTFXHS3.d.ts} +25 -51
- package/dist/{Table-CIm9IWqk.d.ts → PublicLoadingSpinner-DztrzuJr.d.ts} +635 -122
- package/dist/UnifiedAuthProvider-w66zSCUf.d.ts +160 -0
- package/dist/{api-AIJ3IJX3.js → api-ETQ6YJ3C.js} +6 -4
- package/dist/{appConfig-fB1pP_v3.d.ts → appConfig-BVGyuvI7.d.ts} +1 -1
- package/dist/appNameResolver-7GHF5ED2.js +22 -0
- package/dist/{audit-PD5L5ZSC.js → audit-BUW3LMJB.js} +3 -3
- package/dist/chunk-5EL3KHOQ.js +388 -0
- package/dist/chunk-5EL3KHOQ.js.map +1 -0
- package/dist/{chunk-4MCJAK7J.js → chunk-6CR3MRZN.js} +1827 -4886
- package/dist/chunk-6CR3MRZN.js.map +1 -0
- package/dist/{chunk-YNU5QJ4S.js → chunk-7BNPOCLL.js} +22 -5
- package/dist/chunk-7BNPOCLL.js.map +1 -0
- package/dist/chunk-AUE24LVR.js +268 -0
- package/dist/chunk-AUE24LVR.js.map +1 -0
- package/dist/chunk-C5G2A4PO.js +1349 -0
- package/dist/chunk-C5G2A4PO.js.map +1 -0
- package/dist/{chunk-4ZTIEYU2.js → chunk-CDQ3PX7L.js} +1 -1
- package/dist/chunk-CDQ3PX7L.js.map +1 -0
- package/dist/chunk-COBPIXXQ.js +379 -0
- package/dist/chunk-COBPIXXQ.js.map +1 -0
- package/dist/chunk-GSNM5D6H.js +5441 -0
- package/dist/chunk-GSNM5D6H.js.map +1 -0
- package/dist/chunk-MZBUOP4P.js +119 -0
- package/dist/chunk-MZBUOP4P.js.map +1 -0
- package/dist/chunk-N2EUGZRW.js +98 -0
- package/dist/chunk-N2EUGZRW.js.map +1 -0
- package/dist/chunk-NQ4TOOO6.js +20 -0
- package/dist/chunk-NQ4TOOO6.js.map +1 -0
- package/dist/{chunk-KK6WIDK6.js → chunk-OEGRKULD.js} +12 -2
- package/dist/{chunk-KK6WIDK6.js.map → chunk-OEGRKULD.js.map} +1 -1
- package/dist/chunk-OYRY44Q2.js +62 -0
- package/dist/chunk-OYRY44Q2.js.map +1 -0
- package/dist/{chunk-DC5AMYBS.js → chunk-PLDDJCW6.js} +15 -5
- package/dist/chunk-PLDDJCW6.js.map +1 -0
- package/dist/{chunk-WHLSWC6W.js → chunk-SS3E6QLB.js} +16 -61
- package/dist/chunk-SS3E6QLB.js.map +1 -0
- package/dist/chunk-T3XIA4AJ.js +3295 -0
- package/dist/chunk-T3XIA4AJ.js.map +1 -0
- package/dist/{chunk-H4PZ4B3Y.js → chunk-TGDCLPP2.js} +129 -28
- package/dist/chunk-TGDCLPP2.js.map +1 -0
- package/dist/{chunk-IOX76PSM.js → chunk-U6JDHVC2.js} +273 -29
- package/dist/chunk-U6JDHVC2.js.map +1 -0
- package/dist/{chunk-JUUNUW3O.js → chunk-XJK2J4N6.js} +17 -6
- package/dist/chunk-XJK2J4N6.js.map +1 -0
- package/dist/chunk-YDJW5XTN.js +84 -0
- package/dist/chunk-YDJW5XTN.js.map +1 -0
- package/dist/components.d.ts +906 -10
- package/dist/components.js +3263 -84
- package/dist/components.js.map +1 -1
- package/dist/{database-CAMsquLm.d.ts → database-C3Szpi5J.d.ts} +28 -11
- package/dist/hooks.d.ts +7 -6
- package/dist/hooks.js +35 -11
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +245 -111
- package/dist/index.js +195 -185
- package/dist/index.js.map +1 -1
- package/dist/{organisation-DLNNQhPB.d.ts → organisation-CO3Sh3_D.d.ts} +1 -1
- package/dist/providers.d.ts +4 -4
- package/dist/providers.js +21 -6
- package/dist/rbac/index.d.ts +862 -806
- package/dist/rbac/index.js +953 -1032
- package/dist/rbac/index.js.map +1 -1
- package/dist/styles/core.css +422 -0
- package/dist/styles/fonts/georama-italic.woff2 +0 -0
- package/dist/styles/fonts/georama.woff2 +0 -0
- package/dist/styles/fonts/open-sans-italic.woff2 +0 -0
- package/dist/styles/fonts/open-sans.woff2 +0 -0
- package/dist/styles/fonts/reddit-mono.woff2 +0 -0
- package/dist/styles/index.d.ts +36 -0
- package/dist/styles/index.js +24 -0
- package/dist/styles/index.js.map +1 -0
- package/dist/theming/runtime.d.ts +73 -0
- package/dist/theming/runtime.js +16 -0
- package/dist/theming/runtime.js.map +1 -0
- package/dist/{types-Bavn44NW.d.ts → types-BRDU7N6w.d.ts} +79 -33
- package/dist/types.d.ts +5 -5
- package/dist/types.js +7 -2
- package/dist/types.js.map +1 -1
- package/dist/{unified-BtRpPbmp.d.ts → unified-CM7T0aTK.d.ts} +1 -2
- package/dist/usePublicRouteParams-B6i0KtXW.d.ts +477 -0
- package/dist/utils.d.ts +83 -60
- package/dist/utils.js +301 -55657
- package/dist/utils.js.map +1 -1
- package/dist/validation.d.ts +1 -1
- package/dist/validation.js +1 -1
- package/docs/INDEX.md +192 -0
- package/docs/README.md +46 -32
- package/docs/api/README.md +231 -229
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +132 -0
- package/docs/api/interfaces/AggregateConfig.md +4 -4
- package/docs/api/interfaces/ButtonProps.md +2 -2
- package/docs/api/interfaces/CardProps.md +2 -2
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +98 -7
- package/docs/api/interfaces/DataTableColumn.md +131 -12
- package/docs/api/interfaces/DataTableProps.md +77 -274
- package/docs/api/interfaces/DataTableToolbarButton.md +7 -7
- package/docs/api/interfaces/EmptyStateConfig.md +5 -5
- package/docs/api/interfaces/EventContextType.md +7 -7
- package/docs/api/interfaces/EventLogoProps.md +152 -0
- package/docs/api/interfaces/EventProviderProps.md +2 -2
- package/docs/api/interfaces/FileSizeLimits.md +7 -0
- package/docs/api/interfaces/FileUploadProps.md +154 -0
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +115 -0
- package/docs/api/interfaces/InputProps.md +2 -2
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.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 +2 -2
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +26 -26
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +94 -0
- package/docs/api/interfaces/PublicErrorBoundaryState.md +68 -0
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +86 -0
- package/docs/api/interfaces/PublicPageFooterProps.md +112 -0
- package/docs/api/interfaces/PublicPageHeaderProps.md +138 -0
- package/docs/api/interfaces/PublicPageLayoutProps.md +138 -0
- package/docs/api/interfaces/StorageConfig.md +41 -0
- package/docs/api/interfaces/StorageFileInfo.md +74 -0
- package/docs/api/interfaces/StorageFileMetadata.md +140 -0
- package/docs/api/interfaces/StorageListOptions.md +86 -0
- package/docs/api/interfaces/StorageListResult.md +41 -0
- package/docs/api/interfaces/StorageUploadOptions.md +88 -0
- package/docs/api/interfaces/StorageUploadResult.md +63 -0
- package/docs/api/interfaces/StorageUrlOptions.md +47 -0
- package/docs/api/interfaces/StyleImport.md +2 -2
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +447 -46
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +95 -9
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +136 -0
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +123 -0
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +87 -0
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +81 -0
- package/docs/api/interfaces/UsePublicEventOptions.md +34 -0
- package/docs/api/interfaces/UsePublicEventReturn.md +68 -0
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +94 -0
- package/docs/api/interfaces/UserEventAccess.md +14 -14
- package/docs/api/interfaces/UserMenuProps.md +6 -6
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +1626 -768
- package/docs/api-reference/components.md +761 -43
- package/docs/api-reference/hooks.md +126 -0
- package/docs/api-reference/providers.md +141 -65
- package/docs/api-reference/types.md +66 -36
- package/docs/api-reference/utilities.md +1 -1
- package/docs/architecture/README.md +1 -2
- package/docs/best-practices/README.md +400 -0
- package/docs/consuming-app-example.md +42 -96
- package/docs/consuming-app-vite-config.md +233 -0
- package/docs/core-concepts/events.md +3 -3
- package/docs/core-concepts/organisations.md +0 -1
- package/docs/core-concepts/rbac-system.md +23 -10
- package/docs/documentation-style-checklist.md +8 -2
- package/docs/examples/navigation-menu-auth-fix.md +344 -0
- package/docs/getting-started/examples/README.md +15 -1
- package/docs/getting-started/examples/basic-auth-app.md +444 -119
- package/docs/getting-started/examples/full-featured-app.md +6 -6
- package/docs/getting-started/installation.md +231 -52
- package/docs/getting-started/quick-start.md +121 -24
- package/docs/implementation-guides/app-layout.md +133 -108
- package/docs/implementation-guides/data-tables.md +1011 -29
- package/docs/implementation-guides/forms.md +3 -3
- package/docs/implementation-guides/hierarchical-datatable.md +850 -0
- package/docs/implementation-guides/large-datasets.md +2 -2
- package/docs/implementation-guides/navigation.md +1 -1
- package/docs/implementation-guides/permission-enforcement.md +4 -4
- package/docs/implementation-guides/public-pages.md +752 -0
- package/docs/migration/README.md +18 -8
- package/docs/migration/quick-migration-guide.md +320 -0
- package/docs/migration/rbac-migration.md +50 -0
- package/docs/migration/v0.4.15-tailwind-scanning.md +272 -0
- package/docs/migration/v0.4.16-css-first-approach.md +306 -0
- package/docs/migration/v0.4.17-source-path-fix.md +229 -0
- package/docs/migration-guide.md +51 -104
- package/docs/performance/README.md +1 -4
- package/docs/print-components/README.md +258 -0
- package/docs/print-components/api-reference.md +636 -0
- package/docs/print-components/examples/README.md +204 -0
- package/docs/print-components/examples/basic-report.tsx +92 -0
- package/docs/print-components/examples/card-catalog.tsx +149 -0
- package/docs/print-components/examples/cover-page-report.tsx +163 -0
- package/docs/print-components/quick-start.md +363 -0
- package/docs/quick-reference.md +53 -36
- package/docs/rbac/README.md +136 -69
- package/docs/rbac/api-reference.md +39 -8
- package/docs/rbac/examples.md +237 -66
- package/docs/rbac/getting-started.md +131 -16
- package/docs/rbac/quick-start.md +499 -323
- package/docs/rbac/troubleshooting.md +240 -262
- package/docs/security/README.md +50 -1
- package/docs/styles/README.md +143 -117
- package/docs/testing/README.md +6 -10
- package/docs/troubleshooting/README.md +497 -0
- package/docs/troubleshooting/common-issues.md +604 -14
- package/docs/troubleshooting/styling-issues.md +219 -0
- package/docs/troubleshooting/tailwind-content-scanning.md +213 -0
- package/docs/usage.md +28 -90
- package/docs/visual-testing.md +0 -7
- package/package.json +46 -24
- package/src/__mocks__/lucide-react.ts +181 -0
- package/src/__tests__/REBUILD_PLAN.md +223 -0
- package/src/__tests__/TESTING_GUIDELINES.md +341 -0
- package/src/__tests__/fixtures/mocks.ts +93 -0
- package/src/__tests__/helpers/component-test-utils.tsx +145 -0
- package/src/__tests__/helpers/test-utils.tsx +117 -0
- package/src/__tests__/integration/UserProfile.test.tsx +128 -0
- package/src/__tests__/setup.ts +71 -0
- package/src/__tests__/templates/accessibility.test.template.tsx +279 -0
- package/src/__tests__/templates/component.test.template.tsx +144 -0
- package/src/__tests__/templates/hook.test.template.ts +173 -0
- package/src/__tests__/templates/integration.test.template.tsx +199 -0
- package/src/__tests__/types/test.types.ts +106 -0
- package/src/components/Alert/Alert.test.tsx +496 -0
- package/src/components/Alert/Alert.tsx +134 -0
- package/src/components/Alert/index.ts +2 -0
- package/src/components/Avatar/Avatar.test.tsx +484 -0
- package/src/components/Avatar/Avatar.tsx +84 -0
- package/src/components/Avatar/index.ts +2 -0
- package/src/components/Button/Button.test.tsx +662 -0
- package/src/components/Button/Button.tsx +270 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Card/Card.test.tsx +593 -0
- package/src/components/Card/Card.tsx +271 -0
- package/src/components/Card/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.test.tsx +461 -0
- package/src/components/Checkbox/Checkbox.tsx +75 -0
- package/src/components/Checkbox/__mocks__/Checkbox.tsx +2 -0
- package/src/components/Checkbox/index.ts +2 -0
- package/src/components/DataTable/DataTable.tsx +446 -0
- package/src/components/DataTable/__tests__/README.md +145 -0
- package/src/components/DataTable/__tests__/mocks/MockRBACProvider.tsx +66 -0
- package/src/components/DataTable/__tests__/test-utils/dataFactories.ts +103 -0
- package/src/components/DataTable/__tests__/test-utils/sharedTestUtils.tsx +381 -0
- package/src/components/DataTable/__tests__/test-utils.ts +94 -0
- package/src/components/DataTable/components/AccessDeniedPage.tsx +168 -0
- package/src/components/DataTable/components/ActionButtons.tsx +194 -0
- package/src/components/DataTable/components/BulkOperationsDropdown.tsx +160 -0
- package/src/components/DataTable/components/ColumnFilter.tsx +114 -0
- package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +100 -0
- package/src/components/DataTable/components/DataTableBody.tsx +461 -0
- package/src/components/DataTable/components/DataTableCore.tsx +1027 -0
- package/src/components/DataTable/components/DataTableErrorBoundary.tsx +214 -0
- package/src/components/DataTable/components/DataTableModals.tsx +87 -0
- package/src/components/DataTable/components/DataTableToolbar.tsx +262 -0
- package/src/components/DataTable/components/DraggableColumnHeader.tsx +144 -0
- package/src/components/DataTable/components/EditableRow.tsx +159 -0
- package/src/components/DataTable/components/EmptyState.tsx +64 -0
- package/src/components/DataTable/components/ExpandButton.tsx +113 -0
- package/src/components/DataTable/components/FilterRow.tsx +100 -0
- package/src/components/DataTable/components/GroupHeader.tsx +42 -0
- package/src/components/DataTable/components/GroupingDropdown.tsx +96 -0
- package/src/components/DataTable/components/ImportModal.tsx +345 -0
- package/src/components/DataTable/components/LoadingState.tsx +12 -0
- package/src/components/DataTable/components/PaginationControls.tsx +332 -0
- package/src/components/DataTable/components/UnifiedTableBody.tsx +742 -0
- package/src/components/DataTable/components/ViewRowModal.tsx +68 -0
- package/src/components/DataTable/components/VirtualizedDataTable.tsx +513 -0
- package/src/components/DataTable/components/index.ts +16 -0
- package/src/components/DataTable/context/DataTableContext.tsx +97 -0
- package/src/components/DataTable/core/ActionManager.ts +235 -0
- package/src/components/DataTable/core/ColumnFactory.ts +268 -0
- package/src/components/DataTable/core/ColumnManager.ts +205 -0
- package/src/components/DataTable/core/DataManager.ts +188 -0
- package/src/components/DataTable/core/DataTableContext.tsx +181 -0
- package/src/components/DataTable/core/LocalDataAdapter.ts +264 -0
- package/src/components/DataTable/core/PluginRegistry.ts +229 -0
- package/src/components/DataTable/core/StateManager.ts +311 -0
- package/src/components/DataTable/core/index.ts +8 -0
- package/src/components/DataTable/core/interfaces.ts +338 -0
- package/src/components/DataTable/examples/HierarchicalActionsExample.tsx +419 -0
- package/src/components/DataTable/examples/HierarchicalExample.tsx +475 -0
- package/src/components/DataTable/examples/InitialPageSizeExample.tsx +176 -0
- package/src/components/DataTable/examples/PerformanceExample.tsx +505 -0
- package/src/components/DataTable/hooks/useColumnOrderPersistence.ts +95 -0
- package/src/components/DataTable/hooks/useColumnReordering.ts +110 -0
- package/src/components/DataTable/hooks/useDataTableState.ts +325 -0
- package/src/components/DataTable/hooks/useHierarchicalState.ts +174 -0
- package/src/components/DataTable/index.ts +68 -0
- package/src/components/DataTable/styles.ts +171 -0
- package/src/components/DataTable/types.ts +511 -0
- package/src/components/DataTable/utils/debugTools.ts +583 -0
- package/src/components/DataTable/utils/errorHandling.ts +494 -0
- package/src/components/DataTable/utils/exportUtils.ts +126 -0
- package/src/components/DataTable/utils/flexibleImport.ts +510 -0
- package/src/components/DataTable/utils/hierarchicalSorting.ts +151 -0
- package/src/components/DataTable/utils/hierarchicalUtils.ts +218 -0
- package/src/components/DataTable/utils/index.ts +1 -0
- package/src/components/DataTable/utils/performanceUtils.ts +351 -0
- package/src/components/Dialog/Dialog.test.tsx +1139 -0
- package/src/components/Dialog/Dialog.tsx +782 -0
- package/src/components/Dialog/README.md +804 -0
- package/src/components/Dialog/examples/BasicHtmlTest.tsx +55 -0
- package/src/components/Dialog/examples/DebugHtmlExample.tsx +68 -0
- package/src/components/Dialog/examples/HtmlDialogExample.tsx +202 -0
- package/src/components/Dialog/examples/SimpleHtmlTest.tsx +61 -0
- package/src/components/Dialog/examples/SmartDialogExample.tsx +322 -0
- package/src/components/Dialog/index.ts +12 -0
- package/src/components/Dialog/utils/safeHtml.ts +185 -0
- package/src/components/ErrorBoundary/ErrorBoundary.test.tsx +752 -0
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +312 -0
- package/src/components/ErrorBoundary/index.ts +8 -0
- package/src/components/EventSelector/EventSelector.tsx +360 -0
- package/src/components/EventSelector/index.ts +3 -0
- package/src/components/EventSelector/types.ts +79 -0
- package/src/components/FileUpload/FileUpload.example.tsx +218 -0
- package/src/components/FileUpload/FileUpload.test.tsx +665 -0
- package/src/components/FileUpload/FileUpload.tsx +237 -0
- package/src/components/FileUpload/index.ts +6 -0
- package/src/components/Footer/Footer.tsx +197 -0
- package/src/components/Footer/index.ts +17 -0
- package/src/components/Form/Form.tsx +166 -0
- package/src/components/Form/FormErrorSummary.tsx +113 -0
- package/src/components/Form/FormField.tsx +249 -0
- package/src/components/Form/FormFieldset.tsx +127 -0
- package/src/components/Form/FormLiveRegion.tsx +198 -0
- package/src/components/Form/index.ts +26 -0
- package/src/components/Header/Header.tsx +301 -0
- package/src/components/Header/index.ts +4 -0
- package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +164 -0
- package/src/components/InactivityWarningModal/index.ts +9 -0
- package/src/components/Input/Input.tsx +201 -0
- package/src/components/Input/__mocks__/Input.tsx +2 -0
- package/src/components/Input/index.ts +9 -0
- package/src/components/Label/Label.tsx +186 -0
- package/src/components/Label/index.ts +2 -0
- package/src/components/LoadingSpinner/LoadingSpinner.tsx +98 -0
- package/src/components/LoadingSpinner/index.ts +3 -0
- package/src/components/LoginForm/LoginForm.tsx +273 -0
- package/src/components/LoginForm/index.ts +3 -0
- package/src/components/NavigationMenu/NavigationMenu.tsx +698 -0
- package/src/components/NavigationMenu/index.ts +10 -0
- package/src/components/NavigationMenu/types.ts +85 -0
- package/src/components/OrganisationSelector/OrganisationSelector.tsx +304 -0
- package/src/components/OrganisationSelector/index.ts +9 -0
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +699 -0
- package/src/components/PaceAppLayout/README.md +278 -0
- package/src/components/PaceAppLayout/index.ts +1 -0
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +221 -0
- package/src/components/PaceLoginPage/index.ts +1 -0
- package/src/components/PasswordReset/PasswordChangeForm.tsx +186 -0
- package/src/components/PasswordReset/PasswordResetForm.tsx +201 -0
- package/src/components/PasswordReset/index.ts +4 -0
- package/src/components/PrintButton/PrintButton.tsx +321 -0
- package/src/components/PrintButton/PrintButtonGroup.tsx +84 -0
- package/src/components/PrintButton/PrintToolbar.tsx +94 -0
- package/src/components/PrintButton/examples/PrintButtonShowcase.tsx +438 -0
- package/src/components/PrintButton/index.ts +33 -0
- package/src/components/PrintButton/types.ts +173 -0
- package/src/components/PrintCard/PrintCard.tsx +154 -0
- package/src/components/PrintCard/PrintCardContent.tsx +57 -0
- package/src/components/PrintCard/PrintCardFooter.tsx +60 -0
- package/src/components/PrintCard/PrintCardGrid.tsx +91 -0
- package/src/components/PrintCard/PrintCardHeader.tsx +78 -0
- package/src/components/PrintCard/PrintCardImage.tsx +81 -0
- package/src/components/PrintCard/examples/PrintCardShowcase.tsx +239 -0
- package/src/components/PrintCard/index.ts +34 -0
- package/src/components/PrintCard/types.ts +171 -0
- package/src/components/PrintDataTable/PrintDataTable.tsx +215 -0
- package/src/components/PrintDataTable/PrintTableGroup.tsx +90 -0
- package/src/components/PrintDataTable/PrintTableRow.tsx +76 -0
- package/src/components/PrintDataTable/index.ts +25 -0
- package/src/components/PrintDataTable/types.ts +67 -0
- package/src/components/PrintFooter/PrintFooter.tsx +183 -0
- package/src/components/PrintFooter/PrintFooterContent.tsx +71 -0
- package/src/components/PrintFooter/PrintFooterInfo.tsx +86 -0
- package/src/components/PrintFooter/PrintPageNumber.tsx +90 -0
- package/src/components/PrintFooter/examples/PrintFooterShowcase.tsx +390 -0
- package/src/components/PrintFooter/index.ts +30 -0
- package/src/components/PrintFooter/types.ts +149 -0
- package/src/components/PrintGrid/PrintGrid.tsx +180 -0
- package/src/components/PrintGrid/PrintGridBreakpoint.tsx +109 -0
- package/src/components/PrintGrid/PrintGridContainer.tsx +128 -0
- package/src/components/PrintGrid/PrintGridItem.tsx +220 -0
- package/src/components/PrintGrid/examples/PrintGridShowcase.tsx +359 -0
- package/src/components/PrintGrid/index.ts +31 -0
- package/src/components/PrintGrid/types.ts +159 -0
- package/src/components/PrintHeader/PrintCoverHeader.tsx +230 -0
- package/src/components/PrintHeader/PrintHeader.tsx +150 -0
- package/src/components/PrintHeader/index.ts +17 -0
- package/src/components/PrintHeader/types.ts +42 -0
- package/src/components/PrintLayout/PrintLayout.tsx +122 -0
- package/src/components/PrintLayout/PrintLayoutContext.tsx +66 -0
- package/src/components/PrintLayout/PrintPageBreak.tsx +52 -0
- package/src/components/PrintLayout/examples/PrintShowcase.tsx +230 -0
- package/src/components/PrintLayout/index.ts +19 -0
- package/src/components/PrintLayout/types.ts +37 -0
- package/src/components/PrintPageBreak/PrintPageBreak.tsx +120 -0
- package/src/components/PrintPageBreak/PrintPageBreakGroup.tsx +90 -0
- package/src/components/PrintPageBreak/PrintPageBreakIndicator.tsx +112 -0
- package/src/components/PrintPageBreak/examples/PrintPageBreakShowcase.tsx +279 -0
- package/src/components/PrintPageBreak/index.ts +23 -0
- package/src/components/PrintPageBreak/types.ts +94 -0
- package/src/components/PrintSection/PrintColumn.tsx +104 -0
- package/src/components/PrintSection/PrintDivider.tsx +101 -0
- package/src/components/PrintSection/PrintSection.tsx +129 -0
- package/src/components/PrintSection/PrintSectionContent.tsx +75 -0
- package/src/components/PrintSection/PrintSectionHeader.tsx +97 -0
- package/src/components/PrintSection/examples/PrintSectionShowcase.tsx +258 -0
- package/src/components/PrintSection/index.ts +33 -0
- package/src/components/PrintSection/types.ts +155 -0
- package/src/components/PrintText/PrintText.tsx +116 -0
- package/src/components/PrintText/index.ts +16 -0
- package/src/components/PrintText/types.ts +24 -0
- package/src/components/Progress/Progress.tsx +116 -0
- package/src/components/Progress/index.ts +3 -0
- package/src/components/PublicLayout/EventLogo.tsx +287 -0
- package/src/components/PublicLayout/PublicErrorBoundary.tsx +279 -0
- package/src/components/PublicLayout/PublicLoadingSpinner.tsx +208 -0
- package/src/components/PublicLayout/PublicPageContextChecker.tsx +130 -0
- package/src/components/PublicLayout/PublicPageDebugger.tsx +104 -0
- package/src/components/PublicLayout/PublicPageDiagnostic.tsx +162 -0
- package/src/components/PublicLayout/PublicPageFooter.tsx +124 -0
- package/src/components/PublicLayout/PublicPageHeader.tsx +178 -0
- package/src/components/PublicLayout/PublicPageLayout.tsx +232 -0
- package/src/components/PublicLayout/PublicPageProvider.tsx +137 -0
- package/src/components/PublicLayout/index.ts +51 -0
- package/src/components/RBAC/PagePermissionGuard.tsx +287 -0
- package/src/components/RBAC/RBACGuard.tsx +143 -0
- package/src/components/RBAC/RBACProvider.tsx +186 -0
- package/src/components/RBAC/RoleBasedContent.tsx +129 -0
- package/src/components/RBAC/index.ts +23 -0
- package/src/components/Select/Select.tsx +660 -0
- package/src/components/Select/index.ts +1 -0
- package/src/components/SuperAdminGuard.tsx +116 -0
- package/src/components/Table/Table.tsx +222 -0
- package/src/components/Table/index.ts +11 -0
- package/src/components/Toast/Toast.tsx +339 -0
- package/src/components/Toast/index.ts +14 -0
- package/src/components/Tooltip/Tooltip.tsx +167 -0
- package/src/components/Tooltip/index.ts +7 -0
- package/src/components/UserMenu/UserMenu.tsx +243 -0
- package/src/components/UserMenu/index.ts +3 -0
- package/src/components/examples/PermissionExample.tsx +150 -0
- package/src/components/index.ts +434 -0
- package/src/components.ts +19 -0
- package/src/constants/performance.ts +14 -0
- package/src/examples/CorrectPublicPageImplementation.tsx +301 -0
- package/src/examples/PublicEventPage.tsx +274 -0
- package/src/examples/PublicPageApp.tsx +308 -0
- package/src/examples/PublicPageUsageExample.tsx +216 -0
- package/src/hooks/index.ts +56 -0
- package/src/hooks/public/index.ts +34 -0
- package/src/hooks/public/usePublicEvent.ts +261 -0
- package/src/hooks/public/usePublicEventLogo.ts +285 -0
- package/src/hooks/public/usePublicRouteParams.ts +259 -0
- package/src/hooks/useAppConfig.ts +94 -0
- package/src/hooks/useComponentPerformance.ts +39 -0
- package/src/hooks/useCounter.test.ts +135 -0
- package/src/hooks/useDataTablePerformance.ts +387 -0
- package/src/hooks/useDataTableState.ts +110 -0
- package/src/hooks/useDebounce.ts +18 -0
- package/src/hooks/useFocusManagement.ts +161 -0
- package/src/hooks/useFocusTrap.ts +155 -0
- package/src/hooks/useInactivityTracker.ts +372 -0
- package/src/hooks/useIsMobile.ts +42 -0
- package/src/hooks/useKeyboardShortcuts.ts +237 -0
- package/src/hooks/useOrganisationPermissions.ts +208 -0
- package/src/hooks/useOrganisationSecurity.ts +262 -0
- package/src/hooks/usePerformanceMonitor.ts +128 -0
- package/src/hooks/usePermissionCache.ts +455 -0
- package/src/hooks/useRBAC.ts +262 -0
- package/src/hooks/useSecureDataAccess.ts +586 -0
- package/src/hooks/useStorage.ts +274 -0
- package/src/hooks/useToast.ts +242 -0
- package/src/hooks/useZodForm.ts +28 -0
- package/src/index.ts +200 -0
- package/src/providers/AuthProvider.tsx +369 -0
- package/src/providers/EventProvider.tsx +324 -0
- package/src/providers/InactivityProvider.tsx +238 -0
- package/src/providers/OrganisationProvider.tsx +588 -0
- package/src/providers/RBACProvider.tsx +634 -0
- package/src/providers/UnifiedAuthProvider.tsx +327 -0
- package/src/providers/index.ts +15 -0
- package/src/rbac/README.md +885 -0
- package/src/rbac/adapters.tsx +726 -0
- package/src/rbac/api.ts +339 -0
- package/src/rbac/audit-enhanced.ts +339 -0
- package/src/rbac/audit.ts +338 -0
- package/src/rbac/cache.ts +215 -0
- package/src/rbac/components/EnhancedNavigationMenu.tsx +294 -0
- package/src/rbac/components/NavigationGuard.tsx +294 -0
- package/src/rbac/components/NavigationProvider.tsx +314 -0
- package/src/rbac/components/PagePermissionGuard.tsx +430 -0
- package/src/rbac/components/PagePermissionProvider.tsx +274 -0
- package/src/rbac/components/PermissionEnforcer.tsx +307 -0
- package/src/rbac/components/RoleBasedRouter.tsx +425 -0
- package/src/rbac/components/SecureDataProvider.tsx +319 -0
- package/src/rbac/components/index.ts +64 -0
- package/src/rbac/config.ts +133 -0
- package/src/rbac/docs/event-based-apps.md +285 -0
- package/src/rbac/engine.ts +1026 -0
- package/src/rbac/eslint-rules.js +285 -0
- package/src/rbac/examples/CompleteRBACExample.tsx +323 -0
- package/src/rbac/examples/EventBasedApp.tsx +238 -0
- package/src/rbac/hooks.ts +570 -0
- package/src/rbac/index.ts +114 -0
- package/src/rbac/permissions.ts +293 -0
- package/src/rbac/secureClient.ts +244 -0
- package/src/rbac/security.ts +346 -0
- package/src/rbac/testing/index.tsx +340 -0
- package/src/rbac/types.ts +343 -0
- package/src/rbac/utils/eventContext.ts +83 -0
- package/src/styles/core.css +422 -0
- package/src/styles/index.ts +51 -0
- package/src/theming/runtime.ts +187 -0
- package/src/types/database.ts +472 -0
- package/src/types/guards.ts +30 -0
- package/src/types/index.ts +25 -0
- package/src/types/organisation.ts +184 -0
- package/src/types/security.ts +70 -0
- package/src/types/supabase.ts +166 -0
- package/src/types/theme.ts +6 -0
- package/src/types/unified.ts +262 -0
- package/src/types/validation.ts +164 -0
- package/src/types/vitest-globals.d.ts +43 -0
- package/src/utils/__mocks__/supabaseMock.ts +75 -0
- package/src/utils/__mocks__/supabaseMock.tsx +198 -0
- package/src/utils/appConfig.ts +47 -0
- package/src/utils/appIdResolver.ts +130 -0
- package/src/utils/appNameResolver.ts +190 -0
- package/src/utils/audit.ts +127 -0
- package/src/utils/auth-utils.ts +96 -0
- package/src/utils/bundleAnalysis.ts +129 -0
- package/src/utils/cn.ts +7 -0
- package/src/utils/debugLogger.ts +46 -0
- package/src/utils/deviceFingerprint.ts +215 -0
- package/src/utils/dynamicUtils.ts +105 -0
- package/src/utils/formatting.ts +77 -0
- package/src/utils/index.ts +145 -0
- package/src/utils/lazyLoad.tsx +44 -0
- package/src/utils/organisationContext.ts +135 -0
- package/src/utils/performanceBenchmark.ts +64 -0
- package/src/utils/performanceBudgets.ts +111 -0
- package/src/utils/permissionTypes.ts +37 -0
- package/src/utils/permissionUtils.ts +31 -0
- package/src/utils/print/PrintDataProcessor.ts +390 -0
- package/src/utils/print/examples/PrintUtilitiesShowcase.tsx +397 -0
- package/src/utils/print/index.ts +29 -0
- package/src/utils/print/types.ts +196 -0
- package/src/utils/print/usePrintOptimization.ts +272 -0
- package/src/utils/sanitization.ts +264 -0
- package/src/utils/schemaUtils.ts +37 -0
- package/src/utils/secureDataAccess.ts +361 -0
- package/src/utils/secureErrors.ts +79 -0
- package/src/utils/secureStorage.ts +244 -0
- package/src/utils/security.ts +156 -0
- package/src/utils/securityMonitor.ts +45 -0
- package/src/utils/sessionTracking.ts +170 -0
- package/src/utils/storage/README.md +348 -0
- package/src/utils/storage/config.ts +100 -0
- package/src/utils/storage/helpers.ts +359 -0
- package/src/utils/storage/index.ts +36 -0
- package/src/utils/storage/types.ts +90 -0
- package/src/utils/validation.ts +111 -0
- package/src/utils/validationUtils.ts +120 -0
- package/src/validation/common.ts +53 -0
- package/src/validation/csrf.ts +214 -0
- package/src/validation/index.ts +43 -0
- package/src/validation/passwordSchema.ts +125 -0
- package/src/validation/sanitization.ts +96 -0
- package/src/validation/schemaUtils.ts +42 -0
- package/src/validation/sqlInjectionProtection.ts +242 -0
- package/src/validation/user.ts +34 -0
- package/dist/UnifiedAuthProvider-V7y63NjT.d.ts +0 -88
- package/dist/chunk-4MCJAK7J.js.map +0 -1
- package/dist/chunk-4ZTIEYU2.js.map +0 -1
- package/dist/chunk-H4PZ4B3Y.js.map +0 -1
- package/dist/chunk-IOX76PSM.js.map +0 -1
- package/dist/chunk-JUUNUW3O.js.map +0 -1
- package/dist/chunk-U7DY5T33.js +0 -11
- package/dist/chunk-U7DY5T33.js.map +0 -1
- package/dist/chunk-WHLSWC6W.js.map +0 -1
- package/dist/chunk-XI7QFSSC.js +0 -790
- package/dist/chunk-XI7QFSSC.js.map +0 -1
- package/dist/chunk-XIJMMBDD.js +0 -73
- package/dist/chunk-XIJMMBDD.js.map +0 -1
- package/dist/chunk-YNU5QJ4S.js.map +0 -1
- package/dist/chunk-YWYCNGWH.js +0 -2070
- package/dist/chunk-YWYCNGWH.js.map +0 -1
- package/dist/chunk-ZJ3UKPIW.js +0 -952
- package/dist/chunk-ZJ3UKPIW.js.map +0 -1
- package/dist/useAppConfig-CZNJJsT_.d.ts +0 -148
- package/dist/{DataTable-2LB6HI6V.js.map → DataTable-GX3XERFJ.js.map} +0 -0
- package/dist/{api-AIJ3IJX3.js.map → api-ETQ6YJ3C.js.map} +0 -0
- package/dist/{audit-PD5L5ZSC.js.map → appNameResolver-7GHF5ED2.js.map} +0 -0
- package/dist/{chunk-DC5AMYBS.js.map → audit-BUW3LMJB.js.map} +0 -0
- package/dist/{validation-D2-NNCCE.d.ts → validation-PM_iOaTI.d.ts} +6 -6
package/docs/api/modules.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.1](README.md) / Exports
|
|
2
2
|
|
|
3
|
-
# @jmruthers/pace-core - v0.
|
|
3
|
+
# @jmruthers/pace-core - v0.5.1
|
|
4
4
|
|
|
5
5
|
**`File`**
|
|
6
6
|
|
|
@@ -32,6 +32,7 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
32
32
|
### Classes
|
|
33
33
|
|
|
34
34
|
- [ErrorBoundary](classes/ErrorBoundary.md)
|
|
35
|
+
- [PublicErrorBoundary](classes/PublicErrorBoundary.md)
|
|
35
36
|
|
|
36
37
|
### Interfaces
|
|
37
38
|
|
|
@@ -43,7 +44,9 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
43
44
|
- [DataTableToolbarButton](interfaces/DataTableToolbarButton.md)
|
|
44
45
|
- [AggregateConfig](interfaces/AggregateConfig.md)
|
|
45
46
|
- [EmptyStateConfig](interfaces/EmptyStateConfig.md)
|
|
47
|
+
- [FileUploadProps](interfaces/FileUploadProps.md)
|
|
46
48
|
- [FooterProps](interfaces/FooterProps.md)
|
|
49
|
+
- [InactivityWarningModalProps](interfaces/InactivityWarningModalProps.md)
|
|
47
50
|
- [InputProps](interfaces/InputProps.md)
|
|
48
51
|
- [LabelProps](interfaces/LabelProps.md)
|
|
49
52
|
- [LoginFormProps](interfaces/LoginFormProps.md)
|
|
@@ -51,9 +54,23 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
51
54
|
- [NavigationMenuProps](interfaces/NavigationMenuProps.md)
|
|
52
55
|
- [PaceAppLayoutProps](interfaces/PaceAppLayoutProps.md)
|
|
53
56
|
- [PaceLoginPageProps](interfaces/PaceLoginPageProps.md)
|
|
57
|
+
- [EventLogoProps](interfaces/EventLogoProps.md)
|
|
58
|
+
- [PublicErrorBoundaryProps](interfaces/PublicErrorBoundaryProps.md)
|
|
59
|
+
- [PublicErrorBoundaryState](interfaces/PublicErrorBoundaryState.md)
|
|
60
|
+
- [PublicLoadingSpinnerProps](interfaces/PublicLoadingSpinnerProps.md)
|
|
61
|
+
- [PublicPageFooterProps](interfaces/PublicPageFooterProps.md)
|
|
62
|
+
- [PublicPageHeaderProps](interfaces/PublicPageHeaderProps.md)
|
|
63
|
+
- [PublicPageLayoutProps](interfaces/PublicPageLayoutProps.md)
|
|
54
64
|
- [ToastProps](interfaces/ToastProps.md)
|
|
55
65
|
- [ToastActionElement](interfaces/ToastActionElement.md)
|
|
56
66
|
- [UserMenuProps](interfaces/UserMenuProps.md)
|
|
67
|
+
- [UsePublicEventReturn](interfaces/UsePublicEventReturn.md)
|
|
68
|
+
- [UsePublicEventOptions](interfaces/UsePublicEventOptions.md)
|
|
69
|
+
- [UsePublicEventLogoReturn](interfaces/UsePublicEventLogoReturn.md)
|
|
70
|
+
- [UsePublicEventLogoOptions](interfaces/UsePublicEventLogoOptions.md)
|
|
71
|
+
- [UsePublicRouteParamsReturn](interfaces/UsePublicRouteParamsReturn.md)
|
|
72
|
+
- [UseInactivityTrackerOptions](interfaces/UseInactivityTrackerOptions.md)
|
|
73
|
+
- [UseInactivityTrackerReturn](interfaces/UseInactivityTrackerReturn.md)
|
|
57
74
|
- [EventContextType](interfaces/EventContextType.md)
|
|
58
75
|
- [EventProviderProps](interfaces/EventProviderProps.md)
|
|
59
76
|
- [UserEventAccess](interfaces/UserEventAccess.md)
|
|
@@ -69,6 +86,15 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
69
86
|
- [OrganisationSecurityError](interfaces/OrganisationSecurityError.md)
|
|
70
87
|
- [OrganisationContextType](interfaces/OrganisationContextType.md)
|
|
71
88
|
- [OrganisationProviderProps](interfaces/OrganisationProviderProps.md)
|
|
89
|
+
- [StorageUploadOptions](interfaces/StorageUploadOptions.md)
|
|
90
|
+
- [StorageFileMetadata](interfaces/StorageFileMetadata.md)
|
|
91
|
+
- [StorageUploadResult](interfaces/StorageUploadResult.md)
|
|
92
|
+
- [StorageUrlOptions](interfaces/StorageUrlOptions.md)
|
|
93
|
+
- [StorageListOptions](interfaces/StorageListOptions.md)
|
|
94
|
+
- [StorageFileInfo](interfaces/StorageFileInfo.md)
|
|
95
|
+
- [StorageListResult](interfaces/StorageListResult.md)
|
|
96
|
+
- [FileSizeLimits](interfaces/FileSizeLimits.md)
|
|
97
|
+
- [StorageConfig](interfaces/StorageConfig.md)
|
|
72
98
|
|
|
73
99
|
### Type Aliases
|
|
74
100
|
|
|
@@ -78,6 +104,10 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
78
104
|
### Variables
|
|
79
105
|
|
|
80
106
|
- [styleConfig](modules.md#styleconfig)
|
|
107
|
+
- [FILE\_SIZE\_LIMITS](modules.md#file_size_limits)
|
|
108
|
+
- [DEFAULT\_FILE\_SIZE\_LIMIT](modules.md#default_file_size_limit)
|
|
109
|
+
- [APP\_PATH\_MAPPING](modules.md#app_path_mapping)
|
|
110
|
+
- [STORAGE\_CONFIG](modules.md#storage_config)
|
|
81
111
|
|
|
82
112
|
### Functions
|
|
83
113
|
|
|
@@ -108,25 +138,12 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
108
138
|
- [DialogFooter](modules.md#dialogfooter)
|
|
109
139
|
- [DialogTitle](modules.md#dialogtitle)
|
|
110
140
|
- [DialogDescription](modules.md#dialogdescription)
|
|
111
|
-
- [DropdownMenu](modules.md#dropdownmenu)
|
|
112
|
-
- [DropdownMenuTrigger](modules.md#dropdownmenutrigger)
|
|
113
|
-
- [DropdownMenuGroup](modules.md#dropdownmenugroup)
|
|
114
|
-
- [DropdownMenuPortal](modules.md#dropdownmenuportal)
|
|
115
|
-
- [DropdownMenuSub](modules.md#dropdownmenusub)
|
|
116
|
-
- [DropdownMenuRadioGroup](modules.md#dropdownmenuradiogroup)
|
|
117
|
-
- [DropdownMenuSubTrigger](modules.md#dropdownmenusubtrigger)
|
|
118
|
-
- [DropdownMenuSubContent](modules.md#dropdownmenusubcontent)
|
|
119
|
-
- [DropdownMenuContent](modules.md#dropdownmenucontent)
|
|
120
|
-
- [DropdownMenuItem](modules.md#dropdownmenuitem)
|
|
121
|
-
- [DropdownMenuCheckboxItem](modules.md#dropdownmenucheckboxitem)
|
|
122
|
-
- [DropdownMenuRadioItem](modules.md#dropdownmenuradioitem)
|
|
123
|
-
- [DropdownMenuLabel](modules.md#dropdownmenulabel)
|
|
124
|
-
- [DropdownMenuSeparator](modules.md#dropdownmenuseparator)
|
|
125
|
-
- [DropdownMenuShortcut](modules.md#dropdownmenushortcut)
|
|
126
141
|
- [EventSelector](modules.md#eventselector)
|
|
142
|
+
- [FileUpload](modules.md#fileupload)
|
|
127
143
|
- [Footer](modules.md#footer)
|
|
128
144
|
- [Form](modules.md#form)
|
|
129
145
|
- [Header](modules.md#header)
|
|
146
|
+
- [InactivityWarningModal](modules.md#inactivitywarningmodal)
|
|
130
147
|
- [Input](modules.md#input)
|
|
131
148
|
- [Label](modules.md#label)
|
|
132
149
|
- [LoadingSpinner](modules.md#loadingspinner)
|
|
@@ -138,6 +155,24 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
138
155
|
- [PasswordChangeForm](modules.md#passwordchangeform)
|
|
139
156
|
- [PasswordResetForm](modules.md#passwordresetform)
|
|
140
157
|
- [Progress](modules.md#progress)
|
|
158
|
+
- [EventLogo](modules.md#eventlogo)
|
|
159
|
+
- [EventLogoCompact](modules.md#eventlogocompact)
|
|
160
|
+
- [EventLogoLarge](modules.md#eventlogolarge)
|
|
161
|
+
- [useErrorBoundary](modules.md#useerrorboundary)
|
|
162
|
+
- [DefaultPublicErrorFallback](modules.md#defaultpublicerrorfallback)
|
|
163
|
+
- [PublicLoadingSpinner](modules.md#publicloadingspinner)
|
|
164
|
+
- [PublicLoadingSpinnerFullPage](modules.md#publicloadingspinnerfullpage)
|
|
165
|
+
- [PublicLoadingSkeleton](modules.md#publicloadingskeleton)
|
|
166
|
+
- [PublicPageContextChecker](modules.md#publicpagecontextchecker)
|
|
167
|
+
- [PublicPageDebugger](modules.md#publicpagedebugger)
|
|
168
|
+
- [PublicPageDiagnostic](modules.md#publicpagediagnostic)
|
|
169
|
+
- [PublicPageFooter](modules.md#publicpagefooter)
|
|
170
|
+
- [PublicPageHeader](modules.md#publicpageheader)
|
|
171
|
+
- [PublicPageLayout](modules.md#publicpagelayout)
|
|
172
|
+
- [usePublicPageContext](modules.md#usepublicpagecontext)
|
|
173
|
+
- [PublicPageProvider](modules.md#publicpageprovider)
|
|
174
|
+
- [usePublicPageProviderContext](modules.md#usepublicpageprovidercontext)
|
|
175
|
+
- [useIsPublicPage](modules.md#useispublicpage)
|
|
141
176
|
- [Select](modules.md#select)
|
|
142
177
|
- [SelectTrigger](modules.md#selecttrigger)
|
|
143
178
|
- [SelectValue](modules.md#selectvalue)
|
|
@@ -169,9 +204,22 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
169
204
|
- [TooltipContent](modules.md#tooltipcontent)
|
|
170
205
|
- [Tooltip](modules.md#tooltip)
|
|
171
206
|
- [UserMenu](modules.md#usermenu)
|
|
207
|
+
- [usePublicEvent](modules.md#usepublicevent)
|
|
208
|
+
- [clearPublicEventCache](modules.md#clearpubliceventcache)
|
|
209
|
+
- [getPublicEventCacheStats](modules.md#getpubliceventcachestats)
|
|
210
|
+
- [usePublicEventLogo](modules.md#usepubliceventlogo)
|
|
211
|
+
- [clearPublicLogoCache](modules.md#clearpubliclogocache)
|
|
212
|
+
- [getPublicLogoCacheStats](modules.md#getpubliclogocachestats)
|
|
213
|
+
- [usePublicRouteParams](modules.md#usepublicrouteparams)
|
|
214
|
+
- [usePublicEventCode](modules.md#usepubliceventcode)
|
|
215
|
+
- [generatePublicRoutePath](modules.md#generatepublicroutepath)
|
|
216
|
+
- [extractEventCodeFromPath](modules.md#extracteventcodefrompath)
|
|
172
217
|
- [useAppConfig](modules.md#useappconfig)
|
|
218
|
+
- [useInactivityTracker](modules.md#useinactivitytracker)
|
|
173
219
|
- [useOrganisationPermissions](modules.md#useorganisationpermissions)
|
|
174
220
|
- [useOrganisationSecurity](modules.md#useorganisationsecurity)
|
|
221
|
+
- [useStorage](modules.md#usestorage)
|
|
222
|
+
- [useFileUpload](modules.md#usefileupload)
|
|
175
223
|
- [useEvents](modules.md#useevents)
|
|
176
224
|
- [EventProvider](modules.md#eventprovider)
|
|
177
225
|
- [OrganisationProvider](modules.md#organisationprovider)
|
|
@@ -191,6 +239,18 @@ import { Dialog, NavigationMenu } from '@jmruthers/pace-core/components';
|
|
|
191
239
|
- [getCurrentAppId](modules.md#getcurrentappid)
|
|
192
240
|
- [cn](modules.md#cn)
|
|
193
241
|
- [createSecureDataAccess](modules.md#createsecuredataaccess)
|
|
242
|
+
- [getFileSizeLimit](modules.md#getfilesizelimit)
|
|
243
|
+
- [validateFileSize](modules.md#validatefilesize)
|
|
244
|
+
- [formatFileSize](modules.md#formatfilesize)
|
|
245
|
+
- [generateFilePath](modules.md#generatefilepath)
|
|
246
|
+
- [generateUniqueFileName](modules.md#generateuniquefilename)
|
|
247
|
+
- [extractFileMetadata](modules.md#extractfilemetadata)
|
|
248
|
+
- [uploadFile](modules.md#uploadfile)
|
|
249
|
+
- [getPublicUrl](modules.md#getpublicurl)
|
|
250
|
+
- [getSignedUrl](modules.md#getsignedurl)
|
|
251
|
+
- [deleteFile](modules.md#deletefile)
|
|
252
|
+
- [listFiles](modules.md#listfiles)
|
|
253
|
+
- [archiveFile](modules.md#archivefile)
|
|
194
254
|
|
|
195
255
|
## Type Aliases
|
|
196
256
|
|
|
@@ -247,19 +307,62 @@ Row identifier function type
|
|
|
247
307
|
|
|
248
308
|
| Name | Type |
|
|
249
309
|
| :------ | :------ |
|
|
250
|
-
| `
|
|
251
|
-
| `
|
|
252
|
-
| `
|
|
253
|
-
| `theme` | \{ `path`: ``"./theme.css"`` = './theme.css'; `description`: ``"Theme mappings for native Tailwind utilities"`` = 'Theme mappings for native Tailwind utilities' } |
|
|
254
|
-
| `theme.path` | ``"./theme.css"`` |
|
|
255
|
-
| `theme.description` | ``"Theme mappings for native Tailwind utilities"`` |
|
|
256
|
-
| `dark` | \{ `path`: ``"./dark.css"`` = './dark.css'; `description`: ``"Dark mode shade remap styles"`` = 'Dark mode shade remap styles' } |
|
|
257
|
-
| `dark.path` | ``"./dark.css"`` |
|
|
258
|
-
| `dark.description` | ``"Dark mode shade remap styles"`` |
|
|
310
|
+
| `core` | \{ `path`: ``"./core.css"`` = './core.css'; `description`: ``"Complete CSS foundation including base styles, theme mappings, fonts, resets, and neutral tokens"`` = 'Complete CSS foundation including base styles, theme mappings, fonts, resets, and neutral tokens' } |
|
|
311
|
+
| `core.path` | ``"./core.css"`` |
|
|
312
|
+
| `core.description` | ``"Complete CSS foundation including base styles, theme mappings, fonts, resets, and neutral tokens"`` |
|
|
259
313
|
|
|
260
314
|
#### Defined in
|
|
261
315
|
|
|
262
|
-
[packages/core/src/styles/index.ts:
|
|
316
|
+
[packages/core/src/styles/index.ts:32](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/styles/index.ts#L32)
|
|
317
|
+
|
|
318
|
+
___
|
|
319
|
+
|
|
320
|
+
### FILE\_SIZE\_LIMITS
|
|
321
|
+
|
|
322
|
+
• `Const` **FILE\_SIZE\_LIMITS**: [`FileSizeLimits`](interfaces/FileSizeLimits.md)
|
|
323
|
+
|
|
324
|
+
File size limits by MIME type (in bytes)
|
|
325
|
+
|
|
326
|
+
#### Defined in
|
|
327
|
+
|
|
328
|
+
[packages/core/src/utils/storage/config.ts:10](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/config.ts#L10)
|
|
329
|
+
|
|
330
|
+
___
|
|
331
|
+
|
|
332
|
+
### DEFAULT\_FILE\_SIZE\_LIMIT
|
|
333
|
+
|
|
334
|
+
• `Const` **DEFAULT\_FILE\_SIZE\_LIMIT**: `number`
|
|
335
|
+
|
|
336
|
+
Default file size limit for unknown MIME types
|
|
337
|
+
|
|
338
|
+
#### Defined in
|
|
339
|
+
|
|
340
|
+
[packages/core/src/utils/storage/config.ts:38](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/config.ts#L38)
|
|
341
|
+
|
|
342
|
+
___
|
|
343
|
+
|
|
344
|
+
### APP\_PATH\_MAPPING
|
|
345
|
+
|
|
346
|
+
• `Const` **APP\_PATH\_MAPPING**: `Record`\<`string`, `string`\>
|
|
347
|
+
|
|
348
|
+
App-specific path mappings for file organization
|
|
349
|
+
Maps app names to their primary category in the organization-first structure
|
|
350
|
+
|
|
351
|
+
#### Defined in
|
|
352
|
+
|
|
353
|
+
[packages/core/src/utils/storage/config.ts:44](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/config.ts#L44)
|
|
354
|
+
|
|
355
|
+
___
|
|
356
|
+
|
|
357
|
+
### STORAGE\_CONFIG
|
|
358
|
+
|
|
359
|
+
• `Const` **STORAGE\_CONFIG**: [`StorageConfig`](interfaces/StorageConfig.md)
|
|
360
|
+
|
|
361
|
+
Storage configuration
|
|
362
|
+
|
|
363
|
+
#### Defined in
|
|
364
|
+
|
|
365
|
+
[packages/core/src/utils/storage/config.ts:54](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/config.ts#L54)
|
|
263
366
|
|
|
264
367
|
## Functions
|
|
265
368
|
|
|
@@ -511,7 +614,7 @@ ___
|
|
|
511
614
|
|
|
512
615
|
| Name | Type |
|
|
513
616
|
| :------ | :------ |
|
|
514
|
-
| `props` | `HTMLAttributes`\<`
|
|
617
|
+
| `props` | `HTMLAttributes`\<`HTMLElement`\> & `RefAttributes`\<`HTMLElement`\> |
|
|
515
618
|
|
|
516
619
|
#### Returns
|
|
517
620
|
|
|
@@ -551,7 +654,7 @@ ___
|
|
|
551
654
|
|
|
552
655
|
| Name | Type |
|
|
553
656
|
| :------ | :------ |
|
|
554
|
-
| `props` | `HTMLAttributes`\<`
|
|
657
|
+
| `props` | `HTMLAttributes`\<`HTMLParagraphElement`\> & `RefAttributes`\<`HTMLParagraphElement`\> |
|
|
555
658
|
|
|
556
659
|
#### Returns
|
|
557
660
|
|
|
@@ -585,17 +688,17 @@ ___
|
|
|
585
688
|
|
|
586
689
|
### DataTable
|
|
587
690
|
|
|
588
|
-
▸ **DataTable**\<`TData`\>(
|
|
691
|
+
▸ **DataTable**\<`TData`\>(`props`): `Element`
|
|
589
692
|
|
|
590
|
-
Enhanced DataTable with comprehensive performance optimizations
|
|
693
|
+
Enhanced DataTable with comprehensive performance optimizations
|
|
591
694
|
|
|
592
695
|
This component automatically detects dataset size and applies appropriate performance optimizations:
|
|
593
|
-
- < 1,000 records: Standard rendering with
|
|
594
|
-
- 1,000
|
|
595
|
-
- 10,000
|
|
596
|
-
-
|
|
696
|
+
- < 1,000 records: Standard rendering with full feature support
|
|
697
|
+
- 1,000+ records: Automatic virtual scrolling with intelligent memory management
|
|
698
|
+
- 10,000+ records: Enhanced chunking and memory optimization
|
|
699
|
+
- 100,000+ records: Advanced server-side processing with virtualization
|
|
597
700
|
|
|
598
|
-
|
|
701
|
+
Features are configured through the unified `features` prop for maximum flexibility.
|
|
599
702
|
|
|
600
703
|
#### Type parameters
|
|
601
704
|
|
|
@@ -607,7 +710,7 @@ All existing DataTable APIs remain fully compatible. Performance features are ad
|
|
|
607
710
|
|
|
608
711
|
| Name | Type |
|
|
609
712
|
| :------ | :------ |
|
|
610
|
-
|
|
|
713
|
+
| `props` | [`DataTableProps`](interfaces/DataTableProps.md)\<`TData`\> |
|
|
611
714
|
|
|
612
715
|
#### Returns
|
|
613
716
|
|
|
@@ -615,7 +718,7 @@ All existing DataTable APIs remain fully compatible. Performance features are ad
|
|
|
615
718
|
|
|
616
719
|
#### Defined in
|
|
617
720
|
|
|
618
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
721
|
+
[packages/core/src/components/DataTable/DataTable.tsx:420](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L420)
|
|
619
722
|
|
|
620
723
|
___
|
|
621
724
|
|
|
@@ -636,7 +739,7 @@ ___
|
|
|
636
739
|
|
|
637
740
|
#### Defined in
|
|
638
741
|
|
|
639
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
742
|
+
[packages/core/src/components/Dialog/Dialog.tsx:288](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L288)
|
|
640
743
|
|
|
641
744
|
___
|
|
642
745
|
|
|
@@ -656,7 +759,7 @@ ___
|
|
|
656
759
|
|
|
657
760
|
#### Defined in
|
|
658
761
|
|
|
659
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
762
|
+
[packages/core/src/components/Dialog/Dialog.tsx:289](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L289)
|
|
660
763
|
|
|
661
764
|
___
|
|
662
765
|
|
|
@@ -677,7 +780,7 @@ ___
|
|
|
677
780
|
|
|
678
781
|
#### Defined in
|
|
679
782
|
|
|
680
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
783
|
+
[packages/core/src/components/Dialog/Dialog.tsx:290](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L290)
|
|
681
784
|
|
|
682
785
|
___
|
|
683
786
|
|
|
@@ -697,7 +800,7 @@ ___
|
|
|
697
800
|
|
|
698
801
|
#### Defined in
|
|
699
802
|
|
|
700
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
803
|
+
[packages/core/src/components/Dialog/Dialog.tsx:291](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L291)
|
|
701
804
|
|
|
702
805
|
___
|
|
703
806
|
|
|
@@ -717,7 +820,7 @@ ___
|
|
|
717
820
|
|
|
718
821
|
#### Defined in
|
|
719
822
|
|
|
720
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
823
|
+
[packages/core/src/components/Dialog/Dialog.tsx:294](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L294)
|
|
721
824
|
|
|
722
825
|
___
|
|
723
826
|
|
|
@@ -760,7 +863,7 @@ JSX.Element - The semantic dialog content with overlay and optional close button
|
|
|
760
863
|
|
|
761
864
|
#### Defined in
|
|
762
865
|
|
|
763
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
866
|
+
[packages/core/src/components/Dialog/Dialog.tsx:437](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L437)
|
|
764
867
|
|
|
765
868
|
___
|
|
766
869
|
|
|
@@ -794,7 +897,7 @@ JSX.Element - The dialog header container using semantic <header> element
|
|
|
794
897
|
|
|
795
898
|
#### Defined in
|
|
796
899
|
|
|
797
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
900
|
+
[packages/core/src/components/Dialog/Dialog.tsx:555](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L555)
|
|
798
901
|
|
|
799
902
|
___
|
|
800
903
|
|
|
@@ -804,6 +907,7 @@ ___
|
|
|
804
907
|
|
|
805
908
|
DialogBody component
|
|
806
909
|
Semantic main content area for dialog body content with scrollable functionality
|
|
910
|
+
Supports both React children and safe HTML content rendering
|
|
807
911
|
|
|
808
912
|
#### Parameters
|
|
809
913
|
|
|
@@ -820,17 +924,24 @@ JSX.Element - The scrollable dialog body container using semantic <main> element
|
|
|
820
924
|
**`Example`**
|
|
821
925
|
|
|
822
926
|
```tsx
|
|
927
|
+
// Using React children
|
|
823
928
|
<DialogBody>
|
|
824
929
|
<section className="space-y-4">
|
|
825
930
|
<h4>Content Title</h4>
|
|
826
931
|
<p>Long content that will scroll...</p>
|
|
827
932
|
</section>
|
|
828
933
|
</DialogBody>
|
|
934
|
+
|
|
935
|
+
// Using HTML content
|
|
936
|
+
<DialogBody
|
|
937
|
+
htmlContent="<h2>Import Instructions</h2><p>Upload a CSV file with the following format:</p><ul><li>Required columns: name, email</li><li>Optional columns: phone, address</li></ul>"
|
|
938
|
+
allowHtml={true}
|
|
939
|
+
/>
|
|
829
940
|
```
|
|
830
941
|
|
|
831
942
|
#### Defined in
|
|
832
943
|
|
|
833
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
944
|
+
[packages/core/src/components/Dialog/Dialog.tsx:596](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L596)
|
|
834
945
|
|
|
835
946
|
___
|
|
836
947
|
|
|
@@ -864,7 +975,7 @@ JSX.Element - The dialog footer container using semantic <footer> element
|
|
|
864
975
|
|
|
865
976
|
#### Defined in
|
|
866
977
|
|
|
867
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
978
|
+
[packages/core/src/components/Dialog/Dialog.tsx:685](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L685)
|
|
868
979
|
|
|
869
980
|
___
|
|
870
981
|
|
|
@@ -884,7 +995,7 @@ ___
|
|
|
884
995
|
|
|
885
996
|
#### Defined in
|
|
886
997
|
|
|
887
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
998
|
+
[packages/core/src/components/Dialog/Dialog.tsx:701](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L701)
|
|
888
999
|
|
|
889
1000
|
___
|
|
890
1001
|
|
|
@@ -904,60 +1015,78 @@ ___
|
|
|
904
1015
|
|
|
905
1016
|
#### Defined in
|
|
906
1017
|
|
|
907
|
-
[packages/core/src/components/Dialog/Dialog.tsx:
|
|
1018
|
+
[packages/core/src/components/Dialog/Dialog.tsx:737](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Dialog/Dialog.tsx#L737)
|
|
908
1019
|
|
|
909
1020
|
___
|
|
910
1021
|
|
|
911
|
-
###
|
|
1022
|
+
### EventSelector
|
|
1023
|
+
|
|
1024
|
+
▸ **EventSelector**(`«destructured»`): ``null`` \| `Element`
|
|
1025
|
+
|
|
1026
|
+
EventSelector component for selecting events with built-in access control
|
|
912
1027
|
|
|
913
|
-
|
|
1028
|
+
This component provides secure event selection with:
|
|
1029
|
+
- Database integration via rbac_event_app_roles table
|
|
1030
|
+
- Auto-selection of next upcoming event by date
|
|
1031
|
+
- Cross-device sync via Supabase user session metadata
|
|
1032
|
+
- localStorage fallback for offline scenarios
|
|
1033
|
+
- Comprehensive error handling and user feedback
|
|
914
1034
|
|
|
915
1035
|
#### Parameters
|
|
916
1036
|
|
|
917
|
-
| Name | Type |
|
|
918
|
-
| :------ | :------ |
|
|
919
|
-
|
|
|
920
|
-
| `deprecatedLegacyContext?` | `any` | **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
|
|
1037
|
+
| Name | Type |
|
|
1038
|
+
| :------ | :------ |
|
|
1039
|
+
| `«destructured»` | `EventSelectorProps` |
|
|
921
1040
|
|
|
922
1041
|
#### Returns
|
|
923
1042
|
|
|
924
|
-
`
|
|
1043
|
+
``null`` \| `Element`
|
|
1044
|
+
|
|
1045
|
+
**`Component`**
|
|
1046
|
+
|
|
1047
|
+
**`Example`**
|
|
1048
|
+
|
|
1049
|
+
```ts
|
|
1050
|
+
<UnifiedAuthProvider supabaseClient={supabase} appName="PACE">
|
|
1051
|
+
<EventSelector onEventChange={(event) => console.log(event)} />
|
|
1052
|
+
</UnifiedAuthProvider>
|
|
1053
|
+
```
|
|
925
1054
|
|
|
926
1055
|
#### Defined in
|
|
927
1056
|
|
|
928
|
-
[packages/core/src/components/
|
|
1057
|
+
[packages/core/src/components/EventSelector/EventSelector.tsx:130](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/EventSelector/EventSelector.tsx#L130)
|
|
929
1058
|
|
|
930
1059
|
___
|
|
931
1060
|
|
|
932
|
-
###
|
|
1061
|
+
### FileUpload
|
|
933
1062
|
|
|
934
|
-
▸ **
|
|
1063
|
+
▸ **FileUpload**(`«destructured»`): `Element`
|
|
935
1064
|
|
|
936
1065
|
#### Parameters
|
|
937
1066
|
|
|
938
1067
|
| Name | Type |
|
|
939
1068
|
| :------ | :------ |
|
|
940
|
-
|
|
|
1069
|
+
| `«destructured»` | [`FileUploadProps`](interfaces/FileUploadProps.md) |
|
|
941
1070
|
|
|
942
1071
|
#### Returns
|
|
943
1072
|
|
|
944
|
-
`
|
|
1073
|
+
`Element`
|
|
945
1074
|
|
|
946
1075
|
#### Defined in
|
|
947
1076
|
|
|
948
|
-
[packages/core/src/components/
|
|
1077
|
+
[packages/core/src/components/FileUpload/FileUpload.tsx:27](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/FileUpload/FileUpload.tsx#L27)
|
|
949
1078
|
|
|
950
1079
|
___
|
|
951
1080
|
|
|
952
|
-
###
|
|
1081
|
+
### Footer
|
|
953
1082
|
|
|
954
|
-
▸ **
|
|
1083
|
+
▸ **Footer**(`props`): `ReactNode`
|
|
955
1084
|
|
|
956
1085
|
#### Parameters
|
|
957
1086
|
|
|
958
1087
|
| Name | Type |
|
|
959
1088
|
| :------ | :------ |
|
|
960
|
-
| `props` | `
|
|
1089
|
+
| `props` | [`FooterProps`](interfaces/FooterProps.md) |
|
|
961
1090
|
|
|
962
1091
|
#### Returns
|
|
963
1092
|
|
|
@@ -965,500 +1094,726 @@ ___
|
|
|
965
1094
|
|
|
966
1095
|
#### Defined in
|
|
967
1096
|
|
|
968
|
-
[packages/core/src/components/
|
|
1097
|
+
[packages/core/src/components/Footer/Footer.tsx:196](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Footer/Footer.tsx#L196)
|
|
969
1098
|
|
|
970
1099
|
___
|
|
971
1100
|
|
|
972
|
-
###
|
|
1101
|
+
### Form
|
|
1102
|
+
|
|
1103
|
+
▸ **Form**\<`TFieldValues`\>(`props`): `Element`
|
|
1104
|
+
|
|
1105
|
+
Form component with validation and React Hook Form integration
|
|
1106
|
+
|
|
1107
|
+
#### Type parameters
|
|
973
1108
|
|
|
974
|
-
|
|
1109
|
+
| Name | Type | Description |
|
|
1110
|
+
| :------ | :------ | :------ |
|
|
1111
|
+
| `TFieldValues` | extends `FieldValues` = `FieldValues` | The type of form field values |
|
|
975
1112
|
|
|
976
1113
|
#### Parameters
|
|
977
1114
|
|
|
978
1115
|
| Name | Type | Description |
|
|
979
1116
|
| :------ | :------ | :------ |
|
|
980
|
-
| `props` | `
|
|
981
|
-
| `deprecatedLegacyContext?` | `any` | **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
|
|
1117
|
+
| `props` | `FormProps`\<`TFieldValues`\> | Form configuration and handlers |
|
|
982
1118
|
|
|
983
1119
|
#### Returns
|
|
984
1120
|
|
|
985
|
-
`
|
|
1121
|
+
`Element`
|
|
1122
|
+
|
|
1123
|
+
JSX.Element - The rendered form with FormProvider context
|
|
1124
|
+
|
|
1125
|
+
**`Example`**
|
|
1126
|
+
|
|
1127
|
+
```tsx
|
|
1128
|
+
<Form
|
|
1129
|
+
schema={userSchema}
|
|
1130
|
+
defaultValues={{ name: "", email: "" }}
|
|
1131
|
+
onSubmit={handleSubmit}
|
|
1132
|
+
mode="onBlur"
|
|
1133
|
+
>
|
|
1134
|
+
<FormField name="name" label="Name" />
|
|
1135
|
+
<FormField name="email" label="Email" />
|
|
1136
|
+
<Button type="submit">Submit</Button>
|
|
1137
|
+
</Form>
|
|
1138
|
+
```
|
|
986
1139
|
|
|
987
1140
|
#### Defined in
|
|
988
1141
|
|
|
989
|
-
[packages/core/src/components/
|
|
1142
|
+
[packages/core/src/components/Form/Form.tsx:142](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Form/Form.tsx#L142)
|
|
990
1143
|
|
|
991
1144
|
___
|
|
992
1145
|
|
|
993
|
-
###
|
|
1146
|
+
### Header
|
|
1147
|
+
|
|
1148
|
+
▸ **Header**(`props`): `Element`
|
|
1149
|
+
|
|
1150
|
+
Header component for application layouts with comprehensive navigation, user management,
|
|
1151
|
+
and customizable branding support.
|
|
1152
|
+
|
|
1153
|
+
A flexible header component that supports various configurations including custom logos,
|
|
1154
|
+
navigation menus, user authentication, event selection, and custom actions.
|
|
994
1155
|
|
|
995
|
-
|
|
1156
|
+
Features:
|
|
1157
|
+
- Customizable logo (URL or custom component)
|
|
1158
|
+
- Navigation menu integration with highlighting
|
|
1159
|
+
- User menu with authentication and password management
|
|
1160
|
+
- Event selector for multi-tenant applications
|
|
1161
|
+
- Custom actions support
|
|
1162
|
+
- Responsive design with mobile considerations
|
|
1163
|
+
- Accessibility compliant with proper ARIA attributes
|
|
1164
|
+
- Backdrop blur effects for modern UI
|
|
1165
|
+
- Flexible layout with configurable sections
|
|
996
1166
|
|
|
997
1167
|
#### Parameters
|
|
998
1168
|
|
|
999
1169
|
| Name | Type | Description |
|
|
1000
1170
|
| :------ | :------ | :------ |
|
|
1001
|
-
| `props` | `
|
|
1002
|
-
| `deprecatedLegacyContext?` | `any` | **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
|
|
1171
|
+
| `props` | `HeaderProps` | Header configuration including logo, navigation, user settings, and custom content |
|
|
1003
1172
|
|
|
1004
1173
|
#### Returns
|
|
1005
1174
|
|
|
1006
|
-
`
|
|
1175
|
+
`Element`
|
|
1007
1176
|
|
|
1008
|
-
|
|
1177
|
+
React element with complete header functionality
|
|
1009
1178
|
|
|
1010
|
-
|
|
1179
|
+
**`Example`**
|
|
1011
1180
|
|
|
1012
|
-
|
|
1181
|
+
Basic header with logo and navigation:
|
|
1182
|
+
```tsx
|
|
1183
|
+
import { Header } from '@jmruthers/pace-core';
|
|
1184
|
+
import { useNavigate, useLocation } from 'react-router-dom';
|
|
1013
1185
|
|
|
1014
|
-
|
|
1186
|
+
function AppHeader() {
|
|
1187
|
+
const navigate = useNavigate();
|
|
1188
|
+
const location = useLocation();
|
|
1015
1189
|
|
|
1016
|
-
|
|
1190
|
+
const navItems = [
|
|
1191
|
+
{ id: 'dashboard', label: 'Dashboard', href: '/dashboard' },
|
|
1192
|
+
{ id: 'meals', label: 'Meals', href: '/meals' },
|
|
1193
|
+
{ id: 'settings', label: 'Settings', href: '/settings' }
|
|
1194
|
+
];
|
|
1017
1195
|
|
|
1018
|
-
|
|
1196
|
+
return (
|
|
1197
|
+
<Header
|
|
1198
|
+
logoUrl="/company-logo.svg"
|
|
1199
|
+
logoAlt="My Company"
|
|
1200
|
+
navItems={navItems}
|
|
1201
|
+
currentPath={location.pathname}
|
|
1202
|
+
onNavigate={(item) => navigate(item.href)}
|
|
1203
|
+
user={currentUser}
|
|
1204
|
+
onSignOut={handleSignOut}
|
|
1205
|
+
/>
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
1208
|
+
```
|
|
1019
1209
|
|
|
1020
|
-
|
|
1021
|
-
| :------ | :------ |
|
|
1022
|
-
| `props` | `DropdownMenuRadioGroupProps` & `RefAttributes`\<`HTMLDivElement`\> |
|
|
1210
|
+
**`Example`**
|
|
1023
1211
|
|
|
1024
|
-
|
|
1212
|
+
Header with custom actions:
|
|
1213
|
+
```tsx
|
|
1214
|
+
import { Header, Button } from '@jmruthers/pace-core';
|
|
1025
1215
|
|
|
1026
|
-
|
|
1216
|
+
function HeaderWithActions() {
|
|
1217
|
+
const customActions = (
|
|
1218
|
+
<div className="flex items-center gap-2">
|
|
1219
|
+
<Button variant="outline" size="sm">Export</Button>
|
|
1220
|
+
<Button size="sm">New Item</Button>
|
|
1221
|
+
</div>
|
|
1222
|
+
);
|
|
1223
|
+
|
|
1224
|
+
return (
|
|
1225
|
+
<Header
|
|
1226
|
+
logoUrl="/logo.svg"
|
|
1227
|
+
navItems={navigationItems}
|
|
1228
|
+
actions={customActions}
|
|
1229
|
+
user={currentUser}
|
|
1230
|
+
onSignOut={handleSignOut}
|
|
1231
|
+
/>
|
|
1232
|
+
);
|
|
1233
|
+
}
|
|
1234
|
+
```
|
|
1235
|
+
|
|
1236
|
+
**`Example`**
|
|
1237
|
+
|
|
1238
|
+
Minimal header configuration:
|
|
1239
|
+
```tsx
|
|
1240
|
+
function MinimalHeader() {
|
|
1241
|
+
return (
|
|
1242
|
+
<Header
|
|
1243
|
+
logoUrl="/simple-logo.svg"
|
|
1244
|
+
logoAlt="Simple App"
|
|
1245
|
+
showEventSelector={false}
|
|
1246
|
+
user={currentUser}
|
|
1247
|
+
onSignOut={handleSignOut}
|
|
1248
|
+
/>
|
|
1249
|
+
);
|
|
1250
|
+
}
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
**`Since`**
|
|
1254
|
+
|
|
1255
|
+
0.1.0
|
|
1027
1256
|
|
|
1028
1257
|
#### Defined in
|
|
1029
1258
|
|
|
1030
|
-
[packages/core/src/components/
|
|
1259
|
+
[packages/core/src/components/Header/Header.tsx:219](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Header/Header.tsx#L219)
|
|
1031
1260
|
|
|
1032
1261
|
___
|
|
1033
1262
|
|
|
1034
|
-
###
|
|
1263
|
+
### InactivityWarningModal
|
|
1035
1264
|
|
|
1036
|
-
▸ **
|
|
1265
|
+
▸ **InactivityWarningModal**(`«destructured»`): `Element`
|
|
1037
1266
|
|
|
1038
1267
|
#### Parameters
|
|
1039
1268
|
|
|
1040
1269
|
| Name | Type |
|
|
1041
1270
|
| :------ | :------ |
|
|
1042
|
-
|
|
|
1271
|
+
| `«destructured»` | [`InactivityWarningModalProps`](interfaces/InactivityWarningModalProps.md) |
|
|
1043
1272
|
|
|
1044
1273
|
#### Returns
|
|
1045
1274
|
|
|
1046
|
-
`
|
|
1275
|
+
`Element`
|
|
1047
1276
|
|
|
1048
1277
|
#### Defined in
|
|
1049
1278
|
|
|
1050
|
-
[packages/core/src/components/
|
|
1279
|
+
[packages/core/src/components/InactivityWarningModal/InactivityWarningModal.tsx:71](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/InactivityWarningModal/InactivityWarningModal.tsx#L71)
|
|
1051
1280
|
|
|
1052
1281
|
___
|
|
1053
1282
|
|
|
1054
|
-
###
|
|
1283
|
+
### Input
|
|
1055
1284
|
|
|
1056
|
-
▸ **
|
|
1285
|
+
▸ **Input**(`props`): `ReactNode`
|
|
1057
1286
|
|
|
1058
|
-
|
|
1059
|
-
|
|
1287
|
+
Input component
|
|
1288
|
+
A flexible, accessible input component with multiple variants and sizes
|
|
1060
1289
|
|
|
1061
1290
|
#### Parameters
|
|
1062
1291
|
|
|
1063
1292
|
| Name | Type | Description |
|
|
1064
1293
|
| :------ | :------ | :------ |
|
|
1065
|
-
| `props` | `
|
|
1294
|
+
| `props` | [`InputProps`](interfaces/InputProps.md) & `RefAttributes`\<`HTMLInputElement`\> | Input configuration and styling |
|
|
1066
1295
|
|
|
1067
1296
|
#### Returns
|
|
1068
1297
|
|
|
1069
1298
|
`ReactNode`
|
|
1070
1299
|
|
|
1071
|
-
JSX.Element - The
|
|
1300
|
+
JSX.Element - The rendered input element
|
|
1072
1301
|
|
|
1073
1302
|
**`Example`**
|
|
1074
1303
|
|
|
1075
1304
|
```tsx
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1305
|
+
// Basic input
|
|
1306
|
+
<Input placeholder="Enter your name" />
|
|
1307
|
+
|
|
1308
|
+
// Input with error state
|
|
1309
|
+
<Input
|
|
1310
|
+
placeholder="Email"
|
|
1311
|
+
type="email"
|
|
1312
|
+
error={true}
|
|
1313
|
+
/>
|
|
1314
|
+
|
|
1315
|
+
// Large input with destructive variant
|
|
1316
|
+
<Input
|
|
1317
|
+
variant="destructive"
|
|
1318
|
+
size="lg"
|
|
1319
|
+
placeholder="Error input"
|
|
1320
|
+
/>
|
|
1080
1321
|
```
|
|
1081
1322
|
|
|
1082
1323
|
#### Defined in
|
|
1083
1324
|
|
|
1084
|
-
[packages/core/src/components/
|
|
1325
|
+
[packages/core/src/components/Input/Input.tsx:104](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Input/Input.tsx#L104)
|
|
1085
1326
|
|
|
1086
1327
|
___
|
|
1087
1328
|
|
|
1088
|
-
###
|
|
1329
|
+
### Label
|
|
1089
1330
|
|
|
1090
|
-
▸ **
|
|
1331
|
+
▸ **Label**(`props`): `ReactNode`
|
|
1091
1332
|
|
|
1092
|
-
|
|
1093
|
-
|
|
1333
|
+
Label component
|
|
1334
|
+
An accessible label with helper text and error state support
|
|
1094
1335
|
|
|
1095
1336
|
#### Parameters
|
|
1096
1337
|
|
|
1097
1338
|
| Name | Type | Description |
|
|
1098
1339
|
| :------ | :------ | :------ |
|
|
1099
|
-
| `props` | `
|
|
1340
|
+
| `props` | [`LabelProps`](interfaces/LabelProps.md) & `RefAttributes`\<`HTMLLabelElement`\> | Label configuration and styling |
|
|
1100
1341
|
|
|
1101
1342
|
#### Returns
|
|
1102
1343
|
|
|
1103
1344
|
`ReactNode`
|
|
1104
1345
|
|
|
1105
|
-
JSX.Element - The
|
|
1346
|
+
JSX.Element - The rendered label with optional helper text and errors
|
|
1106
1347
|
|
|
1107
1348
|
**`Example`**
|
|
1108
1349
|
|
|
1109
1350
|
```tsx
|
|
1110
|
-
<
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
</DropdownMenuContent>
|
|
1351
|
+
<Label htmlFor="email" required helperText="We'll never share your email">
|
|
1352
|
+
Email Address
|
|
1353
|
+
</Label>
|
|
1114
1354
|
```
|
|
1115
1355
|
|
|
1116
1356
|
#### Defined in
|
|
1117
1357
|
|
|
1118
|
-
[packages/core/src/components/
|
|
1358
|
+
[packages/core/src/components/Label/Label.tsx:120](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Label/Label.tsx#L120)
|
|
1119
1359
|
|
|
1120
1360
|
___
|
|
1121
1361
|
|
|
1122
|
-
###
|
|
1362
|
+
### LoadingSpinner
|
|
1123
1363
|
|
|
1124
|
-
▸ **
|
|
1364
|
+
▸ **LoadingSpinner**(`props`, `deprecatedLegacyContext?`): `ReactNode`
|
|
1125
1365
|
|
|
1126
|
-
|
|
1127
|
-
|
|
1366
|
+
LoadingSpinner component
|
|
1367
|
+
A simple, accessible loading spinner for indicating loading states
|
|
1128
1368
|
|
|
1129
1369
|
#### Parameters
|
|
1130
1370
|
|
|
1131
1371
|
| Name | Type | Description |
|
|
1132
1372
|
| :------ | :------ | :------ |
|
|
1133
|
-
| `props` | `
|
|
1373
|
+
| `props` | `LoadingSpinnerProps` | Spinner configuration and styling |
|
|
1374
|
+
| `deprecatedLegacyContext?` | `any` | **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
|
|
1134
1375
|
|
|
1135
1376
|
#### Returns
|
|
1136
1377
|
|
|
1137
1378
|
`ReactNode`
|
|
1138
1379
|
|
|
1139
|
-
JSX.Element - The
|
|
1380
|
+
JSX.Element - The rendered loading spinner
|
|
1140
1381
|
|
|
1141
1382
|
**`Example`**
|
|
1142
1383
|
|
|
1143
1384
|
```tsx
|
|
1144
|
-
<
|
|
1145
|
-
Profile
|
|
1146
|
-
</DropdownMenuItem>
|
|
1385
|
+
<LoadingSpinner size="lg" className="text-main-500" />
|
|
1147
1386
|
```
|
|
1148
1387
|
|
|
1149
1388
|
#### Defined in
|
|
1150
1389
|
|
|
1151
|
-
[packages/core/src/components/
|
|
1390
|
+
[packages/core/src/components/LoadingSpinner/LoadingSpinner.tsx:83](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/LoadingSpinner/LoadingSpinner.tsx#L83)
|
|
1152
1391
|
|
|
1153
1392
|
___
|
|
1154
1393
|
|
|
1155
|
-
###
|
|
1394
|
+
### LoginForm
|
|
1395
|
+
|
|
1396
|
+
▸ **LoginForm**(`props`): `ReactNode`
|
|
1156
1397
|
|
|
1157
|
-
|
|
1398
|
+
LoginForm component that provides a ready-to-use authentication form for user sign-in.
|
|
1399
|
+
It supports validation, loading state, error handling, and can be customized via props.
|
|
1400
|
+
Now includes performance optimizations and onSignUp support.
|
|
1158
1401
|
|
|
1159
1402
|
#### Parameters
|
|
1160
1403
|
|
|
1161
|
-
| Name | Type |
|
|
1162
|
-
| :------ | :------ |
|
|
1163
|
-
| `props` | `
|
|
1404
|
+
| Name | Type | Description |
|
|
1405
|
+
| :------ | :------ | :------ |
|
|
1406
|
+
| `props` | [`LoginFormProps`](interfaces/LoginFormProps.md) | Login form configuration and handlers |
|
|
1164
1407
|
|
|
1165
1408
|
#### Returns
|
|
1166
1409
|
|
|
1167
1410
|
`ReactNode`
|
|
1168
1411
|
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
[packages/core/src/components/DropdownMenu/DropdownMenu.tsx:245](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DropdownMenu/DropdownMenu.tsx#L245)
|
|
1172
|
-
|
|
1173
|
-
___
|
|
1174
|
-
|
|
1175
|
-
### DropdownMenuRadioItem
|
|
1176
|
-
|
|
1177
|
-
▸ **DropdownMenuRadioItem**(`props`): `ReactNode`
|
|
1178
|
-
|
|
1179
|
-
#### Parameters
|
|
1180
|
-
|
|
1181
|
-
| Name | Type |
|
|
1182
|
-
| :------ | :------ |
|
|
1183
|
-
| `props` | `Omit`\<`DropdownMenuRadioItemProps` & `RefAttributes`\<`HTMLDivElement`\>, ``"ref"``\> & `RefAttributes`\<`HTMLDivElement`\> |
|
|
1412
|
+
JSX.Element - The rendered login form
|
|
1184
1413
|
|
|
1185
|
-
|
|
1414
|
+
**`Example`**
|
|
1186
1415
|
|
|
1187
|
-
|
|
1416
|
+
```tsx
|
|
1417
|
+
<LoginForm
|
|
1418
|
+
onSignIn={handleSignIn}
|
|
1419
|
+
onSuccess={() => navigate('/dashboard')}
|
|
1420
|
+
onError={(error) => toast.error(error.message)}
|
|
1421
|
+
isLoading={isAuthenticating}
|
|
1422
|
+
/>
|
|
1423
|
+
```
|
|
1188
1424
|
|
|
1189
1425
|
#### Defined in
|
|
1190
1426
|
|
|
1191
|
-
[packages/core/src/components/
|
|
1427
|
+
[packages/core/src/components/LoginForm/LoginForm.tsx:150](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/LoginForm/LoginForm.tsx#L150)
|
|
1192
1428
|
|
|
1193
1429
|
___
|
|
1194
1430
|
|
|
1195
|
-
###
|
|
1196
|
-
|
|
1197
|
-
▸ **DropdownMenuLabel**(`props`): `ReactNode`
|
|
1198
|
-
|
|
1199
|
-
#### Parameters
|
|
1200
|
-
|
|
1201
|
-
| Name | Type |
|
|
1202
|
-
| :------ | :------ |
|
|
1203
|
-
| `props` | `Omit`\<`DropdownMenuLabelProps` & `RefAttributes`\<`HTMLDivElement`\>, ``"ref"``\> & \{ `inset?`: `boolean` } & `RefAttributes`\<`HTMLDivElement`\> |
|
|
1204
|
-
|
|
1205
|
-
#### Returns
|
|
1206
|
-
|
|
1207
|
-
`ReactNode`
|
|
1208
|
-
|
|
1209
|
-
#### Defined in
|
|
1431
|
+
### NavigationMenu
|
|
1210
1432
|
|
|
1211
|
-
|
|
1433
|
+
▸ **NavigationMenu**(`props`): `ReactNode`
|
|
1212
1434
|
|
|
1213
|
-
|
|
1435
|
+
Unified NavigationMenu component that supports both dropdown and hierarchical navigation modes.
|
|
1214
1436
|
|
|
1215
|
-
|
|
1437
|
+
A flexible navigation menu component with support for icons, current page highlighting,
|
|
1438
|
+
keyboard navigation, and nested menu items.
|
|
1216
1439
|
|
|
1217
|
-
|
|
1440
|
+
Features:
|
|
1441
|
+
- Dropdown mode: Menu button that opens a dropdown list
|
|
1442
|
+
- Hierarchical mode: Expandable tree navigation with nested items
|
|
1443
|
+
- Icon support for navigation items
|
|
1444
|
+
- Current page highlighting
|
|
1445
|
+
- Keyboard navigation support (Enter, Space, Escape)
|
|
1446
|
+
- Accessible design with proper ARIA attributes
|
|
1447
|
+
- Click outside to close (dropdown mode)
|
|
1448
|
+
- Recursive rendering for nested items (hierarchical mode)
|
|
1218
1449
|
|
|
1219
1450
|
#### Parameters
|
|
1220
1451
|
|
|
1221
|
-
| Name | Type |
|
|
1222
|
-
| :------ | :------ |
|
|
1223
|
-
| `props` | `
|
|
1452
|
+
| Name | Type | Description |
|
|
1453
|
+
| :------ | :------ | :------ |
|
|
1454
|
+
| `props` | [`NavigationMenuProps`](interfaces/NavigationMenuProps.md) & `RefAttributes`\<`HTMLDivElement`\> | NavigationMenu component props including items, mode, navigation handlers, and styling options |
|
|
1224
1455
|
|
|
1225
1456
|
#### Returns
|
|
1226
1457
|
|
|
1227
1458
|
`ReactNode`
|
|
1228
1459
|
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
[packages/core/src/components/DropdownMenu/DropdownMenu.tsx:308](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DropdownMenu/DropdownMenu.tsx#L308)
|
|
1460
|
+
React element with navigation menu functionality
|
|
1232
1461
|
|
|
1233
|
-
|
|
1462
|
+
**`Example`**
|
|
1234
1463
|
|
|
1235
|
-
|
|
1464
|
+
Basic dropdown navigation (most common use case):
|
|
1465
|
+
```tsx
|
|
1466
|
+
import { NavigationMenu } from '@jmruthers/pace-core';
|
|
1467
|
+
import { useNavigate, useLocation } from 'react-router-dom';
|
|
1236
1468
|
|
|
1237
|
-
|
|
1469
|
+
function AppNavigation() {
|
|
1470
|
+
const navigate = useNavigate();
|
|
1471
|
+
const location = useLocation();
|
|
1238
1472
|
|
|
1239
|
-
|
|
1473
|
+
const navItems = [
|
|
1474
|
+
{ id: 'home', label: 'Home', href: '/', icon: 'Home' },
|
|
1475
|
+
{ id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },
|
|
1476
|
+
{ id: 'reports', label: 'Reports', href: '/reports', icon: 'FileText' },
|
|
1477
|
+
{ id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
|
|
1478
|
+
];
|
|
1240
1479
|
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1480
|
+
return (
|
|
1481
|
+
<NavigationMenu
|
|
1482
|
+
items={navItems}
|
|
1483
|
+
mode="dropdown"
|
|
1484
|
+
currentPath={location.pathname}
|
|
1485
|
+
onNavigate={(item) => navigate(item.href)}
|
|
1486
|
+
buttonText="Main Menu"
|
|
1487
|
+
showIcons={true}
|
|
1488
|
+
/>
|
|
1489
|
+
);
|
|
1490
|
+
}
|
|
1491
|
+
```
|
|
1244
1492
|
|
|
1245
|
-
|
|
1493
|
+
**`Example`**
|
|
1246
1494
|
|
|
1247
|
-
|
|
1495
|
+
Hierarchical navigation with nested items:
|
|
1496
|
+
```tsx
|
|
1497
|
+
import { NavigationMenu } from '@jmruthers/pace-core';
|
|
1248
1498
|
|
|
1249
|
-
|
|
1499
|
+
function SidebarNavigation() {
|
|
1500
|
+
const hierarchicalItems = [
|
|
1501
|
+
{
|
|
1502
|
+
id: 'user-management',
|
|
1503
|
+
label: 'User Management',
|
|
1504
|
+
icon: 'Users',
|
|
1505
|
+
children: [
|
|
1506
|
+
{ id: 'users-list', label: 'All Users', href: '/users' },
|
|
1507
|
+
{ id: 'users-create', label: 'Create User', href: '/users/create' },
|
|
1508
|
+
{ id: 'user-roles', label: 'User Roles', href: '/users/roles' }
|
|
1509
|
+
]
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
id: 'reports',
|
|
1513
|
+
label: 'Reports',
|
|
1514
|
+
icon: 'BarChart',
|
|
1515
|
+
children: [
|
|
1516
|
+
{ id: 'sales-reports', label: 'Sales Reports', href: '/reports/sales' },
|
|
1517
|
+
{ id: 'user-reports', label: 'User Reports', href: '/reports/users' }
|
|
1518
|
+
]
|
|
1519
|
+
},
|
|
1520
|
+
{ id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
|
|
1521
|
+
];
|
|
1250
1522
|
|
|
1251
|
-
|
|
1523
|
+
return (
|
|
1524
|
+
<NavigationMenu
|
|
1525
|
+
items={hierarchicalItems}
|
|
1526
|
+
mode="hierarchical"
|
|
1527
|
+
currentPath={window.location.pathname}
|
|
1528
|
+
onNavigate={(item) => {
|
|
1529
|
+
if (item.href) {
|
|
1530
|
+
window.location.href = item.href;
|
|
1531
|
+
}
|
|
1532
|
+
}}
|
|
1533
|
+
className="w-64 bg-sec-50 p-4"
|
|
1534
|
+
/>
|
|
1535
|
+
);
|
|
1536
|
+
}
|
|
1537
|
+
```
|
|
1252
1538
|
|
|
1253
|
-
|
|
1539
|
+
**`Example`**
|
|
1254
1540
|
|
|
1255
|
-
|
|
1541
|
+
Integration with React Router and authentication:
|
|
1542
|
+
```tsx
|
|
1543
|
+
import { NavigationMenu } from '@jmruthers/pace-core';
|
|
1544
|
+
import { useNavigate, useLocation } from 'react-router-dom';
|
|
1545
|
+
import { useUnifiedAuth } from '@jmruthers/pace-core/providers';
|
|
1256
1546
|
|
|
1257
|
-
|
|
1547
|
+
function AuthenticatedNavigation() {
|
|
1548
|
+
const navigate = useNavigate();
|
|
1549
|
+
const location = useLocation();
|
|
1550
|
+
const { hasRole, hasPermission } = useUnifiedAuth();
|
|
1258
1551
|
|
|
1259
|
-
|
|
1552
|
+
// Build navigation items with permission requirements
|
|
1553
|
+
const navItems = [
|
|
1554
|
+
{
|
|
1555
|
+
id: 'dashboard',
|
|
1556
|
+
label: 'Dashboard',
|
|
1557
|
+
href: '/dashboard',
|
|
1558
|
+
icon: 'LayoutDashboard',
|
|
1559
|
+
permissions: ['dashboard:read']
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
id: 'meals',
|
|
1563
|
+
label: 'Meals',
|
|
1564
|
+
href: '/meals',
|
|
1565
|
+
icon: 'UtensilsCrossed',
|
|
1566
|
+
permissions: ['meals:read']
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
id: 'admin',
|
|
1570
|
+
label: 'Admin Panel',
|
|
1571
|
+
href: '/admin',
|
|
1572
|
+
icon: 'Shield',
|
|
1573
|
+
roles: ['admin', 'super_admin']
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
id: 'profile',
|
|
1577
|
+
label: 'Profile',
|
|
1578
|
+
href: '/profile',
|
|
1579
|
+
icon: 'User'
|
|
1580
|
+
}
|
|
1581
|
+
];
|
|
1260
1582
|
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1583
|
+
return (
|
|
1584
|
+
<NavigationMenu
|
|
1585
|
+
items={navItems}
|
|
1586
|
+
mode="dropdown"
|
|
1587
|
+
currentPath={location.pathname}
|
|
1588
|
+
onNavigate={(item) => navigate(item.href)}
|
|
1589
|
+
buttonText="Navigation"
|
|
1590
|
+
navigationLabel="Main application navigation"
|
|
1591
|
+
filterByPermissions={true}
|
|
1592
|
+
auditLog={true}
|
|
1593
|
+
/>
|
|
1594
|
+
);
|
|
1595
|
+
}
|
|
1596
|
+
```
|
|
1267
1597
|
|
|
1268
|
-
|
|
1598
|
+
**`Example`**
|
|
1269
1599
|
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1600
|
+
Custom navigation with external links and actions:
|
|
1601
|
+
```tsx
|
|
1602
|
+
import { NavigationMenu } from '@jmruthers/pace-core';
|
|
1273
1603
|
|
|
1274
|
-
|
|
1604
|
+
function CustomNavigation() {
|
|
1605
|
+
const handleNavigation = (item) => {
|
|
1606
|
+
if (item.id === 'logout') {
|
|
1607
|
+
// Handle logout action
|
|
1608
|
+
handleLogout();
|
|
1609
|
+
} else if (item.href?.startsWith('http')) {
|
|
1610
|
+
// Handle external links
|
|
1611
|
+
window.open(item.href, '_blank');
|
|
1612
|
+
} else if (item.href) {
|
|
1613
|
+
// Handle internal navigation
|
|
1614
|
+
navigate(item.href);
|
|
1615
|
+
}
|
|
1616
|
+
};
|
|
1275
1617
|
|
|
1276
|
-
|
|
1618
|
+
const navItems = [
|
|
1619
|
+
{ id: 'home', label: 'Home', href: '/', icon: 'Home' },
|
|
1620
|
+
{ id: 'help', label: 'Help Center', href: 'https://help.example.com', icon: 'HelpCircle' },
|
|
1621
|
+
{ id: 'logout', label: 'Sign Out', icon: 'LogOut' } // No href for actions
|
|
1622
|
+
];
|
|
1277
1623
|
|
|
1278
|
-
|
|
1624
|
+
return (
|
|
1625
|
+
<NavigationMenu
|
|
1626
|
+
items={navItems}
|
|
1627
|
+
mode="dropdown"
|
|
1628
|
+
onNavigate={handleNavigation}
|
|
1629
|
+
buttonText="Menu"
|
|
1630
|
+
disabled={false}
|
|
1631
|
+
/>
|
|
1632
|
+
);
|
|
1633
|
+
}
|
|
1634
|
+
```
|
|
1279
1635
|
|
|
1280
|
-
**`
|
|
1636
|
+
**`Since`**
|
|
1281
1637
|
|
|
1282
|
-
|
|
1283
|
-
<UnifiedAuthProvider supabaseClient={supabase} appName="PACE">
|
|
1284
|
-
<EventSelector onEventChange={(event) => console.log(event)} />
|
|
1285
|
-
</UnifiedAuthProvider>
|
|
1286
|
-
```
|
|
1638
|
+
0.1.0
|
|
1287
1639
|
|
|
1288
1640
|
#### Defined in
|
|
1289
1641
|
|
|
1290
|
-
[packages/core/src/components/
|
|
1642
|
+
[packages/core/src/components/NavigationMenu/NavigationMenu.tsx:394](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/NavigationMenu/NavigationMenu.tsx#L394)
|
|
1291
1643
|
|
|
1292
1644
|
___
|
|
1293
1645
|
|
|
1294
|
-
###
|
|
1646
|
+
### OrganisationSelector
|
|
1295
1647
|
|
|
1296
|
-
▸ **
|
|
1648
|
+
▸ **OrganisationSelector**(`«destructured»`): ``null`` \| `Element`
|
|
1649
|
+
|
|
1650
|
+
OrganisationSelector component for secure organisation switching
|
|
1651
|
+
|
|
1652
|
+
This component provides secure organisation selection with:
|
|
1653
|
+
- User membership validation
|
|
1654
|
+
- Role-based access display
|
|
1655
|
+
- Security error handling
|
|
1656
|
+
- Real-time organisation switching
|
|
1657
|
+
- Accessible interface design
|
|
1658
|
+
|
|
1659
|
+
Security: Only shows organisations the user has valid access to
|
|
1297
1660
|
|
|
1298
1661
|
#### Parameters
|
|
1299
1662
|
|
|
1300
1663
|
| Name | Type |
|
|
1301
1664
|
| :------ | :------ |
|
|
1302
|
-
|
|
|
1665
|
+
| `«destructured»` | `OrganisationSelectorProps` |
|
|
1303
1666
|
|
|
1304
1667
|
#### Returns
|
|
1305
1668
|
|
|
1306
|
-
`
|
|
1669
|
+
``null`` \| `Element`
|
|
1307
1670
|
|
|
1308
1671
|
#### Defined in
|
|
1309
1672
|
|
|
1310
|
-
[packages/core/src/components/
|
|
1673
|
+
[packages/core/src/components/OrganisationSelector/OrganisationSelector.tsx:96](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/OrganisationSelector/OrganisationSelector.tsx#L96)
|
|
1311
1674
|
|
|
1312
1675
|
___
|
|
1313
1676
|
|
|
1314
|
-
###
|
|
1677
|
+
### PaceAppLayout
|
|
1315
1678
|
|
|
1316
|
-
▸ **
|
|
1679
|
+
▸ **PaceAppLayout**(`props`): `Element`
|
|
1317
1680
|
|
|
1318
|
-
|
|
1681
|
+
A consistent layout component for all PACE suite applications that provides a standard
|
|
1682
|
+
structure with header, main content area, and footer.
|
|
1319
1683
|
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
| Name | Type | Description |
|
|
1323
|
-
| :------ | :------ | :------ |
|
|
1324
|
-
| `TFieldValues` | extends `FieldValues` = `FieldValues` | The type of form field values |
|
|
1325
|
-
|
|
1326
|
-
#### Parameters
|
|
1327
|
-
|
|
1328
|
-
| Name | Type | Description |
|
|
1329
|
-
| :------ | :------ | :------ |
|
|
1330
|
-
| `props` | `FormProps`\<`TFieldValues`\> | Form configuration and handlers |
|
|
1331
|
-
|
|
1332
|
-
#### Returns
|
|
1333
|
-
|
|
1334
|
-
`Element`
|
|
1335
|
-
|
|
1336
|
-
JSX.Element - The rendered form with FormProvider context
|
|
1337
|
-
|
|
1338
|
-
**`Example`**
|
|
1339
|
-
|
|
1340
|
-
```tsx
|
|
1341
|
-
<Form
|
|
1342
|
-
schema={userSchema}
|
|
1343
|
-
defaultValues={{ name: "", email: "" }}
|
|
1344
|
-
onSubmit={handleSubmit}
|
|
1345
|
-
mode="onBlur"
|
|
1346
|
-
>
|
|
1347
|
-
<FormField name="name" label="Name" />
|
|
1348
|
-
<FormField name="email" label="Email" />
|
|
1349
|
-
<Button type="submit">Submit</Button>
|
|
1350
|
-
</Form>
|
|
1351
|
-
```
|
|
1352
|
-
|
|
1353
|
-
#### Defined in
|
|
1354
|
-
|
|
1355
|
-
[packages/core/src/components/Form/Form.tsx:142](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Form/Form.tsx#L142)
|
|
1356
|
-
|
|
1357
|
-
___
|
|
1358
|
-
|
|
1359
|
-
### Header
|
|
1360
|
-
|
|
1361
|
-
▸ **Header**(`props`): `Element`
|
|
1362
|
-
|
|
1363
|
-
Header component for application layouts with comprehensive navigation, user management,
|
|
1364
|
-
and customizable branding support.
|
|
1684
|
+
NEW: This component now includes layout-level permission enforcement to ensure
|
|
1685
|
+
consuming apps can't forget to implement permission checks on individual pages.
|
|
1365
1686
|
|
|
1366
|
-
|
|
1367
|
-
|
|
1687
|
+
This component is designed to work with React Router's nested routing pattern using
|
|
1688
|
+
Outlet to render child routes. It provides integrated authentication, navigation,
|
|
1689
|
+
and user management functionality.
|
|
1368
1690
|
|
|
1369
1691
|
Features:
|
|
1370
|
-
-
|
|
1371
|
-
-
|
|
1372
|
-
-
|
|
1373
|
-
-
|
|
1374
|
-
-
|
|
1375
|
-
-
|
|
1376
|
-
-
|
|
1377
|
-
-
|
|
1378
|
-
-
|
|
1692
|
+
- React Router v6 integration with nested routing
|
|
1693
|
+
- Unified authentication integration
|
|
1694
|
+
- Consistent header with navigation and user menu
|
|
1695
|
+
- Flexible main content area with Outlet
|
|
1696
|
+
- Footer with application branding
|
|
1697
|
+
- User sign-out and password change functionality
|
|
1698
|
+
- Responsive design and accessibility compliant
|
|
1699
|
+
- Layout-level permission enforcement
|
|
1700
|
+
- Permission-based navigation filtering
|
|
1701
|
+
- Automatic page permission validation
|
|
1379
1702
|
|
|
1380
1703
|
#### Parameters
|
|
1381
1704
|
|
|
1382
1705
|
| Name | Type | Description |
|
|
1383
1706
|
| :------ | :------ | :------ |
|
|
1384
|
-
| `props` | `
|
|
1707
|
+
| `props` | [`PaceAppLayoutProps`](interfaces/PaceAppLayoutProps.md) | Layout configuration including app name for branding and permission settings |
|
|
1385
1708
|
|
|
1386
1709
|
#### Returns
|
|
1387
1710
|
|
|
1388
1711
|
`Element`
|
|
1389
1712
|
|
|
1390
|
-
React element with complete
|
|
1713
|
+
React element with complete application layout structure and permission enforcement
|
|
1391
1714
|
|
|
1392
1715
|
**`Example`**
|
|
1393
1716
|
|
|
1394
|
-
Basic
|
|
1717
|
+
Basic React Router setup with permission enforcement (RECOMMENDED):
|
|
1395
1718
|
```tsx
|
|
1396
|
-
import {
|
|
1397
|
-
import {
|
|
1398
|
-
|
|
1399
|
-
function AppHeader() {
|
|
1400
|
-
const navigate = useNavigate();
|
|
1401
|
-
const location = useLocation();
|
|
1402
|
-
|
|
1403
|
-
const navItems = [
|
|
1404
|
-
{ id: 'dashboard', label: 'Dashboard', href: '/dashboard' },
|
|
1405
|
-
{ id: 'meals', label: 'Meals', href: '/meals' },
|
|
1406
|
-
{ id: 'settings', label: 'Settings', href: '/settings' }
|
|
1407
|
-
];
|
|
1719
|
+
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
|
1720
|
+
import { UnifiedAuthProvider } from '@jmruthers/pace-core/providers';
|
|
1721
|
+
import { PaceAppLayout, PaceLoginPage } from '@jmruthers/pace-core';
|
|
1408
1722
|
|
|
1723
|
+
function App() {
|
|
1409
1724
|
return (
|
|
1410
|
-
<
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1725
|
+
<UnifiedAuthProvider supabaseClient={supabase} appName="My App">
|
|
1726
|
+
<Router>
|
|
1727
|
+
<Routes>
|
|
1728
|
+
<Route path="/login" element={<PaceLoginPage appName="My App" />} />
|
|
1729
|
+
<Route path="/" element={
|
|
1730
|
+
<PaceAppLayout
|
|
1731
|
+
appName="My Application"
|
|
1732
|
+
enforcePermissions={true}
|
|
1733
|
+
defaultPermission="read"
|
|
1734
|
+
/>
|
|
1735
|
+
}>
|
|
1736
|
+
<Route index element={<HomePage />} />
|
|
1737
|
+
<Route path="dashboard" element={<DashboardPage />} />
|
|
1738
|
+
<Route path="meals" element={<MealsPage />} />
|
|
1739
|
+
</Route>
|
|
1740
|
+
</Routes>
|
|
1741
|
+
</Router>
|
|
1742
|
+
</UnifiedAuthProvider>
|
|
1419
1743
|
);
|
|
1420
1744
|
}
|
|
1421
1745
|
```
|
|
1422
1746
|
|
|
1423
1747
|
**`Example`**
|
|
1424
1748
|
|
|
1425
|
-
|
|
1749
|
+
Custom navigation items with permission filtering:
|
|
1426
1750
|
```tsx
|
|
1427
|
-
import {
|
|
1751
|
+
import { NavigationItem } from '@jmruthers/pace-core';
|
|
1428
1752
|
|
|
1429
|
-
function
|
|
1430
|
-
const
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
);
|
|
1753
|
+
function App() {
|
|
1754
|
+
const customNavItems: NavigationItem[] = [
|
|
1755
|
+
{ id: 'components', label: 'Components', href: '/components', icon: 'Component' },
|
|
1756
|
+
{ id: 'styles', label: 'Styles', href: '/styles', icon: 'Palette' },
|
|
1757
|
+
{ id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }
|
|
1758
|
+
];
|
|
1436
1759
|
|
|
1437
1760
|
return (
|
|
1438
|
-
<
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1761
|
+
<Router>
|
|
1762
|
+
<Routes>
|
|
1763
|
+
<Route path="/" element={
|
|
1764
|
+
<PaceAppLayout
|
|
1765
|
+
appName="My Custom App"
|
|
1766
|
+
navItems={customNavItems}
|
|
1767
|
+
enforcePermissions={true}
|
|
1768
|
+
filterNavigationByPermissions={true}
|
|
1769
|
+
routePermissions={{
|
|
1770
|
+
'/components': 'read',
|
|
1771
|
+
'/styles': 'read',
|
|
1772
|
+
'/meals': 'read'
|
|
1773
|
+
}}
|
|
1774
|
+
/>
|
|
1775
|
+
}>
|
|
1776
|
+
<Route path="components" element={<ComponentsPage />} />
|
|
1777
|
+
<Route path="styles" element={<StylesPage />} />
|
|
1778
|
+
<Route path="meals" element={<MealsPage />} />
|
|
1779
|
+
</Route>
|
|
1780
|
+
</Routes>
|
|
1781
|
+
</Router>
|
|
1445
1782
|
);
|
|
1446
1783
|
}
|
|
1447
1784
|
```
|
|
1448
1785
|
|
|
1449
1786
|
**`Example`**
|
|
1450
1787
|
|
|
1451
|
-
|
|
1788
|
+
Route-specific permissions with custom page IDs:
|
|
1452
1789
|
```tsx
|
|
1453
|
-
function
|
|
1790
|
+
function AdminApp() {
|
|
1454
1791
|
return (
|
|
1455
|
-
<
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1792
|
+
<Router>
|
|
1793
|
+
<Routes>
|
|
1794
|
+
<Route path="/" element={
|
|
1795
|
+
<PaceAppLayout
|
|
1796
|
+
appName="Admin Panel"
|
|
1797
|
+
enforcePermissions={true}
|
|
1798
|
+
routePermissions={{
|
|
1799
|
+
'/dashboard': 'read',
|
|
1800
|
+
'/user-management': 'read',
|
|
1801
|
+
'/system-settings': 'update'
|
|
1802
|
+
}}
|
|
1803
|
+
pageIdMapping={{
|
|
1804
|
+
'/dashboard': 'dashboard',
|
|
1805
|
+
'/user-management': 'user-management',
|
|
1806
|
+
'/system-settings': 'system-admin'
|
|
1807
|
+
}}
|
|
1808
|
+
permissionFallback={<AccessDeniedPage />}
|
|
1809
|
+
/>
|
|
1810
|
+
}>
|
|
1811
|
+
<Route path="dashboard" element={<DashboardPage />} />
|
|
1812
|
+
<Route path="user-management" element={<UserManagementPage />} />
|
|
1813
|
+
<Route path="system-settings" element={<SystemSettingsPage />} />
|
|
1814
|
+
</Route>
|
|
1815
|
+
</Routes>
|
|
1816
|
+
</Router>
|
|
1462
1817
|
);
|
|
1463
1818
|
}
|
|
1464
1819
|
```
|
|
@@ -1469,372 +1824,327 @@ function MinimalHeader() {
|
|
|
1469
1824
|
|
|
1470
1825
|
#### Defined in
|
|
1471
1826
|
|
|
1472
|
-
[packages/core/src/components/
|
|
1827
|
+
[packages/core/src/components/PaceAppLayout/PaceAppLayout.tsx:320](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PaceAppLayout/PaceAppLayout.tsx#L320)
|
|
1473
1828
|
|
|
1474
1829
|
___
|
|
1475
1830
|
|
|
1476
|
-
###
|
|
1831
|
+
### PaceLoginPage
|
|
1477
1832
|
|
|
1478
|
-
▸ **
|
|
1833
|
+
▸ **PaceLoginPage**(`props`, `deprecatedLegacyContext?`): `ReactNode`
|
|
1479
1834
|
|
|
1480
|
-
|
|
1481
|
-
|
|
1835
|
+
A consistent, reusable login page for all PACE suite applications.
|
|
1836
|
+
It handles the sign-in logic with role-based automatic redirection for admin users,
|
|
1837
|
+
enhanced error handling, and dual loading state management.
|
|
1838
|
+
|
|
1839
|
+
Recent enhancements:
|
|
1840
|
+
- Role-based redirection: Admin users are automatically redirected
|
|
1841
|
+
- Enhanced error handling with navigation error recovery
|
|
1842
|
+
- Dual loading states: auth loading + form submission loading
|
|
1843
|
+
- Error persistence: Auth errors are displayed below the form
|
|
1844
|
+
- Navigation safety: Try-catch blocks prevent navigation errors
|
|
1482
1845
|
|
|
1483
1846
|
#### Parameters
|
|
1484
1847
|
|
|
1485
1848
|
| Name | Type | Description |
|
|
1486
1849
|
| :------ | :------ | :------ |
|
|
1487
|
-
| `props` | [`
|
|
1850
|
+
| `props` | [`PaceLoginPageProps`](interfaces/PaceLoginPageProps.md) | Login page configuration including app name and redirect path |
|
|
1851
|
+
| `deprecatedLegacyContext?` | `any` | **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
|
|
1488
1852
|
|
|
1489
1853
|
#### Returns
|
|
1490
1854
|
|
|
1491
1855
|
`ReactNode`
|
|
1492
1856
|
|
|
1493
|
-
JSX.Element - The rendered
|
|
1857
|
+
JSX.Element - The rendered login page with enhanced functionality
|
|
1494
1858
|
|
|
1495
1859
|
**`Example`**
|
|
1496
1860
|
|
|
1497
1861
|
```tsx
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
// Input with error state
|
|
1502
|
-
<Input
|
|
1503
|
-
placeholder="Email"
|
|
1504
|
-
type="email"
|
|
1505
|
-
error={true}
|
|
1506
|
-
/>
|
|
1507
|
-
|
|
1508
|
-
// Large input with destructive variant
|
|
1509
|
-
<Input
|
|
1510
|
-
variant="destructive"
|
|
1511
|
-
size="lg"
|
|
1512
|
-
placeholder="Error input"
|
|
1862
|
+
<PaceLoginPage
|
|
1863
|
+
appName="My Application"
|
|
1864
|
+
onSuccessRedirectPath="/dashboard"
|
|
1513
1865
|
/>
|
|
1514
1866
|
```
|
|
1515
1867
|
|
|
1516
1868
|
#### Defined in
|
|
1517
1869
|
|
|
1518
|
-
[packages/core/src/components/
|
|
1870
|
+
[packages/core/src/components/PaceLoginPage/PaceLoginPage.tsx:160](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PaceLoginPage/PaceLoginPage.tsx#L160)
|
|
1519
1871
|
|
|
1520
1872
|
___
|
|
1521
1873
|
|
|
1522
|
-
###
|
|
1523
|
-
|
|
1524
|
-
▸ **Label**(`props`): `ReactNode`
|
|
1874
|
+
### PasswordChangeForm
|
|
1525
1875
|
|
|
1526
|
-
|
|
1527
|
-
An accessible label with helper text and error state support
|
|
1876
|
+
▸ **PasswordChangeForm**(`«destructured»`): `Element`
|
|
1528
1877
|
|
|
1529
1878
|
#### Parameters
|
|
1530
1879
|
|
|
1531
|
-
| Name | Type |
|
|
1532
|
-
| :------ | :------ |
|
|
1533
|
-
|
|
|
1880
|
+
| Name | Type |
|
|
1881
|
+
| :------ | :------ |
|
|
1882
|
+
| `«destructured»` | `PasswordChangeFormProps` |
|
|
1534
1883
|
|
|
1535
1884
|
#### Returns
|
|
1536
1885
|
|
|
1537
|
-
`
|
|
1886
|
+
`Element`
|
|
1538
1887
|
|
|
1539
|
-
|
|
1888
|
+
#### Defined in
|
|
1540
1889
|
|
|
1541
|
-
|
|
1890
|
+
[packages/core/src/components/PasswordReset/PasswordChangeForm.tsx:116](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PasswordReset/PasswordChangeForm.tsx#L116)
|
|
1542
1891
|
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1892
|
+
___
|
|
1893
|
+
|
|
1894
|
+
### PasswordResetForm
|
|
1895
|
+
|
|
1896
|
+
▸ **PasswordResetForm**(`«destructured»`): `Element`
|
|
1897
|
+
|
|
1898
|
+
#### Parameters
|
|
1899
|
+
|
|
1900
|
+
| Name | Type |
|
|
1901
|
+
| :------ | :------ |
|
|
1902
|
+
| `«destructured»` | `PasswordResetFormProps` |
|
|
1903
|
+
|
|
1904
|
+
#### Returns
|
|
1905
|
+
|
|
1906
|
+
`Element`
|
|
1548
1907
|
|
|
1549
1908
|
#### Defined in
|
|
1550
1909
|
|
|
1551
|
-
[packages/core/src/components/
|
|
1910
|
+
[packages/core/src/components/PasswordReset/PasswordResetForm.tsx:94](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PasswordReset/PasswordResetForm.tsx#L94)
|
|
1552
1911
|
|
|
1553
1912
|
___
|
|
1554
1913
|
|
|
1555
|
-
###
|
|
1914
|
+
### Progress
|
|
1556
1915
|
|
|
1557
|
-
▸ **
|
|
1916
|
+
▸ **Progress**(`props`): `ReactNode`
|
|
1558
1917
|
|
|
1559
|
-
|
|
1560
|
-
|
|
1918
|
+
Progress component
|
|
1919
|
+
An accessible progress bar with smooth animations
|
|
1561
1920
|
|
|
1562
1921
|
#### Parameters
|
|
1563
1922
|
|
|
1564
1923
|
| Name | Type | Description |
|
|
1565
1924
|
| :------ | :------ | :------ |
|
|
1566
|
-
| `props` | `
|
|
1567
|
-
| `deprecatedLegacyContext?` | `any` | **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
|
|
1925
|
+
| `props` | `ProgressProps` & `RefAttributes`\<`HTMLDivElement`\> | Progress configuration and styling |
|
|
1568
1926
|
|
|
1569
1927
|
#### Returns
|
|
1570
1928
|
|
|
1571
1929
|
`ReactNode`
|
|
1572
1930
|
|
|
1573
|
-
JSX.Element - The rendered
|
|
1931
|
+
JSX.Element - The rendered progress bar
|
|
1574
1932
|
|
|
1575
1933
|
**`Example`**
|
|
1576
1934
|
|
|
1577
1935
|
```tsx
|
|
1578
|
-
<
|
|
1936
|
+
<Progress value={75} max={100} />
|
|
1579
1937
|
```
|
|
1580
1938
|
|
|
1581
1939
|
#### Defined in
|
|
1582
1940
|
|
|
1583
|
-
[packages/core/src/components/
|
|
1941
|
+
[packages/core/src/components/Progress/Progress.tsx:90](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Progress/Progress.tsx#L90)
|
|
1584
1942
|
|
|
1585
1943
|
___
|
|
1586
1944
|
|
|
1587
|
-
###
|
|
1945
|
+
### EventLogo
|
|
1588
1946
|
|
|
1589
|
-
▸ **
|
|
1947
|
+
▸ **EventLogo**(`props`): ``null`` \| `Element`
|
|
1590
1948
|
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1949
|
+
Component for displaying event logos with fallback to initials
|
|
1950
|
+
|
|
1951
|
+
This component is context-aware and automatically detects whether it's being used
|
|
1952
|
+
in a public or authenticated context. It fetches and displays event logos from storage,
|
|
1953
|
+
with automatic fallback to event initials if no logo is available.
|
|
1594
1954
|
|
|
1595
1955
|
#### Parameters
|
|
1596
1956
|
|
|
1597
1957
|
| Name | Type | Description |
|
|
1598
1958
|
| :------ | :------ | :------ |
|
|
1599
|
-
| `props` | [`
|
|
1959
|
+
| `props` | [`EventLogoProps`](interfaces/EventLogoProps.md) | Logo configuration and styling |
|
|
1600
1960
|
|
|
1601
1961
|
#### Returns
|
|
1602
1962
|
|
|
1603
|
-
`
|
|
1963
|
+
``null`` \| `Element`
|
|
1604
1964
|
|
|
1605
|
-
|
|
1965
|
+
React element with event logo or fallback
|
|
1606
1966
|
|
|
1607
|
-
|
|
1967
|
+
#### Defined in
|
|
1608
1968
|
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1969
|
+
[packages/core/src/components/PublicLayout/EventLogo.tsx:111](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/EventLogo.tsx#L111)
|
|
1970
|
+
|
|
1971
|
+
___
|
|
1972
|
+
|
|
1973
|
+
### EventLogoCompact
|
|
1974
|
+
|
|
1975
|
+
▸ **EventLogoCompact**(`props`): `Element`
|
|
1976
|
+
|
|
1977
|
+
Compact event logo for small spaces
|
|
1978
|
+
|
|
1979
|
+
#### Parameters
|
|
1980
|
+
|
|
1981
|
+
| Name | Type |
|
|
1982
|
+
| :------ | :------ |
|
|
1983
|
+
| `props` | [`EventLogoProps`](interfaces/EventLogoProps.md) |
|
|
1984
|
+
|
|
1985
|
+
#### Returns
|
|
1986
|
+
|
|
1987
|
+
`Element`
|
|
1617
1988
|
|
|
1618
1989
|
#### Defined in
|
|
1619
1990
|
|
|
1620
|
-
[packages/core/src/components/
|
|
1991
|
+
[packages/core/src/components/PublicLayout/EventLogo.tsx:266](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/EventLogo.tsx#L266)
|
|
1621
1992
|
|
|
1622
1993
|
___
|
|
1623
1994
|
|
|
1624
|
-
###
|
|
1995
|
+
### EventLogoLarge
|
|
1625
1996
|
|
|
1626
|
-
▸ **
|
|
1997
|
+
▸ **EventLogoLarge**(`props`): `Element`
|
|
1627
1998
|
|
|
1628
|
-
|
|
1999
|
+
Large event logo for prominent display
|
|
1629
2000
|
|
|
1630
|
-
|
|
1631
|
-
keyboard navigation, and nested menu items.
|
|
2001
|
+
#### Parameters
|
|
1632
2002
|
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
2003
|
+
| Name | Type |
|
|
2004
|
+
| :------ | :------ |
|
|
2005
|
+
| `props` | [`EventLogoProps`](interfaces/EventLogoProps.md) |
|
|
2006
|
+
|
|
2007
|
+
#### Returns
|
|
2008
|
+
|
|
2009
|
+
`Element`
|
|
2010
|
+
|
|
2011
|
+
#### Defined in
|
|
2012
|
+
|
|
2013
|
+
[packages/core/src/components/PublicLayout/EventLogo.tsx:279](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/EventLogo.tsx#L279)
|
|
2014
|
+
|
|
2015
|
+
___
|
|
2016
|
+
|
|
2017
|
+
### useErrorBoundary
|
|
2018
|
+
|
|
2019
|
+
▸ **useErrorBoundary**(): `Object`
|
|
2020
|
+
|
|
2021
|
+
Hook for accessing error boundary state
|
|
2022
|
+
Useful for components that need to know if they're inside an error boundary
|
|
2023
|
+
|
|
2024
|
+
#### Returns
|
|
2025
|
+
|
|
2026
|
+
`Object`
|
|
2027
|
+
|
|
2028
|
+
| Name | Type |
|
|
2029
|
+
| :------ | :------ |
|
|
2030
|
+
| `captureError` | (`error`: `Error`) => `void` |
|
|
2031
|
+
| `resetError` | () => `void` |
|
|
2032
|
+
|
|
2033
|
+
#### Defined in
|
|
2034
|
+
|
|
2035
|
+
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:216](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx#L216)
|
|
2036
|
+
|
|
2037
|
+
___
|
|
2038
|
+
|
|
2039
|
+
### DefaultPublicErrorFallback
|
|
2040
|
+
|
|
2041
|
+
▸ **DefaultPublicErrorFallback**(`«destructured»`): `Element`
|
|
2042
|
+
|
|
2043
|
+
Default error fallback component
|
|
1642
2044
|
|
|
1643
2045
|
#### Parameters
|
|
1644
2046
|
|
|
1645
|
-
| Name | Type |
|
|
1646
|
-
| :------ | :------ |
|
|
1647
|
-
|
|
|
2047
|
+
| Name | Type |
|
|
2048
|
+
| :------ | :------ |
|
|
2049
|
+
| `«destructured»` | [`PublicErrorBoundaryState`](interfaces/PublicErrorBoundaryState.md) |
|
|
1648
2050
|
|
|
1649
2051
|
#### Returns
|
|
1650
2052
|
|
|
1651
|
-
`
|
|
2053
|
+
`Element`
|
|
1652
2054
|
|
|
1653
|
-
|
|
2055
|
+
#### Defined in
|
|
1654
2056
|
|
|
1655
|
-
|
|
2057
|
+
[packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx:239](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicErrorBoundary.tsx#L239)
|
|
1656
2058
|
|
|
1657
|
-
|
|
1658
|
-
```tsx
|
|
1659
|
-
import { NavigationMenu } from '@jmruthers/pace-core';
|
|
1660
|
-
import { useNavigate, useLocation } from 'react-router-dom';
|
|
2059
|
+
___
|
|
1661
2060
|
|
|
1662
|
-
|
|
1663
|
-
const navigate = useNavigate();
|
|
1664
|
-
const location = useLocation();
|
|
2061
|
+
### PublicLoadingSpinner
|
|
1665
2062
|
|
|
1666
|
-
|
|
1667
|
-
{ id: 'home', label: 'Home', href: '/', icon: 'Home' },
|
|
1668
|
-
{ id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },
|
|
1669
|
-
{ id: 'reports', label: 'Reports', href: '/reports', icon: 'FileText' },
|
|
1670
|
-
{ id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
|
|
1671
|
-
];
|
|
2063
|
+
▸ **PublicLoadingSpinner**(`props`): `Element`
|
|
1672
2064
|
|
|
1673
|
-
|
|
1674
|
-
<NavigationMenu
|
|
1675
|
-
items={navItems}
|
|
1676
|
-
mode="dropdown"
|
|
1677
|
-
currentPath={location.pathname}
|
|
1678
|
-
onNavigate={(item) => navigate(item.href)}
|
|
1679
|
-
buttonText="Main Menu"
|
|
1680
|
-
showIcons={true}
|
|
1681
|
-
/>
|
|
1682
|
-
);
|
|
1683
|
-
}
|
|
1684
|
-
```
|
|
2065
|
+
Loading spinner component for public pages
|
|
1685
2066
|
|
|
1686
|
-
|
|
2067
|
+
This component displays a consistent loading state with optional
|
|
2068
|
+
branding and messaging for public pages.
|
|
1687
2069
|
|
|
1688
|
-
|
|
1689
|
-
```tsx
|
|
1690
|
-
import { NavigationMenu } from '@jmruthers/pace-core';
|
|
2070
|
+
#### Parameters
|
|
1691
2071
|
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
id: 'user-management',
|
|
1696
|
-
label: 'User Management',
|
|
1697
|
-
icon: 'Users',
|
|
1698
|
-
children: [
|
|
1699
|
-
{ id: 'users-list', label: 'All Users', href: '/users' },
|
|
1700
|
-
{ id: 'users-create', label: 'Create User', href: '/users/create' },
|
|
1701
|
-
{ id: 'user-roles', label: 'User Roles', href: '/users/roles' }
|
|
1702
|
-
]
|
|
1703
|
-
},
|
|
1704
|
-
{
|
|
1705
|
-
id: 'reports',
|
|
1706
|
-
label: 'Reports',
|
|
1707
|
-
icon: 'BarChart',
|
|
1708
|
-
children: [
|
|
1709
|
-
{ id: 'sales-reports', label: 'Sales Reports', href: '/reports/sales' },
|
|
1710
|
-
{ id: 'user-reports', label: 'User Reports', href: '/reports/users' }
|
|
1711
|
-
]
|
|
1712
|
-
},
|
|
1713
|
-
{ id: 'settings', label: 'Settings', href: '/settings', icon: 'Settings' }
|
|
1714
|
-
];
|
|
2072
|
+
| Name | Type | Description |
|
|
2073
|
+
| :------ | :------ | :------ |
|
|
2074
|
+
| `props` | [`PublicLoadingSpinnerProps`](interfaces/PublicLoadingSpinnerProps.md) | Spinner configuration and styling |
|
|
1715
2075
|
|
|
1716
|
-
|
|
1717
|
-
<NavigationMenu
|
|
1718
|
-
items={hierarchicalItems}
|
|
1719
|
-
mode="hierarchical"
|
|
1720
|
-
currentPath={window.location.pathname}
|
|
1721
|
-
onNavigate={(item) => {
|
|
1722
|
-
if (item.href) {
|
|
1723
|
-
window.location.href = item.href;
|
|
1724
|
-
}
|
|
1725
|
-
}}
|
|
1726
|
-
className="w-64 bg-gray-50 p-4"
|
|
1727
|
-
/>
|
|
1728
|
-
);
|
|
1729
|
-
}
|
|
1730
|
-
```
|
|
2076
|
+
#### Returns
|
|
1731
2077
|
|
|
1732
|
-
|
|
2078
|
+
`Element`
|
|
1733
2079
|
|
|
1734
|
-
|
|
1735
|
-
```tsx
|
|
1736
|
-
import { NavigationMenu } from '@jmruthers/pace-core';
|
|
1737
|
-
import { useNavigate, useLocation } from 'react-router-dom';
|
|
1738
|
-
import { useUnifiedAuth } from '@jmruthers/pace-core/providers';
|
|
2080
|
+
React element with loading spinner
|
|
1739
2081
|
|
|
1740
|
-
|
|
1741
|
-
const navigate = useNavigate();
|
|
1742
|
-
const location = useLocation();
|
|
1743
|
-
const { hasRole, hasPermission } = useUnifiedAuth();
|
|
2082
|
+
#### Defined in
|
|
1744
2083
|
|
|
1745
|
-
|
|
1746
|
-
const navItems = [
|
|
1747
|
-
{ id: 'dashboard', label: 'Dashboard', href: '/dashboard', icon: 'LayoutDashboard' },
|
|
1748
|
-
...(hasPermission('meals:read') ? [
|
|
1749
|
-
{ id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }
|
|
1750
|
-
] : []),
|
|
1751
|
-
...(hasRole('admin') ? [
|
|
1752
|
-
{ id: 'admin', label: 'Admin Panel', href: '/admin', icon: 'Shield' }
|
|
1753
|
-
] : []),
|
|
1754
|
-
{ id: 'profile', label: 'Profile', href: '/profile', icon: 'User' }
|
|
1755
|
-
];
|
|
2084
|
+
[packages/core/src/components/PublicLayout/PublicLoadingSpinner.tsx:75](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicLoadingSpinner.tsx#L75)
|
|
1756
2085
|
|
|
1757
|
-
|
|
1758
|
-
<NavigationMenu
|
|
1759
|
-
items={navItems}
|
|
1760
|
-
mode="dropdown"
|
|
1761
|
-
currentPath={location.pathname}
|
|
1762
|
-
onNavigate={(item) => navigate(item.href)}
|
|
1763
|
-
buttonText="Navigation"
|
|
1764
|
-
navigationLabel="Main application navigation"
|
|
1765
|
-
/>
|
|
1766
|
-
);
|
|
1767
|
-
}
|
|
1768
|
-
```
|
|
2086
|
+
___
|
|
1769
2087
|
|
|
1770
|
-
|
|
2088
|
+
### PublicLoadingSpinnerFullPage
|
|
1771
2089
|
|
|
1772
|
-
|
|
1773
|
-
```tsx
|
|
1774
|
-
import { NavigationMenu } from '@jmruthers/pace-core';
|
|
2090
|
+
▸ **PublicLoadingSpinnerFullPage**(`«destructured»`): `Element`
|
|
1775
2091
|
|
|
1776
|
-
|
|
1777
|
-
const handleNavigation = (item) => {
|
|
1778
|
-
if (item.id === 'logout') {
|
|
1779
|
-
// Handle logout action
|
|
1780
|
-
handleLogout();
|
|
1781
|
-
} else if (item.href?.startsWith('http')) {
|
|
1782
|
-
// Handle external links
|
|
1783
|
-
window.open(item.href, '_blank');
|
|
1784
|
-
} else if (item.href) {
|
|
1785
|
-
// Handle internal navigation
|
|
1786
|
-
navigate(item.href);
|
|
1787
|
-
}
|
|
1788
|
-
};
|
|
2092
|
+
Full page loading spinner with event branding
|
|
1789
2093
|
|
|
1790
|
-
|
|
1791
|
-
{ id: 'home', label: 'Home', href: '/', icon: 'Home' },
|
|
1792
|
-
{ id: 'help', label: 'Help Center', href: 'https://help.example.com', icon: 'HelpCircle' },
|
|
1793
|
-
{ id: 'logout', label: 'Sign Out', icon: 'LogOut' } // No href for actions
|
|
1794
|
-
];
|
|
2094
|
+
#### Parameters
|
|
1795
2095
|
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
mode="dropdown"
|
|
1800
|
-
onNavigate={handleNavigation}
|
|
1801
|
-
buttonText="Menu"
|
|
1802
|
-
disabled={false}
|
|
1803
|
-
/>
|
|
1804
|
-
);
|
|
1805
|
-
}
|
|
1806
|
-
```
|
|
2096
|
+
| Name | Type |
|
|
2097
|
+
| :------ | :------ |
|
|
2098
|
+
| `«destructured»` | `Pick`\<[`PublicLoadingSpinnerProps`](interfaces/PublicLoadingSpinnerProps.md), ``"message"`` \| ``"className"``\> & \{ `eventName?`: `string` } |
|
|
1807
2099
|
|
|
1808
|
-
|
|
2100
|
+
#### Returns
|
|
1809
2101
|
|
|
1810
|
-
|
|
2102
|
+
`Element`
|
|
1811
2103
|
|
|
1812
2104
|
#### Defined in
|
|
1813
2105
|
|
|
1814
|
-
[packages/core/src/components/
|
|
2106
|
+
[packages/core/src/components/PublicLayout/PublicLoadingSpinner.tsx:135](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicLoadingSpinner.tsx#L135)
|
|
1815
2107
|
|
|
1816
2108
|
___
|
|
1817
2109
|
|
|
1818
|
-
###
|
|
2110
|
+
### PublicLoadingSkeleton
|
|
1819
2111
|
|
|
1820
|
-
▸ **
|
|
2112
|
+
▸ **PublicLoadingSkeleton**(`«destructured»`): `Element`
|
|
1821
2113
|
|
|
1822
|
-
|
|
2114
|
+
Skeleton loading component for content placeholders
|
|
1823
2115
|
|
|
1824
|
-
|
|
1825
|
-
- User membership validation
|
|
1826
|
-
- Role-based access display
|
|
1827
|
-
- Security error handling
|
|
1828
|
-
- Real-time organisation switching
|
|
1829
|
-
- Accessible interface design
|
|
2116
|
+
#### Parameters
|
|
1830
2117
|
|
|
1831
|
-
|
|
2118
|
+
| Name | Type | Default value |
|
|
2119
|
+
| :------ | :------ | :------ |
|
|
2120
|
+
| `«destructured»` | `Object` | `undefined` |
|
|
2121
|
+
| › `lines?` | `number` | `3` |
|
|
2122
|
+
| › `className?` | `string` | `''` |
|
|
2123
|
+
|
|
2124
|
+
#### Returns
|
|
2125
|
+
|
|
2126
|
+
`Element`
|
|
2127
|
+
|
|
2128
|
+
#### Defined in
|
|
2129
|
+
|
|
2130
|
+
[packages/core/src/components/PublicLayout/PublicLoadingSpinner.tsx:189](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicLoadingSpinner.tsx#L189)
|
|
2131
|
+
|
|
2132
|
+
___
|
|
2133
|
+
|
|
2134
|
+
### PublicPageContextChecker
|
|
2135
|
+
|
|
2136
|
+
▸ **PublicPageContextChecker**(`«destructured»`): ``null`` \| `Element`
|
|
2137
|
+
|
|
2138
|
+
Context checker component that immediately identifies authentication context issues
|
|
2139
|
+
|
|
2140
|
+
This component will immediately log to console if authentication context
|
|
2141
|
+
is being triggered in a public page.
|
|
1832
2142
|
|
|
1833
2143
|
#### Parameters
|
|
1834
2144
|
|
|
1835
2145
|
| Name | Type |
|
|
1836
2146
|
| :------ | :------ |
|
|
1837
|
-
| `«destructured»` | `
|
|
2147
|
+
| `«destructured»` | `PublicPageContextCheckerProps` |
|
|
1838
2148
|
|
|
1839
2149
|
#### Returns
|
|
1840
2150
|
|
|
@@ -1842,236 +2152,189 @@ Security: Only shows organisations the user has valid access to
|
|
|
1842
2152
|
|
|
1843
2153
|
#### Defined in
|
|
1844
2154
|
|
|
1845
|
-
[packages/core/src/components/
|
|
2155
|
+
[packages/core/src/components/PublicLayout/PublicPageContextChecker.tsx:27](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageContextChecker.tsx#L27)
|
|
1846
2156
|
|
|
1847
2157
|
___
|
|
1848
2158
|
|
|
1849
|
-
###
|
|
2159
|
+
### PublicPageDebugger
|
|
1850
2160
|
|
|
1851
|
-
▸ **
|
|
2161
|
+
▸ **PublicPageDebugger**(`«destructured»`): ``null`` \| `Element`
|
|
1852
2162
|
|
|
1853
|
-
|
|
1854
|
-
structure with header, main content area, and footer.
|
|
2163
|
+
Debugger component that logs context information
|
|
1855
2164
|
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
This component is designed to work with React Router's nested routing pattern using
|
|
1860
|
-
Outlet to render child routes. It provides integrated authentication, navigation,
|
|
1861
|
-
and user management functionality.
|
|
1862
|
-
|
|
1863
|
-
Features:
|
|
1864
|
-
- React Router v6 integration with nested routing
|
|
1865
|
-
- Unified authentication integration
|
|
1866
|
-
- Consistent header with navigation and user menu
|
|
1867
|
-
- Flexible main content area with Outlet
|
|
1868
|
-
- Footer with application branding
|
|
1869
|
-
- User sign-out and password change functionality
|
|
1870
|
-
- Responsive design and accessibility compliant
|
|
1871
|
-
- Layout-level permission enforcement
|
|
1872
|
-
- Permission-based navigation filtering
|
|
1873
|
-
- Automatic page permission validation
|
|
2165
|
+
This component helps identify why authentication context
|
|
2166
|
+
is being triggered in public pages.
|
|
1874
2167
|
|
|
1875
2168
|
#### Parameters
|
|
1876
2169
|
|
|
1877
|
-
| Name | Type |
|
|
1878
|
-
| :------ | :------ |
|
|
1879
|
-
|
|
|
2170
|
+
| Name | Type |
|
|
2171
|
+
| :------ | :------ |
|
|
2172
|
+
| `«destructured»` | `PublicPageDebuggerProps` |
|
|
1880
2173
|
|
|
1881
2174
|
#### Returns
|
|
1882
2175
|
|
|
1883
|
-
`Element`
|
|
2176
|
+
``null`` \| `Element`
|
|
1884
2177
|
|
|
1885
|
-
|
|
2178
|
+
#### Defined in
|
|
1886
2179
|
|
|
1887
|
-
|
|
2180
|
+
[packages/core/src/components/PublicLayout/PublicPageDebugger.tsx:27](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageDebugger.tsx#L27)
|
|
1888
2181
|
|
|
1889
|
-
|
|
1890
|
-
```tsx
|
|
1891
|
-
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
|
1892
|
-
import { UnifiedAuthProvider } from '@jmruthers/pace-core/providers';
|
|
1893
|
-
import { PaceAppLayout, PaceLoginPage } from '@jmruthers/pace-core';
|
|
2182
|
+
___
|
|
1894
2183
|
|
|
1895
|
-
|
|
1896
|
-
return (
|
|
1897
|
-
<UnifiedAuthProvider supabaseClient={supabase} appName="My App">
|
|
1898
|
-
<Router>
|
|
1899
|
-
<Routes>
|
|
1900
|
-
<Route path="/login" element={<PaceLoginPage appName="My App" />} />
|
|
1901
|
-
<Route path="/" element={
|
|
1902
|
-
<PaceAppLayout
|
|
1903
|
-
appName="My Application"
|
|
1904
|
-
enforcePermissions={true}
|
|
1905
|
-
defaultPermission="read"
|
|
1906
|
-
/>
|
|
1907
|
-
}>
|
|
1908
|
-
<Route index element={<HomePage />} />
|
|
1909
|
-
<Route path="dashboard" element={<DashboardPage />} />
|
|
1910
|
-
<Route path="meals" element={<MealsPage />} />
|
|
1911
|
-
</Route>
|
|
1912
|
-
</Routes>
|
|
1913
|
-
</Router>
|
|
1914
|
-
</UnifiedAuthProvider>
|
|
1915
|
-
);
|
|
1916
|
-
}
|
|
1917
|
-
```
|
|
2184
|
+
### PublicPageDiagnostic
|
|
1918
2185
|
|
|
1919
|
-
|
|
2186
|
+
▸ **PublicPageDiagnostic**(`«destructured»`): ``null`` \| `Element`
|
|
1920
2187
|
|
|
1921
|
-
|
|
1922
|
-
```tsx
|
|
1923
|
-
import { NavigationItem } from '@jmruthers/pace-core';
|
|
2188
|
+
Diagnostic component that identifies authentication context issues
|
|
1924
2189
|
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
{ id: 'components', label: 'Components', href: '/components', icon: 'Component' },
|
|
1928
|
-
{ id: 'styles', label: 'Styles', href: '/styles', icon: 'Palette' },
|
|
1929
|
-
{ id: 'meals', label: 'Meals', href: '/meals', icon: 'UtensilsCrossed' }
|
|
1930
|
-
];
|
|
2190
|
+
This component will help you identify exactly where the problem is
|
|
2191
|
+
in your public page implementation.
|
|
1931
2192
|
|
|
1932
|
-
|
|
1933
|
-
<Router>
|
|
1934
|
-
<Routes>
|
|
1935
|
-
<Route path="/" element={
|
|
1936
|
-
<PaceAppLayout
|
|
1937
|
-
appName="My Custom App"
|
|
1938
|
-
navItems={customNavItems}
|
|
1939
|
-
enforcePermissions={true}
|
|
1940
|
-
filterNavigationByPermissions={true}
|
|
1941
|
-
routePermissions={{
|
|
1942
|
-
'/components': 'read',
|
|
1943
|
-
'/styles': 'read',
|
|
1944
|
-
'/meals': 'read'
|
|
1945
|
-
}}
|
|
1946
|
-
/>
|
|
1947
|
-
}>
|
|
1948
|
-
<Route path="components" element={<ComponentsPage />} />
|
|
1949
|
-
<Route path="styles" element={<StylesPage />} />
|
|
1950
|
-
<Route path="meals" element={<MealsPage />} />
|
|
1951
|
-
</Route>
|
|
1952
|
-
</Routes>
|
|
1953
|
-
</Router>
|
|
1954
|
-
);
|
|
1955
|
-
}
|
|
1956
|
-
```
|
|
2193
|
+
#### Parameters
|
|
1957
2194
|
|
|
1958
|
-
|
|
2195
|
+
| Name | Type |
|
|
2196
|
+
| :------ | :------ |
|
|
2197
|
+
| `«destructured»` | `PublicPageDiagnosticProps` |
|
|
1959
2198
|
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
permissionFallback={<AccessDeniedPage />}
|
|
1981
|
-
/>
|
|
1982
|
-
}>
|
|
1983
|
-
<Route path="dashboard" element={<DashboardPage />} />
|
|
1984
|
-
<Route path="user-management" element={<UserManagementPage />} />
|
|
1985
|
-
<Route path="system-settings" element={<SystemSettingsPage />} />
|
|
1986
|
-
</Route>
|
|
1987
|
-
</Routes>
|
|
1988
|
-
</Router>
|
|
1989
|
-
);
|
|
1990
|
-
}
|
|
1991
|
-
```
|
|
2199
|
+
#### Returns
|
|
2200
|
+
|
|
2201
|
+
``null`` \| `Element`
|
|
2202
|
+
|
|
2203
|
+
#### Defined in
|
|
2204
|
+
|
|
2205
|
+
[packages/core/src/components/PublicLayout/PublicPageDiagnostic.tsx:27](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageDiagnostic.tsx#L27)
|
|
2206
|
+
|
|
2207
|
+
___
|
|
2208
|
+
|
|
2209
|
+
### PublicPageFooter
|
|
2210
|
+
|
|
2211
|
+
▸ **PublicPageFooter**(`props`): `Element`
|
|
2212
|
+
|
|
2213
|
+
Footer component for public pages that matches the normal Footer exactly
|
|
2214
|
+
|
|
2215
|
+
This component uses the same styling and structure as the main Footer component
|
|
2216
|
+
to ensure consistency across the application.
|
|
2217
|
+
|
|
2218
|
+
#### Parameters
|
|
1992
2219
|
|
|
1993
|
-
|
|
2220
|
+
| Name | Type | Description |
|
|
2221
|
+
| :------ | :------ | :------ |
|
|
2222
|
+
| `props` | [`PublicPageFooterProps`](interfaces/PublicPageFooterProps.md) | Footer configuration and content |
|
|
1994
2223
|
|
|
1995
|
-
|
|
2224
|
+
#### Returns
|
|
2225
|
+
|
|
2226
|
+
`Element`
|
|
2227
|
+
|
|
2228
|
+
React element with public page footer
|
|
1996
2229
|
|
|
1997
2230
|
#### Defined in
|
|
1998
2231
|
|
|
1999
|
-
[packages/core/src/components/
|
|
2232
|
+
[packages/core/src/components/PublicLayout/PublicPageFooter.tsx:79](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageFooter.tsx#L79)
|
|
2000
2233
|
|
|
2001
2234
|
___
|
|
2002
2235
|
|
|
2003
|
-
###
|
|
2236
|
+
### PublicPageHeader
|
|
2004
2237
|
|
|
2005
|
-
▸ **
|
|
2238
|
+
▸ **PublicPageHeader**(`props`): `Element`
|
|
2006
2239
|
|
|
2007
|
-
|
|
2008
|
-
It handles the sign-in logic with role-based automatic redirection for admin users,
|
|
2009
|
-
enhanced error handling, and dual loading state management.
|
|
2240
|
+
Header component for public pages with event-specific branding
|
|
2010
2241
|
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
- Enhanced error handling with navigation error recovery
|
|
2014
|
-
- Dual loading states: auth loading + form submission loading
|
|
2015
|
-
- Error persistence: Auth errors are displayed below the form
|
|
2016
|
-
- Navigation safety: Try-catch blocks prevent navigation errors
|
|
2242
|
+
This component displays the app logo, event logo, and event information
|
|
2243
|
+
in a clean, accessible layout suitable for public pages.
|
|
2017
2244
|
|
|
2018
2245
|
#### Parameters
|
|
2019
2246
|
|
|
2020
2247
|
| Name | Type | Description |
|
|
2021
2248
|
| :------ | :------ | :------ |
|
|
2022
|
-
| `props` | [`
|
|
2023
|
-
| `deprecatedLegacyContext?` | `any` | **`See`** [React Docs](https://legacy.reactjs.org/docs/legacy-context.html#referencing-context-in-lifecycle-methods) |
|
|
2249
|
+
| `props` | [`PublicPageHeaderProps`](interfaces/PublicPageHeaderProps.md) | Header configuration and content |
|
|
2024
2250
|
|
|
2025
2251
|
#### Returns
|
|
2026
2252
|
|
|
2027
|
-
`
|
|
2028
|
-
|
|
2029
|
-
JSX.Element - The rendered login page with enhanced functionality
|
|
2030
|
-
|
|
2031
|
-
**`Example`**
|
|
2253
|
+
`Element`
|
|
2032
2254
|
|
|
2033
|
-
|
|
2034
|
-
<PaceLoginPage
|
|
2035
|
-
appName="My Application"
|
|
2036
|
-
onSuccessRedirectPath="/dashboard"
|
|
2037
|
-
/>
|
|
2038
|
-
```
|
|
2255
|
+
React element with public page header
|
|
2039
2256
|
|
|
2040
2257
|
#### Defined in
|
|
2041
2258
|
|
|
2042
|
-
[packages/core/src/components/
|
|
2259
|
+
[packages/core/src/components/PublicLayout/PublicPageHeader.tsx:85](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageHeader.tsx#L85)
|
|
2043
2260
|
|
|
2044
2261
|
___
|
|
2045
2262
|
|
|
2046
|
-
###
|
|
2263
|
+
### PublicPageLayout
|
|
2047
2264
|
|
|
2048
|
-
▸ **
|
|
2265
|
+
▸ **PublicPageLayout**(`props`): `Element`
|
|
2266
|
+
|
|
2267
|
+
Layout component for public pages that don't require authentication
|
|
2268
|
+
|
|
2269
|
+
This component provides a consistent structure for public event pages
|
|
2270
|
+
with event-specific branding, error handling, and loading states.
|
|
2049
2271
|
|
|
2050
2272
|
#### Parameters
|
|
2051
2273
|
|
|
2052
|
-
| Name | Type |
|
|
2053
|
-
| :------ | :------ |
|
|
2054
|
-
|
|
|
2274
|
+
| Name | Type | Description |
|
|
2275
|
+
| :------ | :------ | :------ |
|
|
2276
|
+
| `props` | [`PublicPageLayoutProps`](interfaces/PublicPageLayoutProps.md) | Layout configuration and content |
|
|
2055
2277
|
|
|
2056
2278
|
#### Returns
|
|
2057
2279
|
|
|
2058
2280
|
`Element`
|
|
2059
2281
|
|
|
2282
|
+
React element with complete public page layout
|
|
2283
|
+
|
|
2060
2284
|
#### Defined in
|
|
2061
2285
|
|
|
2062
|
-
[packages/core/src/components/
|
|
2286
|
+
[packages/core/src/components/PublicLayout/PublicPageLayout.tsx:101](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageLayout.tsx#L101)
|
|
2063
2287
|
|
|
2064
2288
|
___
|
|
2065
2289
|
|
|
2066
|
-
###
|
|
2290
|
+
### usePublicPageContext
|
|
2067
2291
|
|
|
2068
|
-
▸ **
|
|
2292
|
+
▸ **usePublicPageContext**(): `Object`
|
|
2293
|
+
|
|
2294
|
+
Hook for accessing public page context
|
|
2295
|
+
Provides access to event data and layout state within public pages
|
|
2296
|
+
|
|
2297
|
+
This hook is no longer needed as PublicPageLayout no longer
|
|
2298
|
+
automatically fetches event data. Use usePublicRouteParams and usePublicEvent
|
|
2299
|
+
directly in your components instead.
|
|
2300
|
+
|
|
2301
|
+
#### Returns
|
|
2302
|
+
|
|
2303
|
+
`Object`
|
|
2304
|
+
|
|
2305
|
+
| Name | Type |
|
|
2306
|
+
| :------ | :------ |
|
|
2307
|
+
| `eventCode` | ``null`` |
|
|
2308
|
+
| `eventId` | ``null`` |
|
|
2309
|
+
| `event` | ``null`` |
|
|
2310
|
+
| `isLoading` | `boolean` |
|
|
2311
|
+
| `error` | ``null`` |
|
|
2312
|
+
| `refetch` | () => `Promise`\<`void`\> |
|
|
2313
|
+
| `isPublicPage` | `boolean` |
|
|
2314
|
+
|
|
2315
|
+
#### Defined in
|
|
2316
|
+
|
|
2317
|
+
[packages/core/src/components/PublicLayout/PublicPageLayout.tsx:221](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageLayout.tsx#L221)
|
|
2318
|
+
|
|
2319
|
+
___
|
|
2320
|
+
|
|
2321
|
+
### PublicPageProvider
|
|
2322
|
+
|
|
2323
|
+
▸ **PublicPageProvider**(`«destructured»`): `Element`
|
|
2324
|
+
|
|
2325
|
+
Provider for public pages that completely isolates them from authentication context
|
|
2326
|
+
|
|
2327
|
+
This provider:
|
|
2328
|
+
- Does not initialize any authentication providers
|
|
2329
|
+
- Provides environment variables for public data access
|
|
2330
|
+
- Includes error boundary for graceful error handling
|
|
2331
|
+
- Is completely separate from the main app context
|
|
2069
2332
|
|
|
2070
2333
|
#### Parameters
|
|
2071
2334
|
|
|
2072
2335
|
| Name | Type |
|
|
2073
2336
|
| :------ | :------ |
|
|
2074
|
-
| `«destructured»` | `
|
|
2337
|
+
| `«destructured»` | `PublicPageProviderProps` |
|
|
2075
2338
|
|
|
2076
2339
|
#### Returns
|
|
2077
2340
|
|
|
@@ -2079,38 +2342,43 @@ ___
|
|
|
2079
2342
|
|
|
2080
2343
|
#### Defined in
|
|
2081
2344
|
|
|
2082
|
-
[packages/core/src/components/
|
|
2345
|
+
[packages/core/src/components/PublicLayout/PublicPageProvider.tsx:64](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageProvider.tsx#L64)
|
|
2083
2346
|
|
|
2084
2347
|
___
|
|
2085
2348
|
|
|
2086
|
-
###
|
|
2349
|
+
### usePublicPageProviderContext
|
|
2087
2350
|
|
|
2088
|
-
▸ **
|
|
2351
|
+
▸ **usePublicPageProviderContext**(): `PublicPageContextType`
|
|
2089
2352
|
|
|
2090
|
-
|
|
2091
|
-
An accessible progress bar with smooth animations
|
|
2353
|
+
Hook to access public page context
|
|
2092
2354
|
|
|
2093
|
-
####
|
|
2355
|
+
#### Returns
|
|
2094
2356
|
|
|
2095
|
-
|
|
2096
|
-
| :------ | :------ | :------ |
|
|
2097
|
-
| `props` | `ProgressProps` & `RefAttributes`\<`HTMLDivElement`\> | Progress configuration and styling |
|
|
2357
|
+
`PublicPageContextType`
|
|
2098
2358
|
|
|
2099
|
-
|
|
2359
|
+
Public page context with environment variables
|
|
2100
2360
|
|
|
2101
|
-
|
|
2361
|
+
#### Defined in
|
|
2102
2362
|
|
|
2103
|
-
|
|
2363
|
+
[packages/core/src/components/PublicLayout/PublicPageProvider.tsx:119](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageProvider.tsx#L119)
|
|
2104
2364
|
|
|
2105
|
-
|
|
2365
|
+
___
|
|
2106
2366
|
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2367
|
+
### useIsPublicPage
|
|
2368
|
+
|
|
2369
|
+
▸ **useIsPublicPage**(): `boolean`
|
|
2370
|
+
|
|
2371
|
+
Hook to check if we're in a public page context
|
|
2372
|
+
|
|
2373
|
+
#### Returns
|
|
2374
|
+
|
|
2375
|
+
`boolean`
|
|
2376
|
+
|
|
2377
|
+
True if we're in a public page context
|
|
2110
2378
|
|
|
2111
2379
|
#### Defined in
|
|
2112
2380
|
|
|
2113
|
-
[packages/core/src/components/
|
|
2381
|
+
[packages/core/src/components/PublicLayout/PublicPageProvider.tsx:134](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/PublicLayout/PublicPageProvider.tsx#L134)
|
|
2114
2382
|
|
|
2115
2383
|
___
|
|
2116
2384
|
|
|
@@ -2122,7 +2390,7 @@ ___
|
|
|
2122
2390
|
|
|
2123
2391
|
| Name | Type |
|
|
2124
2392
|
| :------ | :------ |
|
|
2125
|
-
| `props` | `SelectProps` & `RefAttributes`\<`
|
|
2393
|
+
| `props` | `SelectProps` & `RefAttributes`\<`HTMLFormElement`\> |
|
|
2126
2394
|
|
|
2127
2395
|
#### Returns
|
|
2128
2396
|
|
|
@@ -2130,7 +2398,7 @@ ___
|
|
|
2130
2398
|
|
|
2131
2399
|
#### Defined in
|
|
2132
2400
|
|
|
2133
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2401
|
+
[packages/core/src/components/Select/Select.tsx:96](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L96)
|
|
2134
2402
|
|
|
2135
2403
|
___
|
|
2136
2404
|
|
|
@@ -2150,7 +2418,7 @@ ___
|
|
|
2150
2418
|
|
|
2151
2419
|
#### Defined in
|
|
2152
2420
|
|
|
2153
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2421
|
+
[packages/core/src/components/Select/Select.tsx:275](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L275)
|
|
2154
2422
|
|
|
2155
2423
|
___
|
|
2156
2424
|
|
|
@@ -2162,7 +2430,7 @@ ___
|
|
|
2162
2430
|
|
|
2163
2431
|
| Name | Type |
|
|
2164
2432
|
| :------ | :------ |
|
|
2165
|
-
| `props` | `SelectValueProps` & `RefAttributes`\<`
|
|
2433
|
+
| `props` | `SelectValueProps` & `RefAttributes`\<`HTMLSpanElement`\> |
|
|
2166
2434
|
|
|
2167
2435
|
#### Returns
|
|
2168
2436
|
|
|
@@ -2170,7 +2438,7 @@ ___
|
|
|
2170
2438
|
|
|
2171
2439
|
#### Defined in
|
|
2172
2440
|
|
|
2173
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2441
|
+
[packages/core/src/components/Select/Select.tsx:398](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L398)
|
|
2174
2442
|
|
|
2175
2443
|
___
|
|
2176
2444
|
|
|
@@ -2182,7 +2450,7 @@ ___
|
|
|
2182
2450
|
|
|
2183
2451
|
| Name | Type |
|
|
2184
2452
|
| :------ | :------ |
|
|
2185
|
-
| `props` | `SelectContentProps` & `RefAttributes`\<`
|
|
2453
|
+
| `props` | `SelectContentProps` & `RefAttributes`\<`HTMLUListElement`\> |
|
|
2186
2454
|
|
|
2187
2455
|
#### Returns
|
|
2188
2456
|
|
|
@@ -2190,7 +2458,7 @@ ___
|
|
|
2190
2458
|
|
|
2191
2459
|
#### Defined in
|
|
2192
2460
|
|
|
2193
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2461
|
+
[packages/core/src/components/Select/Select.tsx:415](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L415)
|
|
2194
2462
|
|
|
2195
2463
|
___
|
|
2196
2464
|
|
|
@@ -2202,7 +2470,7 @@ ___
|
|
|
2202
2470
|
|
|
2203
2471
|
| Name | Type |
|
|
2204
2472
|
| :------ | :------ |
|
|
2205
|
-
| `props` | `SelectItemProps` & `RefAttributes`\<`
|
|
2473
|
+
| `props` | `SelectItemProps` & `RefAttributes`\<`HTMLLIElement`\> |
|
|
2206
2474
|
|
|
2207
2475
|
#### Returns
|
|
2208
2476
|
|
|
@@ -2210,7 +2478,7 @@ ___
|
|
|
2210
2478
|
|
|
2211
2479
|
#### Defined in
|
|
2212
2480
|
|
|
2213
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2481
|
+
[packages/core/src/components/Select/Select.tsx:542](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L542)
|
|
2214
2482
|
|
|
2215
2483
|
___
|
|
2216
2484
|
|
|
@@ -2230,7 +2498,7 @@ ___
|
|
|
2230
2498
|
|
|
2231
2499
|
#### Defined in
|
|
2232
2500
|
|
|
2233
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2501
|
+
[packages/core/src/components/Select/Select.tsx:627](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L627)
|
|
2234
2502
|
|
|
2235
2503
|
___
|
|
2236
2504
|
|
|
@@ -2250,7 +2518,7 @@ ___
|
|
|
2250
2518
|
|
|
2251
2519
|
#### Defined in
|
|
2252
2520
|
|
|
2253
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2521
|
+
[packages/core/src/components/Select/Select.tsx:638](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L638)
|
|
2254
2522
|
|
|
2255
2523
|
___
|
|
2256
2524
|
|
|
@@ -2270,7 +2538,7 @@ ___
|
|
|
2270
2538
|
|
|
2271
2539
|
#### Defined in
|
|
2272
2540
|
|
|
2273
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2541
|
+
[packages/core/src/components/Select/Select.tsx:649](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L649)
|
|
2274
2542
|
|
|
2275
2543
|
___
|
|
2276
2544
|
|
|
@@ -2809,7 +3077,7 @@ JSX.Element - The tooltip content container
|
|
|
2809
3077
|
**`Example`**
|
|
2810
3078
|
|
|
2811
3079
|
```tsx
|
|
2812
|
-
<TooltipContent side="top" className="bg-
|
|
3080
|
+
<TooltipContent side="top" className="bg-main-500">
|
|
2813
3081
|
Custom tooltip content
|
|
2814
3082
|
</TooltipContent>
|
|
2815
3083
|
```
|
|
@@ -2853,23 +3121,258 @@ JSX.Element - The tooltip with trigger and content
|
|
|
2853
3121
|
|
|
2854
3122
|
___
|
|
2855
3123
|
|
|
2856
|
-
### UserMenu
|
|
3124
|
+
### UserMenu
|
|
3125
|
+
|
|
3126
|
+
▸ **UserMenu**(`props`): `ReactNode`
|
|
3127
|
+
|
|
3128
|
+
#### Parameters
|
|
3129
|
+
|
|
3130
|
+
| Name | Type |
|
|
3131
|
+
| :------ | :------ |
|
|
3132
|
+
| `props` | [`UserMenuProps`](interfaces/UserMenuProps.md) |
|
|
3133
|
+
|
|
3134
|
+
#### Returns
|
|
3135
|
+
|
|
3136
|
+
`ReactNode`
|
|
3137
|
+
|
|
3138
|
+
#### Defined in
|
|
3139
|
+
|
|
3140
|
+
[packages/core/src/components/UserMenu/UserMenu.tsx:136](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/UserMenu/UserMenu.tsx#L136)
|
|
3141
|
+
|
|
3142
|
+
___
|
|
3143
|
+
|
|
3144
|
+
### usePublicEvent
|
|
3145
|
+
|
|
3146
|
+
▸ **usePublicEvent**(`eventCode`, `options?`): [`UsePublicEventReturn`](interfaces/UsePublicEventReturn.md)
|
|
3147
|
+
|
|
3148
|
+
Hook for accessing public event data by event_code
|
|
3149
|
+
|
|
3150
|
+
This hook provides access to public event information without requiring
|
|
3151
|
+
authentication. It includes caching, error handling, and loading states.
|
|
3152
|
+
|
|
3153
|
+
#### Parameters
|
|
3154
|
+
|
|
3155
|
+
| Name | Type | Description |
|
|
3156
|
+
| :------ | :------ | :------ |
|
|
3157
|
+
| `eventCode` | `string` | The event code to look up |
|
|
3158
|
+
| `options` | [`UsePublicEventOptions`](interfaces/UsePublicEventOptions.md) | Configuration options for caching and behavior |
|
|
3159
|
+
|
|
3160
|
+
#### Returns
|
|
3161
|
+
|
|
3162
|
+
[`UsePublicEventReturn`](interfaces/UsePublicEventReturn.md)
|
|
3163
|
+
|
|
3164
|
+
Object containing event data, loading state, error, and refetch function
|
|
3165
|
+
|
|
3166
|
+
#### Defined in
|
|
3167
|
+
|
|
3168
|
+
[packages/core/src/hooks/public/usePublicEvent.ts:99](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicEvent.ts#L99)
|
|
3169
|
+
|
|
3170
|
+
___
|
|
3171
|
+
|
|
3172
|
+
### clearPublicEventCache
|
|
3173
|
+
|
|
3174
|
+
▸ **clearPublicEventCache**(): `void`
|
|
3175
|
+
|
|
3176
|
+
Clear all cached public event data
|
|
3177
|
+
Useful for testing or when you need to force refresh all data
|
|
3178
|
+
|
|
3179
|
+
#### Returns
|
|
3180
|
+
|
|
3181
|
+
`void`
|
|
3182
|
+
|
|
3183
|
+
#### Defined in
|
|
3184
|
+
|
|
3185
|
+
[packages/core/src/hooks/public/usePublicEvent.ts:244](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicEvent.ts#L244)
|
|
3186
|
+
|
|
3187
|
+
___
|
|
3188
|
+
|
|
3189
|
+
### getPublicEventCacheStats
|
|
3190
|
+
|
|
3191
|
+
▸ **getPublicEventCacheStats**(): `Object`
|
|
3192
|
+
|
|
3193
|
+
Get cache statistics for debugging
|
|
3194
|
+
|
|
3195
|
+
#### Returns
|
|
3196
|
+
|
|
3197
|
+
`Object`
|
|
3198
|
+
|
|
3199
|
+
| Name | Type |
|
|
3200
|
+
| :------ | :------ |
|
|
3201
|
+
| `size` | `number` |
|
|
3202
|
+
| `keys` | `string`[] |
|
|
3203
|
+
|
|
3204
|
+
#### Defined in
|
|
3205
|
+
|
|
3206
|
+
[packages/core/src/hooks/public/usePublicEvent.ts:255](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicEvent.ts#L255)
|
|
3207
|
+
|
|
3208
|
+
___
|
|
3209
|
+
|
|
3210
|
+
### usePublicEventLogo
|
|
3211
|
+
|
|
3212
|
+
▸ **usePublicEventLogo**(`eventId`, `eventName`, `organisationId`, `options`): [`UsePublicEventLogoReturn`](interfaces/UsePublicEventLogoReturn.md)
|
|
3213
|
+
|
|
3214
|
+
Hook for accessing public event logo URLs
|
|
3215
|
+
|
|
3216
|
+
This hook provides access to event logo URLs without requiring
|
|
3217
|
+
authentication. It includes fallback handling and image validation.
|
|
3218
|
+
|
|
3219
|
+
#### Parameters
|
|
3220
|
+
|
|
3221
|
+
| Name | Type | Description |
|
|
3222
|
+
| :------ | :------ | :------ |
|
|
3223
|
+
| `eventId` | `undefined` \| `string` | The event ID to fetch logo for |
|
|
3224
|
+
| `eventName` | `undefined` \| `string` | The event name for fallback text generation |
|
|
3225
|
+
| `organisationId` | `undefined` \| `string` | The organisation ID for storage path |
|
|
3226
|
+
| `options` | [`UsePublicEventLogoOptions`](interfaces/UsePublicEventLogoOptions.md) | Configuration options for caching and behavior |
|
|
3227
|
+
|
|
3228
|
+
#### Returns
|
|
3229
|
+
|
|
3230
|
+
[`UsePublicEventLogoReturn`](interfaces/UsePublicEventLogoReturn.md)
|
|
3231
|
+
|
|
3232
|
+
Object containing logo URL, fallback text, loading state, error, and refetch function
|
|
3233
|
+
|
|
3234
|
+
#### Defined in
|
|
3235
|
+
|
|
3236
|
+
[packages/core/src/hooks/public/usePublicEventLogo.ts:125](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicEventLogo.ts#L125)
|
|
3237
|
+
|
|
3238
|
+
___
|
|
3239
|
+
|
|
3240
|
+
### clearPublicLogoCache
|
|
3241
|
+
|
|
3242
|
+
▸ **clearPublicLogoCache**(): `void`
|
|
3243
|
+
|
|
3244
|
+
Clear all cached public logo data
|
|
3245
|
+
Useful for testing or when you need to force refresh all data
|
|
3246
|
+
|
|
3247
|
+
#### Returns
|
|
3248
|
+
|
|
3249
|
+
`void`
|
|
3250
|
+
|
|
3251
|
+
#### Defined in
|
|
3252
|
+
|
|
3253
|
+
[packages/core/src/hooks/public/usePublicEventLogo.ts:268](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicEventLogo.ts#L268)
|
|
3254
|
+
|
|
3255
|
+
___
|
|
3256
|
+
|
|
3257
|
+
### getPublicLogoCacheStats
|
|
3258
|
+
|
|
3259
|
+
▸ **getPublicLogoCacheStats**(): `Object`
|
|
3260
|
+
|
|
3261
|
+
Get cache statistics for debugging
|
|
3262
|
+
|
|
3263
|
+
#### Returns
|
|
3264
|
+
|
|
3265
|
+
`Object`
|
|
3266
|
+
|
|
3267
|
+
| Name | Type |
|
|
3268
|
+
| :------ | :------ |
|
|
3269
|
+
| `size` | `number` |
|
|
3270
|
+
| `keys` | `string`[] |
|
|
3271
|
+
|
|
3272
|
+
#### Defined in
|
|
3273
|
+
|
|
3274
|
+
[packages/core/src/hooks/public/usePublicEventLogo.ts:279](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicEventLogo.ts#L279)
|
|
3275
|
+
|
|
3276
|
+
___
|
|
3277
|
+
|
|
3278
|
+
### usePublicRouteParams
|
|
3279
|
+
|
|
3280
|
+
▸ **usePublicRouteParams**(`options?`): [`UsePublicRouteParamsReturn`](interfaces/UsePublicRouteParamsReturn.md)
|
|
3281
|
+
|
|
3282
|
+
Hook for extracting and validating public route parameters
|
|
3283
|
+
|
|
3284
|
+
This hook extracts event codes from URL parameters and optionally
|
|
3285
|
+
fetches the corresponding event data. It provides validation and
|
|
3286
|
+
error handling for public routes.
|
|
3287
|
+
|
|
3288
|
+
#### Parameters
|
|
3289
|
+
|
|
3290
|
+
| Name | Type | Description |
|
|
3291
|
+
| :------ | :------ | :------ |
|
|
3292
|
+
| `options` | `UsePublicRouteParamsOptions` | Configuration options for behavior |
|
|
3293
|
+
|
|
3294
|
+
#### Returns
|
|
3295
|
+
|
|
3296
|
+
[`UsePublicRouteParamsReturn`](interfaces/UsePublicRouteParamsReturn.md)
|
|
3297
|
+
|
|
3298
|
+
Object containing route parameters, event data, loading state, error, and refetch function
|
|
3299
|
+
|
|
3300
|
+
#### Defined in
|
|
3301
|
+
|
|
3302
|
+
[packages/core/src/hooks/public/usePublicRouteParams.ts:111](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicRouteParams.ts#L111)
|
|
3303
|
+
|
|
3304
|
+
___
|
|
3305
|
+
|
|
3306
|
+
### usePublicEventCode
|
|
3307
|
+
|
|
3308
|
+
▸ **usePublicEventCode**(`eventCodeParam?`): `Object`
|
|
3309
|
+
|
|
3310
|
+
Hook for extracting just the event code without fetching event data
|
|
3311
|
+
Useful when you only need the event code and will fetch data separately
|
|
3312
|
+
|
|
3313
|
+
#### Parameters
|
|
3314
|
+
|
|
3315
|
+
| Name | Type | Default value |
|
|
3316
|
+
| :------ | :------ | :------ |
|
|
3317
|
+
| `eventCodeParam` | `string` | `'eventCode'` |
|
|
3318
|
+
|
|
3319
|
+
#### Returns
|
|
3320
|
+
|
|
3321
|
+
`Object`
|
|
3322
|
+
|
|
3323
|
+
| Name | Type |
|
|
3324
|
+
| :------ | :------ |
|
|
3325
|
+
| `eventCode` | `string` \| ``null`` |
|
|
3326
|
+
| `error` | `Error` \| ``null`` |
|
|
3327
|
+
|
|
3328
|
+
#### Defined in
|
|
3329
|
+
|
|
3330
|
+
[packages/core/src/hooks/public/usePublicRouteParams.ts:206](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicRouteParams.ts#L206)
|
|
3331
|
+
|
|
3332
|
+
___
|
|
3333
|
+
|
|
3334
|
+
### generatePublicRoutePath
|
|
3335
|
+
|
|
3336
|
+
▸ **generatePublicRoutePath**(`eventCode`, `pageName?`): `string`
|
|
3337
|
+
|
|
3338
|
+
Utility function to generate public route paths
|
|
3339
|
+
|
|
3340
|
+
#### Parameters
|
|
3341
|
+
|
|
3342
|
+
| Name | Type | Default value |
|
|
3343
|
+
| :------ | :------ | :------ |
|
|
3344
|
+
| `eventCode` | `string` | `undefined` |
|
|
3345
|
+
| `pageName` | `string` | `'index'` |
|
|
3346
|
+
|
|
3347
|
+
#### Returns
|
|
3348
|
+
|
|
3349
|
+
`string`
|
|
3350
|
+
|
|
3351
|
+
#### Defined in
|
|
3352
|
+
|
|
3353
|
+
[packages/core/src/hooks/public/usePublicRouteParams.ts:242](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicRouteParams.ts#L242)
|
|
3354
|
+
|
|
3355
|
+
___
|
|
3356
|
+
|
|
3357
|
+
### extractEventCodeFromPath
|
|
2857
3358
|
|
|
2858
|
-
▸ **
|
|
3359
|
+
▸ **extractEventCodeFromPath**(`path`): `string` \| ``null``
|
|
3360
|
+
|
|
3361
|
+
Utility function to extract event code from a public route path
|
|
2859
3362
|
|
|
2860
3363
|
#### Parameters
|
|
2861
3364
|
|
|
2862
3365
|
| Name | Type |
|
|
2863
3366
|
| :------ | :------ |
|
|
2864
|
-
| `
|
|
3367
|
+
| `path` | `string` |
|
|
2865
3368
|
|
|
2866
3369
|
#### Returns
|
|
2867
3370
|
|
|
2868
|
-
`
|
|
3371
|
+
`string` \| ``null``
|
|
2869
3372
|
|
|
2870
3373
|
#### Defined in
|
|
2871
3374
|
|
|
2872
|
-
[packages/core/src/
|
|
3375
|
+
[packages/core/src/hooks/public/usePublicRouteParams.ts:256](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/public/usePublicRouteParams.ts#L256)
|
|
2873
3376
|
|
|
2874
3377
|
___
|
|
2875
3378
|
|
|
@@ -2878,6 +3381,7 @@ ___
|
|
|
2878
3381
|
▸ **useAppConfig**(): `UseAppConfigReturn`
|
|
2879
3382
|
|
|
2880
3383
|
Hook to access app configuration
|
|
3384
|
+
Works in both authenticated and public contexts
|
|
2881
3385
|
|
|
2882
3386
|
#### Returns
|
|
2883
3387
|
|
|
@@ -2887,7 +3391,27 @@ App configuration and loading state
|
|
|
2887
3391
|
|
|
2888
3392
|
#### Defined in
|
|
2889
3393
|
|
|
2890
|
-
[packages/core/src/hooks/useAppConfig.ts:
|
|
3394
|
+
[packages/core/src/hooks/useAppConfig.ts:46](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useAppConfig.ts#L46)
|
|
3395
|
+
|
|
3396
|
+
___
|
|
3397
|
+
|
|
3398
|
+
### useInactivityTracker
|
|
3399
|
+
|
|
3400
|
+
▸ **useInactivityTracker**(`«destructured»?`): [`UseInactivityTrackerReturn`](interfaces/UseInactivityTrackerReturn.md)
|
|
3401
|
+
|
|
3402
|
+
#### Parameters
|
|
3403
|
+
|
|
3404
|
+
| Name | Type |
|
|
3405
|
+
| :------ | :------ |
|
|
3406
|
+
| `«destructured»` | [`UseInactivityTrackerOptions`](interfaces/UseInactivityTrackerOptions.md) |
|
|
3407
|
+
|
|
3408
|
+
#### Returns
|
|
3409
|
+
|
|
3410
|
+
[`UseInactivityTrackerReturn`](interfaces/UseInactivityTrackerReturn.md)
|
|
3411
|
+
|
|
3412
|
+
#### Defined in
|
|
3413
|
+
|
|
3414
|
+
[packages/core/src/hooks/useInactivityTracker.ts:127](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useInactivityTracker.ts#L127)
|
|
2891
3415
|
|
|
2892
3416
|
___
|
|
2893
3417
|
|
|
@@ -2929,6 +3453,57 @@ ___
|
|
|
2929
3453
|
|
|
2930
3454
|
___
|
|
2931
3455
|
|
|
3456
|
+
### useStorage
|
|
3457
|
+
|
|
3458
|
+
▸ **useStorage**(`«destructured»`): `UseStorageReturn`
|
|
3459
|
+
|
|
3460
|
+
Hook for storage operations with app and organisation context
|
|
3461
|
+
|
|
3462
|
+
#### Parameters
|
|
3463
|
+
|
|
3464
|
+
| Name | Type |
|
|
3465
|
+
| :------ | :------ |
|
|
3466
|
+
| `«destructured»` | `UseStorageOptions` |
|
|
3467
|
+
|
|
3468
|
+
#### Returns
|
|
3469
|
+
|
|
3470
|
+
`UseStorageReturn`
|
|
3471
|
+
|
|
3472
|
+
#### Defined in
|
|
3473
|
+
|
|
3474
|
+
[packages/core/src/hooks/useStorage.ts:57](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useStorage.ts#L57)
|
|
3475
|
+
|
|
3476
|
+
___
|
|
3477
|
+
|
|
3478
|
+
### useFileUpload
|
|
3479
|
+
|
|
3480
|
+
▸ **useFileUpload**(`«destructured»`): `Object`
|
|
3481
|
+
|
|
3482
|
+
Hook for file upload with progress tracking
|
|
3483
|
+
|
|
3484
|
+
#### Parameters
|
|
3485
|
+
|
|
3486
|
+
| Name | Type |
|
|
3487
|
+
| :------ | :------ |
|
|
3488
|
+
| `«destructured»` | `UseStorageOptions` |
|
|
3489
|
+
|
|
3490
|
+
#### Returns
|
|
3491
|
+
|
|
3492
|
+
`Object`
|
|
3493
|
+
|
|
3494
|
+
| Name | Type |
|
|
3495
|
+
| :------ | :------ |
|
|
3496
|
+
| `uploadWithProgress` | (`file`: `File`, `options`: `Partial`\<[`StorageUploadOptions`](interfaces/StorageUploadOptions.md)\>) => `Promise`\<[`StorageUploadResult`](interfaces/StorageUploadResult.md)\> |
|
|
3497
|
+
| `uploadProgress` | `number` |
|
|
3498
|
+
| `isUploading` | `boolean` |
|
|
3499
|
+
| `uploadError` | ``null`` \| `string` |
|
|
3500
|
+
|
|
3501
|
+
#### Defined in
|
|
3502
|
+
|
|
3503
|
+
[packages/core/src/hooks/useStorage.ts:219](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/hooks/useStorage.ts#L219)
|
|
3504
|
+
|
|
3505
|
+
___
|
|
3506
|
+
|
|
2932
3507
|
### useEvents
|
|
2933
3508
|
|
|
2934
3509
|
▸ **useEvents**(): [`EventContextType`](interfaces/EventContextType.md)
|
|
@@ -2939,7 +3514,7 @@ ___
|
|
|
2939
3514
|
|
|
2940
3515
|
#### Defined in
|
|
2941
3516
|
|
|
2942
|
-
[packages/core/src/providers/EventProvider.tsx:
|
|
3517
|
+
[packages/core/src/providers/EventProvider.tsx:29](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/EventProvider.tsx#L29)
|
|
2943
3518
|
|
|
2944
3519
|
___
|
|
2945
3520
|
|
|
@@ -2959,7 +3534,7 @@ ___
|
|
|
2959
3534
|
|
|
2960
3535
|
#### Defined in
|
|
2961
3536
|
|
|
2962
|
-
[packages/core/src/providers/EventProvider.tsx:
|
|
3537
|
+
[packages/core/src/providers/EventProvider.tsx:68](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/EventProvider.tsx#L68)
|
|
2963
3538
|
|
|
2964
3539
|
___
|
|
2965
3540
|
|
|
@@ -2991,7 +3566,7 @@ SECURITY: No children are rendered without valid organisation context
|
|
|
2991
3566
|
|
|
2992
3567
|
#### Defined in
|
|
2993
3568
|
|
|
2994
|
-
[packages/core/src/providers/OrganisationProvider.tsx:
|
|
3569
|
+
[packages/core/src/providers/OrganisationProvider.tsx:103](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/OrganisationProvider.tsx#L103)
|
|
2995
3570
|
|
|
2996
3571
|
___
|
|
2997
3572
|
|
|
@@ -3013,7 +3588,7 @@ If used outside OrganisationProvider
|
|
|
3013
3588
|
|
|
3014
3589
|
#### Defined in
|
|
3015
3590
|
|
|
3016
|
-
[packages/core/src/providers/OrganisationProvider.tsx:
|
|
3591
|
+
[packages/core/src/providers/OrganisationProvider.tsx:574](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/OrganisationProvider.tsx#L574)
|
|
3017
3592
|
|
|
3018
3593
|
___
|
|
3019
3594
|
|
|
@@ -3027,7 +3602,7 @@ ___
|
|
|
3027
3602
|
|
|
3028
3603
|
#### Defined in
|
|
3029
3604
|
|
|
3030
|
-
[packages/core/src/providers/UnifiedAuthProvider.tsx:
|
|
3605
|
+
[packages/core/src/providers/UnifiedAuthProvider.tsx:177](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/UnifiedAuthProvider.tsx#L177)
|
|
3031
3606
|
|
|
3032
3607
|
___
|
|
3033
3608
|
|
|
@@ -3047,7 +3622,7 @@ ___
|
|
|
3047
3622
|
|
|
3048
3623
|
#### Defined in
|
|
3049
3624
|
|
|
3050
|
-
[packages/core/src/providers/UnifiedAuthProvider.tsx:
|
|
3625
|
+
[packages/core/src/providers/UnifiedAuthProvider.tsx:294](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/providers/UnifiedAuthProvider.tsx#L294)
|
|
3051
3626
|
|
|
3052
3627
|
___
|
|
3053
3628
|
|
|
@@ -3059,7 +3634,7 @@ ___
|
|
|
3059
3634
|
|
|
3060
3635
|
| Name | Type |
|
|
3061
3636
|
| :------ | :------ |
|
|
3062
|
-
| `style` | ``"
|
|
3637
|
+
| `style` | ``"core"`` |
|
|
3063
3638
|
|
|
3064
3639
|
#### Returns
|
|
3065
3640
|
|
|
@@ -3067,7 +3642,7 @@ ___
|
|
|
3067
3642
|
|
|
3068
3643
|
#### Defined in
|
|
3069
3644
|
|
|
3070
|
-
[packages/core/src/styles/index.ts:
|
|
3645
|
+
[packages/core/src/styles/index.ts:40](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/styles/index.ts#L40)
|
|
3071
3646
|
|
|
3072
3647
|
___
|
|
3073
3648
|
|
|
@@ -3081,7 +3656,7 @@ ___
|
|
|
3081
3656
|
|
|
3082
3657
|
#### Defined in
|
|
3083
3658
|
|
|
3084
|
-
[packages/core/src/styles/index.ts:
|
|
3659
|
+
[packages/core/src/styles/index.ts:45](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/styles/index.ts#L45)
|
|
3085
3660
|
|
|
3086
3661
|
___
|
|
3087
3662
|
|
|
@@ -3120,7 +3695,7 @@ Removes the dynamic theme block, returning to app-defined CSS values.
|
|
|
3120
3695
|
|
|
3121
3696
|
#### Defined in
|
|
3122
3697
|
|
|
3123
|
-
[packages/core/src/theming/runtime.ts:
|
|
3698
|
+
[packages/core/src/theming/runtime.ts:86](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/theming/runtime.ts#L86)
|
|
3124
3699
|
|
|
3125
3700
|
___
|
|
3126
3701
|
|
|
@@ -3143,7 +3718,7 @@ Use this in your SSR setup to avoid FOUC
|
|
|
3143
3718
|
|
|
3144
3719
|
#### Defined in
|
|
3145
3720
|
|
|
3146
|
-
[packages/core/src/theming/runtime.ts:
|
|
3721
|
+
[packages/core/src/theming/runtime.ts:154](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/theming/runtime.ts#L154)
|
|
3147
3722
|
|
|
3148
3723
|
___
|
|
3149
3724
|
|
|
@@ -3159,7 +3734,7 @@ Checks if dynamic theming is currently active
|
|
|
3159
3734
|
|
|
3160
3735
|
#### Defined in
|
|
3161
3736
|
|
|
3162
|
-
[packages/core/src/theming/runtime.ts:
|
|
3737
|
+
[packages/core/src/theming/runtime.ts:161](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/theming/runtime.ts#L161)
|
|
3163
3738
|
|
|
3164
3739
|
___
|
|
3165
3740
|
|
|
@@ -3176,7 +3751,7 @@ Useful for debugging or persistence
|
|
|
3176
3751
|
|
|
3177
3752
|
#### Defined in
|
|
3178
3753
|
|
|
3179
|
-
[packages/core/src/theming/runtime.ts:
|
|
3754
|
+
[packages/core/src/theming/runtime.ts:173](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/theming/runtime.ts#L173)
|
|
3180
3755
|
|
|
3181
3756
|
___
|
|
3182
3757
|
|
|
@@ -3280,7 +3855,7 @@ Create a secure data access instance
|
|
|
3280
3855
|
|
|
3281
3856
|
| Name | Type | Default value | Description |
|
|
3282
3857
|
| :------ | :------ | :------ | :------ |
|
|
3283
|
-
| `supabase` | `default`\<`any`, ``"public"``, `any`\> | `undefined` | Supabase client instance |
|
|
3858
|
+
| `supabase` | `default`\<`any`, ``"public"``, ``"public"``, `any`, `any`\> | `undefined` | Supabase client instance |
|
|
3284
3859
|
| `organisationId` | `string` | `undefined` | Current organisation context |
|
|
3285
3860
|
| `isSuperAdmin` | `boolean` | `false` | Whether user has super admin privileges |
|
|
3286
3861
|
|
|
@@ -3293,3 +3868,286 @@ Secure data access utilities
|
|
|
3293
3868
|
#### Defined in
|
|
3294
3869
|
|
|
3295
3870
|
[packages/core/src/utils/secureDataAccess.ts:66](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/secureDataAccess.ts#L66)
|
|
3871
|
+
|
|
3872
|
+
___
|
|
3873
|
+
|
|
3874
|
+
### getFileSizeLimit
|
|
3875
|
+
|
|
3876
|
+
▸ **getFileSizeLimit**(`mimeType`): `number`
|
|
3877
|
+
|
|
3878
|
+
Get the file size limit for a given MIME type
|
|
3879
|
+
|
|
3880
|
+
#### Parameters
|
|
3881
|
+
|
|
3882
|
+
| Name | Type |
|
|
3883
|
+
| :------ | :------ |
|
|
3884
|
+
| `mimeType` | `string` |
|
|
3885
|
+
|
|
3886
|
+
#### Returns
|
|
3887
|
+
|
|
3888
|
+
`number`
|
|
3889
|
+
|
|
3890
|
+
#### Defined in
|
|
3891
|
+
|
|
3892
|
+
[packages/core/src/utils/storage/config.ts:63](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/config.ts#L63)
|
|
3893
|
+
|
|
3894
|
+
___
|
|
3895
|
+
|
|
3896
|
+
### validateFileSize
|
|
3897
|
+
|
|
3898
|
+
▸ **validateFileSize**(`file`): `Object`
|
|
3899
|
+
|
|
3900
|
+
Validate file size against limits
|
|
3901
|
+
|
|
3902
|
+
#### Parameters
|
|
3903
|
+
|
|
3904
|
+
| Name | Type |
|
|
3905
|
+
| :------ | :------ |
|
|
3906
|
+
| `file` | `File` |
|
|
3907
|
+
|
|
3908
|
+
#### Returns
|
|
3909
|
+
|
|
3910
|
+
`Object`
|
|
3911
|
+
|
|
3912
|
+
| Name | Type |
|
|
3913
|
+
| :------ | :------ |
|
|
3914
|
+
| `isValid` | `boolean` |
|
|
3915
|
+
| `error?` | `string` |
|
|
3916
|
+
|
|
3917
|
+
#### Defined in
|
|
3918
|
+
|
|
3919
|
+
[packages/core/src/utils/storage/config.ts:70](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/config.ts#L70)
|
|
3920
|
+
|
|
3921
|
+
___
|
|
3922
|
+
|
|
3923
|
+
### formatFileSize
|
|
3924
|
+
|
|
3925
|
+
▸ **formatFileSize**(`bytes`): `string`
|
|
3926
|
+
|
|
3927
|
+
Get human-readable file size
|
|
3928
|
+
|
|
3929
|
+
#### Parameters
|
|
3930
|
+
|
|
3931
|
+
| Name | Type |
|
|
3932
|
+
| :------ | :------ |
|
|
3933
|
+
| `bytes` | `number` |
|
|
3934
|
+
|
|
3935
|
+
#### Returns
|
|
3936
|
+
|
|
3937
|
+
`string`
|
|
3938
|
+
|
|
3939
|
+
#### Defined in
|
|
3940
|
+
|
|
3941
|
+
[packages/core/src/utils/storage/config.ts:88](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/config.ts#L88)
|
|
3942
|
+
|
|
3943
|
+
___
|
|
3944
|
+
|
|
3945
|
+
### generateFilePath
|
|
3946
|
+
|
|
3947
|
+
▸ **generateFilePath**(`options`, `fileName`): `string`
|
|
3948
|
+
|
|
3949
|
+
Generate a file path based on app-first structure
|
|
3950
|
+
|
|
3951
|
+
#### Parameters
|
|
3952
|
+
|
|
3953
|
+
| Name | Type |
|
|
3954
|
+
| :------ | :------ |
|
|
3955
|
+
| `options` | [`StorageUploadOptions`](interfaces/StorageUploadOptions.md) |
|
|
3956
|
+
| `fileName` | `string` |
|
|
3957
|
+
|
|
3958
|
+
#### Returns
|
|
3959
|
+
|
|
3960
|
+
`string`
|
|
3961
|
+
|
|
3962
|
+
#### Defined in
|
|
3963
|
+
|
|
3964
|
+
[packages/core/src/utils/storage/helpers.ts:20](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L20)
|
|
3965
|
+
|
|
3966
|
+
___
|
|
3967
|
+
|
|
3968
|
+
### generateUniqueFileName
|
|
3969
|
+
|
|
3970
|
+
▸ **generateUniqueFileName**(`originalName`): `string`
|
|
3971
|
+
|
|
3972
|
+
Generate a unique filename with timestamp and UUID
|
|
3973
|
+
|
|
3974
|
+
#### Parameters
|
|
3975
|
+
|
|
3976
|
+
| Name | Type |
|
|
3977
|
+
| :------ | :------ |
|
|
3978
|
+
| `originalName` | `string` |
|
|
3979
|
+
|
|
3980
|
+
#### Returns
|
|
3981
|
+
|
|
3982
|
+
`string`
|
|
3983
|
+
|
|
3984
|
+
#### Defined in
|
|
3985
|
+
|
|
3986
|
+
[packages/core/src/utils/storage/helpers.ts:54](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L54)
|
|
3987
|
+
|
|
3988
|
+
___
|
|
3989
|
+
|
|
3990
|
+
### extractFileMetadata
|
|
3991
|
+
|
|
3992
|
+
▸ **extractFileMetadata**(`file`, `options`, `uploadedBy`): `Promise`\<[`StorageFileMetadata`](interfaces/StorageFileMetadata.md)\>
|
|
3993
|
+
|
|
3994
|
+
Extract file metadata from a File object
|
|
3995
|
+
|
|
3996
|
+
#### Parameters
|
|
3997
|
+
|
|
3998
|
+
| Name | Type |
|
|
3999
|
+
| :------ | :------ |
|
|
4000
|
+
| `file` | `File` |
|
|
4001
|
+
| `options` | [`StorageUploadOptions`](interfaces/StorageUploadOptions.md) |
|
|
4002
|
+
| `uploadedBy` | `string` |
|
|
4003
|
+
|
|
4004
|
+
#### Returns
|
|
4005
|
+
|
|
4006
|
+
`Promise`\<[`StorageFileMetadata`](interfaces/StorageFileMetadata.md)\>
|
|
4007
|
+
|
|
4008
|
+
#### Defined in
|
|
4009
|
+
|
|
4010
|
+
[packages/core/src/utils/storage/helpers.ts:66](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L66)
|
|
4011
|
+
|
|
4012
|
+
___
|
|
4013
|
+
|
|
4014
|
+
### uploadFile
|
|
4015
|
+
|
|
4016
|
+
▸ **uploadFile**(`supabase`, `file`, `options`): `Promise`\<[`StorageUploadResult`](interfaces/StorageUploadResult.md)\>
|
|
4017
|
+
|
|
4018
|
+
Upload a file to Supabase storage with app segregation
|
|
4019
|
+
|
|
4020
|
+
#### Parameters
|
|
4021
|
+
|
|
4022
|
+
| Name | Type |
|
|
4023
|
+
| :------ | :------ |
|
|
4024
|
+
| `supabase` | `default`\<`any`, ``"public"``, ``"public"``, `any`, `any`\> |
|
|
4025
|
+
| `file` | `File` |
|
|
4026
|
+
| `options` | [`StorageUploadOptions`](interfaces/StorageUploadOptions.md) |
|
|
4027
|
+
|
|
4028
|
+
#### Returns
|
|
4029
|
+
|
|
4030
|
+
`Promise`\<[`StorageUploadResult`](interfaces/StorageUploadResult.md)\>
|
|
4031
|
+
|
|
4032
|
+
#### Defined in
|
|
4033
|
+
|
|
4034
|
+
[packages/core/src/utils/storage/helpers.ts:140](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L140)
|
|
4035
|
+
|
|
4036
|
+
___
|
|
4037
|
+
|
|
4038
|
+
### getPublicUrl
|
|
4039
|
+
|
|
4040
|
+
▸ **getPublicUrl**(`supabase`, `path`): `string`
|
|
4041
|
+
|
|
4042
|
+
Get a public URL for a file
|
|
4043
|
+
|
|
4044
|
+
#### Parameters
|
|
4045
|
+
|
|
4046
|
+
| Name | Type |
|
|
4047
|
+
| :------ | :------ |
|
|
4048
|
+
| `supabase` | `default`\<`any`, ``"public"``, ``"public"``, `any`, `any`\> |
|
|
4049
|
+
| `path` | `string` |
|
|
4050
|
+
|
|
4051
|
+
#### Returns
|
|
4052
|
+
|
|
4053
|
+
`string`
|
|
4054
|
+
|
|
4055
|
+
#### Defined in
|
|
4056
|
+
|
|
4057
|
+
[packages/core/src/utils/storage/helpers.ts:205](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L205)
|
|
4058
|
+
|
|
4059
|
+
___
|
|
4060
|
+
|
|
4061
|
+
### getSignedUrl
|
|
4062
|
+
|
|
4063
|
+
▸ **getSignedUrl**(`supabase`, `path`, `options`): `Promise`\<\{ `url`: `string` ; `expiresAt`: `string` } \| ``null``\>
|
|
4064
|
+
|
|
4065
|
+
Get a signed URL for a protected file
|
|
4066
|
+
|
|
4067
|
+
#### Parameters
|
|
4068
|
+
|
|
4069
|
+
| Name | Type |
|
|
4070
|
+
| :------ | :------ |
|
|
4071
|
+
| `supabase` | `default`\<`any`, ``"public"``, ``"public"``, `any`, `any`\> |
|
|
4072
|
+
| `path` | `string` |
|
|
4073
|
+
| `options` | [`StorageUrlOptions`](interfaces/StorageUrlOptions.md) |
|
|
4074
|
+
|
|
4075
|
+
#### Returns
|
|
4076
|
+
|
|
4077
|
+
`Promise`\<\{ `url`: `string` ; `expiresAt`: `string` } \| ``null``\>
|
|
4078
|
+
|
|
4079
|
+
#### Defined in
|
|
4080
|
+
|
|
4081
|
+
[packages/core/src/utils/storage/helpers.ts:216](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L216)
|
|
4082
|
+
|
|
4083
|
+
___
|
|
4084
|
+
|
|
4085
|
+
### deleteFile
|
|
4086
|
+
|
|
4087
|
+
▸ **deleteFile**(`supabase`, `path`): `Promise`\<\{ `success`: `boolean` ; `error?`: `string` }\>
|
|
4088
|
+
|
|
4089
|
+
Delete a file from storage
|
|
4090
|
+
|
|
4091
|
+
#### Parameters
|
|
4092
|
+
|
|
4093
|
+
| Name | Type |
|
|
4094
|
+
| :------ | :------ |
|
|
4095
|
+
| `supabase` | `default`\<`any`, ``"public"``, ``"public"``, `any`, `any`\> |
|
|
4096
|
+
| `path` | `string` |
|
|
4097
|
+
|
|
4098
|
+
#### Returns
|
|
4099
|
+
|
|
4100
|
+
`Promise`\<\{ `success`: `boolean` ; `error?`: `string` }\>
|
|
4101
|
+
|
|
4102
|
+
#### Defined in
|
|
4103
|
+
|
|
4104
|
+
[packages/core/src/utils/storage/helpers.ts:244](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L244)
|
|
4105
|
+
|
|
4106
|
+
___
|
|
4107
|
+
|
|
4108
|
+
### listFiles
|
|
4109
|
+
|
|
4110
|
+
▸ **listFiles**(`supabase`, `options`): `Promise`\<[`StorageListResult`](interfaces/StorageListResult.md)\>
|
|
4111
|
+
|
|
4112
|
+
List files in an organization scope
|
|
4113
|
+
|
|
4114
|
+
#### Parameters
|
|
4115
|
+
|
|
4116
|
+
| Name | Type |
|
|
4117
|
+
| :------ | :------ |
|
|
4118
|
+
| `supabase` | `default`\<`any`, ``"public"``, ``"public"``, `any`, `any`\> |
|
|
4119
|
+
| `options` | [`StorageListOptions`](interfaces/StorageListOptions.md) |
|
|
4120
|
+
|
|
4121
|
+
#### Returns
|
|
4122
|
+
|
|
4123
|
+
`Promise`\<[`StorageListResult`](interfaces/StorageListResult.md)\>
|
|
4124
|
+
|
|
4125
|
+
#### Defined in
|
|
4126
|
+
|
|
4127
|
+
[packages/core/src/utils/storage/helpers.ts:272](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L272)
|
|
4128
|
+
|
|
4129
|
+
___
|
|
4130
|
+
|
|
4131
|
+
### archiveFile
|
|
4132
|
+
|
|
4133
|
+
▸ **archiveFile**(`supabase`, `path`, `options`): `Promise`\<\{ `success`: `boolean` ; `error?`: `string` }\>
|
|
4134
|
+
|
|
4135
|
+
Move a file to archived location (soft delete)
|
|
4136
|
+
|
|
4137
|
+
#### Parameters
|
|
4138
|
+
|
|
4139
|
+
| Name | Type |
|
|
4140
|
+
| :------ | :------ |
|
|
4141
|
+
| `supabase` | `default`\<`any`, ``"public"``, ``"public"``, `any`, `any`\> |
|
|
4142
|
+
| `path` | `string` |
|
|
4143
|
+
| `options` | `Object` |
|
|
4144
|
+
| `options.appName` | `string` |
|
|
4145
|
+
| `options.orgId` | `string` |
|
|
4146
|
+
|
|
4147
|
+
#### Returns
|
|
4148
|
+
|
|
4149
|
+
`Promise`\<\{ `success`: `boolean` ; `error?`: `string` }\>
|
|
4150
|
+
|
|
4151
|
+
#### Defined in
|
|
4152
|
+
|
|
4153
|
+
[packages/core/src/utils/storage/helpers.ts:325](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/utils/storage/helpers.ts#L325)
|