@perses-dev/components 0.55.0 → 0.56.0-beta.0
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/AlignSelector/AlignSelector.js +115 -25
- package/dist/AlignSelector/AlignSelector.js.map +1 -1
- package/dist/CodeEditor/CodeEditor.d.ts +19 -0
- package/dist/CodeEditor/CodeEditor.d.ts.map +1 -0
- package/dist/CodeEditor/CodeEditor.js +122 -0
- package/dist/CodeEditor/CodeEditor.js.map +1 -0
- package/dist/ColorPicker/ColorPicker.js +153 -61
- package/dist/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/ColorPicker/OptionsColorPicker.js +147 -52
- package/dist/ColorPicker/OptionsColorPicker.js.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.js +144 -41
- package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
- package/dist/DensitySelector/DensitySelector.js +53 -20
- package/dist/DensitySelector/DensitySelector.js.map +1 -1
- package/dist/Dialog/Dialog.d.ts +3 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +202 -49
- package/dist/Dialog/Dialog.js.map +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.js +79 -27
- package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/DragAndDrop/DragAndDropList.js +184 -113
- package/dist/DragAndDrop/DragAndDropList.js.map +1 -1
- package/dist/DragAndDrop/DragButton.js +131 -52
- package/dist/DragAndDrop/DragButton.js.map +1 -1
- package/dist/DragAndDrop/DropIndicator.js +51 -26
- package/dist/DragAndDrop/DropIndicator.js.map +1 -1
- package/dist/Drawer/Drawer.js +75 -15
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/EChart/EChart.js +179 -90
- package/dist/EChart/EChart.js.map +1 -1
- package/dist/ErrorAlert.js +14 -4
- package/dist/ErrorAlert.js.map +1 -1
- package/dist/ExemplarMetadata/ExemplarMetadataTooltip.js +463 -190
- package/dist/ExemplarMetadata/ExemplarMetadataTooltip.js.map +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.js +82 -50
- package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
- package/dist/FormEditor/FormActions.js +88 -14
- package/dist/FormEditor/FormActions.js.map +1 -1
- package/dist/FormatControls/FormatControls.js +246 -99
- package/dist/FormatControls/FormatControls.js.map +1 -1
- package/dist/FormatControls/UnitSelector.js +90 -25
- package/dist/FormatControls/UnitSelector.js.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.js +105 -42
- package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
- package/dist/JSONEditor.d.ts +2 -6
- package/dist/JSONEditor.d.ts.map +1 -1
- package/dist/JSONEditor.js +24 -37
- package/dist/JSONEditor.js.map +1 -1
- package/dist/Legend/CompactLegend.js +77 -27
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.js +184 -82
- package/dist/Legend/Legend.js.map +1 -1
- package/dist/Legend/LegendColorBadge.js +54 -9
- package/dist/Legend/LegendColorBadge.js.map +1 -1
- package/dist/Legend/ListLegend.js +46 -16
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.js +184 -48
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/Legend/TableLegend.d.ts.map +1 -1
- package/dist/Legend/TableLegend.js +90 -48
- package/dist/Legend/TableLegend.js.map +1 -1
- package/dist/Legend/legend-model.d.ts +2 -2
- package/dist/Legend/legend-model.d.ts.map +1 -1
- package/dist/Legend/legend-model.js.map +1 -1
- package/dist/LinksEditor/LinkEditorForm.js +148 -67
- package/dist/LinksEditor/LinkEditorForm.js.map +1 -1
- package/dist/ModeSelector/ModeSelector.js +61 -19
- package/dist/ModeSelector/ModeSelector.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js +20 -9
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js +130 -54
- package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js +17 -6
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js +76 -28
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
- package/dist/Overlay/Overlay.js +71 -27
- package/dist/Overlay/Overlay.js.map +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +96 -38
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
- package/dist/RepeatGrid/RepeatGrid.js +117 -45
- package/dist/RepeatGrid/RepeatGrid.js.map +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js +99 -38
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
- package/dist/SortSelector/SortSelector.js +51 -18
- package/dist/SortSelector/SortSelector.js.map +1 -1
- package/dist/SortSelector/SortSelectorButtons.js +109 -25
- package/dist/SortSelector/SortSelectorButtons.js.map +1 -1
- package/dist/Table/InnerTable.js +46 -15
- package/dist/Table/InnerTable.js.map +1 -1
- package/dist/Table/Table.d.ts +3 -1
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +410 -158
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableBody.js +15 -4
- package/dist/Table/TableBody.js.map +1 -1
- package/dist/Table/TableCell.js +284 -107
- package/dist/Table/TableCell.js.map +1 -1
- package/dist/Table/TableCheckbox.js +101 -32
- package/dist/Table/TableCheckbox.js.map +1 -1
- package/dist/Table/TableFoot.js +15 -4
- package/dist/Table/TableFoot.js.map +1 -1
- package/dist/Table/TableHead.js +15 -4
- package/dist/Table/TableHead.js.map +1 -1
- package/dist/Table/TableHeaderCell.js +119 -62
- package/dist/Table/TableHeaderCell.js.map +1 -1
- package/dist/Table/TableRow.js +33 -9
- package/dist/Table/TableRow.js.map +1 -1
- package/dist/Table/TableToolbar.d.ts +5 -4
- package/dist/Table/TableToolbar.d.ts.map +1 -1
- package/dist/Table/TableToolbar.js +172 -100
- package/dist/Table/TableToolbar.js.map +1 -1
- package/dist/Table/VirtualizedTable.d.ts +11 -11
- package/dist/Table/VirtualizedTable.d.ts.map +1 -1
- package/dist/Table/VirtualizedTable.js +387 -219
- package/dist/Table/VirtualizedTable.js.map +1 -1
- package/dist/Table/VirtualizedTableContainer.js +27 -7
- package/dist/Table/VirtualizedTableContainer.js.map +1 -1
- package/dist/Table/hooks/useFuzzySearch.d.ts +6 -5
- package/dist/Table/hooks/useFuzzySearch.d.ts.map +1 -1
- package/dist/Table/hooks/useFuzzySearch.js +57 -32
- package/dist/Table/hooks/useFuzzySearch.js.map +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.js +115 -74
- package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts +1 -1
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts.map +1 -1
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +74 -53
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
- package/dist/Table/model/table-model.d.ts +44 -15
- package/dist/Table/model/table-model.d.ts.map +1 -1
- package/dist/Table/model/table-model.js +33 -1
- package/dist/Table/model/table-model.js.map +1 -1
- package/dist/ThresholdsEditor/ThresholdInput.js +137 -47
- package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.js +341 -174
- package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
- package/dist/TimeRangeSelector/DateTimeRangePicker.js +368 -162
- package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -1
- package/dist/TimeRangeSelector/TimeRangeSelector.js +580 -209
- package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.js +189 -65
- package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +168 -78
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.js +38 -11
- package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js +229 -72
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.js +73 -27
- package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipHeader.js +221 -121
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js +44 -38
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
- package/dist/TimeZoneSelector.js +131 -36
- package/dist/TimeZoneSelector.js.map +1 -1
- package/dist/ToolbarIconButton/ToolbarIconButton.js +18 -7
- package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
- package/dist/TransformsEditor/TransformEditor.js +830 -334
- package/dist/TransformsEditor/TransformEditor.js.map +1 -1
- package/dist/TransformsEditor/TransformEditorContainer.js +252 -90
- package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -1
- package/dist/TransformsEditor/TransformsEditor.js +170 -59
- package/dist/TransformsEditor/TransformsEditor.js.map +1 -1
- package/dist/ValueMappingEditor/ValueMappingEditor.js +800 -322
- package/dist/ValueMappingEditor/ValueMappingEditor.js.map +1 -1
- package/dist/ValueMappingEditor/ValueMappingsEditor.js +218 -91
- package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +1 -1
- package/dist/YAMLEditor/YAMLEditor.d.ts +12 -0
- package/dist/YAMLEditor/YAMLEditor.d.ts.map +1 -0
- package/dist/YAMLEditor/YAMLEditor.js +41 -0
- package/dist/YAMLEditor/YAMLEditor.js.map +1 -0
- package/dist/YAMLEditor/index.d.ts +2 -0
- package/dist/YAMLEditor/index.d.ts.map +1 -0
- package/dist/YAMLEditor/index.js +15 -0
- package/dist/YAMLEditor/index.js.map +1 -0
- package/dist/YAMLEditor/yaml-utils.d.ts +11 -0
- package/dist/YAMLEditor/yaml-utils.d.ts.map +1 -0
- package/dist/YAMLEditor/yaml-utils.js +52 -0
- package/dist/YAMLEditor/yaml-utils.js.map +1 -0
- package/dist/YAxisLabel.js +64 -20
- package/dist/YAxisLabel.js.map +1 -1
- package/dist/context/ChartsProvider.js +32 -16
- package/dist/context/ChartsProvider.js.map +1 -1
- package/dist/context/ItemActionsProvider.js +110 -61
- package/dist/context/ItemActionsProvider.js.map +1 -1
- package/dist/context/SelectionProvider.js +170 -66
- package/dist/context/SelectionProvider.js.map +1 -1
- package/dist/context/SnackbarProvider.js +101 -44
- package/dist/context/SnackbarProvider.js.map +1 -1
- package/dist/context/TimeZoneProvider.js +35 -14
- package/dist/context/TimeZoneProvider.js.map +1 -1
- package/dist/controls/TextField.js +86 -25
- package/dist/controls/TextField.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/browser-storage.js +64 -34
- package/dist/utils/browser-storage.js.map +1 -1
- package/package.json +12 -6
package/dist/Table/Table.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { c as _c } from "react-compiler-runtime";
|
|
2
3
|
// Copyright The Perses Authors
|
|
3
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
5
|
// you may not use this file except in compliance with the License.
|
|
@@ -12,10 +13,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
12
13
|
// See the License for the specific language governing permissions and
|
|
13
14
|
// limitations under the License.
|
|
14
15
|
import { Stack, useTheme } from "@mui/material";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
16
|
+
import { useTable } from "@tanstack/react-table";
|
|
17
|
+
import { useState } from "react";
|
|
17
18
|
import { useFuzzySearch } from "./hooks/useFuzzySearch.js";
|
|
18
|
-
import { DEFAULT_COLUMN_WIDTH, persesColumnsToTanstackColumns } from "./model/table-model.js";
|
|
19
|
+
import { DEFAULT_COLUMN_WIDTH, persesColumnsToTanstackColumns, TABLE_FEATURES } from "./model/table-model.js";
|
|
19
20
|
import { TableCheckbox } from "./TableCheckbox.js";
|
|
20
21
|
import { VirtualizedTable } from "./VirtualizedTable.js";
|
|
21
22
|
const DEFAULT_GET_ROW_ID = (data, index)=>{
|
|
@@ -31,192 +32,443 @@ const DEFAULT_SORTING = [];
|
|
|
31
32
|
* **not** intended to be a general use data table for use cases unrelated to Perses.
|
|
32
33
|
*
|
|
33
34
|
* **Note: This component is currently experimental and is likely to have significant breaking changes in the near future. Use with caution outside of the core Perses codebase.**
|
|
34
|
-
*/ export function Table(
|
|
35
|
-
|
|
35
|
+
*/ export function Table(t0) {
|
|
36
|
+
const $ = _c(108);
|
|
37
|
+
let cellConfigs;
|
|
38
|
+
let checkboxSelection;
|
|
39
|
+
let columns;
|
|
40
|
+
let data;
|
|
41
|
+
let defaultColumnConfig;
|
|
42
|
+
let getCheckboxColor;
|
|
43
|
+
let getItemActions;
|
|
44
|
+
let getSubRows;
|
|
45
|
+
let hasItemActions;
|
|
46
|
+
let hiddenColumns;
|
|
47
|
+
let onPaginationChange;
|
|
48
|
+
let onRowSelectionChange;
|
|
49
|
+
let onSortingChange;
|
|
50
|
+
let otherProps;
|
|
51
|
+
let pagination;
|
|
52
|
+
let t1;
|
|
53
|
+
let t2;
|
|
54
|
+
let t3;
|
|
55
|
+
let t4;
|
|
56
|
+
let t5;
|
|
57
|
+
let t6;
|
|
58
|
+
let t7;
|
|
59
|
+
let t8;
|
|
60
|
+
let tableToolbarConfig;
|
|
61
|
+
if ($[0] !== t0) {
|
|
62
|
+
({ data, columns, cellConfigs, density: t1, defaultColumnWidth: t2, defaultColumnHeight: t3, checkboxSelection, onRowSelectionChange, onSortingChange, getCheckboxColor, getRowId: t4, rowSelection: t5, sorting: t6, getItemActions, hasItemActions, pagination, onPaginationChange, rowSelectionVariant: t7, getSubRows, hiddenColumns, tableToolbarConfig, columnResizeMode: t8, defaultColumnConfig, ...otherProps } = t0);
|
|
63
|
+
$[0] = t0;
|
|
64
|
+
$[1] = cellConfigs;
|
|
65
|
+
$[2] = checkboxSelection;
|
|
66
|
+
$[3] = columns;
|
|
67
|
+
$[4] = data;
|
|
68
|
+
$[5] = defaultColumnConfig;
|
|
69
|
+
$[6] = getCheckboxColor;
|
|
70
|
+
$[7] = getItemActions;
|
|
71
|
+
$[8] = getSubRows;
|
|
72
|
+
$[9] = hasItemActions;
|
|
73
|
+
$[10] = hiddenColumns;
|
|
74
|
+
$[11] = onPaginationChange;
|
|
75
|
+
$[12] = onRowSelectionChange;
|
|
76
|
+
$[13] = onSortingChange;
|
|
77
|
+
$[14] = otherProps;
|
|
78
|
+
$[15] = pagination;
|
|
79
|
+
$[16] = t1;
|
|
80
|
+
$[17] = t2;
|
|
81
|
+
$[18] = t3;
|
|
82
|
+
$[19] = t4;
|
|
83
|
+
$[20] = t5;
|
|
84
|
+
$[21] = t6;
|
|
85
|
+
$[22] = t7;
|
|
86
|
+
$[23] = t8;
|
|
87
|
+
$[24] = tableToolbarConfig;
|
|
88
|
+
} else {
|
|
89
|
+
cellConfigs = $[1];
|
|
90
|
+
checkboxSelection = $[2];
|
|
91
|
+
columns = $[3];
|
|
92
|
+
data = $[4];
|
|
93
|
+
defaultColumnConfig = $[5];
|
|
94
|
+
getCheckboxColor = $[6];
|
|
95
|
+
getItemActions = $[7];
|
|
96
|
+
getSubRows = $[8];
|
|
97
|
+
hasItemActions = $[9];
|
|
98
|
+
hiddenColumns = $[10];
|
|
99
|
+
onPaginationChange = $[11];
|
|
100
|
+
onRowSelectionChange = $[12];
|
|
101
|
+
onSortingChange = $[13];
|
|
102
|
+
otherProps = $[14];
|
|
103
|
+
pagination = $[15];
|
|
104
|
+
t1 = $[16];
|
|
105
|
+
t2 = $[17];
|
|
106
|
+
t3 = $[18];
|
|
107
|
+
t4 = $[19];
|
|
108
|
+
t5 = $[20];
|
|
109
|
+
t6 = $[21];
|
|
110
|
+
t7 = $[22];
|
|
111
|
+
t8 = $[23];
|
|
112
|
+
tableToolbarConfig = $[24];
|
|
113
|
+
}
|
|
114
|
+
const density = t1 === undefined ? "standard" : t1;
|
|
115
|
+
const defaultColumnWidth = t2 === undefined ? DEFAULT_COLUMN_WIDTH : t2;
|
|
116
|
+
const defaultColumnHeight = t3 === undefined ? "auto" : t3;
|
|
117
|
+
const getRowId = t4 === undefined ? DEFAULT_GET_ROW_ID : t4;
|
|
118
|
+
const rowSelection = t5 === undefined ? DEFAULT_ROW_SELECTION : t5;
|
|
119
|
+
const sorting = t6 === undefined ? DEFAULT_SORTING : t6;
|
|
120
|
+
const rowSelectionVariant = t7 === undefined ? "standard" : t7;
|
|
121
|
+
const columnResizeMode = t8 === undefined ? "onChange" : t8;
|
|
36
122
|
const theme = useTheme();
|
|
37
123
|
const hasSubRows = !!getSubRows;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
124
|
+
let t9;
|
|
125
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
126
|
+
t9 = {};
|
|
127
|
+
$[25] = t9;
|
|
128
|
+
} else {
|
|
129
|
+
t9 = $[25];
|
|
130
|
+
}
|
|
131
|
+
const [expanded, setExpanded] = useState(t9);
|
|
132
|
+
const { globalFilter, setGlobalFilter, fuzzySearchOptions } = useFuzzySearch(tableToolbarConfig?.isSearchEnabled, tableToolbarConfig?.fuzzyMatchThreshold ?? "CONTAINS", expanded, setExpanded);
|
|
133
|
+
let t10;
|
|
134
|
+
if ($[26] !== hiddenColumns) {
|
|
135
|
+
t10 = hiddenColumns?.reduce(_temp, {}) ?? {};
|
|
136
|
+
$[26] = hiddenColumns;
|
|
137
|
+
$[27] = t10;
|
|
138
|
+
} else {
|
|
139
|
+
t10 = $[27];
|
|
140
|
+
}
|
|
141
|
+
const [columnVisibility, setColumnVisibility] = useState(t10);
|
|
142
|
+
let t11;
|
|
143
|
+
if ($[28] !== onRowSelectionChange || $[29] !== rowSelection) {
|
|
144
|
+
t11 = (rowSelectionUpdater)=>{
|
|
145
|
+
const newRowSelection = typeof rowSelectionUpdater === "function" ? rowSelectionUpdater(rowSelection) : rowSelectionUpdater;
|
|
146
|
+
onRowSelectionChange?.(newRowSelection);
|
|
147
|
+
};
|
|
148
|
+
$[28] = onRowSelectionChange;
|
|
149
|
+
$[29] = rowSelection;
|
|
150
|
+
$[30] = t11;
|
|
151
|
+
} else {
|
|
152
|
+
t11 = $[30];
|
|
153
|
+
}
|
|
154
|
+
const handleRowSelectionChange = t11;
|
|
155
|
+
let t12;
|
|
156
|
+
if ($[31] !== onRowSelectionChange || $[32] !== rowSelectionVariant) {
|
|
157
|
+
t12 = (table, row, isModified)=>{
|
|
158
|
+
if (rowSelectionVariant === "standard" || isModified) {
|
|
159
|
+
row.toggleSelected();
|
|
58
160
|
} else {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
161
|
+
if (row.getIsSelected() && !table.getIsAllRowsSelected()) {
|
|
162
|
+
table.toggleAllRowsSelected();
|
|
163
|
+
} else {
|
|
164
|
+
onRowSelectionChange?.({
|
|
165
|
+
[row.id]: true
|
|
166
|
+
});
|
|
167
|
+
}
|
|
63
168
|
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
169
|
+
};
|
|
170
|
+
$[31] = onRowSelectionChange;
|
|
171
|
+
$[32] = rowSelectionVariant;
|
|
172
|
+
$[33] = t12;
|
|
173
|
+
} else {
|
|
174
|
+
t12 = $[33];
|
|
175
|
+
}
|
|
176
|
+
const handleRowSelectionEvent = t12;
|
|
177
|
+
let t13;
|
|
178
|
+
if ($[34] !== handleRowSelectionEvent) {
|
|
179
|
+
t13 = (e, table_0, row_0)=>{
|
|
180
|
+
const nativePointerEvent = e.nativeEvent && (e.nativeEvent instanceof MouseEvent || e.nativeEvent instanceof KeyboardEvent) ? e.nativeEvent : undefined;
|
|
181
|
+
const isModifed = !!nativePointerEvent?.metaKey || !!nativePointerEvent?.shiftKey;
|
|
182
|
+
handleRowSelectionEvent(table_0, row_0, isModifed);
|
|
183
|
+
};
|
|
184
|
+
$[34] = handleRowSelectionEvent;
|
|
185
|
+
$[35] = t13;
|
|
186
|
+
} else {
|
|
187
|
+
t13 = $[35];
|
|
188
|
+
}
|
|
189
|
+
const handleCheckboxChange = t13;
|
|
190
|
+
let t14;
|
|
191
|
+
if ($[36] !== onSortingChange || $[37] !== sorting) {
|
|
192
|
+
t14 = (sortingUpdater)=>{
|
|
193
|
+
const newSorting = typeof sortingUpdater === "function" ? sortingUpdater(sorting) : sortingUpdater;
|
|
194
|
+
onSortingChange?.(newSorting);
|
|
195
|
+
};
|
|
196
|
+
$[36] = onSortingChange;
|
|
197
|
+
$[37] = sorting;
|
|
198
|
+
$[38] = t14;
|
|
199
|
+
} else {
|
|
200
|
+
t14 = $[38];
|
|
201
|
+
}
|
|
202
|
+
const handleSortingChange = t14;
|
|
203
|
+
let t15;
|
|
204
|
+
if ($[39] !== getItemActions) {
|
|
205
|
+
t15 = {
|
|
206
|
+
id: "itemActions",
|
|
207
|
+
header: "Actions",
|
|
208
|
+
cell: (t16)=>{
|
|
209
|
+
const { row: row_1 } = t16;
|
|
85
210
|
return /*#__PURE__*/ _jsx(Stack, {
|
|
86
211
|
direction: "row",
|
|
87
212
|
alignItems: "center",
|
|
88
213
|
children: getItemActions?.({
|
|
89
|
-
id:
|
|
90
|
-
data:
|
|
214
|
+
id: row_1.id,
|
|
215
|
+
data: row_1.original
|
|
91
216
|
})
|
|
92
217
|
});
|
|
93
218
|
},
|
|
94
219
|
enableSorting: false,
|
|
95
220
|
enableResizing: false
|
|
96
221
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
222
|
+
$[39] = getItemActions;
|
|
223
|
+
$[40] = t15;
|
|
224
|
+
} else {
|
|
225
|
+
t15 = $[40];
|
|
226
|
+
}
|
|
227
|
+
const actionsColumn = t15;
|
|
228
|
+
let t16;
|
|
229
|
+
if ($[41] !== density || $[42] !== theme.palette.text.primary) {
|
|
230
|
+
t16 = (t17)=>{
|
|
231
|
+
const { table: table_1 } = t17;
|
|
232
|
+
return /*#__PURE__*/ _jsx(TableCheckbox, {
|
|
233
|
+
checked: table_1.getIsAllRowsSelected(),
|
|
234
|
+
indeterminate: table_1.getIsSomeRowsSelected() && !table_1.getIsAllRowsSelected(),
|
|
235
|
+
onChange: table_1.getToggleAllRowsSelectedHandler(),
|
|
236
|
+
color: theme.palette.text.primary,
|
|
237
|
+
density: density
|
|
238
|
+
});
|
|
239
|
+
};
|
|
240
|
+
$[41] = density;
|
|
241
|
+
$[42] = theme.palette.text.primary;
|
|
242
|
+
$[43] = t16;
|
|
243
|
+
} else {
|
|
244
|
+
t16 = $[43];
|
|
245
|
+
}
|
|
246
|
+
let t17;
|
|
247
|
+
if ($[44] !== density || $[45] !== getCheckboxColor || $[46] !== handleCheckboxChange) {
|
|
248
|
+
t17 = (t18)=>{
|
|
249
|
+
const { row: row_2, table: table_2 } = t18;
|
|
250
|
+
return /*#__PURE__*/ _jsx(TableCheckbox, {
|
|
251
|
+
checked: row_2.getIsSelected(),
|
|
252
|
+
indeterminate: row_2.getIsSomeSelected(),
|
|
253
|
+
onChange: (e_0)=>{
|
|
254
|
+
handleCheckboxChange(e_0, table_2, row_2);
|
|
255
|
+
},
|
|
256
|
+
color: getCheckboxColor?.(row_2.original),
|
|
257
|
+
density: density
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
$[44] = density;
|
|
261
|
+
$[45] = getCheckboxColor;
|
|
262
|
+
$[46] = handleCheckboxChange;
|
|
263
|
+
$[47] = t17;
|
|
264
|
+
} else {
|
|
265
|
+
t17 = $[47];
|
|
266
|
+
}
|
|
267
|
+
let t18;
|
|
268
|
+
if ($[48] !== t16 || $[49] !== t17) {
|
|
269
|
+
t18 = {
|
|
270
|
+
id: "checkboxRowSelect",
|
|
103
271
|
size: 28,
|
|
104
|
-
header:
|
|
105
|
-
|
|
106
|
-
checked: table.getIsAllRowsSelected(),
|
|
107
|
-
indeterminate: table.getIsSomeRowsSelected(),
|
|
108
|
-
onChange: table.getToggleAllRowsSelectedHandler(),
|
|
109
|
-
color: theme.palette.text.primary,
|
|
110
|
-
density: density
|
|
111
|
-
});
|
|
112
|
-
},
|
|
113
|
-
cell: ({ row, table })=>{
|
|
114
|
-
return /*#__PURE__*/ _jsx(TableCheckbox, {
|
|
115
|
-
checked: row.getIsSelected(),
|
|
116
|
-
indeterminate: row.getIsSomeSelected(),
|
|
117
|
-
onChange: (e)=>{
|
|
118
|
-
handleCheckboxChange(e, table, row);
|
|
119
|
-
},
|
|
120
|
-
color: getCheckboxColor?.(row.original),
|
|
121
|
-
density: density
|
|
122
|
-
});
|
|
123
|
-
},
|
|
272
|
+
header: t16,
|
|
273
|
+
cell: t17,
|
|
124
274
|
enableSorting: false,
|
|
125
275
|
enableResizing: false
|
|
126
276
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
277
|
+
$[48] = t16;
|
|
278
|
+
$[49] = t17;
|
|
279
|
+
$[50] = t18;
|
|
280
|
+
} else {
|
|
281
|
+
t18 = $[50];
|
|
282
|
+
}
|
|
283
|
+
const checkboxColumn = t18;
|
|
284
|
+
let initTableColumns;
|
|
285
|
+
if ($[51] !== actionsColumn || $[52] !== checkboxColumn || $[53] !== checkboxSelection || $[54] !== columns || $[55] !== defaultColumnConfig || $[56] !== hasItemActions) {
|
|
286
|
+
initTableColumns = persesColumnsToTanstackColumns(columns, defaultColumnConfig);
|
|
135
287
|
if (hasItemActions) {
|
|
136
288
|
initTableColumns.unshift(actionsColumn);
|
|
137
289
|
}
|
|
138
290
|
if (checkboxSelection) {
|
|
139
291
|
initTableColumns.unshift(checkboxColumn);
|
|
140
292
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
...fuzzySearchOptions,
|
|
169
|
-
// For now, defaulting to sort by descending first. We can expose the ability
|
|
170
|
-
// to customize it if/when we have use cases for it.
|
|
171
|
-
sortDescFirst: true,
|
|
172
|
-
columnResizeMode,
|
|
173
|
-
onExpandedChange: setExpanded,
|
|
174
|
-
state: {
|
|
293
|
+
$[51] = actionsColumn;
|
|
294
|
+
$[52] = checkboxColumn;
|
|
295
|
+
$[53] = checkboxSelection;
|
|
296
|
+
$[54] = columns;
|
|
297
|
+
$[55] = defaultColumnConfig;
|
|
298
|
+
$[56] = hasItemActions;
|
|
299
|
+
$[57] = initTableColumns;
|
|
300
|
+
} else {
|
|
301
|
+
initTableColumns = $[57];
|
|
302
|
+
}
|
|
303
|
+
const tableColumns = initTableColumns;
|
|
304
|
+
const t19 = !pagination;
|
|
305
|
+
const t20 = !!checkboxSelection;
|
|
306
|
+
const t21 = tableToolbarConfig?.isSearchEnabled ? globalFilter : undefined;
|
|
307
|
+
let t22;
|
|
308
|
+
if ($[58] !== pagination) {
|
|
309
|
+
t22 = pagination ? {
|
|
310
|
+
pagination
|
|
311
|
+
} : {};
|
|
312
|
+
$[58] = pagination;
|
|
313
|
+
$[59] = t22;
|
|
314
|
+
} else {
|
|
315
|
+
t22 = $[59];
|
|
316
|
+
}
|
|
317
|
+
let t23;
|
|
318
|
+
if ($[60] !== columnVisibility || $[61] !== expanded || $[62] !== rowSelection || $[63] !== sorting || $[64] !== t21 || $[65] !== t22) {
|
|
319
|
+
t23 = {
|
|
175
320
|
rowSelection,
|
|
176
321
|
sorting,
|
|
177
|
-
globalFilter:
|
|
322
|
+
globalFilter: t21,
|
|
178
323
|
columnVisibility,
|
|
179
|
-
...
|
|
180
|
-
pagination
|
|
181
|
-
} : {},
|
|
324
|
+
...t22,
|
|
182
325
|
expanded
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
326
|
+
};
|
|
327
|
+
$[60] = columnVisibility;
|
|
328
|
+
$[61] = expanded;
|
|
329
|
+
$[62] = rowSelection;
|
|
330
|
+
$[63] = sorting;
|
|
331
|
+
$[64] = t21;
|
|
332
|
+
$[65] = t22;
|
|
333
|
+
$[66] = t23;
|
|
334
|
+
} else {
|
|
335
|
+
t23 = $[66];
|
|
336
|
+
}
|
|
337
|
+
let t24;
|
|
338
|
+
if ($[67] !== columnResizeMode || $[68] !== data || $[69] !== fuzzySearchOptions || $[70] !== getRowId || $[71] !== getSubRows || $[72] !== handleRowSelectionChange || $[73] !== handleSortingChange || $[74] !== t19 || $[75] !== t20 || $[76] !== t23 || $[77] !== tableColumns) {
|
|
339
|
+
t24 = {
|
|
340
|
+
features: TABLE_FEATURES,
|
|
341
|
+
...fuzzySearchOptions,
|
|
342
|
+
data,
|
|
343
|
+
columns: tableColumns,
|
|
344
|
+
getRowId,
|
|
345
|
+
manualPagination: t19,
|
|
346
|
+
enableRowSelection: t20,
|
|
347
|
+
onRowSelectionChange: handleRowSelectionChange,
|
|
348
|
+
onSortingChange: handleSortingChange,
|
|
349
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
350
|
+
getSubRows,
|
|
351
|
+
sortDescFirst: true,
|
|
352
|
+
columnResizeMode,
|
|
353
|
+
onExpandedChange: setExpanded,
|
|
354
|
+
state: t23
|
|
355
|
+
};
|
|
356
|
+
$[67] = columnResizeMode;
|
|
357
|
+
$[68] = data;
|
|
358
|
+
$[69] = fuzzySearchOptions;
|
|
359
|
+
$[70] = getRowId;
|
|
360
|
+
$[71] = getSubRows;
|
|
361
|
+
$[72] = handleRowSelectionChange;
|
|
362
|
+
$[73] = handleSortingChange;
|
|
363
|
+
$[74] = t19;
|
|
364
|
+
$[75] = t20;
|
|
365
|
+
$[76] = t23;
|
|
366
|
+
$[77] = tableColumns;
|
|
367
|
+
$[78] = t24;
|
|
368
|
+
} else {
|
|
369
|
+
t24 = $[78];
|
|
370
|
+
}
|
|
371
|
+
const table_3 = useTable(t24);
|
|
372
|
+
let t25;
|
|
373
|
+
if ($[79] !== handleRowSelectionEvent) {
|
|
374
|
+
t25 = (e_1, row_3)=>{
|
|
375
|
+
const isModifiedClick = e_1.metaKey || e_1.shiftKey;
|
|
376
|
+
handleRowSelectionEvent(row_3.table, row_3, isModifiedClick);
|
|
377
|
+
};
|
|
378
|
+
$[79] = handleRowSelectionEvent;
|
|
379
|
+
$[80] = t25;
|
|
380
|
+
} else {
|
|
381
|
+
t25 = $[80];
|
|
382
|
+
}
|
|
383
|
+
const handleRowClick = t25;
|
|
384
|
+
const t26 = tableToolbarConfig?.isSearchEnabled;
|
|
385
|
+
const t27 = tableToolbarConfig?.isColumnFilterEnabled;
|
|
386
|
+
let t28;
|
|
387
|
+
if ($[81] !== table_3) {
|
|
388
|
+
t28 = table_3.getAllColumns();
|
|
389
|
+
$[81] = table_3;
|
|
390
|
+
$[82] = t28;
|
|
391
|
+
} else {
|
|
392
|
+
t28 = $[82];
|
|
393
|
+
}
|
|
394
|
+
const t29 = tableToolbarConfig?.columnFilterMenuMaxHeight;
|
|
395
|
+
let t30;
|
|
396
|
+
if ($[83] !== table_3) {
|
|
397
|
+
t30 = table_3.getIsAllRowsExpanded();
|
|
398
|
+
$[83] = table_3;
|
|
399
|
+
$[84] = t30;
|
|
400
|
+
} else {
|
|
401
|
+
t30 = $[84];
|
|
402
|
+
}
|
|
403
|
+
let t31;
|
|
404
|
+
if ($[85] !== table_3) {
|
|
405
|
+
t31 = table_3.getToggleAllRowsExpandedHandler();
|
|
406
|
+
$[85] = table_3;
|
|
407
|
+
$[86] = t31;
|
|
408
|
+
} else {
|
|
409
|
+
t31 = $[86];
|
|
410
|
+
}
|
|
411
|
+
let t32;
|
|
412
|
+
if ($[87] !== globalFilter || $[88] !== hasSubRows || $[89] !== setGlobalFilter || $[90] !== t26 || $[91] !== t27 || $[92] !== t28 || $[93] !== t29 || $[94] !== t30 || $[95] !== t31) {
|
|
413
|
+
t32 = {
|
|
414
|
+
isSearchEnabled: t26,
|
|
210
415
|
globalFilter,
|
|
211
416
|
onGlobalFilterChange: setGlobalFilter,
|
|
212
|
-
isColumnFilterEnabled:
|
|
213
|
-
columns:
|
|
214
|
-
columnFilterMenuMaxHeight:
|
|
417
|
+
isColumnFilterEnabled: t27,
|
|
418
|
+
columns: t28,
|
|
419
|
+
columnFilterMenuMaxHeight: t29,
|
|
215
420
|
isExpandAllEnabled: hasSubRows,
|
|
216
|
-
isAllExpanded:
|
|
217
|
-
onExpandAllChange:
|
|
218
|
-
}
|
|
219
|
-
|
|
421
|
+
isAllExpanded: t30,
|
|
422
|
+
onExpandAllChange: t31
|
|
423
|
+
};
|
|
424
|
+
$[87] = globalFilter;
|
|
425
|
+
$[88] = hasSubRows;
|
|
426
|
+
$[89] = setGlobalFilter;
|
|
427
|
+
$[90] = t26;
|
|
428
|
+
$[91] = t27;
|
|
429
|
+
$[92] = t28;
|
|
430
|
+
$[93] = t29;
|
|
431
|
+
$[94] = t30;
|
|
432
|
+
$[95] = t31;
|
|
433
|
+
$[96] = t32;
|
|
434
|
+
} else {
|
|
435
|
+
t32 = $[96];
|
|
436
|
+
}
|
|
437
|
+
let t33;
|
|
438
|
+
if ($[97] !== cellConfigs || $[98] !== defaultColumnHeight || $[99] !== defaultColumnWidth || $[100] !== density || $[101] !== handleRowClick || $[102] !== onPaginationChange || $[103] !== otherProps || $[104] !== pagination || $[105] !== t32 || $[106] !== table_3) {
|
|
439
|
+
t33 = /*#__PURE__*/ _jsx(VirtualizedTable, {
|
|
440
|
+
...otherProps,
|
|
441
|
+
density: density,
|
|
442
|
+
defaultColumnWidth: defaultColumnWidth,
|
|
443
|
+
defaultColumnHeight: defaultColumnHeight,
|
|
444
|
+
onRowClick: handleRowClick,
|
|
445
|
+
table: table_3,
|
|
446
|
+
cellConfigs: cellConfigs,
|
|
447
|
+
pagination: pagination,
|
|
448
|
+
onPaginationChange: onPaginationChange,
|
|
449
|
+
toolbarConfig: t32
|
|
450
|
+
});
|
|
451
|
+
$[97] = cellConfigs;
|
|
452
|
+
$[98] = defaultColumnHeight;
|
|
453
|
+
$[99] = defaultColumnWidth;
|
|
454
|
+
$[100] = density;
|
|
455
|
+
$[101] = handleRowClick;
|
|
456
|
+
$[102] = onPaginationChange;
|
|
457
|
+
$[103] = otherProps;
|
|
458
|
+
$[104] = pagination;
|
|
459
|
+
$[105] = t32;
|
|
460
|
+
$[106] = table_3;
|
|
461
|
+
$[107] = t33;
|
|
462
|
+
} else {
|
|
463
|
+
t33 = $[107];
|
|
464
|
+
}
|
|
465
|
+
return t33;
|
|
466
|
+
}
|
|
467
|
+
function _temp(acc, columnId) {
|
|
468
|
+
return {
|
|
469
|
+
...acc,
|
|
470
|
+
[columnId]: false
|
|
471
|
+
};
|
|
220
472
|
}
|
|
221
473
|
|
|
222
474
|
//# sourceMappingURL=Table.js.map
|