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
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* /
|
|
5
|
-
*
|
|
2
|
+
* 규칙이 걸리는 조건. `type` 으로 종류를 고른다: 값 비교(compare)·글자 포함(textContains)·날짜(dateOccurring)·상위 N(topN·topNpct)·평균 위아래(aboveAvg)·표준편차 띠(stdBand)·중복(duplicate)·등록한 술어(custom).
|
|
3
|
+
*
|
|
4
|
+
* The condition that fires a rule. Pick the kind with `type`: value comparison (compare), text contains (textContains), date (dateOccurring), top N (topN, topNpct), above/below average (aboveAvg), standard-deviation band (stdBand), duplicates (duplicate) or a registered predicate (custom).
|
|
5
|
+
*
|
|
6
|
+
* 規則が掛かる条件。`type` で種類を選びます: 値の比較(compare)・文字を含む(textContains)・日付(dateOccurring)・上位 N(topN・topNpct)・平均の上下(aboveAvg)・標準偏差の帯(stdBand)・重複(duplicate)・登録した述語(custom)。
|
|
7
|
+
*
|
|
8
|
+
* 触发规则的条件。用 `type` 选择种类:数值比较(compare)、包含文字(textContains)、日期(dateOccurring)、前 N 名(topN、topNpct)、高于/低于平均(aboveAvg)、标准差区间(stdBand)、重复(duplicate)、已注册的谓词(custom)。
|
|
6
9
|
*/
|
|
7
10
|
export type CFCondition = {
|
|
8
11
|
readonly type: 'compare';
|
|
@@ -40,9 +43,13 @@ export type CFCondition = {
|
|
|
40
43
|
readonly params?: Readonly<Record<string, unknown>>;
|
|
41
44
|
};
|
|
42
45
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
+
* 조건에 맞는 칸을 어떻게 보여 줄지. `kind` 로 고른다: 막대(bar)·색 단계(scale)·아이콘(icon)·작은 추세선(sparkline).
|
|
47
|
+
*
|
|
48
|
+
* How matching cells are shown. Pick with `kind`: bar, color scale (scale), icon or a small trend line (sparkline).
|
|
49
|
+
*
|
|
50
|
+
* 条件に合うセルをどう見せるか。`kind` で選びます: バー(bar)・色の段階(scale)・アイコン(icon)・小さな推移線(sparkline)。
|
|
51
|
+
*
|
|
52
|
+
* 如何显示符合条件的单元格。用 `kind` 选择:条形(bar)、色阶(scale)、图标(icon)、小型趋势线(sparkline)。
|
|
46
53
|
*/
|
|
47
54
|
export type CFEncodeSpec = {
|
|
48
55
|
readonly kind: 'bar';
|
|
@@ -71,22 +78,62 @@ export type CFEncodeSpec = {
|
|
|
71
78
|
readonly chart?: 'bar' | 'line' | 'area';
|
|
72
79
|
readonly normalize?: 'row' | 'column';
|
|
73
80
|
};
|
|
74
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* 규칙을 걸 칸의 범위 — 컬럼 하나(필수)와, 필요하면 행 범위·행 상태.
|
|
83
|
+
*
|
|
84
|
+
* Which cells the rule applies to — one column (required) and optionally a row range or row state.
|
|
85
|
+
*
|
|
86
|
+
* 規則を掛けるセルの範囲 — 列 1 つ(必須)と、必要なら行の範囲・行の状態。
|
|
87
|
+
*
|
|
88
|
+
* 规则作用的单元格范围 — 一列(必需),需要时再加行范围或行状态。
|
|
89
|
+
*/
|
|
75
90
|
export interface CFScope {
|
|
76
91
|
readonly columnId: string;
|
|
77
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* 행 범위 [startRow, endRow) — 끝은 포함하지 않는다. 없으면 컬럼 전체.
|
|
94
|
+
*
|
|
95
|
+
* Row range [startRow, endRow) — end excluded. Absent means the whole column.
|
|
96
|
+
*
|
|
97
|
+
* 行の範囲 [startRow, endRow) — 終わりは含みません。なければ列全体。
|
|
98
|
+
*
|
|
99
|
+
* 行范围 [startRow, endRow) — 不含末尾。没有则为整列。
|
|
100
|
+
*/
|
|
78
101
|
readonly range?: {
|
|
79
102
|
readonly startRow: number;
|
|
80
103
|
readonly endRow: number;
|
|
81
104
|
};
|
|
82
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* 이 상태의 행에만 건다(추가·수정·삭제된 행).
|
|
107
|
+
*
|
|
108
|
+
* Apply only to rows in this state (added, edited or removed).
|
|
109
|
+
*
|
|
110
|
+
* この状態の行にだけ掛けます(追加・修正・削除された行)。
|
|
111
|
+
*
|
|
112
|
+
* 只作用于该状态的行(新增、修改、删除的行)。
|
|
113
|
+
*/
|
|
83
114
|
readonly rowState?: 'added' | 'edited' | 'removed';
|
|
84
115
|
}
|
|
85
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* 이름 붙여 등록한 스타일을 가리킨다(여러 규칙이 같은 색을 나눠 쓸 때).
|
|
118
|
+
*
|
|
119
|
+
* Refers to a style registered by name (when several rules share the same colors).
|
|
120
|
+
*
|
|
121
|
+
* 名前を付けて登録したスタイルを指します(複数の規則が同じ色を共有するとき)。
|
|
122
|
+
*
|
|
123
|
+
* 引用按名称注册的样式(多个规则共用同一套颜色时)。
|
|
124
|
+
*/
|
|
86
125
|
export interface CFStyleRef {
|
|
87
126
|
readonly ref: string;
|
|
88
127
|
}
|
|
89
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* 규칙 안에 바로 적는 스타일(글자색·배경·굵게·기울임·밑줄).
|
|
130
|
+
*
|
|
131
|
+
* A style written directly in the rule (text color, background, bold, italic, underline).
|
|
132
|
+
*
|
|
133
|
+
* 規則の中に直接書くスタイル(文字色・背景・太字・斜体・下線)。
|
|
134
|
+
*
|
|
135
|
+
* 直接写在规则里的样式(文字颜色、背景、粗体、斜体、下划线)。
|
|
136
|
+
*/
|
|
90
137
|
export interface CFInlineStyle {
|
|
91
138
|
readonly color?: string;
|
|
92
139
|
readonly background?: string;
|
|
@@ -97,25 +144,101 @@ export interface CFInlineStyle {
|
|
|
97
144
|
/** style 슬롯이 참조형인지 판별(직렬화·해석 분기). / Discriminate a style ref from an inline style. */
|
|
98
145
|
export declare function isStyleRef(s: CFStyleRef | CFInlineStyle | undefined): s is CFStyleRef;
|
|
99
146
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
147
|
+
* 조건부 서식 규칙 하나. 함수를 담지 않는 데이터라 JSON 으로 저장했다가 그대로 되살릴 수 있다. `grid.setConditionalFormat([규칙…])` 에 넘긴다.
|
|
148
|
+
*
|
|
149
|
+
* One conditional-formatting rule. It holds no functions, so it can be saved as JSON and restored as is. Pass it to `grid.setConditionalFormat([rules…])`.
|
|
150
|
+
*
|
|
151
|
+
* 条件付き書式の規則 1 つ。関数を持たないデータなので JSON で保存してそのまま復元できます。`grid.setConditionalFormat([規則…])` に渡します。
|
|
152
|
+
*
|
|
153
|
+
* 一条条件格式规则。它不包含函数,可以保存为 JSON 后原样还原。传给 `grid.setConditionalFormat([规则…])`。
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* const rule: CFRule = {
|
|
157
|
+
* id: 'high-sales', when: { type: 'compare', op: '>', a: 100 }, encode: { kind: 'bar' },
|
|
158
|
+
* scope: { columnId: 'sales' }, priority: 1,
|
|
159
|
+
* };
|
|
160
|
+
* await grid.setConditionalFormat([rule]);
|
|
102
161
|
*/
|
|
103
162
|
export interface CFRule {
|
|
104
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* 규칙 이름(겹치지 않게). 우선순위가 같을 때 순서를 정하는 데도 쓴다.
|
|
165
|
+
*
|
|
166
|
+
* The rule's id (unique). Also breaks ties between equal priorities.
|
|
167
|
+
*
|
|
168
|
+
* 規則の名前(重ならないように)。優先度が同じときの順番決めにも使います。
|
|
169
|
+
*
|
|
170
|
+
* 规则名称(不重复)。优先级相同时也用它决定顺序。
|
|
171
|
+
*/
|
|
105
172
|
readonly id: string;
|
|
106
|
-
/**
|
|
173
|
+
/**
|
|
174
|
+
* 걸리는 조건.
|
|
175
|
+
*
|
|
176
|
+
* The condition.
|
|
177
|
+
*
|
|
178
|
+
* 掛かる条件。
|
|
179
|
+
*
|
|
180
|
+
* 触发条件。
|
|
181
|
+
*/
|
|
107
182
|
readonly when: CFCondition;
|
|
108
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* 보여 주는 방식.
|
|
185
|
+
*
|
|
186
|
+
* How it is shown.
|
|
187
|
+
*
|
|
188
|
+
* 見せ方。
|
|
189
|
+
*
|
|
190
|
+
* 显示方式。
|
|
191
|
+
*/
|
|
109
192
|
readonly encode: CFEncodeSpec;
|
|
110
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* 등록한 스타일 이름 또는 바로 적은 스타일.
|
|
195
|
+
*
|
|
196
|
+
* A registered style name or an inline style.
|
|
197
|
+
*
|
|
198
|
+
* 登録したスタイル名、または直接書いたスタイル。
|
|
199
|
+
*
|
|
200
|
+
* 已注册的样式名或直接写的样式。
|
|
201
|
+
*/
|
|
111
202
|
readonly style?: CFStyleRef | CFInlineStyle;
|
|
112
|
-
/**
|
|
203
|
+
/**
|
|
204
|
+
* 거는 범위.
|
|
205
|
+
*
|
|
206
|
+
* Where it applies.
|
|
207
|
+
*
|
|
208
|
+
* 掛ける範囲。
|
|
209
|
+
*
|
|
210
|
+
* 作用范围。
|
|
211
|
+
*/
|
|
113
212
|
readonly scope: CFScope;
|
|
114
|
-
/**
|
|
213
|
+
/**
|
|
214
|
+
* 우선순위. 작을수록 먼저 본다. 같으면 `id` 순.
|
|
215
|
+
*
|
|
216
|
+
* Priority; smaller is evaluated first. Ties go by `id`.
|
|
217
|
+
*
|
|
218
|
+
* 優先度。小さいほど先に見ます。同じなら `id` の順。
|
|
219
|
+
*
|
|
220
|
+
* 优先级。数值越小越先判断。相同则按 `id` 排序。
|
|
221
|
+
*/
|
|
115
222
|
readonly priority: number;
|
|
116
|
-
/**
|
|
223
|
+
/**
|
|
224
|
+
* `true` 면 이 규칙이 걸린 칸에는 뒤 규칙을 보지 않는다(엑셀의 「True 이면 중지」). 기본 `false`.
|
|
225
|
+
*
|
|
226
|
+
* When `true`, later rules are skipped for cells this rule matched (Excel's Stop If True). Default `false`.
|
|
227
|
+
*
|
|
228
|
+
* `true` ならこの規則が掛かったセルには後の規則を見ません(Excel の「条件を満たす場合は停止」)。既定 `false`。
|
|
229
|
+
*
|
|
230
|
+
* 为 `true` 时,本规则命中的单元格不再判断后面的规则(Excel 的「如果为真则停止」)。默认 `false`。
|
|
231
|
+
*/
|
|
117
232
|
readonly stopIfTrue?: boolean;
|
|
118
|
-
/**
|
|
233
|
+
/**
|
|
234
|
+
* 저장 형식 판 번호(옛 판을 읽을 때 쓴다).
|
|
235
|
+
*
|
|
236
|
+
* Saved-format version (used when reading older versions).
|
|
237
|
+
*
|
|
238
|
+
* 保存形式の版番号(古い版を読むときに使います)。
|
|
239
|
+
*
|
|
240
|
+
* 保存格式的版本号(读取旧版本时使用)。
|
|
241
|
+
*/
|
|
119
242
|
readonly v?: number;
|
|
120
243
|
}
|
|
121
244
|
/** 현재 직렬화 스키마 버전. 로더가 미래(더 큰) 버전 규칙을 안전 skip 하는 기준. / Current schema version. */
|