@stenajs-webui/grid 17.6.0 → 17.7.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/CHANGELOG.md +12 -0
- package/dist/components/GridHooksTable.d.ts +26 -26
- package/dist/config/TableConfig.d.ts +11 -11
- package/dist/features/grid-cell/hooks/UseEditableCell.d.ts +59 -59
- package/dist/features/grid-cell/hooks/UseGridCell.d.ts +64 -64
- package/dist/features/grid-cell/hooks/UseGridNavigation.d.ts +82 -82
- package/dist/features/grid-cell/hooks/UseGridNavigationOptionsFromContext.d.ts +2 -2
- package/dist/features/grid-cell/hooks/UseRevertableValue.d.ts +9 -9
- package/dist/features/{standard-table/features/sorting/__tests__/MultitypeComparator.test.d.ts → grid-cell/hooks/__tests__/TextInput.test.d.ts} +1 -1
- package/dist/features/standard-table/components/ColGroups.d.ts +5 -5
- package/dist/features/standard-table/components/StandardTable.d.ts +82 -82
- package/dist/features/standard-table/components/StandardTableCell.d.ts +11 -11
- package/dist/features/standard-table/components/StandardTableCellUi.d.ts +17 -17
- package/dist/features/standard-table/components/StandardTableContent.d.ts +7 -7
- package/dist/features/standard-table/components/StandardTableHeadItem.d.ts +9 -9
- package/dist/features/standard-table/components/StandardTableHeadRow.d.ts +7 -7
- package/dist/features/standard-table/components/StandardTableRow.d.ts +12 -12
- package/dist/features/standard-table/components/StandardTableRowExpansion.d.ts +6 -6
- package/dist/features/standard-table/components/StandardTableRowList.d.ts +10 -10
- package/dist/features/standard-table/components/TextCell.d.ts +6 -6
- package/dist/features/standard-table/components/TrWithHoverBackground.d.ts +11 -11
- package/dist/features/standard-table/config/StandardTableColumnConfig.d.ts +154 -154
- package/dist/features/standard-table/config/StandardTableColumnGroupConfig.d.ts +11 -11
- package/dist/features/standard-table/config/StandardTableConfig.d.ts +152 -152
- package/dist/features/standard-table/config/StandardTableInfiniteConfig.d.ts +2 -2
- package/dist/features/standard-table/context/GroupConfigsAndIdsForRowsContext.d.ts +5 -5
- package/dist/features/standard-table/context/OnKeyDownContext.d.ts +4 -4
- package/dist/features/standard-table/context/StandardTableColumnOrderContext.d.ts +4 -4
- package/dist/features/standard-table/context/StandardTableStateContext.d.ts +21 -21
- package/dist/features/standard-table/context/StandardTableVariantContext.d.ts +4 -4
- package/dist/features/standard-table/context/StickyPropsPerColumnContext.d.ts +4 -4
- package/dist/features/standard-table/context/TotalNumColumnsContext.d.ts +3 -3
- package/dist/features/standard-table/features/checkboxes/StandardTableRowCheckbox.d.ts +13 -13
- package/dist/features/standard-table/features/checkboxes/UseRowCheckbox.d.ts +5 -5
- package/dist/features/standard-table/features/checkboxes/UseTableHeadCheckbox.d.ts +5 -5
- package/dist/features/standard-table/features/column-groups/ColumnGroupFactory.d.ts +7 -7
- package/dist/features/standard-table/features/column-groups/ColumnGroupRow.d.ts +6 -6
- package/dist/features/standard-table/features/column-groups/ColumnInGroup.d.ts +12 -12
- package/dist/features/standard-table/features/column-groups/StickyHeaderPropsFactory.d.ts +2 -2
- package/dist/features/standard-table/features/column-index-per-column-id/ColumnIndexCalculator.d.ts +7 -7
- package/dist/features/standard-table/features/column-index-per-column-id/ColumnIndexPerColumnIdContext.d.ts +4 -4
- package/dist/features/standard-table/features/expand-collapse/StandardTableRowExpandButton.d.ts +9 -9
- package/dist/features/standard-table/features/expand-collapse/UseExpandCollapseActions.d.ts +4 -4
- package/dist/features/standard-table/features/expand-collapse/UseTableHeadExpandCollapse.d.ts +4 -4
- package/dist/features/standard-table/features/sorting/MultitypeComparator.d.ts +3 -3
- package/dist/features/standard-table/features/sorting/UseTableSortHeader.d.ts +9 -9
- package/dist/features/standard-table/features/sticky-columns/StickyColumnGroupOffsetCalculator.d.ts +10 -10
- package/dist/features/standard-table/features/sticky-columns/StickyColumnGroupValidator.d.ts +4 -4
- package/dist/features/standard-table/features/sticky-columns/StickyPropsPerColumnCalculator.d.ts +5 -5
- package/dist/features/standard-table/features/sticky-columns/types.d.ts +11 -11
- package/dist/features/standard-table/features/summary-row/SummaryCellColSpanCalculator.d.ts +7 -7
- package/dist/features/standard-table/features/summary-row/SummaryRowVisibilityCalculator.d.ts +3 -3
- package/dist/features/standard-table/features/summary-row/components/StandardTableSummaryRow.d.ts +6 -6
- package/dist/features/standard-table/features/summary-row/components/SummaryCell.d.ts +10 -10
- package/dist/features/standard-table/features/summary-row/components/SummaryRowSwitcher.d.ts +6 -6
- package/dist/features/standard-table/helpers/cell-renderers/editable-text-cell/EditableTextCell.d.ts +2 -2
- package/dist/features/standard-table/helpers/cell-renderers/editable-text-cell/EditableTextCellWithStatus.d.ts +3 -3
- package/dist/features/standard-table/hooks/UseCellBackground.d.ts +3 -3
- package/dist/features/standard-table/hooks/UseColumnConfigById.d.ts +4 -4
- package/dist/features/standard-table/hooks/UseColumnValueResolver.d.ts +1 -1
- package/dist/features/standard-table/hooks/UseLocalStateTableContext.d.ts +5 -5
- package/dist/features/standard-table/hooks/UseStandardTableConfig.d.ts +7 -7
- package/dist/features/standard-table/redux/ReducerIdFactory.d.ts +3 -3
- package/dist/features/standard-table/redux/StandardTableActionsAndSelectors.d.ts +19 -19
- package/dist/features/standard-table/redux/StandardTableReducer.d.ts +15 -15
- package/dist/features/standard-table/stories/StandardTableStoryHelper.d.ts +18 -18
- package/dist/features/standard-table/types/StandardTableOnKeyDown.d.ts +3 -3
- package/dist/features/standard-table/util/ActionsFactory.d.ts +14 -14
- package/dist/features/standard-table/util/CellBorderCalculator.d.ts +2 -2
- package/dist/features/standard-table/util/ColumnCounter.d.ts +2 -2
- package/dist/features/standard-table/util/FilterItemsOnEnabledCheckboxes.d.ts +2 -2
- package/dist/features/standard-table/util/IdListPartial.d.ts +1 -1
- package/dist/features/standard-table/util/LabelFormatter.d.ts +2 -2
- package/dist/features/table-ui/components/CrudStatusIndicator.d.ts +8 -8
- package/dist/features/table-ui/components/ModifiedField.d.ts +11 -11
- package/dist/features/table-ui/components/cells/EditableTextCellWithCrudAndModified.d.ts +19 -19
- package/dist/features/table-ui/components/table/SmallTableCell.d.ts +6 -6
- package/dist/features/table-ui/components/table/SmallTableHead.d.ts +6 -6
- package/dist/features/table-ui/components/table/SortOrderIcon.d.ts +11 -11
- package/dist/features/table-ui/components/table/TableCell.d.ts +5 -5
- package/dist/features/table-ui/components/table/TableColumnGroupHead.d.ts +10 -10
- package/dist/features/table-ui/components/table/TableHeadItem.d.ts +16 -16
- package/dist/features/table-ui/components/table/TableHeadRow.d.ts +7 -7
- package/dist/features/table-ui/components/table/TableRow.d.ts +7 -7
- package/dist/features/table-ui/hooks/UseSortOrderColumnHead.d.ts +11 -11
- package/dist/index.d.ts +49 -49
- package/dist/index.es.js +2722 -2235
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +9 -2347
- package/dist/index.js.map +1 -1
- package/dist/storybook-helpers/storybook-controls.d.ts +46 -46
- package/dist/util/DirectionCalculator.d.ts +8 -8
- package/dist/util/DomIdValidator.d.ts +1 -1
- package/dist/util/GridHookOptionsValidator.d.ts +3 -3
- package/dist/util/NumberBoundsWrapper.d.ts +3 -3
- package/dist/util/bounds/NumberBoundsWrapper.d.ts +9 -9
- package/package.json +12 -13
- package/dist/features/standard-table/features/sticky-columns/__tests__/StickyColumnGroupOffsetCalculator.test.d.ts +0 -1
- package/dist/features/standard-table/features/sticky-columns/__tests__/StickyColumnGroupValidator.test.d.ts +0 -1
- package/dist/features/standard-table/features/summary-row/__tests__/SummaryCellColSpanCalculator.test.d.ts +0 -1
- package/dist/features/standard-table/stories/ExpandableRows.stories.d.ts +0 -8
- package/dist/features/standard-table/stories/FewColumns.stories.d.ts +0 -8
- package/dist/features/standard-table/stories/Fields.stories.d.ts +0 -9
- package/dist/features/standard-table/stories/GroupedColumns.stories.d.ts +0 -8
- package/dist/features/standard-table/stories/Sorting.stories.d.ts +0 -8
- package/dist/features/standard-table/stories/StandardTable.stories.d.ts +0 -13
- package/dist/features/standard-table/stories/StandardTableHorror.stories.d.ts +0 -35
- package/dist/features/standard-table/stories/States.stories.d.ts +0 -10
- package/dist/features/standard-table/stories/Sticky.stories.d.ts +0 -11
- package/dist/features/standard-table/stories/Waitlist.stories.d.ts +0 -6
- package/dist/features/standard-table/util/__tests__/IdListPartial.test.d.ts +0 -1
- package/dist/features/table-ui/stories/TableUi.stories.d.ts +0 -7
- package/dist/util/bounds/__tests__/NumberBoundsWrapper.test.d.ts +0 -1
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { UseGridCellOptions, UseGridCellResult } from "../../grid-cell/hooks/UseGridCell";
|
|
3
|
-
import { SortOrderIconVariant } from "../../table-ui/components/table/SortOrderIcon";
|
|
4
|
-
import { StandardTableOnKeyDownArgs } from "./StandardTableConfig";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
export declare type StandardTableColumnConfig<TItem, TItemValue, TColumnKey extends string> = StandardTableColumnOptions<TItem, TItemValue, TColumnKey> & StandardTableColumnOptionsWithNoGroups & ItemValueResolver<TItem, TItemValue>;
|
|
7
|
-
export declare type StandardTableColumnConfigWithGroups<TItem, TItemValue, TColumnKey extends string> = StandardTableColumnOptions<TItem, TItemValue, TColumnKey> & ItemValueResolver<TItem, TItemValue>;
|
|
8
|
-
export interface StandardTableColumnOptionsWithNoGroups {
|
|
9
|
-
/**
|
|
10
|
-
* Enable sticky behaviour to the left make elements scroll in behind this column.
|
|
11
|
-
* If neither left nor right is specified, it defaults to left: 0px.
|
|
12
|
-
*/
|
|
13
|
-
sticky?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Set a custom z index
|
|
16
|
-
*/
|
|
17
|
-
zIndex?: number;
|
|
18
|
-
/**
|
|
19
|
-
* Offset column from left (ex if we have multiple sticky columns)
|
|
20
|
-
*/
|
|
21
|
-
left?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Offset column from right (ex if we have multiple sticky columns)
|
|
24
|
-
*/
|
|
25
|
-
right?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface StandardTableColumnOptions<TItem, TItemValue, TColumnKey extends string> {
|
|
28
|
-
/**
|
|
29
|
-
* The header label of the column.
|
|
30
|
-
*/
|
|
31
|
-
columnLabel?: string;
|
|
32
|
-
/**
|
|
33
|
-
* This shows a tooltip on the left side of the column header label.
|
|
34
|
-
*/
|
|
35
|
-
infoIconTooltipText?: string;
|
|
36
|
-
/**
|
|
37
|
-
* The min-width of the column.
|
|
38
|
-
*/
|
|
39
|
-
minWidth?: string;
|
|
40
|
-
/**
|
|
41
|
-
* The width of the column.
|
|
42
|
-
*/
|
|
43
|
-
width?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Custom renderer for the cell. Falls back to an internal renderer that uses String(item[field]).
|
|
46
|
-
*/
|
|
47
|
-
renderCell?: StandardTableCellRenderer<TItemValue, TItem>;
|
|
48
|
-
/**
|
|
49
|
-
* Adds a static background color to the column.
|
|
50
|
-
*/
|
|
51
|
-
background?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Adds a dynamic background color to the column, based on the item.
|
|
54
|
-
*/
|
|
55
|
-
backgroundResolver?: BackgroundResolver<TItem>;
|
|
56
|
-
/**
|
|
57
|
-
* Adds a border on the left side of the column. Can be a boolean, is a border CSS value.
|
|
58
|
-
*/
|
|
59
|
-
borderLeft?: string | boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Justify content for the header. Defaults to flex-start, which aligns the label to the left.
|
|
62
|
-
*/
|
|
63
|
-
justifyContentHeader?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Justify content for the cell. Defaults to flex-start, which aligns the cell content to the left.
|
|
66
|
-
*/
|
|
67
|
-
justifyContentCell?: string;
|
|
68
|
-
/**
|
|
69
|
-
* A custom label formatter. This is applied after sorting, and before renderCell.
|
|
70
|
-
* Useful for formatting dates for example.
|
|
71
|
-
* @param value
|
|
72
|
-
*/
|
|
73
|
-
itemLabelFormatter?: (value: TItemValue, item: TItem) => string;
|
|
74
|
-
/**
|
|
75
|
-
* Specifies if the cell is editable. Used together with gridCellEnabled.
|
|
76
|
-
* Defaults to false. Can be a boolean or a resolver.
|
|
77
|
-
*/
|
|
78
|
-
isEditable?: boolean | ((item: TItem) => boolean);
|
|
79
|
-
/**
|
|
80
|
-
* The onChange callback when isEditable is true.
|
|
81
|
-
* @param item
|
|
82
|
-
* @param value
|
|
83
|
-
*/
|
|
84
|
-
onChange?: (item: TItem, value: string | undefined) => void;
|
|
85
|
-
/**
|
|
86
|
-
* The onKeyDown callback on the HTML element with focus.
|
|
87
|
-
* @param ev
|
|
88
|
-
* @param args
|
|
89
|
-
*/
|
|
90
|
-
onKeyDown?: (ev: React.KeyboardEvent<HTMLDivElement>, args: StandardTableOnKeyDownArgs<TItem, TColumnKey>) => void;
|
|
91
|
-
/**
|
|
92
|
-
* Disables the grid cell functionality for this column.
|
|
93
|
-
* If enable, the user can no longer navigate to or from this column with arrow keys.
|
|
94
|
-
* Focus highlight on the cell is also disabled.
|
|
95
|
-
*/
|
|
96
|
-
disableGridCell?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Grid cell is enabled, but arrow key logic and focus highlight must be applied manually.
|
|
99
|
-
* This makes it possible to move focus to an element inside the cell, instead of on the cell itself.
|
|
100
|
-
* For example, if the cell contains a checkbox, we user can arrow key navigate to the checkbox.
|
|
101
|
-
*/
|
|
102
|
-
disableGridCellFocus?: boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Grid cell options, if you need custom behaviour.
|
|
105
|
-
* Not all options are available, since it is controlled by StandardTable.
|
|
106
|
-
*/
|
|
107
|
-
gridCellOptions?: Omit<UseGridCellOptions<string>, "colIndex" | "rowIndex" | "numRows" | "numCols" | "tableId" | "isEditable" | "onChange">;
|
|
108
|
-
/**
|
|
109
|
-
* The icon variant to use when displaying sort order.
|
|
110
|
-
*/
|
|
111
|
-
sortOrderIconVariant?: SortOrderIconVariant;
|
|
112
|
-
/**
|
|
113
|
-
* Render summary cell at the bottom of the table.
|
|
114
|
-
* If this is not provided for any columns, the summary row will not be rendered at all.
|
|
115
|
-
*/
|
|
116
|
-
renderSummaryCell?: StandardTableSummaryCellRenderer<TItem>;
|
|
117
|
-
/**
|
|
118
|
-
* Render summary cell at the bottom of the table.
|
|
119
|
-
* If this is not provided for any columns, the summary row will not be rendered at all.
|
|
120
|
-
*/
|
|
121
|
-
summaryText?: StandardTableSummaryTextProvider<TItem>;
|
|
122
|
-
/**
|
|
123
|
-
* Col span for the summary cell.
|
|
124
|
-
*/
|
|
125
|
-
summaryCellColSpan?: number;
|
|
126
|
-
}
|
|
127
|
-
export declare type StandardTableSummaryTextProvider<TItem> = (arg: StandardTableSummaryTextProviderArgObject<TItem>) => string;
|
|
128
|
-
export interface StandardTableSummaryTextProviderArgObject<TItem> {
|
|
129
|
-
items: Array<TItem>;
|
|
130
|
-
}
|
|
131
|
-
export declare type StandardTableSummaryCellRenderer<TItem> = (arg: StandardTableSummaryCellRendererArgObject<TItem>) => ReactNode;
|
|
132
|
-
export interface StandardTableSummaryCellRendererArgObject<TItem> {
|
|
133
|
-
items: Array<TItem>;
|
|
134
|
-
text?: string;
|
|
135
|
-
}
|
|
136
|
-
export declare type StandardTableCellRenderer<TItemValue, TItem> = (arg: StandardTableCellRendererArgObject<TItemValue, TItem>) => ReactNode;
|
|
137
|
-
export interface StandardTableCellRendererArgObject<TItemValue, TItem> {
|
|
138
|
-
label: string;
|
|
139
|
-
value: TItemValue;
|
|
140
|
-
item: TItem;
|
|
141
|
-
itemKey: string;
|
|
142
|
-
gridCell: UseGridCellResult<string>;
|
|
143
|
-
isEditable?: boolean;
|
|
144
|
-
isSelected: boolean;
|
|
145
|
-
/**
|
|
146
|
-
* The z-index used for that cell. Usable if the cell has a popover which should get same z-index for example.
|
|
147
|
-
*/
|
|
148
|
-
zIndex?: number | string;
|
|
149
|
-
}
|
|
150
|
-
export declare type BackgroundResolver<TItem> = (item: TItem) => string | undefined;
|
|
151
|
-
export interface ItemValueResolver<TItem, TItemValue> {
|
|
152
|
-
itemValueResolver: (item: TItem) => TItemValue;
|
|
153
|
-
}
|
|
154
|
-
export declare const createColumnConfig: <TItem, TItemValue, TColumnKey extends string>(itemValueResolver: (item: TItem) => TItemValue, options?: StandardTableColumnOptions<TItem, TItemValue, TColumnKey> | undefined) => StandardTableColumnConfig<TItem, TItemValue, TColumnKey>;
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { UseGridCellOptions, UseGridCellResult } from "../../grid-cell/hooks/UseGridCell";
|
|
3
|
+
import { SortOrderIconVariant } from "../../table-ui/components/table/SortOrderIcon";
|
|
4
|
+
import { StandardTableOnKeyDownArgs } from "./StandardTableConfig";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
export declare type StandardTableColumnConfig<TItem, TItemValue, TColumnKey extends string> = StandardTableColumnOptions<TItem, TItemValue, TColumnKey> & StandardTableColumnOptionsWithNoGroups & ItemValueResolver<TItem, TItemValue>;
|
|
7
|
+
export declare type StandardTableColumnConfigWithGroups<TItem, TItemValue, TColumnKey extends string> = StandardTableColumnOptions<TItem, TItemValue, TColumnKey> & ItemValueResolver<TItem, TItemValue>;
|
|
8
|
+
export interface StandardTableColumnOptionsWithNoGroups {
|
|
9
|
+
/**
|
|
10
|
+
* Enable sticky behaviour to the left make elements scroll in behind this column.
|
|
11
|
+
* If neither left nor right is specified, it defaults to left: 0px.
|
|
12
|
+
*/
|
|
13
|
+
sticky?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Set a custom z index
|
|
16
|
+
*/
|
|
17
|
+
zIndex?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Offset column from left (ex if we have multiple sticky columns)
|
|
20
|
+
*/
|
|
21
|
+
left?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Offset column from right (ex if we have multiple sticky columns)
|
|
24
|
+
*/
|
|
25
|
+
right?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface StandardTableColumnOptions<TItem, TItemValue, TColumnKey extends string> {
|
|
28
|
+
/**
|
|
29
|
+
* The header label of the column.
|
|
30
|
+
*/
|
|
31
|
+
columnLabel?: string;
|
|
32
|
+
/**
|
|
33
|
+
* This shows a tooltip on the left side of the column header label.
|
|
34
|
+
*/
|
|
35
|
+
infoIconTooltipText?: string;
|
|
36
|
+
/**
|
|
37
|
+
* The min-width of the column.
|
|
38
|
+
*/
|
|
39
|
+
minWidth?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The width of the column.
|
|
42
|
+
*/
|
|
43
|
+
width?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Custom renderer for the cell. Falls back to an internal renderer that uses String(item[field]).
|
|
46
|
+
*/
|
|
47
|
+
renderCell?: StandardTableCellRenderer<TItemValue, TItem>;
|
|
48
|
+
/**
|
|
49
|
+
* Adds a static background color to the column.
|
|
50
|
+
*/
|
|
51
|
+
background?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Adds a dynamic background color to the column, based on the item.
|
|
54
|
+
*/
|
|
55
|
+
backgroundResolver?: BackgroundResolver<TItem>;
|
|
56
|
+
/**
|
|
57
|
+
* Adds a border on the left side of the column. Can be a boolean, is a border CSS value.
|
|
58
|
+
*/
|
|
59
|
+
borderLeft?: string | boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Justify content for the header. Defaults to flex-start, which aligns the label to the left.
|
|
62
|
+
*/
|
|
63
|
+
justifyContentHeader?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Justify content for the cell. Defaults to flex-start, which aligns the cell content to the left.
|
|
66
|
+
*/
|
|
67
|
+
justifyContentCell?: string;
|
|
68
|
+
/**
|
|
69
|
+
* A custom label formatter. This is applied after sorting, and before renderCell.
|
|
70
|
+
* Useful for formatting dates for example.
|
|
71
|
+
* @param value
|
|
72
|
+
*/
|
|
73
|
+
itemLabelFormatter?: (value: TItemValue, item: TItem) => string;
|
|
74
|
+
/**
|
|
75
|
+
* Specifies if the cell is editable. Used together with gridCellEnabled.
|
|
76
|
+
* Defaults to false. Can be a boolean or a resolver.
|
|
77
|
+
*/
|
|
78
|
+
isEditable?: boolean | ((item: TItem) => boolean);
|
|
79
|
+
/**
|
|
80
|
+
* The onChange callback when isEditable is true.
|
|
81
|
+
* @param item
|
|
82
|
+
* @param value
|
|
83
|
+
*/
|
|
84
|
+
onChange?: (item: TItem, value: string | undefined) => void;
|
|
85
|
+
/**
|
|
86
|
+
* The onKeyDown callback on the HTML element with focus.
|
|
87
|
+
* @param ev
|
|
88
|
+
* @param args
|
|
89
|
+
*/
|
|
90
|
+
onKeyDown?: (ev: React.KeyboardEvent<HTMLDivElement>, args: StandardTableOnKeyDownArgs<TItem, TColumnKey>) => void;
|
|
91
|
+
/**
|
|
92
|
+
* Disables the grid cell functionality for this column.
|
|
93
|
+
* If enable, the user can no longer navigate to or from this column with arrow keys.
|
|
94
|
+
* Focus highlight on the cell is also disabled.
|
|
95
|
+
*/
|
|
96
|
+
disableGridCell?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Grid cell is enabled, but arrow key logic and focus highlight must be applied manually.
|
|
99
|
+
* This makes it possible to move focus to an element inside the cell, instead of on the cell itself.
|
|
100
|
+
* For example, if the cell contains a checkbox, we user can arrow key navigate to the checkbox.
|
|
101
|
+
*/
|
|
102
|
+
disableGridCellFocus?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Grid cell options, if you need custom behaviour.
|
|
105
|
+
* Not all options are available, since it is controlled by StandardTable.
|
|
106
|
+
*/
|
|
107
|
+
gridCellOptions?: Omit<UseGridCellOptions<string>, "colIndex" | "rowIndex" | "numRows" | "numCols" | "tableId" | "isEditable" | "onChange">;
|
|
108
|
+
/**
|
|
109
|
+
* The icon variant to use when displaying sort order.
|
|
110
|
+
*/
|
|
111
|
+
sortOrderIconVariant?: SortOrderIconVariant;
|
|
112
|
+
/**
|
|
113
|
+
* Render summary cell at the bottom of the table.
|
|
114
|
+
* If this is not provided for any columns, the summary row will not be rendered at all.
|
|
115
|
+
*/
|
|
116
|
+
renderSummaryCell?: StandardTableSummaryCellRenderer<TItem>;
|
|
117
|
+
/**
|
|
118
|
+
* Render summary cell at the bottom of the table.
|
|
119
|
+
* If this is not provided for any columns, the summary row will not be rendered at all.
|
|
120
|
+
*/
|
|
121
|
+
summaryText?: StandardTableSummaryTextProvider<TItem>;
|
|
122
|
+
/**
|
|
123
|
+
* Col span for the summary cell.
|
|
124
|
+
*/
|
|
125
|
+
summaryCellColSpan?: number;
|
|
126
|
+
}
|
|
127
|
+
export declare type StandardTableSummaryTextProvider<TItem> = (arg: StandardTableSummaryTextProviderArgObject<TItem>) => string;
|
|
128
|
+
export interface StandardTableSummaryTextProviderArgObject<TItem> {
|
|
129
|
+
items: Array<TItem>;
|
|
130
|
+
}
|
|
131
|
+
export declare type StandardTableSummaryCellRenderer<TItem> = (arg: StandardTableSummaryCellRendererArgObject<TItem>) => ReactNode;
|
|
132
|
+
export interface StandardTableSummaryCellRendererArgObject<TItem> {
|
|
133
|
+
items: Array<TItem>;
|
|
134
|
+
text?: string;
|
|
135
|
+
}
|
|
136
|
+
export declare type StandardTableCellRenderer<TItemValue, TItem> = (arg: StandardTableCellRendererArgObject<TItemValue, TItem>) => ReactNode;
|
|
137
|
+
export interface StandardTableCellRendererArgObject<TItemValue, TItem> {
|
|
138
|
+
label: string;
|
|
139
|
+
value: TItemValue;
|
|
140
|
+
item: TItem;
|
|
141
|
+
itemKey: string;
|
|
142
|
+
gridCell: UseGridCellResult<string>;
|
|
143
|
+
isEditable?: boolean;
|
|
144
|
+
isSelected: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* The z-index used for that cell. Usable if the cell has a popover which should get same z-index for example.
|
|
147
|
+
*/
|
|
148
|
+
zIndex?: number | string;
|
|
149
|
+
}
|
|
150
|
+
export declare type BackgroundResolver<TItem> = (item: TItem) => string | undefined;
|
|
151
|
+
export interface ItemValueResolver<TItem, TItemValue> {
|
|
152
|
+
itemValueResolver: (item: TItem) => TItemValue;
|
|
153
|
+
}
|
|
154
|
+
export declare const createColumnConfig: <TItem, TItemValue, TColumnKey extends string>(itemValueResolver: (item: TItem) => TItemValue, options?: StandardTableColumnOptions<TItem, TItemValue, TColumnKey> | undefined) => StandardTableColumnConfig<TItem, TItemValue, TColumnKey>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
export interface StandardTableColumnGroupConfig<TColumnKey extends string> {
|
|
3
|
-
label?: string;
|
|
4
|
-
render?: (config: StandardTableColumnGroupConfig<TColumnKey>) => ReactNode;
|
|
5
|
-
contentLeft?: ReactNode;
|
|
6
|
-
contentRight?: ReactNode;
|
|
7
|
-
columnOrder: Array<TColumnKey>;
|
|
8
|
-
borderLeft?: boolean | string;
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
error?: string;
|
|
11
|
-
}
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface StandardTableColumnGroupConfig<TColumnKey extends string> {
|
|
3
|
+
label?: string;
|
|
4
|
+
render?: (config: StandardTableColumnGroupConfig<TColumnKey>) => ReactNode;
|
|
5
|
+
contentLeft?: ReactNode;
|
|
6
|
+
contentRight?: ReactNode;
|
|
7
|
+
columnOrder: Array<TColumnKey>;
|
|
8
|
+
borderLeft?: boolean | string;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
error?: string;
|
|
11
|
+
}
|
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { UseGridCellOptions } from "../../grid-cell/hooks/UseGridCell";
|
|
3
|
-
import { SortOrderIconVariant } from "../../table-ui/components/table/SortOrderIcon";
|
|
4
|
-
import { StandardTableColumnConfig, StandardTableColumnConfigWithGroups } from "./StandardTableColumnConfig";
|
|
5
|
-
import { StandardTableColumnGroupConfig } from "./StandardTableColumnGroupConfig";
|
|
6
|
-
export interface RowExpansionArgs {
|
|
7
|
-
onRequestCollapse?: () => void;
|
|
8
|
-
}
|
|
9
|
-
export interface StandardTableOnKeyDownArgs<TItem, TColumnKey extends string> {
|
|
10
|
-
columnId: TColumnKey;
|
|
11
|
-
item: TItem;
|
|
12
|
-
}
|
|
13
|
-
export declare type StandardTableConfig<TItem, TColumnKey extends string, TColumnGroupKey extends string = string> = StandardTableConfigWithGroups<TItem, TColumnKey, TColumnGroupKey> | StandardTableConfigWithNoGroups<TItem, TColumnKey>;
|
|
14
|
-
export interface StandardTableConfigWithGroups<TItem, TColumnKey extends string, TColumnGroupKey extends string = string> extends StandardTableConfigBase<TItem, TColumnKey> {
|
|
15
|
-
/**
|
|
16
|
-
* Configs for the columns available in the table.
|
|
17
|
-
*/
|
|
18
|
-
columns: Record<TColumnKey, StandardTableColumnConfigWithGroups<TItem, any, TColumnKey>>;
|
|
19
|
-
/**
|
|
20
|
-
* Configs for the column groups available in the table.
|
|
21
|
-
* If column groups are used, columnOrder will not be used.
|
|
22
|
-
*/
|
|
23
|
-
columnGroups: Record<TColumnGroupKey, StandardTableColumnGroupConfig<TColumnKey>>;
|
|
24
|
-
/**
|
|
25
|
-
* The order of the column groups. This is a list of keys from `columnGroups`.
|
|
26
|
-
* If the columnGroups `columnOrder` array is empty, it is not displayed.
|
|
27
|
-
*/
|
|
28
|
-
columnGroupOrder: Array<TColumnGroupKey>;
|
|
29
|
-
/**
|
|
30
|
-
* Enable sticky behaviour for column groups.
|
|
31
|
-
*/
|
|
32
|
-
stickyColumnGroups?: StickyColumnGroupVariant;
|
|
33
|
-
}
|
|
34
|
-
export interface StandardTableConfigWithNoGroups<TItem, TColumnKey extends string> extends StandardTableConfigBase<TItem, TColumnKey> {
|
|
35
|
-
/**
|
|
36
|
-
* Configs for the columns available in the table.
|
|
37
|
-
*/
|
|
38
|
-
columns: Record<TColumnKey, StandardTableColumnConfig<TItem, any, TColumnKey>>;
|
|
39
|
-
/**
|
|
40
|
-
* The order of the columns. This is a list of keys from `columns`.
|
|
41
|
-
* If a column is not added, it is not displayed.
|
|
42
|
-
*/
|
|
43
|
-
columnOrder: Array<TColumnKey>;
|
|
44
|
-
}
|
|
45
|
-
export interface StandardTableConfigBase<TItem, TColumnKey extends string> {
|
|
46
|
-
/**
|
|
47
|
-
* If true, click on table headers does not change sort order.
|
|
48
|
-
*/
|
|
49
|
-
disableSorting?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Table will be sorted by specified column key as default.
|
|
52
|
-
* Only used when using internal reducer. If redux is used, this setting is ignored.
|
|
53
|
-
*/
|
|
54
|
-
initialSortOrder?: TColumnKey;
|
|
55
|
-
/**
|
|
56
|
-
* Initial sorting will be desc. Does nothing if initialSortOrder is not specified.
|
|
57
|
-
* Only used when using internal reducer. If redux is used, this setting is ignored.
|
|
58
|
-
*/
|
|
59
|
-
initialSortOrderDesc?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* A key resolver for an item in the list. This is needed for React key props in the components.
|
|
62
|
-
* @param item
|
|
63
|
-
*/
|
|
64
|
-
keyResolver: (item: TItem) => string;
|
|
65
|
-
/**
|
|
66
|
-
* Shows an expand collapse button in the header.
|
|
67
|
-
*/
|
|
68
|
-
showHeaderExpandCollapse?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* When enabled, a column is added to the left side for a button.
|
|
71
|
-
* The button visibility is controlled by `expandCollapseDisableResolver`.
|
|
72
|
-
*/
|
|
73
|
-
enableExpandCollapse?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* If specified, return true to remove the expand collapse button from a row.
|
|
76
|
-
* Only applies if `enableExpandCollapse` is true. Default is visible.
|
|
77
|
-
* @param item
|
|
78
|
-
*/
|
|
79
|
-
expandCollapseDisableResolver?: (item: TItem) => boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Provide a custom renderer for a row. If undefined, or returns undefined, nothing will
|
|
82
|
-
* happen when the user tries to expand the row.
|
|
83
|
-
* @param item
|
|
84
|
-
*/
|
|
85
|
-
renderRowExpansion?: (item: TItem, args: RowExpansionArgs) => ReactNode | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* Disables react-infinite, which only renders visible rows.
|
|
88
|
-
* This is usable when using expandable rows, since infinite list requires
|
|
89
|
-
* fixed height.
|
|
90
|
-
*/
|
|
91
|
-
disableInfiniteList?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Add this to create a background color for the row, based on the item displayed.
|
|
94
|
-
* @param item
|
|
95
|
-
*/
|
|
96
|
-
rowBackgroundResolver?: (item: TItem, selected: boolean) => string | RowBackgroundResolverColorCombination | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* This makes it possible to disable the checkbox for a row, based in the item.
|
|
99
|
-
* @param item
|
|
100
|
-
*/
|
|
101
|
-
checkboxDisabledResolver?: (item: TItem) => boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Enable or disables the useGridCell hooks. The hook is always running, but this controls
|
|
104
|
-
* if it is applied to the DOM or not.
|
|
105
|
-
*/
|
|
106
|
-
enableGridCell?: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* Grid cell options, if you need custom behaviour.
|
|
109
|
-
* Not all options are available, since it is controlled by StandardTable.
|
|
110
|
-
* This is applied on all columns, and settings may be overridden by per-column gridCellOptions.
|
|
111
|
-
*/
|
|
112
|
-
gridCellOptions?: Omit<UseGridCellOptions<string>, "colIndex" | "rowIndex" | "numRows" | "numCols" | "tableId" | "isEditable" | "onChange">;
|
|
113
|
-
/**
|
|
114
|
-
* Shows a checkbox in the header. The checkbox state is a function of the item checkboxes
|
|
115
|
-
* and cannot be controlled.
|
|
116
|
-
*/
|
|
117
|
-
showHeaderCheckbox?: boolean;
|
|
118
|
-
/**
|
|
119
|
-
* Shows a checkbox on the left side of each row. The state is controller by the tableContext.
|
|
120
|
-
*/
|
|
121
|
-
showRowCheckbox?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Add indent to the row itself.
|
|
124
|
-
*/
|
|
125
|
-
rowIndent?: boolean | number;
|
|
126
|
-
/**
|
|
127
|
-
* Enable sticky behaviour for header row
|
|
128
|
-
*/
|
|
129
|
-
stickyHeader?: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Enable sticky behaviour for header and row checkbox
|
|
132
|
-
*/
|
|
133
|
-
stickyCheckboxColumn?: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* Set a custom z index
|
|
136
|
-
*/
|
|
137
|
-
zIndex?: number;
|
|
138
|
-
/**
|
|
139
|
-
* Offset header row from top (top css property)
|
|
140
|
-
*/
|
|
141
|
-
headerRowOffsetTop?: string;
|
|
142
|
-
/**
|
|
143
|
-
* The default icon variant to use when displaying sort order. Can be overridden per column.
|
|
144
|
-
* @default amount
|
|
145
|
-
*/
|
|
146
|
-
sortOrderIconVariant?: SortOrderIconVariant;
|
|
147
|
-
}
|
|
148
|
-
export interface RowBackgroundResolverColorCombination {
|
|
149
|
-
background: string;
|
|
150
|
-
hoverBackground: string;
|
|
151
|
-
}
|
|
152
|
-
export declare type StickyColumnGroupVariant = "first" | "last" | "both";
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { UseGridCellOptions } from "../../grid-cell/hooks/UseGridCell";
|
|
3
|
+
import { SortOrderIconVariant } from "../../table-ui/components/table/SortOrderIcon";
|
|
4
|
+
import { StandardTableColumnConfig, StandardTableColumnConfigWithGroups } from "./StandardTableColumnConfig";
|
|
5
|
+
import { StandardTableColumnGroupConfig } from "./StandardTableColumnGroupConfig";
|
|
6
|
+
export interface RowExpansionArgs {
|
|
7
|
+
onRequestCollapse?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface StandardTableOnKeyDownArgs<TItem, TColumnKey extends string> {
|
|
10
|
+
columnId: TColumnKey;
|
|
11
|
+
item: TItem;
|
|
12
|
+
}
|
|
13
|
+
export declare type StandardTableConfig<TItem, TColumnKey extends string, TColumnGroupKey extends string = string> = StandardTableConfigWithGroups<TItem, TColumnKey, TColumnGroupKey> | StandardTableConfigWithNoGroups<TItem, TColumnKey>;
|
|
14
|
+
export interface StandardTableConfigWithGroups<TItem, TColumnKey extends string, TColumnGroupKey extends string = string> extends StandardTableConfigBase<TItem, TColumnKey> {
|
|
15
|
+
/**
|
|
16
|
+
* Configs for the columns available in the table.
|
|
17
|
+
*/
|
|
18
|
+
columns: Record<TColumnKey, StandardTableColumnConfigWithGroups<TItem, any, TColumnKey>>;
|
|
19
|
+
/**
|
|
20
|
+
* Configs for the column groups available in the table.
|
|
21
|
+
* If column groups are used, columnOrder will not be used.
|
|
22
|
+
*/
|
|
23
|
+
columnGroups: Record<TColumnGroupKey, StandardTableColumnGroupConfig<TColumnKey>>;
|
|
24
|
+
/**
|
|
25
|
+
* The order of the column groups. This is a list of keys from `columnGroups`.
|
|
26
|
+
* If the columnGroups `columnOrder` array is empty, it is not displayed.
|
|
27
|
+
*/
|
|
28
|
+
columnGroupOrder: Array<TColumnGroupKey>;
|
|
29
|
+
/**
|
|
30
|
+
* Enable sticky behaviour for column groups.
|
|
31
|
+
*/
|
|
32
|
+
stickyColumnGroups?: StickyColumnGroupVariant;
|
|
33
|
+
}
|
|
34
|
+
export interface StandardTableConfigWithNoGroups<TItem, TColumnKey extends string> extends StandardTableConfigBase<TItem, TColumnKey> {
|
|
35
|
+
/**
|
|
36
|
+
* Configs for the columns available in the table.
|
|
37
|
+
*/
|
|
38
|
+
columns: Record<TColumnKey, StandardTableColumnConfig<TItem, any, TColumnKey>>;
|
|
39
|
+
/**
|
|
40
|
+
* The order of the columns. This is a list of keys from `columns`.
|
|
41
|
+
* If a column is not added, it is not displayed.
|
|
42
|
+
*/
|
|
43
|
+
columnOrder: Array<TColumnKey>;
|
|
44
|
+
}
|
|
45
|
+
export interface StandardTableConfigBase<TItem, TColumnKey extends string> {
|
|
46
|
+
/**
|
|
47
|
+
* If true, click on table headers does not change sort order.
|
|
48
|
+
*/
|
|
49
|
+
disableSorting?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Table will be sorted by specified column key as default.
|
|
52
|
+
* Only used when using internal reducer. If redux is used, this setting is ignored.
|
|
53
|
+
*/
|
|
54
|
+
initialSortOrder?: TColumnKey;
|
|
55
|
+
/**
|
|
56
|
+
* Initial sorting will be desc. Does nothing if initialSortOrder is not specified.
|
|
57
|
+
* Only used when using internal reducer. If redux is used, this setting is ignored.
|
|
58
|
+
*/
|
|
59
|
+
initialSortOrderDesc?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* A key resolver for an item in the list. This is needed for React key props in the components.
|
|
62
|
+
* @param item
|
|
63
|
+
*/
|
|
64
|
+
keyResolver: (item: TItem) => string;
|
|
65
|
+
/**
|
|
66
|
+
* Shows an expand collapse button in the header.
|
|
67
|
+
*/
|
|
68
|
+
showHeaderExpandCollapse?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* When enabled, a column is added to the left side for a button.
|
|
71
|
+
* The button visibility is controlled by `expandCollapseDisableResolver`.
|
|
72
|
+
*/
|
|
73
|
+
enableExpandCollapse?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* If specified, return true to remove the expand collapse button from a row.
|
|
76
|
+
* Only applies if `enableExpandCollapse` is true. Default is visible.
|
|
77
|
+
* @param item
|
|
78
|
+
*/
|
|
79
|
+
expandCollapseDisableResolver?: (item: TItem) => boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Provide a custom renderer for a row. If undefined, or returns undefined, nothing will
|
|
82
|
+
* happen when the user tries to expand the row.
|
|
83
|
+
* @param item
|
|
84
|
+
*/
|
|
85
|
+
renderRowExpansion?: (item: TItem, args: RowExpansionArgs) => ReactNode | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Disables react-infinite, which only renders visible rows.
|
|
88
|
+
* This is usable when using expandable rows, since infinite list requires
|
|
89
|
+
* fixed height.
|
|
90
|
+
*/
|
|
91
|
+
disableInfiniteList?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Add this to create a background color for the row, based on the item displayed.
|
|
94
|
+
* @param item
|
|
95
|
+
*/
|
|
96
|
+
rowBackgroundResolver?: (item: TItem, selected: boolean) => string | RowBackgroundResolverColorCombination | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* This makes it possible to disable the checkbox for a row, based in the item.
|
|
99
|
+
* @param item
|
|
100
|
+
*/
|
|
101
|
+
checkboxDisabledResolver?: (item: TItem) => boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Enable or disables the useGridCell hooks. The hook is always running, but this controls
|
|
104
|
+
* if it is applied to the DOM or not.
|
|
105
|
+
*/
|
|
106
|
+
enableGridCell?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Grid cell options, if you need custom behaviour.
|
|
109
|
+
* Not all options are available, since it is controlled by StandardTable.
|
|
110
|
+
* This is applied on all columns, and settings may be overridden by per-column gridCellOptions.
|
|
111
|
+
*/
|
|
112
|
+
gridCellOptions?: Omit<UseGridCellOptions<string>, "colIndex" | "rowIndex" | "numRows" | "numCols" | "tableId" | "isEditable" | "onChange">;
|
|
113
|
+
/**
|
|
114
|
+
* Shows a checkbox in the header. The checkbox state is a function of the item checkboxes
|
|
115
|
+
* and cannot be controlled.
|
|
116
|
+
*/
|
|
117
|
+
showHeaderCheckbox?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Shows a checkbox on the left side of each row. The state is controller by the tableContext.
|
|
120
|
+
*/
|
|
121
|
+
showRowCheckbox?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Add indent to the row itself.
|
|
124
|
+
*/
|
|
125
|
+
rowIndent?: boolean | number;
|
|
126
|
+
/**
|
|
127
|
+
* Enable sticky behaviour for header row
|
|
128
|
+
*/
|
|
129
|
+
stickyHeader?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Enable sticky behaviour for header and row checkbox
|
|
132
|
+
*/
|
|
133
|
+
stickyCheckboxColumn?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Set a custom z index
|
|
136
|
+
*/
|
|
137
|
+
zIndex?: number;
|
|
138
|
+
/**
|
|
139
|
+
* Offset header row from top (top css property)
|
|
140
|
+
*/
|
|
141
|
+
headerRowOffsetTop?: string;
|
|
142
|
+
/**
|
|
143
|
+
* The default icon variant to use when displaying sort order. Can be overridden per column.
|
|
144
|
+
* @default amount
|
|
145
|
+
*/
|
|
146
|
+
sortOrderIconVariant?: SortOrderIconVariant;
|
|
147
|
+
}
|
|
148
|
+
export interface RowBackgroundResolverColorCombination {
|
|
149
|
+
background: string;
|
|
150
|
+
hoverBackground: string;
|
|
151
|
+
}
|
|
152
|
+
export declare type StickyColumnGroupVariant = "first" | "last" | "both";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StandardTableVariant } from "../components/StandardTable";
|
|
2
|
-
export declare const elementHeightPerVariant: Record<StandardTableVariant, number>;
|
|
1
|
+
import { StandardTableVariant } from "../components/StandardTable";
|
|
2
|
+
export declare const elementHeightPerVariant: Record<StandardTableVariant, number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { GroupConfigAndId } from "../features/column-groups/ColumnGroupFactory";
|
|
3
|
-
export declare const GroupConfigsAndIdsForRowsContext: import("react").Context<GroupConfigAndId<any>[]>;
|
|
4
|
-
export declare const useGroupConfigsAndIdsForRows: <TColumnKey extends string>() => GroupConfigAndId<TColumnKey>[];
|
|
5
|
-
export declare const useTotalNumColumnsForRows: () => number;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { GroupConfigAndId } from "../features/column-groups/ColumnGroupFactory";
|
|
3
|
+
export declare const GroupConfigsAndIdsForRowsContext: import("react").Context<GroupConfigAndId<any>[]>;
|
|
4
|
+
export declare const useGroupConfigsAndIdsForRows: <TColumnKey extends string>() => GroupConfigAndId<TColumnKey>[];
|
|
5
|
+
export declare const useTotalNumColumnsForRows: () => number;
|