open-grid 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/dist/ExportProgressView-9Kt1SQxv.js +48 -0
- package/dist/ExportProgressView-B59uHIwt.cjs +48 -0
- package/dist/LcpMergeOrderer-BdUtV67j.js +114 -0
- package/dist/LcpMergeOrderer-C_ANVkGk.cjs +113 -0
- package/dist/OpenGrid-BUYQs1_w.cjs +9806 -0
- package/dist/OpenGrid-BmagF0yo.js +9819 -0
- package/dist/XlsxChannel-DOeHeP7h.cjs +95 -0
- package/dist/XlsxChannel-DdaiytFR.js +95 -0
- package/dist/XlsxWorkbookWriter-BTNtZ80J.js +199 -0
- package/dist/XlsxWorkbookWriter-_u5stfg4.cjs +198 -0
- package/dist/{index-Brnev66-.js → index-B9_g5Eg3.js} +2 -2
- package/dist/{index-B_e5BXnW.cjs → index-CnyumyPV.cjs} +2 -2
- package/dist/open-grid-a11y.cjs +216 -0
- package/dist/open-grid-a11y.js +219 -0
- package/dist/open-grid-base.css +9 -0
- package/dist/open-grid-header.css +6 -15
- package/dist/open-grid-react.cjs +1 -1
- package/dist/open-grid-react.js +1 -1
- package/dist/open-grid-vue.cjs +1 -1
- package/dist/open-grid-vue.js +1 -1
- package/dist/open-grid.cjs +5 -2
- package/dist/open-grid.js +6 -3
- package/dist/sinks-BWkWQexV.js +149 -0
- package/dist/sinks-DPK0VxYG.cjs +143 -0
- package/dist/types/a11y/index.d.ts +37 -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 +11 -3
- 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 +26 -6
- package/dist/types/core/FindBarManager.d.ts +6 -2
- package/dist/types/core/FlatRowModel.d.ts +69 -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/MergeEngine.d.ts +45 -5
- package/dist/types/core/MutationService.d.ts +14 -17
- package/dist/types/core/OpenGrid.d.ts +350 -12
- package/dist/types/core/OrgChart.d.ts +24 -0
- package/dist/types/core/RangeSelectionManager.d.ts +23 -2
- package/dist/types/core/RenderController.d.ts +126 -8
- package/dist/types/core/RowDragDrop.d.ts +2 -0
- package/dist/types/core/SortFilterManager.d.ts +18 -2
- package/dist/types/core/VirtualScroll.d.ts +12 -0
- package/dist/types/core/WorksheetManager.d.ts +2 -2
- package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +321 -20
- package/dist/types/core/a11y/LiveRegionController.d.ts +229 -27
- package/dist/types/core/a11y/VisualEquivRegistry.d.ts +199 -14
- package/dist/types/core/appearance/TextureRegistry.d.ts +10 -0
- package/dist/types/core/cf/CFRule.d.ts +145 -22
- 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 +29 -0
- package/dist/types/core/export/channels/XlsxWorkbookWriter.d.ts +17 -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/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 +572 -22
- package/dist/types/index.d.ts +31 -1
- package/dist/types/vue/OpenGrid.vue.d.ts +2 -2
- package/package.json +8 -9
- package/dist/OpenGrid-DgZtbVD0.cjs +0 -7390
- package/dist/OpenGrid-E11B7Xa7.js +0 -7403
|
@@ -6,6 +6,7 @@ import { FlatRowModel } from './FlatRowModel.js';
|
|
|
6
6
|
import { GridOptions } from './types.js';
|
|
7
7
|
import { RangeStats } from './range/RangeQuery.js';
|
|
8
8
|
import { CellRange, Direction, FillMode, FillPreview } from './range/types.js';
|
|
9
|
+
import { IRenderRequest } from './domain/render/ports.js';
|
|
9
10
|
/**
|
|
10
11
|
* RangeSelectionManager 가 OpenGrid 서브시스템을 읽고 쓰기 위해 주입받는 클로저 묶음.
|
|
11
12
|
* / Closures injected into RangeSelectionManager so it can read and write OpenGrid subsystem
|
|
@@ -30,8 +31,8 @@ export interface RangeSelectionDeps<T extends Record<string, any>> {
|
|
|
30
31
|
getDisplayValue: (ri: number, field: string) => string;
|
|
31
32
|
/** 그리드 이벤트 발행. / Emit a grid event. */
|
|
32
33
|
emit: (event: string, ...args: any[]) => void;
|
|
33
|
-
/**
|
|
34
|
-
|
|
34
|
+
/** 그리기 요청을 낸다(보이는 범위 다시 그리기 등). / Submit a render request (e.g. repaint the visible range). */
|
|
35
|
+
submitRender: (req: IRenderRequest) => void;
|
|
35
36
|
/** aria-live 영역에 메시지를 공지. / Announce a message via the aria-live region. */
|
|
36
37
|
announce: (msg: string) => void;
|
|
37
38
|
/** i18n: 범위 선택/채우기 announce·aria 해석. / i18n: resolve range selection/fill announce & aria. */
|
|
@@ -39,6 +40,18 @@ export interface RangeSelectionDeps<T extends Record<string, any>> {
|
|
|
39
40
|
hasCellFormula?: (rowId: string, field: string) => boolean;
|
|
40
41
|
offsetFormula?: (rowId: string, field: string, dRow: number, dCol: number) => string;
|
|
41
42
|
setCellFormulaByRowId?: (rowId: string, field: string, formula: string) => void;
|
|
43
|
+
/**
|
|
44
|
+
* 범위의 화면 사각형을 기하로 계산(본문 상자 보이는 왼쪽 위 기준, 두 모서리 칸의 합집합 — 칸을 재는 것과 같은 뜻).
|
|
45
|
+
* 모서리 칸이 가로 창 밖이라 DOM 에 없을 때 쓴다. 없으면 그때 테두리를 숨긴다(지금 동작).
|
|
46
|
+
* / Geometry-based screen rectangle of a range (body scroller's visible top-left, union of the corner cells);
|
|
47
|
+
* used when a corner cell is outside the column window. Without it the border is hidden then.
|
|
48
|
+
*/
|
|
49
|
+
rangeRect?: (range: CellRange) => {
|
|
50
|
+
left: number;
|
|
51
|
+
top: number;
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
} | null;
|
|
42
55
|
}
|
|
43
56
|
/**
|
|
44
57
|
* F1 범위 선택 + 채우기 매니저. / F1 range selection + fill manager.
|
|
@@ -195,6 +208,14 @@ export declare class RangeSelectionManager<T extends Record<string, any> = any>
|
|
|
195
208
|
* / Runs after every _doRender call (M-6 integration point) — measures the corner cells and
|
|
196
209
|
* updates the contiguous border/handle/preview overlay (QA-2, CON-4). */
|
|
197
210
|
repaint(): void;
|
|
211
|
+
/**
|
|
212
|
+
* 범위의 본문 상자 기준 사각형. 두 모서리 칸이 다 그려져 있으면 지금처럼 칸을 재고(창이 전 컬럼이면 결과가 지금과 같다),
|
|
213
|
+
* 하나라도 가로 창 밖이라 없으면 기하로 계산한다(넓은 범위의 테두리가 창 밖 모서리 때문에 사라지지 않게). 둘 다 안 되면 null.
|
|
214
|
+
*
|
|
215
|
+
* Body-scroller box of a range: measure the corner cells when both are rendered (identical to before for a full
|
|
216
|
+
* window); otherwise compute it from geometry so a wide range keeps its border. null when neither works.
|
|
217
|
+
*/
|
|
218
|
+
private _boxOf;
|
|
198
219
|
private _hideOverlay;
|
|
199
220
|
/** OpenGrid._doRender 가 renderBody extraOpts 로 전달(M-6).
|
|
200
221
|
* / Passed by OpenGrid._doRender as renderBody's extraOpts (M-6).
|
|
@@ -11,11 +11,16 @@ import { CellEditManager } from './CellEditManager.js';
|
|
|
11
11
|
import { GroupTreeManager } from './GroupTreeManager.js';
|
|
12
12
|
import { DetailManager } from './DetailManager.js';
|
|
13
13
|
import { RangeSelectionManager } from './RangeSelectionManager.js';
|
|
14
|
-
import { GridOptions } from './types.js';
|
|
14
|
+
import { GridOptions, CellRange } from './types.js';
|
|
15
|
+
import { ColumnGeometry } from './coordinate/ColumnGeometry.js';
|
|
16
|
+
import { IColumnGeometry, GeometryChange, IColumnWindow, GridShape } from './coordinate/geometryPorts.js';
|
|
17
|
+
import { ColumnWindowPolicy } from './coordinate/ColumnWindowPolicy.js';
|
|
18
|
+
import { ScrollObserver } from './render/ScrollObserver.js';
|
|
19
|
+
import { IRenderRequest } from './domain/render/ports.js';
|
|
15
20
|
/**
|
|
16
21
|
* R5(§3.1 C4, §6-R5): 렌더 루프의 유일 진입점. `OpenGrid` God object 에서
|
|
17
22
|
* `_onResize`/`_recalcWidths`/`_renderHeader`/`_syncHeaderLayout`/`_doRender`/`_visRange`
|
|
18
|
-
* (+ 전용 헬퍼 `
|
|
23
|
+
* (+ 전용 헬퍼 `_paginationHeight`)를 **동작 불변**으로 옮긴 것.
|
|
19
24
|
*
|
|
20
25
|
* 스트랭글러 원칙(A2): 협력자(GridRenderer/VirtualScroll/Pagination 등)는 여전히
|
|
21
26
|
* `OpenGrid._mount` 가 생성·소유하며, 여기에는 `*Deps` 클로저 역전 패턴으로 **주입**만 된다.
|
|
@@ -24,7 +29,7 @@ import { GridOptions } from './types.js';
|
|
|
24
29
|
* 원본과 1:1 동일하다(회귀 0).
|
|
25
30
|
* / Dependency contract for the sole entry point of the render loop (R5, §3.1 C4, §6-R5),
|
|
26
31
|
* moving `_onResize`/`_recalcWidths`/`_renderHeader`/`_syncHeaderLayout`/`_doRender`/`_visRange`
|
|
27
|
-
* (plus the private
|
|
32
|
+
* (plus the private helper `_paginationHeight`) out of the `OpenGrid` God object
|
|
28
33
|
* with **behavior unchanged**.
|
|
29
34
|
*
|
|
30
35
|
* Strangler principle (A2): collaborators (GridRenderer/VirtualScroll/Pagination, etc.) are
|
|
@@ -56,8 +61,12 @@ export interface RenderControllerDeps<T extends Record<string, any> = any> {
|
|
|
56
61
|
getRangeMgr: () => RangeSelectionManager<T>;
|
|
57
62
|
/** F2: detail 렌더 컨텍스트 조립(비활성 시 undefined). / F2: build the detail render context (undefined when inactive). */
|
|
58
63
|
buildDetailRenderContext: () => DetailRenderContext | undefined;
|
|
59
|
-
/**
|
|
60
|
-
|
|
64
|
+
/**
|
|
65
|
+
* 그리기 요청을 낸다(그리드의 요청 입구로). 크기 바뀜 뒤 본문 그리기도 이 입구를 지나 다른 요청과 같은 길로 센다.
|
|
66
|
+
*
|
|
67
|
+
* Submit a render request to the grid's single entry, so the body repaint after a resize takes the same path as every other request.
|
|
68
|
+
*/
|
|
69
|
+
submitRender: (req: IRenderRequest) => void;
|
|
61
70
|
}
|
|
62
71
|
/**
|
|
63
72
|
* 렌더 루프의 유일 진입점. / Sole entry point of the render loop.
|
|
@@ -69,6 +78,68 @@ export interface RenderControllerDeps<T extends Record<string, any> = any> {
|
|
|
69
78
|
export declare class RenderController<T extends Record<string, any> = any> {
|
|
70
79
|
private _deps;
|
|
71
80
|
private _autoHeightWarned;
|
|
81
|
+
private _headerMeasured;
|
|
82
|
+
private readonly _geometry;
|
|
83
|
+
private readonly _windowPolicy;
|
|
84
|
+
private _scroll;
|
|
85
|
+
private _reveal;
|
|
86
|
+
private readonly _rangeRects;
|
|
87
|
+
/** 가로 창 정책. / The column-window policy. */
|
|
88
|
+
get windowPolicy(): ColumnWindowPolicy;
|
|
89
|
+
/** 본문 상자의 스크롤 관찰자(렌더러가 없으면 null). / The body box scroll observer (null without a renderer). */
|
|
90
|
+
get scroll(): ScrollObserver | null;
|
|
91
|
+
/**
|
|
92
|
+
* 가로 창 규칙이 묻는 이 그리드의 모양 — 자동 높이·보이는 폭·병합 유무·사용자 옵션.
|
|
93
|
+
*
|
|
94
|
+
* The grid shape the column-window rules ask about — auto height, visible width, merges, user option.
|
|
95
|
+
*/
|
|
96
|
+
shape(): GridShape;
|
|
97
|
+
/**
|
|
98
|
+
* 컬럼 ci 가 보이게 가로로 옮긴다(이미 보이거나 보이는 폭을 모르면 그대로). 기하에 묻고 스크롤 관찰자로만 옮긴다 — DOM 읽기 없음.
|
|
99
|
+
*
|
|
100
|
+
* Scroll horizontally so column ci is visible (no-op when already visible or the width is unknown). Asks the geometry and
|
|
101
|
+
* moves only through the scroll observer — no DOM reads.
|
|
102
|
+
*/
|
|
103
|
+
revealColumn(ci: number): void;
|
|
104
|
+
/**
|
|
105
|
+
* 범위 선택 테두리 사각형을 칸 요소 없이 기하와 행 번호로 셈한다(본문 상자 보이는 왼쪽 위 기준). 보이는 상자를 모르면 null.
|
|
106
|
+
*
|
|
107
|
+
* The range-selection border rectangle from geometry and row numbers, without cell elements (relative to the body box's
|
|
108
|
+
* visible top-left). Null when the visible box is unknown.
|
|
109
|
+
*/
|
|
110
|
+
rangeRect(range: CellRange): {
|
|
111
|
+
left: number;
|
|
112
|
+
top: number;
|
|
113
|
+
width: number;
|
|
114
|
+
height: number;
|
|
115
|
+
} | null;
|
|
116
|
+
/** 스크롤 관찰자를 놓는다(그리드를 없앨 때). / Release the scroll observer (on grid destroy). */
|
|
117
|
+
destroy(): void;
|
|
118
|
+
/** 그리는 쪽(머리글·본문·푸터)이 묻는 컬럼 기하. / The column geometry painters (header/body/footer) ask. */
|
|
119
|
+
get geometry(): IColumnGeometry;
|
|
120
|
+
/**
|
|
121
|
+
* 지금 입력에 맞춘 컬럼 기하(읽기 포트). 그리는 쪽(푸터 등)이 그릴 때마다 이것을 부른다 — 조립하는 쪽이 맞추는 일을 직접 부르지 않게.
|
|
122
|
+
*
|
|
123
|
+
* The column geometry aligned to current inputs (read port). Painters such as the footer call this each paint, so the composer never calls the alignment itself.
|
|
124
|
+
*/
|
|
125
|
+
currentGeometry(): IColumnGeometry;
|
|
126
|
+
/**
|
|
127
|
+
* 기하를 지금 입력에 맞추고 돌려준다 — 폭 계산 결과(빈 자리는 기본 폭, 그리는 쪽이 쓰던 값과 같음)·여분 컬럼 옵션·고정 수.
|
|
128
|
+
* 값이 같으면 판을 올리지 않는다. 머리글·본문을 그리기 직전과 푸터가 기하를 물을 때 불린다.
|
|
129
|
+
*
|
|
130
|
+
* Align the geometry to the current inputs — computed widths (gaps filled with the default width, as painters did),
|
|
131
|
+
* extra-column options and the frozen count — and return it. Same values keep the version. Called right before
|
|
132
|
+
* header/body painting and when the footer asks for the geometry.
|
|
133
|
+
*/
|
|
134
|
+
/**
|
|
135
|
+
* 지금 옵션의 여분 컬럼(상태·끌기·행번호·체크·디테일 펼침 칸). 폭 배분과 기하가 같은 값을 쓰게 한 곳에서 만든다 — 디테일 펼침 칸은
|
|
136
|
+
* 디테일이 켜져 있고 토글 방식이 펼침 칸일 때만.
|
|
137
|
+
*
|
|
138
|
+
* Extra columns for the current options (state, drag, row number, check, detail expander). Built in one place so width
|
|
139
|
+
* allocation and the geometry use the same value — the detail expander only when detail is on with the expander-column toggle.
|
|
140
|
+
*/
|
|
141
|
+
private _extraColumns;
|
|
142
|
+
syncGeometry(): ColumnGeometry;
|
|
72
143
|
constructor(deps: RenderControllerDeps<T>);
|
|
73
144
|
/** @internal */
|
|
74
145
|
private _paginationHeight;
|
|
@@ -78,6 +149,14 @@ export declare class RenderController<T extends Record<string, any> = any> {
|
|
|
78
149
|
* re-renders the body.
|
|
79
150
|
*/
|
|
80
151
|
onResize(): void;
|
|
152
|
+
/**
|
|
153
|
+
* 본문 상자의 보이는 폭을 스크롤 관찰자에 넘긴다(가로 창·보이게 옮기기의 원천 — 같은 값이면 아무 일 없음).
|
|
154
|
+
* 크기가 바뀔 때와 세로 스크롤바가 생기거나 없어질 때 부른다.
|
|
155
|
+
*
|
|
156
|
+
* Hand the body box's visible width to the scroll observer (source of the column window and of reveal; no-op when unchanged).
|
|
157
|
+
* Called on resize and when the vertical scrollbar appears or disappears.
|
|
158
|
+
*/
|
|
159
|
+
syncViewportWidth(): void;
|
|
81
160
|
/**
|
|
82
161
|
* 전체 폭에서 고정 UI 요소(state/드래그/행번호/체크 컬럼)를 뺀 뒤 컬럼폭을 재계산한다.
|
|
83
162
|
* 사용자가 직접 조절한 폭은 보존한다.
|
|
@@ -87,6 +166,39 @@ export declare class RenderController<T extends Record<string, any> = any> {
|
|
|
87
166
|
* @param totalWidth - 컨테이너 전체 폭(px) / Total container width in px
|
|
88
167
|
*/
|
|
89
168
|
recalcWidths(totalWidth: number): void;
|
|
169
|
+
/**
|
|
170
|
+
* 너비 조절을 놓은 뒤(렌더러 콜백 onColResize 를 거쳐 옴): 사용자 폭으로 기억한다(필드 이름 열쇠 — 다음 폭 재계산에서도 남게).
|
|
171
|
+
* 놓기 길에서는 손잡이가 이미 같은 폭을 쓰고 그리기 요청을 냈으므로 여기서는 기억만 한다. 폭이 지금과 다를 때(손잡이를 잇기 전
|
|
172
|
+
* 길이나 직접 부름)만 폭을 쓰고 폭 자리 고치기를 요청한다 — 머리글·본문을 다시 만들지 않는다.
|
|
173
|
+
*
|
|
174
|
+
* After a width-resize release (arriving through the renderer callback onColResize): remember it as a user width (keyed by
|
|
175
|
+
* field, so recalculation keeps it). On the release path the handle has already written the same width and submitted the
|
|
176
|
+
* repaint request, so this only remembers. Only when the width differs (the pre-wiring path or a direct call) does it write
|
|
177
|
+
* the width and request a width-spot patch — header and body are never rebuilt.
|
|
178
|
+
*
|
|
179
|
+
* @param colIndex - 표시 잎 컬럼 번호 / Visible leaf column index
|
|
180
|
+
* @param newWidth - 새 폭(px) / New width (px)
|
|
181
|
+
*/
|
|
182
|
+
commitColumnWidth(colIndex: number, newWidth: number): void;
|
|
183
|
+
/**
|
|
184
|
+
* 폭 입력의 주인이 컬럼 하나의 폭을 바꾼다: 정수로 만든 뒤 계산 결과 배열(자리가 있을 때만)과 기하에 같은 값을 쓰고 기하의 바뀐 몫을 돌려준다.
|
|
185
|
+
* 너비 조절이 폭을 바꾸는 유일한 길 — 기하에 직접 쓰는 곳은 이것과 syncGeometry 의 reset 둘뿐이라, 다음 맞춤이 끈 폭을 덮지 않는다.
|
|
186
|
+
*
|
|
187
|
+
* The width owner changes one column: round to an integer, write the same value to the computed-width array (if the slot
|
|
188
|
+
* exists) and the geometry, and return the geometry change. The only way resizing changes a width — the geometry is written
|
|
189
|
+
* only here and in syncGeometry's reset, so the next alignment never overwrites a dragged width.
|
|
190
|
+
*
|
|
191
|
+
* @param ci - 표시 잎 컬럼 번호 / Visible leaf column index
|
|
192
|
+
* @param width - 새 폭(px) / New width (px)
|
|
193
|
+
* @returns 기하의 바뀐 몫 / The geometry change
|
|
194
|
+
*/
|
|
195
|
+
setUserWidth(ci: number, width: number): GeometryChange;
|
|
196
|
+
/**
|
|
197
|
+
* 줄바꿈 머리글이 하나라도 있나(머리글 높이를 다시 재야 하는지). 「줄바꿈 켬」 또는 제목에 줄바꿈 문자가 있는 표시 잎.
|
|
198
|
+
*
|
|
199
|
+
* Whether any visible leaf header wraps (headerWrap on, or a newline in its title) — i.e. whether the header height must be re-measured.
|
|
200
|
+
*/
|
|
201
|
+
hasWrappedHeader(): boolean;
|
|
90
202
|
/**
|
|
91
203
|
* 헤더(컬럼 제목 행)를 다시 그린다. / Re-render the header (column title row).
|
|
92
204
|
*/
|
|
@@ -100,6 +212,14 @@ export declare class RenderController<T extends Record<string, any> = any> {
|
|
|
100
212
|
* so existing fixed-height behavior is unchanged. (Public: `OpenGrid` exposes this via a
|
|
101
213
|
* `_syncHeaderLayout` delegate — characterization tests call it directly.)
|
|
102
214
|
*/
|
|
215
|
+
/**
|
|
216
|
+
* 머리글 높이를 한 번 재어, 마지막으로 맞춘 높이와 다를 때만 본문 높이를 다시 맞춘다(줄바꿈 머리글을 끄는 프레임마다 불림).
|
|
217
|
+
* 「달라졌나」의 기준은 여기 하나 — 머리글을 다른 길로 다시 그려도 그 길의 맞춤이 기준을 함께 고친다.
|
|
218
|
+
*
|
|
219
|
+
* Measure the header height once and re-fit the body only when it differs from the last fitted height (called on each
|
|
220
|
+
* resize frame with wrapped headers). The single baseline lives here, so re-painting the header elsewhere also refreshes it.
|
|
221
|
+
*/
|
|
222
|
+
relayoutHeaderIfChanged(): void;
|
|
103
223
|
syncHeaderLayout(): void;
|
|
104
224
|
/**
|
|
105
225
|
* 지정 범위의 본문 행을 렌더한다(autoHeight 활성 시 범위 인자를 무시하고 전체 행을 렌더).
|
|
@@ -109,13 +229,11 @@ export declare class RenderController<T extends Record<string, any> = any> {
|
|
|
109
229
|
* @param startIndex - 렌더 시작 flat index / Starting flat index to render
|
|
110
230
|
* @param endIndex - 렌더 끝 flat index / Ending flat index to render
|
|
111
231
|
*/
|
|
112
|
-
doRender(startIndex: number, endIndex: number): void;
|
|
232
|
+
doRender(startIndex: number, endIndex: number, columns?: IColumnWindow, rowWork?: 'diff'): void;
|
|
113
233
|
/**
|
|
114
234
|
* 현재 화면에 보이는 행 범위를 반환한다. / Return the currently visible row range.
|
|
115
235
|
*
|
|
116
236
|
* @returns `[시작, 끝]` flat index 쌍 / `[start, end]` flat index pair
|
|
117
237
|
*/
|
|
118
238
|
visRange(): [number, number];
|
|
119
|
-
/** @internal */
|
|
120
|
-
private _visCount;
|
|
121
239
|
}
|
|
@@ -66,6 +66,8 @@ export declare class RowDragDrop {
|
|
|
66
66
|
constructor(_bodyEl: HTMLElement, _rowHeight: number, _onDrop: RowDropCallback, _cross?: CrossGridConfig | null,
|
|
67
67
|
/** fromIndex 기준 함께 드래그할 행 수(멀티행 배지용). 기본 1 / Rows dragged together from fromIndex (multi-row badge). Default 1 */
|
|
68
68
|
_getDragCount?: (fromIndex: number) => number);
|
|
69
|
+
/** 행 높이가 바뀌면(밀도·setRowHeight) 끌어 놓을 자리 계산도 새 높이를 쓰게 한다. / Use the new row height for drop-slot math after a row-height change. */
|
|
70
|
+
setRowHeight(px: number): void;
|
|
69
71
|
/**
|
|
70
72
|
* 행 엘리먼트에 드래그 핸들 삽입.
|
|
71
73
|
* / Insert a drag handle into a row element.
|
|
@@ -3,6 +3,8 @@ import { ColumnLayout } from './ColumnLayout.js';
|
|
|
3
3
|
import { VirtualScroll } from './VirtualScroll.js';
|
|
4
4
|
import { Pagination } from './Pagination.js';
|
|
5
5
|
import { SortItem, FilterItem } from './types.js';
|
|
6
|
+
import { IRenderRequest } from './domain/render/ports.js';
|
|
7
|
+
import { IHeaderSortIndicator } from './render/ports.js';
|
|
6
8
|
/**
|
|
7
9
|
* {@link SortFilterManager} 의존성 주입 계약. / Dependency-injection contract for {@link SortFilterManager}.
|
|
8
10
|
*
|
|
@@ -25,8 +27,9 @@ export interface SortFilterDeps<T extends Record<string, any>> {
|
|
|
25
27
|
getOptions: () => any;
|
|
26
28
|
/** 헤더(정렬/필터 표시)를 다시 그린다. / Re-render the header (sort/filter indicators). */
|
|
27
29
|
renderHeader: () => void;
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
+
/** 그리기 요청을 낸다 — 정렬·필터 뒤 보이는 범위를 다시 그린다. 그리기는 요청 통로 하나로만 들어가 횟수·범위를 한곳에서 정한다.
|
|
31
|
+
* / Submit a render request — after sort/filter, repaint the visible range. Rendering enters through a single request channel so count and range are decided in one place. */
|
|
32
|
+
submitRender: (req: IRenderRequest) => void;
|
|
30
33
|
/** 스크린리더용 상태 안내. / Announce a status message for screen readers. */
|
|
31
34
|
announce: (msg: string) => void;
|
|
32
35
|
/** i18n: 정렬 상태어 + announce 해석. / i18n: resolve sort state words + announce. */
|
|
@@ -37,6 +40,9 @@ export interface SortFilterDeps<T extends Record<string, any>> {
|
|
|
37
40
|
* / C0.5/§2.5: after sort/filter, re-project the F1 range selection by its rowId
|
|
38
41
|
* set instead of clearing it. */
|
|
39
42
|
onReproject?: () => void;
|
|
43
|
+
/** 머리글 정렬 표시만 고치는 곳. 있으면 정렬 때 머리글을 다시 만들지 않고 이것에 정렬 목록을 알린다(없으면 renderHeader).
|
|
44
|
+
* / Patches header sort marks only; when given, sorting notifies it instead of rebuilding the header (otherwise renderHeader). */
|
|
45
|
+
sortIndicator?: IHeaderSortIndicator;
|
|
40
46
|
}
|
|
41
47
|
/**
|
|
42
48
|
* 정렬·필터 상태와 적용을 담당하는 매니저. / Manages sort/filter state and their application.
|
|
@@ -77,6 +83,16 @@ export declare class SortFilterManager<T extends Record<string, any> = any> {
|
|
|
77
83
|
* mgr.sort([{ field: 'age', dir: 'asc' }]);
|
|
78
84
|
*/
|
|
79
85
|
sort(fieldOrList: string | SortItem[], dir?: 'asc' | 'desc'): void;
|
|
86
|
+
/**
|
|
87
|
+
* `sortChange` 를 모든 길에서 같은 모양으로 낸다: `field` = 방금 바뀐 컬럼, `dir` = 그 컬럼의 새 방향
|
|
88
|
+
* (그 컬럼 정렬이 풀렸으면 없음), `sortList` = 전체 정렬 목록. 바뀐 컬럼이 없으면(전체 해제) `sortList` 만.
|
|
89
|
+
* / Emits `sortChange` in one shape on every path: `field` = the column just changed, `dir` = its new
|
|
90
|
+
* direction (absent when that column's sort was cleared), `sortList` = the whole list; only `sortList`
|
|
91
|
+
* when no single column changed (everything cleared).
|
|
92
|
+
*/
|
|
93
|
+
private _emitSortChange;
|
|
94
|
+
/** 정렬 표시를 지금 목록에 맞춘다 — 표시 객체가 있으면 그것만, 없으면 머리글을 다시 그림. / Sync sort marks to the list. */
|
|
95
|
+
private _showSort;
|
|
80
96
|
/** 모든 정렬을 해제한다. / Clear all sorting. */
|
|
81
97
|
resetSort(): void;
|
|
82
98
|
/**
|
|
@@ -6,6 +6,16 @@ export interface VirtualScrollOptions {
|
|
|
6
6
|
overscan?: number;
|
|
7
7
|
/** 가시 범위 변화 시 호출되는 렌더 콜백. / Render callback fired when the visible range changes. */
|
|
8
8
|
onRender: (startIndex: number, endIndex: number) => void;
|
|
9
|
+
/**
|
|
10
|
+
* 주면 자체 rAF 를 쓰지 않고, 다시 그려야 할 때 그 자리에서 지금 범위로 이 함수를 부른다(프레임 맞추기·같은 프레임
|
|
11
|
+
* 요청 합치기는 받는 쪽 몫). 안 주면 지금처럼 자체 rAF 로 한 프레임에 한 번 `onRender`.
|
|
12
|
+
* 셋째 인자는 「스크롤 위치만 바뀌었나」(행 수·행 높이·보이는 높이가 바뀐 것과 가르려고 — 받는 쪽이 푸터 계산 등을 거름).
|
|
13
|
+
*
|
|
14
|
+
* When given, no own rAF is used: on every repaint need this is called right away with the current range
|
|
15
|
+
* (the receiver aligns to frames and merges requests). Otherwise the own rAF calls `onRender` once per frame.
|
|
16
|
+
* The third argument tells whether only the scroll position changed.
|
|
17
|
+
*/
|
|
18
|
+
requestRender?: (startIndex: number, endIndex: number, scrolledOnly: boolean) => void;
|
|
9
19
|
}
|
|
10
20
|
/** 현재 가시 행 범위와 스크롤 오프셋. / Current visible row range and scroll offset. */
|
|
11
21
|
export interface VirtualScrollRange {
|
|
@@ -39,6 +49,7 @@ export declare class VirtualScroll {
|
|
|
39
49
|
private _viewportHeight;
|
|
40
50
|
private _rafId;
|
|
41
51
|
private onRender;
|
|
52
|
+
private readonly _request;
|
|
42
53
|
/**
|
|
43
54
|
* 가상 스크롤 엔진 생성 및 컨테이너 scroll 리스너 부착. / Create the engine and attach the container scroll listener.
|
|
44
55
|
*
|
|
@@ -47,6 +58,7 @@ export declare class VirtualScroll {
|
|
|
47
58
|
*/
|
|
48
59
|
constructor(container: HTMLElement, options: VirtualScrollOptions);
|
|
49
60
|
private _onScroll;
|
|
61
|
+
/** @param scrolledOnly - 스크롤 위치만 바뀜(행 수·높이는 그대로) / only the scroll position changed */
|
|
50
62
|
private _scheduleRender;
|
|
51
63
|
/**
|
|
52
64
|
* 현재 스크롤 상태 기준 가시 행 범위 계산. / Compute the visible row range for the current scroll state.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColumnOrGroup, WorksheetState } from './types.js';
|
|
2
2
|
/** 시트 전환 시 호출되는 콜백. / Callback invoked when the active sheet switches. */
|
|
3
3
|
export type SwitchCallback<T> = (name: string, state: WorksheetState<T>) => void;
|
|
4
4
|
/** i18n: 탭 UI aria 해석기(주입 없으면 전역 t). / i18n: tab-UI aria resolver (global t when not injected). */
|
|
@@ -29,7 +29,7 @@ export declare class WorksheetManager<T extends Record<string, any> = any> {
|
|
|
29
29
|
* @param columns - 시트 컬럼 정의(기본 빈 배열) / Sheet column definitions (default empty array)
|
|
30
30
|
* @param data - 시트 초기 데이터(기본 빈 배열) / Initial sheet data (default empty array)
|
|
31
31
|
*/
|
|
32
|
-
add(name: string, columns?:
|
|
32
|
+
add(name: string, columns?: ColumnOrGroup<T>[], data?: T[]): void;
|
|
33
33
|
/**
|
|
34
34
|
* 시트를 제거한다. / Remove a sheet.
|
|
35
35
|
*
|