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.
- package/CHANGELOG.md +32 -0
- package/README.md +30 -1
- package/dist/OpenGrid-0r_543Kj.cjs +7192 -0
- package/dist/OpenGrid-HmhGVC2V.js +7203 -0
- package/dist/open-grid-react.cjs +27 -1
- package/dist/open-grid-react.js +22 -82
- package/dist/open-grid-vue.cjs +31 -1
- package/dist/open-grid-vue.js +29 -79
- package/dist/open-grid.cjs +272 -6
- package/dist/open-grid.js +174 -260
- package/dist/types/core/CellEditManager.d.ts +75 -0
- package/dist/types/core/CellEventHandler.d.ts +99 -2
- package/dist/types/core/ChartManager.d.ts +53 -3
- package/dist/types/core/ContextMenu.d.ts +48 -3
- package/dist/types/core/CrossGridController.d.ts +86 -15
- package/dist/types/core/CrossGridRegistry.d.ts +36 -2
- package/dist/types/core/DetailManager.d.ts +108 -15
- package/dist/types/core/ExportManager.d.ts +73 -1
- package/dist/types/core/ExtensionPointRegistry.d.ts +160 -14
- package/dist/types/core/FilterPanel.d.ts +21 -3
- package/dist/types/core/FilterSelect.d.ts +41 -14
- package/dist/types/core/FindBarManager.d.ts +32 -0
- package/dist/types/core/FlatRowModel.d.ts +54 -11
- package/dist/types/core/FooterManager.d.ts +53 -1
- package/dist/types/core/FormulaController.d.ts +141 -10
- package/dist/types/core/GridComposer.d.ts +57 -4
- package/dist/types/core/GridRenderer.d.ts +3 -0
- package/dist/types/core/GridShuttle.d.ts +44 -4
- package/dist/types/core/GroupTreeManager.d.ts +86 -2
- package/dist/types/core/IconRegistry.d.ts +56 -9
- package/dist/types/core/KeyboardManager.d.ts +90 -4
- package/dist/types/core/MaskingEngine.d.ts +10 -9
- package/dist/types/core/MutationService.d.ts +115 -10
- package/dist/types/core/OpenGrid.d.ts +393 -34
- package/dist/types/core/OrgChart.d.ts +56 -1
- package/dist/types/core/OverrideKernel.d.ts +59 -15
- package/dist/types/core/Pagination.d.ts +44 -5
- package/dist/types/core/RangeSelectionManager.d.ts +123 -7
- package/dist/types/core/RenderController.d.ts +56 -0
- package/dist/types/core/RowManager.d.ts +55 -0
- package/dist/types/core/SkinRegistry.d.ts +51 -15
- package/dist/types/core/SortFilterManager.d.ts +82 -1
- package/dist/types/core/TriggerManager.d.ts +46 -0
- package/dist/types/core/WorksheetManager.d.ts +65 -3
- package/dist/types/core/XmlConverter.d.ts +56 -23
- package/dist/types/core/chart/types.d.ts +107 -10
- package/dist/types/core/detail/DetailGlyph.d.ts +3 -1
- package/dist/types/core/editors/CellEditor.d.ts +29 -2
- package/dist/types/core/formula/types.d.ts +71 -8
- 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/range/RangeQuery.d.ts +24 -2
- package/dist/types/core/renderers/CellRenderer.d.ts +105 -8
- package/dist/types/core/types.d.ts +352 -96
- package/dist/types/index.d.ts +22 -0
- package/dist/xlsx.min-BQ1o3sB6.cjs +11793 -0
- package/dist/{xlsx.min-Wavxcamn.js → xlsx.min-Bbz2ZypC.js} +453 -566
- package/package.json +4 -1
- package/dist/OpenGrid-LcZ5iixx.cjs +0 -97
- package/dist/OpenGrid-yg4mw6Ge.js +0 -9505
- package/dist/xlsx.min-Bx-LxWOf.cjs +0 -138
|
@@ -3,23 +3,55 @@ import { ColumnLayout } from './ColumnLayout.js';
|
|
|
3
3
|
import { GridRenderer } from './GridRenderer.js';
|
|
4
4
|
import { CellEditor } from './editors/CellEditor.js';
|
|
5
5
|
import { ColumnDef } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* {@link CellEditManager} 의존성 주입 계약. / Dependency-injection contract for {@link CellEditManager}.
|
|
8
|
+
*
|
|
9
|
+
* 셀 편집기의 마운트/커밋에 필요한 데이터·렌더·i18n·수식 접근을 호스트 그리드가 제공한다.
|
|
10
|
+
* / The host grid supplies the data/render/i18n/formula access needed to mount and
|
|
11
|
+
* commit the cell editor.
|
|
12
|
+
*/
|
|
6
13
|
export interface CellEditDeps<T extends Record<string, any>> {
|
|
14
|
+
/** 데이터 레이어. / The data layer. */
|
|
7
15
|
data: DataLayer<T>;
|
|
16
|
+
/** 컬럼 레이아웃. / The column layout. */
|
|
8
17
|
colLayout: ColumnLayout<T>;
|
|
18
|
+
/** 현재 렌더러 조회(없으면 `null`). / Look up the current renderer (or `null`). */
|
|
9
19
|
getRenderer: () => GridRenderer | null;
|
|
20
|
+
/** 그리드 컨테이너 엘리먼트 조회. / Look up the grid container element. */
|
|
10
21
|
getContainer: () => HTMLElement;
|
|
22
|
+
/** 현재 그리드 옵션 조회. / Look up the current grid options. */
|
|
11
23
|
getOptions: () => any;
|
|
24
|
+
/** 그리드 이벤트를 발행한다. / Emit a grid event. */
|
|
12
25
|
emit: (event: string, ...args: any[]) => void;
|
|
26
|
+
/** 바디를 다시 그린다. / Re-render the body. */
|
|
13
27
|
doRender: () => void;
|
|
28
|
+
/** 스크린리더용 상태 안내. / Announce a status message for screen readers. */
|
|
14
29
|
announce: (msg: string) => void;
|
|
30
|
+
/** i18n: 편집 셀 위치 announce 해석 + 에디터 ctx 로케일 주입. / i18n: resolve edit-cell announce + inject locale into editor ctx. */
|
|
31
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
32
|
+
/** 셀 값을 기록한다(트리거/이벤트 발화 경로). / Write a cell value (goes through the trigger/event path). */
|
|
15
33
|
writeCell: (ri: number, field: string, value: any) => void;
|
|
34
|
+
/** 지정 행이 보이도록 스크롤한다. / Scroll so the given row is visible. */
|
|
16
35
|
scrollToRow: (ri: number) => void;
|
|
36
|
+
/** 현재 보이는(펼쳐진) 리프 컬럼 목록 조회. / Look up the currently visible leaf columns. */
|
|
17
37
|
getVisibleLeaves: () => ColumnDef<T>[];
|
|
38
|
+
/** F3: 해당 셀이 수식을 갖는지 조회. / F3: check whether the cell currently holds a formula. */
|
|
18
39
|
hasCellFormula?: (ri: number, field: string) => boolean;
|
|
40
|
+
/** F3: 셀의 수식 원문을 조회(없으면 `null`). / F3: get the cell's raw formula source (or `null`). */
|
|
19
41
|
getCellFormula?: (ri: number, field: string) => string | null;
|
|
42
|
+
/** F3: 셀에 수식을 설정한다. / F3: set a formula on the cell. */
|
|
20
43
|
setCellFormula?: (ri: number, field: string, formula: string) => void;
|
|
44
|
+
/** F3: 셀의 수식을 제거한다. / F3: clear the cell's formula. */
|
|
21
45
|
clearCellFormula?: (ri: number, field: string) => void;
|
|
22
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* 셀 편집 생명주기(포커스·시작·커밋·취소)를 관리하는 매니저. / Manages the cell edit lifecycle (focus, start, commit, cancel).
|
|
49
|
+
*
|
|
50
|
+
* 활성 에디터 인스턴스와 편집/포커스 대상 셀 좌표를 소유하며, 키보드/마우스 두 진입
|
|
51
|
+
* 경로 모두에서 동일한 편집기 마운트·커밋 흐름을 재사용한다.
|
|
52
|
+
* / Owns the active editor instance and the edit/focus target cell coordinates, and
|
|
53
|
+
* reuses the same editor mount/commit flow for both the keyboard and mouse entry paths.
|
|
54
|
+
*/
|
|
23
55
|
export declare class CellEditManager<T extends Record<string, any> = any> {
|
|
24
56
|
private _activeEditor;
|
|
25
57
|
private _editCell;
|
|
@@ -27,23 +59,66 @@ export declare class CellEditManager<T extends Record<string, any> = any> {
|
|
|
27
59
|
private _dragColIdx;
|
|
28
60
|
private _d;
|
|
29
61
|
constructor(deps: CellEditDeps<T>);
|
|
62
|
+
/** 현재 마운트된 에디터 인스턴스(없으면 `null`). / The currently mounted editor instance (or `null`). */
|
|
30
63
|
get activeEditor(): CellEditor | null;
|
|
64
|
+
/** 현재 편집 중인 셀 좌표(없으면 `null`). / Coordinates of the cell currently being edited (or `null`). */
|
|
31
65
|
get editCell(): {
|
|
32
66
|
ri: number;
|
|
33
67
|
ci: number;
|
|
34
68
|
} | null;
|
|
69
|
+
/** 현재 키보드 포커스 셀 좌표(없으면 `null`). / Coordinates of the currently keyboard-focused cell (or `null`). */
|
|
35
70
|
get focusCell(): {
|
|
36
71
|
ri: number;
|
|
37
72
|
ci: number;
|
|
38
73
|
} | null;
|
|
74
|
+
/** 컬럼 드래그 중인 컬럼 인덱스(없으면 `null`). / Column index currently being column-dragged (or `null`). */
|
|
39
75
|
get dragColIdx(): number | null;
|
|
40
76
|
set dragColIdx(v: number | null);
|
|
77
|
+
/**
|
|
78
|
+
* 키보드 포커스 셀을 설정하고, 스크롤·재렌더·상태 announce 를 처리한다. / Set the keyboard-focused cell; handles scroll, re-render, and status announce.
|
|
79
|
+
*
|
|
80
|
+
* @param ri - 포커스할 행의 flat index / Flat index of the row to focus
|
|
81
|
+
* @param ci - 포커스할 컬럼 인덱스(보이는 리프 컬럼 기준) / Column index to focus, among visible leaf columns
|
|
82
|
+
*/
|
|
41
83
|
setFocusCell(ri: number, ci: number): void;
|
|
84
|
+
/** 키보드 포커스 셀을 해제한다. / Clear the keyboard-focused cell. */
|
|
42
85
|
clearFocusCell(): void;
|
|
86
|
+
/**
|
|
87
|
+
* 키보드 진입(F2/Enter 등)으로 셀 편집을 시작한다. / Start cell editing via a keyboard entry point (F2/Enter, etc.).
|
|
88
|
+
*
|
|
89
|
+
* 토글형 컬럼(checkbox 등)은 에디터를 마운트하지 않고 값을 즉시 반전한다.
|
|
90
|
+
* / For toggle-type columns (checkbox, etc.), this flips the value immediately
|
|
91
|
+
* instead of mounting an editor.
|
|
92
|
+
*
|
|
93
|
+
* @param rowIndex - 편집할 행의 flat index / Flat index of the row to edit
|
|
94
|
+
* @param colIndex - 편집할 컬럼 인덱스(보이는 리프 컬럼 기준) / Column index to edit, among visible leaf columns
|
|
95
|
+
*/
|
|
43
96
|
startEditByKey(rowIndex: number, colIndex: number): void;
|
|
97
|
+
/**
|
|
98
|
+
* 마우스 진입(클릭/더블클릭)으로 셀 편집을 시작한다. / Start cell editing via a mouse entry point (click/double-click).
|
|
99
|
+
*
|
|
100
|
+
* `editable` 옵션·컬럼별 editable 함수·토글형 컬럼 여부를 모두 확인한 뒤
|
|
101
|
+
* 에디터를 마운트한다.
|
|
102
|
+
* / Checks the `editable` option, any per-column editable function, and whether
|
|
103
|
+
* the column is toggle-type before mounting the editor.
|
|
104
|
+
*
|
|
105
|
+
* @param rowIndex - 편집할 행의 flat index / Flat index of the row to edit
|
|
106
|
+
* @param colIndex - 편집할 컬럼 인덱스(보이는 리프 컬럼 기준) / Column index to edit, among visible leaf columns
|
|
107
|
+
* @param _e - 트리거한 마우스 이벤트(현재 미사용) / The triggering mouse event (currently unused)
|
|
108
|
+
*/
|
|
44
109
|
startEdit(rowIndex: number, colIndex: number, _e: MouseEvent): void;
|
|
110
|
+
/** 활성 에디터의 현재 값으로 편집을 커밋한다(활성 에디터가 없으면 무시). / Commit editing using the active editor's current value (no-op if none is active). */
|
|
45
111
|
commitEdit(): void;
|
|
112
|
+
/**
|
|
113
|
+
* 지정 값으로 편집을 커밋한다(에디터의 onCommit 콜백 경로). / Commit editing with an explicit value (the editor's onCommit callback path).
|
|
114
|
+
*
|
|
115
|
+
* @param ri - 대상 행의 flat index / Flat index of the target row
|
|
116
|
+
* @param ci - 대상 컬럼 인덱스 / Target column index
|
|
117
|
+
* @param value - 커밋할 값 / Value to commit
|
|
118
|
+
*/
|
|
46
119
|
commitEditWithValue(ri: number, ci: number, value: any): void;
|
|
120
|
+
/** 편집을 취소한다(값 변경 없이 에디터만 해제). / Cancel editing (releases the editor without applying a value change). */
|
|
47
121
|
cancelEdit(): void;
|
|
122
|
+
/** @internal */
|
|
48
123
|
private _finishEdit;
|
|
49
124
|
}
|
|
@@ -2,32 +2,129 @@ import { DataLayer } from './DataLayer.js';
|
|
|
2
2
|
import { ColumnLayout } from './ColumnLayout.js';
|
|
3
3
|
import { CellEditManager } from './CellEditManager.js';
|
|
4
4
|
import { RowManager } from './RowManager.js';
|
|
5
|
+
/**
|
|
6
|
+
* {@link CellEventHandler} 의존성 주입 계약. / Dependency-injection contract for {@link CellEventHandler}.
|
|
7
|
+
*
|
|
8
|
+
* DOM 셀 이벤트를 그리드 선택/편집/범위선택 서브시스템에 연결하는 데 필요한
|
|
9
|
+
* 접근 함수와 배선 훅을 호스트 그리드가 제공한다.
|
|
10
|
+
* / The host grid supplies the accessors and wiring hooks needed to route DOM
|
|
11
|
+
* cell events into the selection/edit/range-selection subsystems.
|
|
12
|
+
*/
|
|
5
13
|
export interface CellEventDeps<T extends Record<string, any>> {
|
|
14
|
+
/** 현재 데이터 레이어 조회. / Look up the current data layer. */
|
|
6
15
|
getData: () => DataLayer<T>;
|
|
16
|
+
/** 현재 컬럼 레이아웃 조회. / Look up the current column layout. */
|
|
7
17
|
getColLayout: () => ColumnLayout<T>;
|
|
18
|
+
/** 현재 그리드 옵션 조회. / Look up the current grid options. */
|
|
8
19
|
getOptions: () => any;
|
|
20
|
+
/** 셀 편집 매니저 조회. / Look up the cell edit manager. */
|
|
9
21
|
getEditMgr: () => CellEditManager<T>;
|
|
22
|
+
/** 행 선택/체크 매니저 조회. / Look up the row selection/check manager. */
|
|
10
23
|
getRowMgr: () => RowManager<T>;
|
|
24
|
+
/** 그리드 이벤트를 발행한다. / Emit a grid event. */
|
|
11
25
|
emit: (event: string, ...args: any[]) => void;
|
|
26
|
+
/** 셀 값을 기록한다(토글/라디오 컬럼 등에서 사용). / Write a cell value (used by toggle/radio columns, etc.). */
|
|
12
27
|
writeCell: (ri: number, field: string, value: any) => void;
|
|
28
|
+
/** 바디를 다시 그린다. / Re-render the body. */
|
|
13
29
|
doRender: () => void;
|
|
30
|
+
/** 그리드 컨테이너 엘리먼트 조회. / Look up the grid container element. */
|
|
14
31
|
getContainer: () => HTMLElement;
|
|
15
|
-
/** 'cells' 모드 클릭/Shift+클릭 위임 — RangeSelectionManager.handleClick 로 연결
|
|
32
|
+
/** 'cells' 모드 클릭/Shift+클릭 위임 — RangeSelectionManager.handleClick 로 연결
|
|
33
|
+
* / Delegates 'cells'-mode click/Shift+click — wired to `RangeSelectionManager.handleClick`. */
|
|
16
34
|
onCellsClick?: (ri: number, ci: number, shiftKey: boolean) => void;
|
|
17
|
-
/** 범위 드래그 선택 상태머신(§3.1) — RangeSelectionManager.handleCellMouseDown/Move/Up 로 연결
|
|
35
|
+
/** 범위 드래그 선택 상태머신(§3.1) — RangeSelectionManager.handleCellMouseDown/Move/Up 로 연결
|
|
36
|
+
* / Range drag-select state machine (§3.1) — wired to `RangeSelectionManager.handleCellMouseDown/Move/Up`. */
|
|
18
37
|
rangeMouseDown?: (ri: number, ci: number, e: MouseEvent) => void;
|
|
38
|
+
/** {@link rangeMouseDown} 참조 — 드래그 이동 단계. / See {@link rangeMouseDown} — the drag-move phase. */
|
|
19
39
|
rangeMouseMove?: (ri: number, ci: number, e: MouseEvent) => void;
|
|
40
|
+
/** {@link rangeMouseDown} 참조 — 드래그 종료 단계. / See {@link rangeMouseDown} — the drag-end phase. */
|
|
20
41
|
rangeMouseUp?: (ri: number, ci: number, e: MouseEvent) => void;
|
|
21
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* 셀 DOM 이벤트(클릭·더블클릭·마우스·키)를 라우팅하는 핸들러. / Routes cell DOM events (click, double-click, mouse, key) to the right subsystem.
|
|
45
|
+
*
|
|
46
|
+
* 선택 모드(`single`/`multiple`/`row`/`cells`)에 따라 행/범위 선택을 위임하고,
|
|
47
|
+
* 토글·라디오 컬럼 값 반영, 편집 시작, 그리고 공개 셀/행 이벤트(`cellClick` 등)
|
|
48
|
+
* 발행까지 한 곳에서 처리한다.
|
|
49
|
+
* / Delegates row/range selection based on the selection mode (`single`/`multiple`/
|
|
50
|
+
* `row`/`cells`), applies toggle/radio column values, kicks off editing, and emits
|
|
51
|
+
* the public cell/row events (`cellClick`, etc.) — all in one place.
|
|
52
|
+
*/
|
|
22
53
|
export declare class CellEventHandler<T extends Record<string, any> = any> {
|
|
23
54
|
private _d;
|
|
24
55
|
constructor(deps: CellEventDeps<T>);
|
|
56
|
+
/**
|
|
57
|
+
* 셀 클릭을 처리한다: 선택 모드 적용, 토글/라디오 값 반영, `cellClick`/`rowClick`
|
|
58
|
+
* 이벤트 발행, 필요 시 편집 시작까지 수행한다.
|
|
59
|
+
* / Handles a cell click: applies the selection mode, updates toggle/radio values,
|
|
60
|
+
* emits `cellClick`/`rowClick`, and starts editing when appropriate.
|
|
61
|
+
*
|
|
62
|
+
* @param rowIndex - 클릭된 행의 flat index / Flat index of the clicked row
|
|
63
|
+
* @param colIndex - 클릭된 컬럼 인덱스(행 헤더 등은 -1일 수 있음) / Clicked column index (may be -1 for row-header-like clicks)
|
|
64
|
+
* @param e - 원본 마우스 이벤트 / The originating mouse event
|
|
65
|
+
*/
|
|
25
66
|
handleCellClick(rowIndex: number, colIndex: number, e: MouseEvent): void;
|
|
67
|
+
/**
|
|
68
|
+
* 셀 더블클릭을 처리한다: `cellDblClick`/`rowDblClick` 발행, `editMode:'dblclick'` 이면 편집 시작.
|
|
69
|
+
* / Handles a cell double-click: emits `cellDblClick`/`rowDblClick`, and starts editing
|
|
70
|
+
* when `editMode` is `'dblclick'`.
|
|
71
|
+
*
|
|
72
|
+
* @param rowIndex - 대상 행의 flat index / Flat index of the target row
|
|
73
|
+
* @param colIndex - 대상 컬럼 인덱스 / Target column index
|
|
74
|
+
* @param e - 원본 마우스 이벤트 / The originating mouse event
|
|
75
|
+
*/
|
|
26
76
|
handleCellDblClick(rowIndex: number, colIndex: number, e: MouseEvent): void;
|
|
77
|
+
/**
|
|
78
|
+
* 마우스 오버: `cellMouseOver`/`rowMouseOver` 이벤트를 발행한다. / Mouse-over: emits `cellMouseOver`/`rowMouseOver`.
|
|
79
|
+
*
|
|
80
|
+
* @param ri - 대상 행의 flat index / Flat index of the target row
|
|
81
|
+
* @param ci - 대상 컬럼 인덱스 / Target column index
|
|
82
|
+
* @param e - 원본 마우스 이벤트 / The originating mouse event
|
|
83
|
+
*/
|
|
27
84
|
handleCellMouseOver(ri: number, ci: number, e: MouseEvent): void;
|
|
85
|
+
/**
|
|
86
|
+
* 마우스 아웃: `cellMouseOut`/`rowMouseOut` 이벤트를 발행한다. / Mouse-out: emits `cellMouseOut`/`rowMouseOut`.
|
|
87
|
+
*
|
|
88
|
+
* @param ri - 대상 행의 flat index / Flat index of the target row
|
|
89
|
+
* @param ci - 대상 컬럼 인덱스 / Target column index
|
|
90
|
+
* @param e - 원본 마우스 이벤트 / The originating mouse event
|
|
91
|
+
*/
|
|
28
92
|
handleCellMouseOut(ri: number, ci: number, e: MouseEvent): void;
|
|
93
|
+
/**
|
|
94
|
+
* 마우스 다운: 범위 드래그 선택 상태머신을 먼저 위임한 뒤 `cellMouseDown`/`rowMouseDown` 을 발행한다.
|
|
95
|
+
* / Mouse-down: delegates to the range drag-select state machine first, then emits
|
|
96
|
+
* `cellMouseDown`/`rowMouseDown`.
|
|
97
|
+
*
|
|
98
|
+
* @param ri - 대상 행의 flat index / Flat index of the target row
|
|
99
|
+
* @param ci - 대상 컬럼 인덱스 / Target column index
|
|
100
|
+
* @param e - 원본 마우스 이벤트 / The originating mouse event
|
|
101
|
+
*/
|
|
29
102
|
handleCellMouseDown(ri: number, ci: number, e: MouseEvent): void;
|
|
103
|
+
/**
|
|
104
|
+
* 마우스 업: 범위 드래그 선택 종료를 위임한 뒤 `cellMouseUp`/`rowMouseUp` 을 발행한다.
|
|
105
|
+
* / Mouse-up: delegates the drag-select end, then emits `cellMouseUp`/`rowMouseUp`.
|
|
106
|
+
*
|
|
107
|
+
* @param ri - 대상 행의 flat index / Flat index of the target row
|
|
108
|
+
* @param ci - 대상 컬럼 인덱스 / Target column index
|
|
109
|
+
* @param e - 원본 마우스 이벤트 / The originating mouse event
|
|
110
|
+
*/
|
|
30
111
|
handleCellMouseUp(ri: number, ci: number, e: MouseEvent): void;
|
|
112
|
+
/**
|
|
113
|
+
* 마우스 이동: 범위 드래그 확장을 위임한 뒤 `cellMouseMove`/`rowMouseMove` 를 발행한다.
|
|
114
|
+
* / Mouse-move: delegates the drag-select extension, then emits `cellMouseMove`/`rowMouseMove`.
|
|
115
|
+
*
|
|
116
|
+
* @param ri - 대상 행의 flat index / Flat index of the target row
|
|
117
|
+
* @param ci - 대상 컬럼 인덱스 / Target column index
|
|
118
|
+
* @param e - 원본 마우스 이벤트 / The originating mouse event
|
|
119
|
+
*/
|
|
31
120
|
handleCellMouseMove(ri: number, ci: number, e: MouseEvent): void;
|
|
121
|
+
/**
|
|
122
|
+
* 현재 포커스 셀에 대한 키보드 이벤트를 공개 이벤트로 발행한다(편집 중이거나 포커스 셀이 없으면 무시).
|
|
123
|
+
* / Emits a public event for a keyboard action on the currently focused cell
|
|
124
|
+
* (no-op while editing or when there is no focus cell).
|
|
125
|
+
*
|
|
126
|
+
* @param eventName - 발행할 이벤트 종류 / Which event kind to emit
|
|
127
|
+
* @param e - 원본 키보드 이벤트 / The originating keyboard event
|
|
128
|
+
*/
|
|
32
129
|
handleCellKeyEvt(eventName: 'cellKeyDown' | 'cellKeyUp' | 'cellKeyPress', e: KeyboardEvent): void;
|
|
33
130
|
}
|
|
@@ -2,29 +2,76 @@ import { CellRange } from './types.js';
|
|
|
2
2
|
import { FlatRowModel } from './FlatRowModel.js';
|
|
3
3
|
import { ChartConfig, ChartInstance } from './chart/types.js';
|
|
4
4
|
import { ChartColumnRef } from './chart/DataExtractor.js';
|
|
5
|
+
/**
|
|
6
|
+
* ChartManager 가 그리드 서브시스템을 읽기 위해 주입받는 클로저 묶음. / Closures injected into
|
|
7
|
+
* ChartManager so it can read grid subsystem state without owning it directly.
|
|
8
|
+
*/
|
|
5
9
|
export interface ChartManagerDeps {
|
|
10
|
+
/** 차트 패널을 붙일 그리드 컨테이너 엘리먼트. / Grid container element the chart panel mounts into. */
|
|
6
11
|
getContainer(): HTMLElement;
|
|
12
|
+
/** 현재 GridOptions(차트 관련 `options.chart` 포함). / Current GridOptions (includes `options.chart`). */
|
|
7
13
|
getOptions(): any;
|
|
14
|
+
/** 필터/정렬 적용 전 전체 행. / All rows, before filter/sort. */
|
|
8
15
|
getAllRows(): Array<Record<string, any>>;
|
|
16
|
+
/** 현재 선택된 행. / Currently selected rows. */
|
|
9
17
|
getSelectedRows(): Array<Record<string, any>>;
|
|
18
|
+
/** 현재 체크된 행. / Currently checked rows. */
|
|
10
19
|
getCheckedRows(): Array<Record<string, any>>;
|
|
11
|
-
/** ColumnLayout.visibleLeaves 투영(숨김 제외, C0.4). */
|
|
20
|
+
/** ColumnLayout.visibleLeaves 투영(숨김 제외, C0.4). / Projection of ColumnLayout.visibleLeaves (hidden columns excluded, C0.4). */
|
|
12
21
|
getVisibleColumns(): ChartColumnRef[];
|
|
22
|
+
/** 행 합성 결과를 조회하는 baseline 모델. / Baseline model exposing the composed row structure. */
|
|
13
23
|
getFlatModel(): FlatRowModel;
|
|
24
|
+
/** stable rowId 로 원본 행을 조회(없으면 undefined). / Look up the source row by stable rowId (undefined if absent). */
|
|
14
25
|
getRowById(rowId: string): Record<string, any> | undefined;
|
|
15
|
-
/** F1 seam(C4). 없으면 range 소스는 selection 으로 강등(§7). */
|
|
26
|
+
/** F1 seam(C4). 없으면 range 소스는 selection 으로 강등(§7). / F1 seam (C4); when absent, a `range` source degrades to `selection` (§7). */
|
|
16
27
|
getActiveRange?(): CellRange | null;
|
|
17
|
-
/** 그리드 이벤트 구독/해제(EventEmitter). */
|
|
28
|
+
/** 그리드 이벤트 구독/해제(EventEmitter). / Subscribe/unsubscribe grid events (EventEmitter). */
|
|
18
29
|
on(ev: string, cb: (...a: any[]) => void): void;
|
|
19
30
|
off(ev: string, cb: (...a: any[]) => void): void;
|
|
31
|
+
/** 그리드 이벤트 발행. / Emit a grid event. */
|
|
20
32
|
emit(ev: string, ...args: any[]): void;
|
|
33
|
+
/** aria-live 영역에 메시지를 공지. / Announce a message via the aria-live region. */
|
|
21
34
|
announce(msg: string): void;
|
|
35
|
+
/** i18n: 차트 배지·패널 aria·announce 해석. / i18n: resolve chart badges/panel-aria/announce. */
|
|
36
|
+
t(key: string, params?: Record<string, string | number>): string;
|
|
22
37
|
}
|
|
38
|
+
/** F4 차트 인스턴스 핸들(update/refresh/destroy 등). 정의는 chart/types.js 참고.
|
|
39
|
+
* / F4 chart instance handle (update/refresh/destroy, etc.). See chart/types.js for the definition. */
|
|
23
40
|
export type { ChartInstance } from './chart/types.js';
|
|
41
|
+
/**
|
|
42
|
+
* F4 통합 차트 매니저. / F4 integrated chart manager.
|
|
43
|
+
*
|
|
44
|
+
* 차트 설정(`ChartConfig`)을 받아 데이터 추출 → 다운샘플 → 렌더 스펙 조립 → 어댑터 렌더까지의
|
|
45
|
+
* 파이프라인을 실행하고, 생성된 각 차트를 라이브 갱신(dataChange/formulaRecalc)·리사이즈·파괴까지
|
|
46
|
+
* 책임지고 관리한다. / Given a `ChartConfig`, runs the pipeline from data extraction through
|
|
47
|
+
* downsampling, render-spec assembly, and adapter rendering, then owns each created chart's
|
|
48
|
+
* live updates (dataChange/formulaRecalc), resize handling, and teardown.
|
|
49
|
+
*/
|
|
24
50
|
export declare class ChartManager {
|
|
25
51
|
private _d;
|
|
26
52
|
private _charts;
|
|
27
53
|
constructor(deps: ChartManagerDeps);
|
|
54
|
+
/**
|
|
55
|
+
* 새 차트를 생성해 그리드에 마운트한다. / Create a new chart and mount it into the grid.
|
|
56
|
+
*
|
|
57
|
+
* 범위 스냅샷(source.kind==='range') → 어댑터 결정 → 패널 DOM 구성 → 데이터 추출/렌더 →
|
|
58
|
+
* 배지/라이브구독/리사이즈 관찰까지 한 번에 처리한다. 초기화 도중 실패하면 부분 생성된
|
|
59
|
+
* DOM/구독을 정리하고 원 예외를 다시 던진다.
|
|
60
|
+
* / Handles range snapshotting (when source.kind==='range'), adapter resolution, panel DOM
|
|
61
|
+
* construction, data extraction/render, badges, live subscription, and resize observation in
|
|
62
|
+
* one call. If initialization fails partway, partially created DOM/subscriptions are cleaned up
|
|
63
|
+
* and the original error is re-thrown.
|
|
64
|
+
*
|
|
65
|
+
* @param config - 차트 생성 설정(소스·타입·배치 등) / Chart creation config (source, type, placement, etc.)
|
|
66
|
+
* @returns 생성된 차트 인스턴스 핸들 / Handle for the created chart instance
|
|
67
|
+
* @example
|
|
68
|
+
* const chart = chartManager.createChart({
|
|
69
|
+
* source: { kind: 'selection' },
|
|
70
|
+
* type: 'bar',
|
|
71
|
+
* category: 'name',
|
|
72
|
+
* });
|
|
73
|
+
* chart.on('chartRender', () => console.log('rendered'));
|
|
74
|
+
*/
|
|
28
75
|
createChart(config: ChartConfig): ChartInstance;
|
|
29
76
|
/**
|
|
30
77
|
* config.size 가 명시되면 그대로 쓴다. 없으면 host 의 실측 clientWidth(실브라우저에서
|
|
@@ -34,7 +81,10 @@ export declare class ChartManager {
|
|
|
34
81
|
*/
|
|
35
82
|
private _resolveRenderSize;
|
|
36
83
|
private _attachResizeObserver;
|
|
84
|
+
/** 파괴되지 않은 모든 차트 인스턴스를 반환한다. / Return all chart instances that have not been destroyed. */
|
|
37
85
|
getCharts(): ChartInstance[];
|
|
86
|
+
/** 이 매니저가 소유한 모든 차트를 파괴한다(DOM 제거·구독 해제 포함).
|
|
87
|
+
* / Destroy every chart owned by this manager (DOM removal and unsubscription included). */
|
|
38
88
|
destroyCharts(): void;
|
|
39
89
|
private _snapshotRange;
|
|
40
90
|
private _extract;
|
|
@@ -1,17 +1,45 @@
|
|
|
1
1
|
import { ContextMenuItem } from './types.js';
|
|
2
2
|
export type { ContextMenuItem };
|
|
3
|
+
/**
|
|
4
|
+
* 기본 컨텍스트 메뉴 항목이 위임하는 액션 핸들러 모음. / Action handlers that the default context-menu items delegate to.
|
|
5
|
+
*
|
|
6
|
+
* `OpenGrid` 가 생성 시 주입하며, 커스텀 메뉴 항목이 `action: 'sortAsc'` 등
|
|
7
|
+
* 문자열 액션을 쓸 때 실제 동작을 제공한다. / Injected by `OpenGrid` at construction time;
|
|
8
|
+
* provides the real behavior when a custom menu item uses a string `action` like `'sortAsc'`.
|
|
9
|
+
*/
|
|
3
10
|
export interface ContextMenuActions {
|
|
11
|
+
/** 오름차순 정렬 실행. / Runs ascending sort. */
|
|
4
12
|
onSortAsc: () => void;
|
|
13
|
+
/** 내림차순 정렬 실행. / Runs descending sort. */
|
|
5
14
|
onSortDesc: () => void;
|
|
15
|
+
/** 찾기 바 열기. / Opens the find bar. */
|
|
6
16
|
onFind: () => void;
|
|
17
|
+
/** Excel 내보내기 실행. / Runs the Excel export. */
|
|
7
18
|
onExcel: () => void;
|
|
19
|
+
/** CSV 내보내기 실행. / Runs the CSV export. */
|
|
8
20
|
onCsv: () => void;
|
|
21
|
+
/** 인쇄 실행. / Runs print. */
|
|
9
22
|
onPrint: () => void;
|
|
10
23
|
}
|
|
24
|
+
/** i18n: 메시지 해석기 시그니처. / i18n: message resolver signature. */
|
|
25
|
+
export type ContextMenuT = (key: string, params?: Record<string, string | number>) => string;
|
|
26
|
+
/** 기본 메뉴 항목(ko 라벨) — i18n 미주입 폴백 + 구조 계약(테스트/공개 표면). / Default items (ko labels) — i18n fallback + structural contract. */
|
|
11
27
|
export declare const DEFAULT_CONTEXT_ITEMS: ContextMenuItem[];
|
|
28
|
+
/**
|
|
29
|
+
* 우클릭 팝업 컨텍스트 메뉴 관리자. / Manages the right-click popup context menu.
|
|
30
|
+
*
|
|
31
|
+
* 메뉴는 `document.body` 자식으로 추가한다(그리드 컨테이너의 조상에 transform/filter
|
|
32
|
+
* 가 있어도 `position:fixed` 기준점이 뷰포트에 고정되도록). 테마(`data-og-theme`)와
|
|
33
|
+
* 스킨(`data-og-skin`) 속성은 앵커 엘리먼트에서 복사해 CSS 변수 상속을 보존한다.
|
|
34
|
+
* / The menu is appended as a child of `document.body` (so its `position:fixed`
|
|
35
|
+
* reference stays the viewport even when an ancestor of the grid container has a
|
|
36
|
+
* transform/filter). The theme (`data-og-theme`) and skin (`data-og-skin`) attributes
|
|
37
|
+
* are copied from the anchor element to preserve CSS-variable inheritance.
|
|
38
|
+
*/
|
|
12
39
|
export declare class ContextMenuManager {
|
|
13
40
|
private readonly _anchor;
|
|
14
41
|
private readonly _actions;
|
|
42
|
+
private readonly _t?;
|
|
15
43
|
private _el;
|
|
16
44
|
private _docClick;
|
|
17
45
|
private _docKey;
|
|
@@ -19,14 +47,31 @@ export declare class ContextMenuManager {
|
|
|
19
47
|
private _docMouseMove;
|
|
20
48
|
private _focusIdx;
|
|
21
49
|
/**
|
|
22
|
-
* @param _anchor
|
|
23
|
-
* @param _actions 기본 액션 핸들러
|
|
50
|
+
* @param _anchor - 그리드 컨테이너 엘리먼트 — CSS 변수 상속 기준점 / Grid container element — the reference point for CSS-variable inheritance
|
|
51
|
+
* @param _actions - 기본 액션 핸들러(OpenGrid에서 주입) / Default action handlers (injected by OpenGrid)
|
|
52
|
+
* @param _t - i18n 메시지 해석기(미주입 시 ko 기본 라벨) / i18n message resolver (falls back to ko default labels when absent)
|
|
53
|
+
*/
|
|
54
|
+
constructor(_anchor: HTMLElement, _actions: ContextMenuActions, _t?: ContextMenuT | undefined);
|
|
55
|
+
/**
|
|
56
|
+
* 지정 좌표에 컨텍스트 메뉴를 연다. / Open the context menu at the given coordinates.
|
|
57
|
+
*
|
|
58
|
+
* 이전 메뉴가 열려 있으면 먼저 닫는다. 항목을 지정하지 않으면 활성 로케일로
|
|
59
|
+
* 만든 기본 항목({@link DEFAULT_CONTEXT_ITEMS})을 사용한다.
|
|
60
|
+
* / Closes any previously open menu first. When no items are given, uses the
|
|
61
|
+
* default items ({@link DEFAULT_CONTEXT_ITEMS}) built in the active locale.
|
|
62
|
+
*
|
|
63
|
+
* @param e - 메뉴를 연 마우스 이벤트(좌표 기준) / Mouse event that opened the menu (used for positioning)
|
|
64
|
+
* @param customItems - 커스텀 메뉴 항목(생략 시 기본 항목) / Custom menu items (defaults when omitted)
|
|
24
65
|
*/
|
|
25
|
-
constructor(_anchor: HTMLElement, _actions: ContextMenuActions);
|
|
26
66
|
open(e: MouseEvent, customItems?: ContextMenuItem[]): void;
|
|
67
|
+
/** 열려 있는 메뉴를 닫고 관련 리스너를 모두 해제한다. / Close the open menu and detach all related listeners. */
|
|
27
68
|
close(): void;
|
|
69
|
+
/** 메뉴를 닫고 정리한다. / Close the menu and clean up. */
|
|
28
70
|
destroy(): void;
|
|
71
|
+
/** @internal 뷰포트 경계를 벗어나지 않도록 메뉴 위치를 계산해 배치한다. / Computes and applies the menu position, keeping it within viewport bounds. */
|
|
29
72
|
private _position;
|
|
73
|
+
/** @internal 활성 항목 사이에서 키보드 포커스를 이동한다. / Moves keyboard focus between enabled items. */
|
|
30
74
|
private _moveFocus;
|
|
75
|
+
/** @internal 항목의 함수 액션 또는 문자열 액션(→ ContextMenuActions)을 실행한다. / Runs an item's function action, or its string action (dispatched to ContextMenuActions). */
|
|
31
76
|
private _runAction;
|
|
32
77
|
}
|
|
@@ -14,57 +14,128 @@ import { GridOptions, OpenGridInstance, Position, GridDropEvent } from './types.
|
|
|
14
14
|
* `getPeerController(target)` 로 얻은 상대 컨트롤러의 동명 메서드로 수행한다 — `this`(source) 와
|
|
15
15
|
* peer(target) 로 갈라 원본의 `this._x` / `targetGrid._x` 접근을 1:1 재현한다(회귀 0).
|
|
16
16
|
* **3단계 drop emit 순서(before→후 이동→after→complete, 각 source→target)는 정확히 보존한다.**
|
|
17
|
+
* / Dependency contract that moves the cross-grid move/mapping/drop surface (`moveRowsTo`/
|
|
18
|
+
* `moveCheckedTo`/cross-transform resolution/the 3-phase drop event firing) out of the
|
|
19
|
+
* `OpenGrid` God object with **behavior unchanged** (R7, §3.1 C8, §6-R7). `OpenGrid` retains
|
|
20
|
+
* only thin delegating public methods (public API unchanged — the R0 `public_api_surface.txt`
|
|
21
|
+
* is frozen).
|
|
22
|
+
*
|
|
23
|
+
* Strangler principle (A2): `crossGridRegistry` (a process-scoped singleton in
|
|
24
|
+
* `CrossGridRegistry.ts`) is kept **AS-IS** for now — promoting it to an injected
|
|
25
|
+
* `GridRegistry` (C8, R-6c) is deferred to the R8 composition root.
|
|
26
|
+
*
|
|
27
|
+
* A cross-grid move involves **two grids** (source = `this`, target) at once. Since each
|
|
28
|
+
* `OpenGrid` owns its own `CrossGridController`, target-side operations (insert/rowCount/
|
|
29
|
+
* columns/3-phase firing) are carried out via the same-named methods on the peer controller
|
|
30
|
+
* obtained through `getPeerController(target)` — splitting into `this` (source) and `peer`
|
|
31
|
+
* (target) reproduces the original's `this._x` / `targetGrid._x` access 1:1 (zero regression).
|
|
32
|
+
* **The 3-phase drop emit order (before → move → after → complete, each source → target) is
|
|
33
|
+
* preserved exactly.**
|
|
17
34
|
*/
|
|
18
35
|
export interface CrossGridControllerDeps<T extends Record<string, any> = any> {
|
|
19
|
-
/** GridDropEvent 의 sourceGrid/targetGrid 식별자 + 자기동일성 비교에 쓰는 소유 그리드.
|
|
36
|
+
/** GridDropEvent 의 sourceGrid/targetGrid 식별자 + 자기동일성 비교에 쓰는 소유 그리드.
|
|
37
|
+
* / The owning grid, used both as the GridDropEvent's sourceGrid/targetGrid identifier and
|
|
38
|
+
* for self-identity comparison. */
|
|
20
39
|
getSelf: () => OpenGridInstance<T>;
|
|
21
40
|
getData: () => DataLayer<T>;
|
|
22
41
|
getColLayout: () => ColumnLayout<T>;
|
|
23
42
|
getOptions: () => Required<GridOptions<T>>;
|
|
24
|
-
/** EventEmitter fan(this.emit) — 'gridDropBefore/After/Complete'/'gridDropMapping'.
|
|
43
|
+
/** EventEmitter fan(this.emit) — 'gridDropBefore/After/Complete'/'gridDropMapping'.
|
|
44
|
+
* / EventEmitter fan-out (this.emit) for 'gridDropBefore/After/Complete'/'gridDropMapping'. */
|
|
25
45
|
emit: (event: string, payload?: any) => void;
|
|
26
|
-
/** 공개 insertRow 위임(MutationService 경유) — target 삽입에 쓰인다.
|
|
46
|
+
/** 공개 insertRow 위임(MutationService 경유) — target 삽입에 쓰인다.
|
|
47
|
+
* / Delegates to the public insertRow (via MutationService) — used for target-side insertion. */
|
|
27
48
|
insertRow: (item: Partial<T>, position?: Position) => void;
|
|
28
|
-
/** 공개 deleteRow 위임(MutationService 경유) — source 제거에 쓰인다.
|
|
49
|
+
/** 공개 deleteRow 위임(MutationService 경유) — source 제거에 쓰인다.
|
|
50
|
+
* / Delegates to the public deleteRow (via MutationService) — used for source-side removal. */
|
|
29
51
|
deleteRow: (rowIndex: number | number[]) => void;
|
|
30
|
-
/** rowMgr.getChecked() — moveCheckedTo. */
|
|
52
|
+
/** rowMgr.getChecked() — moveCheckedTo. / rowMgr.getChecked() — used by moveCheckedTo. */
|
|
31
53
|
getChecked: () => Array<{
|
|
32
54
|
rowIndex: number;
|
|
33
55
|
}>;
|
|
34
|
-
/** rowMgr.uncheckAll()(+재렌더) 공개 위임 — moveCheckedTo.
|
|
56
|
+
/** rowMgr.uncheckAll()(+재렌더) 공개 위임 — moveCheckedTo.
|
|
57
|
+
* / Delegates to the public rowMgr.uncheckAll() (+ re-render) — used by moveCheckedTo. */
|
|
35
58
|
uncheckAll: () => void;
|
|
36
|
-
/** 드래그 선택 집합 해석(_dragRowSet). OpenGrid 가 소유(RowDragDrop 배선과 공유).
|
|
59
|
+
/** 드래그 선택 집합 해석(_dragRowSet). OpenGrid 가 소유(RowDragDrop 배선과 공유).
|
|
60
|
+
* / Resolves the drag selection set (_dragRowSet). Owned by OpenGrid (shared with the
|
|
61
|
+
* RowDragDrop wiring). */
|
|
37
62
|
dragRowSet: (fromIndex: number) => number[];
|
|
38
|
-
/** 상대 그리드의 CrossGridController 획득(피어 연산 위임). 비 OpenGrid 대상은 undefined.
|
|
63
|
+
/** 상대 그리드의 CrossGridController 획득(피어 연산 위임). 비 OpenGrid 대상은 undefined.
|
|
64
|
+
* / Obtains the peer grid's CrossGridController for delegated peer operations. `undefined`
|
|
65
|
+
* for non-OpenGrid targets. */
|
|
39
66
|
getPeerController: (grid: OpenGridInstance<T>) => CrossGridController<T> | undefined;
|
|
40
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* 그리드↔그리드 이동·매핑·드롭 조정자. / Grid-to-grid move/mapping/drop coordinator.
|
|
70
|
+
*
|
|
71
|
+
* 드래그 또는 화살표 셔틀로 촉발되는 행 이동, 스키마가 다른 그리드 간 필드 매핑, 3단계
|
|
72
|
+
* drop 이벤트(before→after→complete) 발화를 담당한다(R7).
|
|
73
|
+
* / Handles row moves triggered by drag or the arrow-key shuttle, field mapping between
|
|
74
|
+
* grids with different schemas, and firing the 3-phase drop event (before→after→complete) (R7).
|
|
75
|
+
*/
|
|
41
76
|
export declare class CrossGridController<T extends Record<string, any> = any> {
|
|
42
77
|
private _deps;
|
|
43
78
|
constructor(deps: CrossGridControllerDeps<T>);
|
|
44
|
-
/** 이 그리드의 소유 인스턴스(GridDropEvent 식별자). */
|
|
79
|
+
/** 이 그리드의 소유 인스턴스(GridDropEvent 식별자). / This grid's owning instance (the GridDropEvent identifier). */
|
|
45
80
|
getSelf(): OpenGridInstance<T>;
|
|
46
81
|
private _rowCount;
|
|
47
82
|
private _insertRow;
|
|
48
83
|
private _visibleLeafInfos;
|
|
49
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* 드래그 드롭 어댑터 → 공개 moveRowsTo 로 위임. / Drag-drop adapter that delegates to the
|
|
86
|
+
* public moveRowsTo.
|
|
87
|
+
*
|
|
88
|
+
* @param fromIndex - 드래그 원본 행 인덱스 / Source row index of the drag
|
|
89
|
+
* @param targetBodyEl - 드롭 대상 그리드의 바디 엘리먼트(crossGridRegistry 조회 키) / Target grid's body element (lookup key into crossGridRegistry)
|
|
90
|
+
* @param targetIndex - 대상 그리드에서 삽입할 인덱스 / Insert index in the target grid
|
|
91
|
+
*/
|
|
50
92
|
handleCrossGridDrop(fromIndex: number, targetBodyEl: HTMLElement, targetIndex: number): void;
|
|
51
93
|
/**
|
|
52
94
|
* 이 그리드의 행들을 다른 그리드로 이동(move)한다. 드래그·화살표 셔틀 공통 경로.
|
|
53
95
|
* 3단계 이벤트(before→after→complete)와 crossGridMapping(필드 매핑)을 적용한다.
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
96
|
+
* / Move this grid's rows into another grid. The shared path for drag and the arrow-key
|
|
97
|
+
* shuttle. Applies the 3-phase event (before→after→complete) and crossGridMapping
|
|
98
|
+
* (field mapping).
|
|
99
|
+
*
|
|
100
|
+
* @param target - 대상 그리드 / The target grid
|
|
101
|
+
* @param sourceIndexes - 이동할 (표시)행 인덱스들 / (Displayed) row indexes to move
|
|
102
|
+
* @param targetIndex - 대상에서 삽입 위치 (생략 시 맨 끝에 추가) / Insert position in the target (omit to append at the end)
|
|
103
|
+
* @returns 이동 성공 true, 취소/무효 false / `true` if the move succeeded, `false` if cancelled/invalid
|
|
58
104
|
*/
|
|
59
105
|
moveRowsTo(target: OpenGridInstance<T>, sourceIndexes: number[], targetIndex?: number): Promise<boolean>;
|
|
60
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* 체크된 행을 다른 그리드로 이동 (화살표 셔틀용). 체크 없으면 무시.
|
|
108
|
+
* / Move checked rows into another grid (for the arrow-key shuttle). No-op if none are checked.
|
|
109
|
+
*
|
|
110
|
+
* @param target - 대상 그리드 / The target grid
|
|
111
|
+
* @returns 이동 성공 true, 취소/무효(체크 없음 포함) false / `true` if the move succeeded, `false` if cancelled/invalid (including no checked rows)
|
|
112
|
+
*/
|
|
61
113
|
moveCheckedTo(target: OpenGridInstance<T>): Promise<boolean>;
|
|
62
114
|
/**
|
|
63
115
|
* 크로스그리드 이동의 행 변환 함수를 결정한다.
|
|
64
116
|
* 반환: null=변환 불필요(그대로) / 함수=변환 적용 / false=매핑 모달 취소(이동 중단)
|
|
65
117
|
*/
|
|
66
118
|
private _resolveCrossTransform;
|
|
119
|
+
/**
|
|
120
|
+
* 이동 전 이벤트를 발화한다. 핸들러가 `false` 를 반환하거나 `e.cancel` 을 세우면 이동이 중단된다.
|
|
121
|
+
* / Fire the pre-move event. If a handler returns `false` or sets `e.cancel`, the move is aborted.
|
|
122
|
+
*
|
|
123
|
+
* @param e - drop 이벤트 페이로드 / The drop event payload
|
|
124
|
+
* @returns 핸들러의 반환값(취소 판단에 쓰임) / The handler's return value (used to decide cancellation)
|
|
125
|
+
*/
|
|
67
126
|
fireGridDropBefore(e: GridDropEvent<T>): boolean | void;
|
|
127
|
+
/**
|
|
128
|
+
* 이동 후(삽입/삭제 반영 후) 이벤트를 발화한다. / Fire the post-move event (after insert/delete
|
|
129
|
+
* have taken effect).
|
|
130
|
+
*
|
|
131
|
+
* @param e - drop 이벤트 페이로드 / The drop event payload
|
|
132
|
+
*/
|
|
68
133
|
fireGridDropAfter(e: GridDropEvent<T>): void;
|
|
134
|
+
/**
|
|
135
|
+
* 이동 완료(양쪽 재렌더까지 반영) 이벤트를 발화한다. / Fire the completion event (after both
|
|
136
|
+
* grids have re-rendered).
|
|
137
|
+
*
|
|
138
|
+
* @param e - drop 이벤트 페이로드 / The drop event payload
|
|
139
|
+
*/
|
|
69
140
|
fireGridDropComplete(e: GridDropEvent<T>): void;
|
|
70
141
|
}
|
|
@@ -1,12 +1,46 @@
|
|
|
1
1
|
import { OpenGrid } from './OpenGrid.js';
|
|
2
|
+
/**
|
|
3
|
+
* 크로스그리드 레지스트리. / Cross-grid registry.
|
|
4
|
+
*
|
|
5
|
+
* 그리드 바디(`.og-body-wrapper`) 엘리먼트를 그리드 인스턴스에 매핑한다.
|
|
6
|
+
* 그리드↔그리드 드래그(좌표 → 타깃 그리드)와 화살표 셔틀이 공유하는 전역 조회처다.
|
|
7
|
+
* / Maps each grid body (`.og-body-wrapper`) element to its grid instance. Shared by
|
|
8
|
+
* grid-to-grid drag (coordinate → target grid) and the arrow-key shuttle as the
|
|
9
|
+
* global lookup point.
|
|
10
|
+
*/
|
|
2
11
|
export declare class CrossGridRegistry {
|
|
3
12
|
private _map;
|
|
13
|
+
/**
|
|
14
|
+
* 바디 엘리먼트 → 그리드 매핑을 등록한다. / Register a body element → grid mapping.
|
|
15
|
+
*
|
|
16
|
+
* @param bodyEl - 그리드 바디 래퍼 엘리먼트 / The grid body wrapper element
|
|
17
|
+
* @param grid - 대응 그리드 인스턴스 / The corresponding grid instance
|
|
18
|
+
*/
|
|
4
19
|
register(bodyEl: HTMLElement, grid: OpenGrid<any>): void;
|
|
20
|
+
/**
|
|
21
|
+
* 등록을 해제한다. / Remove a registration.
|
|
22
|
+
*
|
|
23
|
+
* @param bodyEl - 해제할 바디 엘리먼트 / The body element to unregister
|
|
24
|
+
*/
|
|
5
25
|
unregister(bodyEl: HTMLElement): void;
|
|
26
|
+
/**
|
|
27
|
+
* 바디 엘리먼트로 그리드를 조회한다. / Look up a grid by its body element.
|
|
28
|
+
*
|
|
29
|
+
* @param bodyEl - 그리드 바디 래퍼 엘리먼트 / The grid body wrapper element
|
|
30
|
+
* @returns 매핑된 그리드, 없으면 `undefined` / The mapped grid, or `undefined`
|
|
31
|
+
*/
|
|
6
32
|
get(bodyEl: HTMLElement): OpenGrid<any> | undefined;
|
|
33
|
+
/** 등록된 그리드 수. / Number of registered grids. */
|
|
7
34
|
get size(): number;
|
|
8
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* 커서 좌표 아래의 다른(crossGrid 허용) 그리드를 반환한다. / Resolve another (crossGrid-enabled) grid under the cursor.
|
|
37
|
+
*
|
|
38
|
+
* @param clientX - 커서 X 좌표(뷰포트 기준) / Cursor X in viewport coordinates
|
|
39
|
+
* @param clientY - 커서 Y 좌표(뷰포트 기준) / Cursor Y in viewport coordinates
|
|
40
|
+
* @param exclude - 제외할 그리드(보통 드래그 원본) / Grid to exclude (usually the drag source)
|
|
41
|
+
* @returns 좌표 아래의 대상 그리드, 없으면 `null` / The target grid under the point, or `null`
|
|
42
|
+
*/
|
|
9
43
|
resolveAt(clientX: number, clientY: number, exclude: OpenGrid<any>): OpenGrid<any> | null;
|
|
10
44
|
}
|
|
11
|
-
/** 전역 단일
|
|
45
|
+
/** 전역 단일 레지스트리. / Global singleton registry. */
|
|
12
46
|
export declare const crossGridRegistry: CrossGridRegistry;
|