open-grid 1.6.1 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/dist/ExportProgressView-BYPw8osg.cjs +2 -0
- package/dist/ExportProgressView-Bt5-z7rE.js +2 -0
- package/dist/LcpMergeOrderer-CeP6C6G1.cjs +2 -0
- package/dist/LcpMergeOrderer-Ebwuir-r.js +2 -0
- package/dist/OpenGrid-Bh1NMOcm.cjs +98 -0
- package/dist/OpenGrid-CeXt04ho.js +98 -0
- package/dist/Registry-CrT46EAO.js +2 -0
- package/dist/Registry-DpHOpU5V.cjs +2 -0
- package/dist/XlsxChannel-CuOZ3LQz.js +2 -0
- package/dist/XlsxChannel-DQHLGend.cjs +2 -0
- package/dist/XlsxWorkbookWriter-DixuNGtw.cjs +3 -0
- package/dist/XlsxWorkbookWriter-VgbibI0Z.js +3 -0
- package/dist/fflate-Cs3txMgg.js +2 -0
- package/dist/fflate-G9RAFEgF.cjs +2 -0
- package/dist/index-1OXjJmct.js +2 -0
- package/dist/index-B5V7e4Xc.js +2 -0
- package/dist/index-DbKDox8y.cjs +2 -0
- package/dist/index-HaDoF1HM.cjs +2 -0
- package/dist/open-grid-react.cjs +1 -27
- package/dist/open-grid-react.js +1 -30
- package/dist/open-grid-vue.cjs +1 -31
- package/dist/open-grid-vue.js +1 -33
- package/dist/open-grid.cjs +6 -275
- package/dist/open-grid.js +6 -293
- package/dist/sinks-BCZFMGQJ.cjs +2 -0
- package/dist/sinks-qkBJ5bKn.js +2 -0
- package/dist/types/core/CFRenderBridge.d.ts +5 -1
- package/dist/types/core/CellEditManager.d.ts +26 -2
- package/dist/types/core/CellEventHandler.d.ts +6 -2
- package/dist/types/core/ColumnLayout.d.ts +8 -0
- package/dist/types/core/DataLayer.d.ts +48 -1
- package/dist/types/core/DetailManager.d.ts +43 -2
- package/dist/types/core/ExportManager.d.ts +25 -0
- package/dist/types/core/FindBarManager.d.ts +6 -2
- package/dist/types/core/FlatRowModel.d.ts +61 -3
- package/dist/types/core/FooterManager.d.ts +43 -1
- package/dist/types/core/FormulaController.d.ts +4 -4
- package/dist/types/core/GridComposer.d.ts +11 -1
- package/dist/types/core/GridRenderer.d.ts +84 -19
- package/dist/types/core/GroupTreeManager.d.ts +6 -4
- package/dist/types/core/KeyboardManager.d.ts +3 -2
- package/dist/types/core/MutationService.d.ts +10 -8
- package/dist/types/core/OpenGrid.d.ts +7 -5
- package/dist/types/core/RangeSelectionManager.d.ts +23 -2
- package/dist/types/core/RenderController.d.ts +126 -8
- package/dist/types/core/SortFilterManager.d.ts +10 -2
- package/dist/types/core/VirtualScroll.d.ts +12 -0
- package/dist/types/core/coordinate/CellTextPolicy.d.ts +58 -0
- package/dist/types/core/coordinate/ColumnGeometry.d.ts +60 -0
- package/dist/types/core/coordinate/ColumnWindow.d.ts +40 -0
- package/dist/types/core/coordinate/ColumnWindowPolicy.d.ts +89 -0
- package/dist/types/core/coordinate/ExtraColumns.d.ts +39 -0
- package/dist/types/core/coordinate/RangeRectCalculator.d.ts +35 -0
- package/dist/types/core/coordinate/ViewportHeightJudge.d.ts +28 -0
- package/dist/types/core/coordinate/geometryPorts.d.ts +250 -0
- package/dist/types/core/coordinate/ports.d.ts +5 -0
- package/dist/types/core/domain/footer/FooterValues.d.ts +50 -0
- package/dist/types/core/domain/footer/ports.d.ts +31 -0
- package/dist/types/core/domain/render/RenderPlanner.d.ts +17 -0
- package/dist/types/core/domain/render/RenderRequest.d.ts +91 -0
- package/dist/types/core/domain/render/ports.d.ts +169 -0
- package/dist/types/core/domain/resize/ResizeGesture.d.ts +25 -0
- package/dist/types/core/domain/resize/ResizeHitZone.d.ts +23 -0
- package/dist/types/core/domain/resize/ports.d.ts +64 -0
- package/dist/types/core/domain/sort/ComparisonOrderer.d.ts +11 -0
- package/dist/types/core/domain/sort/LcpMergeOrderer.d.ts +15 -0
- package/dist/types/core/domain/sort/RankIndex.d.ts +74 -0
- package/dist/types/core/domain/sort/SortCostEstimate.d.ts +36 -0
- package/dist/types/core/domain/sort/SortKeyColumn.d.ts +89 -0
- package/dist/types/core/domain/sort/SortKeyStore.d.ts +34 -0
- package/dist/types/core/domain/sort/Sorter.d.ts +54 -0
- package/dist/types/core/domain/sort/SyncSortRunner.d.ts +9 -0
- package/dist/types/core/domain/sort/commonPrefix.d.ts +5 -0
- package/dist/types/core/domain/sort/ports.d.ts +140 -0
- package/dist/types/core/export/ExportProgressView.d.ts +28 -0
- package/dist/types/core/export/channels/XlsxChannel.d.ts +38 -1
- package/dist/types/core/export/channels/XlsxRichTextRun.d.ts +14 -0
- package/dist/types/core/export/channels/XlsxSheetXml.d.ts +19 -0
- package/dist/types/core/export/channels/XlsxStyleEntries.d.ts +80 -0
- package/dist/types/core/export/channels/XlsxStylesRegistry.d.ts +20 -0
- package/dist/types/core/export/channels/XlsxWorkbookWriter.d.ts +20 -0
- package/dist/types/core/export/channels/XlsxXml.d.ts +6 -0
- package/dist/types/core/export/index.d.ts +2 -0
- package/dist/types/core/export/sinks.d.ts +81 -0
- package/dist/types/core/export/types.d.ts +63 -0
- package/dist/types/core/host/archCheck.d.ts +16 -1
- package/dist/types/core/i18n/locales/en.d.ts +6 -0
- package/dist/types/core/i18n/locales/ko.d.ts +6 -0
- package/dist/types/core/i18n/types.d.ts +8 -0
- package/dist/types/core/render/FooterView.d.ts +121 -0
- package/dist/types/core/render/GeometryApplier.d.ts +55 -0
- package/dist/types/core/render/HorizontalReveal.d.ts +26 -0
- package/dist/types/core/render/RangeOverlayAdapter.d.ts +10 -0
- package/dist/types/core/render/RenderScheduler.d.ts +225 -0
- package/dist/types/core/render/ResizeSinkAdapter.d.ts +35 -0
- package/dist/types/core/render/ScrollFollower.d.ts +34 -0
- package/dist/types/core/render/ScrollObserver.d.ts +47 -0
- package/dist/types/core/render/ScrollbarGutter.d.ts +19 -0
- package/dist/types/core/render/body/BodyEventRouter.d.ts +58 -0
- package/dist/types/core/render/body/BodyRowSet.d.ts +28 -0
- package/dist/types/core/render/body/BodyView.d.ts +185 -0
- package/dist/types/core/render/body/CellLocator.d.ts +36 -0
- package/dist/types/core/render/body/CellRegistry.d.ts +24 -0
- package/dist/types/core/render/body/ColumnPaintPlan.d.ts +19 -0
- package/dist/types/core/render/body/ExtraCellPainters.d.ts +20 -0
- package/dist/types/core/render/body/rows/BodyRowContext.d.ts +138 -0
- package/dist/types/core/render/body/rows/DataRowPainter.d.ts +58 -0
- package/dist/types/core/render/body/rows/DetailRowPainter.d.ts +24 -0
- package/dist/types/core/render/body/rows/GroupRowPainter.d.ts +32 -0
- package/dist/types/core/render/body/rows/RowPainterTable.d.ts +24 -0
- package/dist/types/core/render/body/rows/WindowLayout.d.ts +38 -0
- package/dist/types/core/render/dom.d.ts +10 -0
- package/dist/types/core/render/header/HeaderSortIndicator.d.ts +39 -0
- package/dist/types/core/render/header/HeaderView.d.ts +84 -0
- package/dist/types/core/render/header/ResizeHandleBinder.d.ts +110 -0
- package/dist/types/core/render/ports.d.ts +218 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +7 -0
- package/dist/types/core/types.d.ts +94 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/vue/OpenGrid.vue.d.ts +1 -1
- package/dist/xlsx.min-CMvrM6b4.cjs +138 -0
- package/dist/xlsx.min-i_b-4PvU.js +138 -0
- package/package.json +3 -8
- package/dist/OpenGrid-CLk8Vt7j.cjs +0 -7459
- package/dist/OpenGrid-D6YxCsnV.js +0 -7472
- package/dist/Registry-CPJYOqCn.js +0 -74
- package/dist/Registry-D74ZmdDz.cjs +0 -71
- package/dist/index-CeJ-0-80.cjs +0 -260
- package/dist/index-D0DJtKYI.cjs +0 -452
- package/dist/index-DnarQ4eR.js +0 -266
- package/dist/index-VkKgQ506.js +0 -481
- package/dist/xlsx.min-BQ1o3sB6.cjs +0 -11793
- package/dist/xlsx.min-Bbz2ZypC.js +0 -11794
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 찾은 결과. 다음 호출 때 같은 객체를 다시 채우므로 받은 자리에서만 읽는다(마우스 이동마다 객체를 만들지 않으려고).
|
|
3
|
+
*
|
|
4
|
+
* The result; the same object is refilled on the next call, so read it on the spot (no object per mouse move).
|
|
5
|
+
*/
|
|
6
|
+
export interface BodyHit {
|
|
7
|
+
/** 본문 바로 아래 요소(자료 행·묶음 행·세로 병합 마스터·디테일 패널 등). / Direct child of the body. */
|
|
8
|
+
top: HTMLElement;
|
|
9
|
+
/** 그 대상이 든 자료 칸(없으면 null — 여분 칸·자리채움·묶음 행·패널 등). / The data cell, or null. */
|
|
10
|
+
cell: HTMLElement | null;
|
|
11
|
+
/** 행 번호(자료 행·세로 병합 마스터일 때, 그 밖엔 -1). / Row index for data rows and masters, else -1. */
|
|
12
|
+
ri: number;
|
|
13
|
+
/** 컬럼 번호(칸일 때, 그 밖엔 -1). / Column index for cells, else -1. */
|
|
14
|
+
ci: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 본문 요소 하나에 대한 칸 찾기. 그 본문의 칸만 찾는다 — 디테일 패널 안에 든 다른 그리드의 칸은 이 본문의 칸이 아니다.
|
|
18
|
+
*
|
|
19
|
+
* Cell lookup for one body element; only this body's cells count (a grid nested in a detail panel is not this body).
|
|
20
|
+
*/
|
|
21
|
+
export declare class CellLocator {
|
|
22
|
+
private readonly _body;
|
|
23
|
+
/** 행 밖에 붙은 세로 병합 마스터 칸 → 행 번호(그리는 쪽이 채운다). / Row-spanning master → row index (filled by the painter). */
|
|
24
|
+
private readonly _masters;
|
|
25
|
+
private readonly _hit;
|
|
26
|
+
constructor(_body: HTMLElement,
|
|
27
|
+
/** 행 밖에 붙은 세로 병합 마스터 칸 → 행 번호(그리는 쪽이 채운다). / Row-spanning master → row index (filled by the painter). */
|
|
28
|
+
_masters: ReadonlyMap<HTMLElement, number>);
|
|
29
|
+
/**
|
|
30
|
+
* 대상이 이 본문 안이면 결과를, 밖이면 null. 칸은 「본문 바로 아래 행의 자식」이거나 「본문 바로 아래의 세로 병합 마스터」만이다.
|
|
31
|
+
*
|
|
32
|
+
* The hit when the target is inside this body, else null. A cell is either a child of a row directly under the body
|
|
33
|
+
* or a row-spanning master directly under the body.
|
|
34
|
+
*/
|
|
35
|
+
locate(target: EventTarget | null): BodyHit | null;
|
|
36
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ICellRegistry } from '../ports.js';
|
|
2
|
+
/**
|
|
3
|
+
* 지금 본문 DOM 에 붙어 있는 칸 요소의 유일한 지도(행 번호 → 컬럼 번호 → 칸 요소).
|
|
4
|
+
* 칸을 찾는 길(`GridRenderer.getCellEl`, 편집·범위 선택)과 칸을 그리는 쪽이 같은 지도를 보게 하려고 한 객체에 모았다.
|
|
5
|
+
* 행 지도를 통째로 넣는 `setRow` 는 「행을 다 그린 뒤에야 그 행의 칸이 지도에 보인다」는 지금 시점을 지키려고 둔다.
|
|
6
|
+
*
|
|
7
|
+
* The single map of cell elements currently attached to the body DOM (row index → column index → cell element).
|
|
8
|
+
* Kept in one object so the lookup path (`GridRenderer.getCellEl`, editing, range selection) and the painting side
|
|
9
|
+
* see the same map. `setRow` replaces a whole row map so a row's cells become visible only after the row is fully
|
|
10
|
+
* painted, which is the existing timing.
|
|
11
|
+
*/
|
|
12
|
+
export declare class CellRegistry implements ICellRegistry {
|
|
13
|
+
private readonly _rows;
|
|
14
|
+
/** 칸 하나를 넣는다(같은 자리에 있던 요소는 바뀐다). / Put one cell (replaces any element at the same spot). */
|
|
15
|
+
set(ri: number, ci: number, el: HTMLElement): void;
|
|
16
|
+
/** 한 행의 칸 지도를 통째로 넣는다(옛 행 지도는 버린다). / Replace a whole row's cell map. */
|
|
17
|
+
setRow(ri: number, cols: Map<number, HTMLElement>): void;
|
|
18
|
+
get(ri: number, ci: number): HTMLElement | undefined;
|
|
19
|
+
cellsOfColumn(ci: number): Iterable<HTMLElement>;
|
|
20
|
+
dropRow(ri: number): void;
|
|
21
|
+
dropColumn(ri: number, ci: number): void;
|
|
22
|
+
clear(): void;
|
|
23
|
+
get size(): number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CellRenderer } from '../../renderers/CellRenderer.js';
|
|
2
|
+
import { ColumnDef } from '../../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* 한 컬럼의 그리기 준비물(그리기 한 번에 컬럼당 하나).
|
|
5
|
+
*
|
|
6
|
+
* Paint preparation for one column (one per column per paint).
|
|
7
|
+
*/
|
|
8
|
+
export declare class ColumnPaintPlan {
|
|
9
|
+
private readonly _col;
|
|
10
|
+
/** 내장 렌더러면 컬럼 칸들이 나눠 쓰는 인스턴스, 사용자 팩토리면 null. / Shared built-in renderer, or null for a user factory. */
|
|
11
|
+
private readonly _shared;
|
|
12
|
+
constructor(_col: ColumnDef);
|
|
13
|
+
/**
|
|
14
|
+
* 칸 하나에 쓸 렌더러 — 내장이면 나눠 쓰는 인스턴스, 사용자 팩토리면 이번 칸을 위해 새로 부른 것.
|
|
15
|
+
*
|
|
16
|
+
* The renderer for one cell — the shared built-in instance, or a fresh one from the user factory.
|
|
17
|
+
*/
|
|
18
|
+
renderer(): CellRenderer;
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RendererCallbacks } from '../../GridRenderer.js';
|
|
2
|
+
import { ExtraColumnId } from '../../coordinate/geometryPorts.js';
|
|
3
|
+
import { BodyRowContext } from './rows/BodyRowContext.js';
|
|
4
|
+
type Translate = (key: string, params?: Record<string, string | number>) => string;
|
|
5
|
+
/**
|
|
6
|
+
* 여분 칸 하나의 내용과 고정 위치를 그린다. 그리기 한 번에 칸 하나씩 행에 붙인다(붙일 것이 없으면 아무것도 안 함).
|
|
7
|
+
*
|
|
8
|
+
* Paints one extra cell (content + sticky position) and appends it to the row; does nothing when there is nothing to draw.
|
|
9
|
+
*/
|
|
10
|
+
export interface ExtraCellPainter {
|
|
11
|
+
readonly id: ExtraColumnId;
|
|
12
|
+
paint(row: HTMLElement, ri: number, rowData: any, ctx: BodyRowContext): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 다섯 그리개를 여분 컬럼 이름으로 찾는 표(BodyView 당 한 번 만든다).
|
|
16
|
+
*
|
|
17
|
+
* Table of the five painters keyed by extra-column id (built once per body view).
|
|
18
|
+
*/
|
|
19
|
+
export declare function createExtraCellPainters(cbs: RendererCallbacks, t: Translate): Readonly<Record<ExtraColumnId, ExtraCellPainter>>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { RowDragDrop } from '../../../RowDragDrop.js';
|
|
2
|
+
import { DataLayer } from '../../../DataLayer.js';
|
|
3
|
+
import { MergeEngine } from '../../../MergeEngine.js';
|
|
4
|
+
import { RenderOptions, DetailRenderContext } from '../../../GridRenderer.js';
|
|
5
|
+
import { IColumnGeometry, ExtraColumnId, IColumnWindow } from '../../../coordinate/geometryPorts.js';
|
|
6
|
+
import { WindowLayout } from './WindowLayout.js';
|
|
7
|
+
import { RowKind, IGeometryApplier } from '../../ports.js';
|
|
8
|
+
import { ColumnPaintPlan } from '../ColumnPaintPlan.js';
|
|
9
|
+
/**
|
|
10
|
+
* 본문 한 번 그리기 동안의 값. 앞쪽 읽기 전용 칸은 그리기 하나 동안 그대로이고, 뒤쪽 「행마다」 칸은 자료 행 그리개가 행을 시작할 때 채운다.
|
|
11
|
+
*
|
|
12
|
+
* Values for one body paint. Read-only fields stay fixed for the paint; the "per row" fields are filled by the
|
|
13
|
+
* data-row painter when it starts a row.
|
|
14
|
+
*/
|
|
15
|
+
export interface BodyRowContext {
|
|
16
|
+
readonly opts: RenderOptions;
|
|
17
|
+
readonly data: DataLayer<any>;
|
|
18
|
+
readonly leaves: any[];
|
|
19
|
+
readonly startIndex: number;
|
|
20
|
+
readonly endIndex: number;
|
|
21
|
+
readonly offsetY: number;
|
|
22
|
+
readonly selectedRows: Set<number>;
|
|
23
|
+
readonly checkedRows: Set<number>;
|
|
24
|
+
/**
|
|
25
|
+
* 묶음·나무·디테일 합성 행 배열(없으면 null — 자료 행은 DataLayer 에서 읽는다).
|
|
26
|
+
*
|
|
27
|
+
* Composed group/tree/detail rows (null when absent — data rows are then read from the DataLayer).
|
|
28
|
+
*/
|
|
29
|
+
readonly groupFlatRows: Array<any> | null;
|
|
30
|
+
readonly mergeEngine: MergeEngine | undefined;
|
|
31
|
+
readonly detailApi: DetailRenderContext | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* 디테일 펼침 전용 칸을 그리나(디테일 켜짐 + 펼침 단추가 전용 칸 모드).
|
|
34
|
+
*
|
|
35
|
+
* Whether the dedicated detail-expander cell is drawn (detail on and the expander in its own column).
|
|
36
|
+
*/
|
|
37
|
+
readonly detailColOn: boolean;
|
|
38
|
+
readonly auto: boolean;
|
|
39
|
+
readonly frozenCount: number;
|
|
40
|
+
readonly geometry: IColumnGeometry;
|
|
41
|
+
readonly totalColWidth: number;
|
|
42
|
+
/**
|
|
43
|
+
* 그릴 컬럼 창과 그 그리기 차례(구간·빈칸). 창 옮김 때 본문 뷰가 새 창으로 갈아 끼운다.
|
|
44
|
+
*
|
|
45
|
+
* The column window to paint and its order (runs and gaps); the body view swaps them on a window shift.
|
|
46
|
+
*/
|
|
47
|
+
columns: IColumnWindow;
|
|
48
|
+
layout: WindowLayout;
|
|
49
|
+
/**
|
|
50
|
+
* 켜진 여분 컬럼과 그 고정 left·폭 — 그리기당 한 번 기하에서 읽어 둔다. 보이는 행마다 여분 칸이 같은 값을 쓰므로
|
|
51
|
+
* 행마다 기하에 다시 묻지 않으려는 것.
|
|
52
|
+
*
|
|
53
|
+
* Enabled extra columns and their sticky lefts/widths, read from the geometry once per paint so the same
|
|
54
|
+
* values are not re-asked for every visible row.
|
|
55
|
+
*/
|
|
56
|
+
readonly extraIds: readonly ExtraColumnId[];
|
|
57
|
+
readonly extraLeft: Readonly<Record<ExtraColumnId, number>>;
|
|
58
|
+
/** 여분 컬럼 폭 합. / Sum of extra-column widths. */
|
|
59
|
+
readonly extraWidth: number;
|
|
60
|
+
readonly dragWidth: number;
|
|
61
|
+
readonly detailWidth: number;
|
|
62
|
+
/**
|
|
63
|
+
* 세로 병합 마스터 칸처럼 행 밖(본문 바로 아래)에 붙는 요소를 받는 곳.
|
|
64
|
+
*
|
|
65
|
+
* Receives elements placed outside the row (directly under the body), such as row-spanning master cells.
|
|
66
|
+
*/
|
|
67
|
+
readonly frag: DocumentFragment;
|
|
68
|
+
/**
|
|
69
|
+
* 컬럼마다 그리기 준비물(그리기당 컬럼 하나씩 — 칸마다 렌더러를 만들지 않으려고).
|
|
70
|
+
*
|
|
71
|
+
* Per-column paint preparation (one per column per paint, so renderers are not built per cell).
|
|
72
|
+
*/
|
|
73
|
+
readonly plans: readonly ColumnPaintPlan[];
|
|
74
|
+
/**
|
|
75
|
+
* 행 밖에 붙는 세로 병합 마스터 칸 → 행 번호. 이벤트 위임이 칸을 찾을 때 읽는다(DOM 에 속성을 더하지 않으려고).
|
|
76
|
+
*
|
|
77
|
+
* Row-spanning master cell → row index, read by event delegation to locate it (so no DOM attribute is added).
|
|
78
|
+
*/
|
|
79
|
+
readonly masters: Map<HTMLElement, number>;
|
|
80
|
+
/**
|
|
81
|
+
* 묶음 행 요소 → 묶음 열쇠. 묶음 행 click 을 위임에서 받아 펴고 접을 때 읽는다.
|
|
82
|
+
*
|
|
83
|
+
* Group row element → group key, read when the delegated click toggles the group.
|
|
84
|
+
*/
|
|
85
|
+
readonly groupKeys: Map<HTMLElement, string>;
|
|
86
|
+
/**
|
|
87
|
+
* 나무 펼침 아이콘 → 노드 번호. 아이콘 누르기·Enter/Space 를 위임에서 받아 펴고 접을 때 읽는다.
|
|
88
|
+
*
|
|
89
|
+
* Tree toggle icon → node id, read when the delegated click/Enter/Space toggles the node.
|
|
90
|
+
*/
|
|
91
|
+
readonly treeIcons: Map<Element, unknown>;
|
|
92
|
+
/**
|
|
93
|
+
* 칸이 아닌 폭 자리(병합 칸·자리채움·묶음 칸·디테일 패널·막대)를 기억시킬 곳. 아직 없으면(뷰를 따로 만든 시험) 등록을 건너뛴다.
|
|
94
|
+
* 등록은 그려진 DOM 을 바꾸지 않는다 — 나중에 컬럼 폭이 바뀔 때 그 자리만 다시 쓰려고 기억시키는 것.
|
|
95
|
+
*
|
|
96
|
+
* Where non-cell width spots (merged cells, placeholders, group cells, detail panels, bars) are registered;
|
|
97
|
+
* skipped when absent (a view built alone in a test). Registering never changes the DOM — it only lets those
|
|
98
|
+
* spots be rewritten later when a column width changes.
|
|
99
|
+
*/
|
|
100
|
+
readonly applier: IGeometryApplier | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* 조건부 서식 막대 알림(그리기당 하나 — 칸마다 함수를 만들지 않으려고 지금 칸 번호·병합 폭을 아래 두 칸에서 읽는다).
|
|
103
|
+
*
|
|
104
|
+
* Conditional-format bar callback (one per paint; reads the current cell index/span from the two fields below
|
|
105
|
+
* instead of creating a function per cell).
|
|
106
|
+
*/
|
|
107
|
+
trackBar: ((bar: HTMLElement, ratio: number) => void) | undefined;
|
|
108
|
+
rowState: string;
|
|
109
|
+
/**
|
|
110
|
+
* 고정 칸 배경(상태·선택 색을 반영).
|
|
111
|
+
*
|
|
112
|
+
* Background for sticky cells (reflects row-state and selection colours).
|
|
113
|
+
*/
|
|
114
|
+
bg: string;
|
|
115
|
+
dnd: RowDragDrop | null;
|
|
116
|
+
/**
|
|
117
|
+
* 끌기 옵션은 켜졌는데 손잡이를 못 그리는 행에서 뒤 여분 칸을 당기는 폭(그 밖엔 0).
|
|
118
|
+
*
|
|
119
|
+
* How far later extra cells shift left when draggable is on but no handle can be drawn (0 otherwise).
|
|
120
|
+
*/
|
|
121
|
+
dragGap: number;
|
|
122
|
+
/** 행 자료와 나무 노드(나무 행이 아니면 null). / Row data and tree node (null when not a tree row). */
|
|
123
|
+
rowData: any;
|
|
124
|
+
treeNode: any;
|
|
125
|
+
/** 자료 행 앞머리 여분 칸 수(한 그리기 안에서는 모든 자료 행이 같다). / Number of leading extra cells in a data row. */
|
|
126
|
+
extraCount: number;
|
|
127
|
+
cellCi: number;
|
|
128
|
+
cellSpan: number;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* 행 종류 하나를 그린다(종류마다 BodyView 당 하나). 그린 행 요소를 돌려주고, 그릴 것이 없으면 null.
|
|
132
|
+
*
|
|
133
|
+
* Paints one row kind (one instance per kind per BodyView). Returns the row element, or null when nothing is drawn.
|
|
134
|
+
*/
|
|
135
|
+
export interface BodyRowPainter {
|
|
136
|
+
readonly kind: RowKind;
|
|
137
|
+
paint(ri: number, item: any, ctx: BodyRowContext): HTMLElement | null;
|
|
138
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AppearanceResolver } from '../../../AppearanceResolver.js';
|
|
2
|
+
import { RendererCallbacks } from '../../../GridRenderer.js';
|
|
3
|
+
import { CellRegistry } from '../CellRegistry.js';
|
|
4
|
+
import { ExtraColumnId, IColumnWindow } from '../../../coordinate/geometryPorts.js';
|
|
5
|
+
import { ExtraCellPainter } from '../ExtraCellPainters.js';
|
|
6
|
+
import { BodyRowContext, BodyRowPainter } from './BodyRowContext.js';
|
|
7
|
+
/**
|
|
8
|
+
* 자료 행 하나를 그린다. 자료가 없으면(합성 배열 끝 너머 등) 그리지 않는다.
|
|
9
|
+
*
|
|
10
|
+
* Paints one data row; returns null when there is no row data.
|
|
11
|
+
*/
|
|
12
|
+
export declare class DataRowPainter implements BodyRowPainter {
|
|
13
|
+
private readonly _ap;
|
|
14
|
+
private readonly _cbs;
|
|
15
|
+
private readonly _cellMap;
|
|
16
|
+
private readonly _tr;
|
|
17
|
+
private readonly _extras;
|
|
18
|
+
readonly kind: "data";
|
|
19
|
+
constructor(_ap: AppearanceResolver, _cbs: RendererCallbacks, _cellMap: CellRegistry, _tr: (key: string, params?: Record<string, string | number>) => string, _extras: Readonly<Record<ExtraColumnId, ExtraCellPainter>>);
|
|
20
|
+
private _t;
|
|
21
|
+
/** 렌더러에 넘기는 낱말 해석(그리개당 하나 — 칸마다 함수를 만들지 않으려고). / Translator handed to renderers (one per painter). */
|
|
22
|
+
private readonly _tFn;
|
|
23
|
+
paint(ri: number, flatItem: any, ctx: BodyRowContext): HTMLElement | null;
|
|
24
|
+
/**
|
|
25
|
+
* 창 차례(칸 구간·빈칸)대로 자료 칸을 행에 붙인다. 창이 전 컬럼이면 컬럼 0 부터 끝까지 — 걸음 전과 같은 DOM.
|
|
26
|
+
* 오른쪽 빈칸이 있을 때만 그 앞 칸에 `og-cell--last` 를 단다(창이 전 컬럼이면 달지 않음).
|
|
27
|
+
*
|
|
28
|
+
* Appends the data cells in window order (runs and gaps). A full window is columns 0..n-1 — the same DOM as before.
|
|
29
|
+
* `og-cell--last` goes on the cell before the right gap only when there is one.
|
|
30
|
+
*/
|
|
31
|
+
private _paintColumns;
|
|
32
|
+
/**
|
|
33
|
+
* 창이 바뀔 때 행을 다시 만들지 않고 칸만 고친다: 나간 컬럼 칸을 떼고(지도에서도), 빈칸을 다시 놓고, 들어온 컬럼 칸만 새로 만들어
|
|
34
|
+
* 제자리에 끼운다. 그대로인 칸은 손대지 않는다(편집기·포커스·사용자 렌더러가 단 리스너가 산다). 들어온 칸은 늘 새로 그린다.
|
|
35
|
+
* `ctx.layout`·`ctx.columns` 는 이미 새 창이다. 행마다 새 배열·함수를 만들지 않는다.
|
|
36
|
+
*
|
|
37
|
+
* On a window change, fixes only the cells: removes cells of columns that left (and from the map), re-places the
|
|
38
|
+
* gaps and creates only the entering cells in place. Kept cells are untouched; entering cells are always fresh.
|
|
39
|
+
*/
|
|
40
|
+
shift(rowEl: HTMLElement, ri: number, flatItem: any, from: IColumnWindow, ctx: BodyRowContext, onRemove: (cell: HTMLElement) => void): void;
|
|
41
|
+
/** 창 옮김에서 떼어 둔 빈칸(그리개당 하나를 돌려씀 — 행마다 배열을 만들지 않음). / Gap pool, one per painter. */
|
|
42
|
+
private readonly _gapPool;
|
|
43
|
+
/** 창 옮김에서 칸을 잠깐 받는 그릇(그리개당 하나 — 칸마다 만들지 않음). / Scratch fragment, one per painter. */
|
|
44
|
+
private readonly _buf;
|
|
45
|
+
/**
|
|
46
|
+
* 행 하나의 값(자료·나무 노드·행 상태·고정 칸 배경)을 문맥에 담는다. 자료가 없으면 false.
|
|
47
|
+
*
|
|
48
|
+
* Puts one row's values (data, tree node, row state, sticky background) into the context; false without data.
|
|
49
|
+
*/
|
|
50
|
+
private _rowValues;
|
|
51
|
+
/**
|
|
52
|
+
* 컬럼 하나의 칸(또는 병합으로 가려진 자리채움)을 만들어 target 에 붙인다. 행 값은 문맥에서 읽는다.
|
|
53
|
+
* 지도: colMap 을 주면 거기에(행을 다 그린 뒤 통째로 넣음), 없으면 칸 지도에 바로.
|
|
54
|
+
*
|
|
55
|
+
* Builds one column's cell (or merge placeholder) into target, reading row values from the context.
|
|
56
|
+
*/
|
|
57
|
+
private _cell;
|
|
58
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AppearanceResolver } from '../../../AppearanceResolver.js';
|
|
2
|
+
import { BodyRowContext, BodyRowPainter } from './BodyRowContext.js';
|
|
3
|
+
/**
|
|
4
|
+
* 디테일 머리 행 → 전체 폭 패널. 디테일 배선이 없으면 아무것도 안 그린다(패널 없이 건너뜀).
|
|
5
|
+
* 보이는 구간 위에서 시작해 구간을 덮는 패널도 이 그리개로 그린다(ri 가 시작 행보다 작으면 top 이 음수 쪽).
|
|
6
|
+
*
|
|
7
|
+
* Detail head → full-width panel; nothing without detail wiring. Also used for a panel that starts above the
|
|
8
|
+
* visible range and covers it (ri below the start index gives a top above the offset).
|
|
9
|
+
*/
|
|
10
|
+
export declare class DetailRowPainter implements BodyRowPainter {
|
|
11
|
+
private readonly _ap;
|
|
12
|
+
readonly kind: "detail-head";
|
|
13
|
+
constructor(_ap: AppearanceResolver);
|
|
14
|
+
paint(ri: number, head: any, ctx: BodyRowContext): HTMLElement | null;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 디테일 채움 행 — 머리의 패널이 이 띠를 덮으므로 그릴 것이 없다.
|
|
18
|
+
*
|
|
19
|
+
* Detail filler row — covered by the head's panel, so nothing to draw.
|
|
20
|
+
*/
|
|
21
|
+
export declare class DetailFillerRowPainter implements BodyRowPainter {
|
|
22
|
+
readonly kind: "detail-filler";
|
|
23
|
+
paint(): HTMLElement | null;
|
|
24
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AppearanceResolver } from '../../../AppearanceResolver.js';
|
|
2
|
+
import { BodyRowContext, BodyRowPainter } from './BodyRowContext.js';
|
|
3
|
+
/**
|
|
4
|
+
* 묶음 머리 행 하나를 그린다(누르면 펼침/접힘).
|
|
5
|
+
*
|
|
6
|
+
* Paints one group header row (click toggles it).
|
|
7
|
+
*/
|
|
8
|
+
export declare class GroupRowPainter implements BodyRowPainter {
|
|
9
|
+
private readonly _ap;
|
|
10
|
+
private readonly _tr;
|
|
11
|
+
readonly kind: "group";
|
|
12
|
+
constructor(_ap: AppearanceResolver, _tr: (key: string, params?: Record<string, string | number>) => string);
|
|
13
|
+
private _t;
|
|
14
|
+
paint(ri: number, flatItem: any, ctx: BodyRowContext): HTMLElement | null;
|
|
15
|
+
/**
|
|
16
|
+
* 창이 바뀔 때: 묶음 행의 컬럼 몫(여분 자리 뒤)만 걷어 새 창으로 다시 놓는다. 묶음 행은 화면에 적고 칸에 상태가 없어
|
|
17
|
+
* (편집기·사용자 렌더러 없음) 컬럼 몫을 통째로 다시 놓아도 같은 창으로 그린 것과 같다. 행 요소는 그대로.
|
|
18
|
+
*
|
|
19
|
+
* On a window change, replaces only the column part (after the extra spot) with the new window. Group rows are few
|
|
20
|
+
* and their cells hold no state, so re-laying the column part equals painting with the new window. The row stays.
|
|
21
|
+
*/
|
|
22
|
+
shift(rowEl: HTMLElement, flatItem: any, ctx: BodyRowContext): void;
|
|
23
|
+
/**
|
|
24
|
+
* 컬럼 칸과 빈칸을 창 차례대로 붙이고 폭 자리를 기억시킨다. 마지막 칸 구간은 행 하나로 등록하고(칸이 컬럼 순서대로 하나씩
|
|
25
|
+
* 붙으므로), 그 앞 구간(고정 컬럼)은 칸마다 — 등록기는 한 행에 행 등록을 하나만 들므로. 빈칸은 빈칸 등록.
|
|
26
|
+
* 묶음 이름은 창과 무관하게 「소계가 없는 첫 컬럼」에 둔다(전 컬럼을 그릴 때와 같은 칸). 그 컬럼이 창 밖이면 행의 aria-label 로 읽히게 한다.
|
|
27
|
+
*
|
|
28
|
+
* Appends cells and gaps in window order and registers width spots: the last run as one row registration, earlier
|
|
29
|
+
* runs (frozen) per cell, gaps as gaps. The label column is fixed regardless of the window.
|
|
30
|
+
*/
|
|
31
|
+
private _columns;
|
|
32
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RowKind } from '../../ports.js';
|
|
2
|
+
import { BodyRowPainter } from './BodyRowContext.js';
|
|
3
|
+
/**
|
|
4
|
+
* 행 종류 → 그리개 표. 종류마다 그리개 하나(인스턴스는 BodyView 가 한 번 만든다).
|
|
5
|
+
*
|
|
6
|
+
* Row kind → painter table; one painter per kind, created once by the body view.
|
|
7
|
+
*/
|
|
8
|
+
export declare class RowPainterTable {
|
|
9
|
+
private readonly _byKind;
|
|
10
|
+
constructor(painters: readonly BodyRowPainter[]);
|
|
11
|
+
/**
|
|
12
|
+
* 합성 행 배열의 한 칸이 어떤 종류의 행인가. 합성 배열이 없을 때(null)·끝을 넘은 칸(undefined)은 자료 행으로 본다 —
|
|
13
|
+
* 자료 행 그리개가 자료를 못 찾으면 그리지 않는다. 판정 순서는 채움 → 디테일 머리 → 묶음 → 자료(나무 노드 포함).
|
|
14
|
+
*
|
|
15
|
+
* Which kind of row a composed item is. null/undefined count as data (the data painter skips missing rows).
|
|
16
|
+
*/
|
|
17
|
+
kindOf(item: unknown): RowKind;
|
|
18
|
+
/**
|
|
19
|
+
* 그 종류의 그리개. 모르는 종류면 던진다 — 행이 소리 없이 사라지는 것보다 낫다.
|
|
20
|
+
*
|
|
21
|
+
* The painter for a kind; throws on an unknown kind rather than silently dropping rows.
|
|
22
|
+
*/
|
|
23
|
+
painterFor(kind: RowKind): BodyRowPainter;
|
|
24
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IColumnWindow } from '../../../coordinate/geometryPorts.js';
|
|
2
|
+
import { BodyRowContext } from './BodyRowContext.js';
|
|
3
|
+
/** 차례의 한 토막 — 칸 구간 또는 빈칸(둘 다 닫힌 구간 [from, to]). / One piece: a cell run or a gap (closed range). */
|
|
4
|
+
export interface WindowPiece {
|
|
5
|
+
readonly gap: boolean;
|
|
6
|
+
readonly from: number;
|
|
7
|
+
readonly to: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 창 하나의 그리기 차례.
|
|
11
|
+
*
|
|
12
|
+
* Paint order of one window.
|
|
13
|
+
*/
|
|
14
|
+
export interface WindowLayout {
|
|
15
|
+
readonly pieces: readonly WindowPiece[];
|
|
16
|
+
/** 오른쪽 빈칸 바로 앞 칸의 컬럼(오른쪽 빈칸이 없으면 -1 — 창이 전 컬럼이면 늘 -1). / Column just before the right gap, or -1. */
|
|
17
|
+
readonly lastBeforeGap: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 창의 구간과 빈칸을 컬럼 차례대로 섞는다(DOM 차례 = 컬럼 차례 — 고정 칸 뒤에 빈칸이 와야 sticky 가 산다).
|
|
21
|
+
*
|
|
22
|
+
* Interleaves runs and gaps in column order (DOM order = column order, gaps after the frozen cells).
|
|
23
|
+
*/
|
|
24
|
+
export declare function layoutOf(w: IColumnWindow): WindowLayout;
|
|
25
|
+
/**
|
|
26
|
+
* 빈칸 하나 — 칸 요소가 아니다(`og-cell`·`role`·`aria-colindex` 없음 — 칸을 찾는 길이 빈칸을 칸으로 오인하지 않게).
|
|
27
|
+
* 폭은 기하에서 읽고 폭 쓰는 객체에 기억시켜, 끄는 동안 창 밖 컬럼 폭이 바뀌면 같은 프레임에 따라온다.
|
|
28
|
+
*
|
|
29
|
+
* A gap: not a cell (no `og-cell`/`role`/`aria-colindex`). Its width comes from the geometry and is registered so it
|
|
30
|
+
* follows column-width changes outside the window in the same frame.
|
|
31
|
+
*/
|
|
32
|
+
export declare function paintGap(from: number, to: number, ctx: BodyRowContext): HTMLElement;
|
|
33
|
+
/**
|
|
34
|
+
* 이미 있는 빈칸 요소를 새 구간으로 다시 쓴다(창 옮김에서 행마다 빈칸을 새로 만들지 않으려고). 폭은 기하에서, 등록은 갈아 끼움.
|
|
35
|
+
*
|
|
36
|
+
* Reuses an existing gap element for a new range (no new gap per row on a shift); width from the geometry, registration replaced.
|
|
37
|
+
*/
|
|
38
|
+
export declare function reuseGap(el: HTMLElement, from: number, to: number, ctx: BodyRowContext): HTMLElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 태그(+선택 className)로 요소를 만든다. / Create an element from a tag (+optional className).
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare function _el(tag: string, className?: string): HTMLElement;
|
|
6
|
+
/**
|
|
7
|
+
* 요소 style 에 부분 스타일을 병합한다. / Merge a partial style bag into an element's style.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function _style(el: HTMLElement, styles: Partial<CSSStyleDeclaration>): void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IHeaderSortIndicator } from '../ports.js';
|
|
2
|
+
type Dir = 'asc' | 'desc';
|
|
3
|
+
/**
|
|
4
|
+
* 머리글 칸들의 정렬 표시를 고치는 유일한 곳. 머리글을 그린 쪽이 칸마다 bind 하고, 정렬이 끝나면 update 한 번.
|
|
5
|
+
*
|
|
6
|
+
* The single place that patches sort marks on header cells; the header painter binds each cell, and update()
|
|
7
|
+
* runs once when a sort finishes.
|
|
8
|
+
*/
|
|
9
|
+
export declare class HeaderSortIndicator implements IHeaderSortIndicator {
|
|
10
|
+
private _bound;
|
|
11
|
+
private _pressed;
|
|
12
|
+
/**
|
|
13
|
+
* 머리글 칸 하나를 묶는다. 지금 그 칸에 그려진 방향은 칸에서 읽는다(머리글을 그린 쪽이 이미 그렸으므로).
|
|
14
|
+
* Binds one header cell; its current direction is read from the cell (the painter already drew it).
|
|
15
|
+
*/
|
|
16
|
+
bind(th: HTMLElement, field: string, sortable: boolean): void;
|
|
17
|
+
/** 끝나는 프레임에 한 번 — 방향이 바뀐 칸만 쓴다(안 바뀐 칸은 읽기·쓰기 0). */
|
|
18
|
+
update(sortList: readonly {
|
|
19
|
+
readonly field: string;
|
|
20
|
+
readonly dir: Dir;
|
|
21
|
+
}[]): void;
|
|
22
|
+
/** 누른 칸에 눌림 표시(og-sorting). null 이면 지운다. / Pressed mark on the field's cells; null clears it. */
|
|
23
|
+
setPressed(field: string | null): void;
|
|
24
|
+
/**
|
|
25
|
+
* 오래 걸리는 정렬이 진행 중인 칸에 aria-busy. 진행 막대·다음 방향 표시는 조각 정렬이 들어올 때 이 메서드 안에서 더한다.
|
|
26
|
+
* aria-busy on the cells of a long-running sort; the progress bar and next-direction hint belong here when sliced sorting lands.
|
|
27
|
+
*/
|
|
28
|
+
setBusy(field: string, busy: boolean, _nextDir?: Dir): void;
|
|
29
|
+
/** 묶음을 모두 푼다(머리글을 통째로 다시 그리기 전). 칸은 건드리지 않는다. / Drops all bindings without touching cells. */
|
|
30
|
+
release(): void;
|
|
31
|
+
/**
|
|
32
|
+
* 머리글을 처음 그릴 때와 같은 모양으로 고친다: og-sorted 는 클래스 끝에, 화살표는 제목 글자 바로 뒤에,
|
|
33
|
+
* aria-sort 는 정렬 가능한 칸에만.
|
|
34
|
+
* Patches to the fresh-paint shape: og-sorted appended, the arrow right after the label, aria-sort only when sortable.
|
|
35
|
+
*/
|
|
36
|
+
private _paint;
|
|
37
|
+
private _icon;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { AppearanceResolver } from '../../AppearanceResolver.js';
|
|
2
|
+
import { ColumnDef, SortItem } from '../../types.js';
|
|
3
|
+
import { RenderOptions, RendererCallbacks } from '../../GridRenderer.js';
|
|
4
|
+
import { ResizeHandleBinder } from './ResizeHandleBinder.js';
|
|
5
|
+
import { IColumnGeometry } from '../../coordinate/geometryPorts.js';
|
|
6
|
+
import { IGeometryApplier, IHeaderSortIndicator } from '../ports.js';
|
|
7
|
+
/**
|
|
8
|
+
* 머리글 표(여분 th·잎/묶음 th·정렬과 필터 표시·aria·키보드 이동·끌어 옮기기·너비 손잡이)를 만드는 객체.
|
|
9
|
+
* 머리글을 그리는 일을 렌더러 앞면에서 떼어 내 한 곳에 두려고 만들었다. 지금은 부를 때마다 머리글 표를 통째로 다시 만든다.
|
|
10
|
+
* 너비 손잡이의 동작은 `ResizeHandleBinder` 에 맡긴다.
|
|
11
|
+
*
|
|
12
|
+
* Builds the header table (extra ths, leaf/group ths, sort and filter marks, aria, keyboard moves, drag reorder,
|
|
13
|
+
* width handles). Split out of the renderer facade so header painting lives in one place. For now each call rebuilds
|
|
14
|
+
* the whole header table. Width-handle behaviour is delegated to `ResizeHandleBinder`.
|
|
15
|
+
*/
|
|
16
|
+
export declare class HeaderView {
|
|
17
|
+
private readonly _header;
|
|
18
|
+
private readonly _ap;
|
|
19
|
+
private readonly _cbs;
|
|
20
|
+
private readonly _resize;
|
|
21
|
+
private readonly _tr;
|
|
22
|
+
constructor(_header: HTMLElement, _ap: AppearanceResolver, _cbs: RendererCallbacks, _resize: ResizeHandleBinder, _tr: (key: string, params?: Record<string, string | number>) => string);
|
|
23
|
+
private _geometry;
|
|
24
|
+
/**
|
|
25
|
+
* 컬럼 기하를 받는다(그리드가 한 번 넘겨 준다). 머리글의 폭·고정 left·전체 폭은 이 기하에 묻는다 —
|
|
26
|
+
* 같은 계산을 머리글이 따로 들고 있으면 본문·푸터와 어긋나기 때문이다. 받기 전에는 그리지 않는 것으로 본다.
|
|
27
|
+
*
|
|
28
|
+
* Receives the column geometry once from the grid. Header widths, frozen lefts and total width are asked of it so
|
|
29
|
+
* the header can never drift from body and footer. The view is not painted before this is called.
|
|
30
|
+
*/
|
|
31
|
+
setGeometry(geometry: IColumnGeometry): void;
|
|
32
|
+
/** 머리글 table 의 오른쪽 끝 여백(px) — 0 이면 아무것도 안 씀. */
|
|
33
|
+
private _gutter;
|
|
34
|
+
private _table;
|
|
35
|
+
/**
|
|
36
|
+
* 본문 세로 스크롤바 폭만큼의 끝 여백을 받는다 — 머리글의 가로 스크롤 끝이 본문 끝과 같아져 오른쪽 끝까지 긁어도 선이 맞는다.
|
|
37
|
+
* 0 이면 여백을 두지 않는다(스크롤바가 없는·겹쳐 뜨는 환경의 DOM 은 그대로). 다시 그릴 때도 같은 값을 쓴다.
|
|
38
|
+
*
|
|
39
|
+
* Receives the end gutter (the body's vertical scrollbar width) so the header can scroll as far right as the body.
|
|
40
|
+
* Zero writes nothing (DOM unchanged where scrollbars take no space); repaints reuse the value.
|
|
41
|
+
*/
|
|
42
|
+
setEndGutter(px: number): void;
|
|
43
|
+
private _applier;
|
|
44
|
+
private _sort;
|
|
45
|
+
/**
|
|
46
|
+
* 정렬 표시만 고치는 객체를 받는다(그리드가 한 번 넘겨 준다). 정렬이 바뀔 때 머리글을 통째로 다시 만들지 않고
|
|
47
|
+
* 그 객체가 화살표·클래스·aria 만 고치게, 그릴 때마다 잎 칸을 묶어 준다. 받기 전에는 묶지 않고 그리기만 한다.
|
|
48
|
+
*
|
|
49
|
+
* Receives the sort-indicator object; each paint binds the leaf cells to it so a sort change patches only the arrow,
|
|
50
|
+
* class and aria instead of rebuilding the header. Without it, painting simply skips binding.
|
|
51
|
+
*/
|
|
52
|
+
setSortIndicator(sort: IHeaderSortIndicator): void;
|
|
53
|
+
/** 머리글 한 판의 리스너 묶음 — 다시 그리거나 지울 때 한 번에 뗀다(떼어 낸 th 에 콜백이 남지 않게). */
|
|
54
|
+
private _listeners;
|
|
55
|
+
/**
|
|
56
|
+
* 머리글 리스너를 모두 떼고 손잡이 객체도 정리한다. 그리드를 지운 뒤 남은 th 에 사건이 와도 콜백이 불리지 않게.
|
|
57
|
+
*
|
|
58
|
+
* Detach every header listener and the handle binder, so events on leftover ths never reach callbacks after destroy.
|
|
59
|
+
*/
|
|
60
|
+
destroy(): void;
|
|
61
|
+
/**
|
|
62
|
+
* 기하 px 를 DOM 에 쓰는 객체를 받는다. 머리글은 폭을 품은 자리(잎 칸 폭·고정 칸 left·표 전체 폭)를 여기에 등록해,
|
|
63
|
+
* 컬럼 폭이 바뀔 때 머리글을 다시 만들지 않고 그 자리만 고칠 수 있게 한다. 받기 전에는 등록 없이 그리기만 한다.
|
|
64
|
+
*
|
|
65
|
+
* Receives the geometry applier. The header registers its width-bearing spots so a width change can patch them
|
|
66
|
+
* instead of rebuilding the header. Without it, painting simply skips registration.
|
|
67
|
+
*/
|
|
68
|
+
setApplier(applier: IGeometryApplier): void;
|
|
69
|
+
private _t;
|
|
70
|
+
/**
|
|
71
|
+
* 지금 그려진 머리글 영역의 실제 높이(px). 줄바꿈 머리글로 늘어난 높이를 배치에 되돌릴 때 쓴다.
|
|
72
|
+
*
|
|
73
|
+
* The actual height (px) of the currently rendered header, used to feed height grown by header wrapping back into layout.
|
|
74
|
+
*/
|
|
75
|
+
height(): number;
|
|
76
|
+
/**
|
|
77
|
+
* 머리글 표를 통째로 다시 그린다(머리글 칸 표·잎·정렬 목록·옵션을 받아서). 폭은 받은 `widths` 가 아니라 기하에 묻는다 —
|
|
78
|
+
* 인자는 부르는 쪽 서명을 지키려고 남겨 둔 것이고 기하와 같은 값이다.
|
|
79
|
+
*
|
|
80
|
+
* Rebuild the whole header table. Widths are asked of the geometry; the `widths` argument is kept for the caller's
|
|
81
|
+
* signature and carries the same values.
|
|
82
|
+
*/
|
|
83
|
+
paint(headerRows: any[][], leaves: ColumnDef[], widths: readonly number[], sortList: SortItem[], opts: RenderOptions): void;
|
|
84
|
+
}
|