@jmruthers/pace-core 0.5.71 → 0.5.72

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 (115) hide show
  1. package/dist/{DataTable-V3RFYBBB.js → DataTable-RCFGXSPQ.js} +2 -2
  2. package/dist/{chunk-2NWIXRSB.js → chunk-2PDTIGS4.js} +2 -2
  3. package/dist/{chunk-VLFIYM6B.js → chunk-WMYLD5WP.js} +69 -64
  4. package/dist/chunk-WMYLD5WP.js.map +1 -0
  5. package/dist/components.js +2 -2
  6. package/dist/index.js +2 -2
  7. package/dist/utils.js +1 -1
  8. package/docs/api/classes/ColumnFactory.md +1 -1
  9. package/docs/api/classes/ErrorBoundary.md +1 -1
  10. package/docs/api/classes/InvalidScopeError.md +1 -1
  11. package/docs/api/classes/MissingUserContextError.md +1 -1
  12. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  13. package/docs/api/classes/PermissionDeniedError.md +1 -1
  14. package/docs/api/classes/PublicErrorBoundary.md +1 -1
  15. package/docs/api/classes/RBACAuditManager.md +1 -1
  16. package/docs/api/classes/RBACCache.md +1 -1
  17. package/docs/api/classes/RBACEngine.md +1 -1
  18. package/docs/api/classes/RBACError.md +1 -1
  19. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  20. package/docs/api/classes/SecureSupabaseClient.md +1 -1
  21. package/docs/api/classes/StorageUtils.md +1 -1
  22. package/docs/api/enums/FileCategory.md +1 -1
  23. package/docs/api/interfaces/AggregateConfig.md +1 -1
  24. package/docs/api/interfaces/ButtonProps.md +1 -1
  25. package/docs/api/interfaces/CardProps.md +1 -1
  26. package/docs/api/interfaces/ColorPalette.md +1 -1
  27. package/docs/api/interfaces/ColorShade.md +1 -1
  28. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  29. package/docs/api/interfaces/DataTableAction.md +1 -1
  30. package/docs/api/interfaces/DataTableColumn.md +1 -1
  31. package/docs/api/interfaces/DataTableProps.md +1 -1
  32. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  33. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  34. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  35. package/docs/api/interfaces/EventContextType.md +1 -1
  36. package/docs/api/interfaces/EventLogoProps.md +1 -1
  37. package/docs/api/interfaces/EventProviderProps.md +1 -1
  38. package/docs/api/interfaces/FileDisplayProps.md +1 -1
  39. package/docs/api/interfaces/FileMetadata.md +1 -1
  40. package/docs/api/interfaces/FileReference.md +1 -1
  41. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  42. package/docs/api/interfaces/FileUploadOptions.md +1 -1
  43. package/docs/api/interfaces/FileUploadProps.md +1 -1
  44. package/docs/api/interfaces/FooterProps.md +1 -1
  45. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  46. package/docs/api/interfaces/InputProps.md +1 -1
  47. package/docs/api/interfaces/LabelProps.md +1 -1
  48. package/docs/api/interfaces/LoginFormProps.md +1 -1
  49. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  50. package/docs/api/interfaces/NavigationContextType.md +1 -1
  51. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  52. package/docs/api/interfaces/NavigationItem.md +1 -1
  53. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  54. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  55. package/docs/api/interfaces/Organisation.md +1 -1
  56. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  57. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  58. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  59. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  60. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  61. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  62. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  63. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  64. package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
  65. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  66. package/docs/api/interfaces/PaletteData.md +1 -1
  67. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  68. package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
  69. package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
  70. package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
  71. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  72. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  73. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  74. package/docs/api/interfaces/RBACConfig.md +1 -1
  75. package/docs/api/interfaces/RBACContextType.md +1 -1
  76. package/docs/api/interfaces/RBACLogger.md +1 -1
  77. package/docs/api/interfaces/RBACProviderProps.md +1 -1
  78. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  79. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  80. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  81. package/docs/api/interfaces/RouteConfig.md +1 -1
  82. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  83. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  84. package/docs/api/interfaces/StorageConfig.md +1 -1
  85. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  86. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  87. package/docs/api/interfaces/StorageListOptions.md +1 -1
  88. package/docs/api/interfaces/StorageListResult.md +1 -1
  89. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  90. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  91. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  92. package/docs/api/interfaces/StyleImport.md +1 -1
  93. package/docs/api/interfaces/SwitchProps.md +1 -1
  94. package/docs/api/interfaces/ToastActionElement.md +1 -1
  95. package/docs/api/interfaces/ToastProps.md +1 -1
  96. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  97. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  98. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  99. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  100. package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
  101. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  102. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  103. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  104. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  105. package/docs/api/interfaces/UserEventAccess.md +1 -1
  106. package/docs/api/interfaces/UserMenuProps.md +1 -1
  107. package/docs/api/interfaces/UserProfile.md +1 -1
  108. package/docs/api/modules.md +2 -2
  109. package/docs/implementation-guides/data-tables.md +191 -0
  110. package/package.json +1 -1
  111. package/src/components/DataTable/components/DataTableBody.tsx +38 -27
  112. package/src/components/DataTable/components/UnifiedTableBody.tsx +72 -64
  113. package/dist/chunk-VLFIYM6B.js.map +0 -1
  114. /package/dist/{DataTable-V3RFYBBB.js.map → DataTable-RCFGXSPQ.js.map} +0 -0
  115. /package/dist/{chunk-2NWIXRSB.js.map → chunk-2PDTIGS4.js.map} +0 -0
