/** * 테이블 옵션 관련 타입 정의 */ /** * 테이블 필터 조건 */ export interface TableFilter { columnName: string; operator: | "equals" | "contains" | "startsWith" | "endsWith" | "gt" | "lt" | "gte" | "lte" | "notEquals"; value: string | number | boolean; } /** * 컬럼 표시 설정 */ export interface ColumnVisibility { columnName: string; visible: boolean; width?: number; order?: number; fixed?: boolean; // 좌측 고정 여부 } /** * 테이블 컬럼 정보 */ export interface TableColumn { columnName: string; columnLabel: string; inputType: string; visible: boolean; width: number; sortable?: boolean; filterable?: boolean; } /** * 테이블 등록 정보 */ export interface TableRegistration { tableId: string; // 고유 ID (예: "table-list-123") label: string; // 사용자에게 보이는 이름 (예: "품목 관리") tableName: string; // 실제 DB 테이블명 (예: "item_info") columns: TableColumn[]; // 콜백 함수들 onFilterChange: (filters: TableFilter[]) => void; onGroupChange: (groups: string[]) => void; onColumnVisibilityChange: (columns: ColumnVisibility[]) => void; } /** * Context 값 타입 */ export interface TableOptionsContextValue { registeredTables: Map; registerTable: (registration: TableRegistration) => void; unregisterTable: (tableId: string) => void; getTable: (tableId: string) => TableRegistration | undefined; selectedTableId: string | null; setSelectedTableId: (tableId: string | null) => void; }