@ehfuse/mui-virtual-data-table 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/dist/types.d.ts CHANGED
@@ -76,6 +76,22 @@ export interface DataColumn<T> {
76
76
  * 틀이 그보다 좁으면 가로로 민다 — 제목처럼 남는 폭을 다 가져가되 좁은 화면에서 0 으로 접히면 안 되는 열.
77
77
  */
78
78
  minWidth?: number;
79
+ /**
80
+ * 머리 우클릭 메뉴의 거르기 값 목록(1.4.0). onFilterChange 와 함께 주면 머리를 우클릭했을 때 이 값들이 고르기 목록으로 뜬다.
81
+ * 값은 글자다(빈 글자 = 비어 있음 같은 값도 그대로 쓴다). 거르는 일 자체는 소비처가 한다 — 표는 고른 값만 알린다.
82
+ */
83
+ filterOptions?: {
84
+ value: string;
85
+ label: string;
86
+ }[];
87
+ /** 지금 걸린 거르기 값(1.4.0). 하나라도 있으면 머리글이 강조색 + 거르기 아이콘으로 선다(걸린 줄 모르고 "왜 몇 줄 없지" 하지 않게). */
88
+ filterValues?: string[];
89
+ /** 거르기 값이 바뀔 때(1.4.0) — 다 풀면 빈 배열. */
90
+ onFilterChange?: (values: string[]) => void;
91
+ /** 여러 값을 함께 고르는지(기본 true). false 면 하나만 — 고르면 메뉴가 닫히고, 같은 값을 다시 고르면 풀린다. */
92
+ filterMultiple?: boolean;
93
+ /** false 면 이 열은 머리 우클릭 메뉴를 띄우지 않는다(브라우저 메뉴는 여전히 막는다, 1.4.0). */
94
+ headerMenu?: boolean;
79
95
  }
80
96
  /** 정렬 방향 타입 */
81
97
  export type SortDirection = "asc" | "desc";
@@ -114,6 +130,17 @@ export interface VirtualDataTableProps<T> {
114
130
  striped?: string | boolean;
115
131
  rowDivider?: boolean;
116
132
  onSort?: (columnId: string, direction: SortDirection) => void;
133
+ /**
134
+ * 정렬 풀기(1.4.0) — 주면 머리 우클릭 메뉴에 "정렬 풀기" 가 서고(그 열로 정렬 중일 때), 같은 방향을 다시 고르면 이것을 부른다.
135
+ * 기본 정렬로 되돌릴 수 있는 목록만 준다.
136
+ */
137
+ onSortClear?: () => void;
138
+ /**
139
+ * 머리 칸 우클릭(1.4.0). 브라우저 메뉴는 늘 막는다. true 를 돌려주거나 event.preventDefault() 를 부르면 "처리했다" 로 보고
140
+ * 기본 머리 메뉴(정렬 · 거르기)를 띄우지 않는다 — 화면이 이미 가진 머리 메뉴를 우클릭에도 열 때 쓴다.
141
+ * 묶음 머리(group) 칸에서는 부르지 않는다.
142
+ */
143
+ onHeaderContextMenu?: (column: DataColumn<T>, event: React.MouseEvent<HTMLTableCellElement>) => boolean | void;
117
144
  onLoadMore?: (offset: number, limit: number) => void;
118
145
  sortBy?: string;
119
146
  sortDirection?: SortDirection;
@@ -145,6 +172,11 @@ export interface VirtualDataTableProps<T> {
145
172
  * 테두리 · 여백 없이 표만 그리고 표 바탕을 종이 색으로 칠한다.
146
173
  */
147
174
  framed?: boolean;
175
+ /**
176
+ * 머리 줄 윗선(노션풍 · framed={false} 일 때). 틀 없는 표를 머리 줄(도구 줄)과 한 상자에 넣으면 표 머리 위가 경계 없이 붙는다 —
177
+ * 이 선이 그 경계를 긋는다. 틀이 있는 표는 바깥 테두리가 윗선이라 쓰지 않는다. 기본 false.
178
+ */
179
+ headerTopBorder?: boolean;
148
180
  /**
149
181
  * 줄 높이 방식. "fixed"(기본)는 모든 줄을 rowHeight 로 박는다(합계 줄 떨림 방지). "auto" 는 rowHeight 를 최소 높이로 두고
150
182
  * 내용(여러 줄 글 · 칸 안 단추 두 줄)만큼 늘어난다.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/mui-virtual-data-table",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "A high-performance virtual data table component for React with Material-UI integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",