@vuu-ui/vuu-table-types 0.8.57 → 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.
Files changed (2) hide show
  1. package/index.d.ts +41 -4
  2. 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 { DateTimePattern } from "@vuu-ui/vuu-utils";
12
- import { DataSourceRow, DataSourceRowObject } from "@vuu-ui/vuu-data-types";
13
- import type { FunctionComponent, MouseEvent } from "react";
14
- import type { HTMLAttributes } from "react";
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
 
@@ -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.57",
3
+ "version": "0.8.58",
4
4
  "devDependencies": {
5
- "@vuu-ui/vuu-protocol-types": "0.8.57"
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",