Files
Aislo/M01_MasterData/M01_MasterData_UI_LogicLab_Modal.ts
T
eomsangdonandClaude Opus 5.5 9c78072971 refactor(855-E 2-E1): M01 화면 옛 시험 계산 · 옛 상세 몸 부품 걷음
- 지움(부르는 곳 0 — 저장소 TS · cjs · py · html 다시 찾음): UI_Logic_Drive.ts(driveRun · autoFill) · UI_Logic_CalcPick.ts · UI_LogicLab_Pill.ts · .css
- Logic_Api: runCalc · runText · fetchAuto · searchPrice · CalcAnswer · TextAnswer · TextLine · TextPiece 걷음
- LogicLab_Modal: 옛 재료 · 표 · 참조 · 글 모달 걷음 — 로직 열기 · headWord 만 남김(−550 줄)
- Logic_Note.explain · Side.hasMasterJump · 죽은 CSS 다섯 · 글 키 29(옛 시험 계산 · 모달 · 알약) 걷음
- 시험: 지운 파일 글자만 보던 test_750_2(빈 파일 됨) · test_799_2 구동 시험 · test_734 알약 · 풍선 시험 지움 · helper_717_1 · test_717_1 의 /calc · /text · /logic/auto 화면 길 줄 걷음
- typecheck 0 · 관련 50 통과

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 03:12:11 +09:00

23 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* =============================================================================
* M01_MasterData_UI_LogicLab_Modal.ts
* 로직 알약 → 그 로직 열기(로직 화면이 열기를 등록) · 재료 찾기 글 머리 낱말(`headWord`)
* — 옛 상세 몸 재료 · 표 모달은 855 2-E1 에 걷음(부르는 곳 0)
* ========================================================================== */
/** 로직 알약 → 그 로직 열기 — 로직 화면이 자기 열기를 등록 · 열려 있는 모달은 다 닫음 */
let logicOpener: (key: string) => void = () => {};
export const setLogicOpener = (fn: (key: string) => void): void => {
logicOpener = fn;
};
export function openLogic(key: string): void {
document.querySelectorAll(".m01-logic__backdrop").forEach((b) => b.remove());
logicOpener(key);
}
/** 재료 모달 검색 칸 글 — 검색어 첫 낱말의 괄호 앞(「합판(내수) 12t」 → 「합판」) */
export const headWord = (text: unknown): string =>
String(text ?? "")
.trim()
.split(/\s+/)[0]
.replace(/[((].*$/, "");