@jmruthers/pace-core 0.5.128 → 0.5.130
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-D5cBRca8.d.ts → DataTable-C7GaRZye.d.ts} +3 -1
- package/dist/{DataTable-3Z5HLOWF.js → DataTable-M6QYJZ3I.js} +2 -2
- package/dist/{chunk-27MGXDD6.js → chunk-BV3NAPZX.js} +33 -3
- package/dist/chunk-BV3NAPZX.js.map +1 -0
- package/dist/{chunk-ENE3AB75.js → chunk-HHASLVX7.js} +5 -5
- package/dist/chunk-HHASLVX7.js.map +1 -0
- package/dist/components.d.ts +2 -2
- package/dist/components.js +2 -2
- package/dist/hooks.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/{types-D4TVpDa1.d.ts → types-D5rqZQXk.d.ts} +42 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +1 -1
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +1 -1
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +1 -1
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.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/DataAccessRecord.md +1 -1
- package/docs/api/interfaces/DataRecord.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 +40 -13
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventAppRoleData.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +1 -1
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/GrantEventAppRoleParams.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/NavigationAccessRecord.md +1 -1
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.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/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/ProtectedRouteProps.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/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RoleManagementResult.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +1 -1
- package/docs/api/interfaces/RouteConfig.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.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/SwitchProps.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/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +3 -3
- package/docs/implementation-guides/data-tables.md +52 -14
- package/package.json +1 -1
- package/src/components/DataTable/DataTable.tsx +2 -0
- package/src/components/DataTable/components/DataTableCore.tsx +35 -3
- package/src/components/PaceAppLayout/PaceAppLayout.test.tsx +68 -11
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +7 -4
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.integration.test.tsx +25 -7
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.performance.test.tsx +85 -3
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.security.test.tsx +83 -14
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.unit.test.tsx +77 -6
- package/dist/chunk-27MGXDD6.js.map +0 -1
- package/dist/chunk-ENE3AB75.js.map +0 -1
- /package/dist/{DataTable-3Z5HLOWF.js.map → DataTable-M6QYJZ3I.js.map} +0 -0
package/dist/components.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { a as UnifiedAuthContextType, c as UnifiedAuthProvider, b as UnifiedAuthProviderProps, u as useUnifiedAuth } from './UnifiedAuthProvider-BVKmQd9u.js';
|
|
2
2
|
export { A as Alert, m as AlertDescription, l as AlertTitle, n as Avatar, p as AvatarFallback, o as AvatarImage, B as Button, a as ButtonProps, C as Card, g as CardActions, i as CardActionsProps, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, q as Checkbox, b3 as DefaultPublicErrorFallback, D as Dialog, K as DialogBody, G as DialogClose, H as DialogContent, U as DialogContentProps, O as DialogDescription, Z as DialogDescriptionProps, M as DialogFooter, X as DialogFooterProps, J as DialogHeader, W as DialogHeaderProps, E as DialogOverlay, V as DialogOverlayProps, z as DialogPortal, Q as DialogProps, _ as DialogSize, N as DialogTitle, Y as DialogTitleProps, F as DialogTrigger, R as DialogTriggerProps, aB as ErrorBoundary, aC as ErrorBoundaryProps, aD as ErrorBoundaryState, aG as EventSelector, aK as FileDisplay, aL as FileDisplayProps, aI as FileUpload, aJ as FileUploadProps, ar as Footer, as as FooterProps, am as Form, an as FormProps, aq as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aE as LoadingSpinner, ao as LoginForm, ap as LoginFormProps, ax as NavigationItem, av as NavigationMenu, aw as NavigationMenuProps, ay as OrganisationSelector, az as OrganisationSelectorProps, be as PaceAppLayout, bd as PaceAppLayoutProps, bg as PaceLoginPage, bf as PaceLoginPageProps, aH as PasswordResetForm, P as Progress, at as ProtectedRoute, au as ProtectedRouteProps, b1 as PublicErrorBoundary, ba as PublicErrorBoundaryProps, bb as PublicErrorBoundaryState, b6 as PublicLoadingSkeleton, b4 as PublicLoadingSpinner, b5 as PublicLoadingSpinnerFullPage, bc as PublicLoadingSpinnerProps, b0 as PublicPageContextChecker, a_ as PublicPageDebugger, a$ as PublicPageDiagnostic, aZ as PublicPageFooter, b9 as PublicPageFooterProps, aV as PublicPageHeader, b8 as PublicPageHeaderProps, aT as PublicPageLayout, b7 as PublicPageLayoutProps, aW as PublicPageProvider, $ as Select, a3 as SelectContent, a0 as SelectGroup, a5 as SelectItem, a4 as SelectLabel, a6 as SelectSeparator, a2 as SelectTrigger, a1 as SelectValue, aF as SessionRestorationLoader, S as Switch, r as SwitchProps, T as Table, t as TableBody, u as TableCaption, v as TableCell, w as TableFooter, x as TableHead, s as TableHeader, y as TableRow, a7 as Toast, a9 as ToastAction, af as ToastActionElement, ae as ToastClose, ad as ToastDescription, ag as ToastProps, aa as ToastProvider, ac as ToastTitle, ab as ToastViewport, a8 as Toaster, ah as Tooltip, aj as TooltipContent, ak as TooltipProvider, al as TooltipRoot, ai as TooltipTrigger, aS as UseFileReferenceForRecordReturn, aQ as UseFileReferenceOptions, aR as UseFileReferenceReturn, aA as UserMenu, b2 as useErrorBoundary, aM as useFileReference, aO as useFileReferenceById, aN as useFileReferenceForRecord, aP as useFilesByCategory, aY as useIsPublicPage, aU as usePublicPageContext, aX as usePublicPageProviderContext } from './PublicLoadingSpinner-CUAnTvcg.js';
|
|
3
3
|
export { u as useToast } from './useToast-C8gR5ir4.js';
|
|
4
|
-
export { D as DataTable, a as DataTableProps } from './DataTable-
|
|
5
|
-
export { A as AggregateConfig, D as DataRecord,
|
|
4
|
+
export { D as DataTable, a as DataTableProps } from './DataTable-C7GaRZye.js';
|
|
5
|
+
export { A as AggregateConfig, D as DataRecord, g as DataTableAction, a as DataTableColumn, h as DataTableToolbarButton, f as EmptyStateConfig, G as GetRowId } from './types-D5rqZQXk.js';
|
|
6
6
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
import React__default from 'react';
|
|
8
8
|
import { FieldValues, FieldPath, UseFormReturn } from 'react-hook-form';
|
package/dist/components.js
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
useFileReferenceForRecord,
|
|
51
51
|
useFilesByCategory,
|
|
52
52
|
usePublicPageContext as usePublicPageContext2
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-HHASLVX7.js";
|
|
54
54
|
import {
|
|
55
55
|
Alert,
|
|
56
56
|
AlertDescription,
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
TooltipProvider,
|
|
92
92
|
TooltipRoot,
|
|
93
93
|
TooltipTrigger
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-BV3NAPZX.js";
|
|
95
95
|
import "./chunk-BYXRHAIF.js";
|
|
96
96
|
import "./chunk-WP5I5GLN.js";
|
|
97
97
|
import "./chunk-3DBFLLLU.js";
|
package/dist/hooks.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { SortingState, ColumnFiltersState, ExpandedState } from '@tanstack/react
|
|
|
5
5
|
import * as react_hook_form from 'react-hook-form';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
export { u as useComponentPerformance } from './useComponentPerformance-DE9l5RkL.js';
|
|
8
|
-
import { D as DataRecord, P as PerformanceConfig, S as ServerSideConfig, C as ChunkingConfig, e as SearchIndexConfig, d as PaginationMode,
|
|
8
|
+
import { D as DataRecord, P as PerformanceConfig, S as ServerSideConfig, C as ChunkingConfig, e as SearchIndexConfig, d as PaginationMode, i as ServerSideParams, j as ServerSideResponse } from './types-D5rqZQXk.js';
|
|
9
9
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
10
10
|
import { b as FileCategory, F as FileReference } from './file-reference-C9isKNPn.js';
|
|
11
11
|
import './organisation-D6qRDtbF.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
10
10
|
export { ALL_PERMISSIONS, AccessLevel, AccessLevelGuard, AllPermissions, CACHE_PATTERNS, DataAccessRecord, EVENT_APP_PERMISSIONS, EnhancedNavigationMenu, EnhancedNavigationMenuProps, EventAppRole, EventAppRoleData, GLOBAL_PERMISSIONS, GlobalRole, GrantEventAppRoleParams, InvalidScopeError, LogLevel, MissingUserContextError, NavigationAccessRecord, NavigationContextType, NavigationGuard, NavigationGuardProps, NavigationProvider, NavigationProviderProps, ORGANISATION_PERMISSIONS, Operation, OrganisationContextRequiredError, OrganisationRole, PAGE_PERMISSIONS, PageAccessRecord, PagePermissionContextType, PagePermissionGuard, PagePermissionGuardProps, PagePermissionProvider, PagePermissionProviderProps, Permission, PermissionCheck, PermissionDeniedError, PermissionEnforcer, PermissionEnforcerProps, PermissionGuard, PermissionMap, RBACAuditManager, RBACCache, RBACConfig, RBACEngine, RBACError, RBACLogger, RBACNotInitializedError, RevokeEventAppRoleParams, RoleBasedRouter, RoleBasedRouterContextType, RoleBasedRouterProps, RoleManagementResult, RouteAccessRecord, RouteConfig, Scope, SecureDataContextType, SecureDataProvider, SecureDataProviderProps, SecureSupabaseClient, UUID, UseResolvedScopeOptions, UseResolvedScopeReturn, createAuditManager, createRBACConfig, createRBACEngine, createRBACExpressMiddleware, createRBACMiddleware, createSecureClient, emitAuditEvent, fromSupabaseClient, getAccessLevel, getGlobalAuditManager, getPermissionMap, getPermissionsForRole, getRBACConfig, getRBACLogger, getRoleContext, hasAllPermissions, hasAnyPermission, hasAnyPermissionCached, hasPermission, hasPermissionCached, isDebugMode, isDevelopmentMode, isPermitted, isPermittedCached, isValidPermission, rbacCache, resolveAppContext, setGlobalAuditManager, setupRBAC, useAccessLevel, useCachedPermissions, useCan, useHasAllPermissions, useHasAnyPermission, useMultiplePermissions, useNavigationPermissions, usePagePermissions, usePermissions, useRBAC, useResolvedScope, useRoleBasedRouter, useRoleManagement, useSecureData, withAccessLevelGuard, withPermissionGuard, withRoleGuard } from './rbac/index.js';
|
|
11
11
|
export { A as Alert, m as AlertDescription, l as AlertTitle, n as Avatar, p as AvatarFallback, o as AvatarImage, B as Button, a as ButtonProps, C as Card, g as CardActions, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, q as Checkbox, b3 as DefaultPublicErrorFallback, D as Dialog, K as DialogBody, G as DialogClose, H as DialogContent, O as DialogDescription, M as DialogFooter, J as DialogHeader, E as DialogOverlay, z as DialogPortal, N as DialogTitle, F as DialogTrigger, aB as ErrorBoundary, aG as EventSelector, aK as FileDisplay, aL as FileDisplayProps, aI as FileUpload, aJ as FileUploadProps, ar as Footer, as as FooterProps, am as Form, aq as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aE as LoadingSpinner, ao as LoginForm, ap as LoginFormProps, ax as NavigationItem, av as NavigationMenu, aw as NavigationMenuProps, ay as OrganisationSelector, be as PaceAppLayout, bd as PaceAppLayoutProps, bg as PaceLoginPage, bf as PaceLoginPageProps, aH as PasswordResetForm, P as Progress, at as ProtectedRoute, au as ProtectedRouteProps, b1 as PublicErrorBoundary, ba as PublicErrorBoundaryProps, bb as PublicErrorBoundaryState, b6 as PublicLoadingSkeleton, b4 as PublicLoadingSpinner, b5 as PublicLoadingSpinnerFullPage, bc as PublicLoadingSpinnerProps, b0 as PublicPageContextChecker, a_ as PublicPageDebugger, a$ as PublicPageDiagnostic, aZ as PublicPageFooter, b9 as PublicPageFooterProps, aV as PublicPageHeader, b8 as PublicPageHeaderProps, aT as PublicPageLayout, b7 as PublicPageLayoutProps, aW as PublicPageProvider, $ as Select, a3 as SelectContent, a0 as SelectGroup, a5 as SelectItem, a4 as SelectLabel, a6 as SelectSeparator, a2 as SelectTrigger, a1 as SelectValue, aF as SessionRestorationLoader, S as Switch, r as SwitchProps, T as Table, t as TableBody, u as TableCaption, v as TableCell, w as TableFooter, x as TableHead, s as TableHeader, y as TableRow, a7 as Toast, a9 as ToastAction, af as ToastActionElement, ae as ToastClose, ad as ToastDescription, ag as ToastProps, aa as ToastProvider, ac as ToastTitle, ab as ToastViewport, a8 as Toaster, ah as Tooltip, aj as TooltipContent, ak as TooltipProvider, al as TooltipRoot, ai as TooltipTrigger, aS as UseFileReferenceForRecordReturn, aQ as UseFileReferenceOptions, aR as UseFileReferenceReturn, aA as UserMenu, bh as UserMenuProps, b2 as useErrorBoundary, aM as useFileReference, aO as useFileReferenceById, aN as useFileReferenceForRecord, aP as useFilesByCategory, aY as useIsPublicPage, aU as usePublicPageContext, aX as usePublicPageProviderContext } from './PublicLoadingSpinner-CUAnTvcg.js';
|
|
12
12
|
export { u as useToast } from './useToast-C8gR5ir4.js';
|
|
13
|
-
export { D as DataTable, a as DataTableProps } from './DataTable-
|
|
14
|
-
import { D as DataRecord,
|
|
15
|
-
export { A as AggregateConfig, a as DataTableColumn,
|
|
13
|
+
export { D as DataTable, a as DataTableProps } from './DataTable-C7GaRZye.js';
|
|
14
|
+
import { D as DataRecord, g as DataTableAction } from './types-D5rqZQXk.js';
|
|
15
|
+
export { A as AggregateConfig, a as DataTableColumn, h as DataTableToolbarButton, f as EmptyStateConfig, G as GetRowId } from './types-D5rqZQXk.js';
|
|
16
16
|
import { ColumnDef } from '@tanstack/react-table';
|
|
17
17
|
export { p as UsePublicEventOptions, o as UsePublicEventReturn, r as UsePublicFileDisplayOptions, q as UsePublicFileDisplayReturn, s as UsePublicRouteParamsReturn, f as clearPublicEventCache, i as clearPublicFileDisplayCache, n as extractEventCodeFromPath, m as generatePublicRoutePath, g as getPublicEventCacheStats, j as getPublicFileDisplayCacheStats, c as useAppConfig, u as useEventTheme, a as useOrganisationPermissions, b as useOrganisationSecurity, e as usePublicEvent, l as usePublicEventCode, h as usePublicFileDisplay, k as usePublicRouteParams } from './usePublicRouteParams-Dyt1tzI9.js';
|
|
18
18
|
export { b as FileCategory, a as FileMetadata, F as FileReference, c as FileUploadOptions } from './file-reference-C9isKNPn.js';
|
package/dist/index.js
CHANGED
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
useFileReferenceForRecord,
|
|
90
90
|
useFilesByCategory,
|
|
91
91
|
usePublicPageContext as usePublicPageContext2
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-HHASLVX7.js";
|
|
93
93
|
import {
|
|
94
94
|
Alert,
|
|
95
95
|
AlertDescription,
|
|
@@ -131,7 +131,7 @@ import {
|
|
|
131
131
|
TooltipProvider,
|
|
132
132
|
TooltipRoot,
|
|
133
133
|
TooltipTrigger
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-BV3NAPZX.js";
|
|
135
135
|
import {
|
|
136
136
|
useAccessLevel,
|
|
137
137
|
useCachedPermissions,
|
|
@@ -404,5 +404,46 @@ interface DataTableRBACConfig {
|
|
|
404
404
|
/** Page ID for page-based permissions - used directly if provided */
|
|
405
405
|
pageId?: string;
|
|
406
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* Options provided to the onExport handler for custom export functionality
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* ```tsx
|
|
412
|
+
* <DataTable
|
|
413
|
+
* onExport={async (options) => {
|
|
414
|
+
* // Export only specific columns
|
|
415
|
+
* const customColumns = options.allColumns.filter(col =>
|
|
416
|
+
* ['name', 'email', 'role'].includes(col.accessorKey || '')
|
|
417
|
+
* );
|
|
418
|
+
* await exportToCSVWithTableRows(
|
|
419
|
+
* options.tableRows,
|
|
420
|
+
* customColumns,
|
|
421
|
+
* options.columnIdToTableColumn,
|
|
422
|
+
* 'custom-export.csv'
|
|
423
|
+
* );
|
|
424
|
+
* }}
|
|
425
|
+
* />
|
|
426
|
+
* ```
|
|
427
|
+
*/
|
|
428
|
+
interface ExportOptions<TData extends DataRecord> {
|
|
429
|
+
/** Filtered table rows with getValue() method for proper accessorFn evaluation */
|
|
430
|
+
tableRows: Array<{
|
|
431
|
+
original: TData;
|
|
432
|
+
getValue: (columnId: string) => any;
|
|
433
|
+
id: string;
|
|
434
|
+
}>;
|
|
435
|
+
/** All column definitions passed to the DataTable */
|
|
436
|
+
allColumns: DataTableColumn<TData>[];
|
|
437
|
+
/** Currently visible columns in the table */
|
|
438
|
+
visibleColumns: DataTableColumn<TData>[];
|
|
439
|
+
/** Mapping of column IDs to TanStack table column instances (for getValue() calls) */
|
|
440
|
+
columnIdToTableColumn: Map<string, any>;
|
|
441
|
+
/** Raw data array (unfiltered) */
|
|
442
|
+
data: TData[];
|
|
443
|
+
/** Default filename generated from table title */
|
|
444
|
+
filename: string;
|
|
445
|
+
/** TanStack table instance for advanced operations */
|
|
446
|
+
table: any;
|
|
447
|
+
}
|
|
407
448
|
|
|
408
|
-
export type { AggregateConfig as A, ChunkingConfig as C, DataRecord as D,
|
|
449
|
+
export type { AggregateConfig as A, ChunkingConfig as C, DataRecord as D, ExportOptions as E, GetRowId as G, HierarchicalConfig as H, PerformanceConfig as P, ServerSideConfig as S, DataTableColumn as a, DataTableRBACConfig as b, DataTableFeatureConfig as c, PaginationMode as d, SearchIndexConfig as e, EmptyStateConfig as f, DataTableAction as g, DataTableToolbarButton as h, ServerSideParams as i, ServerSideResponse as j };
|
package/dist/utils.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export { A as AppConfig, S as SecureDataAccess, a as cn, j as formatCompactNumbe
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export { u as useComponentPerformance } from './useComponentPerformance-DE9l5RkL.js';
|
|
4
4
|
import * as date_fns from 'date-fns';
|
|
5
|
-
import { D as DataTable } from './DataTable-
|
|
6
|
-
import './types-
|
|
5
|
+
import { D as DataTable } from './DataTable-C7GaRZye.js';
|
|
6
|
+
import './types-D5rqZQXk.js';
|
|
7
7
|
import React__default, { ComponentType } from 'react';
|
|
8
8
|
import { SupabaseClient } from '@supabase/supabase-js';
|
|
9
9
|
import 'clsx';
|
package/dist/utils.js
CHANGED
|
@@ -596,7 +596,7 @@ function createLazyComponent(importFn, componentName, options = {}) {
|
|
|
596
596
|
return WrappedComponent;
|
|
597
597
|
}
|
|
598
598
|
var LazyDataTable = createLazyComponent(
|
|
599
|
-
() => import("./DataTable-
|
|
599
|
+
() => import("./DataTable-M6QYJZ3I.js").then((module) => ({ default: module.DataTable })),
|
|
600
600
|
"DataTable"
|
|
601
601
|
);
|
|
602
602
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.130](../README.md) / [Exports](../modules.md) / DataTableProps
|
|
2
2
|
|
|
3
3
|
# Interface: DataTableProps\<TData\>
|
|
4
4
|
|
|
@@ -39,6 +39,7 @@ Enhanced DataTable props with performance features
|
|
|
39
39
|
- [onDeleteRow](DataTableProps.md#ondeleterow)
|
|
40
40
|
- [onCreateRow](DataTableProps.md#oncreaterow)
|
|
41
41
|
- [onImport](DataTableProps.md#onimport)
|
|
42
|
+
- [onExport](DataTableProps.md#onexport)
|
|
42
43
|
- [onRowSelectionChange](DataTableProps.md#onrowselectionchange)
|
|
43
44
|
- [selection](DataTableProps.md#selection)
|
|
44
45
|
- [onDeleteSelected](DataTableProps.md#ondeleteselected)
|
|
@@ -411,6 +412,32 @@ Callback when data is imported
|
|
|
411
412
|
|
|
412
413
|
___
|
|
413
414
|
|
|
415
|
+
### onExport
|
|
416
|
+
|
|
417
|
+
• `Optional` **onExport**: (`options`: `ExportOptions`\<`TData`\>) => `void` \| `Promise`\<`void`\>
|
|
418
|
+
|
|
419
|
+
Callback for custom export functionality
|
|
420
|
+
|
|
421
|
+
#### Type declaration
|
|
422
|
+
|
|
423
|
+
▸ (`options`): `void` \| `Promise`\<`void`\>
|
|
424
|
+
|
|
425
|
+
##### Parameters
|
|
426
|
+
|
|
427
|
+
| Name | Type |
|
|
428
|
+
| :------ | :------ |
|
|
429
|
+
| `options` | `ExportOptions`\<`TData`\> |
|
|
430
|
+
|
|
431
|
+
##### Returns
|
|
432
|
+
|
|
433
|
+
`void` \| `Promise`\<`void`\>
|
|
434
|
+
|
|
435
|
+
#### Defined in
|
|
436
|
+
|
|
437
|
+
[packages/core/src/components/DataTable/DataTable.tsx:410](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L410)
|
|
438
|
+
|
|
439
|
+
___
|
|
440
|
+
|
|
414
441
|
### onRowSelectionChange
|
|
415
442
|
|
|
416
443
|
• `Optional` **onRowSelectionChange**: (`selection`: `Record`\<`string`, `boolean`\>) => `void`
|
|
@@ -433,7 +460,7 @@ Callback when row selection changes
|
|
|
433
460
|
|
|
434
461
|
#### Defined in
|
|
435
462
|
|
|
436
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
463
|
+
[packages/core/src/components/DataTable/DataTable.tsx:412](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L412)
|
|
437
464
|
|
|
438
465
|
___
|
|
439
466
|
|
|
@@ -445,7 +472,7 @@ Controlled selection state
|
|
|
445
472
|
|
|
446
473
|
#### Defined in
|
|
447
474
|
|
|
448
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
475
|
+
[packages/core/src/components/DataTable/DataTable.tsx:414](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L414)
|
|
449
476
|
|
|
450
477
|
___
|
|
451
478
|
|
|
@@ -471,7 +498,7 @@ Callback when bulk delete selected rows is triggered
|
|
|
471
498
|
|
|
472
499
|
#### Defined in
|
|
473
500
|
|
|
474
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
501
|
+
[packages/core/src/components/DataTable/DataTable.tsx:416](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L416)
|
|
475
502
|
|
|
476
503
|
___
|
|
477
504
|
|
|
@@ -483,7 +510,7 @@ Function to generate unique row IDs
|
|
|
483
510
|
|
|
484
511
|
#### Defined in
|
|
485
512
|
|
|
486
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
513
|
+
[packages/core/src/components/DataTable/DataTable.tsx:423](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L423)
|
|
487
514
|
|
|
488
515
|
___
|
|
489
516
|
|
|
@@ -495,7 +522,7 @@ Whether the table is in a loading state
|
|
|
495
522
|
|
|
496
523
|
#### Defined in
|
|
497
524
|
|
|
498
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
525
|
+
[packages/core/src/components/DataTable/DataTable.tsx:425](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L425)
|
|
499
526
|
|
|
500
527
|
___
|
|
501
528
|
|
|
@@ -507,7 +534,7 @@ Custom component to display when table is empty
|
|
|
507
534
|
|
|
508
535
|
#### Defined in
|
|
509
536
|
|
|
510
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
537
|
+
[packages/core/src/components/DataTable/DataTable.tsx:427](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L427)
|
|
511
538
|
|
|
512
539
|
___
|
|
513
540
|
|
|
@@ -519,7 +546,7 @@ Array of aggregation functions for grouped data
|
|
|
519
546
|
|
|
520
547
|
#### Defined in
|
|
521
548
|
|
|
522
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
549
|
+
[packages/core/src/components/DataTable/DataTable.tsx:429](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L429)
|
|
523
550
|
|
|
524
551
|
___
|
|
525
552
|
|
|
@@ -531,7 +558,7 @@ Import modal configuration
|
|
|
531
558
|
|
|
532
559
|
#### Defined in
|
|
533
560
|
|
|
534
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
561
|
+
[packages/core/src/components/DataTable/DataTable.tsx:432](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L432)
|
|
535
562
|
|
|
536
563
|
___
|
|
537
564
|
|
|
@@ -543,7 +570,7 @@ Custom row actions - use this for custom action buttons
|
|
|
543
570
|
|
|
544
571
|
#### Defined in
|
|
545
572
|
|
|
546
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
573
|
+
[packages/core/src/components/DataTable/DataTable.tsx:435](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L435)
|
|
547
574
|
|
|
548
575
|
___
|
|
549
576
|
|
|
@@ -555,7 +582,7 @@ Column order configuration - array of column IDs in desired order
|
|
|
555
582
|
|
|
556
583
|
#### Defined in
|
|
557
584
|
|
|
558
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
585
|
+
[packages/core/src/components/DataTable/DataTable.tsx:438](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L438)
|
|
559
586
|
|
|
560
587
|
___
|
|
561
588
|
|
|
@@ -567,7 +594,7 @@ Unique storage key for persisting table layout state across sessions
|
|
|
567
594
|
|
|
568
595
|
#### Defined in
|
|
569
596
|
|
|
570
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
597
|
+
[packages/core/src/components/DataTable/DataTable.tsx:445](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L445)
|
|
571
598
|
|
|
572
599
|
___
|
|
573
600
|
|
|
@@ -595,4 +622,4 @@ Callback when table layout changes (column order, visibility, etc.)
|
|
|
595
622
|
|
|
596
623
|
#### Defined in
|
|
597
624
|
|
|
598
|
-
[packages/core/src/components/DataTable/DataTable.tsx:
|
|
625
|
+
[packages/core/src/components/DataTable/DataTable.tsx:447](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/DataTable.tsx#L447)
|