@molecule/app-spreadsheet-grid-angular 0.0.0-stage → 0.0.1-stage
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/LICENSE +202 -0
- package/README.md +10 -2
- package/dist/index.d.ts +82 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +82 -0
- package/dist/index.js.map +1 -0
- package/dist/layout.d.ts +167 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +183 -0
- package/dist/layout.js.map +1 -0
- package/dist/spreadsheet-grid.component.d.ts +220 -0
- package/dist/spreadsheet-grid.component.d.ts.map +1 -0
- package/dist/spreadsheet-grid.component.js +675 -0
- package/dist/spreadsheet-grid.component.js.map +1 -0
- package/dist/types.d.ts +78 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/utilities.d.ts +74 -0
- package/dist/utilities.d.ts.map +1 -0
- package/dist/utilities.js +122 -0
- package/dist/utilities.js.map +1 -0
- package/package.json +75 -4
package/dist/layout.js
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geometry, ClassMap classes and inline-style strings for `<SpreadsheetGrid>`.
|
|
3
|
+
*
|
|
4
|
+
* The plan is framework-neutral: every framework's port computes the same one
|
|
5
|
+
* from the same props and state, so the rendered DOM (positions, classes,
|
|
6
|
+
* indices, text) cannot drift between frameworks.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { cellRef, columnLetter, computeVisibleRange, formatCellValue, isInSelection, } from './utilities.js';
|
|
11
|
+
/**
|
|
12
|
+
* A pixel length, as React writes one.
|
|
13
|
+
*
|
|
14
|
+
* @param value - A length in pixels.
|
|
15
|
+
* @returns The CSS length (`28px`).
|
|
16
|
+
*/
|
|
17
|
+
const px = (value) => `${value}px`;
|
|
18
|
+
/**
|
|
19
|
+
* Whether a cell is the selection anchor.
|
|
20
|
+
*
|
|
21
|
+
* @param selection - The selection.
|
|
22
|
+
* @param row - The cell's 0-indexed row.
|
|
23
|
+
* @param col - The cell's 0-indexed column.
|
|
24
|
+
* @returns `true` when the cell is the anchor.
|
|
25
|
+
*/
|
|
26
|
+
const isAnchor = (selection, row, col) => selection.r1 === row && selection.c1 === col;
|
|
27
|
+
/**
|
|
28
|
+
* Builds the cell box style of one region.
|
|
29
|
+
*
|
|
30
|
+
* @param geometry - The grid geometry.
|
|
31
|
+
* @param left - The cell's left offset in pixels.
|
|
32
|
+
* @param top - The cell's top offset in pixels.
|
|
33
|
+
* @returns The inline style.
|
|
34
|
+
*/
|
|
35
|
+
const cellBoxStyle = (geometry, left, top) => `position: absolute; left: ${px(left)}; top: ${px(top)}; width: ${px(geometry.cellWidth)}; height: ${px(geometry.cellHeight)}; box-sizing: border-box;`;
|
|
36
|
+
/**
|
|
37
|
+
* Describes one rendered cell.
|
|
38
|
+
*
|
|
39
|
+
* @param geometry - The grid geometry.
|
|
40
|
+
* @param cm - The ClassMap.
|
|
41
|
+
* @param row - The cell's 0-indexed row.
|
|
42
|
+
* @param col - The cell's 0-indexed column.
|
|
43
|
+
* @param left - Its left offset in pixels.
|
|
44
|
+
* @param top - Its top offset in pixels.
|
|
45
|
+
* @returns The cell.
|
|
46
|
+
*/
|
|
47
|
+
const cellAt = (geometry, cm, row, col, left, top) => {
|
|
48
|
+
const ref = cellRef(row, col);
|
|
49
|
+
const selected = isInSelection(geometry.selection, row, col);
|
|
50
|
+
const anchor = isAnchor(geometry.selection, row, col);
|
|
51
|
+
const value = geometry.cells.get(ref);
|
|
52
|
+
return {
|
|
53
|
+
row,
|
|
54
|
+
col,
|
|
55
|
+
ref,
|
|
56
|
+
value,
|
|
57
|
+
text: formatCellValue(value),
|
|
58
|
+
style: cellBoxStyle(geometry, left, top),
|
|
59
|
+
classes: cm.cn(cm.spreadsheetGridCellBorder, selected ? cm.spreadsheetGridCellSelected : cm.surface, anchor ? cm.spreadsheetGridCellAnchor : ''),
|
|
60
|
+
selected,
|
|
61
|
+
anchor,
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Computes one render's plan from the grid's geometry and state.
|
|
66
|
+
*
|
|
67
|
+
* @param geometry - The grid geometry.
|
|
68
|
+
* @param cm - The bonded ClassMap.
|
|
69
|
+
* @returns The layout plan.
|
|
70
|
+
*/
|
|
71
|
+
export function computeLayout(geometry, cm) {
|
|
72
|
+
const { cellHeight, cellWidth, columns, frozenCols, frozenRows, gutterWidth, headerHeight } = geometry;
|
|
73
|
+
const frozenRowsHeight = frozenRows * cellHeight;
|
|
74
|
+
const frozenColsWidth = frozenCols * cellWidth;
|
|
75
|
+
const scrollableWidth = Math.max(0, geometry.viewportWidth - gutterWidth - frozenColsWidth);
|
|
76
|
+
const scrollableHeight = Math.max(0, geometry.viewportHeight - headerHeight - frozenRowsHeight);
|
|
77
|
+
const [colStart, colEnd] = computeVisibleRange(geometry.scrollLeft, scrollableWidth, cellWidth, Math.max(0, columns - frozenCols));
|
|
78
|
+
const [rowStart, rowEnd] = computeVisibleRange(geometry.scrollTop, scrollableHeight, cellHeight, Math.max(0, geometry.rows - frozenRows));
|
|
79
|
+
const visibleCols = [];
|
|
80
|
+
for (let c = frozenCols + colStart; c <= frozenCols + colEnd; c += 1) {
|
|
81
|
+
if (c >= columns)
|
|
82
|
+
break;
|
|
83
|
+
visibleCols.push(c);
|
|
84
|
+
}
|
|
85
|
+
const visibleRows = [];
|
|
86
|
+
for (let r = frozenRows + rowStart; r <= frozenRows + rowEnd; r += 1) {
|
|
87
|
+
if (r >= geometry.rows)
|
|
88
|
+
break;
|
|
89
|
+
visibleRows.push(r);
|
|
90
|
+
}
|
|
91
|
+
const frozenColumns = Array.from({ length: Math.min(frozenCols, columns) }, (_v, i) => i);
|
|
92
|
+
const frozenRowIndices = Array.from({ length: Math.min(frozenRows, geometry.rows) }, (_v, i) => i);
|
|
93
|
+
const totalScrollWidth = Math.max(0, columns - frozenCols) * cellWidth;
|
|
94
|
+
const totalScrollHeight = Math.max(0, geometry.rows - frozenRows) * cellHeight;
|
|
95
|
+
const totalGridWidth = gutterWidth + columns * cellWidth;
|
|
96
|
+
const totalGridHeight = headerHeight + geometry.rows * cellHeight;
|
|
97
|
+
const headerCellClasses = cm.cn(cm.spreadsheetGridHeaderCell, cm.textCenter, cm.textSize('xs'), cm.fontWeight('semibold'));
|
|
98
|
+
const headerCellStyle = (left) => `position: absolute; left: ${px(left)}; top: ${px(0)}; width: ${px(cellWidth)}; height: ${px(headerHeight)}; line-height: ${px(headerHeight)};`;
|
|
99
|
+
const gutterCellStyle = (top, width, height) => `position: absolute; left: ${px(0)}; top: ${px(top)}; width: ${px(width)}; height: ${px(height)}; line-height: ${px(height)};`;
|
|
100
|
+
const frozenRowsCells = [];
|
|
101
|
+
const frozenColsCells = [];
|
|
102
|
+
const frozenCornerCells = [];
|
|
103
|
+
const mainCells = [];
|
|
104
|
+
if (frozenRows > 0)
|
|
105
|
+
for (const row of frozenRowIndices)
|
|
106
|
+
for (const col of visibleCols)
|
|
107
|
+
frozenRowsCells.push(cellAt(geometry, cm, row, col, (col - frozenCols) * cellWidth, row * cellHeight));
|
|
108
|
+
if (frozenCols > 0)
|
|
109
|
+
for (const col of frozenColumns)
|
|
110
|
+
for (const row of visibleRows)
|
|
111
|
+
frozenColsCells.push(cellAt(geometry, cm, row, col, col * cellWidth, (row - frozenRows) * cellHeight));
|
|
112
|
+
if (frozenRows > 0 && frozenCols > 0)
|
|
113
|
+
for (const row of frozenRowIndices)
|
|
114
|
+
for (const col of frozenColumns)
|
|
115
|
+
frozenCornerCells.push(cellAt(geometry, cm, row, col, col * cellWidth, row * cellHeight));
|
|
116
|
+
for (const row of visibleRows)
|
|
117
|
+
for (const col of visibleCols)
|
|
118
|
+
mainCells.push(cellAt(geometry, cm, row, col, (col - frozenCols) * cellWidth, (row - frozenRows) * cellHeight));
|
|
119
|
+
return {
|
|
120
|
+
rootClasses: cm.cn(cm.spreadsheetGridRoot, cm.spreadsheetGridRootBorder),
|
|
121
|
+
rootStyle: `width: ${px(geometry.viewportWidth)}; height: ${px(geometry.viewportHeight)}; position: relative; overflow: hidden; outline: none;`,
|
|
122
|
+
cornerClasses: cm.spreadsheetGridCorner,
|
|
123
|
+
cornerStyle: `position: absolute; left: ${px(0)}; top: ${px(0)}; width: ${px(gutterWidth)}; height: ${px(headerHeight)};`,
|
|
124
|
+
headerLaneClasses: cm.spreadsheetGridLane,
|
|
125
|
+
headerLaneStyle: `position: absolute; left: ${px(gutterWidth)}; top: ${px(0)}; width: ${px(geometry.viewportWidth - gutterWidth)}; height: ${px(headerHeight)}; overflow: hidden;`,
|
|
126
|
+
headerScrollerStyle: `position: absolute; left: ${px(frozenColsWidth - geometry.scrollLeft)}; top: ${px(0)}; width: ${px(totalScrollWidth)}; height: ${px(headerHeight)};`,
|
|
127
|
+
frozenHeaderCells: frozenColumns.map((col) => ({
|
|
128
|
+
key: `hdr-frozen-${col}`,
|
|
129
|
+
index: col,
|
|
130
|
+
text: columnLetter(col),
|
|
131
|
+
style: headerCellStyle(col * cellWidth),
|
|
132
|
+
classes: headerCellClasses,
|
|
133
|
+
})),
|
|
134
|
+
scrollingHeaderCells: visibleCols.map((col) => ({
|
|
135
|
+
key: `hdr-${col}`,
|
|
136
|
+
index: col,
|
|
137
|
+
text: columnLetter(col),
|
|
138
|
+
style: headerCellStyle((col - frozenCols) * cellWidth),
|
|
139
|
+
classes: headerCellClasses,
|
|
140
|
+
})),
|
|
141
|
+
gutterLaneClasses: cm.spreadsheetGridLane,
|
|
142
|
+
gutterLaneStyle: `position: absolute; left: ${px(0)}; top: ${px(headerHeight)}; width: ${px(gutterWidth)}; height: ${px(geometry.viewportHeight - headerHeight)}; overflow: hidden;`,
|
|
143
|
+
gutterScrollerStyle: `position: absolute; left: ${px(0)}; top: ${px(frozenRowsHeight - geometry.scrollTop)}; width: ${px(gutterWidth)}; height: ${px(totalScrollHeight)};`,
|
|
144
|
+
frozenGutterCells: frozenRowIndices.map((row) => ({
|
|
145
|
+
key: `gutter-frozen-${row}`,
|
|
146
|
+
index: row,
|
|
147
|
+
text: String(row + 1),
|
|
148
|
+
style: gutterCellStyle(row * cellHeight, gutterWidth, cellHeight),
|
|
149
|
+
classes: headerCellClasses,
|
|
150
|
+
})),
|
|
151
|
+
scrollingGutterCells: visibleRows.map((row) => ({
|
|
152
|
+
key: `gutter-${row}`,
|
|
153
|
+
index: row,
|
|
154
|
+
text: String(row + 1),
|
|
155
|
+
style: gutterCellStyle((row - frozenRows) * cellHeight, gutterWidth, cellHeight),
|
|
156
|
+
classes: headerCellClasses,
|
|
157
|
+
})),
|
|
158
|
+
showFrozenRows: frozenRows > 0,
|
|
159
|
+
showFrozenCols: frozenCols > 0,
|
|
160
|
+
showFrozenCorner: frozenRows > 0 && frozenCols > 0,
|
|
161
|
+
frozenRowsRegionStyle: `position: absolute; left: ${px(gutterWidth + frozenColsWidth)}; top: ${px(headerHeight)}; width: ${px(scrollableWidth)}; height: ${px(frozenRowsHeight)}; overflow: hidden;`,
|
|
162
|
+
frozenRowsInnerStyle: `position: absolute; left: ${px(-geometry.scrollLeft)}; top: ${px(0)}; width: ${px(totalScrollWidth)}; height: ${px(frozenRowsHeight)};`,
|
|
163
|
+
frozenColsRegionStyle: `position: absolute; left: ${px(gutterWidth)}; top: ${px(headerHeight + frozenRowsHeight)}; width: ${px(frozenColsWidth)}; height: ${px(scrollableHeight)}; overflow: hidden;`,
|
|
164
|
+
frozenColsInnerStyle: `position: absolute; left: ${px(0)}; top: ${px(-geometry.scrollTop)}; width: ${px(frozenColsWidth)}; height: ${px(totalScrollHeight)};`,
|
|
165
|
+
frozenCornerStyle: `position: absolute; left: ${px(gutterWidth)}; top: ${px(headerHeight)}; width: ${px(frozenColsWidth)}; height: ${px(frozenRowsHeight)}; overflow: hidden;`,
|
|
166
|
+
frozenRowsCells,
|
|
167
|
+
frozenColsCells,
|
|
168
|
+
frozenCornerCells,
|
|
169
|
+
mainCells,
|
|
170
|
+
byRef: new Map([...frozenRowsCells, ...frozenColsCells, ...frozenCornerCells, ...mainCells].map((cell) => [
|
|
171
|
+
cell.ref,
|
|
172
|
+
cell,
|
|
173
|
+
])),
|
|
174
|
+
scrollRegionStyle: `position: absolute; left: ${px(gutterWidth + frozenColsWidth)}; top: ${px(headerHeight + frozenRowsHeight)}; width: ${px(scrollableWidth)}; height: ${px(scrollableHeight)}; overflow: auto;`,
|
|
175
|
+
scrollSpacerStyle: `width: ${px(totalScrollWidth)}; height: ${px(totalScrollHeight)}; position: relative;`,
|
|
176
|
+
totalClasses: cm.cn(cm.displayBlock),
|
|
177
|
+
totalStyle: `position: absolute; left: ${px(-10000)}; top: ${px(-10000)};`,
|
|
178
|
+
totalText: `${totalGridWidth}×${totalGridHeight}`,
|
|
179
|
+
editorClasses: cm.cn(cm.w('full'), cm.h('full'), cm.spreadsheetGridCellEditor),
|
|
180
|
+
contentClasses: cm.cn(cm.w('full'), cm.h('full'), cm.spreadsheetGridCellContent, cm.textSize('sm')),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EACL,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,aAAa,GACd,MAAM,gBAAgB,CAAA;AA0JvB;;;;;GAKG;AACH,MAAM,EAAE,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,GAAG,KAAK,IAAI,CAAA;AAElD;;;;;;;GAOG;AACH,MAAM,QAAQ,GAAG,CAAC,SAA+B,EAAE,GAAW,EAAE,GAAW,EAAW,EAAE,CACtF,SAAS,CAAC,EAAE,KAAK,GAAG,IAAI,SAAS,CAAC,EAAE,KAAK,GAAG,CAAA;AAE9C;;;;;;;GAOG;AACH,MAAM,YAAY,GAAG,CA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|
+
import type { UIClassMap } from '@molecule/app-ui';
|
|
3
|
+
import { type GridCell, type GridLayout } from './layout.js';
|
|
4
|
+
import type { CellMap, CellValue, SpreadsheetSelection } from './types.js';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/** The open in-cell editor. */
|
|
7
|
+
interface Editing {
|
|
8
|
+
/** 0-indexed row of the edited cell. */
|
|
9
|
+
row: number;
|
|
10
|
+
/** 0-indexed column of the edited cell. */
|
|
11
|
+
col: number;
|
|
12
|
+
/** The draft text the editor shows. */
|
|
13
|
+
draft: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* SpreadsheetGrid component.
|
|
17
|
+
*
|
|
18
|
+
* High-performance virtualized spreadsheet cell grid: the host IS React's root
|
|
19
|
+
* `<div role="grid">` (`div[mol-spreadsheet-grid]`), so no wrapper element
|
|
20
|
+
* exists. Renders an `rows × columns` grid backed by a sparse
|
|
21
|
+
* `Map<cellRef, value>`, with frozen rows/columns, range selection (click +
|
|
22
|
+
* drag, Shift+click), copy/paste through the system clipboard as TSV, and
|
|
23
|
+
* in-cell editing (double-click → input; Enter commits, Escape cancels).
|
|
24
|
+
* Only the cells inside the visible viewport (plus a small overscan margin)
|
|
25
|
+
* are rendered.
|
|
26
|
+
*
|
|
27
|
+
* React's callbacks are inputs (they keep their React names and their argument
|
|
28
|
+
* lists); React's `renderCell` render prop is an `ng-template`.
|
|
29
|
+
*/
|
|
30
|
+
export declare class SpreadsheetGrid implements DoCheck {
|
|
31
|
+
/** Total number of rows in the grid. */
|
|
32
|
+
rows: number;
|
|
33
|
+
/** Total number of columns in the grid. */
|
|
34
|
+
columns: number;
|
|
35
|
+
/** Sparse cell-data map. Cells not present render as empty. */
|
|
36
|
+
cells: CellMap;
|
|
37
|
+
/** Called when the user commits an edit (React's `onCellChange`). */
|
|
38
|
+
onCellChange?: (ref: string, value: CellValue) => void;
|
|
39
|
+
/** Current selection. */
|
|
40
|
+
selection: SpreadsheetSelection;
|
|
41
|
+
/** Called when the user changes the selection (React's `onSelectionChange`). */
|
|
42
|
+
onSelectionChange?: (selection: SpreadsheetSelection) => void;
|
|
43
|
+
/** Number of rows frozen at the top (default `0` at read time). */
|
|
44
|
+
frozenRows?: number;
|
|
45
|
+
/** Number of columns frozen on the left (default `0` at read time). */
|
|
46
|
+
frozenCols?: number;
|
|
47
|
+
/** Per-cell width in pixels (default `96` at read time). */
|
|
48
|
+
cellWidth?: number;
|
|
49
|
+
/** Per-cell height in pixels (default `28` at read time). */
|
|
50
|
+
cellHeight?: number;
|
|
51
|
+
/** Width of the row-number gutter (default `48` at read time). */
|
|
52
|
+
gutterWidth?: number;
|
|
53
|
+
/** Height of the column-letter header (default `28` at read time). */
|
|
54
|
+
headerHeight?: number;
|
|
55
|
+
/** Visible viewport width in pixels (default `720` at read time). */
|
|
56
|
+
viewportWidth?: number;
|
|
57
|
+
/** Visible viewport height in pixels (default `360` at read time). */
|
|
58
|
+
viewportHeight?: number;
|
|
59
|
+
/** `data-mol-id` for AI-agent selectors. */
|
|
60
|
+
dataMolId?: string;
|
|
61
|
+
/** Optional cell renderer (`ng-template`): `$implicit`/`a0` value, `a1` ref. */
|
|
62
|
+
renderCell?: TemplateRef<unknown> | null;
|
|
63
|
+
/** The grid's horizontal scroll offset. */
|
|
64
|
+
protected readonly scrollLeft: import("@angular/core").WritableSignal<number>;
|
|
65
|
+
/** The grid's vertical scroll offset. */
|
|
66
|
+
protected readonly scrollTop: import("@angular/core").WritableSignal<number>;
|
|
67
|
+
/** The open in-cell editor. */
|
|
68
|
+
protected readonly editing: import("@angular/core").WritableSignal<Editing | null>;
|
|
69
|
+
/** The component host (the root `<div role="grid">`). */
|
|
70
|
+
private readonly host;
|
|
71
|
+
/** The injector `afterNextRender` needs outside a constructor. */
|
|
72
|
+
private readonly injector;
|
|
73
|
+
/**
|
|
74
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
75
|
+
* locale, so the view re-renders the labels on a locale switch.
|
|
76
|
+
*/
|
|
77
|
+
private readonly i18n;
|
|
78
|
+
/** Where the current drag started, while a mouse button is held. */
|
|
79
|
+
private dragAnchor;
|
|
80
|
+
/** The plan computed for the current change-detection pass. */
|
|
81
|
+
private currentPlan;
|
|
82
|
+
/**
|
|
83
|
+
* The layout plan for the current change-detection pass (recomputed in
|
|
84
|
+
* {@link ngDoCheck}, before the template and host bindings read it).
|
|
85
|
+
*
|
|
86
|
+
* @returns The layout plan.
|
|
87
|
+
*/
|
|
88
|
+
protected get plan(): GridLayout;
|
|
89
|
+
/**
|
|
90
|
+
* Recomputes the plan, then re-applies React's controlled-input value: the
|
|
91
|
+
* live value follows the draft after a re-render (the binding sets the
|
|
92
|
+
* attribute; only a user edit moves the property).
|
|
93
|
+
*/
|
|
94
|
+
ngDoCheck(): void;
|
|
95
|
+
/**
|
|
96
|
+
* The current class map.
|
|
97
|
+
*
|
|
98
|
+
* @returns The UIClassMap.
|
|
99
|
+
*/
|
|
100
|
+
cm(): UIClassMap;
|
|
101
|
+
/**
|
|
102
|
+
* The root's accessible label (React's `t('spreadsheetGrid.label', …)`).
|
|
103
|
+
*
|
|
104
|
+
* @returns The translated label.
|
|
105
|
+
*/
|
|
106
|
+
label(): string;
|
|
107
|
+
/**
|
|
108
|
+
* The editor field's accessible label (React's `t('spreadsheetGrid.cellEditor', { ref }, …)`).
|
|
109
|
+
*
|
|
110
|
+
* @param ref - The cell's A1 reference.
|
|
111
|
+
* @returns The translated label.
|
|
112
|
+
*/
|
|
113
|
+
cellEditorLabel(ref: string): string;
|
|
114
|
+
/**
|
|
115
|
+
* The editor state of one cell, when that cell is the one being edited.
|
|
116
|
+
*
|
|
117
|
+
* @param row - 0-indexed row.
|
|
118
|
+
* @param col - 0-indexed column.
|
|
119
|
+
* @returns The editor state, or null.
|
|
120
|
+
*/
|
|
121
|
+
editorAt(row: number, col: number): Editing | null;
|
|
122
|
+
/**
|
|
123
|
+
* The `renderCell` template, when the caller supplied one.
|
|
124
|
+
*
|
|
125
|
+
* @returns The template, or null.
|
|
126
|
+
*/
|
|
127
|
+
renderCellTemplate(): TemplateRef<unknown> | null;
|
|
128
|
+
/**
|
|
129
|
+
* The context a `renderCell` template receives (the value as `$implicit`/`a0`,
|
|
130
|
+
* the A1 reference as `a1`).
|
|
131
|
+
*
|
|
132
|
+
* @param cell - The cell.
|
|
133
|
+
* @returns The template context.
|
|
134
|
+
*/
|
|
135
|
+
cellContext(cell: GridCell): Record<string, unknown>;
|
|
136
|
+
/**
|
|
137
|
+
* The current geometry from the inputs and the grid's own state.
|
|
138
|
+
*
|
|
139
|
+
* @returns The geometry.
|
|
140
|
+
*/
|
|
141
|
+
private geometry;
|
|
142
|
+
/**
|
|
143
|
+
* Opens the in-cell editor on one cell, seeding the draft from its value.
|
|
144
|
+
*
|
|
145
|
+
* @param row - 0-indexed row.
|
|
146
|
+
* @param col - 0-indexed column.
|
|
147
|
+
*/
|
|
148
|
+
beginEdit(row: number, col: number): void;
|
|
149
|
+
/** Commits the open edit: empty clears the cell, number-like text becomes a number. */
|
|
150
|
+
commitEdit(): void;
|
|
151
|
+
/** Closes the editor without committing. */
|
|
152
|
+
cancelEdit(): void;
|
|
153
|
+
/**
|
|
154
|
+
* React's cell `onMouseDown`: commits an open edit, then starts or extends
|
|
155
|
+
* the selection.
|
|
156
|
+
*
|
|
157
|
+
* @param cell - The cell.
|
|
158
|
+
* @param event - The mouse event.
|
|
159
|
+
*/
|
|
160
|
+
onCellMouseDown(cell: GridCell, event: MouseEvent): void;
|
|
161
|
+
/**
|
|
162
|
+
* React's cell `onMouseEnter`: extends the selection while the primary
|
|
163
|
+
* button is held.
|
|
164
|
+
*
|
|
165
|
+
* @param cell - The cell.
|
|
166
|
+
* @param event - The mouse event.
|
|
167
|
+
*/
|
|
168
|
+
onCellMouseEnter(cell: GridCell, event: MouseEvent): void;
|
|
169
|
+
/** Clears the drag anchor on mouse up. */
|
|
170
|
+
onMouseUp(): void;
|
|
171
|
+
/**
|
|
172
|
+
* React's container `onKeyDown`: copy, and Edit on Enter / F2.
|
|
173
|
+
*
|
|
174
|
+
* @param event - The keyboard event.
|
|
175
|
+
*/
|
|
176
|
+
onKeydown(event: KeyboardEvent): void;
|
|
177
|
+
/**
|
|
178
|
+
* The editor field's key handling: Enter commits, Escape cancels. The grid's
|
|
179
|
+
* own key handler runs only while no editor is open (React reads the state
|
|
180
|
+
* the render before the event began, so a key that commits here never
|
|
181
|
+
* reaches it), so the event stays on the field.
|
|
182
|
+
*
|
|
183
|
+
* @param event - The keyboard event.
|
|
184
|
+
*/
|
|
185
|
+
onEditorKeydown(event: KeyboardEvent): void;
|
|
186
|
+
/**
|
|
187
|
+
* React's editor `onChange`: each typed value becomes the draft.
|
|
188
|
+
*
|
|
189
|
+
* @param event - The native input event.
|
|
190
|
+
*/
|
|
191
|
+
onDraftInput(event: Event): void;
|
|
192
|
+
/**
|
|
193
|
+
* React's container `onPaste`: intercepts the native paste event.
|
|
194
|
+
*
|
|
195
|
+
* @param event - The clipboard event.
|
|
196
|
+
*/
|
|
197
|
+
onPaste(event: ClipboardEvent): void;
|
|
198
|
+
/**
|
|
199
|
+
* The scroller's `scroll` handler: refreshes the rendered window.
|
|
200
|
+
*
|
|
201
|
+
* @param event - The scroll event.
|
|
202
|
+
*/
|
|
203
|
+
onScroll(event: Event): void;
|
|
204
|
+
/**
|
|
205
|
+
* Serializes the selection to TSV and copies it through the clipboard bond.
|
|
206
|
+
*
|
|
207
|
+
* @returns The TSV text.
|
|
208
|
+
*/
|
|
209
|
+
handleCopy(): Promise<string>;
|
|
210
|
+
/**
|
|
211
|
+
* Writes pasted TSV into cells starting at the selection anchor.
|
|
212
|
+
*
|
|
213
|
+
* @param text - Clipboard text (typically TSV).
|
|
214
|
+
*/
|
|
215
|
+
handlePaste(text: string): void;
|
|
216
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpreadsheetGrid, never>;
|
|
217
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpreadsheetGrid, "div[mol-spreadsheet-grid]", never, { "rows": { "alias": "rows"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "cells": { "alias": "cells"; "required": false; }; "onCellChange": { "alias": "onCellChange"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "onSelectionChange": { "alias": "onSelectionChange"; "required": false; }; "frozenRows": { "alias": "frozenRows"; "required": false; }; "frozenCols": { "alias": "frozenCols"; "required": false; }; "cellWidth": { "alias": "cellWidth"; "required": false; }; "cellHeight": { "alias": "cellHeight"; "required": false; }; "gutterWidth": { "alias": "gutterWidth"; "required": false; }; "headerHeight": { "alias": "headerHeight"; "required": false; }; "viewportWidth": { "alias": "viewportWidth"; "required": false; }; "viewportHeight": { "alias": "viewportHeight"; "required": false; }; "dataMolId": { "alias": "dataMolId"; "required": false; }; "renderCell": { "alias": "renderCell"; "required": false; }; }, {}, never, never, true, never>;
|
|
218
|
+
}
|
|
219
|
+
export {};
|
|
220
|
+
//# sourceMappingURL=spreadsheet-grid.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spreadsheet-grid.component.d.ts","sourceRoot":"","sources":["../src/spreadsheet-grid.component.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,OAAO,EAKZ,KAAK,WAAW,EACjB,MAAM,eAAe,CAAA;AAItB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGlD,OAAO,EAAiB,KAAK,QAAQ,EAAqB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAA;AAC9F,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;;AAS1E,+BAA+B;AAC/B,UAAU,OAAO;IACf,wCAAwC;IACxC,GAAG,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAA;CACd;AAgBD;;;;;;;;;;;;;;GAcG;AACH,qBAsCa,eAAgB,Y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