@@ -32,7 +32,7 @@ import {
32
32
  useDataTableContext,
33
33
  usePluginRegistry,
34
34
  useStateManager
35
- } from "./chunk-VLFIYM6B.js";
35
+ } from "./chunk-WMYLD5WP.js";
36
36
  import "./chunk-67FGPOHX.js";
37
37
  import "./chunk-FGMFQSHX.js";
38
38
  import "./chunk-B2WTCLCV.js";
@@ -97,4 +97,4 @@ export {
97
97
  usePluginRegistry,
98
98
  useStateManager
99
99
  };
100
- //# sourceMappingURL=DataTable-V3RFYBBB.js.map
100
+ //# sourceMappingURL=DataTable-RCFGXSPQ.js.map
@@ -15,7 +15,7 @@ import {
15
15
  SelectSeparator,
16
16
  SelectTrigger,
17
17
  SelectValue
18
- } from "./chunk-VLFIYM6B.js";
18
+ } from "./chunk-WMYLD5WP.js";
19
19
  import {
20
20
  isPermitted
21
21
  } from "./chunk-FGMFQSHX.js";
@@ -3753,4 +3753,4 @@ export {
3753
3753
  PublicPageDiagnostic,
3754
3754
  PublicPageContextChecker
3755
3755
  };
