"use client"; /** * pop-card-list 컴포넌트 레지스트리 등록 진입점 (V2) * * 이 파일을 import하면 side-effect로 PopComponentRegistry에 자동 등록됨 */ import { PopComponentRegistry } from "../../PopComponentRegistry"; import { PopCardListComponent } from "./PopCardListComponent"; import { PopCardListConfigPanel } from "./PopCardListConfig"; import { PopCardListPreviewComponent } from "./PopCardListPreview"; import type { PopCardListConfig } from "../types"; import { DEFAULT_CARD_IMAGE } from "../types"; // 기본 설정값 (V2 구조) const defaultConfig: PopCardListConfig = { // 데이터 소스 (테이블 단위) dataSource: { tableName: "", }, // 카드 템플릿 cardTemplate: { header: { codeField: undefined, titleField: undefined, }, image: { enabled: true, imageColumn: undefined, defaultImage: DEFAULT_CARD_IMAGE, }, body: { fields: [], }, }, // 레이아웃 설정 layoutMode: "grid", cardsPerRow: 3, cardSize: "medium", }; // 레지스트리 등록 PopComponentRegistry.registerComponent({ id: "pop-card-list", name: "카드 목록", description: "테이블 데이터를 카드 형태로 표시 (헤더 + 이미지 + 필드 목록)", category: "display", icon: "LayoutGrid", component: PopCardListComponent, configPanel: PopCardListConfigPanel, preview: PopCardListPreviewComponent, defaultProps: defaultConfig, touchOptimized: true, supportedDevices: ["mobile", "tablet"], });