From 42be94ad36b93864a2e42ae547b4abefbe679d09 Mon Sep 17 00:00:00 2001 From: DDD1542 Date: Thu, 12 Mar 2026 04:25:34 +0900 Subject: [PATCH] [agent-pipeline] pipe-20260311185722-je7c round-5 --- .../v2/config-panels/V2ListConfigPanel.tsx | 57 ++++++++++++-- .../config-panels/V2RepeaterConfigPanel.tsx | 75 +++++++++++++------ 2 files changed, 102 insertions(+), 30 deletions(-) diff --git a/frontend/components/v2/config-panels/V2ListConfigPanel.tsx b/frontend/components/v2/config-panels/V2ListConfigPanel.tsx index ec110ecc..56ab3950 100644 --- a/frontend/components/v2/config-panels/V2ListConfigPanel.tsx +++ b/frontend/components/v2/config-panels/V2ListConfigPanel.tsx @@ -70,25 +70,42 @@ export const V2ListConfigPanel: React.FC = ({ customTableName: config.customTableName, isReadOnly: config.isReadOnly !== false, displayMode: "table", + showHeader: true, + showFooter: false, pagination: config.pagination !== false ? { enabled: true, pageSize: config.pageSize || 10, - position: "bottom", - showPageSize: true, + showSizeSelector: true, + showPageInfo: true, pageSizeOptions: [5, 10, 20, 50, 100], } : { enabled: false, pageSize: 10, - position: "bottom", - showPageSize: false, + showSizeSelector: false, + showPageInfo: false, pageSizeOptions: [10], }, - filter: config.filter, + filter: config.filter || { enabled: false, filters: [] }, dataFilter: config.dataFilter, + actions: config.actions || { + showActions: false, + actions: [], + bulkActions: false, + bulkActionList: [], + }, + tableStyle: config.tableStyle || { + theme: "default", + headerStyle: "default", + rowHeight: "normal", + alternateRows: false, + hoverEffect: true, + borderStyle: "light", + }, checkbox: { enabled: true, + multiple: true, position: "left", - showHeader: true, + selectAll: true, }, height: "auto", autoWidth: true, @@ -99,6 +116,10 @@ export const V2ListConfigPanel: React.FC = ({ minColumnWidth: 100, maxColumnWidth: 300, }, + toolbar: config.toolbar, + linkedFilters: config.linkedFilters, + excludeFilter: config.excludeFilter, + defaultSort: config.defaultSort, }; }, [config, currentTableName]); @@ -158,6 +179,30 @@ export const V2ListConfigPanel: React.FC = ({ newConfig.dataFilter = partialConfig.dataFilter; } + if (partialConfig.actions !== undefined) { + newConfig.actions = partialConfig.actions; + } + + if (partialConfig.tableStyle !== undefined) { + newConfig.tableStyle = partialConfig.tableStyle; + } + + if (partialConfig.toolbar !== undefined) { + newConfig.toolbar = partialConfig.toolbar; + } + + if (partialConfig.linkedFilters !== undefined) { + newConfig.linkedFilters = partialConfig.linkedFilters; + } + + if (partialConfig.excludeFilter !== undefined) { + newConfig.excludeFilter = partialConfig.excludeFilter; + } + + if (partialConfig.defaultSort !== undefined) { + newConfig.defaultSort = partialConfig.defaultSort; + } + onChange(newConfig); }; diff --git a/frontend/components/v2/config-panels/V2RepeaterConfigPanel.tsx b/frontend/components/v2/config-panels/V2RepeaterConfigPanel.tsx index 73efa3d1..e3ef080f 100644 --- a/frontend/components/v2/config-panels/V2RepeaterConfigPanel.tsx +++ b/frontend/components/v2/config-panels/V2RepeaterConfigPanel.tsx @@ -117,24 +117,27 @@ export const V2RepeaterConfigPanel: React.FC = ({ const currentTableName = screenTableName || propCurrentTableName; // config 안전하게 초기화 - const config: V2RepeaterConfig = useMemo(() => ({ - ...DEFAULT_REPEATER_CONFIG, - ...propConfig, - renderMode: propConfig?.renderMode || DEFAULT_REPEATER_CONFIG.renderMode, - dataSource: { - ...DEFAULT_REPEATER_CONFIG.dataSource, - ...propConfig?.dataSource, - }, - columns: propConfig?.columns || [], - modal: { - ...DEFAULT_REPEATER_CONFIG.modal, - ...propConfig?.modal, - }, - features: { - ...DEFAULT_REPEATER_CONFIG.features, - ...propConfig?.features, - }, - }), [propConfig]); + const config: V2RepeaterConfig = useMemo(() => { + const merged = { + ...DEFAULT_REPEATER_CONFIG, + ...propConfig, + renderMode: propConfig?.renderMode || DEFAULT_REPEATER_CONFIG.renderMode, + dataSource: { + ...DEFAULT_REPEATER_CONFIG.dataSource, + ...propConfig?.dataSource, + }, + columns: propConfig?.columns || [], + modal: { + ...DEFAULT_REPEATER_CONFIG.modal, + ...propConfig?.modal, + } as V2RepeaterConfig["modal"], + features: { + ...DEFAULT_REPEATER_CONFIG.features, + ...propConfig?.features, + } as V2RepeaterConfig["features"], + }; + return merged as V2RepeaterConfig; + }, [propConfig]); // 상태 관리 const [currentTableColumns, setCurrentTableColumns] = useState([]); // 현재 테이블 컬럼 @@ -444,7 +447,7 @@ export const V2RepeaterConfigPanel: React.FC = ({ const updateModal = useCallback( (field: string, value: any) => { updateConfig({ - modal: { ...config.modal, [field]: value }, + modal: { ...config.modal, [field]: value } as V2RepeaterConfig["modal"], }); }, [config.modal, updateConfig], @@ -737,11 +740,10 @@ export const V2RepeaterConfigPanel: React.FC = ({ modal: { ...config.modal, searchFields: selectedEntity.displayColumn ? [selectedEntity.displayColumn] : [], - // 라벨 포함 형식으로 저장 sourceDisplayColumns: selectedEntity.displayColumn ? [{ key: selectedEntity.displayColumn, label: displayLabel }] : [], - }, + } as V2RepeaterConfig["modal"], }); } }; @@ -804,7 +806,7 @@ export const V2RepeaterConfigPanel: React.FC = ({ ...config.modal, searchFields: [], sourceDisplayColumns: [], - }, + } as V2RepeaterConfig["modal"], }); } else { updateConfig({ renderMode: newMode }); @@ -1090,6 +1092,31 @@ export const V2RepeaterConfigPanel: React.FC = ({ )} + + {/* 모달 표시 설정 */} +
+ 모달 표시 설정 +
+
+ + updateModal("title", e.target.value)} + placeholder="항목 검색" + className="h-7 text-xs" + /> +
+
+ + updateModal("buttonText", e.target.value)} + placeholder="검색" + className="h-7 text-xs" + /> +
+
+
)} @@ -1441,7 +1468,7 @@ export const V2RepeaterConfigPanel: React.FC = ({ )} {col.isSourceDisplay ? ( - + ) : ( )} @@ -1470,7 +1497,7 @@ export const V2RepeaterConfigPanel: React.FC = ({ {/* 자동입력 표시 아이콘 */} {!col.isSourceDisplay && col.autoFill?.type && col.autoFill.type !== "none" && ( - + )} {/* 편집 가능 토글 */}