open-grid 1.3.1 → 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 +28 -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 +269 -33
- package/dist/types/core/GridShuttle.d.ts +160 -24
- package/dist/types/core/IconRegistry.d.ts +241 -33
- package/dist/types/core/OpenGrid.d.ts +2589 -327
- package/dist/types/core/OrgChart.d.ts +249 -32
- package/dist/types/core/SkinRegistry.d.ts +295 -60
- package/dist/types/core/XmlConverter.d.ts +388 -47
- package/dist/types/core/chart/types.d.ts +1008 -126
- 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 +271 -54
- package/dist/types/core/i18n/types.d.ts +636 -85
- package/dist/types/core/types.d.ts +3576 -426
- package/dist/types/index.d.ts +226 -17
- package/package.json +3 -1
- package/dist/index-DrCPRuYi.js +0 -548
|
@@ -1,101 +1,389 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* 등록 출처. 같은 키가 겹칠 때 어느 쪽을 남길지 정하는 1차 기준이며, og 코어를 보호하는 근거가 된다.
|
|
3
|
+
*
|
|
4
|
+
* Entry origin. The primary factor in deciding which registration wins on a key collision, and the basis for protecting the og core.
|
|
5
|
+
*
|
|
6
|
+
* 登録元。同じキーが重複したときにどちらを残すかを決める第一の基準であり、ogコアを保護する根拠にもなります。
|
|
7
|
+
*
|
|
8
|
+
* 注册来源。是判定同一键发生冲突时保留哪一方的首要依据,也是保护og内核的根据。
|
|
9
|
+
*/
|
|
2
10
|
export type EntryOrigin = 'builtin' | 'plugin' | 'user';
|
|
3
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* 폐기 정보. API를 없애기 전에 미리 알리기 위한 값으로, 버전·대체값·안내문을 담는다.
|
|
13
|
+
*
|
|
14
|
+
* Deprecation info. Carries the version, replacement, and note used to warn callers before an API is removed.
|
|
15
|
+
*
|
|
16
|
+
* 廃止情報。APIを削除する前にあらかじめ知らせるための値で、バージョン・代替値・案内文を保持します。
|
|
17
|
+
*
|
|
18
|
+
* 废弃信息。用于在移除API之前提前告知调用方,包含版本、替代方案及说明。
|
|
19
|
+
*/
|
|
4
20
|
export interface DeprecationInfo {
|
|
5
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* 폐기가 시작된 버전.
|
|
23
|
+
*
|
|
24
|
+
* Version where the deprecation was marked.
|
|
25
|
+
*
|
|
26
|
+
* 廃止が開始されたバージョン。
|
|
27
|
+
*
|
|
28
|
+
* 标记为废弃的版本。
|
|
29
|
+
*/
|
|
6
30
|
readonly since: string;
|
|
7
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* 제거 예정 버전. 이 버전이 되기 전에는 실제로 제거되지 않도록 게이트가 막는다.
|
|
33
|
+
*
|
|
34
|
+
* Planned removal version. A gate blocks removal before this version is reached.
|
|
35
|
+
*
|
|
36
|
+
* 削除予定バージョン。このバージョンに達する前は実際には削除されないよう、ゲートが防ぎます。
|
|
37
|
+
*
|
|
38
|
+
* 计划移除的版本。在到达该版本之前,有关卡阻止实际移除。
|
|
39
|
+
*/
|
|
8
40
|
readonly removeIn: string;
|
|
9
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* 대체할 API 또는 키.
|
|
43
|
+
*
|
|
44
|
+
* Replacement API or key.
|
|
45
|
+
*
|
|
46
|
+
* 代替となるAPIまたはキー。
|
|
47
|
+
*
|
|
48
|
+
* 替代的API或键。
|
|
49
|
+
*/
|
|
10
50
|
readonly replacement?: string;
|
|
11
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* 추가 설명.
|
|
53
|
+
*
|
|
54
|
+
* Extra note.
|
|
55
|
+
*
|
|
56
|
+
* 補足説明。
|
|
57
|
+
*
|
|
58
|
+
* 补充说明。
|
|
59
|
+
*/
|
|
12
60
|
readonly note?: string;
|
|
13
61
|
}
|
|
14
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* 등록할 때 함께 선언하는 정책 정보. 충돌·순서·폐기 같은 규칙을 코드가 아니라 데이터로 표현한다.
|
|
64
|
+
*
|
|
65
|
+
* Policy metadata declared at registration time. Rules like conflict handling, ordering, and deprecation are expressed as data rather than code.
|
|
66
|
+
*
|
|
67
|
+
* 登録時に併せて宣言するポリシー情報です。衝突・順序・廃止といったルールをコードではなくデータとして表現します。
|
|
68
|
+
*
|
|
69
|
+
* 注册时一并声明的策略信息。冲突、顺序、废弃等规则以数据而非代码的形式表达。
|
|
70
|
+
*/
|
|
15
71
|
export interface RegisterOptions {
|
|
16
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* 등록 출처. 기본값은 'user'이며, 'builtin'은 코어 부트스트랩에서만 사용한다.
|
|
74
|
+
*
|
|
75
|
+
* Entry origin. Defaults to 'user'; 'builtin' is reserved for core bootstrap.
|
|
76
|
+
*
|
|
77
|
+
* 登録元。デフォルトは'user'で、'builtin'はコアのブートストラップでのみ使用します。
|
|
78
|
+
*
|
|
79
|
+
* 注册来源。默认值为'user','builtin'仅供内核启动阶段使用。
|
|
80
|
+
*/
|
|
17
81
|
origin?: EntryOrigin;
|
|
18
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* 보호된(내장) 키를 의도적으로 덮어쓰겠다는 명시적 표시. 기본값은 false.
|
|
84
|
+
*
|
|
85
|
+
* Explicit intent to override a protected (built-in) key. Defaults to false.
|
|
86
|
+
*
|
|
87
|
+
* 保護された(組み込みの)キーを意図的に上書きするという明示的な表示です。デフォルトはfalse。
|
|
88
|
+
*
|
|
89
|
+
* 明确表示有意覆盖受保护的(内置)键。默认值为false。
|
|
90
|
+
*/
|
|
19
91
|
override?: boolean;
|
|
20
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* 이 등록을 소유한 플러그인 ID. og:* 예약 네임스페이스 검사, 매니페스트 추적, 일괄 해제(dispose)에 쓰인다.
|
|
94
|
+
*
|
|
95
|
+
* Plugin ID that owns this registration. Used for og:* reserved-namespace checks, manifest tracking, and batch dispose.
|
|
96
|
+
*
|
|
97
|
+
* この登録を所有するプラグインID。og:*予約名前空間の検査、マニフェスト追跡、一括解除(dispose)に使われます。
|
|
98
|
+
*
|
|
99
|
+
* 拥有此注册的插件ID。用于og:*保留命名空间检查、清单追踪及批量解除(dispose)。
|
|
100
|
+
*/
|
|
21
101
|
pluginId?: string;
|
|
22
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* 한 대상에 여러 값이 겹쳐 적용될 때의 순서. 값이 작을수록 먼저 적용된다. 기본값은 0.
|
|
104
|
+
*
|
|
105
|
+
* Order used when multiple values apply to the same target; smaller runs first. Defaults to 0.
|
|
106
|
+
*
|
|
107
|
+
* 1つの対象に複数の値が重ねて適用されるときの順序。値が小さいほど先に適用されます。デフォルトは0。
|
|
108
|
+
*
|
|
109
|
+
* 多个值重叠应用于同一目标时的顺序。数值越小越先应用。默认值为0。
|
|
110
|
+
*/
|
|
23
111
|
priority?: number;
|
|
24
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* 이 값이 구현하는 SPI 버전. 레지스트리가 기대하는 버전과 맞는지 검증하는 데 쓰인다.
|
|
114
|
+
*
|
|
115
|
+
* SPI version this value implements. Used to verify compatibility with the registry's expected version.
|
|
116
|
+
*
|
|
117
|
+
* この値が実装するSPIバージョン。レジストリが期待するバージョンと一致するかを検証するために使われます。
|
|
118
|
+
*
|
|
119
|
+
* 此值所实现的SPI版本,用于校验是否与注册表所期望的版本兼容。
|
|
120
|
+
*/
|
|
25
121
|
spiVersion?: string;
|
|
26
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* 이 키가 폐기 예정일 때만 채워지는 정보.
|
|
124
|
+
*
|
|
125
|
+
* Present only when this key is deprecated.
|
|
126
|
+
*
|
|
127
|
+
* このキーが廃止予定のときにのみ設定される情報。
|
|
128
|
+
*
|
|
129
|
+
* 仅当此键计划废弃时才会填充的信息。
|
|
130
|
+
*/
|
|
27
131
|
deprecated?: DeprecationInfo;
|
|
28
132
|
}
|
|
29
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* 등록 1건을 정규화해 저장한 불변 기록. seq는 우선순위가 같을 때 등록 순서로 동점을 가르는 안정적인 기준이다.
|
|
135
|
+
*
|
|
136
|
+
* A normalized, immutable record of one registration. seq is the stable tiebreaker used when priorities are equal.
|
|
137
|
+
*
|
|
138
|
+
* 1件の登録を正規化して保存した不変のレコードです。seqは優先度が同じときに登録順で同点を分ける安定した基準です。
|
|
139
|
+
*
|
|
140
|
+
* 将一次注册规范化后保存的不可变记录。seq是优先级相同时按注册顺序判定胜负的稳定依据。
|
|
141
|
+
*/
|
|
30
142
|
export interface RegistryEntry<V> {
|
|
31
143
|
readonly key: string;
|
|
32
144
|
readonly value: V;
|
|
33
145
|
readonly origin: EntryOrigin;
|
|
34
146
|
readonly priority: number;
|
|
35
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* 이 레지스트리 안에서만 유효한, 계속 증가하는 등록 순번.
|
|
149
|
+
*
|
|
150
|
+
* Monotonically increasing registration sequence, local to this registry.
|
|
151
|
+
*
|
|
152
|
+
* このレジストリ内でのみ有効な、単調増加する登録連番。
|
|
153
|
+
*
|
|
154
|
+
* 仅在此注册表内有效的单调递增注册序号。
|
|
155
|
+
*/
|
|
36
156
|
readonly seq: number;
|
|
37
157
|
readonly pluginId?: string;
|
|
38
158
|
readonly spiVersion?: string;
|
|
39
159
|
readonly deprecated?: DeprecationInfo;
|
|
40
160
|
}
|
|
41
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* 등록 결과가 실제로 어떤 동작이었는지 나타내는 분류.
|
|
163
|
+
*
|
|
164
|
+
* Classifies what actually happened as a result of a registration attempt.
|
|
165
|
+
*
|
|
166
|
+
* 登録結果が実際にはどの動作だったかを表す分類。
|
|
167
|
+
*
|
|
168
|
+
* 对注册结果实际发生的动作进行分类。
|
|
169
|
+
*/
|
|
42
170
|
export type RegisterAction = 'added' | 'replaced' | 'kept' | 'rejected';
|
|
43
|
-
/**
|
|
171
|
+
/**
|
|
172
|
+
* 등록이 거부되거나 기존 값이 유지된 이유.
|
|
173
|
+
*
|
|
174
|
+
* Reason a registration was rejected or the existing value was kept.
|
|
175
|
+
*
|
|
176
|
+
* 登録が拒否された、または既存の値が維持された理由。
|
|
177
|
+
*
|
|
178
|
+
* 注册被拒绝或保留现有值的原因。
|
|
179
|
+
*/
|
|
44
180
|
export type RegisterReason = 'reserved-namespace' | 'protected-builtin' | 'invalid-key' | 'spi-mismatch' | 'disposed' | 'adapter-error';
|
|
45
|
-
/**
|
|
181
|
+
/**
|
|
182
|
+
* register() 호출의 결과. 예외를 던지지 않고, 거부되거나 경고가 발생해도 항상 값으로 알려준다(조용히 실패하지 않는다).
|
|
183
|
+
*
|
|
184
|
+
* Result of a register() call. Never throws — rejections and warnings are always reported as a returned value, never a silent failure.
|
|
185
|
+
*
|
|
186
|
+
* register()呼び出しの結果です。例外を投げることはなく、拒否や警告が発生しても常に戻り値として知らせます(サイレント失敗しません)。
|
|
187
|
+
*
|
|
188
|
+
* register()调用的结果。不抛出异常——即使发生拒绝或警告,也始终以返回值告知(不会静默失败)。
|
|
189
|
+
*/
|
|
46
190
|
export interface RegisterResult {
|
|
47
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* 지금 넘긴 값이 실제로 등록되었는지 여부(added/replaced일 때만 true).
|
|
193
|
+
*
|
|
194
|
+
* Whether the value just passed in is now registered (true only for added/replaced).
|
|
195
|
+
*
|
|
196
|
+
* 今渡した値が実際に登録されたかどうか(added/replacedのときのみtrue)。
|
|
197
|
+
*
|
|
198
|
+
* 刚传入的值是否已实际注册(仅added/replaced时为true)。
|
|
199
|
+
*/
|
|
48
200
|
readonly ok: boolean;
|
|
49
201
|
readonly action: RegisterAction;
|
|
50
202
|
readonly reason?: RegisterReason;
|
|
51
|
-
/**
|
|
203
|
+
/**
|
|
204
|
+
* 실제로 출력된 경고 메시지 원문. `[OpenGrid]` 접두사가 붙는다.
|
|
205
|
+
*
|
|
206
|
+
* The exact warning text that was emitted, prefixed with `[OpenGrid]`.
|
|
207
|
+
*
|
|
208
|
+
* 実際に出力された警告メッセージの原文。`[OpenGrid]`という接頭辞が付きます。
|
|
209
|
+
*
|
|
210
|
+
* 实际输出的警告消息原文,带有`[OpenGrid]`前缀。
|
|
211
|
+
*/
|
|
52
212
|
readonly warning?: string;
|
|
53
213
|
}
|
|
54
|
-
/**
|
|
214
|
+
/**
|
|
215
|
+
* 같은 키를 다시 등록할 때 적용할 정책.
|
|
216
|
+
*
|
|
217
|
+
* Policy applied when the same key is registered again.
|
|
218
|
+
*
|
|
219
|
+
* 同じキーを再登録するときに適用するポリシー。
|
|
220
|
+
*
|
|
221
|
+
* 重新注册同一键时应用的策略。
|
|
222
|
+
*/
|
|
55
223
|
export type DuplicatePolicy = 'last-wins' | 'explicit-override' | 'protect-builtin';
|
|
56
224
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
225
|
+
* 셀타입·포맷터·검증기·조건부 서식 규칙·차트 등 모든 확장 지점이 공유하는 단일 계약.
|
|
226
|
+
* K는 키 타입(기본 string), V는 등록되는 값의 타입이다.
|
|
227
|
+
*
|
|
228
|
+
* The single contract shared by every extension point (cell types, formatters, validators,
|
|
229
|
+
* conditional-formatting rules, charts, and more). K is the key type (default string), V is the
|
|
230
|
+
* type of the registered value.
|
|
231
|
+
*
|
|
232
|
+
* セルタイプ・フォーマッタ・バリデータ・条件付き書式ルール・チャートなど、すべての拡張ポイントが共有する単一の契約です。Kはキーの型(デフォルトはstring)、Vは登録される値の型です。
|
|
233
|
+
*
|
|
234
|
+
* 单元格类型、格式化器、验证器、条件格式规则、图表等所有扩展点共享的单一契约。K为键类型(默认string),V为注册值的类型。
|
|
59
235
|
*/
|
|
60
236
|
export interface IRegistry<V, K extends string = string> {
|
|
61
|
-
/**
|
|
237
|
+
/**
|
|
238
|
+
* 값을 등록한다. 정책(RegisterOptions)에 따라 충돌을 해소하며, 예외를 던지지 않는다.
|
|
239
|
+
*
|
|
240
|
+
* Registers a value. Conflicts are resolved according to policy (RegisterOptions); never throws.
|
|
241
|
+
*
|
|
242
|
+
* 値を登録します。ポリシー(RegisterOptions)に従って衝突を解消し、例外は投げません。
|
|
243
|
+
*
|
|
244
|
+
* 注册一个值。按照策略(RegisterOptions)解决冲突,不抛出异常。
|
|
245
|
+
*/
|
|
62
246
|
register(key: K, value: V, opts?: RegisterOptions): RegisterResult;
|
|
63
|
-
/**
|
|
247
|
+
/**
|
|
248
|
+
* 키로 값을 조회한다. 등록되어 있지 않으면 undefined를 반환한다(예외를 던지지 않는다).
|
|
249
|
+
*
|
|
250
|
+
* Looks up a value by key. Returns undefined if unregistered — never throws.
|
|
251
|
+
*
|
|
252
|
+
* キーで値を検索します。未登録の場合はundefinedを返します(例外は投げません)。
|
|
253
|
+
*
|
|
254
|
+
* 按键查找值。未注册时返回undefined(不抛出异常)。
|
|
255
|
+
*/
|
|
64
256
|
get(key: K): V | undefined;
|
|
65
|
-
/**
|
|
257
|
+
/**
|
|
258
|
+
* 키로 값을 조회하되, 등록되어 있지 않으면 fallback 값이나 개발용 플레이스홀더를 대신 반환한다.
|
|
259
|
+
*
|
|
260
|
+
* Looks up a value by key; if unregistered, returns the given fallback or a dev placeholder instead.
|
|
261
|
+
*
|
|
262
|
+
* キーで値を検索しますが、未登録の場合はfallback値、または開発用のプレースホルダーを代わりに返します。
|
|
263
|
+
*
|
|
264
|
+
* 按键查找值;未注册时改为返回给定的fallback值或开发用占位符。
|
|
265
|
+
*/
|
|
66
266
|
require(key: K, fallback?: V): V;
|
|
67
267
|
has(key: K): boolean;
|
|
68
|
-
/**
|
|
268
|
+
/**
|
|
269
|
+
* 등록된 키 전체 목록.
|
|
270
|
+
*
|
|
271
|
+
* All registered keys.
|
|
272
|
+
*
|
|
273
|
+
* 登録済みキーの一覧。
|
|
274
|
+
*
|
|
275
|
+
* 所有已注册的键。
|
|
276
|
+
*/
|
|
69
277
|
list(): K[];
|
|
70
|
-
/**
|
|
278
|
+
/**
|
|
279
|
+
* 정규화된 등록 기록 전체. 카탈로그 표시, 진단, 다중 적용 순서 계산 등에 쓴다.
|
|
280
|
+
*
|
|
281
|
+
* All normalized registration records. Used for catalogs, diagnostics, and computing multi-apply order.
|
|
282
|
+
*
|
|
283
|
+
* 正規化された登録レコードすべて。カタログ表示、診断、多重適用順序の算出などに使います。
|
|
284
|
+
*
|
|
285
|
+
* 所有规范化的注册记录,用于目录展示、诊断及计算多重应用顺序。
|
|
286
|
+
*/
|
|
71
287
|
entries(): ReadonlyArray<RegistryEntry<V>>;
|
|
72
288
|
unregister(key: K): boolean;
|
|
73
|
-
/**
|
|
289
|
+
/**
|
|
290
|
+
* 지정한 플러그인이 등록한 항목을 한번에 모두 해제한다(등록의 대칭적인 해제). 해제된 개수를 반환한다.
|
|
291
|
+
*
|
|
292
|
+
* Disposes all entries registered by the given plugin in one call (the symmetric counterpart to registration). Returns the number disposed.
|
|
293
|
+
*
|
|
294
|
+
* 指定したプラグインが登録した項目を一度にすべて解除します(登録に対応する対称的な解除)。解除した件数を返します。
|
|
295
|
+
*
|
|
296
|
+
* 一次性解除指定插件注册的所有项(与注册对称的解除操作)。返回解除的数量。
|
|
297
|
+
*/
|
|
74
298
|
disposePlugin(pluginId: string): number;
|
|
75
|
-
/**
|
|
299
|
+
/**
|
|
300
|
+
* 이 레지스트리에 등록된 모든 항목을 해제한다.
|
|
301
|
+
*
|
|
302
|
+
* Disposes everything registered in this registry.
|
|
303
|
+
*
|
|
304
|
+
* このレジストリに登録されたすべての項目を解除します。
|
|
305
|
+
*
|
|
306
|
+
* 解除此注册表中注册的所有项。
|
|
307
|
+
*/
|
|
76
308
|
dispose(): void;
|
|
77
309
|
}
|
|
78
|
-
/**
|
|
310
|
+
/**
|
|
311
|
+
* 선언된 SPI 버전이 코어 SPI와 호환되는지 확인한다(major 버전이 같으면 호환).
|
|
312
|
+
*
|
|
313
|
+
* Checks whether a declared SPI version is compatible with the core SPI (compatible when the major version matches).
|
|
314
|
+
*
|
|
315
|
+
* 宣言されたSPIバージョンがコアSPIと互換性があるかを確認します(majorバージョンが一致すれば互換)。
|
|
316
|
+
*
|
|
317
|
+
* 检查声明的SPI版本是否与内核SPI兼容(major版本相同即兼容)。
|
|
318
|
+
*/
|
|
79
319
|
export declare function spiCompatible(coreVersion: string, declared: string): boolean;
|
|
80
|
-
/**
|
|
320
|
+
/**
|
|
321
|
+
* TypedRegistry 생성 시 넘기는 설정.
|
|
322
|
+
*
|
|
323
|
+
* Configuration passed when constructing a TypedRegistry.
|
|
324
|
+
*
|
|
325
|
+
* TypedRegistry生成時に渡す設定。
|
|
326
|
+
*
|
|
327
|
+
* 构造TypedRegistry时传入的配置。
|
|
328
|
+
*/
|
|
81
329
|
export interface TypedRegistryConfig<V, K extends string = string> {
|
|
82
|
-
/**
|
|
330
|
+
/**
|
|
331
|
+
* 미등록 키를 조회할 때 대신 돌려줄 개발용 플레이스홀더 값을 만드는 함수. 레지스트리마다 다르게
|
|
332
|
+
* 줄 수 있다(예: 물음표 아이콘, "—" 포맷터).
|
|
333
|
+
*
|
|
334
|
+
* Factory that produces a dev-only placeholder value for unregistered keys. Can differ per
|
|
335
|
+
* registry (e.g. a question-mark icon, a "—" formatter).
|
|
336
|
+
*
|
|
337
|
+
* 未登録のキーを検索したときに代わりに返す、開発用プレースホルダー値を作る関数です。レジストリごとに異なるものを与えられます(例: クエスチョンマークのアイコン、「—」フォーマッタ)。
|
|
338
|
+
*
|
|
339
|
+
* 生成开发用占位符值的工厂函数,用于查找未注册键时代替返回。每个注册表可给出不同的值(例如问号图标、"—"格式化器)。
|
|
340
|
+
*/
|
|
83
341
|
placeholder?: (key: K) => V;
|
|
84
|
-
/**
|
|
342
|
+
/**
|
|
343
|
+
* 중복 키 처리 정책. 기본값은 'protect-builtin'.
|
|
344
|
+
*
|
|
345
|
+
* Duplicate-key policy. Defaults to 'protect-builtin'.
|
|
346
|
+
*
|
|
347
|
+
* 重複キーの処理ポリシー。デフォルトは'protect-builtin'。
|
|
348
|
+
*
|
|
349
|
+
* 重复键处理策略。默认值为'protect-builtin'。
|
|
350
|
+
*/
|
|
85
351
|
duplicatePolicy?: DuplicatePolicy;
|
|
86
|
-
/**
|
|
352
|
+
/**
|
|
353
|
+
* 이 레지스트리가 관리하는 SPI의 이름과 현재 버전. 등록되는 값의 버전 호환성을 검사하는 데 쓰인다.
|
|
354
|
+
*
|
|
355
|
+
* Name and current version of the SPI this registry owns. Used to check version compatibility of registered values.
|
|
356
|
+
*
|
|
357
|
+
* このレジストリが管理するSPIの名前と現在のバージョン。登録される値のバージョン互換性を検査するために使われます。
|
|
358
|
+
*
|
|
359
|
+
* 此注册表所管理的SPI名称与当前版本,用于检查注册值的版本兼容性。
|
|
360
|
+
*/
|
|
87
361
|
spi?: {
|
|
88
362
|
name: string;
|
|
89
363
|
version: string;
|
|
90
364
|
};
|
|
91
|
-
/**
|
|
365
|
+
/**
|
|
366
|
+
* 개발용 경고를 받을 함수. 테스트에서 주입할 수 있으며, 기본값은 console.warn이다.
|
|
367
|
+
*
|
|
368
|
+
* Receiver for dev warnings. Injectable in tests; defaults to console.warn.
|
|
369
|
+
*
|
|
370
|
+
* 開発用警告を受け取る関数。テストで注入でき、デフォルトはconsole.warnです。
|
|
371
|
+
*
|
|
372
|
+
* 接收开发用警告的函数。可在测试中注入,默认值为console.warn。
|
|
373
|
+
*/
|
|
92
374
|
onWarn?: (msg: string) => void;
|
|
93
375
|
}
|
|
94
376
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
377
|
+
* 키 하나에 값 하나만 두는 경우(포맷터·차트 타입 등)와, 한 대상에 여러 값을 겹쳐 적용하는 경우
|
|
378
|
+
* (조건부 서식 규칙 등)를 같은 저장소·정책 엔진으로 처리한다. 달라지는 것은 꺼내 쓰는 방식뿐이다.
|
|
379
|
+
*
|
|
380
|
+
* Handles both single-value-per-key extension points (formatters, chart types, ...) and
|
|
381
|
+
* multi-apply extension points (conditional-formatting rules, decorations, ...) with one shared
|
|
382
|
+
* storage-and-policy engine. Only how values are read back differs.
|
|
383
|
+
*
|
|
384
|
+
* キー1つに値1つだけを持つ場合(フォーマッタ・チャートタイプなど)と、1つの対象に複数の値を重ねて適用する場合(条件付き書式ルールなど)を、同じストレージ・ポリシーエンジンで処理します。異なるのは値を取り出す方法だけです。
|
|
385
|
+
*
|
|
386
|
+
* 将每个键只对应一个值的场景(格式化器、图表类型等)与一个目标可叠加应用多个值的场景(条件格式规则等),用同一套存储与策略引擎处理。不同的只是取值的方式。
|
|
99
387
|
*
|
|
100
388
|
* @example
|
|
101
389
|
* const reg = new TypedRegistry<IFormatter>({ spi: { name: 'IFormatter', version: '1' } });
|
|
@@ -111,7 +399,15 @@ export declare class TypedRegistry<V, K extends string = string> implements IReg
|
|
|
111
399
|
constructor(cfg?: TypedRegistryConfig<V, K>);
|
|
112
400
|
private _warn;
|
|
113
401
|
register(key: K, value: V, opts?: RegisterOptions): RegisterResult;
|
|
114
|
-
/**
|
|
402
|
+
/**
|
|
403
|
+
* 충돌이 발생했을 때 새 등록이 기존 값을 이길 수 있는지 판정한다. true면 교체를 허용한다.
|
|
404
|
+
*
|
|
405
|
+
* Decides whether a new registration is allowed to win over an existing one on conflict. True permits replacement.
|
|
406
|
+
*
|
|
407
|
+
* 衝突が発生したとき、新しい登録が既存の値に勝てるかどうかを判定します。trueなら置き換えを許可します。
|
|
408
|
+
*
|
|
409
|
+
* 判定发生冲突时,新注册能否胜过现有值。true表示允许替换。
|
|
410
|
+
*/
|
|
115
411
|
private _resolveConflict;
|
|
116
412
|
get(key: K): V | undefined;
|
|
117
413
|
require(key: K, fallback?: V): V;
|
|
@@ -123,20 +419,62 @@ export declare class TypedRegistry<V, K extends string = string> implements IReg
|
|
|
123
419
|
dispose(): void;
|
|
124
420
|
}
|
|
125
421
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
422
|
+
* 한 대상에 여러 확장이 겹쳐 적용될 때의 순서를 결정론적으로 정렬한다: priority 오름차순,
|
|
423
|
+
* 같으면 등록 순번(seq) 오름차순. 저장된 데이터는 그대로 두고 꺼내는 순서만 정렬한다.
|
|
424
|
+
*
|
|
425
|
+
* Deterministically orders the extensions applying to the same target: ascending priority, ties
|
|
426
|
+
* broken by registration order (seq). The underlying storage is untouched — only the read order
|
|
427
|
+
* is sorted.
|
|
129
428
|
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
429
|
+
* 1つの対象に複数の拡張が重ねて適用されるときの順序を決定論的に並べ替えます: priority昇順、同点なら登録順番(seq)の昇順。保存されているデータ自体はそのままにし、取り出す順序だけを並べ替えます。
|
|
430
|
+
*
|
|
431
|
+
* 对应用于同一目标的多个扩展的顺序进行确定性排序:按priority升序,相同则按注册序号(seq)升序。仅对取出的顺序排序,底层存储保持不变。
|
|
432
|
+
*
|
|
433
|
+
* @param reg - 대상 레지스트리.
|
|
434
|
+
*
|
|
435
|
+
* The registry to read from.
|
|
436
|
+
*
|
|
437
|
+
* 読み取り対象のレジストリ。
|
|
438
|
+
*
|
|
439
|
+
* 要读取的注册表。
|
|
440
|
+
*
|
|
441
|
+
* @returns priority, 이어서 seq 순으로 정렬된 기록(불변).
|
|
442
|
+
*
|
|
443
|
+
* Records sorted by priority then seq (immutable).
|
|
444
|
+
*
|
|
445
|
+
* priority、続いてseqの順に並べ替えられたレコード(不変)。
|
|
446
|
+
*
|
|
447
|
+
* 按priority、再按seq排序后的记录(不可变)。
|
|
132
448
|
*/
|
|
133
449
|
export declare function orderedApply<V>(reg: IRegistry<V>): ReadonlyArray<RegistryEntry<V>>;
|
|
134
450
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
451
|
+
* 순서가 모호한 등록을 찾아낸다. 같은 priority를 가진 겹침이 2건 이상이면 실제 적용 순서는
|
|
452
|
+
* 등록 순번(seq)에 의존하게 된다 — 순서가 중요한 확장이라면 priority를 명시적으로 지정해야
|
|
453
|
+
* 한다. 이런 모호한 priority 그룹을 반환한다.
|
|
454
|
+
*
|
|
455
|
+
* Finds registrations whose order is ambiguous. When two or more overlapping registrations share
|
|
456
|
+
* the same priority, the effective order falls back to registration order (seq) — extensions that
|
|
457
|
+
* care about order should set priority explicitly. Returns the priority values shared by 2 or more
|
|
458
|
+
* entries.
|
|
459
|
+
*
|
|
460
|
+
* 順序が曖昧な登録を見つけます。同じpriorityを持つ重なりが2件以上あると、実際の適用順序は登録順番(seq)に依存することになります — 順序が重要な拡張であれば、priorityを明示的に指定する必要があります。このような曖昧なpriorityのグループを返します。
|
|
461
|
+
*
|
|
462
|
+
* 查找顺序不明确的注册。当2条以上重叠注册共享同一priority时,实际应用顺序将依赖注册序号(seq)——若扩展在意顺序,应显式指定priority。返回被2条以上记录共享的priority列表。
|
|
463
|
+
*
|
|
464
|
+
* @param entries - 검사할 기록(보통 한 대상에 적용되는 부분집합).
|
|
465
|
+
*
|
|
466
|
+
* Records to inspect (typically the subset that applies to one target).
|
|
467
|
+
*
|
|
468
|
+
* 検査対象のレコード(通常は1つの対象に適用される部分集合)。
|
|
469
|
+
*
|
|
470
|
+
* 要检查的记录(通常是应用于同一目标的子集)。
|
|
471
|
+
*
|
|
472
|
+
* @returns 2건 이상이 공유하는 priority 목록. 빈 배열이면 모호성이 없다는 뜻.
|
|
473
|
+
*
|
|
474
|
+
* Priorities shared by 2 or more entries; an empty array means no ambiguity.
|
|
475
|
+
*
|
|
476
|
+
* 2件以上が共有するpriorityの一覧。空配列は曖昧さがないことを意味します。
|
|
138
477
|
*
|
|
139
|
-
*
|
|
140
|
-
* @returns 2건 이상 공유하는 priority 목록(빈 배열=모호성 없음) / Priorities shared by 2+ entries
|
|
478
|
+
* 被2条以上记录共享的priority列表;空数组表示没有歧义。
|
|
141
479
|
*/
|
|
142
480
|
export declare function detectAmbiguousOrder<V>(entries: ReadonlyArray<RegistryEntry<V>>): number[];
|
|
@@ -1,10 +1,39 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* 그리드가 자기 몫으로 남겨둔 이름 접두사입니다. 이 대역은 그리드에 내장된 기능만 쓸 수 있고,
|
|
3
|
+
* 사용자나 플러그인이 이 접두사로 등록하면 거부됩니다.
|
|
4
|
+
*
|
|
5
|
+
* The name prefixes the grid keeps for itself. Only the grid's own built-ins may use this band;
|
|
6
|
+
* registrations from your code or from plugins are rejected.
|
|
7
|
+
*
|
|
8
|
+
* グリッドが自分用に確保している名前の接頭辞です。この帯域はグリッドに組み込まれた機能だけが使え、
|
|
9
|
+
* ユーザーやプラグインがこの接頭辞で登録すると拒否されます。
|
|
10
|
+
*
|
|
11
|
+
* 表格为自身保留的名称前缀。该区段仅供表格内置功能使用,用户代码或插件以该前缀注册时会被拒绝。
|
|
12
|
+
*/
|
|
3
13
|
export declare const RESERVED_PREFIXES: readonly ["og:", "og-"];
|
|
4
14
|
/**
|
|
5
|
-
*
|
|
15
|
+
* 어떤 이름이 예약 대역에 걸리는지 미리 확인합니다. 등록이 거부당하기 전에 물어볼 때 씁니다.
|
|
16
|
+
*
|
|
17
|
+
* Checks up front whether a name falls in the reserved band — ask before a registration gets rejected.
|
|
18
|
+
*
|
|
19
|
+
* ある名前が予約帯域に掛かるかどうかを事前に確認します。登録が拒否される前に問い合わせるときに使います。
|
|
20
|
+
*
|
|
21
|
+
* 预先检查某个名称是否落在保留区段内。可在注册被拒绝之前进行判断。
|
|
22
|
+
*
|
|
23
|
+
* @param key - 검사할 이름
|
|
24
|
+
*
|
|
25
|
+
* The name to check.
|
|
26
|
+
*
|
|
27
|
+
* 検査する名前。
|
|
28
|
+
*
|
|
29
|
+
* 待检查的名称。
|
|
30
|
+
*
|
|
31
|
+
* @returns 예약 접두사로 시작하면 true
|
|
32
|
+
*
|
|
33
|
+
* true if it starts with a reserved prefix.
|
|
34
|
+
*
|
|
35
|
+
* 予約接頭辞で始まる場合は true。
|
|
6
36
|
*
|
|
7
|
-
*
|
|
8
|
-
* @returns 예약 접두사로 시작하면 true / true if it starts with a reserved prefix
|
|
37
|
+
* 若以保留前缀开头则返回 true。
|
|
9
38
|
*/
|
|
10
39
|
export declare function isReserved(key: string): boolean;
|