@jmruthers/pace-core 0.5.64 → 0.5.66
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-7BER7PDS.js → DataTable-MFUXNGPR.js} +2 -2
- package/dist/{DataTable-D15XipLZ.d.ts → DataTable-ntgmhO2W.d.ts} +1 -1
- package/dist/{chunk-S66AJVI2.js → chunk-4HQ5BOVZ.js} +97 -27
- package/dist/chunk-4HQ5BOVZ.js.map +1 -0
- package/dist/{chunk-2LPYEFXI.js → chunk-PSE2XO4L.js} +2 -2
- 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-E5WSpEtz.d.ts → types-CGX9Vyf5.d.ts} +8 -0
- package/dist/types.js.map +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/docs/api/classes/ColumnFactory.md +6 -6
- 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/interfaces/AggregateConfig.md +4 -4
- 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/DataTableAction.md +14 -14
- package/docs/api/interfaces/DataTableColumn.md +21 -21
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +7 -7
- package/docs/api/interfaces/EmptyStateConfig.md +5 -5
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventContextType.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/EventProviderProps.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.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/RBACContextType.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RBACProviderProps.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/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/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 +4 -4
- package/package.json +1 -1
- package/src/components/DataTable/components/DataTableBody.tsx +27 -11
- package/src/components/DataTable/components/DataTableCore.tsx +13 -13
- package/src/components/DataTable/components/EditableRow.tsx +46 -28
- package/src/components/DataTable/components/UnifiedTableBody.tsx +86 -38
- package/src/components/DataTable/components/VirtualizedDataTable.tsx +5 -3
- package/src/components/DataTable/core/ColumnFactory.ts +4 -0
- package/src/components/DataTable/types.ts +10 -0
- package/src/types/index.ts +2 -0
- package/dist/chunk-S66AJVI2.js.map +0 -1
- /package/dist/{DataTable-7BER7PDS.js.map → DataTable-MFUXNGPR.js.map} +0 -0
- /package/dist/{chunk-2LPYEFXI.js.map → chunk-PSE2XO4L.js.map} +0 -0
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
useDataTableContext,
|
|
33
33
|
usePluginRegistry,
|
|
34
34
|
useStateManager
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-4HQ5BOVZ.js";
|
|
36
36
|
import "./chunk-C7GUF747.js";
|
|
37
37
|
import "./chunk-NHR52QAQ.js";
|
|
38
38
|
import "./chunk-B2WTCLCV.js";
|
|
@@ -97,4 +97,4 @@ export {
|
|
|
97
97
|
usePluginRegistry,
|
|
98
98
|
useStateManager
|
|
99
99
|
};
|
|
100
|
-
//# sourceMappingURL=DataTable-
|
|
100
|
+
//# sourceMappingURL=DataTable-MFUXNGPR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { D as DataRecord, a as DataTableColumn, b as DataTableRBACConfig, c as DataTableFeatureConfig, H as HierarchicalConfig, P as PerformanceConfig, S as ServerSideConfig, d as PaginationMode, C as ChunkingConfig, e as SearchIndexConfig, G as GetRowId, E as EmptyStateConfig, A as AggregateConfig, f as DataTableAction } from './types-
|
|
3
|
+
import { D as DataRecord, a as DataTableColumn, b as DataTableRBACConfig, c as DataTableFeatureConfig, H as HierarchicalConfig, P as PerformanceConfig, S as ServerSideConfig, d as PaginationMode, C as ChunkingConfig, e as SearchIndexConfig, G as GetRowId, E as EmptyStateConfig, A as AggregateConfig, f as DataTableAction } from './types-CGX9Vyf5.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Configuration interface for customizing ImportModal text content
|
|
@@ -1491,13 +1491,37 @@ var MemoizedRow = ({
|
|
|
1491
1491
|
isCompact: true,
|
|
1492
1492
|
className: "px-3 py-2 pl-8 whitespace-normal break-words"
|
|
1493
1493
|
}),
|
|
1494
|
-
children:
|
|
1495
|
-
if
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1494
|
+
children: /* @__PURE__ */ jsx11("div", { className: `${cell.column.columnDef.meta?.align === "right" ? "text-right" : ""}`, children: isSubRowEditing && cell.column.id !== "actions" ? (
|
|
1495
|
+
// Check if column has a custom cell renderer - if so, use it in edit mode
|
|
1496
|
+
cell.column.columnDef.cell ? flexRender(cell.column.columnDef.cell, {
|
|
1497
|
+
...cell.getContext(),
|
|
1498
|
+
hierarchical,
|
|
1499
|
+
isParent: false,
|
|
1500
|
+
isChild: true,
|
|
1501
|
+
isHierarchical: false,
|
|
1502
|
+
rowId: subRowId,
|
|
1503
|
+
isExpanded: false,
|
|
1504
|
+
hasChildren: false,
|
|
1505
|
+
getIsEditing: () => true,
|
|
1506
|
+
// Always true in edit mode
|
|
1507
|
+
setValue: (value) => {
|
|
1508
|
+
if (typeof value === "object" && value !== null) {
|
|
1509
|
+
onEditingDataChange?.({ ...editingData, ...value });
|
|
1510
|
+
} else {
|
|
1511
|
+
onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
}) : (
|
|
1515
|
+
// Fall back to default edit field rendering when no custom cell renderer
|
|
1516
|
+
renderEditField(cell.column, editingData?.[cell.column.id], (value) => {
|
|
1517
|
+
if (typeof value === "object" && value !== null) {
|
|
1518
|
+
onEditingDataChange?.({ ...editingData, ...value });
|
|
1519
|
+
} else {
|
|
1520
|
+
onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
|
|
1521
|
+
}
|
|
1522
|
+
}, editingData)
|
|
1523
|
+
)
|
|
1524
|
+
) : cell.column.id === "actions" ? /* @__PURE__ */ jsx11(
|
|
1501
1525
|
ActionButtons,
|
|
1502
1526
|
{
|
|
1503
1527
|
row,
|
|
@@ -1517,7 +1541,7 @@ var MemoizedRow = ({
|
|
|
1517
1541
|
rowId: subRowId,
|
|
1518
1542
|
isExpanded: false,
|
|
1519
1543
|
hasChildren: false
|
|
1520
|
-
})
|
|
1544
|
+
}) })
|
|
1521
1545
|
},
|
|
1522
1546
|
cell.id
|
|
1523
1547
|
)) }, subRow.id);
|
|
@@ -1577,13 +1601,37 @@ var MemoizedRow = ({
|
|
|
1577
1601
|
children: isExpanded ? /* @__PURE__ */ jsx11(ChevronDown2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx11(ChevronRight, { className: "h-4 w-4" })
|
|
1578
1602
|
}
|
|
1579
1603
|
),
|
|
1580
|
-
/* @__PURE__ */ jsx11("div", { className:
|
|
1581
|
-
if
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1604
|
+
/* @__PURE__ */ jsx11("div", { className: `flex-1 ${cell.column.columnDef.meta?.align === "right" ? "text-right" : ""}`, children: isEditing && cell.column.id !== "actions" ? (
|
|
1605
|
+
// Check if column has a custom cell renderer - if so, use it in edit mode
|
|
1606
|
+
cell.column.columnDef.cell ? flexRender(cell.column.columnDef.cell, {
|
|
1607
|
+
...cell.getContext(),
|
|
1608
|
+
hierarchical,
|
|
1609
|
+
isParent,
|
|
1610
|
+
isChild,
|
|
1611
|
+
isHierarchical,
|
|
1612
|
+
rowId,
|
|
1613
|
+
isExpanded,
|
|
1614
|
+
hasChildren,
|
|
1615
|
+
getIsEditing: () => true,
|
|
1616
|
+
// Always true in edit mode
|
|
1617
|
+
setValue: (value) => {
|
|
1618
|
+
if (typeof value === "object" && value !== null) {
|
|
1619
|
+
onEditingDataChange?.({ ...editingData, ...value });
|
|
1620
|
+
} else {
|
|
1621
|
+
onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
}) : (
|
|
1625
|
+
// Fall back to default edit field rendering when no custom cell renderer
|
|
1626
|
+
renderEditField(cell.column, editingData?.[cell.column.id], (value) => {
|
|
1627
|
+
if (typeof value === "object" && value !== null) {
|
|
1628
|
+
onEditingDataChange?.({ ...editingData, ...value });
|
|
1629
|
+
} else {
|
|
1630
|
+
onEditingDataChange?.({ ...editingData, [cell.column.id]: value });
|
|
1631
|
+
}
|
|
1632
|
+
}, editingData)
|
|
1633
|
+
)
|
|
1634
|
+
) : cell.column.id === "actions" ? isEditing ? /* @__PURE__ */ jsxs8("div", { className: "flex gap-1", children: [
|
|
1587
1635
|
/* @__PURE__ */ jsx11(
|
|
1588
1636
|
"button",
|
|
1589
1637
|
{
|
|
@@ -2923,7 +2971,11 @@ var ColumnFactory = class {
|
|
|
2923
2971
|
footer: options.footer,
|
|
2924
2972
|
size: options.size,
|
|
2925
2973
|
minSize: options.minSize,
|
|
2926
|
-
maxSize: options.maxSize
|
|
2974
|
+
maxSize: options.maxSize,
|
|
2975
|
+
meta: {
|
|
2976
|
+
align: "right",
|
|
2977
|
+
type: "number"
|
|
2978
|
+
}
|
|
2927
2979
|
};
|
|
2928
2980
|
}
|
|
2929
2981
|
/**
|
|
@@ -3899,12 +3951,12 @@ function DataTableInternal({
|
|
|
3899
3951
|
onClick: header.column.getToggleSortingHandler(),
|
|
3900
3952
|
"aria-label": `Sort by ${typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "column"}`,
|
|
3901
3953
|
tabIndex: 0,
|
|
3902
|
-
children: /* @__PURE__ */ jsxs14("div", { className:
|
|
3954
|
+
children: /* @__PURE__ */ jsxs14("div", { className: `flex items-center gap-1 ${header.column.columnDef.meta?.align === "right" ? "justify-end" : ""}`, children: [
|
|
3903
3955
|
typeof header.column.columnDef.header === "function" ? header.column.columnDef.header(header.getContext()) : header.column.columnDef.header,
|
|
3904
3956
|
header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx20(ChevronUp2, { className: "h-4 w-4" }) : header.column.getIsSorted() === "desc" ? /* @__PURE__ */ jsx20(ChevronDown3, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx20(ChevronsUpDown, { className: "h-4 w-4" })
|
|
3905
3957
|
] })
|
|
3906
3958
|
}
|
|
3907
|
-
) : /* @__PURE__ */ jsx20("div", { children: typeof header.column.columnDef.header === "function" ? header.column.columnDef.header(header.getContext()) : header.column.columnDef.header })
|
|
3959
|
+
) : /* @__PURE__ */ jsx20("div", { className: header.column.columnDef.meta?.align === "right" ? "text-right" : "", children: typeof header.column.columnDef.header === "function" ? header.column.columnDef.header(header.getContext()) : header.column.columnDef.header })
|
|
3908
3960
|
},
|
|
3909
3961
|
header.id
|
|
3910
3962
|
);
|
|
@@ -5423,6 +5475,7 @@ function GroupHeader({
|
|
|
5423
5475
|
}
|
|
5424
5476
|
|
|
5425
5477
|
// src/components/DataTable/components/EditableRow.tsx
|
|
5478
|
+
import { flexRender as flexRender3 } from "@tanstack/react-table";
|
|
5426
5479
|
init_Button();
|
|
5427
5480
|
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5428
5481
|
var renderEditField2 = (column, value, onChange, editingData = {}, placeholder) => {
|
|
@@ -5495,13 +5548,30 @@ function EditableRow({
|
|
|
5495
5548
|
visible: true
|
|
5496
5549
|
}));
|
|
5497
5550
|
return /* @__PURE__ */ jsxs17("tr", { children: [
|
|
5498
|
-
row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx25("td", { children: cell.column.
|
|
5499
|
-
if
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5551
|
+
row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx25("td", { children: /* @__PURE__ */ jsx25("div", { className: cell.column.columnDef.meta?.align === "right" ? "text-right" : "", children: cell.column.id !== "actions" ? (
|
|
5552
|
+
// Check if column has a custom cell renderer - if so, use it in edit mode
|
|
5553
|
+
cell.column.columnDef.cell ? flexRender3(cell.column.columnDef.cell, {
|
|
5554
|
+
...cell.getContext(),
|
|
5555
|
+
getIsEditing: () => true,
|
|
5556
|
+
// Always true in edit mode
|
|
5557
|
+
setValue: (value) => {
|
|
5558
|
+
if (typeof value === "object" && value !== null) {
|
|
5559
|
+
onEditingDataChange({ ...editingData, ...value });
|
|
5560
|
+
} else {
|
|
5561
|
+
onEditingDataChange({ ...editingData, [cell.column.id]: value });
|
|
5562
|
+
}
|
|
5563
|
+
}
|
|
5564
|
+
}) : (
|
|
5565
|
+
// Fall back to default edit field rendering when no custom cell renderer
|
|
5566
|
+
renderEditField2(cell.column, editingData[cell.column.id], (value) => {
|
|
5567
|
+
if (typeof value === "object" && value !== null) {
|
|
5568
|
+
onEditingDataChange({ ...editingData, ...value });
|
|
5569
|
+
} else {
|
|
5570
|
+
onEditingDataChange({ ...editingData, [cell.column.id]: value });
|
|
5571
|
+
}
|
|
5572
|
+
}, editingData)
|
|
5573
|
+
)
|
|
5574
|
+
) : /* @__PURE__ */ jsxs17("div", { className: "flex gap-1", children: [
|
|
5505
5575
|
/* @__PURE__ */ jsx25(
|
|
5506
5576
|
Button,
|
|
5507
5577
|
{
|
|
@@ -5520,7 +5590,7 @@ function EditableRow({
|
|
|
5520
5590
|
children: "Cancel"
|
|
5521
5591
|
}
|
|
5522
5592
|
)
|
|
5523
|
-
] }) }, cell.id)),
|
|
5593
|
+
] }) }) }, cell.id)),
|
|
5524
5594
|
actions.length > 0 && /* @__PURE__ */ jsx25("td", { children: /* @__PURE__ */ jsx25(
|
|
5525
5595
|
ActionButtons,
|
|
5526
5596
|
{
|
|
@@ -5591,4 +5661,4 @@ export {
|
|
|
5591
5661
|
GroupHeader,
|
|
5592
5662
|
EditableRow
|
|
5593
5663
|
};
|
|
5594
|
-
//# sourceMappingURL=chunk-
|
|
5664
|
+
//# sourceMappingURL=chunk-4HQ5BOVZ.js.map
|