From db8759f9e0157e958d839bfda3cd1d4630f56eae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 18 Jan 2026 23:29:36 +0000 Subject: [PATCH] feat: Delete ComponentBindingDialog and DataSourceEditorDialog wrappers, update exports - Deleted ComponentBindingDialogWrapper.tsx and DataSourceEditorDialogWrapper.tsx - These already have JSON definitions and were exported from json-components - Updated molecules/index.ts to export from json-components instead of wrappers - Reduced remaining wrappers from 6 to 4 - All deleted wrappers now pure JSON components Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- .../ComponentBindingDialogWrapper.tsx | 47 ------------------- .../DataSourceEditorDialogWrapper.tsx | 43 ----------------- src/components/molecules/index.ts | 12 +++-- 3 files changed, 9 insertions(+), 93 deletions(-) delete mode 100644 src/components/molecules/ComponentBindingDialogWrapper.tsx delete mode 100644 src/components/molecules/DataSourceEditorDialogWrapper.tsx diff --git a/src/components/molecules/ComponentBindingDialogWrapper.tsx b/src/components/molecules/ComponentBindingDialogWrapper.tsx deleted file mode 100644 index 1912823..0000000 --- a/src/components/molecules/ComponentBindingDialogWrapper.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import type { ChangeEvent } from 'react' -import { ComponentRenderer } from '@/lib/json-ui/component-renderer' -import { cn } from '@/lib/utils' -import componentBindingDialogDefinition from './definitions/component-binding-dialog.json' -import type { ComponentBindingDialogWrapperProps } from './interfaces' - -export function ComponentBindingDialogWrapper({ - open = false, - title = 'Component Bindings', - description = 'Connect component props to data sources.', - componentType, - componentId, - bindings = [], - onBindingChange, - onSave, - onCancel, - onOpenChange, - className, -}: ComponentBindingDialogWrapperProps) { - const handleBindingFieldChange = (event: ChangeEvent) => { - const fieldId = event.currentTarget?.dataset?.fieldId || event.target?.dataset?.fieldId - if (!fieldId) return - onBindingChange?.(fieldId, event.target.value) - } - - return ( - - ) -} diff --git a/src/components/molecules/DataSourceEditorDialogWrapper.tsx b/src/components/molecules/DataSourceEditorDialogWrapper.tsx deleted file mode 100644 index 72530c7..0000000 --- a/src/components/molecules/DataSourceEditorDialogWrapper.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import type { ChangeEvent } from 'react' -import { ComponentRenderer } from '@/lib/json-ui/component-renderer' -import { cn } from '@/lib/utils' -import dataSourceEditorDialogDefinition from './definitions/data-source-editor-dialog.json' -import type { DataSourceEditorDialogWrapperProps } from './interfaces' - -export function DataSourceEditorDialogWrapper({ - open = false, - title = 'Data Source', - description = 'Update data source details and fields.', - fields = [], - onFieldChange, - onSave, - onCancel, - onOpenChange, - className, -}: DataSourceEditorDialogWrapperProps) { - const handleFieldChange = (event: ChangeEvent) => { - const fieldId = event.currentTarget?.dataset?.fieldId || event.target?.dataset?.fieldId - if (!fieldId) return - onFieldChange?.(fieldId, event.target.value) - } - - return ( - - ) -} diff --git a/src/components/molecules/index.ts b/src/components/molecules/index.ts index fb5fa7a..1f8b59c 100644 --- a/src/components/molecules/index.ts +++ b/src/components/molecules/index.ts @@ -16,9 +16,15 @@ export { ToolbarButton } from './ToolbarButton' export { TreeFormDialog } from './TreeFormDialog' export { SearchInput } from './SearchInput' export { BindingEditor } from './BindingEditor' -export { DataSourceEditorDialog } from './DataSourceEditorDialog' -export { ComponentBindingDialog } from './ComponentBindingDialog' export { TreeCard } from './TreeCard' export { TreeListHeader } from './TreeListHeader' -export { LoadingFallback, NavigationItem, PageHeaderContent } from '@/lib/json-ui/json-components' +export { + LoadingFallback, + NavigationItem, + PageHeaderContent, + ComponentBindingDialog, + DataSourceEditorDialog, + GitHubBuildStatus as GitHubBuildStatusJSON, + SaveIndicator as SaveIndicatorJSON +} from '@/lib/json-ui/json-components' export { preloadMonacoEditor } from './LazyMonacoEditor'