refactor(794-1b): M01 흐름도 패널 걷음 — 로직 상세 오른쪽 = 원문만 · [신규 로직] = 빈 시트 줄 · 흐름 서버 길 · DataFlow 화면 지움
요구 651 · 653 — 계산 공식 참고용 흐름도(① M01 로직 상세 오른쪽 접는 패널)를 걷음. ② M02 일위대가 다이어그램은 그대로.
지움(64 파일 · 18,666 줄 · 되돌릴 길 = git 이력)
- M01 6 파일 1,064 줄 — Store_Flow.py · UI_LogicLab_Flow.ts/.css · FlowRows.ts · FlowView.ts/.css
- M02_MasterTemplete/DataFlow 43 파일 12,799 줄 — 흐름도 화면 · 셈(Compute · Convert · Lookup · Model · Eval …)
- 시험 15 파일 4,803 줄 — test_m01_logic_flow{view,_engine,_project,_save} · test_m02_df_*(값 찾기 values_old 뺌) — 지운 흐름 코드만 지키던 것
남김(바닥) — DataFlow M02_DF_UnitPick(일위대가 셋) · M02_DF_Values(M02_Item_Prices) · M02_DF_Round · _standard 표 ·
M02_DF_Router = GET /api/m02/df/standards 하나 · M02_DF_Api = cfStandards 하나 · CfRound 꼴은 Round 안으로
고침
- M01 Router — /save = Store_Make.save(개정 확인 · 자체 파일 새 줄 GX · added 그대로) · /calc /text /logic/auto = 옛 셈만 · /logic/flow 둘 지움
- master_formula — 흐름 훅 지움 · 줄에 「흐름」 이 남으면 「흐름도 로직은 걷음」 까닭 오류(저장된 흐름 로직 0 — 마스터 · storage 다시 확인)
- Sangeun_Calc._defaults = 옛 자동값 · M02_Logic_Lib_Read /logic/flow 지움 · main.py 주석
- 화면 — LogicLab(startFlow · scheduleFlow · 예시값 잇기 지움 · [신규 로직] 줄 = 입력 · 중간 · 호표 빈 목록 + 끝수 null) ·
Side(원문 패널 하나) · Source(머리 칸 이름 m01lab-src__top/__title · DF_Panel.css 안 씀) · Detail · View(nowInputs 지움) · Sheet(흐름 갈래 지움) · 글
- 시험 — 지운 파일을 가리키던 목록 넷(spreadsheet_size · 208_1 · 588 · input_prefs) · 717_1 흐름 길 두 줄 · values_old 흐름 셈 부분 지움
- test_713_3_list 기대 — 로직 1,461 → 1,515 · 묶음 307 → 335 · 작업량 21 → 65 · 부르는 506 → 512(782-1 · 2 · 3 건설 기초 로직 54 더함 ·
옛 키만 세면 307 · 21 · 506 그대로)
- 새 지킴 test_794_1b_flow_gone — 흐름 길 404 · 표준 표 남음 · 신규 로직 자체 GX · 흐름 남은 줄 까닭 오류
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,79 +0,0 @@
|
||||
/* =============================================================================
|
||||
* M02_DF_RoundRow.ts
|
||||
* 끝수 고르기 줄 — 소수 몇 자리 · 반올림/올림/버림 · 단위 표준에서 자리 제안(적용 단추)
|
||||
* 모양은 M02_DF_Model 의 CfRound · 칸 · 단추는 공용 작은 크기 · 글 [한, 영] 짝은 아래 TEXT
|
||||
* ========================================================================== */
|
||||
|
||||
import { currentLanguageIndex } from "@ui/ui_template_locale";
|
||||
import { createButton, el } from "@ui/ui_template_elements";
|
||||
import type { CfRound } from "./M02_DF_Model";
|
||||
import "@ui/ui_template_text.css";
|
||||
|
||||
const TEXT = {
|
||||
Label: ["끝수", "Rounding"],
|
||||
None: ["안 씀", "none"],
|
||||
Places: ["소수 {n}자리", "{n} decimals"],
|
||||
Suggest: ["표준 제안: 소수 {n}자리", "Standard suggests {n} decimals"],
|
||||
Apply: ["적용", "Apply"],
|
||||
PlacesAria: ["소수자리", "Decimal places"],
|
||||
ModeAria: ["방법", "Method"],
|
||||
} as const;
|
||||
|
||||
const METHODS: CfRound["method"][] = ["반올림", "올림", "버림"];
|
||||
|
||||
const tr = (key: keyof typeof TEXT, n?: number): string =>
|
||||
TEXT[key][currentLanguageIndex === 1 ? 1 : 0].replace("{n}", String(n ?? ""));
|
||||
|
||||
export interface RoundRowOptions {
|
||||
/** 지금 끝수 — 없으면 undefined */
|
||||
round: CfRound | undefined;
|
||||
/** 단위 표준이 제안한 소수자리 */
|
||||
suggest: number | null;
|
||||
readOnly?: boolean;
|
||||
/** null = 끝수 벗김 */
|
||||
onApply(round: CfRound | null): void;
|
||||
}
|
||||
|
||||
export function createRoundRow(opts: RoundRowOptions): HTMLElement {
|
||||
const now = opts.round ?? null;
|
||||
const places = el("select", {
|
||||
className: "ui-select ui-select--sm",
|
||||
attrs: { "aria-label": tr("PlacesAria") },
|
||||
});
|
||||
places.append(el("option", { attrs: { value: "" }, text: tr("None") }));
|
||||
for (let n = 0; n <= 6; n++) {
|
||||
places.append(el("option", { attrs: { value: String(n) }, text: tr("Places", n) }));
|
||||
}
|
||||
places.value = now ? String(now.places) : "";
|
||||
const method = el("select", {
|
||||
className: "ui-select ui-select--sm",
|
||||
attrs: { "aria-label": tr("ModeAria") },
|
||||
});
|
||||
for (const m of METHODS) method.append(el("option", { attrs: { value: m }, text: m }));
|
||||
method.value = now?.method ?? "반올림";
|
||||
if (opts.readOnly) places.disabled = method.disabled = true;
|
||||
const emit = (): void =>
|
||||
opts.onApply(
|
||||
places.value === ""
|
||||
? null
|
||||
: { places: Number(places.value), method: method.value as CfRound["method"] },
|
||||
);
|
||||
places.addEventListener("change", emit);
|
||||
method.addEventListener("change", () => places.value !== "" && emit());
|
||||
const row = el("div", {
|
||||
className: "m02-dfpanel-row",
|
||||
children: [el("span", { className: "m02-dfpanel-label", text: tr("Label") }), places, method],
|
||||
});
|
||||
if (opts.suggest !== null && !now && !opts.readOnly) {
|
||||
row.append(
|
||||
el("span", { className: "ui-text ui-text--muted", text: tr("Suggest", opts.suggest) }),
|
||||
createButton({
|
||||
label: tr("Apply"),
|
||||
variant: "ghost",
|
||||
size: "sm",
|
||||
onClick: () => opts.onApply({ places: opts.suggest!, method: "반올림" }),
|
||||
}),
|
||||
);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
Reference in New Issue
Block a user