refactor(M02): 띠 알림 · 빈 상태 · 보조 글 · 배지 · 탭 · 표 · 목록 줄 · 도구줄 · 체크를 부품으로 (PLAN 553-5)

- DataFlow: 표 넷 = 데이터표 · 함수 판 알림 · 선/알약 경고 · 끊긴 곳 = 띠 알림 · 알약 · 칸 종류 = 배지 · 고르는 줄 = 목록 줄 · 입력 넷 = 입력 · 도구줄 여섯 · 날 색 → 공통 값
- 구조물 옵션 · 구조물 · 도면 · 면적 · 품목 고르기: 판 띠 = 띠 알림 · 한눈/종류별/부품 = 탭 · 표 둘 = 데이터표 · 체크 둘 = 체크 · 카드 · 번호 = 카드 · 배지 · 도면 도구줄
- 일위대가 · 호표 · 실무자료 · 본 화면 · 서고: 알림 = 띠 알림 · 빈 상태 · 보조 글 · 도구줄 여섯 · 옛 보라 별칭 0
- M01 로직 입력칸 = 입력 부품(작은 칸) · 일위대가 상세 줄 수 고정 시험 693 · 지킴 시험 M02 몫 더함

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 23:44:19 +09:00
co-authored by Claude Opus 5.5
parent 022eff69f5
commit 09134bab84
86 changed files with 583 additions and 705 deletions
@@ -38,6 +38,10 @@ import { renderMaterial } from "./M02_DF_InputPanel_Material";
import { renderTablePick } from "./M02_DF_InputPanel_Table";
import { renderVariables } from "./M02_DF_InputPanel_Vars";
import "./M02_DF_InputPanel.css";
import "@ui/ui_template_text.css";
import "@ui/ui_template_badge.css";
import "@ui/ui_template_list_row.css";
import "@ui/ui_template_toolbar.css";
/** Api 모양 — 서버 Api 가 채워지면(사용자 요소 = Model 모양 · 값 물음 = ref) 그 모양을 그대로 씀 */
interface Answer {
@@ -125,7 +129,7 @@ export function renderInputPanel(
host.className = "m02-dfip";
const box = lg.boxes.find((b) => b.id === boxId);
if (!box || box.kind !== "input") {
host.replaceChildren(el("p", { className: "m02-dfip__muted", text: t("NotInput") }));
host.replaceChildren(el("p", { className: "ui-text ui-text--muted", text: t("NotInput") }));
return;
}
// 상자 단위가 고른 요소 · 변수 단위와 다르면(견본 등) 맞춰 다시 그림 — 맞으면 바로 지나감
@@ -246,7 +250,15 @@ function drawChosen(
el("span", {
className: "m02-dfip__name",
children: [
...(rule ? [el("span", { className: "m02-dfip__tag", text: t("RuleTag") })] : []),
...(rule
? [
el("span", {
className: "ui-badge ui-badge--pill ui-badge--neutral",
attrs: { "data-size": "20" },
text: t("RuleTag"),
}),
]
: []),
el("strong", { text: ` ${e.name}` }),
...(rule && e.rule
? [
@@ -274,7 +286,7 @@ function drawChosen(
],
});
})
: [el("p", { className: "m02-dfip__muted", text: t("NoneChosen") })]),
: [el("p", { className: "ui-text ui-text--muted", text: t("NoneChosen") })]),
);
const items = els
.filter((e) => e.mode !== "rule")
@@ -331,7 +343,7 @@ async function drawFind(
let seq = 0;
const load = async (): Promise<void> => {
const mine = ++seq;
list.replaceChildren(el("p", { className: "m02-dfip__muted", text: t("Loading") }));
list.replaceChildren(el("p", { className: "ui-text ui-text--muted", text: t("Loading") }));
try {
const word = q.input.value.trim();
const page = await fetchRows(file, 1, 40, word, false, sub, detail);
@@ -341,11 +353,11 @@ async function drawFind(
list.replaceChildren(
...(rows.length
? rows.map((r) => rowOf(r))
: [el("p", { className: "m02-dfip__muted", text: t("NoRow") })]),
: [el("p", { className: "ui-text ui-text--muted", text: t("NoRow") })]),
);
} catch (e) {
if (mine === seq)
list.replaceChildren(el("p", { className: "m02-dfip__muted", text: plain(e) }));
list.replaceChildren(el("p", { className: "ui-text ui-text--muted", text: plain(e) }));
}
};
const rowOf = (r: M01Row): HTMLElement => {
@@ -361,7 +373,7 @@ async function drawFind(
const v = valueOf(group, r, field.select.value || "가격");
const unitText = group === "기계" ? "" : String(r["단위"] ?? "");
const b = el("button", {
className: "m02-dfip__row",
className: "m02-dfip__row ui-list-row ui-sidebar-row",
attrs: { type: "button" },
children: [
el("span", {
@@ -390,7 +402,7 @@ async function drawFind(
subBox.root.hidden = !subs.length;
bar.push(subBox.root, detailBox.root);
} catch (e) {
host.replaceChildren(el("p", { className: "m02-dfip__muted", text: plain(e) }));
host.replaceChildren(el("p", { className: "ui-text ui-text--muted", text: plain(e) }));
return;
}
let timer = 0;
@@ -399,7 +411,7 @@ async function drawFind(
() => (window.clearTimeout(timer), (timer = window.setTimeout(load, 250))),
);
host.replaceChildren(
el("div", { className: "m02-dfip__bar", children: [...bar, q.root] }),
el("div", { className: "ui-toolbar m02-dfip__bar", children: [...bar, q.root] }),
count,
list,
);