@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.
Files changed (64) hide show
  1. package/dist/timecampus/components/EmptyState.d.ts +7 -0
  2. package/dist/timecampus/components/EmptyState.js +3 -2
  3. package/dist/timecampus/components/EmptyState.js.map +1 -1
  4. package/dist/timecampus/components/FilterBar.js +1 -0
  5. package/dist/timecampus/pages/admin/AdminPage.js +264 -264
  6. package/dist/timecampus/pages/admin/AdminPage.js.map +1 -1
  7. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js +78 -78
  8. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js.map +1 -1
  9. package/dist/timecampus/pages/dashboard/ServerReportExports.js +34 -34
  10. package/dist/timecampus/pages/dashboard/ServerReportExports.js.map +1 -1
  11. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +49 -48
  12. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
  13. package/dist/timecampus/pages/extend/AppletDeveloperPage.js +107 -102
  14. package/dist/timecampus/pages/extend/AppletDeveloperPage.js.map +1 -1
  15. package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js +129 -124
  16. package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js.map +1 -1
  17. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js +94 -94
  18. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js.map +1 -1
  19. package/dist/timecampus/pages/extend/TimeTriggersPage.js +97 -97
  20. package/dist/timecampus/pages/extend/TimeTriggersPage.js.map +1 -1
  21. package/dist/timecampus/pages/focus/FocusProtectionPage.js +120 -120
  22. package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
  23. package/dist/timecampus/pages/geofencing/GeofencingPage.js +343 -343
  24. package/dist/timecampus/pages/geofencing/GeofencingPage.js.map +1 -1
  25. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +25 -25
  26. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
  27. package/dist/timecampus/pages/lifetime/RecommendationsPage.js +296 -296
  28. package/dist/timecampus/pages/lifetime/RecommendationsPage.js.map +1 -1
  29. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js +189 -189
  30. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js.map +1 -1
  31. package/dist/timecampus/pages/meetings/ActionItemFormModal.js +47 -46
  32. package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
  33. package/dist/timecampus/pages/meetings/MeetingDetailPage.js +206 -206
  34. package/dist/timecampus/pages/meetings/MeetingDetailPage.js.map +1 -1
  35. package/dist/timecampus/pages/meetings/MeetingFormModal.js +72 -71
  36. package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
  37. package/dist/timecampus/pages/meetings/ParticipantFormModal.js +32 -31
  38. package/dist/timecampus/pages/meetings/ParticipantFormModal.js.map +1 -1
  39. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +34 -34
  40. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  41. package/dist/timecampus/pages/projects/ProjectDetailPage.js +163 -163
  42. package/dist/timecampus/pages/projects/ProjectDetailPage.js.map +1 -1
  43. package/dist/timecampus/pages/projects/ProjectsPage.js +193 -192
  44. package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
  45. package/dist/timecampus/pages/projects/TasksPage.js +92 -92
  46. package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
  47. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +60 -60
  48. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
  49. package/dist/timecampus/pages/settings/IdleDetectionCard.js +33 -33
  50. package/dist/timecampus/pages/settings/IdleDetectionCard.js.map +1 -1
  51. package/dist/timecampus/pages/settings/PrivacySettingsPage.js +32 -32
  52. package/dist/timecampus/pages/settings/PrivacySettingsPage.js.map +1 -1
  53. package/dist/timecampus/pages/time/TimeEntriesPage.js +163 -163
  54. package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
  55. package/dist/timecampus/pages/time/TimeTrackingPage.js +32 -32
  56. package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
  57. package/dist/timecampus/pages/time/TimerPage.js +84 -84
  58. package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
  59. package/dist/timecampus/pages/timeline/TimelinePage.js +223 -223
  60. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  61. package/dist/timecampus/shared/hooks/useConfirmedAction.d.ts +10 -0
  62. package/dist/timecampus/shared/hooks/useConfirmedAction.js +14 -0
  63. package/dist/timecampus/shared/hooks/useConfirmedAction.js.map +1 -0
  64. package/package.json +2 -2
