@vuu-ui/vuu-table 0.8.64 → 0.8.66
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/cjs/Table.css.js +1 -1
- package/cjs/Table.js.map +1 -1
- package/cjs/context-menu/buildContextMenuDescriptors.js +4 -4
- package/cjs/context-menu/buildContextMenuDescriptors.js.map +1 -1
- package/cjs/table-config.js +14 -4
- package/cjs/table-config.js.map +1 -1
- package/cjs/useTable.js +37 -8
- package/cjs/useTable.js.map +1 -1
- package/cjs/useTableModel.js +40 -7
- package/cjs/useTableModel.js.map +1 -1
- package/cjs/useTableViewport.js +2 -2
- package/cjs/useTableViewport.js.map +1 -1
- package/esm/Table.css.js +1 -1
- package/esm/Table.js.map +1 -1
- package/esm/context-menu/buildContextMenuDescriptors.js +4 -4
- package/esm/context-menu/buildContextMenuDescriptors.js.map +1 -1
- package/esm/table-config.js +14 -4
- package/esm/table-config.js.map +1 -1
- package/esm/useTable.js +38 -9
- package/esm/useTable.js.map +1 -1
- package/esm/useTableModel.js +41 -8
- package/esm/useTableModel.js.map +1 -1
- package/esm/useTableViewport.js +2 -2
- package/esm/useTableViewport.js.map +1 -1
- package/package.json +9 -9
- package/types/table-config.d.ts +2 -1
- package/types/useTable.d.ts +2 -0
- package/types/useTableModel.d.ts +6 -2
package/types/useTable.d.ts
CHANGED
|
@@ -45,8 +45,10 @@ export declare const useTable: ({ allowDragDrop, availableColumns, config, conta
|
|
|
45
45
|
virtualColSpan: number;
|
|
46
46
|
};
|
|
47
47
|
tableAttributes: {
|
|
48
|
+
availableWidth: number;
|
|
48
49
|
columnDefaultWidth?: number | undefined;
|
|
49
50
|
columnFormatHeader?: "capitalize" | "uppercase" | undefined;
|
|
51
|
+
columnLayout?: import("@vuu-ui/vuu-table-types").ColumnLayout | undefined;
|
|
50
52
|
columnSeparators?: boolean | undefined;
|
|
51
53
|
rowSeparators?: boolean | undefined;
|
|
52
54
|
zebraStripes?: boolean | undefined;
|
package/types/useTableModel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnDescriptor, PinLocation, ResizePhase, RuntimeColumnDescriptor, TableAttributes, TableConfig, TableHeadings, TableSelectionModel } from "@vuu-ui/vuu-table-types";
|
|
1
|
+
import { ColumnDescriptor, ColumnLayout, PinLocation, ResizePhase, RuntimeColumnDescriptor, TableAttributes, TableConfig, TableHeadings, TableSelectionModel } from "@vuu-ui/vuu-table-types";
|
|
2
2
|
import { DataSource, DataSourceConfig, TableSchema } from "@vuu-ui/vuu-data-types";
|
|
3
3
|
import { VuuTable } from "@vuu-ui/vuu-protocol-types";
|
|
4
4
|
import { Reducer } from "react";
|
|
@@ -17,9 +17,11 @@ export interface TableModel extends TableAttributes {
|
|
|
17
17
|
* readonly copy of the original TableConfig.
|
|
18
18
|
*/
|
|
19
19
|
interface InternalTableModel extends TableModel {
|
|
20
|
+
availableWidth: number;
|
|
20
21
|
tableConfig: Readonly<TableConfig>;
|
|
21
22
|
}
|
|
22
23
|
export interface ColumnActionInit {
|
|
24
|
+
availableWidth: number;
|
|
23
25
|
type: "init";
|
|
24
26
|
tableConfig: TableConfig;
|
|
25
27
|
dataSource: DataSource;
|
|
@@ -87,13 +89,15 @@ export type PersistentColumnAction = ColumnActionPin | ColumnActionHide | Column
|
|
|
87
89
|
export type GridModelAction = ColumnActionHide | ColumnActionInit | ColumnActionMove | ColumnActionPin | ColumnActionResize | ColumnActionSetTableSchema | ColumnActionShow | ColumnActionUpdate | ColumnActionUpdateProp | ColumnActionTableConfig;
|
|
88
90
|
export type GridModelReducer = Reducer<InternalTableModel, GridModelAction>;
|
|
89
91
|
export type ColumnActionDispatch = (action: GridModelAction) => void;
|
|
90
|
-
export declare const useTableModel: (tableConfigProp: TableConfig, dataSource: DataSource, selectionModel: TableSelectionModel) => {
|
|
92
|
+
export declare const useTableModel: (tableConfigProp: TableConfig, dataSource: DataSource, selectionModel: TableSelectionModel, availableWidth: number) => {
|
|
91
93
|
columns: RuntimeColumnDescriptor[];
|
|
92
94
|
dispatchTableModelAction: import("react").Dispatch<GridModelAction>;
|
|
93
95
|
headings: TableHeadings;
|
|
94
96
|
tableAttributes: {
|
|
97
|
+
availableWidth: number;
|
|
95
98
|
columnDefaultWidth?: number | undefined;
|
|
96
99
|
columnFormatHeader?: "capitalize" | "uppercase" | undefined;
|
|
100
|
+
columnLayout?: ColumnLayout | undefined;
|
|
97
101
|
columnSeparators?: boolean | undefined;
|
|
98
102
|
rowSeparators?: boolean | undefined;
|
|
99
103
|
zebraStripes?: boolean | undefined;
|