@ehfuse/taskbox 0.5.227 → 0.5.228

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.
@@ -0,0 +1,33 @@
1
+ /**
2
+ * 업무함 키보드 단축키 훅이다 — 목록 화면에서 손을 마우스로 옮기지 않고 자주 쓰는 동작을 부른다.
3
+ *
4
+ * 규칙 셋을 지킨다:
5
+ * 1) **입력 중에는 절대 가로채지 않는다** — 제목·비고·에디터·검색칸에 글을 쓰는 중이면 전부 무시한다.
6
+ * (업무함은 인라인 편집이 많아 이 가드가 없으면 "n" 을 못 친다.)
7
+ * 2) **수식키 조합은 건드리지 않는다** — Ctrl/Cmd/Alt 조합은 브라우저·OS 몫이다.
8
+ * 3) **두 벌 키(g 다음 키)** 는 1.2초 안에 이어 눌러야 한다 — 잘못 눌렀을 때 다음 타자가 오작동하지 않게.
9
+ *
10
+ * 소비처가 필요한 핸들러만 넘기면 그 키만 동작한다(안 넘긴 키는 아무 일도 하지 않는다).
11
+ */
12
+ /** 보기 전환 대상이다(g 다음 키로 고른다). */
13
+ export type TaskboxShortcutView = "list" | "board" | "kanban" | "calendar" | "month" | "timeline";
14
+ /** 단축키 핸들러 묶음이다 — 넘긴 것만 동작한다. */
15
+ export interface TaskboxShortcutHandlers {
16
+ onCreateTask?: () => void;
17
+ onFocusSearch?: () => void;
18
+ onToggleHelp?: () => void;
19
+ onChangeView?: (view: TaskboxShortcutView) => void;
20
+ onRefresh?: () => void;
21
+ onEscape?: () => void;
22
+ }
23
+ /** 훅 옵션이다. */
24
+ export interface TaskboxShortcutOptions {
25
+ enabled?: boolean;
26
+ }
27
+ /** 업무함 단축키를 등록한다. */
28
+ export declare function useTaskboxShortcuts(handlers: TaskboxShortcutHandlers, options?: TaskboxShortcutOptions): void;
29
+ /** 도움말에 보여줄 단축키 목록이다(키, 설명). */
30
+ export declare const TASKBOX_SHORTCUT_HELP: {
31
+ keys: string;
32
+ description: string;
33
+ }[];
@@ -36,6 +36,13 @@ export interface TaskboxConfig {
36
36
  buildFileUrl?: (uuid: string, options?: TaskboxFileUrlOptions) => string;
37
37
  /** 첨부 업로드 한도(MB). 기본 50. */
38
38
  uploadMaxMb?: number;
39
+ /**
40
+ * 본문 에디터에 넣는 이미지(붙여넣기·드래그·툴바 삽입)를 올리고 표시 URL 을 돌려준다.
41
+ * 미지정이면 에디터가 data URL(base64)을 본문 HTML 에 그대로 박는다 —
42
+ * 그 본문은 업무 blob 에 저장되므로 스크린샷 한 장이 수백 KB 로 남고, 목록 로드까지 그만큼 무거워진다.
43
+ * 본문을 서버에 저장하는 소비처는 반드시 지정할 것.
44
+ */
45
+ uploadContentImage?: (file: File) => Promise<string>;
39
46
  /** 모바일 폰트 오프셋(px). 지정 시 Provider 가 CSS 변수를 주입한다. 미지정=앱 CSS 변수 상속. */
40
47
  mobileFontOffsetPx?: number;
41
48
  /** 모바일 판정 강제(미지정=내장 미디어쿼리 lg 미만). */
@@ -0,0 +1,43 @@
1
+ /**
2
+ * 인원별 업무 부하(워크로드) 계산 유틸이다.
3
+ *
4
+ * "누가 얼마나 안고 있는가"를 **미완료 업무 기준**으로 센다 — 완료된 일은 부하가 아니고,
5
+ * 보관·공지는 담당 개념이 없어 제외한다. 일정은 참석 약속이라 부하로 세지 않는다.
6
+ *
7
+ * 부하를 급한 순서로 세 칸에 나눈다(지연 → 임박 → 여유). 총량만 보면 "10건"이 같아도
8
+ * 전부 지난 마감인 사람과 다음 달 마감인 사람의 사정이 전혀 다르기 때문이다.
9
+ * 마감이 없는 업무는 급할 근거가 없어 여유로 센다.
10
+ */
11
+ import type { TaskBoxItem } from "../types";
12
+ /** 부하 구간이다 — overdue=마감 지남, soon=임박(기본 7일 이내), later=그 밖(마감 없음 포함). */
13
+ export type WorkloadBucket = "overdue" | "soon" | "later";
14
+ /** 한 사람의 부하다. */
15
+ export interface WorkloadRow {
16
+ accountSeq: number;
17
+ name: string;
18
+ overdue: number;
19
+ soon: number;
20
+ later: number;
21
+ total: number;
22
+ points: number;
23
+ }
24
+ /** 워크로드 계산 옵션이다. */
25
+ export interface WorkloadOptions {
26
+ todayStr: string;
27
+ soonDays?: number;
28
+ includeUnassigned?: boolean;
29
+ limit?: number;
30
+ }
31
+ /**
32
+ * 인원별 부하를 만든다(부하 큰 순 정렬 — 지연이 많은 사람이 위로).
33
+ * 담당자는 책임자(manager) 기준이다. 참조자는 "보고 있는 사람"이지 짊어진 사람이 아니라 세지 않는다.
34
+ */
35
+ export declare function buildWorkloadRows(tasks: readonly TaskBoxItem[], options: WorkloadOptions): WorkloadRow[];
36
+ /**
37
+ * 과부하 임계치를 넘긴 행인지 본다.
38
+ * 절대 기준(예: 15건)이 아니라 **팀 평균 대비**로도 볼 수 있게 둘 다 받는다 —
39
+ * 조직마다 한 사람이 안는 건수가 달라 절대값만으로는 늘 맞지 않는다.
40
+ */
41
+ export declare function isOverloaded(row: WorkloadRow, threshold: number): boolean;
42
+ /** 팀 평균 미완료 건수다(미배정 행 제외 — 사람 수로 나눠야 평균이 뜻을 갖는다). */
43
+ export declare function averageWorkload(rows: readonly WorkloadRow[]): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/taskbox",
3
- "version": "0.5.227",
3
+ "version": "0.5.228",
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",
@@ -58,7 +58,7 @@
58
58
  "@dnd-kit/sortable": ">=8.0.0",
59
59
  "@dnd-kit/utilities": ">=3.0.0",
60
60
  "@ehfuse/alerts": ">=1.1.4",
61
- "@ehfuse/editor": ">=1.1.0",
61
+ "@ehfuse/editor": ">=1.1.11",
62
62
  "@ehfuse/forma": ">=3.4.0",
63
63
  "@ehfuse/mui-color-picker": ">=1.5.0",
64
64
  "@ehfuse/mui-datetime-picker": ">=1.0.20",
@@ -91,7 +91,7 @@
91
91
  "@dnd-kit/sortable": "^10.0.0",
92
92
  "@dnd-kit/utilities": "^3.2.2",
93
93
  "@ehfuse/alerts": "^1.1.4",
94
- "@ehfuse/editor": "^1.1.8",
94
+ "@ehfuse/editor": "^1.1.11",
95
95
  "@ehfuse/forma": "^3.4.0",
96
96
  "@ehfuse/mui-color-picker": "^1.5.4",
97
97
  "@ehfuse/mui-datetime-picker": "1.0.21",
@@ -119,5 +119,8 @@
119
119
  },
120
120
  "engines": {
121
121
  "node": ">=18.0.0"
122
+ },
123
+ "dependencies": {
124
+ "@ehfuse/keyboard-state": "^1.1.0"
122
125
  }
123
126
  }