open-grid 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +30 -1
- package/dist/{OpenGrid-yg4mw6Ge.js → OpenGrid-B0Spm0rU.js} +2777 -1878
- package/dist/OpenGrid-CuXj0isp.cjs +97 -0
- package/dist/open-grid-react.cjs +1 -1
- package/dist/open-grid-react.js +1 -1
- package/dist/open-grid-vue.cjs +1 -1
- package/dist/open-grid-vue.js +1 -1
- package/dist/open-grid.cjs +5 -5
- package/dist/open-grid.js +155 -152
- package/dist/types/core/CellEditManager.d.ts +2 -0
- package/dist/types/core/ChartManager.d.ts +2 -0
- package/dist/types/core/ContextMenu.d.ts +5 -1
- package/dist/types/core/DetailManager.d.ts +2 -0
- package/dist/types/core/ExportManager.d.ts +7 -0
- package/dist/types/core/FilterPanel.d.ts +4 -1
- package/dist/types/core/FilterSelect.d.ts +4 -1
- package/dist/types/core/FindBarManager.d.ts +6 -0
- package/dist/types/core/FormulaController.d.ts +2 -0
- package/dist/types/core/GridComposer.d.ts +5 -0
- package/dist/types/core/GridRenderer.d.ts +3 -0
- package/dist/types/core/KeyboardManager.d.ts +2 -0
- package/dist/types/core/MutationService.d.ts +2 -0
- package/dist/types/core/OpenGrid.d.ts +393 -34
- package/dist/types/core/Pagination.d.ts +6 -1
- package/dist/types/core/RangeSelectionManager.d.ts +2 -0
- package/dist/types/core/SortFilterManager.d.ts +2 -0
- package/dist/types/core/WorksheetManager.d.ts +4 -1
- package/dist/types/core/detail/DetailGlyph.d.ts +3 -1
- package/dist/types/core/i18n/LocaleRegistry.d.ts +0 -0
- package/dist/types/core/i18n/interpolate.d.ts +5 -0
- package/dist/types/core/i18n/locales/en.d.ts +166 -0
- package/dist/types/core/i18n/locales/ko.d.ts +166 -0
- package/dist/types/core/i18n/types.d.ts +249 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +5 -0
- package/dist/types/core/types.d.ts +352 -96
- package/dist/types/index.d.ts +22 -0
- package/package.json +3 -1
- package/dist/OpenGrid-LcZ5iixx.cjs +0 -97
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from './EventEmitter.js';
|
|
2
|
+
import { PartialLocaleMessages, LocaleMessageKey, MessageValue } from './i18n/types.js';
|
|
2
3
|
import { SkinTokenDelta, GridOptions, OpenGridInstance, ColumnDef, SortItem, FilterItem, ExportOptions, Position, TriggerHandler, TriggerEvent, OverrideApi, OverrideCallOptions, CellRange, RangeStats } from './types.js';
|
|
3
4
|
import { FilterSelectConfig } from './FilterSelect.js';
|
|
4
5
|
import { MergeCell } from './MergeEngine.js';
|
|
@@ -10,6 +11,28 @@ import { ChartConfig } from './chart/types.js';
|
|
|
10
11
|
import { OverrideLayer } from './OverrideKernel.js';
|
|
11
12
|
import { ExtensionPointRegistry } from './ExtensionPointRegistry.js';
|
|
12
13
|
import { FormulaErrorCode } from './formula/types.js';
|
|
14
|
+
/**
|
|
15
|
+
* OPEN_GRID 코어 그리드 클래스. / The OPEN_GRID core grid class.
|
|
16
|
+
*
|
|
17
|
+
* 컨테이너 요소에 마운트되어 가상 스크롤로 대량 행을 렌더하는 초경량 데이터 그리드.
|
|
18
|
+
* 정렬·필터·그룹/트리·병합·범위선택(F1)·마스터/디테일(F2)·셀 수식(F3)·통합 차트(F4)·
|
|
19
|
+
* override/strategy 확장 커널을 제공한다.
|
|
20
|
+
* / An ultra-light data grid that mounts into a container element and renders large row sets
|
|
21
|
+
* through virtual scrolling. Provides sorting, filtering, group/tree, merging, range selection
|
|
22
|
+
* (F1), master/detail (F2), cell formulas (F3), integrated charts (F4), and the
|
|
23
|
+
* override/strategy extension kernel.
|
|
24
|
+
*
|
|
25
|
+
* @typeParam T - 행 데이터 타입 / Row data type
|
|
26
|
+
* @example
|
|
27
|
+
* const grid = new OpenGrid('#host', {
|
|
28
|
+
* columns: [
|
|
29
|
+
* { field: 'name', header: '이름' },
|
|
30
|
+
* { field: 'qty', header: '수량', type: 'number' },
|
|
31
|
+
* ],
|
|
32
|
+
* height: 400,
|
|
33
|
+
* });
|
|
34
|
+
* grid.setData([{ name: 'Kim', qty: 3 }]);
|
|
35
|
+
*/
|
|
13
36
|
export declare class OpenGrid<T extends Record<string, any> = any> extends EventEmitter implements OpenGridInstance<T> {
|
|
14
37
|
private _container;
|
|
15
38
|
private _options;
|
|
@@ -21,6 +44,8 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
21
44
|
private _appearance;
|
|
22
45
|
/** R12c: per-instance 아이콘 오버라이드 레지스트리(전역 iconRegistry 의 child). 첫 setIcon 때 지연 생성. */
|
|
23
46
|
private _icons;
|
|
47
|
+
/** i18n: per-instance 로케일 오버라이드 레지스트리(전역 localeRegistry 의 child). locale/messages 옵션 또는 첫 setLocale/setMessage 때 지연 생성. */
|
|
48
|
+
private _locales;
|
|
24
49
|
private _sfMgr;
|
|
25
50
|
private _rowMgr;
|
|
26
51
|
private _editMgr;
|
|
@@ -66,28 +91,54 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
66
91
|
/** F3(C2): writeCell 단건 쓰기가 쌓아두는 dirty seed. endBatch/즉시 flush 시 onValuesChanged 1회로 소비. */
|
|
67
92
|
private _formulaDirtySeeds;
|
|
68
93
|
private _ovk;
|
|
69
|
-
/** 공개 override API (호출가능 + .strategy). 생성자 말미에 부착. */
|
|
94
|
+
/** 공개 override API (호출가능 + .strategy). 생성자 말미에 부착. / Public override API (callable + .strategy). Attached at the end of the constructor. */
|
|
70
95
|
override: OverrideApi<T>;
|
|
71
96
|
/** R11(§3.1 C7): 커널 위 타입드 확장점 레지스트리. _mount 초입에 생성(커널 준비 후). */
|
|
72
97
|
private _extensions;
|
|
73
|
-
/** R11: 타입드 확장점 레지스트리 정면(렌더훅 등록·strategy/override 타입드 카탈로그·MutationHook·catalog). */
|
|
98
|
+
/** R11: 타입드 확장점 레지스트리 정면(렌더훅 등록·strategy/override 타입드 카탈로그·MutationHook·catalog). / R11: typed extension-point registry facade (render-hook registration, typed strategy/override catalog, MutationHook, catalog). */
|
|
74
99
|
get extensions(): ExtensionPointRegistry<T>;
|
|
75
100
|
/** 정적 전역 override 레이어 (모든 신규 인스턴스에 생성자 말미 적용). */
|
|
76
101
|
private static _defaultOverrides;
|
|
77
102
|
/** 정적 전역 strategy 슬롯. */
|
|
78
103
|
private static _defaultStrategies;
|
|
79
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* 정적: 모든 신규 그리드에 적용될 override 레이어 등록. / Static: register an override layer
|
|
106
|
+
* applied to every newly created grid.
|
|
107
|
+
*
|
|
108
|
+
* @param name - 대상 공개 메서드 이름 / Target public method name
|
|
109
|
+
* @param fn - override 레이어 함수(첫 인자 orig) / Override layer function (first arg = orig)
|
|
110
|
+
* @param opts - 재진입/에러 정책 / Reentrancy & error policy
|
|
111
|
+
* @returns 체이닝용 OpenGrid 클래스 / The OpenGrid class for chaining
|
|
112
|
+
* @example
|
|
113
|
+
* OpenGrid.defaultOverride('getDisplayValue', (orig, ri, field) => orig(ri, field).toUpperCase());
|
|
114
|
+
*/
|
|
80
115
|
static defaultOverride(name: string, fn: OverrideLayer, opts?: OverrideCallOptions): typeof OpenGrid;
|
|
81
|
-
/** 정적 전역 defaults 네임스페이스 (strategy 슬롯). */
|
|
116
|
+
/** 정적 전역 defaults 네임스페이스 (strategy 슬롯). / Static global defaults namespace (strategy slots). */
|
|
82
117
|
static defaults: {
|
|
83
118
|
strategy(slot: string, fn: Function): typeof OpenGrid;
|
|
84
119
|
};
|
|
85
120
|
/**
|
|
86
121
|
* 커스텀 셀 렌더러 타입을 코어 편집 없이 등록. `col.type`/`col.renderer`(문자열 또는 `{type}`)가
|
|
87
122
|
* `typeName` 과 일치하면 등록 팩토리가 렌더러를 생성한다. 프로세스 전역(모든 그리드 인스턴스 공유).
|
|
123
|
+
* / Register a custom cell renderer type without editing the core. When `col.type`/`col.renderer`
|
|
124
|
+
* (string or `{type}`) matches `typeName`, the registered factory creates the renderer.
|
|
125
|
+
* Process-global (shared by all grid instances).
|
|
126
|
+
*
|
|
127
|
+
* @param typeName - 렌더러 타입 이름 / Renderer type name
|
|
128
|
+
* @param factory - 렌더러 팩토리 / Renderer factory
|
|
129
|
+
* @returns 체이닝용 OpenGrid 클래스 / The OpenGrid class for chaining
|
|
130
|
+
* @example
|
|
131
|
+
* OpenGrid.registerRenderer('stars', () => ({ render: (ctx) => '★'.repeat(ctx.value) }));
|
|
88
132
|
*/
|
|
89
133
|
static registerRenderer(typeName: string, factory: RendererFactory): typeof OpenGrid;
|
|
90
|
-
/**
|
|
134
|
+
/**
|
|
135
|
+
* 커스텀 셀 에디터 타입을 코어 편집 없이 등록(OCP). 프로세스 전역.
|
|
136
|
+
* / Register a custom cell editor type without editing the core (OCP). Process-global.
|
|
137
|
+
*
|
|
138
|
+
* @param typeName - 에디터 타입 이름 / Editor type name
|
|
139
|
+
* @param factory - 에디터 팩토리 / Editor factory
|
|
140
|
+
* @returns 체이닝용 OpenGrid 클래스 / The OpenGrid class for chaining
|
|
141
|
+
*/
|
|
91
142
|
static registerEditor(typeName: string, factory: EditorFactory): typeof OpenGrid;
|
|
92
143
|
/**
|
|
93
144
|
* R12b(item3 §6.2): 커스텀 스킨을 코어 편집 없이 등록(defaultOverride 와 동형의 전역 정책).
|
|
@@ -97,6 +148,16 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
97
148
|
*
|
|
98
149
|
* 예) Neumorph 는 기본 카탈로그에서 컷(HANMS §1.3)됐으나 여기서 레시피로 재현 가능:
|
|
99
150
|
* OpenGrid.defineSkin('neumorph', { '--og-radius-md':'14px', '--og-elevation-inset':'inset -4px -4px 8px', … })
|
|
151
|
+
*
|
|
152
|
+
* / R12b (item3 §6.2): register a custom skin without editing the core (global policy, same
|
|
153
|
+
* shape as defaultOverride). After FORM-only validation (color literals rejected = color⊥form
|
|
154
|
+
* orthogonality) plus accessibility guardrails (focus <2px/none clamped), a runtime `<style>`
|
|
155
|
+
* block for `.og-container[data-og-skin="name"]` is injected. Any instance can then call
|
|
156
|
+
* `grid.setSkin(name)`. **Throws** when the delta contains color values.
|
|
157
|
+
*
|
|
158
|
+
* @param name - 스킨 id / Skin id
|
|
159
|
+
* @param delta - FORM 전용 토큰 델타 / FORM-only token delta
|
|
160
|
+
* @returns 체이닝용 OpenGrid 클래스 / The OpenGrid class for chaining
|
|
100
161
|
*/
|
|
101
162
|
static defineSkin(name: string, delta: SkinTokenDelta): typeof OpenGrid;
|
|
102
163
|
/**
|
|
@@ -105,36 +166,109 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
105
166
|
* 이거나 원시 SVG 본문 마크업. 이후 모든 인스턴스의 아이콘 해석에 반영된다. per-instance 교체는
|
|
106
167
|
* `grid.setIcon(role, svg)` 참조.
|
|
107
168
|
* 예) OpenGrid.defineIconSet({ 'sort.asc': 'arrow-up', 'row.delete': '<path d="…"/>' })
|
|
169
|
+
*
|
|
170
|
+
* / R12c (item3 §5.1, contract C13): register/replace semantic icon role sets **globally**
|
|
171
|
+
* without editing the core (process-global policy, same shape as defineSkin/registerRenderer).
|
|
172
|
+
* Values are either known icon keys (`BOOTSTRAP_ICONS`) or raw SVG body markup. Affects icon
|
|
173
|
+
* resolution of all instances. For per-instance replacement see `grid.setIcon(role, svg)`.
|
|
174
|
+
*
|
|
175
|
+
* @param map - role → 아이콘 key 또는 원시 SVG / role → icon key or raw SVG
|
|
176
|
+
* @returns 체이닝용 OpenGrid 클래스 / The OpenGrid class for chaining
|
|
108
177
|
*/
|
|
109
178
|
static defineIconSet(map: Record<string, string>): typeof OpenGrid;
|
|
179
|
+
/**
|
|
180
|
+
* i18n: UI 문자열 로케일을 코어 편집 없이 **전역** 등록/교체(defineSkin/defineIconSet 와 동형의
|
|
181
|
+
* 얇은 위임 파사드 — 정본은 `localeRegistry.register`). 부분 카탈로그 허용(폴백이 ko 로 메움).
|
|
182
|
+
* 이후 모든 인스턴스가 `grid.setLocale(id)` 로 사용. per-instance 오버라이드는 `grid.setMessage` 참조.
|
|
183
|
+
* 예) OpenGrid.defineLocale('ja', { contextMenu: { find: '検索' } })
|
|
184
|
+
*
|
|
185
|
+
* / i18n: register/replace a UI-string locale **globally** without editing the core (thin
|
|
186
|
+
* delegation façade isomorphic to defineSkin/defineIconSet — the canonical entry is
|
|
187
|
+
* `localeRegistry.register`). Partial catalogs are allowed (ko fills the gaps via fallback).
|
|
188
|
+
* Any instance can then call `grid.setLocale(id)`. For per-instance overrides see `grid.setMessage`.
|
|
189
|
+
*
|
|
190
|
+
* @param id - 로케일 id(예 'ja') / Locale id (e.g. 'ja')
|
|
191
|
+
* @param messages - 메시지 부분/전체 카탈로그 / Partial or full message catalog
|
|
192
|
+
* @param opts - `extends`: ko 이전에 시도할 폴백 로케일 / `extends`: fallback locale tried before ko
|
|
193
|
+
* @returns 체이닝용 OpenGrid 클래스 / The OpenGrid class for chaining
|
|
194
|
+
*/
|
|
195
|
+
static defineLocale(id: string, messages: PartialLocaleMessages, opts?: {
|
|
196
|
+
extends?: string;
|
|
197
|
+
}): typeof OpenGrid;
|
|
198
|
+
/**
|
|
199
|
+
* 그리드를 생성해 컨테이너에 마운트한다. / Create the grid and mount it into the container.
|
|
200
|
+
*
|
|
201
|
+
* @param container - CSS 셀렉터 또는 호스트 요소 / CSS selector or host element
|
|
202
|
+
* @param options - 그리드 옵션(columns 필수) / Grid options (columns required)
|
|
203
|
+
* @example
|
|
204
|
+
* const grid = new OpenGrid('#host', { columns: [{ field: 'id', header: 'ID' }] });
|
|
205
|
+
*/
|
|
110
206
|
constructor(container: string | HTMLElement, options: GridOptions<T>);
|
|
207
|
+
/** 단일 메서드의 override 를 원본으로 복구. / Restore a single overridden method to the original. */
|
|
111
208
|
restore(name: string): this;
|
|
209
|
+
/** 모든 override·strategy 를 복구(destroy 시 자동 수행). / Restore all overrides & strategies (run automatically on destroy). */
|
|
112
210
|
restoreAll(): this;
|
|
211
|
+
/** 해당 메서드가 override 되어 있는지 확인. / Whether the method is currently overridden. */
|
|
113
212
|
hasOverride(name: string): boolean;
|
|
213
|
+
/** override 등록된 메서드 이름 목록. / Names of currently overridden methods. */
|
|
114
214
|
getOverrideNames(): string[];
|
|
215
|
+
/** strategy 슬롯 조회(미등록 시 fallback 반환). / Read a strategy slot (returns fallback when unset). */
|
|
115
216
|
getStrategy<F extends Function>(slot: string, fallback: F): F;
|
|
116
217
|
private _mount;
|
|
117
218
|
private _initContextMenu;
|
|
219
|
+
/**
|
|
220
|
+
* 컨텍스트 메뉴를 지정 좌표에 연다. / Open the context menu at the event position.
|
|
221
|
+
*
|
|
222
|
+
* @param e - 좌표를 제공할 마우스 이벤트 / Mouse event providing coordinates
|
|
223
|
+
* @param items - 커스텀 메뉴 항목(생략 시 기본 메뉴) / Custom items (default menu when omitted)
|
|
224
|
+
*/
|
|
118
225
|
openContextMenu(e: MouseEvent, items?: import('./types').ContextMenuItem[]): void;
|
|
226
|
+
/** 컨텍스트 메뉴를 닫는다. / Close the context menu. */
|
|
119
227
|
closeContextMenu(): void;
|
|
228
|
+
/**
|
|
229
|
+
* 캐스케이딩 필터 셀렉트 패널 설정(null = 제거). / Configure the cascading filter-select panel
|
|
230
|
+
* (null removes it).
|
|
231
|
+
*/
|
|
120
232
|
setFilterSelect(config: FilterSelectConfig | null): void;
|
|
233
|
+
/**
|
|
234
|
+
* 옵션을 런타임에 부분 갱신한다 (contextMenu 재초기화, groupBy 재구성 등).
|
|
235
|
+
* / Partially update options at runtime (re-inits contextMenu, rebuilds groupBy, etc.).
|
|
236
|
+
*
|
|
237
|
+
* @param opts - 갱신할 옵션 부분집합 / Subset of options to update
|
|
238
|
+
*/
|
|
121
239
|
setOptions(opts: Partial<GridOptions<T>>): void;
|
|
122
240
|
/**
|
|
123
|
-
* 컬럼 마스킹 ON/OFF 전환.
|
|
124
|
-
* enabled=true → 마스킹 적용 (기본 상태)
|
|
125
|
-
* enabled=false → 컬럼 전체 마스킹 해제 (원문 표시)
|
|
241
|
+
* 컬럼 마스킹 ON/OFF 전환. / Toggle column masking on/off.
|
|
242
|
+
* enabled=true → 마스킹 적용 (기본 상태) / apply masking (default state)
|
|
243
|
+
* enabled=false → 컬럼 전체 마스킹 해제 (원문 표시) / reveal the whole column (show raw values)
|
|
244
|
+
*
|
|
245
|
+
* @param field - 대상 컬럼 field / Target column field
|
|
246
|
+
* @param enabled - 마스킹 활성 여부 / Whether masking is active
|
|
126
247
|
*/
|
|
127
248
|
setMaskEnabled(field: string, enabled: boolean): void;
|
|
128
|
-
/** 현재 컬럼 마스킹 활성 여부 반환. true=마스킹 중, false=해제됨 */
|
|
249
|
+
/** 현재 컬럼 마스킹 활성 여부 반환. true=마스킹 중, false=해제됨 / Return whether masking is active for the column (true = masked, false = revealed). */
|
|
129
250
|
getMaskEnabled(field: string): boolean;
|
|
130
251
|
private _initWorksheets;
|
|
131
252
|
private _loadWorksheetState;
|
|
253
|
+
/**
|
|
254
|
+
* 워크시트(탭)를 추가한다. / Add a worksheet (tab).
|
|
255
|
+
*
|
|
256
|
+
* @param name - 시트 이름 / Sheet name
|
|
257
|
+
* @param columns - 시트 전용 컬럼(생략 시 그리드 columns) / Sheet columns (grid columns when omitted)
|
|
258
|
+
* @param data - 시트 데이터 / Sheet data
|
|
259
|
+
*/
|
|
132
260
|
addWorksheet(name: string, columns?: import('./types').ColumnDef<T>[], data?: T[]): void;
|
|
261
|
+
/** 워크시트를 제거한다. / Remove a worksheet. */
|
|
133
262
|
removeWorksheet(name: string): void;
|
|
263
|
+
/** 지정 워크시트로 전환한다. / Switch to the given worksheet. */
|
|
134
264
|
switchWorksheet(name: string): void;
|
|
265
|
+
/** 워크시트 이름을 변경한다. / Rename a worksheet. */
|
|
135
266
|
renameWorksheet(oldName: string, newName: string): void;
|
|
267
|
+
/** 워크시트 상태 스냅샷 조회(없으면 undefined). / Get a worksheet state snapshot (undefined when absent). */
|
|
136
268
|
getWorksheet(name: string): import('./types').WorksheetState<T> | undefined;
|
|
269
|
+
/** 워크시트 이름 목록. / List of worksheet names. */
|
|
137
270
|
getWorksheetNames(): string[];
|
|
271
|
+
/** 모든 워크시트를 다중 시트 엑셀로 내보낸다. / Export all worksheets as a multi-sheet Excel file. */
|
|
138
272
|
exportSheetsExcel(filename?: string): void;
|
|
139
273
|
private _onResize;
|
|
140
274
|
private _recalcWidths;
|
|
@@ -159,97 +293,181 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
159
293
|
private _handleFilterIconClick;
|
|
160
294
|
private _handleAllCheck;
|
|
161
295
|
private _handleRowDrop;
|
|
162
|
-
/** 드래그/셔틀이 참조하는 바디 엘리먼트 (레지스트리 해석용) */
|
|
296
|
+
/** @internal 드래그/셔틀이 참조하는 바디 엘리먼트 (레지스트리 해석용) / Body element referenced by drag/shuttle (registry resolution). */
|
|
163
297
|
_crossBodyEl(): HTMLElement;
|
|
164
298
|
/** fromIndex 를 잡고 드래그할 때 함께 이동할 행 집합 (다중선택에 포함되면 선택 전체) */
|
|
165
299
|
private _dragRowSet;
|
|
166
300
|
/**
|
|
167
301
|
* 이 그리드의 행들을 다른 그리드로 이동(move)한다. 드래그·화살표 셔틀 공통 경로.
|
|
168
302
|
* 3단계 이벤트(before→after→complete)와 crossGridMapping(필드 매핑)을 적용한다.
|
|
303
|
+
* / Move rows from this grid to another grid (shared path for drag and arrow shuttle).
|
|
304
|
+
* Applies the three-phase events (before→after→complete) and crossGridMapping (field mapping).
|
|
305
|
+
*
|
|
306
|
+
* @param target - 대상 그리드 / Target grid
|
|
307
|
+
* @param sourceIndexes - 이동할 소스 행 인덱스들 / Source row indexes to move
|
|
308
|
+
* @param targetIndex - 삽입 시작 인덱스(생략 시 끝) / Insertion start index (end when omitted)
|
|
309
|
+
* @returns 이동 성공 여부 / Whether the move succeeded
|
|
169
310
|
*/
|
|
170
311
|
moveRowsTo(target: OpenGridInstance<T>, sourceIndexes: number[], targetIndex?: number): Promise<boolean>;
|
|
171
|
-
/** 체크된 행을 다른 그리드로 이동 (화살표 셔틀용). 체크 없으면 무시. */
|
|
312
|
+
/** 체크된 행을 다른 그리드로 이동 (화살표 셔틀용). 체크 없으면 무시. / Move checked rows to another grid (arrow-shuttle use). No-op when nothing is checked. */
|
|
172
313
|
moveCheckedTo(target: OpenGridInstance<T>): Promise<boolean>;
|
|
173
|
-
/**
|
|
174
|
-
/** ???꾩튂 ?대룞 */
|
|
314
|
+
/** 행 위치 이동(드롭 경로에서 실행). / Move a row to a new position (executed on the drop path). */
|
|
175
315
|
reorderRow(fromIndex: number, toIndex: number): void;
|
|
176
316
|
private _handleColResize;
|
|
177
317
|
private _handleKeyDown;
|
|
178
318
|
private _setFocusCell;
|
|
179
319
|
private _announce;
|
|
180
320
|
private _bindOptionEvents;
|
|
321
|
+
/**
|
|
322
|
+
* 그리드 데이터를 통째로 교체한다(행 id 재발급, F3 수식 상태 초기화).
|
|
323
|
+
* / Replace the entire data set (row ids reissued; F3 formula state reset).
|
|
324
|
+
*
|
|
325
|
+
* @param data - 새 행 배열 / New array of rows
|
|
326
|
+
* @example
|
|
327
|
+
* grid.setData([{ name: 'Kim' }, { name: 'Lee' }]);
|
|
328
|
+
*/
|
|
181
329
|
setData(data: T[]): void;
|
|
330
|
+
/** 현재(정렬/필터 반영) 데이터 배열. / Current data array (sort/filter applied). */
|
|
182
331
|
getData(): T[];
|
|
332
|
+
/** 원본(정렬/필터 미반영) 데이터 배열. / Original data array (before sort/filter). */
|
|
183
333
|
getSourceRows(): T[];
|
|
334
|
+
/** 데이터 뒤에 행들을 추가한다. / Append rows after the existing data. */
|
|
184
335
|
pushData(data: T[]): void;
|
|
336
|
+
/** 데이터 앞에 행들을 추가한다. / Prepend rows before the existing data. */
|
|
185
337
|
prefixData(data: T[]): void;
|
|
338
|
+
/** 모든 행을 제거한다(컬럼·옵션 유지). / Remove all rows (columns & options kept). */
|
|
186
339
|
clearData(): void;
|
|
340
|
+
/**
|
|
341
|
+
* 지정 위치에 행 1건을 삽입한다. / Insert one row at the given position.
|
|
342
|
+
*
|
|
343
|
+
* @param item - 행 데이터(부분 객체 허용) / Row data (partial object allowed)
|
|
344
|
+
* @param position - 삽입 위치(기본 'last') / Insertion position (default 'last')
|
|
345
|
+
*/
|
|
187
346
|
insertRow(item: Partial<T>, position?: Position): void;
|
|
347
|
+
/** 행(들)을 끝에 추가한다. / Append row(s) at the end. */
|
|
188
348
|
pushRow(items: Partial<T> | Partial<T>[]): void;
|
|
189
|
-
/** @deprecated 하위호환 alias → pushRow */
|
|
349
|
+
/** @deprecated 하위호환 alias → pushRow / Backward-compat alias → pushRow */
|
|
190
350
|
appendRows(items: Partial<T> | Partial<T>[]): void;
|
|
351
|
+
/** 행(들)을 맨 앞에 추가한다. / Prepend row(s) at the beginning. */
|
|
191
352
|
unshiftRow(items: Partial<T> | Partial<T>[]): void;
|
|
192
|
-
/** @deprecated 하위호환 alias → unshiftRow */
|
|
353
|
+
/** @deprecated 하위호환 alias → unshiftRow / Backward-compat alias → unshiftRow */
|
|
193
354
|
prependRows(items: Partial<T> | Partial<T>[]): void;
|
|
355
|
+
/** 행(단건 또는 복수 인덱스)을 삭제한다. / Delete row(s) by index (single or array). */
|
|
194
356
|
deleteRow(rowIndex: number | number[]): void;
|
|
195
357
|
/**
|
|
196
358
|
* @deprecated no-op stub — id 기반 삭제는 미구현(본문 없음). 인덱스로 지우려면 `deleteRow(rowIndex)`
|
|
197
359
|
* 를, id→인덱스 변환은 `getFlatRowModel()`/`getData()` 조회 후 `deleteRow` 를 사용.
|
|
360
|
+
* / no-op stub — id-based deletion is not implemented (empty body). Use `deleteRow(rowIndex)`;
|
|
361
|
+
* resolve id→index via `getFlatRowModel()`/`getData()` first.
|
|
198
362
|
*/
|
|
199
363
|
deleteById(_ids: string[]): void;
|
|
364
|
+
/** 원시 셀 값을 읽는다. / Read the raw cell value. */
|
|
200
365
|
readCell(rowIndex: number, field: string): any;
|
|
366
|
+
/**
|
|
367
|
+
* 셀 표시 텍스트를 해석한다(displayFormatter strategy 반영). / Resolve the cell display text
|
|
368
|
+
* (honors the displayFormatter strategy).
|
|
369
|
+
*/
|
|
201
370
|
getDisplayValue(rowIndex: number, field: string): string;
|
|
371
|
+
/** 셀 값을 쓰고 변경 추적·수식 dirty 적립·재렌더한다. / Write a cell value (change tracking, formula dirty seeding, re-render). */
|
|
202
372
|
writeCell(rowIndex: number, field: string, value: any): void;
|
|
373
|
+
/** 지정 인덱스의 행 객체. / Row object at the given index. */
|
|
203
374
|
getRowAt(rowIndex: number): T;
|
|
204
|
-
/** flat/visual index ↔ data 리졸버(C0.3). F1/F3/F4 는 이 모델만 경유해야 한다. */
|
|
375
|
+
/** flat/visual index ↔ data 리졸버(C0.3). F1/F3/F4 는 이 모델만 경유해야 한다. / flat/visual index ↔ data resolver (C0.3). F1/F3/F4 must go through this model. */
|
|
205
376
|
getFlatRowModel(): FlatRowModel;
|
|
377
|
+
/** 배치 쓰기 시작 — 이후 writeCell 의 렌더/이벤트를 지연·병합. / Begin a write batch — subsequent writeCell renders/events are deferred & coalesced. */
|
|
206
378
|
beginBatch(): void;
|
|
379
|
+
/** 배치 종료 — 쓰기가 있었으면 1회 렌더 + 1회 dataChange. / End the batch — one render + one coalesced dataChange if anything was written. */
|
|
207
380
|
endBatch(): void;
|
|
381
|
+
/**
|
|
382
|
+
* 셀에 수식을 설정한다("=A1+B2" 형태). / Set a cell formula (e.g. "=A1+B2").
|
|
383
|
+
*
|
|
384
|
+
* @param rowIndex - flat index(C0) / flat index (C0)
|
|
385
|
+
* @param field - 컬럼 field / Column field
|
|
386
|
+
* @param formula - '=' 로 시작하는 수식 원문 / Formula source starting with '='
|
|
387
|
+
* @example
|
|
388
|
+
* grid.setCellFormula(2, 'total', '=A1+B1');
|
|
389
|
+
*/
|
|
208
390
|
setCellFormula(rowIndex: number, field: string, formula: string): void;
|
|
391
|
+
/** 셀 수식 원문(없으면 null). / Formula source of the cell (null when absent). */
|
|
209
392
|
getCellFormula(rowIndex: number, field: string): string | null;
|
|
393
|
+
/** 셀에 수식이 있는지. / Whether the cell has a formula. */
|
|
210
394
|
hasCellFormula(rowIndex: number, field: string): boolean;
|
|
395
|
+
/** 수식 제거(마지막 계산값은 유지). / Remove the formula (last computed value kept). */
|
|
211
396
|
clearCellFormula(rowIndex: number, field: string): void;
|
|
397
|
+
/** 셀 수식 에러 코드(없으면 null). / Formula error code of the cell (null when none). */
|
|
212
398
|
getCellError(rowIndex: number, field: string): FormulaErrorCode | null;
|
|
399
|
+
/** 디버깅용 — 이 셀을 참조하는(종속) 셀들. / Debugging — cells that depend on this cell. */
|
|
213
400
|
getDependents(rowIndex: number, field: string): Array<{
|
|
214
401
|
rowIndex: number;
|
|
215
402
|
field: string;
|
|
216
403
|
}>;
|
|
404
|
+
/** 디버깅용 — 이 셀이 참조하는(선행) 셀들. / Debugging — cells this cell references (precedents). */
|
|
217
405
|
getPrecedents(rowIndex: number, field: string): Array<{
|
|
218
406
|
rowIndex: number;
|
|
219
407
|
field: string;
|
|
220
408
|
}>;
|
|
409
|
+
/** 전체 수식 위상 재계산. / Recalculate all formulas in topological order. */
|
|
221
410
|
recalculate(): void;
|
|
411
|
+
/** 단일 셀 + 종속 폐포만 재계산. / Recalculate one cell plus its dependent closure. */
|
|
222
412
|
recalculateCell(rowIndex: number, field: string): void;
|
|
223
|
-
/** C3(F1 fill 전용): srcRowId/srcField 수식의 상대축만 dRow/dCol 오프셋한 새 수식 원문. */
|
|
413
|
+
/** C3(F1 fill 전용): srcRowId/srcField 수식의 상대축만 dRow/dCol 오프셋한 새 수식 원문. / C3 (F1 fill only): new formula source with only the relative axes of the srcRowId/srcField formula offset by dRow/dCol. */
|
|
224
414
|
offsetFormula(srcRowId: string, srcField: string, dRow: number, dCol: number): string;
|
|
225
415
|
/**
|
|
226
416
|
* beginBatch+루프+endBatch 래퍼(C2.1). patches 의 rowIndex 는 flat index — 대상이
|
|
227
417
|
* FlatRowModel.resolveFlatRow 로 해소해 kind!=='data' (group/tree/detail 의사행)이면
|
|
228
418
|
* 쓰기 전에 skip 한다(C0.3 쓰기 안전, filler 에 writeCell 절대 금지).
|
|
229
419
|
* 건너뛴 셀 수를 반환하고, 1건이라도 있으면 announce + 'writeCellsSkip' 이벤트로 표면화한다.
|
|
420
|
+
* / beginBatch+loop+endBatch wrapper (C2.1). Each patch rowIndex is a flat index — targets
|
|
421
|
+
* resolving to kind!=='data' (group/tree/detail pseudo-rows) are skipped before writing
|
|
422
|
+
* (C0.3 write safety). Returns the skipped-cell count and surfaces it via announce +
|
|
423
|
+
* a 'writeCellsSkip' event when non-zero.
|
|
424
|
+
*
|
|
425
|
+
* @param patches - 쓰기 목록 / List of writes
|
|
426
|
+
* @returns 건너뛴 셀 수 / Number of skipped cells
|
|
230
427
|
*/
|
|
231
428
|
writeCells(patches: Array<{
|
|
232
429
|
rowIndex: number;
|
|
233
430
|
field: string;
|
|
234
431
|
value: any;
|
|
235
432
|
}>): number;
|
|
433
|
+
/** 정규화된 선택 범위 rects(없으면 []). MVP 는 길이 ≤1. / Normalized selection rects ([] when none). Length ≤1 in MVP. */
|
|
236
434
|
getRangeSelection(): CellRange[];
|
|
435
|
+
/** 활성 범위(= getRangeSelection()[0] ?? null). / Active range (= getRangeSelection()[0] ?? null). */
|
|
237
436
|
getActiveRange(): CellRange | null;
|
|
437
|
+
/** 범위 선택을 프로그램적으로 설정. / Set the range selection programmatically. */
|
|
238
438
|
setRangeSelection(range: CellRange | CellRange[]): void;
|
|
439
|
+
/** 범위 선택 해제. / Clear the range selection. */
|
|
239
440
|
clearRangeSelection(): void;
|
|
441
|
+
/** 활성 범위의 값 2D 배열. / 2D value array of the active range. */
|
|
240
442
|
getRangeValues(): any[][];
|
|
443
|
+
/** 활성 범위 숫자 셀의 통계(합계/평균 등, OGDecimal 기반). / Stats of numeric cells in the active range (sum/avg…, OGDecimal-based). */
|
|
241
444
|
getRangeStats(): RangeStats | null;
|
|
445
|
+
/**
|
|
446
|
+
* source→target 채우기(배치 경유, C2). axis 는 두 rect 상대 위치로 추론.
|
|
447
|
+
* / Fill from source into target (batched, C2). The axis is inferred from the two rects.
|
|
448
|
+
*
|
|
449
|
+
* @param source - 원본 범위 / Source range
|
|
450
|
+
* @param target - 대상 범위 / Target range
|
|
451
|
+
* @param mode - 'copy'(기본) 또는 'series' / 'copy' (default) or 'series'
|
|
452
|
+
*/
|
|
242
453
|
fillRange(source: CellRange, target: CellRange, mode?: 'copy' | 'series'): void;
|
|
454
|
+
/** 그리드 데이터 소스 차트를 생성한다. / Create a chart backed by grid data. */
|
|
243
455
|
createChart(config: ChartConfig): ChartInstance;
|
|
456
|
+
/** 살아있는 차트 인스턴스 목록. / Live chart instances. */
|
|
244
457
|
getCharts(): ChartInstance[];
|
|
458
|
+
/** 모든 차트 파괴(구독 해제 포함). / Destroy all charts (including subscriptions). */
|
|
245
459
|
destroyCharts(): void;
|
|
460
|
+
/** 변경 추적 요약(추가/수정/삭제 행). / Change-tracking summary (added/edited/removed rows). */
|
|
246
461
|
getChanges(): {
|
|
247
462
|
added: T[];
|
|
248
463
|
edited: T[];
|
|
249
464
|
removed: T[];
|
|
250
465
|
};
|
|
466
|
+
/** 수정된 행 목록. / Edited rows. */
|
|
251
467
|
getEditedRows(): T[];
|
|
468
|
+
/** @deprecated 하위 호환 — getEditedRows() 권장. / Backward compat — prefer getEditedRows(). */
|
|
252
469
|
getChangedRows(): T[];
|
|
470
|
+
/** 행별 변경 필드·old/new 값 상세. / Per-row changed fields with old/new values. */
|
|
253
471
|
getChangedColumns(): Array<{
|
|
254
472
|
row: T;
|
|
255
473
|
fields: string[];
|
|
@@ -259,152 +477,293 @@ export declare class OpenGrid<T extends Record<string, any> = any> extends Event
|
|
|
259
477
|
newValue: any;
|
|
260
478
|
}>;
|
|
261
479
|
}>;
|
|
480
|
+
/** 추가된 행 목록. / Added rows. */
|
|
262
481
|
getAddedRows(): T[];
|
|
482
|
+
/** 삭제된 행 목록. / Removed rows. */
|
|
263
483
|
getRemovedRows(): T[];
|
|
484
|
+
/** 행의 원본(수정 전) 스냅샷. / Original (pre-edit) snapshot of the row. */
|
|
264
485
|
getOriginalRow(rowIndex: number): T | undefined;
|
|
486
|
+
/** stateField 값이 있는 행 목록. / Rows having a value in stateField. */
|
|
265
487
|
getRowsWithState(stateField: string): T[];
|
|
266
488
|
/** @deprecated no-op stub — undo/redo 히스토리는 미구현. 변이 가드는 TriggerManager `before:*` 훅,
|
|
267
|
-
* 변경 추적은 `getChanges()`/`getOriginalRow()` 를 사용.
|
|
489
|
+
* 변경 추적은 `getChanges()`/`getOriginalRow()` 를 사용.
|
|
490
|
+
* / no-op stub — undo/redo history is not implemented. Use TriggerManager `before:*` hooks
|
|
491
|
+
* for mutation guards and `getChanges()`/`getOriginalRow()` for change tracking. */
|
|
268
492
|
undo(): void;
|
|
269
|
-
/** @deprecated no-op stub — undo/redo 히스토리 미구현(위 `undo()` 참조). */
|
|
493
|
+
/** @deprecated no-op stub — undo/redo 히스토리 미구현(위 `undo()` 참조). / no-op stub — see `undo()` above. */
|
|
270
494
|
redo(): void;
|
|
271
|
-
/** @deprecated no-op stub — undo/redo 히스토리 자체가 없어 비울 것도 없음(위 `undo()` 참조). */
|
|
495
|
+
/** @deprecated no-op stub — undo/redo 히스토리 자체가 없어 비울 것도 없음(위 `undo()` 참조). / no-op stub — there is no history to clear (see `undo()`). */
|
|
272
496
|
clearHistory(): void;
|
|
497
|
+
/** 보이는 리프 컬럼 정의 목록. / Visible leaf column definitions. */
|
|
273
498
|
getColumnDefs(): ColumnDef<T>[];
|
|
499
|
+
/** 숨김 포함 전체 리프 컬럼 정의. / All leaf column definitions including hidden. */
|
|
274
500
|
getAllColumnDefs(): ColumnDef<T>[];
|
|
501
|
+
/** 보이는 컬럼 수. / Number of visible columns. */
|
|
275
502
|
getColumnCount(): number;
|
|
503
|
+
/** 컬럼 구성을 통째로 교체하고 재렌더한다. / Replace the whole column set and re-render. */
|
|
276
504
|
applyColumns(columns: ColumnDef<T>[]): void;
|
|
505
|
+
/** 컬럼 1개를 삽입한다. / Insert one column. */
|
|
277
506
|
insertColumn(colDef: ColumnDef<T>, position?: Position): void;
|
|
507
|
+
/** 컬럼을 삭제한다(해당 field 참조 수식은 #REF 처리). / Delete a column (formulas referencing the field become #REF). */
|
|
278
508
|
deleteColumn(field: string): void;
|
|
279
509
|
private _reorderColumn;
|
|
510
|
+
/** 컬럼(들)을 숨긴다. / Hide column(s). */
|
|
280
511
|
hideColumn(field: string | string[]): void;
|
|
512
|
+
/** 숨긴 컬럼(들)을 다시 표시한다. / Show hidden column(s). */
|
|
281
513
|
showColumn(field: string | string[]): void;
|
|
514
|
+
/** field 의 보이는 컬럼 인덱스(-1 = 없음). / Visible column index of the field (-1 when absent). */
|
|
282
515
|
getColumnIndex(field: string): number;
|
|
516
|
+
/** 인덱스 위치의 field 명(없으면 ''). / Field name at the index ('' when absent). */
|
|
283
517
|
getFieldAt(idx: number): string;
|
|
518
|
+
/** 해당 컬럼의 값 배열. / Values of the column. */
|
|
284
519
|
getColValues(field: string, _all?: boolean): any[];
|
|
520
|
+
/** 해당 컬럼의 고유 값 배열. / Unique values of the column. */
|
|
285
521
|
getUniqueValues(field: string, all?: boolean): any[];
|
|
286
522
|
/** @deprecated no-op stub — 컬럼 폭 일괄 설정 미구현. 폭은 `ColumnDef.width` 또는 헤더 드래그로
|
|
287
|
-
* 지정하며 내부 `_recalcWidths` 가 자동 배분한다.
|
|
523
|
+
* 지정하며 내부 `_recalcWidths` 가 자동 배분한다.
|
|
524
|
+
* / no-op stub — bulk width setting is not implemented. Set widths via `ColumnDef.width`
|
|
525
|
+
* or header drag; internal `_recalcWidths` distributes automatically. */
|
|
288
526
|
setColWidths(_widths: number[]): void;
|
|
289
|
-
/** @deprecated no-op stub — 항상 빈 배열 반환(폭 계산 미구현). 자동 배분은 내부 `_recalcWidths` 담당. */
|
|
527
|
+
/** @deprecated no-op stub — 항상 빈 배열 반환(폭 계산 미구현). 자동 배분은 내부 `_recalcWidths` 담당. / no-op stub — always returns [] (width calculation not implemented). */
|
|
290
528
|
calcColWidths(_fitToGrid?: boolean): number[];
|
|
529
|
+
/** 선택된 행 데이터 목록. / Selected row data. */
|
|
291
530
|
getSelections(): T[];
|
|
531
|
+
/** 활성 행 인덱스(-1 = 없음). / Active row index (-1 when none). */
|
|
292
532
|
getActiveRow(): number;
|
|
533
|
+
/** 지정 행을 활성/선택한다. / Activate (select) the given row. */
|
|
293
534
|
activate(index: number): void;
|
|
535
|
+
/** 선택 해제. / Clear the selection. */
|
|
294
536
|
deselect(): void;
|
|
537
|
+
/** 체크된 행 목록({row, rowIndex}). / Checked rows ({row, rowIndex}). */
|
|
295
538
|
getChecked(): Array<{
|
|
296
539
|
row: T;
|
|
297
540
|
rowIndex: number;
|
|
298
541
|
}>;
|
|
542
|
+
/** 체크된 행 데이터만 배열로. / Checked row data only. */
|
|
299
543
|
getAllChecked(): T[];
|
|
300
|
-
/** @deprecated no-op stub — id 기반 체크 미구현. 값 기준 체크는 `checkByValue(field, values)` 사용. */
|
|
544
|
+
/** @deprecated no-op stub — id 기반 체크 미구현. 값 기준 체크는 `checkByValue(field, values)` 사용. / no-op stub — id-based checking not implemented; use `checkByValue(field, values)`. */
|
|
301
545
|
checkById(_ids: string[]): void;
|
|
302
|
-
/** @deprecated no-op stub — id 기반 체크 추가 미구현(위 `checkById()` 참조). `checkByValue` 사용. */
|
|
546
|
+
/** @deprecated no-op stub — id 기반 체크 추가 미구현(위 `checkById()` 참조). `checkByValue` 사용. / no-op stub — see `checkById()`; use `checkByValue`. */
|
|
303
547
|
addCheckById(_ids: string[]): void;
|
|
548
|
+
/** field 값이 values 에 포함되는 행을 체크한다. / Check rows whose field value is in values. */
|
|
304
549
|
checkByValue(field: string, values: any[]): void;
|
|
305
|
-
/** @deprecated no-op stub — id 기반 체크 해제 미구현. 전체 해제는 `uncheckAll()` 사용. */
|
|
550
|
+
/** @deprecated no-op stub — id 기반 체크 해제 미구현. 전체 해제는 `uncheckAll()` 사용. / no-op stub — id-based unchecking not implemented; use `uncheckAll()`. */
|
|
306
551
|
uncheckById(_ids: string[]): void;
|
|
552
|
+
/** 전체 체크 해제. / Uncheck all rows. */
|
|
307
553
|
uncheckAll(): void;
|
|
554
|
+
/**
|
|
555
|
+
* 정렬을 적용한다(단일 field+dir 또는 SortItem 배열). / Apply sorting (single field+dir or a
|
|
556
|
+
* SortItem list).
|
|
557
|
+
*
|
|
558
|
+
* @param fieldOrList - field 명 또는 정렬 목록 / Field name or sort list
|
|
559
|
+
* @param dir - 단일 field 일 때 방향(기본 'asc') / Direction for single-field form (default 'asc')
|
|
560
|
+
*/
|
|
308
561
|
orderBy(fieldOrList: string | SortItem[], dir?: 'asc' | 'desc'): void;
|
|
562
|
+
/** 정렬을 초기 상태로 되돌린다. / Reset sorting to the initial state. */
|
|
309
563
|
resetOrder(): void;
|
|
564
|
+
/** 컬럼 필터를 설정한다. / Set filters for a column. */
|
|
310
565
|
setFilter(field: string, filterItems: FilterItem[]): void;
|
|
566
|
+
/** 필터 해제(field 생략 시 전체). / Clear filters (all when field omitted). */
|
|
311
567
|
resetFilter(field?: string): void;
|
|
312
568
|
/** F3-R13/MCCONNELL-03(P0): 정렬/필터 후 범위-보유(hasRangeRef) 수식 전부 dirty(§3.5). */
|
|
313
569
|
private _recalcRangeBearingFormulas;
|
|
570
|
+
/** 현재 필터 상태 스냅샷. / Snapshot of the current filter state. */
|
|
314
571
|
getFilterState(): Record<string, FilterItem[]>;
|
|
572
|
+
/** 필터 상태를 복원한다. / Restore a saved filter state. */
|
|
315
573
|
restoreFilter(state: Record<string, FilterItem[]>): void;
|
|
316
574
|
private _applyFilters;
|
|
575
|
+
/** 왼쪽 n개 컬럼을 고정한다. / Freeze the leftmost n columns. */
|
|
317
576
|
freeze(n: number): void;
|
|
318
|
-
/**
|
|
577
|
+
/** 수동 병합: [{row, col, rowSpan?, colSpan?}] / Manual merge: [{row, col, rowSpan?, colSpan?}] */
|
|
319
578
|
mergeCells(cells: MergeCell[]): void;
|
|
320
|
-
/** 자동 병합: 지정 필드 컬럼에서 연속 같은 값을 rowSpan으로
|
|
321
|
-
/** ?먮룞 蹂묓빀: 吏??field 而щ읆?먯꽌 ?곗냽 媛숈? 媛믪쓣 rowSpan */
|
|
579
|
+
/** 자동 병합: 지정 필드 컬럼에서 연속 같은 값을 rowSpan으로 묶는다. / Auto merge: consecutive equal values in the given field columns are merged via rowSpan. */
|
|
322
580
|
autoMerge(fields: string[]): void;
|
|
323
|
-
/**
|
|
581
|
+
/** 병합 해제. / Clear all merges. */
|
|
324
582
|
clearMerge(): void;
|
|
325
|
-
/** @deprecated no-op stub — 행 고정(freeze rows) 미구현. 컬럼 고정만 지원하며 `freeze(n)` 사용. */
|
|
583
|
+
/** @deprecated no-op stub — 행 고정(freeze rows) 미구현. 컬럼 고정만 지원하며 `freeze(n)` 사용. / no-op stub — frozen rows are not implemented; only column freezing via `freeze(n)`. */
|
|
326
584
|
freezeRows(_n: number): void;
|
|
585
|
+
/** 지정 필드들로 그룹핑한다. / Group rows by the given fields. */
|
|
327
586
|
groupBy(fields: string[]): void;
|
|
587
|
+
/** 그룹핑 해제. / Clear grouping. */
|
|
328
588
|
clearGroup(): void;
|
|
589
|
+
/** 모든 그룹 펼침. / Expand all groups. */
|
|
329
590
|
expandAll(): void;
|
|
591
|
+
/** 모든 그룹 접힘. / Collapse all groups. */
|
|
330
592
|
collapseAll(): void;
|
|
593
|
+
/** 트리 모드 활성화. / Enable tree mode. */
|
|
331
594
|
enableTree(): void;
|
|
595
|
+
/** 트리 모드 비활성화. / Disable tree mode. */
|
|
332
596
|
disableTree(): void;
|
|
597
|
+
/** 지정 트리 노드 펼침/접힘. / Expand/collapse the given tree nodes. */
|
|
333
598
|
expandNodes(ids: any | any[], open?: boolean): void;
|
|
599
|
+
/** 모든 트리 노드 펼침. / Expand all tree nodes. */
|
|
334
600
|
expandAllNodes(): void;
|
|
601
|
+
/** 모든 트리 노드 접힘. / Collapse all tree nodes. */
|
|
335
602
|
collapseAllNodes(): void;
|
|
603
|
+
/** 행 상세 패널 펼침(rowRef = flat index 또는 {id}). / Expand the detail panel (rowRef = flat index or {id}). */
|
|
336
604
|
expandRow(rowRef: number | {
|
|
337
605
|
id: string;
|
|
338
606
|
}): void;
|
|
607
|
+
/** 행 상세 패널 접힘. / Collapse the detail panel. */
|
|
339
608
|
collapseRow(rowRef: number | {
|
|
340
609
|
id: string;
|
|
341
610
|
}): void;
|
|
611
|
+
/** 행 상세 패널 토글. / Toggle the detail panel. */
|
|
342
612
|
toggleRow(rowRef: number | {
|
|
343
613
|
id: string;
|
|
344
614
|
}): void;
|
|
615
|
+
/** 행 상세 패널 펼침 여부. / Whether the detail panel is expanded. */
|
|
345
616
|
isRowExpanded(rowRef: number | {
|
|
346
617
|
id: string;
|
|
347
618
|
}): boolean;
|
|
619
|
+
/** 모든 상세 패널 접힘. / Collapse all detail panels. */
|
|
348
620
|
collapseAllDetails(): void;
|
|
621
|
+
/** 상세 인스턴스(renderer 반환값 또는 자동 서브그리드; 펼친 적 없으면 undefined). / Detail instance (renderer result or auto subgrid; undefined if never expanded). */
|
|
349
622
|
getDetailInstance<D = any>(rowRef: number | {
|
|
350
623
|
id: string;
|
|
351
624
|
}): D | undefined;
|
|
625
|
+
/** 열린 상세 패널 폭 강제 재동기(FR-11). / Force re-sync of open detail panel widths (FR-11). */
|
|
352
626
|
resyncPanelWidths(): void;
|
|
353
627
|
/** @deprecated no-op stub — 부모 지정 트리행 삽입 미구현. 평면 삽입은 `insertRow(item, pos)`,
|
|
354
|
-
* 트리 구성은 `enableTree()`/`groupBy(fields)` 사용.
|
|
628
|
+
* 트리 구성은 `enableTree()`/`groupBy(fields)` 사용.
|
|
629
|
+
* / no-op stub — parented tree-row insertion is not implemented. Use `insertRow(item, pos)`
|
|
630
|
+
* for flat insertion and `enableTree()`/`groupBy(fields)` for tree structure. */
|
|
355
631
|
addTreeRow(_item: Partial<T>, _pid: string, _pos?: Position): void;
|
|
632
|
+
/** 엑셀(xlsx)로 내보낸다. / Export as Excel (xlsx). */
|
|
356
633
|
exportExcel(options?: ExportOptions | string): void;
|
|
634
|
+
/** CSV 로 내보낸다. / Export as CSV. */
|
|
357
635
|
exportCsv(options?: ExportOptions | string): void;
|
|
636
|
+
/** JSON 으로 내보낸다. / Export as JSON. */
|
|
358
637
|
exportJson(options?: ExportOptions | string): void;
|
|
638
|
+
/** 인쇄용 창을 연다. / Open the print view. */
|
|
359
639
|
print(options?: {
|
|
360
640
|
title?: string;
|
|
361
641
|
excludeFields?: string[];
|
|
362
642
|
}): void;
|
|
643
|
+
/**
|
|
644
|
+
* 데이터 배열 변환. / Convert the data set.
|
|
645
|
+
*
|
|
646
|
+
* @param keyValue - true = 객체 배열(기본), false = 값 2D 배열 / true = object array (default), false = 2D value array
|
|
647
|
+
*/
|
|
363
648
|
toArray(keyValue?: boolean): any[];
|
|
649
|
+
/** 지정 행으로 스크롤·선택한다. / Scroll to and select the given row. */
|
|
364
650
|
jumpToRow(rowIndex: number): void;
|
|
365
|
-
/** @deprecated no-op stub — 특정 컬럼으로 가로 스크롤 이동 미구현. 행 이동은 `jumpToRow(rowIndex)` 사용. */
|
|
651
|
+
/** @deprecated no-op stub — 특정 컬럼으로 가로 스크롤 이동 미구현. 행 이동은 `jumpToRow(rowIndex)` 사용. / no-op stub — horizontal jump-to-column is not implemented; use `jumpToRow(rowIndex)`. */
|
|
366
652
|
jumpToCol(_field: string): void;
|
|
653
|
+
/** 현재 스크롤 좌표. / Current scroll position. */
|
|
367
654
|
getScrollPos(): {
|
|
368
655
|
x: number;
|
|
369
656
|
y: number;
|
|
370
657
|
};
|
|
658
|
+
/** 푸터 정의를 교체하고 다시 그린다. / Replace footer definitions and re-render the footer. */
|
|
371
659
|
setFooter(fd: any[]): void;
|
|
660
|
+
/** 푸터 집계값 목록. / Computed footer values. */
|
|
372
661
|
getFooterData(): any[];
|
|
662
|
+
/** 특정 field 의 푸터 집계값(없으면 null). / Footer value of the field (null when absent). */
|
|
373
663
|
getFooterValue(field: string): any;
|
|
374
664
|
private _renderFooterEl;
|
|
665
|
+
/** 그리드 크기를 변경하고 재배치한다. / Resize the grid and relayout. */
|
|
375
666
|
resize(w?: number, h?: number): void;
|
|
667
|
+
/** 색 테마(data-og-theme)를 전환한다. / Switch the color theme (data-og-theme). */
|
|
376
668
|
setTheme(theme: string): void;
|
|
669
|
+
/** 색 축 CSS 변수 1개를 런타임 설정한다. / Set one color-axis CSS variable at runtime. */
|
|
377
670
|
setThemeVar(k: string, v: string): void;
|
|
378
671
|
/**
|
|
379
672
|
* R12b: 스킨(FORM 축) 전환. data-og-skin 설정 + resolver 컨텍스트 교체 + 인라인 form 사이트 재해석.
|
|
380
673
|
* 색 테마와 직교(색 토큰 무변경). default→named 전환 시 인라인 보더가 리터럴→var() 로 승격되므로
|
|
381
674
|
* 헤더/본문을 한 번 재렌더한다(opt-in 비용). named→named/…→default 도 동일 경로로 안전.
|
|
675
|
+
* / R12b: switch the skin (FORM axis). Sets data-og-skin, swaps the resolver context and
|
|
676
|
+
* re-resolves inline form sites. Orthogonal to color themes (no color tokens touched).
|
|
382
677
|
*/
|
|
383
678
|
setSkin(skin: string): void;
|
|
384
|
-
/** R12b: 현재 스킨 id('default' = 오늘). */
|
|
679
|
+
/** R12b: 현재 스킨 id('default' = 오늘). / R12b: current skin id ('default' = stock look). */
|
|
385
680
|
getSkin(): string;
|
|
386
681
|
/**
|
|
387
682
|
* R12c(계약 C13): 이 그리드 인스턴스에 한해 시맨틱 아이콘 role 을 교체(멀티그리드 격리 —
|
|
388
683
|
* 전역 iconRegistry 를 부모로 하는 child 에만 기록). svgOrKey 는 알려진 아이콘 key 또는 원시 SVG 본문.
|
|
389
684
|
* R11 확장점과의 연결: 오버라이드를 `extensions.iconResolver` strategy 슬롯으로도 표면화해 발견가능하게 한다.
|
|
390
685
|
* 반환은 this(체이닝). 미지정 role/글리프는 안전 폴백(never throw).
|
|
686
|
+
* / R12c (contract C13): replace a semantic icon role for this instance only (multi-grid
|
|
687
|
+
* isolation — written to a child of the global iconRegistry). svgOrKey is a known icon key or
|
|
688
|
+
* raw SVG body. Returns this for chaining. Unknown roles/glyphs fall back safely (never throw).
|
|
689
|
+
*
|
|
690
|
+
* @param role - 시맨틱 아이콘 role / Semantic icon role
|
|
691
|
+
* @param svgOrKey - 아이콘 key 또는 원시 SVG / Icon key or raw SVG
|
|
692
|
+
* @returns 체이닝용 this / this for chaining
|
|
391
693
|
*/
|
|
392
694
|
setIcon(role: string, svgOrKey: string): this;
|
|
393
|
-
/** R12c: 이 인스턴스의 아이콘 role 해석(오버라이드 우선, 없으면 전역). 렌더 마크업/SVGElement. */
|
|
695
|
+
/** R12c: 이 인스턴스의 아이콘 role 해석(오버라이드 우선, 없으면 전역). 렌더 마크업/SVGElement. / R12c: resolve an icon role for this instance (override first, then global). Returns render markup or an SVGElement. */
|
|
394
696
|
renderIcon(role: string, opts?: {
|
|
395
697
|
size?: number;
|
|
396
698
|
title?: string;
|
|
397
699
|
el?: boolean;
|
|
398
700
|
}): string | SVGElement;
|
|
701
|
+
/**
|
|
702
|
+
* i18n: 이 인스턴스의 UI 로케일을 전환한다. setSkin 진영 — 데이터 불변 + 크롬/가시창 부분 재렌더.
|
|
703
|
+
* `lang` 속성을 로케일 Intl 태그로 갱신(스크린리더 발음 전환), 상주 크롬(페이지네이션/찾기)의
|
|
704
|
+
* 라벨을 새로 그리고, 캐시된 필터 패널을 무효화한 뒤 헤더+가시창을 1회 재렌더한다.
|
|
705
|
+
* 미등록 로케일은 throw 하지 않고 폴백 유지(never-throw). 전환 후 `localeChange` 이벤트 발화.
|
|
706
|
+
* / i18n: switch this instance's UI locale. setSkin camp — data-immutable + partial chrome/viewport
|
|
707
|
+
* re-render. Updates `lang` to the locale's Intl tag (screen-reader pronunciation), refreshes
|
|
708
|
+
* resident chrome labels (pagination/find), invalidates the cached filter panel, then re-renders
|
|
709
|
+
* the header + visible window once. Unknown locales never throw. Emits `localeChange` afterwards.
|
|
710
|
+
*
|
|
711
|
+
* @param locale - 로케일 id(예 'en') / Locale id (e.g. 'en')
|
|
712
|
+
* @example
|
|
713
|
+
* grid.setLocale('en');
|
|
714
|
+
*/
|
|
715
|
+
setLocale(locale: string): void;
|
|
716
|
+
/** i18n: 현재 인스턴스 로케일 id('ko' = 기본). / i18n: current instance locale id ('ko' = default). */
|
|
717
|
+
getLocale(): string;
|
|
718
|
+
/**
|
|
719
|
+
* i18n: 이 인스턴스만 단일 메시지를 오버라이드(setIcon 동형 — 첫 호출 때 child 지연 생성, 멀티그리드 격리).
|
|
720
|
+
* 자동 재렌더는 하지 않는다(다음 렌더/setLocale 때 반영). / i18n: override a single message for this
|
|
721
|
+
* instance only (isomorphic to setIcon — lazy child on first call, multi-grid isolation). No auto
|
|
722
|
+
* re-render (applied on the next render/setLocale).
|
|
723
|
+
*
|
|
724
|
+
* @param key - dot-key 메시지 키(예 'filter.apply') / dot-key message key (e.g. 'filter.apply')
|
|
725
|
+
* @param value - 문자열('{name}' 보간) 또는 함수 / string ('{name}' interpolation) or a function
|
|
726
|
+
* @returns 체이닝용 this / this for chaining
|
|
727
|
+
*/
|
|
728
|
+
setMessage(key: LocaleMessageKey | string, value: MessageValue): this;
|
|
729
|
+
/**
|
|
730
|
+
* i18n: 메시지를 해석한다(인스턴스 오버라이드 우선 → 활성 로케일 → ko → 키 원문). 절대 throw 안 함 —
|
|
731
|
+
* 렌더 루프(셀 aria) 소비자용. / i18n: resolve a message (instance override → active locale → ko →
|
|
732
|
+
* the key itself). Never throws — for render-loop consumers (cell aria).
|
|
733
|
+
*
|
|
734
|
+
* @param key - dot-key 메시지 키 / dot-key message key
|
|
735
|
+
* @param params - `{name}` 보간 파라미터 / `{name}` interpolation params
|
|
736
|
+
* @returns 해석된 문자열(미등록 키면 키 원문) / Resolved string (the key itself when unknown)
|
|
737
|
+
*/
|
|
738
|
+
t(key: LocaleMessageKey | string, params?: Record<string, string | number>): string;
|
|
399
739
|
/**
|
|
400
740
|
* R12b: FORM 축 단일 토큰 런타임 오버라이드(setThemeVar 의 형태-축 형제). 컨테이너 인라인이라
|
|
401
741
|
* 스타일시트를 항상 이긴다. 색⊥형태 직교성 보호를 위해 색 값은 거부한다.
|
|
742
|
+
* / R12b: runtime override of a single FORM-axis token (form-axis sibling of setThemeVar).
|
|
743
|
+
* Container-inline, so it always beats stylesheets. Color values are rejected to protect
|
|
744
|
+
* color⊥form orthogonality (throws).
|
|
402
745
|
*/
|
|
403
746
|
setSkinVar(k: string, v: string): void;
|
|
747
|
+
/**
|
|
748
|
+
* 트리거 등록('before:{op}' 취소 가능, 'after:{op}' 결과 수신). / Register a trigger
|
|
749
|
+
* ('before:{op}' can cancel, 'after:{op}' receives the result).
|
|
750
|
+
*
|
|
751
|
+
* @param event - 트리거 이벤트명 / Trigger event name
|
|
752
|
+
* @param handler - 핸들러(ctx.cancel() 지원) / Handler (supports ctx.cancel())
|
|
753
|
+
* @returns 체이닝용 this / this for chaining
|
|
754
|
+
* @example
|
|
755
|
+
* grid.addTrigger('before:insertRow', ctx => { if (!ctx.args[0]?.name) ctx.cancel(); });
|
|
756
|
+
*/
|
|
404
757
|
addTrigger(event: TriggerEvent | string, handler: TriggerHandler): this;
|
|
758
|
+
/** 트리거 제거. / Remove a trigger. */
|
|
405
759
|
removeTrigger(event: TriggerEvent | string, handler: TriggerHandler): this;
|
|
760
|
+
/** 트리거 전체 또는 특정 이벤트 클리어. / Clear all triggers or those of one event. */
|
|
406
761
|
clearTriggers(event?: TriggerEvent | string): this;
|
|
407
762
|
private _mkCtx;
|
|
408
763
|
private _trig;
|
|
764
|
+
/**
|
|
765
|
+
* 그리드를 파괴한다(옵저버/이벤트/차트/패널 해제, DOM 정리, override 전체 복구).
|
|
766
|
+
* / Destroy the grid (detach observers/events/charts/panels, clean the DOM, restore all overrides).
|
|
767
|
+
*/
|
|
409
768
|
destroy(): void;
|
|
410
769
|
}
|