@veeqo/ui 7.1.0 → 7.2.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/components/DataTable/DataTable.d.ts +1 -1
- package/dist/components/DataTable/hooks/useColumnWidths.d.ts +2 -1
- package/dist/components/DataTable/hooks/useColumns.d.ts +6 -56
- package/dist/components/DataTable/types.d.ts +3 -5
- package/dist/components/DataTable/utils/generateTableCss.d.ts +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { ColumnMenu } from './components/ColumnMenu';
|
|
|
4
4
|
import { SelectionCell } from './components/SelectionCell';
|
|
5
5
|
import { SelectionHeader } from './components/SelectionHeader';
|
|
6
6
|
export declare const DataTable: {
|
|
7
|
-
({ ActionBarSlot, borderMode, columns: initialColumns, emptyState, expandedRowIds, loading, loadingRowCount, onChangeSort, rows, disabledRowIds, selectionMode, selectionState, setExpanded, sortState, stripingMode, enableStickyHeader, resizeableColumns, onResizeColumns, }: DataTableProps): React.JSX.Element;
|
|
7
|
+
({ ActionBarSlot, borderMode, columns: initialColumns, emptyState, expandedRowIds, loading, loadingRowCount, onChangeSort, rows, disabledRowIds, selectionMode, selectionState, setExpanded, sortState, stripingMode, enableStickyHeader, resizeableColumns, onResizeColumns, columnWidths, }: DataTableProps): React.JSX.Element;
|
|
8
8
|
defaultProps: {
|
|
9
9
|
loading: boolean;
|
|
10
10
|
loadingRowCount: number;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { ColumnConfigs, ColumnWidthsType, ColumnWidthHandler, ColumnId } from '../types';
|
|
3
|
-
export declare const useColumnWidths: ({ tableRef, columns, columnIds, }: {
|
|
3
|
+
export declare const useColumnWidths: ({ tableRef, columns, columnIds, columnWidths: initialColumnWidths, }: {
|
|
4
4
|
tableRef: RefObject<HTMLElement>;
|
|
5
5
|
columns: ColumnConfigs;
|
|
6
6
|
columnIds: ColumnId[];
|
|
7
|
+
columnWidths?: ColumnWidthsType | undefined;
|
|
7
8
|
}) => {
|
|
8
9
|
setColumnWidth: ColumnWidthHandler;
|
|
9
10
|
columnWidths: ColumnWidthsType;
|
|
@@ -1,59 +1,9 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
import { ColumnConfigs, ColumnWidthState, ResizeColumnData } from '../types';
|
|
3
|
-
export declare function useColumns(columns: ColumnConfigs, tableRef: RefObject<HTMLElement>, onResizeColumns?: (columnWidths: ResizeColumnData) => void): {
|
|
4
|
-
visible:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
hidden?: boolean | undefined;
|
|
9
|
-
icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
10
|
-
pinned?: import("../types").ColumnPinned | undefined;
|
|
11
|
-
sortable?: boolean | undefined;
|
|
12
|
-
spacing?: keyof import("../../Stack/types").SizeScale | undefined;
|
|
13
|
-
span?: number | undefined;
|
|
14
|
-
title?: string | undefined;
|
|
15
|
-
tooltip?: string | undefined;
|
|
16
|
-
resizeMinWidth?: number | undefined;
|
|
17
|
-
renderCell: import("../types").CellRenderer;
|
|
18
|
-
renderFooter?: import("../types").FooterRenderer | undefined;
|
|
19
|
-
renderHeader?: import("../types").HeaderRenderer | undefined;
|
|
20
|
-
renderNestedCell?: import("../types").NestedCellRenderer | undefined;
|
|
21
|
-
}[];
|
|
22
|
-
pinnedLeft: {
|
|
23
|
-
width: import("../types").ColumnWidth | import("../types").ColumnWidthBounded | undefined;
|
|
24
|
-
id: import("../types").ColumnId;
|
|
25
|
-
align?: import("../types").ColumnAlignment | undefined;
|
|
26
|
-
hidden?: boolean | undefined;
|
|
27
|
-
icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
28
|
-
pinned?: import("../types").ColumnPinned | undefined;
|
|
29
|
-
sortable?: boolean | undefined;
|
|
30
|
-
spacing?: keyof import("../../Stack/types").SizeScale | undefined;
|
|
31
|
-
span?: number | undefined;
|
|
32
|
-
title?: string | undefined;
|
|
33
|
-
tooltip?: string | undefined;
|
|
34
|
-
resizeMinWidth?: number | undefined;
|
|
35
|
-
renderCell: import("../types").CellRenderer;
|
|
36
|
-
renderFooter?: import("../types").FooterRenderer | undefined;
|
|
37
|
-
renderHeader?: import("../types").HeaderRenderer | undefined;
|
|
38
|
-
renderNestedCell?: import("../types").NestedCellRenderer | undefined;
|
|
39
|
-
}[];
|
|
40
|
-
pinnedRight: {
|
|
41
|
-
width: import("../types").ColumnWidth | import("../types").ColumnWidthBounded | undefined;
|
|
42
|
-
id: import("../types").ColumnId;
|
|
43
|
-
align?: import("../types").ColumnAlignment | undefined;
|
|
44
|
-
hidden?: boolean | undefined;
|
|
45
|
-
icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
46
|
-
pinned?: import("../types").ColumnPinned | undefined;
|
|
47
|
-
sortable?: boolean | undefined;
|
|
48
|
-
spacing?: keyof import("../../Stack/types").SizeScale | undefined;
|
|
49
|
-
span?: number | undefined;
|
|
50
|
-
title?: string | undefined;
|
|
51
|
-
tooltip?: string | undefined;
|
|
52
|
-
resizeMinWidth?: number | undefined;
|
|
53
|
-
renderCell: import("../types").CellRenderer;
|
|
54
|
-
renderFooter?: import("../types").FooterRenderer | undefined;
|
|
55
|
-
renderHeader?: import("../types").HeaderRenderer | undefined;
|
|
56
|
-
renderNestedCell?: import("../types").NestedCellRenderer | undefined;
|
|
57
|
-
}[];
|
|
2
|
+
import { ColumnConfigs, ColumnWidthState, ColumnWidthsType, ResizeColumnData } from '../types';
|
|
3
|
+
export declare function useColumns(columns: ColumnConfigs, tableRef: RefObject<HTMLElement>, onResizeColumns?: (columnWidths: ResizeColumnData) => void, columnWidths?: ColumnWidthsType): {
|
|
4
|
+
visible: import("../types").ColumnConfig[];
|
|
5
|
+
columnWidths: ColumnWidthsType;
|
|
6
|
+
pinnedLeft: import("../types").ColumnConfig[];
|
|
7
|
+
pinnedRight: import("../types").ColumnConfig[];
|
|
58
8
|
setColumnWidth: ({ columnId, width }: ColumnWidthState) => void;
|
|
59
9
|
};
|
|
@@ -51,7 +51,7 @@ export type ColumnWidthState = {
|
|
|
51
51
|
columnId: ColumnId;
|
|
52
52
|
width: number | string;
|
|
53
53
|
};
|
|
54
|
-
export type ColumnWidthHandler = (columnWidthState: ColumnWidthState) => void;
|
|
54
|
+
export type ColumnWidthHandler = (columnWidthState: ColumnWidthState) => ColumnWidthsType | void;
|
|
55
55
|
export type RowId = number | string;
|
|
56
56
|
export interface NestedTableRow {
|
|
57
57
|
id: RowId;
|
|
@@ -140,13 +140,11 @@ export interface DataTableProps {
|
|
|
140
140
|
resizeableColumns?: boolean;
|
|
141
141
|
/** Callback for when columns are resized */
|
|
142
142
|
onResizeColumns?: (columnWidths: ResizeColumnData) => void;
|
|
143
|
+
columnWidths?: ColumnWidthsType;
|
|
143
144
|
}
|
|
144
145
|
export type ColumnWidthsType = {
|
|
145
146
|
[key: ColumnId]: ColumnWidthType;
|
|
146
147
|
};
|
|
147
148
|
export type ColumnWidthType = ColumnWidthFixed | ColumnWidthBounded | undefined;
|
|
148
|
-
export type ResizeColumnData =
|
|
149
|
-
id: ColumnId;
|
|
150
|
-
columnWidth?: ColumnWidth | ColumnWidthBounded;
|
|
151
|
-
}[];
|
|
149
|
+
export type ResizeColumnData = ColumnWidthsType;
|
|
152
150
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ColumnConfigs, ScrollPosition, StripingMode } from '../types';
|
|
1
|
+
import { ColumnConfigs, ColumnWidthsType, ScrollPosition, StripingMode } from '../types';
|
|
2
2
|
export type GenerateTableCssArgs = {
|
|
3
3
|
pinnedLeft: ColumnConfigs;
|
|
4
4
|
pinnedRight: ColumnConfigs;
|
|
5
5
|
cellWidths: Array<number>;
|
|
6
6
|
scrollPosition: ScrollPosition;
|
|
7
|
-
visible: ColumnConfigs;
|
|
8
7
|
stripingMode?: StripingMode;
|
|
8
|
+
columnWidths: ColumnWidthsType;
|
|
9
9
|
};
|
|
10
|
-
export declare function generateTableCss({ pinnedLeft, pinnedRight, cellWidths, scrollPosition,
|
|
10
|
+
export declare function generateTableCss({ pinnedLeft, pinnedRight, cellWidths, scrollPosition, stripingMode, columnWidths, }: GenerateTableCssArgs): string;
|