@vuu-ui/vuu-table-types 0.8.87 → 0.8.89
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 +18 -12
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -7,20 +7,20 @@ import type {
|
|
|
7
7
|
VuuMenuItem,
|
|
8
8
|
VuuRowDataItemType,
|
|
9
9
|
VuuSortType,
|
|
10
|
-
VuuTable
|
|
10
|
+
VuuTable,
|
|
11
11
|
} from "@vuu-ui/vuu-protocol-types";
|
|
12
12
|
import type { ClientSideValidationChecker } from "@vuu-ui/vuu-ui-controls";
|
|
13
13
|
import type {
|
|
14
14
|
ColumnMap,
|
|
15
15
|
DateTimePattern,
|
|
16
|
-
RowClassNameGenerator
|
|
16
|
+
RowClassNameGenerator,
|
|
17
17
|
} from "@vuu-ui/vuu-utils";
|
|
18
18
|
import type {
|
|
19
19
|
CSSProperties,
|
|
20
20
|
FunctionComponent,
|
|
21
21
|
HTMLAttributes,
|
|
22
22
|
MouseEvent,
|
|
23
|
-
ReactElement
|
|
23
|
+
ReactElement,
|
|
24
24
|
} from "react";
|
|
25
25
|
|
|
26
26
|
export type TableSelectionModel = "none" | "single" | "checkbox" | "extended";
|
|
@@ -31,13 +31,13 @@ export type TableHeadings = TableHeading[][];
|
|
|
31
31
|
export type ValueFormatter = (value: unknown) => string;
|
|
32
32
|
|
|
33
33
|
export type ClientSideValidationChecker = (
|
|
34
|
-
value?: VuuRowDataItemType
|
|
34
|
+
value?: VuuRowDataItemType,
|
|
35
35
|
) => string | false | undefined;
|
|
36
36
|
|
|
37
37
|
export type DataCellEditHandler = (
|
|
38
38
|
row: DataSourceRow,
|
|
39
39
|
columnName: string,
|
|
40
|
-
value: VuuRowDataItemType
|
|
40
|
+
value: VuuRowDataItemType,
|
|
41
41
|
) => Promise<string | true>;
|
|
42
42
|
|
|
43
43
|
export interface TableCellProps {
|
|
@@ -52,7 +52,7 @@ export interface TableCellProps {
|
|
|
52
52
|
export type CommitResponse = Promise<true | string>;
|
|
53
53
|
|
|
54
54
|
export type DataItemCommitHandler<
|
|
55
|
-
T extends VuuRowDataItemType = VuuRowDataItemType
|
|
55
|
+
T extends VuuRowDataItemType = VuuRowDataItemType,
|
|
56
56
|
> = (value: T) => CommitResponse;
|
|
57
57
|
|
|
58
58
|
export type TableRowSelectHandler = (row: DataSourceRowObject | null) => void;
|
|
@@ -63,14 +63,14 @@ export type TableRowSelectHandlerInternal = (row: DataSourceRow | null) => void;
|
|
|
63
63
|
*/
|
|
64
64
|
export type TableRowClickHandler = (
|
|
65
65
|
evt: MouseEvent<HTMLDivElement>,
|
|
66
|
-
row: DataSourceRowObject
|
|
66
|
+
row: DataSourceRowObject,
|
|
67
67
|
) => void;
|
|
68
68
|
|
|
69
69
|
export type TableRowClickHandlerInternal = (
|
|
70
70
|
evt: MouseEvent<HTMLDivElement>,
|
|
71
71
|
row: DataSourceRow,
|
|
72
72
|
rangeSelect: boolean,
|
|
73
|
-
keepExistingSelection: boolean
|
|
73
|
+
keepExistingSelection: boolean,
|
|
74
74
|
) => void;
|
|
75
75
|
|
|
76
76
|
export interface TableCellRendererProps
|
|
@@ -216,7 +216,7 @@ export declare type ColumnTypeDescriptorCustomRenderer = {
|
|
|
216
216
|
};
|
|
217
217
|
|
|
218
218
|
export interface FormattingSettingsProps<
|
|
219
|
-
T extends ColumnDescriptor = ColumnDescriptor
|
|
219
|
+
T extends ColumnDescriptor = ColumnDescriptor,
|
|
220
220
|
> {
|
|
221
221
|
column: T;
|
|
222
222
|
onChangeFormatting: (formatting: ColumnTypeFormatting) => void;
|
|
@@ -246,6 +246,8 @@ export type PinLocation = "left" | "right" | "floating";
|
|
|
246
246
|
|
|
247
247
|
export type ColumnAlignment = "left" | "right";
|
|
248
248
|
|
|
249
|
+
export type BulkEdit = "bulk" | false | "read-only";
|
|
250
|
+
|
|
249
251
|
/** This is a public description of a Column, defining all the
|
|
250
252
|
* column attributes that can be defined by client. */
|
|
251
253
|
export interface ColumnDescriptor {
|
|
@@ -255,6 +257,10 @@ export interface ColumnDescriptor {
|
|
|
255
257
|
colHeaderContentRenderer?: string;
|
|
256
258
|
colHeaderLabelRenderer?: string;
|
|
257
259
|
editable?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
There are three values for editableBulk. When editableBulk is false, user will not see the column in BulkEditPanel. When editableBulk is "bulk", user will see the column in BulkEditPanel and be able to bulk-edit on BulkEditRow. When editableBulk is "read-only", user will see the column but won't be able to edit.
|
|
262
|
+
*/
|
|
263
|
+
editableBulk?: BulkEdit;
|
|
258
264
|
flex?: number;
|
|
259
265
|
/**
|
|
260
266
|
Optional additional level(s) of heading to display above label.
|
|
@@ -381,11 +387,11 @@ export interface TableSettingsProps {
|
|
|
381
387
|
|
|
382
388
|
export type DefaultColumnConfiguration = <T extends string = string>(
|
|
383
389
|
tableName: T,
|
|
384
|
-
columnName: string
|
|
390
|
+
columnName: string,
|
|
385
391
|
) => Partial<ColumnDescriptor> | undefined;
|
|
386
392
|
|
|
387
393
|
export type DefaultTableConfiguration = (
|
|
388
|
-
vuuTable?: VuuTable
|
|
394
|
+
vuuTable?: VuuTable,
|
|
389
395
|
) => Partial<Omit<TableConfig, "columns">> | undefined;
|
|
390
396
|
|
|
391
397
|
export type ResizePhase = "begin" | "resize" | "end";
|
|
@@ -393,7 +399,7 @@ export type ResizePhase = "begin" | "resize" | "end";
|
|
|
393
399
|
export type TableColumnResizeHandler = (
|
|
394
400
|
phase: ResizePhase,
|
|
395
401
|
columnName: string,
|
|
396
|
-
width?: number
|
|
402
|
+
width?: number,
|
|
397
403
|
) => void;
|
|
398
404
|
|
|
399
405
|
export interface BaseRowProps {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-table-types",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.89",
|
|
4
4
|
"devDependencies": {
|
|
5
|
-
"@vuu-ui/vuu-data-types": "0.8.
|
|
6
|
-
"@vuu-ui/vuu-filter-types": "0.8.
|
|
7
|
-
"@vuu-ui/vuu-protocol-types": "0.8.
|
|
5
|
+
"@vuu-ui/vuu-data-types": "0.8.89",
|
|
6
|
+
"@vuu-ui/vuu-filter-types": "0.8.89",
|
|
7
|
+
"@vuu-ui/vuu-protocol-types": "0.8.89"
|
|
8
8
|
},
|
|
9
9
|
"author": "heswell",
|
|
10
10
|
"license": "Apache-2.0",
|