@machinemetrics/mm-react-components 0.2.3-20 → 0.2.3-21
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/components/ui/data-table/TableView.d.ts +1 -1
- package/dist/components/ui/data-table/TableView.d.ts.map +1 -1
- package/dist/components/ui/data-table/cards/ResponsiveTable.d.ts +1 -1
- package/dist/components/ui/data-table/cards/ResponsiveTable.d.ts.map +1 -1
- package/dist/components/ui/data-table/cards/RowCard.d.ts +2 -1
- package/dist/components/ui/data-table/cards/RowCard.d.ts.map +1 -1
- package/dist/components/ui/data-table/pagination.d.ts +3 -1
- package/dist/components/ui/data-table/pagination.d.ts.map +1 -1
- package/dist/components/ui/data-table/parts/BatchActionsToolbar.d.ts +2 -1
- package/dist/components/ui/data-table/parts/BatchActionsToolbar.d.ts.map +1 -1
- package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts +2 -1
- package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts.map +1 -1
- package/dist/components/ui/data-table/types.d.ts +17 -2
- package/dist/components/ui/data-table/types.d.ts.map +1 -1
- package/dist/components/ui/data-table/useTableController.d.ts +12 -1
- package/dist/components/ui/data-table/useTableController.d.ts.map +1 -1
- package/dist/mm-react-components.es.js +228 -38
- package/dist/mm-react-components.es.js.map +1 -1
- package/dist/mm-react-components.umd.js +10 -10
- package/dist/mm-react-components.umd.js.map +1 -1
- package/dist/preview/DataTablePreview.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -24494,7 +24494,9 @@ function DataTablePagination({
|
|
|
24494
24494
|
table,
|
|
24495
24495
|
pageSizeOptions = [25, 50, 100, 250],
|
|
24496
24496
|
className,
|
|
24497
|
-
compact: compact2 = false
|
|
24497
|
+
compact: compact2 = false,
|
|
24498
|
+
onPageChange,
|
|
24499
|
+
onPageSizeChange
|
|
24498
24500
|
}) {
|
|
24499
24501
|
const state = table.getState();
|
|
24500
24502
|
const pageSize = state.pagination?.pageSize ?? 25;
|
|
@@ -24534,6 +24536,12 @@ function DataTablePagination({
|
|
|
24534
24536
|
const size2 = Number(value);
|
|
24535
24537
|
table.setPageIndex(0);
|
|
24536
24538
|
table.setPageSize(size2);
|
|
24539
|
+
if (onPageSizeChange) {
|
|
24540
|
+
onPageSizeChange(size2);
|
|
24541
|
+
}
|
|
24542
|
+
if (onPageChange) {
|
|
24543
|
+
onPageChange(0);
|
|
24544
|
+
}
|
|
24537
24545
|
},
|
|
24538
24546
|
children: [
|
|
24539
24547
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "h-9 w-20", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, {}) }),
|
|
@@ -24551,7 +24559,12 @@ function DataTablePagination({
|
|
|
24551
24559
|
{
|
|
24552
24560
|
variant: "outline",
|
|
24553
24561
|
className: "h-9 rounded-md px-3",
|
|
24554
|
-
onClick: () =>
|
|
24562
|
+
onClick: () => {
|
|
24563
|
+
table.previousPage();
|
|
24564
|
+
if (onPageChange) {
|
|
24565
|
+
onPageChange(table.getState().pagination?.pageIndex ?? 0);
|
|
24566
|
+
}
|
|
24567
|
+
},
|
|
24555
24568
|
disabled: !canPrev,
|
|
24556
24569
|
"data-slot": "previous",
|
|
24557
24570
|
children: "Previous"
|
|
@@ -24581,7 +24594,12 @@ function DataTablePagination({
|
|
|
24581
24594
|
{
|
|
24582
24595
|
variant: "outline",
|
|
24583
24596
|
className: "h-9 rounded-md px-3",
|
|
24584
|
-
onClick: () =>
|
|
24597
|
+
onClick: () => {
|
|
24598
|
+
table.nextPage();
|
|
24599
|
+
if (onPageChange) {
|
|
24600
|
+
onPageChange(table.getState().pagination?.pageIndex ?? 0);
|
|
24601
|
+
}
|
|
24602
|
+
},
|
|
24585
24603
|
disabled: !canNext,
|
|
24586
24604
|
"data-slot": "next",
|
|
24587
24605
|
children: "Next"
|
|
@@ -25980,6 +25998,7 @@ function DataTableToolbar({
|
|
|
25980
25998
|
columnRegistry,
|
|
25981
25999
|
onResetColumns,
|
|
25982
26000
|
onExport,
|
|
26001
|
+
onExportComplete,
|
|
25983
26002
|
options
|
|
25984
26003
|
}) {
|
|
25985
26004
|
const registeredFilters = useColumnFilters(table, columnRegistry);
|
|
@@ -25998,6 +26017,9 @@ function DataTableToolbar({
|
|
|
25998
26017
|
const handleExport = React.useCallback(() => {
|
|
25999
26018
|
if (onExport) {
|
|
26000
26019
|
onExport();
|
|
26020
|
+
if (onExportComplete) {
|
|
26021
|
+
onExportComplete(table.getFilteredRowModel().rows.length);
|
|
26022
|
+
}
|
|
26001
26023
|
return;
|
|
26002
26024
|
}
|
|
26003
26025
|
const headers = table.getVisibleLeafColumns().map((col) => col.id);
|
|
@@ -26015,7 +26037,10 @@ function DataTableToolbar({
|
|
|
26015
26037
|
a2.download = "data.csv";
|
|
26016
26038
|
a2.click();
|
|
26017
26039
|
URL.revokeObjectURL(url);
|
|
26018
|
-
|
|
26040
|
+
if (onExportComplete) {
|
|
26041
|
+
onExportComplete(rows.length);
|
|
26042
|
+
}
|
|
26043
|
+
}, [onExport, onExportComplete, table]);
|
|
26019
26044
|
const clearAllFilters = React.useCallback(() => {
|
|
26020
26045
|
registeredFilters.forEach((filter) => {
|
|
26021
26046
|
filter.column.setFilterValue(void 0);
|
|
@@ -26067,7 +26092,7 @@ function DataTableToolbar({
|
|
|
26067
26092
|
event.preventDefault();
|
|
26068
26093
|
event.stopPropagation();
|
|
26069
26094
|
const value = event.currentTarget.value.trim();
|
|
26070
|
-
if (opts.onSearchSubmit
|
|
26095
|
+
if (opts.onSearchSubmit) {
|
|
26071
26096
|
opts.onSearchSubmit(value);
|
|
26072
26097
|
}
|
|
26073
26098
|
}
|
|
@@ -26105,12 +26130,18 @@ function DataTableToolbar({
|
|
|
26105
26130
|
) : null
|
|
26106
26131
|
] })
|
|
26107
26132
|
] }),
|
|
26108
|
-
|
|
26109
|
-
|
|
26110
|
-
|
|
26111
|
-
|
|
26112
|
-
|
|
26113
|
-
|
|
26133
|
+
(() => {
|
|
26134
|
+
if (typeof opts.belowControls === "function") {
|
|
26135
|
+
return opts.belowControls({
|
|
26136
|
+
globalFilter,
|
|
26137
|
+
onSearchChange: opts.onSearchChange,
|
|
26138
|
+
onSearchSubmit: opts.onSearchSubmit,
|
|
26139
|
+
loading
|
|
26140
|
+
});
|
|
26141
|
+
} else {
|
|
26142
|
+
return opts.belowControls ?? null;
|
|
26143
|
+
}
|
|
26144
|
+
})()
|
|
26114
26145
|
] });
|
|
26115
26146
|
}
|
|
26116
26147
|
/**
|
|
@@ -29257,7 +29288,21 @@ function useBreakpoint(query = QUERY) {
|
|
|
29257
29288
|
return matches;
|
|
29258
29289
|
}
|
|
29259
29290
|
function useTableController(options) {
|
|
29260
|
-
const {
|
|
29291
|
+
const {
|
|
29292
|
+
columns,
|
|
29293
|
+
data,
|
|
29294
|
+
columnRegistry,
|
|
29295
|
+
initialState: initialState2,
|
|
29296
|
+
tableId,
|
|
29297
|
+
onRowSelectionChange,
|
|
29298
|
+
onSortingChange,
|
|
29299
|
+
onPaginationChange,
|
|
29300
|
+
onColumnVisibilityChange,
|
|
29301
|
+
onColumnOrderChange,
|
|
29302
|
+
onBatchAction,
|
|
29303
|
+
onRowClick,
|
|
29304
|
+
onExportComplete
|
|
29305
|
+
} = options;
|
|
29261
29306
|
const storageKey = tableId ? `mmrc:table:${tableId}` : void 0;
|
|
29262
29307
|
const persistedState = React.useMemo(() => {
|
|
29263
29308
|
if (!storageKey) return null;
|
|
@@ -29311,6 +29356,57 @@ function useTableController(options) {
|
|
|
29311
29356
|
pageIndex: 0,
|
|
29312
29357
|
pageSize: 25
|
|
29313
29358
|
});
|
|
29359
|
+
const wrappedSetRowSelection = React.useCallback(
|
|
29360
|
+
(updater) => {
|
|
29361
|
+
const newSelection = typeof updater === "function" ? updater(rowSelection) : updater;
|
|
29362
|
+
setRowSelection(newSelection);
|
|
29363
|
+
if (onRowSelectionChange) {
|
|
29364
|
+
const selectedRows = data.filter((_, index2) => newSelection[index2]);
|
|
29365
|
+
onRowSelectionChange(selectedRows, newSelection);
|
|
29366
|
+
}
|
|
29367
|
+
},
|
|
29368
|
+
[rowSelection, setRowSelection, onRowSelectionChange, data]
|
|
29369
|
+
);
|
|
29370
|
+
const wrappedSetSorting = React.useCallback(
|
|
29371
|
+
(updater) => {
|
|
29372
|
+
const newSorting = typeof updater === "function" ? updater(sorting) : updater;
|
|
29373
|
+
setSorting(newSorting);
|
|
29374
|
+
if (onSortingChange) {
|
|
29375
|
+
onSortingChange(newSorting);
|
|
29376
|
+
}
|
|
29377
|
+
},
|
|
29378
|
+
[sorting, setSorting, onSortingChange]
|
|
29379
|
+
);
|
|
29380
|
+
const wrappedSetPagination = React.useCallback(
|
|
29381
|
+
(updater) => {
|
|
29382
|
+
const newPagination = typeof updater === "function" ? updater(pagination) : updater;
|
|
29383
|
+
setPagination(newPagination);
|
|
29384
|
+
if (onPaginationChange) {
|
|
29385
|
+
onPaginationChange(newPagination.pageIndex, newPagination.pageSize);
|
|
29386
|
+
}
|
|
29387
|
+
},
|
|
29388
|
+
[pagination, setPagination, onPaginationChange]
|
|
29389
|
+
);
|
|
29390
|
+
const wrappedSetColumnVisibility = React.useCallback(
|
|
29391
|
+
(updater) => {
|
|
29392
|
+
const newVisibility = typeof updater === "function" ? updater(columnVisibility) : updater;
|
|
29393
|
+
setColumnVisibility(newVisibility);
|
|
29394
|
+
if (onColumnVisibilityChange) {
|
|
29395
|
+
onColumnVisibilityChange(newVisibility);
|
|
29396
|
+
}
|
|
29397
|
+
},
|
|
29398
|
+
[columnVisibility, setColumnVisibility, onColumnVisibilityChange]
|
|
29399
|
+
);
|
|
29400
|
+
const wrappedSetColumnOrder = React.useCallback(
|
|
29401
|
+
(updater) => {
|
|
29402
|
+
const newOrder = typeof updater === "function" ? updater(columnOrder) : updater;
|
|
29403
|
+
setColumnOrder(newOrder);
|
|
29404
|
+
if (onColumnOrderChange) {
|
|
29405
|
+
onColumnOrderChange(newOrder);
|
|
29406
|
+
}
|
|
29407
|
+
},
|
|
29408
|
+
[columnOrder, setColumnOrder, onColumnOrderChange]
|
|
29409
|
+
);
|
|
29314
29410
|
React.useEffect(() => {
|
|
29315
29411
|
if (!storageKey) return;
|
|
29316
29412
|
try {
|
|
@@ -29338,13 +29434,13 @@ function useTableController(options) {
|
|
|
29338
29434
|
enableRowSelection: true,
|
|
29339
29435
|
enableColumnResizing: true,
|
|
29340
29436
|
enableColumnPinning: true,
|
|
29341
|
-
onRowSelectionChange:
|
|
29342
|
-
onSortingChange:
|
|
29343
|
-
onColumnVisibilityChange:
|
|
29344
|
-
onColumnOrderChange:
|
|
29437
|
+
onRowSelectionChange: wrappedSetRowSelection,
|
|
29438
|
+
onSortingChange: wrappedSetSorting,
|
|
29439
|
+
onColumnVisibilityChange: wrappedSetColumnVisibility,
|
|
29440
|
+
onColumnOrderChange: wrappedSetColumnOrder,
|
|
29345
29441
|
onGlobalFilterChange: setGlobalFilter,
|
|
29346
29442
|
onColumnPinningChange: setColumnPinning,
|
|
29347
|
-
onPaginationChange:
|
|
29443
|
+
onPaginationChange: wrappedSetPagination,
|
|
29348
29444
|
getCoreRowModel: getCoreRowModel(),
|
|
29349
29445
|
getSortedRowModel: getSortedRowModel(),
|
|
29350
29446
|
getFilteredRowModel: getFilteredRowModel(),
|
|
@@ -29421,7 +29517,11 @@ function useTableController(options) {
|
|
|
29421
29517
|
setGlobalFilter,
|
|
29422
29518
|
pagination,
|
|
29423
29519
|
setPagination,
|
|
29424
|
-
handleResetColumns
|
|
29520
|
+
handleResetColumns,
|
|
29521
|
+
// Event callbacks for child components
|
|
29522
|
+
onBatchAction,
|
|
29523
|
+
onRowClick,
|
|
29524
|
+
onExportComplete
|
|
29425
29525
|
};
|
|
29426
29526
|
}
|
|
29427
29527
|
function exportTableToCSV(table, filename = "data.csv") {
|
|
@@ -29818,7 +29918,8 @@ function TableBody({
|
|
|
29818
29918
|
}
|
|
29819
29919
|
function BatchActionsToolbar({
|
|
29820
29920
|
selectedCount,
|
|
29821
|
-
onDeleteSelected
|
|
29921
|
+
onDeleteSelected,
|
|
29922
|
+
onBatchAction
|
|
29822
29923
|
}) {
|
|
29823
29924
|
if (selectedCount <= 0) return null;
|
|
29824
29925
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 mb-2 px-1", children: [
|
|
@@ -29832,6 +29933,10 @@ function BatchActionsToolbar({
|
|
|
29832
29933
|
variant: "destructive",
|
|
29833
29934
|
size: "sm",
|
|
29834
29935
|
onClick: () => {
|
|
29936
|
+
if (onBatchAction) {
|
|
29937
|
+
onBatchAction("delete", []);
|
|
29938
|
+
return;
|
|
29939
|
+
}
|
|
29835
29940
|
if (onDeleteSelected) {
|
|
29836
29941
|
onDeleteSelected(selectedCount);
|
|
29837
29942
|
return;
|
|
@@ -29859,7 +29964,15 @@ function DataTable({
|
|
|
29859
29964
|
tableId,
|
|
29860
29965
|
toolbar,
|
|
29861
29966
|
emptyState,
|
|
29862
|
-
forceEmptyState
|
|
29967
|
+
forceEmptyState,
|
|
29968
|
+
onRowSelectionChange,
|
|
29969
|
+
onSortingChange,
|
|
29970
|
+
onPaginationChange,
|
|
29971
|
+
onColumnVisibilityChange,
|
|
29972
|
+
onColumnOrderChange,
|
|
29973
|
+
onBatchAction,
|
|
29974
|
+
onRowClick,
|
|
29975
|
+
onExportComplete
|
|
29863
29976
|
}) {
|
|
29864
29977
|
const debug2 = (..._args) => {
|
|
29865
29978
|
return;
|
|
@@ -29869,13 +29982,23 @@ function DataTable({
|
|
|
29869
29982
|
resolvedColumns,
|
|
29870
29983
|
globalFilter,
|
|
29871
29984
|
setGlobalFilter,
|
|
29872
|
-
handleResetColumns
|
|
29985
|
+
handleResetColumns,
|
|
29986
|
+
onBatchAction: controllerOnBatchAction,
|
|
29987
|
+
onExportComplete: controllerOnExportComplete
|
|
29873
29988
|
} = useTableController({
|
|
29874
29989
|
columns,
|
|
29875
29990
|
data,
|
|
29876
29991
|
columnRegistry,
|
|
29877
29992
|
initialState: initialState2,
|
|
29878
|
-
tableId
|
|
29993
|
+
tableId,
|
|
29994
|
+
onRowSelectionChange,
|
|
29995
|
+
onSortingChange,
|
|
29996
|
+
onPaginationChange,
|
|
29997
|
+
onColumnVisibilityChange,
|
|
29998
|
+
onColumnOrderChange,
|
|
29999
|
+
onBatchAction,
|
|
30000
|
+
onRowClick,
|
|
30001
|
+
onExportComplete
|
|
29879
30002
|
});
|
|
29880
30003
|
const [isDragging, setIsDragging] = React.useState(false);
|
|
29881
30004
|
const [activeColumnId, setActiveColumnId] = React.useState(
|
|
@@ -29981,13 +30104,18 @@ function DataTable({
|
|
|
29981
30104
|
onResetColumns: handleResetColumns,
|
|
29982
30105
|
columnRegistry,
|
|
29983
30106
|
onExport: () => exportTableToCSV(table),
|
|
30107
|
+
onExportComplete: controllerOnExportComplete,
|
|
29984
30108
|
options: toolbar
|
|
29985
30109
|
}
|
|
29986
30110
|
),
|
|
29987
30111
|
table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29988
30112
|
BatchActionsToolbar,
|
|
29989
30113
|
{
|
|
29990
|
-
selectedCount: table.getFilteredSelectedRowModel().rows.length
|
|
30114
|
+
selectedCount: table.getFilteredSelectedRowModel().rows.length,
|
|
30115
|
+
onBatchAction: controllerOnBatchAction ? (action) => {
|
|
30116
|
+
const selectedRows = table.getFilteredSelectedRowModel().rows.map((row) => row.original);
|
|
30117
|
+
controllerOnBatchAction(action, selectedRows);
|
|
30118
|
+
} : void 0
|
|
29991
30119
|
}
|
|
29992
30120
|
),
|
|
29993
30121
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -30059,7 +30187,20 @@ function DataTable({
|
|
|
30059
30187
|
)
|
|
30060
30188
|
}
|
|
30061
30189
|
),
|
|
30062
|
-
isForcedEmpty ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border bg-[var(--tablehead-bg)]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30190
|
+
isForcedEmpty ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border-t border-border bg-[var(--tablehead-bg)]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
30191
|
+
DataTablePagination,
|
|
30192
|
+
{
|
|
30193
|
+
table,
|
|
30194
|
+
onPageChange: onPaginationChange ? (pageIndex) => onPaginationChange(
|
|
30195
|
+
pageIndex,
|
|
30196
|
+
table.getState().pagination?.pageSize ?? 25
|
|
30197
|
+
) : void 0,
|
|
30198
|
+
onPageSizeChange: onPaginationChange ? (pageSize) => onPaginationChange(
|
|
30199
|
+
table.getState().pagination?.pageIndex ?? 0,
|
|
30200
|
+
pageSize
|
|
30201
|
+
) : void 0
|
|
30202
|
+
}
|
|
30203
|
+
) })
|
|
30063
30204
|
] });
|
|
30064
30205
|
}
|
|
30065
30206
|
const ALIGNMENT_PRESETS = {
|
|
@@ -30591,7 +30732,8 @@ function getDisplayLabel(descriptor) {
|
|
|
30591
30732
|
function RowCard({
|
|
30592
30733
|
row,
|
|
30593
30734
|
columnRegistry,
|
|
30594
|
-
className
|
|
30735
|
+
className,
|
|
30736
|
+
onRowClick
|
|
30595
30737
|
}) {
|
|
30596
30738
|
const visibleCells = row.getVisibleCells();
|
|
30597
30739
|
const cellMap = new Map(visibleCells.map((cell) => [cell.column.id, cell]));
|
|
@@ -30661,14 +30803,18 @@ function RowCard({
|
|
|
30661
30803
|
const hasActions = actionItems.length > 0;
|
|
30662
30804
|
const [showActions, setShowActions] = React.useState(false);
|
|
30663
30805
|
function handleCardClick(event) {
|
|
30664
|
-
if (!hasActions) return;
|
|
30665
30806
|
const target = event.target;
|
|
30666
30807
|
if (!target) return;
|
|
30667
30808
|
const interactive = target.closest(
|
|
30668
30809
|
'a,button,input,select,textarea,label,[role=checkbox],[data-slot="table-action-trigger"]'
|
|
30669
30810
|
);
|
|
30670
30811
|
if (interactive) return;
|
|
30671
|
-
|
|
30812
|
+
if (onRowClick) {
|
|
30813
|
+
onRowClick(row.original, row.index);
|
|
30814
|
+
}
|
|
30815
|
+
if (hasActions) {
|
|
30816
|
+
setShowActions((prev) => !prev);
|
|
30817
|
+
}
|
|
30672
30818
|
}
|
|
30673
30819
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
30674
30820
|
"div",
|
|
@@ -30693,12 +30839,14 @@ function RowCard({
|
|
|
30693
30839
|
return parts.join(" — ") || "Row";
|
|
30694
30840
|
})(),
|
|
30695
30841
|
"data-slot": "row-card",
|
|
30696
|
-
tabIndex: hasActions ? 0 : void 0,
|
|
30697
|
-
onClick: hasActions ? handleCardClick : void 0,
|
|
30698
|
-
onKeyDown: hasActions ? (e) => {
|
|
30842
|
+
tabIndex: hasActions || onRowClick ? 0 : void 0,
|
|
30843
|
+
onClick: hasActions || onRowClick ? handleCardClick : void 0,
|
|
30844
|
+
onKeyDown: hasActions || onRowClick ? (e) => {
|
|
30699
30845
|
if (e.key === "Enter" || e.key === " ") {
|
|
30700
30846
|
e.preventDefault();
|
|
30701
|
-
|
|
30847
|
+
handleCardClick(
|
|
30848
|
+
e
|
|
30849
|
+
);
|
|
30702
30850
|
}
|
|
30703
30851
|
} : void 0,
|
|
30704
30852
|
"aria-expanded": hasActions ? showActions : void 0,
|
|
@@ -31710,7 +31858,15 @@ function ResponsiveTable({
|
|
|
31710
31858
|
tableId,
|
|
31711
31859
|
toolbarOptions,
|
|
31712
31860
|
emptyState,
|
|
31713
|
-
forceEmptyState
|
|
31861
|
+
forceEmptyState,
|
|
31862
|
+
onRowSelectionChange,
|
|
31863
|
+
onSortingChange,
|
|
31864
|
+
onPaginationChange,
|
|
31865
|
+
onColumnVisibilityChange,
|
|
31866
|
+
onColumnOrderChange,
|
|
31867
|
+
onBatchAction,
|
|
31868
|
+
onRowClick,
|
|
31869
|
+
onExportComplete
|
|
31714
31870
|
}) {
|
|
31715
31871
|
const isMobile = useBreakpoint(breakpoint);
|
|
31716
31872
|
if (!isMobile) {
|
|
@@ -31725,7 +31881,15 @@ function ResponsiveTable({
|
|
|
31725
31881
|
tableId,
|
|
31726
31882
|
toolbar: toolbarOptions,
|
|
31727
31883
|
emptyState,
|
|
31728
|
-
forceEmptyState
|
|
31884
|
+
forceEmptyState,
|
|
31885
|
+
onRowSelectionChange,
|
|
31886
|
+
onSortingChange,
|
|
31887
|
+
onPaginationChange,
|
|
31888
|
+
onColumnVisibilityChange,
|
|
31889
|
+
onColumnOrderChange,
|
|
31890
|
+
onBatchAction,
|
|
31891
|
+
onRowClick,
|
|
31892
|
+
onExportComplete
|
|
31729
31893
|
}
|
|
31730
31894
|
) });
|
|
31731
31895
|
}
|
|
@@ -31743,7 +31907,15 @@ function ResponsiveTable({
|
|
|
31743
31907
|
overscan,
|
|
31744
31908
|
toolbarOptions,
|
|
31745
31909
|
emptyState,
|
|
31746
|
-
forceEmptyState
|
|
31910
|
+
forceEmptyState,
|
|
31911
|
+
onRowSelectionChange,
|
|
31912
|
+
onSortingChange,
|
|
31913
|
+
onPaginationChange,
|
|
31914
|
+
onColumnVisibilityChange,
|
|
31915
|
+
onColumnOrderChange,
|
|
31916
|
+
onBatchAction,
|
|
31917
|
+
onRowClick,
|
|
31918
|
+
onExportComplete
|
|
31747
31919
|
}
|
|
31748
31920
|
) });
|
|
31749
31921
|
}
|
|
@@ -31759,14 +31931,30 @@ function MobileTableInternal({
|
|
|
31759
31931
|
overscan = 8,
|
|
31760
31932
|
toolbarOptions,
|
|
31761
31933
|
emptyState,
|
|
31762
|
-
forceEmptyState
|
|
31934
|
+
forceEmptyState,
|
|
31935
|
+
onRowSelectionChange,
|
|
31936
|
+
onSortingChange,
|
|
31937
|
+
onPaginationChange,
|
|
31938
|
+
onColumnVisibilityChange,
|
|
31939
|
+
onColumnOrderChange,
|
|
31940
|
+
onBatchAction,
|
|
31941
|
+
onRowClick,
|
|
31942
|
+
onExportComplete
|
|
31763
31943
|
}) {
|
|
31764
31944
|
const { table, globalFilter, setGlobalFilter, handleResetColumns } = useTableController({
|
|
31765
31945
|
columns,
|
|
31766
31946
|
data,
|
|
31767
31947
|
columnRegistry,
|
|
31768
31948
|
initialState: initialState2,
|
|
31769
|
-
tableId
|
|
31949
|
+
tableId,
|
|
31950
|
+
onRowSelectionChange,
|
|
31951
|
+
onSortingChange,
|
|
31952
|
+
onPaginationChange,
|
|
31953
|
+
onColumnVisibilityChange,
|
|
31954
|
+
onColumnOrderChange,
|
|
31955
|
+
onBatchAction,
|
|
31956
|
+
onRowClick,
|
|
31957
|
+
onExportComplete
|
|
31770
31958
|
});
|
|
31771
31959
|
const parentRef = React.useRef(null);
|
|
31772
31960
|
const rows = table.getRowModel().rows;
|
|
@@ -31823,7 +32011,8 @@ function MobileTableInternal({
|
|
|
31823
32011
|
{
|
|
31824
32012
|
row,
|
|
31825
32013
|
columnRegistry,
|
|
31826
|
-
className: "mmc-row-card--item w-full"
|
|
32014
|
+
className: "mmc-row-card--item w-full",
|
|
32015
|
+
onRowClick
|
|
31827
32016
|
},
|
|
31828
32017
|
row.id
|
|
31829
32018
|
));
|
|
@@ -31846,7 +32035,8 @@ function MobileTableInternal({
|
|
|
31846
32035
|
{
|
|
31847
32036
|
row,
|
|
31848
32037
|
columnRegistry,
|
|
31849
|
-
className: "mmc-row-card--item w-full"
|
|
32038
|
+
className: "mmc-row-card--item w-full",
|
|
32039
|
+
onRowClick
|
|
31850
32040
|
}
|
|
31851
32041
|
)
|
|
31852
32042
|
},
|