@jmruthers/pace-core 0.5.113 → 0.5.115

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.
Files changed (127) hide show
  1. package/dist/{DataTable-YNEB5WDK.js → DataTable-H5KJCAIS.js} +3 -3
  2. package/dist/{chunk-KISJX3XZ.js → chunk-OUU3SP6I.js} +20 -16
  3. package/dist/{chunk-KISJX3XZ.js.map → chunk-OUU3SP6I.js.map} +1 -1
  4. package/dist/{chunk-4OX5PXHX.js → chunk-SYXOZQ4P.js} +4 -5
  5. package/dist/chunk-SYXOZQ4P.js.map +1 -0
  6. package/dist/{chunk-YUKG6PXE.js → chunk-XYRZV7R5.js} +15 -7
  7. package/dist/chunk-XYRZV7R5.js.map +1 -0
  8. package/dist/components.d.ts +1 -1
  9. package/dist/components.js +3 -3
  10. package/dist/hooks.d.ts +1 -1
  11. package/dist/hooks.js +1 -1
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js +3 -3
  14. package/dist/{useToast-DRah6K-g.d.ts → useToast-DVT4dMtf.d.ts} +8 -6
  15. package/dist/utils.js +1 -1
  16. package/docs/api/classes/ColumnFactory.md +1 -1
  17. package/docs/api/classes/ErrorBoundary.md +1 -1
  18. package/docs/api/classes/InvalidScopeError.md +1 -1
  19. package/docs/api/classes/MissingUserContextError.md +1 -1
  20. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  21. package/docs/api/classes/PermissionDeniedError.md +1 -1
  22. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  23. package/docs/api/classes/RBACAuditManager.md +1 -1
  24. package/docs/api/classes/RBACCache.md +1 -1
  25. package/docs/api/classes/RBACEngine.md +1 -1
  26. package/docs/api/classes/RBACError.md +1 -1
  27. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  28. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  29. package/docs/api/classes/StorageUtils.md +1 -1
  30. package/docs/api/enums/FileCategory.md +1 -1
  31. package/docs/api/interfaces/AggregateConfig.md +1 -1
  32. package/docs/api/interfaces/ButtonProps.md +1 -1
  33. package/docs/api/interfaces/CardProps.md +1 -1
  34. package/docs/api/interfaces/ColorPalette.md +1 -1
  35. package/docs/api/interfaces/ColorShade.md +1 -1
  36. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  37. package/docs/api/interfaces/DataRecord.md +1 -1
  38. package/docs/api/interfaces/DataTableAction.md +1 -1
  39. package/docs/api/interfaces/DataTableColumn.md +1 -1
  40. package/docs/api/interfaces/DataTableProps.md +1 -1
  41. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  42. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  43. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  44. package/docs/api/interfaces/FileDisplayProps.md +1 -1
  45. package/docs/api/interfaces/FileMetadata.md +1 -1
  46. package/docs/api/interfaces/FileReference.md +1 -1
  47. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  48. package/docs/api/interfaces/FileUploadOptions.md +1 -1
  49. package/docs/api/interfaces/FileUploadProps.md +1 -1
  50. package/docs/api/interfaces/FooterProps.md +1 -1
  51. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  52. package/docs/api/interfaces/InputProps.md +1 -1
  53. package/docs/api/interfaces/LabelProps.md +1 -1
  54. package/docs/api/interfaces/LoginFormProps.md +1 -1
  55. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  56. package/docs/api/interfaces/NavigationContextType.md +1 -1
  57. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  58. package/docs/api/interfaces/NavigationItem.md +1 -1
  59. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  60. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  61. package/docs/api/interfaces/Organisation.md +1 -1
  62. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  63. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  64. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  65. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  66. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  67. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  68. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  69. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  70. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  71. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  72. package/docs/api/interfaces/PaletteData.md +1 -1
  73. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  74. package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
  75. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  76. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  77. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  78. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  79. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  80. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  81. package/docs/api/interfaces/RBACConfig.md +1 -1
  82. package/docs/api/interfaces/RBACLogger.md +1 -1
  83. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  84. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  85. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  86. package/docs/api/interfaces/RouteConfig.md +1 -1
  87. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  88. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  89. package/docs/api/interfaces/StorageConfig.md +1 -1
  90. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  91. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  92. package/docs/api/interfaces/StorageListOptions.md +1 -1
  93. package/docs/api/interfaces/StorageListResult.md +1 -1
  94. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  95. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  96. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  97. package/docs/api/interfaces/StyleImport.md +1 -1
  98. package/docs/api/interfaces/SwitchProps.md +1 -1
  99. package/docs/api/interfaces/ToastActionElement.md +1 -1
  100. package/docs/api/interfaces/ToastProps.md +1 -1
  101. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  102. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  103. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  104. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  105. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  106. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  107. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
  108. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  109. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  110. package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
  111. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  112. package/docs/api/interfaces/UserEventAccess.md +1 -1
  113. package/docs/api/interfaces/UserMenuProps.md +1 -1
  114. package/docs/api/interfaces/UserProfile.md +1 -1
  115. package/docs/api/modules.md +6 -6
  116. package/docs/architecture/rpc-function-standards.md +131 -11
  117. package/package.json +1 -1
  118. package/src/components/DataTable/components/DataTableCore.tsx +3 -15
  119. package/src/components/DataTable/components/ImportModal.tsx +25 -2
  120. package/src/components/Dialog/Dialog.tsx +3 -2
  121. package/src/components/NavigationMenu/NavigationMenu.tsx +29 -5
  122. package/src/components/Toast/Toast.test.tsx +8 -7
  123. package/src/components/Toast/Toast.tsx +3 -3
  124. package/src/hooks/useToast.ts +11 -12
  125. package/dist/chunk-4OX5PXHX.js.map +0 -1
  126. package/dist/chunk-YUKG6PXE.js.map +0 -1
  127. /package/dist/{DataTable-YNEB5WDK.js.map → DataTable-H5KJCAIS.js.map} +0 -0
