0 ? (
+ {/* Language Key + Turkish Caption + English Caption */}
+
+
{/* Editor type select */}
-
-
- {/* Turkish Caption */}
- {translate('::ListForms.Wizard.Step3.TurkishCaption')}
- onTurkishCaptionChange(e.target.value)}
+
+ {translate('::ListForms.Wizard.Step3.EditorType')}
+
+
+
+
+
+
+
+ {translate('::ListForms.Wizard.Step3.LookupDataSourceType')}
+
+
+
+
+
+
+ {translate('::ListForms.Wizard.Step3.LookupValueExpression')}
+
+ onValueExprChange(e.target.value)}
+ className="w-full text-xs px-1.5 py-1 rounded border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-200 focus:outline-none focus:border-indigo-400 resize-none font-mono"
+ />
+
+
+
+
+ {translate('::ListForms.Wizard.Step3.LookupDisplayExpression')}
+
+ onDisplayExprChange(e.target.value)}
+ className="w-full text-xs px-1.5 py-1 rounded border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-200 focus:outline-none focus:border-indigo-400 resize-none font-mono"
+ />
+
+
+
+ {/* LookupQuery */}
+
+
+
+ {translate('::ListForms.Wizard.Step3.LookupLookupQuery')}
+
+
+
+
- {/* English Caption */}
-
- {translate('::ListForms.Wizard.Step3.EnglishCaption')}
- onEnglishCaptionChange(e.target.value)}
- className="w-full text-xs px-1.5 py-1 rounded border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-200 focus:outline-none focus:border-indigo-400 resize-none font-mono"
- />
-
+ {/* Table Picker Modal */}
+ {isTablePickerOpen && (
+ setIsTablePickerOpen(false)}
+ >
+
e.stopPropagation()}
+ >
+ {/* Header */}
+
+
+ {pickerStep === 'columns' && (
+
+ )}
+
+ {pickerStep === 'table'
+ ? translate('::ListForms.Wizard.Step3.SelectTable') || 'Tablo Seç'
+ : (pickerTable?.tableName ?? '')}
+
+
+
+
+
+ {/* Step 1: Table list */}
+ {pickerStep === 'table' && (
+ <>
+
+ setTableSearch(e.target.value)}
+ placeholder={translate('::Search') || 'Ara...'}
+ className="w-full text-xs px-2 py-1.5 rounded border border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200 focus:outline-none focus:border-indigo-400"
+ />
+
+
+ {!dbObjects ? (
+
+ {translate('::ListForms.Wizard.Step3.NoTablesAvailable') ||
+ 'Tablo bulunamadı'}
+
+ ) : (
+ dbObjects.tables
+ .filter((t) => t.tableName.toLowerCase().includes(tableSearch.toLowerCase()))
+ .map((t) => (
+
+ ))
+ )}
+
+ >
+ )}
+
+ {/* Step 2: Column selection */}
+ {pickerStep === 'columns' && (
+
+ {isLoadingPickerColumns ? (
+
+ {translate('::Loading') || 'Yükleniyor...'}
+
+ ) : (
+ <>
+
+
+
+
+
+
+
+
+ {pickerKeyCol && pickerNameCol && (
+
+ {`SELECT "${pickerKeyCol}" AS "Key", "${pickerNameCol}" AS "Name" FROM "${pickerTable?.tableName}" ORDER BY "${pickerNameCol}";`}
+
+ )}
+
+ >
+ )}
+
+ )}
+
+
+ )}
{/* Editor Options */}
-
{translate('::ListForms.Wizard.Step3.EditorOptions')}
+
+ {translate('::ListForms.Wizard.Step3.EditorOptions')}
+
onEditorOptionsChange(e.target.value)}
@@ -252,7 +550,9 @@ function SortableItem({
{/* Editor Script */}
-
{translate('::ListForms.Wizard.Step3.EditorScript')}
+
+ {translate('::ListForms.Wizard.Step3.EditorScript')}
+
onEditorScriptChange(e.target.value)}
@@ -264,7 +564,9 @@ function SortableItem({
{/* Bottom row: ColSpan + Required */}
- {translate('::ListForms.Wizard.Step3.Span')}
+
+ {translate('::ListForms.Wizard.Step3.Span')}
+
@@ -295,6 +599,8 @@ interface GroupCardProps {
group: WizardGroup
isOver: boolean
hasAvailable: boolean
+ dbObjects: SqlObjectExplorerDto | null
+ dsCode: string
onCaptionChange: (val: string) => void
onColCountChange: (val: number) => void
onItemChange: (itemId: string, patch: Partial
) => void
@@ -307,6 +613,8 @@ function GroupCard({
group,
isOver,
hasAvailable,
+ dbObjects,
+ dsCode,
onCaptionChange,
onColCountChange,
onItemChange,
@@ -328,17 +636,19 @@ function GroupCard({
}`}
>
{/* Group Header */}
-
+
onCaptionChange(e.target.value)}
placeholder="Group caption…"
- className="flex-1 text-sm font-semibold h-7 px-2 rounded border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 focus:outline-none focus:border-indigo-400"
+ className="flex-1 min-w-[120px] text-sm font-semibold h-7 px-2 rounded border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-100 focus:outline-none focus:border-indigo-400"
/>
{/* ColCount */}
-
{translate('::ListForms.Wizard.Step3.Cols') || 'Cols:'}
+
+ {translate('::ListForms.Wizard.Step3.Cols') || 'Cols:'}
+
{[1, 2, 3, 4].map((n) => (