feature/v2-unified-renewal #379

Merged
kjs merged 145 commits from feature/v2-unified-renewal into main 2026-02-03 12:11:19 +09:00
1 changed files with 5 additions and 9 deletions
Showing only changes of commit d69d509893 - Show all commits

View File

@ -2229,11 +2229,11 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
if (repeatContainer) {
const containerId = repeatContainer.getAttribute("data-component-id");
if (containerId) {
console.log("리피터 컨테이너 내부 드롭 감지:", { containerId, component });
// 해당 리피터 컨테이너 찾기
const targetComponent = layout.components.find((c) => c.id === containerId);
if (targetComponent && (targetComponent as any).componentType === "repeat-container") {
const compType = (targetComponent as any)?.componentType;
// v2-repeat-container 또는 repeat-container 모두 지원
if (targetComponent && (compType === "repeat-container" || compType === "v2-repeat-container")) {
const currentConfig = (targetComponent as any).componentConfig || {};
const currentChildren = currentConfig.children || [];
@ -2266,7 +2266,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
setLayout(newLayout);
saveToHistory(newLayout);
console.log("리피터 컨테이너에 컴포넌트 추가 완료:", newChild);
return; // 리피터 컨테이너 처리 완료
}
}
@ -2617,10 +2616,9 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
if (repeatContainer && type === "column" && column) {
const containerId = repeatContainer.getAttribute("data-component-id");
if (containerId) {
console.log("리피터 컨테이너 내부에 컬럼 드롭:", { containerId, column });
const targetComponent = layout.components.find((c) => c.id === containerId);
if (targetComponent && (targetComponent as any).componentType === "repeat-container") {
const rcType = (targetComponent as any)?.componentType;
if (targetComponent && (rcType === "repeat-container" || rcType === "v2-repeat-container")) {
const currentConfig = (targetComponent as any).componentConfig || {};
const currentChildren = currentConfig.children || [];
@ -2652,7 +2650,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
setLayout(newLayout);
saveToHistory(newLayout);
console.log("리피터 컨테이너에 컬럼 기반 컴포넌트 추가 완료:", newChild);
return;
}
}
@ -4786,7 +4783,6 @@ export default function ScreenDesigner({ selectedScreen, onBackToList }: ScreenD
onDropCapture={(e) => {
// 캡처 단계에서 드롭 이벤트를 처리하여 자식 요소 드롭도 감지
e.preventDefault();
console.log("🎯 캔버스 드롭 이벤트 (캡처), target:", (e.target as HTMLElement).tagName, (e.target as HTMLElement).getAttribute("data-repeat-container"));
handleDrop(e);
}}
>