feat(pop-field): 섹션 기반 멀티필드 입력 컴포넌트 구현
pop-field 컴포넌트 전체 구현 (types, component, config, registry): - 6개 서브타입 (text/number/date/select/auto/numpad) - 섹션 기반 레이아웃 (summary/form, auto 열 수 계산) - 저장 탭 5섹션 (테이블/읽기/입력/숨은/자동생성 필드) - 자동생성 레이아웃 연결 (linkedFieldId) - 숨은 필드 DB/JSON 소스 선택 (JsonKeySelect 재사용) - 채번 규칙 API 연동 (getAvailableNumberingRulesForScreen) - 저장 탭 섹션별 접기/펼치기 토글 - 팔레트 4곳 등록 + index.ts 활성화
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { useDrag } from "react-dnd";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { PopComponentType } from "../types/pop-layout";
|
||||
import { Square, FileText, MousePointer, BarChart3, LayoutGrid, MousePointerClick, List, Search } from "lucide-react";
|
||||
import { Square, FileText, MousePointer, BarChart3, LayoutGrid, MousePointerClick, List, Search, TextCursorInput } from "lucide-react";
|
||||
import { DND_ITEM_TYPES } from "../constants";
|
||||
|
||||
// 컴포넌트 정의
|
||||
@@ -63,6 +63,12 @@ const PALETTE_ITEMS: PaletteItem[] = [
|
||||
icon: Search,
|
||||
description: "조건 입력 (텍스트/날짜/선택/모달)",
|
||||
},
|
||||
{
|
||||
type: "pop-field",
|
||||
label: "입력 필드",
|
||||
icon: TextCursorInput,
|
||||
description: "저장용 값 입력 (섹션별 멀티필드)",
|
||||
},
|
||||
];
|
||||
|
||||
// 드래그 가능한 컴포넌트 아이템
|
||||
|
||||
@@ -75,6 +75,7 @@ const COMPONENT_TYPE_LABELS: Record<PopComponentType, string> = {
|
||||
"pop-button": "버튼",
|
||||
"pop-string-list": "리스트 목록",
|
||||
"pop-search": "검색",
|
||||
"pop-field": "입력",
|
||||
};
|
||||
|
||||
// ========================================
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/**
|
||||
* POP 컴포넌트 타입
|
||||
*/
|
||||
export type PopComponentType = "pop-sample" | "pop-text" | "pop-icon" | "pop-dashboard" | "pop-card-list" | "pop-button" | "pop-string-list" | "pop-search";
|
||||
export type PopComponentType = "pop-sample" | "pop-text" | "pop-icon" | "pop-dashboard" | "pop-card-list" | "pop-button" | "pop-string-list" | "pop-search" | "pop-field";
|
||||
|
||||
/**
|
||||
* 데이터 흐름 정의
|
||||
@@ -361,6 +361,7 @@ export const DEFAULT_COMPONENT_GRID_SIZE: Record<PopComponentType, { colSpan: nu
|
||||
"pop-button": { colSpan: 2, rowSpan: 1 },
|
||||
"pop-string-list": { colSpan: 4, rowSpan: 3 },
|
||||
"pop-search": { colSpan: 4, rowSpan: 2 },
|
||||
"pop-field": { colSpan: 6, rowSpan: 2 },
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user