@burdenoff/microfe-timecampus 2026.1206.1 → 2026.1206.3

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 (47) hide show
  1. package/dist/generated/global-types.d.ts +7409 -959
  2. package/dist/generated/wspace-operations.d.ts +46 -12
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/generated/wspace-types.d.ts +107058 -11342
  5. package/dist/generated/wspace-types.js +1 -1
  6. package/dist/generated/wspace-types.js.map +1 -1
  7. package/dist/timecampus/components/DateFields.d.ts +53 -0
  8. package/dist/timecampus/components/DateFields.js +87 -0
  9. package/dist/timecampus/components/DateFields.js.map +1 -0
  10. package/dist/timecampus/components/dateFieldValues.d.ts +39 -0
  11. package/dist/timecampus/components/dateFieldValues.js +49 -0
  12. package/dist/timecampus/components/dateFieldValues.js.map +1 -0
  13. package/dist/timecampus/pages/channels/channelCatalog.js +2 -1
  14. package/dist/timecampus/pages/channels/channelCatalog.js.map +1 -1
  15. package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js +112 -111
  16. package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js.map +1 -1
  17. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +65 -65
  18. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
  19. package/dist/timecampus/pages/focus/FocusProtectionPage.js +250 -253
  20. package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
  21. package/dist/timecampus/pages/invoicing/InvoicingPage.js +259 -258
  22. package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
  23. package/dist/timecampus/pages/lifetime/FiniteLifePage.js +103 -103
  24. package/dist/timecampus/pages/lifetime/FiniteLifePage.js.map +1 -1
  25. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +38 -38
  26. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
  27. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js +218 -216
  28. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js.map +1 -1
  29. package/dist/timecampus/pages/meetings/ActionItemFormModal.js +64 -63
  30. package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
  31. package/dist/timecampus/pages/meetings/MeetingCreatePage.js +54 -54
  32. package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
  33. package/dist/timecampus/pages/meetings/MeetingFormModal.js +98 -96
  34. package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
  35. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +150 -149
  36. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  37. package/dist/timecampus/pages/projects/TasksPage.js +183 -182
  38. package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
  39. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +346 -351
  40. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
  41. package/dist/timecampus/pages/time/TimeEntriesPage.js +129 -127
  42. package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
  43. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js +46 -47
  44. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js.map +1 -1
  45. package/dist/timecampus/pages/timeline/TimelinePage.js +231 -231
  46. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  47. package/package.json +4 -2
