Merge branch 'iipbs/st/dev' of https://www.onasys.co.kr:3000/ONAANDALL/frontend into iipbs/st/dev

This commit is contained in:
2026-08-20 13:07:50 +09:00
41 changed files with 165 additions and 171 deletions
+15 -16
View File
@@ -201,14 +201,9 @@ export function shouldPrepareColumnsForExcelExport(columns: ColumnConfig[]): boo
}
/** 고정(frozen) 컬럼 표시용 — rg-cell-readonly와 동일한 화면 스타일 */
export const FIXED_CELL_STYLE_NAME = "rg-cell-fixed";
export const FIXED_CELL_STYLE_NAME = "rg-cell-readonly";
const FIXED_EXPORT_STRIP_CLASSES = new Set([
FIXED_CELL_STYLE_NAME,
"rg-cell-readonly",
]);
/** 고정 컬럼 styleName에 rg-cell-fixed 추가 */
/** 고정 컬럼 styleName에 rg-cell-readonly 추가 */
export function appendFixedCellStyle(styleName: string | undefined): string {
const parts = (styleName ?? "").split(/\s+/).filter(Boolean);
if (!parts.includes(FIXED_CELL_STYLE_NAME)) {
@@ -217,15 +212,6 @@ export function appendFixedCellStyle(styleName: string | undefined): string {
return parts.join(" ");
}
/** 엑셀 export 시 고정/readonly 배경·글자색 클래스 제거 (검증 등 다른 클래스는 유지) */
export function stripFixedStylesForExport(styleName: string | undefined): string {
if (!styleName) return "";
return styleName
.split(/\s+/)
.filter((cls) => cls && !FIXED_EXPORT_STRIP_CLASSES.has(cls))
.join(" ");
}
export function resolveColumnStyleName(
column: { name: string; styleName?: string },
fixedColumnNameSet: Set<string>,
@@ -302,6 +288,19 @@ export function restoreFixedOptionsAfterExcelExport(
}
}
/** RealGrid 기본 교차행(rg-alternate-row) 배경이 엑셀에 들어가지 않도록 끔 */
export function disableAlternateRowStyle(
gridView: GridView,
refresh = false,
): void {
const gv = gridView as {
displayOptions?: { useAlternateRowStyle?: boolean };
refresh?: () => void;
};
if (gv.displayOptions) gv.displayOptions.useAlternateRowStyle = false;
if (refresh) gv.refresh?.();
}
const INVALID_EXCEL_FILE_NAME_CHARS = /[\\/:*?"<>|]/g;
function sanitizeExcelFileNamePart(value: string): string {