@omnigrid/core 0.1.18 → 0.1.19
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 +1 -1
- package/dist/types.d.ts +31 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,6 @@ export { applyFilterModel, applyQuickFilter, isActiveCondition, isFilterModelAct
|
|
|
11
11
|
export type { ColumnFilterModel, FilterCondition, FilterModel, FilterOperator } from "./filtering";
|
|
12
12
|
export type { UIButtonControl, UICheckboxDescriptor, UIControlBase, UIControlDescriptor, UIGroupControl, UIInputControl, UIPopupAnchor, UIPopupDescriptor, UISelectControl, UISelectOption, UITextBlockControl, UIMultiSelectControl, UIMultiSelectOption, } from "./ui";
|
|
13
13
|
export type { OverlayOptions, OverlayScope, OverlayState, OverlayType } from "./overlays";
|
|
14
|
-
export type { BlockConfig, CellAlign, CellRenderParams, CellClassRules, CheckboxControl, CheckboxRenderParams, ColumnClassRules, ColumnDataType, ColumnDef, ColumnGroupDef, ColumnGroupViewport, ColumnLeafDef, ColumnStyle, ColumnStyleParams, DataProcessor, DomPoolBindings, DomPoolUpdate, DomPoolUpdateOptions, GridApi, GridEvents, GridOptions, GridPlugin, GridState, HeaderClassRules, HeaderGroupClassRules, HeaderGroupRenderParams, HeaderRenderParams, HeaderStyle, OverlayComponent, OverlayComponentProps, PooledRow, Range, RowClassRules, RowClickEvent, RowHost, RowHoverEvent, RowId, RowRenderParams, RowStyle, ScrollPosition, SlotComponentContent, SlotContent, SlotHtmlContent, SlotMount, SlotMountOptions, SlotName, SlotNodeContent, SlotNodeEvent, SlotNodeEventName, SlotPosition, SlotProvider, SlotRenderContext, SortDirection, ViewportData, ViewportState, VirtualItem, } from "./types";
|
|
14
|
+
export type { BlockConfig, CellAlign, CellRenderParams, CellClassRules, CheckboxControl, CheckboxRenderParams, ColumnClassRules, ColumnDataType, ColumnFilterType, ColumnDef, ColumnGroupDef, ColumnGroupViewport, ColumnLeafDef, ColumnStyle, ColumnStyleParams, DataProcessor, DomPoolBindings, DomPoolUpdate, DomPoolUpdateOptions, GridApi, GridEvents, GridOptions, GridPlugin, GridState, HeaderClassRules, HeaderGroupClassRules, HeaderGroupRenderParams, HeaderRenderParams, HeaderStyle, OverlayComponent, OverlayComponentProps, PooledRow, Range, RowClassRules, RowClickEvent, RowHost, RowHoverEvent, RowId, RowRenderParams, RowStyle, ScrollPosition, SlotComponentContent, SlotContent, SlotHtmlContent, SlotMount, SlotMountOptions, SlotName, SlotNodeContent, SlotNodeEvent, SlotNodeEventName, SlotPosition, SlotProvider, SlotRenderContext, SortDirection, ViewportData, ViewportState, VirtualItem, } from "./types";
|
|
15
15
|
export { getColumnGroups, flattenColumns, isColumnGroup, isColumnLeaf, getCellValue } from "./columns";
|
|
16
16
|
export { Virtualizer } from "./virtualizer";
|
package/dist/types.d.ts
CHANGED
|
@@ -8,11 +8,26 @@ export type SortDirection = "asc" | "desc";
|
|
|
8
8
|
export type CellAlign = "left" | "center" | "right";
|
|
9
9
|
export type DataProcessor<T> = (data: T[]) => T[];
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Nature of the values stored in a column.
|
|
12
|
+
*
|
|
13
|
+
* It describes the data itself — never the filter UI. Used for sorting,
|
|
14
|
+
* formatting and to pick the default filter type of a column (a `number`
|
|
15
|
+
* column gets the numeric filter, and so on).
|
|
16
|
+
*
|
|
17
|
+
* @api
|
|
18
|
+
*/
|
|
19
|
+
export type ColumnDataType = "text" | "number" | "date" | "boolean";
|
|
20
|
+
/**
|
|
21
|
+
* Kind of filter UI rendered for a column.
|
|
22
|
+
*
|
|
23
|
+
* - `text` / `number` / `date` — single value input with an operator drop-down;
|
|
24
|
+
* - `boolean` — All / Yes / No switch;
|
|
25
|
+
* - `set` — checklist of the distinct values of the column;
|
|
26
|
+
* - `custom` — filter registered by a third-party plugin.
|
|
12
27
|
*
|
|
13
28
|
* @api
|
|
14
29
|
*/
|
|
15
|
-
export type
|
|
30
|
+
export type ColumnFilterType = "text" | "number" | "date" | "boolean" | "set" | "custom";
|
|
16
31
|
export interface RowRenderParams<T> {
|
|
17
32
|
id: RowId;
|
|
18
33
|
index: number;
|
|
@@ -173,10 +188,20 @@ export interface ColumnLeafDef<T> extends BaseColumnDef<T> {
|
|
|
173
188
|
/** Whether this column can be sorted. */
|
|
174
189
|
sortable?: boolean;
|
|
175
190
|
/**
|
|
176
|
-
*
|
|
177
|
-
*
|
|
191
|
+
* Nature of the values in this column. When omitted, the filtering plugin
|
|
192
|
+
* infers it by sampling the data.
|
|
178
193
|
*/
|
|
179
194
|
dataType?: ColumnDataType;
|
|
195
|
+
/**
|
|
196
|
+
* Kind of filter UI rendered for this column. When omitted, it is derived
|
|
197
|
+
* from `dataType` (and, failing that, from the sampled data).
|
|
198
|
+
*/
|
|
199
|
+
filterType?: ColumnFilterType;
|
|
200
|
+
/**
|
|
201
|
+
* Identifier of a custom filter registered with the filtering plugin.
|
|
202
|
+
* Required when `filterType` is `"custom"`.
|
|
203
|
+
*/
|
|
204
|
+
filterTypeId?: string;
|
|
180
205
|
/**
|
|
181
206
|
* Whether this column offers a filter menu. Set to `false` to opt the column out of
|
|
182
207
|
* filtering UI (the header filter icon is hidden).
|
|
@@ -188,8 +213,8 @@ export interface ColumnLeafDef<T> extends BaseColumnDef<T> {
|
|
|
188
213
|
*/
|
|
189
214
|
allowedOperators?: FilterOperator[];
|
|
190
215
|
/**
|
|
191
|
-
* Fixed
|
|
192
|
-
*
|
|
216
|
+
* Fixed option list used by the `"set"` filter. When provided, the column
|
|
217
|
+
* defaults to `filterType: "set"` unless `filterType` is set explicitly.
|
|
193
218
|
*/
|
|
194
219
|
filterOptions?: Array<{
|
|
195
220
|
label: string;
|