@ehfuse/taskbox 0.7.15 → 0.7.17

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.
@@ -1,24 +1,9 @@
1
- /** 공통 확인 UI 다(www components/ui/ConfirmActionPopper 사본). 데스크탑=앵커 팝퍼, 모바일=중앙 다이얼로그. */
2
- import type { ReactNode } from "react";
3
- import type { PopperProps } from "@mui/material/Popper";
4
- /** ConfirmActionPopper 속성이다. */
5
- interface ConfirmActionPopperProps {
6
- open: boolean;
7
- anchorEl: HTMLElement | null;
8
- title?: ReactNode;
9
- content?: ReactNode;
10
- confirmText?: string;
11
- cancelText?: string;
12
- placement?: PopperProps["placement"];
13
- minWidth?: number;
14
- minHeight?: number;
15
- titleFontSize?: number;
16
- actionFontSize?: number;
17
- actionMinHeight?: number;
18
- zIndex?: number;
19
- onCancel: () => void;
20
- onConfirm: () => void;
21
- }
22
- /** 공통 확인 UI 를 렌더링한다. */
23
- export declare function ConfirmActionPopper({ open, anchorEl, title, content, confirmText, cancelText, placement, minWidth, minHeight, titleFontSize, actionFontSize, actionMinHeight, zIndex, onCancel, onConfirm, }: ConfirmActionPopperProps): import("react").JSX.Element;
24
- export {};
1
+ /**
2
+ * 공통 확인 UI 다 — 구현은 `@ehfuse/mui-confirm-action` 패키지가 갖는다.
3
+ * 여기서는 taskbox 의 모바일 판정(TaskboxProvider `isMobile` 우선)만 얹어 넘긴다.
4
+ * (예전에는 www·taskbox·mua-ui 가 각자 사본을 들고 있어 수정이 한쪽에만 들어가는 일이 잦았다.)
5
+ */
6
+ import type { ConfirmActionPopperProps } from "@ehfuse/mui-confirm-action";
7
+ export type { ConfirmActionPopperProps };
8
+ /** 확인 UI 를 taskbox 의 모바일 판정으로 렌더링한다. */
9
+ export declare function ConfirmActionPopper(props: ConfirmActionPopperProps): import("react").JSX.Element;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 접근성 보조 유틸이다 — 마우스로만 열리던 칸을 키보드로도 열 수 있게 만든다.
3
+ *
4
+ * 업무함 표는 `<table>` 이 아니라 CSS grid 위의 div 다. 그 위에 table 역할(role)을 씌우면
5
+ * 가상화(react-virtuoso)가 끼워 넣는 래퍼 div 때문에 행·셀의 부모-자식 관계가 끊겨
6
+ * 스크린리더가 오히려 더 잘못 읽는다. 그래서 구조 역할은 손대지 않고,
7
+ * **초점(tab)·활성화(Enter/Space)·이름(aria-label)** 세 가지만 붙인다 — 여기서 얻는 것이 가장 크다.
8
+ */
9
+ import type { KeyboardEvent } from "react";
10
+ /** 키보드로 열 수 있는 칸에 붙일 props 다. */
11
+ export interface InteractiveProps {
12
+ role: "button";
13
+ tabIndex: 0;
14
+ "aria-label": string;
15
+ "aria-haspopup"?: "menu" | "dialog" | "listbox" | "true";
16
+ onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
17
+ }
18
+ /** 칸을 키보드로도 열 수 있게 하는 props 를 만든다(잠긴 칸이면 아무것도 붙이지 않는다). */
19
+ export declare function interactiveProps(options: {
20
+ label: string;
21
+ onActivate: (element: HTMLElement) => void;
22
+ disabled?: boolean;
23
+ haspopup?: "menu" | "dialog" | "listbox" | "true";
24
+ }): InteractiveProps | Record<string, never>;
25
+ /** 정렬 상태를 말로 풀어 준다(헤더 이름 뒤에 붙여 읽힌다). */
26
+ export declare function sortStateLabel(sorted: boolean, direction: "asc" | "desc"): string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 내용 에디터 높이 기억 저장소다(기기 로컬).
3
+ * 리사이즈 핸들로 늘린 높이는 업무 데이터가 아니라 보는 사람의 화면 취향이라
4
+ * 서버에 저장(=수정 알림 발생)하지 않고 이 기기에만 남긴다.
5
+ * 높이는 업무 단위로 기억하므로(업무마다 내용 분량이 다르다) 키가 계속 늘어난다 —
6
+ * 오래 안 쓴 항목을 스스로 정리해 localStorage 가 무한정 커지지 않게 한다.
7
+ */
8
+ /** 저장된 에디터 높이를 읽는다(없거나 범위를 벗어나면 null). */
9
+ export declare function loadEditorHeight(scope: string): number | null;
10
+ /** 에디터 높이를 기억한다(범위를 벗어난 값은 저장하지 않는다). */
11
+ export declare function saveEditorHeight(scope: string, height: number): void;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 상세 드로어의 활동로그(감사 이력) 섹션이다 — 누가 언제 무엇을 바꿨는지 시간순으로 보여준다.
3
+ * 기본은 접힌 채이고, 펼칠 때 소비처가 서버에서 읽어 온다(닫힌 업무마다 이력을 미리 당기지 않는다).
4
+ * 댓글은 여기 담지 않는다 — 댓글 섹션이 따로 있어 두 곳에 같은 글이 보이면 읽기 어렵다.
5
+ */
6
+ import type { TaskActivityItem } from "../types";
7
+ /** 활동 섹션 props 다. */
8
+ export interface TaskActivitySectionProps {
9
+ taskSeq: number;
10
+ items?: TaskActivityItem[];
11
+ loading?: boolean;
12
+ onExpand?: (taskSeq: number) => void;
13
+ }
14
+ /** 업무 활동로그 섹션 컴포넌트다. */
15
+ export declare function TaskActivitySection({ taskSeq, items, loading, onExpand }: TaskActivitySectionProps): import("react").JSX.Element;
@@ -61,6 +61,15 @@ export interface TaskboxConfig {
61
61
  * 앱 웹뷰(Flutter)처럼 새 탭이 없는 환경은 여기서 외부 브라우저 열기 메시지를 보낸다.
62
62
  */
63
63
  openExternalUrl?: (url: string) => void;
64
+ /**
65
+ * 업무 공유 텍스트를 기기 공유시트로 넘기는 방법. 미지정이면 `navigator.share`,
66
+ * 그것도 없으면 클립보드 복사로 떨어진다(utils/taskShareText).
67
+ *
68
+ * 앱 웹뷰(Flutter)에는 `navigator.share` 가 **없다.** 그래서 주입하지 않으면 앱에서는
69
+ * 공유 버튼이 늘 "업무 내용을 복사했습니다" 로 끝나고 카톡·문자 선택 화면이 뜨지 않는다.
70
+ * 앱 소비처는 여기에 네이티브 공유 브릿지를 넘긴다.
71
+ */
72
+ shareText?: (text: string) => void;
64
73
  /**
65
74
  * 업무 제목·본문 AI 번역. 주입되면 내용 읽기 뷰의 아이콘 열 마지막에 번역 아이콘이 생기고,
66
75
  * 언어를 고르면 결과를 다이얼로그로 보여준다. 결과는 화면이 (업무, 언어)별로 세션 캐시한다.
@@ -8,7 +8,11 @@ import type { TaskBoxItem } from "../types";
8
8
  export declare function buildTaskShareText(task: TaskBoxItem): string;
9
9
  /**
10
10
  * 업무 내용을 공유한다(상세 드로어 공유 버튼·우클릭 메뉴 공용).
11
- * 모바일(useNativeShare)은 기기 공유시트(카톡/문자 선택 UI)를 먼저 시도하고,
12
- * 공유시트가 없는 환경(데스크톱·앱 웹뷰 — 웹뷰에는 navigator.share 가 없다)은 클립보드 복사로 폴백한다.
11
+ *
12
+ * 우선순위
13
+ * 1. 소비처 주입(shareText) — 앱 웹뷰가 네이티브 공유시트를 띄우는 길이다.
14
+ * 웹뷰에는 navigator.share 가 **없어서**, 이게 없으면 앱은 늘 3번으로 떨어진다.
15
+ * 2. navigator.share — 모바일 브라우저의 기기 공유시트
16
+ * 3. 클립보드 복사 — 데스크톱 등 공유시트가 없는 환경
13
17
  */
14
- export declare function shareTaskText(task: TaskBoxItem, useNativeShare: boolean): void;
18
+ export declare function shareTaskText(task: TaskBoxItem, useNativeShare: boolean, shareText?: (text: string) => void): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ehfuse/taskbox",
3
- "version": "0.7.15",
3
+ "version": "0.7.17",
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",