Merge remote-tracking branch 'origin/sub_laptop_7' into main_laptop_1
This commit is contained in:
@@ -195,6 +195,8 @@ interface Entry extends HoRowLike {
|
||||
unitRef?: string;
|
||||
unitText?: string;
|
||||
warn?: string;
|
||||
/** (M02 727-2) 출처 꼬리표 — 줄 덧칸 `꼬리표` · 칸 폭 고정 · 넘치면 말줄임 + 풍선 */
|
||||
source?: string;
|
||||
}
|
||||
|
||||
/** 서버 조각(`/text` 줄의 `조각`) → 칸 조각 — 요소·표·로직은 알약(글 = 조각 글) · 나머지는 글자 */
|
||||
@@ -329,6 +331,7 @@ function entries(ctx: HoContext): Entry[] {
|
||||
logic: item.종류 === "로직",
|
||||
part: OF_COST[item.비목 ?? ""] ? PART_OF[OF_COST[item.비목 ?? ""]] : PART_OF[group],
|
||||
open: (self) => modalOf(self, ctx, { cond: cond ?? undefined, item }),
|
||||
source: tagOf(item),
|
||||
};
|
||||
return spread(entry, line);
|
||||
});
|
||||
@@ -354,6 +357,7 @@ function entries(ctx: HoContext): Entry[] {
|
||||
logic: false,
|
||||
part: PART_OF[group],
|
||||
open: (self) => modalOf(self, ctx, {}),
|
||||
source: tagOf(extra),
|
||||
};
|
||||
out.push(...spread(entry, line));
|
||||
});
|
||||
@@ -442,10 +446,19 @@ function formulaCell(e: Entry, ctx: HoContext, text = ""): HTMLElement {
|
||||
return cell;
|
||||
}
|
||||
|
||||
const tagOf = (x: object): string | undefined => (x as { 꼬리표?: string }).꼬리표 || undefined;
|
||||
const sourceTag = (text: string): HTMLElement => {
|
||||
const tag = createBadge(text, "neutral");
|
||||
tag.classList.add("m01lab__src");
|
||||
tag.title = text;
|
||||
return tag;
|
||||
};
|
||||
|
||||
function nameCell(e: Entry, label: string, tag: string): HTMLElement {
|
||||
return el("div", {
|
||||
children: [
|
||||
el("div", { text: label }),
|
||||
...(e.source ? [sourceTag(e.source)] : []),
|
||||
...(e.share && label === e.name ? [createBadge(`${e.share} ${tl("Share")}`, "accent")] : []),
|
||||
...(e.spec ? [el("div", { className: "ui-text ui-text--muted", text: e.spec })] : []),
|
||||
...(e.warn ? [createBadge(`${tx("Calc_UnitWarn")} · ${e.warn}`, "warning")] : []),
|
||||
|
||||
Reference in New Issue
Block a user