@omegagrid/grid 0.11.4 → 0.11.6
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/ui/grid.d.ts +2 -0
- package/dist/ui/grid.d.ts.map +1 -1
- package/dist/ui/grid.events.d.ts +8 -0
- package/dist/ui/grid.events.d.ts.map +1 -1
- package/dist/ui/grid.events.js +38 -10
- package/dist/ui/grid.events.js.map +1 -1
- package/dist/ui/grid.js +5 -0
- package/dist/ui/grid.js.map +1 -1
- package/dist/ui/grid.rendering.d.ts +39 -0
- package/dist/ui/grid.rendering.d.ts.map +1 -1
- package/dist/ui/grid.rendering.js +117 -24
- package/dist/ui/grid.rendering.js.map +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/table.d.ts +6 -0
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +8 -2
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/table.styles.d.ts +4 -0
- package/dist/ui/table.styles.d.ts.map +1 -1
- package/dist/ui/table.styles.js +6 -2
- package/dist/ui/table.styles.js.map +1 -1
- package/dist/ui/userColumnWidths.d.ts +21 -0
- package/dist/ui/userColumnWidths.d.ts.map +1 -0
- package/dist/ui/userColumnWidths.js +35 -0
- package/dist/ui/userColumnWidths.js.map +1 -0
- package/package.json +7 -7
|
@@ -8,6 +8,23 @@ export type RefreshOptions = {
|
|
|
8
8
|
horizontal?: boolean;
|
|
9
9
|
rerenderTable?: boolean;
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* The width the table gives a cell for its content when its row is autofitted: the column width, for a merged
|
|
13
|
+
* cell the width of the shown columns it spans. Null for a cell that must not size the row: one in a column
|
|
14
|
+
* that is not shown (hidden or in a collapsed group), one covered by a merge, or a merge that spans other rows as well.
|
|
15
|
+
* @param visibleColumns the columns the table shows (`model.visibleColumns`)
|
|
16
|
+
*/
|
|
17
|
+
export declare function autofitCellWidth(cell: CellModel, visibleColumns: ReadonlySet<ColumnModel>): number | null;
|
|
18
|
+
/**
|
|
19
|
+
* The columns (or rows) a double click on the divider of `node` autofits. Like in Excel: all the selected ones
|
|
20
|
+
* when the selection covers whole columns (rows) and `node` is among them, otherwise `node` alone.
|
|
21
|
+
* @param visibleNodes the columns (rows) the table shows (`model.visibleColumns` / `model.visibleRows`)
|
|
22
|
+
* @param whole whether the selection covers whole columns (rows)
|
|
23
|
+
* @param from the selected index span, in either order (a selection dragged backwards is not normalized)
|
|
24
|
+
*/
|
|
25
|
+
export declare function autofitTargets<T extends {
|
|
26
|
+
index: number;
|
|
27
|
+
}>(node: T, visibleNodes: readonly T[], whole: boolean, from: number, to: number): T[];
|
|
11
28
|
export declare class GridRendering {
|
|
12
29
|
readonly grid: Grid;
|
|
13
30
|
requireVerticalUpdate: boolean;
|
|
@@ -99,10 +116,32 @@ export declare class GridRendering {
|
|
|
99
116
|
height: number;
|
|
100
117
|
};
|
|
101
118
|
private autofitDiv;
|
|
119
|
+
/**
|
|
120
|
+
* The detached div the autofit renders cells into, reset and given the chrome of a body cell
|
|
121
|
+
* (`td>div` in table.styles, font size and line height of the table style) so that it measures
|
|
122
|
+
* what the table shows. The renderers leave inline styles and classes behind, hence the reset per cell.
|
|
123
|
+
* @param width the width the table gives the cell, `'auto'` to measure the content width
|
|
124
|
+
*/
|
|
125
|
+
private prepareAutofitDiv;
|
|
126
|
+
private renderToAutofitDiv;
|
|
127
|
+
/** Width of the content rendered into the autofit div: the client width less the padding, so the border rendering (1.5px snaps to device pixels) does not get in. */
|
|
128
|
+
private autofitContentWidth;
|
|
129
|
+
/** Drops the last measured cell from the autofit div: its elements (buttons, expanders) would keep the cell and its model alive. */
|
|
130
|
+
private releaseAutofitDiv;
|
|
102
131
|
autofitColumn(c: number | ColumnModel, visibleValuesOnly?: boolean, rerender?: boolean): void;
|
|
103
132
|
autofitColumns(visibleValuesOnly?: boolean): void;
|
|
104
133
|
autofitRow(r: number | RowModel, visibleValuesOnly?: boolean, rerender?: boolean): void;
|
|
105
134
|
autofitRows(visibleValuesOnly?: boolean): void;
|
|
135
|
+
/**
|
|
136
|
+
* Autofits `column` or, when the selection covers whole columns including it, all the selected columns (see autofitTargets).
|
|
137
|
+
* @returns the autofitted columns
|
|
138
|
+
*/
|
|
139
|
+
autofitColumnWithSelection(column: ColumnModel): ColumnModel[];
|
|
140
|
+
/**
|
|
141
|
+
* Autofits `row` or, when the selection covers whole rows including it, all the selected rows (see autofitTargets).
|
|
142
|
+
* @returns the autofitted rows
|
|
143
|
+
*/
|
|
144
|
+
autofitRowWithSelection(row: RowModel): RowModel[];
|
|
106
145
|
scrollTo(r: number | RangeAddress, c?: number): void;
|
|
107
146
|
}
|
|
108
147
|
//# sourceMappingURL=grid.rendering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.rendering.d.ts","sourceRoot":"","sources":["../../src/ui/grid.rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,iBAAiB,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAA8B,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7H,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAY,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"grid.rendering.d.ts","sourceRoot":"","sources":["../../src/ui/grid.rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,iBAAiB,CAAC;AAEzE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAA8B,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC7H,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KA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;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IAExB,cAAc;IAMd,eAAe;IAcf,UAAU,CAAC,cAAc,EAAE;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAC;IA6B3C,IAAI,CAAC,cAAc,CAAC,EAAE,cAAc;IAuBpC,YAAY,CAAC,WAAW,GAAE,MAAa,EAAE,SAAS,UAAQ;IAiBhE,IAAI,SAAS;;;MAGV;IAEH,OAAO,CAAC,UAAU,CAAiB;IAEnC;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,kBAAkB;IAK1B,qKAAqK;IACrK,OAAO,CAAC,mBAAmB;IAI3B,oIAAoI;IACpI,OAAO,CAAC,iBAAiB;IAIzB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAC,WAAW,EAAE,iBAAiB,UAAQ,EAAE,QAAQ,UAAO;IAyB/E,cAAc,CAAC,iBAAiB,UAAQ;IAKxC,UAAU,CAAC,CAAC,EAAE,MAAM,GAAC,QAAQ,EAAE,iBAAiB,UAAQ,EAAE,QAAQ,UAAO;IAiBzE,WAAW,CAAC,iBAAiB,UAAQ;IAKrC;;;OAGG;IACH,0BAA0B,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,EAAE;IAQ9D;;;OAGG;IACH,uBAAuB,CAAC,GAAG,EAAE,QAAQ,GAAG,QAAQ,EAAE;IAQlD,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAC,YAAY,EAAE,CAAC,SAAI;CAatC"}
|
|
@@ -4,7 +4,48 @@ import { CellRange, gridConstants as constants } from "@omegagrid/grid-core";
|
|
|
4
4
|
import { Table } from "./table";
|
|
5
5
|
import { GridEvent } from "./grid.events";
|
|
6
6
|
import { getCellRenderer } from "../renderers";
|
|
7
|
+
import { CELL_BORDER_WIDTH, CELL_PADDING } from "./table.styles";
|
|
7
8
|
import { createThemeVariablesCss } from "@omegagrid/core";
|
|
9
|
+
/** Room the column autofit leaves around the content, the cell chrome included. */
|
|
10
|
+
const AUTOFIT_COLUMN_SPACE = 22;
|
|
11
|
+
/**
|
|
12
|
+
* The width the table gives a cell for its content when its row is autofitted: the column width, for a merged
|
|
13
|
+
* cell the width of the shown columns it spans. Null for a cell that must not size the row: one in a column
|
|
14
|
+
* that is not shown (hidden or in a collapsed group), one covered by a merge, or a merge that spans other rows as well.
|
|
15
|
+
* @param visibleColumns the columns the table shows (`model.visibleColumns`)
|
|
16
|
+
*/
|
|
17
|
+
export function autofitCellWidth(cell, visibleColumns) {
|
|
18
|
+
if (!visibleColumns.has(cell.column))
|
|
19
|
+
return null;
|
|
20
|
+
const merges = cell.model.merges;
|
|
21
|
+
if (merges.hiddenCells.has(cell.address))
|
|
22
|
+
return null;
|
|
23
|
+
const merge = merges.mergedCells.get(cell.address);
|
|
24
|
+
if (!merge)
|
|
25
|
+
return cell.column.width;
|
|
26
|
+
if (merge.rs > 1)
|
|
27
|
+
return null;
|
|
28
|
+
let width = 0;
|
|
29
|
+
for (let c = merge.c; c < merge.c + merge.cs; c++) {
|
|
30
|
+
const column = cell.model.columns[c];
|
|
31
|
+
if (column && visibleColumns.has(column))
|
|
32
|
+
width += column.width;
|
|
33
|
+
}
|
|
34
|
+
return width;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The columns (or rows) a double click on the divider of `node` autofits. Like in Excel: all the selected ones
|
|
38
|
+
* when the selection covers whole columns (rows) and `node` is among them, otherwise `node` alone.
|
|
39
|
+
* @param visibleNodes the columns (rows) the table shows (`model.visibleColumns` / `model.visibleRows`)
|
|
40
|
+
* @param whole whether the selection covers whole columns (rows)
|
|
41
|
+
* @param from the selected index span, in either order (a selection dragged backwards is not normalized)
|
|
42
|
+
*/
|
|
43
|
+
export function autofitTargets(node, visibleNodes, whole, from, to) {
|
|
44
|
+
const [first, last] = [Math.min(from, to), Math.max(from, to)];
|
|
45
|
+
if (!whole || node.index < first || node.index > last)
|
|
46
|
+
return [node];
|
|
47
|
+
return visibleNodes.filter(n => n.index >= first && n.index <= last);
|
|
48
|
+
}
|
|
8
49
|
export class GridRendering {
|
|
9
50
|
get vScrolling() { return this._vScrolling; }
|
|
10
51
|
get hScrolling() { return this._hScrolling; }
|
|
@@ -532,20 +573,51 @@ export class GridRendering {
|
|
|
532
573
|
height: this.table.thead.offsetHeight + this.model.visibleRows.reduce((acc, row) => acc + row.height, 0)
|
|
533
574
|
};
|
|
534
575
|
}
|
|
576
|
+
/**
|
|
577
|
+
* The detached div the autofit renders cells into, reset and given the chrome of a body cell
|
|
578
|
+
* (`td>div` in table.styles, font size and line height of the table style) so that it measures
|
|
579
|
+
* what the table shows. The renderers leave inline styles and classes behind, hence the reset per cell.
|
|
580
|
+
* @param width the width the table gives the cell, `'auto'` to measure the content width
|
|
581
|
+
*/
|
|
582
|
+
prepareAutofitDiv(width) {
|
|
583
|
+
const div = this.autofitDiv ?? (this.autofitDiv = dom.createElement('div'));
|
|
584
|
+
dom.empty(div);
|
|
585
|
+
div.className = '';
|
|
586
|
+
div.removeAttribute('style');
|
|
587
|
+
dom.setPosition(div, { l: -10000, t: -10000 });
|
|
588
|
+
div.style.visibility = 'hidden';
|
|
589
|
+
div.style.boxSizing = 'border-box';
|
|
590
|
+
div.style.border = `${CELL_BORDER_WIDTH}px solid transparent`;
|
|
591
|
+
div.style.padding = `0 ${CELL_PADDING}px`;
|
|
592
|
+
div.style.fontSize = dom.numToPixels(this.table.cellFontSize);
|
|
593
|
+
div.style.lineHeight = dom.numToPixels(this.table.rowLineHeight);
|
|
594
|
+
div.style.whiteSpace = 'nowrap';
|
|
595
|
+
div.style.width = width === 'auto' ? 'auto' : dom.numToPixels(width);
|
|
596
|
+
if (!div.isConnected)
|
|
597
|
+
this.grid.shadowRoot.appendChild(div);
|
|
598
|
+
return div;
|
|
599
|
+
}
|
|
600
|
+
renderToAutofitDiv(cell, width) {
|
|
601
|
+
const div = this.prepareAutofitDiv(width);
|
|
602
|
+
return getCellRenderer(cell).call(this.table, div, cell) || div;
|
|
603
|
+
}
|
|
604
|
+
/** Width of the content rendered into the autofit div: the client width less the padding, so the border rendering (1.5px snaps to device pixels) does not get in. */
|
|
605
|
+
autofitContentWidth(div) {
|
|
606
|
+
return div.clientWidth - 2 * CELL_PADDING;
|
|
607
|
+
}
|
|
608
|
+
/** Drops the last measured cell from the autofit div: its elements (buttons, expanders) would keep the cell and its model alive. */
|
|
609
|
+
releaseAutofitDiv() {
|
|
610
|
+
if (this.autofitDiv)
|
|
611
|
+
dom.empty(this.autofitDiv);
|
|
612
|
+
}
|
|
535
613
|
autofitColumn(c, visibleValuesOnly = false, rerender = true) {
|
|
536
614
|
const column = typeof c === 'number' ? this.model.columns[c] : c;
|
|
537
|
-
const div = this.autofitDiv ?? (this.autofitDiv = dom.createElement('div'));
|
|
538
|
-
div.style.position = 'absolute';
|
|
539
|
-
div.style.zIndex = '100000';
|
|
540
|
-
dom.setPosition(div, { l: -1000, t: -1000 });
|
|
541
|
-
this.grid.shadowRoot.appendChild(div);
|
|
542
615
|
let maxWidth = 0;
|
|
543
616
|
for (const cell of this.model.getRangeIterator(CellRange.fromA1(column.address), !!visibleValuesOnly)) {
|
|
544
|
-
|
|
545
|
-
cellDiv.style.width = 'auto';
|
|
546
|
-
maxWidth = Math.max(maxWidth, cellDiv.offsetWidth);
|
|
617
|
+
maxWidth = Math.max(maxWidth, this.autofitContentWidth(this.renderToAutofitDiv(cell, 'auto')));
|
|
547
618
|
}
|
|
548
619
|
if (column.header) {
|
|
620
|
+
const div = this.prepareAutofitDiv('auto');
|
|
549
621
|
for (const h of column.header) {
|
|
550
622
|
if (!h)
|
|
551
623
|
continue;
|
|
@@ -553,11 +625,11 @@ export class GridRendering {
|
|
|
553
625
|
div.innerHTML = h.label ?? '';
|
|
554
626
|
else
|
|
555
627
|
div.innerText = h.label ?? '';
|
|
556
|
-
maxWidth = Math.max(maxWidth, div
|
|
628
|
+
maxWidth = Math.max(maxWidth, this.autofitContentWidth(div));
|
|
557
629
|
}
|
|
558
|
-
div.innerHTML = '';
|
|
559
630
|
}
|
|
560
|
-
|
|
631
|
+
this.releaseAutofitDiv();
|
|
632
|
+
column.width = maxWidth + AUTOFIT_COLUMN_SPACE;
|
|
561
633
|
// limit max column width to 90% of the table body
|
|
562
634
|
maxWidth = (this.grid.offsetWidth - (this.table?.totalHeaderWidth ?? 0)) * 0.9;
|
|
563
635
|
if (maxWidth > 0 && column.width > maxWidth)
|
|
@@ -571,20 +643,19 @@ export class GridRendering {
|
|
|
571
643
|
}
|
|
572
644
|
autofitRow(r, visibleValuesOnly = false, rerender = true) {
|
|
573
645
|
const row = typeof r === 'number' ? this.model.rows[r] : r;
|
|
574
|
-
const
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
// div.style.backgroundColor = 'red';
|
|
578
|
-
// dom.setPosition(div, {l: 100, t: 100});
|
|
579
|
-
dom.setPosition(div, { l: -1000, t: -1000 });
|
|
580
|
-
this.grid.shadowRoot.appendChild(div);
|
|
581
|
-
let maxHeight = 0;
|
|
646
|
+
const table = this.table;
|
|
647
|
+
const visibleColumns = new Set(this.model.visibleColumns);
|
|
648
|
+
let maxHeight = table.rowLineHeight; // an empty row keeps one line
|
|
582
649
|
for (const cell of this.model.getRangeIterator(CellRange.fromA1(row.address), !!visibleValuesOnly)) {
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
650
|
+
const width = autofitCellWidth(cell, visibleColumns);
|
|
651
|
+
if (width == null)
|
|
652
|
+
continue;
|
|
653
|
+
// the cell wraps within the width the table gives it; clientHeight is the content without the border
|
|
654
|
+
maxHeight = Math.max(maxHeight, this.renderToAutofitDiv(cell, width).clientHeight);
|
|
655
|
+
}
|
|
656
|
+
this.releaseAutofitDiv();
|
|
657
|
+
// the default row is one line plus a pixel - keep the same around the measured lines
|
|
658
|
+
row.height = maxHeight + table.defaultRowHeight - table.rowLineHeight;
|
|
588
659
|
if (rerender)
|
|
589
660
|
this.table.renderCells({ vertical: true });
|
|
590
661
|
}
|
|
@@ -592,6 +663,28 @@ export class GridRendering {
|
|
|
592
663
|
this.model.rows.forEach(row => this.autofitRow(row, visibleValuesOnly, false));
|
|
593
664
|
this.table.renderCells({ vertical: true });
|
|
594
665
|
}
|
|
666
|
+
/**
|
|
667
|
+
* Autofits `column` or, when the selection covers whole columns including it, all the selected columns (see autofitTargets).
|
|
668
|
+
* @returns the autofitted columns
|
|
669
|
+
*/
|
|
670
|
+
autofitColumnWithSelection(column) {
|
|
671
|
+
const range = this.grid.selection.range;
|
|
672
|
+
const columns = autofitTargets(column, this.model.visibleColumns, range.isColumn, range.c1, range.c2);
|
|
673
|
+
columns.forEach(col => this.autofitColumn(col, false, false));
|
|
674
|
+
this.table.renderCells({ horizontal: true });
|
|
675
|
+
return columns;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Autofits `row` or, when the selection covers whole rows including it, all the selected rows (see autofitTargets).
|
|
679
|
+
* @returns the autofitted rows
|
|
680
|
+
*/
|
|
681
|
+
autofitRowWithSelection(row) {
|
|
682
|
+
const range = this.grid.selection.range;
|
|
683
|
+
const rows = autofitTargets(row, this.model.visibleRows, range.isRow, range.r1, range.r2);
|
|
684
|
+
rows.forEach(r => this.autofitRow(r, false, false));
|
|
685
|
+
this.table.renderCells({ vertical: true });
|
|
686
|
+
return rows;
|
|
687
|
+
}
|
|
595
688
|
scrollTo(r, c = 0) {
|
|
596
689
|
let range;
|
|
597
690
|
if (utils.isString(r))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.rendering.js","sourceRoot":"","sources":["../../src/ui/grid.rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAoC,SAAS,EAAE,aAAa,IAAI,SAAS,EAAgB,M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ce\";\nimport { CellModel, ColumnModel, RowModel, CellRange, gridConstants as constants, RangeAddress } from \"@omegagrid/grid-core\";\nimport { Grid } from \"./grid\";\nimport { Table, TableRenderOptions, TableRow } from \"./table\";\nimport { GridEvent } from \"./grid.events\";\nimport { getCellRenderer } from \"../renderers\";\nimport { RequestFilters } from \"../gridAdapter\";\nimport { createThemeVariablesCss } from \"@omegagrid/core\";\n\nexport type RefreshOptions = {\n\tvertical?: boolean,\n\thorizontal?: boolean\n\trerenderTable?: boolean\n};\n\nexport class GridRendering {\n\n\trequireVerticalUpdate = true;\n\trequireHorizontalUpdate = false;\n\t/** touch position whose movement has not been turned into scrolling yet (GridEvents._onTouchMove) */\n\ttouchAnchor: {x: number, y: number};\n\tresizing = false;\n\tcurrentResizedColumn: ColumnModel;\n\tcurrentResizedColumnWidth: number;\n\tcurrentResizedRow: RowModel;\n\tcurrentResizedRowHeight: number;\n\n\tprivate _vScrolling = true;\n\tget vScrolling() { return this._vScrolling }\n\tprivate _hScrolling = true;\n\tget hScrolling() { return this._hScrolling }\n\n\tget model() { return this.grid.model }\n\tget selection() { return this.grid.selection }\n\tget table() { return this.grid.table }\n\n\tconstructor(readonly grid: Grid) { }\n\n\treadonly debounceRenderCells = debounce(this.renderCells, 50, {isImmediate: false, maxWait: 100});\n\treadonly debounceCalculateViewport = debounce(this.calculateViewport, 200);\n\n\tisLastRowInViewport() {\n\t\tconst viewportRows = this.grid.table.viewport.rows;\n\t\tconst visibleRows = this.model.visibleRows;\n\t\treturn viewportRows[viewportRows.length - 1] == visibleRows[visibleRows.length - 1];\n\t}\n\n\trenderCells(update?: TableRenderOptions) {\n\t\tupdate = update || {vertical: this.requireVerticalUpdate, horizontal: this.requireHorizontalUpdate};\n\t\tthis.grid.comment.deatach();\n\t\tthis.grid.table.renderCells(update);\n\t\tthis.requireHorizontalUpdate = false;\n\t\tthis.requireVerticalUpdate = false;\n\t\tthis.debounceCalculateViewport();\n\t\tthis.grid.objects.updatePostions();\n\t}\n\n\trenderAll(rerenderTable = false) {\n\t\tif (this.grid.group) this.grid.group.grids.forEach((g: Grid) => g.rendering.render(rerenderTable));\n\t\telse this.render(rerenderTable);\n\t}\n\n\tasync render(rerenderTable = false) {\n\t\tif (!this.grid.table || !this.model) return;\n\t\tthis.grid.table.clearHeaderCache();\n\t\tthis.grid.table.clearBodyCache();\n\t\tif (this.grid.table.isConnected) {\n\t\t\tif (rerenderTable) {\n\t\t\t\tthis.grid.table.requestUpdate();\n\t\t\t\tawait this.grid.table.updateComplete;\n\t\t\t}\n\t\t\tthis.grid.table.renderCells({horizontal: true, vertical: true});\n\t\t\tthis.calculateViewport();\n\t\t}\n\t}\n\n\tupdateRange(range: CellRange, recalculate = false) {\n\t\tfor (const cell of this.model.getRangeIterator(range)) {\n\t\t\tthis.updateCells([cell], recalculate);\n\t\t}\n\t}\n\n\tupdateCell(cell: CellModel, recalculate = false) {\n\t\tthis.updateCells([cell], recalculate);\n\t}\n\n\tupdateSpilledCells(cell: CellModel) {\n\t\tlet spillCells: Set<CellModel>;\n\t\tif (cell.prevSpillRange) {\n\t\t\tspillCells = new Set();\n\t\t\tthis.model.getRangeIterator(cell.prevSpillRange).forEach(cell => spillCells.add(cell));\n\t\t}\n\t\tif (cell.spillRange) {\n\t\t\tspillCells = spillCells || new Set();\n\t\t\tthis.model.getRangeIterator(cell.spillRange).forEach(cell => spillCells.add(cell));\n\t\t}\n\t\tif (spillCells?.size > 0) this.updateCells(spillCells);\n\t}\n\n\tupdateCells(cells: Iterable<CellModel>, recalculate = false) {\n\t\tif (recalculate) {\n\t\t\tfor (const cell of cells) {\n\t\t\t\tcell.invalidateStyle();\n\t\t\t\tcell.invalidateValue();\n\t\t\t\tthis.model.calculations.clearDependecies(cell).evaluate(cell);\n\t\t\t\tthis.updateSpilledCells(cell);\n\t\t\t}\n\t\t}\n\n\t\tconst table = this.grid.table;\n\t\tfor (const cell of cells) table.renderBodyCell(cell);\n\n\t\tif (recalculate) {\n\t\t\tthis.model.calculations.invalidateDependants(cells).forEach((sheet, cell) => {\n\t\t\t\tif (sheet) this.grid.group.getGrid(sheet)?.table.renderBodyCell(cell);\n\t\t\t\telse table.renderBodyCell(cell);\n\t\t\t\tthis.updateSpilledCells(cell);\n\t\t\t});\n\t\t\tthis.grid.dispatchGridEvent('calculate', { cells: Array.from(cells) });\n\t\t}\n\t}\n\n\tupdateHeaders() {\n\t\tthis.model.indexVisibleColumns();\n\t\tthis.table.clearHeaderCache();\n\t\tthis.table.createHeaderRows();\n\t\tthis.table.renderHeader();\n\t}\n\n\tcalculateViewport(recalculate = false) {\n\t\tthis.grid.logger.info('calculate viwport');\n\t\tthis.updateCells(this.model.calculateViewport(), recalculate);\n\t}\n\n\tupdateSliders() {\n\t\tconst ws = this.table.viewportSize;\n\t\tthis.grid.vSlider.maxValue = this.model.visibleRows.length;\n\t\tthis.grid.vSlider.pageSize = ws.h / this.model.options.rowHeight;\n\t\tthis.grid.vSlider.value = this.table.rowOffset;\n\t\tthis.grid.hSlider.maxValue = this.model.visibleColumns.length;\n\t\tthis.grid.hSlider.pageSize = ws.w / this.model.options.columnWidth;\n\t\tthis.grid.hSlider.value = this.table.colOffset;\n\t}\n\n\tisVerticalScrollingEnabled() {\n\t\treturn this.grid.options.scrolling.verticalOverscroll !== false\n\t\t\t|| this.table.viewport.rows.length < this.model.visibleRows.length;\n\t}\n\n\tisHorizontalScrollingEnabled() {\n\t\treturn this.grid.options.scrolling.horizontalOverscroll !== false\n\t\t\t|| this.table.viewport.columns.length < this.model.visibleColumns.length;\n\t}\n\n\tupdateSliderVisibility() {\n\t\tthis._vScrolling = this.isVerticalScrollingEnabled();\n\t\tif (this._vScrolling) {\n\t\t\tthis.grid.vSlider.show();\n\t\t\tdom.showElement(this.grid.vSlider);\n\t\t} else {\n\t\t\tthis.grid.vSlider.hide();\n\t\t\tdom.hideElement(this.grid.vSlider);\n\t\t}\n\n\t\tthis._hScrolling = this.isHorizontalScrollingEnabled();\n\t\tif (this._hScrolling) {\n\t\t\tthis.grid.hSlider.show();\n\t\t\tdom.showElement(this.grid.hSlider);\n\t\t} else {\n\t\t\tthis.grid.hSlider.hide();\n\t\t\tdom.hideElement(this.grid.hSlider);\n\t\t}\n\t}\n\n\thideSliders() {\n\t\tthis.grid.vSlider.hide();\n\t\tthis.grid.hSlider.hide();\n\t}\n\n\tscrollVerticalByPixels(pixels: number) {\n\t\tif (!this.vScrolling) return;\n\n\t\tlet topRow = this.table.rowOffset;\n\t\tlet top = 0, r = 0;\n\t\tlet row: RowModel;\n\n\t\tif (pixels > 0) {\n\t\t\twhile (top < pixels && topRow + r < this.model.visibleRows.length) {\n\t\t\t\ttop += this.model.visibleRows[topRow + (r++)].height + 2;\n\t\t\t}\n\t\t\ttopRow = topRow + r;\n\t\t} else if (pixels < 0) {\n\t\t\tpixels = Math.abs(pixels);\n\t\t\twhile (top < pixels && topRow + r >= 0) {\n\t\t\t\trow = this.model.visibleRows[Math.min(this.model.visibleRows.length - 1, topRow + (r--))];\n\t\t\t\ttop += (row ? row.height : 0) + 2;\n\t\t\t}\n\t\t\ttopRow = topRow + r;\n\t\t}\n\n\t\tif (topRow >= this.model.visibleRows.length) topRow = this.model.visibleRows.length - 1;\n\n\t\tthis.requireVerticalUpdate = true;\n\t\tthis.table.rowOffset = Math.max(0, topRow);\n\t\tthis.debounceRenderCells();\n\t\tthis.updateSliders();\n\t}\n\n\tscrollHorizontalByPixels(pixels: number) {\n\t\tif (!this.hScrolling) return;\n\n\t\tlet leftCol = this.table.colOffset;\n\t\tlet left = 0, c = 0;\n\t\tif (pixels > 0) {\n\t\t\twhile (left < pixels && leftCol + c < this.model.visibleColumns.length) {\n\t\t\t\tleft += this.model.visibleColumns[leftCol + (c++)].width + 2;\n\t\t\t}\n\t\t\tleftCol = leftCol + c;\n\t\t} else if (pixels < 0) {\n\t\t\tpixels = Math.abs(pixels);\n\t\t\twhile (left < pixels && leftCol + c >= 0) {\n\t\t\t\tleft += this.model.visibleColumns[Math.min(this.model.visibleColumns.length - 1, leftCol + (c--))].width + 2;\n\t\t\t}\n\t\t\tleftCol = leftCol + c;\n\t\t}\n\n\t\tif (leftCol >= this.model.visibleColumns.length) leftCol = this.model.visibleColumns.length - 1;\n\n\t\tthis.requireHorizontalUpdate = true;\n\t\tthis.table.colOffset = Math.max(0, leftCol);\n\t\tthis.debounceRenderCells();\n\t\tthis.updateSliders();\n\t}\n\n\t/**\n\t * Touch panning: scrolls by the whole columns whose widths fit into `pixels`, so the content follows the finger\n\t * (scrollHorizontalByPixels rounds up to the next column, right for the wheel, a jump under a finger).\n\t * Returns the pixels actually scrolled - the caller keeps the remainder for the next move.\n\t */\n\tpanHorizontal(pixels: number): number {\n\t\tif (!this.hScrolling) return 0;\n\t\tconst columns = this.model.visibleColumns;\n\t\tconst freeze = this.table.freezeLeft || 0;\n\t\tconst max = Math.max(0, columns.length - 1 - freeze);\n\t\tlet offset = Math.min(this.table.colOffset, max), scrolled = 0;\n\t\tif (pixels > 0) {\n\t\t\twhile (offset < max && scrolled + columns[freeze + offset].width <= pixels) scrolled += columns[freeze + offset++].width;\n\t\t} else {\n\t\t\twhile (offset > 0 && scrolled - columns[freeze + offset - 1].width >= pixels) scrolled -= columns[freeze + --offset].width;\n\t\t}\n\t\tif (offset == this.table.colOffset) return 0;\n\t\tthis.table.colOffset = offset;\n\t\tthis.requireHorizontalUpdate = true;\n\t\tthis.debounceRenderCells();\n\t\tthis.updateSliders();\n\t\treturn scrolled;\n\t}\n\n\t/** vertical counterpart of panHorizontal */\n\tpanVertical(pixels: number): number {\n\t\tif (!this.vScrolling) return 0;\n\t\tconst rows = this.model.visibleRows;\n\t\tconst freeze = this.model.options.freezeTop || 0;\n\t\tconst max = Math.max(0, rows.length - 1 - freeze);\n\t\tlet offset = Math.min(this.table.rowOffset, max), scrolled = 0;\n\t\tif (pixels > 0) {\n\t\t\twhile (offset < max && scrolled + rows[freeze + offset].height <= pixels) scrolled += rows[freeze + offset++].height;\n\t\t} else {\n\t\t\twhile (offset > 0 && scrolled - rows[freeze + offset - 1].height >= pixels) scrolled -= rows[freeze + --offset].height;\n\t\t}\n\t\tif (offset == this.table.rowOffset) return 0;\n\t\tthis.table.rowOffset = offset;\n\t\tthis.requireVerticalUpdate = true;\n\t\tthis.debounceRenderCells();\n\t\tthis.updateSliders();\n\t\treturn scrolled;\n\t}\n\n\t/**\n\t * Sets colOffset so that the column with model index `c` is whole in the viewport (a column wider than the\n\t * viewport gets aligned to its left edge). Works from the model sizes, so the column need not be rendered.\n\t * Returns true when colOffset changed - the caller renders.\n\t */\n\tscrollColumnIntoView(c: number): boolean {\n\t\tconst column = this.model.columns[c];\n\t\tif (!column?.visible || this.table.renderAll) return false;\n\t\tconst columns = this.model.visibleColumns;\n\t\tconst index = columns.indexOf(column);\n\t\tconst freeze = this.table.freezeLeft || 0;\n\t\tconst freezeRight = this.model.options.freezeRight || 0;\n\t\t// frozen columns are always visible\n\t\tif (index < freeze || index >= columns.length - freezeRight) return false;\n\t\tlet available = this.table.viewportSize.w;\n\t\tfor (let i = 0; i < freeze; i++) available -= columns[i].width + 1;\n\t\tfor (let i = columns.length - freezeRight; i < columns.length; i++) available -= columns[i].width + 1;\n\t\tconst offset = this._offsetIntoView(columns, freeze, this.table.colOffset, index, available, col => col.width + 1);\n\t\tif (offset == this.table.colOffset) return false;\n\t\tthis.table.colOffset = offset;\n\t\treturn true;\n\t}\n\n\t/** vertical counterpart of scrollColumnIntoView */\n\tscrollRowIntoView(r: number): boolean {\n\t\tconst row = this.model.rows[r];\n\t\tif (!row?.visible || this.table.renderAll) return false;\n\t\tconst rows = this.model.visibleRows;\n\t\tconst index = rows.indexOf(row);\n\t\tconst freeze = this.model.options.freezeTop || 0;\n\t\tconst freezeBottom = this.model.options.freezeBottom || 0;\n\t\tif (index < freeze || index >= rows.length - freezeBottom) return false;\n\t\tlet available = this.table.viewportSize.h;\n\t\tfor (let i = 0; i < freeze; i++) available -= rows[i].height + 1;\n\t\tfor (let i = rows.length - freezeBottom; i < rows.length; i++) available -= rows[i].height + 1;\n\t\tconst offset = this._offsetIntoView(rows, freeze, this.table.rowOffset, index, available, row => row.height + 1);\n\t\tif (offset == this.table.rowOffset) return false;\n\t\tthis.table.rowOffset = offset;\n\t\treturn true;\n\t}\n\n\t/**\n\t * The smallest change of `offset` (items scrolled out behind the `freeze` fixed ones) that shows item `target`\n\t * whole within `available` pixels. Sizes include the 1px collapsed cell border.\n\t */\n\tprivate _offsetIntoView<T>(items: T[], freeze: number, offset: number, target: number, available: number, sizeOf: (item: T) => number) {\n\t\t// before the viewport: align it right behind the fixed items\n\t\tif (target < freeze + offset) return target - freeze;\n\t\tlet size = 0;\n\t\tfor (let i = freeze + offset; i <= target; i++) size += sizeOf(items[i]);\n\t\t// already whole in the viewport\n\t\tif (size <= available) return offset;\n\t\t// behind the viewport: scroll just enough, keeping as many items before it as still fit\n\t\tlet first = target;\n\t\tsize = sizeOf(items[target]);\n\t\twhile (first > freeze + offset && size + sizeOf(items[first - 1]) <= available) size += sizeOf(items[--first]);\n\t\treturn first - freeze;\n\t}\n\n\tupdateCellSelectionRange() {\n\t\tconst table = this.table;\n\t\tfor (const cell of this.model.getRangeIterator(this.selection.range, false)) {\n\t\t\ttable.renderBodyCell(cell);\n\t\t}\n\t}\n\n\tgetAdapterRequestFilters(): RequestFilters {\n\t\treturn {\n\t\t\toffset: 0,\n\t\t\tfilter: this.model?.filter ? Array.from(this.model.filter.settings.values()) : null,\n\t\t\torder: this.model?.sorting?.settings\n\t\t};\n\t}\n\n\tasync toggleRow(index: number, dispatchEvent = true) {\n\t\tconst row = this.model.rows[index];\n\t\tif (row.isLoaded || row.isPartialyLoaded) {\n\t\t\trow.toggleCollapse(false, this.model.options.unhideRowAfterExpand);\n\t\t\tthis.table.renderCells({vertical: true});\n\t\t} else if (this.grid.adapter) {\n\t\t\tconst tr = this.table.getRowByModelIndex(index) as TableRow;\n\t\t\tif (tr && tr.expander) tr.expander.state = 'waiting';\n\n\t\t\trow.collapsed = false;\n\n\t\t\tconst requestFilters = Object.assign(this.getAdapterRequestFilters(), {\n\t\t\t\tparent: {r: row.index, props: row.properties}\n\t\t\t})\n\n\t\t\tconst [newRowSources] = await Promise.all([this.grid.adapter.getRows(requestFilters)]);\n\t\t\tthis.model.insertRowData(row, 0, newRowSources);\n\n\t\t\trequestFilters.rows = newRowSources;\n\t\t\tconst [newCellSources] = await Promise.all([this.grid.adapter.getCells(requestFilters)]);\n\t\t\tnewCellSources?.map(cellSource => this.model.getCellByCoords(cellSource.r, cellSource.c)?.update(cellSource));\n\n\t\t\tthis.table.requestUpdate();\n\t\t}\n\n\t\tthis.updateSliders();\n\t\tif (dispatchEvent) this.grid.dispatchEvent(new GridEvent('row.toggle', {grid: this.grid, row}));\n\t}\n\n\ttoggleColumn(index: number, dispatchEvent = true) {\n\t\tconst column = this.model.columns[index];\n\t\tcolumn.toggleCollapse(false, this.model.options.unhideColumnAfterExpand);\n\t\tthis.table.renderCells({horizontal: true});\n\t\tthis.updateSliders();\n\t\tif (dispatchEvent) this.grid.dispatchEvent(new GridEvent('column.toggle', {grid: this.grid, column }));\n\t}\n\n\tsetRowExpandLevel(level: number) {\n\t\tthis.model.setRowExpandLevel(level);\n\t\tthis.table.rowOffset = 0;\n\t\tthis.table.renderCells({vertical: true});\n\t\tthis.updateSliders();\n\t\tthis.grid.dispatchEvent(new GridEvent('row.toggle', {grid: this.grid}));\n\t}\n\n\tsetColumnExpandLevel(level: number) {\n\t\tthis.model.setColumnExpandLevel(level);\n\t\tthis.table.colOffset = 0;\n\t\tthis.table.renderCells({horizontal: true});\n\t\tthis.updateSliders();\n\t\tthis.grid.dispatchEvent(new GridEvent('column.toggle', {grid: this.grid}));\n\t}\n\n\tasync exportHTML() {\n\t\tconst div = dom.createElement<HTMLDivElement>('div');\n\t\tdom.hideElement(div);\n\t\tdocument.body.appendChild(div);\n\t\tconst table = dom.createElement<Table>('og-table');\n\t\ttable.grid = this.grid;\n\t\ttable.model = this.model;\n\t\ttable.renderAll = true;\n\t\tdiv.appendChild(table);\n\t\tawait table.updateComplete;\n\n\t\tconst rowBreaks = this.model.options?.print?.rowBreaks;\n\t\tconst tableElm = table.table;\n\n\t\t// split table into multiple tables if page breaks are defined\n\t\tconst hasRowBreaks = rowBreaks && rowBreaks.length > 0;\n\t\tif (hasRowBreaks) {\n\t\t\tconst colgroup = tableElm.querySelector('colgroup');\n\t\t\tconst rows = [...tableElm.tBodies[0].rows];\n\n\t\t\tconst rowTitlesRange = this.model.options?.print?.rowTitles\n\t\t\t\t? CellRange.fromA1(this.model.options?.print?.rowTitles) : null;\n\n\t\t\tconst rowTitles = rowTitlesRange ? Array.from({\n\t\t\t\tlength: rowTitlesRange.r2 - rowTitlesRange.r1 + 1},\n\t\t\t\t(_, i) => rows[table.rowMap.get(rowTitlesRange.r1 + i)]\n\t\t\t) : [];\n\n\t\t\tfor (let i = 0; i < rowBreaks.length; i++) {\n\t\t\t\tconst tableElm2 = dom.createElement<HTMLTableElement>('table');\n\t\t\t\ttableElm2.appendChild(colgroup.cloneNode(true));\n\t\t\t\tconst tbody = dom.createElement<HTMLTableSectionElement>('tbody');\n\t\t\t\ttableElm2.appendChild(tbody);\n\n\t\t\t\tconst rMin = table.rowMap.get(rowBreaks[i]);\n\t\t\t\tconst rMax = i < rowBreaks.length - 1\n\t\t\t\t\t? table.rowMap.get(rowBreaks[i + 1])\n\t\t\t\t\t: this.model.visibleRows.length - 1;\n\n\t\t\t\trowTitles.forEach(row => tbody.appendChild(row.cloneNode(true)));\n\n\t\t\t\tfor (let r = rMin; r <= rMax; r++) {\n\t\t\t\t\ttbody.appendChild(rows[r]);\n\t\t\t\t}\n\n\t\t\t\ttable.shadowRoot.appendChild(tableElm2);\n\t\t\t}\n\n\t\t\tcolgroup.cloneNode(true);\n\t\t}\n\n\t\tconst tableCss = `\n\t\t\t<style>\n\t\t\t\thtml {\n\t\t\t\t\t${createThemeVariablesCss(getThemeManager().themes.get('og-light')).cssText}\n\t\t\t\t}\n\t\t\t\t${hasRowBreaks ? 'table {break-after: page}' : ''}\n\t\t\t\t${Table.styles.map(style => style.cssText).join('\\n')}\n\t\t\t</style>\\n\n\t\t`;\n\n\t\tconst html = tableCss + table.shadowRoot.innerHTML.replace(/<!---->/g, '');\n\t\tdiv.remove();\n\t\treturn html;\n\t}\n\n\tautoscrollDirection: Direction;\n\tautoscrollTimer: number;\n\tautoscrollValue: number;\n\n\tstopAutoscroll() {\n\t\tif (this.autoscrollTimer) {\n\t\t\twindow.clearInterval(this.autoscrollTimer);\n\t\t}\n\t}\n\n\tstartAutoscroll() {\n\t\tthis.stopAutoscroll();\n\t\tthis.autoscrollTimer = window.setInterval(() => {\n\t\t\tif (this.autoscrollValue == 0) return this.stopAutoscroll();\n\t\t\tconst amount = Math.pow(this.autoscrollValue, constants.AUTOSCROLL_RATIO);\n\t\t\tswitch (this.autoscrollDirection) {\n\t\t\t\tcase 'down': this.scrollVerticalByPixels(amount); break;\n\t\t\t\tcase 'up': this.scrollVerticalByPixels(-amount); break;\n\t\t\t\tcase 'left': this.scrollHorizontalByPixels(-amount); break;\n\t\t\t\tcase 'right': this.scrollHorizontalByPixels(amount); break;\n\t\t\t}\n\t\t}, constants.AUTOSCROLL_INTERVAL);\n\t}\n\n\tautoscroll(moousePosition: {x: number, y: number}) {\n\t\tconst { x, y } = moousePosition;\n\t\tconst w = (this.table.clientWidth / this.table.zoom) - this.table.totalHeaderWidth;\n\t\tconst h = (this.table.clientHeight / this.table.zoom) - (this.table.totalHeaderHeight);\n\t\tlet direction: Direction;\n\t\tlet value = 0;\n\n\t\tif (x < constants.AUTOSCROLL_TRESHOLD && x < y && x < h - y) {\n\t\t\tdirection = 'left';\n\t\t\tvalue = constants.AUTOSCROLL_TRESHOLD - x;\n\t\t} else if (w - x < constants.AUTOSCROLL_TRESHOLD && w - x < y && w - x < h - y) {\n\t\t\tdirection = 'right';\n\t\t\tvalue = constants.AUTOSCROLL_TRESHOLD - w + x;\n\t\t} else if (y < constants.AUTOSCROLL_TRESHOLD) {\n\t\t\tdirection = 'up';\n\t\t\tvalue = constants.AUTOSCROLL_TRESHOLD - y;\n\t\t} else if (h - y < constants.AUTOSCROLL_TRESHOLD) {\n\t\t\tdirection = 'down';\n\t\t\tvalue = constants.AUTOSCROLL_TRESHOLD - h + y;\n\t\t}\n\n\t\tthis.autoscrollDirection = direction;\n\t\tthis.autoscrollValue = value;\n\t\tthis.stopAutoscroll();\n\t\tif (value > 0) {\n\t\t\tthis.startAutoscroll();\n\t\t}\n\t}\n\n\tasync load(requestFilters?: RequestFilters) {\n\t\trequestFilters = requestFilters || this.getAdapterRequestFilters();\n\t\tconst parentIndex = requestFilters.parent?.r ?? null;\n\t\tconst parentRow = parentIndex != null ? this.model.rows[parentIndex] : this.model.rowRoot;\n\n\t\tconst [newRowSources] = await Promise.all([this.grid.adapter.getRows(requestFilters)]);\n\t\tif (newRowSources.length > 0 && parentIndex === null) {\n\t\t\tthis.model.insertRowData(parentRow, requestFilters.offset, newRowSources);\n\t\t}\n\n\t\tconst [newCellSources] = await Promise.all([this.grid.adapter.getCells(requestFilters)]);\n\t\tnewCellSources?.map(cellSource => this.model.getCellByCoords(cellSource.r, cellSource.c)?.update(cellSource));\n\n\t\tthis.table.requestUpdate();\n\n\t\tif (newRowSources.length >= this.model.options.pageSize) parentRow.count = Infinity;\n\t\telse parentRow.count = parentRow.children.length;\n\n\t\tthis.grid.logger.info(`loaded ${newRowSources.length} rows`);\n\t\tthis.grid.loading = false;\n\t\tthis.grid.dispatchEvent(new GridEvent('afterLoad', {grid: this.grid}));\n\t}\n\n\tasync loadNextPage(parentIndex: number = null, forceLoad = false) {\n\t\tif (this.grid.loading) return;\n\t\tconst parentRow = parentIndex != null ? this.model.rows[parentIndex] : this.model.rowRoot;\n\t\tif (!forceLoad && parentRow.isLoaded) return;\n\n\t\tthis.grid.dispatchEvent(new GridEvent('beforeLoad', {grid: this.grid}));\n\t\tthis.grid.loading = true;\n\n\t\tconst offset = this.model.rows.length;\n\t\tthis.grid.logger.info(`loading rows offset = ${offset}`);\n\n\t\tawait this.load(Object.assign(this.getAdapterRequestFilters(), {\n\t\t\toffset: offset,\n\t\t\tparent: {r: parentIndex, props: null}\n\t\t}));\n\t}\n\n\tget totalSize() { return {\n\t\twidth: this.table.totalHeaderWidth + this.model.visibleColumns.reduce((acc, col) => acc + col.width, 0),\n\t\theight: this.table.thead.offsetHeight + this.model.visibleRows.reduce((acc, row) => acc + row.height, 0)\n\t} }\n\n\tprivate autofitDiv: HTMLDivElement;\n\n\tautofitColumn(c: number|ColumnModel, visibleValuesOnly = false, rerender = true) {\n\t\tconst column = typeof c === 'number' ? this.model.columns[c] : c;\n\t\tconst div = this.autofitDiv ?? (this.autofitDiv = dom.createElement<HTMLDivElement>('div'));\n\t\tdiv.style.position = 'absolute';\n\t\tdiv.style.zIndex = '100000';\n\t\tdom.setPosition(div, {l: -1000, t: -1000});\n\t\tthis.grid.shadowRoot.appendChild(div);\n\t\tlet maxWidth = 0;\n\t\tfor (const cell of this.model.getRangeIterator(CellRange.fromA1(column.address), !!visibleValuesOnly)) {\n\t\t\tconst cellDiv: HTMLDivElement = getCellRenderer(cell).call(this.table, div, cell) || div;\n\t\t\tcellDiv.style.width = 'auto';\n\t\t\tmaxWidth = Math.max(maxWidth, cellDiv.offsetWidth);\n\t\t}\n\t\tif (column.header) {\n\t\t\tfor (const h of column.header) {\n\t\t\t\tif (!h) continue;\n\t\t\t\tif (h.html) div.innerHTML = h.label ?? '';\n\t\t\t\telse div.innerText = h.label ?? '';\n\t\t\t\tmaxWidth = Math.max(maxWidth, div.offsetWidth);\n\t\t\t}\n\t\t\tdiv.innerHTML = '';\n\t\t}\n\t\tcolumn.width = maxWidth + 22;\n\n\t\t// limit max column width to 90% of the table body\n\t\tmaxWidth = (this.grid.offsetWidth - (this.table?.totalHeaderWidth ?? 0)) * 0.9;\n\t\tif (maxWidth > 0 && column.width > maxWidth) column.width = maxWidth;\n\n\t\tif (rerender) this.table.renderCells({horizontal: true});\n\t}\n\n\tautofitColumns(visibleValuesOnly = false) {\n\t\tthis.model.columns.forEach(col => this.autofitColumn(col, visibleValuesOnly, false));\n\t\tthis.table.renderCells({horizontal: true});\n\t}\n\n\tautofitRow(r: number|RowModel, visibleValuesOnly = false, rerender = true) {\n\t\tconst row = typeof r === 'number' ? this.model.rows[r] : r;\n\t\tconst div = this.autofitDiv ?? (this.autofitDiv = dom.createElement<HTMLDivElement>('div'));\n\t\tdiv.style.position = 'absolute';\n\t\tdiv.style.zIndex = '100000';\n\n\t\t// div.style.backgroundColor = 'red';\n\t\t// dom.setPosition(div, {l: 100, t: 100});\n\n\t\tdom.setPosition(div, {l: -1000, t: -1000});\n\t\tthis.grid.shadowRoot.appendChild(div);\n\t\tlet maxHeight = 0;\n\t\tfor (const cell of this.model.getRangeIterator(CellRange.fromA1(row.address), !!visibleValuesOnly)) {\n\t\t\tconst cellDiv: HTMLDivElement = getCellRenderer(cell).call(this.table, div, cell) || div;\n\t\t\tcellDiv.style.height = 'auto';\n\t\t\tmaxHeight = Math.max(maxHeight, cellDiv.offsetHeight);\n\t\t}\n\t\trow.height = maxHeight + 8;\n\t\tif (rerender) this.table.renderCells({vertical: true});\n\t}\n\n\tautofitRows(visibleValuesOnly = false) {\n\t\tthis.model.rows.forEach(row => this.autofitRow(row, visibleValuesOnly, false));\n\t\tthis.table.renderCells({vertical: true});\n\t}\n\n\tscrollTo(r: number|RangeAddress, c = 0) {\n\t\tlet range: CellRange;\n\t\tif (utils.isString(r)) range = CellRange.fromA1(r as RangeAddress);\n\t\telse range = new CellRange(c, r as number);\n\n\t\tthis.table.rowOffset = range.r1;\n\t\tthis.table.colOffset = range.c1;\n\t\tthis.requireVerticalUpdate = true;\n\t\tthis.requireHorizontalUpdate = true;\n\t\tthis.debounceRenderCells();\n\t\tthis.updateSliders();\n\t}\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"grid.rendering.js","sourceRoot":"","sources":["../../src/ui/grid.rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,GAAG,E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QACpC,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,IAAI,CAAC,aAAa,EAAE,CAAC;IACtB,CAAC;CAED","sourcesContent":["import { Direction, dom, getThemeManager, utils } from \"@omegagrid/core\";\nimport { debounce } from \"ts-debounce\";\nimport { CellModel, ColumnModel, RowModel, CellRange, gridConstants as constants, RangeAddress } from \"@omegagrid/grid-core\";\nimport { Grid } from \"./grid\";\nimport { Table, TableRenderOptions, TableRow } from \"./table\";\nimport { GridEvent } from \"./grid.events\";\nimport { getCellRenderer } from \"../renderers\";\nimport { CELL_BORDER_WIDTH, CELL_PADDING } from \"./table.styles\";\nimport { RequestFilters } from \"../gridAdapter\";\nimport { createThemeVariablesCss } from \"@omegagrid/core\";\n\nexport type RefreshOptions = {\n\tvertical?: boolean,\n\thorizontal?: boolean\n\trerenderTable?: boolean\n};\n\n/** Room the column autofit leaves around the content, the cell chrome included. */\nconst AUTOFIT_COLUMN_SPACE = 22;\n\n/**\n * The width the table gives a cell for its content when its row is autofitted: the column width, for a merged\n * cell the width of the shown columns it spans. Null for a cell that must not size the row: one in a column\n * that is not shown (hidden or in a collapsed group), one covered by a merge, or a merge that spans other rows as well.\n * @param visibleColumns the columns the table shows (`model.visibleColumns`)\n */\nexport function autofitCellWidth(cell: CellModel, visibleColumns: ReadonlySet<ColumnModel>): number|null {\n\tif (!visibleColumns.has(cell.column)) return null;\n\tconst merges = cell.model.merges;\n\tif (merges.hiddenCells.has(cell.address)) return null;\n\tconst merge = merges.mergedCells.get(cell.address);\n\tif (!merge) return cell.column.width;\n\tif (merge.rs > 1) return null;\n\tlet width = 0;\n\tfor (let c = merge.c; c < merge.c + merge.cs; c++) {\n\t\tconst column = cell.model.columns[c];\n\t\tif (column && visibleColumns.has(column)) width += column.width;\n\t}\n\treturn width;\n}\n\n/**\n * The columns (or rows) a double click on the divider of `node` autofits. Like in Excel: all the selected ones\n * when the selection covers whole columns (rows) and `node` is among them, otherwise `node` alone.\n * @param visibleNodes the columns (rows) the table shows (`model.visibleColumns` / `model.visibleRows`)\n * @param whole whether the selection covers whole columns (rows)\n * @param from the selected index span, in either order (a selection dragged backwards is not normalized)\n */\nexport function autofitTargets<T extends {index: number}>(node: T, visibleNodes: readonly T[], whole: boolean, from: number, to: number): T[] {\n\tconst [first, last] = [Math.min(from, to), Math.max(from, to)];\n\tif (!whole || node.index < first || node.index > last) return [node];\n\treturn visibleNodes.filter(n => n.index >= first && n.index <= last);\n}\n\nexport class GridRendering {\n\n\trequireVerticalUpdate = true;\n\trequireHorizontalUpdate = false;\n\t/** touch position whose movement has not been turned into scrolling yet (GridEvents._onTouchMove) */\n\ttouchAnchor: {x: number, y: number};\n\tresizing = false;\n\tcurrentResizedColumn: ColumnModel;\n\tcurrentResizedColumnWidth: number;\n\tcurrentResizedRow: RowModel;\n\tcurrentResizedRowHeight: number;\n\n\tprivate _vScrolling = true;\n\tget vScrolling() { return this._vScrolling }\n\tprivate _hScrolling = true;\n\tget hScrolling() { return this._hScrolling }\n\n\tget model() { return this.grid.model }\n\tget selection() { return this.grid.selection }\n\tget table() { return this.grid.table }\n\n\tconstructor(readonly grid: Grid) { }\n\n\treadonly debounceRenderCells = debounce(this.renderCells, 50, {isImmediate: false, maxWait: 100});\n\treadonly debounceCalculateViewport = debounce(this.calculateViewport, 200);\n\n\tisLastRowInViewport() {\n\t\tconst viewportRows = this.grid.table.viewport.rows;\n\t\tconst visibleRows = this.model.visibleRows;\n\t\treturn viewportRows[viewportRows.length - 1] == visibleRows[visibleRows.length - 1];\n\t}\n\n\trenderCells(update?: TableRenderOptions) {\n\t\tupdate = update || {vertical: this.requireVerticalUpdate, horizontal: this.requireHorizontalUpdate};\n\t\tthis.grid.comment.deatach();\n\t\tthis.grid.table.renderCells(update);\n\t\tthis.requireHorizontalUpdate = false;\n\t\tthis.requireVerticalUpdate = false;\n\t\tthis.debounceCalculateViewport();\n\t\tthis.grid.objects.updatePostions();\n\t}\n\n\trenderAll(rerenderTable = false) {\n\t\tif (this.grid.group) this.grid.group.grids.forEach((g: Grid) => g.rendering.render(rerenderTable));\n\t\telse this.render(rerenderTable);\n\t}\n\n\tasync render(rerenderTable = false) {\n\t\tif (!this.grid.table || !this.model) return;\n\t\tthis.grid.table.clearHeaderCache();\n\t\tthis.grid.table.clearBodyCache();\n\t\tif (this.grid.table.isConnected) {\n\t\t\tif (rerenderTable) {\n\t\t\t\tthis.grid.table.requestUpdate();\n\t\t\t\tawait this.grid.table.updateComplete;\n\t\t\t}\n\t\t\tthis.grid.table.renderCells({horizontal: true, vertical: true});\n\t\t\tthis.calculateViewport();\n\t\t}\n\t}\n\n\tupdateRange(range: CellRange, recalculate = false) {\n\t\tfor (const cell of this.model.getRangeIterator(range)) {\n\t\t\tthis.updateCells([cell], recalculate);\n\t\t}\n\t}\n\n\tupdateCell(cell: CellModel, recalculate = false) {\n\t\tthis.updateCells([cell], recalculate);\n\t}\n\n\tupdateSpilledCells(cell: CellModel) {\n\t\tlet spillCells: Set<CellModel>;\n\t\tif (cell.prevSpillRange) {\n\t\t\tspillCells = new Set();\n\t\t\tthis.model.getRangeIterator(cell.prevSpillRange).forEach(cell => spillCells.add(cell));\n\t\t}\n\t\tif (cell.spillRange) {\n\t\t\tspillCells = spillCells || new Set();\n\t\t\tthis.model.getRangeIterator(cell.spillRange).forEach(cell => spillCells.add(cell));\n\t\t}\n\t\tif (spillCells?.size > 0) this.updateCells(spillCells);\n\t}\n\n\tupdateCells(cells: Iterable<CellModel>, recalculate = false) {\n\t\tif (recalculate) {\n\t\t\tfor (const cell of cells) {\n\t\t\t\tcell.invalidateStyle();\n\t\t\t\tcell.invalidateValue();\n\t\t\t\tthis.model.calculations.clearDependecies(cell).evaluate(cell);\n\t\t\t\tthis.updateSpilledCells(cell);\n\t\t\t}\n\t\t}\n\n\t\tconst table = this.grid.table;\n\t\tfor (const cell of cells) table.renderBodyCell(cell);\n\n\t\tif (recalculate) {\n\t\t\tthis.model.calculations.invalidateDependants(cells).forEach((sheet, cell) => {\n\t\t\t\tif (sheet) this.grid.group.getGrid(sheet)?.table.renderBodyCell(cell);\n\t\t\t\telse table.renderBodyCell(cell);\n\t\t\t\tthis.updateSpilledCells(cell);\n\t\t\t});\n\t\t\tthis.grid.dispatchGridEvent('calculate', { cells: Array.from(cells) });\n\t\t}\n\t}\n\n\tupdateHeaders() {\n\t\tthis.model.indexVisibleColumns();\n\t\tthis.table.clearHeaderCache();\n\t\tthis.table.createHeaderRows();\n\t\tthis.table.renderHeader();\n\t}\n\n\tcalculateViewport(recalculate = false) {\n\t\tthis.grid.logger.info('calculate viwport');\n\t\tthis.updateCells(this.model.calculateViewport(), recalculate);\n\t}\n\n\tupdateSliders() {\n\t\tconst ws = this.table.viewportSize;\n\t\tthis.grid.vSlider.maxValue = this.model.visibleRows.length;\n\t\tthis.grid.vSlider.pageSize = ws.h / this.model.options.rowHeight;\n\t\tthis.grid.vSlider.value = this.table.rowOffset;\n\t\tthis.grid.hSlider.maxValue = this.model.visibleColumns.length;\n\t\tthis.grid.hSlider.pageSize = ws.w / this.model.options.columnWidth;\n\t\tthis.grid.hSlider.value = this.table.colOffset;\n\t}\n\n\tisVerticalScrollingEnabled() {\n\t\treturn this.grid.options.scrolling.verticalOverscroll !== false\n\t\t\t|| this.table.viewport.rows.length < this.model.visibleRows.length;\n\t}\n\n\tisHorizontalScrollingEnabled() {\n\t\treturn this.grid.options.scrolling.horizontalOverscroll !== false\n\t\t\t|| this.table.viewport.columns.length < this.model.visibleColumns.length;\n\t}\n\n\tupdateSliderVisibility() {\n\t\tthis._vScrolling = this.isVerticalScrollingEnabled();\n\t\tif (this._vScrolling) {\n\t\t\tthis.grid.vSlider.show();\n\t\t\tdom.showElement(this.grid.vSlider);\n\t\t} else {\n\t\t\tthis.grid.vSlider.hide();\n\t\t\tdom.hideElement(this.grid.vSlider);\n\t\t}\n\n\t\tthis._hScrolling = this.isHorizontalScrollingEnabled();\n\t\tif (this._hScrolling) {\n\t\t\tthis.grid.hSlider.show();\n\t\t\tdom.showElement(this.grid.hSlider);\n\t\t} else {\n\t\t\tthis.grid.hSlider.hide();\n\t\t\tdom.hideElement(this.grid.hSlider);\n\t\t}\n\t}\n\n\thideSliders() {\n\t\tthis.grid.vSlider.hide();\n\t\tthis.grid.hSlider.hide();\n\t}\n\n\tscrollVerticalByPixels(pixels: number) {\n\t\tif (!this.vScrolling) return;\n\n\t\tlet topRow = this.table.rowOffset;\n\t\tlet top = 0, r = 0;\n\t\tlet row: RowModel;\n\n\t\tif (pixels > 0) {\n\t\t\twhile (top < pixels && topRow + r < this.model.visibleRows.length) {\n\t\t\t\ttop += this.model.visibleRows[topRow + (r++)].height + 2;\n\t\t\t}\n\t\t\ttopRow = topRow + r;\n\t\t} else if (pixels < 0) {\n\t\t\tpixels = Math.abs(pixels);\n\t\t\twhile (top < pixels && topRow + r >= 0) {\n\t\t\t\trow = this.model.visibleRows[Math.min(this.model.visibleRows.length - 1, topRow + (r--))];\n\t\t\t\ttop += (row ? row.height : 0) + 2;\n\t\t\t}\n\t\t\ttopRow = topRow + r;\n\t\t}\n\n\t\tif (topRow >= this.model.visibleRows.length) topRow = this.model.visibleRows.length - 1;\n\n\t\tthis.requireVerticalUpdate = true;\n\t\tthis.table.rowOffset = Math.max(0, topRow);\n\t\tthis.debounceRenderCells();\n\t\tthis.updateSliders();\n\t}\n\n\tscrollHorizontalByPixels(pixels: number) {\n\t\tif (!this.hScrolling) return;\n\n\t\tlet leftCol = this.table.colOffset;\n\t\tlet left = 0, c = 0;\n\t\tif (pixels > 0) {\n\t\t\twhile (left < pixels && leftCol + c < this.model.visibleColumns.length) {\n\t\t\t\tleft += this.model.visibleColumns[leftCol + (c++)].width + 2;\n\t\t\t}\n\t\t\tleftCol = leftCol + c;\n\t\t} else if (pixels < 0) {\n\t\t\tpixels = Math.abs(pixels);\n\t\t\twhile (left < pixels && leftCol + c >= 0) {\n\t\t\t\tleft += this.model.visibleColumns[Math.min(this.model.visibleColumns.length - 1, leftCol + (c--))].width + 2;\n\t\t\t}\n\t\t\tleftCol = leftCol + c;\n\t\t}\n\n\t\tif (leftCol >= this.model.visibleColumns.length) leftCol = this.model.visibleColumns.length - 1;\n\n\t\tthis.requireHorizontalUpdate = true;\n\t\tthis.table.colOffset = Math.max(0, leftCol);\n\t\tthis.debounceRenderCells();\n\t\tthis.updateSliders();\n\t}\n\n\t/**\n\t * Touch panning: scrolls by the whole columns whose widths fit into `pixels`, so the content follows the finger\n\t * (scrollHorizontalByPixels rounds up to the next column, right for the wheel, a jump under a finger).\n\t * Returns the pixels actually scrolled - the caller keeps the remainder for the next move.\n\t */\n\tpanHorizontal(pixels: number): number {\n\t\tif (!this.hScrolling) return 0;\n\t\tconst columns = this.model.visibleColumns;\n\t\tconst freeze = this.table.freezeLeft || 0;\n\t\tconst max = Math.max(0, columns.length - 1 - freeze);\n\t\tlet offset = Math.min(this.table.colOffset, max), scrolled = 0;\n\t\tif (pixels > 0) {\n\t\t\twhile (offset < max && scrolled + columns[freeze + offset].width <= pixels) scrolled += columns[freeze + offset++].width;\n\t\t} else {\n\t\t\twhile (offset > 0 && scrolled - columns[freeze + offset - 1].width >= pixels) scrolled -= columns[freeze + --offset].width;\n\t\t}\n\t\tif (offset == this.table.colOffset) return 0;\n\t\tthis.table.colOffset = offset;\n\t\tthis.requireHorizontalUpdate = true;\n\t\tthis.debounceRenderCells();\n\t\tthis.updateSliders();\n\t\treturn scrolled;\n\t}\n\n\t/** vertical counterpart of panHorizontal */\n\tpanVertical(pixels: number): number {\n\t\tif (!this.vScrolling) return 0;\n\t\tconst rows = this.model.visibleRows;\n\t\tconst freeze = this.model.options.freezeTop || 0;\n\t\tconst max = Math.max(0, rows.length - 1 - freeze);\n\t\tlet offset = Math.min(this.table.rowOffset, max), scrolled = 0;\n\t\tif (pixels > 0) {\n\t\t\twhile (offset < max && scrolled + rows[freeze + offset].height <= pixels) scrolled += rows[freeze + offset++].height;\n\t\t} else {\n\t\t\twhile (offset > 0 && scrolled - rows[freeze + offset - 1].height >= pixels) scrolled -= rows[freeze + --offset].height;\n\t\t}\n\t\tif (offset == this.table.rowOffset) return 0;\n\t\tthis.table.rowOffset = offset;\n\t\tthis.requireVerticalUpdate = true;\n\t\tthis.debounceRenderCells();\n\t\tthis.updateSliders();\n\t\treturn scrolled;\n\t}\n\n\t/**\n\t * Sets colOffset so that the column with model index `c` is whole in the viewport (a column wider than the\n\t * viewport gets aligned to its left edge). Works from the model sizes, so the column need not be rendered.\n\t * Returns true when colOffset changed - the caller renders.\n\t */\n\tscrollColumnIntoView(c: number): boolean {\n\t\tconst column = this.model.columns[c];\n\t\tif (!column?.visible || this.table.renderAll) return false;\n\t\tconst columns = this.model.visibleColumns;\n\t\tconst index = columns.indexOf(column);\n\t\tconst freeze = this.table.freezeLeft || 0;\n\t\tconst freezeRight = this.model.options.freezeRight || 0;\n\t\t// frozen columns are always visible\n\t\tif (index < freeze || index >= columns.length - freezeRight) return false;\n\t\tlet available = this.table.viewportSize.w;\n\t\tfor (let i = 0; i < freeze; i++) available -= columns[i].width + 1;\n\t\tfor (let i = columns.length - freezeRight; i < columns.length; i++) available -= columns[i].width + 1;\n\t\tconst offset = this._offsetIntoView(columns, freeze, this.table.colOffset, index, available, col => col.width + 1);\n\t\tif (offset == this.table.colOffset) return false;\n\t\tthis.table.colOffset = offset;\n\t\treturn true;\n\t}\n\n\t/** vertical counterpart of scrollColumnIntoView */\n\tscrollRowIntoView(r: number): boolean {\n\t\tconst row = this.model.rows[r];\n\t\tif (!row?.visible || this.table.renderAll) return false;\n\t\tconst rows = this.model.visibleRows;\n\t\tconst index = rows.indexOf(row);\n\t\tconst freeze = this.model.options.freezeTop || 0;\n\t\tconst freezeBottom = this.model.options.freezeBottom || 0;\n\t\tif (index < freeze || index >= rows.length - freezeBottom) return false;\n\t\tlet available = this.table.viewportSize.h;\n\t\tfor (let i = 0; i < freeze; i++) available -= rows[i].height + 1;\n\t\tfor (let i = rows.length - freezeBottom; i < rows.length; i++) available -= rows[i].height + 1;\n\t\tconst offset = this._offsetIntoView(rows, freeze, this.table.rowOffset, index, available, row => row.height + 1);\n\t\tif (offset == this.table.rowOffset) return false;\n\t\tthis.table.rowOffset = offset;\n\t\treturn true;\n\t}\n\n\t/**\n\t * The smallest change of `offset` (items scrolled out behind the `freeze` fixed ones) that shows item `target`\n\t * whole within `available` pixels. Sizes include the 1px collapsed cell border.\n\t */\n\tprivate _offsetIntoView<T>(items: T[], freeze: number, offset: number, target: number, available: number, sizeOf: (item: T) => number) {\n\t\t// before the viewport: align it right behind the fixed items\n\t\tif (target < freeze + offset) return target - freeze;\n\t\tlet size = 0;\n\t\tfor (let i = freeze + offset; i <= target; i++) size += sizeOf(items[i]);\n\t\t// already whole in the viewport\n\t\tif (size <= available) return offset;\n\t\t// behind the viewport: scroll just enough, keeping as many items before it as still fit\n\t\tlet first = target;\n\t\tsize = sizeOf(items[target]);\n\t\twhile (first > freeze + offset && size + sizeOf(items[first - 1]) <= available) size += sizeOf(items[--first]);\n\t\treturn first - freeze;\n\t}\n\n\tupdateCellSelectionRange() {\n\t\tconst table = this.table;\n\t\tfor (const cell of this.model.getRangeIterator(this.selection.range, false)) {\n\t\t\ttable.renderBodyCell(cell);\n\t\t}\n\t}\n\n\tgetAdapterRequestFilters(): RequestFilters {\n\t\treturn {\n\t\t\toffset: 0,\n\t\t\tfilter: this.model?.filter ? Array.from(this.model.filter.settings.values()) : null,\n\t\t\torder: this.model?.sorting?.settings\n\t\t};\n\t}\n\n\tasync toggleRow(index: number, dispatchEvent = true) {\n\t\tconst row = this.model.rows[index];\n\t\tif (row.isLoaded || row.isPartialyLoaded) {\n\t\t\trow.toggleCollapse(false, this.model.options.unhideRowAfterExpand);\n\t\t\tthis.table.renderCells({vertical: true});\n\t\t} else if (this.grid.adapter) {\n\t\t\tconst tr = this.table.getRowByModelIndex(index) as TableRow;\n\t\t\tif (tr && tr.expander) tr.expander.state = 'waiting';\n\n\t\t\trow.collapsed = false;\n\n\t\t\tconst requestFilters = Object.assign(this.getAdapterRequestFilters(), {\n\t\t\t\tparent: {r: row.index, props: row.properties}\n\t\t\t})\n\n\t\t\tconst [newRowSources] = await Promise.all([this.grid.adapter.getRows(requestFilters)]);\n\t\t\tthis.model.insertRowData(row, 0, newRowSources);\n\n\t\t\trequestFilters.rows = newRowSources;\n\t\t\tconst [newCellSources] = await Promise.all([this.grid.adapter.getCells(requestFilters)]);\n\t\t\tnewCellSources?.map(cellSource => this.model.getCellByCoords(cellSource.r, cellSource.c)?.update(cellSource));\n\n\t\t\tthis.table.requestUpdate();\n\t\t}\n\n\t\tthis.updateSliders();\n\t\tif (dispatchEvent) this.grid.dispatchEvent(new GridEvent('row.toggle', {grid: this.grid, row}));\n\t}\n\n\ttoggleColumn(index: number, dispatchEvent = true) {\n\t\tconst column = this.model.columns[index];\n\t\tcolumn.toggleCollapse(false, this.model.options.unhideColumnAfterExpand);\n\t\tthis.table.renderCells({horizontal: true});\n\t\tthis.updateSliders();\n\t\tif (dispatchEvent) this.grid.dispatchEvent(new GridEvent('column.toggle', {grid: this.grid, column }));\n\t}\n\n\tsetRowExpandLevel(level: number) {\n\t\tthis.model.setRowExpandLevel(level);\n\t\tthis.table.rowOffset = 0;\n\t\tthis.table.renderCells({vertical: true});\n\t\tthis.updateSliders();\n\t\tthis.grid.dispatchEvent(new GridEvent('row.toggle', {grid: this.grid}));\n\t}\n\n\tsetColumnExpandLevel(level: number) {\n\t\tthis.model.setColumnExpandLevel(level);\n\t\tthis.table.colOffset = 0;\n\t\tthis.table.renderCells({horizontal: true});\n\t\tthis.updateSliders();\n\t\tthis.grid.dispatchEvent(new GridEvent('column.toggle', {grid: this.grid}));\n\t}\n\n\tasync exportHTML() {\n\t\tconst div = dom.createElement<HTMLDivElement>('div');\n\t\tdom.hideElement(div);\n\t\tdocument.body.appendChild(div);\n\t\tconst table = dom.createElement<Table>('og-table');\n\t\ttable.grid = this.grid;\n\t\ttable.model = this.model;\n\t\ttable.renderAll = true;\n\t\tdiv.appendChild(table);\n\t\tawait table.updateComplete;\n\n\t\tconst rowBreaks = this.model.options?.print?.rowBreaks;\n\t\tconst tableElm = table.table;\n\n\t\t// split table into multiple tables if page breaks are defined\n\t\tconst hasRowBreaks = rowBreaks && rowBreaks.length > 0;\n\t\tif (hasRowBreaks) {\n\t\t\tconst colgroup = tableElm.querySelector('colgroup');\n\t\t\tconst rows = [...tableElm.tBodies[0].rows];\n\n\t\t\tconst rowTitlesRange = this.model.options?.print?.rowTitles\n\t\t\t\t? CellRange.fromA1(this.model.options?.print?.rowTitles) : null;\n\n\t\t\tconst rowTitles = rowTitlesRange ? Array.from({\n\t\t\t\tlength: rowTitlesRange.r2 - rowTitlesRange.r1 + 1},\n\t\t\t\t(_, i) => rows[table.rowMap.get(rowTitlesRange.r1 + i)]\n\t\t\t) : [];\n\n\t\t\tfor (let i = 0; i < rowBreaks.length; i++) {\n\t\t\t\tconst tableElm2 = dom.createElement<HTMLTableElement>('table');\n\t\t\t\ttableElm2.appendChild(colgroup.cloneNode(true));\n\t\t\t\tconst tbody = dom.createElement<HTMLTableSectionElement>('tbody');\n\t\t\t\ttableElm2.appendChild(tbody);\n\n\t\t\t\tconst rMin = table.rowMap.get(rowBreaks[i]);\n\t\t\t\tconst rMax = i < rowBreaks.length - 1\n\t\t\t\t\t? table.rowMap.get(rowBreaks[i + 1])\n\t\t\t\t\t: this.model.visibleRows.length - 1;\n\n\t\t\t\trowTitles.forEach(row => tbody.appendChild(row.cloneNode(true)));\n\n\t\t\t\tfor (let r = rMin; r <= rMax; r++) {\n\t\t\t\t\ttbody.appendChild(rows[r]);\n\t\t\t\t}\n\n\t\t\t\ttable.shadowRoot.appendChild(tableElm2);\n\t\t\t}\n\n\t\t\tcolgroup.cloneNode(true);\n\t\t}\n\n\t\tconst tableCss = `\n\t\t\t<style>\n\t\t\t\thtml {\n\t\t\t\t\t${createThemeVariablesCss(getThemeManager().themes.get('og-light')).cssText}\n\t\t\t\t}\n\t\t\t\t${hasRowBreaks ? 'table {break-after: page}' : ''}\n\t\t\t\t${Table.styles.map(style => style.cssText).join('\\n')}\n\t\t\t</style>\\n\n\t\t`;\n\n\t\tconst html = tableCss + table.shadowRoot.innerHTML.replace(/<!---->/g, '');\n\t\tdiv.remove();\n\t\treturn html;\n\t}\n\n\tautoscrollDirection: Direction;\n\tautoscrollTimer: number;\n\tautoscrollValue: number;\n\n\tstopAutoscroll() {\n\t\tif (this.autoscrollTimer) {\n\t\t\twindow.clearInterval(this.autoscrollTimer);\n\t\t}\n\t}\n\n\tstartAutoscroll() {\n\t\tthis.stopAutoscroll();\n\t\tthis.autoscrollTimer = window.setInterval(() => {\n\t\t\tif (this.autoscrollValue == 0) return this.stopAutoscroll();\n\t\t\tconst amount = Math.pow(this.autoscrollValue, constants.AUTOSCROLL_RATIO);\n\t\t\tswitch (this.autoscrollDirection) {\n\t\t\t\tcase 'down': this.scrollVerticalByPixels(amount); break;\n\t\t\t\tcase 'up': this.scrollVerticalByPixels(-amount); break;\n\t\t\t\tcase 'left': this.scrollHorizontalByPixels(-amount); break;\n\t\t\t\tcase 'right': this.scrollHorizontalByPixels(amount); break;\n\t\t\t}\n\t\t}, constants.AUTOSCROLL_INTERVAL);\n\t}\n\n\tautoscroll(moousePosition: {x: number, y: number}) {\n\t\tconst { x, y } = moousePosition;\n\t\tconst w = (this.table.clientWidth / this.table.zoom) - this.table.totalHeaderWidth;\n\t\tconst h = (this.table.clientHeight / this.table.zoom) - (this.table.totalHeaderHeight);\n\t\tlet direction: Direction;\n\t\tlet value = 0;\n\n\t\tif (x < constants.AUTOSCROLL_TRESHOLD && x < y && x < h - y) {\n\t\t\tdirection = 'left';\n\t\t\tvalue = constants.AUTOSCROLL_TRESHOLD - x;\n\t\t} else if (w - x < constants.AUTOSCROLL_TRESHOLD && w - x < y && w - x < h - y) {\n\t\t\tdirection = 'right';\n\t\t\tvalue = constants.AUTOSCROLL_TRESHOLD - w + x;\n\t\t} else if (y < constants.AUTOSCROLL_TRESHOLD) {\n\t\t\tdirection = 'up';\n\t\t\tvalue = constants.AUTOSCROLL_TRESHOLD - y;\n\t\t} else if (h - y < constants.AUTOSCROLL_TRESHOLD) {\n\t\t\tdirection = 'down';\n\t\t\tvalue = constants.AUTOSCROLL_TRESHOLD - h + y;\n\t\t}\n\n\t\tthis.autoscrollDirection = direction;\n\t\tthis.autoscrollValue = value;\n\t\tthis.stopAutoscroll();\n\t\tif (value > 0) {\n\t\t\tthis.startAutoscroll();\n\t\t}\n\t}\n\n\tasync load(requestFilters?: RequestFilters) {\n\t\trequestFilters = requestFilters || this.getAdapterRequestFilters();\n\t\tconst parentIndex = requestFilters.parent?.r ?? null;\n\t\tconst parentRow = parentIndex != null ? this.model.rows[parentIndex] : this.model.rowRoot;\n\n\t\tconst [newRowSources] = await Promise.all([this.grid.adapter.getRows(requestFilters)]);\n\t\tif (newRowSources.length > 0 && parentIndex === null) {\n\t\t\tthis.model.insertRowData(parentRow, requestFilters.offset, newRowSources);\n\t\t}\n\n\t\tconst [newCellSources] = await Promise.all([this.grid.adapter.getCells(requestFilters)]);\n\t\tnewCellSources?.map(cellSource => this.model.getCellByCoords(cellSource.r, cellSource.c)?.update(cellSource));\n\n\t\tthis.table.requestUpdate();\n\n\t\tif (newRowSources.length >= this.model.options.pageSize) parentRow.count = Infinity;\n\t\telse parentRow.count = parentRow.children.length;\n\n\t\tthis.grid.logger.info(`loaded ${newRowSources.length} rows`);\n\t\tthis.grid.loading = false;\n\t\tthis.grid.dispatchEvent(new GridEvent('afterLoad', {grid: this.grid}));\n\t}\n\n\tasync loadNextPage(parentIndex: number = null, forceLoad = false) {\n\t\tif (this.grid.loading) return;\n\t\tconst parentRow = parentIndex != null ? this.model.rows[parentIndex] : this.model.rowRoot;\n\t\tif (!forceLoad && parentRow.isLoaded) return;\n\n\t\tthis.grid.dispatchEvent(new GridEvent('beforeLoad', {grid: this.grid}));\n\t\tthis.grid.loading = true;\n\n\t\tconst offset = this.model.rows.length;\n\t\tthis.grid.logger.info(`loading rows offset = ${offset}`);\n\n\t\tawait this.load(Object.assign(this.getAdapterRequestFilters(), {\n\t\t\toffset: offset,\n\t\t\tparent: {r: parentIndex, props: null}\n\t\t}));\n\t}\n\n\tget totalSize() { return {\n\t\twidth: this.table.totalHeaderWidth + this.model.visibleColumns.reduce((acc, col) => acc + col.width, 0),\n\t\theight: this.table.thead.offsetHeight + this.model.visibleRows.reduce((acc, row) => acc + row.height, 0)\n\t} }\n\n\tprivate autofitDiv: HTMLDivElement;\n\n\t/**\n\t * The detached div the autofit renders cells into, reset and given the chrome of a body cell\n\t * (`td>div` in table.styles, font size and line height of the table style) so that it measures\n\t * what the table shows. The renderers leave inline styles and classes behind, hence the reset per cell.\n\t * @param width the width the table gives the cell, `'auto'` to measure the content width\n\t */\n\tprivate prepareAutofitDiv(width: number|'auto') {\n\t\tconst div = this.autofitDiv ?? (this.autofitDiv = dom.createElement<HTMLDivElement>('div'));\n\t\tdom.empty(div);\n\t\tdiv.className = '';\n\t\tdiv.removeAttribute('style');\n\t\tdom.setPosition(div, {l: -10000, t: -10000});\n\t\tdiv.style.visibility = 'hidden';\n\t\tdiv.style.boxSizing = 'border-box';\n\t\tdiv.style.border = `${CELL_BORDER_WIDTH}px solid transparent`;\n\t\tdiv.style.padding = `0 ${CELL_PADDING}px`;\n\t\tdiv.style.fontSize = dom.numToPixels(this.table.cellFontSize);\n\t\tdiv.style.lineHeight = dom.numToPixels(this.table.rowLineHeight);\n\t\tdiv.style.whiteSpace = 'nowrap';\n\t\tdiv.style.width = width === 'auto' ? 'auto' : dom.numToPixels(width);\n\t\tif (!div.isConnected) this.grid.shadowRoot.appendChild(div);\n\t\treturn div;\n\t}\n\n\tprivate renderToAutofitDiv(cell: CellModel, width: number|'auto'): HTMLDivElement {\n\t\tconst div = this.prepareAutofitDiv(width);\n\t\treturn getCellRenderer(cell).call(this.table, div, cell) || div;\n\t}\n\n\t/** Width of the content rendered into the autofit div: the client width less the padding, so the border rendering (1.5px snaps to device pixels) does not get in. */\n\tprivate autofitContentWidth(div: HTMLDivElement) {\n\t\treturn div.clientWidth - 2 * CELL_PADDING;\n\t}\n\n\t/** Drops the last measured cell from the autofit div: its elements (buttons, expanders) would keep the cell and its model alive. */\n\tprivate releaseAutofitDiv() {\n\t\tif (this.autofitDiv) dom.empty(this.autofitDiv);\n\t}\n\n\tautofitColumn(c: number|ColumnModel, visibleValuesOnly = false, rerender = true) {\n\t\tconst column = typeof c === 'number' ? this.model.columns[c] : c;\n\t\tlet maxWidth = 0;\n\t\tfor (const cell of this.model.getRangeIterator(CellRange.fromA1(column.address), !!visibleValuesOnly)) {\n\t\t\tmaxWidth = Math.max(maxWidth, this.autofitContentWidth(this.renderToAutofitDiv(cell, 'auto')));\n\t\t}\n\t\tif (column.header) {\n\t\t\tconst div = this.prepareAutofitDiv('auto');\n\t\t\tfor (const h of column.header) {\n\t\t\t\tif (!h) continue;\n\t\t\t\tif (h.html) div.innerHTML = h.label ?? '';\n\t\t\t\telse div.innerText = h.label ?? '';\n\t\t\t\tmaxWidth = Math.max(maxWidth, this.autofitContentWidth(div));\n\t\t\t}\n\t\t}\n\t\tthis.releaseAutofitDiv();\n\t\tcolumn.width = maxWidth + AUTOFIT_COLUMN_SPACE;\n\n\t\t// limit max column width to 90% of the table body\n\t\tmaxWidth = (this.grid.offsetWidth - (this.table?.totalHeaderWidth ?? 0)) * 0.9;\n\t\tif (maxWidth > 0 && column.width > maxWidth) column.width = maxWidth;\n\n\t\tif (rerender) this.table.renderCells({horizontal: true});\n\t}\n\n\tautofitColumns(visibleValuesOnly = false) {\n\t\tthis.model.columns.forEach(col => this.autofitColumn(col, visibleValuesOnly, false));\n\t\tthis.table.renderCells({horizontal: true});\n\t}\n\n\tautofitRow(r: number|RowModel, visibleValuesOnly = false, rerender = true) {\n\t\tconst row = typeof r === 'number' ? this.model.rows[r] : r;\n\t\tconst table = this.table;\n\t\tconst visibleColumns = new Set(this.model.visibleColumns);\n\t\tlet maxHeight = table.rowLineHeight; // an empty row keeps one line\n\t\tfor (const cell of this.model.getRangeIterator(CellRange.fromA1(row.address), !!visibleValuesOnly)) {\n\t\t\tconst width = autofitCellWidth(cell, visibleColumns);\n\t\t\tif (width == null) continue;\n\t\t\t// the cell wraps within the width the table gives it; clientHeight is the content without the border\n\t\t\tmaxHeight = Math.max(maxHeight, this.renderToAutofitDiv(cell, width).clientHeight);\n\t\t}\n\t\tthis.releaseAutofitDiv();\n\t\t// the default row is one line plus a pixel - keep the same around the measured lines\n\t\trow.height = maxHeight + table.defaultRowHeight - table.rowLineHeight;\n\t\tif (rerender) this.table.renderCells({vertical: true});\n\t}\n\n\tautofitRows(visibleValuesOnly = false) {\n\t\tthis.model.rows.forEach(row => this.autofitRow(row, visibleValuesOnly, false));\n\t\tthis.table.renderCells({vertical: true});\n\t}\n\n\t/**\n\t * Autofits `column` or, when the selection covers whole columns including it, all the selected columns (see autofitTargets).\n\t * @returns the autofitted columns\n\t */\n\tautofitColumnWithSelection(column: ColumnModel): ColumnModel[] {\n\t\tconst range = this.grid.selection.range;\n\t\tconst columns = autofitTargets(column, this.model.visibleColumns, range.isColumn, range.c1, range.c2);\n\t\tcolumns.forEach(col => this.autofitColumn(col, false, false));\n\t\tthis.table.renderCells({horizontal: true});\n\t\treturn columns;\n\t}\n\n\t/**\n\t * Autofits `row` or, when the selection covers whole rows including it, all the selected rows (see autofitTargets).\n\t * @returns the autofitted rows\n\t */\n\tautofitRowWithSelection(row: RowModel): RowModel[] {\n\t\tconst range = this.grid.selection.range;\n\t\tconst rows = autofitTargets(row, this.model.visibleRows, range.isRow, range.r1, range.r2);\n\t\trows.forEach(r => this.autofitRow(r, false, false));\n\t\tthis.table.renderCells({vertical: true});\n\t\treturn rows;\n\t}\n\n\tscrollTo(r: number|RangeAddress, c = 0) {\n\t\tlet range: CellRange;\n\t\tif (utils.isString(r)) range = CellRange.fromA1(r as RangeAddress);\n\t\telse range = new CellRange(c, r as number);\n\n\t\tthis.table.rowOffset = range.r1;\n\t\tthis.table.colOffset = range.c1;\n\t\tthis.requireVerticalUpdate = true;\n\t\tthis.requireHorizontalUpdate = true;\n\t\tthis.debounceRenderCells();\n\t\tthis.updateSliders();\n\t}\n\n}\n"]}
|
package/dist/ui/index.d.ts
CHANGED
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC"}
|
package/dist/ui/index.js
CHANGED
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC","sourcesContent":["export * from './elementCache';\nexport * from './filterLabel';\nexport * from './formulaInput';\nexport * from './grid';\nexport * from './grid.editing';\nexport * from './grid.events';\nexport * from './grid.filtering';\nexport * from './grid.rendering';\nexport * from './grid.selecting';\nexport * from './grid.sorting';\nexport * from './group';\nexport * from './objectHost';\nexport * from './selector';\nexport * from './sparkline';\nexport * from './sortingArrow';\nexport * from './table';\nexport * from './tooltip';\nexport * from './comment';"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC","sourcesContent":["export * from './elementCache';\nexport * from './filterLabel';\nexport * from './formulaInput';\nexport * from './grid';\nexport * from './grid.editing';\nexport * from './grid.events';\nexport * from './grid.filtering';\nexport * from './grid.rendering';\nexport * from './grid.selecting';\nexport * from './grid.sorting';\nexport * from './group';\nexport * from './objectHost';\nexport * from './selector';\nexport * from './sparkline';\nexport * from './sortingArrow';\nexport * from './table';\nexport * from './tooltip';\nexport * from './userColumnWidths';\nexport * from './comment';"]}
|
package/dist/ui/table.d.ts
CHANGED
|
@@ -89,6 +89,12 @@ export declare class Table extends LitElement {
|
|
|
89
89
|
*/
|
|
90
90
|
findNearestTableCellByOffset(x: number, y: number): [TableCell, TableCell?];
|
|
91
91
|
connectedCallback(): void;
|
|
92
|
+
/** Font size of the cell text, set by the style in `render`. */
|
|
93
|
+
get cellFontSize(): number;
|
|
94
|
+
/** Height of a row that has not been resized. */
|
|
95
|
+
get defaultRowHeight(): number;
|
|
96
|
+
/** Line height of the cell text, set by the style in `render`: a default row is one line plus a pixel. */
|
|
97
|
+
get rowLineHeight(): number;
|
|
92
98
|
render: () => import("lit-html").TemplateResult<1>;
|
|
93
99
|
willUpdate(): void;
|
|
94
100
|
updated(): void;
|
package/dist/ui/table.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/ui/table.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,QAAQ,EAAmC,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO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