@vuu-ui/vuu-table-types 0.8.17-debug → 0.8.18-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/index.d.ts +66 -10
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -6,18 +6,15 @@ import type {
|
|
|
6
6
|
VuuSortType,
|
|
7
7
|
VuuTable,
|
|
8
8
|
} from "@vuu-ui/vuu-protocol-types";
|
|
9
|
-
import { VuuDataRow } from "@vuu-ui/vuu-protocol-types";
|
|
9
|
+
import type { VuuDataRow } from "@vuu-ui/vuu-protocol-types";
|
|
10
10
|
import type { ValueFormatter } from "@vuu-ui/vuu-table";
|
|
11
11
|
import type { ClientSideValidationChecker } from "@vuu-ui/vuu-ui-controls";
|
|
12
|
+
import type { DateTimePattern } from "@vuu-ui/vuu-utils";
|
|
12
13
|
import type { FunctionComponent, MouseEvent } from "react";
|
|
14
|
+
import type { HTMLAttributes } from "react";
|
|
13
15
|
|
|
14
16
|
export type TableSelectionModel = "none" | "single" | "checkbox" | "extended";
|
|
15
17
|
|
|
16
|
-
export type RangeTuple = [from: number, to: number];
|
|
17
|
-
export type SelectionItem = number | RangeTuple;
|
|
18
|
-
export type Selection = SelectionItem[];
|
|
19
|
-
export type SelectionChangeHandler = (selection: Selection) => void;
|
|
20
|
-
|
|
21
18
|
export type TableHeading = { label: string; width: number };
|
|
22
19
|
export type TableHeadings = TableHeading[][];
|
|
23
20
|
|
|
@@ -81,7 +78,7 @@ export interface GridConfig extends TableConfig {
|
|
|
81
78
|
export declare type ColumnTypeFormatting = {
|
|
82
79
|
alignOnDecimals?: boolean;
|
|
83
80
|
decimals?: number;
|
|
84
|
-
pattern?:
|
|
81
|
+
pattern?: DateTimePattern;
|
|
85
82
|
zeroPad?: boolean;
|
|
86
83
|
};
|
|
87
84
|
|
|
@@ -132,7 +129,19 @@ export interface ValueListRenderer {
|
|
|
132
129
|
values: string[];
|
|
133
130
|
}
|
|
134
131
|
|
|
135
|
-
export declare type DateTimeColumnTypeSimple = "date
|
|
132
|
+
export declare type DateTimeColumnTypeSimple = "date/time";
|
|
133
|
+
|
|
134
|
+
type DateTimeColumnType =
|
|
135
|
+
| DateTimeColumnTypeSimple
|
|
136
|
+
| (Omit<ColumnTypeDescriptor, "name"> & { name: DateTimeColumnTypeSimple });
|
|
137
|
+
|
|
138
|
+
export declare type DateTimeColumnDescriptor = Omit<
|
|
139
|
+
ColumnDescriptor,
|
|
140
|
+
"type"
|
|
141
|
+
> & {
|
|
142
|
+
type: DateTimeColumnType;
|
|
143
|
+
};
|
|
144
|
+
|
|
136
145
|
export declare type ColumnTypeSimple =
|
|
137
146
|
| "string"
|
|
138
147
|
| "number"
|
|
@@ -184,9 +193,9 @@ export interface ColumnDescriptor {
|
|
|
184
193
|
colHeaderLabelRenderer?: string;
|
|
185
194
|
editable?: boolean;
|
|
186
195
|
flex?: number;
|
|
187
|
-
/**
|
|
196
|
+
/**
|
|
188
197
|
Optional additional level(s) of heading to display above label.
|
|
189
|
-
May span multiple columns, if multiple adjacent columns declare
|
|
198
|
+
May span multiple columns, if multiple adjacent columns declare
|
|
190
199
|
same heading at same level.
|
|
191
200
|
*/
|
|
192
201
|
heading?: string[];
|
|
@@ -275,3 +284,50 @@ export type GridAction =
|
|
|
275
284
|
| ScrollAction
|
|
276
285
|
| GridActionResizeCol
|
|
277
286
|
| GridActionSelection;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Describes the props for a Column Configuration Editor, for which
|
|
290
|
+
* an implementation is provided in vuu-table-extras
|
|
291
|
+
*/
|
|
292
|
+
export interface ColumnSettingsProps {
|
|
293
|
+
column: ColumnDescriptor;
|
|
294
|
+
onConfigChange: (config: TableConfig) => void;
|
|
295
|
+
onCancelCreateColumn: () => void;
|
|
296
|
+
onCreateCalculatedColumn: (column: ColumnDescriptor) => void;
|
|
297
|
+
tableConfig: TableConfig;
|
|
298
|
+
vuuTable: VuuTable;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Describes the props for a Table Configuration Editor, for which
|
|
303
|
+
* an implementation is provided in vuu-table-extras
|
|
304
|
+
*/
|
|
305
|
+
export interface TableSettingsProps {
|
|
306
|
+
availableColumns: SchemaColumn[];
|
|
307
|
+
onAddCalculatedColumn: () => void;
|
|
308
|
+
onConfigChange: (config: TableConfig) => void;
|
|
309
|
+
onDataSourceConfigChange: (dataSOurceConfig: DataSourceConfig) => void;
|
|
310
|
+
onNavigateToColumn?: (columnName: string) => void;
|
|
311
|
+
tableConfig: TableConfig;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export type DefaultColumnConfiguration = <T extends string = string>(
|
|
315
|
+
tableName: T,
|
|
316
|
+
columnName: string
|
|
317
|
+
) => Partial<ColumnDescriptor> | undefined;
|
|
318
|
+
|
|
319
|
+
export type ResizePhase = "begin" | "resize" | "end";
|
|
320
|
+
|
|
321
|
+
export type TableColumnResizeHandler = (
|
|
322
|
+
phase: ResizePhase,
|
|
323
|
+
columnName: string,
|
|
324
|
+
width?: number
|
|
325
|
+
) => void;
|
|
326
|
+
|
|
327
|
+
export interface HeaderCellProps extends HTMLAttributes<HTMLDivElement> {
|
|
328
|
+
classBase?: string;
|
|
329
|
+
column: RuntimeColumnDescriptor;
|
|
330
|
+
onResize?: TableColumnResizeHandler;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export type TableConfigChangeHandler = (config: TableConfig) => void;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-table-types",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.18-debug",
|
|
4
4
|
"devDependencies": {
|
|
5
|
-
"@vuu-ui/vuu-protocol-types": "0.8.
|
|
5
|
+
"@vuu-ui/vuu-protocol-types": "0.8.18-debug"
|
|
6
6
|
},
|
|
7
7
|
"author": "heswell",
|
|
8
8
|
"license": "Apache-2.0",
|