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
3 changed files with 1256 additions and 800 deletions
Showing only changes of commit a4862c45f4 - Show all commits

File diff suppressed because it is too large Load Diff

View File

@ -499,9 +499,9 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
); );
} }
// 탭 컴포넌트 처리 // 탭 컴포넌트 처리 (v1, v2 모두 지원)
const componentType = (comp as any).componentType || (comp as any).componentId; const componentType = (comp as any).componentType || (comp as any).componentId;
if (comp.type === "tabs" || (comp.type === "component" && componentType === "tabs-widget")) { if (comp.type === "tabs" || (comp.type === "component" && (componentType === "tabs-widget" || componentType === "v2-tabs-widget"))) {
const TabsWidget = require("@/components/screen/widgets/TabsWidget").TabsWidget; const TabsWidget = require("@/components/screen/widgets/TabsWidget").TabsWidget;
// componentConfig에서 탭 정보 추출 // componentConfig에서 탭 정보 추출
@ -517,19 +517,13 @@ export const InteractiveScreenViewer: React.FC<InteractiveScreenViewerProps> = (
persistSelection: tabsConfig.persistSelection || false, persistSelection: tabsConfig.persistSelection || false,
}; };
console.log("🔍 탭 컴포넌트 렌더링:", {
originalType: comp.type,
componentType,
componentId: (comp as any).componentId,
tabs: tabsComponent.tabs,
tabsConfig,
});
return ( return (
<div className="h-full w-full"> <div className="h-full w-full">
<TabsWidget <TabsWidget
component={tabsComponent as any} component={tabsComponent as any}
menuObjid={menuObjid} // 🆕 부모의 menuObjid 전달 menuObjid={menuObjid}
formData={formData}
onFormDataChange={updateFormData}
/> />
</div> </div>
); );

View File

@ -15,7 +15,7 @@ interface TabsWidgetProps {
style?: React.CSSProperties; style?: React.CSSProperties;
menuObjid?: number; menuObjid?: number;
formData?: Record<string, any>; formData?: Record<string, any>;
onFormDataChange?: (data: Record<string, any>) => void; onFormDataChange?: (fieldName: string, value: any) => void; // DynamicComponentRenderer와 동일한 시그니처
isDesignMode?: boolean; // 디자인 모드 여부 isDesignMode?: boolean; // 디자인 모드 여부
onComponentSelect?: (tabId: string, componentId: string) => void; // 컴포넌트 선택 콜백 onComponentSelect?: (tabId: string, componentId: string) => void; // 컴포넌트 선택 콜백
selectedComponentId?: string; // 선택된 컴포넌트 ID selectedComponentId?: string; // 선택된 컴포넌트 ID