@ehfuse/taskbox 0.1.0

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.
Files changed (114) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +57 -0
  3. package/dist/TaskboxProvider.d.ts +19 -0
  4. package/dist/atoms/CommentBubbleIcon.d.ts +7 -0
  5. package/dist/atoms/ConfirmCountButton.d.ts +29 -0
  6. package/dist/atoms/DateRangeFilterPopover.d.ts +14 -0
  7. package/dist/atoms/DueDatePickerPopover.d.ts +48 -0
  8. package/dist/atoms/GoogleEventChip.d.ts +8 -0
  9. package/dist/atoms/GroupByMenuButton.d.ts +11 -0
  10. package/dist/atoms/IconPickerGrid.d.ts +7 -0
  11. package/dist/atoms/LabelFilterMenu.d.ts +16 -0
  12. package/dist/atoms/LabelSelectMenu.d.ts +15 -0
  13. package/dist/atoms/MemberFilterMenu.d.ts +20 -0
  14. package/dist/atoms/ReceiverAvatars.d.ts +14 -0
  15. package/dist/atoms/SprintFilterMenu.d.ts +18 -0
  16. package/dist/atoms/StatusSelectMenu.d.ts +16 -0
  17. package/dist/atoms/TaskAckListPopover.d.ts +16 -0
  18. package/dist/atoms/TaskBoxTabs.d.ts +28 -0
  19. package/dist/atoms/TaskContextMenu.d.ts +37 -0
  20. package/dist/atoms/TaskDateRangeFilter.d.ts +11 -0
  21. package/dist/atoms/TaskIconPickerPopover.d.ts +12 -0
  22. package/dist/atoms/TaskPriorityChip.d.ts +9 -0
  23. package/dist/atoms/TaskStatusChip.d.ts +25 -0
  24. package/dist/board/SortableTaskCard.d.ts +21 -0
  25. package/dist/board/TaskBoxMobileCard.d.ts +28 -0
  26. package/dist/board/TaskCardContent.d.ts +33 -0
  27. package/dist/charts/SprintBurndownChart.d.ts +16 -0
  28. package/dist/charts/SprintVelocityChart.d.ts +13 -0
  29. package/dist/configs/projectIcons.d.ts +23 -0
  30. package/dist/dialogs/AddLabelDialog.d.ts +8 -0
  31. package/dist/dialogs/AddTabDialog.d.ts +16 -0
  32. package/dist/dialogs/CalendarImportDialog.d.ts +16 -0
  33. package/dist/dialogs/CalendarSubscribeDialog.d.ts +17 -0
  34. package/dist/dialogs/SprintChartsDialog.d.ts +16 -0
  35. package/dist/dialogs/SprintManageDialog.d.ts +29 -0
  36. package/dist/dialogs/TaskLinkDialog.d.ts +16 -0
  37. package/dist/drawers/TaskCreateBody.d.ts +35 -0
  38. package/dist/drawers/TaskCreateDrawer.d.ts +14 -0
  39. package/dist/drawers/TaskDetailBody.d.ts +63 -0
  40. package/dist/drawers/TaskDetailDrawer.d.ts +22 -0
  41. package/dist/drawers/TaskDetailHeader.d.ts +18 -0
  42. package/dist/index.d.ts +86 -0
  43. package/dist/index.esm.js +14 -0
  44. package/dist/index.esm.js.map +7 -0
  45. package/dist/index.js +14 -0
  46. package/dist/index.js.map +7 -0
  47. package/dist/internal/AccountAvatar.d.ts +15 -0
  48. package/dist/internal/ConfirmActionPopper.d.ts +24 -0
  49. package/dist/internal/HighlightText.d.ts +17 -0
  50. package/dist/internal/MobileCardStack.d.ts +19 -0
  51. package/dist/internal/TrashIcon.d.ts +4 -0
  52. package/dist/internal/dateUtils.d.ts +5 -0
  53. package/dist/internal/filePreview.d.ts +3 -0
  54. package/dist/internal/formatUtils.d.ts +3 -0
  55. package/dist/internal/htmlToPlainText.d.ts +6 -0
  56. package/dist/internal/mfs.d.ts +12 -0
  57. package/dist/internal/strUtils.d.ts +8 -0
  58. package/dist/internal/useCenteredMenuProps.d.ts +8 -0
  59. package/dist/internal/useHolidays.d.ts +7 -0
  60. package/dist/internal/useIsMobile.d.ts +7 -0
  61. package/dist/sections/BugPropertiesGrid.d.ts +26 -0
  62. package/dist/sections/DrawerSection.d.ts +11 -0
  63. package/dist/sections/InlineAddressInput.d.ts +17 -0
  64. package/dist/sections/InlineTextValue.d.ts +14 -0
  65. package/dist/sections/PropertyRow.d.ts +13 -0
  66. package/dist/sections/RelatedTasksSection.d.ts +17 -0
  67. package/dist/sections/TaskAttachmentUploadProgress.d.ts +18 -0
  68. package/dist/sections/TaskAttachmentsSection.d.ts +19 -0
  69. package/dist/sections/TaskChecklistSection.d.ts +18 -0
  70. package/dist/sections/TaskCommentsSection.d.ts +29 -0
  71. package/dist/sections/TaskContentEditor.d.ts +17 -0
  72. package/dist/sections/TaskCorePropertiesGrid.d.ts +52 -0
  73. package/dist/sections/TaskNoteField.d.ts +10 -0
  74. package/dist/state/defaults.d.ts +7 -0
  75. package/dist/state/useTaskboxForm.d.ts +22 -0
  76. package/dist/state/useTaskboxUiState.d.ts +13 -0
  77. package/dist/table/TaskBoxRow.d.ts +58 -0
  78. package/dist/table/columns.d.ts +41 -0
  79. package/dist/types/calendar.d.ts +22 -0
  80. package/dist/types/employee.d.ts +14 -0
  81. package/dist/types/form.d.ts +35 -0
  82. package/dist/types/index.d.ts +8 -0
  83. package/dist/types/item.d.ts +136 -0
  84. package/dist/types/provider.d.ts +44 -0
  85. package/dist/types/upload.d.ts +30 -0
  86. package/dist/types/view.d.ts +34 -0
  87. package/dist/utils/attachmentLimit.d.ts +14 -0
  88. package/dist/utils/bugOptions.d.ts +22 -0
  89. package/dist/utils/customTab.d.ts +9 -0
  90. package/dist/utils/dateRange.d.ts +13 -0
  91. package/dist/utils/drawerNarrow.d.ts +12 -0
  92. package/dist/utils/googleEvents.d.ts +4 -0
  93. package/dist/utils/groupTasks.d.ts +30 -0
  94. package/dist/utils/noticeTargets.d.ts +39 -0
  95. package/dist/utils/sprintLabel.d.ts +7 -0
  96. package/dist/utils/taskConfirm.d.ts +17 -0
  97. package/dist/utils/taskDates.d.ts +5 -0
  98. package/dist/utils/taskDone.d.ts +22 -0
  99. package/dist/utils/taskEffort.d.ts +13 -0
  100. package/dist/utils/taskRelations.d.ts +21 -0
  101. package/dist/utils/taskShareText.d.ts +14 -0
  102. package/dist/utils/taskStatus.d.ts +99 -0
  103. package/dist/utils/taskVisibility.d.ts +32 -0
  104. package/dist/views/TaskBoxColumnSummary.d.ts +22 -0
  105. package/dist/views/TaskBoxGroupBoard.d.ts +41 -0
  106. package/dist/views/TaskBoxMobileList.d.ts +28 -0
  107. package/dist/views/TaskBoxMonthAgenda.d.ts +16 -0
  108. package/dist/views/TaskBoxMonthCalendar.d.ts +20 -0
  109. package/dist/views/TaskBoxSprintSummary.d.ts +15 -0
  110. package/dist/views/TaskBoxTable.d.ts +64 -0
  111. package/dist/views/TaskBoxTimeline.d.ts +19 -0
  112. package/dist/views/TaskBoxView.d.ts +38 -0
  113. package/dist/views/TaskBoxWeekCalendar.d.ts +25 -0
  114. package/package.json +111 -0
