@jmruthers/pace-core 0.6.4 → 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +104 -0
- package/README.md +5 -403
- package/core-usage-manifest.json +93 -0
- package/cursor-rules/00-pace-core-compliance.mdc +128 -26
- package/cursor-rules/01-standards-compliance.mdc +49 -8
- package/cursor-rules/02-project-structure.mdc +6 -0
- package/cursor-rules/03-solid-principles.mdc +2 -0
- package/cursor-rules/04-testing-standards.mdc +2 -0
- package/cursor-rules/05-bug-reports-and-features.mdc +2 -0
- package/cursor-rules/06-code-quality.mdc +2 -0
- package/cursor-rules/07-tech-stack-compliance.mdc +2 -0
- package/cursor-rules/08-markup-quality.mdc +52 -27
- package/cursor-rules/09-rbac-compliance.mdc +462 -0
- package/cursor-rules/10-error-handling-patterns.mdc +179 -0
- package/cursor-rules/11-performance-optimization.mdc +169 -0
- package/cursor-rules/12-ci-cd-integration.mdc +150 -0
- package/dist/{AuthService-Cb34EQs3.d.ts → AuthService-DmfO5rGS.d.ts} +10 -0
- package/dist/{DataTable-BMRU8a1j.d.ts → DataTable-2N_tqbfq.d.ts} +1 -1
- package/dist/DataTable-LRJL4IRV.js +15 -0
- package/dist/{PublicPageProvider-DEMpysFR.d.ts → PublicPageProvider-BBH6Vqg7.d.ts} +72 -139
- package/dist/UnifiedAuthProvider-ZT6TIGM7.js +7 -0
- package/dist/api-Y4MQWOFW.js +4 -0
- package/dist/audit-MYQXYZFU.js +3 -0
- package/dist/{chunk-J36DSWQK.js → chunk-2HGJFNAH.js} +8 -28
- package/dist/{chunk-OEWDTMG7.js → chunk-3O3WHILE.js} +38 -121
- package/dist/{chunk-M43Y4SSO.js → chunk-3QC3KRHK.js} +1 -14
- package/dist/{chunk-DGUM43GV.js → chunk-3RG5ZIWI.js} +1 -4
- package/dist/{chunk-QXHPKYJV.js → chunk-4SXLQIZO.js} +1 -26
- package/dist/chunk-4T7OBVTU.js +62 -0
- package/dist/{chunk-E66EQZE6.js → chunk-6GLLNA6U.js} +3 -9
- package/dist/{chunk-ZSAAAMVR.js → chunk-6QYDGKQY.js} +1 -4
- package/dist/{chunk-NN6WWZ5U.js → chunk-7TYHROIV.js} +579 -563
- package/dist/{chunk-M7MPQISP.js → chunk-A55DK444.js} +9 -16
- package/dist/{chunk-63FOKYGO.js → chunk-AHU7G2R5.js} +2 -11
- package/dist/{chunk-L4OXEN46.js → chunk-BVP2BCJF.js} +2 -16
- package/dist/chunk-C7NSAPTL.js +1 -0
- package/dist/{chunk-YKRAFF5K.js → chunk-FENMYN2U.js} +73 -149
- package/dist/{chunk-AVMLPIM7.js → chunk-FTCRZOG2.js} +284 -432
- package/dist/{chunk-G37KK66H.js → chunk-FYHN4DD5.js} +60 -19
- package/dist/{chunk-VBXEHIUJ.js → chunk-HF6O3O37.js} +6 -88
- package/dist/{chunk-I6DAQMWX.js → chunk-LAZMKTTF.js} +930 -891
- package/dist/{chunk-5EC5MEWX.js → chunk-MAGBIDNS.js} +77 -222
- package/dist/chunk-MBADTM7L.js +64 -0
- package/dist/chunk-OHIK3MIO.js +994 -0
- package/dist/{chunk-6SOIHG6Z.js → chunk-S7DKJPLT.js} +115 -44
- package/dist/{chunk-FMUCXFII.js → chunk-SD6WQY43.js} +1 -5
- package/dist/{chunk-PWLANIRT.js → chunk-TTRFSOKR.js} +1 -7
- package/dist/{chunk-5DRSZLL2.js → chunk-UH3NTO3F.js} +1 -6
- package/dist/{chunk-FFQEQTNW.js → chunk-UIYSCEV7.js} +134 -45
- package/dist/{chunk-3LPHPB62.js → chunk-ZFYPMX46.js} +271 -87
- package/dist/{chunk-7JPAB3T5.js → chunk-ZS5VO5JB.js} +1989 -1283
- package/dist/components.d.ts +6 -6
- package/dist/components.js +57 -267
- package/dist/{database.generated-CzIvgcPu.d.ts → database.generated-CcnC_DRc.d.ts} +4795 -3691
- package/dist/eslint-rules/index.cjs +22 -0
- package/dist/eslint-rules/rules/compliance.cjs +348 -0
- package/dist/eslint-rules/rules/components.cjs +113 -0
- package/dist/eslint-rules/rules/imports.cjs +102 -0
- package/dist/eslint-rules/rules/rbac.cjs +790 -0
- package/dist/eslint-rules/utils/helpers.cjs +42 -0
- package/dist/eslint-rules/utils/manifest-loader.cjs +75 -0
- package/dist/hooks.d.ts +5 -5
- package/dist/hooks.js +62 -270
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +1 -0
- package/dist/index.d.ts +36 -26
- package/dist/index.js +87 -690
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +8 -35
- package/dist/rbac/eslint-rules.d.ts +46 -44
- package/dist/rbac/eslint-rules.js +7 -4
- package/dist/rbac/index.d.ts +124 -594
- package/dist/rbac/index.js +14 -207
- package/dist/styles/index.js +2 -12
- package/dist/theming/runtime.js +3 -19
- package/dist/{timezone-CHhWg6b4.d.ts → timezone-BZe_eUxx.d.ts} +175 -1
- package/dist/{types-CkbwOr4Y.d.ts → types-B-K_5VnO.d.ts} +4 -0
- package/dist/types-t9H8qKRw.d.ts +55 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +7 -94
- package/dist/{usePublicRouteParams-i3qtoBgg.d.ts → usePublicRouteParams-COZ28Mvq.d.ts} +9 -9
- package/dist/utils.d.ts +24 -117
- package/dist/utils.js +54 -392
- package/docs/README.md +16 -6
- package/docs/api/README.md +4 -402
- package/docs/api/modules.md +454 -930
- package/docs/api-reference/components.md +3 -1
- package/docs/api-reference/deprecated.md +31 -6
- package/docs/api-reference/rpc-functions.md +78 -3
- package/docs/best-practices/accessibility.md +6 -3
- package/docs/getting-started/cursor-rules.md +3 -23
- package/docs/getting-started/dependencies.md +650 -0
- package/docs/getting-started/installation-guide.md +20 -7
- package/docs/getting-started/quick-start.md +23 -12
- package/docs/implementation-guides/permission-enforcement.md +4 -0
- package/docs/rbac/MIGRATION_GUIDE.md +819 -0
- package/docs/rbac/RBAC_CONTRACT.md +724 -0
- package/docs/rbac/README.md +12 -3
- package/docs/rbac/edge-functions-guide.md +376 -0
- package/docs/rbac/secure-client-protection.md +0 -34
- package/docs/standards/00-pace-core-compliance.md +967 -0
- package/docs/standards/01-standards-compliance.md +188 -0
- package/docs/standards/02-project-structure.md +985 -0
- package/docs/standards/03-solid-principles.md +39 -0
- package/docs/standards/04-testing-standards.md +36 -0
- package/docs/standards/05-bug-reports-and-features.md +27 -0
- package/docs/standards/{04-code-style-standard.md → 06-code-quality.md} +2 -0
- package/docs/standards/07-tech-stack-compliance.md +30 -0
- package/docs/standards/08-markup-quality.md +345 -0
- package/docs/standards/{07-rbac-and-rls-standard.md → 09-rbac-compliance.md} +149 -54
- package/docs/standards/10-error-handling-patterns.md +401 -0
- package/docs/standards/11-performance-optimization.md +348 -0
- package/docs/standards/12-ci-cd-integration.md +370 -0
- package/docs/standards/ALIGNMENT_REVIEW_SUMMARY.md +192 -0
- package/docs/standards/README.md +62 -33
- package/docs/troubleshooting/organisation-context-setup.md +42 -19
- package/eslint-config-pace-core.cjs +20 -4
- package/package.json +31 -21
- package/scripts/audit/audit-compliance.cjs +1295 -0
- package/scripts/audit/audit-components.cjs +260 -0
- package/scripts/audit/audit-dependencies.cjs +395 -0
- package/scripts/audit/audit-rbac.cjs +954 -0
- package/scripts/audit/audit-standards.cjs +1268 -0
- package/scripts/audit/index.cjs +1898 -194
- package/scripts/install-cursor-rules.cjs +259 -8
- package/scripts/validate-master.js +1 -1
- package/src/__tests__/fixtures/supabase.ts +1 -1
- package/src/__tests__/helpers/__tests__/component-test-utils.test.tsx +1 -1
- package/src/__tests__/helpers/__tests__/optimized-test-setup.test.ts +1 -1
- package/src/__tests__/helpers/__tests__/supabaseMock.test.ts +1 -1
- package/src/__tests__/helpers/__tests__/test-utils.test.tsx +3 -3
- package/src/__tests__/helpers/component-test-utils.tsx +1 -1
- package/src/__tests__/helpers/supabaseMock.ts +2 -2
- package/src/__tests__/public-recipe-view.test.ts +38 -9
- package/src/components/Button/Button.tsx +5 -1
- package/src/components/ContextSelector/ContextSelector.tsx +42 -39
- package/src/components/DataTable/__tests__/keyboard.test.tsx +15 -2
- package/src/components/DataTable/components/DataTableBody.tsx +55 -31
- package/src/components/DataTable/components/DataTableCore.tsx +186 -13
- package/src/components/DataTable/components/DataTableLayout.tsx +30 -5
- package/src/components/DataTable/components/EditFields.tsx +23 -3
- package/src/components/DataTable/components/EditableRow.tsx +7 -2
- package/src/components/DataTable/components/ImportModal.tsx +4 -6
- package/src/components/DataTable/components/RowComponent.tsx +12 -0
- package/src/components/DataTable/components/ViewRowModal.tsx +4 -4
- package/src/components/DataTable/components/__tests__/ImportModal.test.tsx +455 -96
- package/src/components/DataTable/components/__tests__/ViewRowModal.test.tsx +122 -58
- package/src/components/DataTable/components/hooks/usePermissionTracking.ts +0 -4
- package/src/components/DataTable/core/DataTableContext.tsx +1 -1
- package/src/components/DataTable/hooks/__tests__/useDataTableState.test.ts +51 -47
- package/src/components/DataTable/hooks/useDataTablePermissions.ts +24 -21
- package/src/components/DataTable/hooks/useDataTableState.ts +125 -9
- package/src/components/DataTable/hooks/useTableColumns.ts +40 -2
- package/src/components/DataTable/hooks/useTableHandlers.ts +11 -0
- package/src/components/DataTable/types.ts +5 -0
- package/src/components/DateTimeField/DateTimeField.tsx +20 -20
- package/src/components/DateTimeField/README.md +5 -2
- package/src/components/Dialog/Dialog.test.tsx +361 -318
- package/src/components/Dialog/Dialog.tsx +1154 -323
- package/src/components/Dialog/index.ts +3 -3
- package/src/components/FileDisplay/FileDisplay.test.tsx +45 -2
- package/src/components/FileDisplay/FileDisplay.tsx +28 -22
- package/src/components/Form/Form.test.tsx +9 -10
- package/src/components/Form/Form.tsx +369 -9
- package/src/components/InactivityWarningModal/InactivityWarningModal.test.tsx +28 -28
- package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +40 -54
- package/src/components/LoginForm/LoginForm.tsx +2 -2
- package/src/components/NavigationMenu/NavigationMenu.test.tsx +14 -13
- package/src/components/NavigationMenu/NavigationMenu.tsx +2 -2
- package/src/components/NavigationMenu/useNavigationFiltering.ts +11 -21
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +6 -4
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +30 -41
- package/src/components/PaceAppLayout/README.md +10 -9
- package/src/components/PaceAppLayout/test-setup.tsx +40 -31
- package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +108 -61
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +27 -3
- package/src/components/PasswordChange/PasswordChangeForm.test.tsx +61 -0
- package/src/components/PasswordChange/PasswordChangeForm.tsx +20 -13
- package/src/components/PublicLayout/PublicLayout.test.tsx +7 -3
- package/src/components/PublicLayout/PublicPageLayout.tsx +5 -8
- package/src/components/Select/Select.tsx +23 -21
- package/src/components/Select/types.ts +1 -1
- package/src/components/UserMenu/UserMenu.test.tsx +38 -6
- package/src/components/UserMenu/UserMenu.tsx +39 -34
- package/src/components/index.ts +3 -4
- package/src/eslint-rules/index.cjs +22 -0
- package/src/eslint-rules/rules/compliance.cjs +348 -0
- package/src/eslint-rules/rules/components.cjs +113 -0
- package/src/eslint-rules/rules/imports.cjs +102 -0
- package/src/eslint-rules/rules/rbac.cjs +790 -0
- package/src/eslint-rules/utils/helpers.cjs +42 -0
- package/src/eslint-rules/utils/manifest-loader.cjs +75 -0
- package/src/hooks/__tests__/hooks.integration.test.tsx +6 -8
- package/src/hooks/__tests__/useAppConfig.unit.test.ts +129 -67
- package/src/hooks/__tests__/usePublicEvent.simple.test.ts +149 -67
- package/src/hooks/__tests__/usePublicEvent.test.ts +149 -79
- package/src/hooks/__tests__/usePublicEvent.unit.test.ts +158 -109
- package/src/hooks/__tests__/useSessionDraft.test.ts +163 -0
- package/src/hooks/__tests__/useSessionRestoration.unit.test.tsx +10 -5
- package/src/hooks/public/usePublicEvent.ts +62 -190
- package/src/hooks/public/usePublicEventLogo.test.ts +70 -17
- package/src/hooks/public/usePublicEventLogo.ts +19 -9
- package/src/hooks/useAppConfig.ts +26 -24
- package/src/hooks/useEventTheme.test.ts +211 -233
- package/src/hooks/useEventTheme.ts +19 -28
- package/src/hooks/useEvents.ts +11 -7
- package/src/hooks/useKeyboardShortcuts.ts +1 -1
- package/src/hooks/useOrganisationPermissions.ts +9 -11
- package/src/hooks/useOrganisations.ts +13 -7
- package/src/hooks/useQueryCache.ts +0 -1
- package/src/hooks/useSessionDraft.ts +380 -0
- package/src/hooks/useSessionRestoration.ts +3 -1
- package/src/icons/index.ts +27 -0
- package/src/index.ts +16 -1
- package/src/providers/OrganisationProvider.tsx +23 -14
- package/src/providers/services/EventServiceProvider.tsx +1 -24
- package/src/providers/services/UnifiedAuthProvider.tsx +5 -48
- package/src/providers/services/__tests__/UnifiedAuthProvider.integration.test.tsx +3 -0
- package/src/rbac/README.md +20 -20
- package/src/rbac/__tests__/adapters.comprehensive.test.tsx +7 -457
- package/src/rbac/__tests__/auth-rbac.e2e.test.tsx +33 -7
- package/src/rbac/adapters.tsx +7 -295
- package/src/rbac/api.test.ts +44 -56
- package/src/rbac/api.ts +10 -17
- package/src/rbac/cache-invalidation.ts +0 -1
- package/src/rbac/compliance/index.ts +10 -0
- package/src/rbac/compliance/pattern-detector.ts +553 -0
- package/src/rbac/compliance/runtime-compliance.ts +22 -0
- package/src/rbac/components/AccessDenied.tsx +150 -0
- package/src/rbac/components/NavigationGuard.tsx +12 -20
- package/src/rbac/components/PagePermissionGuard.tsx +4 -24
- package/src/rbac/components/__tests__/NavigationGuard.test.tsx +21 -8
- package/src/rbac/components/index.ts +3 -41
- package/src/rbac/eslint-rules.js +1 -1
- package/src/rbac/hooks/index.ts +0 -3
- package/src/rbac/hooks/permissions/index.ts +0 -3
- package/src/rbac/hooks/permissions/useAccessLevel.ts +4 -8
- package/src/rbac/hooks/usePermissions.ts +0 -3
- package/src/rbac/hooks/useRBAC.test.ts +21 -3
- package/src/rbac/hooks/useRBAC.ts +4 -3
- package/src/rbac/hooks/useResolvedScope.test.ts +57 -47
- package/src/rbac/hooks/useResolvedScope.ts +58 -140
- package/src/rbac/hooks/useResourcePermissions.test.ts +241 -60
- package/src/rbac/hooks/useResourcePermissions.ts +182 -63
- package/src/rbac/hooks/useRoleManagement.test.ts +65 -22
- package/src/rbac/hooks/useRoleManagement.ts +147 -19
- package/src/rbac/hooks/useSecureSupabase.ts +4 -8
- package/src/rbac/index.ts +7 -9
- package/src/rbac/permissions.ts +17 -17
- package/src/rbac/utils/contextValidator.ts +45 -7
- package/src/services/AuthService.ts +132 -23
- package/src/services/EventService.ts +4 -97
- package/src/services/InactivityService.ts +155 -58
- package/src/services/OrganisationService.ts +7 -44
- package/src/services/__tests__/OrganisationService.test.ts +26 -8
- package/src/services/base/BaseService.ts +0 -3
- package/src/styles/core.css +4 -0
- package/src/types/database.generated.ts +4733 -3809
- package/src/utils/__tests__/organisationContext.unit.test.ts +9 -10
- package/src/utils/context/organisationContext.test.ts +13 -28
- package/src/utils/context/organisationContext.ts +21 -52
- package/src/utils/dynamic/dynamicUtils.ts +1 -1
- package/src/utils/file-reference/index.ts +39 -15
- package/src/utils/formatting/formatDateTime.test.ts +3 -2
- package/src/utils/formatting/formatTime.test.ts +3 -2
- package/src/utils/google-places/loadGoogleMapsScript.ts +29 -4
- package/src/utils/index.ts +4 -1
- package/src/utils/persistence/__tests__/keyDerivation.test.ts +135 -0
- package/src/utils/persistence/__tests__/sensitiveFieldDetection.test.ts +123 -0
- package/src/utils/persistence/keyDerivation.ts +304 -0
- package/src/utils/persistence/sensitiveFieldDetection.ts +212 -0
- package/src/utils/security/secureStorage.ts +5 -5
- package/src/utils/storage/helpers.ts +3 -3
- package/src/utils/supabase/createBaseClient.ts +147 -0
- package/src/utils/timezone/timezone.test.ts +1 -2
- package/src/utils/timezone/timezone.ts +1 -1
- package/src/utils/validation/csrf.ts +4 -4
- package/cursor-rules/CHANGELOG.md +0 -119
- package/cursor-rules/README.md +0 -192
- package/dist/DataTable-E7YQZD7D.js +0 -175
- package/dist/DataTable-E7YQZD7D.js.map +0 -1
- package/dist/UnifiedAuthProvider-QPXO24B4.js +0 -18
- package/dist/UnifiedAuthProvider-QPXO24B4.js.map +0 -1
- package/dist/api-6LVZTHDS.js +0 -52
- package/dist/api-6LVZTHDS.js.map +0 -1
- package/dist/audit-V53FV5AG.js +0 -17
- package/dist/audit-V53FV5AG.js.map +0 -1
- package/dist/chunk-36LVWXB2.js +0 -227
- package/dist/chunk-36LVWXB2.js.map +0 -1
- package/dist/chunk-3LPHPB62.js.map +0 -1
- package/dist/chunk-5DRSZLL2.js.map +0 -1
- package/dist/chunk-5EC5MEWX.js.map +0 -1
- package/dist/chunk-63FOKYGO.js.map +0 -1
- package/dist/chunk-6SOIHG6Z.js.map +0 -1
- package/dist/chunk-7JPAB3T5.js.map +0 -1
- package/dist/chunk-ATKZM7RX.js +0 -2053
- package/dist/chunk-ATKZM7RX.js.map +0 -1
- package/dist/chunk-AVMLPIM7.js.map +0 -1
- package/dist/chunk-DGUM43GV.js.map +0 -1
- package/dist/chunk-E66EQZE6.js.map +0 -1
- package/dist/chunk-FFQEQTNW.js.map +0 -1
- package/dist/chunk-FMUCXFII.js.map +0 -1
- package/dist/chunk-G37KK66H.js.map +0 -1
- package/dist/chunk-I6DAQMWX.js.map +0 -1
- package/dist/chunk-J36DSWQK.js.map +0 -1
- package/dist/chunk-KQCRWDSA.js +0 -1
- package/dist/chunk-KQCRWDSA.js.map +0 -1
- package/dist/chunk-L4OXEN46.js.map +0 -1
- package/dist/chunk-LMC26NLJ.js +0 -84
- package/dist/chunk-LMC26NLJ.js.map +0 -1
- package/dist/chunk-M43Y4SSO.js.map +0 -1
- package/dist/chunk-M7MPQISP.js.map +0 -1
- package/dist/chunk-NN6WWZ5U.js.map +0 -1
- package/dist/chunk-OEWDTMG7.js.map +0 -1
- package/dist/chunk-PWLANIRT.js.map +0 -1
- package/dist/chunk-QXHPKYJV.js.map +0 -1
- package/dist/chunk-VBXEHIUJ.js.map +0 -1
- package/dist/chunk-YKRAFF5K.js.map +0 -1
- package/dist/chunk-ZSAAAMVR.js.map +0 -1
- package/dist/components.js.map +0 -1
- package/dist/contextValidator-OOPCLPZW.js +0 -9
- package/dist/contextValidator-OOPCLPZW.js.map +0 -1
- package/dist/eslint-rules/pace-core-compliance.cjs +0 -510
- package/dist/hooks.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/providers.js.map +0 -1
- package/dist/rbac/eslint-rules.js.map +0 -1
- package/dist/rbac/index.js.map +0 -1
- package/dist/styles/index.js.map +0 -1
- package/dist/theming/runtime.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils.js.map +0 -1
- package/docs/standards/01-architecture-standard.md +0 -44
- package/docs/standards/02-api-and-rpc-standard.md +0 -39
- package/docs/standards/03-component-standard.md +0 -32
- package/docs/standards/05-security-standard.md +0 -44
- package/docs/standards/06-testing-and-docs-standard.md +0 -29
- package/docs/standards/pace-core-compliance.md +0 -432
- package/scripts/audit/core/checks/accessibility.cjs +0 -197
- package/scripts/audit/core/checks/api-usage.cjs +0 -191
- package/scripts/audit/core/checks/bundle.cjs +0 -142
- package/scripts/audit/core/checks/compliance.cjs +0 -2706
- package/scripts/audit/core/checks/config.cjs +0 -54
- package/scripts/audit/core/checks/coverage.cjs +0 -84
- package/scripts/audit/core/checks/dependencies.cjs +0 -994
- package/scripts/audit/core/checks/documentation.cjs +0 -268
- package/scripts/audit/core/checks/environment.cjs +0 -116
- package/scripts/audit/core/checks/error-handling.cjs +0 -340
- package/scripts/audit/core/checks/forms.cjs +0 -172
- package/scripts/audit/core/checks/heuristics.cjs +0 -68
- package/scripts/audit/core/checks/hooks.cjs +0 -334
- package/scripts/audit/core/checks/imports.cjs +0 -244
- package/scripts/audit/core/checks/performance.cjs +0 -325
- package/scripts/audit/core/checks/routes.cjs +0 -117
- package/scripts/audit/core/checks/state.cjs +0 -130
- package/scripts/audit/core/checks/structure.cjs +0 -65
- package/scripts/audit/core/checks/style.cjs +0 -584
- package/scripts/audit/core/checks/testing.cjs +0 -122
- package/scripts/audit/core/checks/typescript.cjs +0 -61
- package/scripts/audit/core/scanner.cjs +0 -199
- package/scripts/audit/core/utils.cjs +0 -137
- package/scripts/audit/reporters/console.cjs +0 -151
- package/scripts/audit/reporters/json.cjs +0 -54
- package/scripts/audit/reporters/markdown.cjs +0 -124
- package/scripts/audit-consuming-app.cjs +0 -86
- package/src/eslint-rules/pace-core-compliance.cjs +0 -510
- package/src/eslint-rules/pace-core-compliance.js +0 -638
- package/src/rbac/components/EnhancedNavigationMenu.test.tsx +0 -555
- package/src/rbac/components/EnhancedNavigationMenu.tsx +0 -293
- package/src/rbac/components/NavigationProvider.test.tsx +0 -481
- package/src/rbac/components/NavigationProvider.tsx +0 -345
- package/src/rbac/components/PagePermissionProvider.test.tsx +0 -476
- package/src/rbac/components/PagePermissionProvider.tsx +0 -279
- package/src/rbac/components/PermissionEnforcer.tsx +0 -312
- package/src/rbac/components/RoleBasedRouter.tsx +0 -440
- package/src/rbac/components/SecureDataProvider.test.tsx +0 -543
- package/src/rbac/components/SecureDataProvider.tsx +0 -339
- package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +0 -620
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +0 -726
- package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +0 -661
- package/src/rbac/components/__tests__/PermissionEnforcer.test.tsx +0 -881
- package/src/rbac/components/__tests__/RoleBasedRouter.test.tsx +0 -783
- package/src/rbac/components/__tests__/SecureDataProvider.fixed.test.tsx +0 -645
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +0 -659
- package/src/rbac/hooks/permissions/useCachedPermissions.ts +0 -79
- package/src/rbac/hooks/permissions/useHasAllPermissions.ts +0 -90
- package/src/rbac/hooks/permissions/useHasAnyPermission.ts +0 -90
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, Component } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { P as ParsedAddress, A as AutocompleteOptions } from './types-
|
|
4
|
+
import { P as ParsedAddress, A as AutocompleteOptions } from './types-B-K_5VnO.js';
|
|
5
5
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
6
6
|
import { F as FileCategory, e as FileUploadResult, U as UploadProgress, c as FileUploadOptions, a as FileReference } from './file-reference-BavO2eQj.js';
|
|
7
7
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
8
8
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
9
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
10
9
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
11
10
|
import { DayPickerProps, DateRange } from 'react-day-picker';
|
|
12
11
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
13
12
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
14
13
|
import { FieldValues, DefaultValues, SubmitHandler, SubmitErrorHandler, UseFormReturn, FieldPath, ControllerRenderProps, ControllerFieldState, UseFormStateReturn } from 'react-hook-form';
|
|
15
14
|
import { z } from 'zod';
|
|
15
|
+
import { N as NavigationMenuProps, a as NavigationItem } from './types-t9H8qKRw.js';
|
|
16
16
|
import { User, SupabaseClient, createClient } from '@supabase/supabase-js';
|
|
17
|
-
import { P as Permission, A as AccessLevel } from './types-BeoeWV5I.js';
|
|
18
17
|
import { O as Organisation, E as Event } from './event-CW5YB_2p.js';
|
|
19
18
|
|
|
20
19
|
/**
|
|
@@ -869,26 +868,32 @@ type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'auto';
|
|
|
869
868
|
* Props for the Dialog root component
|
|
870
869
|
* @public
|
|
871
870
|
*/
|
|
872
|
-
interface DialogProps
|
|
871
|
+
interface DialogProps {
|
|
872
|
+
children: React$1.ReactNode;
|
|
873
|
+
open?: boolean;
|
|
874
|
+
defaultOpen?: boolean;
|
|
875
|
+
onOpenChange?: (open: boolean) => void;
|
|
873
876
|
}
|
|
874
877
|
/**
|
|
875
878
|
* Props for the DialogTrigger component
|
|
876
879
|
* @public
|
|
877
880
|
*/
|
|
878
|
-
interface DialogTriggerProps
|
|
881
|
+
interface DialogTriggerProps {
|
|
882
|
+
children: React$1.ReactNode;
|
|
883
|
+
asChild?: boolean;
|
|
884
|
+
className?: string;
|
|
885
|
+
onClick?: (e: React$1.MouseEvent) => void;
|
|
879
886
|
}
|
|
880
887
|
/**
|
|
881
888
|
* Enhanced props for the DialogContent component with size variants and customization
|
|
882
|
-
* Uses semantic HTML dialog element
|
|
889
|
+
* Uses semantic HTML dialog element
|
|
883
890
|
* @public
|
|
884
891
|
*/
|
|
885
|
-
interface DialogContentProps extends React$1.
|
|
892
|
+
interface DialogContentProps extends React$1.HTMLAttributes<HTMLDialogElement> {
|
|
886
893
|
/** Dialog size variant */
|
|
887
894
|
size?: DialogSize;
|
|
888
895
|
/** Whether to show the close button */
|
|
889
896
|
showCloseButton?: boolean;
|
|
890
|
-
/** Custom className for the overlay */
|
|
891
|
-
overlayClassName?: string;
|
|
892
897
|
/** Whether to prevent closing on escape key */
|
|
893
898
|
preventCloseOnEscape?: boolean;
|
|
894
899
|
/** Whether to prevent closing on outside click */
|
|
@@ -907,12 +912,25 @@ interface DialogContentProps extends React$1.ComponentPropsWithoutRef<typeof Dia
|
|
|
907
912
|
minHeight?: string;
|
|
908
913
|
/** Minimum width in CSS units */
|
|
909
914
|
minWidth?: string;
|
|
915
|
+
/** Dialog title for accessibility (sets native title attribute) */
|
|
916
|
+
title?: string;
|
|
917
|
+
/** Dialog description for accessibility (sets aria-description attribute) */
|
|
918
|
+
description?: string;
|
|
919
|
+
/** Whether to persist open state across tab switches */
|
|
920
|
+
persistOpenState?: boolean;
|
|
910
921
|
}
|
|
911
922
|
/**
|
|
912
|
-
* Props for the
|
|
923
|
+
* Props for the DialogPortal component
|
|
913
924
|
* @public
|
|
914
925
|
*/
|
|
915
|
-
interface
|
|
926
|
+
interface DialogPortalProps {
|
|
927
|
+
children: React$1.ReactNode;
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Props for the DialogClose component
|
|
931
|
+
* @public
|
|
932
|
+
*/
|
|
933
|
+
interface DialogCloseProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
916
934
|
}
|
|
917
935
|
/**
|
|
918
936
|
* Props for the DialogHeader component (semantic header element)
|
|
@@ -950,7 +968,7 @@ interface DialogBodyProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
|
950
968
|
* Props for the DialogTitle component
|
|
951
969
|
* @public
|
|
952
970
|
*/
|
|
953
|
-
interface DialogTitleProps extends React$1.
|
|
971
|
+
interface DialogTitleProps extends React$1.HTMLAttributes<HTMLHeadingElement> {
|
|
954
972
|
/** HTML content to render as title (will be sanitized for security) */
|
|
955
973
|
htmlContent?: string;
|
|
956
974
|
/** Whether to allow HTML content rendering (default: true) */
|
|
@@ -960,57 +978,44 @@ interface DialogTitleProps extends React$1.ComponentPropsWithoutRef<typeof Dialo
|
|
|
960
978
|
* Props for the DialogDescription component
|
|
961
979
|
* @public
|
|
962
980
|
*/
|
|
963
|
-
interface DialogDescriptionProps extends React$1.
|
|
981
|
+
interface DialogDescriptionProps extends React$1.HTMLAttributes<HTMLParagraphElement> {
|
|
964
982
|
/** HTML content to render as description (will be sanitized for security) */
|
|
965
983
|
htmlContent?: string;
|
|
966
984
|
/** Whether to allow HTML content rendering (default: true) */
|
|
967
985
|
allowHtml?: boolean;
|
|
968
986
|
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
declare const
|
|
987
|
+
/**
|
|
988
|
+
* Dialog root component
|
|
989
|
+
* Provides context for dialog state management
|
|
990
|
+
*/
|
|
991
|
+
declare const Dialog: React$1.NamedExoticComponent<DialogProps>;
|
|
992
|
+
/**
|
|
993
|
+
* DialogTrigger component
|
|
994
|
+
* Opens the dialog when clicked
|
|
995
|
+
*/
|
|
996
|
+
declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogTriggerProps & React$1.RefAttributes<HTMLElement>>;
|
|
997
|
+
/**
|
|
998
|
+
* DialogPortal component
|
|
999
|
+
* Portals dialog content to document.body
|
|
1000
|
+
*/
|
|
1001
|
+
declare const DialogPortal: React$1.FC<DialogPortalProps>;
|
|
974
1002
|
/**
|
|
975
1003
|
* DialogContent component
|
|
976
1004
|
* The main content container using semantic HTML <dialog> element with enhanced features
|
|
977
|
-
* Built on Radix UI primitives for accessibility while providing semantic structure
|
|
978
1005
|
*
|
|
979
1006
|
* @param props - Content configuration and styling
|
|
980
1007
|
* @param ref - Forwarded ref to the dialog element
|
|
981
1008
|
* @returns JSX.Element - The semantic dialog content with overlay and optional close button
|
|
982
|
-
*
|
|
983
|
-
* @example
|
|
984
|
-
* ```tsx
|
|
985
|
-
* <DialogContent size="lg" enableScrolling={true} maxHeightPercent={80}>
|
|
986
|
-
* <DialogHeader>
|
|
987
|
-
* <DialogTitle>Scrollable Dialog</DialogTitle>
|
|
988
|
-
* <DialogDescription>This dialog will scroll if content overflows.</DialogDescription>
|
|
989
|
-
* </DialogHeader>
|
|
990
|
-
* <DialogBody>
|
|
991
|
-
* <section>Large amount of semantic content here...</section>
|
|
992
|
-
* </DialogBody>
|
|
993
|
-
* <DialogFooter>
|
|
994
|
-
* <Button>Save</Button>
|
|
995
|
-
* </DialogFooter>
|
|
996
|
-
* </DialogContent>
|
|
997
|
-
* ```
|
|
998
1009
|
*/
|
|
999
|
-
declare const DialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<
|
|
1010
|
+
declare const DialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDialogElement>>;
|
|
1011
|
+
/**
|
|
1012
|
+
* DialogClose component
|
|
1013
|
+
* Button to close the dialog
|
|
1014
|
+
*/
|
|
1015
|
+
declare const DialogClose: React$1.ForwardRefExoticComponent<DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1000
1016
|
/**
|
|
1001
1017
|
* DialogHeader component
|
|
1002
1018
|
* Semantic header container for dialog title and description with optional sticky behavior
|
|
1003
|
-
*
|
|
1004
|
-
* @param props - Header configuration and styling
|
|
1005
|
-
* @returns JSX.Element - The dialog header container using semantic <header> element
|
|
1006
|
-
*
|
|
1007
|
-
* @example
|
|
1008
|
-
* ```tsx
|
|
1009
|
-
* <DialogHeader sticky={true}>
|
|
1010
|
-
* <DialogTitle>Sticky Header</DialogTitle>
|
|
1011
|
-
* <DialogDescription>This header stays visible while scrolling.</DialogDescription>
|
|
1012
|
-
* </DialogHeader>
|
|
1013
|
-
* ```
|
|
1014
1019
|
*/
|
|
1015
1020
|
declare const DialogHeader: {
|
|
1016
1021
|
({ className, sticky, ...props }: DialogHeaderProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1019,27 +1024,6 @@ declare const DialogHeader: {
|
|
|
1019
1024
|
/**
|
|
1020
1025
|
* DialogBody component
|
|
1021
1026
|
* Semantic main content area for dialog body content with scrollable functionality
|
|
1022
|
-
* Supports both React children and safe HTML content rendering
|
|
1023
|
-
*
|
|
1024
|
-
* @param props - Body configuration and styling
|
|
1025
|
-
* @returns JSX.Element - The scrollable dialog body container using semantic <main> element
|
|
1026
|
-
*
|
|
1027
|
-
* @example
|
|
1028
|
-
* ```tsx
|
|
1029
|
-
* // Using React children
|
|
1030
|
-
* <DialogBody>
|
|
1031
|
-
* <section className="space-y-4">
|
|
1032
|
-
* <h4>Content Title</h4>
|
|
1033
|
-
* <p>Long content that will scroll...</p>
|
|
1034
|
-
* </section>
|
|
1035
|
-
* </DialogBody>
|
|
1036
|
-
*
|
|
1037
|
-
* // Using HTML content
|
|
1038
|
-
* <DialogBody
|
|
1039
|
-
* htmlContent="<h2>Import Instructions</h2><p>Upload a CSV file with the following format:</p><ul><li>Required columns: name, email</li><li>Optional columns: phone, address</li></ul>"
|
|
1040
|
-
* allowHtml={true}
|
|
1041
|
-
* />
|
|
1042
|
-
* ```
|
|
1043
1027
|
*/
|
|
1044
1028
|
declare const DialogBody: {
|
|
1045
1029
|
({ className, maxHeight, style, htmlContent, allowHtml, strictSanitization, logWarnings, children, ...props }: DialogBodyProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1048,24 +1032,21 @@ declare const DialogBody: {
|
|
|
1048
1032
|
/**
|
|
1049
1033
|
* DialogFooter component
|
|
1050
1034
|
* Semantic footer container for dialog action buttons with optional sticky behavior
|
|
1051
|
-
*
|
|
1052
|
-
* @param props - Footer configuration and styling
|
|
1053
|
-
* @returns JSX.Element - The dialog footer container using semantic <footer> element
|
|
1054
|
-
*
|
|
1055
|
-
* @example
|
|
1056
|
-
* ```tsx
|
|
1057
|
-
* <DialogFooter sticky={true}>
|
|
1058
|
-
* <Button variant="outline">Cancel</Button>
|
|
1059
|
-
* <Button>Save changes</Button>
|
|
1060
|
-
* </DialogFooter>
|
|
1061
|
-
* ```
|
|
1062
1035
|
*/
|
|
1063
1036
|
declare const DialogFooter: {
|
|
1064
1037
|
({ className, sticky, ...props }: DialogFooterProps): react_jsx_runtime.JSX.Element;
|
|
1065
1038
|
displayName: string;
|
|
1066
1039
|
};
|
|
1040
|
+
/**
|
|
1041
|
+
* DialogTitle component
|
|
1042
|
+
* Title element with ARIA support
|
|
1043
|
+
*/
|
|
1067
1044
|
declare const DialogTitle: React$1.ForwardRefExoticComponent<DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
1068
|
-
|
|
1045
|
+
/**
|
|
1046
|
+
* DialogDescription component
|
|
1047
|
+
* Description element with ARIA support
|
|
1048
|
+
*/
|
|
1049
|
+
declare const DialogDescription: React$1.ForwardRefExoticComponent<DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1069
1050
|
|
|
1070
1051
|
/**
|
|
1071
1052
|
* Direction for Select dropdown opening.
|
|
@@ -1088,7 +1069,7 @@ interface UseSelectStateProps {
|
|
|
1088
1069
|
/**
|
|
1089
1070
|
* Props for the Select root component.
|
|
1090
1071
|
*/
|
|
1091
|
-
interface SelectProps extends Omit<React$1.HTMLAttributes<
|
|
1072
|
+
interface SelectProps extends Omit<React$1.HTMLAttributes<HTMLFieldSetElement>, "onChange" | "onKeyDown" | "onFocus" | "onBlur"> {
|
|
1092
1073
|
children: React$1.ReactNode;
|
|
1093
1074
|
className?: string;
|
|
1094
1075
|
direction?: SelectDirection;
|
|
@@ -1148,10 +1129,10 @@ interface SelectItemProps {
|
|
|
1148
1129
|
* Provides select dropdown functionality with search, keyboard navigation, and accessibility.
|
|
1149
1130
|
*
|
|
1150
1131
|
* @param props - Select configuration
|
|
1151
|
-
* @param ref - Forwarded ref to the
|
|
1132
|
+
* @param ref - Forwarded ref to the fieldset element
|
|
1152
1133
|
* @returns The rendered select component
|
|
1153
1134
|
*/
|
|
1154
|
-
declare const Select: React$1.ForwardRefExoticComponent<SelectProps & UseSelectStateProps & React$1.RefAttributes<
|
|
1135
|
+
declare const Select: React$1.ForwardRefExoticComponent<SelectProps & UseSelectStateProps & React$1.RefAttributes<HTMLFieldSetElement>>;
|
|
1155
1136
|
/**
|
|
1156
1137
|
* Select trigger button component.
|
|
1157
1138
|
* Opens/closes the select dropdown and displays the selected value.
|
|
@@ -2062,57 +2043,6 @@ interface LoginFormProps {
|
|
|
2062
2043
|
*/
|
|
2063
2044
|
declare const LoginForm: React__default.NamedExoticComponent<LoginFormProps>;
|
|
2064
2045
|
|
|
2065
|
-
/**
|
|
2066
|
-
* Navigation mode type
|
|
2067
|
-
*/
|
|
2068
|
-
type NavigationMode = "dropdown" | "hierarchical";
|
|
2069
|
-
/**
|
|
2070
|
-
* Navigation item metadata
|
|
2071
|
-
*/
|
|
2072
|
-
interface NavigationItemMeta {
|
|
2073
|
-
hidden?: boolean;
|
|
2074
|
-
[key: string]: unknown;
|
|
2075
|
-
}
|
|
2076
|
-
/**
|
|
2077
|
-
* Navigation item interface
|
|
2078
|
-
*/
|
|
2079
|
-
interface NavigationItem {
|
|
2080
|
-
id: string;
|
|
2081
|
-
label: string;
|
|
2082
|
-
href?: string;
|
|
2083
|
-
icon?: string;
|
|
2084
|
-
children?: NavigationItem[];
|
|
2085
|
-
permissions?: (Permission | string)[];
|
|
2086
|
-
roles?: string[];
|
|
2087
|
-
accessLevel?: AccessLevel | string;
|
|
2088
|
-
meta?: NavigationItemMeta;
|
|
2089
|
-
pageId?: string;
|
|
2090
|
-
}
|
|
2091
|
-
/**
|
|
2092
|
-
* Navigation menu component props
|
|
2093
|
-
*/
|
|
2094
|
-
interface NavigationMenuProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2095
|
-
items: NavigationItem[];
|
|
2096
|
-
mode?: NavigationMode;
|
|
2097
|
-
currentPath?: string;
|
|
2098
|
-
onNavigate?: (item: NavigationItem) => void;
|
|
2099
|
-
className?: string;
|
|
2100
|
-
disabled?: boolean;
|
|
2101
|
-
buttonText?: string;
|
|
2102
|
-
showIcons?: boolean;
|
|
2103
|
-
navigationLabel?: string;
|
|
2104
|
-
strictMode?: boolean;
|
|
2105
|
-
auditLog?: boolean;
|
|
2106
|
-
onNavigationAccessDenied?: (item: NavigationItem) => void;
|
|
2107
|
-
onStrictModeViolation?: (item: NavigationItem, reason: string) => void;
|
|
2108
|
-
/**
|
|
2109
|
-
* If true, indicates that items have already been filtered by the parent component (e.g., PaceAppLayout).
|
|
2110
|
-
* When true, NavigationMenu will skip expensive permission checks and trust the provided items.
|
|
2111
|
-
* This significantly improves performance when items are pre-filtered.
|
|
2112
|
-
*/
|
|
2113
|
-
itemsPreFiltered?: boolean;
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
2046
|
/**
|
|
2117
2047
|
* @file Unified Navigation Menu Component
|
|
2118
2048
|
* @package @jmruthers/pace-core
|
|
@@ -2548,7 +2478,7 @@ declare const NavigationMenu: React$1.ForwardRefExoticComponent<NavigationMenuPr
|
|
|
2548
2478
|
* }}
|
|
2549
2479
|
* />
|
|
2550
2480
|
*
|
|
2551
|
-
* // Password change form in a modal
|
|
2481
|
+
* // Password change form in a modal with onSuccess callback
|
|
2552
2482
|
* <Modal isOpen={showPasswordChange} onClose={() => setShowPasswordChange(false)}>
|
|
2553
2483
|
* <ModalContent>
|
|
2554
2484
|
* <ModalHeader>
|
|
@@ -2559,13 +2489,15 @@ declare const NavigationMenu: React$1.ForwardRefExoticComponent<NavigationMenuPr
|
|
|
2559
2489
|
* onSubmit={async (values) => {
|
|
2560
2490
|
* const result = await changePassword(values.newPassword);
|
|
2561
2491
|
* if (result.success) {
|
|
2562
|
-
* setShowPasswordChange(false);
|
|
2563
|
-
* toast.success('Password changed successfully');
|
|
2564
2492
|
* return {};
|
|
2565
2493
|
* } else {
|
|
2566
2494
|
* return { error: { message: result.error } };
|
|
2567
2495
|
* }
|
|
2568
2496
|
* }}
|
|
2497
|
+
* onSuccess={() => {
|
|
2498
|
+
* setShowPasswordChange(false);
|
|
2499
|
+
* toast.success('Password changed successfully');
|
|
2500
|
+
* }}
|
|
2569
2501
|
* />
|
|
2570
2502
|
* </ModalBody>
|
|
2571
2503
|
* </ModalContent>
|
|
@@ -2618,9 +2550,10 @@ interface PasswordChangeFormProps {
|
|
|
2618
2550
|
onSubmit: (values: PasswordChangeFormValues) => Promise<{
|
|
2619
2551
|
error?: PasswordChangeFormError;
|
|
2620
2552
|
}>;
|
|
2553
|
+
onSuccess?: () => void;
|
|
2621
2554
|
className?: string;
|
|
2622
2555
|
}
|
|
2623
|
-
declare function PasswordChangeForm({ onSubmit, className }: PasswordChangeFormProps): react_jsx_runtime.JSX.Element;
|
|
2556
|
+
declare function PasswordChangeForm({ onSubmit, onSuccess, className }: PasswordChangeFormProps): react_jsx_runtime.JSX.Element;
|
|
2624
2557
|
|
|
2625
2558
|
/**
|
|
2626
2559
|
* Props for the Header component
|
|
@@ -4195,4 +4128,4 @@ declare function usePublicPageContext(): PublicPageContextType;
|
|
|
4195
4128
|
*/
|
|
4196
4129
|
declare function useIsPublicPage(): boolean;
|
|
4197
4130
|
|
|
4198
|
-
export { type
|
|
4131
|
+
export { type DialogContentProps as $, AddressField as A, Button as B, Card as C, TableHeader as D, TableBody as E, TableCaption as F, TableCell as G, TableFooter as H, Input as I, TableHead as J, TableRow as K, Label as L, Dialog as M, DialogPortal as N, DialogTrigger as O, Progress as P, DialogClose as Q, DialogContent as R, Switch as S, Textarea as T, DialogHeader as U, DialogBody as V, DialogFooter as W, DialogTitle as X, DialogDescription as Y, type DialogProps as Z, type DialogTriggerProps as _, type ButtonProps as a, FileUpload as a$, type DialogPortalProps as a0, type DialogCloseProps as a1, type DialogHeaderProps as a2, type DialogFooterProps as a3, type DialogBodyProps as a4, type DialogSize as a5, Select as a6, SelectGroup as a7, SelectValue as a8, SelectTrigger as a9, TooltipContent as aA, TooltipProvider as aB, TooltipRoot as aC, Form as aD, FormField as aE, type FormProps as aF, type FormFieldProps as aG, LoginForm as aH, type LoginFormProps as aI, Header as aJ, Footer as aK, type FooterProps as aL, ProtectedRoute as aM, type ProtectedRouteProps as aN, NavigationMenu as aO, ContextSelector as aP, type ContextSelectorProps as aQ, UserMenu as aR, ErrorBoundary as aS, ErrorBoundaryProvider as aT, type ErrorBoundaryProps as aU, type ErrorBoundaryState as aV, type ErrorBoundaryProviderProps as aW, type GlobalErrorHandler as aX, LoadingSpinner as aY, SessionRestorationLoader as aZ, type SessionRestorationLoaderProps as a_, SelectContent as aa, SelectLabel as ab, SelectItem as ac, SelectSeparator as ad, Tabs as ae, TabsList as af, TabsTrigger as ag, TabsContent as ah, type TabsProps as ai, type TabsListProps as aj, type TabsTriggerProps as ak, type TabsContentProps as al, Calendar as am, type CalendarProps as an, Toast as ao, Toaster as ap, ToastAction as aq, ToastProvider as ar, ToastViewport as as, ToastTitle as at, ToastDescription as au, ToastClose as av, type ToastActionElement as aw, type ToastProps as ax, Tooltip as ay, TooltipTrigger as az, CardHeader as b, type FileUploadProps as b0, FileDisplay as b1, type FileDisplayProps as b2, useFileReference as b3, useFileReferenceForRecord as b4, useFileReferenceById as b5, useFilesByCategory as b6, type UseFileReferenceOptions as b7, type UseFileReferenceReturn as b8, type UseFileReferenceForRecordReturn as b9, PublicPageLayout as ba, PublicPageHeader as bb, PublicPageFooter as bc, PublicPageProvider as bd, usePublicPageContext as be, useIsPublicPage as bf, type PublicPageLayoutProps as bg, type PublicPageHeaderProps as bh, type PublicPageFooterProps as bi, type PaceAppLayoutProps as bj, PaceAppLayout as bk, type PaceLoginPageProps as bl, PaceLoginPage as bm, type UserMenuProps as bn, PasswordChangeForm as bo, CardFooter as c, CardTitle as d, CardDescription as e, CardContent as f, CardActions as g, type CardProps as h, type CardActionsProps as i, type InputProps as j, type AddressFieldProps as k, type AddressFieldRef as l, type LabelProps as m, type TextareaProps as n, Alert as o, AlertTitle as p, AlertDescription as q, Avatar as r, type AvatarProps as s, Badge as t, type BadgeProps as u, type BadgeVariant as v, Checkbox as w, type SwitchProps as x, type ProgressProps as y, Table as z };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { UnifiedAuthContext, UnifiedAuthProvider, useUnifiedAuth } from './chunk-FTCRZOG2.js';
|
|
2
|
+
import './chunk-ZFYPMX46.js';
|
|
3
|
+
import './chunk-AHU7G2R5.js';
|
|
4
|
+
import './chunk-4SXLQIZO.js';
|
|
5
|
+
import './chunk-HF6O3O37.js';
|
|
6
|
+
import './chunk-TTRFSOKR.js';
|
|
7
|
+
import './chunk-3RG5ZIWI.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { OrganisationContextRequiredError, clearCache, getAccessLevel, getPageScopeType, getPermissionMap, getRoleContext, hasAllPermissions, hasAnyPermission, invalidateAppCache, invalidateEventCache, invalidateOrganisationCache, invalidateUserCache, isEventAdmin, isOrganisationAdmin, isPermitted, isPermittedCached, isRBACInitialized, isSuperAdmin, resolveAppContext, setupRBAC } from './chunk-ZFYPMX46.js';
|
|
2
|
+
import './chunk-AHU7G2R5.js';
|
|
3
|
+
import './chunk-TTRFSOKR.js';
|
|
4
|
+
import './chunk-3RG5ZIWI.js';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from
|
|
1
|
+
import { createLogger } from './chunk-TTRFSOKR.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { parseISO, isValid, addMinutes, differenceInHours } from 'date-fns';
|
|
4
|
+
import { formatInTimeZone as formatInTimeZone$1, toZonedTime as toZonedTime$1, fromZonedTime as fromZonedTime$1 } from 'date-fns-tz';
|
|
4
5
|
|
|
5
|
-
// src/components/LoadingSpinner/LoadingSpinner.tsx
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
var LoadingSpinner = ({
|
|
8
7
|
size = "md",
|
|
9
8
|
className = ""
|
|
@@ -17,10 +16,6 @@ var LoadingSpinner = ({
|
|
|
17
16
|
const sizeClass = sizeClasses[validSize];
|
|
18
17
|
return /* @__PURE__ */ jsx("canvas", { className: `inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite] ${sizeClass} ${className}`.trim(), role: "status", children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Loading..." }) });
|
|
19
18
|
};
|
|
20
|
-
|
|
21
|
-
// src/utils/timezone/timezone.ts
|
|
22
|
-
import { parseISO, addMinutes, differenceInHours, isValid } from "date-fns";
|
|
23
|
-
import { formatInTimeZone as fnsFormatInTimeZone, toZonedTime as fnsToZonedTime, fromZonedTime as fnsFromZonedTime } from "date-fns-tz";
|
|
24
19
|
function formatInTimeZone(date, timeZone, formatStr) {
|
|
25
20
|
try {
|
|
26
21
|
if (!timeZone || typeof timeZone !== "string") {
|
|
@@ -37,7 +32,7 @@ function formatInTimeZone(date, timeZone, formatStr) {
|
|
|
37
32
|
if (!isValid(dateObj)) {
|
|
38
33
|
return "Invalid date";
|
|
39
34
|
}
|
|
40
|
-
return
|
|
35
|
+
return formatInTimeZone$1(dateObj, timeZone, formatStr);
|
|
41
36
|
} catch {
|
|
42
37
|
return "Invalid date";
|
|
43
38
|
}
|
|
@@ -82,7 +77,7 @@ function toZonedTime(date, timezone) {
|
|
|
82
77
|
if (!isValid(date)) {
|
|
83
78
|
return date;
|
|
84
79
|
}
|
|
85
|
-
return
|
|
80
|
+
return toZonedTime$1(date, timezone);
|
|
86
81
|
} catch {
|
|
87
82
|
return date;
|
|
88
83
|
}
|
|
@@ -95,7 +90,7 @@ function fromZonedTime(localDate, timezone) {
|
|
|
95
90
|
if (!isValid(localDate)) {
|
|
96
91
|
return localDate;
|
|
97
92
|
}
|
|
98
|
-
return
|
|
93
|
+
return fromZonedTime$1(localDate, timezone);
|
|
99
94
|
} catch {
|
|
100
95
|
return localDate;
|
|
101
96
|
}
|
|
@@ -197,19 +192,4 @@ var CachedAppIdResolver = class {
|
|
|
197
192
|
};
|
|
198
193
|
var cachedAppIdResolver = new CachedAppIdResolver();
|
|
199
194
|
|
|
200
|
-
export {
|
|
201
|
-
LoadingSpinner,
|
|
202
|
-
formatInTimeZone,
|
|
203
|
-
getTimezoneAbbreviation,
|
|
204
|
-
formatTimeInTimeZone,
|
|
205
|
-
getUserTimeZone,
|
|
206
|
-
toZonedTime,
|
|
207
|
-
fromZonedTime,
|
|
208
|
-
roundToNearestMinutes,
|
|
209
|
-
getTimeZoneDifference,
|
|
210
|
-
getAppId,
|
|
211
|
-
getAppIds,
|
|
212
|
-
CachedAppIdResolver,
|
|
213
|
-
cachedAppIdResolver
|
|
214
|
-
};
|
|
215
|
-
//# sourceMappingURL=chunk-J36DSWQK.js.map
|
|
195
|
+
export { CachedAppIdResolver, LoadingSpinner, cachedAppIdResolver, formatInTimeZone, formatTimeInTimeZone, fromZonedTime, getAppId, getAppIds, getTimeZoneDifference, getTimezoneAbbreviation, getUserTimeZone, roundToNearestMinutes, toZonedTime };
|