[agent-pipeline] pipe-20260311151253-nyk7 round-7

This commit is contained in:
DDD1542 2026-03-12 00:37:17 +09:00
parent b4aec05512
commit baa1d40bc4
2 changed files with 70 additions and 2 deletions

View File

@ -0,0 +1,68 @@
"use client";
/**
* V2TableSearchWidget
* TableSearchWidgetConfigPanel의 ( , , )
* componentConfigChanged
*/
import React from "react";
import { TableSearchWidgetConfigPanel } from "@/lib/registry/components/v2-table-search-widget/TableSearchWidgetConfigPanel";
interface V2TableSearchWidgetConfigPanelProps {
component?: any;
config?: any;
onUpdateProperty?: (property: string, value: any) => void;
onChange?: (newConfig: any) => void;
tables?: any[];
}
export function V2TableSearchWidgetConfigPanel({
component,
config,
onUpdateProperty,
onChange,
tables,
}: V2TableSearchWidgetConfigPanelProps) {
const handleChange = (newConfig: any) => {
if (onChange) {
onChange(newConfig);
}
if (typeof window !== "undefined") {
window.dispatchEvent(
new CustomEvent("componentConfigChanged", {
detail: { config: newConfig },
})
);
}
};
const handleUpdateProperty = (property: string, value: any) => {
if (onUpdateProperty) {
onUpdateProperty(property, value);
}
if (typeof window !== "undefined") {
window.dispatchEvent(
new CustomEvent("componentConfigChanged", {
detail: { property, value },
})
);
}
};
return (
<TableSearchWidgetConfigPanel
component={component}
config={config}
onUpdateProperty={onChange ? undefined : handleUpdateProperty}
onChange={onChange ? handleChange : undefined}
tables={tables}
/>
);
}
V2TableSearchWidgetConfigPanel.displayName = "V2TableSearchWidgetConfigPanel";
export default V2TableSearchWidgetConfigPanel;

View File

@ -3,7 +3,7 @@
import { ComponentRegistry } from "../../ComponentRegistry";
import { TableSearchWidget } from "./TableSearchWidget";
import { TableSearchWidgetRenderer } from "./TableSearchWidgetRenderer";
import { TableSearchWidgetConfigPanel } from "./TableSearchWidgetConfigPanel";
import { V2TableSearchWidgetConfigPanel } from "@/components/v2/config-panels/V2TableSearchWidgetConfigPanel";
// 검색 필터 위젯 등록 (v2)
ComponentRegistry.registerComponent({
@ -30,7 +30,7 @@ ComponentRegistry.registerComponent({
},
},
renderer: TableSearchWidgetRenderer.render,
configPanel: TableSearchWidgetConfigPanel,
configPanel: V2TableSearchWidgetConfigPanel,
version: "1.0.0",
author: "WACE",
});