@@ -0,0 +1,35 @@
1
+ import type { TaskBoxBugDevice, TaskBoxBugRepro, TaskBoxChecklistItem, TaskBoxPriority, TaskBoxReminder } from "./item";
2
+ /** 새 업무 등록 폼 값이다. */
3
+ export interface TaskBoxForm {
4
+ title: string;
5
+ icon: string;
6
+ icon_color: string;
7
+ manager_name: string;
8
+ manager_account_seq: number;
9
+ receiver_names: string[];
10
+ receiver_account_seqs: number[];
11
+ is_notice: boolean;
12
+ is_event: boolean;
13
+ is_bug: boolean;
14
+ is_open: boolean;
15
+ bug_repro: TaskBoxBugRepro | "";
16
+ bug_device: TaskBoxBugDevice | "";
17
+ bug_where: string;
18
+ bug_version: string;
19
+ sprint_seq: number;
20
+ story_points: number;
21
+ event_time: string;
22
+ event_place: string;
23
+ event_address: string;
24
+ target_names: string[];
25
+ target_account_seqs: number[];
26
+ start_date: string;
27
+ due_date: string;
28
+ reminder: TaskBoxReminder;
29
+ priority: TaskBoxPriority;
30
+ label_keys: string[];
31
+ note: string;
32
+ content: string;
33
+ checklist: TaskBoxChecklistItem[];
34
+ tab_key: string;
35
+ }
@@ -0,0 +1,8 @@
1
+ /** 타입 export 배럴이다. */
2
+ export * from "./item";
3
+ export * from "./form";
4
+ export * from "./view";
5
+ export * from "./calendar";
6
+ export * from "./upload";
7
+ export * from "./employee";
8
+ export * from "./provider";
@@ -0,0 +1,136 @@
1
+ /** 확인대기 상태 키다(확인요청/확인 워크플로 판정용 — 저장 키는 회신 시절 값 유지). */
2
+ export declare const STATUS_KEY_WAITING = "waiting";
3
+ /** 확인완료 상태 키다. */
4
+ export declare const STATUS_KEY_REPLIED = "replied";
5
+ /** 업무 상태다 — 시스템 고정 택일(시작전/진행중/보류/확인대기/확인완료). 커스텀 분류는 라벨(복수)로 단다.
6
+ * 공지형 업무는 게시 생애주기 상태(게시예정/게시중/게시종료)를 같은 필드에 쓴다. */
7
+ export type TaskBoxStatus = "not_started" | "in_progress" | "hold" | "waiting" | "replied" | "notice_scheduled" | "notice_active" | "notice_closed" | "bug_received" | "bug_confirmed" | "bug_in_progress" | "bug_fixed" | "bug_hold";
8
+ /** 오류 재현빈도다(택일 — 자유서술로 두면 아무도 안 적는다). */
9
+ export type TaskBoxBugRepro = "always" | "often" | "sometimes" | "once" | "unable";
10
+ /** 오류가 발생한 디바이스다(택일). */
11
+ export type TaskBoxBugDevice = "desktop" | "tablet" | "mobile";
12
+ /** 오류 종료 사유다 — "고쳤다" 와 "안 고치기로 했다" 를 통계에서 가르는 축이다. */
13
+ export type TaskBoxBugResolution = "" | "fixed" | "duplicate" | "cannot_reproduce" | "by_design" | "wont_fix";
14
+ /** 업무함 구분(내가 요청한 업무/나에게 온 업무)이다. */
15
+ export type TaskBoxOwner = "my" | "received";
16
+ /** 표에서 달력 팝퍼로 인라인 수정하는 날짜 필드다. */
17
+ export type TaskBoxDateField = "start_date" | "due_date";
18
+ /** 표에서 직원 선택 다이얼로그로 수정하는 인원 필드다(책임자 1명/참조자 다수/공지 대상자 다수). */
19
+ export type TaskBoxMemberField = "manager" | "receivers" | "targets";
20
+ /** 업무 중요도다(높음/중간/낮음). */
21
+ export type TaskBoxPriority = "high" | "medium" | "low";
22
+ /** 라벨(복수 태그) 사전 항목이다 — 라이선스 공유(프로젝트와 동일 정책). 고정 상태 4종의 칩도 같은 모양을 쓴다. */
23
+ export interface TaskBoxLabel {
24
+ key: string;
25
+ name: string;
26
+ bg: string;
27
+ fg: string;
28
+ dot: string;
29
+ }
30
+ /** 체크리스트(할일) 항목이다. */
31
+ /** 업무 간 관계 타입이다 — follow_up=이전 업무에서 이어짐(저장 위치=후속 업무, 대상=이전 업무),
32
+ * related=단순 관련(양쪽에 저장), duplicate_of=중복(저장 위치=중복 업무, 대상=원본). */
33
+ export type TaskBoxRelationType = "follow_up" | "related" | "duplicate_of";
34
+ /** 업무 간 관계다 — 상대 업무 seq 와 관계 타입(역방향 표시는 utils/taskRelations 가 계산한다). */
35
+ export interface TaskBoxRelation {
36
+ task_seq: number;
37
+ type: TaskBoxRelationType;
38
+ }
39
+ export interface TaskBoxChecklistItem {
40
+ label: string;
41
+ checked: boolean;
42
+ task_seq?: number;
43
+ }
44
+ /** 첨부파일이다 — 실파일은 ES 파일 스토리지에 있고 메타만 담는다. */
45
+ export interface TaskBoxAttachment {
46
+ name: string;
47
+ size: number;
48
+ uuid?: string;
49
+ }
50
+ /** 확인 기록이다(공지=대상자 개인별 "확인" 이력, 일반 업무=책임자 확인일시). */
51
+ export interface TaskBoxAck {
52
+ account_seq: number;
53
+ name: string;
54
+ time: string;
55
+ }
56
+ /** 업무 댓글이다. */
57
+ /** 댓글 반응 기록이다(좋아요·확인 공용 — 누른 사람별 1건). */
58
+ export interface TaskBoxCommentReaction {
59
+ account_seq: number;
60
+ name: string;
61
+ time: string;
62
+ }
63
+ /** 댓글 반응 종류다(하트=좋아요, 체크=확인). */
64
+ export type TaskBoxCommentReactionKind = "like" | "ack";
65
+ export interface TaskBoxComment {
66
+ author: string;
67
+ author_account_seq?: number;
68
+ text: string;
69
+ time: string;
70
+ attachments?: TaskBoxAttachment[];
71
+ likes?: TaskBoxCommentReaction[];
72
+ acks?: TaskBoxCommentReaction[];
73
+ }
74
+ /** 마감 리마인더 시점이다(마감기한 달력 팝퍼 하단에서 선택). */
75
+ /**
76
+ * 리마인더 시점이다.
77
+ * 시각 기반(30분/1시간/2시간 전)은 시각이 있는 일정 전용이다 — 마감시각 개념이 없는 업무·종일 일정에서는 계산되지 않는다.
78
+ */
79
+ export type TaskBoxReminder = "none" | "min30_before" | "hour1_before" | "hour2_before" | "same_day" | "day_before" | "two_days_before" | "three_days_before" | "week_before";
80
+ /** 업무함 목록 한 건이다. */
81
+ export interface TaskBoxItem {
82
+ seq: number;
83
+ title: string;
84
+ status: TaskBoxStatus;
85
+ label_keys: string[];
86
+ start_date: string;
87
+ due_date: string;
88
+ manager_name: string;
89
+ manager_account_seq?: number;
90
+ receiver_names: string[];
91
+ receiver_account_seqs?: number[];
92
+ is_notice?: boolean;
93
+ is_event?: boolean;
94
+ is_bug?: boolean;
95
+ ticket_no?: string;
96
+ sprint_seq?: number;
97
+ story_points?: number;
98
+ is_open?: boolean;
99
+ bug_repro?: TaskBoxBugRepro | "";
100
+ bug_device?: TaskBoxBugDevice | "";
101
+ bug_where?: string;
102
+ bug_version?: string;
103
+ resolution?: TaskBoxBugResolution;
104
+ resolution_note?: string;
105
+ reopen_count?: number;
106
+ event_time?: string;
107
+ event_place?: string;
108
+ event_address?: string;
109
+ target_names?: string[];
110
+ target_account_seqs?: number[];
111
+ acks?: TaskBoxAck[];
112
+ reminder: TaskBoxReminder;
113
+ sort_no: number;
114
+ timeline_sort_no?: number;
115
+ group_sort_no?: number;
116
+ tab_key?: string;
117
+ priority: TaskBoxPriority;
118
+ icon?: string;
119
+ icon_color?: string;
120
+ estimated_time?: string;
121
+ checklist?: TaskBoxChecklistItem[];
122
+ attachments?: TaskBoxAttachment[];
123
+ comments?: TaskBoxComment[];
124
+ comment_count?: number;
125
+ relations?: TaskBoxRelation[];
126
+ note: string;
127
+ content?: string;
128
+ created_by?: string;
129
+ author_account_seq?: number;
130
+ created_time?: string;
131
+ owner: TaskBoxOwner;
132
+ completed: boolean;
133
+ completed_by?: string;
134
+ completed_time?: string;
135
+ archived: boolean;
136
+ }
@@ -0,0 +1,44 @@
1
+ /** TaskboxProvider 설정·슬롯 타입이다. */
2
+ import type { ComponentType } from "react";
3
+ /** 공휴일 한 건이다 — Provider `loadHolidays` 가 반환한다. */
4
+ export interface TaskboxHoliday {
5
+ date: string;
6
+ name: string;
7
+ }
8
+ /** 아바타 슬롯 시그니처다(댓글/참조자 아바타 렌더 교체용). */
9
+ export interface TaskboxAvatarProps {
10
+ name: string;
11
+ src?: string;
12
+ size?: number;
13
+ }
14
+ /** 주소검색 슬롯 시그니처다(일정 주소 입력 — 미주입 시 react-daum-postcode 기본 구현/일반 입력 폴백). */
15
+ export interface TaskboxAddressSearchProps {
16
+ open: boolean;
17
+ onComplete: (address: string) => void;
18
+ onClose: () => void;
19
+ }
20
+ /** `buildFileUrl` 옵션이다. */
21
+ export interface TaskboxFileUrlOptions {
22
+ thumb?: "sm" | "md" | "lg";
23
+ download?: boolean;
24
+ }
25
+ /** UI 교체 슬롯 모음이다. */
26
+ export interface TaskboxSlots {
27
+ avatar?: ComponentType<TaskboxAvatarProps>;
28
+ addressSearch?: ComponentType<TaskboxAddressSearchProps>;
29
+ }
30
+ /** TaskboxProvider 설정이다 — 없거나 부분만 줘도 전 컴포넌트가 기본값으로 동작한다. */
31
+ export interface TaskboxConfig {
32
+ /** 연도 목록의 공휴일을 로드한다(캘린더 빨간날·명칭 표시). 미지정=일요일만 휴일. */
33
+ loadHolidays?: (years: number[]) => Promise<TaskboxHoliday[]>;
34
+ /** 첨부 파일 URL 빌더. 기본 `/api/v1/files/:uuid`. */
35
+ buildFileUrl?: (uuid: string, options?: TaskboxFileUrlOptions) => string;
36
+ /** 첨부 업로드 한도(MB). 기본 50. */
37
+ uploadMaxMb?: number;
38
+ /** 모바일 폰트 오프셋(px). 지정 시 Provider 가 CSS 변수를 주입한다. 미지정=앱 CSS 변수 상속. */
39
+ mobileFontOffsetPx?: number;
40
+ /** 모바일 판정 강제(미지정=내장 미디어쿼리 lg 미만). */
41
+ isMobile?: boolean;
42
+ /** UI 교체 슬롯. */
43
+ slots?: TaskboxSlots;
44
+ }
@@ -0,0 +1,30 @@
1
+ /** 첨부 업로드 진행 상태와 패키지 UI 전역 상태 타입이다. */
2
+ import type { TaskBoxAttachment } from "./item";
3
+ /** 첨부 업로드 대기열 한 건이다(파일별 행 게이지 표시용). */
4
+ export interface TaskBoxAttachmentUploadQueueItem {
5
+ name: string;
6
+ size: number;
7
+ }
8
+ /** 첨부 업로드 진행 상태다(업로드 중에만 존재 — 상세/등록 드로어의 파일별 진행 게이지). */
9
+ export interface TaskBoxAttachmentUpload {
10
+ taskSeq: number;
11
+ name: string;
12
+ size: number;
13
+ progress: number;
14
+ index: number;
15
+ total: number;
16
+ queue: TaskBoxAttachmentUploadQueueItem[];
17
+ }
18
+ /**
19
+ * 패키지 소유 UI 전역 상태다 — `useTaskboxUiState()`(고정 stateId forma 상태)의 값 타입.
20
+ * 첨부 대기 파일·업로드 진행·등록 제출 잠금처럼 고빈도 변경이 있는 조각만 담는다(화면 데이터는 props).
21
+ */
22
+ export interface TaskboxUiState {
23
+ createAttachmentFiles: File[];
24
+ createSubmitting: boolean;
25
+ attachmentUpload: TaskBoxAttachmentUpload | null;
26
+ }
27
+ /** 첨부 클릭 시 소비처가 받는 파일 정보다(미리보기/다운로드 콜백 인자). */
28
+ export interface TaskboxAttachmentRef extends TaskBoxAttachment {
29
+ taskSeq: number;
30
+ }
@@ -0,0 +1,34 @@
1
+ /** 보기·필터·그룹 타입이다 — www taskBoxState.ts 에서 화면 데이터 성격의 조각만 계승한다. */
2
+ /**
3
+ * 목록 탭 보기 방식이다(목록/보드=프로젝트별/칸반=상태별/주간·월간 캘린더/타임라인=간트).
4
+ * 보드와 칸반은 컬럼 축만 다르다 — 보드는 "어느 프로젝트 일인가", 칸반은 "어디까지 진행됐나" 를 본다.
5
+ */
6
+ export type TaskBoxViewMode = "list" | "card" | "kanban" | "calendar" | "month" | "timeline";
7
+ /** 프로젝트(사용자 정의 그룹)다 — 카드형 보드의 컬럼 단위. */
8
+ export interface TaskBoxCustomTab {
9
+ key: string;
10
+ label: string;
11
+ icon: string;
12
+ archived: boolean;
13
+ useSprints: boolean;
14
+ }
15
+ /** 스프린트 한 건이다(스프린트 사용 프로젝트의 반복 주기). */
16
+ export interface TaskBoxSprint {
17
+ seq: number;
18
+ group_seq: number;
19
+ name: string;
20
+ goal: string;
21
+ start_date: string;
22
+ end_date: string;
23
+ status: "planning" | "active" | "closed";
24
+ sort_no: number;
25
+ }
26
+ /** 표 그룹화 기준이다(노션 Group by 대응). tab=작업그룹(프로젝트)별. */
27
+ export type TaskBoxGroupBy = "none" | "due" | "status" | "manager" | "tab";
28
+ /** 확인 컬럼 필터 값이다 — 확인 th 클릭 메뉴(전체/미확인=내가 확인 안 누름/확인함). */
29
+ export type TaskBoxAckFilter = "all" | "unconfirmed" | "confirmed";
30
+ /** 인원(책임자·참조자) 필터 값이다 — 표 헤더에서 직원을 골라 그 사람 업무만 본다. */
31
+ export interface TaskBoxMemberFilter {
32
+ accountSeqs: number[];
33
+ names: string[];
34
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 업무 첨부파일 크기 한도 유틸이다.
3
+ * 한도(MB)는 서버 bootstrap(upload_max_mb, state.uploadMaxMb)이 단일 원본이고,
4
+ * 여기서는 받은 한도로 선택 시점에 걸러 결과만 돌려준다(하드코딩 금지 — 폴백 50MB).
5
+ * 알림 표시는 소비처 몫이다 — message 가 null 이 아니면 정보 알림으로 안내한다.
6
+ */
7
+ /** 첨부 한도 검증 결과다(accepted=허용 파일, rejected=초과 파일, message=안내 문구·초과 없으면 null). */
8
+ export interface AttachmentLimitResult {
9
+ accepted: File[];
10
+ rejected: File[];
11
+ message: string | null;
12
+ }
13
+ /** 한도 초과 파일을 걸러낸다 — 허용/제외 파일과 안내 문구를 반환한다(알림 표시는 소비처가 한다). */
14
+ export declare function filterFilesWithinLimit(files: File[], maxMb: number): AttachmentLimitResult;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 오류(버그) 전용 속성 사전이다 — 재현빈도·디바이스·종료 사유.
3
+ * 자유서술 대신 택일로 두는 이유는 빈 칸이 보여야 "여기 적어야 하는구나" 하고 인지하기 때문이다.
4
+ */
5
+ import type { TaskBoxBugDevice, TaskBoxBugRepro, TaskBoxBugResolution } from "../types";
6
+ /** 선택지 한 항목이다(키+표시 이름). */
7
+ export interface BugOption<T extends string> {
8
+ key: T;
9
+ name: string;
10
+ }
11
+ /** 재현빈도 선택지다(항상 → 재현불가 순 — 심각도 판단의 실질 대체 축). */
12
+ export declare const BUG_REPRO_OPTIONS: BugOption<TaskBoxBugRepro>[];
13
+ /** 디바이스 선택지다. */
14
+ export declare const BUG_DEVICE_OPTIONS: BugOption<TaskBoxBugDevice>[];
15
+ /** 종료 사유 선택지다(완료 처리 시 — 왜 닫혔는지가 통계의 근간이다). */
16
+ export declare const BUG_RESOLUTION_OPTIONS: BugOption<Exclude<TaskBoxBugResolution, "">>[];
17
+ /** 재현빈도 키의 표시 이름을 돌려준다(미지정이면 ""). */
18
+ export declare function getBugReproName(key: string | undefined): string;
19
+ /** 디바이스 키의 표시 이름을 돌려준다(미지정이면 ""). */
20
+ export declare function getBugDeviceName(key: string | undefined): string;
21
+ /** 종료 사유 키의 표시 이름을 돌려준다(미지정이면 ""). */
22
+ export declare function getBugResolutionName(key: string | undefined): string;
@@ -0,0 +1,9 @@
1
+ /** 사용자 정의 탭 키 유틸이다. */
2
+ /** 사용자 정의 탭 키 접두사다. */
3
+ export declare const CUSTOM_TAB_KEY_PREFIX = "custom-";
4
+ /** 사용자 정의 탭(작업그룹) 키인지 판별한다. */
5
+ export declare function isCustomTabKey(key: string): boolean;
6
+ /** 프로젝트 seq → 프런트 탭 키("custom-<seq>", 0=기본 업무함=""). */
7
+ export declare function tabKeyFromGroupSeq(groupSeq: number): string;
8
+ /** 프런트 탭 키 → 프로젝트 seq(기본 업무함/알 수 없는 키는 0). */
9
+ export declare function groupSeqFromTabKey(tabKey: string): number;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 기간 필터(보관함·완료 탭) 기본값 유틸이다.
3
+ * 상태 기본값(defaults.ts)은 모듈 로드 시점 상수라 "오늘 기준" 값을 여기서 계산해 쓴다.
4
+ */
5
+ /** Date 를 "YYYY-MM-DD" 로 만든다. */
6
+ export declare function toYmd(date: Date): string;
7
+ /** 오늘 기준 N개월 전 날짜를 만든다(없는 날짜는 브라우저가 말일로 보정한다). */
8
+ export declare function monthsAgoDate(months: number, base?: Date): Date;
9
+ /** 기간 필터 기본값이다 — 최근 1개월(보관함이 계속 쌓이므로 전체 대신 최근 구간부터 보여준다). */
10
+ export declare function getDefaultDateRange(base?: Date): {
11
+ fromDate: string;
12
+ toDate: string;
13
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 업무함 드로어(720px)가 뷰포트 폭으로 줄어드는 좁은 화면(모바일) 공용 상수다.
3
+ * 속성 그리드 1열 전환·1열 배치 순서(order)·행간 축소가 함께 쓴다.
4
+ */
5
+ /** 드로어가 뷰포트 폭으로 줄어드는 좁은 화면(모바일) 미디어쿼리다. */
6
+ export declare const TASKBOX_DRAWER_NARROW_MQ = "@media (max-width: 719.95px)";
7
+ /** 좁은 화면 1열 배치 순서를 만든다(2열 그리드가 1열로 접힐 때 열 단위가 아니라 지정 순서로 흐르게 한다). */
8
+ export declare function narrowOrderSx(order: number): {
9
+ "@media (max-width: 719.95px)": {
10
+ order: number;
11
+ };
12
+ };
@@ -0,0 +1,4 @@
1
+ /** 구글 캘린더 가져오기 일정 유틸이다 — 기간 일정을 날짜별 버킷으로 펼친다(주간/월간 캘린더 공용). */
2
+ import type { TaskBoxGoogleEvent } from "../types";
3
+ /** 일정 목록을 날짜(YYYY-MM-DD)별 버킷으로 펼친다(기간 일정은 매일 반복 — 폭주 방지 62일 상한). */
4
+ export declare function groupGoogleEventsByDate(events: TaskBoxGoogleEvent[]): Map<string, TaskBoxGoogleEvent[]>;
@@ -0,0 +1,30 @@
1
+ /** 업무함 표 그룹핑 유틸이다(노션 Group by 대응 — 그룹 헤더 행 + 소속 행 평탄화). */
2
+ import type { TaskBoxCustomTab, TaskBoxGroupBy, TaskBoxItem, TaskBoxLabel } from "../types";
3
+ /** 표에 그릴 행 항목이다(그룹 헤더 또는 업무 행). */
4
+ export type TaskBoxTableRowItem = {
5
+ type: "group";
6
+ key: string;
7
+ label: string;
8
+ count: number;
9
+ collapsed: boolean;
10
+ } | {
11
+ type: "task";
12
+ task: TaskBoxItem;
13
+ };
14
+ /** 그룹 섹션이다(헤더 + 소속 업무 — 접힘 애니메이션을 위해 소속 행을 통째로 갖는다). */
15
+ export interface TaskBoxGroupSection {
16
+ key: string;
17
+ label: string;
18
+ tasks: TaskBoxItem[];
19
+ }
20
+ /** 그룹화 기준 선택지다(툴바 셀렉트용). */
21
+ export declare const GROUP_BY_OPTIONS: {
22
+ value: TaskBoxGroupBy;
23
+ label: string;
24
+ }[];
25
+ /**
26
+ * 업무 목록을 그룹 섹션(헤더 + 소속 업무)으로 만든다.
27
+ * 그룹 순서는 기준별 고정(마감기한/상태) 또는 이름순(책임자)이고, 빈 그룹은 표시하지 않는다.
28
+ * 접힘 여부는 소비처(Collapse 애니메이션)가 처리하므로 소속 업무를 항상 담아 준다.
29
+ */
30
+ export declare function buildTaskGroupSections(tasks: TaskBoxItem[], groupBy: TaskBoxGroupBy, todayStr: string, customTabs?: TaskBoxCustomTab[], _labelOptions?: TaskBoxLabel[]): TaskBoxGroupSection[];
@@ -0,0 +1,39 @@
1
+ /**
2
+ * 공지형 업무의 대상자 표시/확인 집계 유틸이다.
3
+ * 대상자 표시는 부서(팀) 전원이 선택된 경우 개인 나열 대신 팀명으로 축약하고,
4
+ * 확인 집계는 "확인 수 / 대상 수"(대상 미지정=전 직원)를 계산한다.
5
+ * 대상/분모 계산에서 작성자 본인과 퇴사자는 제외한다(재직 + 로그인 계정 보유 기준).
6
+ */
7
+ import type { TaskBoxAck, TaskboxEmployee } from "../types";
8
+ /** 공지 대상/확인 계산에 필요한 최소 필드다(TaskBoxItem·등록 폼 값 어느 쪽도 그대로 넣을 수 있다). */
9
+ export interface NoticeTargetSource {
10
+ author_account_seq?: number;
11
+ target_names?: string[];
12
+ target_account_seqs?: number[];
13
+ acks?: TaskBoxAck[];
14
+ completed?: boolean;
15
+ }
16
+ /** 공지 확인 버튼/집계 정보다(표 확인 칸·상세 확인현황 공용). */
17
+ export interface NoticeAckInfo {
18
+ count: number;
19
+ total: number;
20
+ acked: boolean;
21
+ canAck: boolean;
22
+ }
23
+ /**
24
+ * 공지 대상자 표시 문자열을 만든다.
25
+ * 대상 미지정이면 "모든 직원", 팀 전원 선택은 팀명으로 축약하고 나머지는 개인 이름을 나열한다(예: "장례지도팀, 김직원").
26
+ */
27
+ export declare function summarizeNoticeTargets(task: NoticeTargetSource, employees: TaskboxEmployee[]): string;
28
+ /** 대상자 셀 표시 형태다 — 전원(텍스트) 또는 파트별(팀명=텍스트, 개인=아바타) 조합. */
29
+ export type NoticeTargetDisplay = {
30
+ kind: "everyone";
31
+ } | {
32
+ kind: "members";
33
+ teamNames: string[];
34
+ individualNames: string[];
35
+ };
36
+ /** 공지 대상자 셀 표시 형태를 계산한다 — 팀 전원 선택은 팀명 텍스트, 나머지 개인은 아바타로 그릴 수 있게 파트를 나눈다. */
37
+ export declare function getNoticeTargetDisplay(task: NoticeTargetSource, employees: TaskboxEmployee[]): NoticeTargetDisplay;
38
+ /** 공지 확인 집계/내 확인 가능 여부를 계산한다. */
39
+ export declare function getNoticeAckInfo(task: NoticeTargetSource, employees: TaskboxEmployee[], myAccountSeq: number): NoticeAckInfo;
@@ -0,0 +1,7 @@
1
+ /** 목표(스프린트) 선택지 라벨 유틸이다 — 헤더 필터/드로어/우클릭 서브메뉴가 같은 표기를 쓴다. */
2
+ import type { TaskBoxSprint } from "../types";
3
+ /**
4
+ * 목표 이름 뒤에 종료일을 붙인다 — "모바일앱 스토어 등록 (~08.20)".
5
+ * 종료된 목표는 날짜 대신 (종료), 종료일이 없으면 이름만 쓴다.
6
+ */
7
+ export declare function formatSprintOptionLabel(sprint: TaskBoxSprint): string;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 일반 업무의 확인(ack) 유틸이다.
3
+ * 확인 기록은 공지와 같은 acks 배열을 쓰고, 확인 대상은 책임자+참조자다(책임자 확인만 상태를 확인완료로 전환).
4
+ * 내 업무 탭의 "확인" 컬럼(버튼/내 확인일시)과 보낸 업무 탭의 "n/m"(확인자 팝오버) 컬럼이 함께 쓴다.
5
+ */
6
+ import type { TaskBoxItem } from "../types";
7
+ /** 일반 업무 확인 셀 표시 정보다. */
8
+ export interface TaskConfirmInfo {
9
+ myTime: string;
10
+ canConfirm: boolean;
11
+ count: number;
12
+ total: number;
13
+ }
14
+ /** 업무의 확인 정보를 계산한다. */
15
+ export declare function getTaskConfirmInfo(task: TaskBoxItem, myAccountSeq: number): TaskConfirmInfo;
16
+ /** 확인일시를 "mm.dd hh:nn" 로 짧게 표시한다(값이 없으면 ""). */
17
+ export declare function formatConfirmTime(value: string): string;
@@ -0,0 +1,5 @@
1
+ /** 업무함 날짜/일시 표시 포맷 유틸이다 — 상세 드로어는 "yy.mm.dd (요일)" 형식으로 통일한다. */
2
+ /** "YYYY-MM-DD" → "yy.mm.dd (요일)". 값이 비거나 형식이 아니면 빈 문자열. */
3
+ export declare function formatKoreanDate(ymd: string | undefined): string;
4
+ /** "YYYY-MM-DD HH:mm" → "yy.mm.dd (요일) hh:mm". 값이 비거나 형식이 아니면 빈 문자열. */
5
+ export declare function formatKoreanDateTime(dateTime: string | undefined): string;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * 업무·일정의 "끝난 것" 판정 유틸이다.
3
+ *
4
+ * 업무는 완료 체크(completed)로 끝나지만, 일정은 완료 개념이 없어 **시각이 지나면 끝난 것**으로 본다.
5
+ * "완료 숨기기" 필터와 탭 건수가 이 판정을 공유한다(AS 자동보관 스케줄러도 같은 규칙을 쓴다).
6
+ */
7
+ import type { TaskBoxItem } from "../types";
8
+ /** 일정 시각 판정에 필요한 최소 필드다(칩 표시처럼 부분 객체로도 판정할 수 있게 느슨하게 받는다). */
9
+ export type EventTimeSource = Pick<TaskBoxItem, "due_date"> & {
10
+ is_event?: boolean;
11
+ event_time?: string;
12
+ };
13
+ /**
14
+ * 일정이 이미 지났는지 판정한다.
15
+ * 시각이 있으면 그 시각까지, 종일 일정이면 그날이 끝나야(다음 날 0시) 지난 것으로 본다.
16
+ */
17
+ export declare function isPastEvent(task: EventTimeSource, now?: Date): boolean;
18
+ /**
19
+ * "완료 숨기기" 대상인지 판정한다 — 업무는 완료 체크, 일정은 시각이 지났는지로 가른다.
20
+ * 일정에는 완료 체크가 없으므로 이 판정이 완료를 대신한다.
21
+ */
22
+ export declare function isTaskDone(task: EventTimeSource & Pick<TaskBoxItem, "completed">, now?: Date): boolean;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 공수(작업 예상시간) 계산 유틸이다 — estimated_time 자유 입력("2h", "30m", "1.5시간", "1d")을
3
+ * 시간 단위로 합산해 목표 요약(남은 공수)에 쓴다.
4
+ */
5
+ import type { TaskBoxItem } from "../types";
6
+ /** 예상시간 문자열을 시간(hour) 수로 바꾼다 — 단위 h/시간, m/분, d/일(=8시간). 단위 없는 숫자는 시간으로 본다. */
7
+ export declare function parseEstimatedHours(value: string | undefined): number;
8
+ /** 시간 수를 표시 문자열로 만든다(소수 1자리, 0.05 미만은 버림 — 예: "12.5시간"). */
9
+ export declare function formatHours(hours: number): string;
10
+ /** 시작일~종료일(양끝 포함) 사이의 근무일 수를 센다 — 주말(토·일)과 공휴일("YYYY-MM-DD" 집합)을 뺀다. */
11
+ export declare function countWorkdays(fromStr: string, toStr: string, holidaySet: ReadonlySet<string>): number;
12
+ /** 미완료 업무들의 예상시간 합(시간)을 구한다 — 공수 미입력 업무는 0 으로 센다. */
13
+ export declare function sumRemainingHours(tasks: TaskBoxItem[]): number;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 업무 간 관계(후속/관련/중복) 계산 유틸이다.
3
+ * 관계는 한쪽에만 저장돼도 되게(follow_up·duplicate_of 는 방향성 저장) 역방향을 여기서 함께 수집한다.
4
+ */
5
+ import type { TaskBoxItem, TaskBoxRelation, TaskBoxRelationType } from "../types";
6
+ /** 관련 업무 표시 모델이다 — 상세 드로어 "관련 업무" 섹션이 그린다. */
7
+ export interface TaskRelationsModel {
8
+ lineage: TaskBoxItem[];
9
+ related: TaskBoxItem[];
10
+ duplicates: TaskBoxItem[];
11
+ duplicateOf: TaskBoxItem | null;
12
+ }
13
+ /** 업무의 관계 목록을 안전하게 돌려준다(미지정=빈 배열). */
14
+ export declare function relationsOf(task: TaskBoxItem): TaskBoxRelation[];
15
+ /** 두 업무가 type 관계로 연결돼 있는지(방향 무관) 판정한다. */
16
+ export declare function hasRelation(a: TaskBoxItem, b: TaskBoxItem, type: TaskBoxRelationType): boolean;
17
+ /**
18
+ * 관련 업무 모델을 만든다 — follow_up 간선을 방향 무관하게 순회해 이어진 업무 전체(이력)를 모으고,
19
+ * 관련/중복은 양방향으로 수집한다. tasks 는 관계 해석 풀(현재 화면이 아는 업무 목록)이다.
20
+ */
21
+ export declare function buildTaskRelationsModel(task: TaskBoxItem, tasks: TaskBoxItem[]): TaskRelationsModel;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 업무 공유 텍스트 빌더다 — 상세 드로어 공유 버튼이 쓴다.
3
+ * 공유 대상은 로그인할 수 없는 외부(협력업체·거래처 등)라 딥링크가 아니라
4
+ * 카톡/문자에 그대로 붙여넣을 수 있는 평문 요약을 만든다.
5
+ */
6
+ import type { TaskBoxItem } from "../types";
7
+ /** 업무 상세를 외부 전달용 평문 텍스트(제목·기간·책임자·상태·내용·비고)로 만든다. */
8
+ export declare function buildTaskShareText(task: TaskBoxItem): string;
9
+ /**
10
+ * 업무 내용을 공유한다(상세 드로어 공유 버튼·우클릭 메뉴 공용).
11
+ * 모바일(useNativeShare)은 기기 공유시트(카톡/문자 선택 UI)를 먼저 시도하고,
12
+ * 공유시트가 없는 환경(데스크톱·앱 웹뷰 — 웹뷰에는 navigator.share 가 없다)은 클립보드 복사로 폴백한다.
13
+ */
14
+ export declare function shareTaskText(task: TaskBoxItem, useNativeShare: boolean): void;