open-grid 1.6.0 → 1.7.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 +62 -0
- package/dist/ExportProgressView-9Kt1SQxv.js +48 -0
- package/dist/ExportProgressView-B59uHIwt.cjs +48 -0
- package/dist/LcpMergeOrderer-BdUtV67j.js +114 -0
- package/dist/LcpMergeOrderer-C_ANVkGk.cjs +113 -0
- package/dist/OpenGrid-BUYQs1_w.cjs +9806 -0
- package/dist/OpenGrid-BmagF0yo.js +9819 -0
- package/dist/XlsxChannel-DOeHeP7h.cjs +95 -0
- package/dist/XlsxChannel-DdaiytFR.js +95 -0
- package/dist/XlsxWorkbookWriter-BTNtZ80J.js +199 -0
- package/dist/XlsxWorkbookWriter-_u5stfg4.cjs +198 -0
- package/dist/{index-Brnev66-.js → index-B9_g5Eg3.js} +2 -2
- package/dist/{index-B_e5BXnW.cjs → index-CnyumyPV.cjs} +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/sinks-BWkWQexV.js +149 -0
- package/dist/sinks-DPK0VxYG.cjs +143 -0
- package/dist/types/a11y/index.d.ts +37 -0
- package/dist/types/core/CFRenderBridge.d.ts +5 -1
- package/dist/types/core/CellEditManager.d.ts +26 -2
- package/dist/types/core/CellEventHandler.d.ts +6 -2
- package/dist/types/core/ColumnLayout.d.ts +11 -3
- package/dist/types/core/DataLayer.d.ts +48 -1
- package/dist/types/core/DetailManager.d.ts +43 -2
- package/dist/types/core/ExportManager.d.ts +26 -6
- package/dist/types/core/FindBarManager.d.ts +6 -2
- package/dist/types/core/FlatRowModel.d.ts +69 -3
- package/dist/types/core/FooterManager.d.ts +43 -1
- package/dist/types/core/FormulaController.d.ts +4 -4
- package/dist/types/core/GridComposer.d.ts +11 -1
- package/dist/types/core/GridRenderer.d.ts +84 -19
- package/dist/types/core/GroupTreeManager.d.ts +6 -4
- package/dist/types/core/KeyboardManager.d.ts +3 -2
- package/dist/types/core/MergeEngine.d.ts +45 -5
- package/dist/types/core/MutationService.d.ts +14 -17
- package/dist/types/core/OpenGrid.d.ts +350 -12
- package/dist/types/core/OrgChart.d.ts +24 -0
- package/dist/types/core/RangeSelectionManager.d.ts +23 -2
- package/dist/types/core/RenderController.d.ts +126 -8
- package/dist/types/core/RowDragDrop.d.ts +2 -0
- package/dist/types/core/SortFilterManager.d.ts +18 -2
- package/dist/types/core/VirtualScroll.d.ts +12 -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/coordinate/CellTextPolicy.d.ts +58 -0
- package/dist/types/core/coordinate/ColumnGeometry.d.ts +60 -0
- package/dist/types/core/coordinate/ColumnWindow.d.ts +40 -0
- package/dist/types/core/coordinate/ColumnWindowPolicy.d.ts +89 -0
- package/dist/types/core/coordinate/ExtraColumns.d.ts +39 -0
- package/dist/types/core/coordinate/RangeRectCalculator.d.ts +35 -0
- package/dist/types/core/coordinate/ViewportHeightJudge.d.ts +28 -0
- package/dist/types/core/coordinate/geometryPorts.d.ts +250 -0
- package/dist/types/core/coordinate/ports.d.ts +5 -0
- package/dist/types/core/domain/footer/FooterValues.d.ts +50 -0
- package/dist/types/core/domain/footer/ports.d.ts +31 -0
- package/dist/types/core/domain/render/RenderPlanner.d.ts +17 -0
- package/dist/types/core/domain/render/RenderRequest.d.ts +91 -0
- package/dist/types/core/domain/render/ports.d.ts +169 -0
- package/dist/types/core/domain/resize/ResizeGesture.d.ts +25 -0
- package/dist/types/core/domain/resize/ResizeHitZone.d.ts +23 -0
- package/dist/types/core/domain/resize/ports.d.ts +64 -0
- package/dist/types/core/domain/sort/ComparisonOrderer.d.ts +11 -0
- package/dist/types/core/domain/sort/LcpMergeOrderer.d.ts +15 -0
- package/dist/types/core/domain/sort/RankIndex.d.ts +74 -0
- package/dist/types/core/domain/sort/SortCostEstimate.d.ts +36 -0
- package/dist/types/core/domain/sort/SortKeyColumn.d.ts +89 -0
- package/dist/types/core/domain/sort/SortKeyStore.d.ts +34 -0
- package/dist/types/core/domain/sort/Sorter.d.ts +54 -0
- package/dist/types/core/domain/sort/SyncSortRunner.d.ts +9 -0
- package/dist/types/core/domain/sort/commonPrefix.d.ts +5 -0
- package/dist/types/core/domain/sort/ports.d.ts +140 -0
- package/dist/types/core/export/ExportProgressView.d.ts +28 -0
- package/dist/types/core/export/channels/XlsxChannel.d.ts +29 -0
- package/dist/types/core/export/channels/XlsxWorkbookWriter.d.ts +17 -0
- package/dist/types/core/export/index.d.ts +2 -0
- package/dist/types/core/export/sinks.d.ts +81 -0
- package/dist/types/core/host/archCheck.d.ts +16 -1
- package/dist/types/core/i18n/locales/en.d.ts +6 -0
- package/dist/types/core/i18n/locales/ko.d.ts +6 -0
- package/dist/types/core/i18n/types.d.ts +8 -0
- package/dist/types/core/render/FooterView.d.ts +121 -0
- package/dist/types/core/render/GeometryApplier.d.ts +55 -0
- package/dist/types/core/render/HorizontalReveal.d.ts +26 -0
- package/dist/types/core/render/RangeOverlayAdapter.d.ts +10 -0
- package/dist/types/core/render/RenderScheduler.d.ts +225 -0
- package/dist/types/core/render/ResizeSinkAdapter.d.ts +35 -0
- package/dist/types/core/render/ScrollFollower.d.ts +34 -0
- package/dist/types/core/render/ScrollObserver.d.ts +47 -0
- package/dist/types/core/render/ScrollbarGutter.d.ts +19 -0
- package/dist/types/core/render/body/BodyEventRouter.d.ts +58 -0
- package/dist/types/core/render/body/BodyRowSet.d.ts +28 -0
- package/dist/types/core/render/body/BodyView.d.ts +185 -0
- package/dist/types/core/render/body/CellLocator.d.ts +36 -0
- package/dist/types/core/render/body/CellRegistry.d.ts +24 -0
- package/dist/types/core/render/body/ColumnPaintPlan.d.ts +19 -0
- package/dist/types/core/render/body/ExtraCellPainters.d.ts +20 -0
- package/dist/types/core/render/body/rows/BodyRowContext.d.ts +138 -0
- package/dist/types/core/render/body/rows/DataRowPainter.d.ts +58 -0
- package/dist/types/core/render/body/rows/DetailRowPainter.d.ts +24 -0
- package/dist/types/core/render/body/rows/GroupRowPainter.d.ts +32 -0
- package/dist/types/core/render/body/rows/RowPainterTable.d.ts +24 -0
- package/dist/types/core/render/body/rows/WindowLayout.d.ts +38 -0
- package/dist/types/core/render/dom.d.ts +10 -0
- package/dist/types/core/render/header/HeaderSortIndicator.d.ts +39 -0
- package/dist/types/core/render/header/HeaderView.d.ts +84 -0
- package/dist/types/core/render/header/ResizeHandleBinder.d.ts +110 -0
- package/dist/types/core/render/ports.d.ts +218 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +7 -0
- package/dist/types/core/types.d.ts +572 -22
- package/dist/types/index.d.ts +31 -1
- package/dist/types/vue/OpenGrid.vue.d.ts +2 -2
- package/package.json +8 -9
- package/dist/OpenGrid-DgZtbVD0.cjs +0 -7390
- package/dist/OpenGrid-E11B7Xa7.js +0 -7403
|
@@ -1,47 +1,178 @@
|
|
|
1
1
|
import { MessageParams } from '../i18n/types.js';
|
|
2
2
|
import { IAriaRenderPort, LiveChannel } from './ports.js';
|
|
3
3
|
/**
|
|
4
|
-
* 공지
|
|
5
|
-
*
|
|
4
|
+
* 화면 낭독기에 알릴 공지 한 건. 글 자체가 아니라 메시지 키와 값으로 주면, 컨트롤러가 겹친 공지를 합치고 순서를 정해 한 번에 읽힌다.
|
|
5
|
+
*
|
|
6
|
+
* One announcement for screen readers. Give a message key and values rather than the text itself; the controller merges overlapping announcements, orders them and has them read once.
|
|
7
|
+
*
|
|
8
|
+
* スクリーンリーダーに知らせるお知らせ 1 件。文そのものではなくメッセージキーと値で渡すと、コントローラーが重なったお知らせをまとめ、順番を決めて一度に読ませます。
|
|
9
|
+
*
|
|
10
|
+
* 要告知屏幕阅读器的一条通知。不是直接给文字,而是给消息键和值;控制器会合并重叠的通知、排好顺序后一次性朗读。
|
|
6
11
|
*/
|
|
7
12
|
export interface Announcement {
|
|
8
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* `polite`=지금 읽는 것이 끝난 뒤 읽는다, `assertive`=곧바로 끼어들어 읽는다(오류 등).
|
|
15
|
+
*
|
|
16
|
+
* `polite` = read after the current speech; `assertive` = interrupt and read at once (errors, etc.).
|
|
17
|
+
*
|
|
18
|
+
* `polite`=いま読んでいるものが終わってから読む、`assertive`=すぐ割り込んで読む(エラーなど)。
|
|
19
|
+
*
|
|
20
|
+
* `polite`=等当前朗读结束后再读;`assertive`=立即插入朗读(错误等)。
|
|
21
|
+
*/
|
|
9
22
|
readonly channel: LiveChannel;
|
|
10
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* 우선순위. 같은 채널에서 여러 건이 한꺼번에 나갈 때 큰 값을 먼저 읽는다(예: 오류 > 편집 완료 > 선택).
|
|
25
|
+
*
|
|
26
|
+
* Priority. When several go out together on one channel, higher values are read first (e.g. error > edit done > selection).
|
|
27
|
+
*
|
|
28
|
+
* 優先度。同じチャンネルで複数件が一度に出るとき、大きい値から先に読みます(例: エラー > 編集完了 > 選択)。
|
|
29
|
+
*
|
|
30
|
+
* 优先级。同一通道上有多条同时发出时,值大的先读(例如 错误 > 编辑完成 > 选择)。
|
|
31
|
+
*/
|
|
11
32
|
readonly priority: number;
|
|
12
33
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
34
|
+
* 합치기 키. 같은 키로 잇달아 들어온 공지는 마지막 한 건만 읽는다(예: 'sort'·'selection'). 정렬을 빠르게 여러 번 바꿔도 마지막 상태만 한 번 읽힌다.
|
|
35
|
+
*
|
|
36
|
+
* Merge key. Announcements arriving in a row with the same key are read only once, as the latest (e.g. 'sort', 'selection'). Changing the sort quickly several times reads only the final state once.
|
|
37
|
+
*
|
|
38
|
+
* まとめキー。同じキーで続けて入ったお知らせは最後の 1 件だけを読みます(例: 'sort'・'selection')。並べ替えを素早く何度変えても、最後の状態だけが一度読まれます。
|
|
39
|
+
*
|
|
40
|
+
* 合并键。以同一键连续到来的通知只读最后一条(例如 'sort'、'selection')。即使快速多次改变排序,也只读一次最终状态。
|
|
16
41
|
*/
|
|
17
42
|
readonly mergeKey: string;
|
|
18
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* 메시지 키. 컨트롤러가 `t` 옵션으로 글로 바꾼다(`t` 를 안 주면 키를 그대로 읽는다).
|
|
45
|
+
*
|
|
46
|
+
* Message key. The controller turns it into text with the `t` option (without `t`, the key itself is read).
|
|
47
|
+
*
|
|
48
|
+
* メッセージキー。コントローラーが `t` オプションで文に変えます(`t` を渡さなければキーをそのまま読みます)。
|
|
49
|
+
*
|
|
50
|
+
* 消息键。控制器用 `t` 选项把它变成文字(不传 `t` 则直接朗读键本身)。
|
|
51
|
+
*/
|
|
19
52
|
readonly messageKey: string;
|
|
20
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* 메시지에 끼울 값(예: `{ field: '이름' }`).
|
|
55
|
+
*
|
|
56
|
+
* Values to fill into the message (e.g. `{ field: 'Name' }`).
|
|
57
|
+
*
|
|
58
|
+
* メッセージに差し込む値(例: `{ field: '名前' }`)。
|
|
59
|
+
*
|
|
60
|
+
* 要填入消息的值(例如 `{ field: '名称' }`)。
|
|
61
|
+
*/
|
|
21
62
|
readonly params?: MessageParams;
|
|
22
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* 사용자가 한 일이 아닌 바탕 변경(실시간 갱신 등)이면 `true`. 사용자가 편집 중일 때(`setUserBusy(true)`)는 미뤄 두었다가 끝나면 읽는다.
|
|
65
|
+
*
|
|
66
|
+
* `true` for a background change the user did not make (live updates, etc.). While the user is busy (`setUserBusy(true)`) it is held and read afterwards.
|
|
67
|
+
*
|
|
68
|
+
* 利用者の操作ではない裏側の変更(リアルタイム更新など)なら `true`。利用者が編集中(`setUserBusy(true)`)は保留し、終わってから読みます。
|
|
69
|
+
*
|
|
70
|
+
* 如果是非用户操作的后台变化(实时更新等)则为 `true`。用户正在编辑时(`setUserBusy(true)`)会暂缓,结束后再读。
|
|
71
|
+
*/
|
|
23
72
|
readonly background?: boolean;
|
|
24
73
|
}
|
|
25
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* `schedule` 옵션이 돌려주는 타이머 손잡이(`setTimeout` 의 반환값과 같은 역할).
|
|
76
|
+
*
|
|
77
|
+
* The timer handle the `schedule` option returns (the same role as `setTimeout`'s return value).
|
|
78
|
+
*
|
|
79
|
+
* `schedule` オプションが返すタイマーのハンドル(`setTimeout` の戻り値と同じ役割)。
|
|
80
|
+
*
|
|
81
|
+
* `schedule` 选项返回的定时器句柄(作用与 `setTimeout` 的返回值相同)。
|
|
82
|
+
*/
|
|
26
83
|
export type TimerHandle = unknown;
|
|
27
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* `LiveRegionController` 설정. `render` 만 필수다.
|
|
86
|
+
*
|
|
87
|
+
* `LiveRegionController` settings. Only `render` is required.
|
|
88
|
+
*
|
|
89
|
+
* `LiveRegionController` の設定。必須は `render` だけです。
|
|
90
|
+
*
|
|
91
|
+
* `LiveRegionController` 的设置。只有 `render` 是必需的。
|
|
92
|
+
*/
|
|
28
93
|
export interface LiveRegionControllerOpts {
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
94
|
+
/**
|
|
95
|
+
* 공지를 실제로 화면(aria-live 영역)에 적는 곳. `announce(channel, text)` 하나만 있으면 된다.
|
|
96
|
+
*
|
|
97
|
+
* Where announcements are actually written to the page (an aria-live region). Only `announce(channel, text)` is needed.
|
|
98
|
+
*
|
|
99
|
+
* お知らせを実際に画面(aria-live 領域)へ書く場所。`announce(channel, text)` が一つあれば足ります。
|
|
100
|
+
*
|
|
101
|
+
* 把通知实际写到页面(aria-live 区域)的地方。只需要一个 `announce(channel, text)`。
|
|
102
|
+
*/
|
|
103
|
+
readonly render: Pick<IAriaRenderPort, 'announce'>;
|
|
104
|
+
/**
|
|
105
|
+
* 메시지 키를 글로 바꾸는 함수. 주지 않으면 키를 그대로 쓴다.
|
|
106
|
+
*
|
|
107
|
+
* Turns a message key into text. Without it the key is used as is.
|
|
108
|
+
*
|
|
109
|
+
* メッセージキーを文に変える関数。渡さなければキーをそのまま使います。
|
|
110
|
+
*
|
|
111
|
+
* 把消息键变成文字的函数。不传则直接使用键。
|
|
112
|
+
*/
|
|
32
113
|
readonly t?: (key: string, params?: MessageParams) => string;
|
|
33
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* `polite` 공지를 모았다가 읽기까지 기다리는 시간(ms). 기본 150.
|
|
116
|
+
*
|
|
117
|
+
* How long `polite` announcements are collected before being read (ms). Default 150.
|
|
118
|
+
*
|
|
119
|
+
* `polite` のお知らせを集めてから読むまで待つ時間(ms)。既定 150。
|
|
120
|
+
*
|
|
121
|
+
* 收集 `polite` 通知后等待朗读的时间(毫秒)。默认 150。
|
|
122
|
+
*/
|
|
34
123
|
readonly debounceMs?: number;
|
|
35
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* `assertive` 공지를 기다리지 않고 곧바로 읽을지. 기본 `true`.
|
|
126
|
+
*
|
|
127
|
+
* Whether `assertive` announcements are read at once without waiting. Default `true`.
|
|
128
|
+
*
|
|
129
|
+
* `assertive` のお知らせを待たずにすぐ読むかどうか。既定 `true`。
|
|
130
|
+
*
|
|
131
|
+
* 是否不等待立即朗读 `assertive` 通知。默认 `true`。
|
|
132
|
+
*/
|
|
36
133
|
readonly assertiveImmediate?: boolean;
|
|
37
|
-
/**
|
|
134
|
+
/**
|
|
135
|
+
* 타이머 걸기(기본 `setTimeout`). 테스트에서 시간을 직접 돌릴 때 바꿔 끼운다.
|
|
136
|
+
*
|
|
137
|
+
* Schedules a timer (default `setTimeout`). Swap it in tests to drive time yourself.
|
|
138
|
+
*
|
|
139
|
+
* タイマーを掛ける(既定 `setTimeout`)。テストで時間を自分で進めるときに差し替えます。
|
|
140
|
+
*
|
|
141
|
+
* 设置定时器(默认 `setTimeout`)。在测试中自己推进时间时替换它。
|
|
142
|
+
*/
|
|
38
143
|
readonly schedule?: (fn: () => void, ms: number) => TimerHandle;
|
|
39
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* 타이머 취소(기본 `clearTimeout`).
|
|
146
|
+
*
|
|
147
|
+
* Cancels a timer (default `clearTimeout`).
|
|
148
|
+
*
|
|
149
|
+
* タイマーの取り消し(既定 `clearTimeout`)。
|
|
150
|
+
*
|
|
151
|
+
* 取消定时器(默认 `clearTimeout`)。
|
|
152
|
+
*/
|
|
40
153
|
readonly cancel?: (h: TimerHandle) => void;
|
|
41
154
|
}
|
|
42
155
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
156
|
+
* 화면 낭독기 공지를 한곳에서 관리한다. 여러 곳에서 공지를 넣어도 같은 종류는 마지막 것만, 중요한 것부터, 잠깐 모았다가 한 번에 읽힌다.
|
|
157
|
+
* 그래서 정렬을 빠르게 바꾸거나 값이 쏟아져도 낭독기가 같은 말을 되풀이하지 않는다.
|
|
158
|
+
*
|
|
159
|
+
* Manages screen-reader announcements in one place. However many places enqueue, only the latest of each kind is read, most important first, after a short wait.
|
|
160
|
+
* So rapid sort changes or a flood of updates do not make the screen reader repeat itself.
|
|
161
|
+
*
|
|
162
|
+
* スクリーンリーダーへのお知らせを一か所で管理します。何か所からお知らせを入れても、同じ種類は最後のものだけを、重要なものから、少しまとめてから一度に読ませます。
|
|
163
|
+
* そのため、並べ替えを素早く変えたり値が次々に変わったりしても、スクリーンリーダーが同じことを繰り返しません。
|
|
164
|
+
*
|
|
165
|
+
* 在一处管理屏幕阅读器的通知。无论从多少处放入通知,同类只读最后一条,从重要的开始,稍作收集后一次朗读。
|
|
166
|
+
* 因此即使快速改变排序或数值大量涌入,屏幕阅读器也不会重复同样的话。
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* const politeEl = document.getElementById('live-polite')!; // <div aria-live="polite">
|
|
170
|
+
* const alertEl = document.getElementById('live-assertive')!; // <div aria-live="assertive">
|
|
171
|
+
* const live = new LiveRegionController({
|
|
172
|
+
* render: { announce: (channel, text) => { (channel === 'assertive' ? alertEl : politeEl).textContent = text; } },
|
|
173
|
+
* t: (key, params) => myMessages(key, params), // 번역 함수가 없으면 이 줄을 빼고 messageKey 에 문장을 그대로 넣어도 된다
|
|
174
|
+
* });
|
|
175
|
+
* grid.on('sortChange', (e) => live.enqueue({ channel: 'polite', priority: 1, mergeKey: 'sort', messageKey: 'sorted', params: { field: e.field } }));
|
|
45
176
|
*/
|
|
46
177
|
export declare class LiveRegionController {
|
|
47
178
|
private readonly _render;
|
|
@@ -62,23 +193,94 @@ export declare class LiveRegionController {
|
|
|
62
193
|
private _dropped;
|
|
63
194
|
constructor(opts: LiveRegionControllerOpts);
|
|
64
195
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
196
|
+
* 공지를 넣는다. 곧바로 읽지 않고 잠깐 모은다(`assertive` 는 곧바로). 같은 `mergeKey` 가 기다리고 있으면 새 것으로 바꾼다.
|
|
197
|
+
*
|
|
198
|
+
* Enqueues an announcement. It is not read at once but collected briefly (`assertive` is read at once). If one with the same `mergeKey` is waiting, it is replaced by the new one.
|
|
199
|
+
*
|
|
200
|
+
* お知らせを入れます。すぐには読まず少しまとめます(`assertive` はすぐ)。同じ `mergeKey` が待っていれば新しいものに置き換えます。
|
|
201
|
+
*
|
|
202
|
+
* 放入通知。不会立即朗读,而是稍作收集(`assertive` 立即读)。如果有相同 `mergeKey` 的通知在等待,就换成新的。
|
|
203
|
+
*
|
|
204
|
+
* @param a - 공지
|
|
205
|
+
*
|
|
206
|
+
* The announcement
|
|
207
|
+
*
|
|
208
|
+
* お知らせ
|
|
209
|
+
*
|
|
210
|
+
* 通知
|
|
67
211
|
*/
|
|
68
212
|
enqueue(a: Announcement): void;
|
|
69
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* 사용자가 편집 중인지 알린다. `true` 인 동안 바탕 변경 공지(`background: true`)는 미뤄 두고, `false` 로 돌아오면 모아 둔 것을 읽는다.
|
|
215
|
+
*
|
|
216
|
+
* Tells whether the user is busy editing. While `true`, background announcements (`background: true`) are held; when it goes back to `false` the held ones are read.
|
|
217
|
+
*
|
|
218
|
+
* 利用者が編集中かどうかを知らせます。`true` の間は裏側の変更のお知らせ(`background: true`)を保留し、`false` に戻るとためておいたものを読みます。
|
|
219
|
+
*
|
|
220
|
+
* 告知用户是否正在编辑。为 `true` 期间,后台变化通知(`background: true`)会暂缓;回到 `false` 时朗读暂存的通知。
|
|
221
|
+
*
|
|
222
|
+
* @param busy - 편집 중이면 `true`
|
|
223
|
+
*
|
|
224
|
+
* `true` while editing
|
|
225
|
+
*
|
|
226
|
+
* 編集中なら `true`
|
|
227
|
+
*
|
|
228
|
+
* 编辑中为 `true`
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* grid.on('editStart', () => live.setUserBusy(true));
|
|
232
|
+
* grid.on('editEnd', () => live.setUserBusy(false));
|
|
233
|
+
*/
|
|
70
234
|
setUserBusy(busy: boolean): void;
|
|
71
235
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
236
|
+
* 기다리던 공지를 버린다(예: 알릴 대상이 사라졌을 때).
|
|
237
|
+
*
|
|
238
|
+
* Discards a waiting announcement (e.g. when what it was about is gone).
|
|
239
|
+
*
|
|
240
|
+
* 待っていたお知らせを捨てます(例: 知らせる対象がなくなったとき)。
|
|
241
|
+
*
|
|
242
|
+
* 丢弃正在等待的通知(例如要告知的对象已经消失时)。
|
|
243
|
+
*
|
|
244
|
+
* @param mergeKey - 버릴 공지의 합치기 키
|
|
245
|
+
*
|
|
246
|
+
* Merge key of the announcement to discard
|
|
247
|
+
*
|
|
248
|
+
* 捨てるお知らせのまとめキー
|
|
249
|
+
*
|
|
250
|
+
* 要丢弃的通知的合并键
|
|
74
251
|
*/
|
|
75
252
|
drop(mergeKey: string): void;
|
|
76
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* 지금까지의 수: 읽힌 수(`spoken`)·합쳐져 빠진 수(`coalesced`)·버린 수(`dropped`).
|
|
255
|
+
*
|
|
256
|
+
* Counts so far: read (`spoken`), merged away (`coalesced`), discarded (`dropped`).
|
|
257
|
+
*
|
|
258
|
+
* これまでの数: 読まれた数(`spoken`)・まとめられて消えた数(`coalesced`)・捨てた数(`dropped`)。
|
|
259
|
+
*
|
|
260
|
+
* 到目前为止的数量:已朗读(`spoken`)、被合并掉(`coalesced`)、已丢弃(`dropped`)。
|
|
261
|
+
*
|
|
262
|
+
* @returns 세 가지 수
|
|
263
|
+
*
|
|
264
|
+
* The three counts
|
|
265
|
+
*
|
|
266
|
+
* 三つの数
|
|
267
|
+
*
|
|
268
|
+
* 三个数量
|
|
269
|
+
*/
|
|
77
270
|
metrics(): {
|
|
78
271
|
spoken: number;
|
|
79
272
|
coalesced: number;
|
|
80
273
|
dropped: number;
|
|
81
274
|
};
|
|
275
|
+
/**
|
|
276
|
+
* 정리한다: 기다리던 공지와 타이머를 버리고, 이후 `enqueue` 는 무시한다.
|
|
277
|
+
*
|
|
278
|
+
* Cleans up: discards waiting announcements and the timer; later `enqueue` calls are ignored.
|
|
279
|
+
*
|
|
280
|
+
* 後片付けをします: 待っていたお知らせとタイマーを捨て、その後の `enqueue` は無視します。
|
|
281
|
+
*
|
|
282
|
+
* 清理:丢弃等待中的通知和定时器,之后的 `enqueue` 会被忽略。
|
|
283
|
+
*/
|
|
82
284
|
dispose(): void;
|
|
83
285
|
private _scheduleFlush;
|
|
84
286
|
/** 디바운스 만료 flush — 채널별 우선순위 정렬 → mergeKey 최신 1건씩 발화. / Debounced flush. */
|
|
@@ -1,37 +1,222 @@
|
|
|
1
1
|
import { RegisterOptions, RegisterResult } from '../extension/Registry.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* 그림(스파크라인·데이터바·증감 화살표 등) 한 종류를 말로 바꾸는 방법. `describe` 가 그림의 값을 받아 낭독할 글을 돌려준다.
|
|
4
|
+
*
|
|
5
|
+
* How to put one kind of picture (sparkline, data bar, up/down arrow, …) into words. `describe` takes the picture's values and returns the text to read.
|
|
6
|
+
*
|
|
7
|
+
* 絵(スパークライン・データバー・増減の矢印など)一種類を言葉に変える方法。`describe` が絵の値を受け取り、読み上げる文を返します。
|
|
8
|
+
*
|
|
9
|
+
* 把一种图形(迷你折线、数据条、增减箭头等)转换成文字的方法。`describe` 接收图形的值并返回要朗读的文字。
|
|
7
10
|
*/
|
|
8
11
|
export interface VisualEquivProvider<M = unknown> {
|
|
9
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* 그림 종류 이름(예: 'sparkline'·'delta').
|
|
14
|
+
*
|
|
15
|
+
* The picture kind (e.g. 'sparkline', 'delta').
|
|
16
|
+
*
|
|
17
|
+
* 絵の種類の名前(例: 'sparkline'・'delta')。
|
|
18
|
+
*
|
|
19
|
+
* 图形种类名称(例如 'sparkline'、'delta')。
|
|
20
|
+
*/
|
|
10
21
|
readonly kind: string;
|
|
11
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* 그림의 값을 받아 낭독할 글을 돌려준다.
|
|
24
|
+
*
|
|
25
|
+
* Takes the picture's values and returns the text to read.
|
|
26
|
+
*
|
|
27
|
+
* 絵の値を受け取り、読み上げる文を返します。
|
|
28
|
+
*
|
|
29
|
+
* 接收图形的值并返回要朗读的文字。
|
|
30
|
+
*/
|
|
12
31
|
describe(model: M): string;
|
|
13
32
|
}
|
|
14
33
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
34
|
+
* 그림을 말로 바꾸는 방법(`VisualEquivProvider`)을 종류별로 모아 둔다. 등록 안 된 종류를 읽으려 하면 빈 글을 돌려주고 경고로 알려 준다 — 그림 셀이 낭독에서 빠지는 것을 조용히 넘기지 않게.
|
|
35
|
+
* 셀에 붙이려면 컬럼의 `ariaLabel` 에서 `describe` 를 부른다.
|
|
36
|
+
*
|
|
37
|
+
* Collects, per kind, the ways to put pictures into words (`VisualEquivProvider`). Reading a kind that is not registered returns empty text and raises a warning, so a picture cell missing from speech is not passed over silently.
|
|
38
|
+
* To attach it to cells, call `describe` from the column's `ariaLabel`.
|
|
39
|
+
*
|
|
40
|
+
* 絵を言葉に変える方法(`VisualEquivProvider`)を種類ごとにまとめておきます。登録されていない種類を読もうとすると空の文を返し、警告で知らせます — 絵のセルが読み上げから抜けるのを黙って見過ごさないように。
|
|
41
|
+
* セルに付けるには、列の `ariaLabel` から `describe` を呼びます。
|
|
42
|
+
*
|
|
43
|
+
* 按种类收集把图形转换成文字的方法(`VisualEquivProvider`)。试图朗读未注册的种类时返回空文字并发出警告 — 以免图形单元格从朗读中漏掉却无人察觉。
|
|
44
|
+
* 要用到单元格上,请在列的 `ariaLabel` 中调用 `describe`。
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* const equiv = new VisualEquivRegistry(console.warn);
|
|
48
|
+
* equiv.register({ kind: 'sparkline', describe: (s: number[]) => `최근 ${s.length}개월, 마지막 값 ${s[s.length - 1]}` });
|
|
49
|
+
* columns: [{ field: 'trend', header: '추세', ariaLabel: (v) => equiv.describe('sparkline', v) }]
|
|
17
50
|
*/
|
|
18
51
|
export declare class VisualEquivRegistry {
|
|
19
52
|
private readonly _reg;
|
|
20
53
|
private readonly _onWarn;
|
|
54
|
+
/**
|
|
55
|
+
* 등록소를 만든다.
|
|
56
|
+
*
|
|
57
|
+
* Creates the registry.
|
|
58
|
+
*
|
|
59
|
+
* 登録所を作ります。
|
|
60
|
+
*
|
|
61
|
+
* 创建注册表。
|
|
62
|
+
*
|
|
63
|
+
* @param onWarn - 경고를 받을 함수(예: `console.warn`). 주지 않으면 경고를 버린다.
|
|
64
|
+
*
|
|
65
|
+
* Receives warnings (e.g. `console.warn`). Without it warnings are dropped.
|
|
66
|
+
*
|
|
67
|
+
* 警告を受け取る関数(例: `console.warn`)。渡さなければ警告は捨てます。
|
|
68
|
+
*
|
|
69
|
+
* 接收警告的函数(例如 `console.warn`)。不传则丢弃警告。
|
|
70
|
+
*/
|
|
21
71
|
constructor(onWarn?: (msg: string) => void);
|
|
22
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* 그림 한 종류를 말로 바꾸는 방법을 등록한다. 예외를 던지지 않고 결과로 알려 준다.
|
|
74
|
+
*
|
|
75
|
+
* Registers how to put one picture kind into words. It never throws; the outcome is in the result.
|
|
76
|
+
*
|
|
77
|
+
* 絵一種類を言葉に変える方法を登録します。例外は投げず、結果で知らせます。
|
|
78
|
+
*
|
|
79
|
+
* 注册把一种图形转换成文字的方法。不会抛出异常,结果通过返回值告知。
|
|
80
|
+
*
|
|
81
|
+
* @param provider - 등록할 방법
|
|
82
|
+
*
|
|
83
|
+
* The provider to register
|
|
84
|
+
*
|
|
85
|
+
* 登録する方法
|
|
86
|
+
*
|
|
87
|
+
* 要注册的方法
|
|
88
|
+
*
|
|
89
|
+
* @param opts - 등록 규칙(같은 종류가 있을 때 등)
|
|
90
|
+
*
|
|
91
|
+
* Registration rules (e.g. when the kind already exists)
|
|
92
|
+
*
|
|
93
|
+
* 登録の規則(同じ種類があるときなど)
|
|
94
|
+
*
|
|
95
|
+
* 注册规则(例如已存在同一种类时)
|
|
96
|
+
*
|
|
97
|
+
* @returns 등록 결과
|
|
98
|
+
*
|
|
99
|
+
* The registration result
|
|
100
|
+
*
|
|
101
|
+
* 登録の結果
|
|
102
|
+
*
|
|
103
|
+
* 注册结果
|
|
104
|
+
*/
|
|
23
105
|
register(provider: VisualEquivProvider, opts?: RegisterOptions): RegisterResult;
|
|
24
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* 그 종류가 등록돼 있는지.
|
|
108
|
+
*
|
|
109
|
+
* Whether the kind is registered.
|
|
110
|
+
*
|
|
111
|
+
* その種類が登録されているかどうか。
|
|
112
|
+
*
|
|
113
|
+
* 该种类是否已注册。
|
|
114
|
+
*
|
|
115
|
+
* @param kind - 그림 종류 이름
|
|
116
|
+
*
|
|
117
|
+
* Picture kind
|
|
118
|
+
*
|
|
119
|
+
* 絵の種類の名前
|
|
120
|
+
*
|
|
121
|
+
* 图形种类名称
|
|
122
|
+
*/
|
|
25
123
|
has(kind: string): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* 그 종류의 방법을 돌려준다(없으면 `undefined`).
|
|
126
|
+
*
|
|
127
|
+
* Returns the provider for the kind (`undefined` if none).
|
|
128
|
+
*
|
|
129
|
+
* その種類の方法を返します(なければ `undefined`)。
|
|
130
|
+
*
|
|
131
|
+
* 返回该种类的方法(没有则为 `undefined`)。
|
|
132
|
+
*
|
|
133
|
+
* @param kind - 그림 종류 이름
|
|
134
|
+
*
|
|
135
|
+
* Picture kind
|
|
136
|
+
*
|
|
137
|
+
* 絵の種類の名前
|
|
138
|
+
*
|
|
139
|
+
* 图形种类名称
|
|
140
|
+
*/
|
|
26
141
|
get(kind: string): VisualEquivProvider | undefined;
|
|
27
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* 등록된 종류 이름들.
|
|
144
|
+
*
|
|
145
|
+
* Names of the registered kinds.
|
|
146
|
+
*
|
|
147
|
+
* 登録されている種類の名前。
|
|
148
|
+
*
|
|
149
|
+
* 已注册的种类名称。
|
|
150
|
+
*/
|
|
28
151
|
list(): string[];
|
|
29
152
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
153
|
+
* 그림의 값을 낭독할 글로 바꾼다. 등록 안 된 종류면 빈 글을 돌려주고 `onWarn` 으로 알린다(예외는 던지지 않는다).
|
|
154
|
+
*
|
|
155
|
+
* Turns a picture's values into text to read. For an unregistered kind it returns empty text and reports through `onWarn` (it never throws).
|
|
156
|
+
*
|
|
157
|
+
* 絵の値を読み上げる文に変えます。登録されていない種類なら空の文を返し、`onWarn` で知らせます(例外は投げません)。
|
|
158
|
+
*
|
|
159
|
+
* 把图形的值转换成要朗读的文字。未注册的种类返回空文字并通过 `onWarn` 告知(不会抛出异常)。
|
|
160
|
+
*
|
|
161
|
+
* @param kind - 그림 종류 이름
|
|
162
|
+
*
|
|
163
|
+
* Picture kind
|
|
164
|
+
*
|
|
165
|
+
* 絵の種類の名前
|
|
166
|
+
*
|
|
167
|
+
* 图形种类名称
|
|
168
|
+
*
|
|
169
|
+
* @param model - 그림의 값
|
|
170
|
+
*
|
|
171
|
+
* The picture's values
|
|
172
|
+
*
|
|
173
|
+
* 絵の値
|
|
174
|
+
*
|
|
175
|
+
* 图形的值
|
|
176
|
+
*
|
|
177
|
+
* @returns 낭독할 글
|
|
178
|
+
*
|
|
179
|
+
* The text to read
|
|
180
|
+
*
|
|
181
|
+
* 読み上げる文
|
|
182
|
+
*
|
|
183
|
+
* 要朗读的文字
|
|
32
184
|
*/
|
|
33
185
|
describe(kind: string, model: unknown): string;
|
|
34
|
-
/**
|
|
186
|
+
/**
|
|
187
|
+
* 한 플러그인이 등록한 것을 한꺼번에 뺀다.
|
|
188
|
+
*
|
|
189
|
+
* Removes everything one plugin registered.
|
|
190
|
+
*
|
|
191
|
+
* 一つのプラグインが登録したものをまとめて外します。
|
|
192
|
+
*
|
|
193
|
+
* 一次性移除某个插件注册的全部内容。
|
|
194
|
+
*
|
|
195
|
+
* @param pluginId - 플러그인 이름
|
|
196
|
+
*
|
|
197
|
+
* Plugin id
|
|
198
|
+
*
|
|
199
|
+
* プラグイン名
|
|
200
|
+
*
|
|
201
|
+
* 插件名
|
|
202
|
+
*
|
|
203
|
+
* @returns 뺀 수
|
|
204
|
+
*
|
|
205
|
+
* How many were removed
|
|
206
|
+
*
|
|
207
|
+
* 外した数
|
|
208
|
+
*
|
|
209
|
+
* 移除的数量
|
|
210
|
+
*/
|
|
35
211
|
disposePlugin(pluginId: string): number;
|
|
212
|
+
/**
|
|
213
|
+
* 등록소를 비우고 정리한다.
|
|
214
|
+
*
|
|
215
|
+
* Empties and cleans up the registry.
|
|
216
|
+
*
|
|
217
|
+
* 登録所を空にして後片付けします。
|
|
218
|
+
*
|
|
219
|
+
* 清空并清理注册表。
|
|
220
|
+
*/
|
|
36
221
|
dispose(): void;
|
|
37
222
|
}
|
|
@@ -8,6 +8,16 @@ export declare const TEXTURE_OPACITY_CAP = 0.1;
|
|
|
8
8
|
* named 값은 relayout 을 요구하지 않는다(질감은 배경 페인트만 — 좌표 불변).
|
|
9
9
|
* / TextureRegistry — the 3rd texture axis. The registration gate clamps texture-opacity to ≤0.1.
|
|
10
10
|
*
|
|
11
|
+
* 새 질감을 등록할 때: `--og-texture-bg` 는 **필수**다 — 빠뜨리면 질감을 켠 그리드의 크롬에서
|
|
12
|
+
* `background-image` 가 none 이 되어 테마가 머리글에 깐 그림(예: stitch 능직)까지 지워진다(칠 규칙이
|
|
13
|
+
* !important 이기 때문). 잉크는 `rgba(var(--og-texture-ink, 0, 0, 0), a)` 처럼 **폴백을 함께** 적는다 —
|
|
14
|
+
* 잉크를 정의하지 않은 테마에서 폴백 없는 참조는 무효 값이 되어 아무것도 칠해지지 않는다. 결의 세기는
|
|
15
|
+
* 잉크 알파로 정한다(`--og-texture-opacity` 는 그 상한 검사값이지 칠하는 데 쓰지 않는다).
|
|
16
|
+
* / When registering a texture: `--og-texture-bg` is required (missing it blanks the chrome's
|
|
17
|
+
* background-image, wiping theme header patterns, because the paint rule is !important). Write the ink
|
|
18
|
+
* with a fallback, `rgba(var(--og-texture-ink, 0, 0, 0), a)`; strength comes from that alpha
|
|
19
|
+
* (`--og-texture-opacity` is only the cap checked at registration).
|
|
20
|
+
*
|
|
11
21
|
* @example
|
|
12
22
|
* textureRegistry.resolve('linen'); // { tokens:{'--og-texture-bg':…,'--og-texture-opacity':'0.06',…}, attr:{name:'data-og-texture',value:'linen'} }
|
|
13
23
|
* textureRegistry.resolve('default'); // { tokens:{} } — byte-identical
|