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,2 @@
|
|
|
1
|
+
const n=new TextEncoder;class l{constructor(e=8*1024*1024){this.$dF=e,this.$ia=[],this.$aE=0,this.$x=!1,this.$ak=!1}write(e){return this.$x||this.$ak?Promise.reject(new Error("sink closed/aborted")):(this.$ia.push(e),this.$aE+=typeof e=="string"?n.encode(e).length:e.length,Promise.resolve())}close(){return this.$x=!0,Promise.resolve()}abort(e){this.$ak=!0,e!==void 0&&(this.$hD=e)}get desiredSize(){return this.$dF-this.$aE}toString(){return this.$ia.map(e=>typeof e=="string"?e:new TextDecoder().decode(e)).join("")}get bytesWritten(){return this.$aE}get closed(){return this.$x}get aborted(){return this.$ak}get abortReason(){return this.$hD}}class d{constructor(e,t=Number.POSITIVE_INFINITY){this.$dw=e,this.$dF=t,this.$as="",this.$aE=0,this.$x=!1}write(e){const t=typeof e=="string"?e:new TextDecoder().decode(e);return this.$as+=t,this.$aE+=n.encode(t).length,Promise.resolve()}close(){return this.$x||(this.$x=!0,this.$dw(this.$as)),Promise.resolve()}abort(){this.$x=!0}get desiredSize(){return this.$dF-this.$aE}}const h="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";function f(i){return typeof i=="string"?n.encode(i).length:i.length}class a{constructor(e,t=8*1024*1024){this.$hB=e,this.$dF=t,this.$ap=0,this.$x=!1,this.$ak=!1}async write(e){if(this.$x||this.$ak)throw new Error("sink closed/aborted");const t=f(e);this.$ap+=t;try{await this.$hB.write(e)}finally{this.$ap-=t}}async close(){this.$x||this.$ak||(this.$x=!0,await this.$hB.close())}abort(e){var t,r;if(!this.$ak){this.$ak=!0;try{const s=(r=(t=this.$hB).abort)==null?void 0:r.call(t,e);s&&typeof s.catch=="function"&&s.catch(()=>{})}catch{}}}get desiredSize(){return this.$dF-this.$ap}}class o{constructor(e={}){this.$eX=[],this.$aE=0,this.$x=!1,this.$ak=!1,this.$gf=e.fileName??"export.xlsx",this.$jt=e.mime??h,this.$iV=e.highWaterMark??1024*1024*1024,this.$dw=e.download}write(e){if(this.$x||this.$ak)return Promise.reject(new Error("sink closed/aborted"));const t=typeof e=="string"?n.encode(e):e;return this.$eX.push(t),this.$aE+=t.length,Promise.resolve()}close(){if(this.$x||this.$ak)return Promise.resolve();this.$x=!0;const e=new Blob(this.$eX,{type:this.$jt});return this.$eX.length=0,this.$dw?this.$dw(e,this.$gf):o.$kY(e,this.$gf),Promise.resolve()}abort(){this.$ak=!0,this.$eX.length=0}get desiredSize(){return this.$iV-this.$aE}get bytesWritten(){return this.$aE}static $kY(e,t){if(typeof document>"u"||typeof URL>"u"||!URL.createObjectURL)return;const r=URL.createObjectURL(e);try{const s=document.createElement("a");s.href=r,s.download=t,s.style.display="none",document.body.appendChild(s),s.click(),s.remove()}finally{URL.revokeObjectURL(r)}}}function c(i={}){if(i.fsAccess==="off")return!1;const e=i.env!==void 0?i.env:typeof window<"u"?window:void 0;return!!e&&typeof e.showSaveFilePicker=="function"}function u(i={}){const e=i.fileName??"export.xlsx",t=i.mime??h;if(c(i)){const r=i.env!==void 0?i.env:window;return{kind:"fs",async create(){const s=await r.showSaveFilePicker({suggestedName:e,types:[{description:"Excel",accept:{[t]:[".xlsx"]}}]});return new a(await s.createWritable(),i.highWaterMark)}}}return{kind:"blob",create:()=>Promise.resolve(new o({fileName:e,mime:t,highWaterMark:i.highWaterMark,download:i.download}))}}export{o as BlobDownloadByteSink,d as DownloadByteSink,a as FileSystemByteSink,l as MemoryByteSink,h as XLSX_MIME,c as canUseFileSystemAccess,u as pickExcelSink};
|
|
2
|
+
//# sourceMappingURL=sinks-qkBJ5bKn.js.map
|
|
@@ -9,5 +9,9 @@ import { VisualSpec } from './cf/encoders.js';
|
|
|
9
9
|
* @param specs - CFEngine.paintFor 산출 시각 스펙 배열 / The VisualSpec array from CFEngine.paintFor
|
|
10
10
|
* @param cellW - 셀 콘텐츠 폭(px) — 데이터바 길이 산출 / Cell content width (px) for bar length
|
|
11
11
|
* @param cellH - 셀 콘텐츠 높이(px) / Cell content height (px)
|
|
12
|
+
* @param track - (선택) 데이터 막대를 만들 때마다 막대와 비율을 알린다. 컬럼 폭이 바뀌면 막대 폭을 다시 쓸 객체가 그 자리를 기억하게 하려는 것 — 막대 폭은 여기서 지금처럼 쓴다.
|
|
13
|
+
*
|
|
14
|
+
* (Optional) notified with each data bar and its ratio, so the object that rewrites widths on a column-width change
|
|
15
|
+
* can remember the spot; the bar width is still written here as before.
|
|
12
16
|
*/
|
|
13
|
-
export declare function applyVisualSpecs(cellEl: HTMLElement, specs: VisualSpec[], cellW: number, _cellH: number): void;
|
|
17
|
+
export declare function applyVisualSpecs(cellEl: HTMLElement, specs: VisualSpec[], cellW: number, _cellH: number, track?: (bar: HTMLElement, ratio: number) => void): void;
|
|
@@ -3,6 +3,8 @@ import { ColumnLayout } from './ColumnLayout.js';
|
|
|
3
3
|
import { GridRenderer } from './GridRenderer.js';
|
|
4
4
|
import { CellEditor } from './editors/CellEditor.js';
|
|
5
5
|
import { ColumnDef } from './types.js';
|
|
6
|
+
import { IRenderRequest } from './domain/render/ports.js';
|
|
7
|
+
import { IBodyPin } from './render/ports.js';
|
|
6
8
|
/**
|
|
7
9
|
* {@link CellEditManager} 의존성 주입 계약. / Dependency-injection contract for {@link CellEditManager}.
|
|
8
10
|
*
|
|
@@ -23,8 +25,8 @@ export interface CellEditDeps<T extends Record<string, any>> {
|
|
|
23
25
|
getOptions: () => any;
|
|
24
26
|
/** 그리드 이벤트를 발행한다. / Emit a grid event. */
|
|
25
27
|
emit: (event: string, ...args: any[]) => void;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
+
/** 그리기 요청을 낸다(보이는 범위 다시 그리기 등). / Submit a render request (e.g. repaint the visible range). */
|
|
29
|
+
submitRender: (req: IRenderRequest) => void;
|
|
28
30
|
/** 스크린리더용 상태 안내. / Announce a status message for screen readers. */
|
|
29
31
|
announce: (msg: string) => void;
|
|
30
32
|
/** i18n: 편집 셀 위치 announce 해석 + 에디터 ctx 로케일 주입. / i18n: resolve edit-cell announce + inject locale into editor ctx. */
|
|
@@ -33,6 +35,16 @@ export interface CellEditDeps<T extends Record<string, any>> {
|
|
|
33
35
|
writeCell: (ri: number, field: string, value: any) => void;
|
|
34
36
|
/** 지정 행이 보이도록 스크롤한다. / Scroll so the given row is visible. */
|
|
35
37
|
scrollToRow: (ri: number) => void;
|
|
38
|
+
/**
|
|
39
|
+
* 지정 컬럼이 보이도록 가로로 옮긴다(이미 보이면 아무것도 안 함). 없으면 가로로는 따라가지 않는다.
|
|
40
|
+
* / Scroll horizontally so the column is visible (no-op when already visible). Without it, no horizontal follow.
|
|
41
|
+
*/
|
|
42
|
+
revealColumn?: (ci: number) => void;
|
|
43
|
+
/**
|
|
44
|
+
* 본문에 「이 행은 세로 창 밖으로 나가도 떼지 말라」를 알리는 곳(없으면 알리지 않음 — 지금 동작). 편집 시작 때 그 행을, 끝·취소 때 null 을 넘긴다.
|
|
45
|
+
* / Where to tell the body "keep this row even outside the vertical window"; the edited row on start, null on end.
|
|
46
|
+
*/
|
|
47
|
+
getBodyPin?: () => IBodyPin | null | undefined;
|
|
36
48
|
/** 현재 보이는(펼쳐진) 리프 컬럼 목록 조회. / Look up the currently visible leaf columns. */
|
|
37
49
|
getVisibleLeaves: () => ColumnDef<T>[];
|
|
38
50
|
/** F3: 해당 셀이 수식을 갖는지 조회. / F3: check whether the cell currently holds a formula. */
|
|
@@ -57,6 +69,8 @@ export declare class CellEditManager<T extends Record<string, any> = any> {
|
|
|
57
69
|
private _editCell;
|
|
58
70
|
private _focusCell;
|
|
59
71
|
private _dragColIdx;
|
|
72
|
+
/** 마지막으로 돌려준 「꼭 그려 둘 컬럼」 목록(값이 같으면 같은 배열). / Last pinned-columns answer, reused while unchanged. */
|
|
73
|
+
private _pinned;
|
|
60
74
|
private _d;
|
|
61
75
|
constructor(deps: CellEditDeps<T>);
|
|
62
76
|
/** 현재 마운트된 에디터 인스턴스(없으면 `null`). / The currently mounted editor instance (or `null`). */
|
|
@@ -74,6 +88,16 @@ export declare class CellEditManager<T extends Record<string, any> = any> {
|
|
|
74
88
|
/** 컬럼 드래그 중인 컬럼 인덱스(없으면 `null`). / Column index currently being column-dragged (or `null`). */
|
|
75
89
|
get dragColIdx(): number | null;
|
|
76
90
|
set dragColIdx(v: number | null);
|
|
91
|
+
/**
|
|
92
|
+
* 가로로 화면 밖에 밀려나도 칸을 그려 둘 컬럼: 편집 중인 컬럼과 키보드 포커스 컬럼(오름차순, 겹치면 하나, 없으면 빈 배열).
|
|
93
|
+
* 가로 창을 정하는 쪽이 프레임마다 묻는다 — 편집기·포커스 표시가 든 칸을 창 밖으로 떼지 않으려고. 값이 같으면 같은 배열을 돌려준다.
|
|
94
|
+
*
|
|
95
|
+
* Columns whose cells stay rendered even when scrolled out horizontally: the editing column and the keyboard
|
|
96
|
+
* focus column (ascending, de-duplicated). The column-window owner asks every frame; same answer, same array.
|
|
97
|
+
*/
|
|
98
|
+
pinnedColumns(): readonly number[];
|
|
99
|
+
/** 꼭 그려 둘 컬럼이 바뀌었으면 창을 다시 정하라고 알린다. / Ask for a new column window when pinned columns changed. */
|
|
100
|
+
private _notifyPinned;
|
|
77
101
|
/**
|
|
78
102
|
* 키보드 포커스 셀을 설정하고, 스크롤·재렌더·상태 announce 를 처리한다. / Set the keyboard-focused cell; handles scroll, re-render, and status announce.
|
|
79
103
|
*
|
|
@@ -2,6 +2,7 @@ import { DataLayer } from './DataLayer.js';
|
|
|
2
2
|
import { ColumnLayout } from './ColumnLayout.js';
|
|
3
3
|
import { CellEditManager } from './CellEditManager.js';
|
|
4
4
|
import { RowManager } from './RowManager.js';
|
|
5
|
+
import { IRenderRequest } from './domain/render/ports.js';
|
|
5
6
|
/**
|
|
6
7
|
* {@link CellEventHandler} 의존성 주입 계약. / Dependency-injection contract for {@link CellEventHandler}.
|
|
7
8
|
*
|
|
@@ -25,8 +26,11 @@ export interface CellEventDeps<T extends Record<string, any>> {
|
|
|
25
26
|
emit: (event: string, ...args: any[]) => void;
|
|
26
27
|
/** 셀 값을 기록한다(토글/라디오 컬럼 등에서 사용). / Write a cell value (used by toggle/radio columns, etc.). */
|
|
27
28
|
writeCell: (ri: number, field: string, value: any) => void;
|
|
28
|
-
/**
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* 그리기 요청을 낸다(받는 쪽이 계획대로 그린다). 이 객체는 무엇을 그릴지 정하지 않고 「무엇이 바뀌었나」만 알린다.
|
|
31
|
+
* / Submit a render request (the receiver paints per plan). This object reports what changed, not what to paint.
|
|
32
|
+
*/
|
|
33
|
+
submitRender: (req: IRenderRequest) => void;
|
|
30
34
|
/** 그리드 컨테이너 엘리먼트 조회. / Look up the grid container element. */
|
|
31
35
|
getContainer: () => HTMLElement;
|
|
32
36
|
/** 'cells' 모드 클릭/Shift+클릭 위임 — RangeSelectionManager.handleClick 로 연결
|
|
@@ -41,6 +41,14 @@ export declare class ColumnLayout<T = any> {
|
|
|
41
41
|
private _flatLeaves;
|
|
42
42
|
private _maxDepth;
|
|
43
43
|
private _frozenCount;
|
|
44
|
+
/**
|
|
45
|
+
* 표시 잎 배열의 캐시. 그리기마다 여러 번 묻는 값이라 구성이 바뀔 때만 새로 만들고, 그 사이에는 같은 배열(같은 참조)을 돌려준다.
|
|
46
|
+
* 구성을 바꾸는 곳(잎을 다시 만드는 _process, 숨김, 보임)이 이것을 비운다.
|
|
47
|
+
*
|
|
48
|
+
* Cache of the visible-leaf array. Asked many times per paint, so it is rebuilt only when the column set changes and
|
|
49
|
+
* the same array (same reference) is returned in between. Every place that changes the set (_process, hide, show) clears it.
|
|
50
|
+
*/
|
|
51
|
+
private _visibleCache;
|
|
44
52
|
/**
|
|
45
53
|
* 컬럼 정의로 배치 엔진 생성 후 즉시 리프·깊이를 계산. / Create the layout engine and immediately compute leaves/depth.
|
|
46
54
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SortItem, FilterItem } from './types.js';
|
|
2
|
+
import { IRowSource } from './domain/sort/ports.js';
|
|
2
3
|
type RowState = 'added' | 'edited' | 'removed' | 'none';
|
|
3
4
|
/**
|
|
4
5
|
* 그리드 데이터 모델 계층(C0 DataLayer). / Grid data model layer (contract C0 DataLayer).
|
|
@@ -16,7 +17,7 @@ type RowState = 'added' | 'edited' | 'removed' | 'none';
|
|
|
16
17
|
* layer.updateCell(0, 'name', 'Park');
|
|
17
18
|
* layer.getChanges(); // { added, edited, removed }
|
|
18
19
|
*/
|
|
19
|
-
export declare class DataLayer<T extends Record<string, any> = any> {
|
|
20
|
+
export declare class DataLayer<T extends Record<string, any> = any> implements IRowSource<T> {
|
|
20
21
|
private _data;
|
|
21
22
|
private _original;
|
|
22
23
|
private _meta;
|
|
@@ -38,6 +39,20 @@ export declare class DataLayer<T extends Record<string, any> = any> {
|
|
|
38
39
|
private _findQuery;
|
|
39
40
|
private _findFields;
|
|
40
41
|
private _getStrategy;
|
|
42
|
+
private readonly _keys;
|
|
43
|
+
private readonly _sorter;
|
|
44
|
+
private _structureVersion;
|
|
45
|
+
/**
|
|
46
|
+
* 구조 판 번호 — 행 집합이나 표시 순서가 바뀔 때만 1씩 오른다. / Structure version — bumps only when the row set or display order changes.
|
|
47
|
+
*
|
|
48
|
+
* 안쪽 전용. 오르는 곳은 일곱 군데뿐이다: setData · clearData · addRow · removeRow · moveRow · 정렬 결과 적용(applySort) ·
|
|
49
|
+
* 필터 결과 적용(applyFilter). 칸 값 변경(updateCell·행 객체 직접 수정)으로는 오르지 않는다 — 값이 아니라 구조를 가리키므로,
|
|
50
|
+
* 합성 행 캐시처럼 「행 자리」만 기억하는 쪽이 무효화 열쇠로 쓴다.
|
|
51
|
+
* Internal use only. It bumps in exactly seven places: setData, clearData, addRow, removeRow, moveRow, applying a sort
|
|
52
|
+
* result (applySort) and applying a filter result (applyFilter). Value edits never bump it — it tracks structure, not
|
|
53
|
+
* values, so caches that only remember row positions (e.g. composed flat rows) can use it as an invalidation key.
|
|
54
|
+
*/
|
|
55
|
+
get structureVersion(): number;
|
|
41
56
|
/**
|
|
42
57
|
* 데이터 계층 생성. / Create the data layer.
|
|
43
58
|
*
|
|
@@ -253,6 +268,38 @@ export declare class DataLayer<T extends Record<string, any> = any> {
|
|
|
253
268
|
* @param sortList - {field, dir} 정렬 키 목록(우선순위 순) / Sort keys {field, dir} in priority order
|
|
254
269
|
*/
|
|
255
270
|
applySort(sortList: SortItem[]): void;
|
|
271
|
+
/**
|
|
272
|
+
* 정렬 원천: 원 자료(복사 아님). / Sort source: the source rows (not a copy).
|
|
273
|
+
*
|
|
274
|
+
* 안쪽 전용(정렬 객체가 읽음). 원 배열 그 자체이므로 받은 쪽은 읽기만 하고 고치지 않는다 —
|
|
275
|
+
* 길이를 바꾸거나 칸을 갈면 이 계층의 표시 순서·rowId 지도와 어긋난다. 10만 행을 정렬마다 베끼지 않으려고 복사하지 않는다.
|
|
276
|
+
* Internal use only (read by the sort objects). It is the live array: read it, never mutate it — changing its
|
|
277
|
+
* length or slots desynchronises the display order and rowId map. Not copied, to avoid a 100k-row copy per sort.
|
|
278
|
+
*/
|
|
279
|
+
get rows(): readonly T[];
|
|
280
|
+
/**
|
|
281
|
+
* 정렬 원천: 지금 표시 순서에서 삭제 행을 뺀 원 자료 색인. / Sort source: current display order minus removed rows.
|
|
282
|
+
*
|
|
283
|
+
* @returns 원 자료 색인 배열 / Source indexes
|
|
284
|
+
*/
|
|
285
|
+
displayOrder(): readonly number[];
|
|
286
|
+
/**
|
|
287
|
+
* 정렬 결과(원 자료 색인의 순열)를 표시 순서로 받아 적는다. / Record a sort result as the display order.
|
|
288
|
+
*
|
|
289
|
+
* 안쪽 전용(정렬 객체가 따로 낸 순서를 받아 적을 때 — applySort 는 출발 순서 길이로 같은 검사를 거친다). order 는 displayOrder() 의 **순열**이어야 한다 — 길이만 검사하고
|
|
290
|
+
* 중복·범위 밖은 보지 않는다(뜨거운 길이라 10만 칸 검사를 늘 치르지 않으려고). 받은 배열은 베껴 두므로 부른 쪽이 뒤에 고쳐도 되고,
|
|
291
|
+
* 이 메서드는 받은 배열을 고치지 않는다.
|
|
292
|
+
* Internal use only (applySort runs the same check against its start length). order must be a permutation of displayOrder(): only the length is
|
|
293
|
+
* checked (no duplicate/range scan on this hot path). The input is copied and never mutated.
|
|
294
|
+
*
|
|
295
|
+
* @param order - displayOrder() 와 같은 길이의 원 자료 색인 / Source indexes, same length as displayOrder()
|
|
296
|
+
* @throws RangeError 길이가 다르면 / when the length differs
|
|
297
|
+
*/
|
|
298
|
+
applyOrder(order: ArrayLike<number>): void;
|
|
299
|
+
/** 길이가 expected 와 같을 때만 표시 순서로 받아 적는다(정렬 결과 적용의 한 자리). / Record order if its length is expected. */
|
|
300
|
+
private _setOrder;
|
|
301
|
+
/** 삭제 표시가 안 된 행인가. / Whether the row at source index i is not marked removed. */
|
|
302
|
+
private _isNotRemoved;
|
|
256
303
|
/**
|
|
257
304
|
* 컬럼별 필터 + F3 찾기 바(전체 컬럼 OR)를 적용해 표시 인덱스를 재계산. / Recompute the display index by applying per-column filters plus the F3 find bar (cross-column OR).
|
|
258
305
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { VirtualScroll } from './VirtualScroll.js';
|
|
2
2
|
import { FlatRowModel } from './FlatRowModel.js';
|
|
3
|
+
import { IRenderRequest } from './domain/render/ports.js';
|
|
3
4
|
/** expandRow/collapseRow/toggleRow/isRowExpanded/getDetailInstance 공통 인자(§6.2, C0.2).
|
|
4
5
|
* / Common argument shape for expandRow/collapseRow/toggleRow/isRowExpanded/getDetailInstance (§6.2, C0.2). */
|
|
5
6
|
export type DetailRowRef = number | {
|
|
@@ -25,8 +26,9 @@ export interface DetailManagerDeps<T extends Record<string, any> = any> {
|
|
|
25
26
|
getRowId: (row: T) => string;
|
|
26
27
|
/** stable rowId → 현재 행(삭제됐으면 undefined). DataLayer.getRowById 위임. / stable rowId → current row (undefined if deleted). Delegates to DataLayer.getRowById. */
|
|
27
28
|
getRowById: (rowId: string) => T | undefined;
|
|
28
|
-
/**
|
|
29
|
-
|
|
29
|
+
/** 그리기 요청을 낸다 — 펼침·접힘 뒤 묶음·나무와 같은 관용구로 전 행(0..n-1)을 다시 그린다. 그리기는 요청 통로 하나로만 들어가 횟수·범위를 한곳에서 정한다.
|
|
30
|
+
* / Submit a render request — after expand/collapse, repaint every row (0..n-1), the same idiom as group/tree. Rendering enters through a single request channel so count and range are decided in one place. */
|
|
31
|
+
submitRender: (req: IRenderRequest) => void;
|
|
30
32
|
/** 그리드 이벤트 발행. / Emit a grid event. */
|
|
31
33
|
emit: (ev: string, payload: any) => void;
|
|
32
34
|
/** aria-live 영역에 메시지를 공지. / Announce a message via the aria-live region. */
|
|
@@ -58,6 +60,17 @@ export declare class DetailManager<T extends Record<string, any> = any> {
|
|
|
58
60
|
private _hosts;
|
|
59
61
|
/** FR-9(UX-REVIEW-08): collapse 직전 패널 내부에 포커스가 있었는지 rowId 로 기억. */
|
|
60
62
|
private _focusPendingRestore;
|
|
63
|
+
/** 펼침·접힘·디테일 높이 옵션이 바뀔 때마다 오르는 판 번호(합성 결과 재사용의 열쇠). */
|
|
64
|
+
private _activeVersion;
|
|
65
|
+
/** 판 번호를 마지막으로 맞춰 본 디테일 높이 옵션 값들. */
|
|
66
|
+
private _seenRowHeight;
|
|
67
|
+
private _seenHeight;
|
|
68
|
+
private _seenSlots;
|
|
69
|
+
private _seenEnabled;
|
|
70
|
+
/** 「지금 자료에 있는 펼침이 있나」 메모와 그 메모를 만든 때의 두 판 번호. */
|
|
71
|
+
private _liveMemo;
|
|
72
|
+
private _liveMemoActive;
|
|
73
|
+
private _liveMemoData;
|
|
61
74
|
constructor(deps: DetailManagerDeps<T>);
|
|
62
75
|
private _mdOpts;
|
|
63
76
|
/** masterDetail.enabled 여부(옵션 자체 — 펼침 개수와 무관). / Whether masterDetail.enabled is set (the option itself — independent of how many rows are expanded). */
|
|
@@ -66,6 +79,34 @@ export declare class DetailManager<T extends Record<string, any> = any> {
|
|
|
66
79
|
* / §3.2 v2: "isActive" = feature on AND at least one row expanded (used to branch
|
|
67
80
|
* FlatRowModel composition/rendering). */
|
|
68
81
|
get isActive(): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* 끼워 넣는 결과가 바뀔 수 있을 때마다 오르는 판 번호 — 펼침·접힘, 그리고 결과를 바꾸는 옵션
|
|
84
|
+
* (`masterDetail.enabled`·`height`·`detailRowCount`, 그리드 `rowHeight`). 행 모델은 이 번호가 같은
|
|
85
|
+
* 동안 합성 결과를 다시 쓴다. 옵션은 바뀌어도 알림이 없으므로 물을 때마다 지난 값과 맞대 본다
|
|
86
|
+
* (칸마다 불리므로 문자열·객체를 만들지 않고 값 넷만 견준다).
|
|
87
|
+
*
|
|
88
|
+
* A version bumped whenever the inserted result may change — expand/collapse and the options that shape
|
|
89
|
+
* the result (`masterDetail.enabled`·`height`·`detailRowCount`, grid `rowHeight`). The row model reuses
|
|
90
|
+
* its composed result while this number stays the same. Options change without notice, so each read
|
|
91
|
+
* compares them with the last seen values (it runs per cell, so it compares four values and allocates nothing).
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
get activeVersion(): number;
|
|
95
|
+
/**
|
|
96
|
+
* 행 모델이 합성할지 고를 때 묻는 술어 — 기능이 켜져 있고, 펼쳐 둔 행 가운데 **지금 자료에 있는 것**이
|
|
97
|
+
* 하나라도 있으면 참. 펼침 상태는 행 id 로 보관하고 자료를 바꿔도 솎지 않는다(같은 id 로 다시 넣으면
|
|
98
|
+
* 그대로 펼쳐 보이게). 그래서 옛 자료의 id 만 남은 경우 끼워 넣을 행이 없는데도 늘 합성하던 것을,
|
|
99
|
+
* 여기서 「끼울 곳이 있나」로 가려 직통으로 돌린다. 결과는 같다 — 그 id 들은 어느 행과도 맞지 않는다.
|
|
100
|
+
* 펼침 판 번호와 자료 구조 판 번호가 그대로면 지난 답을 쓴다(칸마다 불림).
|
|
101
|
+
*
|
|
102
|
+
* Predicate the row model asks when choosing whether to compose — true when the feature is on and at
|
|
103
|
+
* least one expanded row is **present in the current data**. Expansion is kept by row id and is not
|
|
104
|
+
* pruned when data changes (re-adding the same id shows it expanded again). So when only ids from old
|
|
105
|
+
* data remain there is nothing to insert, yet the grid used to compose every time; this check sends it
|
|
106
|
+
* back to the direct path. The result is the same — those ids match no row. The last answer is reused
|
|
107
|
+
* while the expansion version and the data structure version are unchanged (it runs per cell).
|
|
108
|
+
*/
|
|
109
|
+
private _hasLiveExpansion;
|
|
69
110
|
/** 현재 설정된 최대 중첩 깊이. / Currently configured maximum nesting depth. */
|
|
70
111
|
get maxDepth(): number;
|
|
71
112
|
private _resolveRowId;
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { ColumnLayout } from './ColumnLayout.js';
|
|
2
2
|
import { WorksheetManager } from './WorksheetManager.js';
|
|
3
3
|
import { ExportOptions, PrintOptions } from './types.js';
|
|
4
|
+
import { IArtifactSource, IByteSink, ExportRunCtx, ExportResult } from './export/types.js';
|
|
5
|
+
/** 스트리밍 경로가 지연 로드하는 모듈 묶음(시험에서 교체 가능). / Lazily-loaded modules of the streaming path (swappable in tests). */
|
|
6
|
+
export interface StreamModules {
|
|
7
|
+
pickExcelSink: (o: {
|
|
8
|
+
fileName?: string;
|
|
9
|
+
fsAccess?: 'auto' | 'off';
|
|
10
|
+
}) => {
|
|
11
|
+
kind: 'fs' | 'blob';
|
|
12
|
+
create(): Promise<IByteSink>;
|
|
13
|
+
};
|
|
14
|
+
createChannel: (o: {
|
|
15
|
+
sheetName?: string;
|
|
16
|
+
includeHeader?: boolean;
|
|
17
|
+
compressionLevel?: ExportOptions['compressionLevel'];
|
|
18
|
+
}) => {
|
|
19
|
+
writeStreaming(src: IArtifactSource, sink: IByteSink, ctx?: ExportRunCtx): Promise<ExportResult>;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
4
22
|
/**
|
|
5
23
|
* ExportManager 의존성 주입 인터페이스. / Dependency-injection interface for ExportManager.
|
|
6
24
|
*
|
|
@@ -32,6 +50,8 @@ export interface ExportDeps<T extends Record<string, any>> {
|
|
|
32
50
|
intlLocale: string;
|
|
33
51
|
exportFont?: string;
|
|
34
52
|
};
|
|
53
|
+
/** 스트리밍 경로 모듈 로더(미주입 시 지연 import). / Streaming module loader (lazy import when absent). */
|
|
54
|
+
loadStreamModules?: () => Promise<StreamModules>;
|
|
35
55
|
}
|
|
36
56
|
/**
|
|
37
57
|
* 그리드 데이터 내보내기(Excel/CSV/JSON/인쇄) 관리자. / Manages exporting grid data (Excel/CSV/JSON/print).
|
|
@@ -68,6 +88,11 @@ export declare class ExportManager<T extends Record<string, any> = any> {
|
|
|
68
88
|
* grid.exportExcel({ filename: 'orders', maskOnExport: true });
|
|
69
89
|
*/
|
|
70
90
|
exportExcel(options?: ExportOptions | string): void;
|
|
91
|
+
/**
|
|
92
|
+
* @internal 대량 엑셀 스트리밍 경로: 행 청크를 흘려 쓰며 진척바·취소를 제공한다.
|
|
93
|
+
* / Large-export streaming path: flows row chunks, with progress bar and cancel.
|
|
94
|
+
*/
|
|
95
|
+
private _exportExcelStreaming;
|
|
71
96
|
/**
|
|
72
97
|
* 현재 그리드 데이터를 UTF-8 BOM 포함 CSV 로 내보낸다. / Export the current grid data as a UTF-8 (BOM) CSV file.
|
|
73
98
|
*
|
|
@@ -2,6 +2,7 @@ import { ColumnLayout } from './ColumnLayout.js';
|
|
|
2
2
|
import { DataLayer } from './DataLayer.js';
|
|
3
3
|
import { Pagination } from './Pagination.js';
|
|
4
4
|
import { VirtualScroll } from './VirtualScroll.js';
|
|
5
|
+
import { IRenderRequest } from './domain/render/ports.js';
|
|
5
6
|
/**
|
|
6
7
|
* FindBarManager 의존성 주입 인터페이스. / Dependency-injection interface for FindBarManager.
|
|
7
8
|
*/
|
|
@@ -16,8 +17,11 @@ export interface FindBarDeps<T extends Record<string, any>> {
|
|
|
16
17
|
getVs: () => VirtualScroll | null;
|
|
17
18
|
/** 페이지네이션 인스턴스(행수 갱신용). 없으면 `null`. / Pagination instance (for updating row count); `null` if absent. */
|
|
18
19
|
getPagination: () => Pagination | null;
|
|
19
|
-
/**
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* 그리기 요청을 낸다(받는 쪽이 계획대로 그린다). 이 객체는 무엇을 그릴지 정하지 않고 「무엇이 바뀌었나」만 알린다.
|
|
22
|
+
* / Submit a render request (the receiver paints per plan). This object reports what changed, not what to paint.
|
|
23
|
+
*/
|
|
24
|
+
submitRender: (req: IRenderRequest) => void;
|
|
21
25
|
/** i18n: 메시지 해석(라벨/placeholder/aria/카운트 배지). / i18n: resolve labels/placeholder/aria/count badge. */
|
|
22
26
|
t: (key: string, params?: Record<string, string | number>) => string;
|
|
23
27
|
}
|
|
@@ -38,11 +38,49 @@ export declare class FlatRowModel {
|
|
|
38
38
|
private _d;
|
|
39
39
|
/** group/tree 가 등록한 backing override. null 이면 plain(DataLayer.getData()). */
|
|
40
40
|
private _backing;
|
|
41
|
-
/** F2 detail splice 등록 슬롯(
|
|
41
|
+
/** F2 detail splice 등록 슬롯(변환기 + 활성 술어). */
|
|
42
42
|
private _splices;
|
|
43
|
+
/** 합성할 것이 없을 때 쓰는 원천. / Source used when there is nothing to compose. */
|
|
44
|
+
private readonly _direct;
|
|
45
|
+
/** 합성할 것이 있을 때 쓰는 원천. / Source used when there is something to compose. */
|
|
46
|
+
private readonly _composed;
|
|
43
47
|
private _revIndex;
|
|
44
48
|
private _revIndexSrc;
|
|
45
49
|
constructor(deps: FlatRowModelDeps);
|
|
50
|
+
/**
|
|
51
|
+
* 진단용: 합성 없이 DataLayer 에서 바로 행을 읽은 누적 횟수. 빠른 길을 실제로 탔는지 시험이 확인하려고 둔다.
|
|
52
|
+
* 값의 뜻·증가 시점은 보장하지 않으며 버전 사이에 바뀔 수 있다 — 응용 코드에서 기대지 말 것.
|
|
53
|
+
*
|
|
54
|
+
* Diagnostic: cumulative count of rows read straight from DataLayer without composing, kept so tests
|
|
55
|
+
* can confirm the fast path is really taken. Its meaning and when it increments are not guaranteed
|
|
56
|
+
* and may change between versions — do not rely on it in application code.
|
|
57
|
+
*
|
|
58
|
+
* 診断用: 合成せずに DataLayer から直接行を読んだ累積回数。高速経路を実際に通ったかをテストが確かめるために置く。
|
|
59
|
+
* 値の意味・増える時点は保証せず、バージョン間で変わりうる — アプリケーションコードで頼らないこと。
|
|
60
|
+
*
|
|
61
|
+
* 诊断用: 不经合成、直接从 DataLayer 读取行的累计次数。用于让测试确认确实走了快速路径。
|
|
62
|
+
* 其含义和递增时机不作保证,版本之间可能变化 — 请勿在应用代码中依赖。
|
|
63
|
+
*
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
get directHits(): number;
|
|
67
|
+
/**
|
|
68
|
+
* 내부용: 자료 계층의 구조 판 번호(행 집합·표시 순서가 바뀔 때만 오름). splice 등록자가 「지금 자료 기준」
|
|
69
|
+
* 판정을 같은 판 동안 다시 하지 않으려고 묻는다. 값의 뜻은 보장하지 않으며 버전 사이에 바뀔 수 있다.
|
|
70
|
+
*
|
|
71
|
+
* Internal: the data layer's structure version (bumped only when the row set or display order changes).
|
|
72
|
+
* Splice registrants ask it so they need not redo a "against the current data" check within the same
|
|
73
|
+
* version. Its meaning is not guaranteed and may change between versions.
|
|
74
|
+
*
|
|
75
|
+
* 内部用: データ層の構造バージョン(行の集合・表示順が変わるときだけ増える)。splice の登録者が
|
|
76
|
+
* 「今のデータ基準」の判定を同じバージョンの間に繰り返さないために問い合わせる。値の意味は保証せず、バージョン間で変わりうる。
|
|
77
|
+
*
|
|
78
|
+
* 内部用: 数据层的结构版本号(仅在行集合或显示顺序变化时递增)。splice 的注册者借此避免在同一版本内重复
|
|
79
|
+
* 「以当前数据为准」的判断。其含义不作保证,版本之间可能变化。
|
|
80
|
+
*
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
get dataStructureVersion(): number;
|
|
46
84
|
/**
|
|
47
85
|
* group/tree 등 baseline backing 을 통째로 교체하는 등록점. provider=null 이면 plain(DataLayer 표시 순서)으로 복귀.
|
|
48
86
|
* / Registration point that replaces the baseline backing wholesale (group/tree); provider=null reverts to plain (DataLayer display order).
|
|
@@ -54,9 +92,22 @@ export declare class FlatRowModel {
|
|
|
54
92
|
* F2 DetailManager 가 합성 후단에 detail head/filler pseudo-row 를 끼워 넣을 변환기를 등록한다. 등록 순서대로 순차 적용.
|
|
55
93
|
* / Register a transformer that F2 DetailManager uses to insert detail head/filler pseudo-rows at the tail of composition; applied in registration order.
|
|
56
94
|
*
|
|
95
|
+
* 「등록되어 있다」와 「지금 끼워 넣을 것이 있다」는 다르다. 디테일 기능은 펼친 행이 없어도
|
|
96
|
+
* splice 를 늘 등록해 두므로, 등록 여부로 원천을 고르면 합성할 것이 없는 그리드도 칸마다
|
|
97
|
+
* 전 행 배열을 만든다. 그래서 등록자가 활성 술어를 같이 넘기고, 모든 splice 가 비활성이면
|
|
98
|
+
* 직통 원천을 쓴다. 술어 없이 등록한 splice 는 늘 활성으로 본다(뜻을 바꾸지 않는 쪽).
|
|
99
|
+
*
|
|
100
|
+
* "Registered" is not the same as "has something to insert now". The detail feature keeps its
|
|
101
|
+
* splice registered even with no row expanded, so choosing the source by registration would make
|
|
102
|
+
* a grid with nothing to compose rebuild the whole row array per cell. The registrant therefore
|
|
103
|
+
* passes an activity predicate as well, and when every splice is inactive the direct source is
|
|
104
|
+
* used. A splice registered without a predicate is treated as always active (the safe reading).
|
|
105
|
+
*
|
|
57
106
|
* @param fn - flat 배열 변환 함수 / Flat-array transform function
|
|
107
|
+
* @param isActive - 지금 끼워 넣을 것이 있는지(생략하면 늘 true) / Whether it has anything to insert now (always true when omitted)
|
|
108
|
+
* @param version - 끼워 넣는 결과가 바뀔 때마다 오르는 판 번호(생략하면 합성 결과를 담아 두지 않는다) / A version bumped whenever the inserted result would change (when omitted the composed result is never kept)
|
|
58
109
|
*/
|
|
59
|
-
registerSplice(fn: FlatSpliceFn): void;
|
|
110
|
+
registerSplice(fn: FlatSpliceFn, isActive?: () => boolean, version?: () => number): void;
|
|
60
111
|
/** 합성 완료된 flat 행 수. / Count of composed flat rows. */
|
|
61
112
|
count(): number;
|
|
62
113
|
/**
|
|
@@ -100,7 +151,14 @@ export declare class FlatRowModel {
|
|
|
100
151
|
* @returns rowId 또는 null / rowId or null
|
|
101
152
|
*/
|
|
102
153
|
rowIdOfFlat(flatIndex: number): string | null;
|
|
103
|
-
|
|
154
|
+
/**
|
|
155
|
+
* 지금 상태에 맞는 원천. backing 이 없고 활성 splice 가 하나도 없으면 직통, 아니면 합성.
|
|
156
|
+
* / The source that fits the current state: direct when there is no backing and no active
|
|
157
|
+
* splice, composed otherwise.
|
|
158
|
+
*/
|
|
159
|
+
private _source;
|
|
160
|
+
/** backing(또는 표시 순서) → splice 를 차례로 적용한 합성 배열. / The array composed from backing (or display order) through every splice in order. */
|
|
161
|
+
private _compose;
|
|
104
162
|
private _invalidate;
|
|
105
163
|
private _ensureRevIndex;
|
|
106
164
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ColumnLayout } from './ColumnLayout.js';
|
|
2
|
+
import { IColumnGeometry } from './coordinate/geometryPorts.js';
|
|
3
|
+
import { IFooterView, IGeometryApplier, IScrollFollower } from './render/ports.js';
|
|
2
4
|
/**
|
|
3
5
|
* FooterManager 의존성 주입 인터페이스. / Dependency-injection interface for FooterManager.
|
|
4
6
|
*/
|
|
@@ -15,6 +17,11 @@ export interface FooterDeps<T extends Record<string, any>> {
|
|
|
15
17
|
getContainer: () => HTMLElement;
|
|
16
18
|
/** Phase 2: OverrideKernel.getStrategy 주입(슬롯 summaryOp 도달용). / Phase 2: injected via OverrideKernel.getStrategy (reaches the `summaryOp` slot). */
|
|
17
19
|
getStrategy?: <F extends Function>(slot: string, fallback: F) => F;
|
|
20
|
+
/**
|
|
21
|
+
* 그리드의 컬럼 기하(폭·여분 컬럼). 막대를 그릴 때마다 한 번 묻는다(맞춘 뒤 돌려줌). 값 계산(computeValues·fmtNum)은 이것을 부르지 않는다.
|
|
22
|
+
* / The grid's column geometry, asked once per paint; value computation never calls it.
|
|
23
|
+
*/
|
|
24
|
+
getGeometry: () => IColumnGeometry;
|
|
18
25
|
}
|
|
19
26
|
/**
|
|
20
27
|
* 그리드 하단 요약 푸터(합계/평균/개수 등) 관리자. / Manages the grid's summary footer bar (sum/avg/count/…).
|
|
@@ -25,8 +32,14 @@ export interface FooterDeps<T extends Record<string, any>> {
|
|
|
25
32
|
* them as cells aligned to column widths. The `summaryOp` override slot lets custom
|
|
26
33
|
* aggregates (MEDIAN/STDEV/…) intercept the default SUM/AVG/COUNT/MAX/MIN switch.
|
|
27
34
|
*/
|
|
28
|
-
export declare class FooterManager<T extends Record<string, any> = any> {
|
|
35
|
+
export declare class FooterManager<T extends Record<string, any> = any> implements IFooterView {
|
|
29
36
|
private _d;
|
|
37
|
+
/** 값 계산(헤드리스). / Value computation (headless). */
|
|
38
|
+
private readonly _values;
|
|
39
|
+
/** 막대 DOM. / Bar DOM. */
|
|
40
|
+
private readonly _view;
|
|
41
|
+
/** 합계 대상 행 원천 — 부를 때마다 deps.getData 를 읽는다. / Row source; reads deps.getData on every call. */
|
|
42
|
+
private readonly _source;
|
|
30
43
|
constructor(deps: FooterDeps<T>);
|
|
31
44
|
/**
|
|
32
45
|
* 숫자를 포맷 문자열에 따라 표시용 문자열로 변환한다. / Format a number into a display string according to a format string.
|
|
@@ -66,4 +79,33 @@ export declare class FooterManager<T extends Record<string, any> = any> {
|
|
|
66
79
|
* redraws it, inserting at the top or bottom of the container per `options.footerPosition`.
|
|
67
80
|
*/
|
|
68
81
|
render(): void;
|
|
82
|
+
/**
|
|
83
|
+
* 그리기 계획이 「푸터 막대 다시」를 말할 때(컬럼 구성·겉모양이 바뀜). render 와 같다.
|
|
84
|
+
* / Called when the render plan asks to rebuild the footer bar (columns or appearance changed). Same as render.
|
|
85
|
+
*/
|
|
86
|
+
paint(): void;
|
|
87
|
+
/**
|
|
88
|
+
* 그리기 계획이 「푸터 값 다시」를 말할 때(행 집합·칸 값이 바뀜). 합계를 다시 셈하고 값 칸 글자만 고친다.
|
|
89
|
+
* 스크롤·정렬·폭 조절·선택에는 계획이 이것을 부르지 않는다 — 그래서 그때는 합계를 셈하지 않는다.
|
|
90
|
+
* / Called when the plan asks for new footer values (row set or cell values changed): recompute and rewrite
|
|
91
|
+
* value text only. Scrolling, sorting, resizing and selection never ask for it.
|
|
92
|
+
*/
|
|
93
|
+
updateValues(): void;
|
|
94
|
+
/**
|
|
95
|
+
* 본문 가로 위치를 따라가게 할 객체를 넘겨 받는다(그리드가 렌더러를 만든 뒤 한 번). 그린 막대가 그 객체를 따라간다.
|
|
96
|
+
* / Receives the horizontal scroll follower; the painted bar follows the body's horizontal position.
|
|
97
|
+
*/
|
|
98
|
+
setFollower(f: IScrollFollower | null): void;
|
|
99
|
+
/**
|
|
100
|
+
* 컬럼 폭 등록기를 넘겨 받는다(그리드가 기하·등록기를 만든 뒤). 푸터 칸 폭이 끄는 동안 머리글·본문과 같은 프레임에 따라간다.
|
|
101
|
+
* / Receives the geometry applier so footer cell widths follow a column drag in the same frame as header and body.
|
|
102
|
+
*/
|
|
103
|
+
setApplier(a: IGeometryApplier | null): void;
|
|
104
|
+
/**
|
|
105
|
+
* 막대 끝 여백(본문 세로 스크롤바 폭)을 넘겨 받는다 — 가로로 끝까지 긁어도 푸터가 본문과 같이 가게. 0 이면 아무것도 안 씀.
|
|
106
|
+
* / Receives the end gutter (body vertical scrollbar width) so the footer scrolls as far as the body; 0 writes nothing.
|
|
107
|
+
*/
|
|
108
|
+
setEndGutter(px: number): void;
|
|
109
|
+
/** 따라가기를 푼다(그리드를 없앨 때). / Releases the follower when the grid is destroyed. */
|
|
110
|
+
destroy(): void;
|
|
69
111
|
}
|
|
@@ -2,6 +2,7 @@ import { DataLayer } from './DataLayer.js';
|
|
|
2
2
|
import { ColumnLayout } from './ColumnLayout.js';
|
|
3
3
|
import { FlatRowModel } from './FlatRowModel.js';
|
|
4
4
|
import { GridOptions } from './types.js';
|
|
5
|
+
import { IRenderRequest } from './domain/render/ports.js';
|
|
5
6
|
import { RecalcCoordinator, RecalcSummary } from './formula/RecalcCoordinator.js';
|
|
6
7
|
import { FormulaErrorCode, FormulaGridAccessor } from './formula/types.js';
|
|
7
8
|
/**
|
|
@@ -52,10 +53,9 @@ export interface FormulaControllerDeps<T extends Record<string, any> = any> {
|
|
|
52
53
|
announce: (msg: string) => void;
|
|
53
54
|
/** i18n: 수식 오류 announce/셀 라벨 해석(formulaError.* 통합 키). / i18n: resolve formula error announce/labels. */
|
|
54
55
|
t: (key: string, params?: Record<string, string | number>) => string;
|
|
55
|
-
/**
|
|
56
|
-
* /
|
|
57
|
-
|
|
58
|
-
doRenderWindow: () => void;
|
|
56
|
+
/** 그리기 요청을 낸다 — 재계산 뒤(afterRecalc 가 !skipRender 일 때) 보이는 범위를 다시 그린다. 그리기는 요청 통로 하나로만 들어가 횟수·범위를 한곳에서 정한다.
|
|
57
|
+
* / Submit a render request — after a recalc (afterRecalc with !skipRender), repaint the visible range. Rendering enters through a single request channel so count and range are decided in one place. */
|
|
58
|
+
submitRender: (req: IRenderRequest) => void;
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* F3 셀 수식 컨트롤러. / F3 cell formula controller.
|
|
@@ -18,6 +18,10 @@ import { ChartManager } from './ChartManager.js';
|
|
|
18
18
|
import { OverrideKernel } from './OverrideKernel.js';
|
|
19
19
|
import { LocaleRegistry } from './i18n/LocaleRegistry.js';
|
|
20
20
|
import { GridRenderer } from './GridRenderer.js';
|
|
21
|
+
import { IRenderScheduler } from './render/ports.js';
|
|
22
|
+
import { HeaderSortIndicator } from './render/header/HeaderSortIndicator.js';
|
|
23
|
+
import { IColumnWindow } from './coordinate/geometryPorts.js';
|
|
24
|
+
import { RenderController } from './RenderController.js';
|
|
21
25
|
import { VirtualScroll } from './VirtualScroll.js';
|
|
22
26
|
import { Pagination } from './Pagination.js';
|
|
23
27
|
import { WorksheetManager } from './WorksheetManager.js';
|
|
@@ -68,6 +72,8 @@ export interface ComposerHost<T extends Record<string, any> = any> {
|
|
|
68
72
|
_pagination: Pagination | null;
|
|
69
73
|
_wsManager: WorksheetManager<T> | null;
|
|
70
74
|
_colWidths: number[];
|
|
75
|
+
/** 렌더 루프(컬럼 기하의 주인). 마운트 때 채워짐. / Render loop (owner of the column geometry); set at mount. */
|
|
76
|
+
_render: RenderController<T> | null;
|
|
71
77
|
_formulaDirtySeeds: Set<string>;
|
|
72
78
|
emit(event: string, ...args: any[]): any;
|
|
73
79
|
on(event: string, cb: (...args: any[]) => void): any;
|
|
@@ -76,7 +82,11 @@ export interface ComposerHost<T extends Record<string, any> = any> {
|
|
|
76
82
|
_announce(msg: string): void;
|
|
77
83
|
/** i18n: 메시지 해석(인스턴스 오버라이드 우선 → 활성 로케일 → ko → 키). / i18n: resolve a message (instance override first, then active locale, then ko, then the raw key). */
|
|
78
84
|
t(key: string, params?: Record<string, string | number>): string;
|
|
79
|
-
_doRender(startIndex: number, endIndex: number): void;
|
|
85
|
+
_doRender(startIndex: number, endIndex: number, columns?: IColumnWindow, rowWork?: 'diff'): void;
|
|
86
|
+
/** 그리기 요청을 받아 계획대로 실행하는 곳(그리드마다 하나). / Takes render requests and runs them per plan (one per grid). */
|
|
87
|
+
_scheduler: IRenderScheduler;
|
|
88
|
+
/** 머리글 정렬 표시만 고치는 객체(그리드마다 하나). / Patches only header sort marks (one per grid). */
|
|
89
|
+
_sortIndicator: HeaderSortIndicator;
|
|
80
90
|
_visRange(): [number, number];
|
|
81
91
|
_renderHeader(): void;
|
|
82
92
|
_setFocusCell(ri: number, ci: number): void;
|