@jmruthers/pace-core 0.2.7 → 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/dist/{DataTable-EEUDXPE5.js → DataTable-GX3XERFJ.js} +8 -4
- package/dist/{DataTable-C1AEm9Cx.d.ts → DataTable-ltTFXHS3.d.ts} +3 -1
- package/dist/{chunk-VYG4AXYW.js → chunk-5EL3KHOQ.js} +2 -2
- package/dist/{chunk-ETEJVKYK.js → chunk-6CR3MRZN.js} +1426 -62
- package/dist/chunk-6CR3MRZN.js.map +1 -0
- package/dist/chunk-AUE24LVR.js +268 -0
- package/dist/chunk-AUE24LVR.js.map +1 -0
- package/dist/chunk-COBPIXXQ.js +379 -0
- package/dist/chunk-COBPIXXQ.js.map +1 -0
- package/dist/{chunk-EWKPTNPO.js → chunk-GSNM5D6H.js} +388 -86
- package/dist/chunk-GSNM5D6H.js.map +1 -0
- package/dist/{chunk-2V3Y6YBC.js → chunk-OEGRKULD.js} +1 -42
- package/dist/chunk-OEGRKULD.js.map +1 -0
- package/dist/chunk-OYRY44Q2.js +62 -0
- package/dist/chunk-OYRY44Q2.js.map +1 -0
- package/dist/{chunk-RRUYHORU.js → chunk-T3XIA4AJ.js} +297 -433
- package/dist/chunk-T3XIA4AJ.js.map +1 -0
- package/dist/{chunk-HEMJ4SUJ.js → chunk-TGDCLPP2.js} +11 -7
- package/dist/{chunk-HEMJ4SUJ.js.map → chunk-TGDCLPP2.js.map} +1 -1
- package/dist/{chunk-HNDFPXUU.js → chunk-U6JDHVC2.js} +6 -4
- package/dist/{chunk-HNDFPXUU.js.map → chunk-U6JDHVC2.js.map} +1 -1
- package/dist/{chunk-TIVL4UQ7.js → chunk-XJK2J4N6.js} +6 -4
- package/dist/{chunk-TIVL4UQ7.js.map → chunk-XJK2J4N6.js.map} +1 -1
- package/dist/components.d.ts +2 -2
- package/dist/components.js +21 -20
- package/dist/components.js.map +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +7 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -25
- package/dist/index.js.map +1 -1
- package/dist/providers.js +8 -7
- package/dist/rbac/index.d.ts +806 -806
- package/dist/rbac/index.js +937 -1179
- package/dist/rbac/index.js.map +1 -1
- package/dist/{types-DiRQsGJs.d.ts → types-BRDU7N6w.d.ts} +12 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +6 -6
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +4 -4
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +21 -8
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +46 -33
- package/docs/api/interfaces/DataTableToolbarButton.md +7 -7
- package/docs/api/interfaces/EmptyStateConfig.md +5 -5
- package/docs/api/interfaces/EventContextType.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/EventProviderProps.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/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 +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +3 -3
- package/package.json +5 -2
- 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 +37 -225
- package/src/__tests__/templates/component.test.template.tsx +97 -75
- package/src/__tests__/templates/hook.test.template.ts +173 -0
- package/src/__tests__/types/test.types.ts +106 -0
- package/src/components/Alert/Alert.test.tsx +496 -0
- package/src/components/Avatar/Avatar.test.tsx +484 -0
- package/src/components/Button/Button.test.tsx +662 -0
- package/src/components/Card/Card.test.tsx +593 -0
- package/src/components/Checkbox/Checkbox.test.tsx +461 -0
- package/src/components/DataTable/DataTable.tsx +9 -1
- package/src/components/DataTable/components/AccessDeniedPage.tsx +168 -0
- package/src/components/DataTable/components/ActionButtons.tsx +18 -1
- package/src/components/DataTable/components/DataTableCore.tsx +97 -11
- package/src/components/DataTable/components/DataTableToolbar.tsx +22 -10
- package/src/components/DataTable/components/UnifiedTableBody.tsx +33 -4
- package/src/components/DataTable/examples/HierarchicalActionsExample.tsx +1 -0
- package/src/components/DataTable/examples/HierarchicalExample.tsx +3 -0
- package/src/components/DataTable/examples/InitialPageSizeExample.tsx +3 -0
- package/src/components/DataTable/examples/PerformanceExample.tsx +3 -0
- package/src/components/DataTable/types.ts +39 -1
- package/src/components/Dialog/Dialog.test.tsx +1139 -0
- package/src/components/ErrorBoundary/ErrorBoundary.test.tsx +752 -0
- package/src/components/FileUpload/FileUpload.test.tsx +665 -0
- package/src/hooks/useCounter.test.ts +135 -0
- package/src/rbac/index.ts +3 -3
- package/dist/chunk-2V3Y6YBC.js.map +0 -1
- package/dist/chunk-BEZRLNK3.js +0 -1744
- package/dist/chunk-BEZRLNK3.js.map +0 -1
- package/dist/chunk-ETEJVKYK.js.map +0 -1
- package/dist/chunk-EWKPTNPO.js.map +0 -1
- package/dist/chunk-OHXGNT3K.js +0 -21
- package/dist/chunk-OHXGNT3K.js.map +0 -1
- package/dist/chunk-RRUYHORU.js.map +0 -1
- package/src/__tests__/README.md +0 -404
- package/src/__tests__/debug-provider.unit.test.tsx +0 -67
- package/src/__tests__/e2e/workflows.test.tsx +0 -373
- package/src/__tests__/hybridPermissions.unit.test.tsx +0 -474
- package/src/__tests__/index.integration.test.ts +0 -491
- package/src/__tests__/mocks/MockAuthProvider-standalone.tsx +0 -47
- package/src/__tests__/mocks/MockAuthProvider.tsx +0 -63
- package/src/__tests__/mocks/enhancedSupabaseMock.ts +0 -252
- package/src/__tests__/mocks/index.test.ts +0 -23
- package/src/__tests__/mocks/index.ts +0 -16
- package/src/__tests__/mocks/mockAuth.ts +0 -155
- package/src/__tests__/mocks/mockSupabase.ts +0 -83
- package/src/__tests__/mocks/mockSupabaseClient.ts +0 -63
- package/src/__tests__/mocks/providers.tsx +0 -22
- package/src/__tests__/patterns/__tests__/testPatterns.test.ts +0 -394
- package/src/__tests__/patterns/testPatterns.ts +0 -124
- package/src/__tests__/performance/componentPerformance.performance.test.ts +0 -27
- package/src/__tests__/performance/index.ts +0 -24
- package/src/__tests__/performance/performanceValidation.performance.test.ts +0 -15
- package/src/__tests__/security/security.unit.test.tsx +0 -7
- package/src/__tests__/security/securityValidation.security.test.tsx +0 -153
- package/src/__tests__/setupTests.d.ts +0 -1
- package/src/__tests__/shared/componentTestUtils.tsx +0 -475
- package/src/__tests__/shared/errorHandlingTestUtils.ts +0 -107
- package/src/__tests__/shared/index.ts +0 -81
- package/src/__tests__/shared/integrationTestUtils.tsx +0 -375
- package/src/__tests__/shared/performanceTestUtils.tsx +0 -476
- package/src/__tests__/shared/testUtils.optimized.tsx +0 -685
- package/src/__tests__/simple.test.tsx +0 -20
- package/src/__tests__/test-utils/dataFactories.ts +0 -60
- package/src/__tests__/test-utils/index.ts +0 -6
- package/src/__tests__/typeSafety.unit.test.ts +0 -65
- package/src/__tests__/unifiedAuth.unit.test.tsx +0 -151
- package/src/__tests__/utils/accessibilityHelpers.ts +0 -254
- package/src/__tests__/utils/assertions.ts +0 -50
- package/src/__tests__/utils/deterministicHelpers.ts +0 -31
- package/src/__tests__/utils/edgeCaseConfig.test.ts +0 -75
- package/src/__tests__/utils/edgeCaseConfig.ts +0 -98
- package/src/__tests__/utils/mockHelpers.ts +0 -149
- package/src/__tests__/utils/mockLoader.ts +0 -101
- package/src/__tests__/utils/performanceHelpers.ts +0 -55
- package/src/__tests__/utils/performanceTestHelpers.ts +0 -68
- package/src/__tests__/utils/testDataFactories.ts +0 -28
- package/src/__tests__/utils/testIsolation.ts +0 -67
- package/src/__tests__/utils/visualTestHelpers.ts +0 -20
- package/src/__tests__/visual/__snapshots__/componentSnapshots.visual.test.tsx.snap +0 -68
- package/src/__tests__/visual/__snapshots__/componentVisuals.visual.test.tsx.snap +0 -14
- package/src/__tests__/visual/__snapshots__/visualRegression.test.tsx.snap +0 -217
- package/src/__tests__/visual/__snapshots__/visualRegression.visual.test.tsx.snap +0 -24
- package/src/__tests__/visual/componentSnapshots.visual.test.tsx +0 -33
- package/src/__tests__/visual/componentVisuals.visual.test.tsx +0 -12
- package/src/__tests__/visual/visualRegression.visual.test.tsx +0 -20
- package/src/components/Alert/__tests__/Alert.unit.test.tsx +0 -381
- package/src/components/Avatar/__tests__/Avatar.unit.test.tsx +0 -232
- package/src/components/Button/__tests__/Button.accessibility.test.tsx +0 -131
- package/src/components/Button/__tests__/Button.comprehensive.test.tsx +0 -721
- package/src/components/Button/__tests__/Button.unit.test.tsx +0 -189
- package/src/components/Button/__tests__/EventSelector.integration.test.tsx +0 -285
- package/src/components/Card/__tests__/Card.accessibility.test.tsx +0 -394
- package/src/components/Card/__tests__/Card.comprehensive.test.tsx +0 -599
- package/src/components/Card/__tests__/Card.integration.test.tsx +0 -673
- package/src/components/Card/__tests__/Card.performance.test.tsx +0 -546
- package/src/components/Card/__tests__/Card.unit.test.tsx +0 -330
- package/src/components/Card/__tests__/Card.visual.test.tsx +0 -599
- package/src/components/Card/__tests__/README.md +0 -211
- package/src/components/Checkbox/__tests__/Checkbox.unit.test.tsx +0 -520
- package/src/components/DataTable/__tests__/DataTable.errorHandling.test.tsx +0 -251
- package/src/components/DataTable/__tests__/DataTable.hierarchical.test.tsx +0 -680
- package/src/components/DataTable/__tests__/DataTable.infinite-loop.test.tsx +0 -323
- package/src/components/DataTable/__tests__/DataTable.integration.test.tsx +0 -716
- package/src/components/DataTable/__tests__/DataTable.performance.test.tsx +0 -589
- package/src/components/DataTable/__tests__/DataTable.permissions.test.tsx +0 -316
- package/src/components/DataTable/__tests__/DataTable.regressionFixes.test.tsx +0 -546
- package/src/components/DataTable/__tests__/DataTable.selection.controlled.test.tsx +0 -386
- package/src/components/DataTable/__tests__/DataTable.selection.test.tsx +0 -338
- package/src/components/DataTable/__tests__/DataTable.sorting.test.tsx +0 -321
- package/src/components/DataTable/__tests__/DataTable.userWorkflows.test.tsx +0 -320
- package/src/components/DataTable/__tests__/DataTable.workflowValidation.test.tsx +0 -583
- package/src/components/DataTable/__tests__/DataTable.workflows.test.tsx +0 -711
- package/src/components/DataTable/__tests__/performance-regression.test.tsx +0 -777
- package/src/components/DataTable/__tests__/performance.test.tsx +0 -365
- package/src/components/DataTable/components/__tests__/ActionButtons.unit.test.tsx +0 -150
- package/src/components/DataTable/components/__tests__/BulkOperationsDropdown.test.tsx +0 -224
- package/src/components/DataTable/components/__tests__/ColumnVisibilityDropdown.unit.test.tsx +0 -244
- package/src/components/DataTable/components/__tests__/DataTable.accessibility.test.tsx +0 -629
- package/src/components/DataTable/components/__tests__/DataTable.integration.test.tsx +0 -470
- package/src/components/DataTable/components/__tests__/DataTable.performance.test.tsx +0 -160
- package/src/components/DataTable/components/__tests__/DataTable.real.test.tsx +0 -251
- package/src/components/DataTable/components/__tests__/DataTable.security.test.tsx +0 -171
- package/src/components/DataTable/components/__tests__/DataTable.unit.test.tsx +0 -290
- package/src/components/DataTable/components/__tests__/DataTableBody.unit.test.tsx +0 -147
- package/src/components/DataTable/components/__tests__/DataTableErrorBoundary.unit.test.tsx +0 -182
- package/src/components/DataTable/components/__tests__/DataTableModals.unit.test.tsx +0 -123
- package/src/components/DataTable/components/__tests__/EditableRow.unit.test.tsx +0 -660
- package/src/components/DataTable/components/__tests__/EmptyState.unit.test.tsx +0 -256
- package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +0 -498
- package/src/components/DataTable/components/__tests__/FilterRow.unit.test.tsx +0 -112
- package/src/components/DataTable/components/__tests__/FilteringToggle.unit.test.tsx +0 -133
- package/src/components/DataTable/components/__tests__/GroupHeader.unit.test.tsx +0 -172
- package/src/components/DataTable/components/__tests__/GroupingDropdown.unit.test.tsx +0 -222
- package/src/components/DataTable/components/__tests__/ImportModal.unit.test.tsx +0 -780
- package/src/components/DataTable/components/__tests__/LoadingState.unit.test.tsx +0 -65
- package/src/components/DataTable/components/__tests__/PaginationControls.unit.test.tsx +0 -634
- package/src/components/DataTable/components/__tests__/StateComponents.unit.test.tsx +0 -48
- package/src/components/DataTable/components/__tests__/UnifiedTableBody.hierarchical.test.tsx +0 -541
- package/src/components/DataTable/components/__tests__/ViewRowModal.unit.test.tsx +0 -228
- package/src/components/DataTable/components/__tests__/VirtualizedDataTable.unit.test.tsx +0 -568
- package/src/components/DataTable/core/__tests__/ActionManager.unit.test.ts +0 -405
- package/src/components/DataTable/core/__tests__/ArchitectureIntegration.unit.test.tsx +0 -445
- package/src/components/DataTable/core/__tests__/ColumnFactory.unit.test.ts +0 -288
- package/src/components/DataTable/core/__tests__/ColumnManager.unit.test.ts +0 -623
- package/src/components/DataTable/core/__tests__/DataManager.unit.test.ts +0 -431
- package/src/components/DataTable/core/__tests__/DataTableContext.unit.test.tsx +0 -433
- package/src/components/DataTable/core/__tests__/LocalDataAdapter.unit.test.ts +0 -422
- package/src/components/DataTable/core/__tests__/PluginRegistry.unit.test.tsx +0 -207
- package/src/components/DataTable/core/__tests__/StateManager.unit.test.ts +0 -278
- package/src/components/DataTable/examples/__tests__/PerformanceExample.unit.test.tsx +0 -281
- package/src/components/DataTable/hooks/__tests__/useColumnOrderPersistence.unit.test.ts +0 -407
- package/src/components/DataTable/hooks/__tests__/useColumnReordering.unit.test.ts +0 -679
- package/src/components/DataTable/utils/__tests__/debugTools.unit.test.ts +0 -267
- package/src/components/DataTable/utils/__tests__/errorHandling.unit.test.ts +0 -467
- package/src/components/DataTable/utils/__tests__/exportUtils.unit.test.ts +0 -380
- package/src/components/DataTable/utils/__tests__/flexibleImport.unit.test.ts +0 -233
- package/src/components/DataTable/utils/__tests__/performanceUtils.unit.test.ts +0 -414
- package/src/components/Dialog/__tests__/Dialog.accessibility.test.tsx +0 -521
- package/src/components/Dialog/__tests__/Dialog.auto-size.example.tsx +0 -157
- package/src/components/Dialog/__tests__/Dialog.enhanced.test.tsx +0 -538
- package/src/components/Dialog/__tests__/Dialog.unit.test.tsx +0 -1373
- package/src/components/Dialog/examples/__tests__/SmartDialogExample.unit.test.tsx +0 -151
- package/src/components/Dialog/utils/__tests__/safeHtml.unit.test.ts +0 -611
- package/src/components/ErrorBoundary/__tests__/ErrorBoundary.accessibility.test.tsx +0 -517
- package/src/components/ErrorBoundary/__tests__/ErrorBoundary.integration.test.tsx +0 -572
- package/src/components/ErrorBoundary/__tests__/ErrorBoundary.unit.test.tsx +0 -579
- package/src/components/EventSelector/__tests__/EventSelector.test.tsx +0 -528
- package/src/components/FileUpload/__tests__/FileUpload.integration.test.tsx +0 -992
- package/src/components/FileUpload/__tests__/FileUpload.real.test.tsx +0 -927
- package/src/components/FileUpload/__tests__/FileUpload.test.tsx +0 -855
- package/src/components/FileUpload/__tests__/FileUpload.unit.test.tsx +0 -1311
- package/src/components/FileUpload/__tests__/FileUpload.unmocked.test.tsx +0 -937
- package/src/components/Footer/__tests__/Footer.accessibility.test.tsx +0 -359
- package/src/components/Footer/__tests__/Footer.integration.test.tsx +0 -353
- package/src/components/Footer/__tests__/Footer.performance.test.tsx +0 -309
- package/src/components/Footer/__tests__/Footer.unit.test.tsx +0 -309
- package/src/components/Footer/__tests__/Footer.visual.test.tsx +0 -335
- package/src/components/Form/__tests__/Form.accessibility.test.tsx +0 -820
- package/src/components/Form/__tests__/Form.unit.test.tsx +0 -305
- package/src/components/Form/__tests__/FormErrorSummary.unit.test.tsx +0 -285
- package/src/components/Form/__tests__/FormFieldset.unit.test.tsx +0 -241
- package/src/components/Header/__tests__/Header.accessibility.test.tsx +0 -382
- package/src/components/Header/__tests__/Header.comprehensive.test.tsx +0 -509
- package/src/components/Header/__tests__/Header.unit.test.tsx +0 -335
- package/src/components/InactivityWarningModal/InactivityWarningModal.test.tsx +0 -196
- package/src/components/InactivityWarningModal/__tests__/InactivityWarningModal.unit.test.tsx +0 -224
- package/src/components/Input/__tests__/Input.accessibility.test.tsx +0 -632
- package/src/components/Input/__tests__/Input.unit.test.tsx +0 -1121
- package/src/components/Label/__tests__/Label.accessibility.test.tsx +0 -239
- package/src/components/Label/__tests__/Label.unit.test.tsx +0 -331
- package/src/components/LoadingSpinner/__tests__/LoadingSpinner.accessibility.test.tsx +0 -116
- package/src/components/LoadingSpinner/__tests__/LoadingSpinner.unit.test.tsx +0 -144
- package/src/components/LoginForm/__tests__/LoginForm.accessibility.test.tsx +0 -201
- package/src/components/LoginForm/__tests__/LoginForm.unit.test.tsx +0 -119
- package/src/components/NavigationMenu/__tests__/NavigationMenu.accessibility.test.tsx +0 -378
- package/src/components/NavigationMenu/__tests__/NavigationMenu.enhanced.test.tsx +0 -768
- package/src/components/NavigationMenu/__tests__/NavigationMenu.integration.test.tsx +0 -576
- package/src/components/NavigationMenu/__tests__/NavigationMenu.performance.test.tsx +0 -585
- package/src/components/NavigationMenu/__tests__/NavigationMenu.real.component.test.tsx +0 -783
- package/src/components/NavigationMenu/__tests__/NavigationMenu.security.enhanced.test.tsx +0 -810
- package/src/components/NavigationMenu/__tests__/NavigationMenu.security.test.tsx +0 -494
- package/src/components/NavigationMenu/__tests__/NavigationMenu.unit.test.tsx +0 -331
- package/src/components/NavigationMenu/__tests__/NavigationMenu.userWorkflows.test.tsx +0 -347
- package/src/components/NavigationMenu/__tests__/NavigationMenu.workflows.test.tsx +0 -584
- package/src/components/OrganisationSelector/__tests__/OrganisationSelector.unit.test.tsx +0 -664
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.accessibility.test.tsx +0 -288
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.integration.test.tsx +0 -893
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.performance.test.tsx +0 -629
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.security.test.tsx +0 -782
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.unit.test.tsx +0 -904
- package/src/components/PaceLoginPage/__tests__/PaceLoginPage.accessibility.test.tsx +0 -463
- package/src/components/PaceLoginPage/__tests__/PaceLoginPage.integration.test.tsx +0 -586
- package/src/components/PaceLoginPage/__tests__/PaceLoginPage.unit.test.tsx +0 -533
- package/src/components/PasswordReset/__tests__/PasswordChangeForm.accessibility.test.tsx +0 -408
- package/src/components/PasswordReset/__tests__/PasswordChangeForm.unit.test.tsx +0 -561
- package/src/components/PasswordReset/__tests__/PasswordReset.integration.test.tsx +0 -304
- package/src/components/PasswordReset/__tests__/PasswordResetForm.accessibility.test.tsx +0 -20
- package/src/components/PasswordReset/__tests__/PasswordResetForm.unit.test.tsx +0 -523
- package/src/components/PasswordReset/__tests__/__mocks__/UnifiedAuthProvider.ts +0 -29
- package/src/components/Print/__tests__/Print.comprehensive.test.tsx +0 -331
- package/src/components/PrintButton/__tests__/PrintButton.unit.test.tsx +0 -429
- package/src/components/PrintButton/__tests__/PrintButtonGroup.unit.test.tsx +0 -277
- package/src/components/PrintButton/__tests__/PrintToolbar.unit.test.tsx +0 -264
- package/src/components/PrintCard/__tests__/PrintCard.unit.test.tsx +0 -233
- package/src/components/PrintCard/__tests__/PrintCardContent.test.tsx +0 -284
- package/src/components/PrintCard/__tests__/PrintCardGrid.unit.test.tsx +0 -214
- package/src/components/PrintCard/__tests__/PrintCardImage.unit.test.tsx +0 -264
- package/src/components/PrintDataTable/__tests__/PrintDataTable.unit.test.tsx +0 -361
- package/src/components/PrintDataTable/__tests__/PrintTableGroup.unit.test.tsx +0 -314
- package/src/components/PrintDataTable/__tests__/PrintTableRow.unit.test.tsx +0 -362
- package/src/components/PrintFooter/__tests__/PrintFooter.unit.test.tsx +0 -500
- package/src/components/PrintFooter/__tests__/PrintFooterContent.unit.test.tsx +0 -321
- package/src/components/PrintFooter/__tests__/PrintFooterInfo.unit.test.tsx +0 -335
- package/src/components/PrintFooter/__tests__/PrintPageNumber.unit.test.tsx +0 -340
- package/src/components/PrintGrid/__tests__/PrintGrid.unit.test.tsx +0 -340
- package/src/components/PrintGrid/__tests__/PrintGridBreakpoint.unit.test.tsx +0 -261
- package/src/components/PrintGrid/__tests__/PrintGridContainer.unit.test.tsx +0 -338
- package/src/components/PrintGrid/__tests__/PrintGridItem.unit.test.tsx +0 -338
- package/src/components/PrintHeader/__tests__/PrintCoverHeader.unit.test.tsx +0 -309
- package/src/components/PrintHeader/__tests__/PrintHeader.unit.test.tsx +0 -202
- package/src/components/PrintLayout/__tests__/PrintLayout.unit.test.tsx +0 -238
- package/src/components/PrintPageBreak/__tests__/PrintPageBreak.unit.test.tsx +0 -263
- package/src/components/PrintPageBreak/__tests__/PrintPageBreakGroup.unit.test.tsx +0 -239
- package/src/components/PrintPageBreak/__tests__/PrintPageBreakIndicator.unit.test.tsx +0 -235
- package/src/components/PrintSection/__tests__/PrintColumn.unit.test.tsx +0 -385
- package/src/components/PrintSection/__tests__/PrintDivider.unit.test.tsx +0 -373
- package/src/components/PrintSection/__tests__/PrintSection.unit.test.tsx +0 -390
- package/src/components/PrintSection/__tests__/PrintSectionContent.unit.test.tsx +0 -321
- package/src/components/PrintSection/__tests__/PrintSectionHeader.unit.test.tsx +0 -334
- package/src/components/PrintText/__tests__/PrintText.unit.test.tsx +0 -351
- package/src/components/Progress/__tests__/Progress.accessibility.test.tsx +0 -240
- package/src/components/Progress/__tests__/Progress.unit.test.tsx +0 -242
- package/src/components/PublicLayout/__tests__/EventLogo.test.tsx +0 -761
- package/src/components/PublicLayout/__tests__/PublicErrorBoundary.simplified.test.tsx +0 -228
- package/src/components/PublicLayout/__tests__/PublicErrorBoundary.test.tsx +0 -228
- package/src/components/PublicLayout/__tests__/PublicLoadingSpinner.test.tsx +0 -459
- package/src/components/PublicLayout/__tests__/PublicPageFooter.test.tsx +0 -362
- package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +0 -522
- package/src/components/PublicLayout/__tests__/PublicPageLayout.test.tsx +0 -599
- package/src/components/PublicLayout/__tests__/PublicPageProvider.test.tsx +0 -513
- package/src/components/RBAC/__tests__/PagePermissionGuard.unit.test.tsx +0 -683
- package/src/components/RBAC/__tests__/RBAC.integration.test.tsx +0 -573
- package/src/components/RBAC/__tests__/RBACGuard.unit.test.tsx +0 -467
- package/src/components/RBAC/__tests__/RBACProvider.accessibility.test.tsx +0 -475
- package/src/components/RBAC/__tests__/RBACProvider.advanced.test.tsx +0 -569
- package/src/components/RBAC/__tests__/RBACProvider.integration.test.tsx +0 -352
- package/src/components/RBAC/__tests__/RBACProvider.unit.test.tsx +0 -128
- package/src/components/RBAC/__tests__/RoleBasedContent.unit.test.tsx +0 -657
- package/src/components/Select/__tests__/SearchableSelect.unit.test.tsx +0 -437
- package/src/components/Select/__tests__/Select.accessibility.test.tsx +0 -1202
- package/src/components/Select/__tests__/Select.actual.test.tsx +0 -774
- package/src/components/Select/__tests__/Select.comprehensive.test.tsx +0 -837
- package/src/components/Select/__tests__/Select.enhanced.test.tsx +0 -1101
- package/src/components/Select/__tests__/Select.integration.test.tsx +0 -772
- package/src/components/Select/__tests__/Select.performance.test.tsx +0 -695
- package/src/components/Select/__tests__/Select.real-world.test.tsx +0 -1046
- package/src/components/Select/__tests__/Select.search-algorithms.test.tsx +0 -968
- package/src/components/Select/__tests__/Select.unit.test.tsx +0 -647
- package/src/components/Select/__tests__/Select.utils.test.tsx +0 -890
- package/src/components/Table/__tests__/Table.accessibility.test.tsx +0 -233
- package/src/components/Table/__tests__/Table.unit.test.tsx +0 -235
- package/src/components/Toast/__tests__/Toast.accessibility.test.tsx +0 -238
- package/src/components/Toast/__tests__/Toast.integration.test.tsx +0 -699
- package/src/components/Toast/__tests__/Toast.unit.test.tsx +0 -750
- package/src/components/Tooltip/__tests__/Tooltip.accessibility.test.tsx +0 -121
- package/src/components/Tooltip/__tests__/Tooltip.unit.test.tsx +0 -185
- package/src/components/UserMenu/__tests__/UserMenu.accessibility.test.tsx +0 -139
- package/src/components/UserMenu/__tests__/UserMenu.integration.test.tsx +0 -188
- package/src/components/UserMenu/__tests__/UserMenu.unit.test.tsx +0 -458
- package/src/components/__tests__/EdgeCaseTesting.enhanced.test.tsx +0 -524
- package/src/components/__tests__/ErrorTesting.enhanced.test.tsx +0 -455
- package/src/components/__tests__/SuperAdminGuard.test.tsx +0 -456
- package/src/components/__tests__/SuperAdminGuard.unit.test.tsx +0 -456
- package/src/components/examples/__tests__/PermissionExample.unit.test.tsx +0 -360
- package/src/hooks/__tests__/hooks.integration.test.tsx +0 -575
- package/src/hooks/__tests__/useApiFetch.unit.test.ts +0 -115
- package/src/hooks/__tests__/useComponentPerformance.unit.test.tsx +0 -133
- package/src/hooks/__tests__/useDebounce.unit.test.ts +0 -82
- package/src/hooks/__tests__/useFocusTrap.unit.test.tsx +0 -293
- package/src/hooks/__tests__/useInactivityTracker.unit.test.ts +0 -385
- package/src/hooks/__tests__/useOrganisationPermissions.unit.test.tsx +0 -286
- package/src/hooks/__tests__/useOrganisationSecurity.unit.test.tsx +0 -838
- package/src/hooks/__tests__/usePermissionCache.unit.test.ts +0 -627
- package/src/hooks/__tests__/useRBAC.unit.test.ts +0 -911
- package/src/hooks/__tests__/useSecureDataAccess.unit.test.tsx +0 -537
- package/src/hooks/__tests__/useToast.unit.test.tsx +0 -62
- package/src/hooks/__tests__/useZodForm.unit.test.tsx +0 -37
- package/src/hooks/public/__tests__/usePublicEvent.test.tsx +0 -397
- package/src/hooks/public/__tests__/usePublicEventLogo.test.tsx +0 -690
- package/src/hooks/public/__tests__/usePublicRouteParams.test.tsx +0 -449
- package/src/providers/__tests__/EventProvider.unit.test.tsx +0 -768
- package/src/providers/__tests__/OrganisationProvider.basic.test.tsx +0 -116
- package/src/providers/__tests__/OrganisationProvider.unit.test.tsx +0 -1312
- package/src/providers/__tests__/UnifiedAuthProvider.inactivity.test.tsx +0 -601
- package/src/providers/__tests__/UnifiedAuthProvider.unit.test.tsx +0 -683
- package/src/providers/__tests__/index.unit.test.ts +0 -78
- package/src/rbac/__tests__/PagePermissionGuard.test.tsx +0 -673
- package/src/rbac/__tests__/README.md +0 -170
- package/src/rbac/__tests__/RoleBasedRouter.test.tsx +0 -709
- package/src/rbac/__tests__/TestContext.tsx +0 -72
- package/src/rbac/__tests__/__mocks__/cache.ts +0 -144
- package/src/rbac/__tests__/__mocks__/supabase.ts +0 -152
- package/src/rbac/__tests__/adapters-hooks-comprehensive.test.tsx +0 -782
- package/src/rbac/__tests__/adapters-hooks.test.tsx +0 -561
- package/src/rbac/__tests__/adapters.comprehensive.test.tsx +0 -963
- package/src/rbac/__tests__/adapters.test.tsx +0 -444
- package/src/rbac/__tests__/api.test.ts +0 -620
- package/src/rbac/__tests__/audit-observability-comprehensive.test.ts +0 -792
- package/src/rbac/__tests__/audit-observability.test.ts +0 -549
- package/src/rbac/__tests__/audit.test.ts +0 -616
- package/src/rbac/__tests__/build-contract-compliance-simple.test.ts +0 -230
- package/src/rbac/__tests__/cache-invalidation-comprehensive.test.ts +0 -889
- package/src/rbac/__tests__/cache-invalidation.test.ts +0 -457
- package/src/rbac/__tests__/cache.test.ts +0 -458
- package/src/rbac/__tests__/components-navigation-guard.enhanced.test.tsx +0 -859
- package/src/rbac/__tests__/components-navigation-guard.test.tsx +0 -895
- package/src/rbac/__tests__/components-navigation-provider.test.tsx +0 -692
- package/src/rbac/__tests__/components-page-permission-guard.test.tsx +0 -673
- package/src/rbac/__tests__/components-page-permission-provider.test.tsx +0 -614
- package/src/rbac/__tests__/components-permission-enforcer.enhanced.fixed.test.tsx +0 -836
- package/src/rbac/__tests__/components-permission-enforcer.enhanced.test.tsx +0 -837
- package/src/rbac/__tests__/components-permission-enforcer.test.tsx +0 -825
- package/src/rbac/__tests__/components-role-based-router.test.tsx +0 -709
- package/src/rbac/__tests__/components-secure-data-provider.test.tsx +0 -607
- package/src/rbac/__tests__/config.test.ts +0 -583
- package/src/rbac/__tests__/core-logic-unit.test.ts +0 -190
- package/src/rbac/__tests__/core-permission-logic-comprehensive.test.ts +0 -1467
- package/src/rbac/__tests__/core-permission-logic-fixed.test.ts +0 -151
- package/src/rbac/__tests__/core-permission-logic-simple.test.ts +0 -968
- package/src/rbac/__tests__/core-permission-logic.test.ts +0 -966
- package/src/rbac/__tests__/edge-cases-comprehensive.test.ts +0 -988
- package/src/rbac/__tests__/edge-cases.test.ts +0 -654
- package/src/rbac/__tests__/engine.test.ts +0 -361
- package/src/rbac/__tests__/engine.unit.test.ts +0 -361
- package/src/rbac/__tests__/hooks.enhanced.test.tsx +0 -979
- package/src/rbac/__tests__/hooks.fixed.test.tsx +0 -475
- package/src/rbac/__tests__/hooks.test.tsx +0 -385
- package/src/rbac/__tests__/index.test.ts +0 -269
- package/src/rbac/__tests__/integration.enhanced.test.tsx +0 -824
- package/src/rbac/__tests__/page-permission-guard-super-admin.test.tsx +0 -261
- package/src/rbac/__tests__/performance.enhanced.test.tsx +0 -724
- package/src/rbac/__tests__/permissions.test.ts +0 -383
- package/src/rbac/__tests__/requires-event.test.ts +0 -330
- package/src/rbac/__tests__/scope-isolation-comprehensive.test.ts +0 -1349
- package/src/rbac/__tests__/scope-isolation.test.ts +0 -755
- package/src/rbac/__tests__/secure-client-rls-comprehensive.test.ts +0 -592
- package/src/rbac/__tests__/secure-client-rls.test.ts +0 -377
- package/src/rbac/__tests__/security.test.ts +0 -296
- package/src/rbac/__tests__/setup.ts +0 -228
- package/src/rbac/__tests__/test-utils-enhanced.tsx +0 -400
- package/src/rbac/__tests__/types.test.ts +0 -685
- package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +0 -631
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +0 -667
- package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +0 -647
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +0 -496
- package/src/rbac/testing/__tests__/index.test.tsx +0 -342
- package/src/rbac/utils/__tests__/eventContext.test.ts +0 -428
- package/src/rbac/utils/__tests__/eventContext.unit.test.ts +0 -428
- package/src/styles/__tests__/styles.unit.test.ts +0 -164
- package/src/test-dom-cleanup.test.tsx +0 -38
- package/src/theming/__tests__/README.md +0 -335
- package/src/theming/__tests__/runtime.accessibility.test.ts +0 -474
- package/src/theming/__tests__/runtime.error.test.ts +0 -616
- package/src/theming/__tests__/runtime.integration.test.ts +0 -376
- package/src/theming/__tests__/runtime.performance.test.ts +0 -411
- package/src/theming/__tests__/runtime.unit.test.ts +0 -470
- package/src/types/__tests__/database.unit.test.ts +0 -489
- package/src/types/__tests__/guards.unit.test.ts +0 -146
- package/src/types/__tests__/index.unit.test.ts +0 -77
- package/src/types/__tests__/organisation.unit.test.ts +0 -713
- package/src/types/__tests__/rbac.unit.test.ts +0 -621
- package/src/types/__tests__/security.unit.test.ts +0 -347
- package/src/types/__tests__/supabase.unit.test.ts +0 -658
- package/src/types/__tests__/theme.unit.test.ts +0 -218
- package/src/types/__tests__/unified.unit.test.ts +0 -537
- package/src/types/__tests__/validation.unit.test.ts +0 -616
- package/src/utils/__tests__/appConfig.unit.test.ts +0 -55
- package/src/utils/__tests__/appNameResolver.unit.test.ts +0 -137
- package/src/utils/__tests__/audit.unit.test.ts +0 -69
- package/src/utils/__tests__/auth-utils.unit.test.ts +0 -70
- package/src/utils/__tests__/bundleAnalysis.unit.test.ts +0 -317
- package/src/utils/__tests__/cn.unit.test.ts +0 -34
- package/src/utils/__tests__/deviceFingerprint.unit.test.ts +0 -480
- package/src/utils/__tests__/dynamicUtils.unit.test.ts +0 -322
- package/src/utils/__tests__/formatDate.unit.test.ts +0 -109
- package/src/utils/__tests__/formatting.unit.test.ts +0 -66
- package/src/utils/__tests__/index.unit.test.ts +0 -251
- package/src/utils/__tests__/lazyLoad.unit.test.tsx +0 -304
- package/src/utils/__tests__/organisationContext.unit.test.ts +0 -192
- package/src/utils/__tests__/performanceBudgets.unit.test.ts +0 -259
- package/src/utils/__tests__/permissionTypes.unit.test.ts +0 -250
- package/src/utils/__tests__/permissionUtils.unit.test.ts +0 -362
- package/src/utils/__tests__/sanitization.unit.test.ts +0 -346
- package/src/utils/__tests__/schemaUtils.unit.test.ts +0 -441
- package/src/utils/__tests__/secureDataAccess.unit.test.ts +0 -334
- package/src/utils/__tests__/secureErrors.unit.test.ts +0 -377
- package/src/utils/__tests__/secureStorage.unit.test.ts +0 -293
- package/src/utils/__tests__/security.unit.test.ts +0 -127
- package/src/utils/__tests__/securityMonitor.unit.test.ts +0 -280
- package/src/utils/__tests__/sessionTracking.unit.test.ts +0 -370
- package/src/utils/__tests__/validation.unit.test.ts +0 -84
- package/src/utils/__tests__/validationUtils.unit.test.ts +0 -571
- package/src/utils/print/__tests__/PrintDataProcessor.unit.test.ts +0 -219
- package/src/utils/print/__tests__/usePrintOptimization.unit.test.tsx +0 -353
- package/src/utils/storage/__tests__/config.unit.test.ts +0 -206
- package/src/utils/storage/__tests__/helpers.unit.test.ts +0 -648
- package/src/utils/storage/__tests__/index.unit.test.ts +0 -167
- package/src/utils/storage/__tests__/types.unit.test.ts +0 -441
- package/src/validation/__tests__/common.unit.test.ts +0 -101
- package/src/validation/__tests__/csrf.unit.test.ts +0 -302
- package/src/validation/__tests__/passwordSchema.unit.test.ts +0 -98
- package/src/validation/__tests__/sqlInjectionProtection.unit.test.ts +0 -466
- /package/dist/{DataTable-EEUDXPE5.js.map → DataTable-GX3XERFJ.js.map} +0 -0
- /package/dist/{chunk-VYG4AXYW.js.map → chunk-5EL3KHOQ.js.map} +0 -0
|
@@ -1,13 +1,985 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AccessLevel,
|
|
3
|
+
init_unified
|
|
4
|
+
} from "./chunk-YDJW5XTN.js";
|
|
5
|
+
import {
|
|
6
|
+
DebugLogger,
|
|
2
7
|
cn,
|
|
3
|
-
init_cn
|
|
4
|
-
|
|
8
|
+
init_cn,
|
|
9
|
+
init_debugLogger
|
|
10
|
+
} from "./chunk-OYRY44Q2.js";
|
|
5
11
|
import {
|
|
6
12
|
__commonJS,
|
|
7
13
|
__esm,
|
|
14
|
+
__export,
|
|
8
15
|
__toESM
|
|
9
16
|
} from "./chunk-PLDDJCW6.js";
|
|
10
17
|
|
|
18
|
+
// src/providers/AuthProvider.tsx
|
|
19
|
+
import { createContext, useContext, useState, useEffect, useCallback, useMemo } from "react";
|
|
20
|
+
import { AuthError } from "@supabase/supabase-js";
|
|
21
|
+
import { jsx } from "react/jsx-runtime";
|
|
22
|
+
function AuthProvider({ children, supabaseClient }) {
|
|
23
|
+
const [user, setUser] = useState(null);
|
|
24
|
+
const [session, setSession] = useState(null);
|
|
25
|
+
const [authLoading, setAuthLoading] = useState(true);
|
|
26
|
+
const [authError, setAuthError] = useState(null);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const handleError = (event) => {
|
|
29
|
+
if (event.error?.message?.includes("AuthSessionMissingError") || event.error?.message?.includes("Auth session missing")) {
|
|
30
|
+
console.warn("[AuthProvider] Suppressing AuthSessionMissingError during logout");
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const handleUnhandledRejection = (event) => {
|
|
36
|
+
if (event.reason?.message?.includes("AuthSessionMissingError") || event.reason?.message?.includes("Auth session missing")) {
|
|
37
|
+
console.warn("[AuthProvider] Suppressing unhandled AuthSessionMissingError");
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
window.addEventListener("error", handleError);
|
|
43
|
+
window.addEventListener("unhandledrejection", handleUnhandledRejection);
|
|
44
|
+
return () => {
|
|
45
|
+
window.removeEventListener("error", handleError);
|
|
46
|
+
window.removeEventListener("unhandledrejection", handleUnhandledRejection);
|
|
47
|
+
};
|
|
48
|
+
}, []);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (!supabaseClient) return;
|
|
51
|
+
const loadInitialUser = async () => {
|
|
52
|
+
try {
|
|
53
|
+
const response = await supabaseClient.auth.getUser();
|
|
54
|
+
const { data: { user: initialUser }, error } = response || { data: { user: null }, error: null };
|
|
55
|
+
if (error) {
|
|
56
|
+
console.warn("Failed to get initial user:", error);
|
|
57
|
+
setAuthLoading(false);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (initialUser) {
|
|
61
|
+
setUser(initialUser);
|
|
62
|
+
}
|
|
63
|
+
setAuthLoading(false);
|
|
64
|
+
} catch (error) {
|
|
65
|
+
console.error("Error loading initial user:", error);
|
|
66
|
+
setAuthLoading(false);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const timeoutId = setTimeout(() => {
|
|
70
|
+
if (authLoading && !user && !session) {
|
|
71
|
+
loadInitialUser();
|
|
72
|
+
}
|
|
73
|
+
}, 100);
|
|
74
|
+
return () => clearTimeout(timeoutId);
|
|
75
|
+
}, [supabaseClient, authLoading, user, session]);
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
if (!supabaseClient) {
|
|
78
|
+
setAuthLoading(false);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const timeoutId = setTimeout(() => {
|
|
82
|
+
if (authLoading) {
|
|
83
|
+
console.warn("AuthProvider: Auth loading timeout reached");
|
|
84
|
+
setAuthLoading(false);
|
|
85
|
+
}
|
|
86
|
+
}, 2e3);
|
|
87
|
+
try {
|
|
88
|
+
DebugLogger.log("AuthProvider", "Setting up auth state change listener...");
|
|
89
|
+
const authStateChange = supabaseClient.auth.onAuthStateChange(
|
|
90
|
+
(event, session2) => {
|
|
91
|
+
try {
|
|
92
|
+
DebugLogger.log("AuthProvider", "Auth state changed:", event, session2?.user?.email);
|
|
93
|
+
clearTimeout(timeoutId);
|
|
94
|
+
if (event === "SIGNED_OUT") {
|
|
95
|
+
DebugLogger.log("AuthProvider", "User signed out, clearing all state");
|
|
96
|
+
setSession(null);
|
|
97
|
+
setUser(null);
|
|
98
|
+
setAuthLoading(false);
|
|
99
|
+
setAuthError(null);
|
|
100
|
+
} else {
|
|
101
|
+
setSession(session2);
|
|
102
|
+
setUser(session2?.user ?? null);
|
|
103
|
+
setAuthLoading(false);
|
|
104
|
+
if (session2) {
|
|
105
|
+
setAuthError(null);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
} catch (error) {
|
|
109
|
+
console.warn("[AuthProvider] Error in auth state change handler:", error);
|
|
110
|
+
setAuthLoading(false);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
const subscription = authStateChange?.data?.subscription || authStateChange;
|
|
115
|
+
return () => {
|
|
116
|
+
clearTimeout(timeoutId);
|
|
117
|
+
if (subscription && typeof subscription.unsubscribe === "function") {
|
|
118
|
+
DebugLogger.log("AuthProvider", "Cleaning up auth state listener");
|
|
119
|
+
subscription.unsubscribe();
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
} catch (error) {
|
|
123
|
+
console.error("AuthProvider: Error setting up auth state change listener:", error);
|
|
124
|
+
if (error instanceof Error && !error.message.includes("No API key found") && !error.message.includes("AuthSessionMissingError") && !error.message.includes("Auth session missing")) {
|
|
125
|
+
setAuthError(error);
|
|
126
|
+
}
|
|
127
|
+
setAuthLoading(false);
|
|
128
|
+
clearTimeout(timeoutId);
|
|
129
|
+
return () => {
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}, [supabaseClient]);
|
|
133
|
+
const signIn = useCallback(async (email, password) => {
|
|
134
|
+
if (!supabaseClient) {
|
|
135
|
+
const error = new Error("No Supabase client provided");
|
|
136
|
+
setAuthError(error);
|
|
137
|
+
return { error };
|
|
138
|
+
}
|
|
139
|
+
setAuthLoading(true);
|
|
140
|
+
setAuthError(null);
|
|
141
|
+
try {
|
|
142
|
+
const { error } = await supabaseClient.auth.signInWithPassword({ email, password: password || "" });
|
|
143
|
+
if (error) {
|
|
144
|
+
setAuthError(error);
|
|
145
|
+
}
|
|
146
|
+
return { error };
|
|
147
|
+
} catch (err) {
|
|
148
|
+
const authError2 = err;
|
|
149
|
+
setAuthError(authError2);
|
|
150
|
+
return { error: authError2 };
|
|
151
|
+
} finally {
|
|
152
|
+
setAuthLoading(false);
|
|
153
|
+
}
|
|
154
|
+
}, [supabaseClient]);
|
|
155
|
+
const signUp = useCallback(async (email, password) => {
|
|
156
|
+
if (!supabaseClient) {
|
|
157
|
+
const error = new Error("No Supabase client provided");
|
|
158
|
+
setAuthError(error);
|
|
159
|
+
return { error };
|
|
160
|
+
}
|
|
161
|
+
setAuthError(null);
|
|
162
|
+
try {
|
|
163
|
+
const { error } = await supabaseClient.auth.signUp({ email, password });
|
|
164
|
+
if (error) {
|
|
165
|
+
setAuthError(error);
|
|
166
|
+
}
|
|
167
|
+
return { error };
|
|
168
|
+
} catch (err) {
|
|
169
|
+
const authError2 = err;
|
|
170
|
+
setAuthError(authError2);
|
|
171
|
+
return { error: authError2 };
|
|
172
|
+
}
|
|
173
|
+
}, [supabaseClient]);
|
|
174
|
+
const signOut = useCallback(async () => {
|
|
175
|
+
DebugLogger.log("AuthProvider", "signOut called");
|
|
176
|
+
setAuthLoading(false);
|
|
177
|
+
if (!supabaseClient) {
|
|
178
|
+
DebugLogger.log("AuthProvider", "No supabase client, clearing state manually");
|
|
179
|
+
setUser(null);
|
|
180
|
+
setSession(null);
|
|
181
|
+
setAuthError(null);
|
|
182
|
+
return { error: null };
|
|
183
|
+
}
|
|
184
|
+
DebugLogger.log("AuthProvider", "Pre-clearing state before signOut call");
|
|
185
|
+
setUser(null);
|
|
186
|
+
setSession(null);
|
|
187
|
+
setAuthError(null);
|
|
188
|
+
try {
|
|
189
|
+
DebugLogger.log("AuthProvider", "Calling supabase signOut");
|
|
190
|
+
const signOutPromise = supabaseClient.auth.signOut();
|
|
191
|
+
const timeoutPromise = new Promise(
|
|
192
|
+
(_, reject) => setTimeout(() => reject(new Error("SignOut timeout")), 3e3)
|
|
193
|
+
);
|
|
194
|
+
const { error } = await Promise.race([signOutPromise, timeoutPromise]);
|
|
195
|
+
if (error && !error.message?.includes("SignOut timeout")) {
|
|
196
|
+
console.error("[AuthProvider] signOut error:", error);
|
|
197
|
+
}
|
|
198
|
+
DebugLogger.log("AuthProvider", "signOut process completed");
|
|
199
|
+
return { error: null };
|
|
200
|
+
} catch (err) {
|
|
201
|
+
console.warn("[AuthProvider] signOut exception (ignored):", err);
|
|
202
|
+
return { error: null };
|
|
203
|
+
}
|
|
204
|
+
}, [supabaseClient]);
|
|
205
|
+
const resetPassword = useCallback(async (email) => {
|
|
206
|
+
if (!supabaseClient) {
|
|
207
|
+
const error = new Error("No Supabase client provided");
|
|
208
|
+
setAuthError(error);
|
|
209
|
+
return { error };
|
|
210
|
+
}
|
|
211
|
+
setAuthError(null);
|
|
212
|
+
try {
|
|
213
|
+
const { error } = await supabaseClient.auth.resetPasswordForEmail(email);
|
|
214
|
+
if (error) {
|
|
215
|
+
setAuthError(error);
|
|
216
|
+
}
|
|
217
|
+
return { error };
|
|
218
|
+
} catch (err) {
|
|
219
|
+
const authError2 = err;
|
|
220
|
+
setAuthError(authError2);
|
|
221
|
+
return { error: authError2 };
|
|
222
|
+
}
|
|
223
|
+
}, [supabaseClient]);
|
|
224
|
+
const updatePassword = useCallback(async (password) => {
|
|
225
|
+
if (!supabaseClient) return { error: new AuthError("Supabase client not available.", 500) };
|
|
226
|
+
const { error } = await supabaseClient.auth.updateUser({ password });
|
|
227
|
+
if (error) {
|
|
228
|
+
setAuthError(error);
|
|
229
|
+
}
|
|
230
|
+
return { error };
|
|
231
|
+
}, [supabaseClient]);
|
|
232
|
+
const refreshSession = useCallback(async () => {
|
|
233
|
+
if (!supabaseClient) {
|
|
234
|
+
const error = new Error("No Supabase client provided");
|
|
235
|
+
setAuthError(error);
|
|
236
|
+
return { error };
|
|
237
|
+
}
|
|
238
|
+
setAuthError(null);
|
|
239
|
+
try {
|
|
240
|
+
const { error } = await supabaseClient.auth.refreshSession();
|
|
241
|
+
if (error) {
|
|
242
|
+
setAuthError(error);
|
|
243
|
+
}
|
|
244
|
+
return { error };
|
|
245
|
+
} catch (err) {
|
|
246
|
+
const authError2 = err;
|
|
247
|
+
setAuthError(authError2);
|
|
248
|
+
return { error: authError2 };
|
|
249
|
+
}
|
|
250
|
+
}, [supabaseClient]);
|
|
251
|
+
const isAuthenticated = !!user;
|
|
252
|
+
const contextValue = useMemo(() => ({
|
|
253
|
+
user,
|
|
254
|
+
session,
|
|
255
|
+
isAuthenticated,
|
|
256
|
+
authLoading,
|
|
257
|
+
authError,
|
|
258
|
+
error: authError,
|
|
259
|
+
// Alias for backward compatibility
|
|
260
|
+
supabase: supabaseClient || null,
|
|
261
|
+
signIn,
|
|
262
|
+
signUp,
|
|
263
|
+
signOut,
|
|
264
|
+
resetPassword,
|
|
265
|
+
updatePassword,
|
|
266
|
+
refreshSession
|
|
267
|
+
}), [
|
|
268
|
+
user,
|
|
269
|
+
session,
|
|
270
|
+
isAuthenticated,
|
|
271
|
+
authLoading,
|
|
272
|
+
authError,
|
|
273
|
+
supabaseClient,
|
|
274
|
+
signIn,
|
|
275
|
+
signUp,
|
|
276
|
+
signOut,
|
|
277
|
+
resetPassword,
|
|
278
|
+
updatePassword,
|
|
279
|
+
refreshSession
|
|
280
|
+
]);
|
|
281
|
+
return /* @__PURE__ */ jsx(AuthContext.Provider, { value: contextValue, children });
|
|
282
|
+
}
|
|
283
|
+
var AuthContext, useAuth;
|
|
284
|
+
var init_AuthProvider = __esm({
|
|
285
|
+
"src/providers/AuthProvider.tsx"() {
|
|
286
|
+
"use strict";
|
|
287
|
+
init_debugLogger();
|
|
288
|
+
AuthContext = createContext(void 0);
|
|
289
|
+
useAuth = () => {
|
|
290
|
+
const context = useContext(AuthContext);
|
|
291
|
+
if (!context) {
|
|
292
|
+
throw new Error("useAuth must be used within an AuthProvider");
|
|
293
|
+
}
|
|
294
|
+
return context;
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
// src/providers/RBACProvider.tsx
|
|
300
|
+
import { createContext as createContext2, useContext as useContext2, useState as useState2, useEffect as useEffect2, useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
301
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
302
|
+
function RBACProvider({
|
|
303
|
+
children,
|
|
304
|
+
supabaseClient,
|
|
305
|
+
user,
|
|
306
|
+
session,
|
|
307
|
+
appName,
|
|
308
|
+
enableRBAC = false,
|
|
309
|
+
persistState = true,
|
|
310
|
+
enablePersistence,
|
|
311
|
+
requireOrganisationContext: _requireOrganisationContext = true
|
|
312
|
+
}) {
|
|
313
|
+
const shouldPersist = enablePersistence !== void 0 ? enablePersistence : persistState;
|
|
314
|
+
const [permissions, setPermissions] = useState2({});
|
|
315
|
+
const [roles, setRoles] = useState2([]);
|
|
316
|
+
const [accessLevel, setAccessLevel] = useState2("viewer" /* VIEWER */);
|
|
317
|
+
const [rbacLoading, setRbacLoading] = useState2(false);
|
|
318
|
+
const [rbacError, setRbacError] = useState2(null);
|
|
319
|
+
const [selectedEventId, setSelectedEventId] = useState2(null);
|
|
320
|
+
const [appConfig, setAppConfig] = useState2(null);
|
|
321
|
+
const [userEventAccess, setUserEventAccess] = useState2([]);
|
|
322
|
+
const [eventAccessLoading, setEventAccessLoading] = useState2(false);
|
|
323
|
+
const [selectedOrganisationId, _setSelectedOrganisationId] = useState2(null);
|
|
324
|
+
useEffect2(() => {
|
|
325
|
+
if (!supabaseClient) return;
|
|
326
|
+
const loadAppConfig = async () => {
|
|
327
|
+
try {
|
|
328
|
+
const { getCurrentAppName } = await import("./appNameResolver-7GHF5ED2.js");
|
|
329
|
+
const resolvedAppName = getCurrentAppName() || appName;
|
|
330
|
+
const { data: appData, error: appError } = await supabaseClient.from("rbac_apps").select("id").eq("name", resolvedAppName).eq("is_active", true).single();
|
|
331
|
+
if (appError || !appData) {
|
|
332
|
+
console.warn("App not found or inactive:", resolvedAppName);
|
|
333
|
+
setAppConfig({
|
|
334
|
+
supports_direct_access: false,
|
|
335
|
+
requires_event: true
|
|
336
|
+
});
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
const response = await supabaseClient.rpc("get_app_config", {
|
|
340
|
+
p_app_id: appData.id
|
|
341
|
+
});
|
|
342
|
+
const { data } = response || {};
|
|
343
|
+
if (data && data.length > 0) {
|
|
344
|
+
setAppConfig({
|
|
345
|
+
supports_direct_access: data[0].supports_direct_access,
|
|
346
|
+
requires_event: data[0].requires_event
|
|
347
|
+
});
|
|
348
|
+
} else {
|
|
349
|
+
setAppConfig({
|
|
350
|
+
supports_direct_access: false,
|
|
351
|
+
requires_event: true
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
} catch (error) {
|
|
355
|
+
console.warn("Clearing corrupted localStorage data");
|
|
356
|
+
if (typeof localStorage !== "undefined") {
|
|
357
|
+
localStorage.removeItem(STORAGE_KEYS.SELECTED_EVENT);
|
|
358
|
+
}
|
|
359
|
+
console.warn("Failed to load app configuration:", error);
|
|
360
|
+
setAppConfig({
|
|
361
|
+
supports_direct_access: false,
|
|
362
|
+
requires_event: true
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
loadAppConfig();
|
|
367
|
+
}, [supabaseClient, appName]);
|
|
368
|
+
useEffect2(() => {
|
|
369
|
+
const isSuperAdmin = user?.user_metadata?.globalRole === "super_admin";
|
|
370
|
+
if (isSuperAdmin) {
|
|
371
|
+
setRoles(["super_admin"]);
|
|
372
|
+
} else {
|
|
373
|
+
setRoles([]);
|
|
374
|
+
}
|
|
375
|
+
}, [user]);
|
|
376
|
+
useEffect2(() => {
|
|
377
|
+
if (!shouldPersist) return;
|
|
378
|
+
try {
|
|
379
|
+
const persistedEvent = localStorage.getItem(STORAGE_KEYS.SELECTED_EVENT);
|
|
380
|
+
if (persistedEvent) {
|
|
381
|
+
setSelectedEventId(JSON.parse(persistedEvent));
|
|
382
|
+
}
|
|
383
|
+
} catch (error) {
|
|
384
|
+
console.warn("Clearing corrupted localStorage data");
|
|
385
|
+
localStorage.removeItem(STORAGE_KEYS.SELECTED_EVENT);
|
|
386
|
+
}
|
|
387
|
+
}, [shouldPersist]);
|
|
388
|
+
useEffect2(() => {
|
|
389
|
+
if (!shouldPersist) return;
|
|
390
|
+
try {
|
|
391
|
+
if (selectedEventId) {
|
|
392
|
+
localStorage.setItem(
|
|
393
|
+
STORAGE_KEYS.SELECTED_EVENT,
|
|
394
|
+
JSON.stringify(selectedEventId)
|
|
395
|
+
);
|
|
396
|
+
} else {
|
|
397
|
+
localStorage.removeItem(STORAGE_KEYS.SELECTED_EVENT);
|
|
398
|
+
}
|
|
399
|
+
} catch (error) {
|
|
400
|
+
console.warn("Clearing corrupted localStorage data");
|
|
401
|
+
localStorage.removeItem(STORAGE_KEYS.SELECTED_EVENT);
|
|
402
|
+
console.warn("Failed to persist auth state:", error);
|
|
403
|
+
}
|
|
404
|
+
}, [selectedEventId, shouldPersist]);
|
|
405
|
+
const refreshPermissions = useCallback2(async (eventId) => {
|
|
406
|
+
if (!supabaseClient || !user || !appConfig || !session) {
|
|
407
|
+
DebugLogger.log("RBACProvider", "refreshPermissions: Missing required dependencies, clearing permissions");
|
|
408
|
+
setPermissions({});
|
|
409
|
+
setRoles([]);
|
|
410
|
+
setAccessLevel("viewer" /* VIEWER */);
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
const isSuperAdmin = user?.user_metadata?.globalRole === "super_admin";
|
|
414
|
+
if (isSuperAdmin) {
|
|
415
|
+
setPermissions({
|
|
416
|
+
"admin:create": true,
|
|
417
|
+
"admin:read": true,
|
|
418
|
+
"admin:update": true,
|
|
419
|
+
"admin:delete": true,
|
|
420
|
+
"users:create": true,
|
|
421
|
+
"users:read": true,
|
|
422
|
+
"users:update": true,
|
|
423
|
+
"users:delete": true,
|
|
424
|
+
"events:create": true,
|
|
425
|
+
"events:read": true,
|
|
426
|
+
"events:update": true,
|
|
427
|
+
"events:delete": true
|
|
428
|
+
});
|
|
429
|
+
setRoles(["super_admin"]);
|
|
430
|
+
setAccessLevel("admin" /* ADMIN */);
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
const shouldLoadDirectPermissions = !eventId && !appConfig.requires_event;
|
|
434
|
+
const shouldLoadEventPermissions = eventId;
|
|
435
|
+
const shouldClearPermissions = !eventId && appConfig.requires_event;
|
|
436
|
+
if (shouldClearPermissions) {
|
|
437
|
+
setPermissions({});
|
|
438
|
+
setRoles([]);
|
|
439
|
+
setAccessLevel("viewer" /* VIEWER */);
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
if (!shouldLoadDirectPermissions && !shouldLoadEventPermissions) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
setRbacLoading(true);
|
|
446
|
+
setRbacError(null);
|
|
447
|
+
try {
|
|
448
|
+
const { getCurrentAppName } = await import("./appNameResolver-7GHF5ED2.js");
|
|
449
|
+
const resolvedAppName = getCurrentAppName() || appName;
|
|
450
|
+
const { data: appData, error: appError } = await supabaseClient.from("rbac_apps").select("id").eq("name", resolvedAppName).eq("is_active", true).single();
|
|
451
|
+
if (appError || !appData) {
|
|
452
|
+
console.warn("App not found or inactive:", resolvedAppName);
|
|
453
|
+
setRbacLoading(false);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
const { data, error } = await supabaseClient.rpc("get_rbac_permissions", {
|
|
457
|
+
p_user_id: user.id,
|
|
458
|
+
p_app_id: appData.id,
|
|
459
|
+
p_event_id: eventId || null,
|
|
460
|
+
p_organisation_id: selectedOrganisationId || null
|
|
461
|
+
});
|
|
462
|
+
if (error) {
|
|
463
|
+
throw error;
|
|
464
|
+
}
|
|
465
|
+
const { permissions: permissions2, roles: roles2, access_level } = transformRBACPermissions(data, appName);
|
|
466
|
+
setPermissions(permissions2);
|
|
467
|
+
setRoles(roles2);
|
|
468
|
+
setAccessLevel(access_level);
|
|
469
|
+
} catch (err) {
|
|
470
|
+
setRbacError(err);
|
|
471
|
+
} finally {
|
|
472
|
+
setRbacLoading(false);
|
|
473
|
+
}
|
|
474
|
+
}, [supabaseClient, user, session, appName, appConfig, selectedOrganisationId]);
|
|
475
|
+
const loadUserEventAccess = useCallback2(async () => {
|
|
476
|
+
if (!supabaseClient || !user || !session) {
|
|
477
|
+
DebugLogger.log("RBACProvider", "loadUserEventAccess: Missing required dependencies, clearing event access");
|
|
478
|
+
setUserEventAccess([]);
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
setEventAccessLoading(true);
|
|
482
|
+
try {
|
|
483
|
+
const { getCurrentAppName } = await import("./appNameResolver-7GHF5ED2.js");
|
|
484
|
+
const resolvedAppName = getCurrentAppName() || appName;
|
|
485
|
+
const { data: appData, error: appError } = await supabaseClient.from("rbac_apps").select("id").eq("name", resolvedAppName).eq("is_active", true).single();
|
|
486
|
+
if (appError || !appData) {
|
|
487
|
+
console.warn("App not found or inactive:", resolvedAppName);
|
|
488
|
+
setEventAccessLoading(false);
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
const { data, error } = await supabaseClient.from("rbac_event_app_roles").select(`
|
|
492
|
+
event_id,
|
|
493
|
+
role,
|
|
494
|
+
granted_at
|
|
495
|
+
`).eq("user_id", user.id).eq("app_id", appData.id);
|
|
496
|
+
if (error) {
|
|
497
|
+
console.error("Failed to load user event access:", error);
|
|
498
|
+
setUserEventAccess([]);
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
const eventAccess = data?.map((item) => ({
|
|
502
|
+
event_id: item.event_id,
|
|
503
|
+
event_name: "Unknown Event",
|
|
504
|
+
// Event details not available in this query
|
|
505
|
+
event_description: null,
|
|
506
|
+
// Not available in this schema
|
|
507
|
+
start_date: "",
|
|
508
|
+
// Event date not available in this query
|
|
509
|
+
end_date: "",
|
|
510
|
+
// Event date not available in this query
|
|
511
|
+
event_status: "unknown",
|
|
512
|
+
// Not available in this schema
|
|
513
|
+
app_id: appData.id,
|
|
514
|
+
access_level: item.role,
|
|
515
|
+
// Map role to access_level
|
|
516
|
+
granted_at: item.granted_at,
|
|
517
|
+
organisation_id: ""
|
|
518
|
+
// Will be populated from event's organisation_id if needed
|
|
519
|
+
})) || [];
|
|
520
|
+
setUserEventAccess(eventAccess);
|
|
521
|
+
} catch (error) {
|
|
522
|
+
console.warn("Clearing corrupted localStorage data");
|
|
523
|
+
localStorage.removeItem(STORAGE_KEYS.SELECTED_EVENT);
|
|
524
|
+
console.error("Error loading user event access:", error);
|
|
525
|
+
setUserEventAccess([]);
|
|
526
|
+
} finally {
|
|
527
|
+
setEventAccessLoading(false);
|
|
528
|
+
}
|
|
529
|
+
}, [supabaseClient, user, session, appName]);
|
|
530
|
+
const getUserEventAccess = useCallback2((eventId) => {
|
|
531
|
+
return userEventAccess.find((access) => access.event_id === eventId);
|
|
532
|
+
}, [userEventAccess]);
|
|
533
|
+
useEffect2(() => {
|
|
534
|
+
if (!user || !appConfig || !session) {
|
|
535
|
+
DebugLogger.log("RBACProvider", "Skipping permission refresh - no user, session, or app config");
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
const isSuperAdmin = user?.user_metadata?.globalRole === "super_admin";
|
|
539
|
+
if (isSuperAdmin) {
|
|
540
|
+
setPermissions({
|
|
541
|
+
"admin:create": true,
|
|
542
|
+
"admin:read": true,
|
|
543
|
+
"admin:update": true,
|
|
544
|
+
"admin:delete": true,
|
|
545
|
+
"users:create": true,
|
|
546
|
+
"users:read": true,
|
|
547
|
+
"users:update": true,
|
|
548
|
+
"users:delete": true,
|
|
549
|
+
"events:create": true,
|
|
550
|
+
"events:read": true,
|
|
551
|
+
"events:update": true,
|
|
552
|
+
"events:delete": true
|
|
553
|
+
});
|
|
554
|
+
setRoles(["super_admin"]);
|
|
555
|
+
setAccessLevel("admin" /* ADMIN */);
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
if (selectedEventId) {
|
|
559
|
+
refreshPermissions(selectedEventId);
|
|
560
|
+
} else if (!appConfig.requires_event) {
|
|
561
|
+
refreshPermissions();
|
|
562
|
+
} else {
|
|
563
|
+
setPermissions({});
|
|
564
|
+
setRoles([]);
|
|
565
|
+
setAccessLevel("viewer" /* VIEWER */);
|
|
566
|
+
}
|
|
567
|
+
}, [selectedEventId, user, session, appConfig, refreshPermissions]);
|
|
568
|
+
useEffect2(() => {
|
|
569
|
+
let isMounted = true;
|
|
570
|
+
if (user && session) {
|
|
571
|
+
DebugLogger.log("RBACProvider", "Loading user event access for authenticated user");
|
|
572
|
+
loadUserEventAccess().catch((error) => {
|
|
573
|
+
if (isMounted) {
|
|
574
|
+
console.error("Error loading user event access:", error);
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
} else {
|
|
578
|
+
DebugLogger.log("RBACProvider", "Clearing user event access - no user or session");
|
|
579
|
+
if (isMounted) {
|
|
580
|
+
setUserEventAccess([]);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
return () => {
|
|
584
|
+
isMounted = false;
|
|
585
|
+
};
|
|
586
|
+
}, [user, session, loadUserEventAccess]);
|
|
587
|
+
const hasPermission = useCallback2((permission) => {
|
|
588
|
+
const hasPerm = !!permissions[permission];
|
|
589
|
+
return hasPerm;
|
|
590
|
+
}, [permissions]);
|
|
591
|
+
const hasAnyPermission = useCallback2((perms) => perms.some((p) => !!permissions[p]), [permissions]);
|
|
592
|
+
const hasAllPermissions = useCallback2((perms) => perms.every((p) => !!permissions[p]), [permissions]);
|
|
593
|
+
const hasRole = useCallback2((role) => {
|
|
594
|
+
const isSuperAdmin = user?.user_metadata?.globalRole === "super_admin";
|
|
595
|
+
if (role.toLowerCase() === "super_admin") {
|
|
596
|
+
return isSuperAdmin;
|
|
597
|
+
}
|
|
598
|
+
return roles.includes(role);
|
|
599
|
+
}, [roles, user]);
|
|
600
|
+
const hasAccessLevel = useCallback2((level) => {
|
|
601
|
+
const levels = Object.values(AccessLevel);
|
|
602
|
+
return levels.indexOf(accessLevel) >= levels.indexOf(level);
|
|
603
|
+
}, [accessLevel]);
|
|
604
|
+
const canAccess = useCallback2((resource, action) => {
|
|
605
|
+
const permission = `${resource}:${action}`;
|
|
606
|
+
const hasAccess = hasPermission(permission);
|
|
607
|
+
return hasAccess;
|
|
608
|
+
}, [hasPermission]);
|
|
609
|
+
const validatePermission = useCallback2(async (permission) => hasPermission(permission), [hasPermission]);
|
|
610
|
+
const validateAccess = useCallback2(async (resource, action) => {
|
|
611
|
+
return Promise.resolve(canAccess(resource, action));
|
|
612
|
+
}, [canAccess]);
|
|
613
|
+
const contextValue = useMemo2(() => ({
|
|
614
|
+
permissions,
|
|
615
|
+
roles,
|
|
616
|
+
accessLevel,
|
|
617
|
+
rbacLoading,
|
|
618
|
+
rbacError,
|
|
619
|
+
selectedEventId,
|
|
620
|
+
appConfig,
|
|
621
|
+
userEventAccess,
|
|
622
|
+
eventAccessLoading,
|
|
623
|
+
// Organisation context
|
|
624
|
+
selectedOrganisationId,
|
|
625
|
+
requireOrganisationContext: () => {
|
|
626
|
+
if (!selectedOrganisationId) {
|
|
627
|
+
throw new Error("Organisation context is required but not available");
|
|
628
|
+
}
|
|
629
|
+
return selectedOrganisationId;
|
|
630
|
+
},
|
|
631
|
+
hasPermission,
|
|
632
|
+
hasAnyPermission,
|
|
633
|
+
hasAllPermissions,
|
|
634
|
+
hasRole,
|
|
635
|
+
hasAccessLevel,
|
|
636
|
+
canAccess,
|
|
637
|
+
validatePermission,
|
|
638
|
+
validateAccess,
|
|
639
|
+
refreshPermissions,
|
|
640
|
+
setSelectedEventId,
|
|
641
|
+
// New RBAC system support
|
|
642
|
+
rbacEnabled: enableRBAC,
|
|
643
|
+
rbacContext: void 0,
|
|
644
|
+
// Will be populated by useRBAC hook when enabled
|
|
645
|
+
loadUserEventAccess,
|
|
646
|
+
getUserEventAccess
|
|
647
|
+
}), [
|
|
648
|
+
permissions,
|
|
649
|
+
roles,
|
|
650
|
+
accessLevel,
|
|
651
|
+
rbacLoading,
|
|
652
|
+
rbacError,
|
|
653
|
+
selectedEventId,
|
|
654
|
+
appConfig,
|
|
655
|
+
userEventAccess,
|
|
656
|
+
eventAccessLoading,
|
|
657
|
+
selectedOrganisationId,
|
|
658
|
+
hasPermission,
|
|
659
|
+
hasAnyPermission,
|
|
660
|
+
hasAllPermissions,
|
|
661
|
+
hasRole,
|
|
662
|
+
hasAccessLevel,
|
|
663
|
+
canAccess,
|
|
664
|
+
validatePermission,
|
|
665
|
+
validateAccess,
|
|
666
|
+
refreshPermissions,
|
|
667
|
+
setSelectedEventId,
|
|
668
|
+
enableRBAC,
|
|
669
|
+
loadUserEventAccess,
|
|
670
|
+
getUserEventAccess
|
|
671
|
+
]);
|
|
672
|
+
return /* @__PURE__ */ jsx2(RBACContext.Provider, { value: contextValue, children });
|
|
673
|
+
}
|
|
674
|
+
var RBACContext, useRBAC, STORAGE_KEYS, transformRBACPermissions;
|
|
675
|
+
var init_RBACProvider = __esm({
|
|
676
|
+
"src/providers/RBACProvider.tsx"() {
|
|
677
|
+
"use strict";
|
|
678
|
+
init_unified();
|
|
679
|
+
init_debugLogger();
|
|
680
|
+
RBACContext = createContext2(void 0);
|
|
681
|
+
useRBAC = () => {
|
|
682
|
+
const context = useContext2(RBACContext);
|
|
683
|
+
if (!context) {
|
|
684
|
+
throw new Error("useRBAC must be used within an RBACProvider");
|
|
685
|
+
}
|
|
686
|
+
return context;
|
|
687
|
+
};
|
|
688
|
+
STORAGE_KEYS = {
|
|
689
|
+
SELECTED_EVENT: "pace-core-selected-event"
|
|
690
|
+
};
|
|
691
|
+
transformRBACPermissions = (rbacData, _appName) => {
|
|
692
|
+
const permissions = {};
|
|
693
|
+
let roles = [];
|
|
694
|
+
let access_level = "viewer" /* VIEWER */;
|
|
695
|
+
if (!rbacData || !Array.isArray(rbacData)) {
|
|
696
|
+
return { permissions: {}, roles: ["viewer"], access_level: "viewer" /* VIEWER */ };
|
|
697
|
+
}
|
|
698
|
+
const superAdminPerm = rbacData.find((p) => p.permission_type === "all_permissions");
|
|
699
|
+
if (superAdminPerm) {
|
|
700
|
+
return {
|
|
701
|
+
permissions: { "all:all": true },
|
|
702
|
+
roles: ["super"],
|
|
703
|
+
access_level: "super" /* SUPER */
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
const eventAppPerms = rbacData.filter((p) => p.permission_type === "event_app_access");
|
|
707
|
+
if (eventAppPerms.length > 0) {
|
|
708
|
+
const role = eventAppPerms[0].role_name;
|
|
709
|
+
switch (role) {
|
|
710
|
+
case "event_admin":
|
|
711
|
+
access_level = "admin" /* ADMIN */;
|
|
712
|
+
roles = ["admin"];
|
|
713
|
+
break;
|
|
714
|
+
case "planner":
|
|
715
|
+
access_level = "planner" /* PLANNER */;
|
|
716
|
+
roles = ["planner"];
|
|
717
|
+
break;
|
|
718
|
+
case "participant":
|
|
719
|
+
access_level = "participant" /* PARTICIPANT */;
|
|
720
|
+
roles = ["participant"];
|
|
721
|
+
break;
|
|
722
|
+
case "editor":
|
|
723
|
+
access_level = "editor" /* EDITOR */;
|
|
724
|
+
roles = ["editor"];
|
|
725
|
+
break;
|
|
726
|
+
case "viewer":
|
|
727
|
+
default:
|
|
728
|
+
access_level = "viewer" /* VIEWER */;
|
|
729
|
+
roles = ["viewer"];
|
|
730
|
+
break;
|
|
731
|
+
}
|
|
732
|
+
const basePermissions = ["read"];
|
|
733
|
+
if (["event_admin", "planner"].includes(role)) {
|
|
734
|
+
basePermissions.push("create", "update");
|
|
735
|
+
}
|
|
736
|
+
if (role === "event_admin") {
|
|
737
|
+
basePermissions.push("delete");
|
|
738
|
+
}
|
|
739
|
+
basePermissions.forEach((operation) => {
|
|
740
|
+
permissions[`default:${operation}`] = true;
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
const orgPerms = rbacData.filter((p) => p.permission_type === "organisation_access");
|
|
744
|
+
if (orgPerms.length > 0) {
|
|
745
|
+
const role = orgPerms[0].role_name;
|
|
746
|
+
if (role === "org_admin") {
|
|
747
|
+
access_level = "admin" /* ADMIN */;
|
|
748
|
+
roles = ["admin"];
|
|
749
|
+
["create", "read", "update", "delete"].forEach((operation) => {
|
|
750
|
+
permissions[`default:${operation}`] = true;
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
return { permissions, roles, access_level };
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
});
|
|
758
|
+
|
|
759
|
+
// src/hooks/useInactivityTracker.ts
|
|
760
|
+
import { useState as useState3, useEffect as useEffect3, useCallback as useCallback3, useRef } from "react";
|
|
761
|
+
function throttle(func, limit) {
|
|
762
|
+
let inThrottle;
|
|
763
|
+
return function(...args) {
|
|
764
|
+
if (!inThrottle) {
|
|
765
|
+
func.apply(this, args);
|
|
766
|
+
inThrottle = true;
|
|
767
|
+
setTimeout(() => inThrottle = false, limit);
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
function useInactivityTracker({
|
|
772
|
+
idleTimeoutMs = 30 * 60 * 1e3,
|
|
773
|
+
// 30 minutes
|
|
774
|
+
warnBeforeMs = 60 * 1e3,
|
|
775
|
+
// 1 minute
|
|
776
|
+
onIdle,
|
|
777
|
+
onWarning,
|
|
778
|
+
onActivity,
|
|
779
|
+
enabled = true,
|
|
780
|
+
storageKey = "pace-core-inactivity",
|
|
781
|
+
channelName = "pace-core-inactivity"
|
|
782
|
+
} = {}) {
|
|
783
|
+
const [isIdle, setIsIdle] = useState3(false);
|
|
784
|
+
const [timeRemaining, setTimeRemaining] = useState3(idleTimeoutMs);
|
|
785
|
+
const [showWarning, setShowWarning] = useState3(false);
|
|
786
|
+
const [isTracking, setIsTracking] = useState3(false);
|
|
787
|
+
useEffect3(() => {
|
|
788
|
+
if (!enabled) {
|
|
789
|
+
setIsTracking(false);
|
|
790
|
+
setIsIdle(false);
|
|
791
|
+
setShowWarning(false);
|
|
792
|
+
setTimeRemaining(idleTimeoutMs);
|
|
793
|
+
}
|
|
794
|
+
}, [enabled, idleTimeoutMs]);
|
|
795
|
+
const timeoutRef = useRef(null);
|
|
796
|
+
const warningTimeoutRef = useRef(null);
|
|
797
|
+
const countdownIntervalRef = useRef(null);
|
|
798
|
+
const lastActivityRef = useRef(Date.now());
|
|
799
|
+
const channelRef = useRef(null);
|
|
800
|
+
const clearTimers = useCallback3(() => {
|
|
801
|
+
if (timeoutRef.current) {
|
|
802
|
+
clearTimeout(timeoutRef.current);
|
|
803
|
+
timeoutRef.current = null;
|
|
804
|
+
}
|
|
805
|
+
if (warningTimeoutRef.current) {
|
|
806
|
+
clearTimeout(warningTimeoutRef.current);
|
|
807
|
+
warningTimeoutRef.current = null;
|
|
808
|
+
}
|
|
809
|
+
if (countdownIntervalRef.current) {
|
|
810
|
+
clearInterval(countdownIntervalRef.current);
|
|
811
|
+
countdownIntervalRef.current = null;
|
|
812
|
+
}
|
|
813
|
+
}, []);
|
|
814
|
+
const resetActivity = useCallback3((skipActivityCallback = false) => {
|
|
815
|
+
if (!enabled) return;
|
|
816
|
+
const now = Date.now();
|
|
817
|
+
lastActivityRef.current = now;
|
|
818
|
+
clearTimers();
|
|
819
|
+
setIsIdle(false);
|
|
820
|
+
setShowWarning(false);
|
|
821
|
+
setTimeRemaining(idleTimeoutMs);
|
|
822
|
+
if (!skipActivityCallback) {
|
|
823
|
+
onActivity?.();
|
|
824
|
+
}
|
|
825
|
+
const warningTime = idleTimeoutMs - warnBeforeMs;
|
|
826
|
+
if (warningTime > 0) {
|
|
827
|
+
warningTimeoutRef.current = setTimeout(() => {
|
|
828
|
+
setShowWarning(true);
|
|
829
|
+
onWarning?.();
|
|
830
|
+
}, warningTime);
|
|
831
|
+
}
|
|
832
|
+
timeoutRef.current = setTimeout(() => {
|
|
833
|
+
setIsIdle(true);
|
|
834
|
+
onIdle?.();
|
|
835
|
+
}, idleTimeoutMs);
|
|
836
|
+
countdownIntervalRef.current = setInterval(() => {
|
|
837
|
+
const elapsed = Date.now() - lastActivityRef.current;
|
|
838
|
+
const remaining = Math.max(0, idleTimeoutMs - elapsed);
|
|
839
|
+
setTimeRemaining(remaining);
|
|
840
|
+
if (remaining === 0) {
|
|
841
|
+
clearTimers();
|
|
842
|
+
}
|
|
843
|
+
}, 1e3);
|
|
844
|
+
try {
|
|
845
|
+
localStorage.setItem(storageKey, now.toString());
|
|
846
|
+
} catch (error) {
|
|
847
|
+
console.warn("[useInactivityTracker] Failed to persist activity time:", error);
|
|
848
|
+
}
|
|
849
|
+
try {
|
|
850
|
+
if (channelRef.current) {
|
|
851
|
+
channelRef.current.postMessage({ type: "activity", timestamp: now });
|
|
852
|
+
}
|
|
853
|
+
} catch (error) {
|
|
854
|
+
console.warn("[useInactivityTracker] Failed to broadcast activity:", error);
|
|
855
|
+
}
|
|
856
|
+
}, [enabled, idleTimeoutMs, warnBeforeMs, onIdle, onWarning, onActivity, storageKey, clearTimers]);
|
|
857
|
+
const startTracking = useCallback3(() => {
|
|
858
|
+
if (!enabled) return;
|
|
859
|
+
setIsTracking(false);
|
|
860
|
+
setIsIdle(false);
|
|
861
|
+
setShowWarning(false);
|
|
862
|
+
setTimeRemaining(idleTimeoutMs);
|
|
863
|
+
clearTimers();
|
|
864
|
+
setIsTracking(true);
|
|
865
|
+
try {
|
|
866
|
+
if (typeof BroadcastChannel !== "undefined") {
|
|
867
|
+
channelRef.current = new BroadcastChannel(channelName);
|
|
868
|
+
channelRef.current.onmessage = (event) => {
|
|
869
|
+
if (event.data.type === "activity") {
|
|
870
|
+
lastActivityRef.current = event.data.timestamp;
|
|
871
|
+
resetActivity();
|
|
872
|
+
}
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
} catch (error) {
|
|
876
|
+
console.warn("[useInactivityTracker] Failed to set up cross-tab communication:", error);
|
|
877
|
+
}
|
|
878
|
+
try {
|
|
879
|
+
const persistedTime = localStorage.getItem(storageKey);
|
|
880
|
+
if (persistedTime) {
|
|
881
|
+
const persistedTimestamp = parseInt(persistedTime, 10);
|
|
882
|
+
const elapsed = Date.now() - persistedTimestamp;
|
|
883
|
+
if (elapsed < idleTimeoutMs) {
|
|
884
|
+
lastActivityRef.current = persistedTimestamp;
|
|
885
|
+
const remaining = idleTimeoutMs - elapsed;
|
|
886
|
+
setTimeRemaining(remaining);
|
|
887
|
+
if (remaining <= warnBeforeMs) {
|
|
888
|
+
setShowWarning(true);
|
|
889
|
+
onWarning?.();
|
|
890
|
+
}
|
|
891
|
+
if (remaining <= 0) {
|
|
892
|
+
setIsIdle(true);
|
|
893
|
+
onIdle?.();
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
} catch (error) {
|
|
899
|
+
console.warn("[useInactivityTracker] Failed to check persisted activity time:", error);
|
|
900
|
+
}
|
|
901
|
+
const throttledResetActivity = throttle((event) => {
|
|
902
|
+
resetActivity();
|
|
903
|
+
}, 100);
|
|
904
|
+
const addEventListeners = () => {
|
|
905
|
+
ACTIVITY_EVENTS.forEach((event) => {
|
|
906
|
+
document.addEventListener(event, throttledResetActivity, { passive: true });
|
|
907
|
+
});
|
|
908
|
+
};
|
|
909
|
+
const removeEventListeners = () => {
|
|
910
|
+
ACTIVITY_EVENTS.forEach((event) => {
|
|
911
|
+
document.removeEventListener(event, throttledResetActivity);
|
|
912
|
+
});
|
|
913
|
+
};
|
|
914
|
+
addEventListeners();
|
|
915
|
+
resetActivity(true);
|
|
916
|
+
return () => {
|
|
917
|
+
removeEventListeners();
|
|
918
|
+
clearTimers();
|
|
919
|
+
if (channelRef.current) {
|
|
920
|
+
channelRef.current.close();
|
|
921
|
+
channelRef.current = null;
|
|
922
|
+
}
|
|
923
|
+
};
|
|
924
|
+
}, [enabled, isTracking, channelName, storageKey, idleTimeoutMs, warnBeforeMs, onIdle, onWarning]);
|
|
925
|
+
const stopTracking = useCallback3(() => {
|
|
926
|
+
setIsTracking(false);
|
|
927
|
+
clearTimers();
|
|
928
|
+
if (channelRef.current) {
|
|
929
|
+
channelRef.current.close();
|
|
930
|
+
channelRef.current = null;
|
|
931
|
+
}
|
|
932
|
+
}, [clearTimers]);
|
|
933
|
+
useEffect3(() => {
|
|
934
|
+
if (enabled) {
|
|
935
|
+
const cleanup = startTracking();
|
|
936
|
+
return cleanup;
|
|
937
|
+
} else {
|
|
938
|
+
stopTracking();
|
|
939
|
+
}
|
|
940
|
+
}, [enabled, idleTimeoutMs, warnBeforeMs]);
|
|
941
|
+
useEffect3(() => {
|
|
942
|
+
return () => {
|
|
943
|
+
clearTimers();
|
|
944
|
+
if (channelRef.current) {
|
|
945
|
+
channelRef.current.close();
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
}, [clearTimers]);
|
|
949
|
+
return {
|
|
950
|
+
isIdle,
|
|
951
|
+
timeRemaining,
|
|
952
|
+
showWarning,
|
|
953
|
+
resetActivity,
|
|
954
|
+
startTracking,
|
|
955
|
+
stopTracking,
|
|
956
|
+
isTracking
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
var ACTIVITY_EVENTS;
|
|
960
|
+
var init_useInactivityTracker = __esm({
|
|
961
|
+
"src/hooks/useInactivityTracker.ts"() {
|
|
962
|
+
"use strict";
|
|
963
|
+
ACTIVITY_EVENTS = [
|
|
964
|
+
"mousedown",
|
|
965
|
+
"mousemove",
|
|
966
|
+
"mouseup",
|
|
967
|
+
"click",
|
|
968
|
+
"scroll",
|
|
969
|
+
"wheel",
|
|
970
|
+
"touchstart",
|
|
971
|
+
"touchmove",
|
|
972
|
+
"touchend",
|
|
973
|
+
"keydown",
|
|
974
|
+
"keyup",
|
|
975
|
+
"keypress",
|
|
976
|
+
"focus",
|
|
977
|
+
"blur",
|
|
978
|
+
"visibilitychange"
|
|
979
|
+
];
|
|
980
|
+
}
|
|
981
|
+
});
|
|
982
|
+
|
|
11
983
|
// src/components/Dialog/utils/safeHtml.ts
|
|
12
984
|
function sanitizeHtml(html) {
|
|
13
985
|
if (!html || typeof html !== "string") {
|
|
@@ -761,7 +1733,7 @@ var require_lodash = __commonJS({
|
|
|
761
1733
|
}
|
|
762
1734
|
var runInContext = (function runInContext2(context) {
|
|
763
1735
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
764
|
-
var Array2 = context.Array,
|
|
1736
|
+
var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String = context.String, TypeError = context.TypeError;
|
|
765
1737
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
766
1738
|
var coreJsData = context["__core-js_shared__"];
|
|
767
1739
|
var funcToString = funcProto.toString;
|
|
@@ -786,8 +1758,8 @@ var require_lodash = __commonJS({
|
|
|
786
1758
|
} catch (e) {
|
|
787
1759
|
}
|
|
788
1760
|
})();
|
|
789
|
-
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow =
|
|
790
|
-
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow =
|
|
1761
|
+
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
1762
|
+
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
|
791
1763
|
var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
792
1764
|
var metaMap = WeakMap && new WeakMap();
|
|
793
1765
|
var realNames = {};
|
|
@@ -1286,7 +2258,7 @@ var require_lodash = __commonJS({
|
|
|
1286
2258
|
if (typeof func != "function") {
|
|
1287
2259
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1288
2260
|
}
|
|
1289
|
-
return
|
|
2261
|
+
return setTimeout2(function() {
|
|
1290
2262
|
func.apply(undefined2, args);
|
|
1291
2263
|
}, wait);
|
|
1292
2264
|
}
|
|
@@ -2066,7 +3038,7 @@ var require_lodash = __commonJS({
|
|
|
2066
3038
|
end = end === undefined2 ? length : end;
|
|
2067
3039
|
return !start && end >= length ? array : baseSlice(array, start, end);
|
|
2068
3040
|
}
|
|
2069
|
-
var
|
|
3041
|
+
var clearTimeout2 = ctxClearTimeout || function(id) {
|
|
2070
3042
|
return root.clearTimeout(id);
|
|
2071
3043
|
};
|
|
2072
3044
|
function cloneBuffer(buffer, isDeep) {
|
|
@@ -3117,7 +4089,7 @@ var require_lodash = __commonJS({
|
|
|
3117
4089
|
return object[key];
|
|
3118
4090
|
}
|
|
3119
4091
|
var setData = shortOut(baseSetData);
|
|
3120
|
-
var
|
|
4092
|
+
var setTimeout2 = ctxSetTimeout || function(func, wait) {
|
|
3121
4093
|
return root.setTimeout(func, wait);
|
|
3122
4094
|
};
|
|
3123
4095
|
var setToString = shortOut(baseSetToString);
|
|
@@ -3909,7 +4881,7 @@ var require_lodash = __commonJS({
|
|
|
3909
4881
|
}
|
|
3910
4882
|
function leadingEdge(time) {
|
|
3911
4883
|
lastInvokeTime = time;
|
|
3912
|
-
timerId =
|
|
4884
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3913
4885
|
return leading ? invokeFunc(time) : result2;
|
|
3914
4886
|
}
|
|
3915
4887
|
function remainingWait(time) {
|
|
@@ -3925,7 +4897,7 @@ var require_lodash = __commonJS({
|
|
|
3925
4897
|
if (shouldInvoke(time)) {
|
|
3926
4898
|
return trailingEdge(time);
|
|
3927
4899
|
}
|
|
3928
|
-
timerId =
|
|
4900
|
+
timerId = setTimeout2(timerExpired, remainingWait(time));
|
|
3929
4901
|
}
|
|
3930
4902
|
function trailingEdge(time) {
|
|
3931
4903
|
timerId = undefined2;
|
|
@@ -3937,7 +4909,7 @@ var require_lodash = __commonJS({
|
|
|
3937
4909
|
}
|
|
3938
4910
|
function cancel() {
|
|
3939
4911
|
if (timerId !== undefined2) {
|
|
3940
|
-
|
|
4912
|
+
clearTimeout2(timerId);
|
|
3941
4913
|
}
|
|
3942
4914
|
lastInvokeTime = 0;
|
|
3943
4915
|
lastArgs = lastCallTime = lastThis = timerId = undefined2;
|
|
@@ -3955,13 +4927,13 @@ var require_lodash = __commonJS({
|
|
|
3955
4927
|
return leadingEdge(lastCallTime);
|
|
3956
4928
|
}
|
|
3957
4929
|
if (maxing) {
|
|
3958
|
-
|
|
3959
|
-
timerId =
|
|
4930
|
+
clearTimeout2(timerId);
|
|
4931
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3960
4932
|
return invokeFunc(lastCallTime);
|
|
3961
4933
|
}
|
|
3962
4934
|
}
|
|
3963
4935
|
if (timerId === undefined2) {
|
|
3964
|
-
timerId =
|
|
4936
|
+
timerId = setTimeout2(timerExpired, wait);
|
|
3965
4937
|
}
|
|
3966
4938
|
return result2;
|
|
3967
4939
|
}
|
|
@@ -4059,7 +5031,7 @@ var require_lodash = __commonJS({
|
|
|
4059
5031
|
return apply(func, this, otherArgs);
|
|
4060
5032
|
});
|
|
4061
5033
|
}
|
|
4062
|
-
function
|
|
5034
|
+
function throttle2(func, wait, options) {
|
|
4063
5035
|
var leading = true, trailing = true;
|
|
4064
5036
|
if (typeof func != "function") {
|
|
4065
5037
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
@@ -4204,7 +5176,7 @@ var require_lodash = __commonJS({
|
|
|
4204
5176
|
}
|
|
4205
5177
|
function isNative(value) {
|
|
4206
5178
|
if (isMaskable(value)) {
|
|
4207
|
-
throw new
|
|
5179
|
+
throw new Error2(CORE_ERROR_TEXT);
|
|
4208
5180
|
}
|
|
4209
5181
|
return baseIsNative(value);
|
|
4210
5182
|
}
|
|
@@ -4745,7 +5717,7 @@ var require_lodash = __commonJS({
|
|
|
4745
5717
|
if (!variable) {
|
|
4746
5718
|
source = "with (obj) {\n" + source + "\n}\n";
|
|
4747
5719
|
} else if (reForbiddenIdentifierChars.test(variable)) {
|
|
4748
|
-
throw new
|
|
5720
|
+
throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT);
|
|
4749
5721
|
}
|
|
4750
5722
|
source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
|
|
4751
5723
|
source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
|
|
@@ -4864,7 +5836,7 @@ var require_lodash = __commonJS({
|
|
|
4864
5836
|
try {
|
|
4865
5837
|
return apply(func, undefined2, args);
|
|
4866
5838
|
} catch (e) {
|
|
4867
|
-
return isError(e) ? e : new
|
|
5839
|
+
return isError(e) ? e : new Error2(e);
|
|
4868
5840
|
}
|
|
4869
5841
|
});
|
|
4870
5842
|
var bindAll = flatRest(function(object, methodNames) {
|
|
@@ -5176,7 +6148,7 @@ var require_lodash = __commonJS({
|
|
|
5176
6148
|
lodash.takeRightWhile = takeRightWhile;
|
|
5177
6149
|
lodash.takeWhile = takeWhile;
|
|
5178
6150
|
lodash.tap = tap;
|
|
5179
|
-
lodash.throttle =
|
|
6151
|
+
lodash.throttle = throttle2;
|
|
5180
6152
|
lodash.thru = thru;
|
|
5181
6153
|
lodash.toArray = toArray;
|
|
5182
6154
|
lodash.toPairs = toPairs;
|
|
@@ -5551,11 +6523,11 @@ var require_lodash = __commonJS({
|
|
|
5551
6523
|
});
|
|
5552
6524
|
|
|
5553
6525
|
// src/components/Dialog/Dialog.tsx
|
|
5554
|
-
import * as
|
|
6526
|
+
import * as React3 from "react";
|
|
5555
6527
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5556
6528
|
import { X } from "lucide-react";
|
|
5557
|
-
import { useState, useEffect } from "react";
|
|
5558
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6529
|
+
import { useState as useState4, useEffect as useEffect4 } from "react";
|
|
6530
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
5559
6531
|
var import_lodash, sizeClasses, Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, useSmartDimensions, DialogContent, DialogHeader, DialogBody, DialogFooter, DialogTitle, DialogDescription;
|
|
5560
6532
|
var init_Dialog = __esm({
|
|
5561
6533
|
"src/components/Dialog/Dialog.tsx"() {
|
|
@@ -5575,7 +6547,7 @@ var init_Dialog = __esm({
|
|
|
5575
6547
|
DialogTrigger = DialogPrimitive.Trigger;
|
|
5576
6548
|
DialogPortal = DialogPrimitive.Portal;
|
|
5577
6549
|
DialogClose = DialogPrimitive.Close;
|
|
5578
|
-
DialogOverlay =
|
|
6550
|
+
DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
5579
6551
|
DialogPrimitive.Overlay,
|
|
5580
6552
|
{
|
|
5581
6553
|
ref,
|
|
@@ -5596,8 +6568,8 @@ var init_Dialog = __esm({
|
|
|
5596
6568
|
minWidth,
|
|
5597
6569
|
enableScrolling = false
|
|
5598
6570
|
}) => {
|
|
5599
|
-
const [dimensions, setDimensions] =
|
|
5600
|
-
|
|
6571
|
+
const [dimensions, setDimensions] = useState4({});
|
|
6572
|
+
useEffect4(() => {
|
|
5601
6573
|
if (!maxHeightPercent && !maxWidthPercent && !maxHeight && !maxWidth && !minHeight && !minWidth) {
|
|
5602
6574
|
return;
|
|
5603
6575
|
}
|
|
@@ -5652,7 +6624,7 @@ var init_Dialog = __esm({
|
|
|
5652
6624
|
}
|
|
5653
6625
|
return result;
|
|
5654
6626
|
};
|
|
5655
|
-
DialogContent =
|
|
6627
|
+
DialogContent = React3.forwardRef(({
|
|
5656
6628
|
className,
|
|
5657
6629
|
children,
|
|
5658
6630
|
size = "md",
|
|
@@ -5679,17 +6651,17 @@ var init_Dialog = __esm({
|
|
|
5679
6651
|
minWidth,
|
|
5680
6652
|
enableScrolling
|
|
5681
6653
|
});
|
|
5682
|
-
const handleEscapeKeyDown =
|
|
6654
|
+
const handleEscapeKeyDown = React3.useCallback((event) => {
|
|
5683
6655
|
if (preventCloseOnEscape) {
|
|
5684
6656
|
event.preventDefault();
|
|
5685
6657
|
}
|
|
5686
6658
|
}, [preventCloseOnEscape]);
|
|
5687
|
-
const handlePointerDownOutside =
|
|
6659
|
+
const handlePointerDownOutside = React3.useCallback((event) => {
|
|
5688
6660
|
if (preventCloseOnOutsideClick) {
|
|
5689
6661
|
event.preventDefault();
|
|
5690
6662
|
}
|
|
5691
6663
|
}, [preventCloseOnOutsideClick]);
|
|
5692
|
-
const mergedStyle =
|
|
6664
|
+
const mergedStyle = React3.useMemo(() => {
|
|
5693
6665
|
if (Object.keys(smartDimensions).length === 0) {
|
|
5694
6666
|
return style;
|
|
5695
6667
|
}
|
|
@@ -5701,7 +6673,7 @@ var init_Dialog = __esm({
|
|
|
5701
6673
|
return finalStyle;
|
|
5702
6674
|
}, [smartDimensions, style, maxWidth, maxWidthPercent]);
|
|
5703
6675
|
return /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
5704
|
-
/* @__PURE__ */
|
|
6676
|
+
/* @__PURE__ */ jsx3(DialogOverlay, { className: overlayClassName }),
|
|
5705
6677
|
/* @__PURE__ */ jsxs(
|
|
5706
6678
|
DialogPrimitive.Content,
|
|
5707
6679
|
{
|
|
@@ -5731,8 +6703,8 @@ var init_Dialog = __esm({
|
|
|
5731
6703
|
children: [
|
|
5732
6704
|
children,
|
|
5733
6705
|
showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 z-10 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
5734
|
-
/* @__PURE__ */
|
|
5735
|
-
/* @__PURE__ */
|
|
6706
|
+
/* @__PURE__ */ jsx3(X, { className: "h-4 w-4" }),
|
|
6707
|
+
/* @__PURE__ */ jsx3("span", { className: "sr-only", children: "Close" })
|
|
5736
6708
|
] })
|
|
5737
6709
|
]
|
|
5738
6710
|
}
|
|
@@ -5744,7 +6716,7 @@ var init_Dialog = __esm({
|
|
|
5744
6716
|
className,
|
|
5745
6717
|
sticky = false,
|
|
5746
6718
|
...props
|
|
5747
|
-
}) => /* @__PURE__ */
|
|
6719
|
+
}) => /* @__PURE__ */ jsx3(
|
|
5748
6720
|
"header",
|
|
5749
6721
|
{
|
|
5750
6722
|
className: cn(
|
|
@@ -5767,13 +6739,13 @@ var init_Dialog = __esm({
|
|
|
5767
6739
|
children,
|
|
5768
6740
|
...props
|
|
5769
6741
|
}) => {
|
|
5770
|
-
const mergedStyle =
|
|
6742
|
+
const mergedStyle = React3.useMemo(() => {
|
|
5771
6743
|
return {
|
|
5772
6744
|
...maxHeight && { maxHeight },
|
|
5773
6745
|
...style
|
|
5774
6746
|
};
|
|
5775
6747
|
}, [maxHeight, style]);
|
|
5776
|
-
const processedHtmlContent =
|
|
6748
|
+
const processedHtmlContent = React3.useMemo(() => {
|
|
5777
6749
|
if (!htmlContent || !allowHtml) {
|
|
5778
6750
|
return null;
|
|
5779
6751
|
}
|
|
@@ -5794,7 +6766,7 @@ var init_Dialog = __esm({
|
|
|
5794
6766
|
});
|
|
5795
6767
|
return result.html;
|
|
5796
6768
|
}, [htmlContent, allowHtml, strictSanitization, logWarnings]);
|
|
5797
|
-
return /* @__PURE__ */
|
|
6769
|
+
return /* @__PURE__ */ jsx3(
|
|
5798
6770
|
"main",
|
|
5799
6771
|
{
|
|
5800
6772
|
className: cn(
|
|
@@ -5805,14 +6777,14 @@ var init_Dialog = __esm({
|
|
|
5805
6777
|
"aria-label": "Dialog main content",
|
|
5806
6778
|
tabIndex: -1,
|
|
5807
6779
|
...props,
|
|
5808
|
-
children: processedHtmlContent ? /* @__PURE__ */
|
|
6780
|
+
children: processedHtmlContent ? /* @__PURE__ */ jsx3(
|
|
5809
6781
|
"div",
|
|
5810
6782
|
{
|
|
5811
6783
|
dangerouslySetInnerHTML: { __html: processedHtmlContent },
|
|
5812
6784
|
className: "prose prose-sm max-w-none"
|
|
5813
6785
|
}
|
|
5814
6786
|
) : /* @__PURE__ */ jsxs("div", { children: [
|
|
5815
|
-
/* @__PURE__ */
|
|
6787
|
+
/* @__PURE__ */ jsx3("div", { className: "text-red-500 mb-2", children: "No HTML content processed. Showing children instead." }),
|
|
5816
6788
|
children
|
|
5817
6789
|
] })
|
|
5818
6790
|
}
|
|
@@ -5823,7 +6795,7 @@ var init_Dialog = __esm({
|
|
|
5823
6795
|
className,
|
|
5824
6796
|
sticky = false,
|
|
5825
6797
|
...props
|
|
5826
|
-
}) => /* @__PURE__ */
|
|
6798
|
+
}) => /* @__PURE__ */ jsx3(
|
|
5827
6799
|
"footer",
|
|
5828
6800
|
{
|
|
5829
6801
|
className: cn(
|
|
@@ -5835,8 +6807,8 @@ var init_Dialog = __esm({
|
|
|
5835
6807
|
}
|
|
5836
6808
|
);
|
|
5837
6809
|
DialogFooter.displayName = "DialogFooter";
|
|
5838
|
-
DialogTitle =
|
|
5839
|
-
const processedHtmlContent =
|
|
6810
|
+
DialogTitle = React3.forwardRef(({ className, htmlContent, allowHtml = true, children, ...props }, ref) => {
|
|
6811
|
+
const processedHtmlContent = React3.useMemo(() => {
|
|
5840
6812
|
if (!htmlContent || !allowHtml) {
|
|
5841
6813
|
return null;
|
|
5842
6814
|
}
|
|
@@ -5846,7 +6818,7 @@ var init_Dialog = __esm({
|
|
|
5846
6818
|
});
|
|
5847
6819
|
return result.html;
|
|
5848
6820
|
}, [htmlContent, allowHtml]);
|
|
5849
|
-
return /* @__PURE__ */
|
|
6821
|
+
return /* @__PURE__ */ jsx3(
|
|
5850
6822
|
DialogPrimitive.Title,
|
|
5851
6823
|
{
|
|
5852
6824
|
ref,
|
|
@@ -5855,13 +6827,13 @@ var init_Dialog = __esm({
|
|
|
5855
6827
|
className
|
|
5856
6828
|
),
|
|
5857
6829
|
...props,
|
|
5858
|
-
children: processedHtmlContent ? /* @__PURE__ */
|
|
6830
|
+
children: processedHtmlContent ? /* @__PURE__ */ jsx3("span", { dangerouslySetInnerHTML: { __html: processedHtmlContent } }) : children
|
|
5859
6831
|
}
|
|
5860
6832
|
);
|
|
5861
6833
|
});
|
|
5862
6834
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
5863
|
-
DialogDescription =
|
|
5864
|
-
const processedHtmlContent =
|
|
6835
|
+
DialogDescription = React3.forwardRef(({ className, htmlContent, allowHtml = true, children, ...props }, ref) => {
|
|
6836
|
+
const processedHtmlContent = React3.useMemo(() => {
|
|
5865
6837
|
if (!htmlContent || !allowHtml) {
|
|
5866
6838
|
return null;
|
|
5867
6839
|
}
|
|
@@ -5871,13 +6843,13 @@ var init_Dialog = __esm({
|
|
|
5871
6843
|
});
|
|
5872
6844
|
return result.html;
|
|
5873
6845
|
}, [htmlContent, allowHtml]);
|
|
5874
|
-
return /* @__PURE__ */
|
|
6846
|
+
return /* @__PURE__ */ jsx3(
|
|
5875
6847
|
DialogPrimitive.Description,
|
|
5876
6848
|
{
|
|
5877
6849
|
ref,
|
|
5878
6850
|
className: cn("text-sm text-muted-foreground", className),
|
|
5879
6851
|
...props,
|
|
5880
|
-
children: processedHtmlContent ? /* @__PURE__ */
|
|
6852
|
+
children: processedHtmlContent ? /* @__PURE__ */ jsx3("span", { dangerouslySetInnerHTML: { __html: processedHtmlContent } }) : children
|
|
5881
6853
|
}
|
|
5882
6854
|
);
|
|
5883
6855
|
});
|
|
@@ -5886,9 +6858,9 @@ var init_Dialog = __esm({
|
|
|
5886
6858
|
});
|
|
5887
6859
|
|
|
5888
6860
|
// src/components/Tooltip/Tooltip.tsx
|
|
5889
|
-
import * as
|
|
6861
|
+
import * as React4 from "react";
|
|
5890
6862
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
5891
|
-
import { jsx as
|
|
6863
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
5892
6864
|
var TooltipProvider, TooltipRoot, TooltipTrigger, TooltipContent, Tooltip;
|
|
5893
6865
|
var init_Tooltip = __esm({
|
|
5894
6866
|
"src/components/Tooltip/Tooltip.tsx"() {
|
|
@@ -5897,7 +6869,7 @@ var init_Tooltip = __esm({
|
|
|
5897
6869
|
TooltipProvider = TooltipPrimitive.Provider;
|
|
5898
6870
|
TooltipRoot = TooltipPrimitive.Root;
|
|
5899
6871
|
TooltipTrigger = TooltipPrimitive.Trigger;
|
|
5900
|
-
TooltipContent =
|
|
6872
|
+
TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx4(
|
|
5901
6873
|
TooltipPrimitive.Content,
|
|
5902
6874
|
{
|
|
5903
6875
|
ref,
|
|
@@ -5910,9 +6882,9 @@ var init_Tooltip = __esm({
|
|
|
5910
6882
|
}
|
|
5911
6883
|
));
|
|
5912
6884
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
5913
|
-
Tooltip =
|
|
5914
|
-
/* @__PURE__ */
|
|
5915
|
-
/* @__PURE__ */
|
|
6885
|
+
Tooltip = React4.forwardRef(({ children, content, delayDuration = 200 }, ref) => /* @__PURE__ */ jsx4(TooltipProvider, { children: /* @__PURE__ */ jsxs2(TooltipRoot, { delayDuration, children: [
|
|
6886
|
+
/* @__PURE__ */ jsx4(TooltipTrigger, { ref, asChild: true, children: /* @__PURE__ */ jsx4("span", { children }) }),
|
|
6887
|
+
/* @__PURE__ */ jsx4(TooltipContent, { children: content })
|
|
5916
6888
|
] }) }));
|
|
5917
6889
|
Tooltip.displayName = "Tooltip";
|
|
5918
6890
|
}
|
|
@@ -5927,9 +6899,9 @@ var init_Tooltip2 = __esm({
|
|
|
5927
6899
|
});
|
|
5928
6900
|
|
|
5929
6901
|
// src/components/Button/Button.tsx
|
|
5930
|
-
import * as
|
|
6902
|
+
import * as React5 from "react";
|
|
5931
6903
|
import { Slot } from "@radix-ui/react-slot";
|
|
5932
|
-
import { jsx as
|
|
6904
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
5933
6905
|
function getButtonClasses(variant = "default", size = "default") {
|
|
5934
6906
|
const baseClasses = "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
|
|
5935
6907
|
const variantClasses = {
|
|
@@ -5954,10 +6926,10 @@ var init_Button = __esm({
|
|
|
5954
6926
|
"use strict";
|
|
5955
6927
|
init_cn();
|
|
5956
6928
|
init_Tooltip2();
|
|
5957
|
-
Button =
|
|
6929
|
+
Button = React5.forwardRef(
|
|
5958
6930
|
({ className, variant, size, asChild = false, type = "button", disabled, ...props }, ref) => {
|
|
5959
6931
|
const Comp = asChild ? Slot : "button";
|
|
5960
|
-
return /* @__PURE__ */
|
|
6932
|
+
return /* @__PURE__ */ jsx5(
|
|
5961
6933
|
Comp,
|
|
5962
6934
|
{
|
|
5963
6935
|
className: cn(getButtonClasses(variant, size), className),
|
|
@@ -5971,9 +6943,9 @@ var init_Button = __esm({
|
|
|
5971
6943
|
}
|
|
5972
6944
|
);
|
|
5973
6945
|
Button.displayName = "Button";
|
|
5974
|
-
IconButton =
|
|
6946
|
+
IconButton = React5.forwardRef(
|
|
5975
6947
|
({ icon, className, size = "icon", "aria-label": ariaLabel, tooltip, ...props }, ref) => {
|
|
5976
|
-
const button = /* @__PURE__ */
|
|
6948
|
+
const button = /* @__PURE__ */ jsx5(
|
|
5977
6949
|
Button,
|
|
5978
6950
|
{
|
|
5979
6951
|
ref,
|
|
@@ -5985,7 +6957,7 @@ var init_Button = __esm({
|
|
|
5985
6957
|
}
|
|
5986
6958
|
);
|
|
5987
6959
|
if (tooltip) {
|
|
5988
|
-
return /* @__PURE__ */
|
|
6960
|
+
return /* @__PURE__ */ jsx5(Tooltip, { content: tooltip, children: button });
|
|
5989
6961
|
}
|
|
5990
6962
|
return button;
|
|
5991
6963
|
}
|
|
@@ -5994,7 +6966,390 @@ var init_Button = __esm({
|
|
|
5994
6966
|
}
|
|
5995
6967
|
});
|
|
5996
6968
|
|
|
6969
|
+
// src/components/InactivityWarningModal/InactivityWarningModal.tsx
|
|
6970
|
+
import { useEffect as useEffect5, useState as useState5, useCallback as useCallback5 } from "react";
|
|
6971
|
+
import { Clock, AlertTriangle } from "lucide-react";
|
|
6972
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
6973
|
+
function InactivityWarningModal({
|
|
6974
|
+
isOpen,
|
|
6975
|
+
timeRemaining,
|
|
6976
|
+
onStaySignedIn,
|
|
6977
|
+
onSignOutNow,
|
|
6978
|
+
title = "Session Timeout Warning",
|
|
6979
|
+
description = "You've been inactive for a while. Your session will expire soon for security reasons.",
|
|
6980
|
+
className
|
|
6981
|
+
}) {
|
|
6982
|
+
const [displayTime, setDisplayTime] = useState5(timeRemaining);
|
|
6983
|
+
useEffect5(() => {
|
|
6984
|
+
setDisplayTime(timeRemaining);
|
|
6985
|
+
}, [timeRemaining]);
|
|
6986
|
+
const formatTime = useCallback5((seconds) => {
|
|
6987
|
+
const mins = Math.floor(seconds / 60);
|
|
6988
|
+
const secs = seconds % 60;
|
|
6989
|
+
return `${mins.toString().padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
|
|
6990
|
+
}, []);
|
|
6991
|
+
return /* @__PURE__ */ jsx6(Dialog, { open: isOpen, onOpenChange: (open) => !open && onStaySignedIn(), children: /* @__PURE__ */ jsxs3(
|
|
6992
|
+
DialogContent,
|
|
6993
|
+
{
|
|
6994
|
+
className: `sm:max-w-md ${className || ""}`,
|
|
6995
|
+
preventCloseOnEscape: false,
|
|
6996
|
+
preventCloseOnOutsideClick: true,
|
|
6997
|
+
"data-testid": "inactivity-warning-modal",
|
|
6998
|
+
children: [
|
|
6999
|
+
/* @__PURE__ */ jsxs3(DialogHeader, { children: [
|
|
7000
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-3", children: [
|
|
7001
|
+
/* @__PURE__ */ jsx6("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx6(AlertTriangle, { className: "h-6 w-6 text-acc-600" }) }),
|
|
7002
|
+
/* @__PURE__ */ jsx6("div", { children: /* @__PURE__ */ jsx6(DialogTitle, { className: "text-lg font-semibold text-main-900", children: title }) })
|
|
7003
|
+
] }),
|
|
7004
|
+
/* @__PURE__ */ jsx6(DialogDescription, { className: "text-main-700 mt-2", children: description })
|
|
7005
|
+
] }),
|
|
7006
|
+
/* @__PURE__ */ jsxs3("div", { className: "space-y-6", children: [
|
|
7007
|
+
/* @__PURE__ */ jsxs3("div", { className: "text-center", children: [
|
|
7008
|
+
/* @__PURE__ */ jsxs3("div", { className: "inline-flex items-center gap-2 px-4 py-3 bg-acc-50 border border-acc-200 rounded-lg", children: [
|
|
7009
|
+
/* @__PURE__ */ jsx6(Clock, { className: "h-5 w-5 text-acc-600" }),
|
|
7010
|
+
/* @__PURE__ */ jsx6("span", { className: "text-2xl font-mono font-bold text-acc-700", children: formatTime(displayTime) })
|
|
7011
|
+
] }),
|
|
7012
|
+
/* @__PURE__ */ jsx6("p", { className: "text-sm text-main-600 mt-2", children: "Time remaining before automatic logout" })
|
|
7013
|
+
] }),
|
|
7014
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col sm:flex-row gap-3", children: [
|
|
7015
|
+
/* @__PURE__ */ jsx6(
|
|
7016
|
+
Button,
|
|
7017
|
+
{
|
|
7018
|
+
onClick: onStaySignedIn,
|
|
7019
|
+
className: "flex-1 bg-main-600 hover:bg-main-700 text-main-50",
|
|
7020
|
+
size: "lg",
|
|
7021
|
+
children: "Stay Signed In"
|
|
7022
|
+
}
|
|
7023
|
+
),
|
|
7024
|
+
/* @__PURE__ */ jsx6(
|
|
7025
|
+
Button,
|
|
7026
|
+
{
|
|
7027
|
+
onClick: onSignOutNow,
|
|
7028
|
+
variant: "outline",
|
|
7029
|
+
className: "flex-1 border-acc-300 text-acc-700 hover:bg-acc-50",
|
|
7030
|
+
size: "lg",
|
|
7031
|
+
children: "Sign Out Now"
|
|
7032
|
+
}
|
|
7033
|
+
)
|
|
7034
|
+
] }),
|
|
7035
|
+
/* @__PURE__ */ jsx6("div", { className: "text-xs text-main-500 text-center", children: /* @__PURE__ */ jsx6("p", { children: "For security reasons, you'll be automatically signed out after 30 minutes of inactivity." }) })
|
|
7036
|
+
] })
|
|
7037
|
+
]
|
|
7038
|
+
}
|
|
7039
|
+
) });
|
|
7040
|
+
}
|
|
7041
|
+
var init_InactivityWarningModal = __esm({
|
|
7042
|
+
"src/components/InactivityWarningModal/InactivityWarningModal.tsx"() {
|
|
7043
|
+
"use strict";
|
|
7044
|
+
init_Dialog();
|
|
7045
|
+
init_Button();
|
|
7046
|
+
}
|
|
7047
|
+
});
|
|
7048
|
+
|
|
7049
|
+
// src/providers/InactivityProvider.tsx
|
|
7050
|
+
import { createContext as createContext3, useContext as useContext3, useState as useState6, useEffect as useEffect6, useCallback as useCallback6, useMemo as useMemo4 } from "react";
|
|
7051
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
7052
|
+
function InactivityProvider({
|
|
7053
|
+
children,
|
|
7054
|
+
user,
|
|
7055
|
+
session,
|
|
7056
|
+
supabaseClient,
|
|
7057
|
+
idleTimeoutMs = 30 * 60 * 1e3,
|
|
7058
|
+
// 30 minutes
|
|
7059
|
+
warnBeforeMs = 60 * 1e3,
|
|
7060
|
+
// 60 seconds
|
|
7061
|
+
onIdleLogout,
|
|
7062
|
+
renderInactivityWarning,
|
|
7063
|
+
dangerouslyDisableInactivity = false
|
|
7064
|
+
}) {
|
|
7065
|
+
const [showInactivityWarning, setShowInactivityWarning] = useState6(false);
|
|
7066
|
+
const [inactivityTimeRemaining, setInactivityTimeRemaining] = useState6(0);
|
|
7067
|
+
useEffect6(() => {
|
|
7068
|
+
if (typeof window !== "undefined") {
|
|
7069
|
+
const isProduction = true;
|
|
7070
|
+
if (isProduction && dangerouslyDisableInactivity) {
|
|
7071
|
+
console.error("[InactivityProvider] CRITICAL: dangerouslyDisableInactivity is not allowed in production! Auto-enabling inactivity feature.");
|
|
7072
|
+
}
|
|
7073
|
+
if (!isProduction && dangerouslyDisableInactivity) {
|
|
7074
|
+
console.warn("[InactivityProvider] Inactivity feature disabled for development. This will NOT work in production.");
|
|
7075
|
+
}
|
|
7076
|
+
}
|
|
7077
|
+
}, [dangerouslyDisableInactivity]);
|
|
7078
|
+
const isInactivityEnabled = typeof window !== "undefined" && (false ? !dangerouslyDisableInactivity : true);
|
|
7079
|
+
const {
|
|
7080
|
+
isIdle,
|
|
7081
|
+
timeRemaining,
|
|
7082
|
+
showWarning,
|
|
7083
|
+
resetActivity,
|
|
7084
|
+
startTracking,
|
|
7085
|
+
stopTracking,
|
|
7086
|
+
isTracking
|
|
7087
|
+
} = useInactivityTracker({
|
|
7088
|
+
idleTimeoutMs,
|
|
7089
|
+
warnBeforeMs,
|
|
7090
|
+
enabled: isInactivityEnabled && !!user && !!session,
|
|
7091
|
+
onIdle: useCallback6(() => {
|
|
7092
|
+
setShowInactivityWarning(false);
|
|
7093
|
+
setInactivityTimeRemaining(0);
|
|
7094
|
+
if (supabaseClient) {
|
|
7095
|
+
supabaseClient.auth.signOut().catch((error) => {
|
|
7096
|
+
console.error("[InactivityProvider] Error during idle logout:", error);
|
|
7097
|
+
});
|
|
7098
|
+
}
|
|
7099
|
+
onIdleLogout?.("inactivity");
|
|
7100
|
+
}, [supabaseClient, onIdleLogout]),
|
|
7101
|
+
onWarning: useCallback6(() => {
|
|
7102
|
+
setShowInactivityWarning(true);
|
|
7103
|
+
setInactivityTimeRemaining(warnBeforeMs);
|
|
7104
|
+
}, [warnBeforeMs]),
|
|
7105
|
+
onActivity: useCallback6(() => {
|
|
7106
|
+
setShowInactivityWarning(false);
|
|
7107
|
+
setInactivityTimeRemaining(0);
|
|
7108
|
+
}, [])
|
|
7109
|
+
});
|
|
7110
|
+
const handleIdleLogout = useCallback6(async () => {
|
|
7111
|
+
setShowInactivityWarning(false);
|
|
7112
|
+
setInactivityTimeRemaining(0);
|
|
7113
|
+
stopTracking();
|
|
7114
|
+
try {
|
|
7115
|
+
if (supabaseClient) {
|
|
7116
|
+
await supabaseClient.auth.signOut();
|
|
7117
|
+
}
|
|
7118
|
+
} catch (error) {
|
|
7119
|
+
console.error("[InactivityProvider] Error during idle logout:", error);
|
|
7120
|
+
}
|
|
7121
|
+
onIdleLogout?.("inactivity");
|
|
7122
|
+
}, [supabaseClient, onIdleLogout, stopTracking]);
|
|
7123
|
+
const handleStaySignedIn = useCallback6(() => {
|
|
7124
|
+
setShowInactivityWarning(false);
|
|
7125
|
+
setInactivityTimeRemaining(0);
|
|
7126
|
+
resetActivity();
|
|
7127
|
+
}, [resetActivity]);
|
|
7128
|
+
const handleSignOutNow = useCallback6(async () => {
|
|
7129
|
+
setShowInactivityWarning(false);
|
|
7130
|
+
setInactivityTimeRemaining(0);
|
|
7131
|
+
stopTracking();
|
|
7132
|
+
try {
|
|
7133
|
+
if (supabaseClient) {
|
|
7134
|
+
await supabaseClient.auth.signOut();
|
|
7135
|
+
}
|
|
7136
|
+
} catch (error) {
|
|
7137
|
+
console.error("[InactivityProvider] Error during manual sign out:", error);
|
|
7138
|
+
}
|
|
7139
|
+
onIdleLogout?.("inactivity");
|
|
7140
|
+
}, [supabaseClient, onIdleLogout, stopTracking]);
|
|
7141
|
+
useEffect6(() => {
|
|
7142
|
+
if (showWarning && timeRemaining > 0) {
|
|
7143
|
+
setInactivityTimeRemaining(Math.ceil(timeRemaining / 1e3));
|
|
7144
|
+
}
|
|
7145
|
+
}, [showWarning, timeRemaining]);
|
|
7146
|
+
const contextValue = useMemo4(() => ({
|
|
7147
|
+
showInactivityWarning,
|
|
7148
|
+
inactivityTimeRemaining,
|
|
7149
|
+
isIdle,
|
|
7150
|
+
timeRemaining,
|
|
7151
|
+
showWarning,
|
|
7152
|
+
isTracking,
|
|
7153
|
+
resetActivity,
|
|
7154
|
+
startTracking,
|
|
7155
|
+
stopTracking,
|
|
7156
|
+
handleIdleLogout,
|
|
7157
|
+
handleStaySignedIn,
|
|
7158
|
+
handleSignOutNow
|
|
7159
|
+
}), [
|
|
7160
|
+
showInactivityWarning,
|
|
7161
|
+
inactivityTimeRemaining,
|
|
7162
|
+
isIdle,
|
|
7163
|
+
timeRemaining,
|
|
7164
|
+
showWarning,
|
|
7165
|
+
isTracking,
|
|
7166
|
+
resetActivity,
|
|
7167
|
+
startTracking,
|
|
7168
|
+
stopTracking,
|
|
7169
|
+
handleIdleLogout,
|
|
7170
|
+
handleStaySignedIn,
|
|
7171
|
+
handleSignOutNow
|
|
7172
|
+
]);
|
|
7173
|
+
return /* @__PURE__ */ jsxs4(InactivityContext.Provider, { value: contextValue, children: [
|
|
7174
|
+
children,
|
|
7175
|
+
showInactivityWarning && (renderInactivityWarning ? renderInactivityWarning({
|
|
7176
|
+
timeRemaining: inactivityTimeRemaining,
|
|
7177
|
+
onStaySignedIn: handleStaySignedIn,
|
|
7178
|
+
onSignOutNow: handleSignOutNow
|
|
7179
|
+
}) : /* @__PURE__ */ jsx7(
|
|
7180
|
+
InactivityWarningModal,
|
|
7181
|
+
{
|
|
7182
|
+
isOpen: showInactivityWarning,
|
|
7183
|
+
timeRemaining: inactivityTimeRemaining,
|
|
7184
|
+
onStaySignedIn: handleStaySignedIn,
|
|
7185
|
+
onSignOutNow: handleSignOutNow
|
|
7186
|
+
}
|
|
7187
|
+
))
|
|
7188
|
+
] });
|
|
7189
|
+
}
|
|
7190
|
+
var InactivityContext, useInactivity;
|
|
7191
|
+
var init_InactivityProvider = __esm({
|
|
7192
|
+
"src/providers/InactivityProvider.tsx"() {
|
|
7193
|
+
"use strict";
|
|
7194
|
+
init_useInactivityTracker();
|
|
7195
|
+
init_InactivityWarningModal();
|
|
7196
|
+
InactivityContext = createContext3(void 0);
|
|
7197
|
+
useInactivity = () => {
|
|
7198
|
+
const context = useContext3(InactivityContext);
|
|
7199
|
+
if (!context) {
|
|
7200
|
+
throw new Error("useInactivity must be used within an InactivityProvider");
|
|
7201
|
+
}
|
|
7202
|
+
return context;
|
|
7203
|
+
};
|
|
7204
|
+
}
|
|
7205
|
+
});
|
|
7206
|
+
|
|
7207
|
+
// src/providers/UnifiedAuthProvider.tsx
|
|
7208
|
+
var UnifiedAuthProvider_exports = {};
|
|
7209
|
+
__export(UnifiedAuthProvider_exports, {
|
|
7210
|
+
UnifiedAuthProvider: () => UnifiedAuthProvider,
|
|
7211
|
+
useUnifiedAuth: () => useUnifiedAuth
|
|
7212
|
+
});
|
|
7213
|
+
import { createContext as createContext4, useContext as useContext4, useMemo as useMemo5 } from "react";
|
|
7214
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
7215
|
+
function UnifiedAuthContextProvider({
|
|
7216
|
+
children,
|
|
7217
|
+
appName,
|
|
7218
|
+
...props
|
|
7219
|
+
}) {
|
|
7220
|
+
const auth = useAuth();
|
|
7221
|
+
const rbac = useRBAC();
|
|
7222
|
+
const inactivity = useInactivity();
|
|
7223
|
+
const contextValue = useMemo5(() => ({
|
|
7224
|
+
...auth,
|
|
7225
|
+
...rbac,
|
|
7226
|
+
...inactivity,
|
|
7227
|
+
appName,
|
|
7228
|
+
isLoading: auth.authLoading || rbac.rbacLoading,
|
|
7229
|
+
hasErrors: !!auth.authError || !!rbac.rbacError
|
|
7230
|
+
}), [auth, rbac, inactivity, appName]);
|
|
7231
|
+
return /* @__PURE__ */ jsx8(UnifiedAuthContext.Provider, { value: contextValue, children });
|
|
7232
|
+
}
|
|
7233
|
+
function AuthAwareProviders({
|
|
7234
|
+
children,
|
|
7235
|
+
supabaseClient,
|
|
7236
|
+
appName,
|
|
7237
|
+
persistState,
|
|
7238
|
+
enablePersistence,
|
|
7239
|
+
requireOrganisationContext,
|
|
7240
|
+
enableRBAC,
|
|
7241
|
+
idleTimeoutMs,
|
|
7242
|
+
warnBeforeMs,
|
|
7243
|
+
onIdleLogout,
|
|
7244
|
+
renderInactivityWarning,
|
|
7245
|
+
dangerouslyDisableInactivity
|
|
7246
|
+
}) {
|
|
7247
|
+
const auth = useAuth();
|
|
7248
|
+
return /* @__PURE__ */ jsx8(
|
|
7249
|
+
RBACProvider,
|
|
7250
|
+
{
|
|
7251
|
+
supabaseClient,
|
|
7252
|
+
user: auth.user,
|
|
7253
|
+
session: auth.session,
|
|
7254
|
+
appName,
|
|
7255
|
+
enableRBAC,
|
|
7256
|
+
persistState,
|
|
7257
|
+
enablePersistence,
|
|
7258
|
+
requireOrganisationContext,
|
|
7259
|
+
children: /* @__PURE__ */ jsx8(
|
|
7260
|
+
InactivityProvider,
|
|
7261
|
+
{
|
|
7262
|
+
user: auth.user,
|
|
7263
|
+
session: auth.session,
|
|
7264
|
+
supabaseClient,
|
|
7265
|
+
idleTimeoutMs,
|
|
7266
|
+
warnBeforeMs,
|
|
7267
|
+
onIdleLogout,
|
|
7268
|
+
renderInactivityWarning,
|
|
7269
|
+
dangerouslyDisableInactivity,
|
|
7270
|
+
children: /* @__PURE__ */ jsx8(
|
|
7271
|
+
UnifiedAuthContextProvider,
|
|
7272
|
+
{
|
|
7273
|
+
appName,
|
|
7274
|
+
supabaseClient,
|
|
7275
|
+
persistState,
|
|
7276
|
+
enablePersistence,
|
|
7277
|
+
requireOrganisationContext,
|
|
7278
|
+
enableRBAC,
|
|
7279
|
+
idleTimeoutMs,
|
|
7280
|
+
warnBeforeMs,
|
|
7281
|
+
onIdleLogout,
|
|
7282
|
+
renderInactivityWarning,
|
|
7283
|
+
dangerouslyDisableInactivity,
|
|
7284
|
+
children
|
|
7285
|
+
}
|
|
7286
|
+
)
|
|
7287
|
+
}
|
|
7288
|
+
)
|
|
7289
|
+
}
|
|
7290
|
+
);
|
|
7291
|
+
}
|
|
7292
|
+
function UnifiedAuthProvider({
|
|
7293
|
+
children,
|
|
7294
|
+
supabaseClient,
|
|
7295
|
+
appName,
|
|
7296
|
+
persistState = true,
|
|
7297
|
+
enablePersistence,
|
|
7298
|
+
requireOrganisationContext = true,
|
|
7299
|
+
enableRBAC = false,
|
|
7300
|
+
idleTimeoutMs = 30 * 60 * 1e3,
|
|
7301
|
+
// 30 minutes
|
|
7302
|
+
warnBeforeMs = 60 * 1e3,
|
|
7303
|
+
// 60 seconds
|
|
7304
|
+
onIdleLogout,
|
|
7305
|
+
renderInactivityWarning,
|
|
7306
|
+
dangerouslyDisableInactivity = false
|
|
7307
|
+
}) {
|
|
7308
|
+
return /* @__PURE__ */ jsx8(AuthProvider, { supabaseClient, children: /* @__PURE__ */ jsx8(
|
|
7309
|
+
AuthAwareProviders,
|
|
7310
|
+
{
|
|
7311
|
+
supabaseClient,
|
|
7312
|
+
appName,
|
|
7313
|
+
persistState,
|
|
7314
|
+
enablePersistence,
|
|
7315
|
+
requireOrganisationContext,
|
|
7316
|
+
enableRBAC,
|
|
7317
|
+
idleTimeoutMs,
|
|
7318
|
+
warnBeforeMs,
|
|
7319
|
+
onIdleLogout,
|
|
7320
|
+
renderInactivityWarning,
|
|
7321
|
+
dangerouslyDisableInactivity,
|
|
7322
|
+
children
|
|
7323
|
+
}
|
|
7324
|
+
) });
|
|
7325
|
+
}
|
|
7326
|
+
var UnifiedAuthContext, useUnifiedAuth;
|
|
7327
|
+
var init_UnifiedAuthProvider = __esm({
|
|
7328
|
+
"src/providers/UnifiedAuthProvider.tsx"() {
|
|
7329
|
+
"use strict";
|
|
7330
|
+
init_AuthProvider();
|
|
7331
|
+
init_RBACProvider();
|
|
7332
|
+
init_InactivityProvider();
|
|
7333
|
+
UnifiedAuthContext = createContext4(void 0);
|
|
7334
|
+
useUnifiedAuth = () => {
|
|
7335
|
+
const context = useContext4(UnifiedAuthContext);
|
|
7336
|
+
if (!context) {
|
|
7337
|
+
throw new Error("useUnifiedAuth must be used within a UnifiedAuthProvider");
|
|
7338
|
+
}
|
|
7339
|
+
return context;
|
|
7340
|
+
};
|
|
7341
|
+
}
|
|
7342
|
+
});
|
|
7343
|
+
|
|
5997
7344
|
export {
|
|
7345
|
+
useAuth,
|
|
7346
|
+
AuthProvider,
|
|
7347
|
+
init_AuthProvider,
|
|
7348
|
+
useRBAC,
|
|
7349
|
+
RBACProvider,
|
|
7350
|
+
init_RBACProvider,
|
|
7351
|
+
useInactivityTracker,
|
|
7352
|
+
init_useInactivityTracker,
|
|
5998
7353
|
Dialog,
|
|
5999
7354
|
DialogTrigger,
|
|
6000
7355
|
DialogPortal,
|
|
@@ -6015,7 +7370,16 @@ export {
|
|
|
6015
7370
|
init_Tooltip,
|
|
6016
7371
|
init_Tooltip2,
|
|
6017
7372
|
Button,
|
|
6018
|
-
init_Button
|
|
7373
|
+
init_Button,
|
|
7374
|
+
InactivityWarningModal,
|
|
7375
|
+
init_InactivityWarningModal,
|
|
7376
|
+
useInactivity,
|
|
7377
|
+
InactivityProvider,
|
|
7378
|
+
init_InactivityProvider,
|
|
7379
|
+
useUnifiedAuth,
|
|
7380
|
+
UnifiedAuthProvider,
|
|
7381
|
+
UnifiedAuthProvider_exports,
|
|
7382
|
+
init_UnifiedAuthProvider
|
|
6019
7383
|
};
|
|
6020
7384
|
/*! Bundled license information:
|
|
6021
7385
|
|
|
@@ -6029,4 +7393,4 @@ lodash/lodash.js:
|
|
|
6029
7393
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
6030
7394
|
*)
|
|
6031
7395
|
*/
|
|
6032
|
-
//# sourceMappingURL=chunk-
|
|
7396
|
+
//# sourceMappingURL=chunk-6CR3MRZN.js.map
|