@vuu-ui/vuu-table 0.13.112 → 0.13.113-alpha.2
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/cjs/Row.js +2 -31
- package/cjs/Row.js.map +1 -1
- package/cjs/Table.css.js +1 -1
- package/cjs/Table.js +25 -9
- package/cjs/Table.js.map +1 -1
- package/cjs/bulk-edit/BulkEditPanel.css.js +1 -1
- package/cjs/bulk-edit/BulkEditPanel.js +2 -1
- package/cjs/bulk-edit/BulkEditPanel.js.map +1 -1
- package/cjs/bulk-edit/useBulkEditPanel.js +15 -12
- package/cjs/bulk-edit/useBulkEditPanel.js.map +1 -1
- package/cjs/cell-block/cellblock-utils.js +3 -3
- package/cjs/cell-block/cellblock-utils.js.map +1 -1
- package/cjs/cell-block/useCellBlockSelection.js +3 -0
- package/cjs/cell-block/useCellBlockSelection.js.map +1 -1
- package/cjs/cell-renderers/checkbox-cell/CheckboxCell.js +2 -2
- package/cjs/cell-renderers/checkbox-cell/CheckboxCell.js.map +1 -1
- package/cjs/cell-renderers/checkbox-row-selector/CheckboxRowSelectorCell.js +11 -1
- package/cjs/cell-renderers/checkbox-row-selector/CheckboxRowSelectorCell.js.map +1 -1
- package/cjs/cell-renderers/input-cell/InputCell.css.js +1 -1
- package/cjs/cell-renderers/input-cell/InputCell.js +3 -2
- package/cjs/cell-renderers/input-cell/InputCell.js.map +1 -1
- package/cjs/cell-renderers/toggle-cell/ToggleCell.js +1 -1
- package/cjs/cell-renderers/toggle-cell/ToggleCell.js.map +1 -1
- package/cjs/column-resizing/ColumnResizer.css.js +1 -1
- package/cjs/header-cell/GroupHeaderCell.css.js +1 -1
- package/cjs/header-cell/HeaderCell.css.js +1 -1
- package/cjs/table-cell/TableCell.css.js +1 -1
- package/cjs/table-cell/TableCell.js +19 -19
- package/cjs/table-cell/TableCell.js.map +1 -1
- package/cjs/table-dom-utils.js +4 -24
- package/cjs/table-dom-utils.js.map +1 -1
- package/cjs/table-header/TableHeader.js +89 -91
- package/cjs/table-header/TableHeader.js.map +1 -1
- package/cjs/useCell.js +1 -2
- package/cjs/useCell.js.map +1 -1
- package/cjs/useCellEditing.js +28 -3
- package/cjs/useCellEditing.js.map +1 -1
- package/cjs/useCellFocus.js +8 -4
- package/cjs/useCellFocus.js.map +1 -1
- package/cjs/useKeyboardNavigation.js +11 -25
- package/cjs/useKeyboardNavigation.js.map +1 -1
- package/cjs/useTable.js +85 -55
- package/cjs/useTable.js.map +1 -1
- package/cjs/useTableContextMenu.js +19 -18
- package/cjs/useTableContextMenu.js.map +1 -1
- package/cjs/useTableModel.js +50 -27
- package/cjs/useTableModel.js.map +1 -1
- package/esm/Row.js +5 -33
- package/esm/Row.js.map +1 -1
- package/esm/Table.css.js +1 -1
- package/esm/Table.js +23 -7
- package/esm/Table.js.map +1 -1
- package/esm/bulk-edit/BulkEditPanel.css.js +1 -1
- package/esm/bulk-edit/BulkEditPanel.js +2 -1
- package/esm/bulk-edit/BulkEditPanel.js.map +1 -1
- package/esm/bulk-edit/useBulkEditPanel.js +15 -12
- package/esm/bulk-edit/useBulkEditPanel.js.map +1 -1
- package/esm/cell-block/cellblock-utils.js +2 -2
- package/esm/cell-block/cellblock-utils.js.map +1 -1
- package/esm/cell-block/useCellBlockSelection.js +3 -0
- package/esm/cell-block/useCellBlockSelection.js.map +1 -1
- package/esm/cell-renderers/checkbox-cell/CheckboxCell.js +3 -3
- package/esm/cell-renderers/checkbox-cell/CheckboxCell.js.map +1 -1
- package/esm/cell-renderers/checkbox-row-selector/CheckboxRowSelectorCell.js +11 -1
- package/esm/cell-renderers/checkbox-row-selector/CheckboxRowSelectorCell.js.map +1 -1
- package/esm/cell-renderers/input-cell/InputCell.css.js +1 -1
- package/esm/cell-renderers/input-cell/InputCell.js +3 -2
- package/esm/cell-renderers/input-cell/InputCell.js.map +1 -1
- package/esm/cell-renderers/toggle-cell/ToggleCell.js +2 -2
- package/esm/cell-renderers/toggle-cell/ToggleCell.js.map +1 -1
- package/esm/column-resizing/ColumnResizer.css.js +1 -1
- package/esm/header-cell/GroupHeaderCell.css.js +1 -1
- package/esm/header-cell/HeaderCell.css.js +1 -1
- package/esm/table-cell/TableCell.css.js +1 -1
- package/esm/table-cell/TableCell.js +19 -19
- package/esm/table-cell/TableCell.js.map +1 -1
- package/esm/table-dom-utils.js +3 -21
- package/esm/table-dom-utils.js.map +1 -1
- package/esm/table-header/TableHeader.js +89 -91
- package/esm/table-header/TableHeader.js.map +1 -1
- package/esm/useCell.js +1 -2
- package/esm/useCell.js.map +1 -1
- package/esm/useCellEditing.js +30 -5
- package/esm/useCellEditing.js.map +1 -1
- package/esm/useCellFocus.js +8 -4
- package/esm/useCellFocus.js.map +1 -1
- package/esm/useKeyboardNavigation.js +11 -25
- package/esm/useKeyboardNavigation.js.map +1 -1
- package/esm/useTable.js +86 -56
- package/esm/useTable.js.map +1 -1
- package/esm/useTableContextMenu.js +18 -17
- package/esm/useTableContextMenu.js.map +1 -1
- package/esm/useTableModel.js +50 -27
- package/esm/useTableModel.js.map +1 -1
- package/package.json +11 -11
- package/types/Row.d.ts +0 -3
- package/types/Table.d.ts +9 -6
- package/types/bulk-edit/BulkEditPanel.d.ts +3 -2
- package/types/table-dom-utils.d.ts +1 -3
- package/types/table-header/TableHeader.d.ts +2 -2
- package/types/useCellEditing.d.ts +3 -1
- package/types/useKeyboardNavigation.d.ts +2 -2
- package/types/useTable.d.ts +6 -4
- package/types/useTableModel.d.ts +4 -7
- package/cjs/Row.css.js +0 -6
- package/cjs/Row.css.js.map +0 -1
- package/esm/Row.css.js +0 -4
- package/esm/Row.css.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.13.
|
|
2
|
+
"version": "0.13.113-alpha.2",
|
|
3
3
|
"author": "heswell",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@vuu-ui/vuu-data-types": "0.13.
|
|
7
|
-
"@vuu-ui/vuu-table-types": "0.13.
|
|
8
|
-
"@vuu-ui/vuu-protocol-types": "0.13.
|
|
6
|
+
"@vuu-ui/vuu-data-types": "0.13.113-alpha.2",
|
|
7
|
+
"@vuu-ui/vuu-table-types": "0.13.113-alpha.2",
|
|
8
|
+
"@vuu-ui/vuu-protocol-types": "0.13.113-alpha.2"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@salt-ds/core": "1.
|
|
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": "0.13.
|
|
15
|
-
"@vuu-ui/vuu-data-react": "0.13.
|
|
16
|
-
"@vuu-ui/vuu-popups": "0.13.
|
|
17
|
-
"@vuu-ui/vuu-table-extras": "0.13.
|
|
18
|
-
"@vuu-ui/vuu-ui-controls": "0.13.
|
|
19
|
-
"@vuu-ui/vuu-utils": "0.13.
|
|
14
|
+
"@vuu-ui/vuu-context-menu": "0.13.113-alpha.2",
|
|
15
|
+
"@vuu-ui/vuu-data-react": "0.13.113-alpha.2",
|
|
16
|
+
"@vuu-ui/vuu-popups": "0.13.113-alpha.2",
|
|
17
|
+
"@vuu-ui/vuu-table-extras": "0.13.113-alpha.2",
|
|
18
|
+
"@vuu-ui/vuu-ui-controls": "0.13.113-alpha.2",
|
|
19
|
+
"@vuu-ui/vuu-utils": "0.13.113-alpha.2"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"clsx": "^2.0.0",
|
package/types/Row.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
import { RowProps } from "@vuu-ui/vuu-table-types";
|
|
2
|
-
export declare const RowProxy: import("react").ForwardRefExoticComponent<{
|
|
3
|
-
height?: number;
|
|
4
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
2
|
export declare const Row: import("react").MemoExoticComponent<({ className: classNameProp, classNameGenerator, columnMap, columns, groupToggleTarget, highlighted, row, offset, onCellEdit, onClick, onDataEdited, onToggleGroup, searchPattern, showBookends, virtualColSpan, zebraStripes, ...htmlAttributes }: RowProps) => import("react/jsx-runtime").JSX.Element>;
|
package/types/Table.d.ts
CHANGED
|
@@ -46,6 +46,11 @@ export interface TableProps extends Omit<MeasuredContainerProps, "onDragStart" |
|
|
|
46
46
|
* required if a fully featured column picker is to be available
|
|
47
47
|
*/
|
|
48
48
|
availableColumns?: SchemaColumn[];
|
|
49
|
+
/**
|
|
50
|
+
* Pixel height of header cells. If specified here, this will take precedence over CSS
|
|
51
|
+
* values and Table will not respond to density changes.
|
|
52
|
+
*/
|
|
53
|
+
colHeaderRowHeight?: number;
|
|
49
54
|
/**
|
|
50
55
|
* Provide configuration settings for Table. At minimun, column
|
|
51
56
|
* descriptors must be provided.
|
|
@@ -130,6 +135,10 @@ export interface TableProps extends Omit<MeasuredContainerProps, "onDragStart" |
|
|
|
130
135
|
* provide a 'Delete' or 'Cancel' button. Implement this functionality in a rowActionHandler.
|
|
131
136
|
*/
|
|
132
137
|
rowActionHandlers?: Record<string, RowActionHandler>;
|
|
138
|
+
/**
|
|
139
|
+
* Allows opt-in to a predefined style pattern that renders a border around a row selection block.
|
|
140
|
+
*/
|
|
141
|
+
rowSelectionBorder?: boolean;
|
|
133
142
|
/**
|
|
134
143
|
* When a row is selected and onSelect provided, onSelect will be invoked with a
|
|
135
144
|
* DataSourceRowObject, derived from the internal representation of a data row,
|
|
@@ -164,12 +173,6 @@ export interface TableProps extends Omit<MeasuredContainerProps, "onDragStart" |
|
|
|
164
173
|
* Will be used to highlight matching text.
|
|
165
174
|
*/
|
|
166
175
|
searchPattern?: string;
|
|
167
|
-
/**
|
|
168
|
-
* Selection Bookends style the left and right edge of a selection block.
|
|
169
|
-
* They are optional, value currently defaults to 4.
|
|
170
|
-
* TODO this should just live in CSS
|
|
171
|
-
*/
|
|
172
|
-
selectionBookendWidth?: number;
|
|
173
176
|
/**
|
|
174
177
|
* Selection behaviour for Table:
|
|
175
178
|
* `none` selection disabled
|
|
@@ -6,7 +6,7 @@ export interface BulkEditPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
/**
|
|
7
7
|
* The session dataSource. This is where the edits will be processed until final
|
|
8
8
|
* confirmation, at which point edits will be applied to parent dataSource and
|
|
9
|
-
* the session table
|
|
9
|
+
* the session table torn down.
|
|
10
10
|
*/
|
|
11
11
|
sessionDs: DataSource;
|
|
12
12
|
response?: RpcResponse;
|
|
@@ -16,5 +16,6 @@ export interface BulkEditPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
16
16
|
*/
|
|
17
17
|
parentDs: DataSource;
|
|
18
18
|
onValidationStatusChange: (isValid: boolean) => void;
|
|
19
|
+
width?: number;
|
|
19
20
|
}
|
|
20
|
-
export declare const BulkEditPanel: ({ className, columns, sessionDs, parentDs, onValidationStatusChange, style, ...htmlAttributes }: BulkEditPanelProps) => ReactElement;
|
|
21
|
+
export declare const BulkEditPanel: ({ className, columns, sessionDs, parentDs, onValidationStatusChange, style, width, ...htmlAttributes }: BulkEditPanelProps) => ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
2
|
import { ScrollDirection } from "./useTableScroll";
|
|
3
|
-
import type
|
|
3
|
+
import { type ArrowKey, type PageKey } from "@vuu-ui/vuu-utils";
|
|
4
4
|
import type { CellPos } from "@vuu-ui/vuu-table-types";
|
|
5
5
|
export type NavigationKey = PageKey | ArrowKey;
|
|
6
6
|
export declare const headerCellQuery: (colIdx: number) => string;
|
|
@@ -12,8 +12,6 @@ export declare const getFocusedCell: (el: HTMLElement | Element | null) => HTMLD
|
|
|
12
12
|
export declare const cellIsEditable: (cell: HTMLDivElement | null) => boolean | undefined;
|
|
13
13
|
export declare const cellDropdownShowing: (cell: HTMLDivElement | null) => boolean;
|
|
14
14
|
export declare const cellIsTextInput: (cell: HTMLElement) => boolean;
|
|
15
|
-
export declare const getAriaRowIndex: (rowElement: HTMLElement | null) => number;
|
|
16
|
-
export declare const getAriaColIndex: (cellElement: HTMLElement | null) => number;
|
|
17
15
|
export declare const getRowElementByAriaIndex: (container: HTMLDivElement | EventTarget, rowIndex: number) => HTMLElement | null;
|
|
18
16
|
export declare const getIndexFromCellElement: (cellElement: HTMLElement | null) => number;
|
|
19
17
|
export declare const getAriaCellPos: (tableCell: HTMLDivElement) => CellPos;
|
|
@@ -2,7 +2,6 @@ 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
3
|
export type ColumnSortHandler = (column: ColumnDescriptor, addToExistingSort: boolean, sortType?: VuuSortType) => void;
|
|
4
4
|
export interface TableHeaderProps extends Pick<HeaderCellProps, "allRowsSelected" | "allowDragColumnHeader" | "allowSelectAll" | "onCheckBoxColumnHeaderClick" | "showColumnHeaderMenus"> {
|
|
5
|
-
classBase?: string;
|
|
6
5
|
columns: RuntimeColumnDescriptor[];
|
|
7
6
|
customHeader?: CustomHeader | CustomHeader[];
|
|
8
7
|
headings: TableHeadings;
|
|
@@ -12,8 +11,9 @@ export interface TableHeaderProps extends Pick<HeaderCellProps, "allRowsSelected
|
|
|
12
11
|
onMoveGroupColumn: (columns: ColumnDescriptor[]) => void;
|
|
13
12
|
onRemoveGroupColumn: (column: RuntimeColumnDescriptor) => void;
|
|
14
13
|
onSortColumn: ColumnSortHandler;
|
|
14
|
+
showBookends?: boolean;
|
|
15
15
|
tableConfig: TableConfig;
|
|
16
16
|
tableId: string;
|
|
17
17
|
virtualColSpan?: number;
|
|
18
18
|
}
|
|
19
|
-
export declare const TableHeader: import("react").MemoExoticComponent<({ allowDragColumnHeader, allowSelectAll, allRowsSelected,
|
|
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>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { FocusEventHandler, KeyboardEvent as ReactKeyboardEvent, MouseEvent } from "react";
|
|
2
|
+
import { FocusCell } from "./useCellFocus";
|
|
2
3
|
export interface CellEditingHookProps {
|
|
4
|
+
focusCell: FocusCell;
|
|
3
5
|
navigate: () => void;
|
|
4
6
|
}
|
|
5
|
-
export declare const useCellEditing: ({ navigate }: CellEditingHookProps) => {
|
|
7
|
+
export declare const useCellEditing: ({ focusCell, navigate, }: CellEditingHookProps) => {
|
|
6
8
|
onBlur: FocusEventHandler;
|
|
7
9
|
onDoubleClick: (e: MouseEvent<HTMLElement>) => void;
|
|
8
10
|
onFocus: FocusEventHandler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VuuRange } from "@vuu-ui/vuu-protocol-types";
|
|
2
2
|
import { PageKey } from "@vuu-ui/vuu-utils";
|
|
3
|
-
import { KeyboardEvent, MouseEvent,
|
|
3
|
+
import { KeyboardEvent, MouseEvent, RefObject } from "react";
|
|
4
4
|
import { TableNavigationStyle } from "./Table";
|
|
5
5
|
import { NavigationKey } from "./table-dom-utils";
|
|
6
6
|
import { ScrollRequestHandler } from "./useTableScroll";
|
|
@@ -10,7 +10,7 @@ export declare const isNavigationKey: (key: string, navigationStyle: TableNaviga
|
|
|
10
10
|
export declare const isPagingKey: (key: string) => key is PageKey;
|
|
11
11
|
export type GroupToggleHandler = (treeNodeOperation: "expand" | "collapse", rowIndex: number) => void;
|
|
12
12
|
export interface NavigationHookProps {
|
|
13
|
-
cellFocusStateRef:
|
|
13
|
+
cellFocusStateRef: RefObject<CellFocusState>;
|
|
14
14
|
containerRef: RefObject<HTMLElement | null>;
|
|
15
15
|
columnCount?: number;
|
|
16
16
|
headerCount: number;
|
package/types/useTable.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
import type { VuuSortType } from "@vuu-ui/vuu-protocol-types";
|
|
2
|
+
import type { RpcResult, VuuSortType } from "@vuu-ui/vuu-protocol-types";
|
|
3
3
|
import type { ColumnDescriptor, ColumnMoveHandler, DataCellEditEvent, RuntimeColumnDescriptor, TableColumnResizeHandler, TableConfig, TableRowClickHandlerInternal, TableSelectionModel } from "@vuu-ui/vuu-table-types";
|
|
4
4
|
import { MeasuredProps, MeasuredSize } from "@vuu-ui/vuu-ui-controls";
|
|
5
5
|
import { FocusEvent, KeyboardEvent, MouseEventHandler, RefObject } from "react";
|
|
@@ -8,13 +8,13 @@ type HeaderState = {
|
|
|
8
8
|
height: number;
|
|
9
9
|
count: number;
|
|
10
10
|
};
|
|
11
|
-
export interface TableHookProps extends MeasuredProps, Pick<TableProps, "allowCellBlockSelection" | "allowDragDrop" | "allowSelectCheckboxRow" | "autoSelectFirstRow" | "autoSelectRowKey" | "availableColumns" | "config" | "dataSource" | "disableFocus" | "highlightedIndex" | "id" | "navigationStyle" | "onAvailableColumnsChange" | "onConfigChange" | "onDataEdited" | "onDragStart" | "onDrop" | "onHighlight" | "onSelect" | "onSelectCellBlock" | "onSelectionChange" | "onRowClick" | "renderBufferSize" | "revealSelected" | "rowToObject" | "scrollingApiRef" | "
|
|
11
|
+
export interface TableHookProps extends MeasuredProps, Pick<TableProps, "allowCellBlockSelection" | "allowDragDrop" | "allowSelectCheckboxRow" | "autoSelectFirstRow" | "autoSelectRowKey" | "availableColumns" | "config" | "dataSource" | "disableFocus" | "highlightedIndex" | "id" | "navigationStyle" | "onAvailableColumnsChange" | "onConfigChange" | "onDataEdited" | "onDragStart" | "onDrop" | "onHighlight" | "onSelect" | "onSelectCellBlock" | "onSelectionChange" | "onRowClick" | "renderBufferSize" | "revealSelected" | "rowToObject" | "scrollingApiRef" | "showColumnHeaderMenus" | "showColumnHeaders" | "showPaginationControls"> {
|
|
12
12
|
containerRef: RefObject<HTMLDivElement | null>;
|
|
13
13
|
rowHeight: number;
|
|
14
14
|
selectionModel: TableSelectionModel;
|
|
15
15
|
size: MeasuredSize;
|
|
16
16
|
}
|
|
17
|
-
export declare const useTable: ({ allowCellBlockSelection, allowSelectCheckboxRow, allowDragDrop, autoSelectFirstRow, autoSelectRowKey, availableColumns, config, containerRef, dataSource, disableFocus, highlightedIndex: highlightedIndexProp, id, navigationStyle, onAvailableColumnsChange, onConfigChange, onDataEdited: onDataEditedProp, onDragStart, onDrop, onHighlight, onRowClick: onRowClickProp, onSelect, onSelectCellBlock, onSelectionChange, renderBufferSize, revealSelected, rowHeight, rowToObject, scrollingApiRef,
|
|
17
|
+
export declare const useTable: ({ allowCellBlockSelection, allowSelectCheckboxRow, allowDragDrop, autoSelectFirstRow, autoSelectRowKey, availableColumns, config, containerRef, dataSource, disableFocus, highlightedIndex: highlightedIndexProp, id, navigationStyle, onAvailableColumnsChange, onConfigChange, onDataEdited: onDataEditedProp, onDragStart, onDrop, onHighlight, onRowClick: onRowClickProp, onSelect, onSelectCellBlock, onSelectionChange, renderBufferSize, revealSelected, rowHeight, rowToObject, scrollingApiRef, selectionModel, showColumnHeaderMenus, showColumnHeaders, showPaginationControls, size, }: TableHookProps) => {
|
|
18
18
|
allRowsSelected: boolean;
|
|
19
19
|
"aria-rowcount": number;
|
|
20
20
|
cellBlock: import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
|
|
@@ -36,7 +36,7 @@ export declare const useTable: ({ allowCellBlockSelection, allowSelectCheckboxRo
|
|
|
36
36
|
onKeyDown: (e: KeyboardEvent<HTMLElement>) => void;
|
|
37
37
|
onMouseDown: MouseEventHandler;
|
|
38
38
|
onContextMenu: ((evt: import("react").MouseEvent<HTMLElement>) => void) | undefined;
|
|
39
|
-
onDataEdited: (editState: DataCellEditEvent) => Promise<
|
|
39
|
+
onDataEdited: (editState: DataCellEditEvent) => Promise<RpcResult | undefined>;
|
|
40
40
|
onHeaderHeightMeasured: (height: number, count: number) => void;
|
|
41
41
|
onMoveColumn: ColumnMoveHandler;
|
|
42
42
|
onMoveGroupColumn: (columns: ColumnDescriptor[]) => void;
|
|
@@ -54,11 +54,13 @@ export declare const useTable: ({ allowCellBlockSelection, allowSelectCheckboxRo
|
|
|
54
54
|
};
|
|
55
55
|
tableAttributes: {
|
|
56
56
|
availableWidth: number;
|
|
57
|
+
checkboxColumnWidth?: number;
|
|
57
58
|
columnDefaultWidth?: number;
|
|
58
59
|
columnFormatHeader?: "capitalize" | "uppercase";
|
|
59
60
|
columnLayout?: import("@vuu-ui/vuu-table-types").ColumnLayout;
|
|
60
61
|
columnSeparators?: boolean;
|
|
61
62
|
rowSeparators?: boolean;
|
|
63
|
+
selectionBookendWidth?: number;
|
|
62
64
|
zebraStripes?: boolean;
|
|
63
65
|
};
|
|
64
66
|
tableBodyRef: import("react").RefCallback<HTMLDivElement>;
|
package/types/useTableModel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataSource, TableSchema, WithBaseFilter, WithFullConfig } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
import { ColumnDescriptor, ColumnLayout,
|
|
2
|
+
import { ColumnDescriptor, ColumnLayout, ResizePhase, RuntimeColumnDescriptor, TableAttributes, TableConfig, TableHeadings, TableSelectionModel } from "@vuu-ui/vuu-table-types";
|
|
3
3
|
/**
|
|
4
4
|
* TableModel represents state used internally to manage Table. It is
|
|
5
5
|
* derived initially from the TableConfig provided by user, along with the
|
|
@@ -33,11 +33,6 @@ export interface ColumnActionMove {
|
|
|
33
33
|
column: RuntimeColumnDescriptor;
|
|
34
34
|
moveBy?: 1 | -1;
|
|
35
35
|
}
|
|
36
|
-
export interface ColumnActionPin {
|
|
37
|
-
type: "pinColumn";
|
|
38
|
-
column: ColumnDescriptor;
|
|
39
|
-
pin: PinLocation | false;
|
|
40
|
-
}
|
|
41
36
|
export interface ColumnActionResize {
|
|
42
37
|
type: "resizeColumn";
|
|
43
38
|
column: RuntimeColumnDescriptor;
|
|
@@ -65,7 +60,7 @@ export interface ColumnActionTableConfig extends WithBaseFilter<WithFullConfig>
|
|
|
65
60
|
confirmed?: boolean;
|
|
66
61
|
type: "tableConfig";
|
|
67
62
|
}
|
|
68
|
-
export type TableModelAction = ColumnActionHide | ColumnActionInit | ColumnActionMove |
|
|
63
|
+
export type TableModelAction = ColumnActionHide | ColumnActionInit | ColumnActionMove | ColumnActionResize | ColumnActionSetTableSchema | ColumnActionShow | ColumnActionUpdate | ColumnActionUpdateProp | ColumnActionTableConfig;
|
|
69
64
|
export type TableModelActionDispatch = (action: TableModelAction) => void;
|
|
70
65
|
export interface TableModelHookProps {
|
|
71
66
|
config: TableConfig;
|
|
@@ -79,11 +74,13 @@ export declare const useTableModel: ({ config: tableConfigProp, dataSource, sele
|
|
|
79
74
|
headings: TableHeadings;
|
|
80
75
|
tableAttributes: {
|
|
81
76
|
availableWidth: number;
|
|
77
|
+
checkboxColumnWidth?: number;
|
|
82
78
|
columnDefaultWidth?: number;
|
|
83
79
|
columnFormatHeader?: "capitalize" | "uppercase";
|
|
84
80
|
columnLayout?: ColumnLayout;
|
|
85
81
|
columnSeparators?: boolean;
|
|
86
82
|
rowSeparators?: boolean;
|
|
83
|
+
selectionBookendWidth?: number;
|
|
87
84
|
zebraStripes?: boolean;
|
|
88
85
|
};
|
|
89
86
|
tableConfig: Readonly<TableConfig>;
|
package/cjs/Row.css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var rowCss = ".vuuTableRow {\n background: var(--row-background, var(--table-background));\n border-bottom: 1px solid var(--row-borderColor, var(--table-background));\n box-sizing: border-box;\n color: var(--salt-content-secondary-foreground);\n contain: layout;\n /* contain-intrinsic-height: var(--row-height);\n content-visibility: auto; */\n height: var(--row-height);\n line-height: var(--row-height);\n position: absolute;\n top: 0;\n white-space: nowrap;\n width: 100%;\n}\n\n.vuuTableRow-proxy {\n position: absolute !important;\n visibility: hidden;\n}\n\n.vuuTableRow-even {\n --row-background: var(--row-background-even);\n}\n\n.vuuTableRow-highlighted {\n background: var(--salt-selectable-background-hover);\n}\n\n\n.vuuTableRow[aria-selected=\"true\"] {\n background-color: var(--VuuTableRow-selected-background, var(--salt-selectable-background-selected));\n}\n\n.vuuTableRow[aria-expanded=\"true\"] {\n --toggle-icon-transform: rotate(90deg);\n}\n\n.vuuDraggable .vuuTableRow {\n --cell-borderColor: transparent;\n --vuu-selection-decorator-bg: transparent;\n transform: none !important;\n z-index: 1;\n}\n";
|
|
4
|
-
|
|
5
|
-
module.exports = rowCss;
|
|
6
|
-
//# sourceMappingURL=Row.css.js.map
|
package/cjs/Row.css.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Row.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/esm/Row.css.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var rowCss = ".vuuTableRow {\n background: var(--row-background, var(--table-background));\n border-bottom: 1px solid var(--row-borderColor, var(--table-background));\n box-sizing: border-box;\n color: var(--salt-content-secondary-foreground);\n contain: layout;\n /* contain-intrinsic-height: var(--row-height);\n content-visibility: auto; */\n height: var(--row-height);\n line-height: var(--row-height);\n position: absolute;\n top: 0;\n white-space: nowrap;\n width: 100%;\n}\n\n.vuuTableRow-proxy {\n position: absolute !important;\n visibility: hidden;\n}\n\n.vuuTableRow-even {\n --row-background: var(--row-background-even);\n}\n\n.vuuTableRow-highlighted {\n background: var(--salt-selectable-background-hover);\n}\n\n\n.vuuTableRow[aria-selected=\"true\"] {\n background-color: var(--VuuTableRow-selected-background, var(--salt-selectable-background-selected));\n}\n\n.vuuTableRow[aria-expanded=\"true\"] {\n --toggle-icon-transform: rotate(90deg);\n}\n\n.vuuDraggable .vuuTableRow {\n --cell-borderColor: transparent;\n --vuu-selection-decorator-bg: transparent;\n transform: none !important;\n z-index: 1;\n}\n";
|
|
2
|
-
|
|
3
|
-
export { rowCss as default };
|
|
4
|
-
//# sourceMappingURL=Row.css.js.map
|
package/esm/Row.css.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Row.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|