@@ -8,15 +8,15 @@ import { ToastContainer as o, useToast as s } from "../../components/Toast.js";
8
8
  import { formatDate as c } from "../../utils/helpers.js";
9
9
  import { useTimeCampus as ee } from "../../providers/TimeCampusProvider.js";
10
10
  import { TimeCampusTriggerComparator as l, TimeCampusTriggerMetric as u } from "../../../generated/wspace-types.js";
11
- import { ListMyTimeTriggersDocument as d, useCreateTimeTriggerMutation as f, useDeleteTimeTriggerMutation as p, useListMyTimeTriggersQuery as te, useRunTimeTriggerMutation as ne, useUpdateTimeTriggerMutation as re } from "../../../generated/wspace-operations.js";
12
- import { TRIGGER_METRIC_KEYS as m, TRIGGER_PRESETS as ie, browserTimezone as h, describeRule as g, formatHour as _, formatMetric as v, isTriggerComparatorKey as y, isTriggerMetricKey as b, metricMeta as x, validateTriggerForm as ae, workflowLinkForTrigger as oe } from "./triggerHelpers.js";
11
+ import { ListMyTimeTriggersDocument as d, useCreateTimeTriggerMutation as te, useDeleteTimeTriggerMutation as ne, useListMyTimeTriggersQuery as re, useRunTimeTriggerMutation as ie, useUpdateTimeTriggerMutation as f } from "../../../generated/wspace-operations.js";
12
+ import { TRIGGER_METRIC_KEYS as p, TRIGGER_PRESETS as ae, browserTimezone as m, describeRule as h, formatHour as g, formatMetric as _, isTriggerComparatorKey as v, isTriggerMetricKey as y, metricMeta as b, validateTriggerForm as oe, workflowLinkForTrigger as x } from "./triggerHelpers.js";
13
13
  import { useOpenRoute as se } from "./useOpenRoute.js";
14
14
  import { useMemo as S, useState as C } from "react";
15
15
  import { BellRing as w, Pencil as T, Play as E, Plus as D, Store as ce, Trash2 as O, Workflow as k } from "lucide-react";
16
16
  import { jsx as A, jsxs as j } from "react/jsx-runtime";
17
- import { GlassCard as M } from "@burdenoff/fe-libs/ui";
17
+ import { GlassCard as M, ThemedSelect as N } from "@burdenoff/fe-libs/ui";
18
18
  // src/timecampus/pages/extend/TimeTriggersPage.tsx
