open-grid 1.3.0 → 1.4.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 +40 -0
- package/README.ja.md +462 -0
- package/README.md +52 -18
- package/README.zh.md +455 -0
- package/dist/{OpenGrid-B7m7ei7f.cjs → OpenGrid-BOtTt5aI.cjs} +2 -2
- package/dist/{OpenGrid-CeUdO_fM.js → OpenGrid-sI_vdHQw.js} +2 -2
- package/dist/Registry-CPJYOqCn.js +74 -0
- package/dist/Registry-D74ZmdDz.cjs +71 -0
- package/dist/index-B3fKi43v.js +481 -0
- package/dist/{index-JjfWY3Bt.cjs → index-D1l3XFCM.cjs} +92 -160
- 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 +31 -31
- package/dist/open-grid.js +86 -82
- package/dist/types/core/FilterSelect.d.ts +290 -33
- package/dist/types/core/GridShuttle.d.ts +177 -25
- package/dist/types/core/IconRegistry.d.ts +263 -37
- package/dist/types/core/OpenGrid.d.ts +2815 -373
- package/dist/types/core/OrgChart.d.ts +269 -31
- package/dist/types/core/SkinRegistry.d.ts +341 -43
- package/dist/types/core/XmlConverter.d.ts +424 -43
- package/dist/types/core/chart/types.d.ts +1076 -113
- package/dist/types/core/extension/Registry.d.ts +389 -51
- package/dist/types/core/extension/reserved.d.ts +34 -5
- package/dist/types/core/i18n/LocaleRegistry.d.ts +0 -0
- package/dist/types/core/i18n/types.d.ts +660 -78
- package/dist/types/core/types.d.ts +3791 -373
- package/dist/types/index.d.ts +226 -17
- package/package.json +3 -1
- package/dist/index-DrCPRuYi.js +0 -548
|
@@ -1,107 +1,686 @@
|
|
|
1
1
|
import { PartialLocaleMessages, LocaleMessageKey, MessageValue } from './i18n/types.js';
|
|
2
2
|
import { FormulaErrorCode } from './formula/types.js';
|
|
3
3
|
import { RangeStats as _RangeStats } from './range/RangeQuery.js';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* 컬럼이 담는 값의 종류. 이 값 하나로 그리드가 "어떻게 정렬하고, 기본 렌더러로 무엇을 쓰고,
|
|
6
|
+
* 편집기를 무엇으로 열지"를 결정합니다. 지정하지 않으면 문자열처럼 다룹니다.
|
|
7
|
+
*
|
|
8
|
+
* - `'string'` : 일반 텍스트.
|
|
9
|
+
* - `'number'` : 숫자(오른쪽 정렬·숫자 비교·천단위 포맷).
|
|
10
|
+
* - `'date'` : 날짜(달력 편집기·날짜 비교).
|
|
11
|
+
* - `'boolean'` : 참/거짓(체크박스 표시).
|
|
12
|
+
* - `'select'` : 목록에서 하나 선택(드롭다운 편집기).
|
|
13
|
+
* - `'radio'` : 같은 그룹 안에서 하나 선택.
|
|
14
|
+
* - `'img'` : 셀 값을 이미지 주소로 보고 그림 표시.
|
|
15
|
+
* - `'html'` : HTML 문자열을 그대로 렌더(기본 sanitize).
|
|
16
|
+
* - `'barcode'` : 값을 바코드 그래픽으로 표시.
|
|
17
|
+
*
|
|
18
|
+
* What kind of value a column holds. This single choice drives how the grid sorts, which
|
|
19
|
+
* default renderer it uses, and which editor it opens. Unset behaves like a string.
|
|
20
|
+
*
|
|
21
|
+
* - `'string'` : Plain text.
|
|
22
|
+
* - `'number'` : Number (right-aligned, numeric compare, thousand separators).
|
|
23
|
+
* - `'date'` : Date (calendar editor, date compare).
|
|
24
|
+
* - `'boolean'` : True/false (rendered as a checkbox).
|
|
25
|
+
* - `'select'` : Single choice from a list (dropdown editor).
|
|
26
|
+
* - `'radio'` : Single choice within a radio group.
|
|
27
|
+
* - `'img'` : Treat the value as an image URL and show it.
|
|
28
|
+
* - `'html'` : Render an HTML string (sanitized by default).
|
|
29
|
+
* - `'barcode'` : Show the value as a barcode graphic.
|
|
30
|
+
*
|
|
31
|
+
* 列が保持する値の種類。この一つの値で、グリッドが「どのようにソートし、既定のレンダラーに何を使い、
|
|
32
|
+
* どのエディターを開くか」を決めます。指定しない場合は文字列のように扱います。
|
|
33
|
+
*
|
|
34
|
+
* - `'string'` : 通常のテキスト。
|
|
35
|
+
* - `'number'` : 数値(右揃え・数値比較・桁区切り)。
|
|
36
|
+
* - `'date'` : 日付(カレンダーエディター・日付比較)。
|
|
37
|
+
* - `'boolean'` : 真偽(チェックボックスで表示)。
|
|
38
|
+
* - `'select'` : 一覧から一つ選択(ドロップダウンエディター)。
|
|
39
|
+
* - `'radio'` : 同じグループ内で一つ選択。
|
|
40
|
+
* - `'img'` : セルの値を画像アドレスとみなして画像を表示。
|
|
41
|
+
* - `'html'` : HTML文字列をそのままレンダー(既定でsanitize)。
|
|
42
|
+
* - `'barcode'` : 値をバーコード画像として表示。
|
|
43
|
+
*
|
|
44
|
+
* 列所保存的值的种类。这一个设置决定表格如何排序、使用哪个默认渲染器、打开哪个编辑器。
|
|
45
|
+
* 不指定时按字符串处理。
|
|
46
|
+
*
|
|
47
|
+
* - `'string'` : 普通文本。
|
|
48
|
+
* - `'number'` : 数值(右对齐、按数值比较、千位分隔)。
|
|
49
|
+
* - `'date'` : 日期(日历编辑器、按日期比较)。
|
|
50
|
+
* - `'boolean'` : 真/假(显示为复选框)。
|
|
51
|
+
* - `'select'` : 从列表中单选(下拉编辑器)。
|
|
52
|
+
* - `'radio'` : 在同一组内单选。
|
|
53
|
+
* - `'img'` : 把单元格的值视为图片地址并显示图片。
|
|
54
|
+
* - `'html'` : 直接渲染 HTML 字符串(默认 sanitize)。
|
|
55
|
+
* - `'barcode'` : 把值显示为条形码图形。
|
|
56
|
+
*/
|
|
5
57
|
export type DataType = 'string' | 'number' | 'date' | 'boolean' | 'select' | 'radio' | 'img' | 'html' | 'barcode';
|
|
6
58
|
export type { MaskType, MaskDef } from './MaskingEngine.js';
|
|
7
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* 사용자가 클릭·드래그로 무엇을 선택할 수 있는지 정하는 모드.
|
|
61
|
+
*
|
|
62
|
+
* - `'single'` : 한 번에 한 행만.
|
|
63
|
+
* - `'row'` : 행 단위 선택(다중 가능은 UI에 따름).
|
|
64
|
+
* - `'multiple'` : 여러 행을 함께(Ctrl/Shift).
|
|
65
|
+
* - `'cells'` : 스프레드시트처럼 셀 사각형 범위를 선택(채우기 핸들 포함).
|
|
66
|
+
*
|
|
67
|
+
* What the user can select by clicking or dragging.
|
|
68
|
+
*
|
|
69
|
+
* - `'single'` : One row at a time.
|
|
70
|
+
* - `'row'` : Row-level selection (whether multiple is allowed depends on the UI).
|
|
71
|
+
* - `'multiple'` : Multiple rows together (Ctrl/Shift).
|
|
72
|
+
* - `'cells'` : Spreadsheet-style rectangular cell range (with fill handle).
|
|
73
|
+
*
|
|
74
|
+
* ユーザーがクリック・ドラッグで何を選択できるかを決めるモード。
|
|
75
|
+
*
|
|
76
|
+
* - `'single'` : 一度に一行のみ。
|
|
77
|
+
* - `'row'` : 行単位の選択(複数可否はUIに従う)。
|
|
78
|
+
* - `'multiple'` : 複数行をまとめて(Ctrl/Shift)。
|
|
79
|
+
* - `'cells'` : スプレッドシートのようにセルの矩形範囲を選択(フィルハンドルを含む)。
|
|
80
|
+
*
|
|
81
|
+
* 决定用户通过点击或拖动能选择什么。
|
|
82
|
+
*
|
|
83
|
+
* - `'single'` : 一次只选一行。
|
|
84
|
+
* - `'row'` : 按行选择(能否多选取决于 UI)。
|
|
85
|
+
* - `'multiple'` : 同时选择多行(Ctrl/Shift)。
|
|
86
|
+
* - `'cells'` : 像电子表格那样选择单元格的矩形区域(含填充手柄)。
|
|
87
|
+
*/
|
|
8
88
|
export type SelectionMode = 'single' | 'row' | 'multiple' | 'cells';
|
|
9
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* 정렬 방향. `'asc'` 오름차순(작은 값 먼저), `'desc'` 내림차순(큰 값 먼저).
|
|
91
|
+
*
|
|
92
|
+
* Sort direction: 'asc' ascending (smallest first), 'desc' descending (largest first).
|
|
93
|
+
*
|
|
94
|
+
* ソート方向。`'asc'` は昇順(小さい値が先)、`'desc'` は降順(大きい値が先)。
|
|
95
|
+
*
|
|
96
|
+
* 排序方向。`'asc'` 升序(小的值在前),`'desc'` 降序(大的值在前)。
|
|
97
|
+
*/
|
|
10
98
|
export type SortDir = 'asc' | 'desc';
|
|
11
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* 새 항목을 어디에 끼워 넣을지. 키워드로 상대 위치를 주거나, 숫자로 정확한 인덱스를 줍니다.
|
|
101
|
+
*
|
|
102
|
+
* - `'first'` : 맨 앞.
|
|
103
|
+
* - `'last'` : 맨 뒤.
|
|
104
|
+
* - `'before'` : 기준 위치 바로 앞.
|
|
105
|
+
* - `'after'` : 기준 위치 바로 뒤.
|
|
106
|
+
* - `number` : 해당 인덱스 자리.
|
|
107
|
+
*
|
|
108
|
+
* Where to insert a new item — a keyword for a relative spot, or a number for an exact index.
|
|
109
|
+
*
|
|
110
|
+
* - `'first'` : At the very front.
|
|
111
|
+
* - `'last'` : At the very end.
|
|
112
|
+
* - `'before'` : Just before the reference position.
|
|
113
|
+
* - `'after'` : Just after the reference position.
|
|
114
|
+
* - `number` : At that exact index.
|
|
115
|
+
*
|
|
116
|
+
* 新しい項目をどこに挿入するか。キーワードで相対位置を与えるか、数値で正確なインデックスを与えます。
|
|
117
|
+
*
|
|
118
|
+
* - `'first'` : 先頭。
|
|
119
|
+
* - `'last'` : 末尾。
|
|
120
|
+
* - `'before'` : 基準位置のすぐ前。
|
|
121
|
+
* - `'after'` : 基準位置のすぐ後ろ。
|
|
122
|
+
* - `number` : そのインデックスの位置。
|
|
123
|
+
*
|
|
124
|
+
* 新项目插入到哪里 —— 用关键字给出相对位置,或用数字给出精确的索引。
|
|
125
|
+
*
|
|
126
|
+
* - `'first'` : 最前面。
|
|
127
|
+
* - `'last'` : 最后面。
|
|
128
|
+
* - `'before'` : 基准位置的正前方。
|
|
129
|
+
* - `'after'` : 基准位置的正后方。
|
|
130
|
+
* - `number` : 该索引所在的位置。
|
|
131
|
+
*/
|
|
12
132
|
export type Position = 'first' | 'last' | 'before' | 'after' | number;
|
|
13
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* 내장 셀 렌더러 타입 이름.
|
|
135
|
+
*
|
|
136
|
+
* Built-in cell renderer type name.
|
|
137
|
+
*
|
|
138
|
+
* 組み込みセルレンダラーのタイプ名。
|
|
139
|
+
*
|
|
140
|
+
* 内置单元格渲染器的类型名。
|
|
141
|
+
*/
|
|
14
142
|
export type RendererType = 'text' | 'number' | 'date' | 'checkbox' | 'button' | 'link' | 'image' | 'icon' | 'switch' | 'sparkline' | 'template' | 'custom' | 'badge' | 'progress' | 'rating' | 'radio' | 'img' | 'html' | 'barcode';
|
|
15
|
-
/**
|
|
143
|
+
/**
|
|
144
|
+
* 내장 셀 에디터 타입 이름.
|
|
145
|
+
*
|
|
146
|
+
* Built-in cell editor type name.
|
|
147
|
+
*
|
|
148
|
+
* 組み込みセルエディターのタイプ名。
|
|
149
|
+
*
|
|
150
|
+
* 内置单元格编辑器的类型名。
|
|
151
|
+
*/
|
|
16
152
|
export type EditorType = 'text' | 'number' | 'date' | 'select' | 'checkbox' | 'custom';
|
|
17
153
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
154
|
+
* 사용자가 셀을 마우스로 조작할 때(클릭·더블클릭·마우스 올림 등) 그 핸들러로 전달되는 정보 묶음입니다.
|
|
155
|
+
* "어느 행·어느 컬럼의 어떤 값이, 어떤 DOM 요소에서, 원래 어떤 브라우저 이벤트로" 일어났는지를
|
|
156
|
+
* 한 번에 담아 주므로 핸들러 안에서 좌표를 다시 계산할 필요가 없습니다.
|
|
157
|
+
*
|
|
158
|
+
* The payload handed to your handler when the user manipulates a cell with the mouse
|
|
159
|
+
* (click / dbl-click / mouse-over …). It bundles which row & column, what value, which DOM
|
|
160
|
+
* element, and the original browser event — so your handler never has to recompute coordinates.
|
|
161
|
+
*
|
|
162
|
+
* ユーザーがセルをマウスで操作したとき(クリック・ダブルクリック・マウスオーバーなど)に、そのハンドラーへ
|
|
163
|
+
* 渡される情報のまとまりです。「どの行・どの列のどの値が、どのDOM要素で、もともとどのブラウザイベントで」
|
|
164
|
+
* 起きたのかを一度に収めているので、ハンドラーの中で座標を計算し直す必要はありません。
|
|
165
|
+
*
|
|
166
|
+
* 관련 옵션: onCellClick, onCellDblClick, onCellMouseOver …
|
|
167
|
+
*
|
|
168
|
+
* Related options: onCellClick, onCellDblClick, onCellMouseOver …
|
|
169
|
+
*
|
|
170
|
+
* 関連オプション: onCellClick, onCellDblClick, onCellMouseOver …
|
|
171
|
+
*
|
|
172
|
+
* 用户用鼠标操作单元格时(点击、双击、鼠标移入等),传给处理函数的一组信息。它一次性打包了
|
|
173
|
+
* 哪一行哪一列、什么值、哪个 DOM 元素,以及原始的浏览器事件 —— 处理函数内无需重新计算坐标。
|
|
20
174
|
*
|
|
21
|
-
*
|
|
175
|
+
* 相关选项: onCellClick, onCellDblClick, onCellMouseOver …
|
|
176
|
+
*
|
|
177
|
+
* @typeParam T - 행 데이터 타입
|
|
178
|
+
*
|
|
179
|
+
* Row data type
|
|
180
|
+
*
|
|
181
|
+
* 行データの型
|
|
182
|
+
*
|
|
183
|
+
* 行数据的类型
|
|
22
184
|
*/
|
|
23
185
|
export interface CellEvent<T = any> {
|
|
186
|
+
/**
|
|
187
|
+
* 이벤트 이름('cellClick' 등).
|
|
188
|
+
*
|
|
189
|
+
* The event name (e.g. 'cellClick').
|
|
190
|
+
*
|
|
191
|
+
* イベント名('cellClick' など)。
|
|
192
|
+
*
|
|
193
|
+
* 事件名(如 'cellClick')。
|
|
194
|
+
*/
|
|
24
195
|
type: string;
|
|
196
|
+
/**
|
|
197
|
+
* 대상 행의 화면 표시 순서 인덱스.
|
|
198
|
+
*
|
|
199
|
+
* Screen-order index of the target row.
|
|
200
|
+
*
|
|
201
|
+
* 対象行の画面表示順のインデックス。
|
|
202
|
+
*
|
|
203
|
+
* 目标行按屏幕显示顺序的索引。
|
|
204
|
+
*/
|
|
25
205
|
rowIndex: number;
|
|
206
|
+
/**
|
|
207
|
+
* 대상 컬럼의 인덱스.
|
|
208
|
+
*
|
|
209
|
+
* Index of the target column.
|
|
210
|
+
*
|
|
211
|
+
* 対象列のインデックス。
|
|
212
|
+
*
|
|
213
|
+
* 目标列的索引。
|
|
214
|
+
*/
|
|
26
215
|
columnIndex: number;
|
|
216
|
+
/**
|
|
217
|
+
* 대상 컬럼의 field 이름.
|
|
218
|
+
*
|
|
219
|
+
* field name of the target column.
|
|
220
|
+
*
|
|
221
|
+
* 対象列の field 名。
|
|
222
|
+
*
|
|
223
|
+
* 目标列的 field 名。
|
|
224
|
+
*/
|
|
27
225
|
field: string;
|
|
226
|
+
/**
|
|
227
|
+
* 그 셀의 원시 값.
|
|
228
|
+
*
|
|
229
|
+
* Raw value of that cell.
|
|
230
|
+
*
|
|
231
|
+
* そのセルの生の値。
|
|
232
|
+
*
|
|
233
|
+
* 该单元格的原始值。
|
|
234
|
+
*/
|
|
28
235
|
value: any;
|
|
236
|
+
/**
|
|
237
|
+
* 그 행의 데이터 객체 전체.
|
|
238
|
+
*
|
|
239
|
+
* The full row-data object.
|
|
240
|
+
*
|
|
241
|
+
* その行のデータオブジェクト全体。
|
|
242
|
+
*
|
|
243
|
+
* 该行完整的数据对象。
|
|
244
|
+
*/
|
|
29
245
|
row: T;
|
|
246
|
+
/**
|
|
247
|
+
* 그 컬럼의 정의.
|
|
248
|
+
*
|
|
249
|
+
* The column's definition.
|
|
250
|
+
*
|
|
251
|
+
* その列の定義。
|
|
252
|
+
*
|
|
253
|
+
* 该列的定义。
|
|
254
|
+
*/
|
|
30
255
|
column: ColumnDef<T>;
|
|
256
|
+
/**
|
|
257
|
+
* 실제 클릭된 셀 DOM 요소.
|
|
258
|
+
*
|
|
259
|
+
* The actual clicked cell DOM element.
|
|
260
|
+
*
|
|
261
|
+
* 実際にクリックされたセルのDOM要素。
|
|
262
|
+
*
|
|
263
|
+
* 实际被点击的单元格 DOM 元素。
|
|
264
|
+
*/
|
|
31
265
|
target: HTMLElement;
|
|
266
|
+
/**
|
|
267
|
+
* 브라우저 원본 마우스 이벤트(좌표·수식어 키 등).
|
|
268
|
+
*
|
|
269
|
+
* The underlying browser mouse event (coords, modifier keys …).
|
|
270
|
+
*
|
|
271
|
+
* ブラウザ本来のマウスイベント(座標・修飾キーなど)。
|
|
272
|
+
*
|
|
273
|
+
* 浏览器原始的鼠标事件(坐标、修饰键等)。
|
|
274
|
+
*/
|
|
32
275
|
originalEvent: MouseEvent;
|
|
33
276
|
}
|
|
34
277
|
/**
|
|
35
|
-
* 셀 편집
|
|
36
|
-
*
|
|
278
|
+
* 셀 값 편집의 흐름(편집 시작 → 커밋 직전 → 편집 끝) 각 지점에서 핸들러로 오는 정보입니다.
|
|
279
|
+
* 편집 전 값(oldValue)과 편집 후 값(newValue)을 함께 주므로, 값이 실제로 바뀌었는지 비교하거나
|
|
280
|
+
* 커밋 직전 훅에서 검증 후 되돌릴 수 있습니다.
|
|
281
|
+
*
|
|
282
|
+
* Delivered at each point in a cell edit (start → just-before-commit → end). It carries both the
|
|
283
|
+
* value before (oldValue) and after (newValue) so you can compare, or validate and veto the commit.
|
|
284
|
+
*
|
|
285
|
+
* セル値の編集の流れ(編集開始 → コミット直前 → 編集終了)の各地点でハンドラーに届く情報です。
|
|
286
|
+
* 編集前の値(oldValue)と編集後の値(newValue)を一緒に渡すので、値が実際に変わったかを比較したり、
|
|
287
|
+
* コミット直前のフックで検証してから元に戻したりできます。
|
|
288
|
+
*
|
|
289
|
+
* 관련 옵션: onEditStart, onEditBefore, onEditEnd
|
|
290
|
+
*
|
|
291
|
+
* Related options: onEditStart, onEditBefore, onEditEnd
|
|
292
|
+
*
|
|
293
|
+
* 関連オプション: onEditStart, onEditBefore, onEditEnd
|
|
294
|
+
*
|
|
295
|
+
* 在单元格编辑的各个节点(编辑开始 → 提交之前 → 编辑结束)送到处理函数的信息。它同时带上编辑前的值
|
|
296
|
+
* (oldValue)和编辑后的值(newValue),因此可以比较值是否真的变了,也可以在提交前的钩子里校验并撤回。
|
|
297
|
+
*
|
|
298
|
+
* 相关选项: onEditStart, onEditBefore, onEditEnd
|
|
37
299
|
*
|
|
38
|
-
* @typeParam T - 행 데이터 타입
|
|
300
|
+
* @typeParam T - 행 데이터 타입
|
|
301
|
+
*
|
|
302
|
+
* Row data type
|
|
303
|
+
*
|
|
304
|
+
* 行データの型
|
|
305
|
+
*
|
|
306
|
+
* 行数据的类型
|
|
39
307
|
*/
|
|
40
308
|
export interface EditEvent<T = any> {
|
|
309
|
+
/**
|
|
310
|
+
* 이벤트 이름('editStart'/'editEnd'/'editBefore').
|
|
311
|
+
*
|
|
312
|
+
* The event name.
|
|
313
|
+
*
|
|
314
|
+
* イベント名('editStart'/'editEnd'/'editBefore')。
|
|
315
|
+
*
|
|
316
|
+
* 事件名('editStart'/'editEnd'/'editBefore')。
|
|
317
|
+
*/
|
|
41
318
|
type: string;
|
|
319
|
+
/**
|
|
320
|
+
* 편집 중인 행의 화면 표시 순서 인덱스.
|
|
321
|
+
*
|
|
322
|
+
* Screen-order index of the row being edited.
|
|
323
|
+
*
|
|
324
|
+
* 編集中の行の画面表示順のインデックス。
|
|
325
|
+
*
|
|
326
|
+
* 正在编辑的行按屏幕显示顺序的索引。
|
|
327
|
+
*/
|
|
42
328
|
rowIndex: number;
|
|
329
|
+
/**
|
|
330
|
+
* 편집 중인 컬럼의 인덱스.
|
|
331
|
+
*
|
|
332
|
+
* Index of the column being edited.
|
|
333
|
+
*
|
|
334
|
+
* 編集中の列のインデックス。
|
|
335
|
+
*
|
|
336
|
+
* 正在编辑的列的索引。
|
|
337
|
+
*/
|
|
43
338
|
columnIndex: number;
|
|
339
|
+
/**
|
|
340
|
+
* 편집 중인 컬럼의 field 이름.
|
|
341
|
+
*
|
|
342
|
+
* field name of the column being edited.
|
|
343
|
+
*
|
|
344
|
+
* 編集中の列の field 名。
|
|
345
|
+
*
|
|
346
|
+
* 正在编辑的列的 field 名。
|
|
347
|
+
*/
|
|
44
348
|
field: string;
|
|
349
|
+
/**
|
|
350
|
+
* 편집 전 값.
|
|
351
|
+
*
|
|
352
|
+
* Value before the edit.
|
|
353
|
+
*
|
|
354
|
+
* 編集前の値。
|
|
355
|
+
*
|
|
356
|
+
* 编辑前的值。
|
|
357
|
+
*/
|
|
45
358
|
oldValue: any;
|
|
359
|
+
/**
|
|
360
|
+
* 편집 후 들어온 값.
|
|
361
|
+
*
|
|
362
|
+
* Value after the edit.
|
|
363
|
+
*
|
|
364
|
+
* 編集後に入ってきた値。
|
|
365
|
+
*
|
|
366
|
+
* 编辑后传入的值。
|
|
367
|
+
*/
|
|
46
368
|
newValue: any;
|
|
369
|
+
/**
|
|
370
|
+
* 편집 중인 행의 데이터 객체.
|
|
371
|
+
*
|
|
372
|
+
* The row-data object being edited.
|
|
373
|
+
*
|
|
374
|
+
* 編集中の行のデータオブジェクト。
|
|
375
|
+
*
|
|
376
|
+
* 正在编辑的行的数据对象。
|
|
377
|
+
*/
|
|
47
378
|
row: T;
|
|
379
|
+
/**
|
|
380
|
+
* 편집 중인 컬럼의 정의.
|
|
381
|
+
*
|
|
382
|
+
* The column's definition.
|
|
383
|
+
*
|
|
384
|
+
* 編集中の列の定義。
|
|
385
|
+
*
|
|
386
|
+
* 正在编辑的列的定义。
|
|
387
|
+
*/
|
|
48
388
|
column: ColumnDef<T>;
|
|
49
|
-
/**
|
|
389
|
+
/**
|
|
390
|
+
* 편집 커밋 직전(onEditBefore)에 true 로 바꾸면 그 편집을 무효화합니다.
|
|
391
|
+
*
|
|
392
|
+
* In the pre-commit hook (onEditBefore), set true to reject the edit.
|
|
393
|
+
*
|
|
394
|
+
* 編集コミット直前(onEditBefore)で true にすると、その編集を無効にします。
|
|
395
|
+
*
|
|
396
|
+
* 在提交编辑之前(onEditBefore)改为 true,即可作废这次编辑。
|
|
397
|
+
*/
|
|
50
398
|
cancel?: boolean;
|
|
51
399
|
}
|
|
52
400
|
/**
|
|
53
|
-
* 행
|
|
54
|
-
*
|
|
401
|
+
* 셀이 아니라 "행 전체"를 마우스로 조작했을 때(행 클릭·더블클릭·마우스 올림 등) 오는 정보입니다.
|
|
402
|
+
* 컬럼 정보 없이 어느 행인지와 그 행 데이터만 필요할 때 CellEvent 보다 가볍게 씁니다.
|
|
403
|
+
*
|
|
404
|
+
* Delivered when the user manipulates a whole row (row click / dbl-click / mouse-over …). Lighter
|
|
405
|
+
* than CellEvent for when you only need which row and its data, not the column.
|
|
406
|
+
*
|
|
407
|
+
* セルではなく「行全体」をマウスで操作したとき(行のクリック・ダブルクリック・マウスオーバーなど)に届く
|
|
408
|
+
* 情報です。列の情報なしに、どの行かとその行データだけが必要なときに、CellEvent より軽く使えます。
|
|
409
|
+
*
|
|
410
|
+
* 관련 옵션: onRowClick, onRowDblClick, onRowMouseOver …
|
|
411
|
+
*
|
|
412
|
+
* Related options: onRowClick, onRowDblClick, onRowMouseOver …
|
|
413
|
+
*
|
|
414
|
+
* 関連オプション: onRowClick, onRowDblClick, onRowMouseOver …
|
|
415
|
+
*
|
|
416
|
+
* 用户用鼠标操作的不是单元格而是「整行」时(行点击、双击、鼠标移入等)送达的信息。当只需要知道是哪一行
|
|
417
|
+
* 及其行数据、不需要列信息时,它比 CellEvent 更轻。
|
|
418
|
+
*
|
|
419
|
+
* 相关选项: onRowClick, onRowDblClick, onRowMouseOver …
|
|
420
|
+
*
|
|
421
|
+
* @typeParam T - 행 데이터 타입
|
|
55
422
|
*
|
|
56
|
-
*
|
|
423
|
+
* Row data type
|
|
424
|
+
*
|
|
425
|
+
* 行データの型
|
|
426
|
+
*
|
|
427
|
+
* 行数据的类型
|
|
57
428
|
*/
|
|
58
429
|
export interface RowEvent<T = any> {
|
|
430
|
+
/**
|
|
431
|
+
* 이벤트 이름('rowClick' 등).
|
|
432
|
+
*
|
|
433
|
+
* The event name (e.g. 'rowClick').
|
|
434
|
+
*
|
|
435
|
+
* イベント名('rowClick' など)。
|
|
436
|
+
*
|
|
437
|
+
* 事件名(如 'rowClick')。
|
|
438
|
+
*/
|
|
59
439
|
type: string;
|
|
440
|
+
/**
|
|
441
|
+
* 대상 행의 화면 표시 순서 인덱스.
|
|
442
|
+
*
|
|
443
|
+
* Screen-order index of the target row.
|
|
444
|
+
*
|
|
445
|
+
* 対象行の画面表示順のインデックス。
|
|
446
|
+
*
|
|
447
|
+
* 目标行按屏幕显示顺序的索引。
|
|
448
|
+
*/
|
|
60
449
|
rowIndex: number;
|
|
450
|
+
/**
|
|
451
|
+
* 그 행의 데이터 객체 전체.
|
|
452
|
+
*
|
|
453
|
+
* The full row-data object.
|
|
454
|
+
*
|
|
455
|
+
* その行のデータオブジェクト全体。
|
|
456
|
+
*
|
|
457
|
+
* 该行完整的数据对象。
|
|
458
|
+
*/
|
|
61
459
|
row: T;
|
|
460
|
+
/**
|
|
461
|
+
* 이벤트가 일어난 행 DOM 요소.
|
|
462
|
+
*
|
|
463
|
+
* The row DOM element where the event occurred.
|
|
464
|
+
*
|
|
465
|
+
* イベントが起きた行のDOM要素。
|
|
466
|
+
*
|
|
467
|
+
* 事件发生所在的行 DOM 元素。
|
|
468
|
+
*/
|
|
62
469
|
target: HTMLElement;
|
|
470
|
+
/**
|
|
471
|
+
* 브라우저 원본 마우스 이벤트.
|
|
472
|
+
*
|
|
473
|
+
* The underlying browser mouse event.
|
|
474
|
+
*
|
|
475
|
+
* ブラウザ本来のマウスイベント。
|
|
476
|
+
*
|
|
477
|
+
* 浏览器原始的鼠标事件。
|
|
478
|
+
*/
|
|
63
479
|
originalEvent: MouseEvent;
|
|
64
480
|
}
|
|
65
481
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
482
|
+
* 셀에 포커스가 있는 상태에서 키를 눌렀을 때(키 다운·업·프레스) 오는 정보입니다. CellEvent 가 담는
|
|
483
|
+
* 행·컬럼·값에 더해, 눌린 키 이름(key)을 함께 주므로 Enter 이동·Delete 지우기 같은 단축키를 직접 구현할 수 있습니다.
|
|
484
|
+
*
|
|
485
|
+
* Delivered when a key is pressed while a cell has focus (keydown/keyup/keypress). On top of the
|
|
486
|
+
* row/column/value that CellEvent carries, it adds the pressed `key` name so you can build
|
|
487
|
+
* shortcuts like Enter-to-move or Delete-to-clear.
|
|
488
|
+
*
|
|
489
|
+
* セルにフォーカスがある状態でキーを押したとき(キーダウン・アップ・プレス)に届く情報です。CellEvent が
|
|
490
|
+
* 収める行・列・値に加えて、押されたキー名(key)も一緒に渡すので、Enterで移動・Deleteで消去といった
|
|
491
|
+
* ショートカットを自分で実装できます。
|
|
492
|
+
*
|
|
493
|
+
* 관련 옵션: onCellKeyDown, onCellKeyUp, onCellKeyPress
|
|
494
|
+
*
|
|
495
|
+
* Related options: onCellKeyDown, onCellKeyUp, onCellKeyPress
|
|
496
|
+
*
|
|
497
|
+
* 関連オプション: onCellKeyDown, onCellKeyUp, onCellKeyPress
|
|
68
498
|
*
|
|
69
|
-
*
|
|
499
|
+
* 单元格处于聚焦状态时按下按键(keydown/keyup/keypress)送达的信息。除了 CellEvent 带的行、列、值之外,
|
|
500
|
+
* 它还给出按下的键名(key),因此可以自行实现 Enter 移动、Delete 清除这类快捷键。
|
|
501
|
+
*
|
|
502
|
+
* 相关选项: onCellKeyDown, onCellKeyUp, onCellKeyPress
|
|
503
|
+
*
|
|
504
|
+
* @typeParam T - 행 데이터 타입
|
|
505
|
+
*
|
|
506
|
+
* Row data type
|
|
507
|
+
*
|
|
508
|
+
* 行データの型
|
|
509
|
+
*
|
|
510
|
+
* 行数据的类型
|
|
70
511
|
*/
|
|
71
512
|
export interface CellKeyEvent<T = any> {
|
|
513
|
+
/**
|
|
514
|
+
* 이벤트 이름('cellKeyDown' 등).
|
|
515
|
+
*
|
|
516
|
+
* The event name.
|
|
517
|
+
*
|
|
518
|
+
* イベント名('cellKeyDown' など)。
|
|
519
|
+
*
|
|
520
|
+
* 事件名(如 'cellKeyDown')。
|
|
521
|
+
*/
|
|
72
522
|
type: string;
|
|
523
|
+
/**
|
|
524
|
+
* 대상 행의 화면 표시 순서 인덱스.
|
|
525
|
+
*
|
|
526
|
+
* Screen-order index of the target row.
|
|
527
|
+
*
|
|
528
|
+
* 対象行の画面表示順のインデックス。
|
|
529
|
+
*
|
|
530
|
+
* 目标行按屏幕显示顺序的索引。
|
|
531
|
+
*/
|
|
73
532
|
rowIndex: number;
|
|
533
|
+
/**
|
|
534
|
+
* 대상 컬럼의 인덱스.
|
|
535
|
+
*
|
|
536
|
+
* Index of the target column.
|
|
537
|
+
*
|
|
538
|
+
* 対象列のインデックス。
|
|
539
|
+
*
|
|
540
|
+
* 目标列的索引。
|
|
541
|
+
*/
|
|
74
542
|
columnIndex: number;
|
|
543
|
+
/**
|
|
544
|
+
* 대상 컬럼의 field 이름.
|
|
545
|
+
*
|
|
546
|
+
* field name of the target column.
|
|
547
|
+
*
|
|
548
|
+
* 対象列の field 名。
|
|
549
|
+
*
|
|
550
|
+
* 目标列的 field 名。
|
|
551
|
+
*/
|
|
75
552
|
field: string;
|
|
553
|
+
/**
|
|
554
|
+
* 그 셀의 원시 값.
|
|
555
|
+
*
|
|
556
|
+
* Raw value of that cell.
|
|
557
|
+
*
|
|
558
|
+
* そのセルの生の値。
|
|
559
|
+
*
|
|
560
|
+
* 该单元格的原始值。
|
|
561
|
+
*/
|
|
76
562
|
value: any;
|
|
563
|
+
/**
|
|
564
|
+
* 그 행의 데이터 객체 전체.
|
|
565
|
+
*
|
|
566
|
+
* The full row-data object.
|
|
567
|
+
*
|
|
568
|
+
* その行のデータオブジェクト全体。
|
|
569
|
+
*
|
|
570
|
+
* 该行完整的数据对象。
|
|
571
|
+
*/
|
|
77
572
|
row: T;
|
|
573
|
+
/**
|
|
574
|
+
* 그 컬럼의 정의.
|
|
575
|
+
*
|
|
576
|
+
* The column's definition.
|
|
577
|
+
*
|
|
578
|
+
* その列の定義。
|
|
579
|
+
*
|
|
580
|
+
* 该列的定义。
|
|
581
|
+
*/
|
|
78
582
|
column: ColumnDef<T>;
|
|
583
|
+
/**
|
|
584
|
+
* 눌린 키 이름(KeyboardEvent.key: 'Enter','ArrowDown','a' …).
|
|
585
|
+
*
|
|
586
|
+
* The pressed key name (KeyboardEvent.key).
|
|
587
|
+
*
|
|
588
|
+
* 押されたキー名(KeyboardEvent.key: 'Enter'、'ArrowDown'、'a' など)。
|
|
589
|
+
*
|
|
590
|
+
* 按下的键名(KeyboardEvent.key: 'Enter'、'ArrowDown'、'a' 等)。
|
|
591
|
+
*/
|
|
79
592
|
key: string;
|
|
593
|
+
/**
|
|
594
|
+
* 이벤트가 일어난 셀 DOM 요소.
|
|
595
|
+
*
|
|
596
|
+
* The cell DOM element where the event occurred.
|
|
597
|
+
*
|
|
598
|
+
* イベントが起きたセルのDOM要素。
|
|
599
|
+
*
|
|
600
|
+
* 事件发生所在的单元格 DOM 元素。
|
|
601
|
+
*/
|
|
80
602
|
target: HTMLElement;
|
|
603
|
+
/**
|
|
604
|
+
* 브라우저 원본 키보드 이벤트(수식어 키 등).
|
|
605
|
+
*
|
|
606
|
+
* The underlying browser keyboard event (modifier keys …).
|
|
607
|
+
*
|
|
608
|
+
* ブラウザ本来のキーボードイベント(修飾キーなど)。
|
|
609
|
+
*
|
|
610
|
+
* 浏览器原始的键盘事件(修饰键等)。
|
|
611
|
+
*/
|
|
81
612
|
originalEvent: KeyboardEvent;
|
|
82
613
|
}
|
|
83
|
-
/**
|
|
614
|
+
/**
|
|
615
|
+
* 정렬 변경 이벤트(sortChange).
|
|
616
|
+
*
|
|
617
|
+
* Sort change event (sortChange).
|
|
618
|
+
*
|
|
619
|
+
* ソート変更イベント(sortChange)。
|
|
620
|
+
*
|
|
621
|
+
* 排序变更事件(sortChange)。
|
|
622
|
+
*/
|
|
84
623
|
export interface SortEvent {
|
|
85
624
|
field: string;
|
|
86
625
|
dir: SortDir;
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
626
|
+
/**
|
|
627
|
+
* 멀티정렬 전체 상태.
|
|
628
|
+
*
|
|
629
|
+
* Full multi-sort state.
|
|
630
|
+
*
|
|
631
|
+
* マルチソートの全体状態。
|
|
632
|
+
*
|
|
633
|
+
* 多重排序的整体状态。
|
|
634
|
+
*/
|
|
635
|
+
sortList: SortItem[];
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* 필터 변경 이벤트(filterChange).
|
|
639
|
+
*
|
|
640
|
+
* Filter change event (filterChange).
|
|
641
|
+
*
|
|
642
|
+
* フィルター変更イベント(filterChange)。
|
|
643
|
+
*
|
|
644
|
+
* 筛选变更事件(filterChange)。
|
|
645
|
+
*/
|
|
646
|
+
export interface FilterEvent {
|
|
647
|
+
field: string;
|
|
93
648
|
filterItems: FilterItem[];
|
|
94
|
-
/**
|
|
649
|
+
/**
|
|
650
|
+
* 전체 컬럼의 활성 필터 맵.
|
|
651
|
+
*
|
|
652
|
+
* Active filters for all columns.
|
|
653
|
+
*
|
|
654
|
+
* 全列のアクティブなフィルターのマップ。
|
|
655
|
+
*
|
|
656
|
+
* 全部列的生效筛选映射。
|
|
657
|
+
*/
|
|
95
658
|
allFilters: Record<string, FilterItem[]>;
|
|
96
659
|
}
|
|
97
|
-
/**
|
|
660
|
+
/**
|
|
661
|
+
* 스크롤 이벤트(scroll).
|
|
662
|
+
*
|
|
663
|
+
* Scroll event (scroll).
|
|
664
|
+
*
|
|
665
|
+
* スクロールイベント(scroll)。
|
|
666
|
+
*
|
|
667
|
+
* 滚动事件(scroll)。
|
|
668
|
+
*/
|
|
98
669
|
export interface ScrollEvent {
|
|
99
670
|
scrollLeft: number;
|
|
100
671
|
scrollTop: number;
|
|
101
672
|
isAtTop: boolean;
|
|
102
673
|
isAtBottom: boolean;
|
|
103
674
|
}
|
|
104
|
-
/**
|
|
675
|
+
/**
|
|
676
|
+
* 행 드래그&드롭 이벤트(onDrop).
|
|
677
|
+
*
|
|
678
|
+
* Row drag & drop event (onDrop).
|
|
679
|
+
*
|
|
680
|
+
* 行のドラッグ&ドロップイベント(onDrop)。
|
|
681
|
+
*
|
|
682
|
+
* 行的拖放事件(onDrop)。
|
|
683
|
+
*/
|
|
105
684
|
export interface DragDropEvent<T = any> {
|
|
106
685
|
sourceRows: T[];
|
|
107
686
|
sourceIndexes: number[];
|
|
@@ -109,84 +688,323 @@ export interface DragDropEvent<T = any> {
|
|
|
109
688
|
targetGridId?: string;
|
|
110
689
|
}
|
|
111
690
|
/**
|
|
112
|
-
* 그리드↔그리드 행 이동 이벤트.
|
|
691
|
+
* 그리드↔그리드 행 이동 이벤트.
|
|
692
|
+
*
|
|
693
|
+
* Grid-to-grid row move event.
|
|
694
|
+
*
|
|
695
|
+
* グリッド↔グリッドの行移動イベント。
|
|
113
696
|
*
|
|
114
697
|
* crossGrid:true 인 두 그리드 사이에서 행을 드래그·드롭할 때 3단계로 발생한다.
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
698
|
+
*
|
|
699
|
+
* Fires in three phases when rows are dragged between two grids with crossGrid:true.
|
|
700
|
+
*
|
|
701
|
+
* crossGrid:true の二つのグリッドの間で行をドラッグ・ドロップするとき、3段階で発生する。
|
|
702
|
+
*
|
|
703
|
+
* - onGridDropBefore : 변경 직전(이동 전). false 반환 시 이동 취소. / just before the move; return false to cancel. / 変更直前(移動前)。false を返すと移動を取り消し。
|
|
704
|
+
* - onGridDropAfter : 양쪽 데이터 모델 이동 완료 후. / after both data models have moved. / 両側のデータモデルの移動が完了した後。
|
|
705
|
+
* - onGridDropComplete: 양쪽 재렌더까지 끝난 후. / after both grids finished re-rendering. / 両側の再レンダーまで終わった後。
|
|
706
|
+
*
|
|
707
|
+
* 表格↔表格的行移动事件。
|
|
708
|
+
*
|
|
709
|
+
* 在 crossGrid:true 的两个表格之间拖放行时,分三个阶段触发。
|
|
710
|
+
*
|
|
711
|
+
* - onGridDropBefore : 移动之前。返回 false 则取消移动。
|
|
712
|
+
* - onGridDropAfter : 两侧数据模型移动完成之后。
|
|
713
|
+
* - onGridDropComplete: 两侧重新渲染也结束之后。
|
|
119
714
|
*/
|
|
120
715
|
export interface GridDropEvent<T = any> {
|
|
121
|
-
/**
|
|
716
|
+
/**
|
|
717
|
+
* 행을 보낸(드래그 시작) 그리드
|
|
718
|
+
*
|
|
719
|
+
* Grid the rows were dragged from
|
|
720
|
+
*
|
|
721
|
+
* 行を送り出した(ドラッグを開始した)グリッド
|
|
722
|
+
*
|
|
723
|
+
* 送出行的(发起拖动的)表格
|
|
724
|
+
*/
|
|
122
725
|
sourceGrid: OpenGridInstance<T>;
|
|
123
|
-
/**
|
|
726
|
+
/**
|
|
727
|
+
* 행을 받은(드롭 대상) 그리드
|
|
728
|
+
*
|
|
729
|
+
* Grid the rows were dropped onto
|
|
730
|
+
*
|
|
731
|
+
* 行を受け取った(ドロップ先の)グリッド
|
|
732
|
+
*
|
|
733
|
+
* 接收行的(放置目标)表格
|
|
734
|
+
*/
|
|
124
735
|
targetGrid: OpenGridInstance<T>;
|
|
125
|
-
/**
|
|
736
|
+
/**
|
|
737
|
+
* 이동된 행 데이터 (내부 id 제외 복사본)
|
|
738
|
+
*
|
|
739
|
+
* Moved row data (copies without internal ids)
|
|
740
|
+
*
|
|
741
|
+
* 移動した行データ(内部idを除いたコピー)
|
|
742
|
+
*
|
|
743
|
+
* 移动的行数据(不含内部 id 的副本)
|
|
744
|
+
*/
|
|
126
745
|
rows: T[];
|
|
127
|
-
/**
|
|
746
|
+
/**
|
|
747
|
+
* 소스 그리드에서의 원래 행 인덱스들
|
|
748
|
+
*
|
|
749
|
+
* Original row indexes in the source grid
|
|
750
|
+
*
|
|
751
|
+
* ソースグリッドでの元の行インデックス
|
|
752
|
+
*
|
|
753
|
+
* 在来源表格中原本的行索引
|
|
754
|
+
*/
|
|
128
755
|
sourceIndexes: number[];
|
|
129
|
-
/**
|
|
756
|
+
/**
|
|
757
|
+
* 타깃 그리드에서 삽입된 시작 인덱스
|
|
758
|
+
*
|
|
759
|
+
* Insertion start index in the target grid
|
|
760
|
+
*
|
|
761
|
+
* ターゲットグリッドで挿入された開始インデックス
|
|
762
|
+
*
|
|
763
|
+
* 在目标表格中插入的起始索引
|
|
764
|
+
*/
|
|
130
765
|
targetIndex: number;
|
|
131
|
-
/**
|
|
766
|
+
/**
|
|
767
|
+
* before 단계에서 true 로 바꾸면 이동 취소 (onGridDropBefore가 false 반환한 것과 동일)
|
|
768
|
+
*
|
|
769
|
+
* Set true in the before phase to cancel (same as returning false from onGridDropBefore)
|
|
770
|
+
*
|
|
771
|
+
* before 段階で true にすると移動を取り消し(onGridDropBefore が false を返したのと同じ)
|
|
772
|
+
*
|
|
773
|
+
* 在 before 阶段改为 true 则取消移动(与 onGridDropBefore 返回 false 相同)
|
|
774
|
+
*/
|
|
132
775
|
cancel?: boolean;
|
|
133
776
|
}
|
|
134
777
|
/**
|
|
135
778
|
* 그리드↔그리드 필드 매핑 확정 이벤트 (interactive 모드에서 매핑 모달 확인 시).
|
|
136
|
-
*
|
|
779
|
+
*
|
|
780
|
+
* Grid-to-grid field-mapping confirmation event (when the mapping modal is confirmed in interactive mode).
|
|
781
|
+
*
|
|
782
|
+
* グリッド↔グリッドのフィールドマッピング確定イベント(interactive モードでマッピングモーダルを確認したとき)。
|
|
783
|
+
*
|
|
784
|
+
* 表格↔表格的字段映射确定事件(在 interactive 模式下确认映射弹窗时)。
|
|
137
785
|
*/
|
|
138
786
|
export interface GridMappingEvent<T = any> {
|
|
139
787
|
sourceGrid: OpenGridInstance<T>;
|
|
140
788
|
targetGrid: OpenGridInstance<T>;
|
|
141
|
-
/**
|
|
789
|
+
/**
|
|
790
|
+
* 타깃필드 → 소스필드 매핑
|
|
791
|
+
*
|
|
792
|
+
* target-field → source-field mapping
|
|
793
|
+
*
|
|
794
|
+
* ターゲットフィールド → ソースフィールドのマッピング
|
|
795
|
+
*
|
|
796
|
+
* 目标字段 → 来源字段的映射
|
|
797
|
+
*/
|
|
142
798
|
mapping: Record<string, string>;
|
|
143
|
-
/**
|
|
799
|
+
/**
|
|
800
|
+
* crossGridMapping 에 baking 할 수 있는 변환 함수 소스
|
|
801
|
+
*
|
|
802
|
+
* Transform-function source that can be baked into crossGridMapping
|
|
803
|
+
*
|
|
804
|
+
* crossGridMapping に baking できる変換関数のソース
|
|
805
|
+
*
|
|
806
|
+
* 可以 baking 到 crossGridMapping 的转换函数源码
|
|
807
|
+
*/
|
|
144
808
|
script: string;
|
|
145
809
|
}
|
|
146
|
-
/**
|
|
810
|
+
/**
|
|
811
|
+
* 선택 변경 이벤트(selectionChange).
|
|
812
|
+
*
|
|
813
|
+
* Selection change event (selectionChange).
|
|
814
|
+
*
|
|
815
|
+
* 選択変更イベント(selectionChange)。
|
|
816
|
+
*
|
|
817
|
+
* 选择变更事件(selectionChange)。
|
|
818
|
+
*/
|
|
147
819
|
export interface SelectionEvent<T = any> {
|
|
148
820
|
rows: T[];
|
|
149
821
|
rowIndexes: number[];
|
|
150
822
|
cells?: CellRange[];
|
|
151
823
|
}
|
|
152
824
|
/**
|
|
153
|
-
*
|
|
825
|
+
* 선택된 셀들의 사각형 범위를 네 모서리 인덱스로 나타냅니다(엑셀의 A1:C5 같은 개념).
|
|
826
|
+
* 범위 선택 기능이 이 값을 만들어 내고, 수식의 참조 대상과 차트의 데이터 소스가 이 좌표를 그대로 읽어 씁니다.
|
|
827
|
+
*
|
|
828
|
+
* A rectangular block of selected cells, given as its four corner indexes (think of a spreadsheet's
|
|
829
|
+
* A1:C5). Range selection produces it; cell formulas and chart sources consume the same coordinates.
|
|
830
|
+
*
|
|
831
|
+
* 選択されたセルの矩形範囲を、四隅のインデックスで表します(スプレッドシートの A1:C5 のような考え方)。
|
|
832
|
+
* 範囲選択の機能がこの値を作り出し、数式の参照先とチャートのデータソースがこの座標をそのまま読んで使います。
|
|
833
|
+
*
|
|
834
|
+
* 좌표가 가리키는 것:
|
|
835
|
+
* - 행 인덱스(startRow/endRow)는 "화면에 보이는 순서"입니다. 그룹·트리의 가상 행이나 펼쳐진 상세 행까지
|
|
836
|
+
* 포함한 순서라서, 정렬·필터만 반영한 순수 데이터 순서와는 다를 수 있습니다.
|
|
837
|
+
* - 컬럼 인덱스(startCol/endCol)는 "지금 보이는 컬럼들" 기준입니다(숨긴 컬럼 제외). 컬럼을 다시 보이게 하면
|
|
838
|
+
* 재렌더 때 좌표 표시가 갱신됩니다.
|
|
154
839
|
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* -
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
840
|
+
* What the coordinates mean:
|
|
841
|
+
* - Row indexes are in on-screen order — they include group/tree pseudo-rows and expanded detail
|
|
842
|
+
* rows, so they can differ from the pure data order that reflects only sort/filter.
|
|
843
|
+
* - Column indexes count only currently visible columns (hidden ones excluded); un-hiding a column
|
|
844
|
+
* refreshes the displayed coordinates on the next render.
|
|
845
|
+
*
|
|
846
|
+
* 座標が指すもの:
|
|
847
|
+
* - 行インデックス(startRow/endRow)は「画面に見えている順序」です。グループ・ツリーの仮想行や展開された
|
|
848
|
+
* 詳細行まで含んだ順序なので、ソート・フィルターだけを反映した純粋なデータ順序とは異なることがあります。
|
|
849
|
+
* - 列インデックス(startCol/endCol)は「今見えている列」が基準です(隠した列は除く)。列を再び表示すると、
|
|
850
|
+
* 再レンダーのときに座標の表示が更新されます。
|
|
851
|
+
*
|
|
852
|
+
* 주의: 선택의 "영구 신원"은 이 인덱스가 아니라 안정적인 (행 id × field) 앵커로 저장됩니다.
|
|
853
|
+
* CellRange 는 어디까지나 "지금 화면에 투영된" 사각형 표현입니다.
|
|
854
|
+
*
|
|
855
|
+
* Note: The persistent identity of a selection is stored as a stable (rowId × field) anchor, not as
|
|
856
|
+
* these indexes — CellRange is only the "currently projected onto screen" rectangle.
|
|
857
|
+
*
|
|
858
|
+
* 注意: 選択の「永続的な同一性」は、このインデックスではなく安定した(行 id × field)アンカーとして保存されます。
|
|
859
|
+
* CellRange はあくまで「今、画面に投影された」矩形の表現です。
|
|
860
|
+
*
|
|
861
|
+
* 一块被选中的矩形单元格区域,用四角的索引表示(可类比电子表格的 A1:C5)。范围选择产出它,
|
|
862
|
+
* 单元格公式的引用对象和图表的数据源直接读取同一组坐标。
|
|
863
|
+
*
|
|
864
|
+
* 坐标的含义:
|
|
865
|
+
* - 行索引(startRow/endRow)按「屏幕上看到的顺序」计算 —— 其中包含分组/树的虚拟行和展开的详情行,
|
|
866
|
+
* 因此可能与只反映排序、筛选的纯数据顺序不同。
|
|
867
|
+
* - 列索引(startCol/endCol)只计当前可见的列(隐藏列除外);重新显示某列后,下一次渲染会刷新显示的坐标。
|
|
868
|
+
*
|
|
869
|
+
* 注意: 选择的「持久身份」保存为稳定的(行 id × field)锚点,而非这些索引。CellRange 始终只是
|
|
870
|
+
* 「当前投影到屏幕上」的矩形表示。
|
|
165
871
|
*/
|
|
166
872
|
export interface CellRange {
|
|
873
|
+
/**
|
|
874
|
+
* 위쪽 경계 행(화면 표시 순서).
|
|
875
|
+
*
|
|
876
|
+
* Top boundary row (on-screen order).
|
|
877
|
+
*
|
|
878
|
+
* 上側の境界行(画面表示順)。
|
|
879
|
+
*
|
|
880
|
+
* 上边界行(按屏幕显示顺序)。
|
|
881
|
+
*/
|
|
167
882
|
startRow: number;
|
|
883
|
+
/**
|
|
884
|
+
* 아래쪽 경계 행(화면 표시 순서).
|
|
885
|
+
*
|
|
886
|
+
* Bottom boundary row (on-screen order).
|
|
887
|
+
*
|
|
888
|
+
* 下側の境界行(画面表示順)。
|
|
889
|
+
*
|
|
890
|
+
* 下边界行(按屏幕显示顺序)。
|
|
891
|
+
*/
|
|
168
892
|
endRow: number;
|
|
893
|
+
/**
|
|
894
|
+
* 왼쪽 경계 컬럼(보이는 컬럼 기준).
|
|
895
|
+
*
|
|
896
|
+
* Left boundary column (among visible columns).
|
|
897
|
+
*
|
|
898
|
+
* 左側の境界列(見えている列が基準)。
|
|
899
|
+
*
|
|
900
|
+
* 左边界列(以可见的列为准)。
|
|
901
|
+
*/
|
|
169
902
|
startCol: number;
|
|
903
|
+
/**
|
|
904
|
+
* 오른쪽 경계 컬럼(보이는 컬럼 기준).
|
|
905
|
+
*
|
|
906
|
+
* Right boundary column (among visible columns).
|
|
907
|
+
*
|
|
908
|
+
* 右側の境界列(見えている列が基準)。
|
|
909
|
+
*
|
|
910
|
+
* 右边界列(以可见的列为准)。
|
|
911
|
+
*/
|
|
170
912
|
endCol: number;
|
|
171
913
|
}
|
|
172
|
-
/**
|
|
914
|
+
/**
|
|
915
|
+
* 스프레드시트식 범위 선택과 채우기 핸들의 세부 동작을 조절합니다. selection: 'cells' 로 켠 뒤,
|
|
916
|
+
* 채우기 핸들을 보일지·자동 스크롤 폭·시리즈 자동 감지 여부 등을 여기서 미세 조정합니다.
|
|
917
|
+
*
|
|
918
|
+
* Fine-tunes spreadsheet-style range selection and the fill handle. After enabling selection:
|
|
919
|
+
* 'cells', tweak whether the handle shows, the autoscroll band, series auto-detection, and so on.
|
|
920
|
+
*
|
|
921
|
+
* スプレッドシート式の範囲選択とフィルハンドルの細かい動作を調節します。selection: 'cells' で有効にした後、
|
|
922
|
+
* フィルハンドルを見せるか・自動スクロールの幅・連続データの自動検出の有無などを、ここで微調整します。
|
|
923
|
+
*
|
|
924
|
+
* 微调电子表格式的范围选择和填充手柄。用 selection: 'cells' 启用后,在这里调整是否显示手柄、
|
|
925
|
+
* 自动滚动的边缘宽度、是否自动识别序列等。
|
|
926
|
+
*/
|
|
173
927
|
export interface RangeSelectionOptions {
|
|
174
|
-
/**
|
|
928
|
+
/**
|
|
929
|
+
* 범위 선택 켜기. 생략 시 selection==='cells' 여부를 따릅니다.
|
|
930
|
+
*
|
|
931
|
+
* Enable range selection. Unset follows whether selection==='cells'.
|
|
932
|
+
*
|
|
933
|
+
* 範囲選択を有効にする。省略した場合は selection==='cells' かどうかに従います。
|
|
934
|
+
*
|
|
935
|
+
* 启用范围选择。省略时按 selection==='cells' 与否决定。
|
|
936
|
+
*/
|
|
175
937
|
enabled?: boolean;
|
|
176
|
-
/**
|
|
938
|
+
/**
|
|
939
|
+
* 선택 영역 모서리의 채우기 핸들(작은 사각형)을 보이고 드래그할 수 있게 할지. 기본 true.
|
|
940
|
+
*
|
|
941
|
+
* Show and allow dragging the fill handle (the small corner square). Default true.
|
|
942
|
+
*
|
|
943
|
+
* 選択領域の角にあるフィルハンドル(小さな四角)を表示し、ドラッグできるようにするか。既定 true。
|
|
944
|
+
*
|
|
945
|
+
* 是否显示选中区域角上的填充手柄(小方块)并允许拖动。默认 true。
|
|
946
|
+
*/
|
|
177
947
|
fillHandle?: boolean;
|
|
178
|
-
/**
|
|
948
|
+
/**
|
|
949
|
+
* Ctrl 로 사각형 여러 개를 동시에 선택하게 할지. 기본 false(아직 미구현).
|
|
950
|
+
*
|
|
951
|
+
* Whether Ctrl selects several rectangles at once. Default false (not implemented yet).
|
|
952
|
+
*
|
|
953
|
+
* Ctrl で矩形を複数同時に選択できるようにするか。既定 false(まだ未実装)。
|
|
954
|
+
*
|
|
955
|
+
* 是否允许用 Ctrl 同时选择多个矩形。默认 false(尚未实现)。
|
|
956
|
+
*/
|
|
179
957
|
multiRange?: boolean;
|
|
180
|
-
/**
|
|
958
|
+
/**
|
|
959
|
+
* 드래그가 이 가장자리 폭(px) 안에 들어오면 화면이 자동으로 스크롤됩니다. 기본 24.
|
|
960
|
+
*
|
|
961
|
+
* When the drag enters this edge band (px), the view auto-scrolls. Default 24.
|
|
962
|
+
*
|
|
963
|
+
* ドラッグがこの縁の幅(px)の中に入ると、画面が自動でスクロールします。既定 24。
|
|
964
|
+
*
|
|
965
|
+
* 拖动进入这一边缘宽度(px)内时,画面自动滚动。默认 24。
|
|
966
|
+
*/
|
|
181
967
|
autoScrollEdge?: number;
|
|
182
|
-
/**
|
|
968
|
+
/**
|
|
969
|
+
* 1,2,3… 같은 규칙을 자동 감지해 이어 채울지. 기본 true. false 면 항상 단순 복사만 합니다.
|
|
970
|
+
*
|
|
971
|
+
* Whether to auto-detect series (1,2,3…) and extend them. Default true; false always plain-copies.
|
|
972
|
+
*
|
|
973
|
+
* 1,2,3… のような規則を自動検出して続けて埋めるか。既定 true。false なら常に単純コピーだけを行います。
|
|
974
|
+
*
|
|
975
|
+
* 是否自动识别 1,2,3… 这类规律并顺延填充。默认 true;false 时始终只做简单复制。
|
|
976
|
+
*/
|
|
183
977
|
seriesFill?: boolean;
|
|
184
|
-
/**
|
|
978
|
+
/**
|
|
979
|
+
* 그룹·트리 모드에서도 범위 선택을 허용할지. 기본 false(현재 비활성).
|
|
980
|
+
*
|
|
981
|
+
* Whether range selection also works in group/tree mode. Default false (off for now).
|
|
982
|
+
*
|
|
983
|
+
* グループ・ツリーモードでも範囲選択を許可するか。既定 false(現在は無効)。
|
|
984
|
+
*
|
|
985
|
+
* 在分组、树模式下是否也允许范围选择。默认 false(目前未启用)。
|
|
986
|
+
*/
|
|
185
987
|
enabledInTreeGroup?: boolean;
|
|
186
|
-
/**
|
|
988
|
+
/**
|
|
989
|
+
* 채우기가 수식이 들어 있는 셀을 덮어쓰도록 허용할지. 기본 false(수식 보호).
|
|
990
|
+
*
|
|
991
|
+
* Whether filling may overwrite cells that contain formulas. Default false (formulas protected).
|
|
992
|
+
*
|
|
993
|
+
* フィルが数式の入っているセルを上書きすることを許可するか。既定 false(数式を保護)。
|
|
994
|
+
*
|
|
995
|
+
* 是否允许填充覆盖含有公式的单元格。默认 false(保护公式)。
|
|
996
|
+
*/
|
|
187
997
|
fillOverwriteFormula?: boolean;
|
|
188
998
|
}
|
|
189
|
-
/**
|
|
999
|
+
/**
|
|
1000
|
+
* F1 채우기 커밋 이벤트(onRangeFill).
|
|
1001
|
+
*
|
|
1002
|
+
* F1 fill commit event (onRangeFill).
|
|
1003
|
+
*
|
|
1004
|
+
* F1 フィルのコミットイベント(onRangeFill)。
|
|
1005
|
+
*
|
|
1006
|
+
* F1 填充提交事件(onRangeFill)。
|
|
1007
|
+
*/
|
|
190
1008
|
export interface RangeFillEvent {
|
|
191
1009
|
source: CellRange;
|
|
192
1010
|
target: CellRange;
|
|
@@ -198,233 +1016,1066 @@ export interface RangeFillEvent {
|
|
|
198
1016
|
newValue: any;
|
|
199
1017
|
}>;
|
|
200
1018
|
skippedFormula?: number;
|
|
201
|
-
/**
|
|
1019
|
+
/**
|
|
1020
|
+
* before 훅에서 true 로 바꾸면 채우기 취소(현재 배선은 이벤트 emit 뒤 즉시 확인)
|
|
1021
|
+
*
|
|
1022
|
+
* before フックで true にするとフィルを取り消し(現在の配線ではイベントの emit 直後に確認)
|
|
1023
|
+
*
|
|
1024
|
+
* 在 before 钩子里改为 true 则取消填充(当前的接线在事件 emit 之后立即检查)
|
|
1025
|
+
*/
|
|
202
1026
|
cancel?: boolean;
|
|
203
1027
|
}
|
|
204
|
-
/**
|
|
1028
|
+
/**
|
|
1029
|
+
* F1 범위 복사 이벤트(onRangeCopy).
|
|
1030
|
+
*
|
|
1031
|
+
* F1 range copy event (onRangeCopy).
|
|
1032
|
+
*
|
|
1033
|
+
* F1 範囲コピーイベント(onRangeCopy)。
|
|
1034
|
+
*
|
|
1035
|
+
* F1 范围复制事件(onRangeCopy)。
|
|
1036
|
+
*/
|
|
205
1037
|
export interface RangeCopyEvent {
|
|
206
1038
|
range: CellRange;
|
|
207
|
-
/**
|
|
1039
|
+
/**
|
|
1040
|
+
* 클립보드 TSV 텍스트.
|
|
1041
|
+
*
|
|
1042
|
+
* Clipboard TSV text.
|
|
1043
|
+
*
|
|
1044
|
+
* クリップボードのTSVテキスト。
|
|
1045
|
+
*
|
|
1046
|
+
* 剪贴板的 TSV 文本。
|
|
1047
|
+
*/
|
|
208
1048
|
text: string;
|
|
209
1049
|
}
|
|
210
|
-
/**
|
|
1050
|
+
/**
|
|
1051
|
+
* F1 활성 범위 변경 이벤트(onRangeChange).
|
|
1052
|
+
*
|
|
1053
|
+
* F1 active-range change event (onRangeChange).
|
|
1054
|
+
*
|
|
1055
|
+
* F1 アクティブ範囲の変更イベント(onRangeChange)。
|
|
1056
|
+
*
|
|
1057
|
+
* F1 活动范围变更事件(onRangeChange)。
|
|
1058
|
+
*/
|
|
211
1059
|
export interface RangeChangeEvent {
|
|
212
1060
|
range: CellRange | null;
|
|
213
1061
|
}
|
|
214
1062
|
export type { FormulaErrorCode } from './formula/types.js';
|
|
215
|
-
/**
|
|
1063
|
+
/**
|
|
1064
|
+
* 셀에 '=' 로 시작하는 수식을 넣어 다른 셀을 참조·계산하게 하는 기능의 세부 설정입니다. 엑셀처럼
|
|
1065
|
+
* 셀에 직접 '=A1+B2' 를 입력해 쓰게 할지, 참조를 어떻게 해석할지, 변경 시 자동으로 다시 계산할지 등을 정합니다.
|
|
1066
|
+
*
|
|
1067
|
+
* Settings for cell formulas — cells that start with '=' and reference/compute other cells. Decide
|
|
1068
|
+
* whether users can type '=A1+B2' directly, how references are interpreted, and whether edits
|
|
1069
|
+
* trigger a recompute.
|
|
1070
|
+
*
|
|
1071
|
+
* セルに '=' で始まる数式を入れて、他のセルを参照・計算させる機能の細かい設定です。スプレッドシートのように
|
|
1072
|
+
* セルへ直接 '=A1+B2' を入力して使わせるか、参照をどう解釈するか、変更時に自動で再計算するかなどを決めます。
|
|
1073
|
+
*
|
|
1074
|
+
* 单元格公式的设置 —— 以 '=' 开头、引用并计算其他单元格的单元格。决定用户能否直接输入 '=A1+B2'、
|
|
1075
|
+
* 引用如何解释、编辑后是否触发重算。
|
|
1076
|
+
*/
|
|
216
1077
|
export interface FormulaOptions {
|
|
217
|
-
/**
|
|
1078
|
+
/**
|
|
1079
|
+
* 셀에 '=' 를 직접 입력하면 수식으로 자동 인식할지. 기본 false(끄면 기존 편집과 동일). setCellFormula API 로는 이 값과 상관없이 언제나 수식을 넣을 수 있습니다.
|
|
1080
|
+
*
|
|
1081
|
+
* Whether typing '=' in a cell is auto-recognized as a formula. Default false; the setCellFormula API works regardless.
|
|
1082
|
+
*
|
|
1083
|
+
* セルに '=' を直接入力したら数式として自動認識するか。既定 false(切ると従来の編集と同じ)。setCellFormula API なら、この値に関係なくいつでも数式を入れられます。
|
|
1084
|
+
*
|
|
1085
|
+
* 在单元格里直接输入 '=' 是否自动识别为公式。默认 false(关闭时与原有编辑相同)。用 setCellFormula API 则不受此值影响,随时都能写入公式。
|
|
1086
|
+
*/
|
|
218
1087
|
enabled?: boolean;
|
|
219
|
-
/**
|
|
1088
|
+
/**
|
|
1089
|
+
* 참조를 어떻게 기억할지. 'stable'(기본)은 행을 정렬·이동해도 같은 셀을 계속 가리키고,
|
|
1090
|
+
* 'relative'는 위치 기준(엑셀 A1 상대참조처럼)입니다.
|
|
1091
|
+
*
|
|
1092
|
+
* How references are anchored. 'stable' (default) keeps pointing at the same cell even after
|
|
1093
|
+
* sorting/moving rows; 'relative' is position-based (like a spreadsheet's relative A1 ref).
|
|
1094
|
+
*
|
|
1095
|
+
* 参照をどのように覚えておくか。'stable'(既定)は行をソート・移動しても同じセルを指し続け、
|
|
1096
|
+
* 'relative' は位置が基準(スプレッドシートの A1 相対参照のように)です。
|
|
1097
|
+
*
|
|
1098
|
+
* 引用如何锚定。'stable'(默认)即使排序、移动行也继续指向同一个单元格;
|
|
1099
|
+
* 'relative' 以位置为准(像电子表格的 A1 相对引用)。
|
|
1100
|
+
*/
|
|
220
1101
|
refMode?: 'stable' | 'relative';
|
|
221
|
-
/**
|
|
1102
|
+
/**
|
|
1103
|
+
* 나눗셈 결과의 소수점 자리수. 기본 30.
|
|
1104
|
+
*
|
|
1105
|
+
* Decimal precision for division results. Default 30.
|
|
1106
|
+
*
|
|
1107
|
+
* 除算結果の小数点以下の桁数。既定 30。
|
|
1108
|
+
*
|
|
1109
|
+
* 除法结果的小数位数。默认 30。
|
|
1110
|
+
*/
|
|
222
1111
|
divisionPrecision?: number;
|
|
223
|
-
/**
|
|
1112
|
+
/**
|
|
1113
|
+
* 상단 수식 입력 바를 보일지. 기본 false(아직 미구현).
|
|
1114
|
+
*
|
|
1115
|
+
* Whether to show a top formula bar. Default false (not implemented yet).
|
|
1116
|
+
*
|
|
1117
|
+
* 上部に数式入力バーを表示するか。既定 false(まだ未実装)。
|
|
1118
|
+
*
|
|
1119
|
+
* 是否显示顶部的公式输入栏。默认 false(尚未实现)。
|
|
1120
|
+
*/
|
|
224
1121
|
formulaBar?: boolean;
|
|
225
|
-
/**
|
|
1122
|
+
/**
|
|
1123
|
+
* 수식이 든 셀에 표식(마커)을 달아 구분해 줄지. 기본 true.
|
|
1124
|
+
*
|
|
1125
|
+
* Whether to mark formula-bearing cells so they stand out. Default true.
|
|
1126
|
+
*
|
|
1127
|
+
* 数式の入ったセルに目印(マーカー)を付けて区別するか。既定 true。
|
|
1128
|
+
*
|
|
1129
|
+
* 是否给含公式的单元格加标记以示区分。默认 true。
|
|
1130
|
+
*/
|
|
226
1131
|
cellMarker?: boolean;
|
|
227
|
-
/**
|
|
1132
|
+
/**
|
|
1133
|
+
* 참조된 셀이 바뀌면 수식을 자동으로 다시 계산할지. 기본 true.
|
|
1134
|
+
*
|
|
1135
|
+
* Whether editing a referenced cell auto-recomputes the formula. Default true.
|
|
1136
|
+
*
|
|
1137
|
+
* 参照されたセルが変わったら数式を自動で再計算するか。既定 true。
|
|
1138
|
+
*
|
|
1139
|
+
* 被引用的单元格变化后,是否自动重算公式。默认 true。
|
|
1140
|
+
*/
|
|
228
1141
|
autoRecalc?: boolean;
|
|
1142
|
+
/**
|
|
1143
|
+
* 어떤 셀의 수식 자체가 바뀌었을 때 호출.
|
|
1144
|
+
*
|
|
1145
|
+
* Fired when a cell's formula text itself changes.
|
|
1146
|
+
*
|
|
1147
|
+
* あるセルの数式そのものが変わったときに呼ばれる。
|
|
1148
|
+
*
|
|
1149
|
+
* 某个单元格的公式本身发生变化时调用。
|
|
1150
|
+
*/
|
|
229
1151
|
onFormulaChange?: (e: FormulaChangeEvent) => void;
|
|
1152
|
+
/**
|
|
1153
|
+
* 재계산이 끝났을 때 호출(무엇이 바뀌었고 얼마나 걸렸는지).
|
|
1154
|
+
*
|
|
1155
|
+
* Fired after a recompute finishes (what changed, how long it took).
|
|
1156
|
+
*
|
|
1157
|
+
* 再計算が終わったときに呼ばれる(何が変わり、どれくらいかかったか)。
|
|
1158
|
+
*
|
|
1159
|
+
* 重算结束时调用(哪些变了、耗时多久)。
|
|
1160
|
+
*/
|
|
230
1161
|
onFormulaRecalc?: (e: FormulaRecalcEvent) => void;
|
|
1162
|
+
/**
|
|
1163
|
+
* 수식 계산 중 오류(순환 참조·0 나눗셈 등)가 났을 때 호출.
|
|
1164
|
+
*
|
|
1165
|
+
* Fired on a formula error (circular ref, divide-by-zero …).
|
|
1166
|
+
*
|
|
1167
|
+
* 数式の計算中にエラー(循環参照・ゼロ除算など)が出たときに呼ばれる。
|
|
1168
|
+
*
|
|
1169
|
+
* 公式计算中出错(循环引用、除以零等)时调用。
|
|
1170
|
+
*/
|
|
231
1171
|
onFormulaError?: (e: FormulaErrorEvent) => void;
|
|
232
1172
|
}
|
|
233
|
-
/**
|
|
1173
|
+
/**
|
|
1174
|
+
* F3 수식 변경 이벤트(onFormulaChange).
|
|
1175
|
+
*
|
|
1176
|
+
* F3 formula change event (onFormulaChange).
|
|
1177
|
+
*
|
|
1178
|
+
* F3 数式変更イベント(onFormulaChange)。
|
|
1179
|
+
*
|
|
1180
|
+
* F3 公式变更事件(onFormulaChange)。
|
|
1181
|
+
*/
|
|
234
1182
|
export interface FormulaChangeEvent {
|
|
235
1183
|
rowIndex: number;
|
|
236
1184
|
field: string;
|
|
237
1185
|
formula: string;
|
|
238
1186
|
oldFormula: string | null;
|
|
239
1187
|
}
|
|
240
|
-
/**
|
|
1188
|
+
/**
|
|
1189
|
+
* F3 재계산 완료 이벤트(onFormulaRecalc).
|
|
1190
|
+
*
|
|
1191
|
+
* F3 recalc-finished event (onFormulaRecalc).
|
|
1192
|
+
*
|
|
1193
|
+
* F3 再計算完了イベント(onFormulaRecalc)。
|
|
1194
|
+
*
|
|
1195
|
+
* F3 重算完成事件(onFormulaRecalc)。
|
|
1196
|
+
*/
|
|
241
1197
|
export interface FormulaRecalcEvent {
|
|
242
|
-
/**
|
|
1198
|
+
/**
|
|
1199
|
+
* 값이 바뀐 셀 키 목록.
|
|
1200
|
+
*
|
|
1201
|
+
* Keys of cells whose values changed.
|
|
1202
|
+
*
|
|
1203
|
+
* 値が変わったセルキーの一覧。
|
|
1204
|
+
*
|
|
1205
|
+
* 值发生变化的单元格键列表。
|
|
1206
|
+
*/
|
|
243
1207
|
changed: string[];
|
|
244
1208
|
cycles: number;
|
|
245
1209
|
ms: number;
|
|
246
|
-
/**
|
|
1210
|
+
/**
|
|
1211
|
+
* 이번에 다시 계산해야 했던 셀 무리가 임계값(500)을 넘었으면 true. 성능 모니터링·경고용 신호입니다.
|
|
1212
|
+
*
|
|
1213
|
+
* true when the recalculated cell set exceeded the threshold (500) — a signal for perf monitoring/warnings.
|
|
1214
|
+
*
|
|
1215
|
+
* 今回再計算する必要があったセルの集まりがしきい値(500)を超えていれば true。性能モニタリング・警告のための信号です。
|
|
1216
|
+
*
|
|
1217
|
+
* 本次需要重算的单元格集合超过阈值(500)时为 true。这是用于性能监控、告警的信号。
|
|
1218
|
+
*/
|
|
247
1219
|
large: boolean;
|
|
248
1220
|
}
|
|
249
|
-
/**
|
|
1221
|
+
/**
|
|
1222
|
+
* F3 수식 오류 이벤트(onFormulaError).
|
|
1223
|
+
*
|
|
1224
|
+
* F3 formula error event (onFormulaError).
|
|
1225
|
+
*
|
|
1226
|
+
* F3 数式エラーイベント(onFormulaError)。
|
|
1227
|
+
*
|
|
1228
|
+
* F3 公式错误事件(onFormulaError)。
|
|
1229
|
+
*/
|
|
250
1230
|
export interface FormulaErrorEvent {
|
|
251
1231
|
rowIndex: number;
|
|
252
1232
|
field: string;
|
|
253
1233
|
error: FormulaErrorCode;
|
|
254
1234
|
}
|
|
255
1235
|
export type { RangeStats } from './range/RangeQuery.js';
|
|
256
|
-
/**
|
|
257
|
-
|
|
258
|
-
|
|
1236
|
+
/**
|
|
1237
|
+
* 상세 패널을 직접 그릴 때(renderer) 세 번째 인자로 받는 도우미 묶음입니다. 방금 펼쳐진 행의 정보와,
|
|
1238
|
+
* 그 패널을 접거나 다시 재는 조작을 담고 있어 커스텀 패널 안에서 그리드를 되짚을 수 있습니다.
|
|
1239
|
+
*
|
|
1240
|
+
* The helper bundle passed as the 3rd argument when you draw a detail panel yourself (renderer). It
|
|
1241
|
+
* carries the just-expanded row's info plus actions to collapse or re-measure the panel, so your
|
|
1242
|
+
* custom panel can reach back into the grid.
|
|
1243
|
+
*
|
|
1244
|
+
* 詳細パネルを自分で描くとき(renderer)に3番目の引数として受け取るヘルパーのまとまりです。今しがた展開された
|
|
1245
|
+
* 行の情報と、そのパネルを折りたたむ・測り直す操作を収めているので、カスタムパネルの中からグリッドへ
|
|
1246
|
+
* たどり返せます。
|
|
1247
|
+
*
|
|
1248
|
+
* 自行绘制详情面板(renderer)时,作为第三个参数收到的一组辅助工具。它带着刚展开的那一行的信息,
|
|
1249
|
+
* 以及折叠、重新测量该面板的操作,因此在自定义面板内也能反向操作表格。
|
|
1250
|
+
*/
|
|
1251
|
+
export interface DetailRenderApi<T = any> {
|
|
1252
|
+
/**
|
|
1253
|
+
* 이 패널을 소유한 그리드 인스턴스.
|
|
1254
|
+
*
|
|
1255
|
+
* The grid instance owning this panel.
|
|
1256
|
+
*
|
|
1257
|
+
* このパネルを所有するグリッドインスタンス。
|
|
1258
|
+
*
|
|
1259
|
+
* 拥有此面板的表格实例。
|
|
1260
|
+
*/
|
|
1261
|
+
grid: OpenGridInstance<T>;
|
|
1262
|
+
/**
|
|
1263
|
+
* 펼쳐진 행의 안정적 id.
|
|
1264
|
+
*
|
|
1265
|
+
* Stable id of the expanded row.
|
|
1266
|
+
*
|
|
1267
|
+
* 展開された行の安定した id。
|
|
1268
|
+
*
|
|
1269
|
+
* 已展开行的稳定 id。
|
|
1270
|
+
*/
|
|
259
1271
|
rowId: string;
|
|
260
|
-
/**
|
|
1272
|
+
/**
|
|
1273
|
+
* 이 그리드가 몇 겹째 중첩인지. 0 = 최상위.
|
|
1274
|
+
*
|
|
1275
|
+
* How deeply nested this grid is. 0 = top level.
|
|
1276
|
+
*
|
|
1277
|
+
* このグリッドが何重目の入れ子か。0 = 最上位。
|
|
1278
|
+
*
|
|
1279
|
+
* 此表格嵌套到第几层。0 = 最顶层。
|
|
1280
|
+
*/
|
|
261
1281
|
depth: number;
|
|
262
|
-
/**
|
|
1282
|
+
/**
|
|
1283
|
+
* 이 패널을 접습니다.
|
|
1284
|
+
*
|
|
1285
|
+
* Collapse this panel.
|
|
1286
|
+
*
|
|
1287
|
+
* このパネルを折りたたみます。
|
|
1288
|
+
*
|
|
1289
|
+
* 折叠此面板。
|
|
1290
|
+
*/
|
|
263
1291
|
collapse: () => void;
|
|
264
|
-
/**
|
|
1292
|
+
/**
|
|
1293
|
+
* 패널 크기를 다시 잽니다.
|
|
1294
|
+
*
|
|
1295
|
+
* Re-measure the panel.
|
|
1296
|
+
*
|
|
1297
|
+
* パネルの大きさを測り直します。
|
|
1298
|
+
*
|
|
1299
|
+
* 重新测量面板的尺寸。
|
|
1300
|
+
*/
|
|
265
1301
|
refresh: () => void;
|
|
266
1302
|
}
|
|
267
|
-
/**
|
|
1303
|
+
/**
|
|
1304
|
+
* 각 행을 펼치면 그 아래에 딸린 상세 패널이 열리는 마스터/디테일 기능의 설정입니다. 주문 목록에서 한 줄을
|
|
1305
|
+
* 열면 주문 상세가, 부서 목록에서 한 줄을 열면 소속 직원 표가 펼쳐지는 식입니다. 패널 내용은 두 가지 방법으로
|
|
1306
|
+
* 채웁니다 — 직접 HTML 을 그리는 renderer 를 주거나, 자식 그리드를 자동 생성하는 subgridOptions 를 줍니다.
|
|
1307
|
+
*
|
|
1308
|
+
* Master/detail: expanding a row opens an attached detail panel beneath it — open an order to see
|
|
1309
|
+
* its lines, open a department to see its staff. Fill the panel either by drawing HTML yourself
|
|
1310
|
+
* (renderer) or by auto-creating a child grid (subgridOptions).
|
|
1311
|
+
*
|
|
1312
|
+
* 各行を展開すると、その下に付随する詳細パネルが開くマスター/ディテール機能の設定です。注文一覧で一行を
|
|
1313
|
+
* 開けば注文の明細が、部署一覧で一行を開けば所属社員の表が展開される、といった具合です。パネルの中身は
|
|
1314
|
+
* 二つの方法で埋めます — 直接HTMLを描く renderer を渡すか、子グリッドを自動生成する subgridOptions を渡します。
|
|
1315
|
+
*
|
|
1316
|
+
* 主从(Master/detail): 展开一行,其下方就打开一个附属的详情面板 —— 展开一张订单看它的明细,
|
|
1317
|
+
* 展开一个部门看它的员工。面板内容用两种方式填充 —— 传入自行绘制 HTML 的 renderer,
|
|
1318
|
+
* 或传入自动生成子表格的 subgridOptions。
|
|
1319
|
+
*/
|
|
268
1320
|
export interface MasterDetailOptions<T = any> {
|
|
269
|
-
/**
|
|
1321
|
+
/**
|
|
1322
|
+
* 기능 켜기/끄기. 기본 false(꺼짐).
|
|
1323
|
+
*
|
|
1324
|
+
* Turn the feature on/off. Default false (off).
|
|
1325
|
+
*
|
|
1326
|
+
* 機能のオン/オフ。既定 false(オフ)。
|
|
1327
|
+
*
|
|
1328
|
+
* 功能开/关。默认 false(关闭)。
|
|
1329
|
+
*/
|
|
270
1330
|
enabled?: boolean;
|
|
271
|
-
/**
|
|
1331
|
+
/**
|
|
1332
|
+
* 패널 안을 직접 그리는 함수(host 요소에 HTML/컴포넌트 주입). subgridOptions 와 같이 주면 이쪽이 우선.
|
|
1333
|
+
*
|
|
1334
|
+
* A function that draws the panel yourself (inject HTML/components into host). Wins over subgridOptions if both given.
|
|
1335
|
+
*
|
|
1336
|
+
* パネルの中を自分で描く関数(host 要素にHTML/コンポーネントを注入)。subgridOptions と一緒に渡した場合はこちらが優先。
|
|
1337
|
+
*
|
|
1338
|
+
* 自行绘制面板内容的函数(向 host 元素注入 HTML/组件)。与 subgridOptions 同时给出时,以此为优先。
|
|
1339
|
+
*/
|
|
272
1340
|
renderer?: (row: T, host: HTMLElement, api: DetailRenderApi<T>) => void | HTMLElement;
|
|
273
|
-
/**
|
|
1341
|
+
/**
|
|
1342
|
+
* 패널의 세로 높이(px). 기본 200. 현재는 행 높이의 배수로 맞춰집니다.
|
|
1343
|
+
*
|
|
1344
|
+
* Panel height (px). Default 200. Currently snapped to a multiple of the row height.
|
|
1345
|
+
*
|
|
1346
|
+
* パネルの縦の高さ(px)。既定 200。現在は行の高さの倍数に合わせられます。
|
|
1347
|
+
*
|
|
1348
|
+
* 面板的高度(px)。默认 200。目前会对齐到行高的整数倍。
|
|
1349
|
+
*/
|
|
274
1350
|
height?: number;
|
|
275
1351
|
/**
|
|
276
|
-
* 'fixed'(기본)만
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
1352
|
+
* 패널 높이를 어떻게 정할지. 'fixed'(기본)만 지금 동작합니다. 'auto'(내용에 맞춰 자동)는 아직 미공개라,
|
|
1353
|
+
* 지정해도 'fixed' 로 처리되고 한 번 경고를 남깁니다.
|
|
1354
|
+
*
|
|
1355
|
+
* How the panel height is decided. Only 'fixed' (default) works today. 'auto' (fit-to-content) is
|
|
1356
|
+
* not released yet — if set, it's treated as 'fixed' and warns once.
|
|
1357
|
+
*
|
|
1358
|
+
* パネルの高さをどう決めるか。今は 'fixed'(既定)だけが動作します。'auto'(内容に合わせて自動)はまだ未公開なので、
|
|
1359
|
+
* 指定しても 'fixed' として扱われ、警告を一度だけ残します。
|
|
1360
|
+
*
|
|
1361
|
+
* 面板高度如何决定。目前只有 'fixed'(默认)可用。'auto'(随内容自适应)尚未公开 ——
|
|
1362
|
+
* 即使指定也按 'fixed' 处理,并只警告一次。
|
|
280
1363
|
*/
|
|
281
1364
|
heightMode?: 'fixed' | 'auto';
|
|
282
|
-
/**
|
|
1365
|
+
/**
|
|
1366
|
+
* 여러 행을 동시에 펼쳐 둘지. 기본 true. false 로 하면 아코디언처럼 한 번에 하나만 열립니다.
|
|
1367
|
+
*
|
|
1368
|
+
* Whether several rows can stay open at once. Default true; false = accordion (one open at a time).
|
|
1369
|
+
*
|
|
1370
|
+
* 複数の行を同時に展開しておくか。既定 true。false にするとアコーディオンのように一度に一つだけ開きます。
|
|
1371
|
+
*
|
|
1372
|
+
* 是否允许多行同时保持展开。默认 true;false 则像手风琴那样一次只开一个。
|
|
1373
|
+
*/
|
|
283
1374
|
expandMultiple?: boolean;
|
|
284
|
-
/**
|
|
1375
|
+
/**
|
|
1376
|
+
* true 면 접어도 패널 내용을 캐시로 남겨 다시 펼칠 때 재생성을 건너뜁니다. 기본 false.
|
|
1377
|
+
*
|
|
1378
|
+
* true keeps the panel cached when collapsed, skipping rebuild on re-expand. Default false.
|
|
1379
|
+
*
|
|
1380
|
+
* true なら折りたたんでもパネルの中身をキャッシュに残し、再び展開するときの作り直しを省きます。既定 false。
|
|
1381
|
+
*
|
|
1382
|
+
* true 时折叠后仍把面板内容留在缓存里,再次展开时省去重建。默认 false。
|
|
1383
|
+
*/
|
|
285
1384
|
cache?: boolean;
|
|
286
|
-
/**
|
|
1385
|
+
/**
|
|
1386
|
+
* 펼침/접힘 버튼을 어디에 둘지. 기본 'expander-col'(전용 컬럼). 'first-cell'=첫 셀 안.
|
|
1387
|
+
*
|
|
1388
|
+
* Where the expand toggle sits. Default 'expander-col' (a dedicated column); 'first-cell' = inside the first cell.
|
|
1389
|
+
*
|
|
1390
|
+
* 展開/折りたたみボタンをどこに置くか。既定 'expander-col'(専用の列)。'first-cell' = 最初のセルの中。
|
|
1391
|
+
*
|
|
1392
|
+
* 展开/折叠按钮放在哪里。默认 'expander-col'(专用列);'first-cell' = 第一个单元格内。
|
|
1393
|
+
*/
|
|
287
1394
|
toggle?: 'expander-col' | 'first-cell';
|
|
288
|
-
/**
|
|
1395
|
+
/**
|
|
1396
|
+
* 스크린리더가 읽을 패널 영역 이름. 기본 '상세 내용'.
|
|
1397
|
+
*
|
|
1398
|
+
* The panel region's screen-reader label. Default '상세 내용' (Details).
|
|
1399
|
+
*
|
|
1400
|
+
* スクリーンリーダーが読むパネル領域の名前。既定 '상세 내용'(詳細内容)。
|
|
1401
|
+
*
|
|
1402
|
+
* 屏幕阅读器朗读的面板区域名称。默认 '상세 내용'(详情内容)。
|
|
1403
|
+
*/
|
|
289
1404
|
ariaLabel?: string;
|
|
290
|
-
/**
|
|
1405
|
+
/**
|
|
1406
|
+
* 패널 안에 또 패널을 열 수 있는 최대 겹수. 기본 2.
|
|
1407
|
+
*
|
|
1408
|
+
* How many levels of nested panels are allowed. Default 2.
|
|
1409
|
+
*
|
|
1410
|
+
* パネルの中にさらにパネルを開ける最大の重なり数。既定 2。
|
|
1411
|
+
*
|
|
1412
|
+
* 面板内再开面板的最大层数。默认 2。
|
|
1413
|
+
*/
|
|
291
1414
|
maxDepth?: number;
|
|
292
|
-
/**
|
|
1415
|
+
/**
|
|
1416
|
+
* 지정하면 height(px) 대신 "행 몇 개 높이"(정수, 최소 1)로 패널 높이를 정합니다.
|
|
1417
|
+
*
|
|
1418
|
+
* When set, sizes the panel by row-count (integer, min 1) instead of height(px).
|
|
1419
|
+
*
|
|
1420
|
+
* 指定すると、height(px)の代わりに「行いくつ分の高さ」(整数、最小 1)でパネルの高さを決めます。
|
|
1421
|
+
*
|
|
1422
|
+
* 指定后,用「几行的高度」(整数,最小 1)代替 height(px)来决定面板高度。
|
|
1423
|
+
*/
|
|
293
1424
|
detailRowCount?: number;
|
|
294
|
-
/**
|
|
1425
|
+
/**
|
|
1426
|
+
* renderer 를 안 줬을 때, 이 옵션으로 자식 그리드를 자동 생성해 패널을 채웁니다.
|
|
1427
|
+
*
|
|
1428
|
+
* When no renderer is given, auto-create a child grid from these options to fill the panel.
|
|
1429
|
+
*
|
|
1430
|
+
* renderer を渡さなかったとき、このオプションで子グリッドを自動生成してパネルを埋めます。
|
|
1431
|
+
*
|
|
1432
|
+
* 未传入 renderer 时,用这个选项自动生成子表格来填充面板。
|
|
1433
|
+
*/
|
|
295
1434
|
subgridOptions?: GridOptions<any>;
|
|
296
1435
|
}
|
|
297
|
-
/**
|
|
1436
|
+
/**
|
|
1437
|
+
* 행 상세 패널이 펼쳐지거나(rowExpand) 접힐 때(rowCollapse) 핸들러로 오는 정보입니다.
|
|
1438
|
+
* 어느 행인지와, 그 상세 패널이 붙은 DOM 요소(host)를 함께 줍니다.
|
|
1439
|
+
*
|
|
1440
|
+
* Delivered when a row's detail panel expands (rowExpand) or collapses (rowCollapse). It tells you
|
|
1441
|
+
* which row it was and the DOM element (host) the detail panel is attached to.
|
|
1442
|
+
*
|
|
1443
|
+
* 行の詳細パネルが展開されたとき(rowExpand)、または折りたたまれたとき(rowCollapse)にハンドラーへ届く情報です。
|
|
1444
|
+
* どの行かと、その詳細パネルが付いているDOM要素(host)を一緒に渡します。
|
|
1445
|
+
*
|
|
1446
|
+
* 行的详情面板展开(rowExpand)或折叠(rowCollapse)时送到处理函数的信息。它告诉你是哪一行,
|
|
1447
|
+
* 以及详情面板挂在哪个 DOM 元素(host)上。
|
|
1448
|
+
*/
|
|
298
1449
|
export interface RowExpandEvent<T = any> {
|
|
299
|
-
/**
|
|
1450
|
+
/**
|
|
1451
|
+
* 대상 행의 화면 표시 순서 인덱스.
|
|
1452
|
+
*
|
|
1453
|
+
* Screen-order index of the target row.
|
|
1454
|
+
*
|
|
1455
|
+
* 対象行の画面表示順のインデックス。
|
|
1456
|
+
*
|
|
1457
|
+
* 目标行按屏幕显示顺序的索引。
|
|
1458
|
+
*/
|
|
300
1459
|
rowIndex: number;
|
|
1460
|
+
/**
|
|
1461
|
+
* 대상 행의 안정적 id.
|
|
1462
|
+
*
|
|
1463
|
+
* Stable id of the target row.
|
|
1464
|
+
*
|
|
1465
|
+
* 対象行の安定した id。
|
|
1466
|
+
*
|
|
1467
|
+
* 目标行的稳定 id。
|
|
1468
|
+
*/
|
|
301
1469
|
rowId: string;
|
|
1470
|
+
/**
|
|
1471
|
+
* 그 행의 데이터 객체.
|
|
1472
|
+
*
|
|
1473
|
+
* The row-data object.
|
|
1474
|
+
*
|
|
1475
|
+
* その行のデータオブジェクト。
|
|
1476
|
+
*
|
|
1477
|
+
* 该行的数据对象。
|
|
1478
|
+
*/
|
|
302
1479
|
row: T;
|
|
1480
|
+
/**
|
|
1481
|
+
* 상세 패널이 붙은 DOM 요소(접힘 이벤트에서는 null 일 수 있음).
|
|
1482
|
+
*
|
|
1483
|
+
* The DOM element the detail panel is attached to (may be null on collapse).
|
|
1484
|
+
*
|
|
1485
|
+
* 詳細パネルが付いているDOM要素(折りたたみイベントでは null のことがある)。
|
|
1486
|
+
*
|
|
1487
|
+
* 详情面板挂载的 DOM 元素(折叠事件中可能为 null)。
|
|
1488
|
+
*/
|
|
303
1489
|
host: HTMLElement | null;
|
|
304
1490
|
}
|
|
305
|
-
/**
|
|
1491
|
+
/**
|
|
1492
|
+
* 셀을 어떻게 그릴지 자세히 지정합니다. 렌더러 타입 이름만으로 부족해 부가 설정까지 주고 싶을 때
|
|
1493
|
+
* 씁니다(`column.renderer` 에 문자열 대신 이 객체를 넘김). `type` 이외의 키는 렌더러마다 다르게 해석됩니다.
|
|
1494
|
+
*
|
|
1495
|
+
* Detailed spec for how a cell is drawn. Use it (instead of a bare renderer-type string in
|
|
1496
|
+
* `column.renderer`) when the renderer needs extra settings. Keys beyond `type` are
|
|
1497
|
+
* renderer-specific.
|
|
1498
|
+
*
|
|
1499
|
+
* セルをどう描くかを詳しく指定します。レンダラーのタイプ名だけでは足りず、付加設定まで渡したいときに
|
|
1500
|
+
* 使います(`column.renderer` に文字列ではなくこのオブジェクトを渡す)。`type` 以外のキーはレンダラーごとに
|
|
1501
|
+
* 異なる解釈をされます。
|
|
1502
|
+
*
|
|
1503
|
+
* 单元格如何绘制的详细规格。当渲染器需要额外设置时,用它代替 `column.renderer` 里裸的渲染器类型字符串。
|
|
1504
|
+
* `type` 以外的键由各渲染器分别解释。
|
|
1505
|
+
*/
|
|
306
1506
|
export interface RendererDef {
|
|
1507
|
+
/**
|
|
1508
|
+
* 사용할 내장 렌더러 이름.
|
|
1509
|
+
*
|
|
1510
|
+
* Which built-in renderer to use.
|
|
1511
|
+
*
|
|
1512
|
+
* 使用する組み込みレンダラーの名前。
|
|
1513
|
+
*
|
|
1514
|
+
* 使用哪个内置渲染器。
|
|
1515
|
+
*/
|
|
307
1516
|
type: RendererType;
|
|
1517
|
+
/**
|
|
1518
|
+
* 렌더러별 추가 옵션(자유 키).
|
|
1519
|
+
*
|
|
1520
|
+
* Renderer-specific extra options (free-form keys).
|
|
1521
|
+
*
|
|
1522
|
+
* レンダラーごとの追加オプション(自由なキー)。
|
|
1523
|
+
*
|
|
1524
|
+
* 各渲染器专有的额外选项(自由键)。
|
|
1525
|
+
*/
|
|
308
1526
|
[key: string]: any;
|
|
309
1527
|
}
|
|
310
|
-
/**
|
|
1528
|
+
/**
|
|
1529
|
+
* 편집기를 어떻게 열지 자세히 지정합니다. 예를 들어 `select` 편집기에 선택지 목록을,
|
|
1530
|
+
* `number` 편집기에 최소·최대·증가폭을 함께 줄 때 씁니다(`column.editor` 에 이 객체를 넘김).
|
|
1531
|
+
*
|
|
1532
|
+
* Detailed spec for how the editor opens — e.g. a `select` editor's choices, or a `number`
|
|
1533
|
+
* editor's min/max/step (passed to `column.editor`).
|
|
1534
|
+
*
|
|
1535
|
+
* エディターをどう開くかを詳しく指定します。たとえば `select` エディターに選択肢の一覧を、
|
|
1536
|
+
* `number` エディターに最小・最大・増減幅を一緒に渡すときに使います(`column.editor` にこのオブジェクトを渡す)。
|
|
1537
|
+
*
|
|
1538
|
+
* 详细指定编辑器如何打开。例如给 `select` 编辑器传选项列表,或给 `number` 编辑器传最小值、
|
|
1539
|
+
* 最大值和步长(把该对象传给 `column.editor`)。
|
|
1540
|
+
*/
|
|
311
1541
|
export interface EditorDef {
|
|
1542
|
+
/**
|
|
1543
|
+
* 사용할 내장 편집기 이름.
|
|
1544
|
+
*
|
|
1545
|
+
* Which built-in editor to use.
|
|
1546
|
+
*
|
|
1547
|
+
* 使用する組み込みエディターの名前。
|
|
1548
|
+
*
|
|
1549
|
+
* 使用的内置编辑器名称。
|
|
1550
|
+
*/
|
|
312
1551
|
type: EditorType;
|
|
1552
|
+
/**
|
|
1553
|
+
* select 편집기의 선택지(문자열 또는 {label,value}).
|
|
1554
|
+
*
|
|
1555
|
+
* Choices for a select editor.
|
|
1556
|
+
*
|
|
1557
|
+
* select エディターの選択肢(文字列または {label,value})。
|
|
1558
|
+
*
|
|
1559
|
+
* select 编辑器的选项(字符串或 {label,value})。
|
|
1560
|
+
*/
|
|
313
1561
|
options?: Array<string | {
|
|
314
1562
|
label: string;
|
|
315
1563
|
value: any;
|
|
316
1564
|
}>;
|
|
1565
|
+
/**
|
|
1566
|
+
* select 에서 다중 선택 허용.
|
|
1567
|
+
*
|
|
1568
|
+
* Allow multiple selection in select.
|
|
1569
|
+
*
|
|
1570
|
+
* select での複数選択を許可。
|
|
1571
|
+
*
|
|
1572
|
+
* 允许 select 多选。
|
|
1573
|
+
*/
|
|
317
1574
|
multiple?: boolean;
|
|
1575
|
+
/**
|
|
1576
|
+
* number 편집기의 최솟값.
|
|
1577
|
+
*
|
|
1578
|
+
* Minimum for a number editor.
|
|
1579
|
+
*
|
|
1580
|
+
* number エディターの最小値。
|
|
1581
|
+
*
|
|
1582
|
+
* number 编辑器的最小值。
|
|
1583
|
+
*/
|
|
318
1584
|
min?: number;
|
|
1585
|
+
/**
|
|
1586
|
+
* number 편집기의 최댓값.
|
|
1587
|
+
*
|
|
1588
|
+
* Maximum for a number editor.
|
|
1589
|
+
*
|
|
1590
|
+
* number エディターの最大値。
|
|
1591
|
+
*
|
|
1592
|
+
* number 编辑器的最大值。
|
|
1593
|
+
*/
|
|
319
1594
|
max?: number;
|
|
1595
|
+
/**
|
|
1596
|
+
* number 편집기의 증가 단위.
|
|
1597
|
+
*
|
|
1598
|
+
* Step increment for a number editor.
|
|
1599
|
+
*
|
|
1600
|
+
* number エディターの増減の単位。
|
|
1601
|
+
*
|
|
1602
|
+
* number 编辑器的步长。
|
|
1603
|
+
*/
|
|
320
1604
|
step?: number;
|
|
1605
|
+
/**
|
|
1606
|
+
* 입력값 포맷 문자열.
|
|
1607
|
+
*
|
|
1608
|
+
* Format string for the input value.
|
|
1609
|
+
*
|
|
1610
|
+
* 入力値のフォーマット文字列。
|
|
1611
|
+
*
|
|
1612
|
+
* 输入值的格式字符串。
|
|
1613
|
+
*/
|
|
321
1614
|
format?: string;
|
|
1615
|
+
/**
|
|
1616
|
+
* 빈 편집기에 보일 안내 문구.
|
|
1617
|
+
*
|
|
1618
|
+
* Placeholder shown in an empty editor.
|
|
1619
|
+
*
|
|
1620
|
+
* 空のエディターに表示する案内文。
|
|
1621
|
+
*
|
|
1622
|
+
* 编辑器为空时显示的提示文字。
|
|
1623
|
+
*/
|
|
322
1624
|
placeholder?: string;
|
|
1625
|
+
/**
|
|
1626
|
+
* 편집기별 추가 옵션(자유 키).
|
|
1627
|
+
*
|
|
1628
|
+
* Editor-specific extra options (free-form keys).
|
|
1629
|
+
*
|
|
1630
|
+
* エディターごとの追加オプション(自由なキー)。
|
|
1631
|
+
*
|
|
1632
|
+
* 各编辑器的额外选项(自由键)。
|
|
1633
|
+
*/
|
|
323
1634
|
[key: string]: any;
|
|
324
1635
|
}
|
|
325
1636
|
/**
|
|
326
|
-
* 컬럼
|
|
1637
|
+
* 컬럼 한 개를 어떻게 보이고 동작하게 할지 담는 설정 뭉치입니다. 그리드는 `columns` 배열에 담긴 이
|
|
1638
|
+
* 정의들을 왼쪽부터 순서대로 그립니다. 최소한 `field`(어떤 데이터를 보여줄지)와 `header`(머리글 글자)만
|
|
1639
|
+
* 있으면 되고, 나머지는 필요할 때만 켜는 선택 항목입니다.
|
|
1640
|
+
*
|
|
1641
|
+
* The settings bundle for a single column — what it shows and how it behaves. The grid draws the
|
|
1642
|
+
* definitions in the `columns` array left to right. Only `field` (which data to show) and `header`
|
|
1643
|
+
* (the caption) are required; everything else is opt-in.
|
|
1644
|
+
*
|
|
1645
|
+
* 列一つをどう見せ、どう動かすかを収めた設定のまとまりです。グリッドは `columns` 配列に入ったこれらの
|
|
1646
|
+
* 定義を、左から順に描きます。最低限 `field`(どのデータを見せるか)と `header`(ヘッダーの文字)だけあればよく、
|
|
1647
|
+
* 残りは必要なときだけ有効にする任意の項目です。
|
|
1648
|
+
*
|
|
1649
|
+
* 单个列的设置集合——它显示什么、如何工作。表格按 `columns` 数组中的定义从左到右绘制。
|
|
1650
|
+
* 只有 `field`(显示哪个数据)和 `header`(表头文字)是必需的,其余都按需启用。
|
|
1651
|
+
*
|
|
1652
|
+
* @typeParam T - 행 데이터 타입
|
|
1653
|
+
*
|
|
1654
|
+
* Row data type
|
|
1655
|
+
*
|
|
1656
|
+
* 行データの型
|
|
1657
|
+
*
|
|
1658
|
+
* 行数据类型
|
|
327
1659
|
*
|
|
328
|
-
* @typeParam T - 행 데이터 타입 / Row data type
|
|
329
1660
|
* @example
|
|
330
1661
|
* const col: ColumnDef = { field: 'price', header: '가격', type: 'number', format: '#,##0' };
|
|
331
1662
|
*/
|
|
332
1663
|
export interface ColumnDef<T = any> {
|
|
333
|
-
/**
|
|
1664
|
+
/**
|
|
1665
|
+
* 이 컬럼이 읽어 올 행 객체의 속성 이름(예: 행이 `{price: 1000}` 이면 `'price'`). 컬럼마다 고유.
|
|
1666
|
+
*
|
|
1667
|
+
* The row-object property this column reads (e.g. `'price'` for a row `{price: 1000}`). Unique per column.
|
|
1668
|
+
*
|
|
1669
|
+
* この列が読み取る行オブジェクトのプロパティ名(例: 行が `{price: 1000}` なら `'price'`)。列ごとに一意。
|
|
1670
|
+
*
|
|
1671
|
+
* 该列读取的行对象属性名(例如行为 `{price: 1000}` 时为 `'price'`)。每列唯一。
|
|
1672
|
+
*/
|
|
334
1673
|
field: string;
|
|
335
|
-
/**
|
|
1674
|
+
/**
|
|
1675
|
+
* 머리글에 보일 글자. 문자열 안의 '\n' 은 두 줄로 나뉩니다.
|
|
1676
|
+
*
|
|
1677
|
+
* The caption shown in the header. A '\n' inside splits into two lines.
|
|
1678
|
+
*
|
|
1679
|
+
* ヘッダーに表示する文字。文字列の中の '\n' は二行に分かれます。
|
|
1680
|
+
*
|
|
1681
|
+
* 表头显示的文字。字符串中的 '\n' 会分成两行。
|
|
1682
|
+
*/
|
|
336
1683
|
header: string;
|
|
337
|
-
/**
|
|
1684
|
+
/**
|
|
1685
|
+
* 이 폭(px)으로 고정. 지정하면 flex 를 무시하고 정확히 이 값이 됩니다.
|
|
1686
|
+
*
|
|
1687
|
+
* Pin this width (px). When set it overrides flex and stays exactly this.
|
|
1688
|
+
*
|
|
1689
|
+
* この幅(px)で固定。指定すると flex を無視して、正確にこの値になります。
|
|
1690
|
+
*
|
|
1691
|
+
* 固定为该宽度(px)。指定后忽略 flex,精确保持此值。
|
|
1692
|
+
*/
|
|
338
1693
|
width?: number;
|
|
339
|
-
/**
|
|
1694
|
+
/**
|
|
1695
|
+
* 줄어들 때 넘지 않을 최소 폭(px).
|
|
1696
|
+
*
|
|
1697
|
+
* Lower bound (px) the column won't shrink past.
|
|
1698
|
+
*
|
|
1699
|
+
* 縮むときにこれ以上は超えない最小の幅(px)。
|
|
1700
|
+
*
|
|
1701
|
+
* 收缩时不低于的最小宽度(px)。
|
|
1702
|
+
*/
|
|
340
1703
|
minWidth?: number;
|
|
341
|
-
/**
|
|
1704
|
+
/**
|
|
1705
|
+
* 늘어날 때 넘지 않을 최대 폭(px).
|
|
1706
|
+
*
|
|
1707
|
+
* Upper bound (px) the column won't grow past.
|
|
1708
|
+
*
|
|
1709
|
+
* 広がるときにこれ以上は超えない最大の幅(px)。
|
|
1710
|
+
*
|
|
1711
|
+
* 扩展时不超过的最大宽度(px)。
|
|
1712
|
+
*/
|
|
342
1713
|
maxWidth?: number;
|
|
343
|
-
/**
|
|
1714
|
+
/**
|
|
1715
|
+
* 남는 가로 공간을 컬럼끼리 나눌 때의 비율. 값이 클수록 더 많이 차지합니다(width 미지정 컬럼끼리).
|
|
1716
|
+
*
|
|
1717
|
+
* Weight for sharing leftover horizontal space — higher takes more (among columns without width).
|
|
1718
|
+
*
|
|
1719
|
+
* 余った横方向のスペースを列どうしで分けるときの比率。値が大きいほど多く占めます(width を指定していない列どうしで)。
|
|
1720
|
+
*
|
|
1721
|
+
* 分配剩余横向空间的比例。值越大占得越多(在未指定 width 的列之间)。
|
|
1722
|
+
*/
|
|
344
1723
|
flex?: number;
|
|
345
|
-
/**
|
|
1724
|
+
/**
|
|
1725
|
+
* 이 컬럼 값의 종류. 이걸 정하면 그에 맞는 정렬 방식과 기본 렌더러가 자동으로 붙습니다
|
|
1726
|
+
* (예: 'number' 는 오른쪽 정렬 + 숫자 비교). 지정하지 않으면 문자열처럼 다룹니다.
|
|
1727
|
+
*
|
|
1728
|
+
* The kind of value here. Setting it auto-wires the matching sort behavior and default renderer
|
|
1729
|
+
* (e.g. 'number' → right-aligned + numeric compare). Unset behaves like a string.
|
|
1730
|
+
*
|
|
1731
|
+
* この列の値の種類。これを決めると、それに合ったソート方式と既定のレンダラーが自動で付きます
|
|
1732
|
+
* (例: 'number' は右揃え + 数値比較)。指定しない場合は文字列のように扱います。
|
|
1733
|
+
*
|
|
1734
|
+
* 该列的值的种类。设定后会自动接上相应的排序方式和默认渲染器
|
|
1735
|
+
* (例如 'number' 为右对齐 + 按数值比较)。不指定时按字符串处理。
|
|
1736
|
+
*/
|
|
346
1737
|
type?: DataType;
|
|
347
1738
|
/**
|
|
348
1739
|
* 숫자/날짜 포맷 문자열. 숫자는 통화 기호 접두·접미와 음수 패턴 지원:
|
|
349
1740
|
* '#,##0' · '#,##0.00' · '₩#,##0' · '$#,##0.00' · '#,##0원' · '$#,##0;($#,##0)'(음수 괄호)
|
|
350
|
-
*
|
|
1741
|
+
*
|
|
1742
|
+
* Number/date format string. Numbers support currency prefixes/suffixes and negative
|
|
351
1743
|
* patterns, e.g. '$#,##0;($#,##0)' (parentheses for negatives).
|
|
1744
|
+
*
|
|
1745
|
+
* 数値/日付のフォーマット文字列。数値は通貨記号の前置・後置と、負数パターンに対応:
|
|
1746
|
+
* '#,##0' · '#,##0.00' · '₩#,##0' · '$#,##0.00' · '#,##0원' · '$#,##0;($#,##0)'(負数は括弧)
|
|
1747
|
+
*
|
|
1748
|
+
* 数值/日期的格式字符串。数值支持货币符号前置、后置和负数模式:
|
|
1749
|
+
* '#,##0' · '#,##0.00' · '₩#,##0' · '$#,##0.00' · '#,##0원' · '$#,##0;($#,##0)'(负数加括号)
|
|
352
1750
|
*/
|
|
353
1751
|
format?: string;
|
|
354
|
-
/**
|
|
1752
|
+
/**
|
|
1753
|
+
* ISO 통화코드('KRW'|'USD'|'EUR'…). 지정 시 Intl.NumberFormat 로케일 통화 포맷 (format 보다 우선)
|
|
1754
|
+
*
|
|
1755
|
+
* ISO currency code; uses Intl.NumberFormat locale currency formatting (takes precedence over format)
|
|
1756
|
+
*
|
|
1757
|
+
* ISO通貨コード('KRW'|'USD'|'EUR' など)。指定すると Intl.NumberFormat のロケール通貨フォーマット(format より優先)
|
|
1758
|
+
*
|
|
1759
|
+
* ISO 货币代码('KRW'|'USD'|'EUR' 等)。指定后使用 Intl.NumberFormat 的区域货币格式(优先于 format)
|
|
1760
|
+
*/
|
|
355
1761
|
currency?: string;
|
|
356
|
-
/**
|
|
1762
|
+
/**
|
|
1763
|
+
* 저장된 코드값을 사람이 읽는 말로 바꿔 보여줄 때(예: `{ 'M': '남', 'F': '여' }`).
|
|
1764
|
+
*
|
|
1765
|
+
* Show human-readable text for stored codes (e.g. `{ 'M':'Male', 'F':'Female' }`).
|
|
1766
|
+
*
|
|
1767
|
+
* 保存されたコード値を、人が読める言葉に変えて見せるとき(例: `{ 'M': '남', 'F': '여' }`)。
|
|
1768
|
+
*
|
|
1769
|
+
* 把保存的代码值换成人能读懂的文字显示(例如 `{ 'M': '남', 'F': '여' }`)。
|
|
1770
|
+
*/
|
|
357
1771
|
valueMap?: Record<string, string>;
|
|
358
|
-
/**
|
|
1772
|
+
/**
|
|
1773
|
+
* 셀을 그리는 방식. 내장 렌더러 이름 한 줄로 주거나, 부가 옵션이 필요하면 RendererDef 객체로 줍니다.
|
|
1774
|
+
*
|
|
1775
|
+
* How the cell is drawn — a built-in renderer name, or a RendererDef object when extras are needed.
|
|
1776
|
+
*
|
|
1777
|
+
* セルを描く方式。組み込みレンダラーの名前を一行で渡すか、付加オプションが必要なら RendererDef オブジェクトで渡します。
|
|
1778
|
+
*
|
|
1779
|
+
* 单元格的绘制方式。用一行传内置渲染器名称,需要附加选项时传 RendererDef 对象。
|
|
1780
|
+
*/
|
|
359
1781
|
renderer?: RendererType | RendererDef;
|
|
360
|
-
/**
|
|
1782
|
+
/**
|
|
1783
|
+
* 이 컬럼을 편집할 수 있는지. true 면 항상 편집 가능, 함수로 주면 행마다 다르게 결정합니다
|
|
1784
|
+
* (예: 상태가 '확정'인 행만 잠그기). GridOptions.editable 과 둘 다 참일 때만 실제로 열립니다.
|
|
1785
|
+
*
|
|
1786
|
+
* Whether this column is editable. true = always; a function decides per row (e.g. lock only
|
|
1787
|
+
* 'finalized' rows). Editing opens only when this AND GridOptions.editable are true.
|
|
1788
|
+
*
|
|
1789
|
+
* この列を編集できるかどうか。true なら常に編集可能、関数で渡せば行ごとに違う判断をします
|
|
1790
|
+
* (例: 状態が「確定」の行だけロックする)。GridOptions.editable と両方が真のときにだけ実際に開きます。
|
|
1791
|
+
*
|
|
1792
|
+
* 该列能否编辑。true 表示始终可编辑,传函数则按行判断(例如只锁定状态为「确定」的行)。
|
|
1793
|
+
* 只有它与 GridOptions.editable 同时为真时才会真正打开。
|
|
1794
|
+
*/
|
|
361
1795
|
editable?: boolean | ((row: T, rowIndex: number) => boolean);
|
|
362
|
-
/**
|
|
1796
|
+
/**
|
|
1797
|
+
* 편집기 종류. 내장 편집기 이름 한 줄로 주거나, 선택지·최소/최대 등이 필요하면 EditorDef 객체로 줍니다.
|
|
1798
|
+
*
|
|
1799
|
+
* The editor — a built-in editor name, or an EditorDef object for choices/min/max, etc.
|
|
1800
|
+
*
|
|
1801
|
+
* エディターの種類。組み込みエディターの名前を一行で渡すか、選択肢・最小/最大などが必要なら EditorDef オブジェクトで渡します。
|
|
1802
|
+
*
|
|
1803
|
+
* 编辑器种类。用一行传内置编辑器名称,需要选项、最小/最大等时传 EditorDef 对象。
|
|
1804
|
+
*/
|
|
363
1805
|
editor?: EditorType | EditorDef;
|
|
364
|
-
/**
|
|
1806
|
+
/**
|
|
1807
|
+
* 셀 정렬.
|
|
1808
|
+
*
|
|
1809
|
+
* Cell text alignment.
|
|
1810
|
+
*
|
|
1811
|
+
* セルの文字揃え。
|
|
1812
|
+
*
|
|
1813
|
+
* 单元格的文字对齐。
|
|
1814
|
+
*/
|
|
365
1815
|
align?: 'left' | 'center' | 'right';
|
|
366
|
-
/**
|
|
367
|
-
|
|
368
|
-
|
|
1816
|
+
/**
|
|
1817
|
+
* 헤더 정렬.
|
|
1818
|
+
*
|
|
1819
|
+
* Header text alignment.
|
|
1820
|
+
*
|
|
1821
|
+
* ヘッダーの文字揃え。
|
|
1822
|
+
*
|
|
1823
|
+
* 表头的文字对齐。
|
|
1824
|
+
*/
|
|
1825
|
+
headerAlign?: 'left' | 'center' | 'right';
|
|
1826
|
+
/**
|
|
1827
|
+
* 셀 인라인 스타일(정적 또는 값·행 함수).
|
|
1828
|
+
*
|
|
1829
|
+
* Cell inline style (static or value/row function).
|
|
1830
|
+
*
|
|
1831
|
+
* セルのインラインスタイル(静的、または値・行の関数)。
|
|
1832
|
+
*
|
|
1833
|
+
* 单元格的内联样式(静态,或按值、行的函数)。
|
|
1834
|
+
*/
|
|
369
1835
|
cellStyle?: CSSProperties | ((value: any, row: T, rowIndex: number) => CSSProperties);
|
|
370
|
-
/**
|
|
1836
|
+
/**
|
|
1837
|
+
* 헤더 인라인 스타일.
|
|
1838
|
+
*
|
|
1839
|
+
* Header inline style.
|
|
1840
|
+
*
|
|
1841
|
+
* ヘッダーのインラインスタイル。
|
|
1842
|
+
*
|
|
1843
|
+
* 表头的内联样式。
|
|
1844
|
+
*/
|
|
371
1845
|
headerStyle?: CSSProperties;
|
|
372
|
-
/**
|
|
1846
|
+
/**
|
|
1847
|
+
* 이 컬럼 머리글을 클릭하면 정렬되게 할지. 특정 컬럼만 정렬을 막거나 허용할 때 씁니다.
|
|
1848
|
+
*
|
|
1849
|
+
* Whether clicking this header sorts. Use it to allow/deny sorting per column.
|
|
1850
|
+
*
|
|
1851
|
+
* この列のヘッダーをクリックしたらソートされるようにするか。特定の列だけソートを禁じたり許したりするときに使います。
|
|
1852
|
+
*
|
|
1853
|
+
* 点击该列表头是否排序。用于按列禁止或允许排序。
|
|
1854
|
+
*/
|
|
373
1855
|
sortable?: boolean;
|
|
374
|
-
/**
|
|
1856
|
+
/**
|
|
1857
|
+
* 이 컬럼에 필터 아이콘·패널을 띄울지.
|
|
1858
|
+
*
|
|
1859
|
+
* Whether to show the filter icon/panel on this column.
|
|
1860
|
+
*
|
|
1861
|
+
* この列にフィルターのアイコン・パネルを出すか。
|
|
1862
|
+
*
|
|
1863
|
+
* 是否在该列显示筛选图标和面板。
|
|
1864
|
+
*/
|
|
375
1865
|
filterable?: boolean;
|
|
376
|
-
/**
|
|
1866
|
+
/**
|
|
1867
|
+
* 머리글 경계를 드래그해 폭을 조절하게 할지.
|
|
1868
|
+
*
|
|
1869
|
+
* Whether the user can drag the header edge to resize.
|
|
1870
|
+
*
|
|
1871
|
+
* ヘッダーの境界をドラッグして幅を調節できるようにするか。
|
|
1872
|
+
*
|
|
1873
|
+
* 是否允许拖动表头边界调节宽度。
|
|
1874
|
+
*/
|
|
377
1875
|
resizable?: boolean;
|
|
378
|
-
/**
|
|
1876
|
+
/**
|
|
1877
|
+
* true 면 이 컬럼을 화면에서 감춥니다(데이터는 남고 showColumn 으로 다시 보임).
|
|
1878
|
+
*
|
|
1879
|
+
* true hides the column (data stays; showColumn brings it back).
|
|
1880
|
+
*
|
|
1881
|
+
* true ならこの列を画面から隠します(データは残り、showColumn で再び表示)。
|
|
1882
|
+
*
|
|
1883
|
+
* true 时把该列从画面隐藏(数据保留,用 showColumn 可再次显示)。
|
|
1884
|
+
*/
|
|
379
1885
|
hidden?: boolean;
|
|
380
|
-
/**
|
|
1886
|
+
/**
|
|
1887
|
+
* true 면 가로 스크롤과 무관하게 왼쪽에 붙박아 둡니다(핵심 식별 컬럼 고정용).
|
|
1888
|
+
*
|
|
1889
|
+
* true pins the column to the left regardless of horizontal scroll (for key identifier columns).
|
|
1890
|
+
*
|
|
1891
|
+
* true なら横スクロールに関係なく左に固定しておきます(重要な識別列の固定用)。
|
|
1892
|
+
*
|
|
1893
|
+
* true 时无论横向滚动都固定在左侧(用于固定关键标识列)。
|
|
1894
|
+
*/
|
|
381
1895
|
frozen?: boolean;
|
|
382
|
-
/**
|
|
1896
|
+
/**
|
|
1897
|
+
* 셀 줄바꿈: true 면 nowrap+ellipsis 대신 여러 줄로 표시(rowHeight 확대와 함께 사용)
|
|
1898
|
+
*
|
|
1899
|
+
* Cell wrapping: true renders multiple lines instead of nowrap+ellipsis (use with a larger rowHeight)
|
|
1900
|
+
*
|
|
1901
|
+
* セルの折り返し: true なら nowrap+ellipsis の代わりに複数行で表示(rowHeight を大きくして併用)
|
|
1902
|
+
*
|
|
1903
|
+
* 单元格换行:true 时不用 nowrap+ellipsis,改为多行显示(配合放大 rowHeight 使用)
|
|
1904
|
+
*/
|
|
383
1905
|
wrap?: boolean;
|
|
384
1906
|
/**
|
|
385
1907
|
* 헤더(컬럼 머리글) 줄바꿈: true 면 헤더 텍스트가 잘리지 않고 여러 줄로 줄바꿈된다.
|
|
386
1908
|
* (셀 본문용 wrap 과 별개로 헤더에만 적용. header 문자열의 '\n' 은 headerWrap 여부와 무관하게 항상 줄바꿈됨)
|
|
387
1909
|
* 줄바꿈된 헤더에 맞춰 헤더 행 높이가 자동으로 늘어난다.
|
|
388
|
-
*
|
|
1910
|
+
*
|
|
1911
|
+
* Header wrapping: true wraps header text to multiple lines instead of truncating
|
|
389
1912
|
* (header-only, independent of the body `wrap`; '\n' in `header` always breaks regardless).
|
|
390
1913
|
* The header row height grows automatically to fit.
|
|
1914
|
+
*
|
|
1915
|
+
* ヘッダー(列の見出し)の折り返し: true ならヘッダーのテキストが切れずに複数行へ折り返される。
|
|
1916
|
+
* (セル本文用の wrap とは別に、ヘッダーだけに適用。header 文字列の '\n' は headerWrap の有無に関係なく常に改行される)
|
|
1917
|
+
* 折り返されたヘッダーに合わせて、ヘッダー行の高さが自動で伸びる。
|
|
1918
|
+
*
|
|
1919
|
+
* 表头(列标题)换行:true 时表头文字不截断,而是换行成多行。
|
|
1920
|
+
* (与单元格正文的 wrap 无关,只作用于表头。header 字符串中的 '\n' 无论 headerWrap 与否都始终换行)
|
|
1921
|
+
* 表头行高会随换行后的表头自动增高。
|
|
391
1922
|
*/
|
|
392
1923
|
headerWrap?: boolean;
|
|
393
|
-
/**
|
|
1924
|
+
/**
|
|
1925
|
+
* 가로 병합 허용(불리언 또는 행별 함수).
|
|
1926
|
+
*
|
|
1927
|
+
* Allow column span (boolean or per-row function).
|
|
1928
|
+
*
|
|
1929
|
+
* 横方向の結合を許可(真偽値、または行ごとの関数)。
|
|
1930
|
+
*
|
|
1931
|
+
* 允许横向合并(布尔值,或按行的函数)。
|
|
1932
|
+
*/
|
|
394
1933
|
colSpan?: boolean | ((row: T, rowIndex: number) => boolean);
|
|
395
|
-
/**
|
|
1934
|
+
/**
|
|
1935
|
+
* 세로 병합 허용.
|
|
1936
|
+
*
|
|
1937
|
+
* Allow row span.
|
|
1938
|
+
*
|
|
1939
|
+
* 縦方向の結合を許可。
|
|
1940
|
+
*
|
|
1941
|
+
* 允许纵向合并。
|
|
1942
|
+
*/
|
|
396
1943
|
rowSpan?: boolean;
|
|
397
|
-
/**
|
|
1944
|
+
/**
|
|
1945
|
+
* 다단 헤더용 자식 컬럼.
|
|
1946
|
+
*
|
|
1947
|
+
* Child columns for multi-level headers.
|
|
1948
|
+
*
|
|
1949
|
+
* 多段ヘッダー用の子列。
|
|
1950
|
+
*
|
|
1951
|
+
* 多级表头用的子列。
|
|
1952
|
+
*/
|
|
398
1953
|
children?: ColumnDef<T>[];
|
|
399
|
-
/**
|
|
1954
|
+
/**
|
|
1955
|
+
* 셀 title 툴팁(정적 또는 값·행 함수).
|
|
1956
|
+
*
|
|
1957
|
+
* Cell title tooltip (static or value/row function).
|
|
1958
|
+
*
|
|
1959
|
+
* セルの title ツールチップ(静的、または値・行の関数)。
|
|
1960
|
+
*
|
|
1961
|
+
* 单元格的 title 提示(静态,或按值、行的函数)。
|
|
1962
|
+
*/
|
|
400
1963
|
tooltip?: string | ((value: any, row: T) => string);
|
|
401
|
-
/**
|
|
1964
|
+
/**
|
|
1965
|
+
* select 정적 옵션.
|
|
1966
|
+
*
|
|
1967
|
+
* Static options for select.
|
|
1968
|
+
*
|
|
1969
|
+
* select の静的オプション。
|
|
1970
|
+
*
|
|
1971
|
+
* select 的静态选项。
|
|
1972
|
+
*/
|
|
402
1973
|
options?: Array<string | {
|
|
403
1974
|
label: string;
|
|
404
1975
|
value: any;
|
|
405
1976
|
}>;
|
|
406
|
-
/**
|
|
1977
|
+
/**
|
|
1978
|
+
* select 동적 옵션 함수.
|
|
1979
|
+
*
|
|
1980
|
+
* Dynamic option function for select.
|
|
1981
|
+
*
|
|
1982
|
+
* select の動的オプション関数。
|
|
1983
|
+
*
|
|
1984
|
+
* select 的动态选项函数。
|
|
1985
|
+
*/
|
|
407
1986
|
optionsFn?: (row: T, rowIndex: number) => Array<string | {
|
|
408
1987
|
label: string;
|
|
409
1988
|
value: any;
|
|
410
1989
|
}>;
|
|
411
|
-
/**
|
|
1990
|
+
/**
|
|
1991
|
+
* radio — 같은 group 내 단일 선택
|
|
1992
|
+
*
|
|
1993
|
+
* radio — single choice within the same group
|
|
1994
|
+
*
|
|
1995
|
+
* radio — 同じ group 内での単一選択
|
|
1996
|
+
*
|
|
1997
|
+
* radio — 同一 group 内的单选
|
|
1998
|
+
*/
|
|
412
1999
|
group?: string;
|
|
413
|
-
/**
|
|
2000
|
+
/**
|
|
2001
|
+
* img — 이미지 대체 텍스트 (웹접근성 필수)
|
|
2002
|
+
*
|
|
2003
|
+
* img — alt text (required for accessibility)
|
|
2004
|
+
*
|
|
2005
|
+
* img — 画像の代替テキスト(ウェブアクセシビリティに必須)
|
|
2006
|
+
*
|
|
2007
|
+
* img — 图片的替代文字(无障碍访问必需)
|
|
2008
|
+
*/
|
|
414
2009
|
alt?: string;
|
|
415
|
-
/**
|
|
2010
|
+
/**
|
|
2011
|
+
* html — XSS 방지 sanitize (기본 true)
|
|
2012
|
+
*
|
|
2013
|
+
* html — XSS sanitize (default true)
|
|
2014
|
+
*
|
|
2015
|
+
* html — XSS を防ぐ sanitize(既定 true)
|
|
2016
|
+
*
|
|
2017
|
+
* html — 防 XSS 的 sanitize(默认 true)
|
|
2018
|
+
*/
|
|
416
2019
|
sanitize?: boolean;
|
|
417
|
-
/**
|
|
2020
|
+
/**
|
|
2021
|
+
* barcode — 바코드 높이(px), 기본 28
|
|
2022
|
+
*
|
|
2023
|
+
* barcode — bar height in px, default 28
|
|
2024
|
+
*
|
|
2025
|
+
* barcode — バーコードの高さ(px)、既定 28
|
|
2026
|
+
*
|
|
2027
|
+
* barcode — 条形码高度(px),默认 28
|
|
2028
|
+
*/
|
|
418
2029
|
barcodeHeight?: number;
|
|
419
|
-
/**
|
|
2030
|
+
/**
|
|
2031
|
+
* 표시할 때 반올림해서 보여줄 소수점 자리수(합계 계산에도 반영).
|
|
2032
|
+
*
|
|
2033
|
+
* Decimal places to show (also applied to summing).
|
|
2034
|
+
*
|
|
2035
|
+
* 表示するときに丸めて見せる小数点以下の桁数(合計の計算にも反映)。
|
|
2036
|
+
*
|
|
2037
|
+
* 显示时四舍五入到的小数位数(也反映到合计计算)。
|
|
2038
|
+
*/
|
|
420
2039
|
precision?: number;
|
|
421
|
-
/**
|
|
2040
|
+
/**
|
|
2041
|
+
* 이 컬럼 값을 다른 컬럼으로 자동 계산. 함수식 또는 '[field]' 를 쓰는 문자열식.
|
|
2042
|
+
*
|
|
2043
|
+
* Auto-compute this column from others — a function, or a string using '[field]' refs.
|
|
2044
|
+
*
|
|
2045
|
+
* この列の値を他の列から自動計算。関数式、または '[field]' を使う文字列式。
|
|
2046
|
+
*
|
|
2047
|
+
* 用其他列自动计算该列的值。函数式,或使用 '[field]' 的字符串式。
|
|
2048
|
+
*/
|
|
422
2049
|
formula?: string | ((row: T, D: any) => any);
|
|
423
|
-
/**
|
|
2050
|
+
/**
|
|
2051
|
+
* 수식 나눗셈의 소수점 자리수. 기본 30.
|
|
2052
|
+
*
|
|
2053
|
+
* Decimal precision for division inside the formula. Default 30.
|
|
2054
|
+
*
|
|
2055
|
+
* 数式の除算の小数点以下の桁数。既定 30。
|
|
2056
|
+
*
|
|
2057
|
+
* 公式除法的小数位数。默认 30。
|
|
2058
|
+
*/
|
|
424
2059
|
formulaPrecision?: number;
|
|
425
|
-
/**
|
|
2060
|
+
/**
|
|
2061
|
+
* 이 컬럼 값을 가려 표시할 마스킹 타입 또는 상세 정의.
|
|
2062
|
+
*
|
|
2063
|
+
* Mask type or detailed definition to obscure this column's values.
|
|
2064
|
+
*
|
|
2065
|
+
* この列の値を伏せて表示するマスキングのタイプ、または詳細な定義。
|
|
2066
|
+
*
|
|
2067
|
+
* 遮蔽显示该列值的掩码类型,或详细定义。
|
|
2068
|
+
*/
|
|
426
2069
|
mask?: import('./MaskingEngine.js').MaskType | import('./MaskingEngine.js').MaskDef;
|
|
427
|
-
/**
|
|
2070
|
+
/**
|
|
2071
|
+
* 트리 노드 아이콘(정적 정의 또는 행별 함수).
|
|
2072
|
+
*
|
|
2073
|
+
* Tree node icon (static def or per-row function).
|
|
2074
|
+
*
|
|
2075
|
+
* ツリーノードのアイコン(静的な定義、または行ごとの関数)。
|
|
2076
|
+
*
|
|
2077
|
+
* 树节点图标(静态定义,或按行的函数)。
|
|
2078
|
+
*/
|
|
428
2079
|
treeNodeIcon?: TreeNodeIconDef | ((row: T, hasChildren: boolean, expanded: boolean) => string);
|
|
429
2080
|
/** @internal */
|
|
430
2081
|
_colIndex?: number;
|
|
@@ -432,63 +2083,267 @@ export interface ColumnDef<T = any> {
|
|
|
432
2083
|
_depth?: number;
|
|
433
2084
|
/** @internal */
|
|
434
2085
|
_leaf?: boolean;
|
|
435
|
-
/**
|
|
2086
|
+
/**
|
|
2087
|
+
* @internal
|
|
2088
|
+
* setMaskEnabled(field, false) 시 true (컬럼 전체 해제)
|
|
2089
|
+
*
|
|
2090
|
+
* true after setMaskEnabled(field, false) (whole-column reveal)
|
|
2091
|
+
*
|
|
2092
|
+
* setMaskEnabled(field, false) のとき true(列全体の解除)
|
|
2093
|
+
*/
|
|
436
2094
|
_maskRevealed?: boolean;
|
|
437
|
-
/**
|
|
2095
|
+
/**
|
|
2096
|
+
* @internal
|
|
2097
|
+
* 눈 아이콘 클릭으로 해제된 행 rowIndex 집합
|
|
2098
|
+
*
|
|
2099
|
+
* Set of rowIndexes revealed via the eye icon
|
|
2100
|
+
*
|
|
2101
|
+
* 目のアイコンのクリックで解除された行 rowIndex の集合
|
|
2102
|
+
*/
|
|
438
2103
|
_maskRevealedRows?: Set<number>;
|
|
439
2104
|
}
|
|
440
|
-
/**
|
|
2105
|
+
/**
|
|
2106
|
+
* 트리 노드 아이콘 정의.
|
|
2107
|
+
*
|
|
2108
|
+
* Tree node icon definition.
|
|
2109
|
+
*
|
|
2110
|
+
* ツリーノードのアイコン定義。
|
|
2111
|
+
*
|
|
2112
|
+
* 树节点图标定义。
|
|
2113
|
+
*/
|
|
441
2114
|
export interface TreeNodeIconDef {
|
|
442
|
-
/**
|
|
2115
|
+
/**
|
|
2116
|
+
* 접힌 branch 노드 아이콘 (Bootstrap Icons 클래스, 기본: 'bi-folder2')
|
|
2117
|
+
*
|
|
2118
|
+
* Collapsed branch icon (Bootstrap Icons class, default 'bi-folder2')
|
|
2119
|
+
*
|
|
2120
|
+
* 折りたたまれた branch ノードのアイコン(Bootstrap Icons のクラス、既定: 'bi-folder2')
|
|
2121
|
+
*
|
|
2122
|
+
* 折叠的 branch 节点图标(Bootstrap Icons 类名,默认:'bi-folder2')
|
|
2123
|
+
*/
|
|
443
2124
|
branch?: string;
|
|
444
|
-
/**
|
|
2125
|
+
/**
|
|
2126
|
+
* 펼친 branch 노드 아이콘 (기본: 'bi-folder2-open')
|
|
2127
|
+
*
|
|
2128
|
+
* Expanded branch icon (default 'bi-folder2-open')
|
|
2129
|
+
*
|
|
2130
|
+
* 展開された branch ノードのアイコン(既定: 'bi-folder2-open')
|
|
2131
|
+
*
|
|
2132
|
+
* 展开的 branch 节点图标(默认:'bi-folder2-open')
|
|
2133
|
+
*/
|
|
445
2134
|
branchOpen?: string;
|
|
446
|
-
/**
|
|
2135
|
+
/**
|
|
2136
|
+
* 리프 노드 아이콘 (기본: 'bi-file-earmark')
|
|
2137
|
+
*
|
|
2138
|
+
* Leaf icon (default 'bi-file-earmark')
|
|
2139
|
+
*
|
|
2140
|
+
* リーフノードのアイコン(既定: 'bi-file-earmark')
|
|
2141
|
+
*
|
|
2142
|
+
* 叶子节点图标(默认:'bi-file-earmark')
|
|
2143
|
+
*/
|
|
447
2144
|
leaf?: string;
|
|
448
2145
|
}
|
|
449
2146
|
type CSSProperties = Partial<Record<keyof CSSStyleDeclaration, string>>;
|
|
450
|
-
/**
|
|
2147
|
+
/**
|
|
2148
|
+
* "이 컬럼을 이 방향으로 정렬" 한 건을 나타냅니다. 여러 개를 배열로 넘기면 앞에 있는 것이 1차 기준,
|
|
2149
|
+
* 그 값이 같을 때 다음 것이 2차 기준이 되는 다중 정렬이 됩니다(예: 부서 오름차순 → 급여 내림차순).
|
|
2150
|
+
*
|
|
2151
|
+
* One "sort this column this way" entry. Passed as an array, the first is the primary key and later
|
|
2152
|
+
* entries break ties — i.e. multi-column sort (e.g. dept asc, then salary desc).
|
|
2153
|
+
*
|
|
2154
|
+
* 「この列をこの方向でソート」の一件を表します。複数を配列で渡すと、前にあるものが第一基準、その値が
|
|
2155
|
+
* 同じときに次のものが第二基準となる、多重ソートになります(例: 部署の昇順 → 給与の降順)。
|
|
2156
|
+
*
|
|
2157
|
+
* 表示「按此方向排序该列」的一条设置。以数组传入多条时,靠前的为第一基准,其值相同时下一条作为
|
|
2158
|
+
* 第二基准,构成多重排序(例如部门升序 → 薪资降序)。
|
|
2159
|
+
*/
|
|
451
2160
|
export interface SortItem {
|
|
2161
|
+
/**
|
|
2162
|
+
* 정렬 기준 컬럼의 field.
|
|
2163
|
+
*
|
|
2164
|
+
* field of the column to sort by.
|
|
2165
|
+
*
|
|
2166
|
+
* ソートの基準となる列の field。
|
|
2167
|
+
*
|
|
2168
|
+
* 排序基准列的 field。
|
|
2169
|
+
*/
|
|
452
2170
|
field: string;
|
|
2171
|
+
/**
|
|
2172
|
+
* 정렬 방향.
|
|
2173
|
+
*
|
|
2174
|
+
* Sort direction.
|
|
2175
|
+
*
|
|
2176
|
+
* ソート方向。
|
|
2177
|
+
*
|
|
2178
|
+
* 排序方向。
|
|
2179
|
+
*/
|
|
453
2180
|
dir: SortDir;
|
|
454
2181
|
}
|
|
455
|
-
/**
|
|
2182
|
+
/**
|
|
2183
|
+
* 필터 한 줄 = "연산자 + 비교값". 예: `{ operator: '>=', value: 1000 }` 는 값이 1000 이상인 행만 남깁니다.
|
|
2184
|
+
* 한 컬럼에 여러 조건을 배열로 걸 수 있습니다(모두 만족하는 행만 통과).
|
|
2185
|
+
*
|
|
2186
|
+
* One filter clause = "operator + value". e.g. `{ operator: '>=', value: 1000 }` keeps rows whose
|
|
2187
|
+
* value is at least 1000. Multiple clauses per column combine (a row must satisfy all).
|
|
2188
|
+
*
|
|
2189
|
+
* フィルター一行 = 「演算子 + 比較値」。例: `{ operator: '>=', value: 1000 }` は値が 1000 以上の行だけを残します。
|
|
2190
|
+
* 一つの列に複数の条件を配列で掛けられます(すべてを満たす行だけが通過)。
|
|
2191
|
+
*
|
|
2192
|
+
* 一条筛选 =「运算符 + 比较值」。例如 `{ operator: '>=', value: 1000 }` 只保留值不小于 1000 的行。
|
|
2193
|
+
* 一个列可以用数组挂多个条件(只有全部满足的行才通过)。
|
|
2194
|
+
*/
|
|
456
2195
|
export interface FilterItem {
|
|
457
|
-
/**
|
|
2196
|
+
/**
|
|
2197
|
+
* 비교 방식. `'='`·`'!='`·`'>'`·`'>='`·`'<'`·`'<='` 는 값 비교, `'contains'`·`'startsWith'`·`'endsWith'`
|
|
2198
|
+
* 는 텍스트 부분 일치입니다.
|
|
2199
|
+
*
|
|
2200
|
+
* How to compare — the six symbols are value comparisons; the three word operators are text
|
|
2201
|
+
* substring matches.
|
|
2202
|
+
*
|
|
2203
|
+
* 比較の方式。`'='`·`'!='`·`'>'`·`'>='`·`'<'`·`'<='` は値の比較、`'contains'`·`'startsWith'`·`'endsWith'`
|
|
2204
|
+
* はテキストの部分一致です。
|
|
2205
|
+
*
|
|
2206
|
+
* 比较方式。`'='`·`'!='`·`'>'`·`'>='`·`'<'`·`'<='` 是值比较,`'contains'`·`'startsWith'`·`'endsWith'`
|
|
2207
|
+
* 是文本的部分匹配。
|
|
2208
|
+
*/
|
|
458
2209
|
operator: '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith';
|
|
459
|
-
/**
|
|
2210
|
+
/**
|
|
2211
|
+
* 비교 기준 값.
|
|
2212
|
+
*
|
|
2213
|
+
* The value to compare against.
|
|
2214
|
+
*
|
|
2215
|
+
* 比較の基準となる値。
|
|
2216
|
+
*
|
|
2217
|
+
* 用于比较的基准值。
|
|
2218
|
+
*/
|
|
460
2219
|
value: any;
|
|
461
2220
|
}
|
|
462
|
-
/**
|
|
2221
|
+
/**
|
|
2222
|
+
* 집계 연산자.
|
|
2223
|
+
*
|
|
2224
|
+
* Aggregate operator.
|
|
2225
|
+
*
|
|
2226
|
+
* 集計の演算子。
|
|
2227
|
+
*
|
|
2228
|
+
* 聚合运算符。
|
|
2229
|
+
*/
|
|
463
2230
|
export type SummaryOp = 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'COUNT';
|
|
464
|
-
/**
|
|
2231
|
+
/**
|
|
2232
|
+
* 필드별 집계 정의.
|
|
2233
|
+
*
|
|
2234
|
+
* Per-field aggregate definition.
|
|
2235
|
+
*
|
|
2236
|
+
* フィールドごとの集計定義。
|
|
2237
|
+
*
|
|
2238
|
+
* 按字段的聚合定义。
|
|
2239
|
+
*/
|
|
465
2240
|
export interface SummaryFieldDef {
|
|
466
2241
|
field: string;
|
|
467
2242
|
op: SummaryOp;
|
|
468
2243
|
label?: string;
|
|
469
2244
|
}
|
|
470
|
-
/**
|
|
2245
|
+
/**
|
|
2246
|
+
* 그룹마다 소계/합계 행을 자동으로 끼워 넣는 설정입니다. groupBy 로 묶은 각 그룹의 지정 필드를
|
|
2247
|
+
* 합·평균 등으로 집계해 그룹 위나 아래에 요약 행으로 보여 줍니다.
|
|
2248
|
+
*
|
|
2249
|
+
* Auto-inserts a subtotal/summary row per group. For each group made by groupBy it aggregates the
|
|
2250
|
+
* chosen fields (sum, average …) and shows the result as a summary row above or below the group.
|
|
2251
|
+
*
|
|
2252
|
+
* グループごとに小計/合計の行を自動で挿入する設定です。groupBy でまとめた各グループの指定フィールドを、
|
|
2253
|
+
* 合計・平均などで集計し、グループの上または下に要約行として見せます。
|
|
2254
|
+
*
|
|
2255
|
+
* 按分组自动插入小计/合计行的设置。对 groupBy 分出的每个组的指定字段做合计、平均等聚合,
|
|
2256
|
+
* 并作为汇总行显示在组的上方或下方。
|
|
2257
|
+
*/
|
|
471
2258
|
export interface SummaryOptions {
|
|
472
|
-
/**
|
|
2259
|
+
/**
|
|
2260
|
+
* 집계할 컬럼들의 field 목록.
|
|
2261
|
+
*
|
|
2262
|
+
* field names of the columns to aggregate.
|
|
2263
|
+
*
|
|
2264
|
+
* 集計する列の field の一覧。
|
|
2265
|
+
*
|
|
2266
|
+
* 需要聚合的列的 field 列表。
|
|
2267
|
+
*/
|
|
473
2268
|
fields: string[];
|
|
474
|
-
/**
|
|
2269
|
+
/**
|
|
2270
|
+
* 어떤 집계를 적용할지(하나 또는 여러 개). 생략 시 기본 동작.
|
|
2271
|
+
*
|
|
2272
|
+
* Which aggregate(s) to apply (one or several).
|
|
2273
|
+
*
|
|
2274
|
+
* どの集計を適用するか(一つまたは複数)。省略時は既定の動作。
|
|
2275
|
+
*
|
|
2276
|
+
* 应用哪种聚合(一个或多个)。省略时按默认行为。
|
|
2277
|
+
*/
|
|
475
2278
|
ops?: SummaryOp | SummaryOp[];
|
|
476
|
-
/**
|
|
2279
|
+
/**
|
|
2280
|
+
* 요약 행을 그룹 위('top')에 둘지 아래('bottom')에 둘지.
|
|
2281
|
+
*
|
|
2282
|
+
* Put the summary row above ('top') or below ('bottom') the group.
|
|
2283
|
+
*
|
|
2284
|
+
* 要約行をグループの上('top')に置くか、下('bottom')に置くか。
|
|
2285
|
+
*
|
|
2286
|
+
* 汇总行放在组的上方('top')还是下方('bottom')。
|
|
2287
|
+
*/
|
|
477
2288
|
position?: 'top' | 'bottom';
|
|
478
|
-
/**
|
|
2289
|
+
/**
|
|
2290
|
+
* 한 그룹에 요약 행을 여러 줄 만들 때(예: 합계 줄 + 평균 줄). customFn 으로 직접 집계도 가능.
|
|
2291
|
+
*
|
|
2292
|
+
* Multiple summary rows per group (e.g. a sum row + an average row); customFn allows your own aggregation.
|
|
2293
|
+
*
|
|
2294
|
+
* 一つのグループに要約行を複数作るとき(例: 合計の行 + 平均の行)。customFn で自前の集計もできます。
|
|
2295
|
+
*
|
|
2296
|
+
* 在一个组内生成多行汇总时(例如合计行 + 平均行)。也可用 customFn 自行聚合。
|
|
2297
|
+
*/
|
|
479
2298
|
rows?: Array<{
|
|
480
2299
|
op: SummaryOp;
|
|
481
2300
|
label?: string;
|
|
482
2301
|
customFn?: (items: any[]) => number;
|
|
483
2302
|
}>;
|
|
484
2303
|
}
|
|
485
|
-
/**
|
|
2304
|
+
/**
|
|
2305
|
+
* 그리드 맨 아래(또는 위) 고정 푸터의 셀 한 칸을 정의합니다. 스크롤과 무관하게 늘 보이는 합계 줄을
|
|
2306
|
+
* 만들 때 씁니다. `field`+`op` 를 주면 그 컬럼을 집계해 표시하고, `label` 만 주면 고정 문구를 표시합니다.
|
|
2307
|
+
*
|
|
2308
|
+
* Defines one cell of the pinned footer (bottom or top) — an always-visible totals row that stays
|
|
2309
|
+
* put while the body scrolls. Give `field`+`op` to aggregate a column, or `label` for fixed text.
|
|
2310
|
+
*
|
|
2311
|
+
* グリッドの一番下(または上)に固定するフッターのセル一つを定義します。スクロールに関係なく常に見えている
|
|
2312
|
+
* 合計の行を作るときに使います。`field`+`op` を渡すとその列を集計して表示し、`label` だけを渡すと固定の文言を表示します。
|
|
2313
|
+
*
|
|
2314
|
+
* 定义表格底部(或顶部)固定页脚的一个单元格。用于做一条与滚动无关、始终可见的合计行。
|
|
2315
|
+
* 传 `field`+`op` 会聚合该列并显示,只传 `label` 则显示固定文字。
|
|
2316
|
+
*/
|
|
486
2317
|
export interface FooterDef {
|
|
487
|
-
/**
|
|
2318
|
+
/**
|
|
2319
|
+
* 집계할 컬럼의 field(집계 셀일 때).
|
|
2320
|
+
*
|
|
2321
|
+
* field of the column to aggregate (for an aggregate cell).
|
|
2322
|
+
*
|
|
2323
|
+
* 集計する列の field(集計セルのとき)。
|
|
2324
|
+
*
|
|
2325
|
+
* 需要聚合的列的 field(聚合单元格时)。
|
|
2326
|
+
*/
|
|
488
2327
|
field?: string;
|
|
489
|
-
/**
|
|
2328
|
+
/**
|
|
2329
|
+
* 어떤 집계를 낼지(SUM/AVG/…).
|
|
2330
|
+
*
|
|
2331
|
+
* Which aggregate to compute (SUM/AVG/…).
|
|
2332
|
+
*
|
|
2333
|
+
* どの集計を出すか(SUM/AVG/…)。
|
|
2334
|
+
*
|
|
2335
|
+
* 计算哪种聚合(SUM/AVG/…)。
|
|
2336
|
+
*/
|
|
490
2337
|
op?: SummaryOp;
|
|
491
|
-
/**
|
|
2338
|
+
/**
|
|
2339
|
+
* 집계 대신 그대로 보여줄 고정 문구(예: '합계').
|
|
2340
|
+
*
|
|
2341
|
+
* Fixed text shown instead of an aggregate (e.g. 'Total').
|
|
2342
|
+
*
|
|
2343
|
+
* 集計の代わりにそのまま見せる固定の文言(例: '합계')。
|
|
2344
|
+
*
|
|
2345
|
+
* 代替聚合直接显示的固定文字(例如 '합계')。
|
|
2346
|
+
*/
|
|
492
2347
|
label?: string;
|
|
493
2348
|
/**
|
|
494
2349
|
* 숫자 포맷 문자열
|
|
@@ -497,45 +2352,185 @@ export interface FooterDef {
|
|
|
497
2352
|
* '0' → 정수 (콤마 없음)
|
|
498
2353
|
* '0.00' → 소수 2자리 (콤마 없음)
|
|
499
2354
|
* '2' → 소수 2자리 (하위 호환)
|
|
2355
|
+
*
|
|
2356
|
+
* 数値のフォーマット文字列
|
|
2357
|
+
* '#,##0' → 桁区切りのコンマ、整数
|
|
2358
|
+
* '#,##0.00' → 桁区切りのコンマ、小数2桁
|
|
2359
|
+
* '0' → 整数(コンマなし)
|
|
2360
|
+
* '0.00' → 小数2桁(コンマなし)
|
|
2361
|
+
* '2' → 小数2桁(下位互換)
|
|
2362
|
+
*
|
|
2363
|
+
* 数字格式字符串
|
|
2364
|
+
* '#,##0' → 千位分隔符,整数
|
|
2365
|
+
* '#,##0.00' → 千位分隔符,小数 2 位
|
|
2366
|
+
* '0' → 整数(无千位分隔符)
|
|
2367
|
+
* '0.00' → 小数 2 位(无千位分隔符)
|
|
2368
|
+
* '2' → 小数 2 位(向后兼容)
|
|
500
2369
|
*/
|
|
501
2370
|
format?: string;
|
|
502
2371
|
align?: 'left' | 'center' | 'right';
|
|
503
|
-
/**
|
|
2372
|
+
/**
|
|
2373
|
+
* 이 셀이 오른쪽으로 몇 컬럼을 병합할지 (기본: 1)
|
|
2374
|
+
*
|
|
2375
|
+
* How many columns to span rightward (default 1)
|
|
2376
|
+
*
|
|
2377
|
+
* このセルが右方向へ何列を結合するか(既定: 1)
|
|
2378
|
+
*
|
|
2379
|
+
* 此单元格向右合并多少列(默认 1)
|
|
2380
|
+
*/
|
|
504
2381
|
colspan?: number;
|
|
505
2382
|
renderer?: RendererType | RendererDef;
|
|
506
2383
|
}
|
|
507
|
-
/**
|
|
2384
|
+
/**
|
|
2385
|
+
* 인쇄 옵션.
|
|
2386
|
+
*
|
|
2387
|
+
* Print options.
|
|
2388
|
+
*
|
|
2389
|
+
* 印刷オプション。
|
|
2390
|
+
*
|
|
2391
|
+
* 打印选项。
|
|
2392
|
+
*/
|
|
508
2393
|
export interface PrintOptions {
|
|
509
2394
|
title?: string;
|
|
510
2395
|
excludeFields?: string[];
|
|
511
2396
|
showFooter?: boolean;
|
|
512
2397
|
}
|
|
513
|
-
/**
|
|
2398
|
+
/**
|
|
2399
|
+
* 내보내기 스타일 모드.
|
|
2400
|
+
*
|
|
2401
|
+
* Export style mode.
|
|
2402
|
+
*
|
|
2403
|
+
* エクスポートのスタイルモード。
|
|
2404
|
+
*
|
|
2405
|
+
* 导出样式模式。
|
|
2406
|
+
*/
|
|
514
2407
|
export type ExportStyleMode = 'theme' | 'none' | 'custom';
|
|
515
|
-
/**
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
2408
|
+
/**
|
|
2409
|
+
* 그리드 내용을 Excel·CSV·JSON 파일로 내보낼 때의 세부 설정입니다. 아무것도 안 주면 기본값으로 곧장
|
|
2410
|
+
* 내보내지고, 파일명·시트명·제외 컬럼·제목 행 등을 필요할 때만 얹습니다. 문자열 하나만 넘기면 파일명으로 해석됩니다.
|
|
2411
|
+
*
|
|
2412
|
+
* Settings for exporting the grid to Excel/CSV/JSON. With nothing set it exports with defaults;
|
|
2413
|
+
* add filename, sheet name, excluded columns, title rows, etc. only as needed. A lone string is
|
|
2414
|
+
* treated as the filename.
|
|
2415
|
+
*
|
|
2416
|
+
* グリッドの内容を Excel・CSV・JSON ファイルへエクスポートするときの細かい設定です。何も渡さなければ既定値で
|
|
2417
|
+
* そのままエクスポートされ、ファイル名・シート名・除外する列・タイトル行などを必要なときだけ加えます。
|
|
2418
|
+
* 文字列を一つだけ渡すと、ファイル名として解釈されます。
|
|
2419
|
+
*
|
|
2420
|
+
* 把表格内容导出为 Excel/CSV/JSON 文件时的细节设置。什么都不传就按默认值直接导出,只在需要时再加上
|
|
2421
|
+
* 文件名、工作表名、排除的列、标题行等。只传一个字符串时,视为文件名。
|
|
2422
|
+
*/
|
|
2423
|
+
export interface ExportOptions {
|
|
2424
|
+
/**
|
|
2425
|
+
* 저장될 파일 이름.
|
|
2426
|
+
*
|
|
2427
|
+
* The saved file's name.
|
|
2428
|
+
*
|
|
2429
|
+
* 保存されるファイルの名前。
|
|
2430
|
+
*
|
|
2431
|
+
* 保存的文件名。
|
|
2432
|
+
*/
|
|
2433
|
+
filename?: string;
|
|
2434
|
+
/**
|
|
2435
|
+
* 엑셀 시트 탭 이름.
|
|
2436
|
+
*
|
|
2437
|
+
* Excel sheet tab name.
|
|
2438
|
+
*
|
|
2439
|
+
* Excel のシートタブの名前。
|
|
2440
|
+
*
|
|
2441
|
+
* Excel 工作表标签名。
|
|
2442
|
+
*/
|
|
520
2443
|
sheetName?: string;
|
|
521
|
-
/**
|
|
2444
|
+
/**
|
|
2445
|
+
* 머리글 행을 포함할지. 기본 true.
|
|
2446
|
+
*
|
|
2447
|
+
* Whether to include the header row. Default true.
|
|
2448
|
+
*
|
|
2449
|
+
* ヘッダー行を含めるか。既定 true。
|
|
2450
|
+
*
|
|
2451
|
+
* 是否包含表头行。默认 true。
|
|
2452
|
+
*/
|
|
522
2453
|
includeHeader?: boolean;
|
|
523
|
-
/**
|
|
2454
|
+
/**
|
|
2455
|
+
* 내보내기에서 뺄 컬럼들의 field.
|
|
2456
|
+
*
|
|
2457
|
+
* field names of columns to leave out.
|
|
2458
|
+
*
|
|
2459
|
+
* エクスポートから外す列の field。
|
|
2460
|
+
*
|
|
2461
|
+
* 导出时排除的列的 field。
|
|
2462
|
+
*/
|
|
524
2463
|
exceptFields?: string[];
|
|
525
|
-
/**
|
|
2464
|
+
/**
|
|
2465
|
+
* 데이터 위에 얹을 제목 행들(보고서 머리말 등).
|
|
2466
|
+
*
|
|
2467
|
+
* Extra title rows placed above the data (report headings, etc.).
|
|
2468
|
+
*
|
|
2469
|
+
* データの上に載せるタイトル行(レポートの前書きなど)。
|
|
2470
|
+
*
|
|
2471
|
+
* 置于数据上方的标题行(报表前言等)。
|
|
2472
|
+
*/
|
|
526
2473
|
headers?: ExportHeaderRow[];
|
|
527
|
-
/**
|
|
2474
|
+
/**
|
|
2475
|
+
* 데이터 아래에 붙일 행들(비고·서명란 등).
|
|
2476
|
+
*
|
|
2477
|
+
* Extra rows appended below the data (notes, sign-off …).
|
|
2478
|
+
*
|
|
2479
|
+
* データの下に付ける行(備考・署名欄など)。
|
|
2480
|
+
*
|
|
2481
|
+
* 附于数据下方的行(备注、签字栏等)。
|
|
2482
|
+
*/
|
|
528
2483
|
footers?: ExportHeaderRow[];
|
|
529
|
-
/**
|
|
2484
|
+
/**
|
|
2485
|
+
* 내보낸 파일에 그리드 테마 색을 입힐지 방식. 기본 'theme'(현재 테마 반영).
|
|
2486
|
+
*
|
|
2487
|
+
* How to style the exported file — default 'theme' (carry the current theme).
|
|
2488
|
+
*
|
|
2489
|
+
* エクスポートしたファイルにグリッドのテーマ色を付けるかの方式。既定 'theme'(現在のテーマを反映)。
|
|
2490
|
+
*
|
|
2491
|
+
* 导出文件的样式方式。默认 'theme'(沿用当前主题)。
|
|
2492
|
+
*/
|
|
530
2493
|
styleMode?: ExportStyleMode;
|
|
531
|
-
/**
|
|
2494
|
+
/**
|
|
2495
|
+
* true 면 마스킹된 컬럼을 가려진 상태 그대로 내보냅니다. 기본 false = 원본 값 내보냄.
|
|
2496
|
+
*
|
|
2497
|
+
* true exports masked columns still obscured. Default false = raw values.
|
|
2498
|
+
*
|
|
2499
|
+
* true ならマスキングされた列を、伏せられた状態のままエクスポートします。既定 false = 元の値をエクスポート。
|
|
2500
|
+
*
|
|
2501
|
+
* true 时按遮蔽状态导出被掩码的列。默认 false = 导出原始值。
|
|
2502
|
+
*/
|
|
532
2503
|
maskOnExport?: boolean;
|
|
533
|
-
/**
|
|
2504
|
+
/**
|
|
2505
|
+
* 내보내기 시작 직전에 부를 훅(로딩 표시 등).
|
|
2506
|
+
*
|
|
2507
|
+
* A hook called just before export starts (show a spinner …).
|
|
2508
|
+
*
|
|
2509
|
+
* エクスポートの開始直前に呼ぶフック(ローディング表示など)。
|
|
2510
|
+
*
|
|
2511
|
+
* 导出开始前调用的钩子(显示加载提示等)。
|
|
2512
|
+
*/
|
|
534
2513
|
onBefore?: () => void | Promise<void>;
|
|
535
|
-
/**
|
|
2514
|
+
/**
|
|
2515
|
+
* 내보내기 완료 후 부를 훅. 만들어진 파일 blob 을 받습니다.
|
|
2516
|
+
*
|
|
2517
|
+
* A hook called after export, receiving the produced file blob.
|
|
2518
|
+
*
|
|
2519
|
+
* エクスポート完了後に呼ぶフック。作られたファイルの blob を受け取ります。
|
|
2520
|
+
*
|
|
2521
|
+
* 导出完成后调用的钩子。接收生成的文件 blob。
|
|
2522
|
+
*/
|
|
536
2523
|
onAfter?: (blob: Blob) => void;
|
|
537
2524
|
}
|
|
538
|
-
/**
|
|
2525
|
+
/**
|
|
2526
|
+
* 내보내기 제목/푸터 행.
|
|
2527
|
+
*
|
|
2528
|
+
* Export title/footer row.
|
|
2529
|
+
*
|
|
2530
|
+
* エクスポートのタイトル/フッター行。
|
|
2531
|
+
*
|
|
2532
|
+
* 导出的标题/页脚行。
|
|
2533
|
+
*/
|
|
539
2534
|
export interface ExportHeaderRow {
|
|
540
2535
|
text: string;
|
|
541
2536
|
height?: number;
|
|
@@ -548,12 +2543,30 @@ export interface ExportHeaderRow {
|
|
|
548
2543
|
};
|
|
549
2544
|
}
|
|
550
2545
|
/**
|
|
551
|
-
* 그리드 생성 옵션.
|
|
2546
|
+
* 그리드 생성 옵션.
|
|
2547
|
+
*
|
|
2548
|
+
* Grid construction options.
|
|
2549
|
+
*
|
|
2550
|
+
* グリッドの生成オプション。
|
|
2551
|
+
*
|
|
2552
|
+
* 表格的生成选项。
|
|
552
2553
|
*
|
|
553
2554
|
* `new OpenGrid(container, options)` 의 두 번째 인자. `columns` 만 필수.
|
|
554
|
-
* / Second argument of `new OpenGrid(container, options)`. Only `columns` is required.
|
|
555
2555
|
*
|
|
556
|
-
*
|
|
2556
|
+
* Second argument of `new OpenGrid(container, options)`. Only `columns` is required.
|
|
2557
|
+
*
|
|
2558
|
+
* `new OpenGrid(container, options)` の第 2 引数。`columns` のみ必須。
|
|
2559
|
+
*
|
|
2560
|
+
* `new OpenGrid(container, options)` 的第二个参数。仅 `columns` 必填。
|
|
2561
|
+
*
|
|
2562
|
+
* @typeParam T - 행 데이터 타입
|
|
2563
|
+
*
|
|
2564
|
+
* Row data type
|
|
2565
|
+
*
|
|
2566
|
+
* 行データの型
|
|
2567
|
+
*
|
|
2568
|
+
* 行数据类型
|
|
2569
|
+
*
|
|
557
2570
|
* @example
|
|
558
2571
|
* const grid = new OpenGrid('#host', {
|
|
559
2572
|
* columns: [{ field: 'name', header: '이름' }, { field: 'qty', header: '수량', type: 'number' }],
|
|
@@ -562,151 +2575,669 @@ export interface ExportHeaderRow {
|
|
|
562
2575
|
* });
|
|
563
2576
|
*/
|
|
564
2577
|
export interface GridOptions<T = any> {
|
|
565
|
-
/**
|
|
2578
|
+
/**
|
|
2579
|
+
* 컬럼 정의 배열(필수).
|
|
2580
|
+
*
|
|
2581
|
+
* Column definitions (required).
|
|
2582
|
+
*
|
|
2583
|
+
* 列定義の配列(必須)。
|
|
2584
|
+
*
|
|
2585
|
+
* 列定义数组(必填)。
|
|
2586
|
+
*/
|
|
566
2587
|
columns: ColumnDef<T>[];
|
|
567
|
-
/**
|
|
2588
|
+
/**
|
|
2589
|
+
* 그리드의 세로 크기. 숫자면 px, 문자열이면 CSS 값('60vh' 등)입니다. 가상 스크롤이 제대로 돌려면
|
|
2590
|
+
* 확정된 높이가 필요하므로, 큰 데이터에서는 이 값(또는 조상 요소의 높이)을 꼭 주는 걸 권합니다.
|
|
2591
|
+
*
|
|
2592
|
+
* The grid's vertical size — a number is px, a string is a CSS value ('60vh' …). Virtual scroll
|
|
2593
|
+
* needs a definite height, so on large data set this (or an ancestor's height).
|
|
2594
|
+
*
|
|
2595
|
+
* グリッドの縦のサイズ。数値なら px、文字列なら CSS 値('60vh' など)です。仮想スクロールがきちんと
|
|
2596
|
+
* 動くには確定した高さが必要なので、大きなデータではこの値(または祖先要素の高さ)を必ず指定する
|
|
2597
|
+
* ことをおすすめします。
|
|
2598
|
+
*
|
|
2599
|
+
* 表格的纵向尺寸。数字为 px,字符串为 CSS 值('60vh' 等)。虚拟滚动需要确定的高度才能正常工作,
|
|
2600
|
+
* 因此数据量大时务必指定此值(或祖先元素的高度)。
|
|
2601
|
+
*/
|
|
568
2602
|
height?: number | string;
|
|
569
|
-
/**
|
|
2603
|
+
/**
|
|
2604
|
+
* 그리드의 가로 크기. 숫자면 px, 문자열이면 CSS 값. 생략 시 부모 폭을 채웁니다.
|
|
2605
|
+
*
|
|
2606
|
+
* The grid's horizontal size — number = px, string = CSS. Unset fills the parent width.
|
|
2607
|
+
*
|
|
2608
|
+
* グリッドの横のサイズ。数値なら px、文字列なら CSS 値。省略時は親の幅を埋めます。
|
|
2609
|
+
*
|
|
2610
|
+
* 表格的横向尺寸。数字为 px,字符串为 CSS 值。省略时填满父元素的宽度。
|
|
2611
|
+
*/
|
|
570
2612
|
width?: number | string;
|
|
571
|
-
/**
|
|
2613
|
+
/**
|
|
2614
|
+
* 데이터 행 한 줄의 세로 픽셀 높이. 촘촘하게 많이 보이려면 줄이고, 터치·가독성 위주면 키웁니다.
|
|
2615
|
+
* 가상 스크롤이 이 값으로 "화면에 몇 행이 들어갈지"를 계산합니다. 기본 32.
|
|
2616
|
+
*
|
|
2617
|
+
* Height in px of one data row. Lower it to pack more rows in; raise it for touch/readability.
|
|
2618
|
+
* Virtual scroll uses this to compute how many rows fit on screen. Default 32.
|
|
2619
|
+
*
|
|
2620
|
+
* データ行 1 行の縦のピクセル高さ。詰めて多く見せたいなら小さく、タッチ・可読性重視なら大きくします。
|
|
2621
|
+
* 仮想スクロールはこの値で「画面に何行入るか」を計算します。既定値は 32。
|
|
2622
|
+
*
|
|
2623
|
+
* 一行数据的纵向像素高度。想紧凑地多显示就调小,重视触摸和可读性就调大。
|
|
2624
|
+
* 虚拟滚动用这个值计算「屏幕能容纳多少行」。默认 32。
|
|
2625
|
+
*/
|
|
572
2626
|
rowHeight?: number;
|
|
573
|
-
/**
|
|
2627
|
+
/**
|
|
2628
|
+
* 머리글(헤더) 행의 높이(px). 여러 줄 헤더면 자동으로 늘어나므로 보통은 생략.
|
|
2629
|
+
*
|
|
2630
|
+
* Header row height (px). Grows automatically for multi-line headers, so usually omitted.
|
|
2631
|
+
*
|
|
2632
|
+
* 見出し(ヘッダー)行の高さ(px)。複数行ヘッダーなら自動で伸びるので、通常は省略。
|
|
2633
|
+
*
|
|
2634
|
+
* 表头行的高度(px)。多行表头会自动增高,通常省略。
|
|
2635
|
+
*/
|
|
574
2636
|
headerHeight?: number;
|
|
575
|
-
/**
|
|
2637
|
+
/**
|
|
2638
|
+
* 푸터(합계) 행의 높이(px).
|
|
2639
|
+
*
|
|
2640
|
+
* Footer (totals) row height (px).
|
|
2641
|
+
*
|
|
2642
|
+
* フッター(合計)行の高さ(px)。
|
|
2643
|
+
*
|
|
2644
|
+
* 页脚(合计)行的高度(px)。
|
|
2645
|
+
*/
|
|
576
2646
|
footerHeight?: number;
|
|
577
|
-
/**
|
|
2647
|
+
/**
|
|
2648
|
+
* 셀 내용이 길어 줄바꿈될 때 행 높이를 내용에 맞춰 자동으로 늘립니다. 컬럼의 wrap 과 함께 씁니다.
|
|
2649
|
+
*
|
|
2650
|
+
* Auto-grow a row's height to fit wrapped content. Use together with a column's wrap.
|
|
2651
|
+
*
|
|
2652
|
+
* セルの内容が長くて折り返されるとき、行の高さを内容に合わせて自動的に伸ばします。列の wrap と
|
|
2653
|
+
* 一緒に使います。
|
|
2654
|
+
*
|
|
2655
|
+
* 单元格内容过长而换行时,让行高随内容自动增高。与列的 wrap 配合使用。
|
|
2656
|
+
*/
|
|
578
2657
|
autoHeight?: boolean;
|
|
579
|
-
/**
|
|
2658
|
+
/**
|
|
2659
|
+
* 컬럼 폭의 합이 컨테이너를 꽉 채우도록 늘립니다. 오른쪽에 빈 공간을 남기고 싶지 않을 때.
|
|
2660
|
+
*
|
|
2661
|
+
* Stretch column widths so their sum fills the container — when you don't want empty space on the right.
|
|
2662
|
+
*
|
|
2663
|
+
* 列幅の合計がコンテナーいっぱいになるように伸ばします。右側に空きを残したくないときに。
|
|
2664
|
+
*
|
|
2665
|
+
* 拉伸列宽,使其总和填满容器。适用于不想在右侧留白的场景。
|
|
2666
|
+
*/
|
|
580
2667
|
fillWidth?: boolean;
|
|
581
|
-
/**
|
|
2668
|
+
/**
|
|
2669
|
+
* width 도 flex 도 안 준 컬럼에 적용할 기본 폭(px).
|
|
2670
|
+
*
|
|
2671
|
+
* Fallback width (px) for columns given neither width nor flex.
|
|
2672
|
+
*
|
|
2673
|
+
* width も flex も指定していない列に適用する既定の幅(px)。
|
|
2674
|
+
*
|
|
2675
|
+
* 对既未指定 width 也未指定 flex 的列所应用的默认宽度(px)。
|
|
2676
|
+
*/
|
|
582
2677
|
defaultColumnWidth?: number;
|
|
583
2678
|
/**
|
|
584
2679
|
* 뷰포트 안전장치(옵트인, 기본 undefined = OFF = 기존 동작 완전 불변).
|
|
585
|
-
*
|
|
2680
|
+
*
|
|
586
2681
|
* 호스트가 그리드 컨테이너 조상 체인에 확정 높이(definite height)를 주지 않으면
|
|
587
|
-
* 내부 스페이서(totalRows×rowHeight)가 컨테이너를 전체 콘텐츠 크기로
|
|
2682
|
+
* 내부 스페이서(totalRows×rowHeight)가 컨테이너를 전체 콘텐츠 크기로 늘리고,
|
|
588
2683
|
* ResizeObserver 되먹임으로 windowing 이 무력화되어 전 행이 DOM 렌더되는 폭주가 발생한다
|
|
589
2684
|
* (대량 데이터일수록 재앙적). 이 값을 지정하면, 컨테이너가 전 콘텐츠를 다 담는 "언바운드"
|
|
590
2685
|
* 상태로 감지될 때에 한해 윈도잉 뷰포트 높이를 이 값(px)으로 클램프해 폭주를 차단한다.
|
|
591
2686
|
* 정상적으로 확정 높이가 있는 바운드 컨테이너에는 영향이 없다.
|
|
592
2687
|
* 1순위 권장은 컨테이너/그리드에 확정 height 를 주는 것이며, 이 옵션은 안전망이다.
|
|
593
|
-
*
|
|
2688
|
+
*
|
|
2689
|
+
* Viewport safety net (opt-in; default undefined = OFF = behavior fully unchanged).
|
|
2690
|
+
*
|
|
2691
|
+
* When the container ancestor chain has no definite height, the internal spacer
|
|
594
2692
|
* (totalRows×rowHeight) inflates the container and a ResizeObserver feedback loop defeats
|
|
595
2693
|
* windowing, DOM-rendering every row (catastrophic on large data). If set, and only when the
|
|
596
2694
|
* container is detected as "unbounded", the windowing viewport height is clamped to this px
|
|
597
2695
|
* value. Bounded containers are unaffected. Prefer giving the container a definite height;
|
|
598
2696
|
* this option is a safety net.
|
|
2697
|
+
*
|
|
2698
|
+
* ビューポートの安全装置(オプトイン、既定 undefined = OFF = 既存動作は完全に不変)。
|
|
2699
|
+
*
|
|
2700
|
+
* ホストがグリッドコンテナーの祖先チェーンに確定高さ(definite height)を与えないと、
|
|
2701
|
+
* 内部スペーサー(totalRows×rowHeight)がコンテナーを全コンテンツのサイズまで伸ばし、
|
|
2702
|
+
* ResizeObserver のフィードバックで windowing が無効化されて全行が DOM レンダリングされる暴走が
|
|
2703
|
+
* 発生する(大量データほど破滅的)。この値を指定すると、コンテナーが全コンテンツを収める
|
|
2704
|
+
* 「アンバウンド」状態として検出されたときに限り、ウィンドウイングのビューポート高さをこの値(px)に
|
|
2705
|
+
* クランプして暴走を遮断する。正常に確定高さがあるバウンドコンテナーには影響がない。
|
|
2706
|
+
* 第 1 に推奨するのはコンテナー/グリッドに確定 height を与えることであり、このオプションは安全網である。
|
|
2707
|
+
*
|
|
2708
|
+
* 视口安全装置(选择性启用,默认 undefined = OFF = 现有行为完全不变)。
|
|
2709
|
+
*
|
|
2710
|
+
* 宿主若未在表格容器的祖先链上给出确定高度(definite height),内部占位元素(totalRows×rowHeight)
|
|
2711
|
+
* 会把容器撑到全部内容的大小,ResizeObserver 的反馈又会令 windowing 失效,导致所有行都渲染进 DOM 的
|
|
2712
|
+
* 失控(数据量越大越是灾难)。指定此值后,仅当容器被检测为装下全部内容的「无界」状态时,才把 windowing
|
|
2713
|
+
* 的视口高度钳制到该值(px),以阻断失控。对正常具有确定高度的有界容器没有影响。
|
|
2714
|
+
* 首选做法是给容器/表格一个确定的 height,此选项只是安全网。
|
|
599
2715
|
*/
|
|
600
2716
|
fallbackViewportHeight?: number;
|
|
601
|
-
/**
|
|
2717
|
+
/**
|
|
2718
|
+
* 그리드 전체의 편집 스위치. 켜져 있고 컬럼의 editable 도 참일 때만 실제로 편집이 열립니다(둘 다 참 조건).
|
|
2719
|
+
*
|
|
2720
|
+
* The grid-wide edit switch. Editing opens only when this AND a column's editable are true.
|
|
2721
|
+
*
|
|
2722
|
+
* グリッド全体の編集スイッチ。オンで、かつ列の editable も真のときだけ実際に編集が開きます
|
|
2723
|
+
* (両方が真という条件)。
|
|
2724
|
+
*
|
|
2725
|
+
* 表格全局的编辑开关。只有该开关打开、且列的 editable 也为真时,编辑才真正开启(两者皆真的条件)。
|
|
2726
|
+
*/
|
|
602
2727
|
editable?: boolean;
|
|
603
|
-
/**
|
|
2728
|
+
/**
|
|
2729
|
+
* 편집을 어떻게 시작할지. 'click'=한 번 클릭, 'dblclick'=더블클릭, 'none'=마우스로는 진입 불가(API 로만).
|
|
2730
|
+
*
|
|
2731
|
+
* How editing starts — 'click' single click, 'dblclick' double click, 'none' no mouse entry (API only).
|
|
2732
|
+
*
|
|
2733
|
+
* 編集をどう開始するか。'click'=一度クリック、'dblclick'=ダブルクリック、'none'=マウスでは入れない
|
|
2734
|
+
* (API のみ)。
|
|
2735
|
+
*
|
|
2736
|
+
* 如何开始编辑。'click'=单击一次,'dblclick'=双击,'none'=无法用鼠标进入(仅 API)。
|
|
2737
|
+
*/
|
|
604
2738
|
editMode?: 'click' | 'dblclick' | 'none';
|
|
605
|
-
/**
|
|
2739
|
+
/**
|
|
2740
|
+
* (예약) 편집 실행취소 히스토리 — 아직 미구현.
|
|
2741
|
+
*
|
|
2742
|
+
* (Reserved) undo history for edits — not implemented yet.
|
|
2743
|
+
*
|
|
2744
|
+
* (予約)編集の取り消し履歴 — まだ未実装。
|
|
2745
|
+
*
|
|
2746
|
+
* (保留)编辑的撤销历史 — 尚未实现。
|
|
2747
|
+
*/
|
|
606
2748
|
history?: boolean;
|
|
607
|
-
/**
|
|
2749
|
+
/**
|
|
2750
|
+
* (예약) 히스토리에 담을 최대 단계 수 — 아직 미구현.
|
|
2751
|
+
*
|
|
2752
|
+
* (Reserved) max steps kept in history — not implemented yet.
|
|
2753
|
+
*
|
|
2754
|
+
* (予約)履歴に保持する最大ステップ数 — まだ未実装。
|
|
2755
|
+
*
|
|
2756
|
+
* (保留)历史中保留的最大步数 — 尚未实现。
|
|
2757
|
+
*/
|
|
608
2758
|
historySize?: number;
|
|
609
|
-
/**
|
|
2759
|
+
/**
|
|
2760
|
+
* 사용자가 무엇을 선택할 수 있는지. 'cells' 로 하면 스프레드시트식 범위 선택이 됩니다.
|
|
2761
|
+
*
|
|
2762
|
+
* What the user can select. 'cells' enables spreadsheet-style range selection.
|
|
2763
|
+
*
|
|
2764
|
+
* ユーザーが何を選択できるか。'cells' にするとスプレッドシート式の範囲選択になります。
|
|
2765
|
+
*
|
|
2766
|
+
* 用户能选择什么。设为 'cells' 即为电子表格式的区域选择。
|
|
2767
|
+
*/
|
|
610
2768
|
selection?: SelectionMode;
|
|
611
|
-
/**
|
|
2769
|
+
/**
|
|
2770
|
+
* Ctrl+C / Ctrl+V 로 셀 값을 복사·붙여넣기하게 할지.
|
|
2771
|
+
*
|
|
2772
|
+
* Whether Ctrl+C / Ctrl+V copy-paste of cell values is enabled.
|
|
2773
|
+
*
|
|
2774
|
+
* Ctrl+C / Ctrl+V でセルの値をコピー・貼り付けできるようにするか。
|
|
2775
|
+
*
|
|
2776
|
+
* 是否允许用 Ctrl+C / Ctrl+V 复制、粘贴单元格的值。
|
|
2777
|
+
*/
|
|
612
2778
|
clipboard?: boolean;
|
|
613
|
-
/**
|
|
2779
|
+
/**
|
|
2780
|
+
* 범위 선택 + 채우기 핸들(엑셀식 드래그 채우기) 세부 설정.
|
|
2781
|
+
*
|
|
2782
|
+
* Range selection + fill handle (Excel-style drag-fill) detailed options.
|
|
2783
|
+
*
|
|
2784
|
+
* 範囲選択+フィルハンドル(Excel 式のドラッグ入力)の詳細設定。
|
|
2785
|
+
*
|
|
2786
|
+
* 区域选择 + 填充柄(Excel 式拖拽填充)的详细设置。
|
|
2787
|
+
*/
|
|
614
2788
|
rangeSelection?: RangeSelectionOptions;
|
|
615
|
-
/**
|
|
2789
|
+
/**
|
|
2790
|
+
* 셀 수식('=A1+B2' 같은 식) 기능 세부 설정.
|
|
2791
|
+
*
|
|
2792
|
+
* Cell-formula ('=A1+B2'-style) detailed options.
|
|
2793
|
+
*
|
|
2794
|
+
* セル数式('=A1+B2' のような式)機能の詳細設定。
|
|
2795
|
+
*
|
|
2796
|
+
* 单元格公式('=A1+B2' 这类算式)功能的详细设置。
|
|
2797
|
+
*/
|
|
616
2798
|
formula?: FormulaOptions;
|
|
617
|
-
/**
|
|
2799
|
+
/**
|
|
2800
|
+
* 마스터/디테일(행을 펼쳐 상세 패널 표시) 세부 설정.
|
|
2801
|
+
*
|
|
2802
|
+
* Master/detail (expand a row into a detail panel) detailed options.
|
|
2803
|
+
*
|
|
2804
|
+
* マスター/ディテール(行を展開して詳細パネルを表示)の詳細設定。
|
|
2805
|
+
*
|
|
2806
|
+
* 主从(展开行显示详情面板)的详细设置。
|
|
2807
|
+
*/
|
|
618
2808
|
masterDetail?: MasterDetailOptions<T>;
|
|
619
|
-
/**
|
|
2809
|
+
/**
|
|
2810
|
+
* 그리드 데이터를 그대로 쓰는 통합 차트 세부 설정.
|
|
2811
|
+
*
|
|
2812
|
+
* Detailed options for the chart integrated on the grid's own data.
|
|
2813
|
+
*
|
|
2814
|
+
* グリッドのデータをそのまま使う統合チャートの詳細設定。
|
|
2815
|
+
*
|
|
2816
|
+
* 直接使用表格数据的集成图表的详细设置。
|
|
2817
|
+
*/
|
|
620
2818
|
chart?: import('./chart/types.js').ChartGlobalOptions;
|
|
621
|
-
/**
|
|
2819
|
+
/**
|
|
2820
|
+
* 조건부 서식 규칙 목록(값에 따라 셀을 데이터바·색조·아이콘으로 강조). 지정하지 않으면 아무 것도 바뀌지 않습니다.
|
|
2821
|
+
*
|
|
2822
|
+
* Conditional-format rules — highlight cells by value with data-bars, color scales, or icon sets.
|
|
2823
|
+
* Unset changes nothing.
|
|
2824
|
+
*
|
|
2825
|
+
* 条件付き書式のルール一覧(値に応じてセルをデータバー・カラースケール・アイコンで強調)。
|
|
2826
|
+
* 指定しなければ何も変わりません。
|
|
2827
|
+
*
|
|
2828
|
+
* 条件格式规则列表(按值用数据条、色阶、图标强调单元格)。不指定则不改变任何内容。
|
|
2829
|
+
*/
|
|
622
2830
|
conditionalFormat?: import('./cf/CFRule.js').CFRule[];
|
|
623
|
-
/**
|
|
2831
|
+
/**
|
|
2832
|
+
* 머리글 클릭 정렬을 그리드 전체에서 켤지. 컬럼별 sortable 로 예외를 둘 수 있습니다.
|
|
2833
|
+
*
|
|
2834
|
+
* Turn header-click sorting on grid-wide. Per-column sortable can override.
|
|
2835
|
+
*
|
|
2836
|
+
* 見出しクリックでの並べ替えをグリッド全体で有効にするか。列ごとの sortable で例外を設けられます。
|
|
2837
|
+
*
|
|
2838
|
+
* 是否在表格全局启用点击表头排序。可用各列的 sortable 设置例外。
|
|
2839
|
+
*/
|
|
624
2840
|
sortable?: boolean;
|
|
625
|
-
/**
|
|
2841
|
+
/**
|
|
2842
|
+
* Shift+클릭으로 여러 컬럼을 겹쳐 정렬(2차·3차 기준)하게 할지.
|
|
2843
|
+
*
|
|
2844
|
+
* Whether Shift+click stacks multiple sort keys (secondary, tertiary …).
|
|
2845
|
+
*
|
|
2846
|
+
* Shift+クリックで複数の列を重ねて並べ替える(第 2・第 3 基準)ようにするか。
|
|
2847
|
+
*
|
|
2848
|
+
* 是否允许 Shift+单击叠加多列排序(第二、第三基准)。
|
|
2849
|
+
*/
|
|
626
2850
|
multiSort?: boolean;
|
|
627
|
-
/**
|
|
2851
|
+
/**
|
|
2852
|
+
* 필터 기능을 그리드 전체에서 켤지. 컬럼별 filterable 로 예외를 둘 수 있습니다.
|
|
2853
|
+
*
|
|
2854
|
+
* Turn filtering on grid-wide. Per-column filterable can override.
|
|
2855
|
+
*
|
|
2856
|
+
* フィルター機能をグリッド全体で有効にするか。列ごとの filterable で例外を設けられます。
|
|
2857
|
+
*
|
|
2858
|
+
* 是否在表格全局启用过滤功能。可用各列的 filterable 设置例外。
|
|
2859
|
+
*/
|
|
628
2860
|
filterable?: boolean;
|
|
629
|
-
/**
|
|
2861
|
+
/**
|
|
2862
|
+
* 처음 로드될 때 미리 적용해 둘 정렬 상태.
|
|
2863
|
+
*
|
|
2864
|
+
* The sort state to apply up front on first load.
|
|
2865
|
+
*
|
|
2866
|
+
* 最初に読み込まれるときにあらかじめ適用しておく並べ替えの状態。
|
|
2867
|
+
*
|
|
2868
|
+
* 首次加载时预先应用的排序状态。
|
|
2869
|
+
*/
|
|
630
2870
|
defaultSort?: SortItem[];
|
|
631
|
-
/**
|
|
2871
|
+
/**
|
|
2872
|
+
* 왼쪽부터 몇 개 컬럼을 가로 스크롤과 무관하게 고정할지.
|
|
2873
|
+
*
|
|
2874
|
+
* How many leftmost columns stay pinned while scrolling horizontally.
|
|
2875
|
+
*
|
|
2876
|
+
* 左から何列を横スクロールと無関係に固定するか。
|
|
2877
|
+
*
|
|
2878
|
+
* 从左侧起固定多少列,使其不随横向滚动移动。
|
|
2879
|
+
*/
|
|
632
2880
|
frozenColumns?: number;
|
|
633
|
-
/**
|
|
2881
|
+
/**
|
|
2882
|
+
* (예약) 위쪽 고정 행 수 — 아직 미구현.
|
|
2883
|
+
*
|
|
2884
|
+
* (Reserved) number of top-frozen rows — not implemented yet.
|
|
2885
|
+
*
|
|
2886
|
+
* (予約)上部固定行の数 — まだ未実装。
|
|
2887
|
+
*
|
|
2888
|
+
* (保留)顶部固定行的数量 — 尚未实现。
|
|
2889
|
+
*/
|
|
634
2890
|
frozenRows?: number;
|
|
635
|
-
/**
|
|
2891
|
+
/**
|
|
2892
|
+
* 맨 왼쪽에 1,2,3… 행 번호 컬럼을 붙일지.
|
|
2893
|
+
*
|
|
2894
|
+
* Whether to add a leftmost 1,2,3… row-number column.
|
|
2895
|
+
*
|
|
2896
|
+
* 左端に 1,2,3… の行番号列を付けるか。
|
|
2897
|
+
*
|
|
2898
|
+
* 是否在最左侧添加 1,2,3… 的行号列。
|
|
2899
|
+
*/
|
|
636
2900
|
rowNumber?: boolean;
|
|
637
|
-
/**
|
|
2901
|
+
/**
|
|
2902
|
+
* 각 행이 추가/수정/삭제 중 어떤 상태인지 표시하는 컬럼을 붙일지(편집 추적용).
|
|
2903
|
+
*
|
|
2904
|
+
* Whether to add a column showing each row's added/edited/removed state (for change tracking).
|
|
2905
|
+
*
|
|
2906
|
+
* 各行が追加/修正/削除のどの状態かを表示する列を付けるか(編集追跡用)。
|
|
2907
|
+
*
|
|
2908
|
+
* 是否添加一列显示各行处于新增/修改/删除中的哪种状态(用于编辑追踪)。
|
|
2909
|
+
*/
|
|
638
2910
|
stateColumn?: boolean;
|
|
639
|
-
/**
|
|
2911
|
+
/**
|
|
2912
|
+
* 행 선택용 체크박스 컬럼을 붙일지.
|
|
2913
|
+
*
|
|
2914
|
+
* Whether to add a checkbox column for selecting rows.
|
|
2915
|
+
*
|
|
2916
|
+
* 行選択用のチェックボックス列を付けるか。
|
|
2917
|
+
*
|
|
2918
|
+
* 是否添加用于选择行的复选框列。
|
|
2919
|
+
*/
|
|
640
2920
|
checkColumn?: boolean;
|
|
641
|
-
/**
|
|
2921
|
+
/**
|
|
2922
|
+
* 행을 드래그해 순서를 바꾸게 할지.
|
|
2923
|
+
*
|
|
2924
|
+
* Whether rows can be dragged to reorder.
|
|
2925
|
+
*
|
|
2926
|
+
* 行をドラッグして順序を変えられるようにするか。
|
|
2927
|
+
*
|
|
2928
|
+
* 是否允许拖拽行来改变顺序。
|
|
2929
|
+
*/
|
|
642
2930
|
draggable?: boolean;
|
|
643
|
-
/**
|
|
2931
|
+
/**
|
|
2932
|
+
* 그리드↔그리드 행 드래그 이동 허용 (draggable:true 와 함께 사용, 양쪽 그리드 모두 true 여야 이동)
|
|
2933
|
+
*
|
|
2934
|
+
* Enable grid-to-grid row drag (use with draggable:true; both grids must be true)
|
|
2935
|
+
*
|
|
2936
|
+
* グリッド↔グリッドの行ドラッグ移動を許可(draggable:true と併用、両方のグリッドが true でないと移動しない)
|
|
2937
|
+
*
|
|
2938
|
+
* 允许表格↔表格的行拖拽移动(与 draggable:true 配合使用,两侧表格都为 true 才能移动)
|
|
2939
|
+
*/
|
|
644
2940
|
crossGrid?: boolean;
|
|
645
2941
|
/**
|
|
646
|
-
* 크로스그리드 이동 시 소스→타깃 행 변환 방식.
|
|
647
|
-
* - 'auto'(기본): 필드명 그대로 복사
|
|
648
|
-
* - 'interactive': 소스/타깃 스키마가 다르면 매핑 모달을 띄워 개발자가 매칭 + 변환 스크립트 출력
|
|
649
|
-
* - 함수: (srcRow) => targetRow 로 직접 변환 (모달 없이 baking)
|
|
2942
|
+
* 크로스그리드 이동 시 소스→타깃 행 변환 방식.
|
|
2943
|
+
* - 'auto'(기본): 필드명 그대로 복사
|
|
2944
|
+
* - 'interactive': 소스/타깃 스키마가 다르면 매핑 모달을 띄워 개발자가 매칭 + 변환 스크립트 출력
|
|
2945
|
+
* - 함수: (srcRow) => targetRow 로 직접 변환 (모달 없이 baking)
|
|
2946
|
+
*
|
|
2947
|
+
* How source rows are transformed on cross-grid moves.
|
|
2948
|
+
* - 'auto' (default): copy by matching field names
|
|
2949
|
+
* - 'interactive': show a mapping modal when schemas differ, emitting a transform script
|
|
2950
|
+
* - function: transform directly without the modal
|
|
2951
|
+
*
|
|
2952
|
+
* クロスグリッド移動時のソース→ターゲット行の変換方式。
|
|
2953
|
+
* - 'auto'(既定): フィールド名そのままコピー
|
|
2954
|
+
* - 'interactive': ソース/ターゲットのスキーマが異なればマッピングモーダルを表示して開発者がマッチング+変換スクリプトを出力
|
|
2955
|
+
* - 関数: (srcRow) => targetRow で直接変換(モーダルなしで baking)
|
|
2956
|
+
*
|
|
2957
|
+
* 跨表格移动时源行→目标行的转换方式。
|
|
2958
|
+
* - 'auto'(默认): 按字段名原样复制
|
|
2959
|
+
* - 'interactive': 源/目标结构不同时弹出映射对话框,由开发者匹配并输出转换脚本
|
|
2960
|
+
* - 函数: 以 (srcRow) => targetRow 直接转换(不弹对话框,直接 baking)
|
|
650
2961
|
*/
|
|
651
2962
|
crossGridMapping?: 'auto' | 'interactive' | ((srcRow: T) => Partial<T>);
|
|
652
|
-
/**
|
|
2963
|
+
/**
|
|
2964
|
+
* 셀 병합 기능 사용.
|
|
2965
|
+
*
|
|
2966
|
+
* Enable cell merging.
|
|
2967
|
+
*
|
|
2968
|
+
* セル結合機能を使用。
|
|
2969
|
+
*
|
|
2970
|
+
* 启用单元格合并功能。
|
|
2971
|
+
*/
|
|
653
2972
|
mergeCells?: boolean;
|
|
654
|
-
/**
|
|
2973
|
+
/**
|
|
2974
|
+
* 처음부터 이 필드들로 행을 묶어 보여 줄지. 여러 개면 다단계 그룹이 됩니다(예: 지역 → 부서).
|
|
2975
|
+
*
|
|
2976
|
+
* Which fields to group rows by from the start. Several means nested groups (e.g. region → dept).
|
|
2977
|
+
*
|
|
2978
|
+
* 最初からこれらのフィールドで行をまとめて見せるか。複数なら多段グループになります(例: 地域 → 部署)。
|
|
2979
|
+
*
|
|
2980
|
+
* 一开始就按这些字段把行分组显示。多个字段则形成多级分组(例: 地区 → 部门)。
|
|
2981
|
+
*/
|
|
655
2982
|
groupBy?: string[];
|
|
656
|
-
/**
|
|
2983
|
+
/**
|
|
2984
|
+
* 각 그룹에 소계/합계 요약 행을 붙이는 설정.
|
|
2985
|
+
*
|
|
2986
|
+
* Options for attaching subtotal/summary rows to each group.
|
|
2987
|
+
*
|
|
2988
|
+
* 各グループに小計/合計の要約行を付ける設定。
|
|
2989
|
+
*
|
|
2990
|
+
* 为各分组添加小计/合计汇总行的设置。
|
|
2991
|
+
*/
|
|
657
2992
|
summary?: SummaryOptions;
|
|
658
|
-
/**
|
|
2993
|
+
/**
|
|
2994
|
+
* 트리(계층) 데이터를 어떤 모양으로 받을지. 'auto'=각 행이 children 배열로 자식을 품은 중첩 구조,
|
|
2995
|
+
* 'flat'=모든 행이 한 줄이고 id/부모id 로 관계를 표현하는 평면 구조.
|
|
2996
|
+
*
|
|
2997
|
+
* How hierarchical data is shaped. 'auto' = each row nests its children in a children array;
|
|
2998
|
+
* 'flat' = every row is a flat entry linked by id / parent-id.
|
|
2999
|
+
*
|
|
3000
|
+
* ツリー(階層)データをどんな形で受け取るか。'auto'=各行が children 配列で子を抱える入れ子構造、
|
|
3001
|
+
* 'flat'=すべての行が 1 行で id/親 id により関係を表す平面構造。
|
|
3002
|
+
*
|
|
3003
|
+
* 以何种形态接收树(层级)数据。'auto'=每行用 children 数组容纳子级的嵌套结构,
|
|
3004
|
+
* 'flat'=所有行都是一条记录、以 id/父 id 表达关系的扁平结构。
|
|
3005
|
+
*/
|
|
659
3006
|
treeMode?: 'auto' | 'flat';
|
|
660
|
-
/**
|
|
3007
|
+
/**
|
|
3008
|
+
* flat 트리에서 각 행의 고유 id 가 담긴 필드 이름.
|
|
3009
|
+
*
|
|
3010
|
+
* In flat tree mode, the field holding each row's unique id.
|
|
3011
|
+
*
|
|
3012
|
+
* flat ツリーで、各行の固有 id が入っているフィールド名。
|
|
3013
|
+
*
|
|
3014
|
+
* flat 树中存放各行唯一 id 的字段名。
|
|
3015
|
+
*/
|
|
661
3016
|
treeId?: string;
|
|
662
|
-
/**
|
|
3017
|
+
/**
|
|
3018
|
+
* flat 트리에서 부모 행의 id 가 담긴 필드 이름.
|
|
3019
|
+
*
|
|
3020
|
+
* In flat tree mode, the field holding the parent row's id.
|
|
3021
|
+
*
|
|
3022
|
+
* flat ツリーで、親行の id が入っているフィールド名。
|
|
3023
|
+
*
|
|
3024
|
+
* flat 树中存放父行 id 的字段名。
|
|
3025
|
+
*/
|
|
663
3026
|
treeParentId?: string;
|
|
664
|
-
/**
|
|
3027
|
+
/**
|
|
3028
|
+
* 로드하자마자 모든 노드를 펼쳐 둘지.
|
|
3029
|
+
*
|
|
3030
|
+
* Whether to expand every node right after loading.
|
|
3031
|
+
*
|
|
3032
|
+
* 読み込んだ直後にすべてのノードを展開しておくか。
|
|
3033
|
+
*
|
|
3034
|
+
* 是否在加载后立即展开所有节点。
|
|
3035
|
+
*/
|
|
665
3036
|
expandOnLoad?: boolean;
|
|
666
|
-
/**
|
|
3037
|
+
/**
|
|
3038
|
+
* 아래쪽 페이지 이동 바를 띄울지.
|
|
3039
|
+
*
|
|
3040
|
+
* Whether to show the pagination bar at the bottom.
|
|
3041
|
+
*
|
|
3042
|
+
* 下部のページ移動バーを表示するか。
|
|
3043
|
+
*
|
|
3044
|
+
* 是否显示底部的分页栏。
|
|
3045
|
+
*/
|
|
667
3046
|
pagination?: boolean;
|
|
668
|
-
/**
|
|
3047
|
+
/**
|
|
3048
|
+
* 한 페이지에 몇 행을 보일지.
|
|
3049
|
+
*
|
|
3050
|
+
* How many rows show per page.
|
|
3051
|
+
*
|
|
3052
|
+
* 1 ページに何行を表示するか。
|
|
3053
|
+
*
|
|
3054
|
+
* 每页显示多少行。
|
|
3055
|
+
*/
|
|
669
3056
|
pageSize?: number;
|
|
670
|
-
/**
|
|
3057
|
+
/**
|
|
3058
|
+
* 아래(또는 위) 고정 푸터에 넣을 셀 정의들(합계 줄 등).
|
|
3059
|
+
*
|
|
3060
|
+
* Cell definitions for the pinned footer (e.g. a totals row).
|
|
3061
|
+
*
|
|
3062
|
+
* 下(または上)の固定フッターに入れるセル定義(合計行など)。
|
|
3063
|
+
*
|
|
3064
|
+
* 放入底部(或顶部)固定页脚的单元格定义(合计行等)。
|
|
3065
|
+
*/
|
|
671
3066
|
footer?: FooterDef[];
|
|
672
|
-
/**
|
|
3067
|
+
/**
|
|
3068
|
+
* 푸터를 아래('bottom')에 둘지 위('top')에 둘지.
|
|
3069
|
+
*
|
|
3070
|
+
* Put the footer at the bottom ('bottom') or top ('top').
|
|
3071
|
+
*
|
|
3072
|
+
* フッターを下('bottom')に置くか上('top')に置くか。
|
|
3073
|
+
*
|
|
3074
|
+
* 把页脚放在下方('bottom')还是上方('top')。
|
|
3075
|
+
*/
|
|
673
3076
|
footerPosition?: 'top' | 'bottom';
|
|
674
|
-
/**
|
|
3077
|
+
/**
|
|
3078
|
+
* true 면 모든 셀에 마우스를 올렸을 때 그 값이 브라우저 기본 툴팁으로 뜹니다. 컬럼의 tooltip 설정이 있으면 그쪽이 우선.
|
|
3079
|
+
*
|
|
3080
|
+
* true shows every cell's value as a native browser tooltip on hover; a column's own tooltip wins.
|
|
3081
|
+
*
|
|
3082
|
+
* true にすると、すべてのセルにマウスを乗せたときその値がブラウザー標準のツールチップで表示されます。
|
|
3083
|
+
* 列の tooltip 設定があればそちらが優先。
|
|
3084
|
+
*
|
|
3085
|
+
* true 时,鼠标悬停在任意单元格上都会以浏览器原生提示显示该值。若列自身有 tooltip 设置,则以列的为准。
|
|
3086
|
+
*/
|
|
675
3087
|
tooltips?: boolean;
|
|
676
|
-
/**
|
|
3088
|
+
/**
|
|
3089
|
+
* 그리드 컨테이너 aria-label.
|
|
3090
|
+
*
|
|
3091
|
+
* aria-label of the grid container.
|
|
3092
|
+
*
|
|
3093
|
+
* グリッドコンテナーの aria-label。
|
|
3094
|
+
*
|
|
3095
|
+
* 表格容器的 aria-label。
|
|
3096
|
+
*/
|
|
677
3097
|
ariaLabel?: string;
|
|
678
|
-
/**
|
|
3098
|
+
/**
|
|
3099
|
+
* 색 테마 id(data-og-theme).
|
|
3100
|
+
*
|
|
3101
|
+
* Color theme id (data-og-theme).
|
|
3102
|
+
*
|
|
3103
|
+
* 色テーマの id(data-og-theme)。
|
|
3104
|
+
*
|
|
3105
|
+
* 颜色主题 id(data-og-theme)。
|
|
3106
|
+
*/
|
|
679
3107
|
theme?: string;
|
|
680
|
-
/**
|
|
3108
|
+
/**
|
|
3109
|
+
* 스킨 (FORM 축, R12b) — data-og-skin. 미지정 시 'default'(오늘과 byte-identical).
|
|
3110
|
+
*
|
|
3111
|
+
* Skin (FORM axis, R12b) — data-og-skin. Default 'default' (byte-identical to stock look).
|
|
3112
|
+
*
|
|
3113
|
+
* スキン(FORM 軸、R12b) — data-og-skin。未指定時は 'default'(現状と byte-identical)。
|
|
3114
|
+
*
|
|
3115
|
+
* 皮肤(FORM 轴、R12b) — data-og-skin。未指定时为 'default'(与现状 byte-identical)。
|
|
3116
|
+
*/
|
|
681
3117
|
skin?: string;
|
|
682
|
-
/**
|
|
3118
|
+
/**
|
|
3119
|
+
* 행 간격(밀도) 이름. 촘촘·보통·여유처럼 행 높이와 여백을 통째로 바꿉니다. 지정하지 않으면 아무 것도 바뀌지 않습니다.
|
|
3120
|
+
*
|
|
3121
|
+
* The row-spacing (density) name — compact/normal/roomy row heights and paddings. Unset changes nothing.
|
|
3122
|
+
*
|
|
3123
|
+
* 行間隔(密度)の名前。詰め・普通・ゆとりのように行の高さと余白をまとめて変えます。
|
|
3124
|
+
* 指定しなければ何も変わりません。
|
|
3125
|
+
*
|
|
3126
|
+
* 行间距(密度)的名称。像紧凑、普通、宽松那样,把行高和内边距整体改变。不指定则不改变任何内容。
|
|
3127
|
+
*/
|
|
683
3128
|
density?: string;
|
|
684
|
-
/**
|
|
3129
|
+
/**
|
|
3130
|
+
* 배경 질감(패턴) 이름. 셀 배경에 무늬만 입힙니다. 지정하지 않으면 아무 것도 바뀌지 않습니다.
|
|
3131
|
+
*
|
|
3132
|
+
* The background texture (pattern) name — paints a pattern on cell backgrounds. Unset changes nothing.
|
|
3133
|
+
*
|
|
3134
|
+
* 背景の質感(パターン)の名前。セルの背景に模様だけを付けます。指定しなければ何も変わりません。
|
|
3135
|
+
*
|
|
3136
|
+
* 背景质感(图案)的名称。只在单元格背景上加花纹。不指定则不改变任何内容。
|
|
3137
|
+
*/
|
|
685
3138
|
texture?: string;
|
|
686
|
-
/**
|
|
3139
|
+
/**
|
|
3140
|
+
* 컨테이너에 주입할 CSS 변수 맵.
|
|
3141
|
+
*
|
|
3142
|
+
* CSS custom properties injected on the container.
|
|
3143
|
+
*
|
|
3144
|
+
* コンテナーに注入する CSS 変数のマップ。
|
|
3145
|
+
*
|
|
3146
|
+
* 注入到容器的 CSS 变量映射。
|
|
3147
|
+
*/
|
|
687
3148
|
cssVars?: Record<string, string>;
|
|
688
3149
|
/**
|
|
689
3150
|
* UI 문자열 로케일 id. 미지정 시 전역 활성 로케일(기본 'ko') 상속 — 기존 사용자 무변화.
|
|
690
|
-
*
|
|
691
|
-
*
|
|
3151
|
+
*
|
|
3152
|
+
* UI-string locale id. Falls back to the global active locale ('ko') — existing users unaffected.
|
|
3153
|
+
*
|
|
3154
|
+
* UI 文字列のロケール id。未指定時はグローバルの有効ロケール(既定 'ko')を継承 — 既存ユーザーに変化なし。
|
|
3155
|
+
*
|
|
3156
|
+
* UI 文本的区域设置 id。未指定时继承全局生效的区域设置(默认 'ko') — 现有用户不受影响。
|
|
3157
|
+
*
|
|
3158
|
+
* @defaultValue 전역 활성 로케일('ko')
|
|
3159
|
+
*
|
|
3160
|
+
* the global active locale ('ko')
|
|
3161
|
+
*
|
|
3162
|
+
* グローバルの有効ロケール('ko')
|
|
3163
|
+
*
|
|
3164
|
+
* 全局生效的区域设置('ko')
|
|
3165
|
+
*/
|
|
3166
|
+
locale?: string;
|
|
3167
|
+
/**
|
|
3168
|
+
* 이 인스턴스 한정 메시지 부분 오버라이드(2단 딥머지, 카탈로그 위). 개별 라벨 옵션 > messages > 카탈로그.
|
|
3169
|
+
*
|
|
3170
|
+
* Per-instance partial message override (2-level deep-merge over the catalog). Per-label option > messages > catalog.
|
|
3171
|
+
*
|
|
3172
|
+
* このインスタンス限定のメッセージ部分オーバーライド(2 段ディープマージ、カタログの上)。
|
|
3173
|
+
* 個別ラベルオプション > messages > カタログ。
|
|
3174
|
+
*
|
|
3175
|
+
* 仅限本实例的消息部分覆盖(两级深合并,叠加在目录之上)。单独标签选项 > messages > 目录。
|
|
3176
|
+
*/
|
|
3177
|
+
messages?: PartialLocaleMessages;
|
|
3178
|
+
/**
|
|
3179
|
+
* 우클릭 컨텍스트 메뉴. true=기본 메뉴, false=끔, 배열=직접 정한 항목들.
|
|
3180
|
+
*
|
|
3181
|
+
* Right-click context menu — true = default menu, false = off, array = your own items.
|
|
3182
|
+
*
|
|
3183
|
+
* 右クリックのコンテキストメニュー。true=既定メニュー、false=オフ、配列=自分で決めた項目。
|
|
3184
|
+
*
|
|
3185
|
+
* 右键上下文菜单。true=默认菜单,false=关闭,数组=自行指定的项目。
|
|
3186
|
+
*/
|
|
3187
|
+
contextMenu?: boolean | ContextMenuItem[];
|
|
3188
|
+
/**
|
|
3189
|
+
* 엑셀처럼 하단 탭으로 여러 시트를 전환하는 워크시트 정의들.
|
|
3190
|
+
*
|
|
3191
|
+
* Worksheet definitions — Excel-like bottom tabs switching between multiple sheets.
|
|
3192
|
+
*
|
|
3193
|
+
* Excel のように下部タブで複数シートを切り替えるワークシート定義。
|
|
3194
|
+
*
|
|
3195
|
+
* 像 Excel 那样用底部标签在多个工作表间切换的工作表定义。
|
|
3196
|
+
*/
|
|
3197
|
+
worksheets?: WorksheetDef[];
|
|
3198
|
+
/**
|
|
3199
|
+
* 수식·집계 계산에 쓸 기본 소수점 정밀도. 기본 10.
|
|
3200
|
+
*
|
|
3201
|
+
* Default decimal precision for formulas/aggregation. Default 10.
|
|
3202
|
+
*
|
|
3203
|
+
* 数式・集計の計算に使う既定の小数点精度。既定値は 10。
|
|
3204
|
+
*
|
|
3205
|
+
* 公式、汇总计算所用的默认小数精度。默认 10。
|
|
3206
|
+
*/
|
|
3207
|
+
calcPrecision?: number;
|
|
3208
|
+
/**
|
|
3209
|
+
* 머리글을 드래그해 컬럼 순서를 바꾸게 할지.
|
|
3210
|
+
*
|
|
3211
|
+
* Whether headers can be dragged to reorder columns.
|
|
3212
|
+
*
|
|
3213
|
+
* 見出しをドラッグして列の順序を変えられるようにするか。
|
|
3214
|
+
*
|
|
3215
|
+
* 是否允许拖拽表头来改变列的顺序。
|
|
692
3216
|
*/
|
|
693
|
-
|
|
3217
|
+
columnReorder?: boolean;
|
|
694
3218
|
/**
|
|
695
|
-
*
|
|
696
|
-
*
|
|
3219
|
+
* override 로 감싼 함수에서 예외가 나면 어떻게 할지. 기본(true, strict)은 예외를 그대로 전파합니다.
|
|
3220
|
+
* false 로 하면 경고 후 원본 함수를 실행하는 완화(fallback) 동작을 허용합니다.
|
|
3221
|
+
*
|
|
3222
|
+
* What happens when an overridden layer throws. Default (true, strict) propagates the error;
|
|
3223
|
+
* false permits the softer fallback that warns then runs the original.
|
|
3224
|
+
*
|
|
3225
|
+
* override で包んだ関数で例外が出たときどうするか。既定(true、strict)は例外をそのまま伝播します。
|
|
3226
|
+
* false にすると、警告のうえ元の関数を実行する緩和(fallback)動作を許可します。
|
|
3227
|
+
*
|
|
3228
|
+
* 用 override 包裹的函数抛出异常时如何处理。默认(true、strict)原样向上传播异常。
|
|
3229
|
+
* 设为 false 则允许先告警再执行原函数的宽松(fallback)行为。
|
|
697
3230
|
*/
|
|
698
|
-
messages?: PartialLocaleMessages;
|
|
699
|
-
/** F3: 우클릭 컨텍스트 메뉴(false=끔, 배열=커스텀 항목). / F3: right-click context menu (false = off, array = custom items). */
|
|
700
|
-
contextMenu?: boolean | ContextMenuItem[];
|
|
701
|
-
/** F2: 워크시트(다중시트). / F2: worksheets (multi-sheet tabs). */
|
|
702
|
-
worksheets?: WorksheetDef[];
|
|
703
|
-
/** F4: 전체 기본 소수점 정밀도 (기본 10) / F4: global default decimal precision (default 10) */
|
|
704
|
-
calcPrecision?: number;
|
|
705
|
-
/** 컬럼 드래그 리오더 허용. / Enable column drag reorder. */
|
|
706
|
-
columnReorder?: boolean;
|
|
707
|
-
/** override 커널: 레이어 예외를 기본 전파(strict). false → fallback 옵트인 동작 허용 / Override kernel: propagate layer exceptions by default (strict). false allows the fallback opt-in behavior. */
|
|
708
3231
|
overrideStrict?: boolean;
|
|
709
|
-
/**
|
|
3232
|
+
/**
|
|
3233
|
+
* 첫 렌더 완료 콜백.
|
|
3234
|
+
*
|
|
3235
|
+
* Fired after the first render.
|
|
3236
|
+
*
|
|
3237
|
+
* 初回レンダリング完了のコールバック。
|
|
3238
|
+
*
|
|
3239
|
+
* 首次渲染完成的回调。
|
|
3240
|
+
*/
|
|
710
3241
|
onReady?: (grid: OpenGridInstance<T>) => void;
|
|
711
3242
|
onCellClick?: (e: CellEvent<T>) => void;
|
|
712
3243
|
onCellDblClick?: (e: CellEvent<T>) => void;
|
|
@@ -715,14 +3246,55 @@ export interface GridOptions<T = any> {
|
|
|
715
3246
|
onEditBefore?: (e: EditEvent<T>) => boolean;
|
|
716
3247
|
onRowClick?: (e: RowEvent<T>) => void;
|
|
717
3248
|
onSelectionChange?: (e: SelectionEvent<T>) => void;
|
|
718
|
-
/**
|
|
3249
|
+
/**
|
|
3250
|
+
* 선택된 셀 범위가 바뀔 때마다 호출(차트가 이걸 실시간으로 구독하기도 함).
|
|
3251
|
+
*
|
|
3252
|
+
* Fired whenever the selected cell range changes (the chart can subscribe to it live).
|
|
3253
|
+
*
|
|
3254
|
+
* 選択されたセル範囲が変わるたびに呼び出し(チャートがこれをリアルタイムで購読することもある)。
|
|
3255
|
+
*
|
|
3256
|
+
* 每当选中的单元格区域变化时调用(图表也可能实时订阅它)。
|
|
3257
|
+
*/
|
|
719
3258
|
onRangeChange?: (e: RangeChangeEvent) => void;
|
|
720
|
-
/**
|
|
3259
|
+
/**
|
|
3260
|
+
* 채우기 핸들로 값 채우기가 확정된 뒤, 무엇이 어떻게 채워졌는지 결과를 전달.
|
|
3261
|
+
*
|
|
3262
|
+
* After a fill-handle fill commits, delivers what was filled and how.
|
|
3263
|
+
*
|
|
3264
|
+
* フィルハンドルでの値の入力が確定した後、何がどう入力されたかの結果を伝達。
|
|
3265
|
+
*
|
|
3266
|
+
* 填充柄填值确定后,传递填了什么、如何填的结果。
|
|
3267
|
+
*/
|
|
721
3268
|
onRangeFill?: (e: RangeFillEvent) => void;
|
|
722
|
-
/**
|
|
3269
|
+
/**
|
|
3270
|
+
* 선택 범위를 복사(Ctrl+C)했을 때 호출.
|
|
3271
|
+
*
|
|
3272
|
+
* Fired when the selected range is copied (Ctrl+C).
|
|
3273
|
+
*
|
|
3274
|
+
* 選択範囲をコピー(Ctrl+C)したときに呼び出し。
|
|
3275
|
+
*
|
|
3276
|
+
* 复制选中区域(Ctrl+C)时调用。
|
|
3277
|
+
*/
|
|
723
3278
|
onRangeCopy?: (e: RangeCopyEvent) => void;
|
|
724
|
-
/**
|
|
3279
|
+
/**
|
|
3280
|
+
* 행 상세 패널이 펼쳐질 때 호출.
|
|
3281
|
+
*
|
|
3282
|
+
* Fired when a row's detail panel expands.
|
|
3283
|
+
*
|
|
3284
|
+
* 行の詳細パネルが展開されるときに呼び出し。
|
|
3285
|
+
*
|
|
3286
|
+
* 行的详情面板展开时调用。
|
|
3287
|
+
*/
|
|
725
3288
|
onRowExpand?: (e: RowExpandEvent<T>) => void;
|
|
3289
|
+
/**
|
|
3290
|
+
* 행 상세 패널이 접힐 때 호출.
|
|
3291
|
+
*
|
|
3292
|
+
* Fired when a row's detail panel collapses.
|
|
3293
|
+
*
|
|
3294
|
+
* 行の詳細パネルが折りたたまれるときに呼び出し。
|
|
3295
|
+
*
|
|
3296
|
+
* 行的详情面板折叠时调用。
|
|
3297
|
+
*/
|
|
726
3298
|
onRowCollapse?: (e: RowExpandEvent<T>) => void;
|
|
727
3299
|
onSortChange?: (e: SortEvent) => void;
|
|
728
3300
|
onFilterChange?: (e: FilterEvent) => void;
|
|
@@ -732,13 +3304,45 @@ export interface GridOptions<T = any> {
|
|
|
732
3304
|
fromIndex: number;
|
|
733
3305
|
toIndex: number;
|
|
734
3306
|
}) => void;
|
|
735
|
-
/**
|
|
3307
|
+
/**
|
|
3308
|
+
* 변경전 — 이동 직전. false 반환 시 이동 취소
|
|
3309
|
+
*
|
|
3310
|
+
* before phase — just before the move; return false to cancel
|
|
3311
|
+
*
|
|
3312
|
+
* 変更前 — 移動の直前。false を返すと移動をキャンセル
|
|
3313
|
+
*
|
|
3314
|
+
* 变更前 — 移动的紧前。返回 false 则取消移动
|
|
3315
|
+
*/
|
|
736
3316
|
onGridDropBefore?: (e: GridDropEvent<T>) => boolean | void;
|
|
737
|
-
/**
|
|
3317
|
+
/**
|
|
3318
|
+
* 변경후 — 양쪽 데이터 모델 이동 완료
|
|
3319
|
+
*
|
|
3320
|
+
* after phase — both data models updated
|
|
3321
|
+
*
|
|
3322
|
+
* 変更後 — 両側のデータモデルの移動が完了
|
|
3323
|
+
*
|
|
3324
|
+
* 变更后 — 两侧数据模型的移动已完成
|
|
3325
|
+
*/
|
|
738
3326
|
onGridDropAfter?: (e: GridDropEvent<T>) => void;
|
|
739
|
-
/**
|
|
3327
|
+
/**
|
|
3328
|
+
* 완료시 — 양쪽 재렌더까지 끝남
|
|
3329
|
+
*
|
|
3330
|
+
* complete phase — both grids re-rendered
|
|
3331
|
+
*
|
|
3332
|
+
* 完了時 — 両側の再レンダリングまで終了
|
|
3333
|
+
*
|
|
3334
|
+
* 完成时 — 两侧的重新渲染也已结束
|
|
3335
|
+
*/
|
|
740
3336
|
onGridDropComplete?: (e: GridDropEvent<T>) => void;
|
|
741
|
-
/**
|
|
3337
|
+
/**
|
|
3338
|
+
* interactive 매핑 모달에서 매핑 확정 시 — 생성된 매핑/스크립트 수신
|
|
3339
|
+
*
|
|
3340
|
+
* fired when the interactive mapping modal is confirmed — receives the mapping/script
|
|
3341
|
+
*
|
|
3342
|
+
* interactive マッピングモーダルでマッピングが確定したとき — 生成されたマッピング/スクリプトを受信
|
|
3343
|
+
*
|
|
3344
|
+
* 在 interactive 映射对话框中确定映射时 — 接收生成的映射/脚本
|
|
3345
|
+
*/
|
|
742
3346
|
onGridDropMapping?: (e: GridMappingEvent<T>) => void;
|
|
743
3347
|
onColumnReorder?: (e: {
|
|
744
3348
|
fromIndex: number;
|
|
@@ -761,50 +3365,196 @@ export interface GridOptions<T = any> {
|
|
|
761
3365
|
onCellKeyUp?: (e: CellKeyEvent<T>) => void;
|
|
762
3366
|
onCellKeyPress?: (e: CellKeyEvent<T>) => void;
|
|
763
3367
|
}
|
|
764
|
-
/**
|
|
3368
|
+
/**
|
|
3369
|
+
* override 레이어 함수: 첫 인자는 안쪽(원본 근접) 함수. orig(...) 호출이 super 처럼 동작.
|
|
3370
|
+
*
|
|
3371
|
+
* Override layer function: the first argument is the inner (closer-to-original) function; calling orig(...) behaves like super.
|
|
3372
|
+
*
|
|
3373
|
+
* override レイヤー関数: 第 1 引数は内側(元の関数に近い)関数。orig(...) の呼び出しが super のように動作。
|
|
3374
|
+
*
|
|
3375
|
+
* override 层函数: 第一个参数是内层(更靠近原函数)的函数。调用 orig(...) 的行为如同 super。
|
|
3376
|
+
*/
|
|
765
3377
|
export type OverrideLayerFn = (orig: (...args: any[]) => any, ...args: any[]) => any;
|
|
766
|
-
/**
|
|
3378
|
+
/**
|
|
3379
|
+
* override 등록 옵션.
|
|
3380
|
+
*
|
|
3381
|
+
* Options for registering an override.
|
|
3382
|
+
*
|
|
3383
|
+
* override の登録オプション。
|
|
3384
|
+
*
|
|
3385
|
+
* override 的注册选项。
|
|
3386
|
+
*/
|
|
767
3387
|
export interface OverrideCallOptions {
|
|
768
|
-
/**
|
|
3388
|
+
/**
|
|
3389
|
+
* 동일 메서드 재진입 허용(정당한 재귀). 기본 false.
|
|
3390
|
+
*
|
|
3391
|
+
* Allow re-entry into the same method (legit recursion). Default false.
|
|
3392
|
+
*
|
|
3393
|
+
* 同一メソッドへの再入を許可(正当な再帰)。既定値は false。
|
|
3394
|
+
*
|
|
3395
|
+
* 允许重入同一方法(正当的递归)。默认 false。
|
|
3396
|
+
*/
|
|
769
3397
|
reentrant?: boolean;
|
|
770
|
-
/**
|
|
3398
|
+
/**
|
|
3399
|
+
* 'fallback' → 레이어 예외 시 경고 후 원본 실행(멱등 가정, 롤백 불가). 미지정 시 strict.
|
|
3400
|
+
*
|
|
3401
|
+
* 'fallback' runs the original after warning on a layer exception (assumes idempotency, no rollback). Strict when unset.
|
|
3402
|
+
*
|
|
3403
|
+
* 'fallback' → レイヤー例外時に警告のうえ元の関数を実行(冪等性を仮定、ロールバック不可)。未指定時は strict。
|
|
3404
|
+
*
|
|
3405
|
+
* 'fallback' → 层抛出异常时先告警再执行原函数(假定幂等,无法回滚)。未指定时为 strict。
|
|
3406
|
+
*/
|
|
771
3407
|
onError?: 'fallback';
|
|
772
3408
|
}
|
|
773
|
-
/**
|
|
3409
|
+
/**
|
|
3410
|
+
* 등록 가능한 알고리즘 슬롯 이름.
|
|
3411
|
+
*
|
|
3412
|
+
* Registerable algorithm slot names.
|
|
3413
|
+
*
|
|
3414
|
+
* 登録できるアルゴリズムスロットの名前。
|
|
3415
|
+
*
|
|
3416
|
+
* 可注册的算法插槽名称。
|
|
3417
|
+
*/
|
|
774
3418
|
export type StrategySlot = 'sortComparator' | 'filterPredicate' | 'displayFormatter' | 'cellSerializer' | 'groupKeyFn' | 'summaryOp' | 'cellClassResolver' | 'ariaLabelResolver' | 'skinResolver';
|
|
775
3419
|
/**
|
|
776
|
-
*
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
3420
|
+
* 스킨이 조절할 수 있는 CSS 변수 이름들의 목록입니다. 여기 담긴 것은 모두 "형태"에 관한 값(모서리 둥글기,
|
|
3421
|
+
* 테두리 두께, 그림자, 여백, 질감 등)뿐이고 색은 하나도 없습니다. 색은 별도의 테마(COLOR) 축이 맡습니다.
|
|
3422
|
+
* 이렇게 이름 자체를 색과 겹치지 않게 나눠 두어, 스킨을 바꿔도 색은 영향받지 않도록 보장합니다.
|
|
3423
|
+
*
|
|
3424
|
+
* The set of CSS-variable names a skin may adjust. Every one of these is about *form* (corner
|
|
3425
|
+
* radius, border width, elevation, spacing, texture …) and none are colors — color is owned by the
|
|
3426
|
+
* separate theme (COLOR) axis. Keeping the names disjoint guarantees a skin change never touches color.
|
|
3427
|
+
*
|
|
3428
|
+
* スキンが調節できる CSS 変数名の一覧です。ここに含まれるのはすべて「形」に関する値(角の丸み、
|
|
3429
|
+
* 枠線の太さ、影、余白、質感など)だけで、色は一つもありません。色は別のテーマ(COLOR)軸が担います。
|
|
3430
|
+
* このように名前自体を色と重ならないように分けておくことで、スキンを変えても色は影響を受けないことを
|
|
3431
|
+
* 保証します。
|
|
3432
|
+
*
|
|
3433
|
+
* 皮肤可以调节的 CSS 变量名清单。这里列出的全部是关于「形」的值(圆角、边框粗细、阴影、间距、质感等),
|
|
3434
|
+
* 没有一个是颜色 — 颜色由独立的主题(COLOR)轴负责。像这样把名称本身与颜色划分开,就保证了换皮肤绝不
|
|
3435
|
+
* 影响颜色。
|
|
780
3436
|
*/
|
|
781
3437
|
export type SkinTokenName = '--og-radius-none' | '--og-radius-sm' | '--og-radius-md' | '--og-radius-lg' | '--og-radius-pill' | '--og-radius-container' | '--og-radius-control' | '--og-radius-widget' | '--og-container-radius' | '--og-border-width' | '--og-border-width-strong' | '--og-border-style' | '--og-divider-style' | '--og-divider-repeat' | '--og-elevation-sm' | '--og-elevation-md' | '--og-elevation-lg' | '--og-elevation-alpha-sm' | '--og-elevation-alpha-md' | '--og-elevation-alpha-lg' | '--og-elevation-inset' | '--og-cell-padding-x' | '--og-cell-padding-y' | '--og-density-row-height' | '--og-density-header-height' | '--og-density-footer-height' | '--og-scrollbar-size' | '--og-texture-bg' | '--og-texture-size' | '--og-texture-opacity' | '--og-focus-width' | '--og-focus-style' | '--og-focus-offset' | '--og-focus-radius' | '--og-icon-size' | '--og-icon-fill' | '--og-icon-stroke-width' | '--og-icon-corner' | '--og-transition-fast' | '--og-transition-base' | '--og-row-accent-width';
|
|
782
|
-
/**
|
|
3438
|
+
/**
|
|
3439
|
+
* 스킨 하나가 바꾸는 "형태 변수 → 값" 묶음입니다(바꾸고 싶은 것만 골라 담는 부분 지정). 형태 전용이라,
|
|
3440
|
+
* 값에 색(예: '#fff')을 넣으면 등록 시점에 거부됩니다 — 색은 테마 축의 몫이기 때문입니다.
|
|
3441
|
+
*
|
|
3442
|
+
* A skin's bundle of "form variable → value" overrides (partial — include only what you change).
|
|
3443
|
+
* It is form-only: putting a color literal (e.g. '#fff') in a value is rejected at registration,
|
|
3444
|
+
* because color belongs to the theme axis.
|
|
3445
|
+
*
|
|
3446
|
+
* スキン一つが変える「形の変数 → 値」の束です(変えたいものだけを選んで入れる部分指定)。形専用なので、
|
|
3447
|
+
* 値に色(例: '#fff')を入れると登録時点で拒否されます — 色はテーマ軸の担当だからです。
|
|
3448
|
+
*
|
|
3449
|
+
* 一个皮肤所改变的「形的变量 → 值」的集合(部分指定 — 只挑要改的放进去)。它只管形,所以在值里放颜色
|
|
3450
|
+
* (例: '#fff')会在注册时被拒绝 — 因为颜色归主题轴管。
|
|
3451
|
+
*/
|
|
783
3452
|
export type SkinTokenDelta = Partial<Record<SkinTokenName, string>>;
|
|
784
|
-
/**
|
|
3453
|
+
/**
|
|
3454
|
+
* 단일키 정렬 비교자. dir 부호는 호출자(DataLayer)가 적용 — 슬롯은 비교만 반환.
|
|
3455
|
+
*
|
|
3456
|
+
* Single-key sort comparator. The dir sign is applied by the caller (DataLayer) — the slot only compares.
|
|
3457
|
+
*
|
|
3458
|
+
* 単一キーの並べ替え比較子。dir の符号は呼び出し側(DataLayer)が適用 — スロットは比較のみを返す。
|
|
3459
|
+
*
|
|
3460
|
+
* 单键排序比较器。dir 的符号由调用方(DataLayer)应用 — 插槽只返回比较结果。
|
|
3461
|
+
*/
|
|
785
3462
|
export type SortComparatorFn = (a: any, b: any, field: string, dir: 'asc' | 'desc') => number;
|
|
786
|
-
/**
|
|
3463
|
+
/**
|
|
3464
|
+
* 필터 술어. true → 행 포함.
|
|
3465
|
+
*
|
|
3466
|
+
* Filter predicate. true includes the row.
|
|
3467
|
+
*
|
|
3468
|
+
* フィルター述語。true → 行を含める。
|
|
3469
|
+
*
|
|
3470
|
+
* 过滤谓词。true → 包含该行。
|
|
3471
|
+
*/
|
|
787
3472
|
export type FilterPredicateFn = (value: any, fi: FilterItem, field: string) => boolean;
|
|
788
|
-
/**
|
|
3473
|
+
/**
|
|
3474
|
+
* 표시값 포맷. getDisplayValue(인스턴스 안전) + 렌더러(formatNumber/formatDate) 공유.
|
|
3475
|
+
*
|
|
3476
|
+
* Display-value formatter. Shared by getDisplayValue (instance-safe) and renderers (formatNumber/formatDate).
|
|
3477
|
+
*
|
|
3478
|
+
* 表示値のフォーマット。getDisplayValue(インスタンス安全)+レンダラー(formatNumber/formatDate)で共有。
|
|
3479
|
+
*
|
|
3480
|
+
* 显示值的格式化。由 getDisplayValue(实例安全)与渲染器(formatNumber/formatDate)共用。
|
|
3481
|
+
*/
|
|
789
3482
|
export type DisplayFormatterFn = (value: any, field: string, row: any) => string;
|
|
790
|
-
/**
|
|
3483
|
+
/**
|
|
3484
|
+
* export 셀 직렬화.
|
|
3485
|
+
*
|
|
3486
|
+
* Export cell serializer.
|
|
3487
|
+
*
|
|
3488
|
+
* export セルのシリアライズ。
|
|
3489
|
+
*
|
|
3490
|
+
* export 单元格的序列化。
|
|
3491
|
+
*/
|
|
791
3492
|
export type CellSerializerFn = (value: any, col: any, row: any) => any;
|
|
792
|
-
/**
|
|
3493
|
+
/**
|
|
3494
|
+
* 그룹 키 산출. remainingFields = 현재 깊이부터의 잔여 필드.
|
|
3495
|
+
*
|
|
3496
|
+
* Group key producer. remainingFields = remaining fields from the current depth.
|
|
3497
|
+
*
|
|
3498
|
+
* グループキーの算出。remainingFields = 現在の深さからの残りフィールド。
|
|
3499
|
+
*
|
|
3500
|
+
* 分组键的计算。remainingFields = 从当前深度起剩余的字段。
|
|
3501
|
+
*/
|
|
793
3502
|
export type GroupKeyFn = (row: any, remainingFields: string[]) => any;
|
|
794
|
-
/**
|
|
3503
|
+
/**
|
|
3504
|
+
* 집계 연산. null 반환 시 기본 SUM/AVG/COUNT/MAX/MIN 분기로 폴백.
|
|
3505
|
+
*
|
|
3506
|
+
* Aggregate operator. Returning null falls back to the built-in SUM/AVG/COUNT/MAX/MIN branch.
|
|
3507
|
+
*
|
|
3508
|
+
* 集計演算。null を返すと既定の SUM/AVG/COUNT/MAX/MIN 分岐にフォールバック。
|
|
3509
|
+
*
|
|
3510
|
+
* 汇总运算。返回 null 则回退到内置的 SUM/AVG/COUNT/MAX/MIN 分支。
|
|
3511
|
+
*/
|
|
795
3512
|
export type SummaryOpFn = (op: string, nums: any[], field: string) => number | null;
|
|
796
|
-
/**
|
|
3513
|
+
/**
|
|
3514
|
+
* 셀마다 CSS 클래스 이름을 붙여 주는 함수 슬롯. 값·행에 따라 셀에 추가할 className 을 돌려줍니다(null 이면 아무 것도 안 붙임).
|
|
3515
|
+
*
|
|
3516
|
+
* A slot that assigns a CSS class per cell — return the className to add based on value/row (null adds nothing).
|
|
3517
|
+
*
|
|
3518
|
+
* セルごとに CSS クラス名を付けてくれる関数スロット。値・行に応じてセルに追加する className を
|
|
3519
|
+
* 返します(null なら何も付けません)。
|
|
3520
|
+
*
|
|
3521
|
+
* 为每个单元格加上 CSS 类名的函数插槽。根据值、行返回要给单元格追加的 className(null 则什么都不加)。
|
|
3522
|
+
*/
|
|
797
3523
|
export type CellClassResolverFn = (value: any, field: string, row: any) => string | null;
|
|
798
|
-
/**
|
|
3524
|
+
/**
|
|
3525
|
+
* 셀의 스크린리더용 라벨(aria-label)을 바꿔 주는 함수 슬롯. 대체 라벨을 돌려줍니다(null 이면 기본값 유지).
|
|
3526
|
+
*
|
|
3527
|
+
* A slot that overrides a cell's screen-reader label (aria-label) — return a replacement (null keeps the default).
|
|
3528
|
+
*
|
|
3529
|
+
* セルのスクリーンリーダー用ラベル(aria-label)を変えてくれる関数スロット。代替ラベルを返します
|
|
3530
|
+
* (null なら既定値を維持)。
|
|
3531
|
+
*
|
|
3532
|
+
* 替换单元格屏幕阅读器标签(aria-label)的函数插槽。返回替代标签(null 则保持默认值)。
|
|
3533
|
+
*/
|
|
799
3534
|
export type AriaLabelResolverFn = (value: any, field: string, row: any) => string | null;
|
|
800
3535
|
/**
|
|
801
|
-
*
|
|
802
|
-
* ⚠️
|
|
803
|
-
*
|
|
804
|
-
*
|
|
3536
|
+
* 채우기 핸들의 "이어 채우기" 규칙을 직접 정의하는 함수 슬롯입니다(예: 날짜·요일·사용자 정의 수열).
|
|
3537
|
+
* ⚠️ 지금은 등록 통로만 열려 있고 실제 채우기에 연결되는 배선은 향후 버전에서 제공됩니다.
|
|
3538
|
+
*
|
|
3539
|
+
* A slot to define your own fill-series rule for the fill handle (dates, weekdays, custom sequences).
|
|
3540
|
+
* ⚠️ Only the registration path exists today; the wiring that actually consumes it ships in a later version.
|
|
3541
|
+
*
|
|
3542
|
+
* フィルハンドルの「連続入力」ルールを自分で定義する関数スロットです(例: 日付・曜日・ユーザー定義の数列)。
|
|
3543
|
+
* ⚠️ 今は登録の通路だけが開いており、実際の入力につながる配線は今後のバージョンで提供されます。
|
|
3544
|
+
*
|
|
3545
|
+
* 自行定义填充柄「序列填充」规则的函数插槽(例: 日期、星期、自定义数列)。
|
|
3546
|
+
* ⚠️ 目前只开放了注册通道,真正接入填充的连线将在后续版本提供。
|
|
805
3547
|
*/
|
|
806
3548
|
export type FillSeriesResolverFn = (sourceLine: any[], k: number, axisSign: 1 | -1) => any;
|
|
807
|
-
/**
|
|
3549
|
+
/**
|
|
3550
|
+
* 슬롯명 → 시그니처 매핑.
|
|
3551
|
+
*
|
|
3552
|
+
* Slot name → signature map.
|
|
3553
|
+
*
|
|
3554
|
+
* スロット名 → シグネチャのマッピング。
|
|
3555
|
+
*
|
|
3556
|
+
* 插槽名 → 签名的映射。
|
|
3557
|
+
*/
|
|
808
3558
|
export interface StrategyMap {
|
|
809
3559
|
sortComparator: SortComparatorFn;
|
|
810
3560
|
filterPredicate: FilterPredicateFn;
|
|
@@ -818,57 +3568,193 @@ export interface StrategyMap {
|
|
|
818
3568
|
skinResolver: SkinResolverFn;
|
|
819
3569
|
}
|
|
820
3570
|
/**
|
|
821
|
-
*
|
|
822
|
-
*
|
|
823
|
-
*
|
|
824
|
-
*
|
|
825
|
-
*
|
|
3571
|
+
* 스킨 이름을 받아 그 스킨의 형태 변수 묶음을 직접 만들어 돌려주는 함수 슬롯입니다. 내장 스킨 대신 나만의
|
|
3572
|
+
* 스킨 해석 규칙을 통째로 끼워 넣을 때 씁니다(null 을 돌려주면 내장 스킨 카탈로그를 그대로 사용).
|
|
3573
|
+
*
|
|
3574
|
+
* A slot that takes a skin name and returns that skin's form-variable bundle — plug in your own
|
|
3575
|
+
* skin-resolution rule in place of the built-ins (return null to fall back to the built-in catalog).
|
|
3576
|
+
*
|
|
3577
|
+
* スキン名を受け取って、そのスキンの形の変数の束を自分で作って返す関数スロットです。組み込みスキンの
|
|
3578
|
+
* 代わりに自分だけのスキン解釈ルールをまるごと差し込むときに使います(null を返すと組み込みスキンの
|
|
3579
|
+
* カタログをそのまま使用)。
|
|
3580
|
+
*
|
|
3581
|
+
* 接收皮肤名、自行生成并返回该皮肤的形变量集合的函数插槽。用于整体替换内置皮肤、插入自己的皮肤解析
|
|
3582
|
+
* 规则(返回 null 则照常使用内置皮肤目录)。
|
|
826
3583
|
*/
|
|
827
3584
|
export type SkinResolverFn = (skinId: string) => SkinTokenDelta | null;
|
|
828
3585
|
/**
|
|
829
|
-
*
|
|
830
|
-
*
|
|
831
|
-
*
|
|
832
|
-
*
|
|
833
|
-
*
|
|
834
|
-
*
|
|
835
|
-
*
|
|
3586
|
+
* override 로 감싸는 것이 **공식적으로 보장되는** 확장점 이름들의 목록입니다. 이 이름들은 버전이 올라가도
|
|
3587
|
+
* 유지되며 IDE 자동완성에 뜹니다. 목록에 없는 임의 메서드 이름도 override("이름", fn) 문자열 방식으로 감쌀 수
|
|
3588
|
+
* 있지만(최선 노력), 그건 보장 밖입니다.
|
|
3589
|
+
*
|
|
3590
|
+
* The list of extension points whose override is **officially guaranteed** — these names survive
|
|
3591
|
+
* version bumps and show up in IDE autocomplete. Any other method name can still be wrapped via the
|
|
3592
|
+
* string form override("name", fn) on a best-effort basis, but without that guarantee.
|
|
3593
|
+
*
|
|
3594
|
+
* override で包むことが**公式に保証される**拡張点の名前の一覧です。これらの名前はバージョンが上がっても
|
|
3595
|
+
* 維持され、IDE の自動補完に出ます。一覧にない任意のメソッド名も override("名前", fn) の文字列方式で
|
|
3596
|
+
* 包めますが(ベストエフォート)、それは保証の外です。
|
|
3597
|
+
*
|
|
3598
|
+
* 用 override 包裹**受官方保证**的扩展点名称清单。这些名称在版本升级后依然保留,并出现在 IDE 自动补全中。
|
|
3599
|
+
* 不在清单里的任意方法名也能用 override("名称", fn) 的字符串方式包裹(尽力而为),但不在保证范围内。
|
|
836
3600
|
*/
|
|
837
3601
|
export interface OverridePoints<T = any> {
|
|
838
|
-
/**
|
|
3602
|
+
/**
|
|
3603
|
+
* 셀에 실제로 보이는 텍스트를 계산하는 지점.
|
|
3604
|
+
*
|
|
3605
|
+
* Where a cell's visible display text is computed.
|
|
3606
|
+
*
|
|
3607
|
+
* セルに実際に見えるテキストを計算する地点。
|
|
3608
|
+
*
|
|
3609
|
+
* 计算单元格实际可见文本的位置。
|
|
3610
|
+
*/
|
|
839
3611
|
getDisplayValue(rowIndex: number, field: string): string;
|
|
840
|
-
/**
|
|
3612
|
+
/**
|
|
3613
|
+
* 셀의 원시 값을 읽는 지점.
|
|
3614
|
+
*
|
|
3615
|
+
* Where a cell's raw value is read.
|
|
3616
|
+
*
|
|
3617
|
+
* セルの生の値を読む地点。
|
|
3618
|
+
*
|
|
3619
|
+
* 读取单元格原始值的位置。
|
|
3620
|
+
*/
|
|
841
3621
|
readCell(rowIndex: number, field: string): any;
|
|
842
3622
|
}
|
|
843
|
-
/**
|
|
3623
|
+
/**
|
|
3624
|
+
* grid.override 의 두 얼굴입니다 — 그 자체를 함수처럼 불러 메서드를 감쌀 수도 있고(override(...)),
|
|
3625
|
+
* .strategy(...) 로 정렬·포맷 같은 알고리즘 슬롯을 갈아 끼울 수도 있습니다. 모든 호출은 체이닝을 위해
|
|
3626
|
+
* 그리드 인스턴스를 다시 돌려줍니다.
|
|
3627
|
+
*
|
|
3628
|
+
* The two faces of grid.override — call it like a function to wrap a method (override(...)), or use
|
|
3629
|
+
* .strategy(...) to swap an algorithm slot like sorting/formatting. Every call returns the grid
|
|
3630
|
+
* instance for chaining.
|
|
3631
|
+
*
|
|
3632
|
+
* grid.override の二つの顔です — それ自体を関数のように呼んでメソッドを包むこともでき(override(...))、
|
|
3633
|
+
* .strategy(...) で並べ替え・フォーマットのようなアルゴリズムスロットを差し替えることもできます。
|
|
3634
|
+
* すべての呼び出しはチェーンのためにグリッドインスタンスを返します。
|
|
3635
|
+
*
|
|
3636
|
+
* grid.override 的两副面孔 — 既可以把它当函数调用来包裹方法(override(...)),也可以用 .strategy(...)
|
|
3637
|
+
* 替换排序、格式化这类算法插槽。所有调用都返回表格实例以便链式调用。
|
|
3638
|
+
*/
|
|
844
3639
|
export interface OverrideApi<T = any> {
|
|
845
|
-
/**
|
|
3640
|
+
/**
|
|
3641
|
+
* 보장된 확장점 이름을 감싸는 타입드 오버로드(IDE 자동완성).
|
|
3642
|
+
*
|
|
3643
|
+
* Typed overload for the guaranteed extension-point names (IDE autocomplete).
|
|
3644
|
+
*
|
|
3645
|
+
* 保証された拡張点の名前を包む型付きオーバーロード(IDE 自動補完)。
|
|
3646
|
+
*
|
|
3647
|
+
* 包裹受保证的扩展点名称的类型化重载(IDE 自动补全)。
|
|
3648
|
+
*/
|
|
846
3649
|
<K extends keyof OverridePoints<T>>(name: K, fn: OverrideLayerFn, opts?: OverrideCallOptions): OpenGridInstance<T>;
|
|
847
|
-
/**
|
|
3650
|
+
/**
|
|
3651
|
+
* 임의 메서드를 본문 수정 없이 런타임에 감쌉니다(문자열 이름 방식). 체이닝을 위해 그리드를 반환.
|
|
3652
|
+
*
|
|
3653
|
+
* Wrap any method at runtime without touching its body (string-name form). Returns the grid for chaining.
|
|
3654
|
+
*
|
|
3655
|
+
* 任意のメソッドを本体の修正なしにランタイムで包みます(文字列名方式)。チェーンのためにグリッドを返す。
|
|
3656
|
+
*
|
|
3657
|
+
* 在运行时包裹任意方法,不改动其本体(字符串名方式)。返回表格以便链式调用。
|
|
3658
|
+
*/
|
|
848
3659
|
(name: string, fn: OverrideLayerFn, opts?: OverrideCallOptions): OpenGridInstance<T>;
|
|
849
|
-
/**
|
|
3660
|
+
/**
|
|
3661
|
+
* 알고리즘 슬롯 하나를 내 함수로 등록합니다. 체이닝을 위해 그리드를 반환.
|
|
3662
|
+
*
|
|
3663
|
+
* Register one algorithm slot with your function. Returns the grid for chaining.
|
|
3664
|
+
*
|
|
3665
|
+
* アルゴリズムスロット一つを自分の関数で登録します。チェーンのためにグリッドを返す。
|
|
3666
|
+
*
|
|
3667
|
+
* 用自己的函数注册一个算法插槽。返回表格以便链式调用。
|
|
3668
|
+
*/
|
|
850
3669
|
strategy<K extends StrategySlot>(slot: K, fn: StrategyMap[K]): OpenGridInstance<T>;
|
|
851
3670
|
strategy(slot: string, fn: Function): OpenGridInstance<T>;
|
|
852
3671
|
}
|
|
853
3672
|
/**
|
|
854
|
-
*
|
|
855
|
-
*
|
|
856
|
-
*
|
|
3673
|
+
* `new OpenGrid(...)` 로 만든 그리드가 밖에 내어 주는 조작 창구(메서드 모음)입니다. 데이터 넣기·읽기,
|
|
3674
|
+
* 행·컬럼 편집, 정렬·필터, 선택, 내보내기, 테마 전환 등 그리드에게 시킬 수 있는 모든 일이 여기 모여 있습니다.
|
|
3675
|
+
* 각 메서드의 자세한 설명은 이 계약을 구현하는 OpenGrid 클래스 쪽에 있습니다.
|
|
3676
|
+
*
|
|
3677
|
+
* The set of methods a grid built with `new OpenGrid(...)` exposes — everything you can ask the
|
|
3678
|
+
* grid to do: load/read data, edit rows & columns, sort/filter, select, export, switch themes, and
|
|
3679
|
+
* more. Per-method detail lives on the OpenGrid class that implements this contract.
|
|
3680
|
+
*
|
|
3681
|
+
* `new OpenGrid(...)` で作ったグリッドが外に差し出す操作の窓口(メソッド群)です。データの投入・読み取り、
|
|
3682
|
+
* 行・列の編集、並べ替え・フィルター、選択、エクスポート、テーマ切り替えなど、グリッドに頼めるすべてのことが
|
|
3683
|
+
* ここに集まっています。各メソッドの詳しい説明は、この契約を実装する OpenGrid クラス側にあります。
|
|
3684
|
+
*
|
|
3685
|
+
* 用 `new OpenGrid(...)` 创建的表格对外提供的操作窗口(方法集合)。载入/读取数据、编辑行与列、
|
|
3686
|
+
* 排序/过滤、选择、导出、切换主题等一切能让表格做的事都汇集在这里。各方法的详细说明在实现本契约的
|
|
3687
|
+
* OpenGrid 类那一侧。
|
|
3688
|
+
*
|
|
3689
|
+
* @typeParam T - 행 데이터 타입
|
|
3690
|
+
*
|
|
3691
|
+
* Row data type
|
|
3692
|
+
*
|
|
3693
|
+
* 行データの型
|
|
857
3694
|
*
|
|
858
|
-
*
|
|
3695
|
+
* 行数据类型
|
|
859
3696
|
*/
|
|
860
3697
|
export interface OpenGridInstance<T = any> {
|
|
861
|
-
/**
|
|
3698
|
+
/**
|
|
3699
|
+
* 공개 메서드를 런타임에 감싸 동작을 바꾸거나(.override), 정렬·포맷 같은 알고리즘 슬롯을 갈아 끼웁니다(.strategy).
|
|
3700
|
+
*
|
|
3701
|
+
* Wrap a public method at runtime to change its behavior (.override), or swap an algorithm slot like sorting/formatting (.strategy).
|
|
3702
|
+
*
|
|
3703
|
+
* 公開メソッドをランタイムで包んで動作を変えたり(.override)、並べ替え・フォーマットのような
|
|
3704
|
+
* アルゴリズムスロットを差し替えたりします(.strategy)。
|
|
3705
|
+
*
|
|
3706
|
+
* 在运行时包裹公开方法以改变其行为(.override),或替换排序、格式化这类算法插槽(.strategy)。
|
|
3707
|
+
*/
|
|
862
3708
|
override: OverrideApi<T>;
|
|
863
|
-
/**
|
|
3709
|
+
/**
|
|
3710
|
+
* 이름을 지정한 메서드 하나를 원래 동작으로 되돌립니다.
|
|
3711
|
+
*
|
|
3712
|
+
* Restore one named method to its original behavior.
|
|
3713
|
+
*
|
|
3714
|
+
* 名前を指定したメソッド一つを元の動作に戻します。
|
|
3715
|
+
*
|
|
3716
|
+
* 把指定名称的一个方法恢复为原本的行为。
|
|
3717
|
+
*/
|
|
864
3718
|
restore(name: string): OpenGridInstance<T>;
|
|
865
|
-
/**
|
|
3719
|
+
/**
|
|
3720
|
+
* 걸어 둔 모든 override 와 strategy 를 한 번에 되돌립니다(그리드 파기 시 자동 호출).
|
|
3721
|
+
*
|
|
3722
|
+
* Undo all overrides and strategies at once (called automatically on destroy).
|
|
3723
|
+
*
|
|
3724
|
+
* 掛けておいたすべての override と strategy を一度に戻します(グリッド破棄時に自動で呼び出し)。
|
|
3725
|
+
*
|
|
3726
|
+
* 一次性还原所有已挂上的 override 与 strategy(表格销毁时自动调用)。
|
|
3727
|
+
*/
|
|
866
3728
|
restoreAll(): OpenGridInstance<T>;
|
|
867
|
-
/**
|
|
3729
|
+
/**
|
|
3730
|
+
* 그 메서드가 지금 override 로 감싸져 있는지 확인합니다.
|
|
3731
|
+
*
|
|
3732
|
+
* Check whether that method is currently overridden.
|
|
3733
|
+
*
|
|
3734
|
+
* そのメソッドが今 override で包まれているかを確認します。
|
|
3735
|
+
*
|
|
3736
|
+
* 确认该方法当前是否被 override 包裹。
|
|
3737
|
+
*/
|
|
868
3738
|
hasOverride(name: string): boolean;
|
|
869
|
-
/**
|
|
3739
|
+
/**
|
|
3740
|
+
* override 로 감싼 메서드 이름들의 목록을 돌려줍니다.
|
|
3741
|
+
*
|
|
3742
|
+
* Return the list of overridden method names.
|
|
3743
|
+
*
|
|
3744
|
+
* override で包んだメソッド名の一覧を返します。
|
|
3745
|
+
*
|
|
3746
|
+
* 返回被 override 包裹的方法名列表。
|
|
3747
|
+
*/
|
|
870
3748
|
getOverrideNames(): string[];
|
|
871
|
-
/**
|
|
3749
|
+
/**
|
|
3750
|
+
* 등록된 알고리즘 슬롯 함수를 가져옵니다(없으면 넘긴 fallback 을 그대로 반환).
|
|
3751
|
+
*
|
|
3752
|
+
* Fetch a registered algorithm-slot function (returns the given fallback if none).
|
|
3753
|
+
*
|
|
3754
|
+
* 登録されたアルゴリズムスロット関数を取得します(なければ渡した fallback をそのまま返します)。
|
|
3755
|
+
*
|
|
3756
|
+
* 取得已注册的算法插槽函数(没有则原样返回传入的 fallback)。
|
|
3757
|
+
*/
|
|
872
3758
|
getStrategy<F extends Function>(slot: string, fallback: F): F;
|
|
873
3759
|
setData(data: T[]): void;
|
|
874
3760
|
getData(): T[];
|
|
@@ -877,10 +3763,19 @@ export interface OpenGridInstance<T = any> {
|
|
|
877
3763
|
prefixData(data: T[]): void;
|
|
878
3764
|
clearData(): void;
|
|
879
3765
|
/**
|
|
880
|
-
*
|
|
881
|
-
* 규칙이 걸린
|
|
882
|
-
*
|
|
883
|
-
*
|
|
3766
|
+
* 조건부 서식 규칙을 지정합니다 — 값에 따라 셀에 데이터바·색조(히트맵)·아이콘셋을 입혀 강조합니다.
|
|
3767
|
+
* 규칙이 걸린 컬럼의 통계(최소·최대 등)를 미리 계산해 두고 다시 그립니다. 빈 배열을 주면 조건부 서식을 모두 해제합니다.
|
|
3768
|
+
*
|
|
3769
|
+
* Set conditional-format rules — highlight cells by value with data-bars, color scales (heatmaps),
|
|
3770
|
+
* or icon sets. It precomputes the rule-bearing columns' stats (min/max …) and re-renders. Pass an
|
|
3771
|
+
* empty array to clear all conditional formatting.
|
|
3772
|
+
*
|
|
3773
|
+
* 条件付き書式のルールを指定します — 値に応じてセルにデータバー・カラースケール(ヒートマップ)・
|
|
3774
|
+
* アイコンセットを付けて強調します。ルールが掛かった列の統計(最小・最大など)をあらかじめ計算しておき、
|
|
3775
|
+
* 再描画します。空の配列を渡すと条件付き書式をすべて解除します。
|
|
3776
|
+
*
|
|
3777
|
+
* 指定条件格式规则 — 按值给单元格加上数据条、色阶(热力图)或图标集以示强调。它会预先算好带规则的列的
|
|
3778
|
+
* 统计(最小、最大等)并重新渲染。传入空数组即清除全部条件格式。
|
|
884
3779
|
*/
|
|
885
3780
|
setConditionalFormat(rules: import('./cf/CFRule.js').CFRule[]): Promise<void>;
|
|
886
3781
|
insertRow(item: Partial<T>, position?: Position): void;
|
|
@@ -893,15 +3788,50 @@ export interface OpenGridInstance<T = any> {
|
|
|
893
3788
|
getDisplayValue(rowIndex: number, field: string): string;
|
|
894
3789
|
writeCell(rowIndex: number, field: string, value: any): void;
|
|
895
3790
|
getRowAt(rowIndex: number): T;
|
|
896
|
-
/**
|
|
3791
|
+
/**
|
|
3792
|
+
* 화면에 보이는 행 순서와 실제 데이터를 이어 주는 내부 모델을 돌려줍니다(고급 배선용).
|
|
3793
|
+
*
|
|
3794
|
+
* Return the internal model mapping on-screen row order to actual data (for advanced wiring).
|
|
3795
|
+
*
|
|
3796
|
+
* 画面に見える行の順序と実際のデータをつないでくれる内部モデルを返します(高度な配線用)。
|
|
3797
|
+
*
|
|
3798
|
+
* 返回把屏幕上可见的行顺序与实际数据连接起来的内部模型(供高级接线使用)。
|
|
3799
|
+
*/
|
|
897
3800
|
getFlatRowModel(): import('./FlatRowModel.js').FlatRowModel;
|
|
898
|
-
/**
|
|
3801
|
+
/**
|
|
3802
|
+
* 여러 셀을 한꺼번에 쓸 때, 이 호출 이후의 writeCell 들이 즉시 다시 그리지 않도록 렌더를 잠시 미룹니다.
|
|
3803
|
+
*
|
|
3804
|
+
* Start a batch — subsequent writeCell calls defer their render/change events instead of firing each time.
|
|
3805
|
+
*
|
|
3806
|
+
* 複数のセルをまとめて書くとき、この呼び出し以降の writeCell が即座に再描画しないようにレンダリングを
|
|
3807
|
+
* しばらく先送りします。
|
|
3808
|
+
*
|
|
3809
|
+
* 批量写入多个单元格时,让此调用之后的各次 writeCell 不立即重绘,而是暂缓渲染。
|
|
3810
|
+
*/
|
|
899
3811
|
beginBatch(): void;
|
|
900
|
-
/**
|
|
3812
|
+
/**
|
|
3813
|
+
* 배치를 끝내고, 그 사이 변경이 있었으면 단 한 번만 다시 그리고 변경 이벤트도 한 번만 냅니다.
|
|
3814
|
+
*
|
|
3815
|
+
* End the batch — if anything changed, render once and emit one coalesced change event.
|
|
3816
|
+
*
|
|
3817
|
+
* バッチを終えて、その間に変更があれば一度だけ再描画し、変更イベントも一度だけ出します。
|
|
3818
|
+
*
|
|
3819
|
+
* 结束批处理;期间若有变更,只重绘一次,变更事件也只发出一次。
|
|
3820
|
+
*/
|
|
901
3821
|
endBatch(): void;
|
|
902
3822
|
/**
|
|
903
|
-
* beginBatch
|
|
904
|
-
*
|
|
3823
|
+
* 여러 셀 쓰기를 한 번에 처리하는 간편 래퍼(beginBatch → 반복 쓰기 → endBatch). rowIndex 는 화면
|
|
3824
|
+
* 표시 순서이며, 그룹·트리·상세 같은 실제 데이터가 아닌 가상 행은 안전하게 건너뜁니다. 반환값은 건너뛴 셀 수입니다.
|
|
3825
|
+
*
|
|
3826
|
+
* A convenience wrapper that writes many cells at once (beginBatch → loop → endBatch). rowIndex is
|
|
3827
|
+
* screen-order; non-data pseudo-rows (group/tree/detail) are safely skipped. Returns how many were skipped.
|
|
3828
|
+
*
|
|
3829
|
+
* 複数のセル書き込みを一度に処理する簡便ラッパー(beginBatch → 繰り返し書き込み → endBatch)。
|
|
3830
|
+
* rowIndex は画面の表示順であり、グループ・ツリー・詳細のような実データではない仮想行は安全に
|
|
3831
|
+
* スキップします。戻り値はスキップしたセル数です。
|
|
3832
|
+
*
|
|
3833
|
+
* 一次处理多个单元格写入的简便包装(beginBatch → 循环写入 → endBatch)。rowIndex 为屏幕显示顺序,
|
|
3834
|
+
* 分组、树、详情这类并非实际数据的虚拟行会被安全跳过。返回值是被跳过的单元格数。
|
|
905
3835
|
*/
|
|
906
3836
|
writeCells(patches: Array<{
|
|
907
3837
|
rowIndex: number;
|
|
@@ -949,63 +3879,295 @@ export interface OpenGridInstance<T = any> {
|
|
|
949
3879
|
getActiveRow(): number;
|
|
950
3880
|
activate(index: number): void;
|
|
951
3881
|
deselect(): void;
|
|
952
|
-
/**
|
|
3882
|
+
/**
|
|
3883
|
+
* 현재 선택된 셀 범위들(없으면 빈 배열). 지금은 한 번에 하나까지 담깁니다.
|
|
3884
|
+
*
|
|
3885
|
+
* Currently selected cell ranges (empty if none). At most one for now.
|
|
3886
|
+
*
|
|
3887
|
+
* 現在選択されているセル範囲(なければ空の配列)。今は一度に一つまで入ります。
|
|
3888
|
+
*
|
|
3889
|
+
* 当前选中的单元格区域(没有则为空数组)。目前一次最多容纳一个。
|
|
3890
|
+
*/
|
|
953
3891
|
getRangeSelection(): CellRange[];
|
|
954
|
-
/**
|
|
3892
|
+
/**
|
|
3893
|
+
* 지금 활성인 범위 하나(없으면 null). 차트가 이 값을 읽어 씁니다.
|
|
3894
|
+
*
|
|
3895
|
+
* The single active range (null if none). The chart reads this.
|
|
3896
|
+
*
|
|
3897
|
+
* 今アクティブな範囲一つ(なければ null)。チャートがこの値を読んで使います。
|
|
3898
|
+
*
|
|
3899
|
+
* 当前活动的那一个区域(没有则为 null)。图表会读取此值使用。
|
|
3900
|
+
*/
|
|
955
3901
|
getActiveRange(): CellRange | null;
|
|
3902
|
+
/**
|
|
3903
|
+
* 셀 범위를 프로그램에서 직접 선택합니다.
|
|
3904
|
+
*
|
|
3905
|
+
* Select a cell range programmatically.
|
|
3906
|
+
*
|
|
3907
|
+
* セル範囲をプログラムから直接選択します。
|
|
3908
|
+
*
|
|
3909
|
+
* 由程序直接选择单元格区域。
|
|
3910
|
+
*/
|
|
956
3911
|
setRangeSelection(range: CellRange | CellRange[]): void;
|
|
3912
|
+
/**
|
|
3913
|
+
* 현재 범위 선택을 모두 해제합니다.
|
|
3914
|
+
*
|
|
3915
|
+
* Clear the current range selection.
|
|
3916
|
+
*
|
|
3917
|
+
* 現在の範囲選択をすべて解除します。
|
|
3918
|
+
*
|
|
3919
|
+
* 清除当前全部区域选择。
|
|
3920
|
+
*/
|
|
957
3921
|
clearRangeSelection(): void;
|
|
958
|
-
/**
|
|
3922
|
+
/**
|
|
3923
|
+
* 현재 활성 범위 안 셀 값들을 행×열 2차원 배열로 돌려줍니다(차트가 소비).
|
|
3924
|
+
*
|
|
3925
|
+
* Return the active range's cell values as a 2-D (rows×cols) array (consumed by the chart).
|
|
3926
|
+
*
|
|
3927
|
+
* 現在アクティブな範囲内のセルの値を行×列の 2 次元配列で返します(チャートが消費)。
|
|
3928
|
+
*
|
|
3929
|
+
* 把当前活动区域内的单元格值以行×列的二维数组返回(供图表消费)。
|
|
3930
|
+
*/
|
|
959
3931
|
getRangeValues(): any[][];
|
|
960
|
-
/**
|
|
3932
|
+
/**
|
|
3933
|
+
* 현재 활성 범위의 숫자 셀 통계(합·평균·최소·최대 등, 고정밀 계산). 숫자가 없으면 null.
|
|
3934
|
+
*
|
|
3935
|
+
* High-precision stats (sum/avg/min/max …) over the active range's numeric cells; null if none.
|
|
3936
|
+
*
|
|
3937
|
+
* 現在アクティブな範囲の数値セルの統計(合計・平均・最小・最大など、高精度計算)。数値がなければ null。
|
|
3938
|
+
*
|
|
3939
|
+
* 当前活动区域内数值单元格的统计(合计、平均、最小、最大等,高精度计算)。没有数值则为 null。
|
|
3940
|
+
*/
|
|
961
3941
|
getRangeStats(): _RangeStats | null;
|
|
962
|
-
/**
|
|
3942
|
+
/**
|
|
3943
|
+
* 원본 범위의 값을 대상 범위로 채웁니다. 'copy'=그대로 복사, 'series'=규칙 감지해 이어 채우기.
|
|
3944
|
+
*
|
|
3945
|
+
* Fill the target range from the source — 'copy' duplicates, 'series' detects a pattern and extends.
|
|
3946
|
+
*
|
|
3947
|
+
* 元の範囲の値を対象の範囲に入力します。'copy'=そのままコピー、'series'=規則を検知して連続入力。
|
|
3948
|
+
*
|
|
3949
|
+
* 把源区域的值填入目标区域。'copy'=原样复制,'series'=识别规律后序列填充。
|
|
3950
|
+
*/
|
|
963
3951
|
fillRange(source: CellRange, target: CellRange, mode?: 'copy' | 'series'): void;
|
|
3952
|
+
/**
|
|
3953
|
+
* 그리드 데이터로 차트를 만들어 인스턴스를 돌려줍니다.
|
|
3954
|
+
*
|
|
3955
|
+
* Create a chart from grid data and return its instance.
|
|
3956
|
+
*
|
|
3957
|
+
* グリッドのデータでチャートを作ってインスタンスを返します。
|
|
3958
|
+
*
|
|
3959
|
+
* 用表格数据创建图表并返回其实例。
|
|
3960
|
+
*/
|
|
964
3961
|
createChart(config: import('./chart/types.js').ChartConfig): import('./chart/types.js').ChartInstance;
|
|
3962
|
+
/**
|
|
3963
|
+
* 이 그리드에 붙어 있는 차트 인스턴스들.
|
|
3964
|
+
*
|
|
3965
|
+
* The chart instances attached to this grid.
|
|
3966
|
+
*
|
|
3967
|
+
* このグリッドに付いているチャートインスタンス。
|
|
3968
|
+
*
|
|
3969
|
+
* 附着在此表格上的图表实例。
|
|
3970
|
+
*/
|
|
965
3971
|
getCharts(): import('./chart/types.js').ChartInstance[];
|
|
3972
|
+
/**
|
|
3973
|
+
* 이 그리드의 차트를 모두 정리(해제)합니다.
|
|
3974
|
+
*
|
|
3975
|
+
* Dispose all charts on this grid.
|
|
3976
|
+
*
|
|
3977
|
+
* このグリッドのチャートをすべて片付け(解放)します。
|
|
3978
|
+
*
|
|
3979
|
+
* 清理(释放)此表格的所有图表。
|
|
3980
|
+
*/
|
|
966
3981
|
destroyCharts(): void;
|
|
967
|
-
/**
|
|
3982
|
+
/**
|
|
3983
|
+
* 셀에 수식을 넣습니다(예: "=A1+B2"). rowIndex 는 화면 순서로 주면 내부에서 안정적 참조로 바꿉니다.
|
|
3984
|
+
*
|
|
3985
|
+
* Set a cell's formula (e.g. "=A1+B2"). Pass rowIndex in screen order; it's normalized to a stable ref inside.
|
|
3986
|
+
*
|
|
3987
|
+
* セルに数式を入れます(例: "=A1+B2")。rowIndex は画面の順序で渡せば内部で安定した参照に変えます。
|
|
3988
|
+
*
|
|
3989
|
+
* 给单元格设置公式(例: "=A1+B2")。rowIndex 按屏幕顺序传入即可,内部会转换为稳定引用。
|
|
3990
|
+
*/
|
|
968
3991
|
setCellFormula(rowIndex: number, field: string, formula: string): void;
|
|
3992
|
+
/**
|
|
3993
|
+
* 그 셀의 수식 원문(없으면 null).
|
|
3994
|
+
*
|
|
3995
|
+
* The cell's formula text (null if none).
|
|
3996
|
+
*
|
|
3997
|
+
* そのセルの数式の原文(なければ null)。
|
|
3998
|
+
*
|
|
3999
|
+
* 该单元格的公式原文(没有则为 null)。
|
|
4000
|
+
*/
|
|
969
4001
|
getCellFormula(rowIndex: number, field: string): string | null;
|
|
4002
|
+
/**
|
|
4003
|
+
* 그 셀에 수식이 들어 있는지.
|
|
4004
|
+
*
|
|
4005
|
+
* Whether that cell holds a formula.
|
|
4006
|
+
*
|
|
4007
|
+
* そのセルに数式が入っているか。
|
|
4008
|
+
*
|
|
4009
|
+
* 该单元格中是否含有公式。
|
|
4010
|
+
*/
|
|
970
4011
|
hasCellFormula(rowIndex: number, field: string): boolean;
|
|
971
|
-
/**
|
|
4012
|
+
/**
|
|
4013
|
+
* 셀의 수식만 지웁니다(마지막 계산 값은 남습니다).
|
|
4014
|
+
*
|
|
4015
|
+
* Remove the cell's formula (keeps the last computed value).
|
|
4016
|
+
*
|
|
4017
|
+
* セルの数式だけを消します(最後に計算した値は残ります)。
|
|
4018
|
+
*
|
|
4019
|
+
* 只清除单元格的公式(最后一次计算的值保留)。
|
|
4020
|
+
*/
|
|
972
4021
|
clearCellFormula(rowIndex: number, field: string): void;
|
|
4022
|
+
/**
|
|
4023
|
+
* 그 셀의 수식 오류 코드(오류가 없으면 null).
|
|
4024
|
+
*
|
|
4025
|
+
* The cell's formula error code (null if none).
|
|
4026
|
+
*
|
|
4027
|
+
* そのセルの数式エラーコード(エラーがなければ null)。
|
|
4028
|
+
*
|
|
4029
|
+
* 该单元格的公式错误码(没有错误时为 null)。
|
|
4030
|
+
*/
|
|
973
4031
|
getCellError(rowIndex: number, field: string): FormulaErrorCode | null;
|
|
974
|
-
/**
|
|
4032
|
+
/**
|
|
4033
|
+
* 디버깅용 — 이 셀을 참조하는(이 셀이 바뀌면 다시 계산되는) 셀들.
|
|
4034
|
+
*
|
|
4035
|
+
* Debug — cells that reference this one (recomputed when it changes).
|
|
4036
|
+
*
|
|
4037
|
+
* デバッグ用 — このセルを参照する(このセルが変わると再計算される)セル。
|
|
4038
|
+
*
|
|
4039
|
+
* 调试用 — 引用该单元格的(该单元格变化时会重算的)单元格。
|
|
4040
|
+
*/
|
|
975
4041
|
getDependents(rowIndex: number, field: string): Array<{
|
|
976
4042
|
rowIndex: number;
|
|
977
4043
|
field: string;
|
|
978
4044
|
}>;
|
|
979
|
-
/**
|
|
4045
|
+
/**
|
|
4046
|
+
* 디버깅용 — 이 셀의 수식이 참조하는(이 셀보다 먼저 계산돼야 하는) 셀들.
|
|
4047
|
+
*
|
|
4048
|
+
* Debug — cells this one's formula references (computed before it).
|
|
4049
|
+
*
|
|
4050
|
+
* デバッグ用 — このセルの数式が参照する(このセルより先に計算されなければならない)セル。
|
|
4051
|
+
*
|
|
4052
|
+
* 调试用 — 该单元格的公式所引用的(必须先于该单元格计算的)单元格。
|
|
4053
|
+
*/
|
|
980
4054
|
getPrecedents(rowIndex: number, field: string): Array<{
|
|
981
4055
|
rowIndex: number;
|
|
982
4056
|
field: string;
|
|
983
4057
|
}>;
|
|
984
|
-
/**
|
|
4058
|
+
/**
|
|
4059
|
+
* 모든 수식을 처음부터 다시 계산합니다(데이터 교체·컬럼 변경 후 등).
|
|
4060
|
+
*
|
|
4061
|
+
* Recompute every formula from scratch (after replacing data, changing columns, …).
|
|
4062
|
+
*
|
|
4063
|
+
* すべての数式を最初から計算し直します(データの入れ替え・列の変更の後など)。
|
|
4064
|
+
*
|
|
4065
|
+
* 从头重算所有公式(替换数据、变更列之后等)。
|
|
4066
|
+
*/
|
|
985
4067
|
recalculate(): void;
|
|
986
|
-
/**
|
|
4068
|
+
/**
|
|
4069
|
+
* 이 셀과, 이 셀에 딸린(종속) 셀들만 다시 계산합니다.
|
|
4070
|
+
*
|
|
4071
|
+
* Recompute only this cell and the cells depending on it.
|
|
4072
|
+
*
|
|
4073
|
+
* このセルと、このセルにぶら下がる(従属)セルだけを計算し直します。
|
|
4074
|
+
*
|
|
4075
|
+
* 只重算该单元格和依赖它的单元格。
|
|
4076
|
+
*/
|
|
987
4077
|
recalculateCell(rowIndex: number, field: string): void;
|
|
988
|
-
/**
|
|
4078
|
+
/**
|
|
4079
|
+
* 채우기 기능 전용 — 어떤 셀의 수식을 dRow/dCol 만큼 이동한 자리에 맞게 참조를 옮긴 새 수식 원문을 돌려줍니다.
|
|
4080
|
+
*
|
|
4081
|
+
* Fill-only — return a copy of a cell's formula with its relative refs shifted by dRow/dCol.
|
|
4082
|
+
*
|
|
4083
|
+
* 入力機能専用 — あるセルの数式を dRow/dCol だけ移動した位置に合わせて参照を移した新しい数式の原文を
|
|
4084
|
+
* 返します。
|
|
4085
|
+
*
|
|
4086
|
+
* 填充功能专用 — 返回某单元格公式的新原文,其中的引用按 dRow/dCol 移动后的位置作相应偏移。
|
|
4087
|
+
*/
|
|
989
4088
|
offsetFormula(srcRowId: string, srcField: string, dRow: number, dCol: number): string;
|
|
990
|
-
/**
|
|
4089
|
+
/**
|
|
4090
|
+
* 행을 펼쳐 상세 패널을 엽니다. rowRef 는 화면 순서 인덱스 또는 안정적 id. 허용 겹수를 넘으면 거부됩니다.
|
|
4091
|
+
*
|
|
4092
|
+
* Expand a row's detail panel. rowRef is a screen-order index or a stable id; rejected past the nesting limit.
|
|
4093
|
+
*
|
|
4094
|
+
* 行を展開して詳細パネルを開きます。rowRef は画面順のインデックスまたは安定した id。許容する
|
|
4095
|
+
* 重なりの数を超えると拒否されます。
|
|
4096
|
+
*
|
|
4097
|
+
* 展开行以打开详情面板。rowRef 是画面顺序的索引或稳定 id。超过允许的嵌套层数会被拒绝。
|
|
4098
|
+
*/
|
|
991
4099
|
expandRow(rowRef: number | {
|
|
992
4100
|
id: string;
|
|
993
4101
|
}): void;
|
|
4102
|
+
/**
|
|
4103
|
+
* 열려 있는 상세 패널을 접습니다.
|
|
4104
|
+
*
|
|
4105
|
+
* Collapse an open detail panel.
|
|
4106
|
+
*
|
|
4107
|
+
* 開いている詳細パネルを折りたたみます。
|
|
4108
|
+
*
|
|
4109
|
+
* 折叠已打开的详情面板。
|
|
4110
|
+
*/
|
|
994
4111
|
collapseRow(rowRef: number | {
|
|
995
4112
|
id: string;
|
|
996
4113
|
}): void;
|
|
4114
|
+
/**
|
|
4115
|
+
* 상세 패널을 펼쳐져 있으면 접고, 접혀 있으면 폅니다.
|
|
4116
|
+
*
|
|
4117
|
+
* Toggle a detail panel open/closed.
|
|
4118
|
+
*
|
|
4119
|
+
* 詳細パネルを、開いていれば折りたたみ、折りたたまれていれば開きます。
|
|
4120
|
+
*
|
|
4121
|
+
* 详情面板已展开则折叠,已折叠则展开。
|
|
4122
|
+
*/
|
|
997
4123
|
toggleRow(rowRef: number | {
|
|
998
4124
|
id: string;
|
|
999
4125
|
}): void;
|
|
4126
|
+
/**
|
|
4127
|
+
* 그 행의 상세 패널이 지금 펼쳐져 있는지.
|
|
4128
|
+
*
|
|
4129
|
+
* Whether that row's detail panel is currently expanded.
|
|
4130
|
+
*
|
|
4131
|
+
* その行の詳細パネルが今展開されているか。
|
|
4132
|
+
*
|
|
4133
|
+
* 该行的详情面板当前是否展开。
|
|
4134
|
+
*/
|
|
1000
4135
|
isRowExpanded(rowRef: number | {
|
|
1001
4136
|
id: string;
|
|
1002
4137
|
}): boolean;
|
|
4138
|
+
/**
|
|
4139
|
+
* 열려 있는 모든 상세 패널을 한 번에 접습니다.
|
|
4140
|
+
*
|
|
4141
|
+
* Collapse every open detail panel at once.
|
|
4142
|
+
*
|
|
4143
|
+
* 開いているすべての詳細パネルを一度に折りたたみます。
|
|
4144
|
+
*
|
|
4145
|
+
* 一次折叠所有已打开的详情面板。
|
|
4146
|
+
*/
|
|
1003
4147
|
collapseAllDetails(): void;
|
|
1004
|
-
/**
|
|
4148
|
+
/**
|
|
4149
|
+
* 그 행의 상세 패널 내용물(직접 그린 결과 또는 자동 생성된 자식 그리드). 한 번도 펼치지 않았으면 undefined.
|
|
4150
|
+
*
|
|
4151
|
+
* The row's detail content (your rendered result or the auto-created child grid); undefined if never expanded.
|
|
4152
|
+
*
|
|
4153
|
+
* その行の詳細パネルの中身(自分で描画した結果、または自動生成された子グリッド)。一度も展開して
|
|
4154
|
+
* いなければ undefined。
|
|
4155
|
+
*
|
|
4156
|
+
* 该行详情面板的内容(自行绘制的结果,或自动生成的子表格)。从未展开过时为 undefined。
|
|
4157
|
+
*/
|
|
1005
4158
|
getDetailInstance<D = any>(rowRef: number | {
|
|
1006
4159
|
id: string;
|
|
1007
4160
|
}): D | undefined;
|
|
1008
|
-
/**
|
|
4161
|
+
/**
|
|
4162
|
+
* 컬럼·컨테이너 크기를 바꾼 뒤 열린 패널의 폭을 다시 맞춥니다(보통은 재렌더가 알아서 처리).
|
|
4163
|
+
*
|
|
4164
|
+
* Re-sync open panel widths after a column/container resize (usually the re-render handles it).
|
|
4165
|
+
*
|
|
4166
|
+
* 列・コンテナーのサイズを変えた後、開いているパネルの幅を合わせ直します(通常は再レンダリングが
|
|
4167
|
+
* 自動で処理)。
|
|
4168
|
+
*
|
|
4169
|
+
* 改变列或容器尺寸后,重新对齐已打开面板的宽度(通常重新渲染会自动处理)。
|
|
4170
|
+
*/
|
|
1009
4171
|
resyncPanelWidths(): void;
|
|
1010
4172
|
getChecked(): Array<{
|
|
1011
4173
|
row: T;
|
|
@@ -1024,9 +4186,27 @@ export interface OpenGridInstance<T = any> {
|
|
|
1024
4186
|
resetFilter(field?: string): void;
|
|
1025
4187
|
getFilterState(): Record<string, FilterItem[]>;
|
|
1026
4188
|
restoreFilter(state: Record<string, FilterItem[]>): void;
|
|
1027
|
-
/**
|
|
4189
|
+
/**
|
|
4190
|
+
* 지정한 행들을 다른 그리드로 옮깁니다(드래그·셔틀과 같은 경로). 옮기는 전·후·완료 3단계 이벤트가 나고 필드 매핑 규칙이 적용됩니다.
|
|
4191
|
+
*
|
|
4192
|
+
* Move the given rows into another grid (same path as drag/shuttle). Fires the three-phase events and applies the field-mapping rule.
|
|
4193
|
+
*
|
|
4194
|
+
* 指定した行を別のグリッドに移します(ドラッグ・シャトルと同じ経路)。移す前・後・完了の 3 段階の
|
|
4195
|
+
* イベントが出て、フィールドマッピングのルールが適用されます。
|
|
4196
|
+
*
|
|
4197
|
+
* 把指定的行移到另一个表格(与拖动、穿梭同一路径)。会触发移动前、移动后、完成三个阶段的事件,
|
|
4198
|
+
* 并应用字段映射规则。
|
|
4199
|
+
*/
|
|
1028
4200
|
moveRowsTo(target: OpenGridInstance<T>, sourceIndexes: number[], targetIndex?: number): Promise<boolean>;
|
|
1029
|
-
/**
|
|
4201
|
+
/**
|
|
4202
|
+
* 체크박스로 고른 행들을 다른 그리드로 옮깁니다(화살표 셔틀 버튼용).
|
|
4203
|
+
*
|
|
4204
|
+
* Move the checkbox-selected rows into another grid (for the arrow-shuttle buttons).
|
|
4205
|
+
*
|
|
4206
|
+
* チェックボックスで選んだ行を別のグリッドに移します(矢印シャトルボタン用)。
|
|
4207
|
+
*
|
|
4208
|
+
* 把用复选框选中的行移到另一个表格(用于箭头穿梭按钮)。
|
|
4209
|
+
*/
|
|
1030
4210
|
moveCheckedTo(target: OpenGridInstance<T>): Promise<boolean>;
|
|
1031
4211
|
freeze(columnCount: number): void;
|
|
1032
4212
|
freezeRows(rowCount: number): void;
|
|
@@ -1053,29 +4233,120 @@ export interface OpenGridInstance<T = any> {
|
|
|
1053
4233
|
resize(width?: number, height?: number): void;
|
|
1054
4234
|
setTheme(theme: string): void;
|
|
1055
4235
|
setThemeVar(varName: string, value: string): void;
|
|
1056
|
-
/**
|
|
4236
|
+
/**
|
|
4237
|
+
* 스킨(형태 축)을 바꿉니다 — 모서리·테두리·여백 같은 "생김새"만 갈아 끼우고, 색 테마는 그대로 둡니다.
|
|
4238
|
+
*
|
|
4239
|
+
* Switch the skin (form axis) — swaps the "shape" (corners, borders, spacing …) only, leaving the color theme untouched.
|
|
4240
|
+
*
|
|
4241
|
+
* スキン(形の軸)を変えます — 角・枠線・余白のような「見た目」だけを差し替え、色テーマはそのままに
|
|
4242
|
+
* します。
|
|
4243
|
+
*
|
|
4244
|
+
* 更换皮肤(形态轴)— 只替换圆角、边框、间距这类「外形」,色彩主题保持不变。
|
|
4245
|
+
*/
|
|
1057
4246
|
setSkin(skin: string): void;
|
|
1058
|
-
/**
|
|
4247
|
+
/**
|
|
4248
|
+
* 지금 적용된 스킨 id('default' = 기본 생김새).
|
|
4249
|
+
*
|
|
4250
|
+
* The currently applied skin id ('default' = stock look).
|
|
4251
|
+
*
|
|
4252
|
+
* 今適用されているスキンの id('default' = 既定の見た目)。
|
|
4253
|
+
*
|
|
4254
|
+
* 当前应用的皮肤 id('default' = 默认外形)。
|
|
4255
|
+
*/
|
|
1059
4256
|
getSkin(): string;
|
|
1060
|
-
/**
|
|
4257
|
+
/**
|
|
4258
|
+
* 형태 축의 CSS 변수 하나만 즉석에서 바꿉니다(setThemeVar 의 형태 버전). 색 값을 넣으면 거부됩니다.
|
|
4259
|
+
*
|
|
4260
|
+
* Override a single form-axis CSS variable at runtime (the form-axis sibling of setThemeVar). Color values are rejected.
|
|
4261
|
+
*
|
|
4262
|
+
* 形の軸の CSS 変数一つだけをその場で変えます(setThemeVar の形バージョン)。色の値を入れると
|
|
4263
|
+
* 拒否されます。
|
|
4264
|
+
*
|
|
4265
|
+
* 即时更改形态轴的单个 CSS 变量(setThemeVar 的形态版本)。传入色彩值会被拒绝。
|
|
4266
|
+
*/
|
|
1061
4267
|
setSkinVar(varName: string, value: string): void;
|
|
1062
|
-
/**
|
|
4268
|
+
/**
|
|
4269
|
+
* 밀도(행 간격)를 바꿉니다 — 촘촘/보통/여유처럼 행 높이와 여백을 통째로 조절합니다. 색·스킨과 따로 노는 별개 축이며, 없는 이름을 줘도 오류를 내지 않습니다.
|
|
4270
|
+
*
|
|
4271
|
+
* Switch the density (row spacing) — compact/normal/roomy row heights and paddings. An independent axis from color/skin; never throws on an unknown name.
|
|
4272
|
+
*
|
|
4273
|
+
* 密度(行間隔)を変えます — 詰め/普通/ゆとりのように行の高さと余白をまとめて調節します。
|
|
4274
|
+
* 色・スキンとは別に動く独立した軸であり、ない名前を渡してもエラーになりません。
|
|
4275
|
+
*
|
|
4276
|
+
* 更改密度(行间距)— 像紧凑/普通/宽松那样,整体调节行高和留白。它是与色彩、皮肤各自独立的轴,
|
|
4277
|
+
* 传入不存在的名称也不会报错。
|
|
4278
|
+
*/
|
|
1063
4279
|
setDensity(name: string): void;
|
|
1064
|
-
/**
|
|
4280
|
+
/**
|
|
4281
|
+
* 질감(배경 패턴)을 바꿉니다 — 배경 페인트만 입히고 크기 재계산은 하지 않습니다. 없는 이름을 줘도 오류를 내지 않습니다.
|
|
4282
|
+
*
|
|
4283
|
+
* Switch the texture (background pattern) — paints the background only, no relayout. Never throws on an unknown name.
|
|
4284
|
+
*
|
|
4285
|
+
* 質感(背景パターン)を変えます — 背景のペイントだけを付け、サイズの再計算はしません。
|
|
4286
|
+
* ない名前を渡してもエラーになりません。
|
|
4287
|
+
*
|
|
4288
|
+
* 更改质感(背景图案)— 只上背景漆,不重算尺寸。传入不存在的名称也不会报错。
|
|
4289
|
+
*/
|
|
1065
4290
|
setTexture(name: string): void;
|
|
1066
|
-
/**
|
|
4291
|
+
/**
|
|
4292
|
+
* UI 문구의 언어(로케일)를 바꾸고 화면을 다시 그립니다. 등록되지 않은 로케일을 줘도 오류를 내지 않습니다.
|
|
4293
|
+
*
|
|
4294
|
+
* Switch the UI language (locale) and re-render. Never throws on an unregistered locale.
|
|
4295
|
+
*
|
|
4296
|
+
* UI 文言の言語(ロケール)を変えて画面を再描画します。登録されていないロケールを渡しても
|
|
4297
|
+
* エラーになりません。
|
|
4298
|
+
*
|
|
4299
|
+
* 更改 UI 文字的语言(区域),并重绘画面。传入未注册的区域也不会报错。
|
|
4300
|
+
*/
|
|
1067
4301
|
setLocale(locale: string): void;
|
|
1068
|
-
/**
|
|
4302
|
+
/**
|
|
4303
|
+
* 이 그리드에 지금 적용된 로케일 id.
|
|
4304
|
+
*
|
|
4305
|
+
* The locale id currently applied to this grid.
|
|
4306
|
+
*
|
|
4307
|
+
* このグリッドに今適用されているロケールの id。
|
|
4308
|
+
*
|
|
4309
|
+
* 该表格当前应用的区域 id。
|
|
4310
|
+
*/
|
|
1069
4311
|
getLocale(): string;
|
|
1070
|
-
/**
|
|
4312
|
+
/**
|
|
4313
|
+
* 이 그리드에서만 특정 문구 하나를 다른 말로 바꿉니다.
|
|
4314
|
+
*
|
|
4315
|
+
* Override a single UI message for this grid only.
|
|
4316
|
+
*
|
|
4317
|
+
* このグリッドでだけ特定の文言一つを別の言葉に変えます。
|
|
4318
|
+
*
|
|
4319
|
+
* 只在该表格内把某一条文字换成别的说法。
|
|
4320
|
+
*/
|
|
1071
4321
|
setMessage(key: LocaleMessageKey | string, value: MessageValue): OpenGridInstance<T>;
|
|
1072
|
-
/**
|
|
4322
|
+
/**
|
|
4323
|
+
* 키에 해당하는 문구를 찾아 돌려줍니다(개별 오버라이드 → 활성 로케일 → 한국어 → 키 순). 오류를 내지 않습니다.
|
|
4324
|
+
*
|
|
4325
|
+
* Resolve a message by key (per-message override → active locale → Korean → the key itself). Never throws.
|
|
4326
|
+
*
|
|
4327
|
+
* キーに当たる文言を探して返します(個別オーバーライド → 有効ロケール → 韓国語 → キーの順)。
|
|
4328
|
+
* エラーになりません。
|
|
4329
|
+
*
|
|
4330
|
+
* 按键查找并返回对应文字(单条覆盖 → 生效区域 → 韩语 → 键本身,依此顺序)。不会报错。
|
|
4331
|
+
*/
|
|
1073
4332
|
t(key: LocaleMessageKey | string, params?: Record<string, string | number>): string;
|
|
1074
4333
|
destroy(): void;
|
|
1075
4334
|
setOptions(opts: Partial<GridOptions<T>>): void;
|
|
1076
|
-
/**
|
|
4335
|
+
/**
|
|
4336
|
+
* 컬럼 마스킹 ON/OFF. enabled=true → 마스킹 적용, enabled=false → 전체 해제
|
|
4337
|
+
*
|
|
4338
|
+
* 列マスキングの ON/OFF。enabled=true → マスキング適用、enabled=false → 全解除
|
|
4339
|
+
*
|
|
4340
|
+
* 列掩码的开关。enabled=true → 应用掩码,enabled=false → 全部解除
|
|
4341
|
+
*/
|
|
1077
4342
|
setMaskEnabled(field: string, enabled: boolean): void;
|
|
1078
|
-
/**
|
|
4343
|
+
/**
|
|
4344
|
+
* 현재 마스킹 활성 여부 반환 (true=마스킹 중)
|
|
4345
|
+
*
|
|
4346
|
+
* 現在マスキングが有効かどうかを返す(true=マスキング中)
|
|
4347
|
+
*
|
|
4348
|
+
* 返回当前掩码是否启用(true=正在掩码)
|
|
4349
|
+
*/
|
|
1079
4350
|
getMaskEnabled(field: string): boolean;
|
|
1080
4351
|
openContextMenu(e: MouseEvent, items?: ContextMenuItem[]): void;
|
|
1081
4352
|
closeContextMenu(): void;
|
|
@@ -1097,6 +4368,16 @@ export interface OpenGridInstance<T = any> {
|
|
|
1097
4368
|
* - 'after:{op}' : 작업 완료 후 호출. ctx.result에 결과 포함.
|
|
1098
4369
|
* - 'complete' : 모든 작업 완료 후 공통 핸들러.
|
|
1099
4370
|
*
|
|
4371
|
+
* トリガーの登録。
|
|
4372
|
+
* - 'before:{op}' : 作業の実行前に呼び出し。ctx.cancel() で該当作業を中断。
|
|
4373
|
+
* - 'after:{op}' : 作業の完了後に呼び出し。ctx.result に結果を含む。
|
|
4374
|
+
* - 'complete' : すべての作業の完了後の共通ハンドラー。
|
|
4375
|
+
*
|
|
4376
|
+
* 触发器的注册。
|
|
4377
|
+
* - 'before:{op}' : 在操作执行前调用。ctx.cancel() 可中断该操作。
|
|
4378
|
+
* - 'after:{op}' : 在操作完成后调用。ctx.result 中包含结果。
|
|
4379
|
+
* - 'complete' : 所有操作完成后的公共处理器。
|
|
4380
|
+
*
|
|
1100
4381
|
* @example
|
|
1101
4382
|
* grid.addTrigger('before:insertRow', ctx => {
|
|
1102
4383
|
* if (!ctx.args[0]?.name) ctx.cancel(); // 이름 없으면 삽입 중단
|
|
@@ -1106,12 +4387,32 @@ export interface OpenGridInstance<T = any> {
|
|
|
1106
4387
|
* });
|
|
1107
4388
|
*/
|
|
1108
4389
|
addTrigger(event: TriggerEvent | string, handler: TriggerHandler): this;
|
|
1109
|
-
/**
|
|
4390
|
+
/**
|
|
4391
|
+
* 트리거 제거
|
|
4392
|
+
*
|
|
4393
|
+
* トリガーの削除
|
|
4394
|
+
*
|
|
4395
|
+
* 移除触发器
|
|
4396
|
+
*/
|
|
1110
4397
|
removeTrigger(event: TriggerEvent | string, handler: TriggerHandler): this;
|
|
1111
|
-
/**
|
|
4398
|
+
/**
|
|
4399
|
+
* 트리거 전체 또는 특정 이벤트 클리어
|
|
4400
|
+
*
|
|
4401
|
+
* トリガー全体または特定イベントのクリア
|
|
4402
|
+
*
|
|
4403
|
+
* 清除全部触发器或特定事件的触发器
|
|
4404
|
+
*/
|
|
1112
4405
|
clearTriggers(event?: TriggerEvent | string): this;
|
|
1113
4406
|
}
|
|
1114
|
-
/**
|
|
4407
|
+
/**
|
|
4408
|
+
* 컨텍스트 메뉴 항목.
|
|
4409
|
+
*
|
|
4410
|
+
* Context menu item.
|
|
4411
|
+
*
|
|
4412
|
+
* コンテキストメニューの項目。
|
|
4413
|
+
*
|
|
4414
|
+
* 右键菜单项。
|
|
4415
|
+
*/
|
|
1115
4416
|
export interface ContextMenuItem {
|
|
1116
4417
|
id?: string;
|
|
1117
4418
|
label?: string;
|
|
@@ -1122,49 +4423,166 @@ export interface ContextMenuItem {
|
|
|
1122
4423
|
}
|
|
1123
4424
|
export type { FilterSelectColumn, FilterSelectConfig } from './FilterSelect.js';
|
|
1124
4425
|
export type { FlatRowRef } from './FlatRowModel.js';
|
|
1125
|
-
/**
|
|
4426
|
+
/**
|
|
4427
|
+
* 워크시트(탭) 정의.
|
|
4428
|
+
*
|
|
4429
|
+
* Worksheet (tab) definition.
|
|
4430
|
+
*
|
|
4431
|
+
* ワークシート(タブ)の定義。
|
|
4432
|
+
*
|
|
4433
|
+
* 工作表(标签页)定义。
|
|
4434
|
+
*/
|
|
1126
4435
|
export interface WorksheetDef<T = any> {
|
|
1127
4436
|
name: string;
|
|
1128
|
-
/**
|
|
4437
|
+
/**
|
|
4438
|
+
* 시트 전용 컬럼(미지정 시 그리드 columns 공유).
|
|
4439
|
+
*
|
|
4440
|
+
* Sheet-specific columns (falls back to grid columns).
|
|
4441
|
+
*
|
|
4442
|
+
* シート専用の列(未指定時はグリッドの columns を共有)。
|
|
4443
|
+
*
|
|
4444
|
+
* 工作表专用的列(未指定时共用表格的 columns)。
|
|
4445
|
+
*/
|
|
1129
4446
|
columns?: ColumnDef<T>[];
|
|
1130
4447
|
data?: T[];
|
|
1131
4448
|
}
|
|
1132
|
-
/**
|
|
4449
|
+
/**
|
|
4450
|
+
* 워크시트 현재 상태 스냅샷.
|
|
4451
|
+
*
|
|
4452
|
+
* Snapshot of a worksheet's current state.
|
|
4453
|
+
*
|
|
4454
|
+
* ワークシートの現在の状態のスナップショット。
|
|
4455
|
+
*
|
|
4456
|
+
* 工作表当前状态的快照。
|
|
4457
|
+
*/
|
|
1133
4458
|
export interface WorksheetState<T = any> {
|
|
1134
4459
|
name: string;
|
|
1135
4460
|
columns: ColumnDef<T>[];
|
|
1136
4461
|
data: T[];
|
|
1137
4462
|
}
|
|
1138
4463
|
/**
|
|
1139
|
-
* 트리거 컨텍스트.
|
|
4464
|
+
* 트리거 컨텍스트.
|
|
4465
|
+
*
|
|
4466
|
+
* Trigger context.
|
|
4467
|
+
*
|
|
4468
|
+
* トリガーのコンテキスト。
|
|
4469
|
+
*
|
|
4470
|
+
* 触发器上下文。
|
|
1140
4471
|
*
|
|
1141
4472
|
* before:{op} 핸들러에서 ctx.cancel() 호출 → 해당 작업이 실행되지 않음.
|
|
1142
4473
|
* after:{op} / complete 핸들러에서는 ctx.result로 결과 확인 가능.
|
|
1143
|
-
*
|
|
4474
|
+
*
|
|
4475
|
+
* Calling ctx.cancel() in a before:{op} handler prevents the operation from running.
|
|
1144
4476
|
* In after:{op} / complete handlers the result is available via ctx.result.
|
|
4477
|
+
*
|
|
4478
|
+
* before:{op} ハンドラーで ctx.cancel() を呼び出す → 該当作業が実行されない。
|
|
4479
|
+
* after:{op} / complete ハンドラーでは ctx.result で結果を確認できる。
|
|
4480
|
+
*
|
|
4481
|
+
* 在 before:{op} 处理器中调用 ctx.cancel() → 该操作不会执行。
|
|
4482
|
+
* 在 after:{op} / complete 处理器中可通过 ctx.result 查看结果。
|
|
1145
4483
|
*/
|
|
1146
4484
|
export interface TriggerContext<TResult = any> {
|
|
1147
|
-
/**
|
|
4485
|
+
/**
|
|
4486
|
+
* 작업 이름 (setData, insertRow, deleteRow, writeCell, ...)
|
|
4487
|
+
*
|
|
4488
|
+
* Operation name (setData, insertRow, deleteRow, writeCell, ...)
|
|
4489
|
+
*
|
|
4490
|
+
* 作業名(setData, insertRow, deleteRow, writeCell, ...)
|
|
4491
|
+
*
|
|
4492
|
+
* 操作名(setData, insertRow, deleteRow, writeCell, ...)
|
|
4493
|
+
*/
|
|
1148
4494
|
readonly operation: string;
|
|
1149
|
-
/**
|
|
4495
|
+
/**
|
|
4496
|
+
* 작업에 전달된 인수 배열
|
|
4497
|
+
*
|
|
4498
|
+
* Arguments passed to the operation
|
|
4499
|
+
*
|
|
4500
|
+
* 作業に渡された引数の配列
|
|
4501
|
+
*
|
|
4502
|
+
* 传给操作的参数数组
|
|
4503
|
+
*/
|
|
1150
4504
|
readonly args: any[];
|
|
1151
|
-
/**
|
|
4505
|
+
/**
|
|
4506
|
+
* 작업 결과 (after:* / complete 에서만 채워짐)
|
|
4507
|
+
*
|
|
4508
|
+
* Operation result (populated only in after:* and complete)
|
|
4509
|
+
*
|
|
4510
|
+
* 作業の結果(after:* / complete でのみ埋まる)
|
|
4511
|
+
*
|
|
4512
|
+
* 操作结果(仅在 after:* / complete 中填充)
|
|
4513
|
+
*/
|
|
1152
4514
|
result?: TResult;
|
|
1153
|
-
/**
|
|
4515
|
+
/**
|
|
4516
|
+
* 취소 여부 — cancel() 호출 후 true가 됨
|
|
4517
|
+
*
|
|
4518
|
+
* Cancellation flag — becomes true after cancel()
|
|
4519
|
+
*
|
|
4520
|
+
* キャンセルの有無 — cancel() 呼び出し後に true になる
|
|
4521
|
+
*
|
|
4522
|
+
* 是否取消 — 调用 cancel() 后变为 true
|
|
4523
|
+
*/
|
|
1154
4524
|
readonly cancelled: boolean;
|
|
1155
|
-
/**
|
|
4525
|
+
/**
|
|
4526
|
+
* 추가 정보 (트리거 간 데이터 공유 등)
|
|
4527
|
+
*
|
|
4528
|
+
* Extra info (data sharing between triggers, etc.)
|
|
4529
|
+
*
|
|
4530
|
+
* 追加情報(トリガー間のデータ共有など)
|
|
4531
|
+
*
|
|
4532
|
+
* 附加信息(触发器之间共享数据等)
|
|
4533
|
+
*/
|
|
1156
4534
|
extra?: Record<string, any>;
|
|
1157
|
-
/**
|
|
4535
|
+
/**
|
|
4536
|
+
* 작업 시작 타임스탬프 (ms)
|
|
4537
|
+
*
|
|
4538
|
+
* Operation start timestamp (ms)
|
|
4539
|
+
*
|
|
4540
|
+
* 作業開始のタイムスタンプ(ms)
|
|
4541
|
+
*
|
|
4542
|
+
* 操作开始的时间戳(ms)
|
|
4543
|
+
*/
|
|
1158
4544
|
readonly timestamp: number;
|
|
1159
4545
|
/**
|
|
1160
4546
|
* 작업 취소 — before:{op} 핸들러에서만 유효.
|
|
1161
4547
|
* 이후 핸들러도 실행되지 않으며 실제 작업도 중단된다.
|
|
1162
|
-
*
|
|
4548
|
+
*
|
|
4549
|
+
* Cancel the operation — valid only in before:{op} handlers.
|
|
1163
4550
|
* Subsequent handlers are skipped and the operation itself is aborted.
|
|
4551
|
+
*
|
|
4552
|
+
* 作業のキャンセル — before:{op} ハンドラーでのみ有効。
|
|
4553
|
+
* 以降のハンドラーも実行されず、実際の作業も中断される。
|
|
4554
|
+
*
|
|
4555
|
+
* 取消操作 — 仅在 before:{op} 处理器中有效。
|
|
4556
|
+
* 后续处理器不再执行,实际操作也会中断。
|
|
1164
4557
|
*/
|
|
1165
4558
|
cancel(): void;
|
|
1166
4559
|
}
|
|
1167
|
-
/**
|
|
4560
|
+
/**
|
|
4561
|
+
* 트리거로 등록하는 핸들러 함수의 형태입니다. 작업의 맥락(TriggerContext)을 인자로 받아,
|
|
4562
|
+
* 작업 전이라면 검증·취소하고 작업 후라면 결과를 확인하는 등의 일을 합니다.
|
|
4563
|
+
*
|
|
4564
|
+
* The shape of a handler you register as a trigger. It receives the operation's context
|
|
4565
|
+
* (TriggerContext) — validate/cancel before, or inspect the result after.
|
|
4566
|
+
*
|
|
4567
|
+
* トリガーとして登録するハンドラー関数の形です。作業のコンテキスト(TriggerContext)を引数に受け取り、
|
|
4568
|
+
* 作業の前なら検証・キャンセルし、作業の後なら結果を確認するなどのことをします。
|
|
4569
|
+
*
|
|
4570
|
+
* 注册为触发器的处理函数的形态。它以操作的上下文(TriggerContext)为参数,
|
|
4571
|
+
* 在操作前做校验、取消,在操作后查看结果等。
|
|
4572
|
+
*/
|
|
1168
4573
|
export type TriggerHandler<TResult = any> = (ctx: TriggerContext<TResult>) => void;
|
|
1169
|
-
/**
|
|
4574
|
+
/**
|
|
4575
|
+
* 트리거를 걸 수 있는 이벤트 이름들. 형식은 '시점:작업' 입니다 — 'before:작업'은 그 작업이 실행되기
|
|
4576
|
+
* 직전(여기서 취소 가능), 'after:작업'은 끝난 직후, 'complete'는 어떤 작업이든 끝난 뒤 공통으로 호출됩니다.
|
|
4577
|
+
*
|
|
4578
|
+
* The event names you can attach triggers to, in 'phase:operation' form — 'before:*' fires just
|
|
4579
|
+
* before the operation (cancelable there), 'after:*' just after, and 'complete' after any operation.
|
|
4580
|
+
*
|
|
4581
|
+
* トリガーを掛けられるイベント名。形式は '時点:作業' です — 'before:作業' はその作業が実行される
|
|
4582
|
+
* 直前(ここでキャンセル可能)、'after:作業' は終わった直後、'complete' はどの作業でも終わった後に
|
|
4583
|
+
* 共通で呼び出されます。
|
|
4584
|
+
*
|
|
4585
|
+
* 可挂载触发器的事件名。格式为 '时点:操作' — 'before:操作' 在该操作执行前一刻调用(可在此取消),
|
|
4586
|
+
* 'after:操作' 在结束后立即调用,'complete' 在任何操作结束后统一调用。
|
|
4587
|
+
*/
|
|
1170
4588
|
export type TriggerEvent = 'before:setData' | 'after:setData' | 'before:insertRow' | 'after:insertRow' | 'before:deleteRow' | 'after:deleteRow' | 'before:writeCell' | 'after:writeCell' | 'before:applyColumns' | 'after:applyColumns' | 'before:orderBy' | 'after:orderBy' | 'before:setFilter' | 'after:setFilter' | 'before:groupBy' | 'after:groupBy' | 'complete';
|