@@ -54,7 +54,7 @@ import {
54
54
  sortHierarchicalDataWithSorting,
55
55
  validateHierarchicalData,
56
56
  validatePaginationConfig
57
- } from "./chunk-KISJX3XZ.js";
57
+ } from "./chunk-OUU3SP6I.js";
58
58
  import "./chunk-ZPXWJA4H.js";
59
59
  import "./chunk-QKIVSZ2O.js";
60
60
  import "./chunk-3OGQLOJM.js";
@@ -75,7 +75,7 @@ import {
75
75
  safeExecute,
76
76
  throttle,
77
77
  useDataTablePerformance
78
- } from "./chunk-4OX5PXHX.js";
78
+ } from "./chunk-SYXOZQ4P.js";
79
79
  import "./chunk-L36JW4KV.js";
80
80
  import "./chunk-7H75SHXZ.js";
81
81
  import "./chunk-OO3V7W4H.js";
@@ -157,4 +157,4 @@ export {
157
157
  validateHierarchicalData,
158
158
  validatePaginationConfig
159
159
  };
160
- //# sourceMappingURL=DataTable-YNEB5WDK.js.map
160
+ //# sourceMappingURL=DataTable-H5KJCAIS.js.map
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  toast,
7
7
  useDataTablePerformance
8
- } from "./chunk-4OX5PXHX.js";
8
+ } from "./chunk-SYXOZQ4P.js";
9
9
  import {
10
10
  init_UnifiedAuthProvider
11
11
  } from "./chunk-7H75SHXZ.js";
@@ -8919,8 +8919,9 @@ var DialogFooter = ({
8919
8919
  "footer",
8920
8920
  {
8921
8921
  className: cn(
8922
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
8923
- sticky ? "sticky bottom-0 z-10 bg-background p-6 pt-4 border-t" : "p-6 pt-4",
8922
+ // Only apply default layout classes if no custom className is provided
8923
+ !className && "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
8924
+ !className && (sticky ? "sticky bottom-0 z-10 bg-background p-6 pt-4 border-t" : "p-6 pt-4"),
8924
8925
  className
8925
8926
  ),
8926
8927
  ...props
@@ -8992,6 +8993,19 @@ function ImportModal({ isOpen, onClose, onImport, config = {} }) {
8992
8993
  isMountedRef.current = false;
8993
8994
  };
8994
8995
  }, []);
8996
+ useEffect5(() => {
8997
+ if (!isOpen) {
8998
+ setFile(null);
8999
+ setPreviewData(null);
9000
+ setTotalCount(0);
9001
+ setError(null);
9002
+ setValidationErrors([]);
9003
+ setIsProcessing(false);
9004
+ if (fileInputRef.current) {
9005
+ fileInputRef.current.value = "";
9006
+ }
9007
+ }
9008
+ }, [isOpen]);
8995
9009
  const {
8996
9010
  title = "Import Data",
8997
9011
  description = "Upload a CSV file to import multiple records at once.",
@@ -9161,14 +9175,14 @@ function ImportModal({ isOpen, onClose, onImport, config = {} }) {
9161
9175
  ] })
