@burdenoff/microfe-timecampus 2026.1203.2 → 2026.1204.1
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.
- package/dist/timecampus/components/EmptyState.d.ts +7 -0
- package/dist/timecampus/components/EmptyState.js +3 -2
- package/dist/timecampus/components/EmptyState.js.map +1 -1
- package/dist/timecampus/components/FilterBar.js +1 -0
- package/dist/timecampus/pages/admin/AdminPage.js +264 -264
- package/dist/timecampus/pages/admin/AdminPage.js.map +1 -1
- package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js +78 -78
- package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/ServerReportExports.js +34 -34
- package/dist/timecampus/pages/dashboard/ServerReportExports.js.map +1 -1
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +49 -48
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/extend/AppletDeveloperPage.js +107 -102
- package/dist/timecampus/pages/extend/AppletDeveloperPage.js.map +1 -1
- package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js +129 -124
- package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js.map +1 -1
- package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js +94 -94
- package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js.map +1 -1
- package/dist/timecampus/pages/extend/TimeTriggersPage.js +97 -97
- package/dist/timecampus/pages/extend/TimeTriggersPage.js.map +1 -1
- package/dist/timecampus/pages/focus/FocusProtectionPage.js +120 -120
- package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
- package/dist/timecampus/pages/geofencing/GeofencingPage.js +343 -343
- package/dist/timecampus/pages/geofencing/GeofencingPage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +25 -25
- package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/RecommendationsPage.js +296 -296
- package/dist/timecampus/pages/lifetime/RecommendationsPage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js +189 -189
- package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/ActionItemFormModal.js +47 -46
- package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingDetailPage.js +206 -206
- package/dist/timecampus/pages/meetings/MeetingDetailPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingFormModal.js +72 -71
- package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
- package/dist/timecampus/pages/meetings/ParticipantFormModal.js +32 -31
- package/dist/timecampus/pages/meetings/ParticipantFormModal.js.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js +34 -34
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectDetailPage.js +163 -163
- package/dist/timecampus/pages/projects/ProjectDetailPage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectsPage.js +193 -192
- package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
- package/dist/timecampus/pages/projects/TasksPage.js +92 -92
- package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
- package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +60 -60
- package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
- package/dist/timecampus/pages/settings/IdleDetectionCard.js +33 -33
- package/dist/timecampus/pages/settings/IdleDetectionCard.js.map +1 -1
- package/dist/timecampus/pages/settings/PrivacySettingsPage.js +32 -32
- package/dist/timecampus/pages/settings/PrivacySettingsPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeEntriesPage.js +163 -163
- package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeTrackingPage.js +32 -32
- package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimerPage.js +84 -84
- package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.js +223 -223
- package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
- package/dist/timecampus/shared/hooks/useConfirmedAction.d.ts +10 -0
- package/dist/timecampus/shared/hooks/useConfirmedAction.js +14 -0
- package/dist/timecampus/shared/hooks/useConfirmedAction.js.map +1 -0
- package/package.json +2 -2
|
@@ -9,101 +9,101 @@ import { formatDuration as c, formatTime as l } from "../../utils/helpers.js";
|
|
|
9
9
|
import { calendarHoldLabel as u } from "../focus/focusHelpers.js";
|
|
10
10
|
import { hasAiCategorizedSegment as d, segmentProvenance as ee } from "./timelineProvenance.js";
|
|
11
11
|
import { driftLabel as f, focusStatusLabel as p, plannedDrift as m, protectedPercent as h } from "./timelineFocus.js";
|
|
12
|
-
import { pendingSuggestion as
|
|
13
|
-
import { awaitsCategoryApproval as
|
|
14
|
-
import { parseTimelineDateParam as
|
|
15
|
-
import { useTimeCampus as
|
|
16
|
-
import { useAcceptTimeCampusCaptureEventSuggestionMutation as
|
|
12
|
+
import { pendingSuggestion as te, pendingSuggestions as g } from "./timelineSuggestions.js";
|
|
13
|
+
import { awaitsCategoryApproval as ne, canSplit as _, categoriesAwaitingApproval as v, categoryDropId as y, defaultSplitTime as b, mergeCandidate as re, parseDropTarget as ie, projectDropId as x, resolveSplitTime as ae } from "./timelineEditing.js";
|
|
14
|
+
import { parseTimelineDateParam as oe } from "../lifetime/recommendationEvidence.js";
|
|
15
|
+
import { useTimeCampus as se } from "../../providers/TimeCampusProvider.js";
|
|
16
|
+
import { useAcceptTimeCampusCaptureEventSuggestionMutation as ce, useGetTimeCampusTimelineQuery as le, useListProjectsQuery as ue, useMergeTimeCampusCaptureEventsMutation as de, useRecategorizeTimeCampusCaptureEventMutation as fe, useRejectTimeCampusCaptureEventSuggestionMutation as pe, useSetTimeCampusCaptureEventProjectMutation as me, useSplitTimeCampusCaptureEventMutation as he, useSuggestTimeCampusCaptureEventProjectMutation as ge } from "../../../generated/wspace-operations.js";
|
|
17
17
|
import "../../analytics/index.js";
|
|
18
|
-
import { useMemo as
|
|
19
|
-
import { Activity as
|
|
20
|
-
import { useSearchParams as
|
|
21
|
-
import { jsx as
|
|
22
|
-
import { GlassCard as R } from "@burdenoff/fe-libs/ui";
|
|
23
|
-
import { DndContext as
|
|
18
|
+
import { useMemo as S, useState as C } from "react";
|
|
19
|
+
import { Activity as w, BadgeCheck as _e, Brain as T, Calendar as ve, CalendarClock as E, Check as ye, Coffee as be, FolderOpen as D, Github as O, GripVertical as xe, Merge as k, MessageSquare as A, Scissors as j, Shield as M, Sparkles as N, Users as P, X as Se, Zap as Ce } from "lucide-react";
|
|
20
|
+
import { useSearchParams as we } from "react-router";
|
|
21
|
+
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
22
|
+
import { GlassCard as L, ThemedSelect as R } from "@burdenoff/fe-libs/ui";
|
|
23
|
+
import { DndContext as Te, DragOverlay as Ee, KeyboardSensor as De, PointerSensor as Oe, useDraggable as ke, useDroppable as z, useSensor as Ae, useSensors as je } from "@dnd-kit/core";
|
|
24
24
|
// src/timecampus/pages/timeline/TimelinePage.tsx
|
|
25
25
|
var B = {
|
|
26
26
|
DEEP_WORK: {
|
|
27
27
|
label: "Deep work",
|
|
28
|
-
icon:
|
|
28
|
+
icon: T,
|
|
29
29
|
dot: "bg-status-success-bg",
|
|
30
30
|
chip: "bg-status-success-bg text-status-success-text"
|
|
31
31
|
},
|
|
32
32
|
MEETING: {
|
|
33
33
|
label: "Meeting",
|
|
34
|
-
icon:
|
|
34
|
+
icon: P,
|
|
35
35
|
dot: "bg-status-info-bg",
|
|
36
36
|
chip: "bg-status-info-bg text-status-info-text"
|
|
37
37
|
},
|
|
38
38
|
COMMUNICATION: {
|
|
39
39
|
label: "Communication",
|
|
40
|
-
icon:
|
|
40
|
+
icon: A,
|
|
41
41
|
dot: "bg-status-warning-bg",
|
|
42
42
|
chip: "bg-status-warning-bg text-status-warning-text"
|
|
43
43
|
},
|
|
44
44
|
BREAK: {
|
|
45
45
|
label: "Break",
|
|
46
|
-
icon:
|
|
46
|
+
icon: be,
|
|
47
47
|
dot: "bg-bg-sunken",
|
|
48
48
|
chip: "bg-bg-sunken text-text-secondary"
|
|
49
49
|
},
|
|
50
50
|
OTHER: {
|
|
51
51
|
label: "Other",
|
|
52
|
-
icon:
|
|
52
|
+
icon: w,
|
|
53
53
|
dot: "bg-bg-sunken",
|
|
54
54
|
chip: "bg-bg-sunken text-text-secondary"
|
|
55
55
|
}
|
|
56
|
-
},
|
|
57
|
-
TIME_ENTRY:
|
|
58
|
-
MEETING:
|
|
59
|
-
POMODORO:
|
|
60
|
-
EMAIL:
|
|
61
|
-
CAPTURE:
|
|
62
|
-
FOCUS_SESSION:
|
|
63
|
-
FOCUS_BLOCK:
|
|
56
|
+
}, Me = {
|
|
57
|
+
TIME_ENTRY: Ce,
|
|
58
|
+
MEETING: P,
|
|
59
|
+
POMODORO: T,
|
|
60
|
+
EMAIL: A,
|
|
61
|
+
CAPTURE: O,
|
|
62
|
+
FOCUS_SESSION: M,
|
|
63
|
+
FOCUS_BLOCK: E
|
|
64
64
|
};
|
|
65
|
-
function
|
|
65
|
+
function Ne(e) {
|
|
66
66
|
return e.source === "FOCUS_SESSION" || e.source === "FOCUS_BLOCK";
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Pe({ segment: e }) {
|
|
69
69
|
let t = e.focus;
|
|
70
70
|
if (!t) return null;
|
|
71
|
-
let n = e.isPlanned, r = n ?
|
|
72
|
-
return /* @__PURE__ */
|
|
71
|
+
let n = e.isPlanned, r = n ? E : M, i = p(n, t, e.endTime), a = n ? null : h(t), o = n ? null : m(e.startTime, e.endTime, t), s = u(t.calendarHoldStatus);
|
|
72
|
+
return /* @__PURE__ */ I("li", {
|
|
73
73
|
className: `flex items-start gap-3 p-4 ${n ? "bg-bg-sunken/30" : ""}`,
|
|
74
74
|
"data-testid": n ? "timeline-focus-block" : "timeline-focus-session",
|
|
75
75
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ I("div", {
|
|
77
77
|
className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ F("span", { children: l(e.startTime) }), /* @__PURE__ */ F("span", {
|
|
79
79
|
className: "text-text-tertiary",
|
|
80
80
|
children: c(e.durationSeconds)
|
|
81
81
|
})]
|
|
82
82
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ F("div", {
|
|
84
84
|
className: `mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${n ? "border border-dashed border-status-success-text/60 text-status-success-text" : "bg-status-success-bg text-status-success-text"}`,
|
|
85
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ F(r, { className: "h-4 w-4" })
|
|
86
86
|
}),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ I("div", {
|
|
88
88
|
className: "min-w-0 flex-1",
|
|
89
89
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ F("p", {
|
|
91
91
|
className: "truncate text-sm font-medium text-text-primary",
|
|
92
92
|
children: e.title || (n ? "Planned focus block" : "Focus session")
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ I("div", {
|
|
95
95
|
className: "mt-1 flex flex-wrap items-center gap-2",
|
|
96
96
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ F("span", {
|
|
98
98
|
className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${n ? "border border-dashed border-border-seam text-text-secondary" : "bg-status-success-bg text-status-success-text"}`,
|
|
99
99
|
"data-testid": "timeline-focus-status",
|
|
100
100
|
children: i
|
|
101
101
|
}),
|
|
102
|
-
t.protectionLevel === "STRICT" && /* @__PURE__ */
|
|
102
|
+
t.protectionLevel === "STRICT" && /* @__PURE__ */ F("span", {
|
|
103
103
|
className: "text-xs text-text-secondary",
|
|
104
104
|
children: "Strict"
|
|
105
105
|
}),
|
|
106
|
-
t.plannedStartTime && t.plannedEndTime && /* @__PURE__ */
|
|
106
|
+
t.plannedStartTime && t.plannedEndTime && /* @__PURE__ */ I("span", {
|
|
107
107
|
className: "text-xs tabular-nums text-text-secondary",
|
|
108
108
|
children: [
|
|
109
109
|
"Planned ",
|
|
@@ -113,7 +113,7 @@ function Ne({ segment: e }) {
|
|
|
113
113
|
l(t.plannedEndTime)
|
|
114
114
|
]
|
|
115
115
|
}),
|
|
116
|
-
!n && e.endTime && /* @__PURE__ */
|
|
116
|
+
!n && e.endTime && /* @__PURE__ */ I("span", {
|
|
117
117
|
className: "text-xs tabular-nums text-text-secondary",
|
|
118
118
|
children: [
|
|
119
119
|
"Actual ",
|
|
@@ -123,7 +123,7 @@ function Ne({ segment: e }) {
|
|
|
123
123
|
l(e.endTime)
|
|
124
124
|
]
|
|
125
125
|
}),
|
|
126
|
-
o && /* @__PURE__ */
|
|
126
|
+
o && /* @__PURE__ */ I("span", {
|
|
127
127
|
className: "text-xs text-text-tertiary",
|
|
128
128
|
children: [
|
|
129
129
|
"Started ",
|
|
@@ -131,27 +131,27 @@ function Ne({ segment: e }) {
|
|
|
131
131
|
o.endMinutes !== null && `, ended ${f(o.endMinutes, "over", "short")}`
|
|
132
132
|
]
|
|
133
133
|
}),
|
|
134
|
-
s && /* @__PURE__ */
|
|
134
|
+
s && /* @__PURE__ */ F("span", {
|
|
135
135
|
className: "text-xs text-text-tertiary",
|
|
136
136
|
children: s
|
|
137
137
|
})
|
|
138
138
|
]
|
|
139
139
|
}),
|
|
140
|
-
!n && /* @__PURE__ */
|
|
140
|
+
!n && /* @__PURE__ */ I("div", {
|
|
141
141
|
className: "mt-2",
|
|
142
142
|
"data-testid": "timeline-focus-protection",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ I("div", {
|
|
144
144
|
className: "flex h-1.5 w-full max-w-xs overflow-hidden rounded-full bg-bg-sunken",
|
|
145
145
|
role: "img",
|
|
146
146
|
"aria-label": `${a ?? 0}% of this session stayed protected`,
|
|
147
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ F("span", {
|
|
148
148
|
className: "h-full bg-status-success-text",
|
|
149
149
|
style: { width: `${a ?? 0}%` }
|
|
150
|
-
}), /* @__PURE__ */
|
|
150
|
+
}), /* @__PURE__ */ F("span", {
|
|
151
151
|
className: "h-full bg-status-warning-text",
|
|
152
152
|
style: { width: `${a === null ? 0 : 100 - a}%` }
|
|
153
153
|
})]
|
|
154
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ I("p", {
|
|
155
155
|
className: "mt-1 text-xs tabular-nums text-text-secondary",
|
|
156
156
|
children: [
|
|
157
157
|
"Protected ",
|
|
@@ -168,7 +168,7 @@ function Ne({ segment: e }) {
|
|
|
168
168
|
]
|
|
169
169
|
})]
|
|
170
170
|
}),
|
|
171
|
-
n && /* @__PURE__ */
|
|
171
|
+
n && /* @__PURE__ */ F("p", {
|
|
172
172
|
className: "mt-1 text-xs text-text-tertiary",
|
|
173
173
|
children: "Not counted in the day's totals until you run it."
|
|
174
174
|
})
|
|
@@ -184,21 +184,21 @@ var V = [
|
|
|
184
184
|
"BREAK",
|
|
185
185
|
"OTHER"
|
|
186
186
|
];
|
|
187
|
-
function
|
|
188
|
-
return /* @__PURE__ */
|
|
187
|
+
function H({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
|
|
188
|
+
return /* @__PURE__ */ I("div", {
|
|
189
189
|
className: "mt-2 flex flex-wrap items-center gap-2 rounded-lg border border-dashed border-border-seam bg-bg-sunken/40 px-2.5 py-1.5",
|
|
190
190
|
"data-testid": "timeline-project-suggestion",
|
|
191
191
|
children: [
|
|
192
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ F(N, {
|
|
193
193
|
className: "h-3.5 w-3.5 shrink-0 text-primary",
|
|
194
194
|
"aria-hidden": !0
|
|
195
195
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ I("span", {
|
|
197
197
|
className: "text-xs text-text-secondary",
|
|
198
198
|
children: [
|
|
199
199
|
"Suggested project",
|
|
200
200
|
" ",
|
|
201
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ F("span", {
|
|
202
202
|
className: "font-medium text-text-primary",
|
|
203
203
|
children: e.projectName
|
|
204
204
|
}),
|
|
@@ -209,46 +209,46 @@ function Pe({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
|
|
|
209
209
|
e.reason
|
|
210
210
|
]
|
|
211
211
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ I("span", {
|
|
213
213
|
className: "ms-auto flex items-center gap-1",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ I("button", {
|
|
215
215
|
type: "button",
|
|
216
216
|
disabled: t,
|
|
217
217
|
onClick: () => n(e),
|
|
218
218
|
"aria-label": `Accept project ${e.projectName}`,
|
|
219
219
|
className: "inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-2 py-0.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
221
|
-
}), /* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ F(ye, { className: "h-3 w-3" }), "Accept"]
|
|
221
|
+
}), /* @__PURE__ */ I("button", {
|
|
222
222
|
type: "button",
|
|
223
223
|
disabled: t,
|
|
224
224
|
onClick: () => r(e),
|
|
225
225
|
"aria-label": `Dismiss suggested project ${e.projectName}`,
|
|
226
226
|
className: "inline-flex items-center gap-1 rounded-md border border-border-seam bg-bg-surface px-2 py-0.5 text-xs font-medium text-text-secondary hover:bg-bg-sunken disabled:opacity-50",
|
|
227
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ F(Se, { className: "h-3 w-3" }), "Dismiss"]
|
|
228
228
|
})]
|
|
229
229
|
})
|
|
230
230
|
]
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
function Fe({ category: e, label: t, dotClassName: n, totalSeconds: r }) {
|
|
234
|
-
let { isOver: i, setNodeRef: a } = z({ id:
|
|
235
|
-
return /* @__PURE__ */
|
|
234
|
+
let { isOver: i, setNodeRef: a } = z({ id: y(e) });
|
|
235
|
+
return /* @__PURE__ */ I("div", {
|
|
236
236
|
ref: a,
|
|
237
237
|
className: `flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors ${i ? "border-action-primary-bg bg-action-primary-bg/10" : "border-border-seam bg-bg-surface"}`,
|
|
238
238
|
children: [
|
|
239
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ F("span", {
|
|
240
240
|
className: `inline-block h-2.5 w-2.5 rounded-full ${n}`,
|
|
241
241
|
"aria-hidden": !0
|
|
242
242
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ F("span", {
|
|
244
244
|
className: "text-sm font-medium text-text-primary",
|
|
245
245
|
children: t
|
|
246
246
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ F("span", {
|
|
248
248
|
className: "text-sm tabular-nums text-text-secondary",
|
|
249
249
|
children: c(r)
|
|
250
250
|
}),
|
|
251
|
-
i && /* @__PURE__ */
|
|
251
|
+
i && /* @__PURE__ */ F("span", {
|
|
252
252
|
className: "text-xs font-medium text-primary",
|
|
253
253
|
children: "Drop here"
|
|
254
254
|
})
|
|
@@ -257,40 +257,40 @@ function Fe({ category: e, label: t, dotClassName: n, totalSeconds: r }) {
|
|
|
257
257
|
}
|
|
258
258
|
var Ie = 5;
|
|
259
259
|
function Le({ projectId: e, label: t }) {
|
|
260
|
-
let { isOver: n, setNodeRef: r } = z({ id:
|
|
261
|
-
return /* @__PURE__ */
|
|
260
|
+
let { isOver: n, setNodeRef: r } = z({ id: x(e) });
|
|
261
|
+
return /* @__PURE__ */ I("div", {
|
|
262
262
|
ref: r,
|
|
263
263
|
"data-testid": "timeline-project-drop",
|
|
264
264
|
className: `flex max-w-[14rem] items-center gap-1.5 rounded-lg border px-3 py-2 transition-colors ${n ? "border-action-primary-bg bg-action-primary-bg/10" : e ? "border-border-seam bg-bg-surface" : "border-dashed border-border-seam bg-bg-surface"}`,
|
|
265
265
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ F(D, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }),
|
|
267
|
+
/* @__PURE__ */ F("span", {
|
|
268
268
|
className: "truncate text-sm font-medium text-text-primary",
|
|
269
269
|
children: t
|
|
270
270
|
}),
|
|
271
|
-
n && /* @__PURE__ */
|
|
271
|
+
n && /* @__PURE__ */ F("span", {
|
|
272
272
|
className: "shrink-0 text-xs font-medium text-primary",
|
|
273
273
|
children: "Drop here"
|
|
274
274
|
})
|
|
275
275
|
]
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
let [i, a] =
|
|
280
|
-
return /* @__PURE__ */
|
|
278
|
+
function Re({ segment: e, busy: t, onSplit: n, onCancel: r }) {
|
|
279
|
+
let [i, a] = C(() => b(e)), o = ae(e, i);
|
|
280
|
+
return /* @__PURE__ */ I("form", {
|
|
281
281
|
className: "mt-2 flex flex-wrap items-center gap-2 rounded-lg border border-border-seam bg-bg-sunken/40 px-2.5 py-1.5",
|
|
282
282
|
"data-testid": "timeline-split-form",
|
|
283
283
|
onSubmit: (e) => {
|
|
284
284
|
e.preventDefault(), o.ok && n(o.at);
|
|
285
285
|
},
|
|
286
286
|
children: [
|
|
287
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ F(j, {
|
|
288
288
|
className: "h-3.5 w-3.5 shrink-0 text-text-tertiary",
|
|
289
289
|
"aria-hidden": !0
|
|
290
290
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ I("label", {
|
|
292
292
|
className: "flex items-center gap-1.5 text-xs text-text-secondary",
|
|
293
|
-
children: ["Split at", /* @__PURE__ */
|
|
293
|
+
children: ["Split at", /* @__PURE__ */ F("input", {
|
|
294
294
|
type: "time",
|
|
295
295
|
value: i,
|
|
296
296
|
onChange: (e) => a(e.target.value),
|
|
@@ -298,7 +298,7 @@ function H({ segment: e, busy: t, onSplit: n, onCancel: r }) {
|
|
|
298
298
|
className: "rounded-md border border-border-seam bg-bg-surface px-2 py-0.5 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40"
|
|
299
299
|
})]
|
|
300
300
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ I("span", {
|
|
302
302
|
className: "text-xs text-text-tertiary",
|
|
303
303
|
children: [
|
|
304
304
|
l(e.startTime),
|
|
@@ -307,19 +307,19 @@ function H({ segment: e, busy: t, onSplit: n, onCancel: r }) {
|
|
|
307
307
|
e.endTime ? l(e.endTime) : "now"
|
|
308
308
|
]
|
|
309
309
|
}),
|
|
310
|
-
!o.ok && /* @__PURE__ */
|
|
310
|
+
!o.ok && /* @__PURE__ */ F("span", {
|
|
311
311
|
className: "text-xs text-status-error-text",
|
|
312
312
|
role: "alert",
|
|
313
313
|
children: o.reason
|
|
314
314
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ I("span", {
|
|
316
316
|
className: "ms-auto flex items-center gap-1",
|
|
317
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ I("button", {
|
|
318
318
|
type: "submit",
|
|
319
319
|
disabled: t || !o.ok,
|
|
320
320
|
className: "inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-2 py-0.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
322
|
-
}), /* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ F(j, { className: "h-3 w-3" }), "Split"]
|
|
322
|
+
}), /* @__PURE__ */ F("button", {
|
|
323
323
|
type: "button",
|
|
324
324
|
onClick: r,
|
|
325
325
|
className: "inline-flex items-center gap-1 rounded-md border border-border-seam bg-bg-surface px-2 py-0.5 text-xs font-medium text-text-secondary hover:bg-bg-sunken",
|
|
@@ -329,98 +329,98 @@ function H({ segment: e, busy: t, onSplit: n, onCancel: r }) {
|
|
|
329
329
|
]
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
let [d, f] =
|
|
332
|
+
function ze({ segment: e, category: t, projectName: n, suggestion: r, recategorizing: i, onRecategorize: a, projectActions: o, mergeTarget: s, editActions: u }) {
|
|
333
|
+
let [d, f] = C(!1), p = B[t] ?? B.OTHER, m = ne(e), h = _(e), te = Me[e.source] ?? w, g = ee(e), v = e.source === "CAPTURE", y = v && !e.projectId && !r && o.projects.length > 0, { attributes: b, listeners: re, setNodeRef: ie, isDragging: x } = ke({
|
|
334
334
|
id: e.id,
|
|
335
335
|
data: { segment: e },
|
|
336
336
|
disabled: !e.isRecategorizable
|
|
337
337
|
});
|
|
338
|
-
return /* @__PURE__ */
|
|
339
|
-
ref:
|
|
340
|
-
className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${
|
|
338
|
+
return /* @__PURE__ */ I("li", {
|
|
339
|
+
ref: ie,
|
|
340
|
+
className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${x ? "opacity-40" : ""}`,
|
|
341
341
|
children: [
|
|
342
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ I("div", {
|
|
343
343
|
className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
344
|
+
children: [/* @__PURE__ */ F("span", { children: l(e.startTime) }), /* @__PURE__ */ F("span", {
|
|
345
345
|
className: "text-text-tertiary",
|
|
346
346
|
children: c(e.durationSeconds)
|
|
347
347
|
})]
|
|
348
348
|
}),
|
|
349
|
-
e.isRecategorizable && /* @__PURE__ */
|
|
349
|
+
e.isRecategorizable && /* @__PURE__ */ F("button", {
|
|
350
350
|
type: "button",
|
|
351
351
|
"aria-label": `Drag ${e.title || p.label} onto a category or project`,
|
|
352
352
|
className: "mt-1.5 shrink-0 cursor-grab touch-none text-text-tertiary hover:text-text-secondary active:cursor-grabbing",
|
|
353
|
-
...
|
|
354
|
-
...
|
|
355
|
-
children: /* @__PURE__ */
|
|
353
|
+
...b,
|
|
354
|
+
...re,
|
|
355
|
+
children: /* @__PURE__ */ F(xe, { className: "h-4 w-4" })
|
|
356
356
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ F("div", {
|
|
358
358
|
className: `mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${p.chip}`,
|
|
359
|
-
children: /* @__PURE__ */
|
|
359
|
+
children: /* @__PURE__ */ F(te, { className: "h-4 w-4" })
|
|
360
360
|
}),
|
|
361
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ I("div", {
|
|
362
362
|
className: "min-w-0 flex-1",
|
|
363
363
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ F("p", {
|
|
365
365
|
className: "truncate text-sm font-medium text-text-primary",
|
|
366
366
|
children: e.title || p.label
|
|
367
367
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ I("div", {
|
|
369
369
|
className: "mt-1 flex flex-wrap items-center gap-2",
|
|
370
370
|
children: [
|
|
371
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ F("span", {
|
|
372
372
|
className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${p.chip}`,
|
|
373
373
|
children: p.label
|
|
374
374
|
}),
|
|
375
|
-
n !== void 0 && /* @__PURE__ */
|
|
375
|
+
n !== void 0 && /* @__PURE__ */ I("span", {
|
|
376
376
|
className: "inline-flex max-w-[12rem] items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
377
|
+
children: [/* @__PURE__ */ F(D, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ F("span", {
|
|
378
378
|
className: "truncate",
|
|
379
379
|
children: n
|
|
380
380
|
})]
|
|
381
381
|
}),
|
|
382
|
-
e.app && /* @__PURE__ */
|
|
382
|
+
e.app && /* @__PURE__ */ F("span", {
|
|
383
383
|
className: "text-xs text-text-secondary",
|
|
384
384
|
children: e.app
|
|
385
385
|
}),
|
|
386
|
-
|
|
386
|
+
g && (g.isAi ? /* @__PURE__ */ I("span", {
|
|
387
387
|
className: "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
388
|
-
title:
|
|
388
|
+
title: g.detail,
|
|
389
389
|
"data-testid": "timeline-ai-provenance",
|
|
390
390
|
children: [
|
|
391
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ F(N, {
|
|
392
392
|
className: "h-3 w-3 shrink-0",
|
|
393
393
|
"aria-hidden": !0
|
|
394
394
|
}),
|
|
395
|
-
|
|
396
|
-
/* @__PURE__ */
|
|
395
|
+
g.label,
|
|
396
|
+
/* @__PURE__ */ I("span", {
|
|
397
397
|
className: "sr-only",
|
|
398
|
-
children: [". ",
|
|
398
|
+
children: [". ", g.detail]
|
|
399
399
|
})
|
|
400
400
|
]
|
|
401
|
-
}) : /* @__PURE__ */
|
|
401
|
+
}) : /* @__PURE__ */ F("span", {
|
|
402
402
|
className: "text-xs text-text-tertiary",
|
|
403
|
-
title:
|
|
404
|
-
children:
|
|
403
|
+
title: g.detail,
|
|
404
|
+
children: g.label
|
|
405
405
|
})),
|
|
406
|
-
m && /* @__PURE__ */
|
|
406
|
+
m && /* @__PURE__ */ I("button", {
|
|
407
407
|
type: "button",
|
|
408
408
|
disabled: u.busy || i,
|
|
409
409
|
onClick: () => u.onApprove(e),
|
|
410
410
|
"aria-label": `Approve the AI category ${p.label} for ${e.title || "this activity"}`,
|
|
411
411
|
"data-testid": "timeline-approve-category",
|
|
412
412
|
className: "inline-flex items-center gap-1 rounded-full border border-border-seam bg-bg-surface px-2 py-0.5 text-xs font-medium text-text-secondary hover:bg-bg-sunken disabled:opacity-50",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
413
|
+
children: [/* @__PURE__ */ F(_e, { className: "h-3 w-3" }), "Approve"]
|
|
414
414
|
})
|
|
415
415
|
]
|
|
416
416
|
}),
|
|
417
|
-
r && /* @__PURE__ */
|
|
417
|
+
r && /* @__PURE__ */ F(H, {
|
|
418
418
|
suggestion: r,
|
|
419
419
|
busy: o.busy,
|
|
420
420
|
onAccept: o.onAccept,
|
|
421
421
|
onReject: o.onReject
|
|
422
422
|
}),
|
|
423
|
-
d && /* @__PURE__ */
|
|
423
|
+
d && /* @__PURE__ */ F(Re, {
|
|
424
424
|
segment: e,
|
|
425
425
|
busy: u.busy,
|
|
426
426
|
onSplit: (t) => {
|
|
@@ -430,58 +430,58 @@ function Re({ segment: e, category: t, projectName: n, suggestion: r, recategori
|
|
|
430
430
|
})
|
|
431
431
|
]
|
|
432
432
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ I("div", {
|
|
434
434
|
className: "flex shrink-0 flex-col items-end gap-1.5",
|
|
435
435
|
children: [
|
|
436
|
-
e.isRecategorizable && /* @__PURE__ */
|
|
436
|
+
e.isRecategorizable && /* @__PURE__ */ F(R, {
|
|
437
437
|
"aria-label": "Recategorize activity",
|
|
438
438
|
disabled: i,
|
|
439
439
|
value: t,
|
|
440
440
|
onChange: (t) => a(e, t.target.value),
|
|
441
441
|
className: "rounded-md border border-border-seam bg-bg-surface px-2 py-1 text-xs text-text-secondary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40",
|
|
442
|
-
children: V.map((e) => /* @__PURE__ */
|
|
442
|
+
children: V.map((e) => /* @__PURE__ */ F("option", {
|
|
443
443
|
value: e,
|
|
444
444
|
children: B[e].label
|
|
445
445
|
}, e))
|
|
446
446
|
}),
|
|
447
|
-
|
|
447
|
+
v && o.projects.length > 0 && /* @__PURE__ */ I(R, {
|
|
448
448
|
"aria-label": "Assign project",
|
|
449
449
|
disabled: o.busy,
|
|
450
450
|
value: e.projectId ?? "",
|
|
451
451
|
onChange: (t) => o.onSetProject(e, t.target.value || null),
|
|
452
452
|
className: "max-w-[10rem] rounded-md border border-border-seam bg-bg-surface px-2 py-1 text-xs text-text-secondary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40",
|
|
453
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ F("option", {
|
|
454
454
|
value: "",
|
|
455
455
|
children: "No project"
|
|
456
|
-
}), o.projects.map((e) => /* @__PURE__ */
|
|
456
|
+
}), o.projects.map((e) => /* @__PURE__ */ F("option", {
|
|
457
457
|
value: e.id,
|
|
458
458
|
children: e.name
|
|
459
459
|
}, e.id))]
|
|
460
460
|
}),
|
|
461
|
-
|
|
461
|
+
y && /* @__PURE__ */ I("button", {
|
|
462
462
|
type: "button",
|
|
463
463
|
disabled: o.busy,
|
|
464
464
|
onClick: () => o.onSuggest(e),
|
|
465
465
|
className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline disabled:opacity-50",
|
|
466
|
-
children: [/* @__PURE__ */
|
|
466
|
+
children: [/* @__PURE__ */ F(N, { className: "h-3 w-3" }), "Suggest project"]
|
|
467
467
|
}),
|
|
468
|
-
(s || h) && /* @__PURE__ */
|
|
468
|
+
(s || h) && /* @__PURE__ */ I("span", {
|
|
469
469
|
className: "flex items-center gap-2",
|
|
470
|
-
children: [s && /* @__PURE__ */
|
|
470
|
+
children: [s && /* @__PURE__ */ I("button", {
|
|
471
471
|
type: "button",
|
|
472
472
|
disabled: u.busy,
|
|
473
473
|
onClick: () => u.onMerge(e, s),
|
|
474
474
|
title: `Merge with ${s.title || "the next activity"} (${l(s.startTime)})`,
|
|
475
475
|
"data-testid": "timeline-merge-next",
|
|
476
476
|
className: "inline-flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary disabled:opacity-50",
|
|
477
|
-
children: [/* @__PURE__ */
|
|
478
|
-
}), h && !d && /* @__PURE__ */
|
|
477
|
+
children: [/* @__PURE__ */ F(k, { className: "h-3 w-3" }), "Merge with next"]
|
|
478
|
+
}), h && !d && /* @__PURE__ */ I("button", {
|
|
479
479
|
type: "button",
|
|
480
480
|
disabled: u.busy,
|
|
481
481
|
onClick: () => f(!0),
|
|
482
482
|
"data-testid": "timeline-split",
|
|
483
483
|
className: "inline-flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary disabled:opacity-50",
|
|
484
|
-
children: [/* @__PURE__ */
|
|
484
|
+
children: [/* @__PURE__ */ F(j, { className: "h-3 w-3" }), "Split"]
|
|
485
485
|
})]
|
|
486
486
|
})
|
|
487
487
|
]
|
|
@@ -496,10 +496,10 @@ function W(e) {
|
|
|
496
496
|
let t = e.getTimezoneOffset();
|
|
497
497
|
return (/* @__PURE__ */ new Date(e.getTime() - t * 60 * 1e3)).toISOString().slice(0, 10);
|
|
498
498
|
}
|
|
499
|
-
var
|
|
500
|
-
function
|
|
499
|
+
var Be = 14;
|
|
500
|
+
function G() {
|
|
501
501
|
let e = /* @__PURE__ */ new Date();
|
|
502
|
-
return e.setDate(e.getDate() +
|
|
502
|
+
return e.setDate(e.getDate() + Be), W(e);
|
|
503
503
|
}
|
|
504
504
|
function Ve(e) {
|
|
505
505
|
let t = /* @__PURE__ */ new Date(`${e}T00:00:00`), n = /* @__PURE__ */ new Date(`${e}T23:59:59.999`);
|
|
@@ -508,30 +508,30 @@ function Ve(e) {
|
|
|
508
508
|
to: n.toISOString()
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function
|
|
512
|
-
let { workspaceId: u = "" } =
|
|
513
|
-
let e =
|
|
514
|
-
return e !== null && e <=
|
|
515
|
-
}), [
|
|
511
|
+
function He() {
|
|
512
|
+
let { workspaceId: u = "" } = se(), { toasts: ee, addToast: f, dismissToast: p } = a(), [m] = we(), [h, ne] = C(() => {
|
|
513
|
+
let e = oe(m.get("date"));
|
|
514
|
+
return e !== null && e <= G() ? e : W(/* @__PURE__ */ new Date());
|
|
515
|
+
}), [_, y] = C(null), { from: b, to: x } = S(() => Ve(h), [h]), { data: ae, loading: E, error: be, refetch: D } = le({
|
|
516
516
|
variables: {
|
|
517
|
-
from:
|
|
518
|
-
to:
|
|
517
|
+
from: b,
|
|
518
|
+
to: x
|
|
519
519
|
},
|
|
520
520
|
skip: !u,
|
|
521
521
|
fetchPolicy: "cache-and-network"
|
|
522
|
-
}), { data:
|
|
522
|
+
}), { data: O } = ue({
|
|
523
523
|
variables: { pagination: { limit: 200 } },
|
|
524
524
|
skip: !u
|
|
525
|
-
}), [
|
|
526
|
-
s(!
|
|
527
|
-
let J = K?.summary, Y =
|
|
525
|
+
}), [k, { loading: A }] = fe(), [j, { loading: M }] = ce(), [P, { loading: Se }] = pe(), [R, { loading: ke }] = me(), [z, { loading: Me }] = ge(), H = M || Se || ke || Me, [Re, { loading: Be }] = de(), [He, { loading: Ue }] = he(), [We, Ge] = C(!1), Ke = Be || Ue || We, qe = je(Ae(Oe, { activationConstraint: { distance: 6 } }), Ae(De)), K = ae?.timeCampusTimeline, q = S(() => K?.segments ?? [], [K]);
|
|
526
|
+
s(!E && !!K, q.length > 0);
|
|
527
|
+
let J = K?.summary, Y = S(() => {
|
|
528
528
|
let e = /* @__PURE__ */ new Map();
|
|
529
|
-
for (let t of
|
|
529
|
+
for (let t of O?.projects?.items ?? []) e.set(t.id, t.name);
|
|
530
530
|
return e;
|
|
531
|
-
}, [
|
|
531
|
+
}, [O?.projects?.items]), X = S(() => Array.from(Y, ([e, t]) => ({
|
|
532
532
|
id: e,
|
|
533
533
|
name: t
|
|
534
|
-
})), [Y]), Z =
|
|
534
|
+
})), [Y]), Z = S(() => g(q, Y), [q, Y]), Je = S(() => {
|
|
535
535
|
let e = /* @__PURE__ */ new Map();
|
|
536
536
|
for (let t of J?.byCategory ?? []) e.set(t.category, {
|
|
537
537
|
totalSeconds: t.totalSeconds,
|
|
@@ -540,10 +540,10 @@ function G() {
|
|
|
540
540
|
return e;
|
|
541
541
|
}, [J]), Ye = async (e, t) => {
|
|
542
542
|
if (e.isRecategorizable && e.category !== t) try {
|
|
543
|
-
await
|
|
543
|
+
await k({ variables: {
|
|
544
544
|
id: e.sourceId,
|
|
545
545
|
category: t
|
|
546
|
-
} }), await
|
|
546
|
+
} }), await D(), f({
|
|
547
547
|
title: `Moved to ${B[t].label}`,
|
|
548
548
|
variant: "success"
|
|
549
549
|
});
|
|
@@ -553,12 +553,12 @@ function G() {
|
|
|
553
553
|
variant: "error"
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
|
-
}, Q =
|
|
556
|
+
}, Q = S(() => v(q), [q]), Xe = async (e) => {
|
|
557
557
|
let t = 0, n = null;
|
|
558
558
|
Ge(!0);
|
|
559
559
|
try {
|
|
560
560
|
for (let r = 0; r < e.length; r += Ie) {
|
|
561
|
-
let i = await Promise.allSettled(e.slice(r, r + Ie).map((e) =>
|
|
561
|
+
let i = await Promise.allSettled(e.slice(r, r + Ie).map((e) => k({ variables: {
|
|
562
562
|
id: e.sourceId,
|
|
563
563
|
category: e.category
|
|
564
564
|
} })));
|
|
@@ -575,12 +575,12 @@ function G() {
|
|
|
575
575
|
} finally {
|
|
576
576
|
Ge(!1);
|
|
577
577
|
try {
|
|
578
|
-
await
|
|
578
|
+
await D();
|
|
579
579
|
} catch {}
|
|
580
580
|
}
|
|
581
581
|
}, Ze = async (e, t) => {
|
|
582
582
|
try {
|
|
583
|
-
await
|
|
583
|
+
await Re({ variables: { ids: [e.sourceId, t.sourceId] } }), await D(), f({
|
|
584
584
|
title: "Activities merged",
|
|
585
585
|
description: "Gaps between them are not counted as tracked time.",
|
|
586
586
|
variant: "success"
|
|
@@ -596,7 +596,7 @@ function G() {
|
|
|
596
596
|
await He({ variables: {
|
|
597
597
|
id: e.sourceId,
|
|
598
598
|
at: t.toISOString()
|
|
599
|
-
} }), await
|
|
599
|
+
} }), await D(), f({
|
|
600
600
|
title: `Split at ${l(t.toISOString())}`,
|
|
601
601
|
variant: "success"
|
|
602
602
|
});
|
|
@@ -613,7 +613,7 @@ function G() {
|
|
|
613
613
|
onApprove: (e) => void Xe([e])
|
|
614
614
|
}, $ = async (e, t) => {
|
|
615
615
|
try {
|
|
616
|
-
await e(), await
|
|
616
|
+
await e(), await D(), f({
|
|
617
617
|
title: t,
|
|
618
618
|
variant: "success"
|
|
619
619
|
});
|
|
@@ -623,17 +623,17 @@ function G() {
|
|
|
623
623
|
variant: "error"
|
|
624
624
|
});
|
|
625
625
|
}
|
|
626
|
-
}, et = (e) => $(() =>
|
|
626
|
+
}, et = (e) => $(() => j({ variables: { id: e.captureEventId } }), `Assigned to ${e.projectName}`), tt = (e) => $(() => P({ variables: { id: e.captureEventId } }), "Suggestion dismissed"), nt = (e, t) => {
|
|
627
627
|
if ((e.projectId ?? null) === t) return;
|
|
628
628
|
let n = t ? Y.get(t) : void 0;
|
|
629
|
-
return $(() =>
|
|
629
|
+
return $(() => R({ variables: {
|
|
630
630
|
id: e.sourceId,
|
|
631
631
|
projectId: t
|
|
632
632
|
} }), n ? `Assigned to ${n}` : "Project removed");
|
|
633
633
|
}, rt = async (e) => {
|
|
634
634
|
try {
|
|
635
|
-
let t = (await
|
|
636
|
-
await
|
|
635
|
+
let t = (await z({ variables: { id: e.sourceId } })).data?.suggestTimeCampusCaptureEventCategory;
|
|
636
|
+
await D(), f(t?.suggestedProjectId ? {
|
|
637
637
|
title: `Suggested ${t.suggestedProjectName ?? "a project"}`,
|
|
638
638
|
description: "Accept or dismiss it on the activity.",
|
|
639
639
|
variant: "info"
|
|
@@ -651,7 +651,7 @@ function G() {
|
|
|
651
651
|
}, it = async () => {
|
|
652
652
|
let e = 0;
|
|
653
653
|
try {
|
|
654
|
-
for (let t of Z) await
|
|
654
|
+
for (let t of Z) await j({ variables: { id: t.captureEventId } }), e++;
|
|
655
655
|
f({
|
|
656
656
|
title: `Accepted ${e} project ${e === 1 ? "suggestion" : "suggestions"}`,
|
|
657
657
|
variant: "success"
|
|
@@ -663,7 +663,7 @@ function G() {
|
|
|
663
663
|
variant: "error"
|
|
664
664
|
});
|
|
665
665
|
} finally {
|
|
666
|
-
await
|
|
666
|
+
await D();
|
|
667
667
|
}
|
|
668
668
|
}, at = {
|
|
669
669
|
projects: X,
|
|
@@ -674,113 +674,113 @@ function G() {
|
|
|
674
674
|
onSuggest: (e) => void rt(e)
|
|
675
675
|
}, ot = (e) => {
|
|
676
676
|
let t = e.active.data.current?.segment;
|
|
677
|
-
|
|
677
|
+
y(t ?? null);
|
|
678
678
|
}, st = (e) => {
|
|
679
679
|
let t = e.active.data.current?.segment;
|
|
680
|
-
|
|
681
|
-
let n =
|
|
680
|
+
y(null);
|
|
681
|
+
let n = ie(e.over?.id, V);
|
|
682
682
|
t && n && (n.kind === "category" ? Ye(t, n.category) : t.source === "CAPTURE" && nt(t, n.projectId));
|
|
683
683
|
}, ct = q.some((e) => e.source === "CAPTURE" && e.isRecategorizable), lt = J && J.focusRatio != null ? Math.round(J.focusRatio * 100) : 0, ut = J?.firstActivityAt && J?.lastActivityAt ? `${l(J.firstActivityAt)} – ${l(J.lastActivityAt)}` : null;
|
|
684
|
-
return /* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ I(t, {
|
|
685
685
|
title: "Timeline",
|
|
686
686
|
description: "Your day, assembled automatically",
|
|
687
687
|
purpose: "See where your time actually went — meetings, deep work, communication and breaks stitched into one honest, chronological view from everything TimeCampus captures, so you can spot the patterns worth changing.",
|
|
688
|
-
actions: /* @__PURE__ */
|
|
688
|
+
actions: /* @__PURE__ */ I("div", {
|
|
689
689
|
className: "flex flex-wrap items-center gap-3",
|
|
690
|
-
children: [ut && /* @__PURE__ */
|
|
690
|
+
children: [ut && /* @__PURE__ */ I("span", {
|
|
691
691
|
className: "inline-flex items-center gap-1.5 rounded-full bg-bg-sunken px-2.5 py-1 text-xs font-medium tabular-nums text-text-secondary",
|
|
692
|
-
children: [/* @__PURE__ */
|
|
693
|
-
}), /* @__PURE__ */
|
|
692
|
+
children: [/* @__PURE__ */ F(w, { className: "h-3.5 w-3.5" }), ut]
|
|
693
|
+
}), /* @__PURE__ */ I("label", {
|
|
694
694
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
695
|
-
children: [/* @__PURE__ */
|
|
695
|
+
children: [/* @__PURE__ */ F(ve, { className: "h-4 w-4" }), /* @__PURE__ */ F("input", {
|
|
696
696
|
type: "date",
|
|
697
697
|
value: h,
|
|
698
|
-
max:
|
|
699
|
-
onChange: (e) =>
|
|
698
|
+
max: G(),
|
|
699
|
+
onChange: (e) => ne(e.target.value),
|
|
700
700
|
className: "rounded-md border border-border-seam bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40"
|
|
701
701
|
})]
|
|
702
702
|
})]
|
|
703
703
|
}),
|
|
704
704
|
children: [
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
|
|
705
|
+
/* @__PURE__ */ F(e, { path: h === W(/* @__PURE__ */ new Date()) ? "/mobile/timeline" : `/mobile/timeline?date=${h}` }),
|
|
706
|
+
E && !K ? /* @__PURE__ */ I("div", {
|
|
707
707
|
className: "space-y-6",
|
|
708
|
-
children: [/* @__PURE__ */
|
|
708
|
+
children: [/* @__PURE__ */ F(o, {
|
|
709
709
|
variant: "card",
|
|
710
710
|
count: 4
|
|
711
|
-
}), /* @__PURE__ */
|
|
711
|
+
}), /* @__PURE__ */ F(o, {
|
|
712
712
|
variant: "list",
|
|
713
713
|
count: 6
|
|
714
714
|
})]
|
|
715
|
-
}) :
|
|
715
|
+
}) : be ? /* @__PURE__ */ F("div", {
|
|
716
716
|
className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
|
|
717
717
|
children: "Failed to load your timeline. Please try again later."
|
|
718
|
-
}) : /* @__PURE__ */
|
|
718
|
+
}) : /* @__PURE__ */ I(Te, {
|
|
719
719
|
sensors: qe,
|
|
720
720
|
onDragStart: ot,
|
|
721
721
|
onDragEnd: st,
|
|
722
|
-
children: [/* @__PURE__ */
|
|
722
|
+
children: [/* @__PURE__ */ I("div", {
|
|
723
723
|
className: "space-y-6",
|
|
724
724
|
children: [
|
|
725
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ I("div", {
|
|
726
726
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
727
727
|
children: [
|
|
728
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ F(n, {
|
|
729
729
|
featured: !0,
|
|
730
730
|
title: "Tracked time",
|
|
731
731
|
value: c(J?.totalTrackedSeconds ?? 0),
|
|
732
|
-
icon: /* @__PURE__ */
|
|
732
|
+
icon: /* @__PURE__ */ F(w, { className: "h-5 w-5" }),
|
|
733
733
|
description: "Total activity across the day"
|
|
734
734
|
}),
|
|
735
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ F(n, {
|
|
736
736
|
title: "Focus ratio",
|
|
737
737
|
value: `${lt}%`,
|
|
738
|
-
icon: /* @__PURE__ */
|
|
738
|
+
icon: /* @__PURE__ */ F(T, { className: "h-5 w-5" }),
|
|
739
739
|
description: "Share of time in deep work"
|
|
740
740
|
}),
|
|
741
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ F(n, {
|
|
742
742
|
title: "Context switches",
|
|
743
743
|
value: J?.contextSwitches ?? 0,
|
|
744
|
-
icon: /* @__PURE__ */
|
|
744
|
+
icon: /* @__PURE__ */ F(Ce, { className: "h-5 w-5" }),
|
|
745
745
|
description: "Category changes through the day"
|
|
746
746
|
}),
|
|
747
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ F(n, {
|
|
748
748
|
title: "Longest focus block",
|
|
749
749
|
value: c(J?.longestFocusBlockSeconds ?? 0),
|
|
750
|
-
icon: /* @__PURE__ */
|
|
750
|
+
icon: /* @__PURE__ */ F(T, { className: "h-5 w-5" }),
|
|
751
751
|
description: "Your deepest uninterrupted stretch"
|
|
752
752
|
})
|
|
753
753
|
]
|
|
754
754
|
}),
|
|
755
|
-
q.length > 0 && /* @__PURE__ */ L
|
|
755
|
+
q.length > 0 && /* @__PURE__ */ I(L, {
|
|
756
756
|
treatment: "glass",
|
|
757
757
|
className: "p-4 sm:p-6",
|
|
758
758
|
children: [
|
|
759
|
-
/* @__PURE__ */
|
|
759
|
+
/* @__PURE__ */ F("h2", {
|
|
760
760
|
className: "mb-1 text-sm font-semibold text-text-primary",
|
|
761
761
|
children: "Where the time went"
|
|
762
762
|
}),
|
|
763
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ F("p", {
|
|
764
764
|
className: "mb-4 text-xs text-text-secondary",
|
|
765
765
|
children: "Drag a segment from the timeline below onto a category to recategorize it, or onto a project to assign it — or use its dropdowns."
|
|
766
766
|
}),
|
|
767
|
-
d(q) && /* @__PURE__ */
|
|
767
|
+
d(q) && /* @__PURE__ */ I("p", {
|
|
768
768
|
className: "mb-4 flex items-start gap-1.5 text-xs text-text-secondary",
|
|
769
769
|
"data-testid": "timeline-ai-disclaimer",
|
|
770
|
-
children: [/* @__PURE__ */
|
|
770
|
+
children: [/* @__PURE__ */ F(N, {
|
|
771
771
|
className: "mt-0.5 h-3 w-3 shrink-0",
|
|
772
772
|
"aria-hidden": !0
|
|
773
|
-
}), /* @__PURE__ */
|
|
773
|
+
}), /* @__PURE__ */ I("span", { children: [
|
|
774
774
|
"Some activities here were categorized by AI.",
|
|
775
775
|
" ",
|
|
776
776
|
"AI can get this wrong. Pick another category to correct it, and TimeCampus will use your choice for this app from now on."
|
|
777
777
|
] })]
|
|
778
778
|
}),
|
|
779
|
-
/* @__PURE__ */
|
|
779
|
+
/* @__PURE__ */ F("div", {
|
|
780
780
|
className: "flex flex-wrap gap-4",
|
|
781
781
|
children: V.map((e) => {
|
|
782
782
|
let t = B[e], n = Je.get(e);
|
|
783
|
-
return /* @__PURE__ */
|
|
783
|
+
return /* @__PURE__ */ F(Fe, {
|
|
784
784
|
category: e,
|
|
785
785
|
label: t.label,
|
|
786
786
|
dotClassName: t.dot,
|
|
@@ -790,39 +790,39 @@ function G() {
|
|
|
790
790
|
})
|
|
791
791
|
]
|
|
792
792
|
}),
|
|
793
|
-
ct && X.length > 0 && /* @__PURE__ */ L
|
|
793
|
+
ct && X.length > 0 && /* @__PURE__ */ I(L, {
|
|
794
794
|
treatment: "glass",
|
|
795
795
|
className: "p-4 sm:p-6",
|
|
796
796
|
children: [
|
|
797
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ F("h2", {
|
|
798
798
|
className: "mb-1 text-sm font-semibold text-text-primary",
|
|
799
799
|
children: "Assign to a project"
|
|
800
800
|
}),
|
|
801
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ F("p", {
|
|
802
802
|
className: "mb-4 text-xs text-text-secondary",
|
|
803
803
|
children: "Drag a captured activity onto a project to assign it."
|
|
804
804
|
}),
|
|
805
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ I("div", {
|
|
806
806
|
className: "flex flex-wrap gap-3",
|
|
807
|
-
children: [X.map((e) => /* @__PURE__ */
|
|
807
|
+
children: [X.map((e) => /* @__PURE__ */ F(Le, {
|
|
808
808
|
projectId: e.id,
|
|
809
809
|
label: e.name
|
|
810
|
-
}, e.id)), /* @__PURE__ */
|
|
810
|
+
}, e.id)), /* @__PURE__ */ F(Le, {
|
|
811
811
|
projectId: null,
|
|
812
812
|
label: "No project"
|
|
813
813
|
})]
|
|
814
814
|
})
|
|
815
815
|
]
|
|
816
816
|
}),
|
|
817
|
-
Q.length > 0 && /* @__PURE__ */
|
|
817
|
+
Q.length > 0 && /* @__PURE__ */ I("div", {
|
|
818
818
|
className: "flex flex-wrap items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken/40 px-4 py-3",
|
|
819
819
|
"data-testid": "timeline-approval-banner",
|
|
820
820
|
children: [
|
|
821
|
-
/* @__PURE__ */
|
|
822
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ F(N, { className: "h-4 w-4 shrink-0 text-primary" }),
|
|
822
|
+
/* @__PURE__ */ I("p", {
|
|
823
823
|
className: "text-sm text-text-secondary",
|
|
824
824
|
children: [
|
|
825
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ I("span", {
|
|
826
826
|
className: "font-medium text-text-primary",
|
|
827
827
|
children: [
|
|
828
828
|
Q.length,
|
|
@@ -836,24 +836,24 @@ function G() {
|
|
|
836
836
|
"Approve them as they are, or drag one onto another category to correct it."
|
|
837
837
|
]
|
|
838
838
|
}),
|
|
839
|
-
/* @__PURE__ */
|
|
839
|
+
/* @__PURE__ */ I("button", {
|
|
840
840
|
type: "button",
|
|
841
|
-
disabled: Ke ||
|
|
841
|
+
disabled: Ke || A,
|
|
842
842
|
onClick: () => void Xe(Q),
|
|
843
843
|
className: "ms-auto inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-3 py-1 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
844
|
-
children: [/* @__PURE__ */
|
|
844
|
+
children: [/* @__PURE__ */ F(_e, { className: "h-3.5 w-3.5" }), "Approve all"]
|
|
845
845
|
})
|
|
846
846
|
]
|
|
847
847
|
}),
|
|
848
|
-
Z.length > 0 && /* @__PURE__ */
|
|
848
|
+
Z.length > 0 && /* @__PURE__ */ I("div", {
|
|
849
849
|
className: "flex flex-wrap items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken/40 px-4 py-3",
|
|
850
850
|
"data-testid": "timeline-suggestions-banner",
|
|
851
851
|
children: [
|
|
852
|
-
/* @__PURE__ */
|
|
853
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ F(N, { className: "h-4 w-4 shrink-0 text-primary" }),
|
|
853
|
+
/* @__PURE__ */ I("p", {
|
|
854
854
|
className: "text-sm text-text-secondary",
|
|
855
855
|
children: [
|
|
856
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ I("span", {
|
|
857
857
|
className: "font-medium text-text-primary",
|
|
858
858
|
children: [
|
|
859
859
|
Z.length,
|
|
@@ -866,54 +866,54 @@ function G() {
|
|
|
866
866
|
"waiting for review. Nothing is assigned until you accept."
|
|
867
867
|
]
|
|
868
868
|
}),
|
|
869
|
-
/* @__PURE__ */
|
|
869
|
+
/* @__PURE__ */ I("button", {
|
|
870
870
|
type: "button",
|
|
871
871
|
disabled: H,
|
|
872
872
|
onClick: () => void it(),
|
|
873
873
|
className: "ms-auto inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-3 py-1 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
874
|
-
children: [/* @__PURE__ */
|
|
874
|
+
children: [/* @__PURE__ */ F(ye, { className: "h-3.5 w-3.5" }), "Accept all"]
|
|
875
875
|
})
|
|
876
876
|
]
|
|
877
877
|
}),
|
|
878
|
-
q.length === 0 ? /* @__PURE__ */
|
|
878
|
+
q.length === 0 ? /* @__PURE__ */ F(r, {
|
|
879
879
|
illustration: "empty-generic",
|
|
880
880
|
title: "No activity captured for this day",
|
|
881
881
|
description: "As you track time, hold meetings, run focus sessions, and connect shared integrations, your day assembles here automatically — categorized and in order."
|
|
882
|
-
}) : /* @__PURE__ */
|
|
882
|
+
}) : /* @__PURE__ */ F(L, {
|
|
883
883
|
treatment: "glass",
|
|
884
884
|
glow: !0,
|
|
885
885
|
className: "overflow-hidden",
|
|
886
|
-
children: /* @__PURE__ */
|
|
886
|
+
children: /* @__PURE__ */ F("ol", {
|
|
887
887
|
className: "divide-y divide-border-seam",
|
|
888
|
-
children: q.map((e, t) =>
|
|
888
|
+
children: q.map((e, t) => Ne(e) ? /* @__PURE__ */ F(Pe, { segment: e }, e.id) : /* @__PURE__ */ F(ze, {
|
|
889
889
|
segment: e,
|
|
890
890
|
category: e.category ?? "OTHER",
|
|
891
891
|
projectName: e.projectId ? Y.get(e.projectId) : void 0,
|
|
892
|
-
suggestion:
|
|
893
|
-
recategorizing:
|
|
892
|
+
suggestion: te(e, Y),
|
|
893
|
+
recategorizing: A,
|
|
894
894
|
onRecategorize: Ye,
|
|
895
895
|
projectActions: at,
|
|
896
|
-
mergeTarget:
|
|
896
|
+
mergeTarget: re(q, t),
|
|
897
897
|
editActions: $e
|
|
898
898
|
}, e.id))
|
|
899
899
|
})
|
|
900
900
|
})
|
|
901
901
|
]
|
|
902
|
-
}), /* @__PURE__ */
|
|
902
|
+
}), /* @__PURE__ */ F(Ee, { children: _ && /* @__PURE__ */ I("div", {
|
|
903
903
|
className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface px-3 py-2 shadow-pop",
|
|
904
|
-
children: [/* @__PURE__ */
|
|
904
|
+
children: [/* @__PURE__ */ F(xe, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ F("span", {
|
|
905
905
|
className: "text-sm font-medium text-text-primary",
|
|
906
|
-
children:
|
|
906
|
+
children: _.title || B[_.category ?? "OTHER"].label
|
|
907
907
|
})]
|
|
908
908
|
}) })]
|
|
909
909
|
}),
|
|
910
|
-
/* @__PURE__ */
|
|
910
|
+
/* @__PURE__ */ F(i, {
|
|
911
911
|
toasts: ee,
|
|
912
912
|
onDismiss: p
|
|
913
913
|
})
|
|
914
914
|
]
|
|
915
915
|
});
|
|
916
916
|
}
|
|
917
|
-
export {
|
|
917
|
+
export { He as TimelinePage };
|
|
918
918
|
|
|
919
919
|
//# sourceMappingURL=TimelinePage.js.map
|