@jmruthers/pace-core 0.6.3 → 0.6.5
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-THFPBKTP.js → DataTable-AOVNCPTX.js} +8 -8
- package/dist/{PublicPageProvider-DEMpysFR.d.ts → PublicPageProvider-QTFVrL-Z.d.ts} +65 -83
- package/dist/{UnifiedAuthProvider-KAGUYQ4J.js → UnifiedAuthProvider-4SBX4LU5.js} +4 -4
- package/dist/{api-IAGWF3ZG.js → api-O6HTBX5Y.js} +3 -3
- package/dist/{chunk-ZNIWI3UC.js → chunk-6COVEUS7.js} +141 -107
- package/dist/chunk-6COVEUS7.js.map +1 -0
- package/dist/{chunk-QRPVRXYT.js → chunk-AFVQODI2.js} +38 -1
- package/dist/{chunk-QRPVRXYT.js.map → chunk-AFVQODI2.js.map} +1 -1
- package/dist/{chunk-RWEBCB47.js → chunk-EFN2EIMK.js} +2 -2
- package/dist/{chunk-CNCQDFLN.js → chunk-G7QEZTYQ.js} +31 -31
- package/dist/{chunk-CNCQDFLN.js.map → chunk-G7QEZTYQ.js.map} +1 -1
- package/dist/{chunk-YDQHOZNA.js → chunk-HU2C6SSC.js} +29 -18
- package/dist/chunk-HU2C6SSC.js.map +1 -0
- package/dist/{chunk-DWUBLJJM.js → chunk-IHB5DR3H.js} +184 -53
- package/dist/chunk-IHB5DR3H.js.map +1 -0
- package/dist/{chunk-PQBSKX33.js → chunk-IVOFDYWT.js} +364 -208
- package/dist/chunk-IVOFDYWT.js.map +1 -0
- package/dist/{chunk-6SOIHG6Z.js → chunk-JGRYX5UX.js} +120 -20
- package/dist/chunk-JGRYX5UX.js.map +1 -0
- package/dist/{chunk-6Z7LTB3D.js → chunk-NTM7ZSB6.js} +4 -4
- package/dist/chunk-NTM7ZSB6.js.map +1 -0
- package/dist/{chunk-HFZBI76P.js → chunk-RGAWHO7N.js} +4 -4
- package/dist/chunk-RGAWHO7N.js.map +1 -0
- package/dist/{chunk-2T2IG7T7.js → chunk-UPPMRMYG.js} +3 -3
- package/dist/{chunk-2T2IG7T7.js.map → chunk-UPPMRMYG.js.map} +1 -1
- package/dist/components.d.ts +2 -3
- package/dist/components.js +24 -28
- package/dist/components.js.map +1 -1
- package/dist/{contextValidator-3JNZKUTX.js → contextValidator-5OGXSPKS.js} +2 -2
- package/dist/hooks.d.ts +3 -3
- package/dist/hooks.js +41 -139
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +27 -18
- package/dist/index.js +41 -50
- package/dist/index.js.map +1 -1
- package/dist/providers.js +3 -3
- package/dist/rbac/index.d.ts +16 -9
- package/dist/rbac/index.js +6 -6
- package/dist/{usePublicRouteParams-i3qtoBgg.d.ts → usePublicRouteParams-ClnV4tnv.d.ts} +8 -8
- package/dist/utils.js +1 -1
- package/docs/api/modules.md +210 -100
- package/package.json +8 -4
- package/scripts/audit/core/checks/dependencies.cjs +9 -0
- package/scripts/validate-master.js +1 -1
- package/src/components/DataTable/__tests__/keyboard.test.tsx +15 -2
- package/src/components/DataTable/components/ImportModal.tsx +4 -6
- 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/core/DataTableContext.tsx +1 -1
- package/src/components/DateTimeField/DateTimeField.tsx +17 -19
- package/src/components/DateTimeField/README.md +5 -2
- package/src/components/Dialog/Dialog.test.tsx +248 -228
- package/src/components/Dialog/Dialog.tsx +455 -325
- package/src/components/Dialog/index.ts +3 -3
- package/src/components/FileDisplay/FileDisplay.test.tsx +41 -0
- package/src/components/FileDisplay/FileDisplay.tsx +5 -5
- package/src/components/Form/Form.test.tsx +3 -2
- package/src/components/Form/Form.tsx +4 -5
- 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.tsx +2 -2
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +54 -42
- package/src/components/PaceAppLayout/README.md +10 -9
- package/src/components/PaceAppLayout/test-setup.tsx +40 -31
- 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/UserMenu/UserMenu.test.tsx +38 -6
- package/src/components/UserMenu/UserMenu.tsx +36 -34
- package/src/components/index.ts +3 -4
- package/src/hooks/useEventTheme.ts +4 -4
- package/src/hooks/useEvents.ts +11 -7
- package/src/hooks/useKeyboardShortcuts.ts +1 -1
- package/src/hooks/useOrganisationPermissions.ts +4 -4
- package/src/hooks/useOrganisations.ts +13 -7
- package/src/index.ts +11 -1
- package/src/rbac/README.md +20 -20
- package/src/rbac/hooks/useRBAC.test.ts +21 -3
- package/src/rbac/hooks/useRBAC.ts +4 -3
- package/src/rbac/hooks/useResourcePermissions.test.ts +125 -30
- package/src/rbac/hooks/useResourcePermissions.ts +57 -29
- package/src/rbac/permissions.ts +17 -17
- package/src/rbac/utils/contextValidator.ts +36 -0
- package/src/services/AuthService.ts +2 -5
- package/src/services/EventService.ts +99 -2
- package/src/services/InactivityService.ts +139 -58
- package/src/styles/core.css +4 -0
- package/src/utils/formatting/formatTime.test.ts +3 -2
- package/dist/chunk-6SOIHG6Z.js.map +0 -1
- package/dist/chunk-6Z7LTB3D.js.map +0 -1
- package/dist/chunk-DWUBLJJM.js.map +0 -1
- package/dist/chunk-HFZBI76P.js.map +0 -1
- package/dist/chunk-PQBSKX33.js.map +0 -1
- package/dist/chunk-YDQHOZNA.js.map +0 -1
- package/dist/chunk-ZNIWI3UC.js.map +0 -1
- /package/dist/{DataTable-THFPBKTP.js.map → DataTable-AOVNCPTX.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-KAGUYQ4J.js.map → UnifiedAuthProvider-4SBX4LU5.js.map} +0 -0
- /package/dist/{api-IAGWF3ZG.js.map → api-O6HTBX5Y.js.map} +0 -0
- /package/dist/{chunk-RWEBCB47.js.map → chunk-EFN2EIMK.js.map} +0 -0
- /package/dist/{contextValidator-3JNZKUTX.js.map → contextValidator-5OGXSPKS.js.map} +0 -0
|
@@ -232,6 +232,16 @@ const KeyboardNavigationTestTable: React.FC = () => {
|
|
|
232
232
|
|
|
233
233
|
describe('DataTable Keyboard Navigation', () => {
|
|
234
234
|
beforeEach(() => {
|
|
235
|
+
// Mock showModal for dialog elements (needed for test environments)
|
|
236
|
+
HTMLDialogElement.prototype.showModal = vi.fn(function(this: HTMLDialogElement) {
|
|
237
|
+
this.setAttribute('open', '');
|
|
238
|
+
this.dispatchEvent(new Event('show', { bubbles: true }));
|
|
239
|
+
});
|
|
240
|
+
HTMLDialogElement.prototype.close = vi.fn(function(this: HTMLDialogElement) {
|
|
241
|
+
this.removeAttribute('open');
|
|
242
|
+
this.dispatchEvent(new Event('close', { bubbles: true }));
|
|
243
|
+
});
|
|
244
|
+
|
|
235
245
|
// Clear any existing live regions
|
|
236
246
|
const existingLiveRegions = document.querySelectorAll('[aria-live]');
|
|
237
247
|
existingLiveRegions.forEach(region => {
|
|
@@ -517,8 +527,11 @@ describe('DataTable Keyboard Navigation', () => {
|
|
|
517
527
|
const importButton = await screen.findByRole('button', { name: /import/i });
|
|
518
528
|
await user.click(importButton);
|
|
519
529
|
|
|
520
|
-
// Confirm the modal is open
|
|
521
|
-
await
|
|
530
|
+
// Confirm the modal is open - wait for dialog to be accessible
|
|
531
|
+
await waitFor(() => {
|
|
532
|
+
const dialog = screen.queryByRole('dialog') || document.querySelector('dialog[role="dialog"]');
|
|
533
|
+
expect(dialog).toBeInTheDocument();
|
|
534
|
+
}, { timeout: 5000 });
|
|
522
535
|
|
|
523
536
|
// Close modal via Escape key
|
|
524
537
|
await user.keyboard('{Escape}');
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* - Customizable text content
|
|
37
37
|
*/
|
|
38
38
|
import React, { useState, useRef, useEffect } from 'react';
|
|
39
|
-
import { Dialog, DialogContent,
|
|
39
|
+
import { Dialog, DialogContent, DialogHeader } from '../../Dialog';
|
|
40
40
|
import { Button } from '../../Button/Button';
|
|
41
41
|
import { Input } from '../../Input/Input';
|
|
42
42
|
import { Progress } from '../../Progress';
|
|
@@ -372,12 +372,10 @@ export function ImportModal({ isOpen, onClose, onImport, config = {} }: ImportMo
|
|
|
372
372
|
|
|
373
373
|
return (
|
|
374
374
|
<Dialog open={isOpen} onOpenChange={handleClose}>
|
|
375
|
-
<DialogContent className="sm:max-w-2xl bg-main-50">
|
|
375
|
+
<DialogContent className="sm:max-w-2xl bg-main-50" title={title} description={description}>
|
|
376
376
|
<DialogHeader>
|
|
377
|
-
<
|
|
378
|
-
<
|
|
379
|
-
{description}
|
|
380
|
-
</DialogDescription>
|
|
377
|
+
<h2>{title}</h2>
|
|
378
|
+
<p>{description}</p>
|
|
381
379
|
</DialogHeader>
|
|
382
380
|
|
|
383
381
|
<div className="space-y-4">
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import { Dialog, DialogContent, DialogHeader
|
|
9
|
+
import { Dialog, DialogContent, DialogHeader } from '../../Dialog/Dialog';
|
|
10
10
|
import { Button } from '../../Button/Button';
|
|
11
11
|
import { X } from 'lucide-react';
|
|
12
12
|
|
|
@@ -27,9 +27,9 @@ export function ViewRowModal<TData extends Record<string, any>>({
|
|
|
27
27
|
|
|
28
28
|
return (
|
|
29
29
|
<Dialog open={isOpen} onOpenChange={onClose}>
|
|
30
|
-
<DialogContent className="max-w-2xl max-h-[80vh] overflow-y-auto">
|
|
30
|
+
<DialogContent className="max-w-2xl max-h-[80vh] overflow-y-auto" title={title}>
|
|
31
31
|
<DialogHeader>
|
|
32
|
-
<
|
|
32
|
+
<h2 className="flex items-center justify-between">
|
|
33
33
|
{title}
|
|
34
34
|
<Button
|
|
35
35
|
variant="ghost"
|
|
@@ -39,7 +39,7 @@ export function ViewRowModal<TData extends Record<string, any>>({
|
|
|
39
39
|
>
|
|
40
40
|
<X className="size-4" />
|
|
41
41
|
</Button>
|
|
42
|
-
</
|
|
42
|
+
</h2>
|
|
43
43
|
</DialogHeader>
|
|
44
44
|
|
|
45
45
|
<div className="mt-4">
|