open-grid 1.5.2 → 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 +475 -416
- package/README.ja.md +39 -0
- package/README.md +39 -0
- package/README.zh.md +39 -0
- package/dist/{OpenGrid-CT9bV6On.cjs → OpenGrid-CLk8Vt7j.cjs} +1390 -1316
- package/dist/{OpenGrid-DACnZdEy.js → OpenGrid-D6YxCsnV.js} +1757 -1683
- package/dist/angular/fesm2022/open-grid-angular.mjs +247 -0
- package/dist/angular/index.d.ts +5 -0
- package/dist/angular/lib/open-grid.component.d.ts +97 -0
- package/dist/angular/public-api.d.ts +6 -0
- package/dist/{index-Brfso4Ry.cjs → index-D0DJtKYI.cjs} +2 -2
- package/dist/{index-al9Mbv3E.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 +13 -4
- package/dist/open-grid-header.cjs +4 -4
- package/dist/open-grid-header.css +18 -27
- package/dist/open-grid-header.js +4 -4
- package/dist/open-grid-react.cjs +1 -1
- package/dist/open-grid-react.js +1 -1
- package/dist/open-grid-skins.css +2 -2
- package/dist/open-grid-themes.css +19 -19
- package/dist/open-grid-typography.cjs +2 -2
- package/dist/open-grid-typography.js +2 -2
- 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/DetailManager.d.ts +1 -1
- package/dist/types/core/ExportManager.d.ts +9 -6
- package/dist/types/core/ExtensionPointRegistry.d.ts +2 -2
- 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 +357 -16
- 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/AppearanceAxis.d.ts +54 -6
- package/dist/types/core/appearance/HeaderRegistry.d.ts +213 -21
- package/dist/types/core/appearance/TextureRegistry.d.ts +10 -0
- package/dist/types/core/appearance/TypographyRegistry.d.ts +63 -3
- package/dist/types/core/cf/CFRule.d.ts +145 -22
- package/dist/types/core/chart/DataExtractor.d.ts +1 -1
- package/dist/types/core/detail/DetailGlyph.d.ts +3 -3
- package/dist/types/core/types.d.ts +511 -31
- package/dist/types/header/index.d.ts +146 -6
- package/dist/types/index.d.ts +31 -1
- package/dist/types/typography/index.d.ts +134 -4
- package/dist/types/vue/OpenGrid.vue.d.ts +1 -1
- package/package.json +47 -13
- package/dist/OpenGrid-CT9bV6On.cjs.map +0 -1
- package/dist/OpenGrid-DACnZdEy.js.map +0 -1
- package/dist/Registry-CPJYOqCn.js.map +0 -1
- package/dist/Registry-D74ZmdDz.cjs.map +0 -1
- package/dist/index-Brfso4Ry.cjs.map +0 -1
- package/dist/index-CeJ-0-80.cjs.map +0 -1
- package/dist/index-DnarQ4eR.js.map +0 -1
- package/dist/index-al9Mbv3E.js.map +0 -1
- package/dist/open-grid-header.cjs.map +0 -1
- package/dist/open-grid-header.js.map +0 -1
- package/dist/open-grid-react.cjs.map +0 -1
- package/dist/open-grid-react.js.map +0 -1
- package/dist/open-grid-typography.cjs.map +0 -1
- package/dist/open-grid-typography.js.map +0 -1
- package/dist/open-grid-vue.cjs.map +0 -1
- package/dist/open-grid-vue.js.map +0 -1
- package/dist/open-grid.cjs.map +0 -1
- package/dist/open-grid.js.map +0 -1
- package/dist/xlsx.min-BQ1o3sB6.cjs.map +0 -1
- package/dist/xlsx.min-Bbz2ZypC.js.map +0 -1
|
@@ -140,6 +140,16 @@ export type Position = 'first' | 'last' | 'before' | 'after' | number;
|
|
|
140
140
|
* 内置单元格渲染器的类型名。
|
|
141
141
|
*/
|
|
142
142
|
export type RendererType = 'text' | 'number' | 'date' | 'checkbox' | 'button' | 'link' | 'image' | 'icon' | 'switch' | 'sparkline' | 'template' | 'custom' | 'badge' | 'progress' | 'rating' | 'radio' | 'img' | 'html' | 'barcode';
|
|
143
|
+
/**
|
|
144
|
+
* 컬럼 `renderer` 에 쓸 수 있는 이름 — 내장 렌더러 이름 또는 `OpenGrid.registerRenderer` 로 등록한 이름.
|
|
145
|
+
*
|
|
146
|
+
* A name usable as a column `renderer` — a built-in renderer name or one registered with `OpenGrid.registerRenderer`.
|
|
147
|
+
*
|
|
148
|
+
* 列の `renderer` に使える名前 — 組み込みレンダラーの名前、または `OpenGrid.registerRenderer` で登録した名前。
|
|
149
|
+
*
|
|
150
|
+
* 可用作列 `renderer` 的名称 — 内置渲染器名称,或用 `OpenGrid.registerRenderer` 注册的名称。
|
|
151
|
+
*/
|
|
152
|
+
export type RendererName = RendererType | (string & {});
|
|
143
153
|
/**
|
|
144
154
|
* 내장 셀 에디터 타입 이름.
|
|
145
155
|
*
|
|
@@ -612,17 +622,41 @@ export interface CellKeyEvent<T = any> {
|
|
|
612
622
|
originalEvent: KeyboardEvent;
|
|
613
623
|
}
|
|
614
624
|
/**
|
|
615
|
-
* 정렬 변경 이벤트(sortChange).
|
|
625
|
+
* 정렬 변경 이벤트(sortChange). 머리글 클릭·`orderBy()`·`resetOrder()` 어느 길이든 같은 모양으로 온다.
|
|
626
|
+
*
|
|
627
|
+
* Sort change event (sortChange). It has the same shape whether it comes from a header click, `orderBy()` or `resetOrder()`.
|
|
616
628
|
*
|
|
617
|
-
*
|
|
629
|
+
* ソート変更イベント(sortChange)。見出しのクリック・`orderBy()`・`resetOrder()` のどの経路でも同じ形で届きます。
|
|
618
630
|
*
|
|
619
|
-
*
|
|
631
|
+
* 排序变更事件(sortChange)。无论来自表头点击、`orderBy()` 还是 `resetOrder()`,形状都相同。
|
|
620
632
|
*
|
|
621
|
-
*
|
|
633
|
+
* @example
|
|
634
|
+
* grid.on('sortChange', (e: SortEvent) => {
|
|
635
|
+
* if (!e.field) say('정렬 해제');
|
|
636
|
+
* else say(`${e.field} ${e.dir ?? '해제'}`);
|
|
637
|
+
* });
|
|
622
638
|
*/
|
|
623
639
|
export interface SortEvent {
|
|
624
|
-
|
|
625
|
-
|
|
640
|
+
/**
|
|
641
|
+
* 방금 정렬이 바뀐 컬럼. 정렬을 모두 풀었으면(`resetOrder()`) 없다.
|
|
642
|
+
*
|
|
643
|
+
* The column whose sort just changed. Absent when all sorting was cleared (`resetOrder()`).
|
|
644
|
+
*
|
|
645
|
+
* いまソートが変わった列。ソートをすべて解除したとき(`resetOrder()`)はありません。
|
|
646
|
+
*
|
|
647
|
+
* 刚刚改变排序的列。全部解除排序(`resetOrder()`)时不存在。
|
|
648
|
+
*/
|
|
649
|
+
field?: string;
|
|
650
|
+
/**
|
|
651
|
+
* 그 컬럼의 새 방향. 그 컬럼의 정렬이 풀렸으면 없다.
|
|
652
|
+
*
|
|
653
|
+
* That column's new direction. Absent when that column's sort was cleared.
|
|
654
|
+
*
|
|
655
|
+
* その列の新しい向き。その列のソートが解除されたときはありません。
|
|
656
|
+
*
|
|
657
|
+
* 该列的新方向。该列的排序被解除时不存在。
|
|
658
|
+
*/
|
|
659
|
+
dir?: SortDir;
|
|
626
660
|
/**
|
|
627
661
|
* 멀티정렬 전체 상태.
|
|
628
662
|
*
|
|
@@ -658,18 +692,54 @@ export interface FilterEvent {
|
|
|
658
692
|
allFilters: Record<string, FilterItem[]>;
|
|
659
693
|
}
|
|
660
694
|
/**
|
|
661
|
-
* 스크롤 이벤트(scroll).
|
|
695
|
+
* 본문 스크롤 이벤트(scroll). 스크롤하는 동안 화면이 그려질 때마다 한 번(초당 60회 안팎)까지 온다. 서버 요청처럼 무거운 일은 직접 모아서(throttle) 한다.
|
|
662
696
|
*
|
|
663
|
-
*
|
|
697
|
+
* Body scroll event (scroll). Arrives at most once per rendered frame while scrolling (around 60 times a second). Batch heavy work such as server requests yourself (throttle).
|
|
664
698
|
*
|
|
665
|
-
*
|
|
699
|
+
* 本文のスクロールイベント(scroll)。スクロール中、画面が描かれるたびに最大 1 回(毎秒 60 回前後)届きます。サーバー要求のような重い処理は自分でまとめて(throttle)行います。
|
|
666
700
|
*
|
|
667
|
-
*
|
|
701
|
+
* 正文滚动事件(scroll)。滚动期间每次画面绘制最多触发一次(每秒约 60 次)。服务器请求这类繁重的工作请自行合并(throttle)后再做。
|
|
668
702
|
*/
|
|
669
703
|
export interface ScrollEvent {
|
|
704
|
+
/**
|
|
705
|
+
* 가로 스크롤 위치(px).
|
|
706
|
+
*
|
|
707
|
+
* Horizontal scroll position (px).
|
|
708
|
+
*
|
|
709
|
+
* 横スクロールの位置(px)。
|
|
710
|
+
*
|
|
711
|
+
* 横向滚动位置(px)。
|
|
712
|
+
*/
|
|
670
713
|
scrollLeft: number;
|
|
714
|
+
/**
|
|
715
|
+
* 세로 스크롤 위치(px). 0 이 맨 위.
|
|
716
|
+
*
|
|
717
|
+
* Vertical scroll position (px); 0 is the top.
|
|
718
|
+
*
|
|
719
|
+
* 縦スクロールの位置(px)。0 がいちばん上。
|
|
720
|
+
*
|
|
721
|
+
* 纵向滚动位置(px)。0 为最顶部。
|
|
722
|
+
*/
|
|
671
723
|
scrollTop: number;
|
|
724
|
+
/**
|
|
725
|
+
* 맨 위에 있으면 `true`.
|
|
726
|
+
*
|
|
727
|
+
* `true` at the very top.
|
|
728
|
+
*
|
|
729
|
+
* いちばん上にあれば `true`。
|
|
730
|
+
*
|
|
731
|
+
* 位于最顶部时为 `true`。
|
|
732
|
+
*/
|
|
672
733
|
isAtTop: boolean;
|
|
734
|
+
/**
|
|
735
|
+
* 맨 아래에 닿았으면 `true`(1px 여유를 둔다 — 소수점 스크롤 값 때문). 끝까지 내리면 다음 쪽을 불러오는 데 쓴다.
|
|
736
|
+
*
|
|
737
|
+
* `true` once the bottom is reached (with 1px of slack for fractional scroll values). Use it to load the next page when the user reaches the end.
|
|
738
|
+
*
|
|
739
|
+
* いちばん下に届いたら `true`(小数のスクロール値のため 1px の余裕を持たせます)。最後まで下げたら次のページを読み込むのに使います。
|
|
740
|
+
*
|
|
741
|
+
* 到达最底部时为 `true`(因滚动值可能带小数,留 1px 余量)。可用于滚到底时加载下一页。
|
|
742
|
+
*/
|
|
673
743
|
isAtBottom: boolean;
|
|
674
744
|
}
|
|
675
745
|
/**
|
|
@@ -1513,7 +1583,7 @@ export interface RendererDef {
|
|
|
1513
1583
|
*
|
|
1514
1584
|
* 使用哪个内置渲染器。
|
|
1515
1585
|
*/
|
|
1516
|
-
type:
|
|
1586
|
+
type: RendererName;
|
|
1517
1587
|
/**
|
|
1518
1588
|
* 렌더러별 추가 옵션(자유 키).
|
|
1519
1589
|
*
|
|
@@ -1635,7 +1705,7 @@ export interface EditorDef {
|
|
|
1635
1705
|
}
|
|
1636
1706
|
/**
|
|
1637
1707
|
* 컬럼 한 개를 어떻게 보이고 동작하게 할지 담는 설정 뭉치입니다. 그리드는 `columns` 배열에 담긴 이
|
|
1638
|
-
* 정의들을 왼쪽부터 순서대로 그립니다. 최소한 `field`(어떤 데이터를 보여줄지)와 `header`(
|
|
1708
|
+
* 정의들을 왼쪽부터 순서대로 그립니다. 최소한 `field`(어떤 데이터를 보여줄지)와 `header`(헤더 글자)만
|
|
1639
1709
|
* 있으면 되고, 나머지는 필요할 때만 켜는 선택 항목입니다.
|
|
1640
1710
|
*
|
|
1641
1711
|
* The settings bundle for a single column — what it shows and how it behaves. The grid draws the
|
|
@@ -1672,7 +1742,7 @@ export interface ColumnDef<T = any> {
|
|
|
1672
1742
|
*/
|
|
1673
1743
|
field: string;
|
|
1674
1744
|
/**
|
|
1675
|
-
*
|
|
1745
|
+
* 헤더에 보일 글자. 문자열 안의 '\n' 은 두 줄로 나뉩니다.
|
|
1676
1746
|
*
|
|
1677
1747
|
* The caption shown in the header. A '\n' inside splits into two lines.
|
|
1678
1748
|
*
|
|
@@ -1778,7 +1848,7 @@ export interface ColumnDef<T = any> {
|
|
|
1778
1848
|
*
|
|
1779
1849
|
* 单元格的绘制方式。用一行传内置渲染器名称,需要附加选项时传 RendererDef 对象。
|
|
1780
1850
|
*/
|
|
1781
|
-
renderer?:
|
|
1851
|
+
renderer?: RendererName | RendererDef;
|
|
1782
1852
|
/**
|
|
1783
1853
|
* 이 컬럼을 편집할 수 있는지. true 면 항상 편집 가능, 함수로 주면 행마다 다르게 결정합니다
|
|
1784
1854
|
* (예: 상태가 '확정'인 행만 잠그기). GridOptions.editable 과 둘 다 참일 때만 실제로 열립니다.
|
|
@@ -1844,7 +1914,7 @@ export interface ColumnDef<T = any> {
|
|
|
1844
1914
|
*/
|
|
1845
1915
|
headerStyle?: CSSProperties;
|
|
1846
1916
|
/**
|
|
1847
|
-
* 이 컬럼
|
|
1917
|
+
* 이 컬럼 헤더를 클릭하면 정렬되게 할지. 특정 컬럼만 정렬을 막거나 허용할 때 씁니다.
|
|
1848
1918
|
*
|
|
1849
1919
|
* Whether clicking this header sorts. Use it to allow/deny sorting per column.
|
|
1850
1920
|
*
|
|
@@ -1864,7 +1934,7 @@ export interface ColumnDef<T = any> {
|
|
|
1864
1934
|
*/
|
|
1865
1935
|
filterable?: boolean;
|
|
1866
1936
|
/**
|
|
1867
|
-
*
|
|
1937
|
+
* 헤더 경계를 드래그해 폭을 조절하게 할지.
|
|
1868
1938
|
*
|
|
1869
1939
|
* Whether the user can drag the header edge to resize.
|
|
1870
1940
|
*
|
|
@@ -1904,7 +1974,7 @@ export interface ColumnDef<T = any> {
|
|
|
1904
1974
|
*/
|
|
1905
1975
|
wrap?: boolean;
|
|
1906
1976
|
/**
|
|
1907
|
-
*
|
|
1977
|
+
* 컬럼 헤더 줄바꿈: true 면 헤더 텍스트가 잘리지 않고 여러 줄로 줄바꿈된다.
|
|
1908
1978
|
* (셀 본문용 wrap 과 별개로 헤더에만 적용. header 문자열의 '\n' 은 headerWrap 여부와 무관하게 항상 줄바꿈됨)
|
|
1909
1979
|
* 줄바꿈된 헤더에 맞춰 헤더 행 높이가 자동으로 늘어난다.
|
|
1910
1980
|
*
|
|
@@ -1950,7 +2020,7 @@ export interface ColumnDef<T = any> {
|
|
|
1950
2020
|
*
|
|
1951
2021
|
* 多级表头用的子列。
|
|
1952
2022
|
*/
|
|
1953
|
-
children?:
|
|
2023
|
+
children?: ColumnOrGroup<T>[];
|
|
1954
2024
|
/**
|
|
1955
2025
|
* 셀 title 툴팁(정적 또는 값·행 함수).
|
|
1956
2026
|
*
|
|
@@ -1961,6 +2031,23 @@ export interface ColumnDef<T = any> {
|
|
|
1961
2031
|
* 单元格的 title 提示(静态,或按值、行的函数)。
|
|
1962
2032
|
*/
|
|
1963
2033
|
tooltip?: string | ((value: any, row: T) => string);
|
|
2034
|
+
/**
|
|
2035
|
+
* 셀을 화면 낭독기가 읽을 글(`aria-label`). 주지 않으면 「머리글: 값」을 읽는다. 스파크라인·데이터바처럼 그림으로 그린 셀에 「무엇을 뜻하는지」를 말로 달아 줄 때 쓴다(문자열 또는 값·행 함수).
|
|
2036
|
+
* 수식 셀은 수식 안내(오류 설명 포함)가 이 값보다 먼저다.
|
|
2037
|
+
*
|
|
2038
|
+
* The text screen readers read for the cell (`aria-label`). Without it they read "header: value". Use it to put into words what a drawn cell (sparkline, data bar, …) means (a string, or a value/row function).
|
|
2039
|
+
* For formula cells the formula description (including error explanations) takes precedence.
|
|
2040
|
+
*
|
|
2041
|
+
* スクリーンリーダーがセルを読むときの文(`aria-label`)。渡さなければ「見出し: 値」を読みます。スパークラインやデータバーのように絵で描いたセルに「何を意味するか」を言葉で付けるときに使います(文字列、または値・行の関数)。
|
|
2042
|
+
* 数式セルでは数式の案内(エラーの説明を含む)がこの値より優先されます。
|
|
2043
|
+
*
|
|
2044
|
+
* 屏幕阅读器朗读该单元格时的文字(`aria-label`)。不传则朗读「表头: 值」。用于给迷你折线、数据条这类以图形绘制的单元格用文字说明「表示什么」(字符串,或按值、行的函数)。
|
|
2045
|
+
* 公式单元格中,公式说明(包括错误说明)优先于此值。
|
|
2046
|
+
*
|
|
2047
|
+
* @example
|
|
2048
|
+
* { field: 'trend', header: '추세', renderer: 'sparkline', ariaLabel: (v: number[]) => `최근 값 ${v[v.length - 1]}, 처음보다 ${v[v.length - 1] >= v[0] ? '올랐다' : '내렸다'}` }
|
|
2049
|
+
*/
|
|
2050
|
+
ariaLabel?: string | ((value: any, row: T) => string);
|
|
1964
2051
|
/**
|
|
1965
2052
|
* select 정적 옵션.
|
|
1966
2053
|
*
|
|
@@ -2102,6 +2189,58 @@ export interface ColumnDef<T = any> {
|
|
|
2102
2189
|
*/
|
|
2103
2190
|
_maskRevealedRows?: Set<number>;
|
|
2104
2191
|
}
|
|
2192
|
+
/**
|
|
2193
|
+
* `columns` 에 넣을 수 있는 한 항목 — 값을 보여 주는 컬럼(`ColumnDef`) 또는 묶음 머리글(`ColumnGroupDef`).
|
|
2194
|
+
*
|
|
2195
|
+
* One entry of `columns` — a value column (`ColumnDef`) or a group header (`ColumnGroupDef`).
|
|
2196
|
+
*
|
|
2197
|
+
* `columns` に入れられる一項目 — 値を表示する列(`ColumnDef`)、またはまとめ見出し(`ColumnGroupDef`)。
|
|
2198
|
+
*
|
|
2199
|
+
* `columns` 中的一项 — 显示值的列(`ColumnDef`)或分组表头(`ColumnGroupDef`)。
|
|
2200
|
+
*/
|
|
2201
|
+
export type ColumnOrGroup<T = any> = ColumnDef<T> | ColumnGroupDef<T>;
|
|
2202
|
+
/**
|
|
2203
|
+
* 묶음 머리글 컬럼 — 여러 컬럼 위에 한 줄 머리글을 얹는다(다단 헤더). `header` 가 묶음 머리글 글자이고
|
|
2204
|
+
* 실제 값을 보여 주는 컬럼은 `children` 에 둔다. 묶음 자체는 값을 보여 주지 않으므로 `field` 는 적지 않아도 된다.
|
|
2205
|
+
*
|
|
2206
|
+
* A group-header column — puts one header row over several columns (multi-level header). `header` is
|
|
2207
|
+
* the group's caption and the columns that show values go in `children`. The group itself shows no
|
|
2208
|
+
* value, so `field` is optional.
|
|
2209
|
+
*
|
|
2210
|
+
* まとめ見出しの列 — 複数の列の上に一段の見出しを載せます(多段ヘッダー)。`header` がまとめ見出しの文字で、
|
|
2211
|
+
* 実際に値を表示する列は `children` に置きます。まとめ自体は値を表示しないので `field` は書かなくてもかまいません。
|
|
2212
|
+
*
|
|
2213
|
+
* 分组表头列 — 在多个列上方加一行表头(多级表头)。`header` 是分组表头的文字,真正显示值的列放在
|
|
2214
|
+
* `children` 里。分组本身不显示值,因此可以不写 `field`。
|
|
2215
|
+
*
|
|
2216
|
+
* @example
|
|
2217
|
+
* columns: [
|
|
2218
|
+
* { field: 'name', header: '이름' },
|
|
2219
|
+
* { header: '매출(만원)', children: [{ field: 'q1', header: '1분기' }, { field: 'q2', header: '2분기' }] },
|
|
2220
|
+
* ]
|
|
2221
|
+
*/
|
|
2222
|
+
export interface ColumnGroupDef<T = any> extends Omit<ColumnDef<T>, 'field' | 'children'> {
|
|
2223
|
+
/**
|
|
2224
|
+
* 묶음에는 값이 없으므로 선택 항목이다.
|
|
2225
|
+
*
|
|
2226
|
+
* Optional, since a group has no value of its own.
|
|
2227
|
+
*
|
|
2228
|
+
* まとめには値がないので任意項目です。
|
|
2229
|
+
*
|
|
2230
|
+
* 分组没有自己的值,因此为可选项。
|
|
2231
|
+
*/
|
|
2232
|
+
field?: string;
|
|
2233
|
+
/**
|
|
2234
|
+
* 묶음 아래에 놓일 컬럼들(잎 컬럼 또는 다시 묶음).
|
|
2235
|
+
*
|
|
2236
|
+
* Columns under the group (leaf columns or nested groups).
|
|
2237
|
+
*
|
|
2238
|
+
* まとめの下に置く列(末端の列、またはさらにまとめ)。
|
|
2239
|
+
*
|
|
2240
|
+
* 分组下面的列(叶子列或再嵌套的分组)。
|
|
2241
|
+
*/
|
|
2242
|
+
children: ColumnOrGroup<T>[];
|
|
2243
|
+
}
|
|
2105
2244
|
/**
|
|
2106
2245
|
* 트리 노드 아이콘 정의.
|
|
2107
2246
|
*
|
|
@@ -2228,6 +2367,16 @@ export interface FilterItem {
|
|
|
2228
2367
|
* 聚合运算符。
|
|
2229
2368
|
*/
|
|
2230
2369
|
export type SummaryOp = 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'COUNT';
|
|
2370
|
+
/**
|
|
2371
|
+
* 집계 op 이름 — 내장 op(`SummaryOp`) 또는 `summaryOp` 전략 슬롯으로 새로 만든 이름(예: 'MEDIAN').
|
|
2372
|
+
*
|
|
2373
|
+
* An aggregate op name — a built-in op (`SummaryOp`) or a name you added through the `summaryOp` strategy slot (e.g. 'MEDIAN').
|
|
2374
|
+
*
|
|
2375
|
+
* 集計 op の名前 — 組み込みの op(`SummaryOp`)、または `summaryOp` 戦略スロットで新しく作った名前(例: 'MEDIAN')。
|
|
2376
|
+
*
|
|
2377
|
+
* 聚合 op 名称 — 内置 op(`SummaryOp`),或通过 `summaryOp` 策略槽新增的名称(例如 'MEDIAN')。
|
|
2378
|
+
*/
|
|
2379
|
+
export type SummaryOpName = SummaryOp | (string & {});
|
|
2231
2380
|
/**
|
|
2232
2381
|
* 필드별 집계 정의.
|
|
2233
2382
|
*
|
|
@@ -2239,7 +2388,7 @@ export type SummaryOp = 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'COUNT';
|
|
|
2239
2388
|
*/
|
|
2240
2389
|
export interface SummaryFieldDef {
|
|
2241
2390
|
field: string;
|
|
2242
|
-
op:
|
|
2391
|
+
op: SummaryOpName;
|
|
2243
2392
|
label?: string;
|
|
2244
2393
|
}
|
|
2245
2394
|
/**
|
|
@@ -2296,7 +2445,7 @@ export interface SummaryOptions {
|
|
|
2296
2445
|
* 在一个组内生成多行汇总时(例如合计行 + 平均行)。也可用 customFn 自行聚合。
|
|
2297
2446
|
*/
|
|
2298
2447
|
rows?: Array<{
|
|
2299
|
-
op:
|
|
2448
|
+
op: SummaryOpName;
|
|
2300
2449
|
label?: string;
|
|
2301
2450
|
customFn?: (items: any[]) => number;
|
|
2302
2451
|
}>;
|
|
@@ -2334,7 +2483,7 @@ export interface FooterDef {
|
|
|
2334
2483
|
*
|
|
2335
2484
|
* 计算哪种聚合(SUM/AVG/…)。
|
|
2336
2485
|
*/
|
|
2337
|
-
op?:
|
|
2486
|
+
op?: SummaryOpName;
|
|
2338
2487
|
/**
|
|
2339
2488
|
* 집계 대신 그대로 보여줄 고정 문구(예: '합계').
|
|
2340
2489
|
*
|
|
@@ -2394,6 +2543,16 @@ export interface PrintOptions {
|
|
|
2394
2543
|
title?: string;
|
|
2395
2544
|
excludeFields?: string[];
|
|
2396
2545
|
showFooter?: boolean;
|
|
2546
|
+
/**
|
|
2547
|
+
* 인쇄 쪽 맨 아래에 넣을 글(예: 출력 일시·담당 부서). 비우면 넣지 않는다. HTML 로 해석되므로 사용자 입력을 그대로 넣지 않는다.
|
|
2548
|
+
*
|
|
2549
|
+
* Text placed at the bottom of the printed page (e.g. print time, department). Omitted when empty. It is parsed as HTML, so do not pass raw user input.
|
|
2550
|
+
*
|
|
2551
|
+
* 印刷ページのいちばん下に入れる文(例: 出力日時・担当部署)。空なら入れません。HTML として解釈されるので、利用者の入力をそのまま渡さないでください。
|
|
2552
|
+
*
|
|
2553
|
+
* 放在打印页最下方的文字(例如打印时间、负责部门)。为空则不放。它会被当作 HTML 解析,因此不要直接传入用户输入。
|
|
2554
|
+
*/
|
|
2555
|
+
footerText?: string;
|
|
2397
2556
|
}
|
|
2398
2557
|
/**
|
|
2399
2558
|
* 내보내기 스타일 모드.
|
|
@@ -2442,7 +2601,7 @@ export interface ExportOptions {
|
|
|
2442
2601
|
*/
|
|
2443
2602
|
sheetName?: string;
|
|
2444
2603
|
/**
|
|
2445
|
-
*
|
|
2604
|
+
* 헤더 행을 포함할지. 기본 true.
|
|
2446
2605
|
*
|
|
2447
2606
|
* Whether to include the header row. Default true.
|
|
2448
2607
|
*
|
|
@@ -2584,7 +2743,7 @@ export interface GridOptions<T = any> {
|
|
|
2584
2743
|
*
|
|
2585
2744
|
* 列定义数组(必填)。
|
|
2586
2745
|
*/
|
|
2587
|
-
columns:
|
|
2746
|
+
columns: ColumnOrGroup<T>[];
|
|
2588
2747
|
/**
|
|
2589
2748
|
* 그리드의 세로 크기. 숫자면 px, 문자열이면 CSS 값('60vh' 등)입니다. 가상 스크롤이 제대로 돌려면
|
|
2590
2749
|
* 확정된 높이가 필요하므로, 큰 데이터에서는 이 값(또는 조상 요소의 높이)을 꼭 주는 걸 권합니다.
|
|
@@ -2625,7 +2784,7 @@ export interface GridOptions<T = any> {
|
|
|
2625
2784
|
*/
|
|
2626
2785
|
rowHeight?: number;
|
|
2627
2786
|
/**
|
|
2628
|
-
*
|
|
2787
|
+
* 헤더 행의 높이(px). 여러 줄 헤더면 자동으로 늘어나므로 보통은 생략.
|
|
2629
2788
|
*
|
|
2630
2789
|
* Header row height (px). Grows automatically for multi-line headers, so usually omitted.
|
|
2631
2790
|
*
|
|
@@ -2829,7 +2988,7 @@ export interface GridOptions<T = any> {
|
|
|
2829
2988
|
*/
|
|
2830
2989
|
conditionalFormat?: import('./cf/CFRule.js').CFRule[];
|
|
2831
2990
|
/**
|
|
2832
|
-
*
|
|
2991
|
+
* 헤더 클릭 정렬을 그리드 전체에서 켤지. 컬럼별 sortable 로 예외를 둘 수 있습니다.
|
|
2833
2992
|
*
|
|
2834
2993
|
* Turn header-click sorting on grid-wide. Per-column sortable can override.
|
|
2835
2994
|
*
|
|
@@ -2959,7 +3118,7 @@ export interface GridOptions<T = any> {
|
|
|
2959
3118
|
* - 'interactive': 源/目标结构不同时弹出映射对话框,由开发者匹配并输出转换脚本
|
|
2960
3119
|
* - 函数: 以 (srcRow) => targetRow 直接转换(不弹对话框,直接 baking)
|
|
2961
3120
|
*/
|
|
2962
|
-
crossGridMapping?: 'auto' | 'interactive' | ((srcRow: T) =>
|
|
3121
|
+
crossGridMapping?: 'auto' | 'interactive' | ((srcRow: T) => Record<string, any>);
|
|
2963
3122
|
/**
|
|
2964
3123
|
* 셀 병합 기능 사용.
|
|
2965
3124
|
*
|
|
@@ -3206,7 +3365,7 @@ export interface GridOptions<T = any> {
|
|
|
3206
3365
|
*/
|
|
3207
3366
|
calcPrecision?: number;
|
|
3208
3367
|
/**
|
|
3209
|
-
*
|
|
3368
|
+
* 헤더를 드래그해 컬럼 순서를 바꾸게 할지.
|
|
3210
3369
|
*
|
|
3211
3370
|
* Whether headers can be dragged to reorder columns.
|
|
3212
3371
|
*
|
|
@@ -3239,6 +3398,32 @@ export interface GridOptions<T = any> {
|
|
|
3239
3398
|
* 首次渲染完成的回调。
|
|
3240
3399
|
*/
|
|
3241
3400
|
onReady?: (grid: OpenGridInstance<T>) => void;
|
|
3401
|
+
/**
|
|
3402
|
+
* 셀 클릭 콜백.
|
|
3403
|
+
*
|
|
3404
|
+
* 이 옵션을 비롯한 이벤트 옵션 `onX` 는 `grid.on('x', …)` 과 같은 구독이다. 한 번의 일에 한 번 불리고,
|
|
3405
|
+
* `grid.on` 으로 단 리스너보다 먼저 불린다. `grid.off('x')` 로 그 이벤트의 리스너를 전부 해제하면 옵션 콜백도 멈춘다.
|
|
3406
|
+
* `setOptions` 로 바꾼 콜백은 곧바로 쓰인다.
|
|
3407
|
+
*
|
|
3408
|
+
* Cell-click callback.
|
|
3409
|
+
*
|
|
3410
|
+
* This and the other event options `onX` are the same subscription as `grid.on('x', …)`. They fire
|
|
3411
|
+
* once per occurrence, before listeners added with `grid.on`. Removing every listener of the event
|
|
3412
|
+
* with `grid.off('x')` stops the option callback too. A callback replaced through `setOptions` takes
|
|
3413
|
+
* effect immediately.
|
|
3414
|
+
*
|
|
3415
|
+
* セルクリックのコールバック。
|
|
3416
|
+
*
|
|
3417
|
+
* このオプションをはじめとするイベントオプション `onX` は `grid.on('x', …)` と同じ購読です。1 回の出来事につき 1 回呼ばれ、
|
|
3418
|
+
* `grid.on` で付けたリスナーより先に呼ばれます。`grid.off('x')` でそのイベントのリスナーをすべて解除するとオプションのコールバックも止まります。
|
|
3419
|
+
* `setOptions` で差し替えたコールバックはすぐに使われます。
|
|
3420
|
+
*
|
|
3421
|
+
* 单元格点击回调。
|
|
3422
|
+
*
|
|
3423
|
+
* 这个选项以及其他事件选项 `onX` 与 `grid.on('x', …)` 是同一种订阅。每发生一次只调用一次,
|
|
3424
|
+
* 并且先于用 `grid.on` 添加的监听器调用。用 `grid.off('x')` 解除该事件的全部监听器时,选项回调也会停止。
|
|
3425
|
+
* 通过 `setOptions` 替换的回调会立即生效。
|
|
3426
|
+
*/
|
|
3242
3427
|
onCellClick?: (e: CellEvent<T>) => void;
|
|
3243
3428
|
onCellDblClick?: (e: CellEvent<T>) => void;
|
|
3244
3429
|
onEditStart?: (e: EditEvent<T>) => void;
|
|
@@ -3298,6 +3483,15 @@ export interface GridOptions<T = any> {
|
|
|
3298
3483
|
onRowCollapse?: (e: RowExpandEvent<T>) => void;
|
|
3299
3484
|
onSortChange?: (e: SortEvent) => void;
|
|
3300
3485
|
onFilterChange?: (e: FilterEvent) => void;
|
|
3486
|
+
/**
|
|
3487
|
+
* 본문을 스크롤할 때 호출. 스크롤하는 동안 화면이 그려질 때마다 한 번(초당 60회 안팎)까지 온다. 서버 요청처럼 무거운 일은 직접 모아서(throttle) 한다.
|
|
3488
|
+
*
|
|
3489
|
+
* Called while the body scrolls. Arrives at most once per rendered frame while scrolling (around 60 times a second). Batch heavy work such as server requests yourself (throttle).
|
|
3490
|
+
*
|
|
3491
|
+
* 本文をスクロールするときに呼び出し。スクロール中、画面が描かれるたびに最大 1 回(毎秒 60 回前後)届きます。サーバー要求のような重い処理は自分でまとめて(throttle)行います。
|
|
3492
|
+
*
|
|
3493
|
+
* 正文滚动时调用。滚动期间每次画面绘制最多触发一次(每秒约 60 次)。服务器请求这类繁重的工作请自行合并(throttle)后再做。
|
|
3494
|
+
*/
|
|
3301
3495
|
onScroll?: (e: ScrollEvent) => void;
|
|
3302
3496
|
onDrop?: (e: DragDropEvent<T>) => void;
|
|
3303
3497
|
onRowDrop?: (e: {
|
|
@@ -3365,6 +3559,235 @@ export interface GridOptions<T = any> {
|
|
|
3365
3559
|
onCellKeyUp?: (e: CellKeyEvent<T>) => void;
|
|
3366
3560
|
onCellKeyPress?: (e: CellKeyEvent<T>) => void;
|
|
3367
3561
|
}
|
|
3562
|
+
/**
|
|
3563
|
+
* 행 체크 상자를 켜거나 끈 이벤트(rowCheck).
|
|
3564
|
+
*
|
|
3565
|
+
* Event fired when a row checkbox is toggled (rowCheck).
|
|
3566
|
+
*
|
|
3567
|
+
* 行のチェックボックスをオン・オフしたイベント(rowCheck)。
|
|
3568
|
+
*
|
|
3569
|
+
* 勾选或取消某行复选框的事件(rowCheck)。
|
|
3570
|
+
*/
|
|
3571
|
+
export interface RowCheckEvent<T = any> {
|
|
3572
|
+
/**
|
|
3573
|
+
* 바뀐 행의 표시 순서 인덱스.
|
|
3574
|
+
*
|
|
3575
|
+
* Display-order index of the row.
|
|
3576
|
+
*
|
|
3577
|
+
* 変わった行の表示順インデックス。
|
|
3578
|
+
*
|
|
3579
|
+
* 发生变化的行的显示顺序索引。
|
|
3580
|
+
*/
|
|
3581
|
+
rowIndex: number;
|
|
3582
|
+
/**
|
|
3583
|
+
* 새 체크 상태.
|
|
3584
|
+
*
|
|
3585
|
+
* The new checked state.
|
|
3586
|
+
*
|
|
3587
|
+
* 新しいチェック状態。
|
|
3588
|
+
*
|
|
3589
|
+
* 新的勾选状态。
|
|
3590
|
+
*/
|
|
3591
|
+
checked: boolean;
|
|
3592
|
+
/**
|
|
3593
|
+
* 그 행의 데이터.
|
|
3594
|
+
*
|
|
3595
|
+
* The row's data.
|
|
3596
|
+
*
|
|
3597
|
+
* その行のデータ。
|
|
3598
|
+
*
|
|
3599
|
+
* 该行的数据。
|
|
3600
|
+
*/
|
|
3601
|
+
row: T | undefined;
|
|
3602
|
+
}
|
|
3603
|
+
/**
|
|
3604
|
+
* 머리글의 「모두 선택」 체크 상자를 켜거나 끈 이벤트(allCheck).
|
|
3605
|
+
*
|
|
3606
|
+
* Event fired when the header's select-all checkbox is toggled (allCheck).
|
|
3607
|
+
*
|
|
3608
|
+
* 見出しの「すべて選択」チェックボックスをオン・オフしたイベント(allCheck)。
|
|
3609
|
+
*
|
|
3610
|
+
* 切换表头「全选」复选框的事件(allCheck)。
|
|
3611
|
+
*/
|
|
3612
|
+
export interface AllCheckEvent {
|
|
3613
|
+
/**
|
|
3614
|
+
* 새 체크 상태.
|
|
3615
|
+
*
|
|
3616
|
+
* The new checked state.
|
|
3617
|
+
*
|
|
3618
|
+
* 新しいチェック状態。
|
|
3619
|
+
*
|
|
3620
|
+
* 新的勾选状态。
|
|
3621
|
+
*/
|
|
3622
|
+
checked: boolean;
|
|
3623
|
+
}
|
|
3624
|
+
/**
|
|
3625
|
+
* 행을 끌어 같은 그리드 안에서 옮긴 이벤트(rowDrop).
|
|
3626
|
+
*
|
|
3627
|
+
* Event fired when a row is dragged to a new place in the same grid (rowDrop).
|
|
3628
|
+
*
|
|
3629
|
+
* 行をドラッグして同じグリッド内で移動したイベント(rowDrop)。
|
|
3630
|
+
*
|
|
3631
|
+
* 在同一表格内拖动行到新位置的事件(rowDrop)。
|
|
3632
|
+
*/
|
|
3633
|
+
export interface RowDropEvent {
|
|
3634
|
+
/**
|
|
3635
|
+
* 옮기기 전 위치.
|
|
3636
|
+
*
|
|
3637
|
+
* Position before the move.
|
|
3638
|
+
*
|
|
3639
|
+
* 移動前の位置。
|
|
3640
|
+
*
|
|
3641
|
+
* 移动前的位置。
|
|
3642
|
+
*/
|
|
3643
|
+
fromIndex: number;
|
|
3644
|
+
/**
|
|
3645
|
+
* 옮긴 뒤 위치.
|
|
3646
|
+
*
|
|
3647
|
+
* Position after the move.
|
|
3648
|
+
*
|
|
3649
|
+
* 移動後の位置。
|
|
3650
|
+
*
|
|
3651
|
+
* 移动后的位置。
|
|
3652
|
+
*/
|
|
3653
|
+
toIndex: number;
|
|
3654
|
+
}
|
|
3655
|
+
/**
|
|
3656
|
+
* 화면 언어를 바꾼 이벤트(localeChange).
|
|
3657
|
+
*
|
|
3658
|
+
* Event fired when the display locale changes (localeChange).
|
|
3659
|
+
*
|
|
3660
|
+
* 表示言語を変えたイベント(localeChange)。
|
|
3661
|
+
*
|
|
3662
|
+
* 切换显示语言的事件(localeChange)。
|
|
3663
|
+
*/
|
|
3664
|
+
export interface LocaleChangeEvent {
|
|
3665
|
+
/**
|
|
3666
|
+
* 새 언어 id.
|
|
3667
|
+
*
|
|
3668
|
+
* The new locale id.
|
|
3669
|
+
*
|
|
3670
|
+
* 新しい言語 id。
|
|
3671
|
+
*
|
|
3672
|
+
* 新的语言 id。
|
|
3673
|
+
*/
|
|
3674
|
+
locale: string;
|
|
3675
|
+
/**
|
|
3676
|
+
* 바뀌기 전 언어 id.
|
|
3677
|
+
*
|
|
3678
|
+
* The previous locale id.
|
|
3679
|
+
*
|
|
3680
|
+
* 変わる前の言語 id。
|
|
3681
|
+
*
|
|
3682
|
+
* 切换前的语言 id。
|
|
3683
|
+
*/
|
|
3684
|
+
prev: string;
|
|
3685
|
+
}
|
|
3686
|
+
/**
|
|
3687
|
+
* `writeCells` 가 일부 칸을 건너뛰었다는 알림(writeCellsSkip) — 수식 칸 등 쓸 수 없는 칸.
|
|
3688
|
+
*
|
|
3689
|
+
* Notice that `writeCells` skipped some cells (writeCellsSkip) — cells that cannot be written, such as formula cells.
|
|
3690
|
+
*
|
|
3691
|
+
* `writeCells` が一部のセルを飛ばしたという知らせ(writeCellsSkip) — 数式セルなど書き込めないセル。
|
|
3692
|
+
*
|
|
3693
|
+
* `writeCells` 跳过了部分单元格的通知(writeCellsSkip)— 例如公式单元格等无法写入的单元格。
|
|
3694
|
+
*/
|
|
3695
|
+
export interface WriteCellsSkipEvent {
|
|
3696
|
+
/**
|
|
3697
|
+
* 건너뛴 칸 수.
|
|
3698
|
+
*
|
|
3699
|
+
* Number of cells skipped.
|
|
3700
|
+
*
|
|
3701
|
+
* 飛ばしたセルの数。
|
|
3702
|
+
*
|
|
3703
|
+
* 跳过的单元格数。
|
|
3704
|
+
*/
|
|
3705
|
+
skipped: number;
|
|
3706
|
+
/**
|
|
3707
|
+
* 쓰려던 칸 수.
|
|
3708
|
+
*
|
|
3709
|
+
* Number of cells requested.
|
|
3710
|
+
*
|
|
3711
|
+
* 書こうとしたセルの数。
|
|
3712
|
+
*
|
|
3713
|
+
* 请求写入的单元格数。
|
|
3714
|
+
*/
|
|
3715
|
+
total: number;
|
|
3716
|
+
}
|
|
3717
|
+
/**
|
|
3718
|
+
* `grid.on()` 이 받는 이벤트 이름과 그 인자 형의 표. 이름을 적으면 인자 형이 정해져 따로 형을 달지 않아도 된다.
|
|
3719
|
+
* 표에 없는 이름(직접 `emit` 하는 사용자 이벤트 등)도 그대로 쓸 수 있다 — 그때 인자 형은 정해지지 않는다.
|
|
3720
|
+
*
|
|
3721
|
+
* The table of event names `grid.on()` accepts and their argument types. Naming the event fixes the argument type, so no manual annotation is needed.
|
|
3722
|
+
* Names not in the table (such as your own events raised with `emit`) still work; their argument type is simply not fixed.
|
|
3723
|
+
*
|
|
3724
|
+
* `grid.on()` が受け取るイベント名とその引数の型の表。名前を書けば引数の型が決まるので、別に型を付けなくて済みます。
|
|
3725
|
+
* 表にない名前(自分で `emit` する利用者イベントなど)もそのまま使えます — その場合、引数の型は決まりません。
|
|
3726
|
+
*
|
|
3727
|
+
* `grid.on()` 接受的事件名及其参数类型的对照表。写出事件名即可确定参数类型,无需另外标注。
|
|
3728
|
+
* 表中没有的名称(例如自己 `emit` 的用户事件)也可以照常使用 — 此时参数类型不固定。
|
|
3729
|
+
*
|
|
3730
|
+
* @example
|
|
3731
|
+
* grid.on('rowCheck', (e) => console.log(e.rowIndex, e.checked)); // e: RowCheckEvent<Row>
|
|
3732
|
+
* grid.on('formulaRecalc', (e) => console.log(e.cycles, e.ms)); // e: FormulaRecalcEvent
|
|
3733
|
+
*/
|
|
3734
|
+
export interface GridEventMap<T = any> {
|
|
3735
|
+
cellClick: CellEvent<T>;
|
|
3736
|
+
cellDblClick: CellEvent<T>;
|
|
3737
|
+
cellMouseOver: CellEvent<T>;
|
|
3738
|
+
cellMouseOut: CellEvent<T>;
|
|
3739
|
+
cellMouseDown: CellEvent<T>;
|
|
3740
|
+
cellMouseUp: CellEvent<T>;
|
|
3741
|
+
cellMouseMove: CellEvent<T>;
|
|
3742
|
+
cellKeyDown: CellKeyEvent<T>;
|
|
3743
|
+
cellKeyUp: CellKeyEvent<T>;
|
|
3744
|
+
cellKeyPress: CellKeyEvent<T>;
|
|
3745
|
+
rowClick: RowEvent<T>;
|
|
3746
|
+
rowDblClick: RowEvent<T>;
|
|
3747
|
+
rowMouseOver: RowEvent<T>;
|
|
3748
|
+
rowMouseOut: RowEvent<T>;
|
|
3749
|
+
rowMouseDown: RowEvent<T>;
|
|
3750
|
+
rowMouseUp: RowEvent<T>;
|
|
3751
|
+
rowMouseMove: RowEvent<T>;
|
|
3752
|
+
editStart: EditEvent<T>;
|
|
3753
|
+
editEnd: EditEvent<T>;
|
|
3754
|
+
dataChange: T[];
|
|
3755
|
+
selectionChange: SelectionEvent<T>;
|
|
3756
|
+
sortChange: SortEvent;
|
|
3757
|
+
filterChange: FilterEvent;
|
|
3758
|
+
scroll: ScrollEvent;
|
|
3759
|
+
rowExpand: RowExpandEvent<T>;
|
|
3760
|
+
rowCollapse: RowExpandEvent<T>;
|
|
3761
|
+
rowCheck: RowCheckEvent<T>;
|
|
3762
|
+
allCheck: AllCheckEvent;
|
|
3763
|
+
rowDrop: RowDropEvent;
|
|
3764
|
+
pageChange: import('./Pagination.js').PageChangeEvent;
|
|
3765
|
+
rangeChange: RangeChangeEvent;
|
|
3766
|
+
rangeCopy: RangeCopyEvent;
|
|
3767
|
+
rangeFill: RangeFillEvent;
|
|
3768
|
+
formulaChange: FormulaChangeEvent;
|
|
3769
|
+
formulaRecalc: FormulaRecalcEvent;
|
|
3770
|
+
formulaError: FormulaErrorEvent;
|
|
3771
|
+
gridDropBefore: GridDropEvent<T>;
|
|
3772
|
+
gridDropAfter: GridDropEvent<T>;
|
|
3773
|
+
gridDropComplete: GridDropEvent<T>;
|
|
3774
|
+
gridDropMapping: GridMappingEvent<T>;
|
|
3775
|
+
chartCreate: import('./chart/types.js').ChartInstance;
|
|
3776
|
+
chartRender: {
|
|
3777
|
+
id: string;
|
|
3778
|
+
model: import('./chart/types.js').ChartDataModel;
|
|
3779
|
+
};
|
|
3780
|
+
chartPointClick: {
|
|
3781
|
+
id: string;
|
|
3782
|
+
point: import('./chart/types.js').ChartPoint;
|
|
3783
|
+
};
|
|
3784
|
+
chartDestroy: {
|
|
3785
|
+
id: string;
|
|
3786
|
+
};
|
|
3787
|
+
localeChange: LocaleChangeEvent;
|
|
3788
|
+
writeCellsSkip: WriteCellsSkipEvent;
|
|
3789
|
+
ready: OpenGridInstance<T>;
|
|
3790
|
+
}
|
|
3368
3791
|
/**
|
|
3369
3792
|
* override 레이어 함수: 첫 인자는 안쪽(원본 근접) 함수. orig(...) 호출이 super 처럼 동작.
|
|
3370
3793
|
*
|
|
@@ -3781,6 +4204,9 @@ export interface OpenGridInstance<T = any> {
|
|
|
3781
4204
|
insertRow(item: Partial<T>, position?: Position): void;
|
|
3782
4205
|
pushRow(items: Partial<T> | Partial<T>[]): void;
|
|
3783
4206
|
unshiftRow(items: Partial<T> | Partial<T>[]): void;
|
|
4207
|
+
appendRows(items: Partial<T> | Partial<T>[]): void;
|
|
4208
|
+
prependRows(items: Partial<T> | Partial<T>[]): void;
|
|
4209
|
+
reorderRow(fromIndex: number, toIndex: number): void;
|
|
3784
4210
|
deleteRow(rowIndex: number | number[]): void;
|
|
3785
4211
|
deleteById(ids: string[]): void;
|
|
3786
4212
|
readCell<K extends keyof T>(rowIndex: number, field: K): T[K];
|
|
@@ -3788,6 +4214,40 @@ export interface OpenGridInstance<T = any> {
|
|
|
3788
4214
|
getDisplayValue(rowIndex: number, field: string): string;
|
|
3789
4215
|
writeCell(rowIndex: number, field: string, value: any): void;
|
|
3790
4216
|
getRowAt(rowIndex: number): T;
|
|
4217
|
+
/**
|
|
4218
|
+
* 화면 순서로 늘어놓은 **전체** 목록(그룹 머리·트리·상세 칸 포함)에서 `flatIndex` 번째 줄의 데이터 행을 돌려준다. 이 번호는 스크롤 위치와 무관하다 — 지금 창에 보이는 줄 가운데 몇 번째가 아니다. 그룹 머리·상세 칸이면 `null`, 트리 줄이면 그 노드의 데이터 행.
|
|
4219
|
+
* `getRowAt(rowIndex)` 는 데이터의 표시 순서라 그룹·트리·상세가 켜지면 둘이 다른 줄을 가리킨다.
|
|
4220
|
+
*
|
|
4221
|
+
* Returns the data row on the `flatIndex`-th line of the **whole** list laid out in on-screen order (group heads, tree rows and detail slots included). The number does not depend on the scroll position — it is not a position among the lines currently visible in the viewport. `null` for group heads and detail slots; for tree lines, that node's data row.
|
|
4222
|
+
* `getRowAt(rowIndex)` uses the data's display order, so with grouping, tree or detail on the two point at different lines.
|
|
4223
|
+
*
|
|
4224
|
+
* 画面順に並べた**全体**の一覧(グループ見出し・ツリー・詳細欄を含む)で `flatIndex` 番目の行のデータ行を返します。この番号はスクロール位置と関係ありません — いま窓に見えている行の中での何番目かではありません。グループ見出し・詳細欄なら `null`、ツリーの行ならそのノードのデータ行。
|
|
4225
|
+
* `getRowAt(rowIndex)` はデータの表示順なので、グループ・ツリー・詳細が有効だと両者は別の行を指します。
|
|
4226
|
+
*
|
|
4227
|
+
* 在按画面顺序排列的**完整**列表(包括分组标题、树、详情栏)中,返回第 `flatIndex` 行的数据行。这个编号与滚动位置无关 — 不是当前窗口中可见行里的第几行。分组标题、详情栏返回 `null`;树的行返回该节点的数据行。
|
|
4228
|
+
* `getRowAt(rowIndex)` 使用数据的显示顺序,启用分组、树、详情时两者指向不同的行。
|
|
4229
|
+
*
|
|
4230
|
+
* @param flatIndex - 화면 순서 전체 목록에서의 줄 번호(0부터, 스크롤과 무관)
|
|
4231
|
+
*
|
|
4232
|
+
* Line number in the whole on-screen-order list (0-based, independent of scrolling)
|
|
4233
|
+
*
|
|
4234
|
+
* 画面順の全体一覧での行番号(0 始まり、スクロールと無関係)
|
|
4235
|
+
*
|
|
4236
|
+
* 在画面顺序完整列表中的行号(从 0 开始,与滚动无关)
|
|
4237
|
+
*
|
|
4238
|
+
* @returns 데이터 행, 없으면 `null`
|
|
4239
|
+
*
|
|
4240
|
+
* The data row, or `null`
|
|
4241
|
+
*
|
|
4242
|
+
* データ行、なければ `null`
|
|
4243
|
+
*
|
|
4244
|
+
* 数据行,没有则为 `null`
|
|
4245
|
+
*
|
|
4246
|
+
* @example
|
|
4247
|
+
* const row = grid.getFlatRow(3); // 전체 목록의 넷째 줄(스크롤해도 같은 줄)
|
|
4248
|
+
* if (row) console.log(row.name);
|
|
4249
|
+
*/
|
|
4250
|
+
getFlatRow(flatIndex: number): T | null;
|
|
3791
4251
|
/**
|
|
3792
4252
|
* 화면에 보이는 행 순서와 실제 데이터를 이어 주는 내부 모델을 돌려줍니다(고급 배선용).
|
|
3793
4253
|
*
|
|
@@ -3864,7 +4324,7 @@ export interface OpenGridInstance<T = any> {
|
|
|
3864
4324
|
getColumnDefs(): ColumnDef<T>[];
|
|
3865
4325
|
getAllColumnDefs(): ColumnDef<T>[];
|
|
3866
4326
|
getColumnCount(): number;
|
|
3867
|
-
applyColumns(columns:
|
|
4327
|
+
applyColumns(columns: ColumnOrGroup<T>[]): void;
|
|
3868
4328
|
insertColumn(colDef: ColumnDef<T>, position?: Position): void;
|
|
3869
4329
|
deleteColumn(field: string): void;
|
|
3870
4330
|
hideColumn(field: string | string[]): void;
|
|
@@ -4210,17 +4670,28 @@ export interface OpenGridInstance<T = any> {
|
|
|
4210
4670
|
moveCheckedTo(target: OpenGridInstance<T>): Promise<boolean>;
|
|
4211
4671
|
freeze(columnCount: number): void;
|
|
4212
4672
|
freezeRows(rowCount: number): void;
|
|
4673
|
+
mergeCells(cells: import('./MergeEngine.js').MergeCell[]): void;
|
|
4674
|
+
autoMerge(fields: string[]): void;
|
|
4675
|
+
clearMerge(): void;
|
|
4213
4676
|
groupBy(fields: string[]): void;
|
|
4214
4677
|
clearGroup(): void;
|
|
4215
4678
|
addTreeRow(item: Partial<T>, parentId: string, position?: Position): void;
|
|
4216
4679
|
expandAll(): void;
|
|
4217
4680
|
collapseAll(): void;
|
|
4218
4681
|
expandNodes(ids: string | string[], open?: boolean): void;
|
|
4682
|
+
enableTree(): void;
|
|
4683
|
+
disableTree(): void;
|
|
4684
|
+
expandAllNodes(): void;
|
|
4685
|
+
collapseAllNodes(): void;
|
|
4219
4686
|
exportExcel(options?: ExportOptions | string): void;
|
|
4220
4687
|
exportCsv(options?: ExportOptions | string): void;
|
|
4221
4688
|
exportJson(options?: ExportOptions | string): void;
|
|
4222
4689
|
toArray(keyValue?: boolean): any[];
|
|
4223
4690
|
print(options?: PrintOptions): void;
|
|
4691
|
+
setPageSize(size: number): void;
|
|
4692
|
+
setRowHeight(px: number): void;
|
|
4693
|
+
openFindBar(): void;
|
|
4694
|
+
closeFindBar(): void;
|
|
4224
4695
|
jumpToRow(rowIndex: number): void;
|
|
4225
4696
|
jumpToCol(field: string): void;
|
|
4226
4697
|
getScrollPos(): {
|
|
@@ -4233,6 +4704,12 @@ export interface OpenGridInstance<T = any> {
|
|
|
4233
4704
|
resize(width?: number, height?: number): void;
|
|
4234
4705
|
setTheme(theme: string): void;
|
|
4235
4706
|
setThemeVar(varName: string, value: string): void;
|
|
4707
|
+
setIcon(role: string, svgOrKey: string): OpenGridInstance<T>;
|
|
4708
|
+
renderIcon(role: string, opts?: {
|
|
4709
|
+
size?: number;
|
|
4710
|
+
title?: string;
|
|
4711
|
+
el?: boolean;
|
|
4712
|
+
}): string | SVGElement;
|
|
4236
4713
|
/**
|
|
4237
4714
|
* 스킨(형태 축)을 바꿉니다 — 모서리·테두리·여백 같은 "생김새"만 갈아 끼우고, 색 테마는 그대로 둡니다.
|
|
4238
4715
|
*
|
|
@@ -4351,15 +4828,18 @@ export interface OpenGridInstance<T = any> {
|
|
|
4351
4828
|
openContextMenu(e: MouseEvent, items?: ContextMenuItem[]): void;
|
|
4352
4829
|
closeContextMenu(): void;
|
|
4353
4830
|
setFilterSelect(config: import('./FilterSelect.js').FilterSelectConfig | null): void;
|
|
4354
|
-
addWorksheet(name: string, columns?:
|
|
4831
|
+
addWorksheet(name: string, columns?: ColumnOrGroup<T>[], data?: T[]): void;
|
|
4355
4832
|
removeWorksheet(name: string): void;
|
|
4356
4833
|
switchWorksheet(name: string): void;
|
|
4357
4834
|
renameWorksheet(oldName: string, newName: string): void;
|
|
4358
4835
|
getWorksheet(name: string): WorksheetState<T> | undefined;
|
|
4359
4836
|
getWorksheetNames(): string[];
|
|
4360
4837
|
exportSheetsExcel(filename?: string): void;
|
|
4838
|
+
on<K extends keyof GridEventMap<T>>(event: K, handler: (e: GridEventMap<T>[K]) => void): OpenGridInstance<T>;
|
|
4361
4839
|
on(event: string, handler: Function): OpenGridInstance<T>;
|
|
4840
|
+
once<K extends keyof GridEventMap<T>>(event: K, handler: (e: GridEventMap<T>[K]) => void): OpenGridInstance<T>;
|
|
4362
4841
|
once(event: string, handler: Function): OpenGridInstance<T>;
|
|
4842
|
+
off<K extends keyof GridEventMap<T>>(event: K, handler?: (e: GridEventMap<T>[K]) => void): OpenGridInstance<T>;
|
|
4363
4843
|
off(event: string, handler?: Function): OpenGridInstance<T>;
|
|
4364
4844
|
emit(event: string, data?: any): void;
|
|
4365
4845
|
/**
|
|
@@ -4443,7 +4923,7 @@ export interface WorksheetDef<T = any> {
|
|
|
4443
4923
|
*
|
|
4444
4924
|
* 工作表专用的列(未指定时共用表格的 columns)。
|
|
4445
4925
|
*/
|
|
4446
|
-
columns?:
|
|
4926
|
+
columns?: ColumnOrGroup<T>[];
|
|
4447
4927
|
data?: T[];
|
|
4448
4928
|
}
|
|
4449
4929
|
/**
|
|
@@ -4457,7 +4937,7 @@ export interface WorksheetDef<T = any> {
|
|
|
4457
4937
|
*/
|
|
4458
4938
|
export interface WorksheetState<T = any> {
|
|
4459
4939
|
name: string;
|
|
4460
|
-
columns:
|
|
4940
|
+
columns: ColumnOrGroup<T>[];
|
|
4461
4941
|
data: T[];
|
|
4462
4942
|
}
|
|
4463
4943
|
/**
|