Merge remote-tracking branch 'origin/sub_laptop_8' into sub_laptop_5

This commit is contained in:
2026-10-31 17:25:36 +09:00
11 changed files with 109 additions and 28 deletions
+16 -9
View File
@@ -44,17 +44,19 @@ const sty = (n) => ({
paddingBottom: n.css.paddingBottom ?? "0px",
borderBottomWidth: n.css.borderBottomWidth ?? "0px",
marginBottom: n.css.marginBottom ?? "0px",
position: n.css.position ?? "static",
});
const box = { exports: {} };
new Function("exports", "module", "require", "window", "document", "getComputedStyle", "ResizeObserver", js)(
box.exports,
box,
(p) => (p.endsWith(".css") ? {} : require(p)),
win,
{ body: null },
sty,
RO,
);
new Function(
"exports",
"module",
"require",
"window",
"document",
"getComputedStyle",
"ResizeObserver",
js,
)(box.exports, box, (p) => (p.endsWith(".css") ? {} : require(p)), win, { body: null }, sty, RO);
const m = box.exports;
// 문서: body(padding-bottom 8) > card(padding-bottom 12 · gap 8) > [root][avg 20][info 30][hint 40]
@@ -81,4 +83,9 @@ hint.height = 60;
observers.forEach((o) => o.fn());
out.afterHintGrow = parseFloat(root.style.maxHeight);
out.firstMinusGrow = out.first - 20;
// 열린 창 가림막(body 끝 · position fixed · 창 높이) = 아래 자리에 안 셈(707-5)
link(body, card, el("backdrop", { position: "fixed" }, 900));
out.belowWithModal = m.spaceBelow(root);
out.belowAfterGrow = 3 * 8 + 20 + 30 + 60 + 12 + 8;
console.log(JSON.stringify(out));
+2 -1
View File
@@ -147,6 +147,7 @@ const { loadTs } = makeLoader({
root: ROOT,
requireFor: (full) => (request) => {
if (request in STUBS) return STUBS[request];
if (request.endsWith(".css")) return {}; // 부품 글꼴 import(ui_template_icons.css 등)
if (request.startsWith(".")) return loadTs(`${path.resolve(path.dirname(full), request)}.ts`);
return require(request);
},
@@ -178,7 +179,7 @@ const flush = () => new Promise((resolve) => setTimeout(resolve, 20));
const out = {};
void openItemPicker({ current: null, canCopy: false });
await flush();
const [, cols] = modal.body.children;
const [, , cols] = modal.body.children; // 위 표 · 규격 표(704-4) · 열
const [search, layerBar, treeHost] = cols.children[0].children;
const searchInput = search.children[0];
const active = () => treeHost.all().find((n) => n.classList.contains("is-active"))?.dataset.id;
@@ -119,6 +119,7 @@ const { loadTs } = makeLoader({
requireFor: (full) => (request) => {
if (CATALOG.isCatalogRequest(request)) return CATALOG;
if (STUBS[request]) return STUBS[request];
if (request.endsWith(".css")) return {}; // 부품 글꼴 import(ui_template_icons.css 등) — 트랜스파일 못 함
// 화면 공용 부품(@ui/…) — 이 시험이 안 쓰는 것이라 뭘 불러도 아무 일 안 하는 함수로 막아 둠
if (request.startsWith("@ui/")) return new Proxy({}, { get: () => () => {} });
// 공용 계산(@util/…) — tsconfig 별칭대로 common_util 폴더에서 읽음
@@ -177,3 +177,4 @@ def test_창_끝까지_셈에_아래_안내_줄_포함():
assert r["below"] == r["belowExpected"] == 134 # 아래 줄 · 안내 줄 둘 + 여백
assert r["bottom"] == r["viewport"] # 문서 맨 아래 = 창 끝 → 페이지 스크롤 0
assert r["afterHintGrow"] == r["firstMinusGrow"] # 안내 줄이 늘면 표 칸이 그만큼 줄어듦
assert r["belowWithModal"] == r["belowAfterGrow"] # 열린 창 가림막(fixed) = 아래 자리 아님
@@ -117,7 +117,7 @@ def test_모달_배선_고르면_보이고_편집_화면에서는_숨김():
ts = _text(UI / "ui_template_item_picker.ts")
assert "createComboTable((colId) => pickColumn(colId))" in ts # 280-2 표 고름 → 나무
assert "paintTable();" in ts # 고른 항목 · 층이 바뀔 때마다(280-2)
assert "body.append(tableWrap, cols, editHost," in ts # 맨 위
assert "body.append(tableWrap, specHost, cols, editHost," in ts # 맨 위(704-4 규격 표 뒤)
assert ts.count("tableWrap.hidden = true;") == 1 # 편집 화면 열 때
assert ts.count("tableWrap.hidden = false;") == 1 # 돌아올 때
assert "comboTable.destroy();" in ts # 닫을 때 표 거둠
+14
View File
@@ -125,3 +125,17 @@ def test_깨진_파일_표_없음_막힘():
z.writestr("Other.dat", b"")
with pytest.raises(ex.EstxError, match="EstMainDat"):
ex.read_bill("a.estx", buf.getvalue())
def test_불러오기_길_estx_갈림(data):
"""707-5 고리 — 이름 끝 .estx = 원본 읽기 · 호표 = 목록 수 + 코드로 가리킨 줄(이음 후보)."""
from B09_Estimation import B09_Estimation_Router_Import as route
name = "거창.ESTX"
parsed = route._parse(name, data["거창"])
assert parsed["꼴"] == "estx" and parsed["합계"]["직접"] == 384916227
assert route._hopyo(name, data["거창"], parsed) == {"대가": 14, "산근": 61, "가리킴": 48}
assert route._hopyo("a.xlsx", data["거창"], parsed) is None
with pytest.raises(route.HTTPException) as got:
route._parse("a.estx", b"not a zip")
assert got.value.status_code == 400
+1 -1
View File
@@ -77,7 +77,7 @@ def test_사전조합_층_단추는_페이지를_다시_안_세움():
# 구조물 조합 층 단추는 그대로 해시 이동 한 벌
assert page.count('layerBar("') == 1
assert 'layerBar("구조물조합", tree.add, () => void main.openTable(layer)),' in page
assert "precombo: { scope: () => pre, bar: preBar }," in page
assert "precombo: {\n scope: () => pre,\n bar: preBar," in page # 706-1 more 덧붙음
def test_고름에_owner_권한_서고_길에_명시_owner():
@@ -300,5 +300,7 @@ def test_스냅샷이_없으면_알림(world):
def test_초기화는_templates_를_안_건드리고_복제는_통째로():
assert not any(tree.startswith("templates") for tree in initial._FILE_TREES)
tool = (config_system.PROJECT_ROOT / "db_management/tools_clone_project.py").read_text("utf-8")
tool = (config_system.PROJECT_ROOT / "common_util/common_util_project_copy.py").read_text(
"utf-8"
) # 복제 도구 본체(tools_clone_project = CLI 껍데기)
assert '"robocopy",' in tool and '"/E",' in tool # 프로젝트 폴더 전체(templates 포함)