@@ -0,0 +1,53 @@
1
+ export interface DateFieldProps {
2
+ /** `YYYY-MM-DD`, or `""` for none. */
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ /** What the date is ("Due date"): the picker's accessible name. */
6
+ label: string;
7
+ placeholder?: string;
8
+ min?: string;
9
+ max?: string;
10
+ /** Show a clear button while there is a date. */
11
+ clearable?: boolean;
12
+ disabled?: boolean;
13
+ id?: string;
14
+ /**
15
+ * Sits in a row of controls (a toolbar) instead of filling a form column under its label:
16
+ * no top margin, and the button keeps its own width.
17
+ */
18
+ inline?: boolean;
19
+ }
20
+ export declare function DateField({ value, onChange, label, placeholder, min, max, clearable, disabled, id, inline, }: DateFieldProps): import('react').JSX.Element;
21
+ export interface TimeFieldProps {
22
+ /** `HH:mm`, 24-hour, or `""` for none. */
23
+ value: string;
24
+ onChange: (value: string) => void;
25
+ /** What the time is ("Workday start"): the picker's accessible name. */
26
+ label: string;
27
+ placeholder?: string;
28
+ /** Minutes between the listed times. Default 15. */
29
+ step?: number;
30
+ minTime?: string;
31
+ maxTime?: string;
32
+ disabled?: boolean;
33
+ id?: string;
34
+ className?: string;
35
+ }
36
+ export declare function TimeField({ value, onChange, label, placeholder, step, minTime, maxTime, disabled, id, className, }: TimeFieldProps): import('react').JSX.Element;
37
+ export interface DateTimeFieldProps {
38
+ /** `YYYY-MM-DDTHH:mm` in local time, or `""` for none. */
39
+ value: string;
40
+ onChange: (value: string) => void;
41
+ /** What the moment is ("Start"): the pickers are named "<label> date" and "<label> time". */
42
+ label: string;
43
+ /** The latest moment, `YYYY-MM-DDTHH:mm`. */
44
+ max?: string;
45
+ /** Minutes between the listed times. Default 15. */
46
+ step?: number;
47
+ /** Show a clear button while there is a value. */
48
+ clearable?: boolean;
49
+ disabled?: boolean;
50
+ /** The day picker's id, for a `<label htmlFor>`. */
51
+ id?: string;
52
+ }
53
+ export declare function DateTimeField({ value, onChange, label, max, step, clearable, disabled, id, }: DateTimeFieldProps): import('react').JSX.Element;
@@ -0,0 +1,87 @@
1
+ import { isDateString as e, isTimeString as t, maxTimeOn as n, splitDateTime as r, withPickedDate as i, withPickedTime as a } from "./dateFieldValues.js";
2
+ import { X as o } from "lucide-react";
3
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ import { DatePicker as l, TimePicker as u } from "@burdenoff/fe-libs/ui";
5
+ // src/timecampus/components/DateFields.tsx
6
+ var d = "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-text-secondary hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/40";
7
+ function f({ label: e, onClear: t }) {
8
+ return /* @__PURE__ */ s("button", {
9
+ type: "button",
10
+ onClick: t,
11
+ "aria-label": `Clear ${e.toLowerCase()}`,
12
+ title: `Clear ${e.toLowerCase()}`,
13
+ className: d,
14
+ children: /* @__PURE__ */ s(o, {
15
+ className: "h-4 w-4",
16
+ "aria-hidden": !0
17
+ })
18
+ });
19
+ }
20
+ var p = "mt-1 flex w-full items-center gap-1";
21
+ function m({ value: t, onChange: n, label: r, placeholder: i, min: a, max: o, clearable: u = !1, disabled: d, id: m, inline: h = !1 }) {
22
+ let g = /* @__PURE__ */ s(l, {
23
+ id: m,
24
+ value: e(t) ? t : null,
25
+ onChange: n,
26
+ label: r,
27
+ placeholder: i,
28
+ min: e(a) ? a : void 0,
29
+ max: e(o) ? o : void 0,
30
+ disabled: d,
31
+ className: h ? void 0 : "min-w-0 flex-1"
32
+ });
33
+ return h && !u ? g : /* @__PURE__ */ c("span", {
34
+ className: h ? "flex items-center gap-1" : p,
35
+ children: [g, t && !d ? /* @__PURE__ */ s(f, {
36
+ label: r,
37
+ onClear: () => n("")
38
+ }) : null]
39
+ });
40
+ }
41
+ function h({ value: e, onChange: n, label: r, placeholder: i, step: a, minTime: o, maxTime: c, disabled: l, id: d, className: f }) {
42
+ return /* @__PURE__ */ s(u, {
43
+ id: d,
44
+ value: t(e) ? e : null,
45
+ onChange: (e) => n(e),
46
+ label: r,
47
+ placeholder: i,
48
+ step: a,
49
+ minTime: o,
50
+ maxTime: c,
51
+ disabled: l,
52
+ className: f
53
+ });
54
+ }
55
+ function g({ value: e, onChange: t, label: o, max: d, step: p, clearable: m = !1, disabled: h, id: g }) {
56
+ let { date: _, time: v } = r(e), y = r(d).date ?? void 0;
57
+ return /* @__PURE__ */ c("span", {
58
+ className: "flex flex-wrap items-center gap-2",
59
+ "data-slot": "date-time-field",
60
+ children: [
61
+ /* @__PURE__ */ s(l, {
62
+ id: g,
63
+ value: _,
64
+ onChange: (n) => t(i(e, n, d)),
65
+ label: `${o} date`,
66
+ max: y,
67
+ disabled: h,
68
+ className: "min-w-0 flex-1"
69
+ }),
70
+ /* @__PURE__ */ s(u, {
71
+ value: v,
72
+ onChange: (n) => t(a(e, n, d)),
73
+ label: `${o} time`,
74
+ step: p,
75
+ maxTime: n(_, d),
76
+ disabled: h
77
+ }),
78
+ m && e && !h ? /* @__PURE__ */ s(f, {
79
+ label: o,
80
+ onClear: () => t("")
81
+ }) : null
82
+ ]
83
+ });
84
+ }
85
+ export { m as DateField, g as DateTimeField, h as TimeField };
86
+
87
+ //# sourceMappingURL=DateFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateFields.js","names":["CLEAR_BUTTON_CLASS","ClearButton","onClear","label","X","FORM_FIELD_CLASS","DateField","picker","DatePicker","isDateString","value","min","max","inline","clearable","disabled","onChange","TimeField","TimePicker","isTimeString","time","DateTimeField","splitDateTime","maxDate","date","withPickedDate","picked","withPickedTime","maxTimeOn"],"sources":["../../../src/timecampus/components/DateFields.tsx"],"sourcesContent":["/**\n * BOFF-18708: the module's date and time fields, on fe-libs' themed pickers.\n *\n * Native `<input type=\"date\">`, `type=\"time\"` and `type=\"datetime-local\"` fields draw the\n * browser's own control, which ignores the app theme in dark mode. These wrap fe-libs'\n * `DatePicker` and `TimePicker` and keep the native string values (see `dateFieldValues`), so a\n * page swaps its input for a field without touching its form state.\n *\n * - `DateField`: `YYYY-MM-DD`, `\"\"` when empty.\n * - `TimeField`: `HH:mm`, 24-hour.\n * - `DateTimeField`: `YYYY-MM-DDTHH:mm` in local time, a day picker and a time picker side by\n * side. Picking a day first keeps 09:00 as the time; picking a time first takes today.\n *\n * A field with `clearable` shows a clear button while it has a value, as the native optional\n * date fields could be emptied.\n */\nimport { DatePicker, TimePicker } from \"@burdenoff/fe-libs/ui\";\nimport { X } from \"lucide-react\";\n\nimport {\n isDateString,\n isTimeString,\n maxTimeOn,\n splitDateTime,\n withPickedDate,\n withPickedTime,\n} from \"./dateFieldValues\";\n\nconst CLEAR_BUTTON_CLASS =\n \"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-text-secondary hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/40\";\n\nfunction ClearButton({\n label,\n onClear,\n}: {\n label: string;\n onClear: () => void;\n}) {\n return (\n <button\n type=\"button\"\n onClick={onClear}\n aria-label={`Clear ${label.toLowerCase()}`}\n title={`Clear ${label.toLowerCase()}`}\n className={CLEAR_BUTTON_CLASS}\n >\n <X className=\"h-4 w-4\" aria-hidden />\n </button>\n );\n}\n\nexport interface DateFieldProps {\n /** `YYYY-MM-DD`, or `\"\"` for none. */\n value: string;\n onChange: (value: string) => void;\n /** What the date is (\"Due date\"): the picker's accessible name. */\n label: string;\n placeholder?: string;\n min?: string;\n max?: string;\n /** Show a clear button while there is a date. */\n clearable?: boolean;\n disabled?: boolean;\n id?: string;\n /**\n * Sits in a row of controls (a toolbar) instead of filling a form column under its label:\n * no top margin, and the button keeps its own width.\n */\n inline?: boolean;\n}\n\n/** A form field under its label: the gap the native inputs had (`mt-1`), the column's width. */\nconst FORM_FIELD_CLASS = \"mt-1 flex w-full items-center gap-1\";\n\nexport function DateField({\n value,\n onChange,\n label,\n placeholder,\n min,\n max,\n clearable = false,\n disabled,\n id,\n inline = false,\n}: DateFieldProps) {\n const picker = (\n <DatePicker\n id={id}\n value={isDateString(value) ? value : null}\n onChange={onChange}\n label={label}\n placeholder={placeholder}\n min={isDateString(min) ? min : undefined}\n max={isDateString(max) ? max : undefined}\n disabled={disabled}\n className={inline ? undefined : \"min-w-0 flex-1\"}\n />\n );\n if (inline && !clearable) return picker;\n return (\n <span className={inline ? \"flex items-center gap-1\" : FORM_FIELD_CLASS}>\n {picker}\n {value && !disabled ? (\n <ClearButton label={label} onClear={() => onChange(\"\")} />\n ) : null}\n </span>\n );\n}\n\nexport interface TimeFieldProps {\n /** `HH:mm`, 24-hour, or `\"\"` for none. */\n value: string;\n onChange: (value: string) => void;\n /** What the time is (\"Workday start\"): the picker's accessible name. */\n label: string;\n placeholder?: string;\n /** Minutes between the listed times. Default 15. */\n step?: number;\n minTime?: string;\n maxTime?: string;\n disabled?: boolean;\n id?: string;\n className?: string;\n}\n\nexport function TimeField({\n value,\n onChange,\n label,\n placeholder,\n step,\n minTime,\n maxTime,\n disabled,\n id,\n className,\n}: TimeFieldProps) {\n return (\n <TimePicker\n id={id}\n value={isTimeString(value) ? value : null}\n onChange={(time) => onChange(time)}\n label={label}\n placeholder={placeholder}\n step={step}\n minTime={minTime}\n maxTime={maxTime}\n disabled={disabled}\n className={className}\n />\n );\n}\n\nexport interface DateTimeFieldProps {\n /** `YYYY-MM-DDTHH:mm` in local time, or `\"\"` for none. */\n value: string;\n onChange: (value: string) => void;\n /** What the moment is (\"Start\"): the pickers are named \"<label> date\" and \"<label> time\". */\n label: string;\n /** The latest moment, `YYYY-MM-DDTHH:mm`. */\n max?: string;\n /** Minutes between the listed times. Default 15. */\n step?: number;\n /** Show a clear button while there is a value. */\n clearable?: boolean;\n disabled?: boolean;\n /** The day picker's id, for a `<label htmlFor>`. */\n id?: string;\n}\n\nexport function DateTimeField({\n value,\n onChange,\n label,\n max,\n step,\n clearable = false,\n disabled,\n id,\n}: DateTimeFieldProps) {\n const { date, time } = splitDateTime(value);\n const maxDate = splitDateTime(max).date ?? undefined;\n return (\n <span\n className=\"flex flex-wrap items-center gap-2\"\n data-slot=\"date-time-field\"\n >\n <DatePicker\n id={id}\n value={date}\n onChange={(picked) => onChange(withPickedDate(value, picked, max))}\n label={`${label} date`}\n max={maxDate}\n disabled={disabled}\n className=\"min-w-0 flex-1\"\n />\n <TimePicker\n value={time}\n onChange={(picked) => onChange(withPickedTime(value, picked, max))}\n label={`${label} time`}\n step={step}\n maxTime={maxTimeOn(date, max)}\n disabled={disabled}\n />\n {clearable && value && !disabled ? (\n <ClearButton label={label} onClear={() => onChange(\"\")} />\n ) : null}\n </span>\n );\n}\n"],"mappings":";;;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D;EACE,WAAU;EACV,aAAU;EAFZ,UAAA;GAIE,kBAACJ,GAAD;IACM;IACJ,OAAOgB;IACP,WAAW,MAAWR,EAASS,EAAef,GAAOgB,GAAQd,CAAG,CAAC;IACjE,OAAO,GAAGT,EAAM;IAChB,KAAKoB;IACK;IACV,WAAU;GACX,CAAA;GACD,kBAACL,GAAD;IACE,OAAOE;IACP,WAAW,MAAWJ,EAASW,EAAejB,GAAOgB,GAAQd,CAAG,CAAC;IACjE,OAAO,GAAGT,EAAM;IACV;IACN,SAASyB,EAAUJ,GAAMZ,CAAG;IAClB;GACX,CAAA;GACAE,KAAaJ,KAAS,CAACK,IACtB,kBAACd,GAAD;IAAoB;IAAO,eAAee,EAAS,EAAE;GAAI,CAAA,IACvD;EACA;;AAEV"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * BOFF-18708: the value helpers behind the module's themed date and time fields.
3
+ *
4
+ * The fields keep the string shapes the native inputs used, so form state, validation and the
5
+ * GraphQL mapping stay as they were:
6
+ * - a date is `YYYY-MM-DD` (what `<input type="date">` produced), `""` when empty;
7
+ * - a time is `HH:mm` on a 24-hour clock (`<input type="time">`), `""` when empty;
8
+ * - a date and time is `YYYY-MM-DDTHH:mm` in local time (`<input type="datetime-local">`).
9
+ */
10
+ /** The time a date-and-time field takes when a day is picked before any time. */
11
+ export declare const DEFAULT_TIME_OF_DAY = "09:00";
12
+ export declare function isDateString(value: string | null | undefined): value is string;
13
+ export declare function isTimeString(value: string | null | undefined): value is string;
14
+ export interface DateTimeParts {
15
+ /** `YYYY-MM-DD`, or `null` when the value has no valid day. */
16
+ date: string | null;
17
+ /** `HH:mm`, or `null` when the value has no valid time. */
18
+ time: string | null;
19
+ }
20
+ /** Splits a `YYYY-MM-DDTHH:mm` value (seconds are dropped) into its day and time. */
21
+ export declare function splitDateTime(value: string | null | undefined): DateTimeParts;
22
+ /** Joins a day and a time into a `YYYY-MM-DDTHH:mm` value. */
23
+ export declare function joinDateTime(date: string, time: string): string;
24
+ /** Today on this device, `YYYY-MM-DD`. */
25
+ export declare function localToday(now?: Date): string;
26
+ /**
27
+ * The value after a day is picked: the time already chosen is kept, else the default time,
28
+ * pulled back to the latest allowed time when the day is the `max` day.
29
+ */
30
+ export declare function withPickedDate(current: string | null | undefined, date: string, max?: string): string;
31
+ /**
32
+ * The value after a time is picked: the day already chosen is kept, else today, pulled back
33
+ * to `max` when it would pass it.
34
+ */
35
+ export declare function withPickedTime(current: string | null | undefined, time: string, max?: string, now?: Date): string;
36
+ /** `value`, or `max` when `value` is later. Both are `YYYY-MM-DDTHH:mm`, which sort as text. */
37
+ export declare function clampToMax(value: string, max?: string): string;
38
+ /** The latest time a time list offers on `date`: the `max` time on the `max` day, else none. */
39
+ export declare function maxTimeOn(date: string | null, max?: string): string | undefined;
@@ -0,0 +1,49 @@
1
+ // src/timecampus/components/dateFieldValues.ts
2
+ var e = /^\d{4}-\d{2}-\d{2}$/, t = /^([01]\d|2[0-3]):[0-5]\d$/, n = "09:00";
3
+ function r(t) {
4
+ return typeof t == "string" && e.test(t);
5
+ }
6
+ function i(e) {
7
+ return typeof e == "string" && t.test(e);
8
+ }
9
+ function a(e) {
10
+ if (!e) return {
11
+ date: null,
12
+ time: null
13
+ };
14
+ let [t = "", n = ""] = e.split("T"), a = r(t) ? t : null, o = n.slice(0, 5);
15
+ return {
16
+ date: a,
17
+ time: i(o) ? o : null
18
+ };
19
+ }
20
+ function o(e, t) {
21
+ return `${e}T${t}`;
22
+ }
23
+ function s(e = /* @__PURE__ */ new Date()) {
24
+ let t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
25
+ return `${e.getFullYear()}-${t}-${n}`;
26
+ }
27
+ function c(e, t, n) {
28
+ let { time: r } = a(e);
29
+ return u(o(t, r ?? "09:00"), n);
30
+ }
31
+ function l(e, t, n, r = /* @__PURE__ */ new Date()) {
32
+ let { date: i } = a(e);
33
+ return u(o(i ?? s(r), t), n);
34
+ }
35
+ function u(e, t) {
36
+ if (!t) return e;
37
+ let { date: n, time: r } = a(t);
38
+ if (!n || !r) return e;
39
+ let i = o(n, r);
40
+ return e > i ? i : e;
41
+ }
42
+ function d(e, t) {
43
+ if (!e || !t) return;
44
+ let n = a(t);
45
+ return n.date === e && n.time ? n.time : void 0;
46
+ }
47
+ export { n as DEFAULT_TIME_OF_DAY, u as clampToMax, r as isDateString, i as isTimeString, o as joinDateTime, s as localToday, d as maxTimeOn, a as splitDateTime, c as withPickedDate, l as withPickedTime };
48
+
49
+ //# sourceMappingURL=dateFieldValues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dateFieldValues.js","names":["DATE_VALUE","TIME_VALUE","DEFAULT_TIME_OF_DAY","isDateString","value","isTimeString","splitDateTime","datePart","timePart","date","time","joinDateTime","localToday","month","now","day","withPickedDate","current","clampToMax","max","withPickedTime","limit","maxTimeOn"],"sources":["../../../src/timecampus/components/dateFieldValues.ts"],"sourcesContent":["/**\n * BOFF-18708: the value helpers behind the module's themed date and time fields.\n *\n * The fields keep the string shapes the native inputs used, so form state, validation and the\n * GraphQL mapping stay as they were:\n * - a date is `YYYY-MM-DD` (what `<input type=\"date\">` produced), `\"\"` when empty;\n * - a time is `HH:mm` on a 24-hour clock (`<input type=\"time\">`), `\"\"` when empty;\n * - a date and time is `YYYY-MM-DDTHH:mm` in local time (`<input type=\"datetime-local\">`).\n */\n\nconst DATE_VALUE = /^\\d{4}-\\d{2}-\\d{2}$/;\nconst TIME_VALUE = /^([01]\\d|2[0-3]):[0-5]\\d$/;\n\n/** The time a date-and-time field takes when a day is picked before any time. */\nexport const DEFAULT_TIME_OF_DAY = \"09:00\";\n\nexport function isDateString(\n value: string | null | undefined,\n): value is string {\n return typeof value === \"string\" && DATE_VALUE.test(value);\n}\n\nexport function isTimeString(\n value: string | null | undefined,\n): value is string {\n return typeof value === \"string\" && TIME_VALUE.test(value);\n}\n\nexport interface DateTimeParts {\n /** `YYYY-MM-DD`, or `null` when the value has no valid day. */\n date: string | null;\n /** `HH:mm`, or `null` when the value has no valid time. */\n time: string | null;\n}\n\n/** Splits a `YYYY-MM-DDTHH:mm` value (seconds are dropped) into its day and time. */\nexport function splitDateTime(value: string | null | undefined): DateTimeParts {\n if (!value) return { date: null, time: null };\n const [datePart = \"\", timePart = \"\"] = value.split(\"T\");\n const date = isDateString(datePart) ? datePart : null;\n const time = timePart.slice(0, 5);\n return { date, time: isTimeString(time) ? time : null };\n}\n\n/** Joins a day and a time into a `YYYY-MM-DDTHH:mm` value. */\nexport function joinDateTime(date: string, time: string): string {\n return `${date}T${time}`;\n}\n\n/** Today on this device, `YYYY-MM-DD`. */\nexport function localToday(now: Date = new Date()): string {\n const month = String(now.getMonth() + 1).padStart(2, \"0\");\n const day = String(now.getDate()).padStart(2, \"0\");\n return `${now.getFullYear()}-${month}-${day}`;\n}\n\n/**\n * The value after a day is picked: the time already chosen is kept, else the default time,\n * pulled back to the latest allowed time when the day is the `max` day.\n */\nexport function withPickedDate(\n current: string | null | undefined,\n date: string,\n max?: string,\n): string {\n const { time } = splitDateTime(current);\n return clampToMax(joinDateTime(date, time ?? DEFAULT_TIME_OF_DAY), max);\n}\n\n/**\n * The value after a time is picked: the day already chosen is kept, else today, pulled back\n * to `max` when it would pass it.\n */\nexport function withPickedTime(\n current: string | null | undefined,\n time: string,\n max?: string,\n now: Date = new Date(),\n): string {\n const { date } = splitDateTime(current);\n return clampToMax(joinDateTime(date ?? localToday(now), time), max);\n}\n\n/** `value`, or `max` when `value` is later. Both are `YYYY-MM-DDTHH:mm`, which sort as text. */\nexport function clampToMax(value: string, max?: string): string {\n if (!max) return value;\n const { date, time } = splitDateTime(max);\n if (!date || !time) return value;\n const limit = joinDateTime(date, time);\n return value > limit ? limit : value;\n}\n\n/** The latest time a time list offers on `date`: the `max` time on the `max` day, else none. */\nexport function maxTimeOn(\n date: string | null,\n max?: string,\n): string | undefined {\n if (!date || !max) return undefined;\n const limit = splitDateTime(max);\n return limit.date === date && limit.time ? limit.time : undefined;\n}\n"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C,GAAK,OAAOf;CACjB,IAAM,EAAE,SAAM,YAASE,EAAca,CAAG;CACxC,IAAI,CAACV,KAAQ,CAACC,GAAM,OAAON;CAC3B,IAAMiB,IAAQV,EAAaF,GAAMC,CAAI;CACrC,OAAON,IAAQiB,IAAQA,IAAQjB;AACjC;AAGA,SAAgBkB,EACd,GACA,GACoB;CACpB,IAAI,CAACb,KAAQ,CAACU,GAAK;CACnB,IAAME,IAAQf,EAAca,CAAG;CAC/B,OAAOE,EAAM,SAASZ,KAAQY,EAAM,OAAOA,EAAM,OAAO,KAAA;AAC1D"}
@@ -140,7 +140,8 @@ var S = {
140
140
  [i.Email]: "Email",
141
141
  [i.Code]: "Code",
142
142
  [i.ProjectManagement]: "Project management",
143
- [i.Documents]: "Documents"
143
+ [i.Documents]: "Documents",
144
+ [i.Sales]: "Sales"
144
145
  };
