@jmruthers/pace-core 0.2.5 → 0.2.7
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-BHlzyKZP.d.ts → DataTable-C1AEm9Cx.d.ts} +1 -1
- package/dist/{DataTable-GEY5U7OI.js → DataTable-EEUDXPE5.js} +2 -8
- package/dist/{api-T6CBS7IO.js → api-ETQ6YJ3C.js} +2 -3
- package/dist/{chunk-DY5E3AT7.js → chunk-BEZRLNK3.js} +13 -3
- package/dist/chunk-BEZRLNK3.js.map +1 -0
- package/dist/{chunk-ANE4PDC2.js → chunk-C5G2A4PO.js} +159 -6
- package/dist/chunk-C5G2A4PO.js.map +1 -0
- package/dist/{chunk-WYB6MBZA.js → chunk-EWKPTNPO.js} +579 -973
- package/dist/chunk-EWKPTNPO.js.map +1 -0
- package/dist/{chunk-TMRLB2LA.js → chunk-HEMJ4SUJ.js} +2 -2
- package/dist/{chunk-O4T53L7X.js → chunk-HNDFPXUU.js} +5 -5
- package/dist/{chunk-UY7AM4QG.js → chunk-RRUYHORU.js} +161 -74
- package/dist/chunk-RRUYHORU.js.map +1 -0
- package/dist/{chunk-PFRRIDYA.js → chunk-TIVL4UQ7.js} +2 -2
- package/dist/{chunk-2MKP6IYD.js → chunk-VYG4AXYW.js} +2 -2
- package/dist/components.d.ts +2 -2
- package/dist/components.js +15 -16
- package/dist/components.js.map +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +16 -17
- package/dist/index.js.map +1 -1
- package/dist/providers.js +2 -2
- package/dist/rbac/index.js +25 -20
- package/dist/rbac/index.js.map +1 -1
- package/dist/styles/core.css +83 -62
- package/dist/{types-CInEi-ng.d.ts → types-DiRQsGJs.d.ts} +0 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- 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 +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +33 -33
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- 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 +1 -1
- 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 +10 -10
- package/docs/architecture/README.md +1 -1
- package/package.json +1 -1
- package/src/__tests__/shared/testUtils.optimized.tsx +65 -7
- package/src/components/DataTable/DataTable.tsx +1 -3
- package/src/components/DataTable/__tests__/DataTable.errorHandling.test.tsx +0 -8
- package/src/components/DataTable/__tests__/DataTable.hierarchical.test.tsx +17 -12
- package/src/components/DataTable/__tests__/DataTable.infinite-loop.test.tsx +0 -1
- package/src/components/DataTable/__tests__/DataTable.integration.test.tsx +4 -12
- package/src/components/DataTable/__tests__/DataTable.performance.test.tsx +0 -8
- package/src/components/DataTable/__tests__/DataTable.permissions.test.tsx +21 -11
- package/src/components/DataTable/__tests__/DataTable.sorting.test.tsx +321 -0
- package/src/components/DataTable/__tests__/DataTable.userWorkflows.test.tsx +21 -11
- package/src/components/DataTable/__tests__/DataTable.workflowValidation.test.tsx +94 -0
- package/src/components/DataTable/__tests__/DataTable.workflows.test.tsx +25 -15
- package/src/components/DataTable/__tests__/README.md +11 -2
- package/src/components/DataTable/__tests__/performance-regression.test.tsx +0 -11
- package/src/components/DataTable/__tests__/test-utils/sharedTestUtils.tsx +0 -1
- package/src/components/DataTable/components/ColumnVisibilityDropdown.tsx +2 -2
- package/src/components/DataTable/components/DataTableBody.tsx +34 -35
- package/src/components/DataTable/components/DataTableCore.tsx +205 -133
- package/src/components/DataTable/components/DataTableToolbar.tsx +9 -10
- package/src/components/DataTable/components/DraggableColumnHeader.tsx +3 -7
- package/src/components/DataTable/components/EditableRow.tsx +6 -7
- package/src/components/DataTable/components/FilterRow.tsx +0 -1
- package/src/components/DataTable/components/GroupingDropdown.tsx +2 -2
- package/src/components/DataTable/components/UnifiedTableBody.tsx +83 -281
- package/src/components/DataTable/components/VirtualizedDataTable.tsx +9 -89
- package/src/components/DataTable/components/__tests__/DataTable.accessibility.test.tsx +111 -5
- package/src/components/DataTable/components/__tests__/DataTable.integration.test.tsx +82 -13
- package/src/components/DataTable/components/__tests__/DataTable.performance.test.tsx +0 -1
- package/src/components/DataTable/components/__tests__/DataTable.real.test.tsx +2 -2
- package/src/components/DataTable/components/__tests__/DataTable.security.test.tsx +0 -1
- package/src/components/DataTable/components/__tests__/DataTable.unit.test.tsx +2 -2
- package/src/components/DataTable/components/__tests__/FilteringToggle.unit.test.tsx +3 -0
- package/src/components/DataTable/components/index.ts +0 -1
- package/src/components/DataTable/core/DataTableContext.tsx +0 -1
- package/src/components/DataTable/index.ts +0 -2
- package/src/components/DataTable/types.ts +0 -2
- package/src/components/Input/Input.tsx +2 -2
- package/src/components/Input/__tests__/Input.unit.test.tsx +4 -4
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.integration.test.tsx +6 -2
- package/src/components/RBAC/PagePermissionGuard.tsx +13 -0
- package/src/components/RBAC/__tests__/PagePermissionGuard.unit.test.tsx +10 -1
- package/src/components/Select/Select.tsx +7 -1
- package/src/components/__tests__/EdgeCaseTesting.enhanced.test.tsx +2 -1
- package/src/hooks/__tests__/useRBAC.unit.test.ts +32 -24
- package/src/providers/RBACProvider.tsx +14 -2
- package/src/providers/__tests__/UnifiedAuthProvider.unit.test.tsx +11 -3
- package/src/rbac/__tests__/cache-invalidation.test.ts +2 -2
- package/src/rbac/__tests__/cache.test.ts +3 -3
- package/src/rbac/hooks.ts +15 -7
- package/src/styles/core.css +83 -62
- package/src/utils/__tests__/lazyLoad.unit.test.tsx +13 -18
- package/src/utils/storage/__tests__/helpers.unit.test.ts +9 -7
- package/dist/cache-I72HKDOA.js +0 -12
- package/dist/cache-I72HKDOA.js.map +0 -1
- package/dist/chunk-ANE4PDC2.js.map +0 -1
- package/dist/chunk-DY5E3AT7.js.map +0 -1
- package/dist/chunk-MRRFJ6SA.js +0 -161
- package/dist/chunk-MRRFJ6SA.js.map +0 -1
- package/dist/chunk-UY7AM4QG.js.map +0 -1
- package/dist/chunk-WYB6MBZA.js.map +0 -1
- package/src/components/DataTable/__tests__/DataTable.autoSizing.test.tsx +0 -526
- package/src/components/DataTable/components/DataTableHeader.tsx +0 -31
- package/src/components/DataTable/components/__tests__/DataTableHeader.unit.test.tsx +0 -143
- package/src/components/DataTable/examples/AutoSizingExample.tsx +0 -180
- package/src/components/DataTable/examples/ColumnSizingComparison.tsx +0 -235
- package/src/components/DataTable/utils/__tests__/columnSizing.test.ts +0 -237
- package/src/components/DataTable/utils/columnSizing.ts +0 -125
- /package/dist/{DataTable-GEY5U7OI.js.map → DataTable-EEUDXPE5.js.map} +0 -0
- /package/dist/{api-T6CBS7IO.js.map → api-ETQ6YJ3C.js.map} +0 -0
- /package/dist/{chunk-TMRLB2LA.js.map → chunk-HEMJ4SUJ.js.map} +0 -0
- /package/dist/{chunk-O4T53L7X.js.map → chunk-HNDFPXUU.js.map} +0 -0
- /package/dist/{chunk-PFRRIDYA.js.map → chunk-TIVL4UQ7.js.map} +0 -0
- /package/dist/{chunk-2MKP6IYD.js.map → chunk-VYG4AXYW.js.map} +0 -0
package/docs/api/modules.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.2.
|
|
1
|
+
[@jmruthers/pace-core - v0.2.7](README.md) / Exports
|
|
2
2
|
|
|
3
|
-
# @jmruthers/pace-core - v0.2.
|
|
3
|
+
# @jmruthers/pace-core - v0.2.7
|
|
4
4
|
|
|
5
5
|
**`File`**
|
|
6
6
|
|
|
@@ -718,7 +718,7 @@ Features are configured through the unified `features` prop for maximum flexibil
|
|
|
718
718
|
|
|
719
719
|
#### Defined in
|
|
720
720
|
|
|
721
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
721
|
+
[packages/core/src/components/DataTable/DataTable.tsx:412](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L412)
|
|
722
722
|
|
|
723
723
|
___
|
|
724
724
|
|
|
@@ -2418,7 +2418,7 @@ ___
|
|
|
2418
2418
|
|
|
2419
2419
|
#### Defined in
|
|
2420
2420
|
|
|
2421
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2421
|
+
[packages/core/src/components/Select/Select.tsx:275](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L275)
|
|
2422
2422
|
|
|
2423
2423
|
___
|
|
2424
2424
|
|
|
@@ -2438,7 +2438,7 @@ ___
|
|
|
2438
2438
|
|
|
2439
2439
|
#### Defined in
|
|
2440
2440
|
|
|
2441
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2441
|
+
[packages/core/src/components/Select/Select.tsx:398](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L398)
|
|
2442
2442
|
|
|
2443
2443
|
___
|
|
2444
2444
|
|
|
@@ -2458,7 +2458,7 @@ ___
|
|
|
2458
2458
|
|
|
2459
2459
|
#### Defined in
|
|
2460
2460
|
|
|
2461
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2461
|
+
[packages/core/src/components/Select/Select.tsx:415](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L415)
|
|
2462
2462
|
|
|
2463
2463
|
___
|
|
2464
2464
|
|
|
@@ -2478,7 +2478,7 @@ ___
|
|
|
2478
2478
|
|
|
2479
2479
|
#### Defined in
|
|
2480
2480
|
|
|
2481
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2481
|
+
[packages/core/src/components/Select/Select.tsx:542](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L542)
|
|
2482
2482
|
|
|
2483
2483
|
___
|
|
2484
2484
|
|
|
@@ -2498,7 +2498,7 @@ ___
|
|
|
2498
2498
|
|
|
2499
2499
|
#### Defined in
|
|
2500
2500
|
|
|
2501
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2501
|
+
[packages/core/src/components/Select/Select.tsx:627](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L627)
|
|
2502
2502
|
|
|
2503
2503
|
___
|
|
2504
2504
|
|
|
@@ -2518,7 +2518,7 @@ ___
|
|
|
2518
2518
|
|
|
2519
2519
|
#### Defined in
|
|
2520
2520
|
|
|
2521
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2521
|
+
[packages/core/src/components/Select/Select.tsx:638](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L638)
|
|
2522
2522
|
|
|
2523
2523
|
___
|
|
2524
2524
|
|
|
@@ -2538,7 +2538,7 @@ ___
|
|
|
2538
2538
|
|
|
2539
2539
|
#### Defined in
|
|
2540
2540
|
|
|
2541
|
-
[packages/core/src/components/Select/Select.tsx:
|
|
2541
|
+
[packages/core/src/components/Select/Select.tsx:649](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/Select/Select.tsx#L649)
|
|
2542
2542
|
|
|
2543
2543
|
___
|
|
2544
2544
|
|
|
@@ -119,7 +119,7 @@ ComponentName/
|
|
|
119
119
|
|
|
120
120
|
### Component Design Patterns
|
|
121
121
|
|
|
122
|
-
1. **Compound Components**: Components that work together (e.g., DataTable +
|
|
122
|
+
1. **Compound Components**: Components that work together (e.g., DataTable + DataTableToolbar + DataTableBody)
|
|
123
123
|
2. **Render Props**: Flexible rendering patterns for complex components
|
|
124
124
|
3. **Controlled/Uncontrolled**: Support for both controlled and uncontrolled usage
|
|
125
125
|
4. **Composition**: Components that can be composed together
|
package/package.json
CHANGED
|
@@ -137,8 +137,35 @@ function getSharedSupabaseClient(): SupabaseClient {
|
|
|
137
137
|
error: null
|
|
138
138
|
});
|
|
139
139
|
|
|
140
|
-
vi.spyOn(sharedSupabaseClient.auth, '
|
|
141
|
-
data: {
|
|
140
|
+
vi.spyOn(sharedSupabaseClient.auth, 'signUp').mockResolvedValue({
|
|
141
|
+
data: { user: null, session: null },
|
|
142
|
+
error: null
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
vi.spyOn(sharedSupabaseClient.auth, 'signOut').mockResolvedValue({
|
|
146
|
+
error: null
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
vi.spyOn(sharedSupabaseClient.auth, 'resetPasswordForEmail').mockResolvedValue({
|
|
150
|
+
error: null
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
vi.spyOn(sharedSupabaseClient.auth, 'updateUser').mockResolvedValue({
|
|
154
|
+
data: { user: null },
|
|
155
|
+
error: null
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
vi.spyOn(sharedSupabaseClient.auth, 'refreshSession').mockResolvedValue({
|
|
159
|
+
data: { session: null },
|
|
160
|
+
error: null
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
vi.spyOn(sharedSupabaseClient.auth, 'onAuthStateChange').mockImplementation((callback) => {
|
|
164
|
+
// Store the callback for potential use in tests
|
|
165
|
+
(sharedSupabaseClient as any)._authCallback = callback;
|
|
166
|
+
return {
|
|
167
|
+
data: { subscription: { unsubscribe: vi.fn() } }
|
|
168
|
+
};
|
|
142
169
|
});
|
|
143
170
|
|
|
144
171
|
// Mock the from method
|
|
@@ -553,11 +580,42 @@ export async function measureMemoryUsage<T extends Record<string, any>>(
|
|
|
553
580
|
*/
|
|
554
581
|
export function resetSharedSupabaseMock() {
|
|
555
582
|
const client = getSharedSupabaseClient();
|
|
556
|
-
|
|
557
|
-
client.
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
583
|
+
// Only clear mocks if they exist
|
|
584
|
+
if (client.from && typeof client.from.mockClear === 'function') {
|
|
585
|
+
client.from.mockClear();
|
|
586
|
+
}
|
|
587
|
+
if (client.auth && client.auth.getUser && typeof client.auth.getUser.mockClear === 'function') {
|
|
588
|
+
client.auth.getUser.mockClear();
|
|
589
|
+
}
|
|
590
|
+
if (client.auth && client.auth.getSession && typeof client.auth.getSession.mockClear === 'function') {
|
|
591
|
+
client.auth.getSession.mockClear();
|
|
592
|
+
}
|
|
593
|
+
if (client.auth && client.auth.signInWithPassword && typeof client.auth.signInWithPassword.mockClear === 'function') {
|
|
594
|
+
client.auth.signInWithPassword.mockClear();
|
|
595
|
+
}
|
|
596
|
+
if (client.auth && client.auth.signUp && typeof client.auth.signUp.mockClear === 'function') {
|
|
597
|
+
client.auth.signUp.mockClear();
|
|
598
|
+
}
|
|
599
|
+
if (client.auth && client.auth.signOut && typeof client.auth.signOut.mockClear === 'function') {
|
|
600
|
+
client.auth.signOut.mockClear();
|
|
601
|
+
}
|
|
602
|
+
if (client.auth && client.auth.resetPasswordForEmail && typeof client.auth.resetPasswordForEmail.mockClear === 'function') {
|
|
603
|
+
client.auth.resetPasswordForEmail.mockClear();
|
|
604
|
+
}
|
|
605
|
+
if (client.auth && client.auth.updateUser && typeof client.auth.updateUser.mockClear === 'function') {
|
|
606
|
+
client.auth.updateUser.mockClear();
|
|
607
|
+
}
|
|
608
|
+
if (client.auth && client.auth.refreshSession && typeof client.auth.refreshSession.mockClear === 'function') {
|
|
609
|
+
client.auth.refreshSession.mockClear();
|
|
610
|
+
}
|
|
611
|
+
if (client.auth && client.auth.onAuthStateChange && typeof client.auth.onAuthStateChange.mockClear === 'function') {
|
|
612
|
+
client.auth.onAuthStateChange.mockClear();
|
|
613
|
+
}
|
|
614
|
+
if (client.rpc && typeof client.rpc.mockClear === 'function') {
|
|
615
|
+
client.rpc.mockClear();
|
|
616
|
+
}
|
|
617
|
+
// Clear any stored callbacks
|
|
618
|
+
delete (client as any)._authCallback;
|
|
561
619
|
}
|
|
562
620
|
|
|
563
621
|
// ============================================================================
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* ## Features
|
|
24
24
|
* - ✅ **Search** - Global search with column-specific filters
|
|
25
25
|
* - ✅ **Pagination** - Configurable pagination with custom initial page size and page size options
|
|
26
|
-
* - ✅ **Sorting** - Multi-column sorting with visual indicators
|
|
26
|
+
* - ✅ **Sorting** - Multi-column sorting with visual indicators (↕️ unsorted, ↑ ascending, ↓ descending)
|
|
27
27
|
* - ✅ **Filtering** - Column-specific filtering with multiple input types
|
|
28
28
|
* - ✅ **Export/Import** - CSV and JSON data export/import
|
|
29
29
|
* - ✅ **Row Selection** - Single and multi-row selection for bulk operations
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
* - ✅ **Grouping** - Data grouping with aggregation functions
|
|
35
35
|
* - ✅ **Column Visibility** - Show/hide columns dynamically
|
|
36
36
|
* - ✅ **Column Reordering** - Drag and drop column reordering
|
|
37
|
-
* - ✅ **Auto Column Sizing** - Automatic column width adjustment based on content
|
|
38
37
|
* - ✅ **Intelligent Virtual Scrolling** - Automatic performance optimization for large datasets
|
|
39
38
|
* - ✅ **Responsive Design** - Mobile-friendly responsive layout
|
|
40
39
|
* - ✅ **Accessibility** - WCAG 2.1 AA compliant with keyboard navigation
|
|
@@ -113,7 +112,6 @@
|
|
|
113
112
|
* grouping: true,
|
|
114
113
|
* columnVisibility: true,
|
|
115
114
|
* columnReordering: true,
|
|
116
|
-
* autoColumnSizing: true, // Enable automatic column width adjustment
|
|
117
115
|
* }}
|
|
118
116
|
* initialPageSize={25} // Set custom initial page size
|
|
119
117
|
* columnOrder={['select', 'name', 'email', 'role', 'status']} // Control column order
|
|
@@ -108,14 +108,6 @@ vi.mock('../core/DataTableContext', () => ({
|
|
|
108
108
|
}));
|
|
109
109
|
|
|
110
110
|
// Mock individual components
|
|
111
|
-
vi.mock('../components/DataTableHeader', () => ({
|
|
112
|
-
DataTableHeader: ({ title, description }: any) => (
|
|
113
|
-
<div data-testid="data-table-header">
|
|
114
|
-
{title && <h2 data-testid="table-title">{title}</h2>}
|
|
115
|
-
{description && <p data-testid="table-description">{description}</p>}
|
|
116
|
-
</div>
|
|
117
|
-
),
|
|
118
|
-
}));
|
|
119
111
|
|
|
120
112
|
vi.mock('../components/DataTableToolbar', () => ({
|
|
121
113
|
DataTableToolbar: () => <div data-testid="data-table-toolbar">Toolbar</div>,
|