@ehfuse/taskbox 0.10.28 → 0.10.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@
3
3
  * 등록 드로어와 상세 드로어가 함께 쓴다(공통 속성 그리드 아래에 붙는다).
4
4
  * 재현빈도·디바이스는 자유서술이 아니라 택일이다 — 빈 칸이 보여야 무엇을 적어야 하는지 인지된다.
5
5
  */
6
+ import { type TaskDetailForm } from "../state/useTaskDetailForm";
6
7
  /** 오류 속성 값 묶음이다. */
7
8
  export interface BugPropertyValues {
8
9
  repro: string;
@@ -14,6 +15,7 @@ export interface BugPropertyValues {
14
15
  /** 오류 속성 그리드 props 다. */
15
16
  export interface BugPropertiesGridProps {
16
17
  values: BugPropertyValues;
18
+ form?: TaskDetailForm;
17
19
  readOnly?: boolean;
18
20
  showResolution?: boolean;
19
21
  onChangeRepro: (value: string) => void;
@@ -23,4 +25,4 @@ export interface BugPropertiesGridProps {
23
25
  onChangeResolution?: (value: string) => void;
24
26
  }
25
27
  /** 오류 속성 그리드 컴포넌트다(2열 — 좁은 화면은 1열로 접힌다). */
26
- export declare function BugPropertiesGrid({ values, readOnly, showResolution, onChangeRepro, onChangeDevice, onChangeWhere, onChangeVersion, onChangeResolution, }: BugPropertiesGridProps): import("react").JSX.Element;
28
+ export declare function BugPropertiesGrid({ values, form, readOnly, showResolution, onChangeRepro, onChangeDevice, onChangeWhere, onChangeVersion, onChangeResolution, }: BugPropertiesGridProps): import("react").JSX.Element;
@@ -2,13 +2,19 @@
2
2
  * 속성 그리드용 텍스트 인라인 입력이다(테두리·라벨 없는 노션풍 값 칸).
3
3
  * blur/Enter 로 커밋하고, 외부(다른 사용자 realtime 등)에서 값이 바뀌면 입력값도 따라간다.
4
4
  * 일정 장소/오류 발생화면·버전처럼 검색이 필요 없는 자유 입력 값이 함께 쓴다.
5
+ * 본체는 mfc 의 PropertyInput 이다(2026-10-22) — 예전 동작(조합 중 Enter 도 벗어남 · Esc 는 드로어로 넘김)을 그대로 켠다.
6
+ * `form` + `name` 을 주면 폼의 그 칸만 구독한다(0.10.30 — 상세 폼, 고치면 폼에 먼저 적고 onCommit 으로 저장한다).
5
7
  */
8
+ import type { ComponentProps } from "react";
9
+ import { PropertyInput } from "@ehfuse/mui-form-controls";
6
10
  /** 속성 값 인라인 입력 props 다. */
7
11
  export interface InlineTextValueProps {
8
- value: string;
12
+ value?: string;
9
13
  placeholder: string;
10
14
  readOnly?: boolean;
11
15
  onCommit: (next: string) => void;
16
+ form?: ComponentProps<typeof PropertyInput>["form"];
17
+ name?: string;
12
18
  }
13
19
  /** 속성 값 인라인 입력 컴포넌트다. */
14
- export declare function InlineTextValue({ value, placeholder, readOnly, onCommit }: InlineTextValueProps): import("react").JSX.Element;
20
+ export declare function InlineTextValue({ value, placeholder, readOnly, onCommit, form, name }: InlineTextValueProps): import("react").JSX.Element;
@@ -1,6 +1,14 @@
1
- /** 상세·등록 드로어 공용 속성 한 줄이다(아이콘+라벨 | 값 영역 — 값 영역 클릭으로 수정한다). */
1
+ /**
2
+ * 상세·등록 드로어 공용 속성 한 줄이다(아이콘+라벨 | 값 영역 — 값 영역 클릭으로 수정한다).
3
+ * 본체는 mfc(@ehfuse/mui-form-controls 3.5.0~)의 PropertyRow 다 — 업무함 웹의 고객 · 거래처 상세와 같은 부품을 쓴다(2026-10-22).
4
+ * 여기서는 업무 상세의 모양만 정한다(TASKBOX_PROPERTY_APPEARANCE): 줄 32 · 라벨 104 · 값 14px · 누를 수 있는 줄만 호버 바탕.
5
+ * 라벨은 14px 이다(예전 13.5px — 소비처 저장소의 14px 아래 글자 금지 규칙에 맞췄다).
6
+ */
7
+ import { type PropertyAppearance } from "@ehfuse/mui-form-controls";
2
8
  import type { SxProps, Theme } from "@mui/material";
3
9
  import type { ReactNode } from "react";
10
+ /** 업무 상세 속성 줄 모양 — 줄 높이는 칩·버튼 값 행(상태·확인 등)의 실제 높이에 맞춘 고정값이라 텍스트 행도 같은 높이가 된다. */
11
+ export declare const TASKBOX_PROPERTY_APPEARANCE: PropertyAppearance;
4
12
  /** 속성 한 줄 props 다. */
5
13
  export interface PropertyRowProps {
6
14
  icon: ReactNode;
@@ -11,6 +11,7 @@ import { type ReactNode } from "react";
11
11
  import { type SxProps, type Theme } from "@mui/material";
12
12
  import type { SystemStyleObject } from "@mui/system";
13
13
  import type { TaskBoxCustomTab, TaskBoxMemberField, TaskBoxPriority, TaskBoxReminder } from "../types";
14
+ import { type TaskDetailForm } from "../state/useTaskDetailForm";
14
15
  /** 그리드에 표시할 속성 값 묶음이다. */
15
16
  export interface TaskCoreValues {
16
17
  tabKey: string;
@@ -35,6 +36,7 @@ export interface TaskSupportOriginInfo {
35
36
  /** 업무 공통 속성 그리드 props 다. */
36
37
  export interface TaskCorePropertiesGridProps {
37
38
  values: TaskCoreValues;
39
+ form?: TaskDetailForm;
38
40
  customTabs: TaskBoxCustomTab[];
39
41
  avatarSrcByName?: Map<string, string>;
40
42
  managerLocked?: boolean;
@@ -75,11 +77,11 @@ export interface TaskCorePropertiesGridProps {
75
77
  /**
76
78
  * 4열로 펴는 그리드 폭(2026-10-17) — 업무 상세가 분할 화면의 넓은 패널에 설 때 속성이 네 칸씩 선다.
77
79
  * 화면 폭이 아니라 그리드를 감싼 상자의 폭으로 가른다(컨테이너 쿼리) — 같은 상세가 720 드로어 · 분할 패널 · 아래 넓은 패널에 서기 때문이다.
78
- * 값은 소비처(www)의 속성 격자(PropertyGrid)와 같은 1180 이다 — 고객 · 거래처 상세와 업무 상세가 같은 폭에서 같이 4열이 된다.
80
+ * 값은 mfc 속성 묶음(PropertyGrid)의 4열 폭(1180)을 그대로 쓴다 — 고객 · 거래처 상세와 업무 상세가 같은 폭에서 같이 4열이 된다.
79
81
  */
80
82
  export declare const TASKBOX_GRID_FOUR_CQ = "@container (min-width: 1180px)";
81
83
  /** 넓은 2열에서 행을 지정 열에 고정하는 sx 다(좁은 1열 · 넓은 4열에서는 해제 — order 흐름을 따른다).
82
84
  * sx 배열 원소로도 섞어 쓸 수 있게 SxProps 가 아니라 단일 스타일 객체 타입으로 돌려준다. */
83
85
  export declare const wideColumnSx: (column: 1 | 2) => SystemStyleObject<Theme>;
84
86
  /** 업무 공통 속성 그리드 컴포넌트다. */
85
- export declare function TaskCorePropertiesGrid({ values, customTabs, avatarSrcByName, managerLocked, notice, event, hideDueDate, hideReminder, beforeStart, pinColumns, projectColumn, afterProject, readOnly, coreLocked, targetSummary, narrowCollapsedSx, reminderLocked, managerAction, hideProject, hideManager, hideReceivers, hideStartDate, hidePriority, leading, supportOrigin, trailing, onChangeProject, onChangeStartDate, onClearStartDate, onChangeDueDate, onChangeReminder, onChangePriority, onChangeEventTime, onChangeEventPlace, onChangeEventAddress, onMemberEdit, onAddProject, }: TaskCorePropertiesGridProps): import("react").JSX.Element;
87
+ export declare function TaskCorePropertiesGrid({ values, form, customTabs, avatarSrcByName, managerLocked, notice, event, hideDueDate, hideReminder, beforeStart, pinColumns, projectColumn, afterProject, readOnly, coreLocked, targetSummary, narrowCollapsedSx, reminderLocked, managerAction, hideProject, hideManager, hideReceivers, hideStartDate, hidePriority, leading, supportOrigin, trailing, onChangeProject, onChangeStartDate, onClearStartDate, onChangeDueDate, onChangeReminder, onChangePriority, onChangeEventTime, onChangeEventPlace, onChangeEventAddress, onMemberEdit, onAddProject, }: TaskCorePropertiesGridProps): import("react").JSX.Element;
@@ -0,0 +1,90 @@
1
+ /**
2
+ * 업무 상세 폼이다(0.10.30) — 상세에서 바로 고치는 칸(제목 · 상태 · 일시 · 중요도 · 라벨 · 비고 · 일정 · 오류 칸 등)의 값을
3
+ * 업무 객체 대신 forma 폼에 담아 칸마다 그 경로만 구독하게 한다.
4
+ * 왜: 예전에는 본문이 업무 객체 통째를 받아, 한 칸을 고치거나 다른 사람이 고친 값이 실시간으로 들어올 때마다 1600줄 본문이 전부 다시 그려졌다.
5
+ * 이제 그런 값은 폼의 그 경로만 바뀌어 그 칸만 다시 그린다(본문은 memo 비교에서 폼 칸을 뺀다 — TaskDetailBody).
6
+ *
7
+ * 바깥(업무 객체)에서 값이 바뀌면 폼을 따라 맞춘다. 다만 지금 고치는 칸은 건드리지 않는다:
8
+ * · 칸에 포커스가 있는 동안(입력 중)은 그 칸을 맞추지 않고 기준값도 옮기지 않는다 — 치던 글자가 남의 값으로 덮이지 않게.
9
+ * 포커스가 빠지면 그 칸만 다시 맞춘다(그 사이 들어온 남의 값이 그때 들어온다).
10
+ * · 내가 고쳐 폼 값이 기준값(마지막으로 맞춘 업무 값)과 달라진 칸은 업무 값이 그 값을 따라올 때까지 내 값을 둔다
11
+ * (www utils/entityRealtime 의 mergeRemoteFormValues 와 같은 규칙).
12
+ */
13
+ import { type ReactNode } from "react";
14
+ import { type UseGlobalFormReturn } from "@ehfuse/forma";
15
+ import type { TaskBoxItem, TaskBoxPriority, TaskBoxReminder } from "../types";
16
+ /** 상세 폼 값이다 — 키는 업무 칸 이름 그대로다(저장 콜백 · 실시간 비교가 같은 이름을 쓴다). */
17
+ export interface TaskDetailFormValues {
18
+ title: string;
19
+ status: string;
20
+ priority: TaskBoxPriority;
21
+ start_date: string;
22
+ due_date: string;
23
+ reminders: TaskBoxReminder[];
24
+ tab_key: string;
25
+ label_keys: string[];
26
+ note: string;
27
+ event_time: string;
28
+ event_place: string;
29
+ event_address: string;
30
+ story_points: number;
31
+ sprint_seq: number;
32
+ bug_repro: string;
33
+ bug_device: string;
34
+ bug_where: string;
35
+ bug_version: string;
36
+ resolution: string;
37
+ }
38
+ /** 상세 폼이 맡는 업무 칸 — 본문 memo 비교는 이 칸들을 보지 않는다(옛 사전알림 칸 reminder 는 reminders 로 읽힌다). */
39
+ export declare const TASK_DETAIL_FORM_FIELDS: readonly ["title", "status", "priority", "start_date", "due_date", "reminders", "tab_key", "label_keys", "note", "event_time", "event_place", "event_address", "story_points", "sprint_seq", "bug_repro", "bug_device", "bug_where", "bug_version", "resolution"];
40
+ /** 상세 폼 인스턴스 타입이다. */
41
+ export type TaskDetailForm = UseGlobalFormReturn<TaskDetailFormValues>;
42
+ /** 업무에서 상세 폼 값을 뽑는다(빈 값은 칸마다 같은 꼴로 — 비교가 undefined/"" 차이로 흔들리지 않게). */
43
+ export declare function taskToDetailFormValues(task: TaskBoxItem): TaskDetailFormValues;
44
+ /** 값 비교 — 배열(라벨 · 사전알림)은 내용으로 본다. */
45
+ export declare function sameDetailValue(a: unknown, b: unknown): boolean;
46
+ /** 상세 폼 묶음 — 본문의 칸들이 컨텍스트로 받는다(모두 인스턴스 동안 같은 참조다). */
47
+ export interface TaskDetailFormHandle {
48
+ form: TaskDetailForm;
49
+ /** 지금 업무(마지막으로 받은 것) — 본문이 memo 로 건너뛰어도 이벤트 처리는 최신 업무를 본다. */
50
+ getTask: () => TaskBoxItem;
51
+ /** 칸에 포커스가 들어왔다 — 그 칸은 바깥 값으로 맞추지 않는다. */
52
+ focusField: (name: string) => void;
53
+ /** 칸에서 포커스가 빠졌다 — 그 칸만 다시 맞춘다. */
54
+ blurField: (name: string) => void;
55
+ }
56
+ /**
57
+ * 상세 폼을 만들고 업무가 바뀔 때마다 맞춘다.
58
+ * 상세는 겹쳐 열리므로(연결 업무를 위에 띄움) 인스턴스마다 formId 를 따로 둔다 — 고정 id 면 위아래 상세가 한 폼을 나눠 쓴다.
59
+ */
60
+ export declare function useTaskDetailForm(task: TaskBoxItem): TaskDetailFormHandle;
61
+ /** 상세 폼 컨텍스트 — 상세 본문 안에서만 있다(등록 드로어 · 단독 그리드에는 없다). */
62
+ export declare const TaskDetailFormContext: import("react").Context<TaskDetailFormHandle | null>;
63
+ /** 상세 폼 묶음을 읽는다(상세 밖이면 null). */
64
+ export declare function useTaskDetailFormHandle(): TaskDetailFormHandle | null;
65
+ /** 폼의 한 칸만 구독해 그린다 — 다른 칸이 바뀌어도 이 조각은 다시 그리지 않는다. */
66
+ export declare function DetailFieldValue<K extends keyof TaskDetailFormValues>({ form, name, children, }: {
67
+ form: TaskDetailForm;
68
+ name: K;
69
+ children: (value: TaskDetailFormValues[K]) => ReactNode;
70
+ }): import("react").JSX.Element;
71
+ /**
72
+ * 입력 칸을 감싸 포커스를 상세 폼에 알린다 — 입력 중인 칸은 실시간 값으로 덮지 않는다.
73
+ * 상자를 만들지 않는다(display: contents) — 줄 배치 · 칸 폭은 예전 그대로다. 상세 밖이면 그냥 그린다.
74
+ */
75
+ export declare function DetailFieldScope({ name, children }: {
76
+ name: string;
77
+ children: ReactNode;
78
+ }): import("react").JSX.Element;
79
+ /**
80
+ * 렌더마다 새로 만들어지는 값(소비처가 끼우는 ReactNode · 업무 풀)을 본문 memo 밖으로 빼는 작은 저장소다.
81
+ * 본문은 그 자리에 구독 조각만 두고, 값이 바뀌면 그 조각만 다시 그린다.
82
+ */
83
+ export interface DetailSlotStore<T> {
84
+ get: () => T;
85
+ subscribe: (listener: () => void) => () => void;
86
+ }
87
+ /** 값을 저장소에 담는다 — 그리는 동안 값을 바꿔 두고(같은 렌더의 자식이 새 값을 읽게), 바뀌었으면 그린 뒤 구독자에게 알린다. */
88
+ export declare function useDetailSlotStore<T>(value: T): DetailSlotStore<T>;
89
+ /** 저장소 값을 구독한다. */
90
+ export declare function useDetailSlot<T>(store: DetailSlotStore<T>): T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/taskbox",
3
- "version": "0.10.28",
3
+ "version": "0.10.30",
4
4
  "description": "A React/MUI task inbox component with notices, per-user assignments, read tracking, and mobile card UI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -66,7 +66,7 @@
66
66
  "@ehfuse/mui-color-picker": ">=1.5.0",
67
67
  "@ehfuse/mui-confirm-action": "^0.1.5",
68
68
  "@ehfuse/mui-datetime-picker": ">=1.0.24",
69
- "@ehfuse/mui-form-controls": ">=3.4.1",
69
+ "@ehfuse/mui-form-controls": ">=3.5.0",
70
70
  "@ehfuse/mui-form-dialog": ">=1.7.51",
71
71
  "@ehfuse/mui-virtual-data-table": ">=1.8.0",
72
72
  "@ehfuse/overlay-scrollbar": ">=1.7.0",
@@ -101,7 +101,7 @@
101
101
  "@ehfuse/keyboard-state": "^1.1.1",
102
102
  "@ehfuse/mui-color-picker": "^1.5.4",
103
103
  "@ehfuse/mui-datetime-picker": "^1.0.26",
104
- "@ehfuse/mui-form-controls": "^3.4.3",
104
+ "@ehfuse/mui-form-controls": "^3.5.0",
105
105
  "@ehfuse/mui-form-dialog": "^1.7.58",
106
106
  "@ehfuse/mui-virtual-data-table": "^1.8.0",
107
107
  "@ehfuse/overlay-scrollbar": "^1.7.27",