@vuu-ui/vuu-table 2.1.0-alpha.1 → 2.1.0-alpha.11

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/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
- "version": "2.1.0-alpha.1",
2
+ "version": "2.1.0-alpha.11",
3
3
  "author": "heswell",
4
4
  "license": "Apache-2.0",
5
5
  "devDependencies": {
6
- "@vuu-ui/vuu-data-types": "2.1.0-alpha.1",
7
- "@vuu-ui/vuu-table-types": "2.1.0-alpha.1",
8
- "@vuu-ui/vuu-protocol-types": "2.1.0-alpha.1"
6
+ "@vuu-ui/vuu-data-types": "2.1.0-alpha.11",
7
+ "@vuu-ui/vuu-table-types": "2.1.0-alpha.11",
8
+ "@vuu-ui/vuu-protocol-types": "2.1.0-alpha.11"
9
9
  },
10
10
  "dependencies": {
11
11
  "@salt-ds/core": "1.54.1",
12
12
  "@salt-ds/styles": "0.2.1",
13
13
  "@salt-ds/window": "0.1.1",
14
- "@vuu-ui/vuu-context-menu": "2.1.0-alpha.1",
15
- "@vuu-ui/vuu-data-react": "2.1.0-alpha.1",
16
- "@vuu-ui/vuu-popups": "2.1.0-alpha.1",
17
- "@vuu-ui/vuu-table-extras": "2.1.0-alpha.1",
18
- "@vuu-ui/vuu-ui-controls": "2.1.0-alpha.1",
19
- "@vuu-ui/vuu-utils": "2.1.0-alpha.1"
14
+ "@vuu-ui/vuu-context-menu": "2.1.0-alpha.11",
15
+ "@vuu-ui/vuu-data-react": "2.1.0-alpha.11",
16
+ "@vuu-ui/vuu-popups": "2.1.0-alpha.11",
17
+ "@vuu-ui/vuu-table-extras": "2.1.0-alpha.11",
18
+ "@vuu-ui/vuu-ui-controls": "2.1.0-alpha.11",
19
+ "@vuu-ui/vuu-utils": "2.1.0-alpha.11"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "clsx": "^2.0.0",
package/types/Table.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { DataSource, SchemaColumn } from "@vuu-ui/vuu-data-types";
2
- import { CustomHeader, DataCellEditNotification, GroupToggleTarget, RowActionHandler, RowProps, SelectionChangeHandler, ShowColumnHeaderMenus, TableConfig, TableConfigChangeHandler, TableRowClickHandler, TableRowSelectHandler, TableSelectionModel } from "@vuu-ui/vuu-table-types";
2
+ import { CustomHeader, DataCellEditNotification, GroupToggleTarget, HeaderCellProps, RowActionHandler, RowProps, SelectionChangeHandler, ShowColumnHeaderMenus, TableConfig, TableConfigChangeHandler, TableRowClickHandler, TableRowSelectHandler, TableSelectionModel } from "@vuu-ui/vuu-table-types";
3
3
  import type { DragDropState } from "@vuu-ui/vuu-ui-controls";
4
4
  import { DragStartHandler, MeasuredContainerProps, dragStrategy } from "@vuu-ui/vuu-ui-controls";
5
5
  import { ComponentType, FC, ForwardedRef } from "react";
@@ -11,6 +11,16 @@ export interface TableProps extends Omit<MeasuredContainerProps, "onDragStart" |
11
11
  * A react function component that will be rendered if there are no rows to display
12
12
  */
13
13
  EmptyDisplay?: ComponentType;
14
+ /**
15
+ * A custom implementation of HeaderCell which will be rendered in place of the
16
+ * default HeaderCell. If provided, custom implementation is responsible for all
17
+ * header behaviour (if required) - sorting, resizing etc.
18
+ */
19
+ HeaderCell?: FC<HeaderCellProps>;
20
+ /**
21
+ * A custom Row implementation that will be rendered in place of the default
22
+ * Row.
23
+ */
14
24
  Row?: FC<RowProps>;
15
25
  /**
16
26
  * Allow a block of cells to be selected. Typically to be copied.
@@ -1,7 +1,9 @@
1
1
  import { VuuSortType } from "@vuu-ui/vuu-protocol-types";
2
2
  import { ColumnDescriptor, ColumnMoveHandler, CustomHeader, HeaderCellProps, RuntimeColumnDescriptor, TableColumnResizeHandler, TableConfig, TableHeadings } from "@vuu-ui/vuu-table-types";
3
+ import { FC } from "react";
3
4
  export type ColumnSortHandler = (column: ColumnDescriptor, addToExistingSort: boolean, sortType?: VuuSortType) => void;
4
5
  export interface TableHeaderProps extends Pick<HeaderCellProps, "allRowsSelected" | "allowDragColumnHeader" | "allowSelectAll" | "onCheckBoxColumnHeaderClick" | "showColumnHeaderMenus"> {
6
+ HeaderCell?: FC<HeaderCellProps>;
5
7
  columns: RuntimeColumnDescriptor[];
6
8
  customHeader?: CustomHeader | CustomHeader[];
7
9
  headings: TableHeadings;
@@ -16,4 +18,4 @@ export interface TableHeaderProps extends Pick<HeaderCellProps, "allRowsSelected
16
18
  tableId: string;
17
19
  virtualColSpan?: number;
18
20
  }
19
- export declare const TableHeader: import("react").MemoExoticComponent<({ allowDragColumnHeader, allowSelectAll, allRowsSelected, columns, customHeader, headings, onCheckBoxColumnHeaderClick, onHeightMeasured, onMoveColumn, onMoveGroupColumn, onRemoveGroupColumn, onResizeColumn, onSortColumn, showBookends, showColumnHeaderMenus, tableConfig, tableId, virtualColSpan, }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element>;
21
+ export declare const TableHeader: import("react").MemoExoticComponent<({ HeaderCell, allowDragColumnHeader, allowSelectAll, allRowsSelected, columns, customHeader, headings, onCheckBoxColumnHeaderClick, onHeightMeasured, onMoveColumn, onMoveGroupColumn, onRemoveGroupColumn, onResizeColumn, onSortColumn, showBookends, showColumnHeaderMenus, tableConfig, tableId, virtualColSpan, }: TableHeaderProps) => import("react/jsx-runtime").JSX.Element>;