From 93ec294be303a1442cfb8e7546f4cc0b66c353f5 Mon Sep 17 00:00:00 2001 From: leeheejin Date: Tue, 9 Dec 2025 18:26:36 +0900 Subject: [PATCH] =?UTF-8?q?=ED=88=B4=EB=B0=94=20=EC=84=A0=ED=83=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../table-list/TableListComponent.tsx | 342 +++++++++--------- .../table-list/TableListConfigPanel.tsx | 67 ++++ .../registry/components/table-list/types.ts | 16 + 3 files changed, 263 insertions(+), 162 deletions(-) diff --git a/frontend/lib/registry/components/table-list/TableListComponent.tsx b/frontend/lib/registry/components/table-list/TableListComponent.tsx index 982a7f8c..5073197d 100644 --- a/frontend/lib/registry/components/table-list/TableListComponent.tsx +++ b/frontend/lib/registry/components/table-list/TableListComponent.tsx @@ -4675,19 +4675,21 @@ export const TableListComponent: React.FC = ({ {/* 새로고침 버튼 */} - + {(tableConfig.toolbar?.showRefresh ?? true) && ( + + )} ); - }, [tableConfig.pagination, isDesignMode, currentPage, totalPages, totalItems, loading, selectedRows.size, exportToExcel, exportToPdf]); + }, [tableConfig.pagination, tableConfig.toolbar?.showRefresh, isDesignMode, currentPage, totalPages, totalItems, loading, selectedRows.size, exportToExcel, exportToPdf]); // ======================================== // 렌더링 @@ -4790,57 +4792,67 @@ export const TableListComponent: React.FC = ({ {/* 🆕 DevExpress 스타일 기능 툴바 */}
{/* 편집 모드 토글 */} -
- -
+ {(tableConfig.toolbar?.showEditMode ?? true) && ( +
+ +
+ )} {/* 내보내기 버튼들 */} -
- - -
+ {((tableConfig.toolbar?.showExcel ?? true) || (tableConfig.toolbar?.showPdf ?? true)) && ( +
+ {(tableConfig.toolbar?.showExcel ?? true) && ( + + )} + {(tableConfig.toolbar?.showPdf ?? true) && ( + + )} +
+ )} {/* 복사 버튼 */} -
- -
+ {(tableConfig.toolbar?.showCopy ?? true) && ( +
+ +
+ )} {/* 선택 정보 */} {selectedRows.size > 0 && ( @@ -4861,124 +4873,130 @@ export const TableListComponent: React.FC = ({ )} {/* 🆕 통합 검색 패널 */} -
- {isSearchPanelOpen ? ( -
- setGlobalSearchTerm(e.target.value)} - onKeyDown={(e) => { - if (e.key === "Enter") { - executeGlobalSearch(globalSearchTerm); - } else if (e.key === "Escape") { - clearGlobalSearch(); - } else if (e.key === "F3" || (e.key === "g" && (e.ctrlKey || e.metaKey))) { - e.preventDefault(); - if (e.shiftKey) { - goToPrevSearchResult(); - } else { - goToNextSearchResult(); + {(tableConfig.toolbar?.showSearch ?? true) && ( +
+ {isSearchPanelOpen ? ( +
+ setGlobalSearchTerm(e.target.value)} + onKeyDown={(e) => { + if (e.key === "Enter") { + executeGlobalSearch(globalSearchTerm); + } else if (e.key === "Escape") { + clearGlobalSearch(); + } else if (e.key === "F3" || (e.key === "g" && (e.ctrlKey || e.metaKey))) { + e.preventDefault(); + if (e.shiftKey) { + goToPrevSearchResult(); + } else { + goToNextSearchResult(); + } } - } - }} - placeholder="검색어 입력... (Enter)" - className="border-input bg-background h-7 w-32 rounded border px-2 text-xs focus:outline-none focus:ring-1 focus:ring-primary sm:w-48" - autoFocus - /> - {searchHighlights.size > 0 && ( - - {searchHighlights.size}개 + }} + placeholder="검색어 입력... (Enter)" + className="border-input bg-background h-7 w-32 rounded border px-2 text-xs focus:outline-none focus:ring-1 focus:ring-primary sm:w-48" + autoFocus + /> + {searchHighlights.size > 0 && ( + + {searchHighlights.size}개 + + )} + + + +
+ ) : ( + + )} +
+ )} + + {/* 🆕 Filter Builder (고급 필터) 버튼 */} + {(tableConfig.toolbar?.showFilter ?? true) && ( +
+ + {activeFilterCount > 0 && ( - - -
- ) : ( - - )} -
- - {/* 🆕 Filter Builder (고급 필터) 버튼 */} -
- - {activeFilterCount > 0 && ( - - )} -
+
+ )} {/* 새로고침 */} -
- -
+ {(tableConfig.toolbar?.showRefresh ?? true) && ( +
+ +
+ )}
{/* 🆕 배치 편집 툴바 */} diff --git a/frontend/lib/registry/components/table-list/TableListConfigPanel.tsx b/frontend/lib/registry/components/table-list/TableListConfigPanel.tsx index 3ea73aa9..bd391356 100644 --- a/frontend/lib/registry/components/table-list/TableListConfigPanel.tsx +++ b/frontend/lib/registry/components/table-list/TableListConfigPanel.tsx @@ -765,6 +765,73 @@ export const TableListConfigPanel: React.FC = ({ + {/* 툴바 버튼 설정 */} +
+
+

툴바 버튼 설정

+

테이블 상단에 표시할 버튼을 선택합니다

+
+
+
+
+ handleNestedChange("toolbar", "showEditMode", checked)} + /> + +
+
+ handleNestedChange("toolbar", "showExcel", checked)} + /> + +
+
+ handleNestedChange("toolbar", "showPdf", checked)} + /> + +
+
+ handleNestedChange("toolbar", "showCopy", checked)} + /> + +
+
+ handleNestedChange("toolbar", "showSearch", checked)} + /> + +
+
+ handleNestedChange("toolbar", "showFilter", checked)} + /> + +
+
+ handleNestedChange("toolbar", "showRefresh", checked)} + /> + +
+
+
+ {/* 체크박스 설정 */}
diff --git a/frontend/lib/registry/components/table-list/types.ts b/frontend/lib/registry/components/table-list/types.ts index a619baa0..f4695b20 100644 --- a/frontend/lib/registry/components/table-list/types.ts +++ b/frontend/lib/registry/components/table-list/types.ts @@ -164,6 +164,19 @@ export interface PaginationConfig { pageSizeOptions: number[]; } +/** + * 툴바 버튼 표시 설정 + */ +export interface ToolbarConfig { + showEditMode?: boolean; // 즉시 저장/배치 모드 버튼 + showExcel?: boolean; // Excel 내보내기 버튼 + showPdf?: boolean; // PDF 내보내기 버튼 + showCopy?: boolean; // 복사 버튼 + showSearch?: boolean; // 검색 버튼 + showFilter?: boolean; // 필터 버튼 + showRefresh?: boolean; // 새로고침 버튼 +} + /** * 체크박스 설정 */ @@ -259,6 +272,9 @@ export interface TableListConfig extends ComponentConfig { autoLoad: boolean; refreshInterval?: number; // 초 단위 + // 🆕 툴바 버튼 표시 설정 + toolbar?: ToolbarConfig; + // 🆕 컬럼 값 기반 데이터 필터링 dataFilter?: DataFilterConfig;