open-grid 1.2.0 → 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 +12 -0
- package/README.md +1 -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 +177 -266
- package/dist/types/core/CellEditManager.d.ts +73 -0
- package/dist/types/core/CellEventHandler.d.ts +99 -2
- package/dist/types/core/ChartManager.d.ts +51 -3
- package/dist/types/core/ContextMenu.d.ts +43 -2
- 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 +106 -15
- package/dist/types/core/ExportManager.d.ts +66 -1
- package/dist/types/core/ExtensionPointRegistry.d.ts +160 -14
- package/dist/types/core/FilterPanel.d.ts +17 -2
- package/dist/types/core/FilterSelect.d.ts +37 -13
- package/dist/types/core/FindBarManager.d.ts +26 -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 +139 -10
- package/dist/types/core/GridComposer.d.ts +54 -6
- 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 +88 -4
- package/dist/types/core/MaskingEngine.d.ts +10 -9
- package/dist/types/core/MutationService.d.ts +113 -10
- 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 +38 -4
- package/dist/types/core/RangeSelectionManager.d.ts +121 -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 +80 -1
- package/dist/types/core/TriggerManager.d.ts +46 -0
- package/dist/types/core/WorksheetManager.d.ts +61 -2
- package/dist/types/core/XmlConverter.d.ts +56 -23
- package/dist/types/core/chart/types.d.ts +107 -10
- package/dist/types/core/editors/CellEditor.d.ts +29 -2
- package/dist/types/core/formula/types.d.ts +71 -8
- package/dist/types/core/range/RangeQuery.d.ts +24 -2
- package/dist/types/core/renderers/CellRenderer.d.ts +100 -8
- package/dist/xlsx.min-BQ1o3sB6.cjs +11793 -0
- package/dist/{xlsx.min-Wavxcamn.js → xlsx.min-Bbz2ZypC.js} +453 -566
- package/package.json +2 -1
- package/dist/OpenGrid-B0Spm0rU.js +0 -10404
- package/dist/OpenGrid-CuXj0isp.cjs +0 -97
- package/dist/xlsx.min-Bx-LxWOf.cjs +0 -138
|
@@ -6,6 +6,11 @@ import { FlatRowModel } from './FlatRowModel.js';
|
|
|
6
6
|
import { GridOptions } from './types.js';
|
|
7
7
|
import { RangeStats } from './range/RangeQuery.js';
|
|
8
8
|
import { CellRange, Direction, FillMode, FillPreview } from './range/types.js';
|
|
9
|
+
/**
|
|
10
|
+
* RangeSelectionManager 가 OpenGrid 서브시스템을 읽고 쓰기 위해 주입받는 클로저 묶음.
|
|
11
|
+
* / Closures injected into RangeSelectionManager so it can read and write OpenGrid subsystem
|
|
12
|
+
* state without owning it directly.
|
|
13
|
+
*/
|
|
9
14
|
export interface RangeSelectionDeps<T extends Record<string, any>> {
|
|
10
15
|
getOptions: () => Required<GridOptions<T>>;
|
|
11
16
|
getData: () => DataLayer<T>;
|
|
@@ -13,15 +18,21 @@ export interface RangeSelectionDeps<T extends Record<string, any>> {
|
|
|
13
18
|
getFlatModel: () => FlatRowModel;
|
|
14
19
|
getRenderer: () => GridRenderer | null;
|
|
15
20
|
getEditMgr: () => CellEditManager<T>;
|
|
21
|
+
/** 포커스 셀을 이동. / Move the focused cell. */
|
|
16
22
|
setFocusCell: (ri: number, ci: number) => void;
|
|
23
|
+
/** 배치 경유 셀 쓰기(재렌더 ≤1회, C2.1). / Batched cell write (at most one re-render, C2.1). */
|
|
17
24
|
writeCells: (patches: Array<{
|
|
18
25
|
rowIndex: number;
|
|
19
26
|
field: string;
|
|
20
27
|
value: any;
|
|
21
28
|
}>) => number;
|
|
29
|
+
/** 셀의 화면 표시 텍스트(포맷 적용). / The cell's display text (formatted). */
|
|
22
30
|
getDisplayValue: (ri: number, field: string) => string;
|
|
31
|
+
/** 그리드 이벤트 발행. / Emit a grid event. */
|
|
23
32
|
emit: (event: string, ...args: any[]) => void;
|
|
33
|
+
/** 현재 가시 범위를 재렌더. / Re-render the currently visible range. */
|
|
24
34
|
doRender: () => void;
|
|
35
|
+
/** aria-live 영역에 메시지를 공지. / Announce a message via the aria-live region. */
|
|
25
36
|
announce: (msg: string) => void;
|
|
26
37
|
/** i18n: 범위 선택/채우기 announce·aria 해석. / i18n: resolve range selection/fill announce & aria. */
|
|
27
38
|
t: (key: string, params?: Record<string, string | number>) => string;
|
|
@@ -29,6 +40,17 @@ export interface RangeSelectionDeps<T extends Record<string, any>> {
|
|
|
29
40
|
offsetFormula?: (rowId: string, field: string, dRow: number, dCol: number) => string;
|
|
30
41
|
setCellFormulaByRowId?: (rowId: string, field: string, formula: string) => void;
|
|
31
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* F1 범위 선택 + 채우기 매니저. / F1 range selection + fill manager.
|
|
45
|
+
*
|
|
46
|
+
* 포인터 드래그·클릭·Shift+화살표로 셀 범위를 선택하고, 채우기 핸들 드래그/Ctrl+D·R 로 값·수식을
|
|
47
|
+
* 복제하며, 탭 구분 텍스트 복사/붙여넣기(TSV)까지 담당한다. 선택 모델 자체는 헤드리스
|
|
48
|
+
* `RangeModel`(core/range/*)이 소유하고, 이 클래스는 DOM 이벤트·오버레이 렌더·그리드 배선만
|
|
49
|
+
* 책임진다. / Handles cell-range selection via pointer drag, click, and Shift+Arrow; duplicates
|
|
50
|
+
* values/formulas via fill-handle drag or Ctrl+D/R; and drives tab-separated (TSV) copy/paste.
|
|
51
|
+
* The selection model itself is owned by the headless `RangeModel` (core/range/*); this class is
|
|
52
|
+
* responsible only for DOM events, overlay rendering, and grid wiring.
|
|
53
|
+
*/
|
|
32
54
|
export declare class RangeSelectionManager<T extends Record<string, any> = any> {
|
|
33
55
|
private _d;
|
|
34
56
|
private _model;
|
|
@@ -46,47 +68,139 @@ export declare class RangeSelectionManager<T extends Record<string, any> = any>
|
|
|
46
68
|
private _handleEl;
|
|
47
69
|
private _mountedWrap;
|
|
48
70
|
constructor(deps: RangeSelectionDeps<T>);
|
|
71
|
+
/** 범위 선택 기능이 켜져 있는지. / Whether range selection is enabled.
|
|
72
|
+
* @returns 켜져 있으면 true / True if enabled */
|
|
49
73
|
isEnabled(): boolean;
|
|
50
74
|
private _rangeOpts;
|
|
51
75
|
private _editorActive;
|
|
76
|
+
/** 현재 범위 선택이 있는지. / Whether there is an active range selection. */
|
|
52
77
|
hasSelection(): boolean;
|
|
78
|
+
/** 현재 선택된 모든 범위(multiRange 지원 시 다건). / All currently selected ranges (multiple when multiRange is enabled). */
|
|
53
79
|
getRangeSelection(): CellRange[];
|
|
80
|
+
/** 마지막(활성) 범위. 없으면 `null`. / The last (active) range, or `null` if none. */
|
|
54
81
|
getActiveRange(): CellRange | null;
|
|
82
|
+
/** 채우기 핸들 드래그 중인 미리보기 범위. 없으면 `null`. / The fill preview range while dragging the fill handle, or `null`. */
|
|
55
83
|
getFillPreview(): FillPreview | null;
|
|
84
|
+
/** 활성 범위의 셀 값들을 2차원 배열로 반환(범위 없으면 빈 배열).
|
|
85
|
+
* / Return the active range's cell values as a 2D array (empty array if no active range). */
|
|
56
86
|
getRangeValues(): any[][];
|
|
87
|
+
/** 활성 범위의 합계/평균 등 통계(범위 없으면 `null`).
|
|
88
|
+
* / Statistics (sum/average/etc.) for the active range, or `null` if none. */
|
|
57
89
|
getRangeStats(): RangeStats | null;
|
|
58
90
|
private _queryCtx;
|
|
91
|
+
/**
|
|
92
|
+
* 셀 위 마우스 다운 — 드래그 선택을 시작한다(UC-1). / Mouse-down on a cell — begins drag selection (UC-1).
|
|
93
|
+
*
|
|
94
|
+
* @param ri - 시작 행 인덱스 / Starting row index
|
|
95
|
+
* @param ci - 시작 열 인덱스 / Starting column index
|
|
96
|
+
* @param e - 원본 마우스 이벤트(Ctrl/Meta=추가선택, Shift=확장) / Original mouse event (Ctrl/Meta = additive, Shift = extend)
|
|
97
|
+
*/
|
|
59
98
|
handleCellMouseDown(ri: number, ci: number, e: MouseEvent): void;
|
|
99
|
+
/**
|
|
100
|
+
* 드래그 중 셀 위 마우스 이동 — 범위를 갱신하고 가장자리 근처면 자동 스크롤한다.
|
|
101
|
+
* / Mouse move over a cell while dragging — updates the range and auto-scrolls near edges.
|
|
102
|
+
*
|
|
103
|
+
* @param ri - 현재 행 인덱스 / Current row index
|
|
104
|
+
* @param ci - 현재 열 인덱스 / Current column index
|
|
105
|
+
* @param e - 원본 마우스 이벤트(자동 스크롤 거리 계산용) / Original mouse event (used to compute auto-scroll distance)
|
|
106
|
+
*/
|
|
60
107
|
handleCellMouseMove(ri: number, ci: number, e: MouseEvent): void;
|
|
108
|
+
/** 드래그 종료 — 자동 스크롤 정지 + 선택 확정 + 이벤트 발행. 셀 밖 mouseup(document 폴백)도 이 경로를 탄다.
|
|
109
|
+
* / End the drag — stops auto-scroll, finalizes the selection, and emits events. A mouseup
|
|
110
|
+
* outside any cell (document-level fallback) also flows through this path. */
|
|
61
111
|
handleCellMouseUp(_ri: number, _ci: number, _e: MouseEvent): void;
|
|
112
|
+
/**
|
|
113
|
+
* 셀 클릭 처리 — 일반 클릭은 단일 셀 선택, Shift+클릭은 활성 범위를 확장한다(UC-2).
|
|
114
|
+
* / Handle a cell click — a plain click selects a single cell; Shift+click extends the active range (UC-2).
|
|
115
|
+
*
|
|
116
|
+
* @param ri - 클릭된 행 인덱스 / Clicked row index
|
|
117
|
+
* @param ci - 클릭된 열 인덱스 / Clicked column index
|
|
118
|
+
* @param shiftKey - Shift 키가 눌려 있었는지 / Whether the Shift key was held
|
|
119
|
+
*/
|
|
62
120
|
handleClick(ri: number, ci: number, shiftKey: boolean): void;
|
|
121
|
+
/**
|
|
122
|
+
* Shift+화살표로 활성 범위를 방향으로 확장한다(UC-3). / Extend the active range in a direction via Shift+Arrow (UC-3).
|
|
123
|
+
*
|
|
124
|
+
* @param dir - 확장 방향 / Direction to extend
|
|
125
|
+
*/
|
|
63
126
|
extendFocus(dir: Direction): void;
|
|
127
|
+
/** 범위 선택을 해제한다(선택 없으면 no-op). / Clear the range selection (no-op if nothing is selected). */
|
|
64
128
|
clear(): void;
|
|
129
|
+
/** `clear()` 별칭(공개 API 명명 일관성). / Alias for `clear()` (public API naming consistency). */
|
|
65
130
|
clearRangeSelection(): void;
|
|
131
|
+
/**
|
|
132
|
+
* 범위 선택을 프로그램적으로 지정한다(§6.2 공개 API). / Programmatically set the range selection (§6.2 public API).
|
|
133
|
+
*
|
|
134
|
+
* @param range - 지정할 범위(배열이면 첫 요소만 사용) / Range to set (if an array, only the first element is used)
|
|
135
|
+
* @example
|
|
136
|
+
* grid.setRangeSelection({ startRow: 0, endRow: 2, startCol: 0, endCol: 1 });
|
|
137
|
+
*/
|
|
66
138
|
setRangeSelection(range: CellRange | CellRange[]): void;
|
|
67
|
-
/** applySort/applyFilter 직후 호출(C0.5, §2.5) — 선택은 rowId 집합 기준으로 재투영(해제 아님).
|
|
139
|
+
/** applySort/applyFilter 직후 호출(C0.5, §2.5) — 선택은 rowId 집합 기준으로 재투영(해제 아님).
|
|
140
|
+
* / Called right after applySort/applyFilter (C0.5, §2.5) — re-projects the selection by its
|
|
141
|
+
* rowId set instead of clearing it. */
|
|
68
142
|
reproject(): void;
|
|
69
143
|
private _afterModelChange;
|
|
70
144
|
private _announceSelection;
|
|
145
|
+
/**
|
|
146
|
+
* Ctrl+D(아래로 채우기)/Ctrl+R(오른쪽으로 채우기) 키보드 단축키(UR-5, §3.3).
|
|
147
|
+
* / Ctrl+D (fill down) / Ctrl+R (fill right) keyboard shortcuts (UR-5, §3.3).
|
|
148
|
+
*
|
|
149
|
+
* @param axis - 채우기 방향 / Fill direction
|
|
150
|
+
*/
|
|
71
151
|
ctrlFill(axis: 'down' | 'right'): void;
|
|
72
|
-
/** 공개 API(§6.2): source→target 채우기. axis 는 두 rect 의 상대 위치로 추론한다.
|
|
152
|
+
/** 공개 API(§6.2): source→target 채우기. axis 는 두 rect 의 상대 위치로 추론한다.
|
|
153
|
+
* / Public API (§6.2): fill from source to target. The axis is inferred from the two rects'
|
|
154
|
+
* relative position.
|
|
155
|
+
*
|
|
156
|
+
* @param source - 채우기 원본 범위 / Source range to fill from
|
|
157
|
+
* @param target - 채우기 대상 범위 / Target range to fill into
|
|
158
|
+
* @param mode - 채우기 모드(기본 'copy') / Fill mode (default 'copy')
|
|
159
|
+
* @example
|
|
160
|
+
* grid.fillRange(
|
|
161
|
+
* { startRow: 0, endRow: 0, startCol: 0, endCol: 0 },
|
|
162
|
+
* { startRow: 1, endRow: 3, startCol: 0, endCol: 0 },
|
|
163
|
+
* 'series',
|
|
164
|
+
* );
|
|
165
|
+
*/
|
|
73
166
|
fillRange(source: CellRange, target: CellRange, mode?: FillMode): void;
|
|
74
167
|
private _isEditable;
|
|
75
168
|
private _commitFill;
|
|
76
|
-
/** KeyboardManager._copyToClipboard 가 소비. 범위 없으면 null(호출측이 기존 경로로 폴백).
|
|
169
|
+
/** KeyboardManager._copyToClipboard 가 소비. 범위 없으면 null(호출측이 기존 경로로 폴백).
|
|
170
|
+
* / Consumed by KeyboardManager._copyToClipboard. Returns null when there is no active range
|
|
171
|
+
* (the caller falls back to its existing path).
|
|
172
|
+
*
|
|
173
|
+
* @returns 활성 범위의 TSV 텍스트, 없으면 `null` / TSV text for the active range, or `null`
|
|
174
|
+
*/
|
|
77
175
|
copyText(): string | null;
|
|
78
|
-
/** KeyboardManager._pasteFromClipboard 가 소비. true = 처리함(배치 경유), false = 범위 없음(폴백).
|
|
176
|
+
/** KeyboardManager._pasteFromClipboard 가 소비. true = 처리함(배치 경유), false = 범위 없음(폴백).
|
|
177
|
+
* / Consumed by KeyboardManager._pasteFromClipboard.
|
|
178
|
+
*
|
|
179
|
+
* @param text - 붙여넣을 TSV 텍스트 / TSV text to paste
|
|
180
|
+
* @returns 처리했으면 true(배치 경유), 활성 범위가 없으면 false(호출측 폴백)
|
|
181
|
+
* / True if handled (batched write); false if there is no active range (caller falls back)
|
|
182
|
+
*/
|
|
79
183
|
pasteText(text: string): boolean;
|
|
80
184
|
private _maybeAutoscroll;
|
|
81
185
|
private _scrollSpeed;
|
|
82
186
|
private _runAutoscroll;
|
|
83
187
|
private _stopAutoscroll;
|
|
84
|
-
/** bodyWrap 자식으로 오버레이 1회 생성(renderBody 파괴 회피, CON-3 해법).
|
|
188
|
+
/** bodyWrap 자식으로 오버레이 1회 생성(renderBody 파괴 회피, CON-3 해법).
|
|
189
|
+
* / Creates the overlay once as a child of bodyWrap (avoids renderBody teardown; the CON-3 fix).
|
|
190
|
+
*
|
|
191
|
+
* @param bodyWrap - 그리드 바디 래퍼 엘리먼트 / The grid body wrapper element
|
|
192
|
+
*/
|
|
85
193
|
mount(bodyWrap: HTMLElement): void;
|
|
86
|
-
/** _doRender 매 호출 뒤 실행(M-6 통합점) — 코너 셀 실측 → 연속 테두리/핸들/프리뷰 갱신(QA-2, CON-4).
|
|
194
|
+
/** _doRender 매 호출 뒤 실행(M-6 통합점) — 코너 셀 실측 → 연속 테두리/핸들/프리뷰 갱신(QA-2, CON-4).
|
|
195
|
+
* / Runs after every _doRender call (M-6 integration point) — measures the corner cells and
|
|
196
|
+
* updates the contiguous border/handle/preview overlay (QA-2, CON-4). */
|
|
87
197
|
repaint(): void;
|
|
88
198
|
private _hideOverlay;
|
|
89
|
-
/** OpenGrid._doRender 가 renderBody extraOpts 로 전달(M-6).
|
|
199
|
+
/** OpenGrid._doRender 가 renderBody extraOpts 로 전달(M-6).
|
|
200
|
+
* / Passed by OpenGrid._doRender as renderBody's extraOpts (M-6).
|
|
201
|
+
*
|
|
202
|
+
* @returns 현재 선택 범위들을 담은 렌더 옵션 조각 / A render-options fragment carrying the current selected ranges
|
|
203
|
+
*/
|
|
90
204
|
getOverlayExtraOpts(): {
|
|
91
205
|
_rangeRects: CellRange[];
|
|
92
206
|
};
|
|
@@ -22,6 +22,17 @@ import { GridOptions } from './types.js';
|
|
|
22
22
|
* 값(컬럼폭·옵션 등)은 늦은-null / 재할당(worksheet 전환 시 colLayout 교체)을 견디도록
|
|
23
23
|
* 전부 getter 클로저로 읽는다. `fallbackViewportHeight` 클램프 시맨틱과 RenderFrame 구성은
|
|
24
24
|
* 원본과 1:1 동일하다(회귀 0).
|
|
25
|
+
* / Dependency contract for the sole entry point of the render loop (R5, §3.1 C4, §6-R5),
|
|
26
|
+
* moving `_onResize`/`_recalcWidths`/`_renderHeader`/`_syncHeaderLayout`/`_doRender`/`_visRange`
|
|
27
|
+
* (plus the private helpers `_visCount`/`_paginationHeight`) out of the `OpenGrid` God object
|
|
28
|
+
* with **behavior unchanged**.
|
|
29
|
+
*
|
|
30
|
+
* Strangler principle (A2): collaborators (GridRenderer/VirtualScroll/Pagination, etc.) are
|
|
31
|
+
* still created and owned by `OpenGrid._mount`; they are only **injected** here via the
|
|
32
|
+
* `*Deps` closure-inversion pattern. Values (column widths, options, etc.) are all read
|
|
33
|
+
* through getter closures so they tolerate late-null / reassignment (colLayout swap on
|
|
34
|
+
* worksheet switch). The `fallbackViewportHeight` clamp semantics and RenderFrame construction
|
|
35
|
+
* are 1:1 identical to the original (zero regression).
|
|
25
36
|
*/
|
|
26
37
|
export interface RenderControllerDeps<T extends Record<string, any> = any> {
|
|
27
38
|
getContainer: () => HTMLElement;
|
|
@@ -35,6 +46,7 @@ export interface RenderControllerDeps<T extends Record<string, any> = any> {
|
|
|
35
46
|
getMergeEngine: () => MergeEngine;
|
|
36
47
|
getColWidths: () => number[];
|
|
37
48
|
setColWidths: (widths: number[]) => void;
|
|
49
|
+
/** 사용자가 직접 조절한 컬럼폭(리사이즈 시 보존 대상). / User-resized column widths (preserved across recalcWidths). */
|
|
38
50
|
getUserWidths: () => Map<string, number>;
|
|
39
51
|
getSfMgr: () => SortFilterManager<T>;
|
|
40
52
|
getRowMgr: () => RowManager<T>;
|
|
@@ -42,24 +54,68 @@ export interface RenderControllerDeps<T extends Record<string, any> = any> {
|
|
|
42
54
|
getGrpMgr: () => GroupTreeManager<T>;
|
|
43
55
|
getDetailMgr: () => DetailManager<T>;
|
|
44
56
|
getRangeMgr: () => RangeSelectionManager<T>;
|
|
57
|
+
/** F2: detail 렌더 컨텍스트 조립(비활성 시 undefined). / F2: build the detail render context (undefined when inactive). */
|
|
45
58
|
buildDetailRenderContext: () => DetailRenderContext | undefined;
|
|
59
|
+
/** 푸터 합계 영역 재렌더. / Re-render the footer summary area. */
|
|
46
60
|
renderFooterEl: () => void;
|
|
47
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* 렌더 루프의 유일 진입점. / Sole entry point of the render loop.
|
|
64
|
+
*
|
|
65
|
+
* 리사이즈·헤더/본문 렌더·뷰포트 높이 동기화·가시 범위 계산을 담당한다(R5).
|
|
66
|
+
* / Handles resize, header/body rendering, viewport-height sync, and visible-range
|
|
67
|
+
* computation (R5).
|
|
68
|
+
*/
|
|
48
69
|
export declare class RenderController<T extends Record<string, any> = any> {
|
|
49
70
|
private _deps;
|
|
50
71
|
private _autoHeightWarned;
|
|
51
72
|
constructor(deps: RenderControllerDeps<T>);
|
|
73
|
+
/** @internal */
|
|
52
74
|
private _paginationHeight;
|
|
75
|
+
/**
|
|
76
|
+
* 컨테이너 리사이즈에 반응해 폭 재계산 → 헤더 재렌더 → 본문 재렌더를 수행한다.
|
|
77
|
+
* / Responds to a container resize: recalculates widths, re-renders the header, then
|
|
78
|
+
* re-renders the body.
|
|
79
|
+
*/
|
|
53
80
|
onResize(): void;
|
|
81
|
+
/**
|
|
82
|
+
* 전체 폭에서 고정 UI 요소(state/드래그/행번호/체크 컬럼)를 뺀 뒤 컬럼폭을 재계산한다.
|
|
83
|
+
* 사용자가 직접 조절한 폭은 보존한다.
|
|
84
|
+
* / Recalculate column widths from the total width minus fixed UI elements (state/drag/
|
|
85
|
+
* row-number/check columns). User-resized widths are preserved.
|
|
86
|
+
*
|
|
87
|
+
* @param totalWidth - 컨테이너 전체 폭(px) / Total container width in px
|
|
88
|
+
*/
|
|
54
89
|
recalcWidths(totalWidth: number): void;
|
|
90
|
+
/**
|
|
91
|
+
* 헤더(컬럼 제목 행)를 다시 그린다. / Re-render the header (column title row).
|
|
92
|
+
*/
|
|
55
93
|
renderHeader(): void;
|
|
56
94
|
/**
|
|
57
95
|
* 렌더된 헤더의 실제 높이를 측정해 본문(bodyWrap) 높이와 뷰포트 높이에 반영한다.
|
|
58
96
|
* 줄바꿈이 없는 헤더는 측정 높이가 headerHeight 이하라 기존 고정 동작과 동일하다.
|
|
59
97
|
* (public: OpenGrid 가 `_syncHeaderLayout` 위임으로 노출 — 특성화 테스트가 직접 호출한다.)
|
|
98
|
+
* / Measures the rendered header's actual height and applies it to the body (bodyWrap)
|
|
99
|
+
* height and viewport height. Headers without wrapping measure at or below `headerHeight`,
|
|
100
|
+
* so existing fixed-height behavior is unchanged. (Public: `OpenGrid` exposes this via a
|
|
101
|
+
* `_syncHeaderLayout` delegate — characterization tests call it directly.)
|
|
60
102
|
*/
|
|
61
103
|
syncHeaderLayout(): void;
|
|
104
|
+
/**
|
|
105
|
+
* 지정 범위의 본문 행을 렌더한다(autoHeight 활성 시 범위 인자를 무시하고 전체 행을 렌더).
|
|
106
|
+
* / Render body rows within the given range (when autoHeight is active, the range
|
|
107
|
+
* arguments are ignored and all rows are rendered).
|
|
108
|
+
*
|
|
109
|
+
* @param startIndex - 렌더 시작 flat index / Starting flat index to render
|
|
110
|
+
* @param endIndex - 렌더 끝 flat index / Ending flat index to render
|
|
111
|
+
*/
|
|
62
112
|
doRender(startIndex: number, endIndex: number): void;
|
|
113
|
+
/**
|
|
114
|
+
* 현재 화면에 보이는 행 범위를 반환한다. / Return the currently visible row range.
|
|
115
|
+
*
|
|
116
|
+
* @returns `[시작, 끝]` flat index 쌍 / `[start, end]` flat index pair
|
|
117
|
+
*/
|
|
63
118
|
visRange(): [number, number];
|
|
119
|
+
/** @internal */
|
|
64
120
|
private _visCount;
|
|
65
121
|
}
|
|
@@ -1,29 +1,84 @@
|
|
|
1
1
|
import { DataLayer } from './DataLayer.js';
|
|
2
|
+
/**
|
|
3
|
+
* 행 선택(selection)과 체크(checkbox) 상태를 관리하는 매니저. / Manages row selection and checkbox state.
|
|
4
|
+
*
|
|
5
|
+
* 두 상태는 서로 독립적이다 — 선택은 활성/포커스 개념(단일 행만 유지 가능),
|
|
6
|
+
* 체크는 다중 표시(예: 체크박스 컬럼)를 위한 별도 집합이다.
|
|
7
|
+
* / The two states are independent — selection tracks an active/focus concept
|
|
8
|
+
* (can be limited to a single row), while checks are a separate set for
|
|
9
|
+
* multi-marking (e.g. a checkbox column).
|
|
10
|
+
*/
|
|
2
11
|
export declare class RowManager<T extends Record<string, any> = any> {
|
|
3
12
|
private _selectedRows;
|
|
4
13
|
private _checkedRows;
|
|
5
14
|
private _data;
|
|
6
15
|
constructor(data: DataLayer<T>);
|
|
16
|
+
/** 선택된 행 인덱스 집합(원본 참조). / Set of selected row indexes (live reference). */
|
|
7
17
|
get selectedRows(): Set<number>;
|
|
18
|
+
/** 체크된 행 인덱스 집합(원본 참조). / Set of checked row indexes (live reference). */
|
|
8
19
|
get checkedRows(): Set<number>;
|
|
20
|
+
/**
|
|
21
|
+
* 단일 행만 선택한다(기존 선택은 모두 해제). / Select exactly one row (clears any prior selection).
|
|
22
|
+
*
|
|
23
|
+
* @param ri - 선택할 행의 flat index / Flat index of the row to select
|
|
24
|
+
*/
|
|
9
25
|
selectSingle(ri: number): void;
|
|
26
|
+
/**
|
|
27
|
+
* 지정 행의 선택 상태를 토글한다(다중 선택 누적). / Toggle a row's selection state (accumulates for multi-select).
|
|
28
|
+
*
|
|
29
|
+
* @param ri - 토글할 행의 flat index / Flat index of the row to toggle
|
|
30
|
+
*/
|
|
10
31
|
selectToggle(ri: number): void;
|
|
32
|
+
/** 모든 행 선택을 해제한다. / Clear every row selection. */
|
|
11
33
|
clearSelection(): void;
|
|
34
|
+
/**
|
|
35
|
+
* 지정 행의 체크 상태를 설정한다. / Set the checked state of a single row.
|
|
36
|
+
*
|
|
37
|
+
* @param ri - 대상 행의 flat index / Flat index of the target row
|
|
38
|
+
* @param checked - 체크 여부 / Whether the row should be checked
|
|
39
|
+
*/
|
|
12
40
|
check(ri: number, checked: boolean): void;
|
|
41
|
+
/**
|
|
42
|
+
* 전체 행을 체크하거나 전체 해제한다. / Check or uncheck every row.
|
|
43
|
+
*
|
|
44
|
+
* @param checked - `true` 면 전체 체크, `false` 면 전체 해제 / `true` to check all, `false` to clear all
|
|
45
|
+
* @param totalRows - 전체 행 수(체크 시 0..totalRows-1 을 채움) / Total row count (when checking, fills indexes 0..totalRows-1)
|
|
46
|
+
*/
|
|
13
47
|
checkAll(checked: boolean, totalRows: number): void;
|
|
48
|
+
/**
|
|
49
|
+
* 특정 컬럼 값이 주어진 목록에 포함된 행들을 체크한다. / Check every row whose column value is in the given list.
|
|
50
|
+
*
|
|
51
|
+
* @param field - 값을 비교할 컬럼 field 명 / Column field to compare values against
|
|
52
|
+
* @param values - 매칭 대상 값 목록 / Values to match against
|
|
53
|
+
*/
|
|
14
54
|
checkByValue(field: string, values: any[]): void;
|
|
55
|
+
/** 모든 체크를 해제한다. / Clear every checked row. */
|
|
15
56
|
uncheckAll(): void;
|
|
57
|
+
/** @internal 미구현 스텁(rowId 기반 체크 API 예약). / @internal Unimplemented stub (reserved for a rowId-based check API). */
|
|
16
58
|
checkById(_ids: string[]): void;
|
|
59
|
+
/** @internal 미구현 스텁(rowId 기반 체크 추가 API 예약). / @internal Unimplemented stub (reserved for a rowId-based add-check API). */
|
|
17
60
|
addCheckById(_ids: string[]): void;
|
|
61
|
+
/** @internal 미구현 스텁(rowId 기반 체크 해제 API 예약). / @internal Unimplemented stub (reserved for a rowId-based uncheck API). */
|
|
18
62
|
uncheckById(_ids: string[]): void;
|
|
63
|
+
/** 현재 선택된 행 데이터 배열을 반환한다(존재하지 않는 인덱스는 제외). / Return the currently selected row data (indexes with no backing row are skipped). */
|
|
19
64
|
getSelections(): T[];
|
|
65
|
+
/** 체크된 행을 `{ row, rowIndex }` 쌍의 배열로 반환한다. / Return checked rows as an array of `{ row, rowIndex }` pairs. */
|
|
20
66
|
getChecked(): Array<{
|
|
21
67
|
row: T;
|
|
22
68
|
rowIndex: number;
|
|
23
69
|
}>;
|
|
70
|
+
/** 체크된 행의 데이터만 배열로 반환한다. / Return only the row data of checked rows. */
|
|
24
71
|
getAllChecked(): T[];
|
|
72
|
+
/** 활성(선택) 행의 인덱스를 반환한다(없으면 -1). / Return the active (selected) row's index, or -1 if none. */
|
|
25
73
|
getActiveRow(): number;
|
|
74
|
+
/**
|
|
75
|
+
* 지정 행을 활성 상태로 만든다(단일 선택과 동일 동작). / Make the given row active (same effect as single-select).
|
|
76
|
+
*
|
|
77
|
+
* @param index - 활성화할 행의 flat index / Flat index of the row to activate
|
|
78
|
+
*/
|
|
26
79
|
activate(index: number): void;
|
|
80
|
+
/** 선택을 해제한다(활성 행 없음). / Deselect (no active row). */
|
|
27
81
|
deselect(): void;
|
|
82
|
+
/** 선택·체크 상태를 모두 초기화한다(주로 `setData`/`clearData` 시 호출). / Reset both selection and check state (typically called on `setData`/`clearData`). */
|
|
28
83
|
reset(): void;
|
|
29
84
|
}
|
|
@@ -1,53 +1,89 @@
|
|
|
1
1
|
import { SkinTokenDelta } from './types.js';
|
|
2
|
+
/** 스킨 정의 결과. / Result of a skin definition. */
|
|
2
3
|
export interface SkinDefineResult {
|
|
3
|
-
/** 실제 등록된(가드레일 클램프가 반영된) 델타. */
|
|
4
|
+
/** 실제 등록된(가드레일 클램프가 반영된) 델타. / The actually registered delta (with guardrail clamps applied). */
|
|
4
5
|
readonly delta: SkinTokenDelta;
|
|
5
|
-
/** 접근성 가드레일이 조정한 토큰 경고(있으면 콘솔에도 출력). */
|
|
6
|
+
/** 접근성 가드레일이 조정한 토큰 경고(있으면 콘솔에도 출력). / Warnings for tokens adjusted by accessibility guardrails (also logged to console when present). */
|
|
6
7
|
readonly warnings: string[];
|
|
7
8
|
}
|
|
8
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* 스킨 델타가 색 리터럴을 담고 있는지 검사하고, 위반 시 던진다(FORM-only, Rule 2).
|
|
11
|
+
* / Assert a skin delta carries no color literal; throws on violation (FORM-only, Rule 2).
|
|
12
|
+
*
|
|
13
|
+
* @param id - 스킨 id / Skin id
|
|
14
|
+
* @param delta - 검사할 토큰 델타 / Token delta to validate
|
|
15
|
+
* @throws FORM 토큰이 아니거나 색 리터럴이 있으면 Error / Throws if a non-FORM token or a color literal is present
|
|
16
|
+
*/
|
|
9
17
|
export declare function assertFormOnly(id: string, delta: SkinTokenDelta): void;
|
|
10
18
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
19
|
+
* 접근성 가드레일(불변식) 적용 — 정의 시점 클램프(§6.4).
|
|
20
|
+
* / Apply accessibility guardrails (invariants) — clamp at definition time (§6.4).
|
|
21
|
+
*
|
|
22
|
+
* - focus-width < 2px → 2px 로 클램프(가시 포커스 비협상). / clamp to 2px (visible focus is non-negotiable).
|
|
13
23
|
* - focus-style: none → solid.
|
|
24
|
+
*
|
|
14
25
|
* 반환은 조정된 델타 + 경고 목록(silent override 아님 — 무엇을 클램프했는지 알린다).
|
|
26
|
+
* / Returns the adjusted delta plus a warning list (not a silent override — it reports what was clamped).
|
|
27
|
+
*
|
|
28
|
+
* @param id - 스킨 id / Skin id
|
|
29
|
+
* @param delta - 조정할 토큰 델타 / Token delta to adjust
|
|
30
|
+
* @returns 조정된 델타 + 경고 목록 / Adjusted delta plus warnings
|
|
15
31
|
*/
|
|
16
32
|
export declare function applyGuardrails(id: string, delta: SkinTokenDelta): SkinDefineResult;
|
|
17
33
|
/**
|
|
18
34
|
* 프로세스 전역 스킨 등록소. defineSkin(사용자) 는 검증+가드레일+`<style>` 주입,
|
|
19
35
|
* registerBuiltin(내장) 은 검증+가드레일만(CSS 는 skins.css 정적 번들 소유).
|
|
36
|
+
* / Process-global skin registry. `define` (user) does validation + guardrails + `<style>` injection;
|
|
37
|
+
* `registerBuiltin` (built-in) does validation + guardrails only (CSS is owned by the skins.css static bundle).
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* skinRegistry.define('my-skin', { '--og-radius-md': '10px', '--og-border-style': 'solid' });
|
|
20
41
|
*/
|
|
21
42
|
export declare class SkinRegistry {
|
|
22
43
|
private _skins;
|
|
23
44
|
private _styleEl;
|
|
24
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* 내장 스킨 등록(주입 없음 — CSS 는 skins.css 가 전달). 검증/가드레일은 동일 적용.
|
|
47
|
+
* / Register a built-in skin (no injection — CSS is delivered by skins.css). Validation/guardrails still apply.
|
|
48
|
+
*
|
|
49
|
+
* @param id - 스킨 id / Skin id
|
|
50
|
+
* @param delta - FORM 토큰 델타 / FORM token delta
|
|
51
|
+
*/
|
|
25
52
|
registerBuiltin(id: string, delta: SkinTokenDelta): void;
|
|
26
53
|
/**
|
|
27
54
|
* 사용자 스킨 등록. FORM-only 검증 + 가드레일 클램프 후 런타임 `<style>` 로
|
|
28
55
|
* `.og-container[data-og-skin="id"]` 블록을 주입(브라우저 환경). 반환은 조정 결과.
|
|
56
|
+
* / Register a user skin. After FORM-only validation and guardrail clamps, injects a
|
|
57
|
+
* `.og-container[data-og-skin="id"]` block via a runtime `<style>` (browser env). Returns the adjusted result.
|
|
58
|
+
*
|
|
59
|
+
* @param id - 스킨 id / Skin id
|
|
60
|
+
* @param delta - FORM 토큰 델타 / FORM token delta
|
|
61
|
+
* @returns 조정된 델타 + 경고 목록 / Adjusted delta plus warnings
|
|
29
62
|
*/
|
|
30
63
|
define(id: string, delta: SkinTokenDelta): SkinDefineResult;
|
|
64
|
+
/** 스킨 id 등록 여부. / Whether a skin id is registered. */
|
|
31
65
|
has(id: string): boolean;
|
|
66
|
+
/** 등록된 스킨 델타 조회(없으면 undefined). / Get a registered skin delta (undefined if absent). */
|
|
32
67
|
get(id: string): SkinTokenDelta | undefined;
|
|
33
|
-
/** 등록된 모든 스킨 id(내장 + 사용자). */
|
|
68
|
+
/** 등록된 모든 스킨 id(내장 + 사용자). / All registered skin ids (built-in + user). */
|
|
34
69
|
list(): string[];
|
|
35
70
|
/** 런타임 `<style>` 주입(테스트/SSR 등 document 없으면 no-op). 같은 태그를 누적 사용. */
|
|
36
71
|
private _inject;
|
|
37
72
|
}
|
|
38
|
-
/** Sharp/Gothic — 엔터프라이즈 고밀도·각짐(§3.1).
|
|
73
|
+
/** Sharp/Gothic — 엔터프라이즈 고밀도·각짐(§3.1). / Sharp/Gothic — enterprise high-density, squared corners (§3.1). */
|
|
39
74
|
export declare const SKIN_SHARP: SkinTokenDelta;
|
|
40
|
-
/** Rounded — 소비자 SaaS 소프트(§3.2).
|
|
75
|
+
/** Rounded — 소비자 SaaS 소프트(§3.2). / Rounded — consumer-SaaS soft look (§3.2). */
|
|
41
76
|
export declare const SKIN_ROUNDED: SkinTokenDelta;
|
|
42
|
-
/** Stitch — 핸드크래프트(§3.3).
|
|
77
|
+
/** Stitch — 핸드크래프트(§3.3). 색(리넨/자수)은 theme 축. / Stitch — handcrafted look (§3.3); color (linen/embroidery) lives on the theme axis. */
|
|
43
78
|
export declare const SKIN_STITCH: SkinTokenDelta;
|
|
44
|
-
/** Flat/Minimal — 플랫 2.0(§3.5).
|
|
79
|
+
/** Flat/Minimal — 플랫 2.0(§3.5). / Flat/Minimal — flat 2.0 (§3.5). */
|
|
45
80
|
export declare const SKIN_FLAT: SkinTokenDelta;
|
|
46
|
-
/** High-Contrast — 접근성 우선·레퍼런스(§3.6).
|
|
81
|
+
/** High-Contrast — 접근성 우선·레퍼런스(§3.6). / High-Contrast — accessibility-first reference skin (§3.6). */
|
|
47
82
|
export declare const SKIN_HIGH_CONTRAST: SkinTokenDelta;
|
|
48
|
-
/** Material/Elevated —
|
|
83
|
+
/** Material/Elevated — 중간 반경 + 정직한 그림자 엘리베이션. / Material/Elevated — medium radius plus honest shadow elevation. */
|
|
49
84
|
export declare const SKIN_MATERIAL: SkinTokenDelta;
|
|
50
|
-
/** 내장 스킨 카탈로그(
|
|
85
|
+
/** 내장 스킨 카탈로그(확정 6종). id → 델타. / Built-in skin catalog (6 finalized skins). id → delta. */
|
|
51
86
|
export declare const BUILTIN_SKINS: ReadonlyArray<readonly [string, SkinTokenDelta]>;
|
|
52
|
-
/** 프로세스 전역 기본 레지스트리 — 내장 스킨을 부트스트랩 등록(주입 없음, CSS=skins.css).
|
|
87
|
+
/** 프로세스 전역 기본 레지스트리 — 내장 스킨을 부트스트랩 등록(주입 없음, CSS=skins.css).
|
|
88
|
+
* / Process-global default registry — bootstraps the built-in skins (no injection; CSS=skins.css). */
|
|
53
89
|
export declare const skinRegistry: SkinRegistry;
|
|
@@ -3,37 +3,116 @@ import { ColumnLayout } from './ColumnLayout.js';
|
|
|
3
3
|
import { VirtualScroll } from './VirtualScroll.js';
|
|
4
4
|
import { Pagination } from './Pagination.js';
|
|
5
5
|
import { SortItem, FilterItem } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* {@link SortFilterManager} 의존성 주입 계약. / Dependency-injection contract for {@link SortFilterManager}.
|
|
8
|
+
*
|
|
9
|
+
* 호스트 그리드가 데이터/렌더/i18n 접근을 함수로 넘겨 매니저를 데이터 소스와 분리한다.
|
|
10
|
+
* / The host grid passes data/render/i18n access as functions, decoupling the manager
|
|
11
|
+
* from its data source.
|
|
12
|
+
*/
|
|
6
13
|
export interface SortFilterDeps<T extends Record<string, any>> {
|
|
14
|
+
/** 현재 데이터 레이어 조회. / Look up the current data layer. */
|
|
7
15
|
getData: () => DataLayer<T>;
|
|
16
|
+
/** 현재 컬럼 레이아웃 조회. / Look up the current column layout. */
|
|
8
17
|
getColLayout: () => ColumnLayout<T>;
|
|
18
|
+
/** 통합검색(find) 필터 문자열 조회. / Look up the current find-filter string. */
|
|
9
19
|
getFindFilter: () => string;
|
|
20
|
+
/** 가상 스크롤 인스턴스 조회(없으면 `null`). / Look up the virtual-scroll instance (or `null`). */
|
|
10
21
|
getVs: () => VirtualScroll | null;
|
|
22
|
+
/** 페이지네이션 인스턴스 조회(없으면 `null`). / Look up the pagination instance (or `null`). */
|
|
11
23
|
getPagination: () => Pagination | null;
|
|
24
|
+
/** 현재 그리드 옵션 조회. / Look up the current grid options. */
|
|
12
25
|
getOptions: () => any;
|
|
26
|
+
/** 헤더(정렬/필터 표시)를 다시 그린다. / Re-render the header (sort/filter indicators). */
|
|
13
27
|
renderHeader: () => void;
|
|
28
|
+
/** 바디를 다시 그린다. / Re-render the body. */
|
|
14
29
|
doRender: () => void;
|
|
30
|
+
/** 스크린리더용 상태 안내. / Announce a status message for screen readers. */
|
|
15
31
|
announce: (msg: string) => void;
|
|
16
32
|
/** i18n: 정렬 상태어 + announce 해석. / i18n: resolve sort state words + announce. */
|
|
17
33
|
t: (key: string, params?: Record<string, string | number>) => string;
|
|
34
|
+
/** 그리드 이벤트를 발행한다. / Emit a grid event. */
|
|
18
35
|
emit: (event: string, ...args: any[]) => void;
|
|
19
|
-
/** C0.5/§2.5: 정렬/필터 후 F1 범위 선택을 rowId 집합 기준으로 재투영(해제 아님).
|
|
36
|
+
/** C0.5/§2.5: 정렬/필터 후 F1 범위 선택을 rowId 집합 기준으로 재투영(해제 아님).
|
|
37
|
+
* / C0.5/§2.5: after sort/filter, re-project the F1 range selection by its rowId
|
|
38
|
+
* set instead of clearing it. */
|
|
20
39
|
onReproject?: () => void;
|
|
21
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* 정렬·필터 상태와 적용을 담당하는 매니저. / Manages sort/filter state and their application.
|
|
43
|
+
*
|
|
44
|
+
* 정렬 목록(`SortItem[]`)과 컬럼별 필터(`FilterItem[]`)를 소유하고, 데이터 레이어에
|
|
45
|
+
* 적용한 뒤 헤더/바디 재렌더와 관련 이벤트 발행까지 처리한다.
|
|
46
|
+
* / Owns the sort list (`SortItem[]`) and per-column filters (`FilterItem[]`), applies
|
|
47
|
+
* them to the data layer, and drives header/body re-render plus related event emission.
|
|
48
|
+
*/
|
|
22
49
|
export declare class SortFilterManager<T extends Record<string, any> = any> {
|
|
23
50
|
private _sortList;
|
|
24
51
|
private _filters;
|
|
25
52
|
private _d;
|
|
26
53
|
constructor(deps: SortFilterDeps<T>);
|
|
54
|
+
/** 현재 정렬 목록(원본 참조). / Current sort list (live reference). */
|
|
27
55
|
get sortList(): SortItem[];
|
|
56
|
+
/** 컬럼 field 별 필터 목록(원본 참조). / Filter items keyed by column field (live reference). */
|
|
28
57
|
get filters(): Record<string, FilterItem[]>;
|
|
58
|
+
/**
|
|
59
|
+
* 헤더 정렬 클릭을 처리한다(단일/다중 정렬 토글). / Handle a header sort click (toggles single/multi sort).
|
|
60
|
+
*
|
|
61
|
+
* 같은 필드를 다시 클릭하면 asc→desc→해제 순으로 순환한다. `shiftKey` 와
|
|
62
|
+
* `multiSort` 옵션이 모두 켜져야 다중 정렬 목록에 누적된다.
|
|
63
|
+
* / Re-clicking the same field cycles asc → desc → removed. Multi-sort only
|
|
64
|
+
* accumulates when both `shiftKey` and the `multiSort` option are on.
|
|
65
|
+
*
|
|
66
|
+
* @param field - 정렬 대상 컬럼 field 명 / Column field to sort by
|
|
67
|
+
* @param shiftKey - 다중 정렬 결합 키(Shift) 눌림 여부 / Whether the multi-sort modifier (Shift) was held
|
|
68
|
+
*/
|
|
29
69
|
handleSortClick(field: string, shiftKey: boolean): void;
|
|
70
|
+
/**
|
|
71
|
+
* 프로그램적으로 정렬을 설정한다(단일 필드+방향, 또는 전체 정렬 목록). / Set sort programmatically (single field+direction, or a full sort list).
|
|
72
|
+
*
|
|
73
|
+
* @param fieldOrList - 정렬할 필드명, 또는 대체할 전체 `SortItem[]` / Field to sort by, or a full `SortItem[]` to replace the current list
|
|
74
|
+
* @param dir - `fieldOrList` 가 문자열일 때의 정렬 방향(기본 `'asc'`) / Sort direction when `fieldOrList` is a string (default `'asc'`)
|
|
75
|
+
* @example
|
|
76
|
+
* mgr.sort('name', 'desc');
|
|
77
|
+
* mgr.sort([{ field: 'age', dir: 'asc' }]);
|
|
78
|
+
*/
|
|
30
79
|
sort(fieldOrList: string | SortItem[], dir?: 'asc' | 'desc'): void;
|
|
80
|
+
/** 모든 정렬을 해제한다. / Clear all sorting. */
|
|
31
81
|
resetSort(): void;
|
|
82
|
+
/**
|
|
83
|
+
* 초기 정렬 목록을 조용히 적용한다(렌더/이벤트 없이 데이터만). / Silently seed the initial sort list (data only, no render/events).
|
|
84
|
+
*
|
|
85
|
+
* @param sortList - 초기화 시 적용할 정렬 목록 / Sort list to apply at initialization
|
|
86
|
+
*/
|
|
32
87
|
initSort(sortList: SortItem[]): void;
|
|
88
|
+
/** 현재 정렬 목록의 복사본을 반환한다. / Return a copy of the current sort list. */
|
|
33
89
|
getSortState(): SortItem[];
|
|
90
|
+
/**
|
|
91
|
+
* 특정 컬럼의 필터를 설정하고 적용한다. / Set and apply the filter for one column.
|
|
92
|
+
*
|
|
93
|
+
* @param field - 필터를 적용할 컬럼 field 명 / Column field to filter
|
|
94
|
+
* @param filterItems - 적용할 필터 조건 목록 / Filter conditions to apply
|
|
95
|
+
*/
|
|
34
96
|
setFilter(field: string, filterItems: FilterItem[]): void;
|
|
97
|
+
/**
|
|
98
|
+
* 필터를 해제한다(필드 지정 시 해당 필드만, 생략 시 전체). / Clear filters (one field if given, otherwise all).
|
|
99
|
+
*
|
|
100
|
+
* @param field - 해제할 컬럼 field 명. 생략하면 전체 필터 해제 / Column field to clear; omit to clear every filter
|
|
101
|
+
*/
|
|
35
102
|
resetFilter(field?: string): void;
|
|
103
|
+
/** 현재 컬럼별 필터 상태의 복사본을 반환한다. / Return a copy of the current per-column filter state. */
|
|
36
104
|
getFilterState(): Record<string, FilterItem[]>;
|
|
105
|
+
/**
|
|
106
|
+
* 저장된 필터 상태를 복원하고 재적용한다(헤더/바디 재렌더는 호출측 책임). / Restore a saved filter state and reapply it (caller is responsible for header/body re-render).
|
|
107
|
+
*
|
|
108
|
+
* @param state - 복원할 컬럼별 필터 상태 / Per-column filter state to restore
|
|
109
|
+
*/
|
|
37
110
|
restoreFilter(state: Record<string, FilterItem[]>): void;
|
|
111
|
+
/**
|
|
112
|
+
* 통합검색 + 컬럼 필터를 데이터 레이어에 적용하고 행수를 재투영한다. / Apply find-filter and column filters to the data layer, then re-project row counts.
|
|
113
|
+
*
|
|
114
|
+
* 정렬과 달리 이 메서드는 헤더/바디를 직접 재렌더하지 않는다(호출측이 필요 시 처리).
|
|
115
|
+
* / Unlike sorting, this does not re-render header/body itself (callers handle that as needed).
|
|
116
|
+
*/
|
|
38
117
|
applyFilters(): void;
|
|
39
118
|
}
|