"use client"; import React from "react"; import { createComponentDefinition } from "../../utils/createComponentDefinition"; import { ComponentCategory } from "@/types/component"; import { RackStructureWrapper } from "./RackStructureComponent"; import { RackStructureConfigPanel } from "./RackStructureConfigPanel"; import { defaultConfig } from "./config"; /** * 렉 구조 컴포넌트 정의 * 창고 렉 위치를 일괄 생성하기 위한 구조 설정 컴포넌트 */ export const RackStructureDefinition = createComponentDefinition({ id: "rack-structure", name: "렉 구조 설정", nameEng: "Rack Structure Config", description: "창고 렉 위치를 열 범위와 단 수로 일괄 생성하는 컴포넌트", category: ComponentCategory.INPUT, webType: "component", component: RackStructureWrapper, defaultConfig: defaultConfig, defaultSize: { width: 1200, height: 800, gridColumnSpan: "12", }, configPanel: RackStructureConfigPanel, icon: "LayoutGrid", tags: ["창고", "렉", "위치", "구조", "일괄생성", "WMS"], version: "1.0.0", author: "개발팀", documentation: ` 창고 렉 위치를 일괄 생성하기 위한 구조 설정 컴포넌트입니다. ## 주요 기능 - 조건별 열 범위 및 단 수 설정 - 자동 위치 코드/이름 생성 - 미리보기 및 통계 표시 - 템플릿 저장/불러오기 ## 사용 방법 1. 상위 폼에서 창고, 층, 구역 정보 선택 2. 조건 추가 버튼으로 렉 라인 조건 생성 3. 각 조건의 열 범위와 단 수 입력 4. 미리보기 생성으로 결과 확인 5. 저장 시 생성된 위치 데이터가 함께 저장됨 ## 컨텍스트 데이터 formData에서 다음 필드를 자동으로 읽어옵니다: - warehouse_id / warehouseId: 창고 ID - warehouse_code / warehouseCode: 창고 코드 - floor: 층 - zone: 구역 - location_type / locationType: 위치 유형 - status: 사용 여부 `, }); // 타입 내보내기 export type { RackStructureComponentConfig, RackStructureContext, RackLineCondition, RackStructureTemplate, GeneratedLocation, } from "./types"; // 컴포넌트 내보내기 export { RackStructureComponent, RackStructureWrapper } from "./RackStructureComponent"; export { RackStructureRenderer } from "./RackStructureRenderer"; export { RackStructureConfigPanel } from "./RackStructureConfigPanel";