@burdenoff/microfe-timecampus 2026.1031.13 → 2026.1102.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/generated/wspace-operations.d.ts +181 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +1373 -1273
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +574 -13
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +10 -8
- 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 +116 -96
- package/dist/timecampus/TimeCampusRoot.js.map +1 -1
- package/dist/timecampus/TimeCampusRoutes.d.ts.map +1 -1
- package/dist/timecampus/TimeCampusRoutes.js +26 -14
- package/dist/timecampus/TimeCampusRoutes.js.map +1 -1
- package/dist/timecampus/components/ToggleSwitch.d.ts +12 -0
- package/dist/timecampus/components/ToggleSwitch.d.ts.map +1 -0
- package/dist/timecampus/components/ToggleSwitch.js +19 -0
- package/dist/timecampus/components/ToggleSwitch.js.map +1 -0
- package/dist/timecampus/components/index.d.ts +1 -0
- package/dist/timecampus/components/index.d.ts.map +1 -1
- package/dist/timecampus/components/index.js +11 -10
- package/dist/timecampus/index.js +7 -7
- package/dist/timecampus/pages/dashboard/ReportsPage.d.ts.map +1 -1
- package/dist/timecampus/pages/dashboard/ReportsPage.js +143 -129
- package/dist/timecampus/pages/dashboard/ReportsPage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/ServerReportExports.d.ts +6 -0
- package/dist/timecampus/pages/dashboard/ServerReportExports.d.ts.map +1 -0
- package/dist/timecampus/pages/dashboard/ServerReportExports.js +257 -0
- package/dist/timecampus/pages/dashboard/ServerReportExports.js.map +1 -0
- package/dist/timecampus/pages/dashboard/reportTemplates.d.ts +33 -0
- package/dist/timecampus/pages/dashboard/reportTemplates.d.ts.map +1 -0
- package/dist/timecampus/pages/dashboard/reportTemplates.js +129 -0
- package/dist/timecampus/pages/dashboard/reportTemplates.js.map +1 -0
- package/dist/timecampus/pages/lifetime/PersonalCorporatePage.d.ts.map +1 -1
- package/dist/timecampus/pages/lifetime/PersonalCorporatePage.js +147 -162
- package/dist/timecampus/pages/lifetime/PersonalCorporatePage.js.map +1 -1
- package/dist/timecampus/pages/settings/PrivacySettingsPage.d.ts +2 -0
- package/dist/timecampus/pages/settings/PrivacySettingsPage.d.ts.map +1 -0
- package/dist/timecampus/pages/settings/PrivacySettingsPage.js +268 -0
- package/dist/timecampus/pages/settings/PrivacySettingsPage.js.map +1 -0
- package/dist/timecampus/pages/settings/SettingsPage.d.ts +2 -0
- package/dist/timecampus/pages/settings/SettingsPage.d.ts.map +1 -0
- package/dist/timecampus/pages/settings/SettingsPage.js +175 -0
- package/dist/timecampus/pages/settings/SettingsPage.js.map +1 -0
- package/dist/timecampus/pages/settings/ThemePreferenceSync.d.ts +15 -0
- package/dist/timecampus/pages/settings/ThemePreferenceSync.d.ts.map +1 -0
- package/dist/timecampus/pages/settings/ThemePreferenceSync.js +80 -0
- package/dist/timecampus/pages/settings/ThemePreferenceSync.js.map +1 -0
- package/dist/timecampus/pages/settings/retention.d.ts +25 -0
- package/dist/timecampus/pages/settings/retention.d.ts.map +1 -0
- package/dist/timecampus/pages/settings/retention.js +34 -0
- package/dist/timecampus/pages/settings/retention.js.map +1 -0
- package/dist/timecampus/pages/settings/themePreference.d.ts +45 -0
- package/dist/timecampus/pages/settings/themePreference.d.ts.map +1 -0
- package/dist/timecampus/pages/settings/themePreference.js +49 -0
- package/dist/timecampus/pages/settings/themePreference.js.map +1 -0
- package/dist/timecampus/utils/helpers.d.ts +2 -0
- package/dist/timecampus/utils/helpers.d.ts.map +1 -1
- package/dist/timecampus/utils/helpers.js +5 -1
- package/dist/timecampus/utils/helpers.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { useTimeCampus as e } from "../../providers/TimeCampusProvider.js";
|
|
2
|
-
import { cn as t } from "../../utils/helpers.js";
|
|
3
|
-
import { StatCard as
|
|
4
|
-
import { LoadingSkeleton as
|
|
5
|
-
import { EmptyState as
|
|
6
|
-
import { useGrantSourceConsentMutation as
|
|
7
|
-
import { PageLayout as
|
|
8
|
-
import { StatusBadge as
|
|
9
|
-
import { ToastContainer as
|
|
2
|
+
import { cn as t, humanizeToken as n } from "../../utils/helpers.js";
|
|
3
|
+
import { StatCard as r } from "../../components/StatCard.js";
|
|
4
|
+
import { LoadingSkeleton as i } from "../../components/LoadingSkeleton.js";
|
|
5
|
+
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
6
|
+
import { useGrantSourceConsentMutation as o, useMyContextSharingPolicyQuery as ee, useMyPersonalDataSummaryQuery as te, useMySourceConsentsQuery as ne, useRevokeSourceConsentMutation as re, useUpdateContextSharingPolicyMutation as ie } from "../../../generated/wspace-operations.js";
|
|
7
|
+
import { PageLayout as s } from "../../components/PageLayout.js";
|
|
8
|
+
import { StatusBadge as c } from "../../components/StatusBadge.js";
|
|
9
|
+
import { ToastContainer as ae, useToast as l } from "../../components/Toast.js";
|
|
10
|
+
import { ToggleSwitch as u } from "../../components/ToggleSwitch.js";
|
|
10
11
|
import "../../components/index.js";
|
|
11
|
-
import { formatSecondsHuman as
|
|
12
|
-
import { useMemo as
|
|
13
|
-
import { ArrowUpRight as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { GlassCard as
|
|
12
|
+
import { formatSecondsHuman as d, isoDaysAgo as oe, isoNow as se, lifeDomainLabel as ce } from "./domains.js";
|
|
13
|
+
import { useMemo as f, useState as p } from "react";
|
|
14
|
+
import { ArrowUpRight as m, Building2 as le, Info as h, Lock as g, Plug as _, Share2 as v, ShieldCheck as y } from "lucide-react";
|
|
15
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
16
|
+
import { GlassCard as S } from "@burdenoff/fe-libs/ui";
|
|
16
17
|
//#region src/timecampus/pages/lifetime/PersonalCorporatePage.tsx
|
|
17
|
-
var
|
|
18
|
+
var C = [
|
|
18
19
|
{
|
|
19
20
|
key: "sustainableHours",
|
|
20
21
|
label: "Sustainable hours",
|
|
@@ -31,67 +32,51 @@ var S = [
|
|
|
31
32
|
description: "Whether work is staying inside the hours you've set aside for it — a boundary flag, nothing more."
|
|
32
33
|
}
|
|
33
34
|
];
|
|
34
|
-
function
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return /* @__PURE__ */ y("button", {
|
|
40
|
-
type: "button",
|
|
41
|
-
role: "switch",
|
|
42
|
-
"aria-checked": e,
|
|
43
|
-
"aria-label": i,
|
|
44
|
-
disabled: r,
|
|
45
|
-
onClick: () => n(!e),
|
|
46
|
-
className: t("relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/50 focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface", e ? "border-transparent bg-action-primary-bg" : "border-border-subtle bg-bg-sunken", r && "cursor-not-allowed opacity-50"),
|
|
47
|
-
children: /* @__PURE__ */ y("span", { className: t("inline-block h-4 w-4 transform rounded-full shadow-sm transition-transform motion-reduce:transition-none", e ? "translate-x-6 bg-action-primary-text" : "translate-x-1 bg-bg-surface") })
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function T() {
|
|
51
|
-
let { workspaceId: T = "" } = e(), { toasts: le, addToast: E, dismissToast: ue } = u(), D = p(() => ({
|
|
52
|
-
from: ae(30),
|
|
53
|
-
to: d()
|
|
54
|
-
}), []), { data: O, loading: k, error: A } = o({ skip: !T }), { data: j, loading: M, error: N, refetch: P } = s({
|
|
35
|
+
function w() {
|
|
36
|
+
let { workspaceId: w = "" } = e(), { toasts: ue, addToast: T, dismissToast: E } = l(), D = f(() => ({
|
|
37
|
+
from: oe(30),
|
|
38
|
+
to: se()
|
|
39
|
+
}), []), { data: O, loading: k, error: A } = ee({ skip: !w }), { data: j, loading: M, error: N, refetch: P } = te({
|
|
55
40
|
variables: {
|
|
56
41
|
from: D.from,
|
|
57
42
|
to: D.to
|
|
58
43
|
},
|
|
59
|
-
skip: !
|
|
60
|
-
}), { data: F, loading: I, error: L, refetch: R } =
|
|
44
|
+
skip: !w
|
|
45
|
+
}), { data: F, loading: I, error: L, refetch: R } = ne({ skip: !w }), [z] = ie(), [B] = o(), [V] = re(), [H, U] = p(null), [de, W] = p(null), [G, K] = p(null), q = O?.myContextSharingPolicy, J = j?.myPersonalDataSummary, Y = F?.mySourceConsents ?? [], X = f(() => [...J?.byDomain ?? []].sort((e, t) => t.totalSeconds - e.totalSeconds), [J]), Z = X[0]?.totalSeconds ?? 0, Q = J?.sharedAggregates ?? [], $ = {
|
|
61
46
|
title: "Personal & Corporate",
|
|
62
47
|
description: "Two contexts, one boundary you control",
|
|
63
48
|
purpose: "TimeCampus keeps two worlds apart: your private life record, which stays yours, and the workspace you work in. This is where you decide exactly which aggregate work signals — never your personal context — travel up to your employer."
|
|
64
49
|
};
|
|
65
|
-
if (!
|
|
50
|
+
if (!w || k && !O || M && !j) return /* @__PURE__ */ b(s, {
|
|
66
51
|
...$,
|
|
67
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ x("div", {
|
|
68
53
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
69
54
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ b(i, {
|
|
71
56
|
variant: "card",
|
|
72
57
|
count: 1
|
|
73
58
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ b(i, {
|
|
75
60
|
variant: "card",
|
|
76
61
|
count: 1
|
|
77
62
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ b(i, {
|
|
79
64
|
variant: "card",
|
|
80
65
|
count: 1
|
|
81
66
|
})
|
|
82
67
|
]
|
|
83
68
|
})
|
|
84
69
|
});
|
|
85
|
-
if (A && N && !q && !J) return /* @__PURE__ */
|
|
70
|
+
if (A && N && !q && !J) return /* @__PURE__ */ b(s, {
|
|
86
71
|
...$,
|
|
87
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ b("div", {
|
|
88
73
|
className: "rounded-xl border border-status-error-border/50 bg-status-error-bg/10 p-4 text-sm text-status-error-text",
|
|
89
74
|
children: "We couldn't load your privacy settings right now. Please try again in a moment."
|
|
90
75
|
})
|
|
91
76
|
});
|
|
92
77
|
let fe = async (e, t) => {
|
|
93
78
|
if (!q) return;
|
|
94
|
-
let n =
|
|
79
|
+
let n = C.find((t) => t.key === e)?.label ?? "signal";
|
|
95
80
|
U(e);
|
|
96
81
|
try {
|
|
97
82
|
let r = await z({ variables: { input: {
|
|
@@ -101,13 +86,13 @@ function T() {
|
|
|
101
86
|
[e]: t
|
|
102
87
|
} } });
|
|
103
88
|
if (r.error) throw Error(r.error.message);
|
|
104
|
-
await P(),
|
|
89
|
+
await P(), T({
|
|
105
90
|
title: t ? `Now sharing "${n}"` : `Stopped sharing "${n}"`,
|
|
106
91
|
description: "Your workspace only ever sees this as an aggregate signal.",
|
|
107
92
|
variant: "success"
|
|
108
93
|
});
|
|
109
94
|
} catch {
|
|
110
|
-
|
|
95
|
+
T({
|
|
111
96
|
title: "Couldn't update what you share",
|
|
112
97
|
description: "Nothing was changed. Please try again.",
|
|
113
98
|
variant: "error"
|
|
@@ -116,22 +101,22 @@ function T() {
|
|
|
116
101
|
U(null);
|
|
117
102
|
}
|
|
118
103
|
}, pe = async (e, t) => {
|
|
119
|
-
let
|
|
104
|
+
let r = n(e.source);
|
|
120
105
|
K(e.source);
|
|
121
106
|
try {
|
|
122
|
-
let
|
|
107
|
+
let n = await B({ variables: {
|
|
123
108
|
source: e.source,
|
|
124
109
|
mode: e.mode,
|
|
125
110
|
onDeviceOnly: t
|
|
126
111
|
} });
|
|
127
|
-
if (
|
|
128
|
-
await R(),
|
|
129
|
-
title: t ? `${
|
|
112
|
+
if (n.error) throw Error(n.error.message);
|
|
113
|
+
await R(), T({
|
|
114
|
+
title: t ? `${r} now on-device only` : `${r} on-device-only turned off`,
|
|
130
115
|
description: t ? "Only aggregated app/category/timing data reaches your workspace — no titles, URLs, or other details." : void 0,
|
|
131
116
|
variant: "success"
|
|
132
117
|
});
|
|
133
118
|
} catch {
|
|
134
|
-
|
|
119
|
+
T({
|
|
135
120
|
title: "Couldn't update on-device-only",
|
|
136
121
|
description: "Nothing was changed. Please try again.",
|
|
137
122
|
variant: "error"
|
|
@@ -140,7 +125,7 @@ function T() {
|
|
|
140
125
|
K(null);
|
|
141
126
|
}
|
|
142
127
|
}, me = async (e, t) => {
|
|
143
|
-
let
|
|
128
|
+
let r = n(e.source);
|
|
144
129
|
W(e.source);
|
|
145
130
|
try {
|
|
146
131
|
if (t) {
|
|
@@ -150,12 +135,12 @@ function T() {
|
|
|
150
135
|
let t = await V({ variables: { source: e.source } });
|
|
151
136
|
if (t.error) throw Error(t.error.message);
|
|
152
137
|
}
|
|
153
|
-
await R(),
|
|
154
|
-
title: t ? `${
|
|
138
|
+
await R(), T({
|
|
139
|
+
title: t ? `${r} connected` : `${r} disconnected`,
|
|
155
140
|
variant: "success"
|
|
156
141
|
});
|
|
157
142
|
} catch {
|
|
158
|
-
|
|
143
|
+
T({
|
|
159
144
|
title: "Couldn't update this source",
|
|
160
145
|
description: "Nothing was changed. Please try again.",
|
|
161
146
|
variant: "error"
|
|
@@ -164,71 +149,71 @@ function T() {
|
|
|
164
149
|
W(null);
|
|
165
150
|
}
|
|
166
151
|
};
|
|
167
|
-
return /* @__PURE__ */
|
|
152
|
+
return /* @__PURE__ */ x(s, {
|
|
168
153
|
...$,
|
|
169
154
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ x("div", {
|
|
171
156
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
172
157
|
children: [
|
|
173
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ x(S, {
|
|
174
159
|
treatment: "glass",
|
|
175
160
|
className: "flex flex-col p-4 sm:p-6",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ x("div", {
|
|
177
162
|
className: "mb-4 flex items-start gap-3",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ b("div", {
|
|
179
164
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
|
|
180
|
-
children: /* @__PURE__ */
|
|
181
|
-
}), /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ b(g, { className: "h-5 w-5" })
|
|
166
|
+
}), /* @__PURE__ */ x("div", {
|
|
182
167
|
className: "min-w-0",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ x("h2", {
|
|
184
169
|
className: "text-sm font-semibold text-text-primary",
|
|
185
170
|
children: [
|
|
186
171
|
"Personal",
|
|
187
172
|
" ",
|
|
188
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ b("span", {
|
|
189
174
|
className: "font-normal text-text-secondary",
|
|
190
175
|
children: "(private to you)"
|
|
191
176
|
})
|
|
192
177
|
]
|
|
193
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ b("p", {
|
|
194
179
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
195
180
|
children: "Everything you capture about your life. Locked to your account — it never leaves this side."
|
|
196
181
|
})]
|
|
197
182
|
})]
|
|
198
|
-
}), N && !J ? /* @__PURE__ */
|
|
183
|
+
}), N && !J ? /* @__PURE__ */ b("div", {
|
|
199
184
|
className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-3 text-xs text-status-error-text",
|
|
200
185
|
children: "Couldn't load your private data summary right now."
|
|
201
|
-
}) : !J || J.totalPersonalEvents === 0 ? /* @__PURE__ */
|
|
186
|
+
}) : !J || J.totalPersonalEvents === 0 ? /* @__PURE__ */ b(a, {
|
|
202
187
|
illustration: "empty-data",
|
|
203
188
|
title: "Nothing private captured yet",
|
|
204
189
|
description: "Log your first life entry and it will live here — always private to you."
|
|
205
|
-
}) : /* @__PURE__ */
|
|
190
|
+
}) : /* @__PURE__ */ x("div", {
|
|
206
191
|
className: "flex flex-1 flex-col gap-4",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ b(r, {
|
|
208
193
|
title: "Private life entries",
|
|
209
194
|
value: J.totalPersonalEvents.toLocaleString(),
|
|
210
|
-
icon: /* @__PURE__ */
|
|
195
|
+
icon: /* @__PURE__ */ b(g, { className: "h-5 w-5" }),
|
|
211
196
|
description: "captured in the last 30 days"
|
|
212
|
-
}), X.length === 0 ? /* @__PURE__ */
|
|
197
|
+
}), X.length === 0 ? /* @__PURE__ */ b("p", {
|
|
213
198
|
className: "text-xs text-text-secondary",
|
|
214
199
|
children: "No life domains logged in this window yet."
|
|
215
|
-
}) : /* @__PURE__ */
|
|
200
|
+
}) : /* @__PURE__ */ b("ul", {
|
|
216
201
|
className: "space-y-2.5",
|
|
217
202
|
children: X.map((e) => {
|
|
218
203
|
let t = Z > 0 ? Math.round(e.totalSeconds / Z * 100) : 0;
|
|
219
|
-
return /* @__PURE__ */
|
|
204
|
+
return /* @__PURE__ */ x("li", {
|
|
220
205
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/40 p-3",
|
|
221
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ x("div", {
|
|
222
207
|
className: "flex items-center justify-between gap-3",
|
|
223
|
-
children: [/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ x("div", {
|
|
224
209
|
className: "min-w-0",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
210
|
+
children: [/* @__PURE__ */ b("p", {
|
|
226
211
|
className: "truncate text-sm font-medium text-text-primary",
|
|
227
|
-
children:
|
|
228
|
-
}), /* @__PURE__ */
|
|
212
|
+
children: ce(e.domain)
|
|
213
|
+
}), /* @__PURE__ */ x("p", {
|
|
229
214
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
230
215
|
children: [
|
|
231
|
-
|
|
216
|
+
d(e.totalSeconds),
|
|
232
217
|
" ·",
|
|
233
218
|
" ",
|
|
234
219
|
e.eventCount.toLocaleString(),
|
|
@@ -236,13 +221,13 @@ function T() {
|
|
|
236
221
|
e.eventCount === 1 ? "entry" : "entries"
|
|
237
222
|
]
|
|
238
223
|
})]
|
|
239
|
-
}), /* @__PURE__ */
|
|
224
|
+
}), /* @__PURE__ */ b(g, {
|
|
240
225
|
className: "h-3.5 w-3.5 shrink-0 text-text-muted",
|
|
241
226
|
"aria-label": "Private to you"
|
|
242
227
|
})]
|
|
243
|
-
}), /* @__PURE__ */
|
|
228
|
+
}), /* @__PURE__ */ b("div", {
|
|
244
229
|
className: "mt-2 h-1.5 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
245
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ b("div", {
|
|
246
231
|
className: "h-full rounded-full bg-action-primary-bg/60",
|
|
247
232
|
style: { width: `${t}%` }
|
|
248
233
|
})
|
|
@@ -252,55 +237,55 @@ function T() {
|
|
|
252
237
|
})]
|
|
253
238
|
})]
|
|
254
239
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ x("div", {
|
|
256
241
|
className: "flex flex-col gap-4",
|
|
257
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ x(S, {
|
|
258
243
|
treatment: "insight",
|
|
259
244
|
glow: !0,
|
|
260
245
|
className: "flex flex-col p-4 sm:p-6",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ x("div", {
|
|
262
247
|
className: "mb-4 flex items-start gap-3",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ b("div", {
|
|
264
249
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-status-info-bg/40 text-status-info-text",
|
|
265
|
-
children: /* @__PURE__ */
|
|
266
|
-
}), /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ b(v, { className: "h-5 w-5" })
|
|
251
|
+
}), /* @__PURE__ */ x("div", {
|
|
267
252
|
className: "min-w-0",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
269
254
|
className: "text-sm font-semibold text-text-primary",
|
|
270
255
|
children: "What you share up to work"
|
|
271
|
-
}), /* @__PURE__ */
|
|
256
|
+
}), /* @__PURE__ */ b("p", {
|
|
272
257
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
273
258
|
children: "Aggregate signals only. Every switch is off until you turn it on."
|
|
274
259
|
})]
|
|
275
260
|
})]
|
|
276
|
-
}), A && !q ? /* @__PURE__ */
|
|
261
|
+
}), A && !q ? /* @__PURE__ */ b("div", {
|
|
277
262
|
className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-3 text-xs text-status-error-text",
|
|
278
263
|
children: "Couldn't load your sharing settings right now."
|
|
279
|
-
}) : /* @__PURE__ */
|
|
264
|
+
}) : /* @__PURE__ */ b("div", {
|
|
280
265
|
className: "space-y-3",
|
|
281
|
-
children:
|
|
266
|
+
children: C.map((e) => {
|
|
282
267
|
let n = q ? q[e.key] : !1, r = H === e.key;
|
|
283
|
-
return /* @__PURE__ */
|
|
268
|
+
return /* @__PURE__ */ b("div", {
|
|
284
269
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/40 p-3",
|
|
285
|
-
children: /* @__PURE__ */
|
|
270
|
+
children: /* @__PURE__ */ x("div", {
|
|
286
271
|
className: "flex items-start justify-between gap-3",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ x("div", {
|
|
288
273
|
className: "min-w-0",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ b("p", {
|
|
290
275
|
className: "text-sm font-medium text-text-primary",
|
|
291
276
|
children: e.label
|
|
292
|
-
}), /* @__PURE__ */
|
|
277
|
+
}), /* @__PURE__ */ b("p", {
|
|
293
278
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
294
279
|
children: e.description
|
|
295
280
|
})]
|
|
296
|
-
}), /* @__PURE__ */
|
|
281
|
+
}), /* @__PURE__ */ x("div", {
|
|
297
282
|
className: "flex shrink-0 flex-col items-end gap-1",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ b(u, {
|
|
299
284
|
checked: n,
|
|
300
285
|
disabled: r || !q,
|
|
301
286
|
ariaLabel: `Share "${e.label}" with your workspace`,
|
|
302
287
|
onChange: (t) => fe(e.key, t)
|
|
303
|
-
}), /* @__PURE__ */
|
|
288
|
+
}), /* @__PURE__ */ b("span", {
|
|
304
289
|
className: t("text-[0.65rem] font-medium uppercase tracking-wide", n ? "text-status-success-text" : "text-text-muted"),
|
|
305
290
|
children: r ? "Saving…" : n ? "On" : "Off"
|
|
306
291
|
})]
|
|
@@ -309,83 +294,83 @@ function T() {
|
|
|
309
294
|
}, e.key);
|
|
310
295
|
})
|
|
311
296
|
})]
|
|
312
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ b(S, {
|
|
313
298
|
treatment: "metric",
|
|
314
299
|
className: "border-status-success-border/40 p-4",
|
|
315
|
-
children: /* @__PURE__ */
|
|
300
|
+
children: /* @__PURE__ */ x("div", {
|
|
316
301
|
className: "flex items-center gap-3",
|
|
317
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ b("div", {
|
|
318
303
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-status-success-bg/40 text-status-success-text",
|
|
319
|
-
children: /* @__PURE__ */ y
|
|
320
|
-
}), /* @__PURE__ */
|
|
304
|
+
children: /* @__PURE__ */ b(y, { className: "h-5 w-5" })
|
|
305
|
+
}), /* @__PURE__ */ b("p", {
|
|
321
306
|
className: "text-sm font-semibold text-text-primary",
|
|
322
307
|
children: "Your employer never sees your personal context."
|
|
323
308
|
})]
|
|
324
309
|
})
|
|
325
310
|
})]
|
|
326
311
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ x(S, {
|
|
328
313
|
treatment: "glass",
|
|
329
314
|
className: "flex flex-col p-4 sm:p-6",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
315
|
+
children: [/* @__PURE__ */ x("div", {
|
|
331
316
|
className: "mb-4 flex items-start gap-3",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ b("div", {
|
|
333
318
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
|
|
334
|
-
children: /* @__PURE__ */
|
|
335
|
-
}), /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ b(le, { className: "h-5 w-5" })
|
|
320
|
+
}), /* @__PURE__ */ x("div", {
|
|
336
321
|
className: "min-w-0",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ x("h2", {
|
|
338
323
|
className: "text-sm font-semibold text-text-primary",
|
|
339
324
|
children: [
|
|
340
325
|
"Corporate",
|
|
341
326
|
" ",
|
|
342
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ b("span", {
|
|
343
328
|
className: "font-normal text-text-secondary",
|
|
344
329
|
children: "(your workspace)"
|
|
345
330
|
})
|
|
346
331
|
]
|
|
347
|
-
}), /* @__PURE__ */
|
|
332
|
+
}), /* @__PURE__ */ b("p", {
|
|
348
333
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
349
334
|
children: "What the workspace can actually see about you."
|
|
350
335
|
})]
|
|
351
336
|
})]
|
|
352
|
-
}), /* @__PURE__ */
|
|
337
|
+
}), /* @__PURE__ */ x("div", {
|
|
353
338
|
className: "flex flex-1 flex-col gap-4",
|
|
354
339
|
children: [
|
|
355
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ x("div", {
|
|
356
341
|
className: "flex items-start gap-2 rounded-lg border border-status-info-border/40 bg-status-info-bg/10 px-3 py-2.5 text-xs text-status-info-text",
|
|
357
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ b(h, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }), /* @__PURE__ */ b("span", { children: "Your workspace only ever receives aggregate work signals — coarse yes/no bands, never entries, locations, health or timestamps." })]
|
|
358
343
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
360
345
|
className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-muted",
|
|
361
346
|
children: "Aggregate signals visible to work"
|
|
362
|
-
}), Q.length === 0 ? /* @__PURE__ */
|
|
347
|
+
}), Q.length === 0 ? /* @__PURE__ */ x("div", {
|
|
363
348
|
className: "rounded-lg border border-border-subtle bg-bg-sunken/40 p-4 text-center",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ b("p", {
|
|
365
350
|
className: "text-sm font-medium text-text-primary",
|
|
366
351
|
children: "Nothing is shared right now"
|
|
367
|
-
}), /* @__PURE__ */
|
|
352
|
+
}), /* @__PURE__ */ b("p", {
|
|
368
353
|
className: "mt-1 text-xs text-text-secondary",
|
|
369
354
|
children: "Turn on a signal in the middle column and it will appear here."
|
|
370
355
|
})]
|
|
371
|
-
}) : /* @__PURE__ */
|
|
356
|
+
}) : /* @__PURE__ */ b("ul", {
|
|
372
357
|
className: "space-y-2",
|
|
373
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
358
|
+
children: Q.map((e) => /* @__PURE__ */ x("li", {
|
|
374
359
|
className: "flex items-center justify-between gap-3 rounded-lg border border-border-subtle bg-bg-sunken/40 px-3 py-2.5",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ x("span", {
|
|
376
361
|
className: "flex min-w-0 items-center gap-2 text-sm text-text-primary",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ b(m, { className: "h-4 w-4 shrink-0 text-status-success-text" }), /* @__PURE__ */ b("span", {
|
|
378
363
|
className: "truncate",
|
|
379
|
-
children:
|
|
364
|
+
children: n(e)
|
|
380
365
|
})]
|
|
381
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ b(c, {
|
|
382
367
|
variant: "success",
|
|
383
368
|
label: "Shared",
|
|
384
369
|
dot: !0
|
|
385
370
|
})]
|
|
386
371
|
}, e))
|
|
387
372
|
})] }),
|
|
388
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ b("p", {
|
|
389
374
|
className: "mt-auto text-xs text-text-muted",
|
|
390
375
|
children: "This mirrors exactly what you've allowed — change it any time from the switches on the left."
|
|
391
376
|
})
|
|
@@ -394,56 +379,56 @@ function T() {
|
|
|
394
379
|
})
|
|
395
380
|
]
|
|
396
381
|
}),
|
|
397
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ x(S, {
|
|
398
383
|
treatment: "glass",
|
|
399
384
|
className: "mt-6 p-4 sm:p-6",
|
|
400
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ x("div", {
|
|
401
386
|
className: "mb-4 flex items-start gap-3",
|
|
402
|
-
children: [/* @__PURE__ */
|
|
387
|
+
children: [/* @__PURE__ */ b("div", {
|
|
403
388
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
|
|
404
|
-
children: /* @__PURE__ */
|
|
405
|
-
}), /* @__PURE__ */
|
|
389
|
+
children: /* @__PURE__ */ b(_, { className: "h-5 w-5" })
|
|
390
|
+
}), /* @__PURE__ */ x("div", {
|
|
406
391
|
className: "min-w-0",
|
|
407
|
-
children: [/* @__PURE__ */
|
|
392
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
408
393
|
className: "text-sm font-semibold text-text-primary",
|
|
409
394
|
children: "Connected sources"
|
|
410
|
-
}), /* @__PURE__ */
|
|
395
|
+
}), /* @__PURE__ */ b("p", {
|
|
411
396
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
412
397
|
children: "Each capture source only feeds your private record once you consent — and you can withdraw at any moment."
|
|
413
398
|
})]
|
|
414
399
|
})]
|
|
415
|
-
}), L && Y.length === 0 ? /* @__PURE__ */
|
|
400
|
+
}), L && Y.length === 0 ? /* @__PURE__ */ b("div", {
|
|
416
401
|
className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-3 text-xs text-status-error-text",
|
|
417
402
|
children: "Couldn't load your connected sources right now."
|
|
418
|
-
}) : I && Y.length === 0 ? /* @__PURE__ */
|
|
403
|
+
}) : I && Y.length === 0 ? /* @__PURE__ */ b(i, {
|
|
419
404
|
variant: "list",
|
|
420
405
|
count: 3
|
|
421
|
-
}) : Y.length === 0 ? /* @__PURE__ */
|
|
406
|
+
}) : Y.length === 0 ? /* @__PURE__ */ b(a, {
|
|
422
407
|
illustration: "empty-data",
|
|
423
408
|
title: "No sources connected yet",
|
|
424
409
|
description: "When you connect a capture source — a calendar, location or health signal — you'll grant and revoke exactly what it may feed here."
|
|
425
|
-
}) : /* @__PURE__ */
|
|
410
|
+
}) : /* @__PURE__ */ b("div", {
|
|
426
411
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
|
|
427
412
|
children: Y.map((e) => {
|
|
428
|
-
let
|
|
429
|
-
return /* @__PURE__ */
|
|
413
|
+
let r = de === e.source;
|
|
414
|
+
return /* @__PURE__ */ b(S, {
|
|
430
415
|
treatment: "metric",
|
|
431
416
|
className: "p-4",
|
|
432
|
-
children: /* @__PURE__ */
|
|
417
|
+
children: /* @__PURE__ */ x("div", {
|
|
433
418
|
className: "flex items-start justify-between gap-3",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
419
|
+
children: [/* @__PURE__ */ x("div", {
|
|
435
420
|
className: "min-w-0",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
421
|
+
children: [/* @__PURE__ */ b("p", {
|
|
437
422
|
className: "truncate text-sm font-medium text-text-primary",
|
|
438
|
-
children:
|
|
439
|
-
}), /* @__PURE__ */
|
|
423
|
+
children: n(e.source)
|
|
424
|
+
}), /* @__PURE__ */ x("div", {
|
|
440
425
|
className: "mt-1.5 flex flex-wrap items-center gap-1.5",
|
|
441
426
|
children: [
|
|
442
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ b(c, {
|
|
443
428
|
variant: "muted",
|
|
444
|
-
label:
|
|
429
|
+
label: n(e.mode)
|
|
445
430
|
}),
|
|
446
|
-
e.granted && /* @__PURE__ */
|
|
431
|
+
e.granted && /* @__PURE__ */ b("button", {
|
|
447
432
|
type: "button",
|
|
448
433
|
role: "switch",
|
|
449
434
|
"aria-checked": e.onDeviceOnly,
|
|
@@ -452,22 +437,22 @@ function T() {
|
|
|
452
437
|
className: t("rounded-full border px-2 py-0.5 text-[0.65rem] font-medium uppercase tracking-wide transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/50", e.onDeviceOnly ? "border-status-info-border/60 bg-status-info-bg/40 text-status-info-text" : "border-border-subtle bg-bg-sunken/40 text-text-muted hover:text-text-secondary", G === e.source && "cursor-not-allowed opacity-50"),
|
|
453
438
|
children: G === e.source ? "Saving…" : e.onDeviceOnly ? "On-device only" : "Turn on on-device only"
|
|
454
439
|
}),
|
|
455
|
-
e.retentionDays != null && /* @__PURE__ */
|
|
440
|
+
e.retentionDays != null && /* @__PURE__ */ b(c, {
|
|
456
441
|
variant: "muted",
|
|
457
442
|
label: `Kept ${e.retentionDays}d`
|
|
458
443
|
})
|
|
459
444
|
]
|
|
460
445
|
})]
|
|
461
|
-
}), /* @__PURE__ */
|
|
446
|
+
}), /* @__PURE__ */ x("div", {
|
|
462
447
|
className: "flex shrink-0 flex-col items-end gap-1",
|
|
463
|
-
children: [/* @__PURE__ */
|
|
448
|
+
children: [/* @__PURE__ */ b(u, {
|
|
464
449
|
checked: e.granted,
|
|
465
|
-
disabled:
|
|
466
|
-
ariaLabel: `Consent for ${
|
|
450
|
+
disabled: r,
|
|
451
|
+
ariaLabel: `Consent for ${n(e.source)}`,
|
|
467
452
|
onChange: (t) => me(e, t)
|
|
468
|
-
}), /* @__PURE__ */
|
|
453
|
+
}), /* @__PURE__ */ b("span", {
|
|
469
454
|
className: t("text-[0.65rem] font-medium uppercase tracking-wide", e.granted ? "text-status-success-text" : "text-text-muted"),
|
|
470
|
-
children:
|
|
455
|
+
children: r ? "Saving…" : e.granted ? "Granted" : "Revoked"
|
|
471
456
|
})]
|
|
472
457
|
})]
|
|
473
458
|
})
|
|
@@ -475,14 +460,14 @@ function T() {
|
|
|
475
460
|
})
|
|
476
461
|
})]
|
|
477
462
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
479
|
-
toasts:
|
|
480
|
-
onDismiss:
|
|
463
|
+
/* @__PURE__ */ b(ae, {
|
|
464
|
+
toasts: ue,
|
|
465
|
+
onDismiss: E
|
|
481
466
|
})
|
|
482
467
|
]
|
|
483
468
|
});
|
|
484
469
|
}
|
|
485
470
|
//#endregion
|
|
486
|
-
export {
|
|
471
|
+
export { w as PersonalCorporatePage };
|
|
487
472
|
|
|
488
473
|
//# sourceMappingURL=PersonalCorporatePage.js.map
|