- 잇기 단추 글 「고르기」 → 「선택」(명세 · 정의 그룹 · 종류 단위 줄 공용) - 「지난 정의 값」 상자 모든 종류에서 숨김 — 값은 파일에 그대로 · 코드 남김 - 관 길이 = 보여 주는 칸(손 입력 칸 아님 · 정수 · 횡단 전 「횡단 설계 뒤 셈」) - 유입 집수정 = 길이 · 기준측점 전 · 후 칸 숨김 · 옛 값은 병합이 지킴 - 배관 유출 칸에 읽기 줄(관 길이 · 좌우 자동 자리 안내) 안 옮김 - [흙막이 추가] 없앰 — 흙막이 컨테이너 수 = 유출 「추가 기슭막이(단)」 N(늘 보임 · 줄면 끝에서 빠짐 · 잇기 함께 풂 · 이름 흙막이) - 단 수 소스 = 횡단 세션 값 → 캐시 patch · 종단 보기도 같은 횡단 자료(B05 = B06) - 지형이 단을 못 세워 되돌릴 때 캐시 patch 도 맞춤(옛 수로 돌아가던 흠) - 집계표 선택 컨테이너 이름 짝(서버) 흙막이 · 시험 기대값 · 52-1 · 52-13 화면 시나리오 고침 · 54-1 화면 점검 추가 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVPp2o6Mh2FZJr72yW3ofZ
66 lines
2.5 KiB
TypeScript
66 lines
2.5 KiB
TypeScript
/* =============================================================================
|
|
* B05_Profile_UI_Structures_Summary_Row.ts
|
|
* 구조물 폼의 「집계 항목」 줄 — 이름(없으면 「미지정」) · [고르기] · [해제] (PLAN 21-4).
|
|
*
|
|
* B05 · B06 · 관 계열 하위 폼이 같은 줄을 쓴다(옵션 · 서브폼 아래 한 줄). 줄은 값만 들고 있고
|
|
* 저장은 패널이 한다 — [고르기]가 모달(21-5 `openItemPicker`)을 부르고 돌려받은 참조를 `set` 한다.
|
|
* 키(SS…)는 앞에 내세우지 않고 툴팁에만 둔다(PLAN 21-0).
|
|
* ========================================================================== */
|
|
|
|
import {
|
|
summaryLabel,
|
|
summaryTooltip,
|
|
type SummaryItem,
|
|
} from "../common_util/common_util_summary_item";
|
|
|
|
export interface SummaryRow {
|
|
root: HTMLElement;
|
|
get: () => SummaryItem | null;
|
|
/** 값만 바꿔 그림 — 저장 · 알림은 안 함(폼 불러오기 · 모달 결과가 씀). */
|
|
set: (item: SummaryItem | null) => void;
|
|
/** [고르기] · [해제] 배선 — 패널이 한 번 부른다. */
|
|
bind: (handlers: { pick: () => void; clear: () => void }) => void;
|
|
}
|
|
|
|
export function buildSummaryRow(): SummaryRow {
|
|
const root = document.createElement("div");
|
|
root.className = "b05-structure__summary";
|
|
root.dataset.b05Summary = "row";
|
|
const label = document.createElement("span");
|
|
label.className = "b05-structure__summary-label";
|
|
label.textContent = "집계 항목";
|
|
const name = document.createElement("span");
|
|
name.className = "b05-structure__summary-name";
|
|
const pick = document.createElement("button");
|
|
pick.type = "button";
|
|
pick.className = "b05-route__irregular-btn";
|
|
pick.textContent = "선택";
|
|
pick.dataset.b05Summary = "pick";
|
|
const clear = document.createElement("button");
|
|
clear.type = "button";
|
|
clear.className = "b05-route__irregular-btn";
|
|
clear.textContent = "해제";
|
|
clear.dataset.b05Summary = "clear";
|
|
root.append(label, name, pick, clear);
|
|
|
|
let current: SummaryItem | null = null;
|
|
const set = (item: SummaryItem | null): void => {
|
|
current = item;
|
|
name.textContent = summaryLabel(item);
|
|
name.title = summaryTooltip(item);
|
|
name.classList.toggle("is-assigned", item !== null);
|
|
clear.disabled = item === null;
|
|
};
|
|
set(null);
|
|
|
|
return {
|
|
root,
|
|
get: () => current,
|
|
set,
|
|
bind(handlers) {
|
|
pick.addEventListener("click", () => handlers.pick());
|
|
clear.addEventListener("click", () => handlers.clear());
|
|
},
|
|
};
|
|
}
|