@jmruthers/pace-core 0.5.73 → 0.5.74
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-INW5YIFV.js → DataTable-2QR5TER5.js} +5 -5
- package/dist/{UnifiedAuthProvider-6SYT5WFN.js → UnifiedAuthProvider-K4NRGXL4.js} +2 -2
- package/dist/{chunk-RJNE764D.js → chunk-B5LK25HV.js} +2 -2
- package/dist/{chunk-43C63KLH.js → chunk-BKVGJVUR.js} +4 -4
- package/dist/{chunk-5A4RL4BC.js → chunk-C5Q5LRU5.js} +56 -35
- package/dist/chunk-C5Q5LRU5.js.map +1 -0
- package/dist/{chunk-LANO5IFV.js → chunk-DG5Z55HH.js} +3 -3
- package/dist/{chunk-BYG6OSTC.js → chunk-H2TNUICK.js} +7 -7
- package/dist/chunk-H2TNUICK.js.map +1 -0
- package/dist/{chunk-GBC5PC3N.js → chunk-IHMMNKNA.js} +3 -3
- package/dist/{chunk-GBC5PC3N.js.map → chunk-IHMMNKNA.js.map} +1 -1
- package/dist/{chunk-M4UMXYNK.js → chunk-LVQ26TCN.js} +2 -2
- package/dist/{chunk-UC2BWIK7.js → chunk-ORSMVXO2.js} +4 -4
- package/dist/{chunk-2PRPDH66.js → chunk-UJMCGBLS.js} +3 -3
- package/dist/{chunk-F24P24TZ.js → chunk-V6BHACCH.js} +3 -3
- package/dist/components.js +7 -7
- package/dist/hooks.js +5 -5
- package/dist/index.js +10 -10
- package/dist/providers.js +3 -3
- package/dist/rbac/index.js +5 -5
- 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/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/EventContextType.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/EventProviderProps.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/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/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/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/data-tables.md +82 -1
- package/package.json +1 -1
- package/src/components/DataTable/components/DataTableCore.tsx +37 -3
- package/src/components/Dialog/Dialog.tsx +2 -2
- package/src/components/Toast/Toast.test.tsx +1 -1
- package/src/components/Toast/Toast.tsx +1 -1
- package/dist/chunk-5A4RL4BC.js.map +0 -1
- package/dist/chunk-BYG6OSTC.js.map +0 -1
- /package/dist/{DataTable-INW5YIFV.js.map → DataTable-2QR5TER5.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-6SYT5WFN.js.map → UnifiedAuthProvider-K4NRGXL4.js.map} +0 -0
- /package/dist/{chunk-RJNE764D.js.map → chunk-B5LK25HV.js.map} +0 -0
- /package/dist/{chunk-43C63KLH.js.map → chunk-BKVGJVUR.js.map} +0 -0
- /package/dist/{chunk-LANO5IFV.js.map → chunk-DG5Z55HH.js.map} +0 -0
- /package/dist/{chunk-M4UMXYNK.js.map → chunk-LVQ26TCN.js.map} +0 -0
- /package/dist/{chunk-UC2BWIK7.js.map → chunk-ORSMVXO2.js.map} +0 -0
- /package/dist/{chunk-2PRPDH66.js.map → chunk-UJMCGBLS.js.map} +0 -0
- /package/dist/{chunk-F24P24TZ.js.map → chunk-V6BHACCH.js.map} +0 -0
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
useDataTableContext,
|
|
33
33
|
usePluginRegistry,
|
|
34
34
|
useStateManager
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-C5Q5LRU5.js";
|
|
36
|
+
import "./chunk-UJMCGBLS.js";
|
|
37
37
|
import "./chunk-FGMFQSHX.js";
|
|
38
38
|
import "./chunk-B2WTCLCV.js";
|
|
39
39
|
import {
|
|
@@ -47,8 +47,8 @@ import {
|
|
|
47
47
|
throttle,
|
|
48
48
|
useDataTablePerformance
|
|
49
49
|
} from "./chunk-YNUBMSMV.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-B5LK25HV.js";
|
|
51
|
+
import "./chunk-IHMMNKNA.js";
|
|
52
52
|
import "./chunk-ULBI5JGB.js";
|
|
53
53
|
import "./chunk-5BSLGBYI.js";
|
|
54
54
|
import "./chunk-3SP4P7NS.js";
|
|
@@ -99,4 +99,4 @@ export {
|
|
|
99
99
|
usePluginRegistry,
|
|
100
100
|
useStateManager
|
|
101
101
|
};
|
|
102
|
-
//# sourceMappingURL=DataTable-
|
|
102
|
+
//# sourceMappingURL=DataTable-2QR5TER5.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
UnifiedAuthProvider,
|
|
3
3
|
init_UnifiedAuthProvider,
|
|
4
4
|
useUnifiedAuth
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IHMMNKNA.js";
|
|
6
6
|
import "./chunk-ULBI5JGB.js";
|
|
7
7
|
import "./chunk-CDDYJCYU.js";
|
|
8
8
|
import "./chunk-PLDDJCW6.js";
|
|
@@ -11,4 +11,4 @@ export {
|
|
|
11
11
|
UnifiedAuthProvider,
|
|
12
12
|
useUnifiedAuth
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=UnifiedAuthProvider-
|
|
14
|
+
//# sourceMappingURL=UnifiedAuthProvider-K4NRGXL4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_UnifiedAuthProvider,
|
|
3
3
|
useUnifiedAuth
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IHMMNKNA.js";
|
|
5
5
|
import {
|
|
6
6
|
init_organisationContext,
|
|
7
7
|
setOrganisationContext
|
|
@@ -950,4 +950,4 @@ export {
|
|
|
950
950
|
EventProvider_exports,
|
|
951
951
|
init_EventProvider
|
|
952
952
|
};
|
|
953
|
-
//# sourceMappingURL=chunk-
|
|
953
|
+
//# sourceMappingURL=chunk-B5LK25HV.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
useAccessLevel,
|
|
6
6
|
useCan
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UJMCGBLS.js";
|
|
8
8
|
import {
|
|
9
9
|
OrganisationContextRequiredError,
|
|
10
10
|
RBACCache,
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
} from "./chunk-FGMFQSHX.js";
|
|
14
14
|
import {
|
|
15
15
|
useSecureDataAccess
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DG5Z55HH.js";
|
|
17
17
|
import {
|
|
18
18
|
init_RBACProvider,
|
|
19
19
|
init_UnifiedAuthProvider,
|
|
20
20
|
useUnifiedAuth
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-IHMMNKNA.js";
|
|
22
22
|
import {
|
|
23
23
|
getCurrentAppName,
|
|
24
24
|
init_appNameResolver
|
|
@@ -1826,4 +1826,4 @@ export {
|
|
|
1826
1826
|
getPermissionsForRole,
|
|
1827
1827
|
ALL_PERMISSIONS
|
|
1828
1828
|
};
|
|
1829
|
-
//# sourceMappingURL=chunk-
|
|
1829
|
+
//# sourceMappingURL=chunk-BKVGJVUR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UJMCGBLS.js";
|
|
4
4
|
import {
|
|
5
5
|
useDataTablePerformance
|
|
6
6
|
} from "./chunk-YNUBMSMV.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
init_Button,
|
|
15
15
|
init_UnifiedAuthProvider,
|
|
16
16
|
useUnifiedAuth
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IHMMNKNA.js";
|
|
18
18
|
import {
|
|
19
19
|
getCurrentAppName,
|
|
20
20
|
init_appNameResolver
|
|
@@ -3314,6 +3314,35 @@ function AccessDeniedPage({
|
|
|
3314
3314
|
] }) }) });
|
|
3315
3315
|
}
|
|
3316
3316
|
|
|
3317
|
+
// src/components/DataTable/utils/exportUtils.ts
|
|
3318
|
+
function generateCSVContent(data, columns, options = {}) {
|
|
3319
|
+
if (!data.length) return "";
|
|
3320
|
+
const { includeHeaders = true } = options;
|
|
3321
|
+
const headers = columns.map((col) => col.header || col.id || "Column");
|
|
3322
|
+
const csvData = data.map((row) => {
|
|
3323
|
+
return columns.map((col) => {
|
|
3324
|
+
const key = col.accessorKey || col.id;
|
|
3325
|
+
const value = row[key];
|
|
3326
|
+
const escapedValue = String(value || "").replace(/"/g, '""');
|
|
3327
|
+
return `"${escapedValue}"`;
|
|
3328
|
+
}).join(",");
|
|
3329
|
+
});
|
|
3330
|
+
const csvContent = includeHeaders ? [headers.join(","), ...csvData].join("\n") : csvData.join("\n");
|
|
3331
|
+
return csvContent;
|
|
3332
|
+
}
|
|
3333
|
+
function exportToCSV(data, columns, filename = "download.csv") {
|
|
3334
|
+
const csvContent = generateCSVContent(data, columns);
|
|
3335
|
+
const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
|
|
3336
|
+
const link = document.createElement("a");
|
|
3337
|
+
const url = URL.createObjectURL(blob);
|
|
3338
|
+
link.setAttribute("href", url);
|
|
3339
|
+
link.setAttribute("download", filename);
|
|
3340
|
+
link.style.display = "none";
|
|
3341
|
+
document.body.appendChild(link);
|
|
3342
|
+
link.click();
|
|
3343
|
+
document.body.removeChild(link);
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3317
3346
|
// src/components/DataTable/components/DataTableCore.tsx
|
|
3318
3347
|
init_UnifiedAuthProvider();
|
|
3319
3348
|
init_appNameResolver();
|
|
@@ -3701,7 +3730,17 @@ function DataTableInternal({
|
|
|
3701
3730
|
if (!permissions.canUpdate.can) {
|
|
3702
3731
|
throw new Error("Insufficient permissions to edit this resource");
|
|
3703
3732
|
}
|
|
3704
|
-
|
|
3733
|
+
let rowId;
|
|
3734
|
+
if (getRowId) {
|
|
3735
|
+
const rowIndex = data.findIndex((r) => r === row);
|
|
3736
|
+
rowId = getRowId(row, rowIndex);
|
|
3737
|
+
} else {
|
|
3738
|
+
rowId = row.id;
|
|
3739
|
+
}
|
|
3740
|
+
if (!rowId) {
|
|
3741
|
+
console.error("[DataTable] Cannot edit row: no id found. Make sure to provide getRowId or ensure row data has an id property.");
|
|
3742
|
+
return;
|
|
3743
|
+
}
|
|
3705
3744
|
tableActions.setEditingRow(rowId, { ...row });
|
|
3706
3745
|
},
|
|
3707
3746
|
icon: Edit,
|
|
@@ -3925,6 +3964,17 @@ function DataTableInternal({
|
|
|
3925
3964
|
onCreateRow: secureFeatures.creation && secureHandlers.onCreateRow ? () => tableActions.setCreating(true) : void 0,
|
|
3926
3965
|
onImportClick: () => setShowImportModal(true),
|
|
3927
3966
|
onExport: secureHandlers.onExport || (() => {
|
|
3967
|
+
const currentData = table.getFilteredRowModel().rows.map((row) => row.original);
|
|
3968
|
+
const visibleColumns2 = columns.filter((col) => {
|
|
3969
|
+
const column = table.getColumn(col.accessorKey);
|
|
3970
|
+
return column && column.getIsVisible();
|
|
3971
|
+
}).map((col) => ({
|
|
3972
|
+
...col,
|
|
3973
|
+
header: typeof col.header === "string" ? col.header : col.accessorKey || "Column"
|
|
3974
|
+
}));
|
|
3975
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
3976
|
+
const filename = title ? `${title.replace(/[^a-z0-9]/gi, "_").toLowerCase()}_${timestamp}.csv` : `data_export_${timestamp}.csv`;
|
|
3977
|
+
exportToCSV(currentData, visibleColumns2, filename);
|
|
3928
3978
|
}),
|
|
3929
3979
|
rowSelection,
|
|
3930
3980
|
onDeleteSelected: secureHandlers.onDeleteSelected,
|
|
@@ -5016,35 +5066,6 @@ var PluginRegistryImpl = class {
|
|
|
5016
5066
|
}
|
|
5017
5067
|
};
|
|
5018
5068
|
|
|
5019
|
-
// src/components/DataTable/utils/exportUtils.ts
|
|
5020
|
-
function generateCSVContent(data, columns, options = {}) {
|
|
5021
|
-
if (!data.length) return "";
|
|
5022
|
-
const { includeHeaders = true } = options;
|
|
5023
|
-
const headers = columns.map((col) => col.header || col.id || "Column");
|
|
5024
|
-
const csvData = data.map((row) => {
|
|
5025
|
-
return columns.map((col) => {
|
|
5026
|
-
const key = col.accessorKey || col.id;
|
|
5027
|
-
const value = row[key];
|
|
5028
|
-
const escapedValue = String(value || "").replace(/"/g, '""');
|
|
5029
|
-
return `"${escapedValue}"`;
|
|
5030
|
-
}).join(",");
|
|
5031
|
-
});
|
|
5032
|
-
const csvContent = includeHeaders ? [headers.join(","), ...csvData].join("\n") : csvData.join("\n");
|
|
5033
|
-
return csvContent;
|
|
5034
|
-
}
|
|
5035
|
-
function exportToCSV(data, columns, filename = "download.csv") {
|
|
5036
|
-
const csvContent = generateCSVContent(data, columns);
|
|
5037
|
-
const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
|
|
5038
|
-
const link = document.createElement("a");
|
|
5039
|
-
const url = URL.createObjectURL(blob);
|
|
5040
|
-
link.setAttribute("href", url);
|
|
5041
|
-
link.setAttribute("download", filename);
|
|
5042
|
-
link.style.display = "none";
|
|
5043
|
-
document.body.appendChild(link);
|
|
5044
|
-
link.click();
|
|
5045
|
-
document.body.removeChild(link);
|
|
5046
|
-
}
|
|
5047
|
-
|
|
5048
5069
|
// src/components/DataTable/core/LocalDataAdapter.ts
|
|
5049
5070
|
var LocalDataAdapter = class {
|
|
5050
5071
|
constructor(initialData = []) {
|
|
@@ -5646,6 +5667,8 @@ export {
|
|
|
5646
5667
|
DataTableModals,
|
|
5647
5668
|
DataTableErrorBoundary,
|
|
5648
5669
|
ColumnFactory,
|
|
5670
|
+
generateCSVContent,
|
|
5671
|
+
exportToCSV,
|
|
5649
5672
|
DataTableCore,
|
|
5650
5673
|
DataTable,
|
|
5651
5674
|
DataManager,
|
|
@@ -5653,8 +5676,6 @@ export {
|
|
|
5653
5676
|
ActionManagerImpl,
|
|
5654
5677
|
StateManagerImpl,
|
|
5655
5678
|
PluginRegistryImpl,
|
|
5656
|
-
generateCSVContent,
|
|
5657
|
-
exportToCSV,
|
|
5658
5679
|
LocalDataAdapter,
|
|
5659
5680
|
DataTableProvider,
|
|
5660
5681
|
useDataTableContext,
|
|
@@ -5667,4 +5688,4 @@ export {
|
|
|
5667
5688
|
GroupHeader,
|
|
5668
5689
|
EditableRow
|
|
5669
5690
|
};
|
|
5670
|
-
//# sourceMappingURL=chunk-
|
|
5691
|
+
//# sourceMappingURL=chunk-C5Q5LRU5.js.map
|