[agent-pipeline] pipe-20260311185722-je7c round-5
This commit is contained in:
parent
624ce6b046
commit
42be94ad36
|
|
@ -70,25 +70,42 @@ export const V2ListConfigPanel: React.FC<V2ListConfigPanelProps> = ({
|
|||
customTableName: config.customTableName,
|
||||
isReadOnly: config.isReadOnly !== false,
|
||||
displayMode: "table",
|
||||
showHeader: true,
|
||||
showFooter: false,
|
||||
pagination: config.pagination !== false ? {
|
||||
enabled: true,
|
||||
pageSize: config.pageSize || 10,
|
||||
position: "bottom",
|
||||
showPageSize: true,
|
||||
showSizeSelector: true,
|
||||
showPageInfo: true,
|
||||
pageSizeOptions: [5, 10, 20, 50, 100],
|
||||
} : {
|
||||
enabled: false,
|
||||
pageSize: 10,
|
||||
position: "bottom",
|
||||
showPageSize: false,
|
||||
showSizeSelector: false,
|
||||
showPageInfo: false,
|
||||
pageSizeOptions: [10],
|
||||
},
|
||||
filter: config.filter,
|
||||
filter: config.filter || { enabled: false, filters: [] },
|
||||
dataFilter: config.dataFilter,
|
||||
actions: config.actions || {
|
||||
showActions: false,
|
||||
actions: [],
|
||||
bulkActions: false,
|
||||
bulkActionList: [],
|
||||
},
|
||||
tableStyle: config.tableStyle || {
|
||||
theme: "default",
|
||||
headerStyle: "default",
|
||||
rowHeight: "normal",
|
||||
alternateRows: false,
|
||||
hoverEffect: true,
|
||||
borderStyle: "light",
|
||||
},
|
||||
checkbox: {
|
||||
enabled: true,
|
||||
multiple: true,
|
||||
position: "left",
|
||||
showHeader: true,
|
||||
selectAll: true,
|
||||
},
|
||||
height: "auto",
|
||||
autoWidth: true,
|
||||
|
|
@ -99,6 +116,10 @@ export const V2ListConfigPanel: React.FC<V2ListConfigPanelProps> = ({
|
|||
minColumnWidth: 100,
|
||||
maxColumnWidth: 300,
|
||||
},
|
||||
toolbar: config.toolbar,
|
||||
linkedFilters: config.linkedFilters,
|
||||
excludeFilter: config.excludeFilter,
|
||||
defaultSort: config.defaultSort,
|
||||
};
|
||||
}, [config, currentTableName]);
|
||||
|
||||
|
|
@ -158,6 +179,30 @@ export const V2ListConfigPanel: React.FC<V2ListConfigPanelProps> = ({
|
|||
newConfig.dataFilter = partialConfig.dataFilter;
|
||||
}
|
||||
|
||||
if (partialConfig.actions !== undefined) {
|
||||
newConfig.actions = partialConfig.actions;
|
||||
}
|
||||
|
||||
if (partialConfig.tableStyle !== undefined) {
|
||||
newConfig.tableStyle = partialConfig.tableStyle;
|
||||
}
|
||||
|
||||
if (partialConfig.toolbar !== undefined) {
|
||||
newConfig.toolbar = partialConfig.toolbar;
|
||||
}
|
||||
|
||||
if (partialConfig.linkedFilters !== undefined) {
|
||||
newConfig.linkedFilters = partialConfig.linkedFilters;
|
||||
}
|
||||
|
||||
if (partialConfig.excludeFilter !== undefined) {
|
||||
newConfig.excludeFilter = partialConfig.excludeFilter;
|
||||
}
|
||||
|
||||
if (partialConfig.defaultSort !== undefined) {
|
||||
newConfig.defaultSort = partialConfig.defaultSort;
|
||||
}
|
||||
|
||||
onChange(newConfig);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -117,24 +117,27 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
|||
const currentTableName = screenTableName || propCurrentTableName;
|
||||
|
||||
// config 안전하게 초기화
|
||||
const config: V2RepeaterConfig = useMemo(() => ({
|
||||
...DEFAULT_REPEATER_CONFIG,
|
||||
...propConfig,
|
||||
renderMode: propConfig?.renderMode || DEFAULT_REPEATER_CONFIG.renderMode,
|
||||
dataSource: {
|
||||
...DEFAULT_REPEATER_CONFIG.dataSource,
|
||||
...propConfig?.dataSource,
|
||||
},
|
||||
columns: propConfig?.columns || [],
|
||||
modal: {
|
||||
...DEFAULT_REPEATER_CONFIG.modal,
|
||||
...propConfig?.modal,
|
||||
},
|
||||
features: {
|
||||
...DEFAULT_REPEATER_CONFIG.features,
|
||||
...propConfig?.features,
|
||||
},
|
||||
}), [propConfig]);
|
||||
const config: V2RepeaterConfig = useMemo(() => {
|
||||
const merged = {
|
||||
...DEFAULT_REPEATER_CONFIG,
|
||||
...propConfig,
|
||||
renderMode: propConfig?.renderMode || DEFAULT_REPEATER_CONFIG.renderMode,
|
||||
dataSource: {
|
||||
...DEFAULT_REPEATER_CONFIG.dataSource,
|
||||
...propConfig?.dataSource,
|
||||
},
|
||||
columns: propConfig?.columns || [],
|
||||
modal: {
|
||||
...DEFAULT_REPEATER_CONFIG.modal,
|
||||
...propConfig?.modal,
|
||||
} as V2RepeaterConfig["modal"],
|
||||
features: {
|
||||
...DEFAULT_REPEATER_CONFIG.features,
|
||||
...propConfig?.features,
|
||||
} as V2RepeaterConfig["features"],
|
||||
};
|
||||
return merged as V2RepeaterConfig;
|
||||
}, [propConfig]);
|
||||
|
||||
// 상태 관리
|
||||
const [currentTableColumns, setCurrentTableColumns] = useState<ColumnOption[]>([]); // 현재 테이블 컬럼
|
||||
|
|
@ -444,7 +447,7 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
|||
const updateModal = useCallback(
|
||||
(field: string, value: any) => {
|
||||
updateConfig({
|
||||
modal: { ...config.modal, [field]: value },
|
||||
modal: { ...config.modal, [field]: value } as V2RepeaterConfig["modal"],
|
||||
});
|
||||
},
|
||||
[config.modal, updateConfig],
|
||||
|
|
@ -737,11 +740,10 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
|||
modal: {
|
||||
...config.modal,
|
||||
searchFields: selectedEntity.displayColumn ? [selectedEntity.displayColumn] : [],
|
||||
// 라벨 포함 형식으로 저장
|
||||
sourceDisplayColumns: selectedEntity.displayColumn
|
||||
? [{ key: selectedEntity.displayColumn, label: displayLabel }]
|
||||
: [],
|
||||
},
|
||||
} as V2RepeaterConfig["modal"],
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -804,7 +806,7 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
|||
...config.modal,
|
||||
searchFields: [],
|
||||
sourceDisplayColumns: [],
|
||||
},
|
||||
} as V2RepeaterConfig["modal"],
|
||||
});
|
||||
} else {
|
||||
updateConfig({ renderMode: newMode });
|
||||
|
|
@ -1090,6 +1092,31 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 모달 표시 설정 */}
|
||||
<div className="rounded-lg border bg-muted/30 p-4 space-y-3">
|
||||
<span className="text-sm font-medium">모달 표시 설정</span>
|
||||
<div className="space-y-2">
|
||||
<div className="space-y-1">
|
||||
<Label className="text-[10px] text-muted-foreground">모달 제목</Label>
|
||||
<Input
|
||||
value={config.modal?.title || ""}
|
||||
onChange={(e) => updateModal("title", e.target.value)}
|
||||
placeholder="항목 검색"
|
||||
className="h-7 text-xs"
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<Label className="text-[10px] text-muted-foreground">검색 버튼 텍스트</Label>
|
||||
<Input
|
||||
value={config.modal?.buttonText || ""}
|
||||
onChange={(e) => updateModal("buttonText", e.target.value)}
|
||||
placeholder="검색"
|
||||
className="h-7 text-xs"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
|
@ -1441,7 +1468,7 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
|||
)}
|
||||
|
||||
{col.isSourceDisplay ? (
|
||||
<Link2 className="text-primary h-3 w-3 flex-shrink-0" title="소스 표시 (읽기 전용)" />
|
||||
<Link2 className="text-primary h-3 w-3 flex-shrink-0" aria-label="소스 표시 (읽기 전용)" />
|
||||
) : (
|
||||
<Database className="text-muted-foreground h-3 w-3 flex-shrink-0" />
|
||||
)}
|
||||
|
|
@ -1470,7 +1497,7 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
|||
|
||||
{/* 자동입력 표시 아이콘 */}
|
||||
{!col.isSourceDisplay && col.autoFill?.type && col.autoFill.type !== "none" && (
|
||||
<Wand2 className="h-3 w-3 text-purple-500 flex-shrink-0" title="자동 입력" />
|
||||
<Wand2 className="h-3 w-3 text-purple-500 flex-shrink-0" aria-label="자동 입력" />
|
||||
)}
|
||||
|
||||
{/* 편집 가능 토글 */}
|
||||
|
|
|
|||
Loading…
Reference in New Issue