/** * V2Select 컴포넌트 정의 * * 드롭다운, 콤보박스, 라디오, 체크박스 등 다양한 선택 모드를 지원하는 통합 선택 컴포넌트 */ import { ComponentCategory } from "@/types/component"; import { createComponentDefinition } from "../../utils/createComponentDefinition"; import { V2SelectConfigPanel } from "@/components/v2/config-panels/V2SelectConfigPanel"; import { V2Select } from "@/components/v2/V2Select"; export const V2SelectDefinition = createComponentDefinition({ id: "v2-select", name: "V2 선택", description: "드롭다운, 콤보박스, 라디오, 체크박스 등 다양한 선택 모드 지원", category: ComponentCategory.INPUT, webType: "select", version: "2.0.0", component: V2Select, // 기본 속성 defaultProps: { config: { mode: "dropdown", source: "distinct", // 기본: 테이블 컬럼에서 distinct 값 자동 로드 multiple: false, searchable: true, placeholder: "선택하세요", required: false, readonly: false, disabled: false, }, }, // 설정 스키마 configSchema: { mode: { type: "select", label: "선택 모드", options: [ { value: "dropdown", label: "드롭다운" }, { value: "combobox", label: "콤보박스 (검색)" }, { value: "radio", label: "라디오 버튼" }, { value: "check", label: "체크박스" }, { value: "tag", label: "태그" }, { value: "tagbox", label: "태그박스 (태그+드롭다운)" }, { value: "toggle", label: "토글" }, { value: "swap", label: "스왑 (좌우 이동)" }, ], }, source: { type: "select", label: "데이터 소스", options: [ { value: "distinct", label: "테이블 컬럼 (자동)" }, { value: "static", label: "정적 옵션" }, { value: "code", label: "공통코드" }, { value: "entity", label: "엔티티 참조" }, ], }, multiple: { type: "boolean", label: "다중 선택", }, searchable: { type: "boolean", label: "검색 가능", }, required: { type: "boolean", label: "필수 선택", }, }, // 이벤트 events: ["onChange", "onSearch", "onClear"], // 아이콘 icon: "ChevronDown", // 태그 tags: ["select", "dropdown", "combobox", "v2"], // 설정 패널 configPanel: V2SelectConfigPanel, }); export default V2SelectDefinition;