@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jmruthers/pace-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Clean, modern React component library with Tailwind v4 styling and native utilities",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -57,42 +57,61 @@
|
|
|
57
57
|
"import": "./dist/rbac/eslint-rules.js",
|
|
58
58
|
"default": "./dist/rbac/eslint-rules.js"
|
|
59
59
|
},
|
|
60
|
-
"./styles/
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
"./styles/theme.css": {
|
|
65
|
-
"import": "./dist/styles/theme.css",
|
|
66
|
-
"default": "./dist/styles/theme.css"
|
|
67
|
-
},
|
|
68
|
-
"./styles/dark.css": {
|
|
69
|
-
"import": "./dist/styles/dark.css",
|
|
70
|
-
"default": "./dist/styles/dark.css"
|
|
60
|
+
"./styles/core.css": "./dist/styles/core.css",
|
|
61
|
+
"./styles": {
|
|
62
|
+
"import": "./dist/styles/index.js",
|
|
63
|
+
"default": "./dist/styles/index.js"
|
|
71
64
|
},
|
|
72
65
|
"./theming/runtime": {
|
|
73
66
|
"types": "./dist/theming/runtime.d.ts",
|
|
74
67
|
"import": "./dist/theming/runtime.js",
|
|
75
68
|
"default": "./dist/theming/runtime.js"
|
|
76
69
|
},
|
|
77
|
-
"./styles": {
|
|
78
|
-
"import": "./dist/styles/index.js",
|
|
79
|
-
"default": "./dist/styles/index.js"
|
|
80
|
-
},
|
|
81
70
|
"./vite-plugin-tailwind-v4": {
|
|
82
71
|
"import": "./vite-plugin-tailwind-v4.js",
|
|
83
72
|
"default": "./vite-plugin-tailwind-v4.js"
|
|
84
73
|
},
|
|
85
74
|
"./docs": "./docs/README.md",
|
|
86
|
-
"./
|
|
87
|
-
"./
|
|
88
|
-
|
|
75
|
+
"./package.json": "./package.json",
|
|
76
|
+
"./source": {
|
|
77
|
+
"import": "./src/index.ts",
|
|
78
|
+
"default": "./src/index.ts"
|
|
79
|
+
},
|
|
80
|
+
"./source/components": {
|
|
81
|
+
"import": "./src/components/index.ts",
|
|
82
|
+
"default": "./src/components/index.ts"
|
|
83
|
+
},
|
|
84
|
+
"./source/providers": {
|
|
85
|
+
"import": "./src/providers/index.ts",
|
|
86
|
+
"default": "./src/providers/index.ts"
|
|
87
|
+
},
|
|
88
|
+
"./source/hooks": {
|
|
89
|
+
"import": "./src/hooks/index.ts",
|
|
90
|
+
"default": "./src/hooks/index.ts"
|
|
91
|
+
},
|
|
92
|
+
"./source/utils": {
|
|
93
|
+
"import": "./src/utils/index.ts",
|
|
94
|
+
"default": "./src/utils/index.ts"
|
|
95
|
+
},
|
|
96
|
+
"./source/types": {
|
|
97
|
+
"import": "./src/types/index.ts",
|
|
98
|
+
"default": "./src/types/index.ts"
|
|
99
|
+
},
|
|
100
|
+
"./source/validation": {
|
|
101
|
+
"import": "./src/validation/index.ts",
|
|
102
|
+
"default": "./src/validation/index.ts"
|
|
103
|
+
},
|
|
104
|
+
"./source/rbac": {
|
|
105
|
+
"import": "./src/rbac/index.ts",
|
|
106
|
+
"default": "./src/rbac/index.ts"
|
|
107
|
+
}
|
|
89
108
|
},
|
|
90
109
|
"files": [
|
|
91
110
|
"dist",
|
|
111
|
+
"src",
|
|
92
112
|
"README.md",
|
|
93
113
|
"CHANGELOG.md",
|
|
94
|
-
"docs"
|
|
95
|
-
"src/fonts"
|
|
114
|
+
"docs"
|
|
96
115
|
],
|
|
97
116
|
"scripts": {
|
|
98
117
|
"_comment_build": "Build package and documentation",
|
|
@@ -103,10 +122,14 @@
|
|
|
103
122
|
"prepublishOnly": "npm run build:all",
|
|
104
123
|
"clean": "rimraf dist",
|
|
105
124
|
"_comment_test": "Test suite with various configurations",
|
|
106
|
-
"test": "NODE_OPTIONS='--max-old-space-size=
|
|
125
|
+
"test": "NODE_OPTIONS='--max-old-space-size=8192 --max-semi-space-size=128' vitest run --config ../../vitest.config.ts",
|
|
126
|
+
"test:memory-optimized": "node ../../scripts/run-tests-memory-optimized.js",
|
|
107
127
|
"test:watch": "vitest --watch --config ../../vitest.config.ts",
|
|
108
|
-
"test:coverage": "NODE_OPTIONS='--max-old-space-size=
|
|
128
|
+
"test:coverage": "NODE_OPTIONS='--max-old-space-size=8192 --max-semi-space-size=128' vitest run --coverage --config ../../vitest.config.ts",
|
|
109
129
|
"test:ui": "vitest --ui --config ../../vitest.config.ts",
|
|
130
|
+
"test:new": "NODE_OPTIONS='--max-old-space-size=8192 --max-semi-space-size=128' vitest run --config vitest.new.config.ts",
|
|
131
|
+
"test:new:watch": "vitest --watch --config vitest.new.config.ts",
|
|
132
|
+
"migrate-tests": "node scripts/migrate-tests.js",
|
|
110
133
|
"test:unit": "vitest src/**/*.test.{ts,tsx} --config ../../vitest.config.ts",
|
|
111
134
|
"test:integration": "vitest tests/integration --config ../../vitest.config.ts",
|
|
112
135
|
"_comment_quality": "Code quality and formatting checks",
|
|
@@ -145,7 +168,6 @@
|
|
|
145
168
|
"@radix-ui/react-avatar": "^1.0.0",
|
|
146
169
|
"@radix-ui/react-checkbox": "^1.0.0",
|
|
147
170
|
"@radix-ui/react-dialog": "^1.0.0",
|
|
148
|
-
"@radix-ui/react-dropdown-menu": "^2.0.0",
|
|
149
171
|
"@radix-ui/react-label": "^2.0.0",
|
|
150
172
|
"@radix-ui/react-progress": "^1.0.0",
|
|
151
173
|
"@radix-ui/react-slot": "^1.0.0",
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock for lucide-react icons
|
|
3
|
+
* @package @jmruthers/pace-core
|
|
4
|
+
* @module Mocks/LucideReact
|
|
5
|
+
* @since 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
// Create a generic icon component
|
|
11
|
+
const createIcon = (name: string) =>
|
|
12
|
+
React.forwardRef<SVGSVGElement, React.SVGProps<SVGSVGElement>>(({ className, ...props }, ref) =>
|
|
13
|
+
React.createElement('svg', {
|
|
14
|
+
ref,
|
|
15
|
+
className,
|
|
16
|
+
'data-testid': `lucide-${name.toLowerCase()}`,
|
|
17
|
+
width: '24',
|
|
18
|
+
height: '24',
|
|
19
|
+
viewBox: '0 0 24 24',
|
|
20
|
+
fill: 'none',
|
|
21
|
+
stroke: 'currentColor',
|
|
22
|
+
strokeWidth: '2',
|
|
23
|
+
strokeLinecap: 'round',
|
|
24
|
+
strokeLinejoin: 'round',
|
|
25
|
+
...props
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
// Export all the icons we need
|
|
30
|
+
export const ChevronDown = createIcon('ChevronDown');
|
|
31
|
+
export const ChevronUp = createIcon('ChevronUp');
|
|
32
|
+
export const ChevronLeft = createIcon('ChevronLeft');
|
|
33
|
+
export const ChevronRight = createIcon('ChevronRight');
|
|
34
|
+
export const Search = createIcon('Search');
|
|
35
|
+
export const X = createIcon('X');
|
|
36
|
+
export const Check = createIcon('Check');
|
|
37
|
+
export const Plus = createIcon('Plus');
|
|
38
|
+
export const Minus = createIcon('Minus');
|
|
39
|
+
export const Edit = createIcon('Edit');
|
|
40
|
+
export const Pencil = createIcon('Pencil');
|
|
41
|
+
export const Trash = createIcon('Trash');
|
|
42
|
+
export const Trash2 = createIcon('Trash2');
|
|
43
|
+
export const Eye = createIcon('Eye');
|
|
44
|
+
export const EyeOff = createIcon('EyeOff');
|
|
45
|
+
export const Lock = createIcon('Lock');
|
|
46
|
+
export const Unlock = createIcon('Unlock');
|
|
47
|
+
export const User = createIcon('User');
|
|
48
|
+
export const Users = createIcon('Users');
|
|
49
|
+
export const Settings = createIcon('Settings');
|
|
50
|
+
export const Home = createIcon('Home');
|
|
51
|
+
export const Menu = createIcon('Menu');
|
|
52
|
+
export const MoreHorizontal = createIcon('MoreHorizontal');
|
|
53
|
+
export const MoreVertical = createIcon('MoreVertical');
|
|
54
|
+
export const Filter = createIcon('Filter');
|
|
55
|
+
export const Download = createIcon('Download');
|
|
56
|
+
export const Upload = createIcon('Upload');
|
|
57
|
+
export const RefreshCw = createIcon('RefreshCw');
|
|
58
|
+
export const AlertCircle = createIcon('AlertCircle');
|
|
59
|
+
export const CheckCircle = createIcon('CheckCircle');
|
|
60
|
+
export const Info = createIcon('Info');
|
|
61
|
+
export const Warning = createIcon('Warning');
|
|
62
|
+
export const FileText = createIcon('FileText');
|
|
63
|
+
export const ChevronsLeft = createIcon('ChevronsLeft');
|
|
64
|
+
export const ChevronsRight = createIcon('ChevronsRight');
|
|
65
|
+
export const KeyRound = createIcon('KeyRound');
|
|
66
|
+
export const LogOut = createIcon('LogOut');
|
|
67
|
+
export const ChevronsUp = createIcon('ChevronsUp');
|
|
68
|
+
export const ChevronsDown = createIcon('ChevronsDown');
|
|
69
|
+
export const ChevronsUpDown = createIcon('ChevronsUpDown');
|
|
70
|
+
export const ArrowUpDown = createIcon('ArrowUpDown');
|
|
71
|
+
export const ArrowUp = createIcon('ArrowUp');
|
|
72
|
+
export const ArrowDown = createIcon('ArrowDown');
|
|
73
|
+
export const RotateCcw = createIcon('RotateCcw');
|
|
74
|
+
export const RotateCw = createIcon('RotateCw');
|
|
75
|
+
export const Copy = createIcon('Copy');
|
|
76
|
+
export const ExternalLink = createIcon('ExternalLink');
|
|
77
|
+
export const Calendar = createIcon('Calendar');
|
|
78
|
+
export const Clock = createIcon('Clock');
|
|
79
|
+
export const Database = createIcon('Database');
|
|
80
|
+
export const File = createIcon('File');
|
|
81
|
+
export const Folder = createIcon('Folder');
|
|
82
|
+
export const Globe = createIcon('Globe');
|
|
83
|
+
export const HardDrive = createIcon('HardDrive');
|
|
84
|
+
export const HelpCircle = createIcon('HelpCircle');
|
|
85
|
+
export const Image = createIcon('Image');
|
|
86
|
+
export const Link = createIcon('Link');
|
|
87
|
+
export const Mail = createIcon('Mail');
|
|
88
|
+
export const MapPin = createIcon('MapPin');
|
|
89
|
+
export const Phone = createIcon('Phone');
|
|
90
|
+
export const PieChart = createIcon('PieChart');
|
|
91
|
+
export const Play = createIcon('Play');
|
|
92
|
+
export const Save = createIcon('Save');
|
|
93
|
+
export const Share = createIcon('Share');
|
|
94
|
+
export const Star = createIcon('Star');
|
|
95
|
+
export const Tag = createIcon('Tag');
|
|
96
|
+
export const Target = createIcon('Target');
|
|
97
|
+
export const TrendingUp = createIcon('TrendingUp');
|
|
98
|
+
export const Volume2 = createIcon('Volume2');
|
|
99
|
+
export const Wifi = createIcon('Wifi');
|
|
100
|
+
export const Zap = createIcon('Zap');
|
|
101
|
+
export const Circle = createIcon('Circle');
|
|
102
|
+
export const Group = createIcon('Group');
|
|
103
|
+
export const Settings2 = createIcon('Settings2');
|
|
104
|
+
|
|
105
|
+
// Default export for compatibility
|
|
106
|
+
export default {
|
|
107
|
+
ChevronDown,
|
|
108
|
+
ChevronUp,
|
|
109
|
+
ChevronLeft,
|
|
110
|
+
ChevronRight,
|
|
111
|
+
Search,
|
|
112
|
+
X,
|
|
113
|
+
Check,
|
|
114
|
+
Plus,
|
|
115
|
+
Minus,
|
|
116
|
+
Edit,
|
|
117
|
+
Pencil,
|
|
118
|
+
Trash,
|
|
119
|
+
Trash2,
|
|
120
|
+
Eye,
|
|
121
|
+
EyeOff,
|
|
122
|
+
Lock,
|
|
123
|
+
Unlock,
|
|
124
|
+
User,
|
|
125
|
+
Users,
|
|
126
|
+
Settings,
|
|
127
|
+
Home,
|
|
128
|
+
Menu,
|
|
129
|
+
MoreHorizontal,
|
|
130
|
+
MoreVertical,
|
|
131
|
+
Filter,
|
|
132
|
+
Download,
|
|
133
|
+
Upload,
|
|
134
|
+
RefreshCw,
|
|
135
|
+
AlertCircle,
|
|
136
|
+
CheckCircle,
|
|
137
|
+
Info,
|
|
138
|
+
Warning,
|
|
139
|
+
FileText,
|
|
140
|
+
ChevronsLeft,
|
|
141
|
+
ChevronsRight,
|
|
142
|
+
KeyRound,
|
|
143
|
+
LogOut,
|
|
144
|
+
ChevronsUp,
|
|
145
|
+
ChevronsDown,
|
|
146
|
+
ChevronsUpDown,
|
|
147
|
+
ArrowUpDown,
|
|
148
|
+
ArrowUp,
|
|
149
|
+
ArrowDown,
|
|
150
|
+
RotateCcw,
|
|
151
|
+
RotateCw,
|
|
152
|
+
Copy,
|
|
153
|
+
ExternalLink,
|
|
154
|
+
Calendar,
|
|
155
|
+
Clock,
|
|
156
|
+
Database,
|
|
157
|
+
File,
|
|
158
|
+
Folder,
|
|
159
|
+
Globe,
|
|
160
|
+
HardDrive,
|
|
161
|
+
HelpCircle,
|
|
162
|
+
Image,
|
|
163
|
+
Link,
|
|
164
|
+
Mail,
|
|
165
|
+
MapPin,
|
|
166
|
+
Phone,
|
|
167
|
+
PieChart,
|
|
168
|
+
Play,
|
|
169
|
+
Save,
|
|
170
|
+
Share,
|
|
171
|
+
Star,
|
|
172
|
+
Tag,
|
|
173
|
+
Target,
|
|
174
|
+
TrendingUp,
|
|
175
|
+
Volume2,
|
|
176
|
+
Wifi,
|
|
177
|
+
Zap,
|
|
178
|
+
Circle,
|
|
179
|
+
Group,
|
|
180
|
+
Settings2,
|
|
181
|
+
};
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# 🚀 Test Suite Rebuild Plan
|
|
2
|
+
|
|
3
|
+
## 📊 Current Status
|
|
4
|
+
- ✅ **193 broken test files deleted**
|
|
5
|
+
- ✅ **World-class test architecture created**
|
|
6
|
+
- ✅ **Comprehensive utilities and helpers ready**
|
|
7
|
+
- ✅ **Excellent examples and templates provided**
|
|
8
|
+
- ✅ **Testing guidelines and guardrails established**
|
|
9
|
+
|
|
10
|
+
## 🎯 Rebuild Strategy
|
|
11
|
+
|
|
12
|
+
### Phase 1: Foundation (Week 1)
|
|
13
|
+
**Priority: Critical Components**
|
|
14
|
+
|
|
15
|
+
#### 1.1 Core UI Components
|
|
16
|
+
- [ ] **Button** - Already completed ✅
|
|
17
|
+
- [ ] **Input** - Form input component
|
|
18
|
+
- [ ] **Card** - Content container
|
|
19
|
+
- [ ] **Modal** - Overlay component
|
|
20
|
+
- [ ] **LoadingSpinner** - Loading indicator
|
|
21
|
+
|
|
22
|
+
#### 1.2 Essential Hooks
|
|
23
|
+
- [ ] **useDebounce** - Input debouncing
|
|
24
|
+
- [ ] **useLocalStorage** - Local storage management
|
|
25
|
+
- [ ] **useToggle** - Boolean state management
|
|
26
|
+
- [ ] **useAsync** - Async operation handling
|
|
27
|
+
|
|
28
|
+
#### 1.3 Utility Functions
|
|
29
|
+
- [ ] **formatDate** - Date formatting
|
|
30
|
+
- [ ] **validateEmail** - Email validation
|
|
31
|
+
- [ ] **generateId** - ID generation
|
|
32
|
+
- [ ] **deepClone** - Object cloning
|
|
33
|
+
|
|
34
|
+
### Phase 2: Business Logic (Week 2)
|
|
35
|
+
**Priority: High-Value Components**
|
|
36
|
+
|
|
37
|
+
#### 2.1 Authentication Components
|
|
38
|
+
- [ ] **LoginForm** - User authentication
|
|
39
|
+
- [ ] **UserMenu** - User profile menu
|
|
40
|
+
- [ ] **AuthGuard** - Route protection
|
|
41
|
+
- [ ] **PasswordReset** - Password recovery
|
|
42
|
+
|
|
43
|
+
#### 2.2 Data Management
|
|
44
|
+
- [ ] **DataTable** - Data display
|
|
45
|
+
- [ ] **Pagination** - Data pagination
|
|
46
|
+
- [ ] **Search** - Data filtering
|
|
47
|
+
- [ ] **Export** - Data export
|
|
48
|
+
|
|
49
|
+
#### 2.3 Business Hooks
|
|
50
|
+
- [ ] **useAuth** - Authentication state
|
|
51
|
+
- [ ] **useApi** - API calls
|
|
52
|
+
- [ ] **usePermissions** - Access control
|
|
53
|
+
- [ ] **useCache** - Data caching
|
|
54
|
+
|
|
55
|
+
### Phase 3: Advanced Features (Week 3)
|
|
56
|
+
**Priority: Complex Components**
|
|
57
|
+
|
|
58
|
+
#### 3.1 Advanced UI Components
|
|
59
|
+
- [ ] **DataTable** - Complex data display
|
|
60
|
+
- [ ] **FormBuilder** - Dynamic forms
|
|
61
|
+
- [ ] **FileUpload** - File handling
|
|
62
|
+
- [ ] **RichTextEditor** - Text editing
|
|
63
|
+
|
|
64
|
+
#### 3.2 Integration Components
|
|
65
|
+
- [ ] **Dashboard** - Main dashboard
|
|
66
|
+
- [ ] **Settings** - Configuration
|
|
67
|
+
- [ ] **Reports** - Data visualization
|
|
68
|
+
- [ ] **Notifications** - User alerts
|
|
69
|
+
|
|
70
|
+
#### 3.3 Advanced Hooks
|
|
71
|
+
- [ ] **useForm** - Form management
|
|
72
|
+
- [ ] **usePagination** - Pagination logic
|
|
73
|
+
- [ ] **useInfiniteScroll** - Infinite loading
|
|
74
|
+
- [ ] **useWebSocket** - Real-time updates
|
|
75
|
+
|
|
76
|
+
### Phase 4: Integration & E2E (Week 4)
|
|
77
|
+
**Priority: End-to-End Testing**
|
|
78
|
+
|
|
79
|
+
#### 4.1 Integration Tests
|
|
80
|
+
- [ ] **User Authentication Flow**
|
|
81
|
+
- [ ] **Data CRUD Operations**
|
|
82
|
+
- [ ] **File Upload Process**
|
|
83
|
+
- [ ] **Report Generation**
|
|
84
|
+
|
|
85
|
+
#### 4.2 E2E Test Scenarios
|
|
86
|
+
- [ ] **Complete User Journey**
|
|
87
|
+
- [ ] **Admin Workflow**
|
|
88
|
+
- [ ] **Error Handling**
|
|
89
|
+
- [ ] **Performance Testing**
|
|
90
|
+
|
|
91
|
+
## 📋 Implementation Guidelines
|
|
92
|
+
|
|
93
|
+
### Test Creation Process
|
|
94
|
+
1. **Identify Component Priority** - Use the phase-based approach
|
|
95
|
+
2. **Copy Template** - Use provided templates
|
|
96
|
+
3. **Write Tests** - Follow testing guidelines
|
|
97
|
+
4. **Verify Coverage** - Ensure 80%+ coverage
|
|
98
|
+
5. **Review & Refactor** - Code review and optimization
|
|
99
|
+
|
|
100
|
+
### Quality Gates
|
|
101
|
+
- ✅ **All tests pass** - No failing tests
|
|
102
|
+
- ✅ **80%+ coverage** - Meet coverage thresholds
|
|
103
|
+
- ✅ **Fast execution** - Tests run in <5 seconds
|
|
104
|
+
- ✅ **Clear naming** - Descriptive test names
|
|
105
|
+
- ✅ **No flaky tests** - Reliable test results
|
|
106
|
+
|
|
107
|
+
### File Structure
|
|
108
|
+
```
|
|
109
|
+
src/__tests__/
|
|
110
|
+
├── components/
|
|
111
|
+
│ ├── Button.test.tsx ✅
|
|
112
|
+
│ ├── Input.test.tsx
|
|
113
|
+
│ ├── Card.test.tsx
|
|
114
|
+
│ └── ...
|
|
115
|
+
├── hooks/
|
|
116
|
+
│ ├── useDebounce.test.ts
|
|
117
|
+
│ ├── useLocalStorage.test.ts
|
|
118
|
+
│ └── ...
|
|
119
|
+
├── utils/
|
|
120
|
+
│ ├── formatDate.test.ts
|
|
121
|
+
│ ├── validateEmail.test.ts
|
|
122
|
+
│ └── ...
|
|
123
|
+
├── integration/
|
|
124
|
+
│ ├── auth-flow.test.tsx
|
|
125
|
+
│ ├── data-crud.test.tsx
|
|
126
|
+
│ └── ...
|
|
127
|
+
└── templates/
|
|
128
|
+
├── component.test.template.tsx
|
|
129
|
+
├── hook.test.template.ts
|
|
130
|
+
└── ...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## 🛠️ Development Workflow
|
|
134
|
+
|
|
135
|
+
### Daily Process
|
|
136
|
+
1. **Start with Template** - Copy appropriate template
|
|
137
|
+
2. **Write Tests First** - TDD approach
|
|
138
|
+
3. **Run Tests Frequently** - `npm test -- --watch`
|
|
139
|
+
4. **Check Coverage** - `npm test -- --coverage`
|
|
140
|
+
5. **Commit Often** - Small, focused commits
|
|
141
|
+
|
|
142
|
+
### Weekly Review
|
|
143
|
+
1. **Coverage Report** - Review coverage metrics
|
|
144
|
+
2. **Test Performance** - Check execution time
|
|
145
|
+
3. **Code Quality** - Review test quality
|
|
146
|
+
4. **Plan Next Week** - Prioritize next components
|
|
147
|
+
|
|
148
|
+
## 📊 Success Metrics
|
|
149
|
+
|
|
150
|
+
### Week 1 Targets
|
|
151
|
+
- [ ] 5 core components tested
|
|
152
|
+
- [ ] 4 essential hooks tested
|
|
153
|
+
- [ ] 4 utility functions tested
|
|
154
|
+
- [ ] 80%+ coverage on tested components
|
|
155
|
+
|
|
156
|
+
### Week 2 Targets
|
|
157
|
+
- [ ] 4 authentication components tested
|
|
158
|
+
- [ ] 4 data management components tested
|
|
159
|
+
- [ ] 4 business hooks tested
|
|
160
|
+
- [ ] 2 integration tests completed
|
|
161
|
+
|
|
162
|
+
### Week 3 Targets
|
|
163
|
+
- [ ] 4 advanced UI components tested
|
|
164
|
+
- [ ] 4 integration components tested
|
|
165
|
+
- [ ] 4 advanced hooks tested
|
|
166
|
+
- [ ] Performance tests added
|
|
167
|
+
|
|
168
|
+
### Week 4 Targets
|
|
169
|
+
- [ ] 4 integration test suites completed
|
|
170
|
+
- [ ] 4 E2E test scenarios completed
|
|
171
|
+
- [ ] 90%+ overall coverage
|
|
172
|
+
- [ ] All tests passing consistently
|
|
173
|
+
|
|
174
|
+
## 🚨 Risk Mitigation
|
|
175
|
+
|
|
176
|
+
### Common Pitfalls
|
|
177
|
+
1. **Over-testing** - Focus on user behavior
|
|
178
|
+
2. **Under-testing** - Ensure critical paths covered
|
|
179
|
+
3. **Flaky tests** - Use proper async handling
|
|
180
|
+
4. **Slow tests** - Optimize test performance
|
|
181
|
+
|
|
182
|
+
### Solutions
|
|
183
|
+
1. **Follow templates** - Use provided patterns
|
|
184
|
+
2. **Review guidelines** - Check testing best practices
|
|
185
|
+
3. **Use utilities** - Leverage test helpers
|
|
186
|
+
4. **Monitor performance** - Track test execution time
|
|
187
|
+
|
|
188
|
+
## 📚 Resources
|
|
189
|
+
|
|
190
|
+
### Quick Reference
|
|
191
|
+
- [Testing Guidelines](./TESTING_GUIDELINES.md)
|
|
192
|
+
- [Component Template](./templates/component.test.template.tsx)
|
|
193
|
+
- [Hook Template](./templates/hook.test.template.ts)
|
|
194
|
+
- [Test Utilities](./helpers/test-utils.tsx)
|
|
195
|
+
|
|
196
|
+
### Commands
|
|
197
|
+
```bash
|
|
198
|
+
# Run all tests
|
|
199
|
+
npm test
|
|
200
|
+
|
|
201
|
+
# Run specific component
|
|
202
|
+
npm test -- Button.test.tsx
|
|
203
|
+
|
|
204
|
+
# Run with coverage
|
|
205
|
+
npm test -- --coverage
|
|
206
|
+
|
|
207
|
+
# Run in watch mode
|
|
208
|
+
npm test -- --watch
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## 🎉 Expected Outcomes
|
|
212
|
+
|
|
213
|
+
After 4 weeks, you'll have:
|
|
214
|
+
- ✅ **Comprehensive test suite** - 50+ test files
|
|
215
|
+
- ✅ **High code coverage** - 90%+ overall
|
|
216
|
+
- ✅ **Fast test execution** - <10 seconds total
|
|
217
|
+
- ✅ **Reliable tests** - No flaky tests
|
|
218
|
+
- ✅ **Maintainable code** - Clear patterns and guidelines
|
|
219
|
+
- ✅ **Developer confidence** - Safe refactoring and changes
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
**Ready to start? Begin with Phase 1, Week 1, and work through the components systematically!** 🚀
|