From b4aec05512dfdd4fa1f9403be36622cc11538eb0 Mon Sep 17 00:00:00 2001 From: DDD1542 Date: Thu, 12 Mar 2026 00:34:36 +0900 Subject: [PATCH] [agent-pipeline] pipe-20260311151253-nyk7 round-6 --- .../config-panels/V2TableListConfigPanel.tsx | 53 +++++++++++++++++++ .../components/v2-table-list/index.ts | 4 +- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 frontend/components/v2/config-panels/V2TableListConfigPanel.tsx diff --git a/frontend/components/v2/config-panels/V2TableListConfigPanel.tsx b/frontend/components/v2/config-panels/V2TableListConfigPanel.tsx new file mode 100644 index 00000000..14f07f96 --- /dev/null +++ b/frontend/components/v2/config-panels/V2TableListConfigPanel.tsx @@ -0,0 +1,53 @@ +"use client"; + +/** + * V2TableList 설정 패널 + * 기존 TableListConfigPanel의 모든 복잡한 로직(테이블 선택, 컬럼 DnD, 엔티티 조인, + * 데이터 필터, 페이지네이션, 툴바, 체크박스, 정렬, 가로 스크롤 등)을 유지하면서 + * componentConfigChanged 이벤트를 추가하여 실시간 업데이트 지원 + */ + +import React from "react"; +import { TableListConfigPanel } from "@/lib/registry/components/v2-table-list/TableListConfigPanel"; +import type { TableListConfig } from "@/lib/registry/components/v2-table-list/types"; + +interface V2TableListConfigPanelProps { + config: TableListConfig; + onChange: (config: Partial) => void; + screenTableName?: string; + tableColumns?: any[]; + menuObjid?: number; +} + +export const V2TableListConfigPanel: React.FC = ({ + config, + onChange, + screenTableName, + tableColumns, + menuObjid, +}) => { + const handleChange = (newConfig: Partial) => { + onChange(newConfig); + + if (typeof window !== "undefined") { + window.dispatchEvent( + new CustomEvent("componentConfigChanged", { + detail: { config: { ...config, ...newConfig } }, + }) + ); + } + }; + + return ( + + ); +}; + +V2TableListConfigPanel.displayName = "V2TableListConfigPanel"; + +export default V2TableListConfigPanel; diff --git a/frontend/lib/registry/components/v2-table-list/index.ts b/frontend/lib/registry/components/v2-table-list/index.ts index 7f87e5dd..d19953cd 100644 --- a/frontend/lib/registry/components/v2-table-list/index.ts +++ b/frontend/lib/registry/components/v2-table-list/index.ts @@ -5,7 +5,7 @@ import { createComponentDefinition } from "../../utils/createComponentDefinition import { ComponentCategory } from "@/types/component"; import type { WebType } from "@/types/screen"; import { TableListWrapper } from "./TableListComponent"; -import { TableListConfigPanel } from "./TableListConfigPanel"; +import { V2TableListConfigPanel } from "@/components/v2/config-panels/V2TableListConfigPanel"; import { TableListConfig } from "./types"; /** @@ -109,7 +109,7 @@ export const V2TableListDefinition = createComponentDefinition({ autoLoad: true, }, defaultSize: { width: 1000, height: 600 }, // 테이블 리스트 기본 크기 (너비 1000px, 높이 600px) - configPanel: TableListConfigPanel, + configPanel: V2TableListConfigPanel, icon: "Table", tags: ["테이블", "데이터", "목록", "그리드"], version: "1.0.0",