@x12i/data 0.0.0-stage → 1.1.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.
@@ -0,0 +1,394 @@
1
+ import { C as ColumnDef, a as CellType, b as ColumnAlign, c as ColumnEditor, d as ColumnFilterType, S as SortModelItem, F as FormatContext, e as FilterOperator, f as FilterModelItem, A as AggregateName, g as SortDirection, G as GroupModelItem, h as GetRowsRequest, i as ServerDataSource } from './messages-BF20Mq97.js';
2
+ export { j as AggregateFn, k as CaptureViewOptions, l as CellFormatter, m as ColumnLayout, n as ColumnOption, o as ColumnPin, p as ColumnPinning, q as ColumnState, D as DataGridMessageOverrides, r as DataGridMessages, s as DelimitedOptions, E as EMPTY_SELECTION, t as FILTER_OPERATORS, u as FormatLabels, v as GetRowsOptions, w as GetRowsResult, x as GridViewState, L as LocalStorageSavedViewStoreOptions, y as SAVED_VIEW_VERSION, z as SavedView, B as SavedViewStore, H as SavedViewSummary, I as SelectionState, J as SelectionSummary, K as SerializedSelection, M as StatusTone, N as StorageLike, O as applySavedView, P as captureView, Q as clearSelection, R as countSelected, T as createCellFormatter, U as createLocalStorageSavedViewStore, V as createMemorySavedViewStore, W as createSelection, X as createViewState, Y as defaultFormatLabels, Z as defaultMessages, _ as defineColumns, $ as deserializeSelection, a0 as escapeCsvField, a1 as escapeDelimitedField, a2 as exportableColumns, a3 as formatCellValue, a4 as gridToCsv, a5 as gridToTsv, a6 as isSelected, a7 as isSelectionEmpty, a8 as layoutColumns, a9 as moveColumn, aa as moveColumnTo, ab as parseDelimited, ac as parseSavedView, ad as resizeColumn, ae as resolveColumnOrder, af as resolveDateFormatOptions, ag as resolveMessages, ah as resolveNumberFormatOptions, ai as resolveSelectedIds, aj as selectAll, ak as selectAllExceptNone, al as selectOnly, am as selectRange, an as serializeSelection, ao as setColumnFilter, ap as setPinning, aq as setSort, ar as sortRank, as as summarizeSelection, at as toggleGroup, au as toggleRow, av as toggleSort } from './messages-BF20Mq97.js';
3
+
4
+ declare const DEFAULT_COLUMN_WIDTH = 160;
5
+ declare const DEFAULT_COLUMN_MIN_WIDTH = 64;
6
+ declare const DEFAULT_COLUMN_MAX_WIDTH = 1200;
7
+ /** Reads the value of a column from a row: `accessor`, else `field`, else `undefined`. */
8
+ declare function getColumnValue<Row>(column: ColumnDef<Row>, row: Row): unknown;
9
+ /** The column's `field`, or its `id` when it has none. This is the name a server sees. */
10
+ declare function columnFieldName<Row>(column: ColumnDef<Row>): string;
11
+ declare function isNumericCellType(cellType: CellType | undefined): boolean;
12
+ /** The alignment of a column: its `align`, or `end` for numbers and `start` otherwise. */
13
+ declare function resolveColumnAlign<Row>(column: ColumnDef<Row>): ColumnAlign;
14
+ /** The filter type of a column: `filterType`, else derived from `cellType`. */
15
+ declare function resolveFilterType<Row>(column: ColumnDef<Row>): ColumnFilterType;
16
+ /** The editor of a column: `editor`, else derived from `cellType`. */
17
+ declare function resolveEditor<Row>(column: ColumnDef<Row>): ColumnEditor;
18
+ declare function isSortable<Row>(column: ColumnDef<Row>): boolean;
19
+ declare function isFilterable<Row>(column: ColumnDef<Row>): boolean;
20
+ declare function isResizable<Row>(column: ColumnDef<Row>): boolean;
21
+ declare function isEditable<Row>(column: ColumnDef<Row>, row: Row): boolean;
22
+ /** Clamps a width to the column's `minWidth` and `maxWidth`. */
23
+ declare function clampColumnWidth<Row>(column: ColumnDef<Row>, width: number): number;
24
+ /** The width of a column before any resize: `width`, clamped, or the default. */
25
+ declare function initialColumnWidth<Row>(column: ColumnDef<Row>): number;
26
+ /** Looks columns up by id. The first column with an id wins. */
27
+ declare function indexColumns<Row>(columns: readonly ColumnDef<Row>[]): Map<string, ColumnDef<Row>>;
28
+
29
+ /** Small value helpers shared by the sort, filter, format and export engines. */
30
+ /** `YYYY-MM-DD`. Such a value names a calendar day, not an instant. */
31
+ declare function isDateOnlyString(value: unknown): value is string;
32
+ /** `null`, `undefined`, an empty string, `NaN` and an empty array. `0` and `false` are values. */
33
+ declare function isEmptyValue(value: unknown): boolean;
34
+ /** A finite number from a number, bigint or numeric string; `NaN` for anything else. */
35
+ declare function toNumber(value: unknown): number;
36
+ /** Milliseconds since the epoch from a `Date`, number or date string; `NaN` for anything else. */
37
+ declare function toTimestamp(value: unknown): number;
38
+ /** A `Date` from a date-like value, or `null` when it is not a valid date. */
39
+ declare function toDate(value: unknown): Date | null;
40
+ /** Plain text for any value. Arrays join with a comma, dates use ISO format, `null` is empty. */
41
+ declare function toText(value: unknown): string;
42
+ /** Lower-cases and strips diacritics so "José" matches "jose". */
43
+ declare function normalizeText(value: string, locale?: string): string;
44
+ /** A boolean from a boolean or the strings `true`/`false`; `null` for anything else. */
45
+ declare function toBoolean(value: unknown): boolean | null;
46
+
47
+ interface SortOptions {
48
+ /** BCP 47 locale for string comparison. Defaults to the runtime locale. */
49
+ locale?: string;
50
+ /** Compare digit runs as numbers, so "item 2" sorts before "item 10". Default `true`. */
51
+ numeric?: boolean;
52
+ /** Ignore case and accents when comparing strings. Default `true`. */
53
+ caseInsensitive?: boolean;
54
+ }
55
+ /** A comparable key: numbers and strings compare naturally, `null` always sorts last. */
56
+ type SortKey = number | string | null;
57
+ declare function createCollator(options?: SortOptions): Intl.Collator;
58
+ /** The key a value sorts by. Numbers, dates and booleans become numbers; the rest become text. */
59
+ declare function toSortKey(value: unknown): SortKey;
60
+ /**
61
+ * Compares two values the way the grid sorts them: numbers by size, dates by
62
+ * time, booleans false before true, strings with a locale-aware collator, and
63
+ * empty values last. Returns a negative, zero or positive number (ascending).
64
+ */
65
+ declare function compareValues(a: unknown, b: unknown, collator?: Intl.Collator): number;
66
+ /**
67
+ * Sorts a list of row indexes by the sort model. The sort is stable, locale
68
+ * aware and multi-column: later items break ties of earlier ones. Empty values
69
+ * sort last in both directions. A column's `comparator` replaces the default.
70
+ * Items naming an unknown column are ignored.
71
+ *
72
+ * Works on indexes so a 100,000-row sort moves numbers, not row objects.
73
+ */
74
+ declare function sortIndexes<Row>(rows: readonly Row[], indexes: readonly number[], sort: readonly SortModelItem[], columns: readonly ColumnDef<Row>[], options?: SortOptions): number[];
75
+ /** Sorts rows and returns a new array. See `sortIndexes`. */
76
+ declare function sortRows<Row>(rows: readonly Row[], sort: readonly SortModelItem[], columns: readonly ColumnDef<Row>[], options?: SortOptions): Row[];
77
+
78
+ interface FilterContext {
79
+ locale?: string;
80
+ /** IANA time zone that decides where a calendar day starts for date filters. */
81
+ timeZone?: string;
82
+ }
83
+ /** The operators each filter type offers, in menu order. */
84
+ declare const OPERATORS_BY_FILTER_TYPE: Record<ColumnFilterType, readonly FilterOperator[]>;
85
+ declare function operatorsFor(type: ColumnFilterType): readonly FilterOperator[];
86
+ /** `is-empty` and `is-not-empty` take no value. */
87
+ declare function isValuelessOperator(operator: FilterOperator): boolean;
88
+ /**
89
+ * Whether a filter item narrows anything. An item with no usable value (an empty
90
+ * text box, `in` with no choices) is ignored instead of hiding every row.
91
+ */
92
+ declare function isFilterEffective(item: FilterModelItem): boolean;
93
+ /** The `YYYY-MM-DD` of a filter value: a date-only string, or the local day of a `Date`. */
94
+ declare function toDayString(value: unknown): string | null;
95
+ /** Milliseconds at the start of a `YYYY-MM-DD` day in a time zone (local when none). */
96
+ declare function dayStart(day: string, timeZone?: string): number;
97
+ /** The `YYYY-MM-DD` after a given day. */
98
+ declare function nextDay(day: string): string;
99
+ type ValuePredicate = (value: unknown) => boolean;
100
+ /**
101
+ * Compiles one filter item into a predicate on a cell value. Empty values match
102
+ * only `is-empty`, `not-equals` and `not-contains`. An item with no usable value
103
+ * matches everything.
104
+ */
105
+ declare function createValuePredicate<Row>(item: FilterModelItem, column: ColumnDef<Row>, ctx?: FilterContext): ValuePredicate;
106
+ /** Whether one value passes one filter item. Convenience over `createValuePredicate`. */
107
+ declare function matchesFilter<Row>(value: unknown, item: FilterModelItem, column: ColumnDef<Row>, ctx?: FilterContext): boolean;
108
+ /** Splits quick-search text into normalized tokens. Every token must match. */
109
+ declare function parseQuickFilter(text: string, locale?: string): string[];
110
+ declare function isSearchable<Row>(column: ColumnDef<Row>): boolean;
111
+ /**
112
+ * Builds the text each row is searched by: the formatted text of every
113
+ * searchable column, normalized. Build it once per rows and columns (React:
114
+ * `useMemo`) and pass it to `filterIndexes`, so typing in the quick search box
115
+ * does not format every cell again.
116
+ */
117
+ declare function createSearchIndex<Row>(rows: readonly Row[], columns: readonly ColumnDef<Row>[], ctx?: FormatContext): string[];
118
+ interface FilterIndexesOptions<Row> extends FilterContext {
119
+ /** Quick-search text. Every whitespace-separated token must appear in the row. */
120
+ quickFilter?: string;
121
+ /** From `createSearchIndex`, aligned to `rows`. Built on demand when absent. */
122
+ searchIndex?: readonly string[];
123
+ /** Columns the quick search reads when no `searchIndex` is given. Defaults to `columns`. */
124
+ searchColumns?: readonly ColumnDef<Row>[];
125
+ labels?: FormatContext["labels"];
126
+ }
127
+ /**
128
+ * Returns the indexes of the rows that pass every column filter and the quick
129
+ * filter, in their original order. Filters on different columns combine with
130
+ * AND, and so do several filters on one column. Items naming an unknown column
131
+ * are ignored.
132
+ */
133
+ declare function filterIndexes<Row>(rows: readonly Row[], filter: readonly FilterModelItem[], columns: readonly ColumnDef<Row>[], options?: FilterIndexesOptions<Row>): number[];
134
+ /** Distinct values of a column, for set filters. Capped so a huge column cannot stall the UI. */
135
+ declare function distinctValues<Row>(rows: readonly Row[], column: ColumnDef<Row>, limit?: number): unknown[];
136
+
137
+ interface AggregateOptions {
138
+ /** Return the original value of the earliest or latest entry, for date columns. */
139
+ dates?: boolean;
140
+ }
141
+ /**
142
+ * Reduces values to one: `sum`, `avg`, `min`, `max` over the numeric values, or
143
+ * `count` of non-empty values. Non-numeric values are skipped. `sum` of nothing
144
+ * is `0`; `avg`, `min` and `max` of nothing are `null`.
145
+ */
146
+ declare function aggregateValues(values: readonly unknown[], name: AggregateName, options?: AggregateOptions): unknown;
147
+ /** The aggregate of one column over some rows, or `undefined` when the column has none. */
148
+ declare function computeAggregate<Row>(column: ColumnDef<Row>, rows: readonly Row[]): unknown;
149
+ /** The aggregates of every column that declares one, keyed by column id. */
150
+ declare function computeAggregates<Row>(columns: readonly ColumnDef<Row>[], rows: readonly Row[]): Record<string, unknown>;
151
+
152
+ interface GroupNode {
153
+ /** Stable path id, for example `region=EMEA/country=DE`. Use it as the expansion key. */
154
+ id: string;
155
+ /** The id of the column grouped by at this level. */
156
+ field: string;
157
+ /** The grouped value, as the first row of the group holds it. */
158
+ value: unknown;
159
+ /** 0 for the outermost level. */
160
+ depth: number;
161
+ /** Indexes (into the rows array) of every row below this group, in view order. */
162
+ indexes: number[];
163
+ /** Sub-groups. Empty at the innermost level. */
164
+ children: GroupNode[];
165
+ /** Aggregates of the columns that declare one, over every row below. */
166
+ aggregates: Record<string, unknown>;
167
+ }
168
+ interface GroupOptions extends SortOptions {
169
+ /**
170
+ * How to order groups: `first` keeps the order rows arrive in, `asc` and
171
+ * `desc` sort by group value. A function picks per column id.
172
+ */
173
+ order?: "first" | SortDirection | ((field: string) => "first" | SortDirection);
174
+ }
175
+ /**
176
+ * Splits row indexes into nested groups by the group model, one level per item,
177
+ * and aggregates each group. Items naming an unknown column are ignored. With no
178
+ * usable group item the result is empty.
179
+ */
180
+ declare function buildGroupTree<Row>(rows: readonly Row[], indexes: readonly number[], group: readonly GroupModelItem[], columns: readonly ColumnDef<Row>[], options?: GroupOptions): GroupNode[];
181
+
182
+ interface ViewOptions<Row> extends FilterIndexesOptions<Row>, SortOptions {
183
+ sort?: readonly SortModelItem[];
184
+ filter?: readonly FilterModelItem[];
185
+ }
186
+ /**
187
+ * The client-side pipeline: filter (columns, then quick search), then sort.
188
+ * Returns the indexes of the surviving rows in presentation order. It never
189
+ * copies a row, so 100,000 rows cost two integer arrays.
190
+ */
191
+ declare function computeViewIndexes<Row>(rows: readonly Row[], columns: readonly ColumnDef<Row>[], options?: ViewOptions<Row>): number[];
192
+ /** A row as the grid lays it out: a data row, a group header, or a detail panel. */
193
+ type DisplayRow<Row> = {
194
+ kind: "data";
195
+ /** The row id from `getRowId`. */
196
+ id: string;
197
+ row: Row;
198
+ /** Index into the source rows array. */
199
+ index: number;
200
+ /** Number of group levels above the row. `aria-level` is `depth + 1`. */
201
+ depth: number;
202
+ } | {
203
+ kind: "group";
204
+ /** The group path id. */
205
+ id: string;
206
+ field: string;
207
+ value: unknown;
208
+ depth: number;
209
+ /** Rows below the group, at every depth. */
210
+ count: number;
211
+ expanded: boolean;
212
+ aggregates: Record<string, unknown>;
213
+ } | {
214
+ kind: "detail";
215
+ id: string;
216
+ /** The id of the data row this panel belongs to. */
217
+ parentId: string;
218
+ row: Row;
219
+ index: number;
220
+ depth: number;
221
+ };
222
+ interface DisplayOptions<Row> {
223
+ getRowId: (row: Row, index: number) => string;
224
+ group?: readonly GroupModelItem[];
225
+ /** Per group id. Groups without an entry follow `groupsExpandedByDefault`. */
226
+ groupExpansion?: Readonly<Record<string, boolean>>;
227
+ groupsExpandedByDefault?: boolean;
228
+ /** Row ids whose detail panel is open. */
229
+ expandedRows?: Readonly<Record<string, boolean>>;
230
+ /** Insert a `detail` row below each expanded data row. */
231
+ withDetail?: boolean;
232
+ sort?: readonly SortModelItem[];
233
+ locale?: string;
234
+ }
235
+ /**
236
+ * Turns presentation-ordered indexes into the flat list the grid renders:
237
+ * data rows, group headers for the group model, and detail rows below expanded
238
+ * rows. Collapsed groups hide everything below them. Groups appear in ascending
239
+ * order of their value unless the sort model sorts the group column.
240
+ */
241
+ declare function buildDisplayRows<Row>(rows: readonly Row[], indexes: readonly number[], columns: readonly ColumnDef<Row>[], options: DisplayOptions<Row>): {
242
+ rows: DisplayRow<Row>[];
243
+ groups: GroupNode[];
244
+ };
245
+
246
+ /**
247
+ * The keyboard model of the grid as a pure function: `(state, key, bounds)`
248
+ * returns the next state. It knows nothing about the DOM, so it is the same on
249
+ * the server, in tests and in the component.
250
+ *
251
+ * Coordinates are positions in the grid as a screen reader sees it: row 0 is
252
+ * the header row, rows 1 and up are the body, column 0 is the first column.
253
+ */
254
+ interface NavState {
255
+ row: number;
256
+ col: number;
257
+ }
258
+ interface NavBounds {
259
+ /** Rows including the header row. */
260
+ rowCount: number;
261
+ columnCount: number;
262
+ /** Rows moved by PageUp and PageDown. Use the number of visible rows. */
263
+ pageSize: number;
264
+ /** Right-to-left: ArrowLeft moves forward and ArrowRight moves back. */
265
+ rtl?: boolean;
266
+ }
267
+ interface NavKeyInput {
268
+ key: string;
269
+ ctrlKey?: boolean;
270
+ metaKey?: boolean;
271
+ shiftKey?: boolean;
272
+ altKey?: boolean;
273
+ }
274
+ /** Whether the key is one the model handles, so the caller can stop the page from scrolling. */
275
+ declare function isNavigationKey(input: NavKeyInput): boolean;
276
+ /** Keeps a position inside the grid, for example after rows or columns disappear. */
277
+ declare function clampNav(state: NavState, bounds: NavBounds): NavState;
278
+ /**
279
+ * Moves the cursor for a key press. Returns the same object when the key is not
280
+ * a navigation key or the cursor cannot move, so `next === state` means "nothing
281
+ * to do".
282
+ *
283
+ * - Arrow keys move one cell; they stop at the edges (no wrap).
284
+ * - Home and End jump to the first and last column of the row.
285
+ * - Ctrl+Home and Ctrl+End jump to the first and last cell of the grid.
286
+ * - PageUp and PageDown move `pageSize` rows.
287
+ * - In right-to-left, ArrowLeft and ArrowRight swap.
288
+ */
289
+ declare function navigate(state: NavState, input: NavKeyInput, bounds: NavBounds): NavState;
290
+
291
+ /** What a server query depends on. A change to any part throws the cached rows out of date. */
292
+ interface ServerQuery {
293
+ sort: SortModelItem[];
294
+ filter: FilterModelItem[];
295
+ group: GroupModelItem[];
296
+ quickFilter?: string;
297
+ }
298
+ /** An abort error: what a data source should reject with when its `signal` aborts. */
299
+ declare function createAbortError(message?: string): Error;
300
+ declare function isAbortError(error: unknown): boolean;
301
+ /**
302
+ * Translates a grid query (which names columns by `id`) into what a server
303
+ * sees: the data field of each column (`column.field ?? column.id`).
304
+ */
305
+ declare function toServerQuery<Row>(columns: readonly ColumnDef<Row>[], query: ServerQuery): ServerQuery;
306
+ /** The inverse of `toServerQuery`, for data sources that reuse the headless engine. */
307
+ declare function fromServerQuery<Row>(columns: readonly ColumnDef<Row>[], query: ServerQuery): ServerQuery;
308
+ interface ClientDataSourceOptions {
309
+ /** Simulated network delay in milliseconds, or a function returning one. Default 0. */
310
+ latency?: number | (() => number);
311
+ locale?: string;
312
+ /** Throw this for requests the function accepts, to exercise error states. */
313
+ fail?: (request: GetRowsRequest) => unknown;
314
+ }
315
+ /**
316
+ * A `ServerDataSource` over an in-memory array: it filters, sorts and pages with
317
+ * the headless engine. Use it to try server mode without a backend, in tests,
318
+ * and in demos. It honors the `signal` like a real fetch.
319
+ */
320
+ declare function createClientDataSource<Row>(rows: readonly Row[], columns: readonly ColumnDef<Row>[], options?: ClientDataSourceOptions): ServerDataSource<Row>;
321
+ type BlockStatus = "idle" | "loading" | "loaded" | "error";
322
+ interface ServerStoreSnapshot {
323
+ /** Changes whenever anything the grid could show changes. */
324
+ readonly version: number;
325
+ /** Total rows matching the query, or `null` before the first answer. */
326
+ readonly total: number | null;
327
+ /** At least one request is in flight. */
328
+ readonly loading: boolean;
329
+ /** The error of the most recent failed request, or `null`. */
330
+ readonly error: unknown;
331
+ /**
332
+ * What is on screen came from before the last query change and is being
333
+ * replaced: the total, or a block in the rows last asked for. Blocks outside
334
+ * that window stay stale quietly until they are scrolled to.
335
+ */
336
+ readonly stale: boolean;
337
+ }
338
+ interface ServerRowStoreOptions<Row> {
339
+ dataSource: ServerDataSource<Row>;
340
+ /** Rows per request. In paged mode use the page size. */
341
+ blockSize: number;
342
+ query?: ServerQuery;
343
+ }
344
+ interface ServerRowStore<Row> {
345
+ subscribe(listener: () => void): () => void;
346
+ getSnapshot(): ServerStoreSnapshot;
347
+ /**
348
+ * Changes what the server is asked for. Requests in flight are aborted. Rows
349
+ * already loaded stay visible and flagged stale until fresh blocks replace them
350
+ * (stale-while-revalidate). Returns `false` when the query is unchanged.
351
+ */
352
+ setQuery(query: ServerQuery): boolean;
353
+ /** Changes the rows per request. Cached rows no longer line up, so they are dropped. */
354
+ setBlockSize(size: number): void;
355
+ /** Makes sure every block overlapping `[startRow, endRow)` is loaded or loading. */
356
+ request(startRow: number, endRow: number): void;
357
+ /** The row at an index, or `undefined` while it is not loaded. Stale rows are returned. */
358
+ getRow(index: number): Row | undefined;
359
+ getBlockStatus(index: number): BlockStatus;
360
+ /** Whether the row at an index is from before the last query change. */
361
+ isStale(index: number): boolean;
362
+ /** Requests again every block that failed. */
363
+ retry(): void;
364
+ /** Drops everything and loads again from the first block on the next `request`. */
365
+ reset(): void;
366
+ /** Aborts requests and stops notifying. */
367
+ destroy(): void;
368
+ }
369
+ /**
370
+ * The cache behind server mode: fixed-size blocks, one request per block, an
371
+ * `AbortSignal` per request, stale-while-revalidate on query changes and retry
372
+ * for failed blocks. It also follows cursor-paged APIs: when an answer carries
373
+ * `nextCursor`, later blocks are requested one after another with that cursor.
374
+ *
375
+ * It is framework free; React reads it with `useSyncExternalStore`.
376
+ */
377
+ declare function createServerRowStore<Row>(options: ServerRowStoreOptions<Row>): ServerRowStore<Row>;
378
+
379
+ type MessageValues = Readonly<Record<string, string | number>>;
380
+ /**
381
+ * The ICU MessageFormat subset the grid's messages use:
382
+ *
383
+ * - `{name}`: the value; numbers are formatted for the locale.
384
+ * - `{count, plural, =0 {none} one {# row} other {# rows}}`: plural categories
385
+ * from `Intl.PluralRules`, exact `=N` matches, and `#` for the number.
386
+ * - `{kind, select, a {...} other {...}}`: choose by string value.
387
+ *
388
+ * Apostrophes are plain characters; there is no quoting. A missing value renders
389
+ * as an empty string rather than throwing.
390
+ */
391
+ declare function formatMessage(template: string, values?: MessageValues, locale?: string): string;
392
+
393
+ export { AggregateName, CellType, ColumnAlign, ColumnDef, ColumnEditor, ColumnFilterType, DEFAULT_COLUMN_MAX_WIDTH, DEFAULT_COLUMN_MIN_WIDTH, DEFAULT_COLUMN_WIDTH, FilterModelItem, FilterOperator, FormatContext, GetRowsRequest, GroupModelItem, OPERATORS_BY_FILTER_TYPE, ServerDataSource, SortDirection, SortModelItem, aggregateValues, buildDisplayRows, buildGroupTree, clampColumnWidth, clampNav, columnFieldName, compareValues, computeAggregate, computeAggregates, computeViewIndexes, createAbortError, createClientDataSource, createCollator, createSearchIndex, createServerRowStore, createValuePredicate, dayStart, distinctValues, filterIndexes, formatMessage, fromServerQuery, getColumnValue, indexColumns, initialColumnWidth, isAbortError, isDateOnlyString, isEditable, isEmptyValue, isFilterEffective, isFilterable, isNavigationKey, isNumericCellType, isResizable, isSearchable, isSortable, isValuelessOperator, matchesFilter, navigate, nextDay, normalizeText, operatorsFor, parseQuickFilter, resolveColumnAlign, resolveEditor, resolveFilterType, sortIndexes, sortRows, toBoolean, toDate, toDayString, toNumber, toServerQuery, toSortKey, toText, toTimestamp };
394
+ export type { AggregateOptions, BlockStatus, ClientDataSourceOptions, DisplayOptions, DisplayRow, FilterContext, FilterIndexesOptions, GroupNode, GroupOptions, MessageValues, NavBounds, NavKeyInput, NavState, ServerQuery, ServerRowStore, ServerRowStoreOptions, ServerStoreSnapshot, SortOptions, ViewOptions };
package/dist/index.js ADDED
@@ -0,0 +1,219 @@
1
+ import {
2
+ DEFAULT_COLUMN_MAX_WIDTH,
3
+ DEFAULT_COLUMN_MIN_WIDTH,
4
+ DEFAULT_COLUMN_WIDTH,
5
+ EMPTY_SELECTION,
6
+ FILTER_OPERATORS,
7
+ OPERATORS_BY_FILTER_TYPE,
8
+ SAVED_VIEW_VERSION,
9
+ aggregateValues,
10
+ applySavedView,
11
+ buildDisplayRows,
12
+ buildGroupTree,
13
+ captureView,
14
+ clampColumnWidth,
15
+ clampNav,
16
+ clearSelection,
17
+ columnFieldName,
18
+ compareValues,
19
+ computeAggregate,
20
+ computeAggregates,
21
+ computeViewIndexes,
22
+ countSelected,
23
+ createAbortError,
24
+ createCellFormatter,
25
+ createClientDataSource,
26
+ createCollator,
27
+ createLocalStorageSavedViewStore,
28
+ createMemorySavedViewStore,
29
+ createSearchIndex,
30
+ createSelection,
31
+ createServerRowStore,
32
+ createValuePredicate,
33
+ createViewState,
34
+ dayStart,
35
+ defaultFormatLabels,
36
+ defaultMessages,
37
+ defineColumns,
38
+ deserializeSelection,
39
+ distinctValues,
40
+ escapeCsvField,
41
+ escapeDelimitedField,
42
+ exportableColumns,
43
+ filterIndexes,
44
+ formatCellValue,
45
+ formatMessage,
46
+ fromServerQuery,
47
+ getColumnValue,
48
+ gridToCsv,
49
+ gridToTsv,
50
+ indexColumns,
51
+ initialColumnWidth,
52
+ isAbortError,
53
+ isDateOnlyString,
54
+ isEditable,
55
+ isEmptyValue,
56
+ isFilterEffective,
57
+ isFilterable,
58
+ isNavigationKey,
59
+ isNumericCellType,
60
+ isResizable,
61
+ isSearchable,
62
+ isSelected,
63
+ isSelectionEmpty,
64
+ isSortable,
65
+ isValuelessOperator,
66
+ layoutColumns,
67
+ matchesFilter,
68
+ moveColumn,
69
+ moveColumnTo,
70
+ navigate,
71
+ nextDay,
72
+ normalizeText,
73
+ operatorsFor,
74
+ parseDelimited,
75
+ parseQuickFilter,
76
+ parseSavedView,
77
+ resizeColumn,
78
+ resolveColumnAlign,
79
+ resolveColumnOrder,
80
+ resolveDateFormatOptions,
81
+ resolveEditor,
82
+ resolveFilterType,
83
+ resolveMessages,
84
+ resolveNumberFormatOptions,
85
+ resolveSelectedIds,
86
+ selectAll,
87
+ selectAllExceptNone,
88
+ selectOnly,
89
+ selectRange,
90
+ serializeSelection,
91
+ setColumnFilter,
92
+ setPinning,
93
+ setSort,
94
+ sortIndexes,
95
+ sortRank,
96
+ sortRows,
97
+ summarizeSelection,
98
+ toBoolean,
99
+ toDate,
100
+ toDayString,
101
+ toNumber,
102
+ toServerQuery,
103
+ toSortKey,
104
+ toText,
105
+ toTimestamp,
106
+ toggleGroup,
107
+ toggleRow,
108
+ toggleSort
109
+ } from "./chunk-ASP4ABDG.js";
110
+ export {
111
+ DEFAULT_COLUMN_MAX_WIDTH,
112
+ DEFAULT_COLUMN_MIN_WIDTH,
113
+ DEFAULT_COLUMN_WIDTH,
114
+ EMPTY_SELECTION,
115
+ FILTER_OPERATORS,
116
+ OPERATORS_BY_FILTER_TYPE,
117
+ SAVED_VIEW_VERSION,
118
+ aggregateValues,
119
+ applySavedView,
120
+ buildDisplayRows,
121
+ buildGroupTree,
122
+ captureView,
123
+ clampColumnWidth,
124
+ clampNav,
125
+ clearSelection,
126
+ columnFieldName,
127
+ compareValues,
128
+ computeAggregate,
129
+ computeAggregates,
130
+ computeViewIndexes,
131
+ countSelected,
132
+ createAbortError,
133
+ createCellFormatter,
134
+ createClientDataSource,
135
+ createCollator,
136
+ createLocalStorageSavedViewStore,
137
+ createMemorySavedViewStore,
138
+ createSearchIndex,
139
+ createSelection,
140
+ createServerRowStore,
141
+ createValuePredicate,
142
+ createViewState,
143
+ dayStart,
144
+ defaultFormatLabels,
145
+ defaultMessages,
146
+ defineColumns,
147
+ deserializeSelection,
148
+ distinctValues,
149
+ escapeCsvField,
150
+ escapeDelimitedField,
151
+ exportableColumns,
152
+ filterIndexes,
153
+ formatCellValue,
154
+ formatMessage,
155
+ fromServerQuery,
156
+ getColumnValue,
157
+ gridToCsv,
158
+ gridToTsv,
159
+ indexColumns,
160
+ initialColumnWidth,
161
+ isAbortError,
162
+ isDateOnlyString,
163
+ isEditable,
164
+ isEmptyValue,
165
+ isFilterEffective,
166
+ isFilterable,
167
+ isNavigationKey,
168
+ isNumericCellType,
169
+ isResizable,
170
+ isSearchable,
171
+ isSelected,
172
+ isSelectionEmpty,
173
+ isSortable,
174
+ isValuelessOperator,
175
+ layoutColumns,
176
+ matchesFilter,
177
+ moveColumn,
178
+ moveColumnTo,
179
+ navigate,
180
+ nextDay,
181
+ normalizeText,
182
+ operatorsFor,
183
+ parseDelimited,
184
+ parseQuickFilter,
185
+ parseSavedView,
186
+ resizeColumn,
187
+ resolveColumnAlign,
188
+ resolveColumnOrder,
189
+ resolveDateFormatOptions,
190
+ resolveEditor,
191
+ resolveFilterType,
192
+ resolveMessages,
193
+ resolveNumberFormatOptions,
194
+ resolveSelectedIds,
195
+ selectAll,
196
+ selectAllExceptNone,
197
+ selectOnly,
198
+ selectRange,
199
+ serializeSelection,
200
+ setColumnFilter,
201
+ setPinning,
202
+ setSort,
203
+ sortIndexes,
204
+ sortRank,
205
+ sortRows,
206
+ summarizeSelection,
207
+ toBoolean,
208
+ toDate,
209
+ toDayString,
210
+ toNumber,
211
+ toServerQuery,
212
+ toSortKey,
213
+ toText,
214
+ toTimestamp,
215
+ toggleGroup,
216
+ toggleRow,
217
+ toggleSort
218
+ };
219
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}