@jmruthers/pace-core 0.5.94 → 0.5.95
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-CHX2EFO3.js → DataTable-XENXNMCP.js} +2 -2
- package/dist/{PublicLoadingSpinner-BWUD6bLU.d.ts → PublicLoadingSpinner-B84QWsvB.d.ts} +8 -1
- package/dist/{chunk-PRM6EYO3.js → chunk-EPKHU5SS.js} +17 -8
- package/dist/{chunk-PRM6EYO3.js.map → chunk-EPKHU5SS.js.map} +1 -1
- package/dist/{chunk-O6GASC4Q.js → chunk-V5CTX4FR.js} +267 -182
- package/dist/chunk-V5CTX4FR.js.map +1 -0
- package/dist/components.d.ts +1 -1
- package/dist/components.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +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 +1 -1
- 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/EventLogoProps.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +37 -11
- 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/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/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.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/UseEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UseEventLogoReturn.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/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/package.json +1 -1
- package/src/components/DataTable/components/DataTableCore.tsx +27 -9
- package/src/components/FileDisplay/FileDisplay.tsx +189 -147
- package/src/hooks/useFileUrl.ts +130 -0
- package/dist/chunk-O6GASC4Q.js.map +0 -1
- /package/dist/{DataTable-CHX2EFO3.js.map → DataTable-XENXNMCP.js.map} +0 -0
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
sortHierarchicalDataWithSorting,
|
|
54
54
|
validateHierarchicalData,
|
|
55
55
|
validatePaginationConfig
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-EPKHU5SS.js";
|
|
57
57
|
import "./chunk-2KLAOD4M.js";
|
|
58
58
|
import "./chunk-S63MFSY6.js";
|
|
59
59
|
import "./chunk-Q7APDV6H.js";
|
|
@@ -155,4 +155,4 @@ export {
|
|
|
155
155
|
validateHierarchicalData,
|
|
156
156
|
validatePaginationConfig
|
|
157
157
|
};
|
|
158
|
-
//# sourceMappingURL=DataTable-
|
|
158
|
+
//# sourceMappingURL=DataTable-XENXNMCP.js.map
|
|
@@ -2962,6 +2962,13 @@ interface FileDisplayProps {
|
|
|
2962
2962
|
showDelete?: boolean;
|
|
2963
2963
|
className?: string;
|
|
2964
2964
|
children?: React__default.ReactNode;
|
|
2965
|
+
/** Custom loading component to render during data fetching */
|
|
2966
|
+
loadingComponent?: React__default.ComponentType;
|
|
2967
|
+
/** Custom error component to render when an error occurs */
|
|
2968
|
+
errorComponent?: React__default.ComponentType<{
|
|
2969
|
+
error: Error | string | null;
|
|
2970
|
+
retry?: () => void;
|
|
2971
|
+
}>;
|
|
2965
2972
|
}
|
|
2966
2973
|
/**
|
|
2967
2974
|
* Component for displaying file references with context-awareness
|
|
@@ -2979,7 +2986,7 @@ interface FileDisplayProps {
|
|
|
2979
2986
|
* @param props.category - Optional category filter. When specified, only displays files matching this category and uses single file display variant.
|
|
2980
2987
|
* @returns React element with file display
|
|
2981
2988
|
*/
|
|
2982
|
-
declare function FileDisplay({ supabase, table_name, record_id, organisation_id, category, displayOnly, showUpload, showDelete, className, children }: FileDisplayProps): react_jsx_runtime.JSX.Element;
|
|
2989
|
+
declare function FileDisplay({ supabase, table_name, record_id, organisation_id, category, displayOnly, showUpload, showDelete, className, children, loadingComponent, errorComponent }: FileDisplayProps): react_jsx_runtime.JSX.Element;
|
|
2983
2990
|
|
|
2984
2991
|
declare function useFileReference(supabase: SupabaseClient): {
|
|
2985
2992
|
isLoading: boolean;
|
|
@@ -11672,13 +11672,22 @@ function DataTableInternal({
|
|
|
11672
11672
|
onExport: secureHandlers.onExport || (async () => {
|
|
11673
11673
|
try {
|
|
11674
11674
|
const currentData = table.getFilteredRowModel().rows.map((row) => row.original);
|
|
11675
|
-
const
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11675
|
+
const tableColumns = table.getAllColumns();
|
|
11676
|
+
const visibleTableColumns = tableColumns.filter((col) => {
|
|
11677
|
+
const isSystemColumn = col.id === "select" || col.id === "actions";
|
|
11678
|
+
return !isSystemColumn && col.getIsVisible();
|
|
11679
|
+
});
|
|
11680
|
+
const visibleColumns2 = visibleTableColumns.map((tableCol) => {
|
|
11681
|
+
const originalCol = columns.find((col) => {
|
|
11682
|
+
const colId = col.id || col.accessorKey;
|
|
11683
|
+
return colId && String(colId) === tableCol.id;
|
|
11684
|
+
});
|
|
11685
|
+
if (!originalCol) return null;
|
|
11686
|
+
return {
|
|
11687
|
+
...originalCol,
|
|
11688
|
+
header: typeof originalCol.header === "string" ? originalCol.header : originalCol.accessorKey || tableCol.id || "Column"
|
|
11689
|
+
};
|
|
11690
|
+
}).filter((col) => col !== null);
|
|
11682
11691
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
11683
11692
|
const filename = title ? `${title.replace(/[^a-z0-9]/gi, "_").toLowerCase()}_${timestamp}.csv` : `data_export_${timestamp}.csv`;
|
|
11684
11693
|
await exportToCSV(currentData, visibleColumns2, filename);
|
|
@@ -12119,4 +12128,4 @@ lodash/lodash.js:
|
|
|
12119
12128
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
12120
12129
|
*)
|
|
12121
12130
|
*/
|
|
12122
|
-
//# sourceMappingURL=chunk-
|
|
12131
|
+
//# sourceMappingURL=chunk-EPKHU5SS.js.map
|