@vuu-ui/vuu-table 0.7.2-debug → 0.7.3-debug
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/index.js +48 -23
- package/cjs/index.js.map +2 -2
- package/esm/index.js +48 -23
- package/esm/index.js.map +2 -2
- package/package.json +5 -5
- package/types/useTableModel.d.ts +8 -8
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-table",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3-debug",
|
|
4
4
|
"author": "heswell",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@salt-ds/core": "1.2.0",
|
|
8
8
|
"@salt-ds/icons": "1.1.0",
|
|
9
9
|
"@heswell/salt-lab": "1.0.0-alpha.2",
|
|
10
|
-
"@vuu-ui/vuu-data": "0.7.
|
|
11
|
-
"@vuu-ui/vuu-filters": "0.7.
|
|
12
|
-
"@vuu-ui/vuu-popups": "0.7.
|
|
13
|
-
"@vuu-ui/vuu-utils": "0.7.
|
|
10
|
+
"@vuu-ui/vuu-data": "0.7.3-debug",
|
|
11
|
+
"@vuu-ui/vuu-filters": "0.7.3-debug",
|
|
12
|
+
"@vuu-ui/vuu-popups": "0.7.3-debug",
|
|
13
|
+
"@vuu-ui/vuu-utils": "0.7.3-debug"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"classnames": "^2.2.6",
|
package/types/useTableModel.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ColumnDescriptor, GridConfig, KeyedColumnDescriptor, PinLocation } from "@vuu-ui/vuu-datagrid-types";
|
|
2
2
|
import { Reducer } from "react";
|
|
3
|
-
import { VuuColumnDataType } from "@vuu-ui/vuu-protocol-types";
|
|
4
3
|
import { DataSourceConfig } from "@vuu-ui/vuu-data";
|
|
5
|
-
|
|
4
|
+
import { TableSchema } from "@vuu-ui/vuu-data/src/message-utils";
|
|
5
|
+
export interface TableModel extends Omit<GridConfig, "columns"> {
|
|
6
6
|
columns: KeyedColumnDescriptor[];
|
|
7
|
+
tableSchema?: Readonly<TableSchema>;
|
|
7
8
|
}
|
|
8
9
|
export interface ColumnActionInit {
|
|
9
10
|
type: "init";
|
|
@@ -35,10 +36,9 @@ export interface ColumnActionResize {
|
|
|
35
36
|
phase: "begin" | "resize" | "end";
|
|
36
37
|
width?: number;
|
|
37
38
|
}
|
|
38
|
-
export interface
|
|
39
|
-
type: "
|
|
40
|
-
|
|
41
|
-
serverDataTypes: VuuColumnDataType[];
|
|
39
|
+
export interface ColumnActionSetTableSchema {
|
|
40
|
+
type: "setTableSchema";
|
|
41
|
+
tableSchema: TableSchema;
|
|
42
42
|
}
|
|
43
43
|
export interface ColumnActionUpdate {
|
|
44
44
|
type: "updateColumn";
|
|
@@ -61,8 +61,8 @@ export interface ColumnActionTableConfig extends DataSourceConfig {
|
|
|
61
61
|
* PersistentColumnActions are those actions that require us to persist user changes across sessions
|
|
62
62
|
*/
|
|
63
63
|
export type PersistentColumnAction = ColumnActionPin | ColumnActionHide;
|
|
64
|
-
export type GridModelAction = ColumnActionHide | ColumnActionInit | ColumnActionMove | ColumnActionPin | ColumnActionResize |
|
|
65
|
-
export type GridModelReducer = Reducer<
|
|
64
|
+
export type GridModelAction = ColumnActionHide | ColumnActionInit | ColumnActionMove | ColumnActionPin | ColumnActionResize | ColumnActionSetTableSchema | ColumnActionShow | ColumnActionUpdate | ColumnActionUpdateProp | ColumnActionTableConfig;
|
|
65
|
+
export type GridModelReducer = Reducer<TableModel, GridModelAction>;
|
|
66
66
|
export type ColumnActionDispatch = (action: GridModelAction) => void;
|
|
67
67
|
export declare const useTableModel: (tableConfig: Omit<GridConfig, "headings">, dataSourceConfig?: DataSourceConfig) => {
|
|
68
68
|
columns: KeyedColumnDescriptor[];
|