19
- var N = [{ query: d }], P = "inline-flex items-center justify-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", F = "inline-flex items-center justify-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", I = "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm text-text-primary", L = Array.from({ length: 24 }, (e, t) => t), le = {
19
+ var P = [{ query: d }], F = "inline-flex items-center justify-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", I = "inline-flex items-center justify-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", L = "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm text-text-primary", R = Array.from({ length: 24 }, (e, t) => t), le = {
20
20
  TRACKED_HOURS: u.TrackedHours,
21
21
  FOCUS_PERCENT: u.FocusPercent,
22
22
  CONTEXT_SWITCHES: u.ContextSwitches,
@@ -24,7 +24,7 @@ var N = [{ query: d }], P = "inline-flex items-center justify-center gap-1.5 rou
24
24
  }, ue = {
25
25
  BELOW: l.Below,
26
26
  ABOVE: l.Above
27
- }, R = {
27
+ }, z = {
28
28
  name: "",
29
29
  metric: "TRACKED_HOURS",
30
30
  comparator: "BELOW",
@@ -32,12 +32,12 @@ var N = [{ query: d }], P = "inline-flex items-center justify-center gap-1.5 rou
32
32
  checkHour: 17,
33
33
  message: ""
34
34
  };
35
- function z(e) {
35
+ function B(e) {
36
36
  return e instanceof Error && e.message ? e.message : "Something went wrong";
37
37
  }
38
- function B(e) {
38
+ function V(e) {
39
39
  let { metric: t, comparator: n } = e;
40
- return !b(t) || !y(n) ? null : {
40
+ return !y(t) || !v(n) ? null : {
41
41
  name: e.name,
42
42
  metric: t,
43
43
  comparator: n,
@@ -46,8 +46,8 @@ function B(e) {
46
46
  message: e.message ?? ""
47
47
  };
48
48
  }
49
- function V({ form: e, onChange: t }) {
50
- let n = x(e.metric);
49
+ function H({ form: e, onChange: t }) {
50
+ let n = b(e.metric);
51
51
  return /* @__PURE__ */ j("div", {
52
52
  className: "flex flex-col gap-4",
53
53
  children: [
@@ -57,7 +57,7 @@ function V({ form: e, onChange: t }) {
57
57
  className: "font-medium text-text-primary",
58
58
  children: "Name"
59
59
  }), /* @__PURE__ */ A("input", {
60
- className: I,
60
+ className: L,
61
61
  value: e.name,
62
62
  maxLength: 80,
63
63
  onChange: (n) => t({
@@ -76,17 +76,17 @@ function V({ form: e, onChange: t }) {
76
76
  children: [/* @__PURE__ */ A("span", {
77
77
  className: "font-medium text-text-primary",
78
78
  children: "When"
79
- }), /* @__PURE__ */ A("select", {
80
- className: I,
79
+ }), /* @__PURE__ */ A(N, {
80
+ className: L,
81
81
  value: e.metric,
82
82
  "aria-label": "Metric",
83
83
  onChange: (n) => t({
84
84
  ...e,
85
85
  metric: n.target.value
86
86
  }),
87
- children: m.map((e) => /* @__PURE__ */ A("option", {
87
+ children: p.map((e) => /* @__PURE__ */ A("option", {
88
88
  value: e,
89
- children: x(e).label
89
+ children: b(e).label
90
90
  }, e))
91
91
  })]
92
92
  }),
@@ -95,8 +95,8 @@ function V({ form: e, onChange: t }) {
95
95
  children: [/* @__PURE__ */ A("span", {
96
96
  className: "font-medium text-text-primary",
97
97
  children: "is"
98
- }), /* @__PURE__ */ j("select", {
99
- className: I,
98
+ }), /* @__PURE__ */ j(N, {
99
+ className: L,
100
100
  value: e.comparator,
101
101
  "aria-label": "Comparator",
102
102
  onChange: (n) => t({
@@ -118,7 +118,7 @@ function V({ form: e, onChange: t }) {
118
118
  className: "font-medium text-text-primary",
119
119
  children: ["Threshold", n.unit ? ` (${n.unit})` : ""]
120
120
  }), /* @__PURE__ */ A("input", {
121
- className: I,
121
+ className: L,
122
122
  type: "number",
123
123
  min: 0,
124
124
  max: n.max,
@@ -144,24 +144,24 @@ function V({ form: e, onChange: t }) {
144
144
  className: "font-medium text-text-primary",
145
145
  children: "Check from"
146
146
  }),
147
- /* @__PURE__ */ A("select", {
148
- className: I,
147
+ /* @__PURE__ */ A(N, {
148
+ className: L,
149
149
  value: e.checkHour,
150
150
  "aria-label": "Check from",
151
151
  onChange: (n) => t({
152
152
  ...e,
153
153
  checkHour: Number(n.target.value)
154
154
  }),
155
- children: L.map((e) => /* @__PURE__ */ A("option", {
155
+ children: R.map((e) => /* @__PURE__ */ A("option", {
156
156
  value: e,
157
- children: e === 0 ? "Any time of day" : `${_(e)} onwards`
157
+ children: e === 0 ? "Any time of day" : `${g(e)} onwards`
158
158
  }, e))
159
159
  }),
160
160
  /* @__PURE__ */ j("span", {
161
161
  className: "text-xs text-text-tertiary",
162
162
  children: [
163
163
  "Your day runs in ",
164
- h(),
164
+ m(),
165
165
  ". Rules about falling short (for example below 6 h) work best with a late check hour."
166
166
  ]
167
167
  })
@@ -173,7 +173,7 @@ function V({ form: e, onChange: t }) {
173
173
  className: "font-medium text-text-primary",
174
174
  children: "Note in the nudge (optional)"
175
175
  }), /* @__PURE__ */ A("textarea", {
176
- className: I,
176
+ className: L,
177
177
  rows: 2,
178
178
  maxLength: 280,
179
179
  value: e.message,
@@ -187,7 +187,7 @@ function V({ form: e, onChange: t }) {
187
187
  }),
188
188
  /* @__PURE__ */ j("p", {
189
189
  className: "rounded-md bg-bg-sunken px-3 py-2 text-sm text-text-secondary",
190
- children: [g({
190
+ children: [h({
191
191
  metric: e.metric,
192
192
  comparator: e.comparator,
193
193
  threshold: Number(e.threshold) || 0,
@@ -197,7 +197,7 @@ function V({ form: e, onChange: t }) {
197
197
  ]
198
198
  });
199
199
  }
200
- function H({ trigger: e, busy: t, onToggle: n, onRun: r, onEdit: i, onDelete: o, onUseInWorkflow: s }) {
200
+ function de({ trigger: e, busy: t, onToggle: n, onRun: r, onEdit: i, onDelete: o, onUseInWorkflow: s }) {
201
201
  return /* @__PURE__ */ j(M, {
202
202
  treatment: "glass",
203
203
  className: "flex h-full flex-col gap-3 p-5",
@@ -220,7 +220,7 @@ function H({ trigger: e, busy: t, onToggle: n, onRun: r, onEdit: i, onDelete: o,
220
220
  children: e.name
221
221
  }), /* @__PURE__ */ A("p", {
222
222
  className: "text-sm text-text-secondary",
223
- children: g(e)
223
+ children: h(e)
224
224
  })]
225
225
  }),
226
226
  /* @__PURE__ */ A(a, {
@@ -243,7 +243,7 @@ function H({ trigger: e, busy: t, onToggle: n, onRun: r, onEdit: i, onDelete: o,
243
243
  className: "grid grid-cols-2 gap-2 text-xs text-text-tertiary",
244
244
  children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "Today so far" }), /* @__PURE__ */ A("dd", {
245
245
  className: "text-sm font-medium text-text-primary",
246
- children: e.lastValue == null ? "Not checked yet" : v(e.metric, e.lastValue)
246
+ children: e.lastValue == null ? "Not checked yet" : _(e.metric, e.lastValue)
247
247
  })] }), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "Last fired" }), /* @__PURE__ */ j("dd", {
248
248
  className: "text-sm font-medium text-text-primary",
249
249
  children: [e.lastFiredAt ? c(e.lastFiredAt) : "Never", e.fireCount > 0 ? ` · ${e.fireCount}×` : ""]
@@ -254,7 +254,7 @@ function H({ trigger: e, busy: t, onToggle: n, onRun: r, onEdit: i, onDelete: o,
254
254
  children: [
255
255
  /* @__PURE__ */ j("button", {
256
256
  type: "button",
257
- className: P,
257
+ className: F,
258
258
  onClick: r,
259
259
  disabled: t,
260
260
  "aria-label": `Check ${e.name} now`,
@@ -265,7 +265,7 @@ function H({ trigger: e, busy: t, onToggle: n, onRun: r, onEdit: i, onDelete: o,
265
265
  }),
266
266
  /* @__PURE__ */ j("button", {
267
267
  type: "button",
268
- className: F,
268
+ className: I,
269
269
  onClick: i,
270
270
  disabled: t,
271
271
  "aria-label": `Edit ${e.name}`,
@@ -276,7 +276,7 @@ function H({ trigger: e, busy: t, onToggle: n, onRun: r, onEdit: i, onDelete: o,
276
276
  }),
277
277
  /* @__PURE__ */ j("button", {
278
278
  type: "button",
279
- className: F,
279
+ className: I,
280
280
  onClick: s,
281
281
  disabled: t,
282
282
  "aria-label": `Use ${e.name} in a workflow`,
@@ -288,7 +288,7 @@ function H({ trigger: e, busy: t, onToggle: n, onRun: r, onEdit: i, onDelete: o,
288
288
  }),
289
289
  /* @__PURE__ */ j("button", {
290
290
  type: "button",
291
- className: F,
291
+ className: I,
292
292
  onClick: o,
293
293
  disabled: t,
294
294
  "aria-label": `Delete ${e.name}`,
@@ -303,69 +303,69 @@ function H({ trigger: e, busy: t, onToggle: n, onRun: r, onEdit: i, onDelete: o,
303
303
  });
304
304
  }
305
305
  function U() {
306
- let { workspaceId: a = "" } = ee(), { toasts: c, addToast: l, dismissToast: u } = s(), d = se(), [m, _] = C(null), [y, b] = C(!1), [x, w] = C(R), [T, E] = C(null), [M, I] = C(/* @__PURE__ */ new Set()), [L, U] = C(null), [W, G] = C(!1), { data: K, loading: de, error: q } = te({ skip: !a }), [fe] = f({ refetchQueries: N }), [J] = re({ refetchQueries: N }), [pe] = p({ refetchQueries: N }), [me] = ne({ refetchQueries: N }), Y = S(() => K?.timeCampusMyTimeTriggers ?? [], [K]), X = K?.timeCampusMyTimeTriggerFirings ?? [], he = S(() => new Map(Y.map((e) => [e.id, e.name])), [Y]), Z = K?.timeCampusApplet.installed ?? !1, Q = (e) => {
307
- _(null), w(e ?? R), E(null), b(!0);
308
- }, ge = (e) => {
309
- let t = B(e);
310
- t ? (_(e), w(t), E(null), b(!0)) : l({
306
+ let { workspaceId: a = "" } = ee(), { toasts: c, addToast: l, dismissToast: u } = s(), d = se(), [p, g] = C(null), [v, y] = C(!1), [b, w] = C(z), [T, E] = C(null), [M, N] = C(/* @__PURE__ */ new Set()), [L, R] = C(null), [U, W] = C(!1), { data: G, loading: fe, error: K } = re({ skip: !a }), [pe] = te({ refetchQueries: P }), [q] = f({ refetchQueries: P }), [me] = ne({ refetchQueries: P }), [he] = ie({ refetchQueries: P }), J = S(() => G?.timeCampusMyTimeTriggers ?? [], [G]), Y = G?.timeCampusMyTimeTriggerFirings ?? [], ge = S(() => new Map(J.map((e) => [e.id, e.name])), [J]), X = G?.timeCampusApplet.installed ?? !1, Z = (e) => {
307
+ g(null), w(e ?? z), E(null), y(!0);
308
+ }, Q = (e) => {
309
+ let t = V(e);
310
+ t ? (g(e), w(t), E(null), y(!0)) : l({
311
311
  title: `${e.name} cannot be edited here`,
312
312
  description: "It uses a rule this version of TimeCampus does not support yet. Reload the page to get the latest version.",
313
313
  variant: "error"
314
314
  });
315
315
  }, _e = async () => {
316
- let e = ae(x);
316
+ let e = oe(b);
317
317
  if (e) {
318
318
  E(e);
319
319
  return;
320
320
  }
321
- G(!0);
321
+ W(!0);
322
322
  let t = {
323
- name: x.name.trim(),
324
- metric: le[x.metric],
325
- comparator: ue[x.comparator],
326
- threshold: Number(x.threshold),
327
- checkHour: x.checkHour,
328
- timezone: h(),
329
- message: x.message.trim()
323
+ name: b.name.trim(),
324
+ metric: le[b.metric],
325
+ comparator: ue[b.comparator],
326
+ threshold: Number(b.threshold),
327
+ checkHour: b.checkHour,
328
+ timezone: m(),
329
+ message: b.message.trim()
330
330
  };
331
331
  try {
332
- m ? (await J({ variables: {
333
- id: m.id,
332
+ p ? (await q({ variables: {
333
+ id: p.id,
334
334
  input: t
335
335
  } }), l({
336
336
  title: `${t.name} saved`,
337
337
  variant: "success"
338
- })) : (await fe({ variables: { input: {
338
+ })) : (await pe({ variables: { input: {
339
339
  ...t,
340
340
  message: t.message || null
341
341
  } } }), l({
342
342
  title: `${t.name} created`,
343
343
  variant: "success"
344
- })), b(!1);
344
+ })), y(!1);
345
345
  } catch (e) {
346
- E(z(e));
346
+ E(B(e));
347
347
  } finally {
348
- G(!1);
348
+ W(!1);
349
349
  }
350
350
  }, $ = async (e, t) => {
351
351
  if (!M.has(e)) {
352
- I((t) => new Set(t).add(e));
352
+ N((t) => new Set(t).add(e));
353
353
  try {
354
354
  await t();
355
355
  } catch (e) {
356
356
  l({
357
- title: z(e),
357
+ title: B(e),
358
358
  variant: "error"
359
359
  });
360
360
  } finally {
361
- I((t) => {
361
+ N((t) => {
362
362
  let n = new Set(t);
363
363
  return n.delete(e), n;
364
364
  });
365
365
  }
366
366
  }
367
367
  }, ve = (e, t) => $(e.id, async () => {
368
- await J({ variables: {
368
+ await q({ variables: {
369
369
  id: e.id,
370
370
  input: { enabled: t }
371
371
  } }), l({
@@ -373,9 +373,9 @@ function U() {
373
373
  variant: "success"
374
374
  });
375
375
  }), ye = (e) => $(e.id, async () => {
376
- let t = (await me({ variables: { id: e.id } })).data?.runTimeCampusTimeTrigger;
376
+ let t = (await he({ variables: { id: e.id } })).data?.runTimeCampusTimeTrigger;
377
377
  if (!t) return;
378
- let n = v(e.metric, t.value);
378
+ let n = _(e.metric, t.value);
379
379
  t.fired ? l({
380
380
  title: `${e.name} fired`,
381
381
  description: `Today is at ${n}. ${t.notified ? "A nudge is on its way." : "The nudge could not be delivered."}`,
@@ -393,8 +393,8 @@ function U() {
393
393
  description: `Today is at ${n}, so the condition does not hold.`,
394
394
  variant: "info"
395
395
  });
396
- }), be = (e) => (U(null), $(e.id, async () => {
397
- await pe({ variables: { id: e.id } }), l({
396
+ }), be = (e) => (R(null), $(e.id, async () => {
397
+ await me({ variables: { id: e.id } }), l({
398
398
  title: `${e.name} deleted`,
399
399
  variant: "success"
400
400
  });
@@ -403,10 +403,10 @@ function U() {
403
403
  title: "Time Triggers",
404
404
  description: "Nudges from your own time data",
405
405
  purpose: "Write a rule over today's tracked time, focus or context switches. TimeCampus checks it through the day and nudges you once when it holds. Each firing is also published to FluidGrids, so a workflow can take it further.",
406
- actions: Z ? /* @__PURE__ */ j("button", {
406
+ actions: X ? /* @__PURE__ */ j("button", {
407
407
  type: "button",
408
- className: P,
409
- onClick: () => Q(),
408
+ className: F,
409
+ onClick: () => Z(),
410
410
  children: [/* @__PURE__ */ A(D, {
411
411
  className: "h-4 w-4",
412
412
  "aria-hidden": "true"
@@ -417,22 +417,22 @@ function U() {
417
417
  toasts: c,
418
418
  onDismiss: u
419
419
  }),
420
- de && !K ? /* @__PURE__ */ A(n, {
420
+ fe && !G ? /* @__PURE__ */ A(n, {
421
421
  variant: "card",
422
422
  count: 3
423
- }) : q ? /* @__PURE__ */ A(r, {
423
+ }) : K ? /* @__PURE__ */ A(r, {
424
424
  title: "Couldn't load your time triggers",
425
- description: q.message,
425
+ description: K.message,
426
426
  illustration: "error-state"
427
- }) : Z ? Y.length === 0 ? /* @__PURE__ */ j("div", {
427
+ }) : X ? J.length === 0 ? /* @__PURE__ */ j("div", {
428
428
  className: "flex flex-col gap-4",
429
429
  children: [/* @__PURE__ */ A(r, {
430
430
  title: "No time triggers yet",
431
431
  description: "Start from one of these, or write your own.",
432
432
  action: /* @__PURE__ */ j("button", {
433
433
  type: "button",
434
- className: P,
435
- onClick: () => Q(),
434
+ className: F,
435
+ onClick: () => Z(),
436
436
  children: [/* @__PURE__ */ A(D, {
437
437
  className: "h-4 w-4",
438
438
  "aria-hidden": "true"
@@ -440,16 +440,16 @@ function U() {
440
440
  })
441
441
  }), /* @__PURE__ */ A("div", {
442
442
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-4",
443
- children: ie.map((e) => /* @__PURE__ */ j("button", {
443
+ children: ae.map((e) => /* @__PURE__ */ j("button", {
444
444
  type: "button",
445
- onClick: () => Q(e),
445
+ onClick: () => Z(e),
446
446
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-start hover:bg-bg-surface-hover",
447
447
  children: [/* @__PURE__ */ A("p", {
448
448
  className: "font-medium text-text-primary",
449
449
  children: e.name
450
450
  }), /* @__PURE__ */ A("p", {
451
451
  className: "mt-1 text-sm text-text-secondary",
452
- children: g({
452
+ children: h({
453
453
  ...e,
454
454
  threshold: Number(e.threshold)
455
455
  })
@@ -458,21 +458,21 @@ function U() {
458
458
  })]
459
459
  }) : /* @__PURE__ */ A("div", {
460
460
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",
461
- children: Y.map((e) => /* @__PURE__ */ A(H, {
461
+ children: J.map((e) => /* @__PURE__ */ A(de, {
462
462
  trigger: e,
463
463
  busy: M.has(e.id),
464
464
  onToggle: (t) => ve(e, t),
465
465
  onRun: () => ye(e),
466
- onEdit: () => ge(e),
467
- onDelete: () => U(e),
468
- onUseInWorkflow: () => d(oe(e))
466
+ onEdit: () => Q(e),
467
+ onDelete: () => R(e),
468
+ onUseInWorkflow: () => d(x(e))
469
469
  }, e.id))
470
470
  }) : /* @__PURE__ */ A(r, {
471
471
  title: "Install the Time Triggers applet",
472
472
  description: "Time triggers are an applet. A workspace admin can install it from the applet store; your triggers start running as soon as it is installed.",
473
473
  action: /* @__PURE__ */ j("button", {
474
474
  type: "button",
475
- className: P,
475
+ className: F,
476
476
  onClick: () => d("/timecampus/applets"),
477
477
  children: [/* @__PURE__ */ A(ce, {
478
478
  className: "h-4 w-4",
@@ -480,7 +480,7 @@ function U() {
480
480
  }), "Open the applet store"]
481
481
  })
482
482
  }),
483
- Z && /* @__PURE__ */ j("section", {
483
+ X && /* @__PURE__ */ j("section", {
484
484
  className: "mt-8",
485
485
  "aria-labelledby": "trigger-history-heading",
486
486
  children: [/* @__PURE__ */ j("div", {
@@ -491,33 +491,33 @@ function U() {
491
491
  children: "Recent firings"
492
492
  }), /* @__PURE__ */ j("button", {
493
493
  type: "button",
494
- className: F,
494
+ className: I,
495
495
  onClick: () => d("/workflows/list"),
496
496
  children: [/* @__PURE__ */ A(k, {
497
497
  className: "h-4 w-4",
498
498
  "aria-hidden": "true"
499
499
  }), "Automate with FluidGrids"]
500
500
  })]
501
- }), X.length === 0 ? /* @__PURE__ */ A("p", {
501
+ }), Y.length === 0 ? /* @__PURE__ */ A("p", {
502
502
  className: "text-sm text-text-tertiary",
503
503
  children: "Nothing has fired yet."
504
504
  }) : /* @__PURE__ */ A("ul", {
505
505
  className: "divide-y divide-border-subtle rounded-lg border border-border-subtle bg-bg-surface",
506
- children: X.map((e) => /* @__PURE__ */ j("li", {
506
+ children: Y.map((e) => /* @__PURE__ */ j("li", {
507
507
  className: "flex flex-wrap items-center justify-between gap-2 px-4 py-3 text-sm",
508
508
  children: [
509
509
  /* @__PURE__ */ A("span", {
510
510
  className: "font-medium text-text-primary",
511
- children: he.get(e.triggerId) ?? "Deleted trigger"
511
+ children: ge.get(e.triggerId) ?? "Deleted trigger"
512
512
  }),
513
513
  /* @__PURE__ */ j("span", {
514
514
  className: "text-text-secondary",
515
515
  children: [
516
- v(e.metric, e.value),
516
+ _(e.metric, e.value),
517
517
  " (",
518
518
  e.comparator === "BELOW" ? "below" : "above",
519
519
  " ",
520
- v(e.metric, e.threshold),
520
+ _(e.metric, e.threshold),
521
521
  ")"
522
522
  ]
523
523
  }),
@@ -540,28 +540,28 @@ function U() {
540
540
  })]
541
541
  }),
542
542
  /* @__PURE__ */ j(i, {
543
- open: y,
544
- onClose: () => b(!1),
545
- title: m ? `Edit ${m.name}` : "New time trigger",
543
+ open: v,
544
+ onClose: () => y(!1),
545
+ title: p ? `Edit ${p.name}` : "New time trigger",
546
546
  description: "Fires at most once a day, from the hour you choose.",
547
547
  size: "lg",
548
548
  footer: /* @__PURE__ */ j("div", {
549
549
  className: "flex justify-end gap-2",
550
550
  children: [/* @__PURE__ */ A("button", {
551
551
  type: "button",
552
- className: F,
553
- onClick: () => b(!1),
552
+ className: I,
553
+ onClick: () => y(!1),
554
554
  children: "Cancel"
555
555
  }), /* @__PURE__ */ A("button", {
556
556
  type: "button",
557
- className: P,
557
+ className: F,
558
558
  onClick: () => void _e(),
559
- disabled: W,
560
- children: W ? "Saving…" : m ? "Save" : "Create trigger"
559
+ disabled: U,
560
+ children: U ? "Saving…" : p ? "Save" : "Create trigger"
561
561
  })]
562
562
  }),
563
- children: [/* @__PURE__ */ A(V, {
564
- form: x,
563
+ children: [/* @__PURE__ */ A(H, {
564
+ form: b,
565
565
  onChange: w
566
566
  }), T && /* @__PURE__ */ A("p", {
567
567
  role: "alert",
@@ -571,15 +571,15 @@ function U() {
571
571
  }),
572
572
  /* @__PURE__ */ A(i, {
573
573
  open: L !== null,
574
- onClose: () => U(null),
574
+ onClose: () => R(null),
575
575
  title: "Delete time trigger",
576
576
  description: "This cannot be undone.",
577
577
  footer: /* @__PURE__ */ j("div", {
578
578
  className: "flex justify-end gap-2",
579
579
  children: [/* @__PURE__ */ A("button", {
580
580
  type: "button",
581
- className: F,
582
- onClick: () => U(null),
581
+ className: I,
582
+ onClick: () => R(null),
583
583
  children: "Cancel"
584
584
  }), /* @__PURE__ */ j("button", {
585
585
  type: "button",