@jmruthers/pace-core 0.5.80 → 0.5.81
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-OOZS7YTJ.js → DataTable-OBT663FS.js} +2 -2
- package/dist/{chunk-MJWN5JKI.js → chunk-3FV24IOD.js} +2 -2
- package/dist/{chunk-MVFZYTIZ.js → chunk-CACHCRZS.js} +26 -14
- package/dist/{chunk-MVFZYTIZ.js.map → chunk-CACHCRZS.js.map} +1 -1
- package/dist/components.js +2 -2
- 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 +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/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/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/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/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 +2 -2
- package/package.json +1 -1
- package/src/components/DataTable/__tests__/styles.test.ts +5 -5
- package/src/components/DataTable/components/DataTableCore.tsx +37 -17
- package/src/components/DataTable/components/UnifiedTableBody.tsx +12 -4
- package/src/components/DataTable/styles.ts +1 -1
- /package/dist/{DataTable-OOZS7YTJ.js.map → DataTable-OBT663FS.js.map} +0 -0
- /package/dist/{chunk-MJWN5JKI.js.map → chunk-3FV24IOD.js.map} +0 -0
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
sortHierarchicalDataWithSorting,
|
|
54
54
|
validateHierarchicalData,
|
|
55
55
|
validatePaginationConfig
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-CACHCRZS.js";
|
|
57
57
|
import "./chunk-YVUZWLQG.js";
|
|
58
58
|
import "./chunk-S63MFSY6.js";
|
|
59
59
|
import "./chunk-Q7APDV6H.js";
|
|
@@ -154,4 +154,4 @@ export {
|
|
|
154
154
|
validateHierarchicalData,
|
|
155
155
|
validatePaginationConfig
|
|
156
156
|
};
|
|
157
|
-
//# sourceMappingURL=DataTable-
|
|
157
|
+
//# sourceMappingURL=DataTable-OBT663FS.js.map
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
SelectSeparator,
|
|
23
23
|
SelectTrigger,
|
|
24
24
|
SelectValue
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-CACHCRZS.js";
|
|
26
26
|
import {
|
|
27
27
|
isPermitted,
|
|
28
28
|
isSuperAdmin
|
|
@@ -3883,4 +3883,4 @@ export {
|
|
|
3883
3883
|
PublicPageDiagnostic,
|
|
3884
3884
|
PublicPageContextChecker
|
|
3885
3885
|
};
|
|
3886
|
-
//# sourceMappingURL=chunk-
|
|
3886
|
+
//# sourceMappingURL=chunk-3FV24IOD.js.map
|
|
@@ -5600,7 +5600,7 @@ IconButton.displayName = "IconButton";
|
|
|
5600
5600
|
// src/components/DataTable/styles.ts
|
|
5601
5601
|
var tableStyles = {
|
|
5602
5602
|
// Main table container
|
|
5603
|
-
table: "w-full caption-
|
|
5603
|
+
table: "w-full caption-top text-sm",
|
|
5604
5604
|
tableFixed: "w-full table-fixed",
|
|
5605
5605
|
// Table sections
|
|
5606
5606
|
header: "[&_tr]:border-b",
|
|
@@ -7537,9 +7537,6 @@ var RowComponent = React8.memo(({
|
|
|
7537
7537
|
})
|
|
7538
7538
|
] });
|
|
7539
7539
|
}
|
|
7540
|
-
if (grouping.length > 0 && typeof row.getParentRow === "function" && row.getParentRow() && (!row.getIsGrouped || !row.getIsGrouped())) {
|
|
7541
|
-
return null;
|
|
7542
|
-
}
|
|
7543
7540
|
if (isEditing && editingData && onEditingDataChange && onSaveEditing && onCancelEditing) {
|
|
7544
7541
|
return /* @__PURE__ */ jsx14(
|
|
7545
7542
|
EditableRow,
|
|
@@ -11184,15 +11181,6 @@ function DataTableInternal({
|
|
|
11184
11181
|
}
|
|
11185
11182
|
return closestOption;
|
|
11186
11183
|
}, [initialPageSize, finalPageSizeOptions, secureFeatures.pagination]);
|
|
11187
|
-
useEffect12(() => {
|
|
11188
|
-
if (secureFeatures.pagination && validatedInitialPageSize !== state.pagination.pageSize && finalPageSizeOptions.includes(validatedInitialPageSize)) {
|
|
11189
|
-
stateActions.setPagination({
|
|
11190
|
-
...state.pagination,
|
|
11191
|
-
pageSize: validatedInitialPageSize,
|
|
11192
|
-
pageIndex: 0
|
|
11193
|
-
});
|
|
11194
|
-
}
|
|
11195
|
-
}, [validatedInitialPageSize, secureFeatures.pagination, finalPageSizeOptions, stateActions, state.pagination.pageSize]);
|
|
11196
11184
|
const effectivePageSize = useMemo14(() => {
|
|
11197
11185
|
if (!secureFeatures.pagination || !finalPageSizeOptions.length) {
|
|
11198
11186
|
return state.pagination.pageSize;
|
|
@@ -11202,6 +11190,30 @@ function DataTableInternal({
|
|
|
11202
11190
|
}
|
|
11203
11191
|
return state.pagination.pageSize;
|
|
11204
11192
|
}, [state.pagination.pageSize, validatedInitialPageSize, secureFeatures.pagination, finalPageSizeOptions]);
|
|
11193
|
+
useEffect12(() => {
|
|
11194
|
+
if (secureFeatures.pagination && finalPageSizeOptions.length > 0) {
|
|
11195
|
+
const needsFix = !finalPageSizeOptions.includes(state.pagination.pageSize);
|
|
11196
|
+
const currentPageSize = effectivePageSize || validatedInitialPageSize;
|
|
11197
|
+
const totalPages = currentPageSize > 0 ? Math.ceil(finalDataCount / currentPageSize) : 0;
|
|
11198
|
+
const pageIndexOutOfBounds = totalPages > 0 && state.pagination.pageIndex >= totalPages;
|
|
11199
|
+
if (needsFix || pageIndexOutOfBounds) {
|
|
11200
|
+
stateActions.setPagination({
|
|
11201
|
+
pageSize: validatedInitialPageSize,
|
|
11202
|
+
pageIndex: 0
|
|
11203
|
+
// Reset to first page when correcting pagination issues
|
|
11204
|
+
});
|
|
11205
|
+
}
|
|
11206
|
+
}
|
|
11207
|
+
}, [
|
|
11208
|
+
secureFeatures.pagination,
|
|
11209
|
+
finalPageSizeOptions,
|
|
11210
|
+
state.pagination.pageSize,
|
|
11211
|
+
state.pagination.pageIndex,
|
|
11212
|
+
validatedInitialPageSize,
|
|
11213
|
+
stateActions,
|
|
11214
|
+
effectivePageSize,
|
|
11215
|
+
finalDataCount
|
|
11216
|
+
]);
|
|
11205
11217
|
const isLoading = externalIsLoading || performanceLoading;
|
|
11206
11218
|
const handleSearch = useCallback10((value) => {
|
|
11207
11219
|
stateActions.setSearchQuery(value);
|
|
@@ -11860,4 +11872,4 @@ lodash/lodash.js:
|
|
|
11860
11872
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
11861
11873
|
*)
|
|
11862
11874
|
*/
|
|
11863
|
-
//# sourceMappingURL=chunk-
|
|
11875
|
+
//# sourceMappingURL=chunk-CACHCRZS.js.map
|