@burdenoff/microfe-timecampus 2026.1031.10 → 2026.1031.12
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/generated/wspace-operations.d.ts +45 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +710 -672
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +731 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +14 -12
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/timecampus/TimeCampusRoot.d.ts.map +1 -1
- package/dist/timecampus/TimeCampusRoot.js +121 -80
- package/dist/timecampus/TimeCampusRoot.js.map +1 -1
- package/dist/timecampus/TimeCampusRoutes.d.ts.map +1 -1
- package/dist/timecampus/TimeCampusRoutes.js +24 -5
- package/dist/timecampus/TimeCampusRoutes.js.map +1 -1
- package/dist/timecampus/analytics/index.d.ts +3 -0
- package/dist/timecampus/analytics/index.d.ts.map +1 -0
- package/dist/timecampus/analytics/index.js +3 -0
- package/dist/timecampus/analytics/timecampusAnalytics.d.ts +83 -0
- package/dist/timecampus/analytics/timecampusAnalytics.d.ts.map +1 -0
- package/dist/timecampus/analytics/timecampusAnalytics.js +175 -0
- package/dist/timecampus/analytics/timecampusAnalytics.js.map +1 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.d.ts +16 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.d.ts.map +1 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.js +48 -0
- package/dist/timecampus/analytics/useTimeCampusAnalytics.js.map +1 -0
- package/dist/timecampus/components/ActivationCard.d.ts +3 -0
- package/dist/timecampus/components/ActivationCard.d.ts.map +1 -0
- package/dist/timecampus/components/ActivationCard.js +156 -0
- package/dist/timecampus/components/ActivationCard.js.map +1 -0
- package/dist/timecampus/index.js +7 -7
- package/dist/timecampus/pages/HomePage.d.ts.map +1 -1
- package/dist/timecampus/pages/HomePage.js +142 -139
- package/dist/timecampus/pages/HomePage.js.map +1 -1
- package/dist/timecampus/pages/client-portal/ClientPortalPage.d.ts.map +1 -1
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js +244 -228
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/AnalyticsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/dashboard/AnalyticsPage.js +117 -112
- package/dist/timecampus/pages/dashboard/AnalyticsPage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/ReportsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/dashboard/ReportsPage.js +105 -102
- package/dist/timecampus/pages/dashboard/ReportsPage.js.map +1 -1
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.d.ts.map +1 -1
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +209 -192
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/focus-score/FocusScorePage.d.ts.map +1 -1
- package/dist/timecampus/pages/focus-score/FocusScorePage.js +71 -68
- package/dist/timecampus/pages/focus-score/FocusScorePage.js.map +1 -1
- package/dist/timecampus/pages/invoicing/InvoicingPage.d.ts.map +1 -1
- package/dist/timecampus/pages/invoicing/InvoicingPage.js +157 -150
- package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/LifeBalancePage.d.ts.map +1 -1
- package/dist/timecampus/pages/lifetime/LifeBalancePage.js +34 -31
- package/dist/timecampus/pages/lifetime/LifeBalancePage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingCreatePage.d.ts.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingCreatePage.js +58 -52
- package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingsPage.js +51 -45
- package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
- package/dist/timecampus/pages/mobile/MobileLifeBalancePage.d.ts +8 -0
- package/dist/timecampus/pages/mobile/MobileLifeBalancePage.d.ts.map +1 -0
- package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js +224 -0
- package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js.map +1 -0
- package/dist/timecampus/pages/mobile/MobileScreen.d.ts +32 -0
- package/dist/timecampus/pages/mobile/MobileScreen.d.ts.map +1 -0
- package/dist/timecampus/pages/mobile/MobileScreen.js +89 -0
- package/dist/timecampus/pages/mobile/MobileScreen.js.map +1 -0
- package/dist/timecampus/pages/mobile/MobileTimelinePage.d.ts +8 -0
- package/dist/timecampus/pages/mobile/MobileTimelinePage.d.ts.map +1 -0
- package/dist/timecampus/pages/mobile/MobileTimelinePage.js +341 -0
- package/dist/timecampus/pages/mobile/MobileTimelinePage.js.map +1 -0
- package/dist/timecampus/pages/mobile/MobileTimerPage.d.ts +8 -0
- package/dist/timecampus/pages/mobile/MobileTimerPage.d.ts.map +1 -0
- package/dist/timecampus/pages/mobile/MobileTimerPage.js +226 -0
- package/dist/timecampus/pages/mobile/MobileTimerPage.js.map +1 -0
- package/dist/timecampus/pages/mobile/mobileModel.d.ts +121 -0
- package/dist/timecampus/pages/mobile/mobileModel.d.ts.map +1 -0
- package/dist/timecampus/pages/mobile/mobileModel.js +127 -0
- package/dist/timecampus/pages/mobile/mobileModel.js.map +1 -0
- package/dist/timecampus/pages/pomodoro/PomodoroPage.d.ts.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js +57 -51
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectCreatePage.d.ts.map +1 -1
- package/dist/timecampus/pages/projects/ProjectCreatePage.js +59 -49
- package/dist/timecampus/pages/projects/ProjectCreatePage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/projects/ProjectsPage.js +165 -155
- package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeEntriesPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time/TimeEntriesPage.js +194 -186
- package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeTrackingPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time/TimeTrackingPage.js +139 -126
- package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimerPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time/TimerPage.js +54 -39
- package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.d.ts.map +1 -1
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.js +60 -50
- package/dist/timecampus/pages/time-approval/TimeApprovalPage.js.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.d.ts.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.js +306 -297
- package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
- package/dist/timecampus/types/index.d.ts +5 -0
- package/dist/timecampus/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4,21 +4,24 @@ import { StatCard as r } from "../../components/StatCard.js";
|
|
|
4
4
|
import { LoadingSkeleton as i } from "../../components/LoadingSkeleton.js";
|
|
5
5
|
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
6
6
|
import { useAcceptTimeCampusCaptureEventSuggestionMutation as o, useGetTimeCampusTimelineQuery as s, useListProjectsQuery as c, useRecategorizeTimeCampusCaptureEventMutation as l, useRejectTimeCampusCaptureEventSuggestionMutation as u, useSetTimeCampusCaptureEventProjectMutation as d, useSuggestTimeCampusCaptureEventProjectMutation as f } from "../../../generated/wspace-operations.js";
|
|
7
|
+
import { useTimelineViewed as ee } from "../../analytics/useTimeCampusAnalytics.js";
|
|
8
|
+
import "../../analytics/index.js";
|
|
7
9
|
import { PageLayout as p } from "../../components/PageLayout.js";
|
|
8
|
-
import { ToastContainer as
|
|
9
|
-
import { calendarHoldLabel as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
10
|
+
import { ToastContainer as m, useToast as h } from "../../components/Toast.js";
|
|
11
|
+
import { calendarHoldLabel as g } from "../focus/focusHelpers.js";
|
|
12
|
+
import { PhoneViewLink as te } from "../mobile/MobileScreen.js";
|
|
13
|
+
import { parseTimelineDateParam as ne } from "../lifetime/recommendationEvidence.js";
|
|
14
|
+
import { hasAiCategorizedSegment as re, segmentProvenance as ie } from "./timelineProvenance.js";
|
|
15
|
+
import { driftLabel as _, focusStatusLabel as ae, plannedDrift as v, protectedPercent as y } from "./timelineFocus.js";
|
|
16
|
+
import { pendingSuggestion as oe, pendingSuggestions as se } from "./timelineSuggestions.js";
|
|
17
|
+
import { useMemo as b, useState as x } from "react";
|
|
18
|
+
import { Activity as S, Brain as C, Calendar as ce, CalendarClock as w, Check as T, Coffee as E, FolderOpen as D, Github as le, GripVertical as ue, MessageSquare as O, Shield as k, Sparkles as A, Users as j, X as M, Zap as N } from "lucide-react";
|
|
19
|
+
import { useSearchParams as de } from "react-router";
|
|
20
|
+
import { jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
21
|
+
import { GlassCard as I } from "@burdenoff/fe-libs/ui";
|
|
22
|
+
import { DndContext as fe, DragOverlay as pe, KeyboardSensor as me, PointerSensor as he, useDraggable as L, useDroppable as R, useSensor as z, useSensors as ge } from "@dnd-kit/core";
|
|
20
23
|
//#region src/timecampus/pages/timeline/TimelinePage.tsx
|
|
21
|
-
var
|
|
24
|
+
var B = {
|
|
22
25
|
DEEP_WORK: {
|
|
23
26
|
label: "Deep work",
|
|
24
27
|
icon: C,
|
|
@@ -27,13 +30,13 @@ var V = {
|
|
|
27
30
|
},
|
|
28
31
|
MEETING: {
|
|
29
32
|
label: "Meeting",
|
|
30
|
-
icon:
|
|
33
|
+
icon: j,
|
|
31
34
|
dot: "bg-status-info-bg",
|
|
32
35
|
chip: "bg-status-info-bg text-status-info-text"
|
|
33
36
|
},
|
|
34
37
|
COMMUNICATION: {
|
|
35
38
|
label: "Communication",
|
|
36
|
-
icon:
|
|
39
|
+
icon: O,
|
|
37
40
|
dot: "bg-status-warning-bg",
|
|
38
41
|
chip: "bg-status-warning-bg text-status-warning-text"
|
|
39
42
|
},
|
|
@@ -49,57 +52,57 @@ var V = {
|
|
|
49
52
|
dot: "bg-bg-sunken",
|
|
50
53
|
chip: "bg-bg-sunken text-text-secondary"
|
|
51
54
|
}
|
|
52
|
-
},
|
|
53
|
-
TIME_ENTRY:
|
|
54
|
-
MEETING:
|
|
55
|
+
}, V = {
|
|
56
|
+
TIME_ENTRY: N,
|
|
57
|
+
MEETING: j,
|
|
55
58
|
POMODORO: C,
|
|
56
|
-
EMAIL:
|
|
57
|
-
CAPTURE:
|
|
58
|
-
FOCUS_SESSION:
|
|
59
|
+
EMAIL: O,
|
|
60
|
+
CAPTURE: le,
|
|
61
|
+
FOCUS_SESSION: k,
|
|
59
62
|
FOCUS_BLOCK: w
|
|
60
63
|
};
|
|
61
|
-
function
|
|
64
|
+
function _e(e) {
|
|
62
65
|
return e.source === "FOCUS_SESSION" || e.source === "FOCUS_BLOCK";
|
|
63
66
|
}
|
|
64
|
-
function
|
|
67
|
+
function ve({ segment: e }) {
|
|
65
68
|
let r = e.focus;
|
|
66
69
|
if (!r) return null;
|
|
67
|
-
let i = e.isPlanned, a = i ? w :
|
|
68
|
-
return /* @__PURE__ */
|
|
70
|
+
let i = e.isPlanned, a = i ? w : k, o = ae(i, r, e.endTime), s = i ? null : y(r), c = i ? null : v(e.startTime, e.endTime, r), l = g(r.calendarHoldStatus);
|
|
71
|
+
return /* @__PURE__ */ F("li", {
|
|
69
72
|
className: `flex items-start gap-3 p-4 ${i ? "bg-bg-sunken/30" : ""}`,
|
|
70
73
|
"data-testid": i ? "timeline-focus-block" : "timeline-focus-session",
|
|
71
74
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ F("div", {
|
|
73
76
|
className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
77
|
+
children: [/* @__PURE__ */ P("span", { children: n(e.startTime) }), /* @__PURE__ */ P("span", {
|
|
75
78
|
className: "text-text-tertiary",
|
|
76
79
|
children: t(e.durationSeconds)
|
|
77
80
|
})]
|
|
78
81
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ P("div", {
|
|
80
83
|
className: `mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${i ? "border border-dashed border-status-success-text/60 text-status-success-text" : "bg-status-success-bg text-status-success-text"}`,
|
|
81
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ P(a, { className: "h-4 w-4" })
|
|
82
85
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ F("div", {
|
|
84
87
|
className: "min-w-0 flex-1",
|
|
85
88
|
children: [
|
|
86
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ P("p", {
|
|
87
90
|
className: "truncate text-sm font-medium text-text-primary",
|
|
88
91
|
children: e.title || (i ? "Planned focus block" : "Focus session")
|
|
89
92
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ F("div", {
|
|
91
94
|
className: "mt-1 flex flex-wrap items-center gap-2",
|
|
92
95
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ P("span", {
|
|
94
97
|
className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${i ? "border border-dashed border-border-seam text-text-secondary" : "bg-status-success-bg text-status-success-text"}`,
|
|
95
98
|
"data-testid": "timeline-focus-status",
|
|
96
99
|
children: o
|
|
97
100
|
}),
|
|
98
|
-
r.protectionLevel === "STRICT" && /* @__PURE__ */
|
|
101
|
+
r.protectionLevel === "STRICT" && /* @__PURE__ */ P("span", {
|
|
99
102
|
className: "text-xs text-text-secondary",
|
|
100
103
|
children: "Strict"
|
|
101
104
|
}),
|
|
102
|
-
r.plannedStartTime && r.plannedEndTime && /* @__PURE__ */
|
|
105
|
+
r.plannedStartTime && r.plannedEndTime && /* @__PURE__ */ F("span", {
|
|
103
106
|
className: "text-xs tabular-nums text-text-secondary",
|
|
104
107
|
children: [
|
|
105
108
|
"Planned ",
|
|
@@ -109,7 +112,7 @@ function he({ segment: e }) {
|
|
|
109
112
|
n(r.plannedEndTime)
|
|
110
113
|
]
|
|
111
114
|
}),
|
|
112
|
-
!i && e.endTime && /* @__PURE__ */
|
|
115
|
+
!i && e.endTime && /* @__PURE__ */ F("span", {
|
|
113
116
|
className: "text-xs tabular-nums text-text-secondary",
|
|
114
117
|
children: [
|
|
115
118
|
"Actual ",
|
|
@@ -119,7 +122,7 @@ function he({ segment: e }) {
|
|
|
119
122
|
n(e.endTime)
|
|
120
123
|
]
|
|
121
124
|
}),
|
|
122
|
-
c && /* @__PURE__ */
|
|
125
|
+
c && /* @__PURE__ */ F("span", {
|
|
123
126
|
className: "text-xs text-text-tertiary",
|
|
124
127
|
children: [
|
|
125
128
|
"Started ",
|
|
@@ -127,27 +130,27 @@ function he({ segment: e }) {
|
|
|
127
130
|
c.endMinutes !== null && `, ended ${_(c.endMinutes, "over", "short")}`
|
|
128
131
|
]
|
|
129
132
|
}),
|
|
130
|
-
l && /* @__PURE__ */
|
|
133
|
+
l && /* @__PURE__ */ P("span", {
|
|
131
134
|
className: "text-xs text-text-tertiary",
|
|
132
135
|
children: l
|
|
133
136
|
})
|
|
134
137
|
]
|
|
135
138
|
}),
|
|
136
|
-
!i && /* @__PURE__ */
|
|
139
|
+
!i && /* @__PURE__ */ F("div", {
|
|
137
140
|
className: "mt-2",
|
|
138
141
|
"data-testid": "timeline-focus-protection",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
142
|
+
children: [/* @__PURE__ */ F("div", {
|
|
140
143
|
className: "flex h-1.5 w-full max-w-xs overflow-hidden rounded-full bg-bg-sunken",
|
|
141
144
|
role: "img",
|
|
142
145
|
"aria-label": `${s ?? 0}% of this session stayed protected`,
|
|
143
|
-
children: [/* @__PURE__ */
|
|
146
|
+
children: [/* @__PURE__ */ P("span", {
|
|
144
147
|
className: "h-full bg-status-success-text",
|
|
145
148
|
style: { width: `${s ?? 0}%` }
|
|
146
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ P("span", {
|
|
147
150
|
className: "h-full bg-status-warning-text",
|
|
148
151
|
style: { width: `${s === null ? 0 : 100 - s}%` }
|
|
149
152
|
})]
|
|
150
|
-
}), /* @__PURE__ */
|
|
153
|
+
}), /* @__PURE__ */ F("p", {
|
|
151
154
|
className: "mt-1 text-xs tabular-nums text-text-secondary",
|
|
152
155
|
children: [
|
|
153
156
|
"Protected ",
|
|
@@ -164,7 +167,7 @@ function he({ segment: e }) {
|
|
|
164
167
|
]
|
|
165
168
|
})]
|
|
166
169
|
}),
|
|
167
|
-
i && /* @__PURE__ */
|
|
170
|
+
i && /* @__PURE__ */ P("p", {
|
|
168
171
|
className: "mt-1 text-xs text-text-tertiary",
|
|
169
172
|
children: "Not counted in the day's totals until you run it."
|
|
170
173
|
})
|
|
@@ -173,28 +176,28 @@ function he({ segment: e }) {
|
|
|
173
176
|
]
|
|
174
177
|
});
|
|
175
178
|
}
|
|
176
|
-
var
|
|
179
|
+
var H = [
|
|
177
180
|
"DEEP_WORK",
|
|
178
181
|
"MEETING",
|
|
179
182
|
"COMMUNICATION",
|
|
180
183
|
"BREAK",
|
|
181
184
|
"OTHER"
|
|
182
185
|
];
|
|
183
|
-
function
|
|
184
|
-
return /* @__PURE__ */
|
|
186
|
+
function U({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
|
|
187
|
+
return /* @__PURE__ */ F("div", {
|
|
185
188
|
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",
|
|
186
189
|
"data-testid": "timeline-project-suggestion",
|
|
187
190
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ P(A, {
|
|
189
192
|
className: "h-3.5 w-3.5 shrink-0 text-primary",
|
|
190
193
|
"aria-hidden": !0
|
|
191
194
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ F("span", {
|
|
193
196
|
className: "text-xs text-text-secondary",
|
|
194
197
|
children: [
|
|
195
198
|
"Suggested project",
|
|
196
199
|
" ",
|
|
197
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ P("span", {
|
|
198
201
|
className: "font-medium text-text-primary",
|
|
199
202
|
children: e.projectName
|
|
200
203
|
}),
|
|
@@ -205,129 +208,129 @@ function W({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
|
|
|
205
208
|
e.reason
|
|
206
209
|
]
|
|
207
210
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ F("span", {
|
|
209
212
|
className: "ml-auto flex items-center gap-1",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ F("button", {
|
|
211
214
|
type: "button",
|
|
212
215
|
disabled: t,
|
|
213
216
|
onClick: () => n(e),
|
|
214
217
|
"aria-label": `Accept project ${e.projectName}`,
|
|
215
218
|
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",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
217
|
-
}), /* @__PURE__ */
|
|
219
|
+
children: [/* @__PURE__ */ P(T, { className: "h-3 w-3" }), "Accept"]
|
|
220
|
+
}), /* @__PURE__ */ F("button", {
|
|
218
221
|
type: "button",
|
|
219
222
|
disabled: t,
|
|
220
223
|
onClick: () => r(e),
|
|
221
224
|
"aria-label": `Dismiss suggested project ${e.projectName}`,
|
|
222
225
|
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",
|
|
223
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ P(M, { className: "h-3 w-3" }), "Dismiss"]
|
|
224
227
|
})]
|
|
225
228
|
})
|
|
226
229
|
]
|
|
227
230
|
});
|
|
228
231
|
}
|
|
229
|
-
function
|
|
230
|
-
let { isOver: a, setNodeRef: o } =
|
|
231
|
-
return /* @__PURE__ */
|
|
232
|
+
function ye({ category: e, label: n, dotClassName: r, totalSeconds: i }) {
|
|
233
|
+
let { isOver: a, setNodeRef: o } = R({ id: `category:${e}` });
|
|
234
|
+
return /* @__PURE__ */ F("div", {
|
|
232
235
|
ref: o,
|
|
233
236
|
className: `flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors ${a ? "border-action-primary-bg bg-action-primary-bg/10" : "border-border-seam bg-bg-surface"}`,
|
|
234
237
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ P("span", {
|
|
236
239
|
className: `inline-block h-2.5 w-2.5 rounded-full ${r}`,
|
|
237
240
|
"aria-hidden": !0
|
|
238
241
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ P("span", {
|
|
240
243
|
className: "text-sm font-medium text-text-primary",
|
|
241
244
|
children: n
|
|
242
245
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ P("span", {
|
|
244
247
|
className: "text-sm tabular-nums text-text-secondary",
|
|
245
248
|
children: t(i)
|
|
246
249
|
}),
|
|
247
|
-
a && /* @__PURE__ */
|
|
250
|
+
a && /* @__PURE__ */ P("span", {
|
|
248
251
|
className: "text-xs font-medium text-primary",
|
|
249
252
|
children: "Drop here"
|
|
250
253
|
})
|
|
251
254
|
]
|
|
252
255
|
});
|
|
253
256
|
}
|
|
254
|
-
function
|
|
255
|
-
let l =
|
|
257
|
+
function be({ segment: e, category: r, projectName: i, suggestion: a, recategorizing: o, onRecategorize: s, projectActions: c }) {
|
|
258
|
+
let l = B[r] ?? B.OTHER, u = V[e.source] ?? S, d = ie(e), f = e.source === "CAPTURE", ee = f && !e.projectId && !a && c.projects.length > 0, { attributes: p, listeners: m, setNodeRef: h, isDragging: g } = L({
|
|
256
259
|
id: e.id,
|
|
257
260
|
data: { segment: e },
|
|
258
261
|
disabled: !e.isRecategorizable
|
|
259
262
|
});
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
-
ref:
|
|
262
|
-
className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${
|
|
263
|
+
return /* @__PURE__ */ F("li", {
|
|
264
|
+
ref: h,
|
|
265
|
+
className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${g ? "opacity-40" : ""}`,
|
|
263
266
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ F("div", {
|
|
265
268
|
className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ P("span", { children: n(e.startTime) }), /* @__PURE__ */ P("span", {
|
|
267
270
|
className: "text-text-tertiary",
|
|
268
271
|
children: t(e.durationSeconds)
|
|
269
272
|
})]
|
|
270
273
|
}),
|
|
271
|
-
e.isRecategorizable && /* @__PURE__ */
|
|
274
|
+
e.isRecategorizable && /* @__PURE__ */ P("button", {
|
|
272
275
|
type: "button",
|
|
273
276
|
"aria-label": `Drag to recategorize ${e.title || l.label}`,
|
|
274
277
|
className: "mt-1.5 shrink-0 cursor-grab touch-none text-text-tertiary hover:text-text-secondary active:cursor-grabbing",
|
|
275
|
-
...
|
|
276
|
-
...
|
|
277
|
-
children: /* @__PURE__ */
|
|
278
|
+
...p,
|
|
279
|
+
...m,
|
|
280
|
+
children: /* @__PURE__ */ P(ue, { className: "h-4 w-4" })
|
|
278
281
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ P("div", {
|
|
280
283
|
className: `mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${l.chip}`,
|
|
281
|
-
children: /* @__PURE__ */
|
|
284
|
+
children: /* @__PURE__ */ P(u, { className: "h-4 w-4" })
|
|
282
285
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ F("div", {
|
|
284
287
|
className: "min-w-0 flex-1",
|
|
285
288
|
children: [
|
|
286
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ P("p", {
|
|
287
290
|
className: "truncate text-sm font-medium text-text-primary",
|
|
288
291
|
children: e.title || l.label
|
|
289
292
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ F("div", {
|
|
291
294
|
className: "mt-1 flex flex-wrap items-center gap-2",
|
|
292
295
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ P("span", {
|
|
294
297
|
className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${l.chip}`,
|
|
295
298
|
children: l.label
|
|
296
299
|
}),
|
|
297
|
-
i !== void 0 && /* @__PURE__ */
|
|
300
|
+
i !== void 0 && /* @__PURE__ */ F("span", {
|
|
298
301
|
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",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ P(D, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ P("span", {
|
|
300
303
|
className: "truncate",
|
|
301
304
|
children: i
|
|
302
305
|
})]
|
|
303
306
|
}),
|
|
304
|
-
e.app && /* @__PURE__ */
|
|
307
|
+
e.app && /* @__PURE__ */ P("span", {
|
|
305
308
|
className: "text-xs text-text-secondary",
|
|
306
309
|
children: e.app
|
|
307
310
|
}),
|
|
308
|
-
d && (d.isAi ? /* @__PURE__ */
|
|
311
|
+
d && (d.isAi ? /* @__PURE__ */ F("span", {
|
|
309
312
|
className: "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
310
313
|
title: d.detail,
|
|
311
314
|
"data-testid": "timeline-ai-provenance",
|
|
312
315
|
children: [
|
|
313
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ P(A, {
|
|
314
317
|
className: "h-3 w-3 shrink-0",
|
|
315
318
|
"aria-hidden": !0
|
|
316
319
|
}),
|
|
317
320
|
d.label,
|
|
318
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ F("span", {
|
|
319
322
|
className: "sr-only",
|
|
320
323
|
children: [". ", d.detail]
|
|
321
324
|
})
|
|
322
325
|
]
|
|
323
|
-
}) : /* @__PURE__ */
|
|
326
|
+
}) : /* @__PURE__ */ P("span", {
|
|
324
327
|
className: "text-xs text-text-tertiary",
|
|
325
328
|
title: d.detail,
|
|
326
329
|
children: d.label
|
|
327
330
|
}))
|
|
328
331
|
]
|
|
329
332
|
}),
|
|
330
|
-
a && /* @__PURE__ */
|
|
333
|
+
a && /* @__PURE__ */ P(U, {
|
|
331
334
|
suggestion: a,
|
|
332
335
|
busy: c.busy,
|
|
333
336
|
onAccept: c.onAccept,
|
|
@@ -335,121 +338,123 @@ function _e({ segment: e, category: r, projectName: i, suggestion: a, recategori
|
|
|
335
338
|
})
|
|
336
339
|
]
|
|
337
340
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ F("div", {
|
|
339
342
|
className: "flex shrink-0 flex-col items-end gap-1.5",
|
|
340
343
|
children: [
|
|
341
|
-
e.isRecategorizable && /* @__PURE__ */
|
|
344
|
+
e.isRecategorizable && /* @__PURE__ */ P("select", {
|
|
342
345
|
"aria-label": "Recategorize activity",
|
|
343
346
|
disabled: o,
|
|
344
347
|
value: r,
|
|
345
348
|
onChange: (t) => s(e, t.target.value),
|
|
346
349
|
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",
|
|
347
|
-
children:
|
|
350
|
+
children: H.map((e) => /* @__PURE__ */ P("option", {
|
|
348
351
|
value: e,
|
|
349
|
-
children:
|
|
352
|
+
children: B[e].label
|
|
350
353
|
}, e))
|
|
351
354
|
}),
|
|
352
|
-
f && c.projects.length > 0 && /* @__PURE__ */
|
|
355
|
+
f && c.projects.length > 0 && /* @__PURE__ */ F("select", {
|
|
353
356
|
"aria-label": "Assign project",
|
|
354
357
|
disabled: c.busy,
|
|
355
358
|
value: e.projectId ?? "",
|
|
356
359
|
onChange: (t) => c.onSetProject(e, t.target.value || null),
|
|
357
360
|
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",
|
|
358
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ P("option", {
|
|
359
362
|
value: "",
|
|
360
363
|
children: "No project"
|
|
361
|
-
}), c.projects.map((e) => /* @__PURE__ */
|
|
364
|
+
}), c.projects.map((e) => /* @__PURE__ */ P("option", {
|
|
362
365
|
value: e.id,
|
|
363
366
|
children: e.name
|
|
364
367
|
}, e.id))]
|
|
365
368
|
}),
|
|
366
|
-
|
|
369
|
+
ee && /* @__PURE__ */ F("button", {
|
|
367
370
|
type: "button",
|
|
368
371
|
disabled: c.busy,
|
|
369
372
|
onClick: () => c.onSuggest(e),
|
|
370
373
|
className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline disabled:opacity-50",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
374
|
+
children: [/* @__PURE__ */ P(A, { className: "h-3 w-3" }), "Suggest project"]
|
|
372
375
|
})
|
|
373
376
|
]
|
|
374
377
|
})
|
|
375
378
|
]
|
|
376
379
|
});
|
|
377
380
|
}
|
|
378
|
-
function
|
|
381
|
+
function W(e) {
|
|
379
382
|
return e instanceof Error ? e.message : "Something went wrong";
|
|
380
383
|
}
|
|
381
|
-
function
|
|
384
|
+
function G(e) {
|
|
382
385
|
let t = e.getTimezoneOffset();
|
|
383
386
|
return (/* @__PURE__ */ new Date(e.getTime() - t * 60 * 1e3)).toISOString().slice(0, 10);
|
|
384
387
|
}
|
|
385
|
-
var
|
|
386
|
-
function
|
|
388
|
+
var K = 14;
|
|
389
|
+
function q() {
|
|
387
390
|
let e = /* @__PURE__ */ new Date();
|
|
388
|
-
return e.setDate(e.getDate() +
|
|
391
|
+
return e.setDate(e.getDate() + K), G(e);
|
|
389
392
|
}
|
|
390
|
-
function
|
|
393
|
+
function xe(e) {
|
|
391
394
|
let t = /* @__PURE__ */ new Date(`${e}T00:00:00`), n = /* @__PURE__ */ new Date(`${e}T23:59:59.999`);
|
|
392
395
|
return {
|
|
393
396
|
from: t.toISOString(),
|
|
394
397
|
to: n.toISOString()
|
|
395
398
|
};
|
|
396
399
|
}
|
|
397
|
-
function
|
|
398
|
-
let { workspaceId:
|
|
399
|
-
let e =
|
|
400
|
-
return e !== null && e <=
|
|
401
|
-
}), [E, D] =
|
|
400
|
+
function Se() {
|
|
401
|
+
let { workspaceId: g = "" } = e(), { toasts: ie, addToast: _, dismissToast: ae } = h(), [v] = de(), [y, w] = x(() => {
|
|
402
|
+
let e = ne(v.get("date"));
|
|
403
|
+
return e !== null && e <= q() ? e : G(/* @__PURE__ */ new Date());
|
|
404
|
+
}), [E, D] = x(null), { from: le, to: O } = b(() => xe(y), [y]), { data: k, loading: j, error: M, refetch: L } = s({
|
|
402
405
|
variables: {
|
|
403
|
-
from:
|
|
404
|
-
to:
|
|
406
|
+
from: le,
|
|
407
|
+
to: O
|
|
405
408
|
},
|
|
406
|
-
skip: !
|
|
409
|
+
skip: !g,
|
|
407
410
|
fetchPolicy: "cache-and-network"
|
|
408
|
-
}), { data:
|
|
411
|
+
}), { data: R } = c({
|
|
409
412
|
variables: { pagination: { limit: 200 } },
|
|
410
|
-
skip: !
|
|
411
|
-
}), [
|
|
413
|
+
skip: !g
|
|
414
|
+
}), [V, { loading: U }] = l(), [K, { loading: Se }] = o(), [Ce, { loading: we }] = u(), [Te, { loading: Ee }] = d(), [De, { loading: Oe }] = f(), ke = Se || we || Ee || Oe, Ae = ge(z(he, { activationConstraint: { distance: 6 } }), z(me)), J = k?.timeCampusTimeline, Y = b(() => J?.segments ?? [], [J]);
|
|
415
|
+
ee(!j && !!J, Y.length > 0);
|
|
416
|
+
let X = J?.summary, Z = b(() => {
|
|
412
417
|
let e = /* @__PURE__ */ new Map();
|
|
413
|
-
for (let t of
|
|
418
|
+
for (let t of R?.projects?.items ?? []) e.set(t.id, t.name);
|
|
414
419
|
return e;
|
|
415
|
-
}, [
|
|
420
|
+
}, [R?.projects?.items]), je = b(() => Array.from(Z, ([e, t]) => ({
|
|
416
421
|
id: e,
|
|
417
422
|
name: t
|
|
418
|
-
})), [Z]), Q =
|
|
423
|
+
})), [Z]), Q = b(() => se(Y, Z), [Y, Z]), Me = b(() => {
|
|
419
424
|
let e = /* @__PURE__ */ new Map();
|
|
420
425
|
for (let t of X?.byCategory ?? []) e.set(t.category, {
|
|
421
426
|
totalSeconds: t.totalSeconds,
|
|
422
427
|
segmentCount: t.segmentCount
|
|
423
428
|
});
|
|
424
429
|
return e;
|
|
425
|
-
}, [X]),
|
|
426
|
-
!e.isRecategorizable || e.category === t || (await
|
|
430
|
+
}, [X]), Ne = async (e, t) => {
|
|
431
|
+
!e.isRecategorizable || e.category === t || (await V({ variables: {
|
|
427
432
|
id: e.sourceId,
|
|
428
433
|
category: t
|
|
429
|
-
} }), await
|
|
434
|
+
} }), await L());
|
|
430
435
|
}, $ = async (e, t) => {
|
|
431
436
|
try {
|
|
432
|
-
await e(), await
|
|
437
|
+
await e(), await L(), _({
|
|
433
438
|
title: t,
|
|
434
439
|
variant: "success"
|
|
435
440
|
});
|
|
436
441
|
} catch (e) {
|
|
437
442
|
_({
|
|
438
|
-
title:
|
|
443
|
+
title: W(e),
|
|
439
444
|
variant: "error"
|
|
440
445
|
});
|
|
441
446
|
}
|
|
442
|
-
},
|
|
447
|
+
}, Pe = (e) => $(() => K({ variables: { id: e.captureEventId } }), `Assigned to ${e.projectName}`), Fe = (e) => $(() => Ce({ variables: { id: e.captureEventId } }), "Suggestion dismissed"), Ie = (e, t) => {
|
|
443
448
|
if ((e.projectId ?? null) === t) return;
|
|
444
449
|
let n = t ? Z.get(t) : void 0;
|
|
445
|
-
return $(() =>
|
|
450
|
+
return $(() => Te({ variables: {
|
|
446
451
|
id: e.sourceId,
|
|
447
452
|
projectId: t
|
|
448
453
|
} }), n ? `Assigned to ${n}` : "Project removed");
|
|
449
|
-
},
|
|
454
|
+
}, Le = async (e) => {
|
|
450
455
|
try {
|
|
451
|
-
let t = (await
|
|
452
|
-
await
|
|
456
|
+
let t = (await De({ variables: { id: e.sourceId } })).data?.suggestTimeCampusCaptureEventCategory;
|
|
457
|
+
await L(), _(t?.suggestedProjectId ? {
|
|
453
458
|
title: `Suggested ${t.suggestedProjectName ?? "a project"}`,
|
|
454
459
|
description: "Accept or dismiss it on the activity.",
|
|
455
460
|
variant: "info"
|
|
@@ -460,14 +465,14 @@ function be() {
|
|
|
460
465
|
});
|
|
461
466
|
} catch (e) {
|
|
462
467
|
_({
|
|
463
|
-
title:
|
|
468
|
+
title: W(e),
|
|
464
469
|
variant: "error"
|
|
465
470
|
});
|
|
466
471
|
}
|
|
467
|
-
},
|
|
472
|
+
}, Re = async () => {
|
|
468
473
|
let e = 0;
|
|
469
474
|
try {
|
|
470
|
-
for (let t of Q) await
|
|
475
|
+
for (let t of Q) await K({ variables: { id: t.captureEventId } }), e++;
|
|
471
476
|
_({
|
|
472
477
|
title: `Accepted ${e} project ${e === 1 ? "suggestion" : "suggestions"}`,
|
|
473
478
|
variant: "success"
|
|
@@ -475,203 +480,207 @@ function be() {
|
|
|
475
480
|
} catch (t) {
|
|
476
481
|
_({
|
|
477
482
|
title: `Accepted ${e} of ${Q.length}`,
|
|
478
|
-
description:
|
|
483
|
+
description: W(t),
|
|
479
484
|
variant: "error"
|
|
480
485
|
});
|
|
481
486
|
} finally {
|
|
482
|
-
await
|
|
487
|
+
await L();
|
|
483
488
|
}
|
|
484
|
-
},
|
|
485
|
-
projects:
|
|
486
|
-
busy:
|
|
487
|
-
onAccept: (e) => void
|
|
488
|
-
onReject: (e) => void
|
|
489
|
-
onSetProject: (e, t) => void
|
|
490
|
-
onSuggest: (e) => void
|
|
491
|
-
},
|
|
489
|
+
}, ze = {
|
|
490
|
+
projects: je,
|
|
491
|
+
busy: ke,
|
|
492
|
+
onAccept: (e) => void Pe(e),
|
|
493
|
+
onReject: (e) => void Fe(e),
|
|
494
|
+
onSetProject: (e, t) => void Ie(e, t),
|
|
495
|
+
onSuggest: (e) => void Le(e)
|
|
496
|
+
}, Be = (e) => {
|
|
492
497
|
let t = e.active.data.current?.segment;
|
|
493
498
|
D(t ?? null);
|
|
494
|
-
},
|
|
499
|
+
}, Ve = (e) => {
|
|
495
500
|
let t = e.active.data.current?.segment;
|
|
496
501
|
D(null);
|
|
497
502
|
let n = e.over?.id;
|
|
498
503
|
if (!t || typeof n != "string") return;
|
|
499
504
|
let r = n.replace(/^category:/, "");
|
|
500
|
-
|
|
501
|
-
},
|
|
502
|
-
return /* @__PURE__ */
|
|
505
|
+
H.includes(r) && Ne(t, r);
|
|
506
|
+
}, He = X && X.focusRatio != null ? Math.round(X.focusRatio * 100) : 0, Ue = X?.firstActivityAt && X?.lastActivityAt ? `${n(X.firstActivityAt)} – ${n(X.lastActivityAt)}` : null;
|
|
507
|
+
return /* @__PURE__ */ F(p, {
|
|
503
508
|
title: "Timeline",
|
|
504
509
|
description: "Your day, assembled automatically",
|
|
505
510
|
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.",
|
|
506
|
-
actions: /* @__PURE__ */
|
|
511
|
+
actions: /* @__PURE__ */ F("div", {
|
|
507
512
|
className: "flex flex-wrap items-center gap-3",
|
|
508
|
-
children: [
|
|
513
|
+
children: [Ue && /* @__PURE__ */ F("span", {
|
|
509
514
|
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",
|
|
510
|
-
children: [/* @__PURE__ */
|
|
511
|
-
}), /* @__PURE__ */
|
|
515
|
+
children: [/* @__PURE__ */ P(S, { className: "h-3.5 w-3.5" }), Ue]
|
|
516
|
+
}), /* @__PURE__ */ F("label", {
|
|
512
517
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
513
|
-
children: [/* @__PURE__ */
|
|
518
|
+
children: [/* @__PURE__ */ P(ce, { className: "h-4 w-4" }), /* @__PURE__ */ P("input", {
|
|
514
519
|
type: "date",
|
|
515
|
-
value:
|
|
516
|
-
max:
|
|
520
|
+
value: y,
|
|
521
|
+
max: q(),
|
|
517
522
|
onChange: (e) => w(e.target.value),
|
|
518
523
|
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"
|
|
519
524
|
})]
|
|
520
525
|
})]
|
|
521
526
|
}),
|
|
522
|
-
children: [
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
variant: "card",
|
|
526
|
-
count: 4
|
|
527
|
-
}), /* @__PURE__ */ F(i, {
|
|
528
|
-
variant: "list",
|
|
529
|
-
count: 6
|
|
530
|
-
})]
|
|
531
|
-
}) : N ? /* @__PURE__ */ F("div", {
|
|
532
|
-
className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
|
|
533
|
-
children: "Failed to load your timeline. Please try again later."
|
|
534
|
-
}) : /* @__PURE__ */ I(le, {
|
|
535
|
-
sensors: Oe,
|
|
536
|
-
onDragStart: Re,
|
|
537
|
-
onDragEnd: ze,
|
|
538
|
-
children: [/* @__PURE__ */ I("div", {
|
|
527
|
+
children: [
|
|
528
|
+
/* @__PURE__ */ P(te, { path: y === G(/* @__PURE__ */ new Date()) ? "/mobile/timeline" : `/mobile/timeline?date=${y}` }),
|
|
529
|
+
j && !J ? /* @__PURE__ */ F("div", {
|
|
539
530
|
className: "space-y-6",
|
|
540
|
-
children: [
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
className: "mb-4 flex items-start gap-1.5 text-xs text-text-secondary",
|
|
585
|
-
"data-testid": "timeline-ai-disclaimer",
|
|
586
|
-
children: [/* @__PURE__ */ F(j, {
|
|
587
|
-
className: "mt-0.5 h-3 w-3 shrink-0",
|
|
588
|
-
"aria-hidden": !0
|
|
589
|
-
}), /* @__PURE__ */ I("span", { children: [
|
|
590
|
-
"Some activities here were categorized by AI.",
|
|
591
|
-
" ",
|
|
592
|
-
"AI can get this wrong. Pick another category to correct it, and TimeCampus will use your choice for this app from now on."
|
|
593
|
-
] })]
|
|
594
|
-
}),
|
|
595
|
-
/* @__PURE__ */ F("div", {
|
|
596
|
-
className: "flex flex-wrap gap-4",
|
|
597
|
-
children: U.map((e) => {
|
|
598
|
-
let t = V[e], n = Ae.get(e);
|
|
599
|
-
return /* @__PURE__ */ F(ge, {
|
|
600
|
-
category: e,
|
|
601
|
-
label: t.label,
|
|
602
|
-
dotClassName: t.dot,
|
|
603
|
-
totalSeconds: n?.totalSeconds ?? 0
|
|
604
|
-
}, e);
|
|
531
|
+
children: [/* @__PURE__ */ P(i, {
|
|
532
|
+
variant: "card",
|
|
533
|
+
count: 4
|
|
534
|
+
}), /* @__PURE__ */ P(i, {
|
|
535
|
+
variant: "list",
|
|
536
|
+
count: 6
|
|
537
|
+
})]
|
|
538
|
+
}) : M ? /* @__PURE__ */ P("div", {
|
|
539
|
+
className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
|
|
540
|
+
children: "Failed to load your timeline. Please try again later."
|
|
541
|
+
}) : /* @__PURE__ */ F(fe, {
|
|
542
|
+
sensors: Ae,
|
|
543
|
+
onDragStart: Be,
|
|
544
|
+
onDragEnd: Ve,
|
|
545
|
+
children: [/* @__PURE__ */ F("div", {
|
|
546
|
+
className: "space-y-6",
|
|
547
|
+
children: [
|
|
548
|
+
/* @__PURE__ */ F("div", {
|
|
549
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
550
|
+
children: [
|
|
551
|
+
/* @__PURE__ */ P(r, {
|
|
552
|
+
featured: !0,
|
|
553
|
+
title: "Tracked time",
|
|
554
|
+
value: t(X?.totalTrackedSeconds ?? 0),
|
|
555
|
+
icon: /* @__PURE__ */ P(S, { className: "h-5 w-5" }),
|
|
556
|
+
description: "Total activity across the day"
|
|
557
|
+
}),
|
|
558
|
+
/* @__PURE__ */ P(r, {
|
|
559
|
+
title: "Focus ratio",
|
|
560
|
+
value: `${He}%`,
|
|
561
|
+
icon: /* @__PURE__ */ P(C, { className: "h-5 w-5" }),
|
|
562
|
+
description: "Share of time in deep work"
|
|
563
|
+
}),
|
|
564
|
+
/* @__PURE__ */ P(r, {
|
|
565
|
+
title: "Context switches",
|
|
566
|
+
value: X?.contextSwitches ?? 0,
|
|
567
|
+
icon: /* @__PURE__ */ P(N, { className: "h-5 w-5" }),
|
|
568
|
+
description: "Category changes through the day"
|
|
569
|
+
}),
|
|
570
|
+
/* @__PURE__ */ P(r, {
|
|
571
|
+
title: "Longest focus block",
|
|
572
|
+
value: t(X?.longestFocusBlockSeconds ?? 0),
|
|
573
|
+
icon: /* @__PURE__ */ P(C, { className: "h-5 w-5" }),
|
|
574
|
+
description: "Your deepest uninterrupted stretch"
|
|
605
575
|
})
|
|
576
|
+
]
|
|
577
|
+
}),
|
|
578
|
+
Y.length > 0 && /* @__PURE__ */ F(I, {
|
|
579
|
+
treatment: "glass",
|
|
580
|
+
className: "p-4 sm:p-6",
|
|
581
|
+
children: [
|
|
582
|
+
/* @__PURE__ */ P("h2", {
|
|
583
|
+
className: "mb-1 text-sm font-semibold text-text-primary",
|
|
584
|
+
children: "Where the time went"
|
|
585
|
+
}),
|
|
586
|
+
/* @__PURE__ */ P("p", {
|
|
587
|
+
className: "mb-4 text-xs text-text-secondary",
|
|
588
|
+
children: "Drag a segment from the timeline below onto a category to recategorize it — or use its dropdown."
|
|
589
|
+
}),
|
|
590
|
+
re(Y) && /* @__PURE__ */ F("p", {
|
|
591
|
+
className: "mb-4 flex items-start gap-1.5 text-xs text-text-secondary",
|
|
592
|
+
"data-testid": "timeline-ai-disclaimer",
|
|
593
|
+
children: [/* @__PURE__ */ P(A, {
|
|
594
|
+
className: "mt-0.5 h-3 w-3 shrink-0",
|
|
595
|
+
"aria-hidden": !0
|
|
596
|
+
}), /* @__PURE__ */ F("span", { children: [
|
|
597
|
+
"Some activities here were categorized by AI.",
|
|
598
|
+
" ",
|
|
599
|
+
"AI can get this wrong. Pick another category to correct it, and TimeCampus will use your choice for this app from now on."
|
|
600
|
+
] })]
|
|
601
|
+
}),
|
|
602
|
+
/* @__PURE__ */ P("div", {
|
|
603
|
+
className: "flex flex-wrap gap-4",
|
|
604
|
+
children: H.map((e) => {
|
|
605
|
+
let t = B[e], n = Me.get(e);
|
|
606
|
+
return /* @__PURE__ */ P(ye, {
|
|
607
|
+
category: e,
|
|
608
|
+
label: t.label,
|
|
609
|
+
dotClassName: t.dot,
|
|
610
|
+
totalSeconds: n?.totalSeconds ?? 0
|
|
611
|
+
}, e);
|
|
612
|
+
})
|
|
613
|
+
})
|
|
614
|
+
]
|
|
615
|
+
}),
|
|
616
|
+
Q.length > 0 && /* @__PURE__ */ F("div", {
|
|
617
|
+
className: "flex flex-wrap items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken/40 px-4 py-3",
|
|
618
|
+
"data-testid": "timeline-suggestions-banner",
|
|
619
|
+
children: [
|
|
620
|
+
/* @__PURE__ */ P(A, { className: "h-4 w-4 shrink-0 text-primary" }),
|
|
621
|
+
/* @__PURE__ */ F("p", {
|
|
622
|
+
className: "text-sm text-text-secondary",
|
|
623
|
+
children: [
|
|
624
|
+
/* @__PURE__ */ F("span", {
|
|
625
|
+
className: "font-medium text-text-primary",
|
|
626
|
+
children: [
|
|
627
|
+
Q.length,
|
|
628
|
+
" project",
|
|
629
|
+
" ",
|
|
630
|
+
Q.length === 1 ? "suggestion" : "suggestions"
|
|
631
|
+
]
|
|
632
|
+
}),
|
|
633
|
+
" ",
|
|
634
|
+
"waiting for review. Nothing is assigned until you accept."
|
|
635
|
+
]
|
|
636
|
+
}),
|
|
637
|
+
/* @__PURE__ */ F("button", {
|
|
638
|
+
type: "button",
|
|
639
|
+
disabled: ke,
|
|
640
|
+
onClick: () => void Re(),
|
|
641
|
+
className: "ml-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",
|
|
642
|
+
children: [/* @__PURE__ */ P(T, { className: "h-3.5 w-3.5" }), "Accept all"]
|
|
643
|
+
})
|
|
644
|
+
]
|
|
645
|
+
}),
|
|
646
|
+
Y.length === 0 ? /* @__PURE__ */ P(a, {
|
|
647
|
+
illustration: "empty-generic",
|
|
648
|
+
title: "No activity captured for this day",
|
|
649
|
+
description: "As you track time, hold meetings, run focus sessions, and connect shared integrations, your day assembles here automatically — categorized and in order."
|
|
650
|
+
}) : /* @__PURE__ */ P(I, {
|
|
651
|
+
treatment: "glass",
|
|
652
|
+
glow: !0,
|
|
653
|
+
className: "overflow-hidden",
|
|
654
|
+
children: /* @__PURE__ */ P("ol", {
|
|
655
|
+
className: "divide-y divide-border-seam",
|
|
656
|
+
children: Y.map((e) => _e(e) ? /* @__PURE__ */ P(ve, { segment: e }, e.id) : /* @__PURE__ */ P(be, {
|
|
657
|
+
segment: e,
|
|
658
|
+
category: e.category ?? "OTHER",
|
|
659
|
+
projectName: e.projectId ? Z.get(e.projectId) : void 0,
|
|
660
|
+
suggestion: oe(e, Z),
|
|
661
|
+
recategorizing: U,
|
|
662
|
+
onRecategorize: Ne,
|
|
663
|
+
projectActions: ze
|
|
664
|
+
}, e.id))
|
|
606
665
|
})
|
|
607
|
-
]
|
|
608
|
-
}),
|
|
609
|
-
Q.length > 0 && /* @__PURE__ */ I("div", {
|
|
610
|
-
className: "flex flex-wrap items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken/40 px-4 py-3",
|
|
611
|
-
"data-testid": "timeline-suggestions-banner",
|
|
612
|
-
children: [
|
|
613
|
-
/* @__PURE__ */ F(j, { className: "h-4 w-4 shrink-0 text-primary" }),
|
|
614
|
-
/* @__PURE__ */ I("p", {
|
|
615
|
-
className: "text-sm text-text-secondary",
|
|
616
|
-
children: [
|
|
617
|
-
/* @__PURE__ */ I("span", {
|
|
618
|
-
className: "font-medium text-text-primary",
|
|
619
|
-
children: [
|
|
620
|
-
Q.length,
|
|
621
|
-
" project",
|
|
622
|
-
" ",
|
|
623
|
-
Q.length === 1 ? "suggestion" : "suggestions"
|
|
624
|
-
]
|
|
625
|
-
}),
|
|
626
|
-
" ",
|
|
627
|
-
"waiting for review. Nothing is assigned until you accept."
|
|
628
|
-
]
|
|
629
|
-
}),
|
|
630
|
-
/* @__PURE__ */ I("button", {
|
|
631
|
-
type: "button",
|
|
632
|
-
disabled: De,
|
|
633
|
-
onClick: () => void Ie(),
|
|
634
|
-
className: "ml-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",
|
|
635
|
-
children: [/* @__PURE__ */ F(T, { className: "h-3.5 w-3.5" }), "Accept all"]
|
|
636
|
-
})
|
|
637
|
-
]
|
|
638
|
-
}),
|
|
639
|
-
Y.length === 0 ? /* @__PURE__ */ F(a, {
|
|
640
|
-
illustration: "empty-generic",
|
|
641
|
-
title: "No activity captured for this day",
|
|
642
|
-
description: "As you track time, hold meetings, run focus sessions, and connect shared integrations, your day assembles here automatically — categorized and in order."
|
|
643
|
-
}) : /* @__PURE__ */ F(L, {
|
|
644
|
-
treatment: "glass",
|
|
645
|
-
glow: !0,
|
|
646
|
-
className: "overflow-hidden",
|
|
647
|
-
children: /* @__PURE__ */ F("ol", {
|
|
648
|
-
className: "divide-y divide-border-seam",
|
|
649
|
-
children: Y.map((e) => me(e) ? /* @__PURE__ */ F(he, { segment: e }, e.id) : /* @__PURE__ */ F(_e, {
|
|
650
|
-
segment: e,
|
|
651
|
-
category: e.category ?? "OTHER",
|
|
652
|
-
projectName: e.projectId ? Z.get(e.projectId) : void 0,
|
|
653
|
-
suggestion: re(e, Z),
|
|
654
|
-
recategorizing: W,
|
|
655
|
-
onRecategorize: je,
|
|
656
|
-
projectActions: Le
|
|
657
|
-
}, e.id))
|
|
658
666
|
})
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
})]
|
|
667
|
-
})
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
667
|
+
]
|
|
668
|
+
}), /* @__PURE__ */ P(pe, { children: E && /* @__PURE__ */ F("div", {
|
|
669
|
+
className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface px-3 py-2 shadow-pop",
|
|
670
|
+
children: [/* @__PURE__ */ P(ue, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ P("span", {
|
|
671
|
+
className: "text-sm font-medium text-text-primary",
|
|
672
|
+
children: E.title || B[E.category ?? "OTHER"].label
|
|
673
|
+
})]
|
|
674
|
+
}) })]
|
|
675
|
+
}),
|
|
676
|
+
/* @__PURE__ */ P(m, {
|
|
677
|
+
toasts: ie,
|
|
678
|
+
onDismiss: ae
|
|
679
|
+
})
|
|
680
|
+
]
|
|
672
681
|
});
|
|
673
682
|
}
|
|
674
683
|
//#endregion
|
|
675
|
-
export {
|
|
684
|
+
export { Se as TimelinePage };
|
|
676
685
|
|
|
677
686
|
//# sourceMappingURL=TimelinePage.js.map
|