@gridkitjs/core 0.2.0 → 0.3.0
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/dist/index.d.ts +27 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -93,6 +93,32 @@ interface ColumnDefinition<Row, Node = string> {
|
|
|
93
93
|
* grid-level default. A column that cannot move can still be moved past.
|
|
94
94
|
*/
|
|
95
95
|
reorderable?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Lets this column's header and/or cell text wrap onto multiple lines
|
|
98
|
+
* instead of the grid's default single line with an ellipsis. Off by
|
|
99
|
+
* default: wrapping changes row height, so it stays a column's own choice
|
|
100
|
+
* rather than something a minor release could turn on under an existing
|
|
101
|
+
* grid.
|
|
102
|
+
*/
|
|
103
|
+
wrap?: ColumnWrapConfig;
|
|
104
|
+
/**
|
|
105
|
+
* Extra class names appended to this column's `th`. An escape hatch for a
|
|
106
|
+
* consumer's own CSS — nothing in this package reads them — for anything
|
|
107
|
+
* `wrap` and the rest of this type don't cover.
|
|
108
|
+
*/
|
|
109
|
+
headerClassName?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Extra class names appended to this column's `td`, on every row. Static
|
|
112
|
+
* per column: a per-row condition is already `cellTemplate`'s job (a
|
|
113
|
+
* template returning its own markup with a conditional class), so this
|
|
114
|
+
* stays a plain string rather than taking the row.
|
|
115
|
+
*/
|
|
116
|
+
cellClassName?: string;
|
|
117
|
+
}
|
|
118
|
+
/** Which parts of a column opt out of the grid's default single-line text. */
|
|
119
|
+
interface ColumnWrapConfig {
|
|
120
|
+
header?: boolean;
|
|
121
|
+
cells?: boolean;
|
|
96
122
|
}
|
|
97
123
|
/**
|
|
98
124
|
* Widths the user has changed, keyed by column id. Holding only what changed —
|
|
@@ -316,4 +342,4 @@ declare function fitColumnsToWidth<Row, Node>(resolved: readonly ResolvedColumn<
|
|
|
316
342
|
*/
|
|
317
343
|
declare function sizeColumnToContent(measuredWidth: number, constraints: ColumnConstraints, padding?: number): number;
|
|
318
344
|
|
|
319
|
-
export { type CellTemplateContext, type ColumnAlignment, type ColumnConstraints, type ColumnDefinition, type ColumnOrderEvent, type ColumnOrderState, type ColumnResizeEvent, type ColumnResizeSession, type ColumnResolveOptions, type ColumnSizeDefaults, type ColumnSizingState, type ColumnType, DEFAULT_COLUMN_SIZES, type DropSide, type FieldPath, KEYBOARD_STEP, type ResolvedColumn, accessDotted, alignmentForType, applyColumnOrder, applyColumnResize, beginColumnResize, clampColumnWidth, defineColumnsFromRows, fitColumnsToWidth, getColumnId, moveColumnBefore, movesColumn, resolveColumnConstraints, resolveColumnLabel, resolveColumnWidths, resolveDropBefore, sizeColumnToContent, totalColumnWidth };
|
|
345
|
+
export { type CellTemplateContext, type ColumnAlignment, type ColumnConstraints, type ColumnDefinition, type ColumnOrderEvent, type ColumnOrderState, type ColumnResizeEvent, type ColumnResizeSession, type ColumnResolveOptions, type ColumnSizeDefaults, type ColumnSizingState, type ColumnType, type ColumnWrapConfig, DEFAULT_COLUMN_SIZES, type DropSide, type FieldPath, KEYBOARD_STEP, type ResolvedColumn, accessDotted, alignmentForType, applyColumnOrder, applyColumnResize, beginColumnResize, clampColumnWidth, defineColumnsFromRows, fitColumnsToWidth, getColumnId, moveColumnBefore, movesColumn, resolveColumnConstraints, resolveColumnLabel, resolveColumnWidths, resolveDropBefore, sizeColumnToContent, totalColumnWidth };
|