3756
- //# sourceMappingURL=chunk-2NWIXRSB.js.map
3756
+ //# sourceMappingURL=chunk-2PDTIGS4.js.map
@@ -1602,76 +1602,81 @@ var MemoizedRow = ({
1602
1602
  children: isExpanded ? /* @__PURE__ */ jsx11(ChevronDown2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx11(ChevronRight, { className: "h-4 w-4" })
1603
1603
  }
1604
1604
  ),
1605
- /* @__PURE__ */ jsx11("div", { className: `flex-1 ${cell.column.columnDef.meta?.align === "right" ? "text-right" : ""}`, children: isEditing && cell.column.id !== "actions" ? (
1606
- // Check if column has a custom cell renderer - if so, use it in edit mode
1607
- cell.column.columnDef.cell ? flexRender(cell.column.columnDef.cell, {
1608
- ...cell.getContext(),
1609
- hierarchical,
1610
- isParent,
1611
- isChild,
1612
- isHierarchical,
1613
- rowId,
1614
- isExpanded,
1615
- hasChildren,
1616
- getIsEditing: () => true,
1617
- // Always true in edit mode
1618
- setValue: (value) => {
1619
- if (typeof value === "object" && value !== null) {
1620
- onEditingDataChange?.({ ...editingData, ...value });
1621
- } else {
1622
- onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
1605
+ /* @__PURE__ */ jsx11("div", { className: `flex-1 ${cell.column.columnDef.meta?.align === "right" ? "text-right" : ""}`, children: (() => {
1606
+ const columnDef = cell.column.columnDef;
1607
+ const isColumnEditable = columnDef.editable !== false;
1608
+ const shouldRenderEditField = isEditing && cell.column.id !== "actions" && isColumnEditable;
1609
+ if (shouldRenderEditField) {
1610
+ return cell.column.columnDef.cell ? flexRender(cell.column.columnDef.cell, {
1611
+ ...cell.getContext(),
1612
+ hierarchical,
1613
+ isParent,
1614
+ isChild,
1615
+ isHierarchical,
1616
+ rowId,
1617
+ isExpanded,
1618
+ hasChildren,
1619
+ getIsEditing: () => true,
1620
+ // Always true in edit mode
1621
+ setValue: (value) => {
1622
+ if (typeof value === "object" && value !== null) {
1623
+ onEditingDataChange?.({ ...editingData, ...value });
1624
+ } else {
1625
+ onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
1626
+ }
1623
1627
  }
1624
- }
1625
- }) : (
1626
- // Fall back to default edit field rendering when no custom cell renderer
1627
- renderEditField(cell.column, editingData?.[cell.column.id], (value) => {
1628
+ }) : renderEditField(cell.column, editingData?.[cell.column.id], (value) => {
1628
1629
  if (typeof value === "object" && value !== null) {
1629
1630
  onEditingDataChange?.({ ...editingData, ...value });
1630
1631
  } else {
1631
1632
  onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
1632
1633
  }
1633
- }, editingData)
1634
- )
1635
- ) : cell.column.id === "actions" ? isEditing ? /* @__PURE__ */ jsxs8("div", { className: "flex gap-1", children: [
1636
- /* @__PURE__ */ jsx11(
1637
- "button",
1638
- {
1639
- onClick: onSaveEditing,
1640
- className: "h-8 w-8 p-0 hover:bg-muted/50 flex items-center justify-center",
1641
- title: "Save changes",
1642
- children: /* @__PURE__ */ jsx11("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
1643
- }
1644
- ),
1645
- /* @__PURE__ */ jsx11(
1646
- "button",
1647
- {
1648
- onClick: onCancelEditing,
1649
- className: "h-8 w-8 p-0 hover:bg-muted/50 flex items-center justify-center",
1650
- title: "Cancel changes",
1651
- children: /* @__PURE__ */ jsx11("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
1652
- }
1653
- )
1654
- ] }) : /* @__PURE__ */ jsx11(
1655
- ActionButtons,
1656
- {
1657
- row,
1658
- actions,
1659
- isEditing,
1660
- isParent,
1661
- hierarchical: !!hierarchical,
1662
- rbac,
1663
- permissions
1634
+ }, editingData);
1664
1635
  }
1665
- ) : flexRender(cell.column.columnDef.cell, {
1666
- ...cell.getContext(),
1667
- hierarchical,
1668
- isParent,
1669
- isChild,
1670
- isHierarchical,
1671
- rowId,
1672
- isExpanded,
1673
- hasChildren
1674
- }) })
1636
+ if (cell.column.id === "actions") {
1637
+ return isEditing ? /* @__PURE__ */ jsxs8("div", { className: "flex gap-1", children: [
1638
+ /* @__PURE__ */ jsx11(
1639
+ "button",
1640
+ {
1641
+ onClick: onSaveEditing,
1642
+ className: "h-8 w-8 p-0 hover:bg-muted/50 flex items-center justify-center",
1643
+ title: "Save changes",
1644
+ children: /* @__PURE__ */ jsx11("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
1645
+ }
1646
+ ),
1647
+ /* @__PURE__ */ jsx11(
1648
+ "button",
1649
+ {
1650
+ onClick: onCancelEditing,
1651
+ className: "h-8 w-8 p-0 hover:bg-muted/50 flex items-center justify-center",
1652
+ title: "Cancel changes",
1653
+ children: /* @__PURE__ */ jsx11("svg", { className: "h-4 w-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
1654
+ }
1655
+ )
1656
+ ] }) : /* @__PURE__ */ jsx11(
1657
+ ActionButtons,
1658
+ {
1659
+ row,
1660
+ actions,
1661
+ isEditing,
1662
+ isParent,
1663
+ hierarchical: !!hierarchical,
1664
+ rbac,
1665
+ permissions
1666
+ }
1667
+ );
1668
+ }
1669
+ return flexRender(cell.column.columnDef.cell, {
1670
+ ...cell.getContext(),
1671
+ hierarchical,
1672
+ isParent,
1673
+ isChild,
1674
+ isHierarchical,
1675
+ rowId,
1676
+ isExpanded,
1677
+ hasChildren
1678
+ });
1679
+ })() })
1675
1680
  ] })
1676
1681
  },
1677
1682
  cell.id
@@ -5662,4 +5667,4 @@ export {
5662
5667
  GroupHeader,
5663
5668
  EditableRow
5664
5669
  };
5665
- //# sourceMappingURL=chunk-VLFIYM6B.js.map
5670
+ //# sourceMappingURL=chunk-WMYLD5WP.js.map