From f0cacb9401dfac053d15aad453b54759af3f423f Mon Sep 17 00:00:00 2001 From: kjs Date: Mon, 19 Jan 2026 17:28:52 +0900 Subject: [PATCH] =?UTF-8?q?V2=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=EA=B8=B0=EC=A1=B4=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8:=20getComponentConfigPanel.tsx=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=8B=A4=EC=96=91=ED=95=9C=20V2=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=EB=A5=BC=20=EC=B6=94=EA=B0=80=ED=95=98=EA=B3=A0,=20?= =?UTF-8?q?=EA=B8=B0=EC=A1=B4=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8?= =?UTF-8?q?=EC=9D=98=20=EA=B2=BD=EB=A1=9C=EB=A5=BC=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=ED=95=98=EC=97=AC=20=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=ED=9A=A8=EC=9C=A8=EC=84=B1=EC=9D=84=20=EB=86=92=EC=98=80?= =?UTF-8?q?=EC=8A=B5=EB=8B=88=EB=8B=A4.=20=EC=9D=B4=EB=A5=BC=20=ED=86=B5?= =?UTF-8?q?=ED=95=B4=20=EC=83=88=EB=A1=9C=EC=9A=B4=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EC=82=AC=EC=9A=A9=EC=9D=84=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90=ED=95=98=EA=B3=A0,=20=EA=B8=B0=EC=A1=B4=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=EC=99=80=EC=9D=98=20=ED=98=B8?= =?UTF-8?q?=ED=99=98=EC=84=B1=EC=9D=84=20=EC=9C=A0=EC=A7=80=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EA=B0=9C=EC=84=A0=ED=95=98=EC=98=80?= =?UTF-8?q?=EC=8A=B5=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/utils/getComponentConfigPanel.tsx | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/frontend/lib/utils/getComponentConfigPanel.tsx b/frontend/lib/utils/getComponentConfigPanel.tsx index 09e6616d..60cf0dac 100644 --- a/frontend/lib/utils/getComponentConfigPanel.tsx +++ b/frontend/lib/utils/getComponentConfigPanel.tsx @@ -22,36 +22,49 @@ const CONFIG_PANEL_MAP: Record Promise> = { // ========== 버튼 ========== "button-primary": () => import("@/components/screen/config-panels/ButtonConfigPanel"), + "v2-button-primary": () => import("@/components/screen/config-panels/ButtonConfigPanel"), // ========== 표시 컴포넌트 ========== "text-display": () => import("@/lib/registry/components/text-display/TextDisplayConfigPanel"), + "v2-text-display": () => import("@/lib/registry/components/v2-text-display/TextDisplayConfigPanel"), "image-display": () => import("@/lib/registry/components/image-display/ImageDisplayConfigPanel"), "divider-line": () => import("@/lib/registry/components/divider-line/DividerLineConfigPanel"), + "v2-divider-line": () => import("@/lib/registry/components/v2-divider-line/DividerLineConfigPanel"), "image-widget": () => import("@/lib/registry/components/image-widget/ImageWidgetConfigPanel"), // ========== 레이아웃/컨테이너 ========== "accordion-basic": () => import("@/lib/registry/components/accordion-basic/AccordionBasicConfigPanel"), "card-display": () => import("@/lib/registry/components/card-display/CardDisplayConfigPanel"), + "v2-card-display": () => import("@/lib/registry/components/v2-card-display/CardDisplayConfigPanel"), "section-card": () => import("@/lib/registry/components/section-card/SectionCardConfigPanel"), + "v2-section-card": () => import("@/lib/registry/components/v2-section-card/SectionCardConfigPanel"), "section-paper": () => import("@/lib/registry/components/section-paper/SectionPaperConfigPanel"), + "v2-section-paper": () => import("@/lib/registry/components/v2-section-paper/SectionPaperConfigPanel"), "split-panel-layout": () => import("@/lib/registry/components/split-panel-layout/SplitPanelLayoutConfigPanel"), + "v2-split-panel-layout": () => import("@/lib/registry/components/v2-split-panel-layout/SplitPanelLayoutConfigPanel"), "split-panel-layout2": () => import("@/lib/registry/components/split-panel-layout2/SplitPanelLayout2ConfigPanel"), "screen-split-panel": () => import("@/lib/registry/components/screen-split-panel/ScreenSplitPanelConfigPanel"), "conditional-container": () => import("@/lib/registry/components/conditional-container/ConditionalContainerConfigPanel"), // ========== 테이블/리스트 ========== "table-list": () => import("@/lib/registry/components/table-list/TableListConfigPanel"), + "v2-table-list": () => import("@/lib/registry/components/v2-table-list/TableListConfigPanel"), "pivot-grid": () => import("@/lib/registry/components/pivot-grid/PivotGridConfigPanel"), + "v2-pivot-grid": () => import("@/lib/registry/components/v2-pivot-grid/PivotGridConfigPanel"), "table-search-widget": () => import("@/lib/registry/components/table-search-widget/TableSearchWidgetConfigPanel"), + "v2-table-search-widget": () => import("@/lib/registry/components/v2-table-search-widget/TableSearchWidgetConfigPanel"), "tax-invoice-list": () => import("@/lib/registry/components/tax-invoice-list/TaxInvoiceListConfigPanel"), // ========== 리피터/반복 ========== "repeat-container": () => import("@/lib/registry/components/repeat-container/RepeatContainerConfigPanel"), + "v2-repeat-container": () => import("@/lib/registry/components/v2-repeat-container/RepeatContainerConfigPanel"), "repeater-field-group": () => import("@/components/webtypes/config/RepeaterConfigPanel"), "unified-repeater": () => import("@/components/unified/config-panels/UnifiedRepeaterConfigPanel"), + "v2-unified-repeater": () => import("@/components/unified/config-panels/UnifiedRepeaterConfigPanel"), "simple-repeater-table": () => import("@/lib/registry/components/simple-repeater-table/SimpleRepeaterTableConfigPanel"), "modal-repeater-table": () => import("@/lib/registry/components/modal-repeater-table/ModalRepeaterTableConfigPanel"), "repeat-screen-modal": () => import("@/lib/registry/components/repeat-screen-modal/RepeatScreenModalConfigPanel"), + "v2-repeat-screen-modal": () => import("@/lib/registry/components/v2-repeat-screen-modal/RepeatScreenModalConfigPanel"), "related-data-buttons": () => import("@/lib/registry/components/related-data-buttons/RelatedDataButtonsConfigPanel"), // ========== 검색/선택 ========== @@ -61,15 +74,21 @@ const CONFIG_PANEL_MAP: Record Promise> = { "customer-item-mapping": () => import("@/lib/registry/components/customer-item-mapping/CustomerItemMappingConfigPanel"), "mail-recipient-selector": () => import("@/lib/registry/components/mail-recipient-selector/MailRecipientSelectorConfigPanel"), "location-swap-selector": () => import("@/lib/registry/components/location-swap-selector/LocationSwapSelectorConfigPanel"), + "v2-location-swap-selector": () => import("@/lib/registry/components/v2-location-swap-selector/LocationSwapSelectorConfigPanel"), // ========== 특수 컴포넌트 ========== "flow-widget": () => import("@/components/screen/config-panels/FlowWidgetConfigPanel"), "tabs-widget": () => import("@/components/screen/config-panels/TabsConfigPanel"), + "v2-tabs-widget": () => import("@/components/screen/config-panels/TabsConfigPanel"), + "tabs": () => import("@/components/screen/config-panels/TabsConfigPanel"), + "v2-tabs": () => import("@/components/screen/config-panels/TabsConfigPanel"), "map": () => import("@/lib/registry/components/map/MapConfigPanel"), "rack-structure": () => import("@/lib/registry/components/rack-structure/RackStructureConfigPanel"), + "v2-rack-structure": () => import("@/lib/registry/components/v2-rack-structure/RackStructureConfigPanel"), "aggregation-widget": () => import("@/lib/registry/components/aggregation-widget/AggregationWidgetConfigPanel"), "v2-aggregation-widget": () => import("@/lib/registry/components/v2-aggregation-widget/AggregationWidgetConfigPanel"), "numbering-rule": () => import("@/lib/registry/components/numbering-rule/NumberingRuleConfigPanel"), + "v2-numbering-rule": () => import("@/lib/registry/components/v2-numbering-rule/NumberingRuleConfigPanel"), "category-manager": () => import("@/lib/registry/components/category-manager/CategoryManagerConfigPanel"), "universal-form-modal": () => import("@/lib/registry/components/universal-form-modal/UniversalFormModalConfigPanel"), }; @@ -321,6 +340,18 @@ export const DynamicComponentConfigPanel: React.FC = } }, [componentId, config.sourceTable, config.targetTable]); + // 🆕 allComponents를 screenComponents 형태로 변환 (집계 위젯 등에서 사용) + // Hooks 규칙: 조건부 return 전에 선언해야 함 + const screenComponents = React.useMemo(() => { + if (!allComponents) return []; + return allComponents.map((comp: any) => ({ + id: comp.id, + componentType: comp.componentType || comp.type, + label: comp.label || comp.name || comp.id, + tableName: comp.componentConfig?.tableName || comp.tableName, + })); + }, [allComponents]); + if (loading) { return (
@@ -490,17 +521,6 @@ export const DynamicComponentConfigPanel: React.FC = ); } - // 🆕 allComponents를 screenComponents 형태로 변환 (집계 위젯 등에서 사용) - const screenComponents = React.useMemo(() => { - if (!allComponents) return []; - return allComponents.map((comp: any) => ({ - id: comp.id, - componentType: comp.componentType || comp.type, - label: comp.label || comp.name || comp.id, - tableName: comp.componentConfig?.tableName || comp.tableName, - })); - }, [allComponents]); - return (