@jmruthers/pace-core 0.5.37 → 0.5.39
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-ZCCT5BYZ.js → DataTable-2HA7VQZ4.js} +2 -2
- package/dist/{DataTable-Da0D1BHX.d.ts → DataTable-DqDDvBfI.d.ts} +1 -1
- package/dist/{chunk-WEDSBVX3.js → chunk-7SLC6HXW.js} +2 -2
- package/dist/{chunk-D225GMOD.js → chunk-MQS7SEE6.js} +57 -3
- package/dist/chunk-MQS7SEE6.js.map +1 -0
- 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 +2 -2
- package/dist/index.js +2 -2
- package/dist/{types-zOqe4P1s.d.ts → types-E5WSpEtz.d.ts} +7 -0
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +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/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 +31 -5
- 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 +2 -2
- package/docs/implementation-guides/datatable-filtering.md +313 -0
- package/package.json +1 -1
- package/src/components/DataTable/components/ActionButtons.tsx +26 -2
- package/src/components/DataTable/components/DataTableCore.tsx +28 -0
- package/src/components/DataTable/components/EditableRow.tsx +6 -0
- package/src/components/DataTable/components/FilterRow.tsx +14 -2
- package/src/components/DataTable/components/UnifiedTableBody.tsx +14 -0
- package/src/components/DataTable/types.ts +4 -0
- package/dist/chunk-D225GMOD.js.map +0 -1
- /package/dist/{DataTable-ZCCT5BYZ.js.map → DataTable-2HA7VQZ4.js.map} +0 -0
- /package/dist/{chunk-WEDSBVX3.js.map → chunk-7SLC6HXW.js.map} +0 -0
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
useDataTableContext,
|
|
33
33
|
usePluginRegistry,
|
|
34
34
|
useStateManager
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MQS7SEE6.js";
|
|
36
36
|
import "./chunk-YA77BOZM.js";
|
|
37
37
|
import "./chunk-GWSBHC4J.js";
|
|
38
38
|
import "./chunk-7BNPOCLL.js";
|
|
@@ -97,4 +97,4 @@ export {
|
|
|
97
97
|
usePluginRegistry,
|
|
98
98
|
useStateManager
|
|
99
99
|
};
|
|
100
|
-
//# sourceMappingURL=DataTable-
|
|
100
|
+
//# sourceMappingURL=DataTable-2HA7VQZ4.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-E5WSpEtz.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Configuration interface for customizing ImportModal text content
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
SelectSeparator,
|
|
16
16
|
SelectTrigger,
|
|
17
17
|
SelectValue
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MQS7SEE6.js";
|
|
19
19
|
import {
|
|
20
20
|
isPermitted
|
|
21
21
|
} from "./chunk-GWSBHC4J.js";
|
|
@@ -3290,4 +3290,4 @@ export {
|
|
|
3290
3290
|
PublicPageDiagnostic,
|
|
3291
3291
|
PublicPageContextChecker
|
|
3292
3292
|
};
|
|
3293
|
-
//# sourceMappingURL=chunk-
|
|
3293
|
+
//# sourceMappingURL=chunk-7SLC6HXW.js.map
|
|
@@ -1113,6 +1113,9 @@ function FilterRow({ table, visibleColumns }) {
|
|
|
1113
1113
|
const column = table.getColumn(columnId);
|
|
1114
1114
|
if (!column) return [];
|
|
1115
1115
|
const columnDef = column.columnDef;
|
|
1116
|
+
if (columnDef.filterSelectOptions && Array.isArray(columnDef.filterSelectOptions)) {
|
|
1117
|
+
return columnDef.filterSelectOptions;
|
|
1118
|
+
}
|
|
1116
1119
|
if (columnDef.fieldOptions && Array.isArray(columnDef.fieldOptions)) {
|
|
1117
1120
|
return columnDef.fieldOptions;
|
|
1118
1121
|
}
|
|
@@ -1132,6 +1135,9 @@ function FilterRow({ table, visibleColumns }) {
|
|
|
1132
1135
|
if (columnDef.filterType) {
|
|
1133
1136
|
return columnDef.filterType;
|
|
1134
1137
|
}
|
|
1138
|
+
if (columnDef.filterSelectOptions && Array.isArray(columnDef.filterSelectOptions)) {
|
|
1139
|
+
return "select";
|
|
1140
|
+
}
|
|
1135
1141
|
if (columnId.toLowerCase().includes("date") || columnId.toLowerCase().includes("time")) {
|
|
1136
1142
|
return "date";
|
|
1137
1143
|
}
|
|
@@ -1232,7 +1238,16 @@ function ActionButtons({
|
|
|
1232
1238
|
{
|
|
1233
1239
|
variant: action.variant === "destructive" ? "destructive" : "ghost",
|
|
1234
1240
|
size: "sm",
|
|
1235
|
-
onClick: () =>
|
|
1241
|
+
onClick: () => {
|
|
1242
|
+
if (false) {
|
|
1243
|
+
console.log("[ActionButtons] Action clicked:", {
|
|
1244
|
+
actionLabel: action.label,
|
|
1245
|
+
rowOriginal: row.original,
|
|
1246
|
+
actionOnClick: typeof action.onClick
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
action.onClick(row.original);
|
|
1250
|
+
},
|
|
1236
1251
|
disabled: isDisabled,
|
|
1237
1252
|
"aria-disabled": isDisabled,
|
|
1238
1253
|
"data-testid": action.testId,
|
|
@@ -1268,7 +1283,16 @@ function ActionButtons({
|
|
|
1268
1283
|
SelectItem,
|
|
1269
1284
|
{
|
|
1270
1285
|
value: `action-${actionIndex}`,
|
|
1271
|
-
onClick: () =>
|
|
1286
|
+
onClick: () => {
|
|
1287
|
+
if (false) {
|
|
1288
|
+
console.log("[ActionButtons] Dropdown action clicked:", {
|
|
1289
|
+
actionLabel: action.label,
|
|
1290
|
+
rowOriginal: row.original,
|
|
1291
|
+
actionOnClick: typeof action.onClick
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
action.onClick(row.original);
|
|
1295
|
+
},
|
|
1272
1296
|
className: action.variant === "destructive" ? "text-acc-600" : "",
|
|
1273
1297
|
children: [
|
|
1274
1298
|
Icon && /* @__PURE__ */ jsx10(Icon, { className: "mr-2 h-4 w-4" }),
|
|
@@ -1351,6 +1375,9 @@ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
|
1351
1375
|
var VIRTUALIZATION_THRESHOLD = 1e3;
|
|
1352
1376
|
var renderEditField = (column, value, onChange, editingData = {}, placeholder) => {
|
|
1353
1377
|
const columnDef = column.columnDef;
|
|
1378
|
+
if (columnDef.editable === false) {
|
|
1379
|
+
return /* @__PURE__ */ jsx11("span", { className: "text-sm text-gray-600", children: value || "" });
|
|
1380
|
+
}
|
|
1354
1381
|
if (columnDef.fieldType === "select" && columnDef.fieldOptions) {
|
|
1355
1382
|
const accessorKey = columnDef.editAccessorKey || column.id;
|
|
1356
1383
|
const currentValue = editingData[accessorKey] || value || "";
|
|
@@ -3585,6 +3612,23 @@ function DataTableInternal({
|
|
|
3585
3612
|
}), [permissions.canUpdate.can, permissions.canDelete.can, permissions.canCreate.can, permissions.canImport.can, permissions.canExport.can, onEditRow, onDeleteRow, onCreateRow, onImport, onExport, onDeleteSelected]);
|
|
3586
3613
|
const effectiveActions = useMemo6(() => {
|
|
3587
3614
|
const result = [...actions];
|
|
3615
|
+
if (false) {
|
|
3616
|
+
console.log("[DataTable] Action Configuration Debug:", {
|
|
3617
|
+
originalActions: actions.length,
|
|
3618
|
+
secureFeatures: {
|
|
3619
|
+
editing: secureFeatures.editing,
|
|
3620
|
+
deletion: secureFeatures.deletion
|
|
3621
|
+
},
|
|
3622
|
+
secureHandlers: {
|
|
3623
|
+
onEditRow: !!secureHandlers.onEditRow,
|
|
3624
|
+
onDeleteRow: !!secureHandlers.onDeleteRow
|
|
3625
|
+
},
|
|
3626
|
+
permissions: {
|
|
3627
|
+
canUpdate: permissions.canUpdate.can,
|
|
3628
|
+
canDelete: permissions.canDelete.can
|
|
3629
|
+
}
|
|
3630
|
+
});
|
|
3631
|
+
}
|
|
3588
3632
|
if (secureFeatures.editing && secureHandlers.onEditRow && !result.some((a) => a.label === "Edit")) {
|
|
3589
3633
|
result.push({
|
|
3590
3634
|
label: "Edit",
|
|
@@ -3615,6 +3659,13 @@ function DataTableInternal({
|
|
|
3615
3659
|
hidden: !permissions.canDelete.can
|
|
3616
3660
|
});
|
|
3617
3661
|
}
|
|
3662
|
+
if (false) {
|
|
3663
|
+
console.log("[DataTable] Final Actions:", {
|
|
3664
|
+
totalActions: result.length,
|
|
3665
|
+
actionLabels: result.map((a) => a.label),
|
|
3666
|
+
hiddenActions: result.filter((a) => a.hidden).map((a) => a.label)
|
|
3667
|
+
});
|
|
3668
|
+
}
|
|
3618
3669
|
return result;
|
|
3619
3670
|
}, [actions, secureFeatures, permissions, secureHandlers, getRowId, tableActions]);
|
|
3620
3671
|
const enhancedColumns = useMemo6(() => {
|
|
@@ -5369,6 +5420,9 @@ init_Button();
|
|
|
5369
5420
|
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5370
5421
|
var renderEditField2 = (column, value, onChange, editingData = {}, placeholder) => {
|
|
5371
5422
|
const columnDef = column.columnDef;
|
|
5423
|
+
if (columnDef.editable === false) {
|
|
5424
|
+
return /* @__PURE__ */ jsx25("span", { className: "text-sm text-gray-600", children: value || "" });
|
|
5425
|
+
}
|
|
5372
5426
|
if (columnDef.fieldType === "select" && columnDef.fieldOptions) {
|
|
5373
5427
|
const editKey = columnDef.editAccessorKey || column.id;
|
|
5374
5428
|
const editValue = editingData[editKey] || value;
|
|
@@ -5530,4 +5584,4 @@ export {
|
|
|
5530
5584
|
GroupHeader,
|
|
5531
5585
|
EditableRow
|
|
5532
5586
|
};
|
|
5533
|
-
//# sourceMappingURL=chunk-
|
|
5587
|
+
//# sourceMappingURL=chunk-MQS7SEE6.js.map
|