9162
9176
  ] })
9163
9177
  ] }),
9164
- previewData && previewData.length > 0 && /* @__PURE__ */ jsxs14("div", { className: "space-y-3", children: [
9178
+ file && previewData && previewData.length > 0 ? /* @__PURE__ */ jsxs14("div", { className: "space-y-3", children: [
9165
9179
  /* @__PURE__ */ jsx18("h4", { className: "text-sec-900", children: previewHeaderText }),
9166
9180
  /* @__PURE__ */ jsx18("div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ jsx18("div", { className: "overflow-x-auto max-h-48", children: /* @__PURE__ */ jsxs14("table", { className: "min-w-full text-xs", children: [
9167
9181
  /* @__PURE__ */ jsx18("thead", { className: "bg-sec-50", children: /* @__PURE__ */ jsx18("tr", { children: Object.keys(previewData[0]).map((header) => /* @__PURE__ */ jsx18("th", { className: "px-2 py-1 text-left font-medium text-sec-900 border-b", children: header }, header)) }) }),
9168
9182
  /* @__PURE__ */ jsx18("tbody", { children: previewData.map((row, index) => /* @__PURE__ */ jsx18("tr", { className: index % 2 === 0 ? "bg-app-main-50" : "bg-sec-50", children: Object.values(row).map((value, cellIndex) => /* @__PURE__ */ jsx18("td", { className: "px-2 py-1 text-sec-700 border-b", children: String(value) }, cellIndex)) }, index)) })
9169
9183
  ] }) }) }),
9170
9184
  /* @__PURE__ */ jsx18("p", { className: "text-sec-500", children: totalRowsText.replace("{count}", totalCount.toString()) })
9171
- ] }),
9185
+ ] }) : !file ? /* @__PURE__ */ jsx18("div", { className: "border rounded-lg p-6 text-center bg-sec-50", children: /* @__PURE__ */ jsx18("p", { className: "text-sec-500", children: "Select a CSV file to preview" }) }) : null,
9172
9186
  /* @__PURE__ */ jsxs14("div", { className: "flex justify-end gap-2", children: [
9173
9187
  /* @__PURE__ */ jsx18(Button, { variant: "outline", onClick: handleClose, children: cancelButtonText }),
9174
9188
  /* @__PURE__ */ jsx18(
@@ -12186,16 +12200,6 @@ function DataTableInternal({
12186
12200
  // Preserve accessorFn if present (will use getValue() if available)
12187
12201
  accessorFn: hasAccessorFn ? originalCol.accessorFn : void 0
12188
12202
  });
12189
- if (hasAccessorFn && editAccessorKey) {
12190
- const idHeader = `${displayHeader} (ID)`;
12191
- visibleColumns2.push({
12192
- id: editAccessorKey,
12193
- accessorKey: editAccessorKey,
12194
- header: idHeader,
12195
- isIdColumn: true,
12196
- editAccessorKey
12197
- });
12198
- }
12199
12203
  });
12200
12204
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
12201
12205
  const filename = title ? `${title.replace(/[^a-z0-9]/gi, "_").toLowerCase()}_${timestamp}.csv` : `data_export_${timestamp}.csv`;
@@ -12707,4 +12711,4 @@ lodash/lodash.js:
12707
12711
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
12708
12712
  *)
12709
12713
  */
12710
- //# sourceMappingURL=chunk-KISJX3XZ.js.map
12714
+ //# sourceMappingURL=chunk-OUU3SP6I.js.map