@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
|
@@ -11,14 +11,14 @@ import { DAY_MS as s, announceFocusChange as ge, calendarHoldLabel as _e, calend
|
|
|
11
11
|
import { useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
12
12
|
import { AlarmClock as je, Ban as p, CalendarClock as Me, Check as Ne, Play as m, Shield as h, ShieldCheck as Pe, Square as Fe, Target as g, X as Ie } from "lucide-react";
|
|
13
13
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
14
|
-
import { GlassCard as Le } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { GlassCard as Le, ThemedSelect as b } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
// src/timecampus/pages/focus/FocusProtectionPage.tsx
|
|
16
|
-
var
|
|
16
|
+
var x = "Focus Protection", S = "Adaptive focus blocks and distraction blocking during focus sessions", Re = [
|
|
17
17
|
"GetActiveFocusSession",
|
|
18
18
|
"GetFocusBlockSuggestions",
|
|
19
19
|
"ListFocusBlocks",
|
|
20
20
|
"GetFocusProtectionSummary"
|
|
21
|
-
],
|
|
21
|
+
], C = "rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm text-text-primary", w = "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50", T = "inline-flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-surface-hover disabled:opacity-50", E = {
|
|
22
22
|
on: "on",
|
|
23
23
|
off: "off",
|
|
24
24
|
running: "on",
|
|
@@ -27,94 +27,94 @@ var b = "Focus Protection", x = "Adaptive focus blocks and distraction blocking
|
|
|
27
27
|
"needs-setup": "needs a one-time setup",
|
|
28
28
|
error: "not working"
|
|
29
29
|
};
|
|
30
|
-
function E(e) {
|
|
31
|
-
return T[e] ?? e;
|
|
32
|
-
}
|
|
33
30
|
function D(e) {
|
|
31
|
+
return E[e] ?? e;
|
|
32
|
+
}
|
|
33
|
+
function O(e) {
|
|
34
34
|
return e instanceof Error ? e.message : "Something went wrong";
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
let { workspaceId:
|
|
36
|
+
function k() {
|
|
37
|
+
let { workspaceId: E = "" } = re(), { toasts: k, addToast: A, dismissToast: ze } = ne(), [j, Be] = f(0), [M, Ve] = f(() => Date.now());
|
|
38
38
|
l(() => {
|
|
39
39
|
let e = window.setInterval(() => Ve(Date.now()), 6e4);
|
|
40
40
|
return () => window.clearInterval(e);
|
|
41
41
|
}, []);
|
|
42
|
-
let
|
|
42
|
+
let N = u(() => xe(/* @__PURE__ */ new Date(), j), [j]), He = u(() => new Date(N.getTime() + s), [N]), Ue = u(() => {
|
|
43
43
|
let e = /* @__PURE__ */ new Date();
|
|
44
44
|
return {
|
|
45
45
|
from: (/* @__PURE__ */ new Date(e.getTime() - 7 * s)).toISOString(),
|
|
46
46
|
to: e.toISOString()
|
|
47
47
|
};
|
|
48
|
-
}, []),
|
|
49
|
-
variables: { dayStart:
|
|
50
|
-
skip: !
|
|
51
|
-
}),
|
|
48
|
+
}, []), P = oe({ skip: !E }), F = se({
|
|
49
|
+
variables: { dayStart: N.toISOString() },
|
|
50
|
+
skip: !E
|
|
51
|
+
}), I = de({
|
|
52
52
|
variables: {
|
|
53
|
-
from:
|
|
53
|
+
from: N.toISOString(),
|
|
54
54
|
to: He.toISOString()
|
|
55
55
|
},
|
|
56
|
-
skip: !
|
|
57
|
-
}),
|
|
56
|
+
skip: !E
|
|
57
|
+
}), L = le({ skip: !E }), We = ce({ skip: !E }), Ge = ue({
|
|
58
58
|
variables: Ue,
|
|
59
|
-
skip: !
|
|
60
|
-
}),
|
|
59
|
+
skip: !E
|
|
60
|
+
}), R = { refetchQueries: Re }, [z, { loading: B }] = me(R), [Ke, { loading: qe }] = ae(R), [Je] = fe(R), [Ye, { loading: V }] = pe(R), [Xe] = ie(R), [Ze, { loading: Qe }] = he({ refetchQueries: [
|
|
61
61
|
"GetFocusPreferences",
|
|
62
62
|
"GetFocusBlockSuggestions",
|
|
63
63
|
"GetFocusCalendarConnection"
|
|
64
|
-
] }), [$e, et] = f(50), [tt, nt] = f(!1),
|
|
64
|
+
] }), [$e, et] = f(50), [tt, nt] = f(!1), H = L.data?.timeCampusFocusPreferences, [rt, it] = f("09:00"), [U, at] = f("18:00"), [W, ot] = f(90), [st, ct] = f(2), [lt, ut] = f(10), [dt, ft] = f(!0), [pt, mt] = f(""), [ht, gt] = f(""), [_t, vt] = f(!0), [yt, bt] = f(!0), [G, xt] = f(5), K = e();
|
|
65
65
|
l(() => {
|
|
66
|
-
|
|
67
|
-
}, [
|
|
68
|
-
let
|
|
69
|
-
async function
|
|
66
|
+
H && (it(Ce(H.workdayStartMinute)), at(Ce(H.workdayEndMinute)), ot(H.preferredBlockMinutes), ct(H.maxBlocksPerDay), ut(H.meetingBufferMinutes), ft(H.blockingEnabled), mt(H.blockedDomains.join("\n")), gt(H.blockedApps.join("\n")), vt(H.doNotDisturb), bt(H.calendarHoldEnabled), xt(H.startNudgeMinutes));
|
|
67
|
+
}, [H]);
|
|
68
|
+
let q = P.data?.timeCampusActiveFocusSession ?? null, St = F.data?.timeCampusFocusBlockSuggestions ?? [], Ct = I.data?.timeCampusFocusBlocks ?? [], J = Ge.data?.timeCampusFocusSummary, Y = We.data?.timeCampusFocusCalendarConnection, wt = ve(Y?.provider), Tt = !P.data && P.loading || !L.data && L.loading, Et = P.error ?? L.error;
|
|
69
|
+
async function X(e, t) {
|
|
70
70
|
try {
|
|
71
|
-
await e(), ge(),
|
|
71
|
+
await e(), ge(), A({
|
|
72
72
|
title: t,
|
|
73
73
|
variant: "success"
|
|
74
74
|
});
|
|
75
75
|
} catch (e) {
|
|
76
|
-
|
|
77
|
-
title:
|
|
76
|
+
A({
|
|
77
|
+
title: O(e),
|
|
78
78
|
variant: "error"
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
let Dt = (e) =>
|
|
82
|
+
let Dt = (e) => X(() => z({ variables: {
|
|
83
83
|
plannedDurationSeconds: e ? void 0 : $e * 60,
|
|
84
84
|
protectionLevel: tt ? a.Strict : a.Standard,
|
|
85
85
|
focusBlockId: e
|
|
86
|
-
} }), "Focus session started"),
|
|
86
|
+
} }), "Focus session started"), Z = d(!1), Ot = d(() => void 0);
|
|
87
87
|
l(() => {
|
|
88
|
-
|
|
89
|
-
t ?
|
|
88
|
+
Ot.current = (e, t) => {
|
|
89
|
+
t ? A({
|
|
90
90
|
title: "A focus session is already running",
|
|
91
91
|
variant: "info"
|
|
92
|
-
}) :
|
|
92
|
+
}) : X(() => z({ variables: { focusBlockId: e } }), "Focus block started");
|
|
93
93
|
};
|
|
94
94
|
}), l(() => {
|
|
95
|
-
if (
|
|
95
|
+
if (Z.current || !E || !P.data) return;
|
|
96
96
|
let e = Ee(window.location.search);
|
|
97
|
-
e && (
|
|
98
|
-
}, [
|
|
99
|
-
let kt = (e) =>
|
|
100
|
-
id:
|
|
97
|
+
e && (Z.current = !0, window.history.replaceState(window.history.state, "", Ae(window.location.href)), Ot.current(e, !!P.data.timeCampusActiveFocusSession));
|
|
98
|
+
}, [E, P.data]);
|
|
99
|
+
let kt = (e) => q ? X(() => Ke({ variables: {
|
|
100
|
+
id: q.id,
|
|
101
101
|
status: e
|
|
102
|
-
} }), e === o.Completed ? "Focus session completed" : "Focus session abandoned") : void 0,
|
|
102
|
+
} }), e === o.Completed ? "Focus session completed" : "Focus session abandoned") : void 0, Q = (e, t) => X(() => Ye({ variables: { input: {
|
|
103
103
|
startTime: e.startTime,
|
|
104
104
|
endTime: e.endTime,
|
|
105
105
|
response: t,
|
|
106
|
-
dayStart:
|
|
106
|
+
dayStart: N.toISOString(),
|
|
107
107
|
snoozeMinutes: t === i.Snooze ? 30 : null
|
|
108
108
|
} } }), t === i.Accept ? "Focus block scheduled" : t === i.Snooze ? "Snoozed for 30 minutes" : "Suggestion dismissed"), At = () => {
|
|
109
|
-
let e = ke(rt), t = ke(
|
|
110
|
-
e === null || t === null ?
|
|
109
|
+
let e = ke(rt), t = ke(U);
|
|
110
|
+
e === null || t === null ? A({
|
|
111
111
|
title: "Use HH:MM for the workday",
|
|
112
112
|
variant: "error"
|
|
113
|
-
}) :
|
|
113
|
+
}) : X(() => Ze({ variables: { input: {
|
|
114
114
|
workdayStartMinute: e,
|
|
115
115
|
workdayEndMinute: t,
|
|
116
|
-
preferredBlockMinutes:
|
|
117
|
-
minBlockMinutes: Math.min(45,
|
|
116
|
+
preferredBlockMinutes: W,
|
|
117
|
+
minBlockMinutes: Math.min(45, W),
|
|
118
118
|
maxBlocksPerDay: st,
|
|
119
119
|
meetingBufferMinutes: lt,
|
|
120
120
|
blockingEnabled: dt,
|
|
@@ -122,33 +122,33 @@ function O() {
|
|
|
122
122
|
blockedApps: we(ht),
|
|
123
123
|
doNotDisturb: _t,
|
|
124
124
|
calendarHoldEnabled: yt,
|
|
125
|
-
startNudgeMinutes:
|
|
125
|
+
startNudgeMinutes: G
|
|
126
126
|
} } }), "Focus settings saved");
|
|
127
127
|
};
|
|
128
128
|
if (Tt) return /* @__PURE__ */ v(t, {
|
|
129
|
-
title:
|
|
130
|
-
description:
|
|
129
|
+
title: x,
|
|
130
|
+
description: S,
|
|
131
131
|
children: /* @__PURE__ */ v(ee, {
|
|
132
132
|
variant: "card",
|
|
133
133
|
count: 4
|
|
134
134
|
})
|
|
135
135
|
});
|
|
136
|
-
if (Et && !
|
|
137
|
-
title:
|
|
138
|
-
description:
|
|
136
|
+
if (Et && !P.data) return /* @__PURE__ */ v(t, {
|
|
137
|
+
title: x,
|
|
138
|
+
description: S,
|
|
139
139
|
children: /* @__PURE__ */ v("div", {
|
|
140
140
|
className: "rounded-xl border border-status-error-border/50 bg-status-error-bg/10 p-4 text-sm text-status-error-text",
|
|
141
141
|
children: "Failed to load focus protection. Please try again later."
|
|
142
142
|
})
|
|
143
143
|
});
|
|
144
|
-
let
|
|
144
|
+
let $ = q ? Se(q.startTime, q.plannedDurationSeconds, M) : null, jt = J ? Math.round(J.averageProtectionRatio * 100) : null;
|
|
145
145
|
return /* @__PURE__ */ y(t, {
|
|
146
|
-
title:
|
|
147
|
-
description:
|
|
146
|
+
title: x,
|
|
147
|
+
description: S,
|
|
148
148
|
purpose: "Protect the hours that matter: TimeCampus suggests focus blocks around your meetings and the times you focus best, and blocks distracting sites in your browser, and in the desktop app turns on Do Not Disturb and hides distracting apps while a session runs.",
|
|
149
149
|
children: [
|
|
150
150
|
/* @__PURE__ */ v(te, {
|
|
151
|
-
toasts:
|
|
151
|
+
toasts: k,
|
|
152
152
|
onDismiss: ze
|
|
153
153
|
}),
|
|
154
154
|
/* @__PURE__ */ y("div", {
|
|
@@ -157,25 +157,25 @@ function O() {
|
|
|
157
157
|
/* @__PURE__ */ v(n, {
|
|
158
158
|
featured: !0,
|
|
159
159
|
title: "Protected Time",
|
|
160
|
-
value:
|
|
160
|
+
value: J ? c(J.totalProtectedSeconds) : "--",
|
|
161
161
|
icon: /* @__PURE__ */ v(Pe, { className: "h-5 w-5" }),
|
|
162
162
|
description: "Last 7 days"
|
|
163
163
|
}),
|
|
164
164
|
/* @__PURE__ */ v(n, {
|
|
165
165
|
title: "Protection Ratio",
|
|
166
|
-
value:
|
|
166
|
+
value: jt === null ? "--" : `${jt}%`,
|
|
167
167
|
icon: /* @__PURE__ */ v(h, { className: "h-5 w-5" }),
|
|
168
168
|
description: "Protected vs interrupted"
|
|
169
169
|
}),
|
|
170
170
|
/* @__PURE__ */ v(n, {
|
|
171
171
|
title: "Sessions",
|
|
172
|
-
value:
|
|
172
|
+
value: J ? String(J.totalSessions) : "--",
|
|
173
173
|
icon: /* @__PURE__ */ v(g, { className: "h-5 w-5" }),
|
|
174
|
-
description:
|
|
174
|
+
description: J ? `${J.completedSessions} completed` : "Last 7 days"
|
|
175
175
|
}),
|
|
176
176
|
/* @__PURE__ */ v(n, {
|
|
177
177
|
title: "Interruptions",
|
|
178
|
-
value:
|
|
178
|
+
value: J ? String(J.totalInterruptionCount) : "--",
|
|
179
179
|
icon: /* @__PURE__ */ v(p, { className: "h-5 w-5" }),
|
|
180
180
|
description: "Logged, detected or bypassed"
|
|
181
181
|
})
|
|
@@ -193,35 +193,35 @@ function O() {
|
|
|
193
193
|
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("h3", {
|
|
194
194
|
className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
195
195
|
children: [/* @__PURE__ */ v(h, { className: "h-4 w-4" }), "Focus session"]
|
|
196
|
-
}),
|
|
196
|
+
}), q ? /* @__PURE__ */ y("p", {
|
|
197
197
|
className: "mt-1 text-sm text-text-secondary",
|
|
198
198
|
"data-testid": "focus-session-status",
|
|
199
199
|
children: [
|
|
200
|
-
|
|
200
|
+
$ === null ? "Open-ended session in progress." : $ === 0 ? "Planned time is up — finish when you're ready." : `${$} minute${$ === 1 ? "" : "s"} left.`,
|
|
201
201
|
" ",
|
|
202
|
-
|
|
202
|
+
q.interruptionCount,
|
|
203
203
|
" interruption",
|
|
204
|
-
|
|
204
|
+
q.interruptionCount === 1 ? "" : "s",
|
|
205
205
|
",",
|
|
206
206
|
" ",
|
|
207
|
-
|
|
207
|
+
q.blockedAttemptCount,
|
|
208
208
|
" distraction",
|
|
209
|
-
|
|
209
|
+
q.blockedAttemptCount === 1 ? "" : "s",
|
|
210
210
|
" blocked."
|
|
211
211
|
]
|
|
212
212
|
}) : /* @__PURE__ */ v("p", {
|
|
213
213
|
className: "mt-1 text-sm text-text-secondary",
|
|
214
214
|
children: "No session running. While one is active, the TimeCampus browser extension blocks the sites listed below and the TimeCampus desktop app hides or flags the apps listed below."
|
|
215
|
-
})] }),
|
|
216
|
-
variant:
|
|
217
|
-
label:
|
|
215
|
+
})] }), q && /* @__PURE__ */ v(r, {
|
|
216
|
+
variant: q.protectionLevel === a.Strict ? "warning" : "success",
|
|
217
|
+
label: q.protectionLevel === a.Strict ? "Strict" : "Standard"
|
|
218
218
|
})]
|
|
219
219
|
}), /* @__PURE__ */ v("div", {
|
|
220
220
|
className: "mt-4 flex flex-wrap items-center gap-3",
|
|
221
|
-
children:
|
|
221
|
+
children: q ? /* @__PURE__ */ y(_, { children: [
|
|
222
222
|
/* @__PURE__ */ y("button", {
|
|
223
223
|
type: "button",
|
|
224
|
-
className:
|
|
224
|
+
className: w,
|
|
225
225
|
disabled: qe,
|
|
226
226
|
onClick: () => kt(o.Completed),
|
|
227
227
|
"data-testid": "focus-end",
|
|
@@ -229,23 +229,23 @@ function O() {
|
|
|
229
229
|
}),
|
|
230
230
|
/* @__PURE__ */ v("button", {
|
|
231
231
|
type: "button",
|
|
232
|
-
className:
|
|
232
|
+
className: T,
|
|
233
233
|
disabled: qe,
|
|
234
234
|
onClick: () => kt(o.Abandoned),
|
|
235
235
|
children: "Abandon"
|
|
236
236
|
}),
|
|
237
237
|
/* @__PURE__ */ v("button", {
|
|
238
238
|
type: "button",
|
|
239
|
-
className:
|
|
240
|
-
onClick: () =>
|
|
239
|
+
className: T,
|
|
240
|
+
onClick: () => X(() => Je({ variables: { focusSessionId: q.id } }), "Interruption logged"),
|
|
241
241
|
"data-testid": "focus-log-interruption",
|
|
242
242
|
children: "Log an interruption"
|
|
243
243
|
})
|
|
244
244
|
] }) : /* @__PURE__ */ y(_, { children: [
|
|
245
245
|
/* @__PURE__ */ y("label", {
|
|
246
246
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
247
|
-
children: ["Length", /* @__PURE__ */ y(
|
|
248
|
-
className:
|
|
247
|
+
children: ["Length", /* @__PURE__ */ y(b, {
|
|
248
|
+
className: C,
|
|
249
249
|
value: $e,
|
|
250
250
|
onChange: (e) => et(Number(e.target.value)),
|
|
251
251
|
"data-testid": "focus-length",
|
|
@@ -280,8 +280,8 @@ function O() {
|
|
|
280
280
|
}),
|
|
281
281
|
/* @__PURE__ */ y("button", {
|
|
282
282
|
type: "button",
|
|
283
|
-
className:
|
|
284
|
-
disabled:
|
|
283
|
+
className: w,
|
|
284
|
+
disabled: B,
|
|
285
285
|
onClick: () => Dt(),
|
|
286
286
|
"data-testid": "focus-start",
|
|
287
287
|
children: [/* @__PURE__ */ v(m, { className: "h-4 w-4" }), " Start focus session"]
|
|
@@ -307,8 +307,8 @@ function O() {
|
|
|
307
307
|
"aria-label": "Day to plan",
|
|
308
308
|
children: ["Today", "Tomorrow"].map((e, t) => /* @__PURE__ */ v("button", {
|
|
309
309
|
type: "button",
|
|
310
|
-
"aria-pressed":
|
|
311
|
-
className:
|
|
310
|
+
"aria-pressed": j === t,
|
|
311
|
+
className: j === t ? w : T,
|
|
312
312
|
onClick: () => Be(t),
|
|
313
313
|
children: e
|
|
314
314
|
}, e))
|
|
@@ -321,17 +321,17 @@ function O() {
|
|
|
321
321
|
/* @__PURE__ */ y("div", {
|
|
322
322
|
className: "mt-4 space-y-3",
|
|
323
323
|
children: [
|
|
324
|
-
|
|
324
|
+
F.error && /* @__PURE__ */ v("p", {
|
|
325
325
|
className: "text-sm text-status-error-text",
|
|
326
|
-
children:
|
|
326
|
+
children: O(F.error)
|
|
327
327
|
}),
|
|
328
|
-
!
|
|
328
|
+
!F.error && F.data && St.length === 0 && /* @__PURE__ */ y("p", {
|
|
329
329
|
className: "text-sm text-text-secondary",
|
|
330
330
|
"data-testid": "focus-suggestions-empty",
|
|
331
331
|
children: [
|
|
332
332
|
"No free window left for",
|
|
333
333
|
" ",
|
|
334
|
-
|
|
334
|
+
j === 0 ? "today" : "tomorrow",
|
|
335
335
|
" — your day is full or you have scheduled your maximum blocks."
|
|
336
336
|
]
|
|
337
337
|
}),
|
|
@@ -368,25 +368,25 @@ function O() {
|
|
|
368
368
|
children: [
|
|
369
369
|
/* @__PURE__ */ y("button", {
|
|
370
370
|
type: "button",
|
|
371
|
-
className:
|
|
372
|
-
disabled:
|
|
373
|
-
onClick: () =>
|
|
371
|
+
className: w,
|
|
372
|
+
disabled: V,
|
|
373
|
+
onClick: () => Q(e, i.Accept),
|
|
374
374
|
"data-testid": "focus-suggestion-accept",
|
|
375
375
|
children: [/* @__PURE__ */ v(Ne, { className: "h-4 w-4" }), " Accept"]
|
|
376
376
|
}),
|
|
377
377
|
/* @__PURE__ */ y("button", {
|
|
378
378
|
type: "button",
|
|
379
|
-
className:
|
|
380
|
-
disabled:
|
|
381
|
-
onClick: () =>
|
|
379
|
+
className: T,
|
|
380
|
+
disabled: V,
|
|
381
|
+
onClick: () => Q(e, i.Snooze),
|
|
382
382
|
"data-testid": "focus-suggestion-snooze",
|
|
383
383
|
children: [/* @__PURE__ */ v(je, { className: "h-4 w-4" }), " Snooze 30 min"]
|
|
384
384
|
}),
|
|
385
385
|
/* @__PURE__ */ y("button", {
|
|
386
386
|
type: "button",
|
|
387
|
-
className:
|
|
388
|
-
disabled:
|
|
389
|
-
onClick: () =>
|
|
387
|
+
className: T,
|
|
388
|
+
disabled: V,
|
|
389
|
+
onClick: () => Q(e, i.Dismiss),
|
|
390
390
|
"data-testid": "focus-suggestion-dismiss",
|
|
391
391
|
children: [/* @__PURE__ */ v(Ie, { className: "h-4 w-4" }), " Dismiss"]
|
|
392
392
|
})
|
|
@@ -406,22 +406,22 @@ function O() {
|
|
|
406
406
|
children: [
|
|
407
407
|
/* @__PURE__ */ v(g, { className: "h-4 w-4" }),
|
|
408
408
|
"Scheduled (",
|
|
409
|
-
|
|
409
|
+
j === 0 ? "today" : "tomorrow",
|
|
410
410
|
")"
|
|
411
411
|
]
|
|
412
412
|
}),
|
|
413
|
-
|
|
413
|
+
Y && /* @__PURE__ */ v("p", {
|
|
414
414
|
className: "mt-1 text-xs text-text-secondary",
|
|
415
415
|
"data-testid": "focus-calendar-connection",
|
|
416
|
-
children:
|
|
416
|
+
children: Y.holdsEnabled ? Y.connected ? `Accepted blocks are held as busy "Focus" time on ${Y.calendarName ?? "your calendar"}${wt ? ` and sync to ${wt}` : ""}.` : Y.reachable ? "No personal calendar yet. Create one in Calendar to hold accepted blocks there and plan around its events." : "Your calendar could not be reached just now; blocks are still scheduled here." : "Calendar holds are off — accepted blocks stay in TimeCampus only."
|
|
417
417
|
}),
|
|
418
418
|
/* @__PURE__ */ y("div", {
|
|
419
419
|
className: "mt-4 space-y-3",
|
|
420
|
-
children: [
|
|
420
|
+
children: [I.data && Ct.length === 0 && /* @__PURE__ */ v("p", {
|
|
421
421
|
className: "text-sm text-text-secondary",
|
|
422
422
|
children: "Accept a suggestion to put a focus block on your schedule."
|
|
423
423
|
}), Ct.map((e) => {
|
|
424
|
-
let t = _e(e.calendarHoldStatus, e.calendarId && e.calendarId ===
|
|
424
|
+
let t = _e(e.calendarHoldStatus, e.calendarId && e.calendarId === Y?.calendarId ? Y?.calendarName : null);
|
|
425
425
|
return /* @__PURE__ */ y("div", {
|
|
426
426
|
className: "flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border-subtle p-3",
|
|
427
427
|
"data-testid": "focus-scheduled-block",
|
|
@@ -445,16 +445,16 @@ function O() {
|
|
|
445
445
|
label: "Started"
|
|
446
446
|
}) : /* @__PURE__ */ y("div", {
|
|
447
447
|
className: "flex gap-2",
|
|
448
|
-
children: [!
|
|
448
|
+
children: [!q && ye(e.endTime, M) && /* @__PURE__ */ y("button", {
|
|
449
449
|
type: "button",
|
|
450
|
-
className:
|
|
451
|
-
disabled:
|
|
450
|
+
className: w,
|
|
451
|
+
disabled: B,
|
|
452
452
|
onClick: () => Dt(e.id),
|
|
453
453
|
children: [/* @__PURE__ */ v(m, { className: "h-4 w-4" }), " Start"]
|
|
454
454
|
}), /* @__PURE__ */ v("button", {
|
|
455
455
|
type: "button",
|
|
456
|
-
className:
|
|
457
|
-
onClick: () =>
|
|
456
|
+
className: T,
|
|
457
|
+
onClick: () => X(() => Xe({ variables: { id: e.id } }), "Focus block canceled"),
|
|
458
458
|
"data-testid": "focus-block-cancel",
|
|
459
459
|
children: "Cancel"
|
|
460
460
|
})]
|
|
@@ -494,7 +494,7 @@ function O() {
|
|
|
494
494
|
rows: 6,
|
|
495
495
|
value: pt,
|
|
496
496
|
onChange: (e) => mt(e.target.value),
|
|
497
|
-
className: `${
|
|
497
|
+
className: `${C} mt-1 w-full font-mono`,
|
|
498
498
|
"aria-describedby": "focus-sites-help",
|
|
499
499
|
"data-testid": "focus-blocked-sites"
|
|
500
500
|
})]
|
|
@@ -510,7 +510,7 @@ function O() {
|
|
|
510
510
|
rows: 5,
|
|
511
511
|
value: ht,
|
|
512
512
|
onChange: (e) => gt(e.target.value),
|
|
513
|
-
className: `${
|
|
513
|
+
className: `${C} mt-1 w-full font-mono`,
|
|
514
514
|
"aria-describedby": "focus-apps-help",
|
|
515
515
|
"data-testid": "focus-blocked-apps"
|
|
516
516
|
})]
|
|
@@ -530,18 +530,18 @@ function O() {
|
|
|
530
530
|
"data-testid": "focus-do-not-disturb"
|
|
531
531
|
})]
|
|
532
532
|
}),
|
|
533
|
-
|
|
533
|
+
K && /* @__PURE__ */ y("p", {
|
|
534
534
|
className: "text-xs text-text-secondary",
|
|
535
535
|
"data-testid": "focus-desktop-status",
|
|
536
536
|
children: [
|
|
537
537
|
"This computer: Do Not Disturb",
|
|
538
538
|
" ",
|
|
539
|
-
|
|
539
|
+
D(K.doNotDisturb),
|
|
540
540
|
", app blocking",
|
|
541
541
|
" ",
|
|
542
|
-
|
|
542
|
+
D(K.appWatcher),
|
|
543
543
|
".",
|
|
544
|
-
|
|
544
|
+
K.detail ? ` ${K.detail}` : ""
|
|
545
545
|
]
|
|
546
546
|
})
|
|
547
547
|
]
|
|
@@ -560,7 +560,7 @@ function O() {
|
|
|
560
560
|
type: "time",
|
|
561
561
|
value: rt,
|
|
562
562
|
onChange: (e) => it(e.target.value),
|
|
563
|
-
className:
|
|
563
|
+
className: C,
|
|
564
564
|
"aria-label": "Workday start"
|
|
565
565
|
}),
|
|
566
566
|
/* @__PURE__ */ v("span", {
|
|
@@ -569,9 +569,9 @@ function O() {
|
|
|
569
569
|
}),
|
|
570
570
|
/* @__PURE__ */ v("input", {
|
|
571
571
|
type: "time",
|
|
572
|
-
value:
|
|
572
|
+
value: U === "24:00" ? "23:59" : U,
|
|
573
573
|
onChange: (e) => at(e.target.value),
|
|
574
|
-
className:
|
|
574
|
+
className: C,
|
|
575
575
|
"aria-label": "Workday end"
|
|
576
576
|
})
|
|
577
577
|
]
|
|
@@ -584,9 +584,9 @@ function O() {
|
|
|
584
584
|
min: 15,
|
|
585
585
|
max: 240,
|
|
586
586
|
step: 15,
|
|
587
|
-
value:
|
|
587
|
+
value: W,
|
|
588
588
|
onChange: (e) => ot(Number(e.target.value)),
|
|
589
|
-
className: `${
|
|
589
|
+
className: `${C} w-24 text-end`
|
|
590
590
|
})]
|
|
591
591
|
}),
|
|
592
592
|
/* @__PURE__ */ y("label", {
|
|
@@ -597,7 +597,7 @@ function O() {
|
|
|
597
597
|
max: 6,
|
|
598
598
|
value: st,
|
|
599
599
|
onChange: (e) => ct(Number(e.target.value)),
|
|
600
|
-
className: `${
|
|
600
|
+
className: `${C} w-24 text-end`
|
|
601
601
|
})]
|
|
602
602
|
}),
|
|
603
603
|
/* @__PURE__ */ y("label", {
|
|
@@ -612,12 +612,12 @@ function O() {
|
|
|
612
612
|
}),
|
|
613
613
|
/* @__PURE__ */ y("label", {
|
|
614
614
|
className: "flex items-center justify-between gap-4 text-sm text-text-primary",
|
|
615
|
-
children: ["Remind me before a block starts", /* @__PURE__ */ v(
|
|
616
|
-
value:
|
|
615
|
+
children: ["Remind me before a block starts", /* @__PURE__ */ v(b, {
|
|
616
|
+
value: G,
|
|
617
617
|
onChange: (e) => xt(Number(e.target.value)),
|
|
618
|
-
className:
|
|
618
|
+
className: C,
|
|
619
619
|
"data-testid": "focus-start-nudge",
|
|
620
|
-
children: Oe(
|
|
620
|
+
children: Oe(G).map((e) => /* @__PURE__ */ v("option", {
|
|
621
621
|
value: e.value,
|
|
622
622
|
children: e.label
|
|
623
623
|
}, e.value))
|
|
@@ -632,7 +632,7 @@ function O() {
|
|
|
632
632
|
step: 5,
|
|
633
633
|
value: lt,
|
|
634
634
|
onChange: (e) => ut(Number(e.target.value)),
|
|
635
|
-
className: `${
|
|
635
|
+
className: `${C} w-24 text-end`
|
|
636
636
|
})]
|
|
637
637
|
})
|
|
638
638
|
]
|
|
@@ -642,7 +642,7 @@ function O() {
|
|
|
642
642
|
className: "mt-4 flex justify-end",
|
|
643
643
|
children: /* @__PURE__ */ v("button", {
|
|
644
644
|
type: "button",
|
|
645
|
-
className:
|
|
645
|
+
className: w,
|
|
646
646
|
disabled: Qe,
|
|
647
647
|
onClick: At,
|
|
648
648
|
"data-testid": "focus-save-settings",
|
|
@@ -654,6 +654,6 @@ function O() {
|
|
|
654
654
|
]
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
|
-
export {
|
|
657
|
+
export { k as FocusProtectionPage };
|
|
658
658
|
|
|
659
659
|
//# sourceMappingURL=FocusProtectionPage.js.map
|