From b51af5e4a5925b74b50af98669d35eb176fcc10d Mon Sep 17 00:00:00 2001 From: umsangdon Date: Wed, 11 Nov 2026 22:39:26 +0900 Subject: [PATCH] =?UTF-8?q?fix(819-1):=20=EA=B0=80=EC=A0=B8=EC=98=A8=20?= =?UTF-8?q?=EB=8B=A8=EA=B0=80=EC=82=B0=EC=B6=9C=20=EC=83=81=EC=84=B8=20?= =?UTF-8?q?=E2=80=94=20=EC=83=81=EB=8B=A8=20=EB=B3=80=EC=88=98=20=EC=B9=B8?= =?UTF-8?q?(=EA=B0=92=20=C2=B7=20=EA=B7=9C=EA=B2=A9=20=C2=B7=20=ED=92=88?= =?UTF-8?q?=EC=85=88=20=EC=A1=B0=EA=B1=B4)=20=EC=95=88=20=EA=B7=B8?= =?UTF-8?q?=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 요구 787 — 상단 가로 칸은 옵션 선택지가 있을 때만 · 가져온 식은 값이 왼쪽 공식 묶음에 이미 있어 중복 - line_stack_screen: 문서 「가져온」 표식이면 옵션 가로를 비움(직접 작성 단가산출은 그대로) - 쓸 곳 없어진 line_stack_sourced.ts · .lstk-src CSS · 글 다섯 개 지움 - 값 · 계산 · 저장 그대로(그리기만) Co-Authored-By: Claude Opus 5.5 --- A00_Common/line_stack.css | 24 ---------- A00_Common/line_stack_screen.ts | 9 ++-- A00_Common/line_stack_sourced.ts | 80 -------------------------------- A00_Common/line_stack_text.ts | 11 ----- 4 files changed, 4 insertions(+), 120 deletions(-) delete mode 100644 A00_Common/line_stack_sourced.ts diff --git a/A00_Common/line_stack.css b/A00_Common/line_stack.css index 4c25f9bc0..ab78bcaa0 100644 --- a/A00_Common/line_stack.css +++ b/A00_Common/line_stack.css @@ -452,27 +452,3 @@ width: auto; min-width: 8em; } - -/* 가져온 식 값 · 추정 칸(810-3) — 칸 + 꼬리표 */ -.lstk-src { - display: flex; - align-items: flex-end; - gap: var(--spacing-4); -} - -.lstk-src > .ui-field { - width: 7em; -} - -.lstk-src > [data-guess] { - width: auto; - min-width: 18em; -} - -.lstk-src > [data-guess] input { - min-width: 18em; -} - -.lstk-src > .ui-badge { - margin-bottom: var(--spacing-4); -} diff --git a/A00_Common/line_stack_screen.ts b/A00_Common/line_stack_screen.ts index a2ffe4b18..e9727b88f 100644 --- a/A00_Common/line_stack_screen.ts +++ b/A00_Common/line_stack_screen.ts @@ -48,7 +48,6 @@ import { } from "./formula_doc_copy"; import { docFoot } from "./formula_doc_foot"; import { buildOptions } from "./formula_doc_options"; -import { buildSourced } from "./line_stack_sourced"; import { ft } from "./formula_doc_text"; import { addTaken, type Taken } from "../common_util/common_util_line_stack_copy"; import type { Layer } from "../M02_MasterTemplete/M02_MasterTemplete_Api_Fetch"; @@ -281,10 +280,10 @@ export function createStackScreen(opt: StackScreenOptions) { recalc(); draw(); }; - const options = [ - ...buildOptions(doc, given, !!cp && !opt.admin, setOption), - ...buildSourced(doc, !!cp && !opt.admin, setOption), // 가져온 식 값 · 추정 칸(810-3) - ]; + // 가져온 식 = 옵션 가로 안 그림(819-1 · 요구 787 — 값은 왼쪽 공식 묶음에 같이 보임) + const options = (doc as { 가져온?: unknown }).가져온 + ? [] + : buildOptions(doc, given, !!cp && !opt.admin, setOption); const busy = dirty(); const tools = [ ...(mark?.단가기준 && opt.page ? [basisPick(mark.단가기준)] : []), // 모달 = 머리 판 단추(793-3b) diff --git a/A00_Common/line_stack_sourced.ts b/A00_Common/line_stack_sourced.ts deleted file mode 100644 index 11c9a6b54..000000000 --- a/A00_Common/line_stack_sourced.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* ============================================================================= - * line_stack_sourced.ts - * 가져온 식 옵션 가로 칸(PLAN 810-3 · 요구 705 · 703) — 줄 쌓기 위 옵션 가로(`formula_doc_options.ts`) 뒤에 붙음 - * 값 칸 = 경쟁사 파일에 값으로 드러난 수(q · K · E · Cm · Q …) · 꼬리표 「원파일」 · 「엑셀」(`sourceOf`) · - * 고침 = 그 숫자 연결 값(부른 쪽 `set` · 캐시 → [저장]) - * 규격 칸 = 원파일 블록 규격(읽기만) · 추정 칸 = 값 없이 이름만 적힌 품셈 조건 글(문서 `가져온.추정` · 읽기만 · - * M01 기초에 묶지 않음 · 703) - * ========================================================================== */ - -import { createBadge } from "@ui/ui_template_badge"; -import { el } from "@ui/ui_template_elements"; -import { createInputField } from "@ui/ui_template_input"; -import { varId, type DocVar, type FormulaDoc } from "../common_util/common_util_formula_doc"; -import { sourceOf } from "../common_util/common_util_line_stack"; -import { lt } from "./line_stack_text"; - -interface Head { - 원파일?: boolean; - 규격?: string; - 추정?: { 행?: number; 글?: string }[]; -} - -const cell = (field: HTMLElement, tag: string, tone: "info" | "warning", hint: string) => - el("div", { - className: "lstk-src", - attrs: { title: hint }, - children: [field, createBadge(tag, tone)], - }); - -export function buildSourced( - doc: FormulaDoc | null, - lock: boolean, - set: (key: string, v: DocVar, value: unknown) => void, -): HTMLElement[] { - const head = (doc as { 가져온?: Head } | null)?.가져온; - if (!doc || !head) return []; - const out: HTMLElement[] = []; - for (const v of doc.변수 ?? []) { - const tag = sourceOf(doc, v); - if (!tag) continue; - const id = varId(v); - const f = createInputField({ - label: v.이름 || id, - value: String(v.연결?.값 ?? ""), - compact: true, - size: 28, - unit: v.단위 || undefined, - }); - f.input.disabled = lock; - f.input.addEventListener("change", () => { - const n = Number(f.input.value.trim().replace(/,/g, "")); - if (f.input.value.trim() === "" || !Number.isFinite(n)) - return void (f.input.value = String(v.연결?.값 ?? "")); // 수만 — 빈 값 · 글 = 그대로 - set(id, v, n); // 수 그대로(글 「0.7」 = 셈 「—」 · 공식 묶음 값 칸 `setRow` 와 같은 꼴 · 812-3) - }); - f.root.dataset.option = id; - const tagText = tag === "원파일" ? lt("Src_Native") : tag === "엑셀" ? lt("Src_Excel") : tag; - out.push(cell(f.root, tagText, "info", lt("Src_Hint"))); - } - const ro = (label: string, value: string, mark: string, guess: boolean) => { - const f = createInputField({ label, value, compact: true, size: 28 }); - f.input.readOnly = true; - f.input.title = value; // 긴 조건 글 = 칸 위에 올리면 다 보임 - if (guess) f.root.dataset.guess = mark; - return guess - ? cell(f.root, lt("Guess"), "warning", lt("Guess_Hint")) - : cell(f.root, lt(head.원파일 ? "Src_Native" : "Src_Excel"), "info", lt("Src_Hint")); // 812-1 엑셀 읽기기 = 「엑셀」 - }; - if (head.규격) out.push(ro(lt("Spec"), head.규격, "", false)); - for (const g of head.추정 ?? []) - out.push( - ro( - `${lt("Guess_Label")}${g.행 !== undefined ? ` · ${g.행}행` : ""}`, - String(g.글 ?? "").replace(/^※\s*/, ""), - String(g.행 ?? ""), - true, - ), - ); - return out; -} diff --git a/A00_Common/line_stack_text.ts b/A00_Common/line_stack_text.ts index 60eace9b4..2c3191e3a 100644 --- a/A00_Common/line_stack_text.ts +++ b/A00_Common/line_stack_text.ts @@ -38,17 +38,6 @@ const TEXT = { K_소계: ["소계", "Subtotal"], Src_Native: ["원파일", "Source file"], Src_Excel: ["엑셀", "Excel"], - Src_Hint: [ - "경쟁사 파일에 값으로 적힌 수 — 고치면 이 단가산출 값", - "Value written in the competitor file — edit to change", - ], - Guess: ["추정", "Guess"], - Guess_Label: ["품셈 조건", "Condition"], - Guess_Hint: [ - "값 없이 이름만 적힌 품셈 조건 — 우리 기초에 묶지 않음", - "Condition named without a value — not bound", - ], - Spec: ["규격", "Spec"], K_공식: ["공식", "Formula"], K_표값: ["표 값", "Table values"], K_글: ["근거 글", "Basis note"],