@olvnck/ingrid 0.0.0-stage → 0.15.20
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/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +5533 -2
- package/THIRD_PARTY_NOTICES.md +10 -0
- package/dist/engine/clipboard/copy.d.ts +40 -0
- package/dist/engine/clipboard/options.d.ts +16 -0
- package/dist/engine/clipboard/text.d.ts +32 -0
- package/dist/engine/columns/autosize.d.ts +43 -0
- package/dist/engine/columns/dataType.d.ts +30 -0
- package/dist/engine/columns/fold.d.ts +48 -0
- package/dist/engine/columns/layout.d.ts +150 -0
- package/dist/engine/columns/model.d.ts +369 -0
- package/dist/engine/columns/query.d.ts +16 -0
- package/dist/engine/columns/tooltips.d.ts +27 -0
- package/dist/engine/data/client/clientSource.d.ts +151 -0
- package/dist/engine/data/client/columnFilters.d.ts +106 -0
- package/dist/engine/data/client/descendants.d.ts +35 -0
- package/dist/engine/data/client/diff.d.ts +23 -0
- package/dist/engine/data/client/fields.d.ts +70 -0
- package/dist/engine/data/client/filter.d.ts +95 -0
- package/dist/engine/data/client/flatten.d.ts +141 -0
- package/dist/engine/data/client/groupSize.d.ts +14 -0
- package/dist/engine/data/client/hierarchy.d.ts +85 -0
- package/dist/engine/data/client/order.d.ts +32 -0
- package/dist/engine/data/client/pipeline.d.ts +277 -0
- package/dist/engine/data/client/remap.d.ts +33 -0
- package/dist/engine/data/client/trees.d.ts +41 -0
- package/dist/engine/data/client/types.d.ts +173 -0
- package/dist/engine/data/memory/generate.d.ts +36 -0
- package/dist/engine/data/memory/memoryDatasource.d.ts +46 -0
- package/dist/engine/data/rowKey.d.ts +15 -0
- package/dist/engine/data/server/contract.d.ts +64 -0
- package/dist/engine/data/server/expansion.d.ts +35 -0
- package/dist/engine/data/server/levelStore.d.ts +99 -0
- package/dist/engine/data/server/loader.d.ts +128 -0
- package/dist/engine/data/server/reader.d.ts +88 -0
- package/dist/engine/data/server/response.d.ts +31 -0
- package/dist/engine/data/server/serverSource.d.ts +130 -0
- package/dist/engine/data/shared/aggregate.d.ts +12 -0
- package/dist/engine/data/shared/columnFilter.d.ts +19 -0
- package/dist/engine/data/shared/compare.d.ts +12 -0
- package/dist/engine/data/shared/dateParts.d.ts +19 -0
- package/dist/engine/data/shared/distinct.d.ts +30 -0
- package/dist/engine/data/shared/filterRecord.d.ts +7 -0
- package/dist/engine/data/shared/keys.d.ts +17 -0
- package/dist/engine/data/shared/quickFilter.d.ts +17 -0
- package/dist/engine/data/shared/sourceUtils.d.ts +11 -0
- package/dist/engine/data/shared/splice.d.ts +9 -0
- package/dist/engine/detail/builds.d.ts +26 -0
- package/dist/engine/detail/content.d.ts +24 -0
- package/dist/engine/detail/controller.d.ts +176 -0
- package/dist/engine/detail/events.d.ts +11 -0
- package/dist/engine/detail/follow.d.ts +56 -0
- package/dist/engine/detail/layer.d.ts +119 -0
- package/dist/engine/detail/live.d.ts +96 -0
- package/dist/engine/detail/options.d.ts +53 -0
- package/dist/engine/detail/state.d.ts +140 -0
- package/dist/engine/edit/clear.d.ts +20 -0
- package/dist/engine/edit/editing.d.ts +4 -0
- package/dist/engine/edit/editors/date.d.ts +3 -0
- package/dist/engine/edit/editors/index.d.ts +23 -0
- package/dist/engine/edit/editors/internals.d.ts +25 -0
- package/dist/engine/edit/editors/largeText.d.ts +2 -0
- package/dist/engine/edit/editors/number.d.ts +4 -0
- package/dist/engine/edit/editors/select.d.ts +2 -0
- package/dist/engine/edit/editors/text.d.ts +15 -0
- package/dist/engine/edit/fill.d.ts +47 -0
- package/dist/engine/edit/fillHandle.d.ts +66 -0
- package/dist/engine/edit/fillValues.d.ts +15 -0
- package/dist/engine/edit/operations.d.ts +68 -0
- package/dist/engine/edit/paste.d.ts +23 -0
- package/dist/engine/edit/pastePlan.d.ts +17 -0
- package/dist/engine/edit/popupHost.d.ts +63 -0
- package/dist/engine/edit/session.d.ts +52 -0
- package/dist/engine/edit/types.d.ts +234 -0
- package/dist/engine/edit/undo.d.ts +38 -0
- package/dist/engine/edit/validation.d.ts +10 -0
- package/dist/engine/edit/values.d.ts +38 -0
- package/dist/engine/export/columns.d.ts +19 -0
- package/dist/engine/export/deliver.d.ts +47 -0
- package/dist/engine/export/dsv.d.ts +2 -0
- package/dist/engine/export/expanded.d.ts +69 -0
- package/dist/engine/export/export.d.ts +25 -0
- package/dist/engine/export/headers.d.ts +15 -0
- package/dist/engine/export/options.d.ts +19 -0
- package/dist/engine/export/plan.d.ts +43 -0
- package/dist/engine/export/values.d.ts +33 -0
- package/dist/engine/export/walk.d.ts +31 -0
- package/dist/engine/export/writer.d.ts +62 -0
- package/dist/engine/export/xlsx/cells.d.ts +31 -0
- package/dist/engine/export/xlsx/index.d.ts +12 -0
- package/dist/engine/export/xlsx/parts.d.ts +36 -0
- package/dist/engine/export/xlsx/sheet.d.ts +30 -0
- package/dist/engine/export/xlsx/styles.d.ts +15 -0
- package/dist/engine/export/xlsx/table.d.ts +8 -0
- package/dist/engine/export/xlsx/zip.d.ts +24 -0
- package/dist/engine/filter/groupFilter.d.ts +28 -0
- package/dist/engine/filter/model.d.ts +235 -0
- package/dist/engine/filter/shorthand.d.ts +36 -0
- package/dist/engine/filter/state.d.ts +76 -0
- package/dist/engine/filter/summary.d.ts +16 -0
- package/dist/engine/filter/values.d.ts +40 -0
- package/dist/engine/find/index.d.ts +94 -0
- package/dist/engine/find/match.d.ts +38 -0
- package/dist/engine/find/model.d.ts +115 -0
- package/dist/engine/grid.d.ts +42 -0
- package/dist/engine/i18n/numbers.d.ts +34 -0
- package/dist/engine/i18n/texts.d.ts +306 -0
- package/dist/engine/interact/autoScroll.d.ts +11 -0
- package/dist/engine/interact/body.d.ts +41 -0
- package/dist/engine/interact/focus.d.ts +158 -0
- package/dist/engine/interact/header.d.ts +216 -0
- package/dist/engine/interact/host.d.ts +400 -0
- package/dist/engine/interact/keyboard.d.ts +20 -0
- package/dist/engine/interact/menuKey.d.ts +7 -0
- package/dist/engine/interact/own.d.ts +2 -0
- package/dist/engine/interact/ranges.d.ts +68 -0
- package/dist/engine/interact/rowSelection.d.ts +53 -0
- package/dist/engine/interact/shortcut.d.ts +21 -0
- package/dist/engine/interact/tooltips.d.ts +63 -0
- package/dist/engine/measure.d.ts +30 -0
- package/dist/engine/render/cells.d.ts +322 -0
- package/dist/engine/render/columns.d.ts +28 -0
- package/dist/engine/render/dom.d.ts +24 -0
- package/dist/engine/render/flash.d.ts +74 -0
- package/dist/engine/render/groupCell.d.ts +50 -0
- package/dist/engine/render/groupPanel.d.ts +21 -0
- package/dist/engine/render/header.d.ts +162 -0
- package/dist/engine/render/overlay.d.ts +15 -0
- package/dist/engine/render/pinnedRows.d.ts +106 -0
- package/dist/engine/render/rowPool.d.ts +3 -0
- package/dist/engine/render/scrollbars.d.ts +77 -0
- package/dist/engine/render/strategy.d.ts +397 -0
- package/dist/engine/reportError.d.ts +7 -0
- package/dist/engine/rowdrag/controller.d.ts +80 -0
- package/dist/engine/rowdrag/events.d.ts +17 -0
- package/dist/engine/rowdrag/gesture.d.ts +33 -0
- package/dist/engine/rowdrag/keys.d.ts +21 -0
- package/dist/engine/rowdrag/model.d.ts +67 -0
- package/dist/engine/rowdrag/options.d.ts +34 -0
- package/dist/engine/rowdrag/rows.d.ts +61 -0
- package/dist/engine/rowdrag/target.d.ts +59 -0
- package/dist/engine/rowdrag/zones.d.ts +79 -0
- package/dist/engine/schedule.d.ts +29 -0
- package/dist/engine/selection/aggregate.d.ts +30 -0
- package/dist/engine/selection/options.d.ts +7 -0
- package/dist/engine/selection/rangeRows.d.ts +19 -0
- package/dist/engine/selection/ranges.d.ts +114 -0
- package/dist/engine/selection/rows.d.ts +207 -0
- package/dist/engine/source.d.ts +225 -0
- package/dist/engine/synthetic.d.ts +28 -0
- package/dist/engine/table/cells.d.ts +52 -0
- package/dist/engine/table/headers.d.ts +20 -0
- package/dist/engine/table/host.d.ts +65 -0
- package/dist/engine/table/job.d.ts +21 -0
- package/dist/engine/table/rows.d.ts +99 -0
- package/dist/engine/table/slicer.d.ts +54 -0
- package/dist/engine/table/takes.d.ts +145 -0
- package/dist/engine/types.d.ts +2950 -0
- package/dist/engine/ui/announce.d.ts +7 -0
- package/dist/engine/ui/chooser.d.ts +19 -0
- package/dist/engine/ui/columnList.d.ts +41 -0
- package/dist/engine/ui/columnMenu.d.ts +96 -0
- package/dist/engine/ui/columnsPanel.d.ts +16 -0
- package/dist/engine/ui/contextMenu.d.ts +48 -0
- package/dist/engine/ui/controller.d.ts +295 -0
- package/dist/engine/ui/filters/apply.d.ts +53 -0
- package/dist/engine/ui/filters/custom.d.ts +3 -0
- package/dist/engine/ui/filters/date.d.ts +12 -0
- package/dist/engine/ui/filters/host.d.ts +102 -0
- package/dist/engine/ui/filters/multi.d.ts +6 -0
- package/dist/engine/ui/filters/number.d.ts +15 -0
- package/dist/engine/ui/filters/numberMask.d.ts +15 -0
- package/dist/engine/ui/filters/set.d.ts +3 -0
- package/dist/engine/ui/filters/simple.d.ts +52 -0
- package/dist/engine/ui/filters/text.d.ts +5 -0
- package/dist/engine/ui/filtersPanel.d.ts +18 -0
- package/dist/engine/ui/floating.d.ts +66 -0
- package/dist/engine/ui/floatingShorthand.d.ts +20 -0
- package/dist/engine/ui/floatingTypes.d.ts +82 -0
- package/dist/engine/ui/icons.d.ts +25 -0
- package/dist/engine/ui/menu.d.ts +45 -0
- package/dist/engine/ui/overlayHost.d.ts +7 -0
- package/dist/engine/ui/place.d.ts +37 -0
- package/dist/engine/ui/popup.d.ts +97 -0
- package/dist/engine/ui/sideBar.d.ts +26 -0
- package/dist/engine/ui/statusBar.d.ts +29 -0
- package/dist/engine/ui/toolbar/buttons.d.ts +21 -0
- package/dist/engine/ui/toolbar/chipState.d.ts +52 -0
- package/dist/engine/ui/toolbar/chips.d.ts +23 -0
- package/dist/engine/ui/toolbar/findBox.d.ts +10 -0
- package/dist/engine/ui/toolbar/quickFilterBox.d.ts +12 -0
- package/dist/engine/ui/toolbar/registry.d.ts +5 -0
- package/dist/engine/ui/toolbar/toolbar.d.ts +31 -0
- package/dist/engine/ui/toolbar/types.d.ts +23 -0
- package/dist/engine/ui/tooltip.d.ts +34 -0
- package/dist/engine/ui/virtualList.d.ts +35 -0
- package/dist/engine/viewport/heightView.d.ts +62 -0
- package/dist/engine/viewport/heights.d.ts +39 -0
- package/dist/engine/viewport/intervals.d.ts +19 -0
- package/dist/engine/viewport/range.d.ts +51 -0
- package/dist/engine/viewport/scroll.d.ts +45 -0
- package/dist/engine/viewport/stack.d.ts +160 -0
- package/dist/grid-C34VEap6.js +32310 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +1273 -0
- package/dist/ingrid.css +1 -0
- package/dist/internal.d.ts +13 -0
- package/dist/internal.js +1 -0
- package/dist/locale/de.d.ts +4 -0
- package/dist/locale/de.js +222 -0
- package/dist/themes/primevue.css +63 -0
- package/dist/themes/tailwind.css +68 -0
- package/dist/vue/InGrid.vue.d.ts +263 -0
- package/dist/vue/stableOptions.d.ts +8 -0
- package/dist/vue/useClientSource.d.ts +28 -0
- package/dist/vue/useServerSource.d.ts +8 -0
- package/dist/vue/vueRenderer.d.ts +164 -0
- package/dist/xlsx-59umS_n_.js +325 -0
- package/package.json +78 -5
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { type RangeColumns } from '../selection/ranges';
|
|
2
|
+
import { type ViewportSource } from '../source';
|
|
3
|
+
import type { CellAddress, CellRange } from '../types';
|
|
4
|
+
import type { RowRange } from '../viewport/range';
|
|
5
|
+
import type { TableColumn } from './cells';
|
|
6
|
+
import type { TableHost } from './host';
|
|
7
|
+
import { type TableRows, type WalkSections } from './rows';
|
|
8
|
+
/** Runs of rows `[first, last]`, ascending and disjoint. */
|
|
9
|
+
export type RowRuns = readonly (readonly [first: number, last: number])[];
|
|
10
|
+
export interface TableBlock {
|
|
11
|
+
/** The block's rows as runs, walked as the table is built: no list of every row is made before. */
|
|
12
|
+
rows: RowRuns;
|
|
13
|
+
/** Rows it returns false for are left out (a selection's rows); checked as the table is built, in its slices. */
|
|
14
|
+
keep?: (row: number) => boolean;
|
|
15
|
+
columns: readonly TableColumn[];
|
|
16
|
+
/** Set by the 'grid' layout: cells for which it returns false are written empty. */
|
|
17
|
+
covers?: (row: number, id: string) => boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Blocks over the rows they are read from. */
|
|
20
|
+
export interface TableWalk {
|
|
21
|
+
blocks: readonly TableBlock[];
|
|
22
|
+
rows: TableRows;
|
|
23
|
+
/**
|
|
24
|
+
* The rows are a client's expanded order (an export of every row, the selected rows or the ranges):
|
|
25
|
+
* every group is written as if open, so one with a total row blanks its own sums (`cellReader`'s `asIfOpen`).
|
|
26
|
+
*/
|
|
27
|
+
asIfOpen?: true;
|
|
28
|
+
}
|
|
29
|
+
/** Copied cells, for their flash: display rows × column ids, one flash registry entry. */
|
|
30
|
+
export interface CopiedCells {
|
|
31
|
+
rows: readonly RowRange[];
|
|
32
|
+
columns: ReadonlySet<string>;
|
|
33
|
+
}
|
|
34
|
+
/** What one copy or export takes and how its rows are found. */
|
|
35
|
+
export interface Take {
|
|
36
|
+
kind: 'ranges' | 'rows' | 'cell' | 'view';
|
|
37
|
+
/** Before `confirm`. */
|
|
38
|
+
size: {
|
|
39
|
+
rows: number;
|
|
40
|
+
columns: number;
|
|
41
|
+
cells: number;
|
|
42
|
+
unloaded: number;
|
|
43
|
+
};
|
|
44
|
+
/** The taken extent; a server read may change it (the levels of open groups, the selected rows). */
|
|
45
|
+
result: {
|
|
46
|
+
rows: number;
|
|
47
|
+
columns: number;
|
|
48
|
+
cells: number;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The cells the walk builds — `'grid'`: every distinct row × every distinct column of the union, each checked for
|
|
52
|
+
* cover; a client's selected rows: plus the rows checked, a fraction of a cell each — which decides the synchronous
|
|
53
|
+
* path; `size.cells` is what `confirm` sees.
|
|
54
|
+
*/
|
|
55
|
+
cost: number;
|
|
56
|
+
/** Every row the walk needs is loaded now: it can be built in one go from the live source. */
|
|
57
|
+
ready: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* A sliced walk reads its rows through the server source — also loaded ones, from its cache, so an eviction
|
|
60
|
+
* between two slices cannot take rows away.
|
|
61
|
+
*/
|
|
62
|
+
reads: boolean;
|
|
63
|
+
/** The last display row the walk reads (a splice at or above it changes a live walk). */
|
|
64
|
+
lastRow: number;
|
|
65
|
+
/**
|
|
66
|
+
* The walk resolves its rows against the view when it is built (a whole-view take, a server's selected rows read by
|
|
67
|
+
* id): a splice before that leaves it right. Any other take holds display rows taken at plan time, so a splice at or
|
|
68
|
+
* above `lastRow` while `confirm` is open cancels it.
|
|
69
|
+
*/
|
|
70
|
+
wholeView: boolean;
|
|
71
|
+
/** A server read takes every row with `expandAll` and walks the read's own order (`rows: 'all'` ranges). */
|
|
72
|
+
expandAll: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* The source the take's rows come from. Replaced (`setRows`) before the walk is built, the job ends: a whole-view
|
|
75
|
+
* take would build the old rows against the new row count.
|
|
76
|
+
*/
|
|
77
|
+
source: ViewportSource | null;
|
|
78
|
+
/**
|
|
79
|
+
* The rows are found as the walk is built from state that may change meanwhile: true when it did (the job ends).
|
|
80
|
+
* Checked when the build starts, right after a server read, before every slice step and at the end.
|
|
81
|
+
*/
|
|
82
|
+
stale: (() => boolean) | null;
|
|
83
|
+
/**
|
|
84
|
+
* The rows the walk reads moved under it (an export over a client's expanded order whose source ran again):
|
|
85
|
+
* the job ends with the moved hint. Checked like `stale`.
|
|
86
|
+
*/
|
|
87
|
+
moved?: () => boolean;
|
|
88
|
+
/** Its columns (for the fields a server read asks for). */
|
|
89
|
+
columns: readonly TableColumn[];
|
|
90
|
+
/** The walk over the live source. */
|
|
91
|
+
live(): TableWalk;
|
|
92
|
+
/** The walk over rows a server source read; null when the rows moved meanwhile. */
|
|
93
|
+
read(signal: AbortSignal): Promise<TableWalk | null>;
|
|
94
|
+
/** The taken cells, which flash once a copy is written; read then (a selection's rows are found as built). */
|
|
95
|
+
copied(): readonly CopiedCells[];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The pinned sections a copy or an export takes (`ExportOptions.pinnedRows`): `true` both, a side that
|
|
99
|
+
* one, `false` none.
|
|
100
|
+
*/
|
|
101
|
+
export type PinnedChoice = boolean | 'top' | 'bottom';
|
|
102
|
+
/**
|
|
103
|
+
* The pinned sections of `host` that `choice` takes, with their row counts now; null when none of them has a row, so a
|
|
104
|
+
* grid without pinned rows walks its body alone.
|
|
105
|
+
*/
|
|
106
|
+
export declare function takenSections(host: TableHost, choice?: PinnedChoice): WalkSections | null;
|
|
107
|
+
/**
|
|
108
|
+
* Ranges grouped into blocks: same-row ranges joined side by side, or one grid for 'grid'. Rows in display order
|
|
109
|
+
* (`rangeSpan`): `t` top rows before the `rowCount` body rows, `u` bottom rows after them (0: none taken).
|
|
110
|
+
*/
|
|
111
|
+
export declare function blocksOf(ranges: readonly CellRange[], columns: RangeColumns, rowCount: number, layout: 'blocks' | 'grid', column: (id: string) => TableColumn | null, t?: number, u?: number): TableBlock[];
|
|
112
|
+
/**
|
|
113
|
+
* The ranges: blocks of the ranges; the size from their geometry, so no row list is built before `confirm`.
|
|
114
|
+
* Null when no range keeps a row and a column `column` accepts. A range's rows in display order: its rows
|
|
115
|
+
* in the pinned `sections` taken — default both — at their place around its body rows; only body rows are read from a
|
|
116
|
+
* server, cancel the take when spliced and flash.
|
|
117
|
+
*/
|
|
118
|
+
export declare function takeRanges(host: TableHost, column: (id: string) => TableColumn | null, layout: 'blocks' | 'grid', sections?: WalkSections | null): Take | null;
|
|
119
|
+
/**
|
|
120
|
+
* The selected rows over `columns`: the displayed ones in display order (the displayed leaves under the descendants
|
|
121
|
+
* modes). Null without a row selection, rows or columns.
|
|
122
|
+
* - A client source: the size from the model's displayed count (it counts exactly these rows); the rows are found as
|
|
123
|
+
* the table is built, in its slices, so nothing scans every row before `confirm`. A selection changed
|
|
124
|
+
* meanwhile ends the job (checked before every slice step).
|
|
125
|
+
* - A server source: the selected ids among the loaded rows first (O(cache)); when every one is there, those
|
|
126
|
+
* rows are taken like any others. Only under `all`, or when an id is not loaded, the display rows are read and those
|
|
127
|
+
* whose id is selected kept (`idSelected`, `selectable` included).
|
|
128
|
+
* - Any other source (selected by id): its selected rows listed now.
|
|
129
|
+
*/
|
|
130
|
+
export declare function takeRows(host: TableHost, columns: readonly TableColumn[]): Take | null;
|
|
131
|
+
/**
|
|
132
|
+
* The focused cell in `column`. A pinned cell copies alone: its section's row, nothing of the body read
|
|
133
|
+
* or flashed.
|
|
134
|
+
*/
|
|
135
|
+
export declare function takeCell(host: TableHost, column: TableColumn, cell: CellAddress): Take;
|
|
136
|
+
/** Display row `row` over `columns` (`rows: 'selection'`'s one row of a flat view); null out of range. */
|
|
137
|
+
export declare function takeRow(host: TableHost, columns: readonly TableColumn[], row: number): Take | null;
|
|
138
|
+
/**
|
|
139
|
+
* The whole view as shown (the copy's whole-view rule): display rows `[0, rowCount − 1]`,
|
|
140
|
+
* resolved against the row count when the walk is built. A server source reads every row in one `expandAll` pass — a
|
|
141
|
+
* grouped or tree view with the open groups' levels, a flat view its display rows in order. An export takes it
|
|
142
|
+
* for flat views only: it reads a flat server view window by window (`export/plan.ts`) and every row of
|
|
143
|
+
* a grouped or tree view whatever its expansion (`export/expanded.ts`, `readTree`). Nothing flashes: `copied` is empty.
|
|
144
|
+
*/
|
|
145
|
+
export declare function takeView(host: TableHost, columns: readonly TableColumn[]): Take;
|