auto: 2026-11-17 08:33 (ESD_LAPTOP)

This commit is contained in:
2026-11-17 08:33:34 +09:00
parent 52e6c866d9
commit 56b6bd3ea9
12 changed files with 186 additions and 76 deletions
+1 -9
View File
@@ -62,7 +62,6 @@ import { attachDrag } from "./line_stack_drag";
import type { WorkSpec } from "../common_util/common_util_formula_doc_work";
import { openMachineWindow, type MachineCtx } from "./line_stack_machine";
import { dropCover } from "../common_util/common_util_formula_doc_cover_drop";
import { importView, type Basis } from "../common_util/common_util_formula_doc_import";
import { buildMachineCtl, lineCall } from "./line_stack_machine_ctl";
import { putWork, swapMachine } from "./line_stack_machine_work";
import { openStackPick, type StackTake } from "./line_stack_pick";
@@ -100,8 +99,6 @@ export interface EditHooks {
upper?: Cover | null;
/** 848-3 M01 기초 제어 구역 엶(시스템 관리자) — M02 = 층(`machine.scope`)이 엶 */
ctlEdit?: boolean;
/** 848-7 가져온 식 단가기준 — 엑셀 판 기계 줄 = `importView` 연결 `잠금` 묶음 잠김 */
basis?: Basis;
}
const field = (
@@ -122,11 +119,6 @@ const field = (
f.input.addEventListener("change", () => set(f.input.value));
return f.root;
};
/** 848-7 엑셀 판 기계 줄 잠긴 묶음(`importView` 연결 `잠금`) · 그 밖 = 없음 */
const lockOf = (h: EditHooks, sym: string | undefined): string[] | undefined =>
h.basis && sym
? (importView(h.doc, h.basis).변수?.find((x) => varId(x) === sym)?.연결 as { 잠금?: string[] } | undefined)?.잠금 // prettier-ignore
: undefined;
const btn = (label: string, onClick: () => void) =>
createButton({ label, variant: "ghost", size: 24, onClick });
@@ -587,7 +579,7 @@ export function buildEdit(h: EditHooks): HTMLElement {
if (line.꼴 === "금액" && h.calc && h.open.has(`mctl:${line.i}`)) {
const own = ownedOf(h.doc).get(line.i);
const zone = buildMachineCtl(
{ ...h, calc: h.calc, change: (fn) => h.change((d) => fn(d)), readOnly: !(h.machine?.scope || h.ctlEdit), lock: lockOf(h, own) }, // prettier-ignore
{ ...h, calc: h.calc, change: (fn) => h.change((d) => fn(d)), readOnly: !(h.machine?.scope || h.ctlEdit) }, // prettier-ignore
h.doc.변수?.find((x) => varId(x) === own)?.연결,
line.i,
);