[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,
|
customTableName: config.customTableName,
|
||||||
isReadOnly: config.isReadOnly !== false,
|
isReadOnly: config.isReadOnly !== false,
|
||||||
displayMode: "table",
|
displayMode: "table",
|
||||||
|
showHeader: true,
|
||||||
|
showFooter: false,
|
||||||
pagination: config.pagination !== false ? {
|
pagination: config.pagination !== false ? {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
pageSize: config.pageSize || 10,
|
pageSize: config.pageSize || 10,
|
||||||
position: "bottom",
|
showSizeSelector: true,
|
||||||
showPageSize: true,
|
showPageInfo: true,
|
||||||
pageSizeOptions: [5, 10, 20, 50, 100],
|
pageSizeOptions: [5, 10, 20, 50, 100],
|
||||||
} : {
|
} : {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
position: "bottom",
|
showSizeSelector: false,
|
||||||
showPageSize: false,
|
showPageInfo: false,
|
||||||
pageSizeOptions: [10],
|
pageSizeOptions: [10],
|
||||||
},
|
},
|
||||||
filter: config.filter,
|
filter: config.filter || { enabled: false, filters: [] },
|
||||||
dataFilter: config.dataFilter,
|
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: {
|
checkbox: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
multiple: true,
|
||||||
position: "left",
|
position: "left",
|
||||||
showHeader: true,
|
selectAll: true,
|
||||||
},
|
},
|
||||||
height: "auto",
|
height: "auto",
|
||||||
autoWidth: true,
|
autoWidth: true,
|
||||||
|
|
@ -99,6 +116,10 @@ export const V2ListConfigPanel: React.FC<V2ListConfigPanelProps> = ({
|
||||||
minColumnWidth: 100,
|
minColumnWidth: 100,
|
||||||
maxColumnWidth: 300,
|
maxColumnWidth: 300,
|
||||||
},
|
},
|
||||||
|
toolbar: config.toolbar,
|
||||||
|
linkedFilters: config.linkedFilters,
|
||||||
|
excludeFilter: config.excludeFilter,
|
||||||
|
defaultSort: config.defaultSort,
|
||||||
};
|
};
|
||||||
}, [config, currentTableName]);
|
}, [config, currentTableName]);
|
||||||
|
|
||||||
|
|
@ -158,6 +179,30 @@ export const V2ListConfigPanel: React.FC<V2ListConfigPanelProps> = ({
|
||||||
newConfig.dataFilter = partialConfig.dataFilter;
|
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);
|
onChange(newConfig);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,8 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
||||||
const currentTableName = screenTableName || propCurrentTableName;
|
const currentTableName = screenTableName || propCurrentTableName;
|
||||||
|
|
||||||
// config 안전하게 초기화
|
// config 안전하게 초기화
|
||||||
const config: V2RepeaterConfig = useMemo(() => ({
|
const config: V2RepeaterConfig = useMemo(() => {
|
||||||
|
const merged = {
|
||||||
...DEFAULT_REPEATER_CONFIG,
|
...DEFAULT_REPEATER_CONFIG,
|
||||||
...propConfig,
|
...propConfig,
|
||||||
renderMode: propConfig?.renderMode || DEFAULT_REPEATER_CONFIG.renderMode,
|
renderMode: propConfig?.renderMode || DEFAULT_REPEATER_CONFIG.renderMode,
|
||||||
|
|
@ -129,12 +130,14 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
||||||
modal: {
|
modal: {
|
||||||
...DEFAULT_REPEATER_CONFIG.modal,
|
...DEFAULT_REPEATER_CONFIG.modal,
|
||||||
...propConfig?.modal,
|
...propConfig?.modal,
|
||||||
},
|
} as V2RepeaterConfig["modal"],
|
||||||
features: {
|
features: {
|
||||||
...DEFAULT_REPEATER_CONFIG.features,
|
...DEFAULT_REPEATER_CONFIG.features,
|
||||||
...propConfig?.features,
|
...propConfig?.features,
|
||||||
},
|
} as V2RepeaterConfig["features"],
|
||||||
}), [propConfig]);
|
};
|
||||||
|
return merged as V2RepeaterConfig;
|
||||||
|
}, [propConfig]);
|
||||||
|
|
||||||
// 상태 관리
|
// 상태 관리
|
||||||
const [currentTableColumns, setCurrentTableColumns] = useState<ColumnOption[]>([]); // 현재 테이블 컬럼
|
const [currentTableColumns, setCurrentTableColumns] = useState<ColumnOption[]>([]); // 현재 테이블 컬럼
|
||||||
|
|
@ -444,7 +447,7 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
||||||
const updateModal = useCallback(
|
const updateModal = useCallback(
|
||||||
(field: string, value: any) => {
|
(field: string, value: any) => {
|
||||||
updateConfig({
|
updateConfig({
|
||||||
modal: { ...config.modal, [field]: value },
|
modal: { ...config.modal, [field]: value } as V2RepeaterConfig["modal"],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[config.modal, updateConfig],
|
[config.modal, updateConfig],
|
||||||
|
|
@ -737,11 +740,10 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
||||||
modal: {
|
modal: {
|
||||||
...config.modal,
|
...config.modal,
|
||||||
searchFields: selectedEntity.displayColumn ? [selectedEntity.displayColumn] : [],
|
searchFields: selectedEntity.displayColumn ? [selectedEntity.displayColumn] : [],
|
||||||
// 라벨 포함 형식으로 저장
|
|
||||||
sourceDisplayColumns: selectedEntity.displayColumn
|
sourceDisplayColumns: selectedEntity.displayColumn
|
||||||
? [{ key: selectedEntity.displayColumn, label: displayLabel }]
|
? [{ key: selectedEntity.displayColumn, label: displayLabel }]
|
||||||
: [],
|
: [],
|
||||||
},
|
} as V2RepeaterConfig["modal"],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -804,7 +806,7 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
||||||
...config.modal,
|
...config.modal,
|
||||||
searchFields: [],
|
searchFields: [],
|
||||||
sourceDisplayColumns: [],
|
sourceDisplayColumns: [],
|
||||||
},
|
} as V2RepeaterConfig["modal"],
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
updateConfig({ renderMode: newMode });
|
updateConfig({ renderMode: newMode });
|
||||||
|
|
@ -1090,6 +1092,31 @@ export const V2RepeaterConfigPanel: React.FC<V2RepeaterConfigPanelProps> = ({
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</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 ? (
|
{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" />
|
<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" && (
|
{!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