feat(ui,b09): 공용 표 줄 꼴 곁값 · 일위대가표 제목 굵게 · 하위 「ㄴ」(155-2)

- 공용 표 rowClass(줄) 곁값 — 본문 줄 class · 안 주면 글 그대로 · is-title 굵게
- 공용 표 칸 앞 빈칸 · 겹 빈칸 접지 않음(white-space-collapse: preserve-spaces)
- B09 일위대가표 = 머리 · 합계 굵게 · 품셈 인용 · 줄 = 들여쓰기 「ㄴ」(2단)
- 시험 test_ui_data_table 줄 꼴 · 새 test_155_b09_tabs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015KYZ2HWWdUwZWYnn3tQz7X
This commit is contained in:
2026-10-09 19:10:17 +09:00
co-authored by Claude Opus 5.5
parent f52331265d
commit 4ebee1197a
8 changed files with 108 additions and 4 deletions
@@ -199,6 +199,7 @@ export function renderB09Estimation(root: HTMLElement): void {
caption: TABS.find(([id]) => id === tab)?.[1],
editable: spec.editable,
onEdit: spec.onEdit,
rowClass: spec.rowClass,
onCellClick: (i, key) => {
if (spec.onCell) spec.onCell(i, key);
if (spec.link && !spec.editable?.(i, key)) goto(spec.link(i, key));
+2
View File
@@ -85,6 +85,8 @@ export interface TabTable {
onEdit?: (index: number, key: string, text: string) => void;
/** 칸 누름 → 그 자리 동작(예 관급 · 별도 표시 바꿈) */
onCell?: (index: number, key: string) => void;
/** 줄 꼴 class(공용 표 `rowClass` · 예 제목 줄 굵게) */
rowClass?: (index: number) => string | null | undefined;
}
export type TabBuild = (ctx: TabContext) => TabTable | string;
@@ -4,6 +4,7 @@
*
* 목록표 = 호표 한 줄(합계 · 노무비 · 재료비 · 경비) · 줄 누름 = 그 블록으로
* 일위대가표 = 블록(머리 · [품셈 인용] · 줄 · 합계) · 줄 누름 = 단가를 낸 탭 · 줄(대가 줄 = 그 블록)
* 줄 꼴(155-2) = 머리 · 합계 굵게(`is-title`) · 인용 · 줄 = 들여쓰기 「ㄴ」(2단 · 겹 대가는 안 펼침)
* 연결된 구조물 조합 사본이 없으면 빈 표 「연결 없음」
* ========================================================================== */
@@ -21,6 +22,8 @@ import {
const EMPTY =
"연결 없음 — 연결된 구조물 조합 사본(일위대가)이 없음 · B05 · B06 에서 조합을 고르고 [저장]";
/** 하위 줄 앞 — 들여쓰기 + 「ㄴ」(공용 표가 앞 빈칸을 접지 않음) */
const CHILD = " ㄴ ";
const ROUNDS = "줄 금액 ROUNDDOWN(단가 × 수량, 1) · % 줄 = 밑수 × % / 100 · 합계 ROUNDDOWN 0";
/** 블록 줄 → 단가를 낸 탭 */
@@ -59,7 +62,9 @@ export const buildDaegaBlocks: TabBuild = ({ sheets }): TabTable | string => {
if (!blocks.length) return EMPTY;
const rows: DataRow[] = [];
const links: Array<Link | null> = [];
const titles = new Set<number>();
for (const b of blocks) {
titles.add(rows.length);
rows.push({
key: b.id,
name: `제 ${b.no} 호표 ${b.name}`,
@@ -69,13 +74,13 @@ export const buildDaegaBlocks: TabBuild = ({ sheets }): TabTable | string => {
});
links.push(null);
if (b.cite) {
rows.push({ key: `${b.id}|cite`, name: ` ${b.cite}`, note: "품셈 인용" });
rows.push({ key: `${b.id}|cite`, name: `${CHILD}${b.cite}`, note: "품셈 인용" });
links.push(null);
}
b.lines.forEach((ln: Row, n: number) => {
rows.push({
key: `${b.id}|${n}`,
name: ` ${ln.name || ""}`,
name: `${CHILD}${ln.name || ""}`,
spec: ln.spec || "",
qty: ln.qty,
unit: ln.unit || "",
@@ -92,6 +97,7 @@ export const buildDaegaBlocks: TabBuild = ({ sheets }): TabTable | string => {
const tab = LINE_TAB[ln.kind];
links.push(tab && ln.key ? { tab, key: String(ln.key) } : null);
});
titles.add(rows.length);
rows.push({
key: `${b.id}|합계`,
name: " 합 계",
@@ -122,5 +128,6 @@ export const buildDaegaBlocks: TabBuild = ({ sheets }): TabTable | string => {
frozen: 1,
hint: `단가 = B09 프로젝트 한 벌 굳힌 단가 · ${ROUNDS} · 줄 누름 = 단가를 낸 탭(대가 줄 = 그 블록)`,
link: (i: number) => links[i] ?? null,
rowClass: (i: number) => (titles.has(i) ? "is-title" : null),
};
};