@jmruthers/pace-core 0.5.193 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +7 -1
- package/cursor-rules/00-pace-core-compliance.mdc +372 -0
- package/cursor-rules/01-standards-compliance.mdc +275 -0
- package/cursor-rules/02-project-structure.mdc +200 -0
- package/cursor-rules/03-solid-principles.mdc +341 -0
- package/cursor-rules/04-testing-standards.mdc +315 -0
- package/cursor-rules/05-bug-reports-and-features.mdc +246 -0
- package/cursor-rules/06-code-quality.mdc +392 -0
- package/cursor-rules/07-tech-stack-compliance.mdc +309 -0
- package/cursor-rules/CHANGELOG.md +101 -0
- package/cursor-rules/README.md +191 -0
- package/dist/{DataTable-Be6dH_dR.d.ts → DataTable-CH1U5Tpy.d.ts} +1 -1
- package/dist/{DataTable-5FU7IESH.js → DataTable-DQ7RSOHE.js} +6 -6
- package/dist/{PublicPageProvider-C0Sm_e5k.d.ts → PublicPageProvider-ce4xlHYA.d.ts} +34 -155
- package/dist/{UnifiedAuthProvider-RGJTDE2C.js → UnifiedAuthProvider-ATAP5UTR.js} +2 -2
- package/dist/{chunk-6C4YBBJM 5.js → chunk-3QRJFVBR.js} +1 -1
- package/dist/chunk-3QRJFVBR.js.map +1 -0
- package/dist/{chunk-IIELH4DL.js → chunk-3XTALGJF.js} +2 -2
- package/dist/{chunk-IIELH4DL.js.map → chunk-3XTALGJF.js.map} +1 -1
- package/dist/{chunk-HWIIPPNI.js → chunk-4N5C5XZU.js} +20 -20
- package/dist/chunk-4N5C5XZU.js.map +1 -0
- package/dist/{chunk-7EQTDTTJ.js → chunk-4ZC4GX36.js} +5 -5
- package/dist/{chunk-7EQTDTTJ.js 2.map → chunk-4ZC4GX36.js.map} +1 -1
- package/dist/{chunk-7FLMSG37.js → chunk-BYFSK72L.js} +22 -22
- package/dist/chunk-BYFSK72L.js.map +1 -0
- package/dist/{chunk-LFNCN2SP.js → chunk-EXUD6RNJ.js} +46 -7
- package/dist/chunk-EXUD6RNJ.js.map +1 -0
- package/dist/{chunk-NOAYCWCX 5.js → chunk-GLK6VM3F.js} +167 -169
- package/dist/chunk-GLK6VM3F.js.map +1 -0
- package/dist/{chunk-HW3OVDUF.js → chunk-J36DSWQK.js} +1 -1
- package/dist/{chunk-HW3OVDUF.js.map → chunk-J36DSWQK.js.map} +1 -1
- package/dist/{chunk-BC4IJKSL.js → chunk-JBKQ3SAO.js} +2 -2
- package/dist/{chunk-QWWZ5CAQ.js → chunk-LXQLPRQ2.js} +2 -2
- package/dist/{chunk-E3SPN4VZ 5.js → chunk-T33XF5ZC.js} +119 -114
- package/dist/chunk-T33XF5ZC.js.map +1 -0
- package/dist/{chunk-XNXXZ43G.js → chunk-XM25TVIE.js} +27 -4
- package/dist/chunk-XM25TVIE.js.map +1 -0
- package/dist/components.d.ts +3 -3
- package/dist/components.js +8 -8
- package/dist/hooks.d.ts +6 -6
- package/dist/hooks.js +17 -22
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +15 -16
- package/dist/index.js.map +1 -1
- package/dist/providers.js +1 -1
- package/dist/rbac/index.d.ts +1 -1
- package/dist/rbac/index.js +5 -5
- package/dist/{usePublicRouteParams-TZe0gy-4.d.ts → usePublicRouteParams-BJAlWfuJ.d.ts} +3 -3
- package/dist/{useToast-C8gR5ir4.d.ts → useToast-AyaT-x7p.d.ts} +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +3 -3
- package/docs/getting-started/cursor-rules.md +262 -0
- package/docs/getting-started/installation-guide.md +6 -1
- package/docs/getting-started/quick-start.md +6 -1
- package/docs/migration/MIGRATION_GUIDE.md +4 -4
- package/docs/migration/REACT_19_MIGRATION.md +227 -0
- package/docs/standards/README.md +39 -0
- package/docs/troubleshooting/migration.md +4 -4
- package/examples/PublicPages/PublicEventPage.tsx +1 -1
- package/package.json +11 -6
- package/scripts/audit-consuming-app.cjs +961 -0
- package/scripts/check-pace-core-compliance.cjs +34 -15
- package/scripts/install-cursor-rules.cjs +236 -0
- package/src/__tests__/helpers/test-providers.tsx +1 -1
- package/src/__tests__/helpers/test-utils.tsx +1 -1
- package/src/components/Badge/Badge.tsx +2 -4
- package/src/components/Button/Button.tsx +5 -4
- package/src/components/Calendar/Calendar.tsx +1 -1
- package/src/components/DataTable/DataTable.test.tsx +57 -93
- package/src/components/DataTable/DataTable.tsx +2 -2
- package/src/components/DataTable/__tests__/pagination.modes.test.tsx +13 -5
- package/src/components/DataTable/__tests__/ssr.strict-mode.test.tsx +12 -12
- package/src/components/DataTable/components/AccessDeniedPage.tsx +1 -1
- package/src/components/DataTable/components/BulkOperationsDropdown.tsx +1 -1
- package/src/components/DataTable/components/DataTableCore.tsx +4 -7
- package/src/components/DataTable/components/DataTableModals.tsx +1 -1
- package/src/components/DataTable/components/EditableRow.tsx +1 -1
- package/src/components/DataTable/components/UnifiedTableBody.tsx +6 -8
- package/src/components/DataTable/components/__tests__/DataTableModals.test.tsx +23 -23
- package/src/components/DataTable/components/__tests__/EditableRow.test.tsx +11 -11
- package/src/components/DataTable/components/__tests__/ExpandButton.test.tsx +36 -36
- package/src/components/DataTable/components/__tests__/GroupHeader.test.tsx +27 -27
- package/src/components/DataTable/components/__tests__/ImportModal.test.tsx +39 -39
- package/src/components/DataTable/components/__tests__/UnifiedTableBody.test.tsx +33 -33
- package/src/components/DataTable/components/__tests__/ViewRowModal.test.tsx +29 -29
- package/src/components/DataTable/hooks/useColumnReordering.ts +2 -2
- package/src/components/DataTable/hooks/useKeyboardNavigation.ts +2 -2
- package/src/components/DatePickerWithTimezone/DatePickerWithTimezone.test.tsx +8 -14
- package/src/components/Dialog/Dialog.tsx +6 -5
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +1 -1
- package/src/components/EventSelector/EventSelector.tsx +1 -1
- package/src/components/FileDisplay/FileDisplay.test.tsx +2 -2
- package/src/components/Footer/Footer.tsx +1 -1
- package/src/components/Form/Form.test.tsx +36 -15
- package/src/components/Form/Form.tsx +30 -26
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/InactivityWarningModal/InactivityWarningModal.test.tsx +40 -40
- package/src/components/InactivityWarningModal/InactivityWarningModal.tsx +1 -1
- package/src/components/Input/Input.tsx +28 -30
- package/src/components/Label/Label.tsx +1 -1
- package/src/components/LoadingSpinner/LoadingSpinner.tsx +1 -1
- package/src/components/LoginForm/LoginForm.test.tsx +42 -42
- package/src/components/LoginForm/LoginForm.tsx +8 -8
- package/src/components/NavigationMenu/NavigationMenu.tsx +1 -1
- package/src/components/PaceAppLayout/PaceAppLayout.performance.test.tsx +1 -1
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +50 -50
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +1 -1
- package/src/components/PaceAppLayout/README.md +1 -1
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +1 -1
- package/src/components/PasswordChange/PasswordChangeForm.test.tsx +33 -33
- package/src/components/PasswordChange/PasswordChangeForm.tsx +1 -1
- package/src/components/Progress/Progress.tsx +1 -1
- package/src/components/PublicLayout/PublicPageLayout.tsx +1 -1
- package/src/components/Select/Select.tsx +33 -22
- package/src/components/SessionRestorationLoader/SessionRestorationLoader.tsx +1 -1
- package/src/components/Table/Table.tsx +1 -1
- package/src/components/Textarea/Textarea.tsx +27 -29
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/Tooltip/Tooltip.tsx +1 -1
- package/src/components/UserMenu/UserMenu.tsx +1 -1
- package/src/hooks/__tests__/hooks.integration.test.tsx +80 -55
- package/src/hooks/__tests__/useStorage.unit.test.ts +36 -36
- package/src/hooks/public/usePublicEvent.ts +1 -1
- package/src/hooks/public/usePublicEventLogo.ts +1 -1
- package/src/hooks/public/usePublicRouteParams.ts +1 -1
- package/src/hooks/useDataTableState.ts +8 -18
- package/src/hooks/useFocusManagement.ts +2 -2
- package/src/hooks/useFocusTrap.ts +4 -4
- package/src/hooks/useFormDialog.ts +8 -7
- package/src/hooks/useInactivityTracker.ts +1 -1
- package/src/hooks/usePermissionCache.ts +1 -1
- package/src/hooks/useSecureDataAccess.ts +19 -4
- package/src/hooks/useToast.ts +2 -2
- package/src/providers/__tests__/OrganisationProvider.test.tsx +57 -13
- package/src/providers/__tests__/ProviderLifecycle.test.tsx +21 -6
- package/src/providers/__tests__/UnifiedAuthProvider.test.tsx +10 -10
- package/src/providers/services/UnifiedAuthProvider.tsx +22 -22
- package/src/providers/services/__tests__/AuthServiceProvider.integration.test.tsx +13 -3
- package/src/rbac/__tests__/adapters.comprehensive.test.tsx +24 -24
- package/src/rbac/components/EnhancedNavigationMenu.tsx +1 -1
- package/src/rbac/components/NavigationGuard.tsx +1 -1
- package/src/rbac/components/NavigationProvider.tsx +1 -1
- package/src/rbac/components/PagePermissionGuard.tsx +1 -1
- package/src/rbac/components/PagePermissionProvider.tsx +1 -1
- package/src/rbac/components/PermissionEnforcer.tsx +1 -1
- package/src/rbac/components/RoleBasedRouter.tsx +1 -1
- package/src/rbac/components/SecureDataProvider.tsx +1 -1
- package/src/rbac/secureClient.ts +12 -0
- package/src/utils/security/secureDataAccess.test.ts +31 -20
- package/src/utils/security/secureDataAccess.ts +4 -3
- package/dist/chunk-6C4YBBJM.js +0 -628
- package/dist/chunk-6C4YBBJM.js.map +0 -1
- package/dist/chunk-7D4SUZUM.js 2.map +0 -1
- package/dist/chunk-7EQTDTTJ.js.map +0 -1
- package/dist/chunk-7FLMSG37.js 2.map +0 -1
- package/dist/chunk-7FLMSG37.js.map +0 -1
- package/dist/chunk-E3SPN4VZ.js +0 -12917
- package/dist/chunk-E3SPN4VZ.js.map +0 -1
- package/dist/chunk-E66EQZE6 5.js +0 -37
- package/dist/chunk-E66EQZE6.js 2.map +0 -1
- package/dist/chunk-HWIIPPNI.js.map +0 -1
- package/dist/chunk-I7PSE6JW 5.js +0 -191
- package/dist/chunk-I7PSE6JW.js 2.map +0 -1
- package/dist/chunk-KNC55RTG.js 5.map +0 -1
- package/dist/chunk-KQCRWDSA.js 5.map +0 -1
- package/dist/chunk-LFNCN2SP.js 2.map +0 -1
- package/dist/chunk-LFNCN2SP.js.map +0 -1
- package/dist/chunk-LMC26NLJ 2.js +0 -84
- package/dist/chunk-NOAYCWCX.js +0 -4993
- package/dist/chunk-NOAYCWCX.js.map +0 -1
- package/dist/chunk-QWWZ5CAQ.js.map +0 -1
- package/dist/chunk-QXHPKYJV 3.js +0 -113
- package/dist/chunk-R77UEZ4E 3.js +0 -68
- package/dist/chunk-VBXEHIUJ.js 6.map +0 -1
- package/dist/chunk-XNXXZ43G.js.map +0 -1
- package/dist/chunk-ZSAAAMVR 6.js +0 -25
- package/dist/components.js 5.map +0 -1
- package/dist/styles/index 2.js +0 -12
- package/dist/styles/index.js 5.map +0 -1
- package/dist/theming/runtime 5.js +0 -19
- package/dist/theming/runtime.js 5.map +0 -1
- /package/dist/{DataTable-5FU7IESH.js.map → DataTable-DQ7RSOHE.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-RGJTDE2C.js.map → UnifiedAuthProvider-ATAP5UTR.js.map} +0 -0
- /package/dist/{chunk-BC4IJKSL.js.map → chunk-JBKQ3SAO.js.map} +0 -0
- /package/dist/{chunk-QWWZ5CAQ.js 3.map → chunk-LXQLPRQ2.js.map} +0 -0
- /package/examples/{rbac → RBAC}/CompleteRBACExample.tsx +0 -0
- /package/examples/{rbac → RBAC}/EventBasedApp.tsx +0 -0
- /package/examples/{rbac → RBAC}/PermissionExample.tsx +0 -0
- /package/examples/{rbac → RBAC}/index.ts +0 -0
|
@@ -273,7 +273,7 @@ const TestWrapper = ({ children }: { children: React.ReactNode }) => (
|
|
|
273
273
|
);
|
|
274
274
|
|
|
275
275
|
describe('PaceAppLayout Component', () => {
|
|
276
|
-
const
|
|
276
|
+
const baseProps = {
|
|
277
277
|
appName: 'Test App',
|
|
278
278
|
};
|
|
279
279
|
|
|
@@ -296,7 +296,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
296
296
|
it('renders with default props', () => {
|
|
297
297
|
renderWithProviders(
|
|
298
298
|
<TestWrapper>
|
|
299
|
-
<PaceAppLayout {...
|
|
299
|
+
<PaceAppLayout {...baseProps} />
|
|
300
300
|
</TestWrapper>,
|
|
301
301
|
{ withRouter: false }
|
|
302
302
|
);
|
|
@@ -309,7 +309,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
309
309
|
it('renders with custom app name', () => {
|
|
310
310
|
renderWithProviders(
|
|
311
311
|
<TestWrapper>
|
|
312
|
-
<PaceAppLayout {...
|
|
312
|
+
<PaceAppLayout {...baseProps} appName="Custom App" />
|
|
313
313
|
</TestWrapper>,
|
|
314
314
|
{ withRouter: false }
|
|
315
315
|
);
|
|
@@ -325,7 +325,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
325
325
|
|
|
326
326
|
renderWithProviders(
|
|
327
327
|
<TestWrapper>
|
|
328
|
-
<PaceAppLayout {...
|
|
328
|
+
<PaceAppLayout {...baseProps} navItems={customNavItems} />
|
|
329
329
|
</TestWrapper>,
|
|
330
330
|
{ withRouter: false }
|
|
331
331
|
);
|
|
@@ -337,7 +337,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
337
337
|
it('renders with default navigation items when none provided', () => {
|
|
338
338
|
renderWithProviders(
|
|
339
339
|
<TestWrapper>
|
|
340
|
-
<PaceAppLayout {...
|
|
340
|
+
<PaceAppLayout {...baseProps} />
|
|
341
341
|
</TestWrapper>,
|
|
342
342
|
{ withRouter: false }
|
|
343
343
|
);
|
|
@@ -352,7 +352,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
352
352
|
|
|
353
353
|
renderWithProviders(
|
|
354
354
|
<TestWrapper>
|
|
355
|
-
<PaceAppLayout {...
|
|
355
|
+
<PaceAppLayout {...baseProps} headerActions={headerActions} />
|
|
356
356
|
</TestWrapper>,
|
|
357
357
|
{ withRouter: false }
|
|
358
358
|
);
|
|
@@ -365,7 +365,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
365
365
|
|
|
366
366
|
renderWithProviders(
|
|
367
367
|
<TestWrapper>
|
|
368
|
-
<PaceAppLayout {...
|
|
368
|
+
<PaceAppLayout {...baseProps} customLogo={customLogo} />
|
|
369
369
|
</TestWrapper>,
|
|
370
370
|
{ withRouter: false }
|
|
371
371
|
);
|
|
@@ -378,7 +378,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
378
378
|
|
|
379
379
|
renderWithProviders(
|
|
380
380
|
<TestWrapper>
|
|
381
|
-
<PaceAppLayout {...
|
|
381
|
+
<PaceAppLayout {...baseProps} customUserMenu={customUserMenu} />
|
|
382
382
|
</TestWrapper>,
|
|
383
383
|
{ withRouter: false }
|
|
384
384
|
);
|
|
@@ -389,7 +389,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
389
389
|
it('renders with custom header className', () => {
|
|
390
390
|
renderWithProviders(
|
|
391
391
|
<TestWrapper>
|
|
392
|
-
<PaceAppLayout {...
|
|
392
|
+
<PaceAppLayout {...baseProps} headerClassName="custom-header" />
|
|
393
393
|
</TestWrapper>,
|
|
394
394
|
{ withRouter: false }
|
|
395
395
|
);
|
|
@@ -402,7 +402,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
402
402
|
it('uses default header className when not provided', () => {
|
|
403
403
|
renderWithProviders(
|
|
404
404
|
<TestWrapper>
|
|
405
|
-
<PaceAppLayout {...
|
|
405
|
+
<PaceAppLayout {...baseProps} />
|
|
406
406
|
</TestWrapper>,
|
|
407
407
|
{ withRouter: false }
|
|
408
408
|
);
|
|
@@ -416,7 +416,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
416
416
|
it('shows event selector by default', () => {
|
|
417
417
|
renderWithProviders(
|
|
418
418
|
<TestWrapper>
|
|
419
|
-
<PaceAppLayout {...
|
|
419
|
+
<PaceAppLayout {...baseProps} />
|
|
420
420
|
</TestWrapper>,
|
|
421
421
|
{ withRouter: false }
|
|
422
422
|
);
|
|
@@ -427,7 +427,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
427
427
|
it('hides event selector when showEventSelector is false', () => {
|
|
428
428
|
renderWithProviders(
|
|
429
429
|
<TestWrapper>
|
|
430
|
-
<PaceAppLayout {...
|
|
430
|
+
<PaceAppLayout {...baseProps} showEventSelector={false} />
|
|
431
431
|
</TestWrapper>,
|
|
432
432
|
{ withRouter: false }
|
|
433
433
|
);
|
|
@@ -438,7 +438,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
438
438
|
it('shows event selector when showEventSelector is explicitly true', () => {
|
|
439
439
|
renderWithProviders(
|
|
440
440
|
<TestWrapper>
|
|
441
|
-
<PaceAppLayout {...
|
|
441
|
+
<PaceAppLayout {...baseProps} showEventSelector={true} />
|
|
442
442
|
</TestWrapper>,
|
|
443
443
|
{ withRouter: false }
|
|
444
444
|
);
|
|
@@ -451,7 +451,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
451
451
|
it('shows user menu by default', () => {
|
|
452
452
|
renderWithProviders(
|
|
453
453
|
<TestWrapper>
|
|
454
|
-
<PaceAppLayout {...
|
|
454
|
+
<PaceAppLayout {...baseProps} />
|
|
455
455
|
</TestWrapper>,
|
|
456
456
|
{ withRouter: false }
|
|
457
457
|
);
|
|
@@ -462,7 +462,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
462
462
|
it('hides user menu when showUserMenu is false', () => {
|
|
463
463
|
renderWithProviders(
|
|
464
464
|
<TestWrapper>
|
|
465
|
-
<PaceAppLayout {...
|
|
465
|
+
<PaceAppLayout {...baseProps} showUserMenu={false} />
|
|
466
466
|
</TestWrapper>,
|
|
467
467
|
{ withRouter: false }
|
|
468
468
|
);
|
|
@@ -476,7 +476,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
476
476
|
const user = userEvent.setup();
|
|
477
477
|
renderWithProviders(
|
|
478
478
|
<TestWrapper>
|
|
479
|
-
<PaceAppLayout {...
|
|
479
|
+
<PaceAppLayout {...baseProps} />
|
|
480
480
|
</TestWrapper>,
|
|
481
481
|
{ withRouter: false }
|
|
482
482
|
);
|
|
@@ -489,7 +489,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
489
489
|
const user = userEvent.setup();
|
|
490
490
|
renderWithProviders(
|
|
491
491
|
<TestWrapper>
|
|
492
|
-
<PaceAppLayout {...
|
|
492
|
+
<PaceAppLayout {...baseProps} />
|
|
493
493
|
</TestWrapper>,
|
|
494
494
|
{ withRouter: false }
|
|
495
495
|
);
|
|
@@ -507,7 +507,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
507
507
|
|
|
508
508
|
renderWithProviders(
|
|
509
509
|
<TestWrapper>
|
|
510
|
-
<PaceAppLayout {...
|
|
510
|
+
<PaceAppLayout {...baseProps} navItems={customNavItems} />
|
|
511
511
|
</TestWrapper>,
|
|
512
512
|
{ withRouter: false }
|
|
513
513
|
);
|
|
@@ -522,7 +522,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
522
522
|
it('passes current path to header', () => {
|
|
523
523
|
renderWithProviders(
|
|
524
524
|
<TestWrapper>
|
|
525
|
-
<PaceAppLayout {...
|
|
525
|
+
<PaceAppLayout {...baseProps} />
|
|
526
526
|
</TestWrapper>,
|
|
527
527
|
{ withRouter: false }
|
|
528
528
|
);
|
|
@@ -536,7 +536,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
536
536
|
it('renders normally when enforcePermissions is false', () => {
|
|
537
537
|
renderWithProviders(
|
|
538
538
|
<TestWrapper>
|
|
539
|
-
<PaceAppLayout {...
|
|
539
|
+
<PaceAppLayout {...baseProps} enforcePermissions={false} />
|
|
540
540
|
</TestWrapper>,
|
|
541
541
|
{ withRouter: false }
|
|
542
542
|
);
|
|
@@ -575,7 +575,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
575
575
|
|
|
576
576
|
renderWithProviders(
|
|
577
577
|
<TestWrapper>
|
|
578
|
-
<PaceAppLayout {...
|
|
578
|
+
<PaceAppLayout {...baseProps} enforcePermissions={true} />
|
|
579
579
|
</TestWrapper>,
|
|
580
580
|
{ withRouter: false }
|
|
581
581
|
);
|
|
@@ -602,7 +602,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
602
602
|
|
|
603
603
|
renderWithProviders(
|
|
604
604
|
<TestWrapper>
|
|
605
|
-
<PaceAppLayout {...
|
|
605
|
+
<PaceAppLayout {...baseProps} enforcePermissions={true} />
|
|
606
606
|
</TestWrapper>,
|
|
607
607
|
{ withRouter: false }
|
|
608
608
|
);
|
|
@@ -635,7 +635,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
635
635
|
|
|
636
636
|
renderWithProviders(
|
|
637
637
|
<TestWrapper>
|
|
638
|
-
<PaceAppLayout {...
|
|
638
|
+
<PaceAppLayout {...baseProps} enforcePermissions={true} />
|
|
639
639
|
</TestWrapper>,
|
|
640
640
|
{ withRouter: false }
|
|
641
641
|
);
|
|
@@ -667,7 +667,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
667
667
|
|
|
668
668
|
renderWithProviders(
|
|
669
669
|
<TestWrapper>
|
|
670
|
-
<PaceAppLayout {...
|
|
670
|
+
<PaceAppLayout {...baseProps} enforcePermissions={true} />
|
|
671
671
|
</TestWrapper>,
|
|
672
672
|
{ withRouter: false }
|
|
673
673
|
);
|
|
@@ -704,7 +704,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
704
704
|
|
|
705
705
|
renderWithProviders(
|
|
706
706
|
<TestWrapper>
|
|
707
|
-
<PaceAppLayout {...
|
|
707
|
+
<PaceAppLayout {...baseProps} enforcePermissions={true} />
|
|
708
708
|
</TestWrapper>,
|
|
709
709
|
{ withRouter: false }
|
|
710
710
|
);
|
|
@@ -742,7 +742,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
742
742
|
renderWithProviders(
|
|
743
743
|
<TestWrapper>
|
|
744
744
|
<PaceAppLayout
|
|
745
|
-
{...
|
|
745
|
+
{...baseProps}
|
|
746
746
|
enforcePermissions={true}
|
|
747
747
|
permissionFallback={customFallback}
|
|
748
748
|
/>
|
|
@@ -778,7 +778,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
778
778
|
renderWithProviders(
|
|
779
779
|
<TestWrapper>
|
|
780
780
|
<PaceAppLayout
|
|
781
|
-
{...
|
|
781
|
+
{...baseProps}
|
|
782
782
|
enforcePermissions={true}
|
|
783
783
|
enforcePagePermissions={true}
|
|
784
784
|
pagePermissionFallback={pageFallback}
|
|
@@ -814,7 +814,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
814
814
|
renderWithProviders(
|
|
815
815
|
<TestWrapper>
|
|
816
816
|
<PaceAppLayout
|
|
817
|
-
{...
|
|
817
|
+
{...baseProps}
|
|
818
818
|
navItems={customNavItems}
|
|
819
819
|
enforcePermissions={true}
|
|
820
820
|
routePermissions={{
|
|
@@ -850,7 +850,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
850
850
|
renderWithProviders(
|
|
851
851
|
<TestWrapper>
|
|
852
852
|
<PaceAppLayout
|
|
853
|
-
{...
|
|
853
|
+
{...baseProps}
|
|
854
854
|
navItems={customNavItems}
|
|
855
855
|
enforcePermissions={false}
|
|
856
856
|
routePermissions={{
|
|
@@ -875,7 +875,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
875
875
|
renderWithProviders(
|
|
876
876
|
<TestWrapper>
|
|
877
877
|
<PaceAppLayout
|
|
878
|
-
{...
|
|
878
|
+
{...baseProps}
|
|
879
879
|
enforcePermissions={true}
|
|
880
880
|
routePermissions={{
|
|
881
881
|
'/dashboard': 'update',
|
|
@@ -909,7 +909,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
909
909
|
renderWithProviders(
|
|
910
910
|
<TestWrapper>
|
|
911
911
|
<PaceAppLayout
|
|
912
|
-
{...
|
|
912
|
+
{...baseProps}
|
|
913
913
|
enforcePermissions={true}
|
|
914
914
|
defaultPermission="create"
|
|
915
915
|
routePermissions={{
|
|
@@ -947,7 +947,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
947
947
|
renderWithProviders(
|
|
948
948
|
<TestWrapper>
|
|
949
949
|
<PaceAppLayout
|
|
950
|
-
{...
|
|
950
|
+
{...baseProps}
|
|
951
951
|
enforcePermissions={true}
|
|
952
952
|
/>
|
|
953
953
|
</TestWrapper>,
|
|
@@ -976,7 +976,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
976
976
|
renderWithProviders(
|
|
977
977
|
<TestWrapper>
|
|
978
978
|
<PaceAppLayout
|
|
979
|
-
{...
|
|
979
|
+
{...baseProps}
|
|
980
980
|
enforcePermissions={true}
|
|
981
981
|
onPageAccessDenied={onPageAccessDenied}
|
|
982
982
|
/>
|
|
@@ -1004,7 +1004,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1004
1004
|
renderWithProviders(
|
|
1005
1005
|
<TestWrapper>
|
|
1006
1006
|
<PaceAppLayout
|
|
1007
|
-
{...
|
|
1007
|
+
{...baseProps}
|
|
1008
1008
|
enforcePermissions={true}
|
|
1009
1009
|
strictMode={true}
|
|
1010
1010
|
onStrictModeViolation={onStrictModeViolation}
|
|
@@ -1036,7 +1036,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1036
1036
|
renderWithProviders(
|
|
1037
1037
|
<TestWrapper>
|
|
1038
1038
|
<PaceAppLayout
|
|
1039
|
-
{...
|
|
1039
|
+
{...baseProps}
|
|
1040
1040
|
roleBasedRouting={true}
|
|
1041
1041
|
routeConfig={routeConfig}
|
|
1042
1042
|
onRouteAccessDenied={onRouteAccessDenied}
|
|
@@ -1065,7 +1065,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1065
1065
|
renderWithProviders(
|
|
1066
1066
|
<TestWrapper>
|
|
1067
1067
|
<PaceAppLayout
|
|
1068
|
-
{...
|
|
1068
|
+
{...baseProps}
|
|
1069
1069
|
roleBasedRouting={true}
|
|
1070
1070
|
routeConfig={routeConfig}
|
|
1071
1071
|
strictMode={true}
|
|
@@ -1107,7 +1107,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1107
1107
|
renderWithProviders(
|
|
1108
1108
|
<FallbackWrapper>
|
|
1109
1109
|
<PaceAppLayout
|
|
1110
|
-
{...
|
|
1110
|
+
{...baseProps}
|
|
1111
1111
|
roleBasedRouting={true}
|
|
1112
1112
|
strictMode={true}
|
|
1113
1113
|
fallbackRoute="/no-access"
|
|
@@ -1151,7 +1151,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1151
1151
|
renderWithProviders(
|
|
1152
1152
|
<TestWrapper>
|
|
1153
1153
|
<PaceAppLayout
|
|
1154
|
-
{...
|
|
1154
|
+
{...baseProps}
|
|
1155
1155
|
enforcePermissions={true}
|
|
1156
1156
|
/>
|
|
1157
1157
|
</TestWrapper>,
|
|
@@ -1193,7 +1193,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1193
1193
|
renderWithProviders(
|
|
1194
1194
|
<TestWrapper>
|
|
1195
1195
|
<PaceAppLayout
|
|
1196
|
-
{...
|
|
1196
|
+
{...baseProps}
|
|
1197
1197
|
enforcePermissions={true}
|
|
1198
1198
|
/>
|
|
1199
1199
|
</TestWrapper>,
|
|
@@ -1217,7 +1217,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1217
1217
|
it('renders with proper semantic HTML elements', () => {
|
|
1218
1218
|
renderWithProviders(
|
|
1219
1219
|
<TestWrapper>
|
|
1220
|
-
<PaceAppLayout {...
|
|
1220
|
+
<PaceAppLayout {...baseProps} />
|
|
1221
1221
|
</TestWrapper>,
|
|
1222
1222
|
{ withRouter: false }
|
|
1223
1223
|
);
|
|
@@ -1230,7 +1230,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1230
1230
|
it('provides proper main content area', () => {
|
|
1231
1231
|
renderWithProviders(
|
|
1232
1232
|
<TestWrapper>
|
|
1233
|
-
<PaceAppLayout {...
|
|
1233
|
+
<PaceAppLayout {...baseProps} />
|
|
1234
1234
|
</TestWrapper>,
|
|
1235
1235
|
{ withRouter: false }
|
|
1236
1236
|
);
|
|
@@ -1243,7 +1243,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1243
1243
|
it('renders main content area with proper styling', () => {
|
|
1244
1244
|
renderWithProviders(
|
|
1245
1245
|
<TestWrapper>
|
|
1246
|
-
<PaceAppLayout {...
|
|
1246
|
+
<PaceAppLayout {...baseProps} />
|
|
1247
1247
|
</TestWrapper>,
|
|
1248
1248
|
{ withRouter: false }
|
|
1249
1249
|
);
|
|
@@ -1257,7 +1257,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1257
1257
|
it('has accessible navigation', () => {
|
|
1258
1258
|
renderWithProviders(
|
|
1259
1259
|
<TestWrapper>
|
|
1260
|
-
<PaceAppLayout {...
|
|
1260
|
+
<PaceAppLayout {...baseProps} />
|
|
1261
1261
|
</TestWrapper>,
|
|
1262
1262
|
{ withRouter: false }
|
|
1263
1263
|
);
|
|
@@ -1269,7 +1269,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1269
1269
|
it('has accessible user menu', () => {
|
|
1270
1270
|
renderWithProviders(
|
|
1271
1271
|
<TestWrapper>
|
|
1272
|
-
<PaceAppLayout {...
|
|
1272
|
+
<PaceAppLayout {...baseProps} />
|
|
1273
1273
|
</TestWrapper>,
|
|
1274
1274
|
{ withRouter: false }
|
|
1275
1275
|
);
|
|
@@ -1283,7 +1283,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1283
1283
|
it('provides meaningful text for screen readers', () => {
|
|
1284
1284
|
renderWithProviders(
|
|
1285
1285
|
<TestWrapper>
|
|
1286
|
-
<PaceAppLayout {...
|
|
1286
|
+
<PaceAppLayout {...baseProps} />
|
|
1287
1287
|
</TestWrapper>,
|
|
1288
1288
|
{ withRouter: false }
|
|
1289
1289
|
);
|
|
@@ -1298,7 +1298,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1298
1298
|
const user = userEvent.setup();
|
|
1299
1299
|
renderWithProviders(
|
|
1300
1300
|
<TestWrapper>
|
|
1301
|
-
<PaceAppLayout {...
|
|
1301
|
+
<PaceAppLayout {...baseProps} />
|
|
1302
1302
|
</TestWrapper>,
|
|
1303
1303
|
{ withRouter: false }
|
|
1304
1304
|
);
|
|
@@ -1314,7 +1314,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1314
1314
|
it('handles empty navigation items array', () => {
|
|
1315
1315
|
renderWithProviders(
|
|
1316
1316
|
<TestWrapper>
|
|
1317
|
-
<PaceAppLayout {...
|
|
1317
|
+
<PaceAppLayout {...baseProps} navItems={[]} />
|
|
1318
1318
|
</TestWrapper>,
|
|
1319
1319
|
{ withRouter: false }
|
|
1320
1320
|
);
|
|
@@ -1332,7 +1332,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1332
1332
|
renderWithProviders(
|
|
1333
1333
|
<TestWrapper>
|
|
1334
1334
|
<PaceAppLayout
|
|
1335
|
-
{...
|
|
1335
|
+
{...baseProps}
|
|
1336
1336
|
navItems={navItemsWithoutHref}
|
|
1337
1337
|
enforcePermissions={false}
|
|
1338
1338
|
/>
|
|
@@ -1349,7 +1349,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1349
1349
|
// without breaking. We don't enforce permissions to simplify the test.
|
|
1350
1350
|
const { rerender } = renderWithProviders(
|
|
1351
1351
|
<TestWrapper>
|
|
1352
|
-
<PaceAppLayout {...
|
|
1352
|
+
<PaceAppLayout {...baseProps} enforcePermissions={false} />
|
|
1353
1353
|
</TestWrapper>,
|
|
1354
1354
|
{ withRouter: false }
|
|
1355
1355
|
);
|
|
@@ -1363,7 +1363,7 @@ describe('PaceAppLayout Component', () => {
|
|
|
1363
1363
|
mockLocation.pathname = '/settings';
|
|
1364
1364
|
rerender(
|
|
1365
1365
|
<TestWrapper>
|
|
1366
|
-
<PaceAppLayout {...
|
|
1366
|
+
<PaceAppLayout {...baseProps} enforcePermissions={false} />
|
|
1367
1367
|
</TestWrapper>
|
|
1368
1368
|
);
|
|
1369
1369
|
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
* - Permission-based route protection
|
|
87
87
|
*
|
|
88
88
|
* @dependencies
|
|
89
|
-
* - React
|
|
89
|
+
* - React 19+ - Component framework
|
|
90
90
|
* - React Router v6 - Routing
|
|
91
91
|
* - UnifiedAuthProvider - Authentication
|
|
92
92
|
* - usePermissionCache - Permission management
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
* - Automatic redirect prevention loops
|
|
112
112
|
*
|
|
113
113
|
* @dependencies
|
|
114
|
-
* - React
|
|
114
|
+
* - React 19+ - Hooks and effects
|
|
115
115
|
* - React Router v6 - Navigation
|
|
116
116
|
* - UnifiedAuthProvider - Authentication
|
|
117
117
|
* - LoginForm component
|