open-grid 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/{OpenGrid-DgZtbVD0.cjs → OpenGrid-CLk8Vt7j.cjs} +1177 -1108
- package/dist/{OpenGrid-E11B7Xa7.js → OpenGrid-D6YxCsnV.js} +1551 -1482
- package/dist/{index-B_e5BXnW.cjs → index-D0DJtKYI.cjs} +2 -2
- package/dist/{index-Brnev66-.js → index-VkKgQ506.js} +2 -2
- package/dist/open-grid-a11y.cjs +216 -0
- package/dist/open-grid-a11y.js +219 -0
- package/dist/open-grid-base.css +9 -0
- package/dist/open-grid-header.css +6 -15
- package/dist/open-grid-react.cjs +1 -1
- package/dist/open-grid-react.js +1 -1
- package/dist/open-grid-vue.cjs +1 -1
- package/dist/open-grid-vue.js +1 -1
- package/dist/open-grid.cjs +5 -2
- package/dist/open-grid.js +6 -3
- package/dist/types/a11y/index.d.ts +37 -0
- package/dist/types/core/ColumnLayout.d.ts +3 -3
- package/dist/types/core/ExportManager.d.ts +2 -6
- package/dist/types/core/FlatRowModel.d.ts +8 -0
- package/dist/types/core/MergeEngine.d.ts +45 -5
- package/dist/types/core/MutationService.d.ts +4 -9
- package/dist/types/core/OpenGrid.d.ts +343 -7
- package/dist/types/core/OrgChart.d.ts +24 -0
- package/dist/types/core/RowDragDrop.d.ts +2 -0
- package/dist/types/core/SortFilterManager.d.ts +8 -0
- package/dist/types/core/WorksheetManager.d.ts +2 -2
- package/dist/types/core/a11y/KeyboardInteractionModel.d.ts +321 -20
- package/dist/types/core/a11y/LiveRegionController.d.ts +229 -27
- package/dist/types/core/a11y/VisualEquivRegistry.d.ts +199 -14
- package/dist/types/core/appearance/TextureRegistry.d.ts +10 -0
- package/dist/types/core/cf/CFRule.d.ts +145 -22
- package/dist/types/core/types.d.ts +502 -22
- package/dist/types/index.d.ts +31 -1
- package/dist/types/vue/OpenGrid.vue.d.ts +1 -1
- package/package.json +7 -2
|
@@ -212,6 +212,7 @@ export declare class OrgChart {
|
|
|
212
212
|
private _roots;
|
|
213
213
|
private _expandedKeys;
|
|
214
214
|
private _selectedId;
|
|
215
|
+
private _destroyed;
|
|
215
216
|
/**
|
|
216
217
|
* @param selector - 마운트할 컨테이너 셀렉터 문자열 또는 엘리먼트
|
|
217
218
|
*
|
|
@@ -322,6 +323,29 @@ export declare class OrgChart {
|
|
|
322
323
|
* 折叠所有节点(仅显示根节点)。初次打开较大的组织架构图,想先展示最上层结构时调用。
|
|
323
324
|
*/
|
|
324
325
|
collapseAll(): void;
|
|
326
|
+
/**
|
|
327
|
+
* 조직도를 파괴한다: 컨테이너 내용을 비우고 `og-orgchart` 클래스를 떼며, 붙들던 데이터를 놓는다.
|
|
328
|
+
* 같은 요소를 다른 화면(그리드 등)에 다시 쓰기 전에 부른다. 두 번 불러도 탈 없다.
|
|
329
|
+
* `setTheme`/`setSkin` 으로 건 속성은 사용자가 정한 것이라 남긴다(`OpenGrid.destroy()` 와 같은 방침).
|
|
330
|
+
*
|
|
331
|
+
* Destroys the org chart: empties the container, removes the `og-orgchart` class and releases the
|
|
332
|
+
* data it held. Call it before reusing the same element for another view (a grid, etc.). Safe to
|
|
333
|
+
* call more than once. Attributes set through `setTheme`/`setSkin` are the caller's choice and are
|
|
334
|
+
* left in place (same policy as `OpenGrid.destroy()`).
|
|
335
|
+
*
|
|
336
|
+
* 組織図を破棄します: コンテナの中身を空にし、`og-orgchart` クラスを外し、保持していたデータを手放します。
|
|
337
|
+
* 同じ要素を別の画面(グリッドなど)に使い直す前に呼びます。何度呼んでも問題ありません。
|
|
338
|
+
* `setTheme`/`setSkin` で付けた属性は利用者が決めたものなので残します(`OpenGrid.destroy()` と同じ方針)。
|
|
339
|
+
*
|
|
340
|
+
* 销毁组织架构图: 清空容器内容、去掉 `og-orgchart` 类,并释放它持有的数据。
|
|
341
|
+
* 在把同一个元素改用于别的画面(表格等)之前调用。多次调用也没问题。
|
|
342
|
+
* 通过 `setTheme`/`setSkin` 设置的属性是使用者的选择,因此保留(与 `OpenGrid.destroy()` 的方针相同)。
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* chart.destroy();
|
|
346
|
+
* const grid = new OpenGrid(sameElement, { columns });
|
|
347
|
+
*/
|
|
348
|
+
destroy(): void;
|
|
325
349
|
private _toggle;
|
|
326
350
|
private _rebuild;
|
|
327
351
|
private _calcLayout;
|
|
@@ -66,6 +66,8 @@ export declare class RowDragDrop {
|
|
|
66
66
|
constructor(_bodyEl: HTMLElement, _rowHeight: number, _onDrop: RowDropCallback, _cross?: CrossGridConfig | null,
|
|
67
67
|
/** fromIndex 기준 함께 드래그할 행 수(멀티행 배지용). 기본 1 / Rows dragged together from fromIndex (multi-row badge). Default 1 */
|
|
68
68
|
_getDragCount?: (fromIndex: number) => number);
|
|
69
|
+
/** 행 높이가 바뀌면(밀도·setRowHeight) 끌어 놓을 자리 계산도 새 높이를 쓰게 한다. / Use the new row height for drop-slot math after a row-height change. */
|
|
70
|
+
setRowHeight(px: number): void;
|
|
69
71
|
/**
|
|
70
72
|
* 행 엘리먼트에 드래그 핸들 삽입.
|
|
71
73
|
* / Insert a drag handle into a row element.
|
|
@@ -77,6 +77,14 @@ export declare class SortFilterManager<T extends Record<string, any> = any> {
|
|
|
77
77
|
* mgr.sort([{ field: 'age', dir: 'asc' }]);
|
|
78
78
|
*/
|
|
79
79
|
sort(fieldOrList: string | SortItem[], dir?: 'asc' | 'desc'): void;
|
|
80
|
+
/**
|
|
81
|
+
* `sortChange` 를 모든 길에서 같은 모양으로 낸다: `field` = 방금 바뀐 컬럼, `dir` = 그 컬럼의 새 방향
|
|
82
|
+
* (그 컬럼 정렬이 풀렸으면 없음), `sortList` = 전체 정렬 목록. 바뀐 컬럼이 없으면(전체 해제) `sortList` 만.
|
|
83
|
+
* / Emits `sortChange` in one shape on every path: `field` = the column just changed, `dir` = its new
|
|
84
|
+
* direction (absent when that column's sort was cleared), `sortList` = the whole list; only `sortList`
|
|
85
|
+
* when no single column changed (everything cleared).
|
|
86
|
+
*/
|
|
87
|
+
private _emitSortChange;
|
|
80
88
|
/** 모든 정렬을 해제한다. / Clear all sorting. */
|
|
81
89
|
resetSort(): void;
|
|
82
90
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ColumnOrGroup, WorksheetState } from './types.js';
|
|
2
2
|
/** 시트 전환 시 호출되는 콜백. / Callback invoked when the active sheet switches. */
|
|
3
3
|
export type SwitchCallback<T> = (name: string, state: WorksheetState<T>) => void;
|
|
4
4
|
/** i18n: 탭 UI aria 해석기(주입 없으면 전역 t). / i18n: tab-UI aria resolver (global t when not injected). */
|
|
@@ -29,7 +29,7 @@ export declare class WorksheetManager<T extends Record<string, any> = any> {
|
|
|
29
29
|
* @param columns - 시트 컬럼 정의(기본 빈 배열) / Sheet column definitions (default empty array)
|
|
30
30
|
* @param data - 시트 초기 데이터(기본 빈 배열) / Initial sheet data (default empty array)
|
|
31
31
|
*/
|
|
32
|
-
add(name: string, columns?:
|
|
32
|
+
add(name: string, columns?: ColumnOrGroup<T>[], data?: T[]): void;
|
|
33
33
|
/**
|
|
34
34
|
* 시트를 제거한다. / Remove a sheet.
|
|
35
35
|
*
|
|
@@ -1,63 +1,364 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* 지금 그리드가 어떤 상태로 키를 받는지. `nav`=셀 사이 이동, `edit`=셀 편집 중, `selectExtend`=범위 넓히기.
|
|
3
|
+
*
|
|
4
|
+
* What state the grid is in when it receives a key. `nav` = moving between cells, `edit` = editing a cell, `selectExtend` = extending a range.
|
|
5
|
+
*
|
|
6
|
+
* グリッドがいまどの状態でキーを受けているか。`nav`=セル間の移動、`edit`=セル編集中、`selectExtend`=範囲の拡張。
|
|
7
|
+
*
|
|
8
|
+
* 表格当前以什么状态接收按键。`nav`=在单元格之间移动,`edit`=正在编辑单元格,`selectExtend`=扩展范围。
|
|
9
|
+
*/
|
|
2
10
|
export type InteractionMode = 'nav' | 'edit' | 'selectExtend';
|
|
3
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* 키 입력 한 번. DOM 의 `KeyboardEvent` 를 몰라도 되게 필요한 것만 담았다. `KeyboardEvent` 에서 만들 때는 `strokeFromEvent(e)` 를 쓴다.
|
|
13
|
+
*
|
|
14
|
+
* One key press, holding only what is needed so the model does not depend on the DOM `KeyboardEvent`. Build it from a `KeyboardEvent` with `strokeFromEvent(e)`.
|
|
15
|
+
*
|
|
16
|
+
* キー入力 1 回。DOM の `KeyboardEvent` を知らなくてよいよう、必要なものだけを持ちます。`KeyboardEvent` から作るときは `strokeFromEvent(e)` を使います。
|
|
17
|
+
*
|
|
18
|
+
* 一次按键。只包含需要的内容,使模型不依赖 DOM 的 `KeyboardEvent`。从 `KeyboardEvent` 构造时请用 `strokeFromEvent(e)`。
|
|
19
|
+
*/
|
|
4
20
|
export interface KeyStroke {
|
|
5
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* 눌린 키 이름(`KeyboardEvent.key` 와 같다). 예: 'ArrowDown'·'Enter'·'F2'·'a'.
|
|
23
|
+
*
|
|
24
|
+
* The key name (same as `KeyboardEvent.key`), e.g. 'ArrowDown', 'Enter', 'F2', 'a'.
|
|
25
|
+
*
|
|
26
|
+
* 押されたキーの名前(`KeyboardEvent.key` と同じ)。例: 'ArrowDown'・'Enter'・'F2'・'a'。
|
|
27
|
+
*
|
|
28
|
+
* 按下的键名(与 `KeyboardEvent.key` 相同)。例如 'ArrowDown'、'Enter'、'F2'、'a'。
|
|
29
|
+
*/
|
|
6
30
|
readonly key: string;
|
|
7
31
|
readonly ctrl: boolean;
|
|
8
32
|
readonly shift: boolean;
|
|
9
33
|
readonly alt: boolean;
|
|
10
34
|
readonly meta: boolean;
|
|
11
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* 한글·일본어 입력기로 글자를 조합하는 중인지. 조합 중의 Enter 는 확정용이라 명령으로 보내지 않는다.
|
|
37
|
+
*
|
|
38
|
+
* Whether an IME (Korean, Japanese, …) is still composing. Enter during composition confirms the text, so it is not routed to a command.
|
|
39
|
+
*
|
|
40
|
+
* IME で文字を組み立てている最中かどうか。組み立て中の Enter は確定用なので、コマンドには送りません。
|
|
41
|
+
*
|
|
42
|
+
* 是否正在用输入法组字。组字中的 Enter 用于确认文字,因此不会转给命令。
|
|
43
|
+
*/
|
|
12
44
|
readonly isComposing: boolean;
|
|
13
45
|
}
|
|
14
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* 단축키 하나: 어떤 모드에서 어떤 키를 누르면 어떤 명령을 뜻하는지.
|
|
48
|
+
*
|
|
49
|
+
* One shortcut: in which mode, which key, means which command.
|
|
50
|
+
*
|
|
51
|
+
* ショートカット 1 つ: どのモードでどのキーを押すと、どのコマンドを意味するか。
|
|
52
|
+
*
|
|
53
|
+
* 一个快捷键:在哪种模式下按哪个键,表示哪个命令。
|
|
54
|
+
*/
|
|
15
55
|
export interface KeyBinding {
|
|
56
|
+
/**
|
|
57
|
+
* 이 단축키가 먹는 모드. `'*'` 면 모든 모드.
|
|
58
|
+
*
|
|
59
|
+
* The mode this shortcut applies in; `'*'` for every mode.
|
|
60
|
+
*
|
|
61
|
+
* このショートカットが効くモード。`'*'` ならすべてのモード。
|
|
62
|
+
*
|
|
63
|
+
* 该快捷键生效的模式;`'*'` 表示所有模式。
|
|
64
|
+
*/
|
|
16
65
|
readonly mode: InteractionMode | '*';
|
|
17
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* 키 모양. 예: 'Ctrl+C'·'ArrowDown'·'Shift+ArrowDown'. 수정자 순서·대소문자는 상관없다.
|
|
68
|
+
*
|
|
69
|
+
* The key pattern, e.g. 'Ctrl+C', 'ArrowDown', 'Shift+ArrowDown'. Modifier order and case do not matter.
|
|
70
|
+
*
|
|
71
|
+
* キーの形。例: 'Ctrl+C'・'ArrowDown'・'Shift+ArrowDown'。修飾キーの順番や大文字小文字は問いません。
|
|
72
|
+
*
|
|
73
|
+
* 按键的形式,例如 'Ctrl+C'、'ArrowDown'、'Shift+ArrowDown'。修饰键顺序和大小写无关。
|
|
74
|
+
*/
|
|
18
75
|
readonly pattern: string;
|
|
19
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* 이 키가 뜻하는 명령 이름. 모델은 이름만 돌려주고, 실제 동작은 호출하는 쪽이 한다.
|
|
78
|
+
*
|
|
79
|
+
* The name of the command this key means. The model only returns the name; the caller performs the action.
|
|
80
|
+
*
|
|
81
|
+
* このキーが意味するコマンドの名前。モデルは名前を返すだけで、実際の動作は呼び出し側が行います。
|
|
82
|
+
*
|
|
83
|
+
* 该键表示的命令名称。模型只返回名称,实际动作由调用方执行。
|
|
84
|
+
*/
|
|
20
85
|
readonly commandId: string;
|
|
21
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* 도움말에 보일 설명(메시지 키 또는 글).
|
|
88
|
+
*
|
|
89
|
+
* A description to show in help (a message key or text).
|
|
90
|
+
*
|
|
91
|
+
* ヘルプに表示する説明(メッセージキーまたは文)。
|
|
92
|
+
*
|
|
93
|
+
* 显示在帮助中的说明(消息键或文字)。
|
|
94
|
+
*/
|
|
22
95
|
readonly label?: string;
|
|
23
96
|
}
|
|
24
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* 키 모양 글을 한 가지 표기로 맞춘다(수정자 순서 Ctrl+Alt+Shift+Meta, 키는 소문자). 두 표기가 같은 키인지 비교할 때 쓴다.
|
|
99
|
+
*
|
|
100
|
+
* Normalizes a key-pattern string to one spelling (modifiers in Ctrl+Alt+Shift+Meta order, key in lower case). Use it to compare whether two spellings mean the same key.
|
|
101
|
+
*
|
|
102
|
+
* キーの形の文字列を一つの表記にそろえます(修飾キーは Ctrl+Alt+Shift+Meta の順、キーは小文字)。二つの表記が同じキーかを比べるときに使います。
|
|
103
|
+
*
|
|
104
|
+
* 把按键形式的字符串统一成一种写法(修饰键按 Ctrl+Alt+Shift+Meta 顺序,键为小写)。用于比较两种写法是否是同一个键。
|
|
105
|
+
*
|
|
106
|
+
* @param pattern - 키 모양 글(예: `shift+ctrl+c`)
|
|
107
|
+
*
|
|
108
|
+
* Key-pattern string (e.g. `shift+ctrl+c`)
|
|
109
|
+
*
|
|
110
|
+
* キーの形の文字列(例: `shift+ctrl+c`)
|
|
111
|
+
*
|
|
112
|
+
* 按键形式字符串(例如 `shift+ctrl+c`)
|
|
113
|
+
*
|
|
114
|
+
* @returns 맞춘 글(예: `Ctrl+Shift+c`)
|
|
115
|
+
*
|
|
116
|
+
* The normalized string (e.g. `Ctrl+Shift+c`)
|
|
117
|
+
*
|
|
118
|
+
* そろえた文字列(例: `Ctrl+Shift+c`)
|
|
119
|
+
*
|
|
120
|
+
* 统一后的字符串(例如 `Ctrl+Shift+c`)
|
|
121
|
+
*/
|
|
25
122
|
export declare function normalizePattern(pattern: string): string;
|
|
26
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* 키 입력 한 번을 `normalizePattern` 과 같은 표기로 바꾼다.
|
|
125
|
+
*
|
|
126
|
+
* Converts one key press into the same spelling `normalizePattern` produces.
|
|
127
|
+
*
|
|
128
|
+
* キー入力 1 回を `normalizePattern` と同じ表記に変えます。
|
|
129
|
+
*
|
|
130
|
+
* 把一次按键转换成与 `normalizePattern` 相同的写法。
|
|
131
|
+
*
|
|
132
|
+
* @param k - 키 입력
|
|
133
|
+
*
|
|
134
|
+
* The key press
|
|
135
|
+
*
|
|
136
|
+
* キー入力
|
|
137
|
+
*
|
|
138
|
+
* 按键
|
|
139
|
+
*
|
|
140
|
+
* @returns 맞춘 글
|
|
141
|
+
*
|
|
142
|
+
* The normalized string
|
|
143
|
+
*
|
|
144
|
+
* そろえた文字列
|
|
145
|
+
*
|
|
146
|
+
* 统一后的字符串
|
|
147
|
+
*/
|
|
27
148
|
export declare function strokeToPattern(k: KeyStroke): string;
|
|
28
149
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
150
|
+
* `strokeFromEvent` 가 받는 키 이벤트 모양. DOM `KeyboardEvent` 가 그대로 맞는다.
|
|
151
|
+
*
|
|
152
|
+
* The key-event shape `strokeFromEvent` accepts; a DOM `KeyboardEvent` fits as is.
|
|
153
|
+
*
|
|
154
|
+
* `strokeFromEvent` が受け取るキーイベントの形。DOM の `KeyboardEvent` がそのまま当てはまります。
|
|
155
|
+
*
|
|
156
|
+
* `strokeFromEvent` 接收的按键事件形状;DOM 的 `KeyboardEvent` 可直接使用。
|
|
157
|
+
*/
|
|
158
|
+
export interface KeyEventLike {
|
|
159
|
+
readonly key: string;
|
|
160
|
+
readonly ctrlKey: boolean;
|
|
161
|
+
readonly shiftKey: boolean;
|
|
162
|
+
readonly altKey: boolean;
|
|
163
|
+
readonly metaKey: boolean;
|
|
164
|
+
readonly isComposing?: boolean;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* 키보드 이벤트(`KeyboardEvent`)를 모델이 받는 `KeyStroke` 로 바꾼다.
|
|
168
|
+
*
|
|
169
|
+
* Converts a keyboard event (`KeyboardEvent`) into the `KeyStroke` the model takes.
|
|
170
|
+
*
|
|
171
|
+
* キーボードイベント(`KeyboardEvent`)を、モデルが受け取る `KeyStroke` に変えます。
|
|
172
|
+
*
|
|
173
|
+
* 把键盘事件(`KeyboardEvent`)转换成模型接收的 `KeyStroke`。
|
|
174
|
+
*
|
|
175
|
+
* @param e - 키보드 이벤트
|
|
176
|
+
*
|
|
177
|
+
* The keyboard event
|
|
178
|
+
*
|
|
179
|
+
* キーボードイベント
|
|
180
|
+
*
|
|
181
|
+
* 键盘事件
|
|
182
|
+
*
|
|
183
|
+
* @returns 키 입력
|
|
184
|
+
*
|
|
185
|
+
* The key press
|
|
186
|
+
*
|
|
187
|
+
* キー入力
|
|
188
|
+
*
|
|
189
|
+
* 按键
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* gridHost.addEventListener('keydown', (e) => {
|
|
193
|
+
* const command = keys.resolve(keys.mode(), strokeFromEvent(e));
|
|
194
|
+
* if (command) run(command);
|
|
195
|
+
* });
|
|
196
|
+
*/
|
|
197
|
+
export declare function strokeFromEvent(e: KeyEventLike): KeyStroke;
|
|
198
|
+
/**
|
|
199
|
+
* 단축키 표. 키 입력을 받아 그 키가 뜻하는 명령 이름을 돌려준다(모드별 단축키·모든 모드 단축키·IME 조합 중 Enter 무시).
|
|
200
|
+
* 마우스로 할 수 있는 명령을 선언해 두면 키보드로 못 하는 명령이 무엇인지도 알려 준다.
|
|
201
|
+
*
|
|
202
|
+
* A shortcut table. Given a key press it returns the name of the command that key means (per-mode shortcuts, all-mode shortcuts, Enter ignored while an IME is composing).
|
|
203
|
+
* If you declare the commands reachable by mouse, it also tells you which ones have no keyboard way.
|
|
204
|
+
*
|
|
205
|
+
* ショートカット表。キー入力を受け取り、そのキーが意味するコマンド名を返します(モード別ショートカット・全モード共通ショートカット・IME 組み立て中の Enter は無視)。
|
|
206
|
+
* マウスでできるコマンドを宣言しておけば、キーボードでできないコマンドが何かも教えてくれます。
|
|
207
|
+
*
|
|
208
|
+
* 快捷键表。接收按键并返回该键表示的命令名称(按模式的快捷键、所有模式通用的快捷键、输入法组字中的 Enter 会被忽略)。
|
|
209
|
+
* 如果声明了鼠标可以执行的命令,它还会告诉你哪些命令无法用键盘完成。
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* const keys = new KeyboardInteractionModel();
|
|
213
|
+
* keys.register({ mode: 'nav', pattern: 'S', commandId: 'sort' });
|
|
214
|
+
* keys.register({ mode: '*', pattern: 'Ctrl+C', commandId: 'copy' });
|
|
215
|
+
* keys.resolve('nav', strokeFromEvent(event)); // 'sort' | 'copy' | null
|
|
31
216
|
*/
|
|
32
217
|
export declare class KeyboardInteractionModel {
|
|
33
218
|
/** 저장 키 = `${mode}|${normalizedPattern}`. / Storage key = `${mode}|${normalizedPattern}`. */
|
|
34
219
|
private _bindings;
|
|
35
|
-
/** 마우스로
|
|
220
|
+
/** 마우스로 할 수 있다고 알린 명령들(parityReport 의 전체 수). / Commands declared as mouse-reachable (the total in parityReport). */
|
|
36
221
|
private _mouseCommands;
|
|
37
222
|
private _mode;
|
|
38
|
-
/**
|
|
223
|
+
/**
|
|
224
|
+
* 단축키를 등록한다. 같은 모드·같은 키가 이미 있으면 덮어쓰지 않고 그 기존 것을 `conflict` 로 돌려준다.
|
|
225
|
+
*
|
|
226
|
+
* Registers a shortcut. If the same mode and key already exist it does not overwrite; it returns the existing one as `conflict`.
|
|
227
|
+
*
|
|
228
|
+
* ショートカットを登録します。同じモード・同じキーがすでにあれば上書きせず、その既存のものを `conflict` として返します。
|
|
229
|
+
*
|
|
230
|
+
* 注册快捷键。如果已有相同模式、相同键,不会覆盖,而是把已有的作为 `conflict` 返回。
|
|
231
|
+
*
|
|
232
|
+
* @param b - 단축키
|
|
233
|
+
*
|
|
234
|
+
* The shortcut
|
|
235
|
+
*
|
|
236
|
+
* ショートカット
|
|
237
|
+
*
|
|
238
|
+
* 快捷键
|
|
239
|
+
*
|
|
240
|
+
* @returns 충돌이 없으면 `{}`, 있으면 `{ conflict }`
|
|
241
|
+
*
|
|
242
|
+
* `{}` when there is no conflict, otherwise `{ conflict }`
|
|
243
|
+
*
|
|
244
|
+
* 衝突がなければ `{}`、あれば `{ conflict }`
|
|
245
|
+
*
|
|
246
|
+
* 没有冲突时为 `{}`,否则为 `{ conflict }`
|
|
247
|
+
*/
|
|
39
248
|
register(b: KeyBinding): {
|
|
40
249
|
conflict?: KeyBinding;
|
|
41
250
|
};
|
|
42
|
-
/**
|
|
251
|
+
/**
|
|
252
|
+
* 마우스로 할 수 있는 명령을 알려 둔다. `parityReport()` 가 키보드로 못 하는 명령을 찾을 때 이 목록과 비교한다.
|
|
253
|
+
*
|
|
254
|
+
* Declares a command that can be done with the mouse. `parityReport()` compares against this list to find commands with no keyboard way.
|
|
255
|
+
*
|
|
256
|
+
* マウスでできるコマンドを知らせておきます。`parityReport()` はキーボードでできないコマンドを探すとき、この一覧と比べます。
|
|
257
|
+
*
|
|
258
|
+
* 声明一个可以用鼠标执行的命令。`parityReport()` 查找无法用键盘完成的命令时会与这个列表比较。
|
|
259
|
+
*
|
|
260
|
+
* @param commandId - 명령 이름
|
|
261
|
+
*
|
|
262
|
+
* Command name
|
|
263
|
+
*
|
|
264
|
+
* コマンド名
|
|
265
|
+
*
|
|
266
|
+
* 命令名称
|
|
267
|
+
*/
|
|
43
268
|
declareMouseCommand(commandId: string): void;
|
|
44
269
|
/**
|
|
45
|
-
* 키
|
|
46
|
-
*
|
|
270
|
+
* 키 입력이 뜻하는 명령 이름을 찾는다. 그 모드 전용 단축키를 먼저 보고, 없으면 모든 모드(`'*'`) 단축키를 본다. IME 조합 중의 Enter 는 `null`.
|
|
271
|
+
*
|
|
272
|
+
* Finds the command a key press means. It checks shortcuts for that mode first, then all-mode (`'*'`) shortcuts. Enter while an IME is composing gives `null`.
|
|
273
|
+
*
|
|
274
|
+
* キー入力が意味するコマンド名を探します。そのモード専用のショートカットを先に見て、なければ全モード(`'*'`)のショートカットを見ます。IME 組み立て中の Enter は `null`。
|
|
275
|
+
*
|
|
276
|
+
* 查找按键表示的命令名称。先看该模式专用的快捷键,没有再看所有模式(`'*'`)的快捷键。输入法组字中的 Enter 返回 `null`。
|
|
277
|
+
*
|
|
278
|
+
* @param mode - 지금 모드
|
|
279
|
+
*
|
|
280
|
+
* The current mode
|
|
281
|
+
*
|
|
282
|
+
* 現在のモード
|
|
283
|
+
*
|
|
284
|
+
* 当前模式
|
|
285
|
+
*
|
|
286
|
+
* @param k - 키 입력(`strokeFromEvent(e)` 로 만든다)
|
|
287
|
+
*
|
|
288
|
+
* The key press (build it with `strokeFromEvent(e)`)
|
|
289
|
+
*
|
|
290
|
+
* キー入力(`strokeFromEvent(e)` で作ります)
|
|
291
|
+
*
|
|
292
|
+
* 按键(用 `strokeFromEvent(e)` 构造)
|
|
293
|
+
*
|
|
294
|
+
* @returns 명령 이름, 없으면 `null`
|
|
295
|
+
*
|
|
296
|
+
* The command name, or `null`
|
|
297
|
+
*
|
|
298
|
+
* コマンド名、なければ `null`
|
|
299
|
+
*
|
|
300
|
+
* 命令名称,没有则为 `null`
|
|
47
301
|
*/
|
|
48
302
|
resolve(mode: InteractionMode, k: KeyStroke): string | null;
|
|
303
|
+
/**
|
|
304
|
+
* 지금 모드를 돌려준다.
|
|
305
|
+
*
|
|
306
|
+
* Returns the current mode.
|
|
307
|
+
*
|
|
308
|
+
* 現在のモードを返します。
|
|
309
|
+
*
|
|
310
|
+
* 返回当前模式。
|
|
311
|
+
*/
|
|
49
312
|
mode(): InteractionMode;
|
|
313
|
+
/**
|
|
314
|
+
* 모드를 바꾼다(예: 편집을 시작하면 `edit`).
|
|
315
|
+
*
|
|
316
|
+
* Changes the mode (e.g. `edit` when editing starts).
|
|
317
|
+
*
|
|
318
|
+
* モードを変えます(例: 編集を始めたら `edit`)。
|
|
319
|
+
*
|
|
320
|
+
* 切换模式(例如开始编辑时设为 `edit`)。
|
|
321
|
+
*
|
|
322
|
+
* @param m - 새 모드
|
|
323
|
+
*
|
|
324
|
+
* The new mode
|
|
325
|
+
*
|
|
326
|
+
* 新しいモード
|
|
327
|
+
*
|
|
328
|
+
* 新模式
|
|
329
|
+
*/
|
|
50
330
|
setMode(m: InteractionMode): void;
|
|
51
331
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
332
|
+
* `declareMouseCommand` 로 알린 명령 가운데 단축키가 없는 것을 알려 준다. 「마우스 없이 모든 기능을 쓸 수 있나」를 재는 데 쓴다.
|
|
333
|
+
*
|
|
334
|
+
* Reports which commands declared with `declareMouseCommand` have no shortcut — a measure of whether everything can be done without a mouse.
|
|
335
|
+
*
|
|
336
|
+
* `declareMouseCommand` で知らせたコマンドのうち、ショートカットがないものを教えます。「マウスなしですべての機能を使えるか」を測るのに使います。
|
|
337
|
+
*
|
|
338
|
+
* 报告用 `declareMouseCommand` 声明的命令中哪些没有快捷键,用来衡量「不用鼠标能否使用全部功能」。
|
|
339
|
+
*
|
|
340
|
+
* @returns `mouseOnly`=단축키 없는 명령, `covered`/`total`=단축키 있는 수/전체 수
|
|
341
|
+
*
|
|
342
|
+
* `mouseOnly` = commands without a shortcut; `covered`/`total` = count with a shortcut / all
|
|
343
|
+
*
|
|
344
|
+
* `mouseOnly`=ショートカットのないコマンド、`covered`/`total`=ショートカットのある数/全体の数
|
|
345
|
+
*
|
|
346
|
+
* `mouseOnly`=没有快捷键的命令;`covered`/`total`=有快捷键的数量/总数
|
|
54
347
|
*/
|
|
55
348
|
parityReport(): {
|
|
56
349
|
mouseOnly: string[];
|
|
57
350
|
covered: number;
|
|
58
351
|
total: number;
|
|
59
352
|
};
|
|
60
|
-
/**
|
|
353
|
+
/**
|
|
354
|
+
* 등록된 단축키 수.
|
|
355
|
+
*
|
|
356
|
+
* Number of registered shortcuts.
|
|
357
|
+
*
|
|
358
|
+
* 登録されたショートカットの数。
|
|
359
|
+
*
|
|
360
|
+
* 已注册的快捷键数量。
|
|
361
|
+
*/
|
|
61
362
|
size(): number;
|
|
62
363
|
private _guardIme;
|
|
63
364
|
private _storeKey;
|