open-grid 1.1.1 → 1.2.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +30 -1
  3. package/dist/OpenGrid-0r_543Kj.cjs +7192 -0
  4. package/dist/OpenGrid-HmhGVC2V.js +7203 -0
  5. package/dist/open-grid-react.cjs +27 -1
  6. package/dist/open-grid-react.js +22 -82
  7. package/dist/open-grid-vue.cjs +31 -1
  8. package/dist/open-grid-vue.js +29 -79
  9. package/dist/open-grid.cjs +272 -6
  10. package/dist/open-grid.js +174 -260
  11. package/dist/types/core/CellEditManager.d.ts +75 -0
  12. package/dist/types/core/CellEventHandler.d.ts +99 -2
  13. package/dist/types/core/ChartManager.d.ts +53 -3
  14. package/dist/types/core/ContextMenu.d.ts +48 -3
  15. package/dist/types/core/CrossGridController.d.ts +86 -15
  16. package/dist/types/core/CrossGridRegistry.d.ts +36 -2
  17. package/dist/types/core/DetailManager.d.ts +108 -15
  18. package/dist/types/core/ExportManager.d.ts +73 -1
  19. package/dist/types/core/ExtensionPointRegistry.d.ts +160 -14
  20. package/dist/types/core/FilterPanel.d.ts +21 -3
  21. package/dist/types/core/FilterSelect.d.ts +41 -14
  22. package/dist/types/core/FindBarManager.d.ts +32 -0
  23. package/dist/types/core/FlatRowModel.d.ts +54 -11
  24. package/dist/types/core/FooterManager.d.ts +53 -1
  25. package/dist/types/core/FormulaController.d.ts +141 -10
  26. package/dist/types/core/GridComposer.d.ts +57 -4
  27. package/dist/types/core/GridRenderer.d.ts +3 -0
  28. package/dist/types/core/GridShuttle.d.ts +44 -4
  29. package/dist/types/core/GroupTreeManager.d.ts +86 -2
  30. package/dist/types/core/IconRegistry.d.ts +56 -9
  31. package/dist/types/core/KeyboardManager.d.ts +90 -4
  32. package/dist/types/core/MaskingEngine.d.ts +10 -9
  33. package/dist/types/core/MutationService.d.ts +115 -10
  34. package/dist/types/core/OpenGrid.d.ts +393 -34
  35. package/dist/types/core/OrgChart.d.ts +56 -1
  36. package/dist/types/core/OverrideKernel.d.ts +59 -15
  37. package/dist/types/core/Pagination.d.ts +44 -5
  38. package/dist/types/core/RangeSelectionManager.d.ts +123 -7
  39. package/dist/types/core/RenderController.d.ts +56 -0
  40. package/dist/types/core/RowManager.d.ts +55 -0
  41. package/dist/types/core/SkinRegistry.d.ts +51 -15
  42. package/dist/types/core/SortFilterManager.d.ts +82 -1
  43. package/dist/types/core/TriggerManager.d.ts +46 -0
  44. package/dist/types/core/WorksheetManager.d.ts +65 -3
  45. package/dist/types/core/XmlConverter.d.ts +56 -23
  46. package/dist/types/core/chart/types.d.ts +107 -10
  47. package/dist/types/core/detail/DetailGlyph.d.ts +3 -1
  48. package/dist/types/core/editors/CellEditor.d.ts +29 -2
  49. package/dist/types/core/formula/types.d.ts +71 -8
  50. package/dist/types/core/i18n/LocaleRegistry.d.ts +0 -0
  51. package/dist/types/core/i18n/interpolate.d.ts +5 -0
  52. package/dist/types/core/i18n/locales/en.d.ts +166 -0
  53. package/dist/types/core/i18n/locales/ko.d.ts +166 -0
  54. package/dist/types/core/i18n/types.d.ts +249 -0
  55. package/dist/types/core/range/RangeQuery.d.ts +24 -2
  56. package/dist/types/core/renderers/CellRenderer.d.ts +105 -8
  57. package/dist/types/core/types.d.ts +352 -96
  58. package/dist/types/index.d.ts +22 -0
  59. package/dist/xlsx.min-BQ1o3sB6.cjs +11793 -0
  60. package/dist/{xlsx.min-Wavxcamn.js → xlsx.min-Bbz2ZypC.js} +453 -566
  61. package/package.json +4 -1
  62. package/dist/OpenGrid-LcZ5iixx.cjs +0 -97
  63. package/dist/OpenGrid-yg4mw6Ge.js +0 -9505
  64. package/dist/xlsx.min-Bx-LxWOf.cjs +0 -138
@@ -1,12 +1,25 @@
1
+ import { PartialLocaleMessages, LocaleMessageKey, MessageValue } from './i18n/types.js';
1
2
  import { FormulaErrorCode } from './formula/types.js';
2
3
  import { RangeStats as _RangeStats } from './range/RangeQuery.js';
4
+ /** 컬럼 데이터 타입. / Column data type. */
3
5
  export type DataType = 'string' | 'number' | 'date' | 'boolean' | 'select' | 'radio' | 'img' | 'html' | 'barcode';
4
6
  export type { MaskType, MaskDef } from './MaskingEngine.js';
7
+ /** 선택 모드('cells' = F1 범위 선택). / Selection mode ('cells' = F1 range selection). */
5
8
  export type SelectionMode = 'single' | 'row' | 'multiple' | 'cells';
9
+ /** 정렬 방향. / Sort direction. */
6
10
  export type SortDir = 'asc' | 'desc';
11
+ /** 삽입 위치(키워드 또는 인덱스). / Insertion position (keyword or index). */
7
12
  export type Position = 'first' | 'last' | 'before' | 'after' | number;
13
+ /** 내장 셀 렌더러 타입 이름. / Built-in cell renderer type name. */
8
14
  export type RendererType = 'text' | 'number' | 'date' | 'checkbox' | 'button' | 'link' | 'image' | 'icon' | 'switch' | 'sparkline' | 'template' | 'custom' | 'badge' | 'progress' | 'rating' | 'radio' | 'img' | 'html' | 'barcode';
15
+ /** 내장 셀 에디터 타입 이름. / Built-in cell editor type name. */
9
16
  export type EditorType = 'text' | 'number' | 'date' | 'select' | 'checkbox' | 'custom';
