콘텐츠로 이동
Data TableAPI Reference

공개 import 경로

comins-table@0.2.2React

comins-table은 아래 다섯 경로를 공개합니다. 목록에 없는 dist/* 내부 파일은 직접 import하지 마십시오.

import { CominsTable, createCominsTableState } from 'comins-table';

React 컴포넌트와 공개 타입, Core 함수, Tree·Summary helper를 함께 제공합니다. 일반적인 애플리케이션 코드는 루트 경로를 사용합니다.

import {
createCominsTableState,
parseCominsClipboardText,
pasteCominsText,
} from 'comins-table/core';

프레임워크 중립 런타임과 타입을 제공합니다. Column·Group label은 문자열이며 theme과 renderer 메타데이터를 포함하지 않습니다. 셀 정책은 cell.disabled, cell.copyable, cell.pasteable로 직접 지정합니다. DOM이나 OS 클립보드를 직접 다루지 않습니다.

import {
copyCominsCellRange,
parseCominsClipboardText,
pasteCominsText,
} from 'comins-table/clipboard';

복사·붙여넣기·채우기 함수와 관련 타입만 제공하는 보조 경로입니다. 루트와 동일한 React 상태 계약을 유지합니다. 중립 상태에는 /core의 함수를 사용하며 두 상태 계약을 혼용하지 않습니다.

import {
selectCellRange,
clearCominsSelection,
getCominsSelectedCellRange,
} from 'comins-table/selection';

React 상태의 행·셀 선택 함수와 선택 타입을 제공하는 보조 경로입니다. 중립 상태의 선택에는 /core 함수를 사용합니다.

import 'comins-table/styles.css';

Table 레이아웃과 기본 테마에 필요한 공개 스타일 entry입니다. 애플리케이션 진입점에서 한 번 불러오십시오.

공개 경로의 export 목록은 패키지 exports 계약을 기준으로 검사합니다. comins-table/dist/core.js처럼 내부 파일을 직접 참조하면 패키지 구조 변경 시 깨질 수 있으며 지원 대상이 아닙니다.

루트와 /clipboard, /selection은 React 상태 계약을 유지합니다. /core는 중립 런타임·타입을 제공하며 label은 문자열, 셀 정책은 cell.disabled, cell.copyable, cell.pasteable로 지정합니다. JSX label, cell.props, 테마·렌더러 helper가 필요하면 루트를 사용합니다. React peer dependency와 Table의 client-only 경계는 유지됩니다. 0.2.0 마이그레이션을 참고합니다.

comins-table/xlsx

import { inspectCominsXlsx, importCominsRowsFromXlsx, exportCominsRowsToXlsx } from 'comins-table/xlsx';

일반 행의 Excel 입출력을 Uint8Array/ArrayBuffer로 처리합니다. 파일 선택·저장·Worker 실행은 애플리케이션이 소유합니다. Excel 가이드를 참고하십시오.