From a3c29b28ad2372a1be7d81d89a4596dfaf97ffe6 Mon Sep 17 00:00:00 2001 From: kjs Date: Mon, 5 Jan 2026 16:02:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EC=88=A8=EA=B9=80=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/panels/ComponentsPanel.tsx | 20 ++------ .../config-panels/UnifiedListConfigPanel.tsx | 2 - frontend/types/input-types.ts | 46 ++++++++++--------- 3 files changed, 28 insertions(+), 40 deletions(-) diff --git a/frontend/components/screen/panels/ComponentsPanel.tsx b/frontend/components/screen/panels/ComponentsPanel.tsx index d332df20..329b4493 100644 --- a/frontend/components/screen/panels/ComponentsPanel.tsx +++ b/frontend/components/screen/panels/ComponentsPanel.tsx @@ -82,23 +82,9 @@ export function ComponentsPanel({ tags: ["table", "list", "card", "kanban", "unified"], defaultSize: { width: 600, height: 400 }, }, - { - id: "unified-media", - name: "통합 미디어", - description: "이미지, 비디오, 오디오, 파일 업로드 등 미디어 컴포넌트", - category: "display" as ComponentCategory, - tags: ["image", "video", "audio", "file", "unified"], - defaultSize: { width: 300, height: 200 }, - }, + // unified-media 제거 - 테이블 컬럼의 image/file 입력 타입으로 사용 // unified-biz 제거 - 개별 컴포넌트(flow-widget, rack-structure, numbering-rule)로 직접 표시 - { - id: "unified-hierarchy", - name: "통합 계층", - description: "트리, 조직도, BOM, 연쇄 선택박스 등 계층 구조 컴포넌트", - category: "data" as ComponentCategory, - tags: ["tree", "org", "bom", "cascading", "unified"], - defaultSize: { width: 400, height: 300 }, - }, + // unified-hierarchy 제거 - 현재 미사용 { id: "unified-repeater", name: "통합 반복 데이터", @@ -148,6 +134,8 @@ export function ComponentsPanel({ "accordion-basic", // 아코디언 컴포넌트 "conditional-container", // 조건부 컨테이너 "universal-form-modal", // 범용 폼 모달 + // 통합 미디어 (테이블 컬럼 입력 타입으로 사용) + "unified-media", // → 테이블 컬럼의 image/file 입력 타입으로 사용 ]; return { diff --git a/frontend/components/unified/config-panels/UnifiedListConfigPanel.tsx b/frontend/components/unified/config-panels/UnifiedListConfigPanel.tsx index 8bec43ff..5eb19bd5 100644 --- a/frontend/components/unified/config-panels/UnifiedListConfigPanel.tsx +++ b/frontend/components/unified/config-panels/UnifiedListConfigPanel.tsx @@ -238,8 +238,6 @@ export const UnifiedListConfigPanel: React.FC = ({ 테이블 카드 - 칸반 - 리스트 diff --git a/frontend/types/input-types.ts b/frontend/types/input-types.ts index e3944cf1..0956c721 100644 --- a/frontend/types/input-types.ts +++ b/frontend/types/input-types.ts @@ -8,7 +8,6 @@ // 핵심 입력 타입 export type InputType = | "text" // 텍스트 - | "textarea" // 텍스트 에리어 (여러 줄 입력) | "number" // 숫자 | "date" // 날짜 | "code" // 코드 @@ -17,7 +16,8 @@ export type InputType = | "select" // 선택박스 | "checkbox" // 체크박스 | "radio" // 라디오버튼 - | "image"; // 이미지 + | "image" // 이미지 + | "file"; // 파일 // 입력 타입 옵션 정의 export interface InputTypeOption { @@ -43,13 +43,6 @@ export const INPUT_TYPE_OPTIONS: InputTypeOption[] = [ category: "basic", icon: "Type", }, - { - value: "textarea", - label: "텍스트 에리어", - description: "여러 줄 텍스트 입력", - category: "basic", - icon: "AlignLeft", - }, { value: "number", label: "숫자", @@ -113,6 +106,13 @@ export const INPUT_TYPE_OPTIONS: InputTypeOption[] = [ category: "basic", icon: "Image", }, + { + value: "file", + label: "파일", + description: "파일 업로드/다운로드", + category: "basic", + icon: "File", + }, ]; // 카테고리별 입력 타입 그룹화 @@ -138,11 +138,6 @@ export const INPUT_TYPE_DEFAULT_CONFIGS: Record> maxLength: 500, placeholder: "텍스트를 입력하세요", }, - textarea: { - maxLength: 2000, - rows: 4, - placeholder: "내용을 입력하세요", - }, number: { min: 0, step: 1, @@ -180,13 +175,18 @@ export const INPUT_TYPE_DEFAULT_CONFIGS: Record> placeholder: "이미지를 선택하세요", accept: "image/*", }, + file: { + placeholder: "파일을 선택하세요", + accept: "*/*", + maxSize: 10485760, // 10MB + }, }; // 레거시 웹 타입 → 입력 타입 매핑 export const WEB_TYPE_TO_INPUT_TYPE: Record = { // 텍스트 관련 text: "text", - textarea: "textarea", + textarea: "text", email: "text", tel: "text", url: "text", @@ -213,15 +213,17 @@ export const WEB_TYPE_TO_INPUT_TYPE: Record = { entity: "entity", category: "category", + // 파일/이미지 관련 + file: "file", + image: "image", + // 기타 (기본값: text) - file: "text", button: "text", }; // 입력 타입 → 웹 타입 역매핑 (화면관리 시스템 호환용) export const INPUT_TYPE_TO_WEB_TYPE: Record = { text: "text", - textarea: "textarea", number: "number", date: "date", code: "code", @@ -231,6 +233,7 @@ export const INPUT_TYPE_TO_WEB_TYPE: Record = { checkbox: "checkbox", radio: "radio", image: "image", + file: "file", }; // 입력 타입 변환 함수 @@ -245,11 +248,6 @@ export const INPUT_TYPE_VALIDATION_RULES: Record> trim: true, maxLength: 500, }, - textarea: { - type: "string", - trim: true, - maxLength: 2000, - }, number: { type: "number", allowFloat: true, @@ -286,4 +284,8 @@ export const INPUT_TYPE_VALIDATION_RULES: Record> type: "string", required: false, }, + file: { + type: "string", + required: false, + }, };