17
+ /**
18
+ * 셀 마우스 이벤트 페이로드(cellClick/cellDblClick/cellMouseOver …).
19
+ * / Cell mouse event payload (cellClick/cellDblClick/cellMouseOver …).
20
+ *
21
+ * @typeParam T - 행 데이터 타입 / Row data type
22
+ */
10
23
  export interface CellEvent<T = any> {
11
24
  type: string;
12
25
  rowIndex: number;
@@ -18,6 +31,12 @@ export interface CellEvent<T = any> {
18
31
  target: HTMLElement;
19
32
  originalEvent: MouseEvent;
20
33
  }
34
+ /**
35
+ * 셀 편집 이벤트 페이로드(editStart/editEnd/editBefore).
36
+ * / Cell edit event payload (editStart/editEnd/editBefore).
37
+ *
38
+ * @typeParam T - 행 데이터 타입 / Row data type
39
+ */
21
40
  export interface EditEvent<T = any> {
22
41
  type: string;
23
42
  rowIndex: number;
@@ -27,8 +46,15 @@ export interface EditEvent<T = any> {
27
46
  newValue: any;
28
47
  row: T;
29
48
  column: ColumnDef<T>;
49
+ /** true 로 바꾸면 편집 커밋 취소. / Set true to cancel the edit commit. */
30
50
  cancel?: boolean;
31
51
  }
52
+ /**
53
+ * 행 마우스 이벤트 페이로드(rowClick/rowDblClick/rowMouseOver …).
54
+ * / Row mouse event payload (rowClick/rowDblClick/rowMouseOver …).
55
+ *
56
+ * @typeParam T - 행 데이터 타입 / Row data type
57
+ */
32
58
  export interface RowEvent<T = any> {
33
59
  type: string;
34
60
  rowIndex: number;
@@ -36,6 +62,12 @@ export interface RowEvent<T = any> {
36
62
  target: HTMLElement;
37
63
  originalEvent: MouseEvent;
38
64
  }
65
+ /**
66
+ * 셀 키보드 이벤트 페이로드(cellKeyDown/cellKeyUp/cellKeyPress).
67
+ * / Cell keyboard event payload (cellKeyDown/cellKeyUp/cellKeyPress).
68
+ *
69
+ * @typeParam T - 행 데이터 타입 / Row data type
70
+ */
39
71
  export interface CellKeyEvent<T = any> {
40
72
  type: string;
41
73
  rowIndex: number;
@@ -48,22 +80,28 @@ export interface CellKeyEvent<T = any> {
48
80
  target: HTMLElement;
49
81
  originalEvent: KeyboardEvent;
50
82
  }
83
+ /** 정렬 변경 이벤트(sortChange). / Sort change event (sortChange). */
51
84
  export interface SortEvent {
52
85
  field: string;
53
86
  dir: SortDir;
87
+ /** 멀티정렬 전체 상태. / Full multi-sort state. */
54
88
  sortList: SortItem[];
55
89
  }
90
+ /** 필터 변경 이벤트(filterChange). / Filter change event (filterChange). */
56
91
  export interface FilterEvent {
57
92
  field: string;
58
93
  filterItems: FilterItem[];
94
+ /** 전체 컬럼의 활성 필터 맵. / Active filters for all columns. */
59
95
  allFilters: Record<string, FilterItem[]>;
60
96
  }
97
+ /** 스크롤 이벤트(scroll). / Scroll event (scroll). */
61
98
  export interface ScrollEvent {
62
99
  scrollLeft: number;
63
100
  scrollTop: number;
64
101
  isAtTop: boolean;
65
102
  isAtBottom: boolean;
66
103
  }
104
+ /** 행 드래그&드롭 이벤트(onDrop). / Row drag & drop event (onDrop). */
67
105
  export interface DragDropEvent<T = any> {
68
106
  sourceRows: T[];
69
107
  sourceIndexes: number[];
@@ -71,42 +109,51 @@ export interface DragDropEvent<T = any> {
71
109
  targetGridId?: string;
72
110
  }
73
111
  /**
74
- * 그리드↔그리드 행 이동 이벤트.
112
+ * 그리드↔그리드 행 이동 이벤트. / Grid-to-grid row move event.
113
+ *
75
114
  * crossGrid:true 인 두 그리드 사이에서 행을 드래그·드롭할 때 3단계로 발생한다.
76
- * - onGridDropBefore : 변경 직전(이동 전). false 반환 이동 취소.
77
- * - onGridDropAfter : 양쪽 데이터 모델 이동 완료 후.
78
- * - onGridDropComplete: 양쪽 재렌더까지 끝난 후.
115
+ * / Fires in three phases when rows are dragged between two grids with crossGrid:true.
116
+ * - onGridDropBefore : 변경 직전(이동 전). false 반환 시 이동 취소. / just before the move; return false to cancel.
117
+ * - onGridDropAfter : 양쪽 데이터 모델 이동 완료 후. / after both data models have moved.
118
+ * - onGridDropComplete: 양쪽 재렌더까지 끝난 후. / after both grids finished re-rendering.
79
119
  */
80
120
  export interface GridDropEvent<T = any> {
81
- /** 행을 보낸(드래그 시작) 그리드 */
121
+ /** 행을 보낸(드래그 시작) 그리드 / Grid the rows were dragged from */
82
122
  sourceGrid: OpenGridInstance<T>;
83
- /** 행을 받은(드롭 대상) 그리드 */
123
+ /** 행을 받은(드롭 대상) 그리드 / Grid the rows were dropped onto */
84
124
  targetGrid: OpenGridInstance<T>;
85
- /** 이동된 행 데이터 (내부 id 제외 복사본) */
125
+ /** 이동된 행 데이터 (내부 id 제외 복사본) / Moved row data (copies without internal ids) */
86
126
  rows: T[];
87
- /** 소스 그리드에서의 원래 행 인덱스들 */
127
+ /** 소스 그리드에서의 원래 행 인덱스들 / Original row indexes in the source grid */
88
128
  sourceIndexes: number[];
89
- /** 타깃 그리드에서 삽입된 시작 인덱스 */
129
+ /** 타깃 그리드에서 삽입된 시작 인덱스 / Insertion start index in the target grid */
90
130
  targetIndex: number;
91
- /** before 단계에서 true 로 바꾸면 이동 취소 (onGridDropBefore가 false 반환한 것과 동일) */
131
+ /** before 단계에서 true 로 바꾸면 이동 취소 (onGridDropBefore가 false 반환한 것과 동일) / Set true in the before phase to cancel (same as returning false from onGridDropBefore) */
92
132
  cancel?: boolean;
93
133
  }
94
- /** 그리드↔그리드 필드 매핑 확정 이벤트 (interactive 모드에서 매핑 모달 확인 시) */
134
+ /**
135
+ * 그리드↔그리드 필드 매핑 확정 이벤트 (interactive 모드에서 매핑 모달 확인 시).
136
+ * / Grid-to-grid field-mapping confirmation event (when the mapping modal is confirmed in interactive mode).
137
+ */
95
138
  export interface GridMappingEvent<T = any> {
96
139
  sourceGrid: OpenGridInstance<T>;
97
140
  targetGrid: OpenGridInstance<T>;
98
- /** 타깃필드 → 소스필드 매핑 */
141
+ /** 타깃필드 → 소스필드 매핑 / target-field → source-field mapping */
99
142
  mapping: Record<string, string>;
100
- /** crossGridMapping 에 baking 할 수 있는 변환 함수 소스 */
143
+ /** crossGridMapping 에 baking 할 수 있는 변환 함수 소스 / Transform-function source that can be baked into crossGridMapping */
101
144
  script: string;
102
145
  }
146
+ /** 선택 변경 이벤트(selectionChange). / Selection change event (selectionChange). */
103
147
  export interface SelectionEvent<T = any> {
104
148
  rows: T[];
105
149
  rowIndexes: number[];
106
150
  cells?: CellRange[];
107
151
  }
108
152
  /**
153
+ * 셀 범위(사각형) 좌표. / Cell range (rectangle) coordinates.
154
+ *
109
155
  * CellRangeSemantics — CellRange 의미 규범(C0.4, 15_cross_contracts.md). 소유자 = F1(범위 선택).
156
+ * / CellRange semantic contract (C0.4, 15_cross_contracts.md). Owner = F1 (range selection).
110
157
  * F3(수식 ref)·F4(차트 소스)는 이 의미로만 CellRange 를 소비한다.
111
158
  * - startRow/endRow : flat/visual index (C0.2 — FlatRowModel 이 다루는 화면 표시 순서).
112
159
  * group/tree pseudo-row, (F2 도입 후) detail head/filler 도 포함한 인덱스 공간이며,
@@ -122,22 +169,24 @@ export interface CellRange {
122
169
  startCol: number;
123
170
  endCol: number;
124
171
  }
172
+ /** F1 범위 선택 옵션. / F1 range-selection options. */
125
173
  export interface RangeSelectionOptions {
126
- /** 기본 selection==='cells' 와 동치 */
174
+ /** 기본 selection==='cells' 와 동치 / Equivalent to selection==='cells'. Default follows selection. */
127
175
  enabled?: boolean;
128
- /** 기본 true — 핸들 표시/드래그 */
176
+ /** 기본 true — 핸들 표시/드래그 / Default true — show/drag the fill handle */
129
177
  fillHandle?: boolean;
130
- /** 기본 false — Ctrl 멀티 rect(Full, 미구현) */
178
+ /** 기본 false — Ctrl 멀티 rect(Full, 미구현) / Default false — Ctrl multi-rect (Full tier, not implemented) */
131
179
  multiRange?: boolean;
132
- /** 기본 24(px) — autoscroll 밴드 폭 */
180
+ /** 기본 24(px) — autoscroll 밴드 폭 / Default 24(px) — autoscroll edge band width */
133
181
  autoScrollEdge?: number;
134
- /** 기본 true — false 면 항상 copy(시리즈 감지 비활성) */
182
+ /** 기본 true — false 면 항상 copy(시리즈 감지 비활성) / Default true — false forces copy (disables series detection) */
135
183
  seriesFill?: boolean;
136
- /** 기본 false — 그룹/트리 모드 범위선택(MVP 비활성) */
184
+ /** 기본 false — 그룹/트리 모드 범위선택(MVP 비활성) / Default false — range selection in group/tree mode (off in MVP) */
137
185
  enabledInTreeGroup?: boolean;
138
- /** 기본 false — 수식 대상 덮어쓰기(C3.2 opt-in) */
186
+ /** 기본 false — 수식 대상 덮어쓰기(C3.2 opt-in) / Default false — overwrite formula cells on fill (C3.2 opt-in) */
139
187
  fillOverwriteFormula?: boolean;
140
188
  }
189
+ /** F1 채우기 커밋 이벤트(onRangeFill). / F1 fill commit event (onRangeFill). */
141
190
  export interface RangeFillEvent {
142
191
  source: CellRange;
143
192
  target: CellRange;
@@ -152,90 +201,100 @@ export interface RangeFillEvent {
152
201
  /** before 훅에서 true 로 바꾸면 채우기 취소(현재 배선은 이벤트 emit 뒤 즉시 확인) */
153
202
  cancel?: boolean;
154
203
  }
204
+ /** F1 범위 복사 이벤트(onRangeCopy). / F1 range copy event (onRangeCopy). */
155
205
  export interface RangeCopyEvent {
156
206
  range: CellRange;
207
+ /** 클립보드 TSV 텍스트. / Clipboard TSV text. */
157
208
  text: string;
158
209
  }
210
+ /** F1 활성 범위 변경 이벤트(onRangeChange). / F1 active-range change event (onRangeChange). */
159
211
  export interface RangeChangeEvent {
160
212
  range: CellRange | null;
161
213
  }
162
214
  export type { FormulaErrorCode } from './formula/types.js';
163
- /** F3 옵션(C5.1 단일 중첩 — 최상위 flat 키 금지). */
215
+ /** F3 셀 수식 옵션(C5.1 단일 중첩 — 최상위 flat 키 금지). / F3 cell-formula options (C5.1 single nesting — no top-level flat keys). */
164
216
  export interface FormulaOptions {
165
- /** 셀 수식 인-셀 '=' 편집 자동 인식 on(기본 false — 회귀 0). setCellFormula API 는 이 값과 무관하게 항상 동작. */
217
+ /** 셀 수식 인-셀 '=' 편집 자동 인식 on(기본 false — 회귀 0). setCellFormula API 는 이 값과 무관하게 항상 동작. / Auto-recognize in-cell '=' edits (default false — zero regression). setCellFormula always works regardless. */
166
218
  enabled?: boolean;
167
- /** 참조 정규화 정책(기본 'stable', §3.2). */
219
+ /** 참조 정규화 정책(기본 'stable', §3.2). / Reference normalization policy (default 'stable', §3.2). */
168
220
  refMode?: 'stable' | 'relative';
169
- /** 나눗셈 소수 자리(기본 30, FormulaEngine 계승). */
221
+ /** 나눗셈 소수 자리(기본 30, FormulaEngine 계승). / Division decimal precision (default 30, inherited from FormulaEngine). */
170
222
  divisionPrecision?: number;
171
- /** 수식 바 표시(P1, 기본 false — 미구현). */
223
+ /** 수식 바 표시(P1, 기본 false — 미구현). / Formula bar (P1, default false — not implemented). */
172
224
  formulaBar?: boolean;
173
- /** 수식 셀 마커(기본 true — HANMS-09/R-FORMULA-MARKER). */
225
+ /** 수식 셀 마커(기본 true — HANMS-09/R-FORMULA-MARKER). / Formula cell marker (default true). */
174
226
  cellMarker?: boolean;
175
- /** 편집 시 자동 재계산(기본 true). */
227
+ /** 편집 시 자동 재계산(기본 true). / Auto recalc on edit (default true). */
176
228
  autoRecalc?: boolean;
177
229
  onFormulaChange?: (e: FormulaChangeEvent) => void;
178
230
  onFormulaRecalc?: (e: FormulaRecalcEvent) => void;
179
231
  onFormulaError?: (e: FormulaErrorEvent) => void;
180
232
  }
233
+ /** F3 수식 변경 이벤트(onFormulaChange). / F3 formula change event (onFormulaChange). */
181
234
  export interface FormulaChangeEvent {
182
235
  rowIndex: number;
183
236
  field: string;
184
237
  formula: string;
185
238
  oldFormula: string | null;
186
239
  }
240
+ /** F3 재계산 완료 이벤트(onFormulaRecalc). / F3 recalc-finished event (onFormulaRecalc). */
187
241
  export interface FormulaRecalcEvent {
242
+ /** 값이 바뀐 셀 키 목록. / Keys of cells whose values changed. */
188
243
  changed: string[];
189
244
  cycles: number;
190
245
  ms: number;
191
- /** Spike-A §8 교훈: 폐포가 임계(500) 초과 시 true(가이드 문서화/모니터링용). */
246
+ /** Spike-A §8 교훈: 폐포가 임계(500) 초과 시 true(가이드 문서화/모니터링용). / true when the dirty closure exceeded the threshold (500) — for docs/monitoring. */
192
247
  large: boolean;
193
248
  }
249
+ /** F3 수식 오류 이벤트(onFormulaError). / F3 formula error event (onFormulaError). */
194
250
  export interface FormulaErrorEvent {
195
251
  rowIndex: number;
196
252
  field: string;
197
253
  error: FormulaErrorCode;
198
254
  }
199
255
  export type { RangeStats } from './range/RangeQuery.js';
200
- /** masterDetail.renderer 3번째 인자(§6.1). */
256
+ /** masterDetail.renderer 3번째 인자(§6.1). / Third argument of masterDetail.renderer (§6.1). */
201
257
  export interface DetailRenderApi<T = any> {
202
258
  grid: OpenGridInstance<T>;
203
259
  rowId: string;
204
- /** 현재 그리드의 중첩 깊이(CON-4). 0 = 최상위. */
260
+ /** 현재 그리드의 중첩 깊이(CON-4). 0 = 최상위. / Nesting depth of this grid (CON-4). 0 = top level. */
205
261
  depth: number;
262
+ /** 이 패널을 접는다. / Collapse this panel. */
206
263
  collapse: () => void;
207
- /** 패널 재측정(Phase2 auto 대비 자리 — MVP 는 no-op 에 가까움). */
264
+ /** 패널 재측정(Phase2 auto 대비 자리 — MVP 는 no-op 에 가까움). / Re-measure the panel (placeholder for Phase 2 auto; near no-op in MVP). */
208
265
  refresh: () => void;
209
266
  }
210
- /** F2 옵션(C5.1 단일 중첩 — 구 flat `detail*`/`masterDetail:boolean` 은 이 안으로 접힘). */
267
+ /** F2 마스터/디테일 옵션(C5.1 단일 중첩 — 구 flat `detail*`/`masterDetail:boolean` 은 이 안으로 접힘). / F2 master/detail options (C5.1 single nesting — legacy flat `detail*`/`masterDetail:boolean` folded in here). */
211
268
  export interface MasterDetailOptions<T = any> {
212
- /** 기능 on/off. 기본 false. */
269
+ /** 기능 on/off. 기본 false. / Feature on/off. Default false. */
213
270
  enabled?: boolean;
214
- /** 임의 HTML/컴포넌트를 host 에 주입(§5). subgridOptions 와 동시 지정 시 이 쪽이 우선. */
271
+ /** 임의 HTML/컴포넌트를 host 에 주입(§5). subgridOptions 와 동시 지정 시 이 쪽이 우선. / Inject arbitrary HTML/components into the host (§5). Takes precedence over subgridOptions. */
215
272
  renderer?: (row: T, host: HTMLElement, api: DetailRenderApi<T>) => void | HTMLElement;
216
- /** 패널 높이(px). 기본 200. MVP 는 rowHeight 배수로 양자화(EC-10). */
273
+ /** 패널 높이(px). 기본 200. MVP 는 rowHeight 배수로 양자화(EC-10). / Panel height (px). Default 200. Quantized to rowHeight multiples in MVP (EC-10). */
217
274
  height?: number;
218
275
  /**
219
276
  * 'fixed'(기본)만 MVP 에서 동작. 'auto' 는 Spike-B(C12.2) 통과 전 미공개 — 지정해도
220
277
  * DetailManager 가 'fixed' 로 무시 처리하고 1회 console.warn 한다.
278
+ * / Only 'fixed' (default) works in MVP. 'auto' is unreleased until Spike-B (C12.2) passes —
279
+ * if specified, DetailManager treats it as 'fixed' and warns once.
221
280
  */
222
281
  heightMode?: 'fixed' | 'auto';
223
- /** 기본 true. false = 아코디언(펼침 1개만 허용). */
282
+ /** 기본 true. false = 아코디언(펼침 1개만 허용). / Default true. false = accordion (only one panel open). */
224
283
  expandMultiple?: boolean;
225
- /** 기본 false. true 면 collapse 해도 host/instance 캐시를 유지(재펼침 시 재생성 생략). */
284
+ /** 기본 false. true 면 collapse 해도 host/instance 캐시를 유지(재펼침 시 재생성 생략). / Default false. true keeps host/instance cache across collapse (skips re-creation on re-expand). */
226
285
  cache?: boolean;
227
- /** 어포던스 위치. 기본 'expander-col'(전용 컬럼). */
286
+ /** 어포던스 위치. 기본 'expander-col'(전용 컬럼). / Toggle affordance position. Default 'expander-col' (dedicated column). */
228
287
  toggle?: 'expander-col' | 'first-cell';
229
- /** 패널 role=region 의 aria-label. 기본 '상세 내용'. */
288
+ /** 패널 role=region 의 aria-label. 기본 '상세 내용'. / aria-label of the panel region. Default '상세 내용'. */
230
289
  ariaLabel?: string;
231
- /** 중첩 깊이 한계(CON-4/FR-10). 기본 2. */
290
+ /** 중첩 깊이 한계(CON-4/FR-10). 기본 2. / Nesting depth limit (CON-4/FR-10). Default 2. */
232
291
  maxDepth?: number;
233
- /** 지정 시 height 대신 이 값을 슬롯수(정수, 최소 1)로 직접 사용. */
292
+ /** 지정 시 height 대신 이 값을 슬롯수(정수, 최소 1)로 직접 사용. / When set, used directly as slot count (integer, min 1) instead of height. */
234
293
  detailRowCount?: number;
235
- /** renderer 미지정 시: 자식 OpenGrid 를 이 옵션으로 자동 생성(§5 ②). */
294
+ /** renderer 미지정 시: 자식 OpenGrid 를 이 옵션으로 자동 생성(§5 ②). / When renderer is absent: auto-create a child OpenGrid with these options (§5 ②). */
236
295
  subgridOptions?: GridOptions<any>;
237
296
  }
238
- /** rowExpand/rowCollapse payload(C5.2, §6.3). */
297
+ /** rowExpand/rowCollapse 페이로드(C5.2, §6.3). / rowExpand/rowCollapse payload (C5.2, §6.3). */
239
298
  export interface RowExpandEvent<T = any> {
240
299
  /** flat/visual index(C0.2). */
241
300
  rowIndex: number;
@@ -243,10 +302,12 @@ export interface RowExpandEvent<T = any> {
243
302
  row: T;
244
303
  host: HTMLElement | null;
245
304
  }
305
+ /** 셀 렌더러 상세 지정(type + 렌더러별 부가 옵션). / Detailed cell renderer spec (type + renderer-specific extras). */
246
306
  export interface RendererDef {
247
307
  type: RendererType;
248
308
  [key: string]: any;
249
309
  }
310
+ /** 셀 에디터 상세 지정(type + 에디터별 부가 옵션). / Detailed cell editor spec (type + editor-specific extras). */
250
311
  export interface EditorDef {
251
312
  type: EditorType;
252
313
  options?: Array<string | {
@@ -261,105 +322,173 @@ export interface EditorDef {
261
322
  placeholder?: string;
262
323
  [key: string]: any;
263
324
  }
325
+ /**
326
+ * 컬럼 정의. / Column definition.
327
+ *
328
+ * @typeParam T - 행 데이터 타입 / Row data type
329
+ * @example
330
+ * const col: ColumnDef = { field: 'price', header: '가격', type: 'number', format: '#,##0' };
331
+ */
264
332
  export interface ColumnDef<T = any> {
333
+ /** 행 객체의 속성 키(고유). / Property key on the row object (unique). */
265
334
  field: string;
335
+ /** 헤더 표시 텍스트('\n' 은 줄바꿈). / Header caption ('\n' breaks lines). */
266
336
  header: string;
337
+ /** 고정 폭(px). / Fixed width (px). */
267
338
  width?: number;
339
+ /** 최소 폭(px). / Minimum width (px). */
268
340
  minWidth?: number;
341
+ /** 최대 폭(px). / Maximum width (px). */
269
342
  maxWidth?: number;
343
+ /** 잔여 폭 배분 가중치. / Flex weight for remaining width distribution. */
270
344
  flex?: number;
345
+ /** 데이터 타입(정렬·기본 렌더러 결정). / Data type (drives sorting & default renderer). */
271
346
  type?: DataType;
272
347
  /**
273
348
  * 숫자/날짜 포맷 문자열. 숫자는 통화 기호 접두·접미와 음수 패턴 지원:
274
349
  * '#,##0' · '#,##0.00' · '₩#,##0' · '$#,##0.00' · '#,##0원' · '$#,##0;($#,##0)'(음수 괄호)
350
+ * / Number/date format string. Numbers support currency prefixes/suffixes and negative
351
+ * patterns, e.g. '$#,##0;($#,##0)' (parentheses for negatives).
275
352
  */
276
353
  format?: string;
277
- /** ISO 통화코드('KRW'|'USD'|'EUR'…). 지정 시 Intl.NumberFormat 로케일 통화 포맷 (format 보다 우선) */
354
+ /** ISO 통화코드('KRW'|'USD'|'EUR'…). 지정 시 Intl.NumberFormat 로케일 통화 포맷 (format 보다 우선) / ISO currency code; uses Intl.NumberFormat locale currency formatting (takes precedence over format) */
278
355
  currency?: string;
356
+ /** 값 → 표시 텍스트 매핑. / Raw value → display text map. */
279
357
  valueMap?: Record<string, string>;
358
+ /** 셀 렌더러(내장 타입명 또는 상세 정의). / Cell renderer (built-in type name or detailed def). */
280
359
  renderer?: RendererType | RendererDef;
360
+ /** 편집 가능 여부(불리언 또는 행별 함수). / Editable flag (boolean or per-row function). */
281
361
  editable?: boolean | ((row: T, rowIndex: number) => boolean);
362
+ /** 셀 에디터(내장 타입명 또는 상세 정의). / Cell editor (built-in type name or detailed def). */
282
363
  editor?: EditorType | EditorDef;
364
+ /** 셀 정렬. / Cell text alignment. */
283
365
  align?: 'left' | 'center' | 'right';
366
+ /** 헤더 정렬. / Header text alignment. */
284
367
  headerAlign?: 'left' | 'center' | 'right';
368
+ /** 셀 인라인 스타일(정적 또는 값·행 함수). / Cell inline style (static or value/row function). */
285
369
  cellStyle?: CSSProperties | ((value: any, row: T, rowIndex: number) => CSSProperties);
370
+ /** 헤더 인라인 스타일. / Header inline style. */
286
371
  headerStyle?: CSSProperties;
372
+ /** 헤더 클릭 정렬 허용. / Allow sort on header click. */
287
373
  sortable?: boolean;
374
+ /** 필터 아이콘/패널 허용. / Allow the filter icon/panel. */
288
375
  filterable?: boolean;
376
+ /** 헤더 드래그 폭 조절 허용. / Allow header drag resize. */
289
377
  resizable?: boolean;
378
+ /** 컬럼 숨김. / Hide the column. */
290
379
  hidden?: boolean;
380
+ /** 왼쪽 고정(frozen) 여부. / Freeze the column to the left. */
291
381
  frozen?: boolean;
292
- /** 셀 줄바꿈: true 면 nowrap+ellipsis 대신 여러 줄로 표시(rowHeight 확대와 함께 사용) */
382
+ /** 셀 줄바꿈: true 면 nowrap+ellipsis 대신 여러 줄로 표시(rowHeight 확대와 함께 사용) / Cell wrapping: true renders multiple lines instead of nowrap+ellipsis (use with a larger rowHeight) */
293
383
  wrap?: boolean;
294
384
  /**
295
385
  * 헤더(컬럼 머리글) 줄바꿈: true 면 헤더 텍스트가 잘리지 않고 여러 줄로 줄바꿈된다.
296
386
  * (셀 본문용 wrap 과 별개로 헤더에만 적용. header 문자열의 '\n' 은 headerWrap 여부와 무관하게 항상 줄바꿈됨)
297
387
  * 줄바꿈된 헤더에 맞춰 헤더 행 높이가 자동으로 늘어난다.
388
+ * / Header wrapping: true wraps header text to multiple lines instead of truncating
389
+ * (header-only, independent of the body `wrap`; '\n' in `header` always breaks regardless).
390
+ * The header row height grows automatically to fit.
298
391
  */
299
392
  headerWrap?: boolean;
393
+ /** 가로 병합 허용(불리언 또는 행별 함수). / Allow column span (boolean or per-row function). */
300
394
  colSpan?: boolean | ((row: T, rowIndex: number) => boolean);
395
+ /** 세로 병합 허용. / Allow row span. */
301
396
  rowSpan?: boolean;
397
+ /** 다단 헤더용 자식 컬럼. / Child columns for multi-level headers. */
302
398
  children?: ColumnDef<T>[];
399
+ /** 셀 title 툴팁(정적 또는 값·행 함수). / Cell title tooltip (static or value/row function). */
303
400
  tooltip?: string | ((value: any, row: T) => string);
401
+ /** select 정적 옵션. / Static options for select. */
304
402
  options?: Array<string | {
305
403
  label: string;
306
404
  value: any;
307
405
  }>;
406
+ /** select 동적 옵션 함수. / Dynamic option function for select. */
308
407
  optionsFn?: (row: T, rowIndex: number) => Array<string | {
309
408
  label: string;
310
409
  value: any;
311
410
  }>;
411
+ /** radio — 같은 group 내 단일 선택 / radio — single choice within the same group */
312
412
  group?: string;
413
+ /** img — 이미지 대체 텍스트 (웹접근성 필수) / img — alt text (required for accessibility) */
313
414
  alt?: string;
415
+ /** html — XSS 방지 sanitize (기본 true) / html — XSS sanitize (default true) */
314
416
  sanitize?: boolean;
417
+ /** barcode — 바코드 높이(px), 기본 28 / barcode — bar height in px, default 28 */
315
418
  barcodeHeight?: number;
419
+ /** F4: 표시 소수점 자리수 (display + kahanSum) / F4: display decimal places (display + kahanSum) */
316
420
  precision?: number;
421
+ /** 컬럼 수식(함수식 또는 '[field]' 문자열식). / Column formula (function form or '[field]' string form). */
317
422
  formula?: string | ((row: T, D: any) => any);
423
+ /** 나눗셈 소수점 자리수 (기본 30) / Division decimal precision (default 30) */
318
424
  formulaPrecision?: number;
425
+ /** 마스킹 타입 또는 상세 정의. / Mask type or detailed mask definition. */
319
426
  mask?: import('./MaskingEngine.js').MaskType | import('./MaskingEngine.js').MaskDef;
427
+ /** 트리 노드 아이콘(정적 정의 또는 행별 함수). / Tree node icon (static def or per-row function). */
320
428
  treeNodeIcon?: TreeNodeIconDef | ((row: T, hasChildren: boolean, expanded: boolean) => string);
429
+ /** @internal */
321
430
  _colIndex?: number;
431
+ /** @internal */
322
432
  _depth?: number;
433
+ /** @internal */
323
434
  _leaf?: boolean;
435
+ /** @internal setMaskEnabled(field, false) 시 true (컬럼 전체 해제) / true after setMaskEnabled(field, false) (whole-column reveal) */
324
436
  _maskRevealed?: boolean;
437
+ /** @internal 눈 아이콘 클릭으로 해제된 행 rowIndex 집합 / Set of rowIndexes revealed via the eye icon */
325
438
  _maskRevealedRows?: Set<number>;
326
439
  }
440
+ /** 트리 노드 아이콘 정의. / Tree node icon definition. */
327
441
  export interface TreeNodeIconDef {
328
- /** 접힌 branch 노드 아이콘 (Bootstrap Icons 클래스, 기본: 'bi-folder2') */
442
+ /** 접힌 branch 노드 아이콘 (Bootstrap Icons 클래스, 기본: 'bi-folder2') / Collapsed branch icon (Bootstrap Icons class, default 'bi-folder2') */
329
443
  branch?: string;
330
- /** 펼친 branch 노드 아이콘 (기본: 'bi-folder2-open') */
444
+ /** 펼친 branch 노드 아이콘 (기본: 'bi-folder2-open') / Expanded branch icon (default 'bi-folder2-open') */
331
445
  branchOpen?: string;
332
- /** 리프 노드 아이콘 (기본: 'bi-file-earmark') */
446
+ /** 리프 노드 아이콘 (기본: 'bi-file-earmark') / Leaf icon (default 'bi-file-earmark') */
333
447
  leaf?: string;
334
448
  }
335
449
  type CSSProperties = Partial<Record<keyof CSSStyleDeclaration, string>>;
450
+ /** 정렬 항목(멀티정렬 배열 원소). / Sort entry (element of a multi-sort list). */
336
451
  export interface SortItem {
337
452
  field: string;
338
453
  dir: SortDir;
339
454
  }
455
+ /** 필터 조건 1건. / A single filter condition. */
340
456
  export interface FilterItem {
457
+ /** 비교 연산자. / Comparison operator. */
341
458
  operator: '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith';
459
+ /** 비교 값. / Comparison value. */
342
460
  value: any;
343
461
  }
462
+ /** 집계 연산자. / Aggregate operator. */
344
463
  export type SummaryOp = 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'COUNT';
464
+ /** 필드별 집계 정의. / Per-field aggregate definition. */
345
465
  export interface SummaryFieldDef {
346
466
  field: string;
347
467
  op: SummaryOp;
348
468
  label?: string;
349
469
  }
470
+ /** 그룹 소계/합계 행 옵션. / Group summary row options. */
350
471
  export interface SummaryOptions {
472
+ /** 집계 대상 필드. / Fields to aggregate. */
351
473
  fields: string[];
474
+ /** 적용 연산(단일 또는 배열). / Operator(s) to apply. */
352
475
  ops?: SummaryOp | SummaryOp[];
476
+ /** 소계 행 위치. / Summary row position. */
353
477
  position?: 'top' | 'bottom';
478
+ /** 다중 소계 행 정의(커스텀 함수 지원). / Multiple summary rows (custom function supported). */
354
479
  rows?: Array<{
355
480
  op: SummaryOp;
356
481
  label?: string;
357
482
  customFn?: (items: any[]) => number;
358
483
  }>;
359
484
  }
485
+ /** 푸터 셀 정의. / Footer cell definition. */
360
486
  export interface FooterDef {
487
+ /** 집계 대상 필드. / Field to aggregate. */
361
488
  field?: string;
489
+ /** 집계 연산. / Aggregate operator. */
362
490
  op?: SummaryOp;
491
+ /** 라벨 텍스트(집계 대신 표시). / Label text (shown instead of an aggregate). */
363
492
  label?: string;
364
493
  /**
365
494
  * 숫자 포맷 문자열
@@ -371,29 +500,42 @@ export interface FooterDef {
371
500
  */
372
501
  format?: string;
373
502
  align?: 'left' | 'center' | 'right';
374
- /** 이 셀이 오른쪽으로 몇 컬럼을 병합할지 (기본: 1) */
503
+ /** 이 셀이 오른쪽으로 몇 컬럼을 병합할지 (기본: 1) / How many columns to span rightward (default 1) */
375
504
  colspan?: number;
376
505
  renderer?: RendererType | RendererDef;
377
506
  }
507
+ /** 인쇄 옵션. / Print options. */
378
508
  export interface PrintOptions {
379
509
  title?: string;
380
510
  excludeFields?: string[];
381
511
  showFooter?: boolean;
382
512
  }
513
+ /** 내보내기 스타일 모드. / Export style mode. */
383
514
  export type ExportStyleMode = 'theme' | 'none' | 'custom';
515
+ /** Excel/CSV/JSON 내보내기 옵션. / Excel/CSV/JSON export options. */
384
516
  export interface ExportOptions {
517
+ /** 저장 파일명. / Output filename. */
385
518
  filename?: string;
519
+ /** 엑셀 시트명. / Excel sheet name. */
386
520
  sheetName?: string;
521
+ /** 헤더 행 포함(기본 true). / Include the header row (default true). */
387
522
  includeHeader?: boolean;
523
+ /** 제외할 필드 목록. / Fields to exclude. */
388
524
  exceptFields?: string[];
525
+ /** 데이터 위에 추가할 제목 행들. / Extra title rows above the data. */
389
526
  headers?: ExportHeaderRow[];
527
+ /** 데이터 아래에 추가할 행들. / Extra rows below the data. */
390
528
  footers?: ExportHeaderRow[];
529
+ /** F1: CSS 테마 적용 방식 (기본: 'theme') / F1: theme styling mode (default 'theme') */
391
530
  styleMode?: ExportStyleMode;
392
- /** true 시 마스킹 활성 컬럼의 값을 마스킹된 형태로 내보냄 (기본: false = 원본 값) */
531
+ /** true 시 마스킹 활성 컬럼의 값을 마스킹된 형태로 내보냄 (기본: false = 원본 값) / true exports masked values for masked columns (default false = raw values) */
393
532
  maskOnExport?: boolean;
533
+ /** 내보내기 직전 훅. / Hook just before export. */
394
534
  onBefore?: () => void | Promise<void>;
535
+ /** 내보내기 완료 훅(blob 수신). / Hook after export (receives the blob). */
395
536
  onAfter?: (blob: Blob) => void;
396
537
  }
538
+ /** 내보내기 제목/푸터 행. / Export title/footer row. */
397
539
  export interface ExportHeaderRow {
398
540
  text: string;
399
541
  height?: number;
@@ -405,18 +547,42 @@ export interface ExportHeaderRow {
405
547
  background?: string;
406
548
  };
407
549
  }
550
+ /**
551
+ * 그리드 생성 옵션. / Grid construction options.
552
+ *
553
+ * `new OpenGrid(container, options)` 의 두 번째 인자. `columns` 만 필수.
554
+ * / Second argument of `new OpenGrid(container, options)`. Only `columns` is required.
555
+ *
556
+ * @typeParam T - 행 데이터 타입 / Row data type
557
+ * @example
558
+ * const grid = new OpenGrid('#host', {
559
+ * columns: [{ field: 'name', header: '이름' }, { field: 'qty', header: '수량', type: 'number' }],
560
+ * height: 400,
561
+ * editable: true,
562
+ * });
563
+ */
408
564
  export interface GridOptions<T = any> {
565
+ /** 컬럼 정의 배열(필수). / Column definitions (required). */
409
566
  columns: ColumnDef<T>[];
567
+ /** 그리드 높이(px 숫자 또는 CSS 문자열). / Grid height (px number or CSS string). */
410
568
  height?: number | string;
569
+ /** 그리드 폭(px 숫자 또는 CSS 문자열). / Grid width (px number or CSS string). */
411
570
  width?: number | string;
571
+ /** 행 높이(px). / Row height (px). */
412
572
  rowHeight?: number;
573
+ /** 헤더 행 높이(px). / Header row height (px). */
413
574
  headerHeight?: number;
575
+ /** 푸터 행 높이(px). / Footer row height (px). */
414
576
  footerHeight?: number;
577
+ /** 행 내용에 맞춰 행 높이 자동 확장(wrap 컬럼과 사용). / Auto-grow row height to content (use with wrap columns). */
415
578
  autoHeight?: boolean;
579
+ /** 컬럼 폭 합을 컨테이너 폭에 맞춤. / Stretch column widths to fill the container. */
416
580
  fillWidth?: boolean;
581
+ /** width/flex 미지정 컬럼의 기본 폭(px). / Default width (px) for columns without width/flex. */
417
582
  defaultColumnWidth?: number;
418
583
  /**
419
584
  * 뷰포트 안전장치(옵트인, 기본 undefined = OFF = 기존 동작 완전 불변).
585
+ * / Viewport safety net (opt-in; default undefined = OFF = behavior fully unchanged).
420
586
  * 호스트가 그리드 컨테이너 조상 체인에 확정 높이(definite height)를 주지 않으면
421
587
  * 내부 스페이서(totalRows×rowHeight)가 컨테이너를 전체 콘텐츠 크기로 부풀리고,
422
588
  * ResizeObserver 되먹임으로 windowing 이 무력화되어 전 행이 DOM 렌더되는 폭주가 발생한다
@@ -424,62 +590,117 @@ export interface GridOptions<T = any> {
424
590
  * 상태로 감지될 때에 한해 윈도잉 뷰포트 높이를 이 값(px)으로 클램프해 폭주를 차단한다.
425
591
  * 정상적으로 확정 높이가 있는 바운드 컨테이너에는 영향이 없다.
426
592
  * 1순위 권장은 컨테이너/그리드에 확정 height 를 주는 것이며, 이 옵션은 안전망이다.
593
+ * / When the container ancestor chain has no definite height, the internal spacer
594
+ * (totalRows×rowHeight) inflates the container and a ResizeObserver feedback loop defeats
595
+ * windowing, DOM-rendering every row (catastrophic on large data). If set, and only when the
596
+ * container is detected as "unbounded", the windowing viewport height is clamped to this px
597
+ * value. Bounded containers are unaffected. Prefer giving the container a definite height;
598
+ * this option is a safety net.
427
599
  */
428
600
  fallbackViewportHeight?: number;
601
+ /** 전역 편집 허용(컬럼별 editable 과 AND). / Global edit switch (ANDed with per-column editable). */
429
602
  editable?: boolean;
603
+ /** 편집 진입 방식. / How editing is entered. */
430
604
  editMode?: 'click' | 'dblclick' | 'none';
605
+ /** (예약) 편집 히스토리. / (Reserved) edit history. */
431
606
  history?: boolean;
607
+ /** (예약) 히스토리 크기. / (Reserved) history size. */
432
608
  historySize?: number;
609
+ /** 선택 모드('cells' = F1 범위 선택). / Selection mode ('cells' = F1 range selection). */
433
610
  selection?: SelectionMode;
611
+ /** 클립보드 복사/붙여넣기 허용. / Enable clipboard copy/paste. */
434
612
  clipboard?: boolean;
435
- /** F1: 범위 선택 + 채우기 핸들(C5.1 단일 중첩 — 최상위 flat 키 금지). */
613
+ /** F1: 범위 선택 + 채우기 핸들(C5.1 단일 중첩 — 최상위 flat 키 금지). / F1: range selection + fill handle (C5.1 single nesting — no top-level flat keys). */
436
614
  rangeSelection?: RangeSelectionOptions;
437
- /** F3: 셀 수식(C5.1 단일 중첩). */
615
+ /** F3: 셀 수식(C5.1 단일 중첩). / F3: cell formulas (C5.1 single nesting). */
438
616
  formula?: FormulaOptions;
439
- /** F2: 마스터/디테일(C5.1 단일 중첩). */
617
+ /** F2: 마스터/디테일(C5.1 단일 중첩). / F2: master/detail (C5.1 single nesting). */
440
618
  masterDetail?: MasterDetailOptions<T>;
441
- /** F4: 그리드 데이터 통합 차트(C5.1 단일 중첩). 타입은 chart/types 순환-안전 type-only import. */
619
+ /** F4: 그리드 데이터 통합 차트(C5.1 단일 중첩). 타입은 chart/types 순환-안전 type-only import. / F4: grid-data integrated chart (C5.1 single nesting). Type is a cycle-safe type-only import from chart/types. */
442
620
  chart?: import('./chart/types.js').ChartGlobalOptions;
621
+ /** 전역 정렬 허용. / Global sort switch. */
443
622
  sortable?: boolean;
623
+ /** Shift+클릭 멀티정렬 허용. / Allow Shift+click multi-sort. */
444
624
  multiSort?: boolean;
625
+ /** 전역 필터 허용. / Global filter switch. */
445
626
  filterable?: boolean;
627
+ /** 초기 정렬 상태. / Initial sort state. */
446
628
  defaultSort?: SortItem[];
629
+ /** 왼쪽 고정 컬럼 수. / Number of left-frozen columns. */
447
630
  frozenColumns?: number;
631
+ /** (예약) 고정 행 수 — 미구현. / (Reserved) frozen row count — not implemented. */
448
632
  frozenRows?: number;
633
+ /** 행 번호 컬럼 표시. / Show the row-number column. */
449
634
  rowNumber?: boolean;
635
+ /** 행 상태(추가/수정) 컬럼 표시. / Show the row-state (added/edited) column. */
450
636
  stateColumn?: boolean;
637
+ /** 체크박스 컬럼 표시. / Show the checkbox column. */
451
638
  checkColumn?: boolean;
639
+ /** 행 드래그 이동 허용. / Enable row drag & drop. */
452
640
  draggable?: boolean;
453
- /** 그리드↔그리드 행 드래그 이동 허용 (draggable:true 와 함께 사용, 양쪽 그리드 모두 true 여야 이동) */
641
+ /** 그리드↔그리드 행 드래그 이동 허용 (draggable:true 와 함께 사용, 양쪽 그리드 모두 true 여야 이동) / Enable grid-to-grid row drag (use with draggable:true; both grids must be true) */
454
642
  crossGrid?: boolean;
455
643
  /**
456
- * 크로스그리드 이동 시 소스→타깃 행 변환 방식.
457
- * - 'auto'(기본): 필드명 그대로 복사
458
- * - 'interactive': 소스/타깃 스키마가 다르면 매핑 모달을 띄워 개발자가 매칭 + 변환 스크립트 출력
459
- * - 함수: (srcRow) => targetRow 로 직접 변환 (모달 없이 baking)
644
+ * 크로스그리드 이동 시 소스→타깃 행 변환 방식. / How source rows are transformed on cross-grid moves.
645
+ * - 'auto'(기본): 필드명 그대로 복사 / 'auto' (default): copy by matching field names
646
+ * - 'interactive': 소스/타깃 스키마가 다르면 매핑 모달을 띄워 개발자가 매칭 + 변환 스크립트 출력 / 'interactive': show a mapping modal when schemas differ, emitting a transform script
647
+ * - 함수: (srcRow) => targetRow 로 직접 변환 (모달 없이 baking) / function: transform directly without the modal
460
648
  */
461
649
  crossGridMapping?: 'auto' | 'interactive' | ((srcRow: T) => Partial<T>);
650
+ /** 셀 병합 기능 사용. / Enable cell merging. */
462
651
  mergeCells?: boolean;
652
+ /** 초기 그룹핑 필드. / Initial grouping fields. */
463
653
  groupBy?: string[];
654
+ /** 그룹 소계/합계 옵션. / Group summary options. */
464
655
  summary?: SummaryOptions;
656
+ /** 트리 구성 방식('auto' = children 중첩, 'flat' = id/parentId 평면). / Tree build mode ('auto' = nested children, 'flat' = id/parentId pairs). */
465
657
  treeMode?: 'auto' | 'flat';
658
+ /** flat 트리의 id 필드명. / id field name for flat tree mode. */
466
659
  treeId?: string;
660
+ /** flat 트리의 부모 id 필드명. / parent-id field name for flat tree mode. */
467
661
  treeParentId?: string;
662
+ /** 로드 시 전체 펼침. / Expand all nodes on load. */
468
663
  expandOnLoad?: boolean;
664
+ /** 페이징 바 사용. / Enable the pagination bar. */
469
665
  pagination?: boolean;
666
+ /** 페이지당 행 수. / Rows per page. */
470
667
  pageSize?: number;
668
+ /** 푸터 셀 정의 배열. / Footer cell definitions. */
471
669
  footer?: FooterDef[];
670
+ /** 푸터 위치. / Footer position. */
472
671
  footerPosition?: 'top' | 'bottom';
672
+ /** 툴팁: true 면 모든 셀에 native title(값) 자동 노출. 컬럼별 col.tooltip 이 우선. / true auto-exposes native title (cell value) on every cell; per-column col.tooltip wins. */
473
673
  tooltips?: boolean;
674
+ /** 그리드 컨테이너 aria-label. / aria-label of the grid container. */
474
675
  ariaLabel?: string;
676
+ /** 색 테마 id(data-og-theme). / Color theme id (data-og-theme). */
475
677
  theme?: string;
678
+ /** 스킨 (FORM 축, R12b) — data-og-skin. 미지정 시 'default'(오늘과 byte-identical). / Skin (FORM axis, R12b) — data-og-skin. Default 'default' (byte-identical to stock look). */
476
679
  skin?: string;
680
+ /** 컨테이너에 주입할 CSS 변수 맵. / CSS custom properties injected on the container. */
477
681
  cssVars?: Record<string, string>;
682
+ /**
683
+ * UI 문자열 로케일 id. 미지정 시 전역 활성 로케일(기본 'ko') 상속 — 기존 사용자 무변화.
684
+ * / UI-string locale id. Falls back to the global active locale ('ko') — existing users unaffected.
685
+ * @defaultValue 전역 활성 로케일('ko') / the global active locale ('ko')
686
+ */
687
+ locale?: string;
688
+ /**
689
+ * 이 인스턴스 한정 메시지 부분 오버라이드(2단 딥머지, 카탈로그 위). 개별 라벨 옵션 > messages > 카탈로그.
690
+ * / Per-instance partial message override (2-level deep-merge over the catalog). Per-label option > messages > catalog.
691
+ */
692
+ messages?: PartialLocaleMessages;
693
+ /** F3: 우클릭 컨텍스트 메뉴(false=끔, 배열=커스텀 항목). / F3: right-click context menu (false = off, array = custom items). */
478
694
  contextMenu?: boolean | ContextMenuItem[];
695
+ /** F2: 워크시트(다중시트). / F2: worksheets (multi-sheet tabs). */
479
696
  worksheets?: WorksheetDef[];
697
+ /** F4: 전체 기본 소수점 정밀도 (기본 10) / F4: global default decimal precision (default 10) */
480
698
  calcPrecision?: number;
699
+ /** 컬럼 드래그 리오더 허용. / Enable column drag reorder. */
481
700
  columnReorder?: boolean;
701
+ /** override 커널: 레이어 예외를 기본 전파(strict). false → fallback 옵트인 동작 허용 / Override kernel: propagate layer exceptions by default (strict). false allows the fallback opt-in behavior. */
482
702
  overrideStrict?: boolean;
703
+ /** 첫 렌더 완료 콜백. / Fired after the first render. */
483
704
  onReady?: (grid: OpenGridInstance<T>) => void;
484
705
  onCellClick?: (e: CellEvent<T>) => void;
485
706
  onCellDblClick?: (e: CellEvent<T>) => void;
@@ -488,13 +709,13 @@ export interface GridOptions<T = any> {
488
709
  onEditBefore?: (e: EditEvent<T>) => boolean;
489
710
  onRowClick?: (e: RowEvent<T>) => void;
490
711
  onSelectionChange?: (e: SelectionEvent<T>) => void;
491
- /** F1: 범위 rects 변경 시(C4, F4 라이브 소비) */
712
+ /** F1: 범위 rects 변경 시(C4, F4 라이브 소비) / F1: fired when range rects change (C4; consumed live by F4) */
492
713
  onRangeChange?: (e: RangeChangeEvent) => void;
493
- /** F1: 채우기 커밋 결과(§6.3) */
714
+ /** F1: 채우기 커밋 결과(§6.3) / F1: fill commit result (§6.3) */
494
715
  onRangeFill?: (e: RangeFillEvent) => void;
495
- /** F1: 범위 복사 시(§6.3) */
716
+ /** F1: 범위 복사 시(§6.3) / F1: fired on range copy (§6.3) */
496
717
  onRangeCopy?: (e: RangeCopyEvent) => void;
497
- /** F2: 행 상세 패널 펼침/접힘 시(C5.1 on* 버킷). */
718
+ /** F2: 행 상세 패널 펼침/접힘 시(C5.1 on* 버킷). / F2: fired when a detail panel expands/collapses (C5.1 on* bucket). */
498
719
  onRowExpand?: (e: RowExpandEvent<T>) => void;
499
720
  onRowCollapse?: (e: RowExpandEvent<T>) => void;
500
721
  onSortChange?: (e: SortEvent) => void;
@@ -505,13 +726,13 @@ export interface GridOptions<T = any> {
505
726
  fromIndex: number;
506
727
  toIndex: number;
507
728
  }) => void;
508
- /** 변경전 — 이동 직전. false 반환 시 이동 취소 */
729
+ /** 변경전 — 이동 직전. false 반환 시 이동 취소 / before phase — just before the move; return false to cancel */
509
730
  onGridDropBefore?: (e: GridDropEvent<T>) => boolean | void;
510
- /** 변경후 — 양쪽 데이터 모델 이동 완료 */
731
+ /** 변경후 — 양쪽 데이터 모델 이동 완료 / after phase — both data models updated */
511
732
  onGridDropAfter?: (e: GridDropEvent<T>) => void;
512
- /** 완료시 — 양쪽 재렌더까지 끝남 */
733
+ /** 완료시 — 양쪽 재렌더까지 끝남 / complete phase — both grids re-rendered */
513
734
  onGridDropComplete?: (e: GridDropEvent<T>) => void;
514
- /** interactive 매핑 모달에서 매핑 확정 시 — 생성된 매핑/스크립트 수신 */
735
+ /** interactive 매핑 모달에서 매핑 확정 시 — 생성된 매핑/스크립트 수신 / fired when the interactive mapping modal is confirmed — receives the mapping/script */
515
736
  onGridDropMapping?: (e: GridMappingEvent<T>) => void;
516
737
  onColumnReorder?: (e: {
517
738
  fromIndex: number;
@@ -534,45 +755,50 @@ export interface GridOptions<T = any> {
534
755
  onCellKeyUp?: (e: CellKeyEvent<T>) => void;
535
756
  onCellKeyPress?: (e: CellKeyEvent<T>) => void;
536
757
  }
537
- /** override 레이어 함수: 첫 인자는 안쪽(원본 근접) 함수. orig(...) 호출이 super 처럼 동작. */
758
+ /** override 레이어 함수: 첫 인자는 안쪽(원본 근접) 함수. orig(...) 호출이 super 처럼 동작. / Override layer function: the first argument is the inner (closer-to-original) function; calling orig(...) behaves like super. */
538
759
  export type OverrideLayerFn = (orig: (...args: any[]) => any, ...args: any[]) => any;
760
+ /** override 등록 옵션. / Options for registering an override. */
539
761
  export interface OverrideCallOptions {
540
- /** 동일 메서드 재진입 허용(정당한 재귀). 기본 false. */
762
+ /** 동일 메서드 재진입 허용(정당한 재귀). 기본 false. / Allow re-entry into the same method (legit recursion). Default false. */
541
763
  reentrant?: boolean;
542
- /** 'fallback' → 레이어 예외 시 경고 후 원본 실행(멱등 가정, 롤백 불가). 미지정 시 strict. */
764
+ /** 'fallback' → 레이어 예외 시 경고 후 원본 실행(멱등 가정, 롤백 불가). 미지정 시 strict. / 'fallback' runs the original after warning on a layer exception (assumes idempotency, no rollback). Strict when unset. */
543
765
  onError?: 'fallback';
544
766
  }
545
- /** 등록 가능한 알고리즘 슬롯 이름. */
767
+ /** 등록 가능한 알고리즘 슬롯 이름. / Registerable algorithm slot names. */
546
768
  export type StrategySlot = 'sortComparator' | 'filterPredicate' | 'displayFormatter' | 'cellSerializer' | 'groupKeyFn' | 'summaryOp' | 'cellClassResolver' | 'ariaLabelResolver' | 'skinResolver';
547
769
  /**
548
770
  * SKIN 토큰 이름 집합 — **형태(FORM)만** 소유(색 0). COLOR 토큰과 disjoint name set 이라
549
771
  * 색⊥형태 직교성이 이름 충돌 부재로 물리적으로 보장된다(item3 §1.1~1.2, HANMS §4).
772
+ * / SKIN token name set — owns **FORM only** (zero colors). Being name-disjoint from COLOR
773
+ * tokens physically guarantees color⊥form orthogonality.
550
774
  */
551
775
  export type SkinTokenName = '--og-radius-none' | '--og-radius-sm' | '--og-radius-md' | '--og-radius-lg' | '--og-radius-pill' | '--og-radius-container' | '--og-radius-control' | '--og-radius-widget' | '--og-container-radius' | '--og-border-width' | '--og-border-width-strong' | '--og-border-style' | '--og-divider-style' | '--og-divider-repeat' | '--og-elevation-sm' | '--og-elevation-md' | '--og-elevation-lg' | '--og-elevation-alpha-sm' | '--og-elevation-alpha-md' | '--og-elevation-alpha-lg' | '--og-elevation-inset' | '--og-cell-padding-x' | '--og-cell-padding-y' | '--og-density-row-height' | '--og-density-header-height' | '--og-density-footer-height' | '--og-scrollbar-size' | '--og-texture-bg' | '--og-texture-size' | '--og-texture-opacity' | '--og-focus-width' | '--og-focus-style' | '--og-focus-offset' | '--og-focus-radius' | '--og-icon-size' | '--og-icon-fill' | '--og-icon-stroke-width' | '--og-icon-corner' | '--og-transition-fast' | '--og-transition-base' | '--og-row-accent-width';
552
- /** FORM-only 스킨 델타. 값에 색 리터럴이 있으면 SkinRegistry 가 런타임 거부(Rule 2, 직교성). */
776
+ /** FORM-only 스킨 델타. 값에 색 리터럴이 있으면 SkinRegistry 가 런타임 거부(Rule 2, 직교성). / FORM-only skin delta. Color literals in values are rejected at runtime by SkinRegistry (Rule 2, orthogonality). */
553
777
  export type SkinTokenDelta = Partial<Record<SkinTokenName, string>>;
554
- /** 단일키 정렬 비교자. dir 부호는 호출자(DataLayer)가 적용 — 슬롯은 비교만 반환. */
778
+ /** 단일키 정렬 비교자. dir 부호는 호출자(DataLayer)가 적용 — 슬롯은 비교만 반환. / Single-key sort comparator. The dir sign is applied by the caller (DataLayer) — the slot only compares. */
555
779
  export type SortComparatorFn = (a: any, b: any, field: string, dir: 'asc' | 'desc') => number;
556
- /** 필터 술어. true → 행 포함. */
780
+ /** 필터 술어. true → 행 포함. / Filter predicate. true includes the row. */
557
781
  export type FilterPredicateFn = (value: any, fi: FilterItem, field: string) => boolean;
558
- /** 표시값 포맷. getDisplayValue(인스턴스 안전) + 렌더러(formatNumber/formatDate) 공유. */
782
+ /** 표시값 포맷. getDisplayValue(인스턴스 안전) + 렌더러(formatNumber/formatDate) 공유. / Display-value formatter. Shared by getDisplayValue (instance-safe) and renderers (formatNumber/formatDate). */
559
783
  export type DisplayFormatterFn = (value: any, field: string, row: any) => string;
560
- /** export 셀 직렬화. */
784
+ /** export 셀 직렬화. / Export cell serializer. */
561
785
  export type CellSerializerFn = (value: any, col: any, row: any) => any;
562
- /** 그룹 키 산출. remainingFields = 현재 깊이부터의 잔여 필드. */
786
+ /** 그룹 키 산출. remainingFields = 현재 깊이부터의 잔여 필드. / Group key producer. remainingFields = remaining fields from the current depth. */
563
787
  export type GroupKeyFn = (row: any, remainingFields: string[]) => any;
564
- /** 집계 연산. null 반환 시 기본 SUM/AVG/COUNT/MAX/MIN 분기로 폴백. */
788
+ /** 집계 연산. null 반환 시 기본 SUM/AVG/COUNT/MAX/MIN 분기로 폴백. / Aggregate operator. Returning null falls back to the built-in SUM/AVG/COUNT/MAX/MIN branch. */
565
789
  export type SummaryOpFn = (op: string, nums: any[], field: string) => number | null;
566
- /** R11(§4.2): 셀 클래스 렌더훅 리졸버. 렌더층이 셀 element 에 추가할 className(null=미참여). */
790
+ /** R11(§4.2): 셀 클래스 렌더훅 리졸버. 렌더층이 셀 element 에 추가할 className(null=미참여). / R11 (§4.2): cell-class render-hook resolver. className the render layer adds to the cell element (null = not participating). */
567
791
  export type CellClassResolverFn = (value: any, field: string, row: any) => string | null;
568
- /** R11(§4.2): 셀 aria-label 렌더훅 리졸버. 렌더층이 셀 aria-label 을 대체(null=기본 유지). */
792
+ /** R11(§4.2): 셀 aria-label 렌더훅 리졸버. 렌더층이 셀 aria-label 을 대체(null=기본 유지). / R11 (§4.2): cell aria-label render-hook resolver. Replaces the cell aria-label (null = keep default). */
569
793
  export type AriaLabelResolverFn = (value: any, field: string, row: any) => string | null;
570
794
  /**
571
795
  * F1 채우기 시리즈 커스텀 리졸버 슬롯(C5.3, 예약). 사용자가 날짜/커스텀 시리즈를 주입할 수 있다.
572
796
  * ⚠️ 슬롯 등록 경로만 확보되어 있으며, RangeSelectionManager/FillEngine 소비 배선은 F1-b(Full) 대상.
797
+ * / F1 custom fill-series resolver slot (C5.3, reserved). Lets users inject date/custom series.
798
+ * ⚠️ Only the registration path exists; consumption wiring is scheduled for F1-b (Full).
573
799
  */
574
800
  export type FillSeriesResolverFn = (sourceLine: any[], k: number, axisSign: 1 | -1) => any;
575
- /** 슬롯명 → 시그니처 매핑. */
801
+ /** 슬롯명 → 시그니처 매핑. / Slot name → signature map. */
576
802
  export interface StrategyMap {
577
803
  sortComparator: SortComparatorFn;
578
804
  filterPredicate: FilterPredicateFn;
@@ -588,6 +814,9 @@ export interface StrategyMap {
588
814
  /**
589
815
  * R12b(item3 §6.1): 스킨 FORM 해석 인터셉트 슬롯. AppearanceResolver 가 fallback 과 함께 읽어(제로코스트)
590
816
  * 오버라이드가 form 토큰 델타를 통째로 가로챌 수 있다. 미설정 시 내장 스킨 카탈로그가 그대로 적용.
817
+ * / R12b (item3 §6.1): skin FORM resolution intercept slot. AppearanceResolver reads it with a
818
+ * fallback (zero-cost) so an override can hijack the whole form-token delta. When unset, the
819
+ * built-in skin catalog applies as-is.
591
820
  */
592
821
  export type SkinResolverFn = (skinId: string) => SkinTokenDelta | null;
593
822
  /**
@@ -595,23 +824,33 @@ export type SkinResolverFn = (skinId: string) => SkinTokenDelta | null;
595
824
  * `override("anyMethod", fn)` 문자열 탈출구(UC-11, best-effort)는 그대로 열려 있고 —
596
825
  * 이 인터페이스는 축복된(blessed) 확장점 이름을 IDE 발견가능하게 좁게 표시할 뿐, 넓은 문을 닫지 않는다.
597
826
  * 각 항목은 소비 테스트를 동반한다(유령 확장점 금지, DeMarco M9b).
827
+ * / R11 (§4.3, T-ζ): SemVer-guaranteed **typed override catalog** (the narrow "supported"
828
+ * statement). The `override("anyMethod", fn)` string escape hatch (UC-11, best-effort) stays
829
+ * open — this interface only surfaces blessed extension-point names for IDE discovery.
598
830
  */
599
831
  export interface OverridePoints<T = any> {
600
- /** 셀 표시 텍스트 해석(렌더훅 displayText 의 근원). */
832
+ /** 셀 표시 텍스트 해석(렌더훅 displayText 의 근원). / Cell display-text resolution (source of the displayText render hook). */
601
833
  getDisplayValue(rowIndex: number, field: string): string;
602
- /** 원시 셀 값 접근. */
834
+ /** 원시 셀 값 접근. / Raw cell value access. */
603
835
  readCell(rowIndex: number, field: string): any;
604
836
  }
605
- /** 호출가능 + .strategy 멤버를 가진 하이브리드 override API. */
837
+ /** 호출가능 + .strategy 멤버를 가진 하이브리드 override API. / Hybrid override API: callable plus a .strategy member. */
606
838
  export interface OverrideApi<T = any> {
607
- /** R11(§4.3): 타입드 오버로드 — 축복된 확장점 이름(IDE 발견). SemVer 보증 카탈로그. */
839
+ /** R11(§4.3): 타입드 오버로드 — 축복된 확장점 이름(IDE 발견). SemVer 보증 카탈로그. / R11 (§4.3): typed overload — blessed extension-point names (IDE discovery). SemVer-guaranteed catalog. */
608
840
  <K extends keyof OverridePoints<T>>(name: K, fn: OverrideLayerFn, opts?: OverrideCallOptions): OpenGridInstance<T>;
609
- /** 메서드 본문 무수정 런타임 래핑(C1-clean, 탈출구 UC-11). 체이닝 위해 grid 인스턴스 반환. */
841
+ /** 메서드 본문 무수정 런타임 래핑(C1-clean, 탈출구 UC-11). 체이닝 위해 grid 인스턴스 반환. / Runtime wrapping without touching method bodies (C1-clean, escape hatch UC-11). Returns the grid instance for chaining. */
610
842
  (name: string, fn: OverrideLayerFn, opts?: OverrideCallOptions): OpenGridInstance<T>;
611
- /** 알고리즘 슬롯 등록(Phase 2 매니저 훅포인트). 체이닝 위해 grid 인스턴스 반환. */
843
+ /** 알고리즘 슬롯 등록(Phase 2 매니저 훅포인트). 체이닝 위해 grid 인스턴스 반환. / Register an algorithm slot (Phase 2 manager hook point). Returns the grid instance for chaining. */
612
844
  strategy<K extends StrategySlot>(slot: K, fn: StrategyMap[K]): OpenGridInstance<T>;
613
845
  strategy(slot: string, fn: Function): OpenGridInstance<T>;
614
846
  }
847
+ /**
848
+ * 그리드 공개 인스턴스 계약(OpenGrid 가 구현). 세부 문서는 OpenGrid 클래스 참조.
849
+ * / Public grid instance contract (implemented by OpenGrid). See the OpenGrid class for
850
+ * per-method documentation.
851
+ *
852
+ * @typeParam T - 행 데이터 타입 / Row data type
853
+ */
615
854
  export interface OpenGridInstance<T = any> {
616
855
  /** 공개 메서드를 런타임 래핑하거나(.override) 알고리즘 슬롯을 등록(.strategy). */
617
856
  override: OverrideApi<T>;
@@ -807,6 +1046,14 @@ export interface OpenGridInstance<T = any> {
807
1046
  getSkin(): string;
808
1047
  /** R12b: FORM 축 단일 토큰 런타임 오버라이드(setThemeVar 의 형태-축 형제). 색 값은 거부. */
809
1048
  setSkinVar(varName: string, value: string): void;
1049
+ /** UI 로케일 전환 — 크롬+가시창 재렌더 + emit('localeChange'). 미등록 로케일은 never-throw. */
1050
+ setLocale(locale: string): void;
1051
+ /** 현재 인스턴스 로케일 id. */
1052
+ getLocale(): string;
1053
+ /** 이 인스턴스만 단일 메시지 오버라이드(setIcon 동형, 첫 호출 시 child 지연생성). */
1054
+ setMessage(key: LocaleMessageKey | string, value: MessageValue): OpenGridInstance<T>;
1055
+ /** 메시지 해석(오버라이드 우선 → 활성 로케일 → ko → 키). 절대 throw 안 함. */
1056
+ t(key: LocaleMessageKey | string, params?: Record<string, string | number>): string;
810
1057
  destroy(): void;
811
1058
  setOptions(opts: Partial<GridOptions<T>>): void;
812
1059
  /** 컬럼 마스킹 ON/OFF. enabled=true → 마스킹 적용, enabled=false → 전체 해제 */
@@ -847,6 +1094,7 @@ export interface OpenGridInstance<T = any> {
847
1094
  /** 트리거 전체 또는 특정 이벤트 클리어 */
848
1095
  clearTriggers(event?: TriggerEvent | string): this;
849
1096
  }
1097
+ /** 컨텍스트 메뉴 항목. / Context menu item. */
850
1098
  export interface ContextMenuItem {
851
1099
  id?: string;
852
1100
  label?: string;
@@ -857,41 +1105,49 @@ export interface ContextMenuItem {
857
1105
  }
858
1106
  export type { FilterSelectColumn, FilterSelectConfig } from './FilterSelect.js';
859
1107
  export type { FlatRowRef } from './FlatRowModel.js';
1108
+ /** 워크시트(탭) 정의. / Worksheet (tab) definition. */
860
1109
  export interface WorksheetDef<T = any> {
861
1110
  name: string;
1111
+ /** 시트 전용 컬럼(미지정 시 그리드 columns 공유). / Sheet-specific columns (falls back to grid columns). */
862
1112
  columns?: ColumnDef<T>[];
863
1113
  data?: T[];
864
1114
  }
1115
+ /** 워크시트 현재 상태 스냅샷. / Snapshot of a worksheet's current state. */
865
1116
  export interface WorksheetState<T = any> {
866
1117
  name: string;
867
1118
  columns: ColumnDef<T>[];
868
1119
  data: T[];
869
1120
  }
870
1121
  /**
871
- * 트리거 컨텍스트.
1122
+ * 트리거 컨텍스트. / Trigger context.
1123
+ *
872
1124
  * before:{op} 핸들러에서 ctx.cancel() 호출 → 해당 작업이 실행되지 않음.
873
1125
  * after:{op} / complete 핸들러에서는 ctx.result로 결과 확인 가능.
1126
+ * / Calling ctx.cancel() in a before:{op} handler prevents the operation from running.
1127
+ * In after:{op} / complete handlers the result is available via ctx.result.
874
1128
  */
875
1129
  export interface TriggerContext<TResult = any> {
876
- /** 작업 이름 (setData, insertRow, deleteRow, writeCell, ...) */
1130
+ /** 작업 이름 (setData, insertRow, deleteRow, writeCell, ...) / Operation name (setData, insertRow, deleteRow, writeCell, ...) */
877
1131
  readonly operation: string;
878
- /** 작업에 전달된 인수 배열 */
1132
+ /** 작업에 전달된 인수 배열 / Arguments passed to the operation */
879
1133
  readonly args: any[];
880
- /** 작업 결과 (after:* / complete 에서만 채워짐) */
1134
+ /** 작업 결과 (after:* / complete 에서만 채워짐) / Operation result (populated only in after:* and complete) */
881
1135
  result?: TResult;
882
- /** 취소 여부 — cancel() 호출 후 true가 됨 */
1136
+ /** 취소 여부 — cancel() 호출 후 true가 됨 / Cancellation flag — becomes true after cancel() */
883
1137
  readonly cancelled: boolean;
884
- /** 추가 정보 (트리거 간 데이터 공유 등) */
1138
+ /** 추가 정보 (트리거 간 데이터 공유 등) / Extra info (data sharing between triggers, etc.) */
885
1139
  extra?: Record<string, any>;
886
- /** 작업 시작 타임스탬프 (ms) */
1140
+ /** 작업 시작 타임스탬프 (ms) / Operation start timestamp (ms) */
887
1141
  readonly timestamp: number;
888
1142
  /**
889
1143
  * 작업 취소 — before:{op} 핸들러에서만 유효.
890
1144
  * 이후 핸들러도 실행되지 않으며 실제 작업도 중단된다.
1145
+ * / Cancel the operation — valid only in before:{op} handlers.
1146
+ * Subsequent handlers are skipped and the operation itself is aborted.
891
1147
  */
892
1148
  cancel(): void;
893
1149
  }
894
- /** 트리거 핸들러 함수 타입 */
1150
+ /** 트리거 핸들러 함수 타입 / Trigger handler function type */
895
1151
  export type TriggerHandler<TResult = any> = (ctx: TriggerContext<TResult>) => void;
896
- /** 지원되는 트리거 이벤트명 */
1152
+ /** 지원되는 트리거 이벤트명 / Supported trigger event names */
897
1153
  export type TriggerEvent = 'before:setData' | 'after:setData' | 'before:insertRow' | 'after:insertRow' | 'before:deleteRow' | 'after:deleteRow' | 'before:writeCell' | 'after:writeCell' | 'before:applyColumns' | 'after:applyColumns' | 'before:orderBy' | 'after:orderBy' | 'before:setFilter' | 'after:setFilter' | 'before:groupBy' | 'after:groupBy' | 'complete';