145
146
  function C(e) {
146
147
  let t = S[e];
@@ -1 +1 @@
1
- {"version":3,"file":"channelCatalog.js","names":["ChannelType","SyncStatus","PrivacyMode","ChannelStatus","PullProviderGroup","CHANNEL_SETUP_HINT","AUTOMATIC_CHANNEL_HINT","CLI_CHANNEL_HINT","channelSetupHint","type","TimeCampusCaptureChannelType","provider","CHANNEL_CATALOG","INTEGRATION_ENTRY","catalogEntry","entry","oauthCallbackUrl","apiGatewayUrl","pullHealth","channel","TimeCampusCaptureChannelSyncStatus","PRIVACY_OPTIONS","TimeCampusCaptureChannelPrivacyMode","privacyLabel","o","mode","statusDisplay","status","TimeCampusCaptureChannelStatus","formatSyncInterval","minutes","formatRetention","days","isOverdue","syncIntervalMinutes","lastSyncAt","now","parseOptionalPositiveInt","trimmed","raw","value","max","matchesChannelSearch","q","query","PULL_PROVIDER_GROUP_LABELS","TimeCampusCapturePullProviderGroup","pullProviderGroupLabel","known","group","words","PULL_PROVIDER_GROUP_ORDER","groupPullProviders","byGroup","providers","list","rank","index","a","b"],"sources":["../../../../src/timecampus/pages/channels/channelCatalog.ts"],"sourcesContent":["/**\n * Capture-channel catalogue and display helpers (BOFF-4036).\n *\n * Pure functions only, so the page stays thin and this logic is unit-tested.\n */\nimport {\n TimeCampusCaptureChannelPrivacyMode as PrivacyMode,\n TimeCampusCaptureChannelStatus as ChannelStatus,\n TimeCampusCaptureChannelSyncStatus as SyncStatus,\n TimeCampusCaptureChannelType as ChannelType,\n TimeCampusCapturePullProviderGroup as PullProviderGroup,\n} from \"@/generated/wspace-types\";\n\nexport interface ChannelCatalogEntry {\n type: ChannelType;\n label: string;\n description: string;\n /** Name suggested when connecting a channel of this type. */\n defaultName: string;\n}\n\nexport const CHANNEL_SETUP_HINT =\n \"Sources send this ID as channelId when they push activity to TimeCampus \" +\n \"(ingestTimeCampusCaptureEvents). Use it from the API, your own scripts or \" +\n \"any client that lets you set a channel ID; events then follow this \" +\n \"channel's status, privacy and retention settings.\";\n\nexport const AUTOMATIC_CHANNEL_HINT =\n \"The TimeCampus mobile app registers this channel for your device and \" +\n \"sends its activity here automatically, so there is nothing to copy. \" +\n \"Pause or disconnect the channel to stop capture on the device; its \" +\n \"privacy and retention settings apply to everything it sends.\";\n\nexport const CLI_CHANNEL_HINT =\n \"The TimeCampus CLI saves this channel for the selected workspace when you run \" +\n \"timecampus channel connect. Send timing events explicitly with \" +\n \"timecampus capture send <file> or pipe JSON to timecampus capture send -. \" +\n \"The CLI does not collect shell history.\";\n\nexport function channelSetupHint(\n type: ChannelType,\n provider?: string | null,\n): string {\n if (type === ChannelType.Mobile) return AUTOMATIC_CHANNEL_HINT;\n if (type === ChannelType.Cli && provider === \"timecampus-cli\")\n return CLI_CHANNEL_HINT;\n return CHANNEL_SETUP_HINT;\n}\n\nexport const CHANNEL_CATALOG: readonly ChannelCatalogEntry[] = [\n {\n type: ChannelType.Browser,\n label: \"Browser Extension\",\n description: \"Active tabs and sites from Chrome, Edge or Firefox.\",\n defaultName: \"Browser Extension\",\n },\n {\n type: ChannelType.Desktop,\n label: \"Desktop App\",\n description: \"Foreground applications and windows on your computer.\",\n defaultName: \"Desktop App\",\n },\n {\n type: ChannelType.Mobile,\n label: \"Mobile App\",\n description:\n \"App usage captured by the TimeCampus mobile app. The app connects this channel for you.\",\n defaultName: \"Mobile App\",\n },\n {\n type: ChannelType.Ide,\n label: \"IDE Plugin\",\n description: \"Coding time from VS Code and other editors.\",\n defaultName: \"IDE Plugin\",\n },\n {\n type: ChannelType.Cli,\n label: \"Command Line\",\n description:\n \"Send timing events explicitly from a file or standard input with the TimeCampus CLI.\",\n defaultName: \"Command Line\",\n },\n {\n type: ChannelType.Calendar,\n label: \"Calendar Sync\",\n description: \"Meetings and events from your calendar.\",\n defaultName: \"Calendar\",\n },\n {\n type: ChannelType.Api,\n label: \"API Client\",\n description: \"Your own scripts or tools posting activity through the API.\",\n defaultName: \"API Client\",\n },\n {\n type: ChannelType.Custom,\n label: \"Custom Source\",\n description: \"Anything else that can describe how your time was spent.\",\n defaultName: \"Custom Source\",\n },\n];\n\n/**\n * Channels pulled from a connected account (BOFF-10441). Not offered in the\n * push-source picker: they are created from \"Connect an account\".\n */\nconst INTEGRATION_ENTRY: ChannelCatalogEntry = {\n type: ChannelType.Integration,\n label: \"Connected App\",\n description: \"Activity TimeCampus pulls from an app you connected.\",\n defaultName: \"Connected App\",\n};\n\nexport function catalogEntry(type: ChannelType): ChannelCatalogEntry {\n if (type === ChannelType.Integration) return INTEGRATION_ENTRY;\n return (\n CHANNEL_CATALOG.find((entry) => entry.type === type) ??\n CHANNEL_CATALOG[CHANNEL_CATALOG.length - 1]!\n );\n}\n\n/**\n * The integrations OAuth callback on the workspace gateway. The shell passes\n * the gateway origin; a full GraphQL URL is reduced to its origin so the\n * redirect matches what the OAuth app registered.\n */\nexport function oauthCallbackUrl(\n apiGatewayUrl: string | null | undefined,\n): string {\n if (!apiGatewayUrl) return \"/integrations/oauth/callback\";\n const base = apiGatewayUrl\n .replace(/\\/workspaces\\/graphql\\/?$/, \"\")\n .replace(/\\/+$/, \"\");\n return `${base}/integrations/oauth/callback`;\n}\n\nexport type PullHealth = \"ok\" | \"reconnect\" | \"error\";\n\n/**\n * How a pulled channel is doing: it needs the account connected again once\n * its connection was revoked or the last sync said so, shows an error when\n * the last sync failed or was skipped, and is fine otherwise.\n */\nexport function pullHealth(channel: {\n pullSync: boolean;\n integrationRevokedAt?: string | null;\n lastSyncStatus?: SyncStatus | null;\n}): PullHealth {\n if (!channel.pullSync) return \"ok\";\n if (\n channel.integrationRevokedAt ||\n channel.lastSyncStatus === SyncStatus.ReconnectRequired\n ) {\n return \"reconnect\";\n }\n if (\n channel.lastSyncStatus === SyncStatus.Failed ||\n channel.lastSyncStatus === SyncStatus.Skipped\n ) {\n return \"error\";\n }\n return \"ok\";\n}\n\nexport const PRIVACY_OPTIONS: readonly {\n value: PrivacyMode;\n label: string;\n description: string;\n}[] = [\n {\n value: PrivacyMode.Full,\n label: \"Full detail\",\n description: \"Keep titles, URLs and details as the source sends them.\",\n },\n {\n value: PrivacyMode.TitlesOnly,\n label: \"Titles only\",\n description: \"Keep window and page titles; drop URLs and extra details.\",\n },\n {\n value: PrivacyMode.AggregateOnly,\n label: \"Aggregate only\",\n description:\n \"Keep only the app, category and timing. Titles and URLs never reach the server.\",\n },\n];\n\nexport function privacyLabel(mode: PrivacyMode): string {\n return PRIVACY_OPTIONS.find((o) => o.value === mode)?.label ?? mode;\n}\n\nexport type StatusTone = \"success\" | \"warning\" | \"muted\";\n\nexport function statusDisplay(status: ChannelStatus): {\n label: string;\n tone: StatusTone;\n} {\n switch (status) {\n case ChannelStatus.Active:\n return { label: \"Connected\", tone: \"success\" };\n case ChannelStatus.Paused:\n return { label: \"Paused\", tone: \"warning\" };\n default:\n return { label: \"Disconnected\", tone: \"muted\" };\n }\n}\n\n/** \"Every 15 minutes\", \"Hourly\", \"Daily\", or \"On demand\" when unset. */\nexport function formatSyncInterval(minutes: number | null | undefined): string {\n if (minutes == null) return \"On demand\";\n if (minutes === 60) return \"Hourly\";\n if (minutes === 1440) return \"Daily\";\n if (minutes === 10080) return \"Weekly\";\n if (minutes % 1440 === 0) return `Every ${minutes / 1440} days`;\n if (minutes % 60 === 0) return `Every ${minutes / 60} hours`;\n return minutes === 1 ? \"Every minute\" : `Every ${minutes} minutes`;\n}\n\nexport function formatRetention(days: number | null | undefined): string {\n if (days == null) return \"Kept until you delete it\";\n if (days === 1) return \"1 day\";\n return `${days} days`;\n}\n\n/**\n * True when an ACTIVE channel has missed more than two of its declared sync\n * intervals, so the user can see a source has gone quiet.\n */\nexport function isOverdue(\n status: ChannelStatus,\n lastSyncAt: string | null | undefined,\n syncIntervalMinutes: number | null | undefined,\n now: Date = new Date(),\n): boolean {\n if (status !== ChannelStatus.Active || !syncIntervalMinutes || !lastSyncAt) {\n return false;\n }\n const elapsedMs = now.getTime() - new Date(lastSyncAt).getTime();\n return elapsedMs > syncIntervalMinutes * 2 * 60_000;\n}\n\n/** Parse an optional positive whole-number form field; \"\" → null. */\nexport function parseOptionalPositiveInt(\n raw: string,\n max: number,\n): { ok: true; value: number | null } | { ok: false } {\n const trimmed = raw.trim();\n if (!trimmed) return { ok: true, value: null };\n if (!/^\\d+$/.test(trimmed)) return { ok: false };\n const value = Number(trimmed);\n if (value < 1 || value > max) return { ok: false };\n return { ok: true, value };\n}\n\n/** Case-insensitive match on name, provider and the type's label. */\nexport function matchesChannelSearch(\n channel: { name: string; provider?: string | null; type: ChannelType },\n query: string,\n): boolean {\n const q = query.trim().toLowerCase();\n if (!q) return true;\n return [\n channel.name,\n channel.provider ?? \"\",\n catalogEntry(channel.type).label,\n ]\n .join(\" \")\n .toLowerCase()\n .includes(q);\n}\n\n/** Headings for the connector groups on the Channels page, in display order (BOFF-4207). */\nexport const PULL_PROVIDER_GROUP_LABELS: Record<PullProviderGroup, string> = {\n [PullProviderGroup.Calendar]: \"Calendar\",\n [PullProviderGroup.Chat]: \"Chat\",\n [PullProviderGroup.Email]: \"Email\",\n [PullProviderGroup.Code]: \"Code\",\n [PullProviderGroup.ProjectManagement]: \"Project management\",\n [PullProviderGroup.Documents]: \"Documents\",\n};\n\n/**\n * The heading for a connector group. A group the page does not know yet\n * (the service added it first) is shown by its name, e.g. \"WHITEBOARD\" as\n * \"Whiteboard\", so its heading is never blank.\n */\nexport function pullProviderGroupLabel(group: PullProviderGroup): string {\n const known: string | undefined = PULL_PROVIDER_GROUP_LABELS[group];\n if (known) return known;\n const words = String(group).toLowerCase().replace(/_/g, \" \").trim();\n return words ? words.charAt(0).toUpperCase() + words.slice(1) : \"Other\";\n}\n\nconst PULL_PROVIDER_GROUP_ORDER = Object.keys(\n PULL_PROVIDER_GROUP_LABELS,\n) as PullProviderGroup[];\n\n/**\n * Connectors grouped for display: groups in a fixed order, empty groups\n * dropped, and connectors kept in the order the service lists them. A group\n * the page does not know yet goes last rather than being hidden.\n */\nexport function groupPullProviders<T extends { group: PullProviderGroup }>(\n providers: readonly T[],\n): Array<{ group: PullProviderGroup; providers: T[] }> {\n const byGroup = new Map<PullProviderGroup, T[]>();\n for (const provider of providers) {\n const list = byGroup.get(provider.group) ?? [];\n list.push(provider);\n byGroup.set(provider.group, list);\n }\n const rank = (group: PullProviderGroup) => {\n const index = PULL_PROVIDER_GROUP_ORDER.indexOf(group);\n return index === -1 ? PULL_PROVIDER_GROUP_ORDER.length : index;\n };\n return [...byGroup.entries()]\n .sort(([a], [b]) => rank(a) - rank(b))\n .map(([group, list]) => ({ group, providers: list }));\n}\n"],"mappings":";;AAqBA,IAAaK,IACX,0QAKWC,IACX,4QAKWC,IACX;AAKF,SAAgBC,EACd,GACA,GACQ;CAIR,OAHIC,MAAST,EAAY,SAAeM,IACpCG,MAAST,EAAY,OAAOW,MAAa,mBACpCJ,IACFF;AACT;AAEA,IAAaO,IAAkD;CAC7D;EACE,MAAMZ,EAAY;EAClB,OAAO;EACP,aAAa;EACb,aAAa;CACf;CACA;EACE,MAAMA,EAAY;EAClB,OAAO;EACP,aAAa;EACb,aAAa;CACf;CACA;EACE,MAAMA,EAAY;EAClB,OAAO;EACP,aACE;EACF,aAAa;CACf;CACA;EACE,MAAM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CAAC,CACb,SAASwB,CAAC;AACf;AAGA,IAAaE,IAAgE;EAC1EzC,EAAkB,WAAW;EAC7BA,EAAkB,OAAO;EACzBA,EAAkB,QAAQ;EAC1BA,EAAkB,OAAO;EACzBA,EAAkB,oBAAoB;EACtCA,EAAkB,YAAY;AACjC;AAOA,SAAgB2C,EAAuB,GAAkC;CACvE,IAAMC,IAA4BH,EAA2BI;CAC7D,IAAID,GAAO,OAAOA;CAClB,IAAME,IAAQ,OAAOD,CAAK,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,MAAM,GAAG,CAAC,CAAC,KAAK;CAClE,OAAOC,IAAQA,EAAM,OAAO,CAAC,CAAC,CAAC,YAAY,IAAIA,EAAM,MAAM,CAAC,IAAI;AAClE;AAEA,IAAMC,IAA4B,OAAO,KACvCN,CACF;AAOA,SAAgBO,EACd,GACqD;CACrD,IAAMC,oBAAU,IAAI,IAA4B;CAChD,KAAK,IAAM1C,KAAY2C,GAAW;EAChC,IAAMC,IAAOF,EAAQ,IAAI1C,EAAS,KAAK,KAAK,CAAC;EAE7C,AADA4C,EAAK,KAAK5C,CAAQ,GAClB0C,EAAQ,IAAI1C,EAAS,OAAO4C,CAAI;CAClC;CACA,IAAMC,KAAQ,MAA6B;EACzC,IAAMC,IAAQN,EAA0B,QAAQF,CAAK;EACrD,OAAOQ,MAAU,KAAKN,EAA0B,SAASM;CAC3D;CACA,OAAO,CAAC,GAAGJ,EAAQ,QAAQ,CAAC,CAAC,CAC1B,MAAM,CAACK,IAAI,CAACC,OAAOH,EAAKE,CAAC,IAAIF,EAAKG,CAAC,CAAC,CAAC,CACrC,KAAK,CAACV,GAAOM,QAAW;EAAE;EAAO,WAAWA;CAAK,EAAE;AACxD"}
1
+ {"version":3,"file":"channelCatalog.js","names":["ChannelType","SyncStatus","PrivacyMode","ChannelStatus","PullProviderGroup","CHANNEL_SETUP_HINT","AUTOMATIC_CHANNEL_HINT","CLI_CHANNEL_HINT","channelSetupHint","type","TimeCampusCaptureChannelType","provider","CHANNEL_CATALOG","INTEGRATION_ENTRY","catalogEntry","entry","oauthCallbackUrl","apiGatewayUrl","pullHealth","channel","TimeCampusCaptureChannelSyncStatus","PRIVACY_OPTIONS","TimeCampusCaptureChannelPrivacyMode","privacyLabel","o","mode","statusDisplay","status","TimeCampusCaptureChannelStatus","formatSyncInterval","minutes","formatRetention","days","isOverdue","syncIntervalMinutes","lastSyncAt","now","parseOptionalPositiveInt","trimmed","raw","value","max","matchesChannelSearch","q","query","PULL_PROVIDER_GROUP_LABELS","TimeCampusCapturePullProviderGroup","pullProviderGroupLabel","known","group","words","PULL_PROVIDER_GROUP_ORDER","groupPullProviders","byGroup","providers","list","rank","index","a","b"],"sources":["../../../../src/timecampus/pages/channels/channelCatalog.ts"],"sourcesContent":["/**\n * Capture-channel catalogue and display helpers (BOFF-4036).\n *\n * Pure functions only, so the page stays thin and this logic is unit-tested.\n */\nimport {\n TimeCampusCaptureChannelPrivacyMode as PrivacyMode,\n TimeCampusCaptureChannelStatus as ChannelStatus,\n TimeCampusCaptureChannelSyncStatus as SyncStatus,\n TimeCampusCaptureChannelType as ChannelType,\n TimeCampusCapturePullProviderGroup as PullProviderGroup,\n} from \"@/generated/wspace-types\";\n\nexport interface ChannelCatalogEntry {\n type: ChannelType;\n label: string;\n description: string;\n /** Name suggested when connecting a channel of this type. */\n defaultName: string;\n}\n\nexport const CHANNEL_SETUP_HINT =\n \"Sources send this ID as channelId when they push activity to TimeCampus \" +\n \"(ingestTimeCampusCaptureEvents). Use it from the API, your own scripts or \" +\n \"any client that lets you set a channel ID; events then follow this \" +\n \"channel's status, privacy and retention settings.\";\n\nexport const AUTOMATIC_CHANNEL_HINT =\n \"The TimeCampus mobile app registers this channel for your device and \" +\n \"sends its activity here automatically, so there is nothing to copy. \" +\n \"Pause or disconnect the channel to stop capture on the device; its \" +\n \"privacy and retention settings apply to everything it sends.\";\n\nexport const CLI_CHANNEL_HINT =\n \"The TimeCampus CLI saves this channel for the selected workspace when you run \" +\n \"timecampus channel connect. Send timing events explicitly with \" +\n \"timecampus capture send <file> or pipe JSON to timecampus capture send -. \" +\n \"The CLI does not collect shell history.\";\n\nexport function channelSetupHint(\n type: ChannelType,\n provider?: string | null,\n): string {\n if (type === ChannelType.Mobile) return AUTOMATIC_CHANNEL_HINT;\n if (type === ChannelType.Cli && provider === \"timecampus-cli\")\n return CLI_CHANNEL_HINT;\n return CHANNEL_SETUP_HINT;\n}\n\nexport const CHANNEL_CATALOG: readonly ChannelCatalogEntry[] = [\n {\n type: ChannelType.Browser,\n label: \"Browser Extension\",\n description: \"Active tabs and sites from Chrome, Edge or Firefox.\",\n defaultName: \"Browser Extension\",\n },\n {\n type: ChannelType.Desktop,\n label: \"Desktop App\",\n description: \"Foreground applications and windows on your computer.\",\n defaultName: \"Desktop App\",\n },\n {\n type: ChannelType.Mobile,\n label: \"Mobile App\",\n description:\n \"App usage captured by the TimeCampus mobile app. The app connects this channel for you.\",\n defaultName: \"Mobile App\",\n },\n {\n type: ChannelType.Ide,\n label: \"IDE Plugin\",\n description: \"Coding time from VS Code and other editors.\",\n defaultName: \"IDE Plugin\",\n },\n {\n type: ChannelType.Cli,\n label: \"Command Line\",\n description:\n \"Send timing events explicitly from a file or standard input with the TimeCampus CLI.\",\n defaultName: \"Command Line\",\n },\n {\n type: ChannelType.Calendar,\n label: \"Calendar Sync\",\n description: \"Meetings and events from your calendar.\",\n defaultName: \"Calendar\",\n },\n {\n type: ChannelType.Api,\n label: \"API Client\",\n description: \"Your own scripts or tools posting activity through the API.\",\n defaultName: \"API Client\",\n },\n {\n type: ChannelType.Custom,\n label: \"Custom Source\",\n description: \"Anything else that can describe how your time was spent.\",\n defaultName: \"Custom Source\",\n },\n];\n\n/**\n * Channels pulled from a connected account (BOFF-10441). Not offered in the\n * push-source picker: they are created from \"Connect an account\".\n */\nconst INTEGRATION_ENTRY: ChannelCatalogEntry = {\n type: ChannelType.Integration,\n label: \"Connected App\",\n description: \"Activity TimeCampus pulls from an app you connected.\",\n defaultName: \"Connected App\",\n};\n\nexport function catalogEntry(type: ChannelType): ChannelCatalogEntry {\n if (type === ChannelType.Integration) return INTEGRATION_ENTRY;\n return (\n CHANNEL_CATALOG.find((entry) => entry.type === type) ??\n CHANNEL_CATALOG[CHANNEL_CATALOG.length - 1]!\n );\n}\n\n/**\n * The integrations OAuth callback on the workspace gateway. The shell passes\n * the gateway origin; a full GraphQL URL is reduced to its origin so the\n * redirect matches what the OAuth app registered.\n */\nexport function oauthCallbackUrl(\n apiGatewayUrl: string | null | undefined,\n): string {\n if (!apiGatewayUrl) return \"/integrations/oauth/callback\";\n const base = apiGatewayUrl\n .replace(/\\/workspaces\\/graphql\\/?$/, \"\")\n .replace(/\\/+$/, \"\");\n return `${base}/integrations/oauth/callback`;\n}\n\nexport type PullHealth = \"ok\" | \"reconnect\" | \"error\";\n\n/**\n * How a pulled channel is doing: it needs the account connected again once\n * its connection was revoked or the last sync said so, shows an error when\n * the last sync failed or was skipped, and is fine otherwise.\n */\nexport function pullHealth(channel: {\n pullSync: boolean;\n integrationRevokedAt?: string | null;\n lastSyncStatus?: SyncStatus | null;\n}): PullHealth {\n if (!channel.pullSync) return \"ok\";\n if (\n channel.integrationRevokedAt ||\n channel.lastSyncStatus === SyncStatus.ReconnectRequired\n ) {\n return \"reconnect\";\n }\n if (\n channel.lastSyncStatus === SyncStatus.Failed ||\n channel.lastSyncStatus === SyncStatus.Skipped\n ) {\n return \"error\";\n }\n return \"ok\";\n}\n\nexport const PRIVACY_OPTIONS: readonly {\n value: PrivacyMode;\n label: string;\n description: string;\n}[] = [\n {\n value: PrivacyMode.Full,\n label: \"Full detail\",\n description: \"Keep titles, URLs and details as the source sends them.\",\n },\n {\n value: PrivacyMode.TitlesOnly,\n label: \"Titles only\",\n description: \"Keep window and page titles; drop URLs and extra details.\",\n },\n {\n value: PrivacyMode.AggregateOnly,\n label: \"Aggregate only\",\n description:\n \"Keep only the app, category and timing. Titles and URLs never reach the server.\",\n },\n];\n\nexport function privacyLabel(mode: PrivacyMode): string {\n return PRIVACY_OPTIONS.find((o) => o.value === mode)?.label ?? mode;\n}\n\nexport type StatusTone = \"success\" | \"warning\" | \"muted\";\n\nexport function statusDisplay(status: ChannelStatus): {\n label: string;\n tone: StatusTone;\n} {\n switch (status) {\n case ChannelStatus.Active:\n return { label: \"Connected\", tone: \"success\" };\n case ChannelStatus.Paused:\n return { label: \"Paused\", tone: \"warning\" };\n default:\n return { label: \"Disconnected\", tone: \"muted\" };\n }\n}\n\n/** \"Every 15 minutes\", \"Hourly\", \"Daily\", or \"On demand\" when unset. */\nexport function formatSyncInterval(minutes: number | null | undefined): string {\n if (minutes == null) return \"On demand\";\n if (minutes === 60) return \"Hourly\";\n if (minutes === 1440) return \"Daily\";\n if (minutes === 10080) return \"Weekly\";\n if (minutes % 1440 === 0) return `Every ${minutes / 1440} days`;\n if (minutes % 60 === 0) return `Every ${minutes / 60} hours`;\n return minutes === 1 ? \"Every minute\" : `Every ${minutes} minutes`;\n}\n\nexport function formatRetention(days: number | null | undefined): string {\n if (days == null) return \"Kept until you delete it\";\n if (days === 1) return \"1 day\";\n return `${days} days`;\n}\n\n/**\n * True when an ACTIVE channel has missed more than two of its declared sync\n * intervals, so the user can see a source has gone quiet.\n */\nexport function isOverdue(\n status: ChannelStatus,\n lastSyncAt: string | null | undefined,\n syncIntervalMinutes: number | null | undefined,\n now: Date = new Date(),\n): boolean {\n if (status !== ChannelStatus.Active || !syncIntervalMinutes || !lastSyncAt) {\n return false;\n }\n const elapsedMs = now.getTime() - new Date(lastSyncAt).getTime();\n return elapsedMs > syncIntervalMinutes * 2 * 60_000;\n}\n\n/** Parse an optional positive whole-number form field; \"\" → null. */\nexport function parseOptionalPositiveInt(\n raw: string,\n max: number,\n): { ok: true; value: number | null } | { ok: false } {\n const trimmed = raw.trim();\n if (!trimmed) return { ok: true, value: null };\n if (!/^\\d+$/.test(trimmed)) return { ok: false };\n const value = Number(trimmed);\n if (value < 1 || value > max) return { ok: false };\n return { ok: true, value };\n}\n\n/** Case-insensitive match on name, provider and the type's label. */\nexport function matchesChannelSearch(\n channel: { name: string; provider?: string | null; type: ChannelType },\n query: string,\n): boolean {\n const q = query.trim().toLowerCase();\n if (!q) return true;\n return [\n channel.name,\n channel.provider ?? \"\",\n catalogEntry(channel.type).label,\n ]\n .join(\" \")\n .toLowerCase()\n .includes(q);\n}\n\n/** Headings for the connector groups on the Channels page, in display order (BOFF-4207). */\nexport const PULL_PROVIDER_GROUP_LABELS: Record<PullProviderGroup, string> = {\n [PullProviderGroup.Calendar]: \"Calendar\",\n [PullProviderGroup.Chat]: \"Chat\",\n [PullProviderGroup.Email]: \"Email\",\n [PullProviderGroup.Code]: \"Code\",\n [PullProviderGroup.ProjectManagement]: \"Project management\",\n [PullProviderGroup.Documents]: \"Documents\",\n [PullProviderGroup.Sales]: \"Sales\",\n};\n\n/**\n * The heading for a connector group. A group the page does not know yet\n * (the service added it first) is shown by its name, e.g. \"WHITEBOARD\" as\n * \"Whiteboard\", so its heading is never blank.\n */\nexport function pullProviderGroupLabel(group: PullProviderGroup): string {\n const known: string | undefined = PULL_PROVIDER_GROUP_LABELS[group];\n if (known) return known;\n const words = String(group).toLowerCase().replace(/_/g, \" \").trim();\n return words ? words.charAt(0).toUpperCase() + words.slice(1) : \"Other\";\n}\n\nconst PULL_PROVIDER_GROUP_ORDER = Object.keys(\n PULL_PROVIDER_GROUP_LABELS,\n) as PullProviderGroup[];\n\n/**\n * Connectors grouped for display: groups in a fixed order, empty groups\n * dropped, and connectors kept in the order the service lists them. A group\n * the page does not know yet goes last rather than being hidden.\n */\nexport function groupPullProviders<T extends { group: PullProviderGroup }>(\n providers: readonly T[],\n): Array<{ group: PullProviderGroup; providers: T[] }> {\n const byGroup = new Map<PullProviderGroup, T[]>();\n for (const provider of providers) {\n const list = byGroup.get(provider.group) ?? [];\n list.push(provider);\n byGroup.set(provider.group, list);\n }\n const rank = (group: PullProviderGroup) => {\n const index = PULL_PROVIDER_GROUP_ORDER.indexOf(group);\n return index === -1 ? PULL_PROVIDER_GROUP_ORDER.length : index;\n };\n return [...byGroup.entries()]\n .sort(([a], [b]) => rank(a) - rank(b))\n .map(([group, list]) => ({ group, providers: list }));\n}\n"],"mappings":";;AAqBA,IAAaK,IACX,0QAKWC,IACX,4QAKWC,IACX;AAKF,SAAgBC,EACd,GACA,GACQ;CAIR,OAHIC,MAAST,EAAY,SAAeM,IACpCG,MAAST,EAAY,OAAOW,MAAa,mBACpCJ,IACFF;AACT;AAEA,IAAaO,IAAkD;CAC7D;EACE,MAAMZ,EAAY;EAClB,OAAO;EACP,aAAa;EACb,aAAa;CACf;CACA;EACE,MAAMA,EAAY;EAClB,OAAO;EACP,aAAa;EACb,aAAa;CACf;CACA;EACE,MAAMA,EAAY;EAClB,OAAO;EACP,aACE;EACF,aAAa;CACf;CACA;EACE,MAAMA,EAAY;EAClB,OAAO;EACP,aAAa;EACb,aAAa;CACf;CACA;EACE,MAAMA,EAAY;EAClB,OAAO;EACP,aACE;EACF,aAAa;CACf;CACA;EACE,MAAMA,EAAY;EAClB,OAAO;EACP,aAAa;EACb,aAAa;CACf;CACA;EACE,MAAMA,EAAY;EAClB,OAAO;EACP,aAAa;EACb,aAAa;CACf;CACA;EACE,MAAMA,EAAY;EAClB,OAAO;EACP,aAAa;EACb,aAAa;CACf;AACF,GAMMa,IAAyC;CAC7C,MAAMb,EAAY;CAClB,OAAO;CACP,aAAa;CACb,aAAa;AACf;AAEA,SAAgBc,EAAa,GAAwC;CAEnE,OADIL,MAAST,EAAY,cAAoBa,IAE3CD,EAAgB,MAAM,MAAUG,EAAM,SAASN,CAAI,KACnDG,EAAgBA,EAAgB,SAAS;AAE7C;AAOA,SAAgBI,EACd,GACQ;CAKR,OAJKC,IAIE,GAHMA,EACV,QAAQ,6BAA6B,EAAE,CAAC,CACxC,QAAQ,QAAQ,EACT,EAAK,gCAJY;AAK7B;AASA,SAAgBC,EAAW,GAIZ;CAcb,OAbKC,EAAQ,WAEXA,EAAQ,w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