@vuu-ui/vuu-table-types 0.8.56 → 0.8.58
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 +54 -17
- package/package.json +4 -2
package/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { DataSourceRowObject } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import { DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
1
3
|
import type { Filter } from "@vuu-ui/vuu-filter-types";
|
|
2
4
|
import type {
|
|
3
5
|
VuuAggType,
|
|
@@ -8,10 +10,18 @@ import type {
|
|
|
8
10
|
VuuTable,
|
|
9
11
|
} from "@vuu-ui/vuu-protocol-types";
|
|
10
12
|
import type { ClientSideValidationChecker } from "@vuu-ui/vuu-ui-controls";
|
|
11
|
-
import type {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import type {
|
|
14
|
+
ColumnMap,
|
|
15
|
+
DateTimePattern,
|
|
16
|
+
RowClassNameGenerator,
|
|
17
|
+
} from "@vuu-ui/vuu-utils";
|
|
18
|
+
import type {
|
|
19
|
+
CSSProperties,
|
|
20
|
+
FunctionComponent,
|
|
21
|
+
HTMLAttributes,
|
|
22
|
+
MouseEvent,
|
|
23
|
+
ReactElement,
|
|
24
|
+
} from "react";
|
|
15
25
|
|
|
16
26
|
export type TableSelectionModel = "none" | "single" | "checkbox" | "extended";
|
|
17
27
|
|
|
@@ -158,19 +168,6 @@ export interface ValueListRenderer {
|
|
|
158
168
|
values: string[];
|
|
159
169
|
}
|
|
160
170
|
|
|
161
|
-
export declare type DateTimeColumnTypeSimple = "date/time";
|
|
162
|
-
|
|
163
|
-
type DateTimeColumnType =
|
|
164
|
-
| DateTimeColumnTypeSimple
|
|
165
|
-
| (Omit<ColumnTypeDescriptor, "name"> & { name: DateTimeColumnTypeSimple });
|
|
166
|
-
|
|
167
|
-
export declare type DateTimeColumnDescriptor = Omit<
|
|
168
|
-
ColumnDescriptor,
|
|
169
|
-
"type"
|
|
170
|
-
> & {
|
|
171
|
-
type: DateTimeColumnType;
|
|
172
|
-
};
|
|
173
|
-
|
|
174
171
|
export declare type ColumnTypeSimple =
|
|
175
172
|
| "string"
|
|
176
173
|
| "number"
|
|
@@ -189,6 +186,19 @@ export declare type ColumnTypeDescriptor = {
|
|
|
189
186
|
| ValueListRenderer;
|
|
190
187
|
};
|
|
191
188
|
|
|
189
|
+
export declare type DateTimeColumnTypeSimple = "date/time";
|
|
190
|
+
|
|
191
|
+
type DateTimeColumnType =
|
|
192
|
+
| DateTimeColumnTypeSimple
|
|
193
|
+
| (Omit<ColumnTypeDescriptor, "name"> & { name: DateTimeColumnTypeSimple });
|
|
194
|
+
|
|
195
|
+
export declare type DateTimeColumnDescriptor = Omit<
|
|
196
|
+
ColumnDescriptor,
|
|
197
|
+
"type"
|
|
198
|
+
> & {
|
|
199
|
+
type: DateTimeColumnType;
|
|
200
|
+
};
|
|
201
|
+
|
|
192
202
|
export declare type ColumnTypeDescriptorCustomRenderer = {
|
|
193
203
|
formatting?: ColumnTypeFormatting;
|
|
194
204
|
name: ColumnTypeSimple;
|
|
@@ -372,6 +382,29 @@ export type TableColumnResizeHandler = (
|
|
|
372
382
|
width?: number
|
|
373
383
|
) => void;
|
|
374
384
|
|
|
385
|
+
export interface BaseRowProps {
|
|
386
|
+
className?: string;
|
|
387
|
+
columns: RuntimeColumnDescriptor[];
|
|
388
|
+
style?: CSSProperties;
|
|
389
|
+
/**
|
|
390
|
+
* In a virtualized row, the total width of leading columns not rendered (as
|
|
391
|
+
* virtualization optimisation)
|
|
392
|
+
*/
|
|
393
|
+
virtualColSpan?: number;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export interface RowProps extends BaseRowProps {
|
|
397
|
+
classNameGenerator?: RowClassNameGenerator;
|
|
398
|
+
columnMap: ColumnMap;
|
|
399
|
+
highlighted?: boolean;
|
|
400
|
+
row: DataSourceRow;
|
|
401
|
+
offset: number;
|
|
402
|
+
onClick?: TableRowClickHandlerInternal;
|
|
403
|
+
onDataEdited?: DataCellEditHandler;
|
|
404
|
+
onToggleGroup?: (row: DataSourceRow, column: RuntimeColumnDescriptor) => void;
|
|
405
|
+
zebraStripes?: boolean;
|
|
406
|
+
}
|
|
407
|
+
|
|
375
408
|
export interface HeaderCellProps
|
|
376
409
|
extends Omit<HTMLAttributes<HTMLDivElement>, "onClick"> {
|
|
377
410
|
classBase?: string;
|
|
@@ -382,3 +415,7 @@ export interface HeaderCellProps
|
|
|
382
415
|
}
|
|
383
416
|
|
|
384
417
|
export type TableConfigChangeHandler = (config: TableConfig) => void;
|
|
418
|
+
|
|
419
|
+
export type CustomHeaderComponent = FC<BaseRowProps>;
|
|
420
|
+
export type CustomHeaderElement = ReactElement;
|
|
421
|
+
export type CustomHeader = CustomHeaderComponent | CustomHeaderElement;
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuu-ui/vuu-table-types",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.58",
|
|
4
4
|
"devDependencies": {
|
|
5
|
-
"@vuu-ui/vuu-
|
|
5
|
+
"@vuu-ui/vuu-data-types": "0.8.58",
|
|
6
|
+
"@vuu-ui/vuu-filter-types": "0.8.58",
|
|
7
|
+
"@vuu-ui/vuu-protocol-types": "0.8.58"
|
|
6
8
|
},
|
|
7
9
|
"author": "heswell",
|
|
8
10
|
"license": "Apache-2.0",
|