feat(M01): 로직 화면에 「새로 만들기」 단추 · 저장 뒤 방식 C 로 열기 · 테스트 컨테이너와 방식 A·B 화면 걷음

- 로직 화면 바의 새로 만들기 단추가 모달을 엶 · 저장·본떠 저장 뒤 새 자체 로직을 흐름 그림으로 바로 엶
- UI_Test* 다섯 파일 삭제 · 왼쪽 「테스트」 줄 제거 · 모달의 까닭 글은 UI_Logic_Text 것을 씀
- 견본 10개 키 목록은 시험(test_m01_test_container)으로 옮김 · 흐름 그림 시험의 옛 파일 이름을 바로잡음

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT
This commit is contained in:
2026-09-21 09:57:17 +09:00
co-authored by Claude Sonnet 5
parent e2d3eb5737
commit f458da7f20
12 changed files with 34 additions and 893 deletions
+9 -35
View File
@@ -35,6 +35,7 @@ import { buildCalc } from "./M01_MasterData_UI_Logic_Calc";
import { buildEditor } from "./M01_MasterData_UI_Logic_Edit";
import { isOwnLogic, mountFlow } from "./M01_MasterData_UI_Logic_Flow";
import { buildList, logicId, type ListItem, type ListMark } from "./M01_MasterData_UI_Logic_List";
import { openLogicWizard } from "./M01_MasterData_UI_Logic_Wizard";
import { openPicker } from "./M01_MasterData_UI_Logic_Pick";
import type { SideHandle } from "./M01_MasterData_UI_Side";
import { tx } from "./M01_MasterData_UI_Logic_Text";
@@ -286,41 +287,14 @@ export async function mountM01Logic(
persist();
};
const onNew = (): void => {
const f = files.find((x) => x.file === opened?.file) ?? files[0];
if (!f) return;
const id = `new:${Date.now()}`;
// 원문번호는 절 번호만(부문은 구분 칸) · 키는 저장 때 서버가 줌
const row: LogicRow = {
키: "",
원문번호: `${tx("New_Key")} ${Object.keys(drafts).length + 1}`,
이름: "",
결과단위: "원/",
출처: "",
소유: "공용",
입력: [],
중간: [],
호표: [],
덧줄: [],
끝수: null,
};
const next: Opened = {
id,
sub: subOf(f),
file: f.file,
version: f.version,
origKey: null,
row,
original: null,
prices: {},
reasons: [],
lines: null,
values: {},
};
drafts[id] = pick(next, clone(row));
persist();
show(next);
};
/** 「새로 만들기」 모달 — 저장·본떠 저장이 끝나면 그 새 자체 로직을 흐름 그림으로 바로 엶 */
const onNew = (): void =>
openLogicWizard({
onSaved: (key) =>
void reload()
.then(() => open(logicId("자체", key), "자체", key))
.catch(failed),
});
/** 「본떠 만들기」 — 정본을 자체 파일로 복제하고(계약 5장) 그 새 로직을 바로 엶 */
const onCopy = async (from: Opened): Promise<void> => {