@mcp-b/react-components 0.70.0 → 0.71.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/AgentComputer-CpS9R2KG.d.ts +305 -0
- package/dist/{AgentComputer-CFJxjMFE.js → AgentComputer-CsWDnHwj.js} +1859 -478
- package/dist/CommandPalette-DDctKdpC.d.ts +53 -0
- package/dist/ComputerCalendar-Z6k_DVJF.js +1360 -0
- package/dist/ComputerCustomWallpaper-CnGQYHp0.js +518 -0
- package/dist/ComputerCustomWallpaper-D4lgwj2k.d.ts +18 -0
- package/dist/ComputerNotifications-q7eeELZ8.d.ts +41 -0
- package/dist/ComputerPresentation-BEQKYAjc.js +888 -0
- package/dist/{ExecutionResult-C7SzVquo.js → ExecutionResult-CXnGcmM4.js} +1 -1
- package/dist/{WorkspaceBrowser-ojoZy0uO.js → WorkspaceBrowser-mRScUczT.js} +5 -5
- package/dist/WorkspaceFileTransfer-D2cOoVyO.js +1625 -0
- package/dist/{WorkspaceMessageResponse-BoeeltJM.js → WorkspaceMessageResponse-CXGOQgpo.js} +1 -1
- package/dist/components/agents-sdk/AgentComputer.d.ts +2 -276
- package/dist/components/agents-sdk/AgentComputer.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/ComputerAutomations.d.ts +5 -15
- package/dist/components/agents-sdk/ComputerAutomations.js +164 -145
- package/dist/components/agents-sdk/ComputerCalendar.d.ts +1 -1
- package/dist/components/agents-sdk/ComputerCalendar.js +1 -1344
- package/dist/components/agents-sdk/ComputerCustomWallpaper.d.ts +2 -39
- package/dist/components/agents-sdk/ComputerCustomWallpaper.js +2 -522
- package/dist/components/agents-sdk/ComputerFiles.d.ts +18 -81
- package/dist/components/agents-sdk/ComputerFiles.js +386 -98
- package/dist/components/agents-sdk/ComputerHome.d.ts +6 -11
- package/dist/components/agents-sdk/ComputerHome.js +1 -89
- package/dist/components/agents-sdk/ComputerHost.d.ts +43 -0
- package/dist/components/agents-sdk/ComputerHost.js +97 -0
- package/dist/components/agents-sdk/ComputerLayout.d.ts +1 -1
- package/dist/components/agents-sdk/ComputerNotifications.d.ts +2 -54
- package/dist/components/agents-sdk/ComputerNotifications.js +1 -668
- package/dist/components/agents-sdk/ComputerPresentation.d.ts +2 -0
- package/dist/components/agents-sdk/ComputerPresentation.js +2 -0
- package/dist/components/agents-sdk/ComputerScreen.d.ts +14 -14
- package/dist/components/agents-sdk/ComputerScreen.js +109 -50
- package/dist/components/agents-sdk/ComputerSettings.d.ts +12 -40
- package/dist/components/agents-sdk/ComputerSettings.js +249 -1038
- package/dist/components/agents-sdk/ComputerSpotlight.d.ts +13 -15
- package/dist/components/agents-sdk/ComputerSpotlight.js +1 -231
- package/dist/components/agents-sdk/ComputerViewer.d.ts +13 -17
- package/dist/components/agents-sdk/ComputerViewer.js +176 -187
- package/dist/components/agents-sdk/ComputerWallpapers.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChat.js +2 -2
- package/dist/components/agents-sdk/EmployeeChrome.js +3 -3
- package/dist/components/agents-sdk/EmployeeSchedules.js +2 -2
- package/dist/components/agents-sdk/ExecutionBoard.js +1 -1
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +2 -2
- package/dist/components/agents-sdk/McpPluginCatalog.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +3 -3
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +2 -2
- package/dist/components/agents-sdk/ThinkScheduleActions.js +1 -1
- package/dist/components/agents-sdk/ThinkScheduleBrowser.js +1 -1
- package/dist/components/agents-sdk/ThinkScheduleDetail.js +4 -4
- package/dist/components/agents-sdk/ThinkScheduleForm.js +3 -3
- package/dist/components/agents-sdk/WorkspaceAutomation.js +3 -3
- package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +1 -5
- package/dist/components/agents-sdk/WorkspaceDesktop.js +53 -41
- package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -3
- package/dist/components/agents-sdk/WorkspaceFileCommands.js +1 -924
- package/dist/components/agents-sdk/WorkspaceFileDetails.js +1 -1
- package/dist/components/agents-sdk/WorkspaceFileTransfer.js +1 -504
- package/dist/components/agents-sdk/WorkspaceFileView.js +6 -6
- package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +9 -0
- package/dist/components/agents-sdk/WorkspaceLive.js +2 -177
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +1 -1
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +1 -1
- package/dist/components/extension/FirstRunSetup.js +2 -2
- package/dist/components/foundations/ThemeProvider.d.ts +2 -0
- package/dist/components/foundations/ThemeProvider.js +2 -1
- package/dist/components/general-purpose/CommandPalette.d.ts +2 -52
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -2
- package/dist/components/nanites/AgentConnection.js +1 -1
- package/dist/components/nanites/AgentToolDetail.js +1 -1
- package/dist/context-BWJpR084.js +94 -0
- package/dist/{parts-CPVz9l31.js → parts-BFK5iocu.js} +1 -1
- package/dist/styles/agent-computer.css +16 -0
- package/dist/styles/computer-files.css +5 -0
- package/dist/styles/computer-notifications.css +1 -0
- package/dist/{workspace-drag-B6hMXUNt.js → workspace-drag-BNhZIN8F.js} +1 -1
- package/dist/{workspace-quick-look-DODjsfhH.js → workspace-quick-look-8cbGu1Xf.js} +2 -2
- package/package.json +2 -2
- package/dist/WallpaperPicker-C-FItmDS.d.ts +0 -34
- package/dist/automations-host-DPORjdc7.js +0 -17
- package/dist/context-Ddsp8HgD.js +0 -43
- package/dist/minute-clock-CXpRGCMF.js +0 -35
- package/dist/{Context-DQDumCV8.js → Context-CYUxZrwW.js} +1 -1
- package/dist/{ManagerOffice-kSK7vTBl.js → ManagerOffice-BJ2vs-Lr.js} +2 -2
- package/dist/{WorkspaceLink-DK9kdMUH.js → WorkspaceLink-DDkj-Tq5.js} +1 -1
|
@@ -1,1345 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Checkbox } from "../foundations/Checkbox.js";
|
|
3
|
-
import { Button } from "../foundations/Button.js";
|
|
4
|
-
import { IconButton } from "../foundations/IconButton.js";
|
|
5
|
-
import { n as useAgentComputerActions } from "../../AgentComputer-CFJxjMFE.js";
|
|
6
|
-
import { Menubar } from "../foundations/Menubar.js";
|
|
7
|
-
import { EmptyState } from "../foundations/EmptyState.js";
|
|
8
|
-
import { COMPUTER_APP_IDS } from "./ComputerAppIds.js";
|
|
9
|
-
import { DescriptionList } from "../foundations/DescriptionList.js";
|
|
10
|
-
import { formatThinkExecutionStatus, getThinkExecutionRunId, getThinkExecutionRunStatus, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
|
|
11
|
-
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
12
|
-
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
13
|
-
import { LinkButton } from "../foundations/LinkButton.js";
|
|
14
|
-
import { n as useComputerAutomationsContext, r as zonedFormat } from "../../automations-host-DPORjdc7.js";
|
|
15
|
-
import { t as computerAppParts } from "../../parts-CPVz9l31.js";
|
|
16
|
-
import { SearchField } from "../foundations/SearchField.js";
|
|
17
|
-
import { formatThinkScheduleTimeZone } from "./ThinkSchedule.js";
|
|
18
|
-
import { Popover } from "../foundations/Popover.js";
|
|
19
|
-
import { c } from "react/compiler-runtime";
|
|
20
|
-
import { createContext, use, useId, useLayoutEffect, useRef, useState } from "react";
|
|
21
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
-
//#region src/components/agents-sdk/ComputerCalendar.tsx
|
|
23
|
-
const DAY = 864e5;
|
|
24
|
-
/** The employee's wall clock: every source instant is placed on its days. */
|
|
25
|
-
function calendarClock(timeZone, now) {
|
|
26
|
-
const sourceDay = zonedFormat(timeZone, {
|
|
27
|
-
year: "numeric",
|
|
28
|
-
month: "2-digit",
|
|
29
|
-
day: "2-digit"
|
|
30
|
-
});
|
|
31
|
-
const time = zonedFormat(timeZone, {
|
|
32
|
-
hour: "numeric",
|
|
33
|
-
minute: "2-digit"
|
|
34
|
-
});
|
|
35
|
-
const calendarDay = (timestamp) => {
|
|
36
|
-
const parts = sourceDay.formatToParts(timestamp);
|
|
37
|
-
const part = (name) => Number(parts.find((value) => value.type === name)?.value);
|
|
38
|
-
return Date.UTC(part("year"), part("month") - 1, part("day"));
|
|
39
|
-
};
|
|
40
|
-
return {
|
|
41
|
-
time,
|
|
42
|
-
zoneName: formatThinkScheduleTimeZone(timeZone),
|
|
43
|
-
calendarDay,
|
|
44
|
-
today: calendarDay(now),
|
|
45
|
-
monthTime(timestamp) {
|
|
46
|
-
const parts = time.formatToParts(timestamp);
|
|
47
|
-
const hour = parts.find((part) => part.type === "hour")?.value ?? "";
|
|
48
|
-
const minute = parts.find((part) => part.type === "minute")?.value;
|
|
49
|
-
const period = parts.find((part) => part.type === "dayPeriod")?.value.toLowerCase().at(0) ?? "";
|
|
50
|
-
return `${hour}${minute && minute !== "00" ? `:${minute}` : ""}${period}`;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
const CalendarClockContext = createContext(null);
|
|
55
|
-
const useClock = () => use(CalendarClockContext);
|
|
56
|
-
const dateFormat = (options) => new Intl.DateTimeFormat("en-US", {
|
|
57
|
-
...options,
|
|
58
|
-
timeZone: "UTC"
|
|
59
|
-
});
|
|
60
|
-
const fullDate = dateFormat({
|
|
61
|
-
weekday: "long",
|
|
62
|
-
year: "numeric",
|
|
63
|
-
month: "long",
|
|
64
|
-
day: "numeric"
|
|
65
|
-
});
|
|
66
|
-
const monthFormat = dateFormat({ month: "long" });
|
|
67
|
-
const dayFormat = dateFormat({
|
|
68
|
-
month: "long",
|
|
69
|
-
day: "numeric"
|
|
70
|
-
});
|
|
71
|
-
const weekdays = [
|
|
72
|
-
"Sunday",
|
|
73
|
-
"Monday",
|
|
74
|
-
"Tuesday",
|
|
75
|
-
"Wednesday",
|
|
76
|
-
"Thursday",
|
|
77
|
-
"Friday",
|
|
78
|
-
"Saturday"
|
|
79
|
-
];
|
|
80
|
-
const dateKey = (day) => new Date(day).toISOString().slice(0, 10);
|
|
81
|
-
function moveMonth(day, offset) {
|
|
82
|
-
const date = new Date(day);
|
|
83
|
-
const year = date.getUTCFullYear();
|
|
84
|
-
const month = date.getUTCMonth() + offset;
|
|
85
|
-
const lastDay = new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
|
|
86
|
-
return Date.UTC(year, month, Math.min(date.getUTCDate(), lastDay));
|
|
87
|
-
}
|
|
88
|
-
/** One confirmed next occurrence and each retained run; never expand schedule text. */
|
|
89
|
-
function calendarEntries(schedules, { calendarDay }) {
|
|
90
|
-
return schedules.flatMap((schedule) => {
|
|
91
|
-
const entries = [];
|
|
92
|
-
const next = schedule.enabled && schedule.alarm ? schedule.alarm.time * 1e3 : NaN;
|
|
93
|
-
if (Number.isFinite(new Date(next).getTime())) entries.push({
|
|
94
|
-
key: `${schedule.id}:next`,
|
|
95
|
-
schedule,
|
|
96
|
-
kind: "scheduled",
|
|
97
|
-
timestamp: next,
|
|
98
|
-
day: calendarDay(next)
|
|
99
|
-
});
|
|
100
|
-
for (const run of schedule.runs) {
|
|
101
|
-
const instant = isThinkSubmissionRun(run) ? run.startedAt ?? run.createdAt : run.createdAt;
|
|
102
|
-
const timestamp = instant instanceof Date ? instant.getTime() : instant;
|
|
103
|
-
if (!Number.isFinite(new Date(timestamp).getTime())) continue;
|
|
104
|
-
entries.push({
|
|
105
|
-
key: `${schedule.id}:run:${getThinkExecutionRunId(run)}`,
|
|
106
|
-
schedule,
|
|
107
|
-
kind: "run",
|
|
108
|
-
run,
|
|
109
|
-
timestamp,
|
|
110
|
-
day: calendarDay(timestamp)
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
return entries;
|
|
114
|
-
}).toSorted((first, second) => first.timestamp - second.timestamp);
|
|
115
|
-
}
|
|
116
|
-
/** Where the entry opens in Automations, as the link shows it. */
|
|
117
|
-
function useSourceLink() {
|
|
118
|
-
const $ = c(2);
|
|
119
|
-
const { host } = useComputerAutomationsContext();
|
|
120
|
-
let t0;
|
|
121
|
-
if ($[0] !== host) {
|
|
122
|
-
t0 = (entry) => host.renderLink(entry.kind === "scheduled" ? {
|
|
123
|
-
section: "schedules",
|
|
124
|
-
schedule: entry.schedule.id
|
|
125
|
-
} : {
|
|
126
|
-
section: "runs",
|
|
127
|
-
run: getThinkExecutionRunId(entry.run)
|
|
128
|
-
});
|
|
129
|
-
$[0] = host;
|
|
130
|
-
$[1] = t0;
|
|
131
|
-
} else t0 = $[1];
|
|
132
|
-
return t0;
|
|
133
|
-
}
|
|
134
|
-
function entryStatus(entry) {
|
|
135
|
-
return entry.kind === "scheduled" ? "Confirmed next run" : formatThinkExecutionStatus(getThinkExecutionRunStatus(entry.run));
|
|
136
|
-
}
|
|
137
|
-
function CalendarEvent(t0) {
|
|
138
|
-
const $ = c(94);
|
|
139
|
-
const { entry, onSelect, onOpen, detailed: t1 } = t0;
|
|
140
|
-
const detailed = t1 === void 0 ? false : t1;
|
|
141
|
-
const navigating = useRef(false);
|
|
142
|
-
const sourceLink = useSourceLink();
|
|
143
|
-
const clock = useClock();
|
|
144
|
-
let t2;
|
|
145
|
-
if ($[0] !== entry.day || $[1] !== onSelect) {
|
|
146
|
-
t2 = (open) => {
|
|
147
|
-
if (open) {
|
|
148
|
-
navigating.current = false;
|
|
149
|
-
onSelect(entry.day);
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
$[0] = entry.day;
|
|
153
|
-
$[1] = onSelect;
|
|
154
|
-
$[2] = t2;
|
|
155
|
-
} else t2 = $[2];
|
|
156
|
-
let t3;
|
|
157
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
158
|
-
t3 = /* @__PURE__ */ jsx(Button, {
|
|
159
|
-
variant: "ghost",
|
|
160
|
-
color: "neutral",
|
|
161
|
-
size: "xs"
|
|
162
|
-
});
|
|
163
|
-
$[3] = t3;
|
|
164
|
-
} else t3 = $[3];
|
|
165
|
-
const t4 = entry.kind;
|
|
166
|
-
const t5 = detailed ? "" : void 0;
|
|
167
|
-
const t6 = entry.key;
|
|
168
|
-
const t7 = entry.schedule.name;
|
|
169
|
-
let t8;
|
|
170
|
-
if ($[4] !== entry) {
|
|
171
|
-
t8 = entryStatus(entry);
|
|
172
|
-
$[4] = entry;
|
|
173
|
-
$[5] = t8;
|
|
174
|
-
} else t8 = $[5];
|
|
175
|
-
let t9;
|
|
176
|
-
if ($[6] !== entry.day) {
|
|
177
|
-
t9 = fullDate.format(entry.day);
|
|
178
|
-
$[6] = entry.day;
|
|
179
|
-
$[7] = t9;
|
|
180
|
-
} else t9 = $[7];
|
|
181
|
-
let t10;
|
|
182
|
-
if ($[8] !== clock.time || $[9] !== entry.timestamp) {
|
|
183
|
-
t10 = clock.time.format(entry.timestamp);
|
|
184
|
-
$[8] = clock.time;
|
|
185
|
-
$[9] = entry.timestamp;
|
|
186
|
-
$[10] = t10;
|
|
187
|
-
} else t10 = $[10];
|
|
188
|
-
const t11 = `${t7}, ${t8}, ${t9}, ${t10}`;
|
|
189
|
-
let t12;
|
|
190
|
-
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
191
|
-
t12 = /* @__PURE__ */ jsx("span", {
|
|
192
|
-
className: "computer-calendar__event-dot",
|
|
193
|
-
"aria-hidden": "true"
|
|
194
|
-
});
|
|
195
|
-
$[11] = t12;
|
|
196
|
-
} else t12 = $[11];
|
|
197
|
-
let t13;
|
|
198
|
-
if ($[12] !== entry.schedule.name) {
|
|
199
|
-
t13 = /* @__PURE__ */ jsx("span", {
|
|
200
|
-
className: "computer-calendar__event-title sigvelo-truncate",
|
|
201
|
-
children: entry.schedule.name
|
|
202
|
-
});
|
|
203
|
-
$[12] = entry.schedule.name;
|
|
204
|
-
$[13] = t13;
|
|
205
|
-
} else t13 = $[13];
|
|
206
|
-
let t14;
|
|
207
|
-
if ($[14] !== entry.timestamp) {
|
|
208
|
-
t14 = new Date(entry.timestamp).toISOString();
|
|
209
|
-
$[14] = entry.timestamp;
|
|
210
|
-
$[15] = t14;
|
|
211
|
-
} else t14 = $[15];
|
|
212
|
-
let t15;
|
|
213
|
-
if ($[16] !== clock || $[17] !== detailed || $[18] !== entry.timestamp) {
|
|
214
|
-
t15 = detailed ? clock.time.format(entry.timestamp) : clock.monthTime(entry.timestamp);
|
|
215
|
-
$[16] = clock;
|
|
216
|
-
$[17] = detailed;
|
|
217
|
-
$[18] = entry.timestamp;
|
|
218
|
-
$[19] = t15;
|
|
219
|
-
} else t15 = $[19];
|
|
220
|
-
let t16;
|
|
221
|
-
if ($[20] !== t14 || $[21] !== t15) {
|
|
222
|
-
t16 = /* @__PURE__ */ jsx("time", {
|
|
223
|
-
dateTime: t14,
|
|
224
|
-
children: t15
|
|
225
|
-
});
|
|
226
|
-
$[20] = t14;
|
|
227
|
-
$[21] = t15;
|
|
228
|
-
$[22] = t16;
|
|
229
|
-
} else t16 = $[22];
|
|
230
|
-
let t17;
|
|
231
|
-
if ($[23] !== detailed || $[24] !== entry) {
|
|
232
|
-
t17 = detailed ? /* @__PURE__ */ jsx("span", {
|
|
233
|
-
className: "computer-calendar__entry-detail",
|
|
234
|
-
children: entryStatus(entry)
|
|
235
|
-
}) : null;
|
|
236
|
-
$[23] = detailed;
|
|
237
|
-
$[24] = entry;
|
|
238
|
-
$[25] = t17;
|
|
239
|
-
} else t17 = $[25];
|
|
240
|
-
let t18;
|
|
241
|
-
if ($[26] !== entry.key || $[27] !== entry.kind || $[28] !== t11 || $[29] !== t13 || $[30] !== t16 || $[31] !== t17 || $[32] !== t5) {
|
|
242
|
-
t18 = /* @__PURE__ */ jsxs(Popover.Trigger, {
|
|
243
|
-
unstyled: true,
|
|
244
|
-
render: t3,
|
|
245
|
-
className: "computer-calendar__event",
|
|
246
|
-
"data-kind": t4,
|
|
247
|
-
"data-detailed": t5,
|
|
248
|
-
"data-entry": t6,
|
|
249
|
-
"aria-label": t11,
|
|
250
|
-
children: [
|
|
251
|
-
t12,
|
|
252
|
-
t13,
|
|
253
|
-
t16,
|
|
254
|
-
t17
|
|
255
|
-
]
|
|
256
|
-
});
|
|
257
|
-
$[26] = entry.key;
|
|
258
|
-
$[27] = entry.kind;
|
|
259
|
-
$[28] = t11;
|
|
260
|
-
$[29] = t13;
|
|
261
|
-
$[30] = t16;
|
|
262
|
-
$[31] = t17;
|
|
263
|
-
$[32] = t5;
|
|
264
|
-
$[33] = t18;
|
|
265
|
-
} else t18 = $[33];
|
|
266
|
-
let t19;
|
|
267
|
-
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
268
|
-
t19 = () => !navigating.current;
|
|
269
|
-
$[34] = t19;
|
|
270
|
-
} else t19 = $[34];
|
|
271
|
-
let t20;
|
|
272
|
-
if ($[35] !== entry.schedule.name) {
|
|
273
|
-
t20 = /* @__PURE__ */ jsx(Popover.Title, {
|
|
274
|
-
className: "computer-calendar__event-title-heading",
|
|
275
|
-
children: entry.schedule.name
|
|
276
|
-
});
|
|
277
|
-
$[35] = entry.schedule.name;
|
|
278
|
-
$[36] = t20;
|
|
279
|
-
} else t20 = $[36];
|
|
280
|
-
let t21;
|
|
281
|
-
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
282
|
-
t21 = /* @__PURE__ */ jsx(Popover.Close, { render: /* @__PURE__ */ jsx(IconButton, {
|
|
283
|
-
label: "Close event details",
|
|
284
|
-
size: "xs",
|
|
285
|
-
variant: "ghost",
|
|
286
|
-
color: "neutral",
|
|
287
|
-
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
288
|
-
}) });
|
|
289
|
-
$[37] = t21;
|
|
290
|
-
} else t21 = $[37];
|
|
291
|
-
let t22;
|
|
292
|
-
if ($[38] !== t20) {
|
|
293
|
-
t22 = /* @__PURE__ */ jsxs("div", {
|
|
294
|
-
className: "computer-calendar__event-header",
|
|
295
|
-
children: [t20, t21]
|
|
296
|
-
});
|
|
297
|
-
$[38] = t20;
|
|
298
|
-
$[39] = t22;
|
|
299
|
-
} else t22 = $[39];
|
|
300
|
-
let t23;
|
|
301
|
-
if ($[40] !== entry.day) {
|
|
302
|
-
t23 = fullDate.format(entry.day);
|
|
303
|
-
$[40] = entry.day;
|
|
304
|
-
$[41] = t23;
|
|
305
|
-
} else t23 = $[41];
|
|
306
|
-
let t24;
|
|
307
|
-
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
308
|
-
t24 = /* @__PURE__ */ jsx("br", {});
|
|
309
|
-
$[42] = t24;
|
|
310
|
-
} else t24 = $[42];
|
|
311
|
-
let t25;
|
|
312
|
-
if ($[43] !== entry.timestamp) {
|
|
313
|
-
t25 = new Date(entry.timestamp).toISOString();
|
|
314
|
-
$[43] = entry.timestamp;
|
|
315
|
-
$[44] = t25;
|
|
316
|
-
} else t25 = $[44];
|
|
317
|
-
let t26;
|
|
318
|
-
if ($[45] !== clock.time || $[46] !== entry.timestamp) {
|
|
319
|
-
t26 = clock.time.format(entry.timestamp);
|
|
320
|
-
$[45] = clock.time;
|
|
321
|
-
$[46] = entry.timestamp;
|
|
322
|
-
$[47] = t26;
|
|
323
|
-
} else t26 = $[47];
|
|
324
|
-
let t27;
|
|
325
|
-
if ($[48] !== t25 || $[49] !== t26) {
|
|
326
|
-
t27 = /* @__PURE__ */ jsx("time", {
|
|
327
|
-
dateTime: t25,
|
|
328
|
-
children: t26
|
|
329
|
-
});
|
|
330
|
-
$[48] = t25;
|
|
331
|
-
$[49] = t26;
|
|
332
|
-
$[50] = t27;
|
|
333
|
-
} else t27 = $[50];
|
|
334
|
-
const t28 = clock.zoneName ? ` · ${clock.zoneName}` : null;
|
|
335
|
-
let t29;
|
|
336
|
-
if ($[51] !== t23 || $[52] !== t27 || $[53] !== t28) {
|
|
337
|
-
t29 = /* @__PURE__ */ jsxs(Popover.Description, {
|
|
338
|
-
className: "computer-calendar__event-description",
|
|
339
|
-
children: [
|
|
340
|
-
t23,
|
|
341
|
-
t24,
|
|
342
|
-
t27,
|
|
343
|
-
t28
|
|
344
|
-
]
|
|
345
|
-
});
|
|
346
|
-
$[51] = t23;
|
|
347
|
-
$[52] = t27;
|
|
348
|
-
$[53] = t28;
|
|
349
|
-
$[54] = t29;
|
|
350
|
-
} else t29 = $[54];
|
|
351
|
-
let t30;
|
|
352
|
-
if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
|
|
353
|
-
t30 = /* @__PURE__ */ jsx(DescriptionList.Term, { children: "Calendar" });
|
|
354
|
-
$[55] = t30;
|
|
355
|
-
} else t30 = $[55];
|
|
356
|
-
const t31 = entry.kind === "scheduled" ? "Scheduled work" : "Run history";
|
|
357
|
-
let t32;
|
|
358
|
-
if ($[56] !== t31) {
|
|
359
|
-
t32 = /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [t30, /* @__PURE__ */ jsx(DescriptionList.Details, { children: t31 })] });
|
|
360
|
-
$[56] = t31;
|
|
361
|
-
$[57] = t32;
|
|
362
|
-
} else t32 = $[57];
|
|
363
|
-
let t33;
|
|
364
|
-
if ($[58] === Symbol.for("react.memo_cache_sentinel")) {
|
|
365
|
-
t33 = /* @__PURE__ */ jsx(DescriptionList.Term, { children: "Owner" });
|
|
366
|
-
$[58] = t33;
|
|
367
|
-
} else t33 = $[58];
|
|
368
|
-
let t34;
|
|
369
|
-
if ($[59] !== entry.schedule.owner.name) {
|
|
370
|
-
t34 = /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [t33, /* @__PURE__ */ jsx(DescriptionList.Details, { children: entry.schedule.owner.name })] });
|
|
371
|
-
$[59] = entry.schedule.owner.name;
|
|
372
|
-
$[60] = t34;
|
|
373
|
-
} else t34 = $[60];
|
|
374
|
-
let t35;
|
|
375
|
-
if ($[61] === Symbol.for("react.memo_cache_sentinel")) {
|
|
376
|
-
t35 = /* @__PURE__ */ jsx(DescriptionList.Term, { children: "Status" });
|
|
377
|
-
$[61] = t35;
|
|
378
|
-
} else t35 = $[61];
|
|
379
|
-
let t36;
|
|
380
|
-
if ($[62] !== entry) {
|
|
381
|
-
t36 = entryStatus(entry);
|
|
382
|
-
$[62] = entry;
|
|
383
|
-
$[63] = t36;
|
|
384
|
-
} else t36 = $[63];
|
|
385
|
-
let t37;
|
|
386
|
-
if ($[64] !== t36) {
|
|
387
|
-
t37 = /* @__PURE__ */ jsxs(DescriptionList.Item, { children: [t35, /* @__PURE__ */ jsx(DescriptionList.Details, { children: t36 })] });
|
|
388
|
-
$[64] = t36;
|
|
389
|
-
$[65] = t37;
|
|
390
|
-
} else t37 = $[65];
|
|
391
|
-
let t38;
|
|
392
|
-
if ($[66] !== t32 || $[67] !== t34 || $[68] !== t37) {
|
|
393
|
-
t38 = /* @__PURE__ */ jsxs(DescriptionList.Root, {
|
|
394
|
-
align: "start",
|
|
395
|
-
className: "computer-calendar__event-facts",
|
|
396
|
-
children: [
|
|
397
|
-
t32,
|
|
398
|
-
t34,
|
|
399
|
-
t37
|
|
400
|
-
]
|
|
401
|
-
});
|
|
402
|
-
$[66] = t32;
|
|
403
|
-
$[67] = t34;
|
|
404
|
-
$[68] = t37;
|
|
405
|
-
$[69] = t38;
|
|
406
|
-
} else t38 = $[69];
|
|
407
|
-
const t39 = entry.kind === "scheduled" ? "The next run confirmed by the schedule." : "A recorded run.";
|
|
408
|
-
let t40;
|
|
409
|
-
if ($[70] !== t39) {
|
|
410
|
-
t40 = /* @__PURE__ */ jsx("p", {
|
|
411
|
-
className: "computer-calendar__event-note",
|
|
412
|
-
children: t39
|
|
413
|
-
});
|
|
414
|
-
$[70] = t39;
|
|
415
|
-
$[71] = t40;
|
|
416
|
-
} else t40 = $[71];
|
|
417
|
-
let t41;
|
|
418
|
-
if ($[72] !== entry || $[73] !== sourceLink) {
|
|
419
|
-
t41 = sourceLink(entry);
|
|
420
|
-
$[72] = entry;
|
|
421
|
-
$[73] = sourceLink;
|
|
422
|
-
$[74] = t41;
|
|
423
|
-
} else t41 = $[74];
|
|
424
|
-
let t42;
|
|
425
|
-
if ($[75] !== t41) {
|
|
426
|
-
t42 = /* @__PURE__ */ jsx(LinkButton, {
|
|
427
|
-
render: t41,
|
|
428
|
-
variant: "surface",
|
|
429
|
-
color: "neutral",
|
|
430
|
-
size: "xs"
|
|
431
|
-
});
|
|
432
|
-
$[75] = t41;
|
|
433
|
-
$[76] = t42;
|
|
434
|
-
} else t42 = $[76];
|
|
435
|
-
let t43;
|
|
436
|
-
if ($[77] !== entry || $[78] !== onOpen) {
|
|
437
|
-
t43 = (event) => {
|
|
438
|
-
event.preventDefault();
|
|
439
|
-
navigating.current = true;
|
|
440
|
-
onOpen(entry);
|
|
441
|
-
};
|
|
442
|
-
$[77] = entry;
|
|
443
|
-
$[78] = onOpen;
|
|
444
|
-
$[79] = t43;
|
|
445
|
-
} else t43 = $[79];
|
|
446
|
-
const t44 = entry.kind === "scheduled" ? "Open schedule" : "Open run";
|
|
447
|
-
let t45;
|
|
448
|
-
if ($[80] !== t42 || $[81] !== t43 || $[82] !== t44) {
|
|
449
|
-
t45 = /* @__PURE__ */ jsx(Popover.Close, {
|
|
450
|
-
nativeButton: false,
|
|
451
|
-
role: "link",
|
|
452
|
-
render: t42,
|
|
453
|
-
onClick: t43,
|
|
454
|
-
children: t44
|
|
455
|
-
});
|
|
456
|
-
$[80] = t42;
|
|
457
|
-
$[81] = t43;
|
|
458
|
-
$[82] = t44;
|
|
459
|
-
$[83] = t45;
|
|
460
|
-
} else t45 = $[83];
|
|
461
|
-
let t46;
|
|
462
|
-
if ($[84] !== t22 || $[85] !== t29 || $[86] !== t38 || $[87] !== t40 || $[88] !== t45) {
|
|
463
|
-
t46 = /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
464
|
-
side: "right",
|
|
465
|
-
align: "start",
|
|
466
|
-
sideOffset: 8,
|
|
467
|
-
children: /* @__PURE__ */ jsxs(Popover.Popup, {
|
|
468
|
-
className: "computer-calendar__event-popup",
|
|
469
|
-
finalFocus: t19,
|
|
470
|
-
children: [
|
|
471
|
-
t22,
|
|
472
|
-
t29,
|
|
473
|
-
t38,
|
|
474
|
-
t40,
|
|
475
|
-
t45
|
|
476
|
-
]
|
|
477
|
-
})
|
|
478
|
-
}) });
|
|
479
|
-
$[84] = t22;
|
|
480
|
-
$[85] = t29;
|
|
481
|
-
$[86] = t38;
|
|
482
|
-
$[87] = t40;
|
|
483
|
-
$[88] = t45;
|
|
484
|
-
$[89] = t46;
|
|
485
|
-
} else t46 = $[89];
|
|
486
|
-
let t47;
|
|
487
|
-
if ($[90] !== t18 || $[91] !== t2 || $[92] !== t46) {
|
|
488
|
-
t47 = /* @__PURE__ */ jsxs(Popover.Root, {
|
|
489
|
-
onOpenChange: t2,
|
|
490
|
-
children: [t18, t46]
|
|
491
|
-
});
|
|
492
|
-
$[90] = t18;
|
|
493
|
-
$[91] = t2;
|
|
494
|
-
$[92] = t46;
|
|
495
|
-
$[93] = t47;
|
|
496
|
-
} else t47 = $[93];
|
|
497
|
-
return t47;
|
|
498
|
-
}
|
|
499
|
-
function CalendarOverflow(t0) {
|
|
500
|
-
const $ = c(31);
|
|
501
|
-
const { day, entries, onSelect, onOpen } = t0;
|
|
502
|
-
const navigating = useRef(false);
|
|
503
|
-
const sourceLink = useSourceLink();
|
|
504
|
-
const clock = useClock();
|
|
505
|
-
let t1;
|
|
506
|
-
if ($[0] !== day || $[1] !== onSelect) {
|
|
507
|
-
t1 = (open) => {
|
|
508
|
-
if (open) {
|
|
509
|
-
navigating.current = false;
|
|
510
|
-
onSelect(day);
|
|
511
|
-
}
|
|
512
|
-
};
|
|
513
|
-
$[0] = day;
|
|
514
|
-
$[1] = onSelect;
|
|
515
|
-
$[2] = t1;
|
|
516
|
-
} else t1 = $[2];
|
|
517
|
-
let t2;
|
|
518
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
519
|
-
t2 = /* @__PURE__ */ jsx(Button, {
|
|
520
|
-
variant: "ghost",
|
|
521
|
-
color: "neutral",
|
|
522
|
-
size: "xs"
|
|
523
|
-
});
|
|
524
|
-
$[3] = t2;
|
|
525
|
-
} else t2 = $[3];
|
|
526
|
-
const t3 = entries.length;
|
|
527
|
-
let t4;
|
|
528
|
-
if ($[4] !== day) {
|
|
529
|
-
t4 = fullDate.format(day);
|
|
530
|
-
$[4] = day;
|
|
531
|
-
$[5] = t4;
|
|
532
|
-
} else t4 = $[5];
|
|
533
|
-
const t5 = `Show all ${t3} events on ${t4}`;
|
|
534
|
-
const t6 = entries.length - 1;
|
|
535
|
-
let t7;
|
|
536
|
-
if ($[6] !== t5 || $[7] !== t6) {
|
|
537
|
-
t7 = /* @__PURE__ */ jsxs(Popover.Trigger, {
|
|
538
|
-
unstyled: true,
|
|
539
|
-
render: t2,
|
|
540
|
-
className: "computer-calendar__more",
|
|
541
|
-
"aria-label": t5,
|
|
542
|
-
children: [t6, " more…"]
|
|
543
|
-
});
|
|
544
|
-
$[6] = t5;
|
|
545
|
-
$[7] = t6;
|
|
546
|
-
$[8] = t7;
|
|
547
|
-
} else t7 = $[8];
|
|
548
|
-
let t8;
|
|
549
|
-
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
550
|
-
t8 = () => !navigating.current;
|
|
551
|
-
$[9] = t8;
|
|
552
|
-
} else t8 = $[9];
|
|
553
|
-
let t9;
|
|
554
|
-
if ($[10] !== day) {
|
|
555
|
-
t9 = dayFormat.format(day);
|
|
556
|
-
$[10] = day;
|
|
557
|
-
$[11] = t9;
|
|
558
|
-
} else t9 = $[11];
|
|
559
|
-
let t10;
|
|
560
|
-
if ($[12] !== t9) {
|
|
561
|
-
t10 = /* @__PURE__ */ jsx(Popover.Title, { children: t9 });
|
|
562
|
-
$[12] = t9;
|
|
563
|
-
$[13] = t10;
|
|
564
|
-
} else t10 = $[13];
|
|
565
|
-
let t11;
|
|
566
|
-
if ($[14] !== entries.length) {
|
|
567
|
-
t11 = /* @__PURE__ */ jsxs(Popover.Description, { children: [entries.length, " events"] });
|
|
568
|
-
$[14] = entries.length;
|
|
569
|
-
$[15] = t11;
|
|
570
|
-
} else t11 = $[15];
|
|
571
|
-
let t12;
|
|
572
|
-
if ($[16] !== clock || $[17] !== entries || $[18] !== onOpen || $[19] !== sourceLink) {
|
|
573
|
-
t12 = entries.map((entry) => /* @__PURE__ */ jsxs("li", { children: [
|
|
574
|
-
/* @__PURE__ */ jsx("time", {
|
|
575
|
-
dateTime: new Date(entry.timestamp).toISOString(),
|
|
576
|
-
children: clock.time.format(entry.timestamp)
|
|
577
|
-
}),
|
|
578
|
-
/* @__PURE__ */ jsx(Popover.Close, {
|
|
579
|
-
className: "computer-calendar__source-link",
|
|
580
|
-
render: /* @__PURE__ */ jsx(LinkButton, {
|
|
581
|
-
render: sourceLink(entry),
|
|
582
|
-
variant: "ghost",
|
|
583
|
-
color: "neutral",
|
|
584
|
-
size: "xs"
|
|
585
|
-
}),
|
|
586
|
-
nativeButton: false,
|
|
587
|
-
role: "link",
|
|
588
|
-
onClick: (event) => {
|
|
589
|
-
event.preventDefault();
|
|
590
|
-
navigating.current = true;
|
|
591
|
-
onOpen(entry);
|
|
592
|
-
},
|
|
593
|
-
children: entry.schedule.name
|
|
594
|
-
}),
|
|
595
|
-
/* @__PURE__ */ jsx("span", { children: entryStatus(entry) })
|
|
596
|
-
] }, entry.key));
|
|
597
|
-
$[16] = clock;
|
|
598
|
-
$[17] = entries;
|
|
599
|
-
$[18] = onOpen;
|
|
600
|
-
$[19] = sourceLink;
|
|
601
|
-
$[20] = t12;
|
|
602
|
-
} else t12 = $[20];
|
|
603
|
-
let t13;
|
|
604
|
-
if ($[21] !== t12) {
|
|
605
|
-
t13 = /* @__PURE__ */ jsx("ol", {
|
|
606
|
-
className: "computer-calendar__overflow-list",
|
|
607
|
-
children: t12
|
|
608
|
-
});
|
|
609
|
-
$[21] = t12;
|
|
610
|
-
$[22] = t13;
|
|
611
|
-
} else t13 = $[22];
|
|
612
|
-
let t14;
|
|
613
|
-
if ($[23] !== t10 || $[24] !== t11 || $[25] !== t13) {
|
|
614
|
-
t14 = /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
615
|
-
side: "right",
|
|
616
|
-
align: "start",
|
|
617
|
-
sideOffset: 8,
|
|
618
|
-
children: /* @__PURE__ */ jsxs(Popover.Popup, {
|
|
619
|
-
className: "computer-calendar__event-popup",
|
|
620
|
-
finalFocus: t8,
|
|
621
|
-
children: [
|
|
622
|
-
t10,
|
|
623
|
-
t11,
|
|
624
|
-
t13
|
|
625
|
-
]
|
|
626
|
-
})
|
|
627
|
-
}) });
|
|
628
|
-
$[23] = t10;
|
|
629
|
-
$[24] = t11;
|
|
630
|
-
$[25] = t13;
|
|
631
|
-
$[26] = t14;
|
|
632
|
-
} else t14 = $[26];
|
|
633
|
-
let t15;
|
|
634
|
-
if ($[27] !== t1 || $[28] !== t14 || $[29] !== t7) {
|
|
635
|
-
t15 = /* @__PURE__ */ jsxs(Popover.Root, {
|
|
636
|
-
onOpenChange: t1,
|
|
637
|
-
children: [t7, t14]
|
|
638
|
-
});
|
|
639
|
-
$[27] = t1;
|
|
640
|
-
$[28] = t14;
|
|
641
|
-
$[29] = t7;
|
|
642
|
-
$[30] = t15;
|
|
643
|
-
} else t15 = $[30];
|
|
644
|
-
return t15;
|
|
645
|
-
}
|
|
646
|
-
function CalendarMonth(t0) {
|
|
647
|
-
const $ = c(18);
|
|
648
|
-
const { entries, selected, month, onSelect, onSelectEvent, onOpen, mini: t1 } = t0;
|
|
649
|
-
const mini = t1 === void 0 ? false : t1;
|
|
650
|
-
const clock = useClock();
|
|
651
|
-
let t2;
|
|
652
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
653
|
-
t2 = /* @__PURE__ */ new Map();
|
|
654
|
-
$[0] = t2;
|
|
655
|
-
} else t2 = $[0];
|
|
656
|
-
const dates = useRef(t2);
|
|
657
|
-
const focusDate = useRef(null);
|
|
658
|
-
let t3;
|
|
659
|
-
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
660
|
-
t3 = () => {
|
|
661
|
-
if (focusDate.current === null) return;
|
|
662
|
-
const date = dates.current.get(focusDate.current);
|
|
663
|
-
date?.focus({ preventScroll: true });
|
|
664
|
-
date?.scrollIntoView({
|
|
665
|
-
block: "nearest",
|
|
666
|
-
inline: "nearest"
|
|
667
|
-
});
|
|
668
|
-
focusDate.current = null;
|
|
669
|
-
};
|
|
670
|
-
$[1] = t3;
|
|
671
|
-
} else t3 = $[1];
|
|
672
|
-
let t4;
|
|
673
|
-
if ($[2] !== month || $[3] !== selected) {
|
|
674
|
-
t4 = [selected, month];
|
|
675
|
-
$[2] = month;
|
|
676
|
-
$[3] = selected;
|
|
677
|
-
$[4] = t4;
|
|
678
|
-
} else t4 = $[4];
|
|
679
|
-
useLayoutEffect(t3, t4);
|
|
680
|
-
let t5;
|
|
681
|
-
if ($[5] !== clock || $[6] !== entries || $[7] !== mini || $[8] !== month || $[9] !== onOpen || $[10] !== onSelect || $[11] !== onSelectEvent || $[12] !== selected) {
|
|
682
|
-
const displayedMonth = new Date(month);
|
|
683
|
-
const first = Date.UTC(displayedMonth.getUTCFullYear(), displayedMonth.getUTCMonth(), 1);
|
|
684
|
-
const start = first - new Date(first).getUTCDay() * DAY;
|
|
685
|
-
const monthLabel = `${monthFormat.format(first)} ${displayedMonth.getUTCFullYear()}`;
|
|
686
|
-
const select = function select(day) {
|
|
687
|
-
if (day === selected && new Date(day).getUTCMonth() === displayedMonth.getUTCMonth()) {
|
|
688
|
-
onSelect(day);
|
|
689
|
-
return;
|
|
690
|
-
}
|
|
691
|
-
focusDate.current = day;
|
|
692
|
-
onSelect(day);
|
|
693
|
-
};
|
|
694
|
-
const navigate = function navigate(event, day_0) {
|
|
695
|
-
if (event.defaultPrevented || event.nativeEvent.isComposing || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
|
|
696
|
-
const weekday = new Date(day_0).getUTCDay();
|
|
697
|
-
const next = event.key === "ArrowLeft" ? day_0 - DAY : event.key === "ArrowRight" ? day_0 + DAY : event.key === "ArrowUp" ? day_0 - DAY * 7 : event.key === "ArrowDown" ? day_0 + DAY * 7 : event.key === "Home" ? day_0 - DAY * weekday : event.key === "End" ? day_0 + DAY * (6 - weekday) : event.key === "PageUp" ? moveMonth(day_0, -1) : event.key === "PageDown" ? moveMonth(day_0, 1) : null;
|
|
698
|
-
if (next === null) return;
|
|
699
|
-
event.preventDefault();
|
|
700
|
-
select(next);
|
|
701
|
-
};
|
|
702
|
-
let t6;
|
|
703
|
-
if ($[14] !== mini) {
|
|
704
|
-
t6 = weekdays.map((weekday_0) => /* @__PURE__ */ jsx("span", {
|
|
705
|
-
role: "columnheader",
|
|
706
|
-
"aria-label": weekday_0,
|
|
707
|
-
children: weekday_0.slice(0, mini ? 1 : 3)
|
|
708
|
-
}, weekday_0));
|
|
709
|
-
$[14] = mini;
|
|
710
|
-
$[15] = t6;
|
|
711
|
-
} else t6 = $[15];
|
|
712
|
-
let t7;
|
|
713
|
-
if ($[16] !== t6) {
|
|
714
|
-
t7 = /* @__PURE__ */ jsx("div", {
|
|
715
|
-
className: "computer-calendar__weekdays",
|
|
716
|
-
role: "row",
|
|
717
|
-
children: t6
|
|
718
|
-
});
|
|
719
|
-
$[16] = t6;
|
|
720
|
-
$[17] = t7;
|
|
721
|
-
} else t7 = $[17];
|
|
722
|
-
t5 = /* @__PURE__ */ jsxs("div", {
|
|
723
|
-
className: mini ? "computer-calendar__mini-grid" : "computer-calendar__month",
|
|
724
|
-
role: "grid",
|
|
725
|
-
"aria-label": mini ? `Date navigator, ${monthLabel}` : monthLabel,
|
|
726
|
-
children: [t7, Array.from({ length: 6 }, (_, week) => /* @__PURE__ */ jsx("div", {
|
|
727
|
-
className: "computer-calendar__week",
|
|
728
|
-
role: "row",
|
|
729
|
-
children: Array.from({ length: 7 }, (__0, column) => {
|
|
730
|
-
const day_1 = start + (week * 7 + column) * DAY;
|
|
731
|
-
const items = entries.filter((entry) => entry.day === day_1);
|
|
732
|
-
const date_0 = new Date(day_1);
|
|
733
|
-
const outside = date_0.getUTCMonth() !== displayedMonth.getUTCMonth();
|
|
734
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
735
|
-
className: "computer-calendar__cell",
|
|
736
|
-
role: "gridcell",
|
|
737
|
-
"aria-selected": day_1 === selected,
|
|
738
|
-
"data-outside": outside ? "" : void 0,
|
|
739
|
-
"data-weekend": column === 0 || column === 6 ? "" : void 0,
|
|
740
|
-
children: [/* @__PURE__ */ jsxs("button", {
|
|
741
|
-
className: "computer-calendar__date",
|
|
742
|
-
type: "button",
|
|
743
|
-
"data-date": dateKey(day_1),
|
|
744
|
-
"aria-label": `${mini ? "Go to " : ""}${fullDate.format(day_1)}${items.length ? `, ${items.length} ${items.length === 1 ? "event" : "events"}` : ""}`,
|
|
745
|
-
"aria-current": day_1 === clock.today ? "date" : void 0,
|
|
746
|
-
tabIndex: day_1 === selected ? 0 : -1,
|
|
747
|
-
ref: (node) => {
|
|
748
|
-
if (node) dates.current.set(day_1, node);
|
|
749
|
-
else dates.current.delete(day_1);
|
|
750
|
-
},
|
|
751
|
-
onClick: () => select(day_1),
|
|
752
|
-
onKeyDown: (event_0) => navigate(event_0, day_1),
|
|
753
|
-
children: [/* @__PURE__ */ jsxs("span", {
|
|
754
|
-
className: "computer-calendar__number",
|
|
755
|
-
children: [!mini && date_0.getUTCDate() === 1 ? /* @__PURE__ */ jsxs("span", {
|
|
756
|
-
className: "computer-calendar__month-prefix",
|
|
757
|
-
children: [monthFormat.format(day_1).slice(0, 3), "\xA0"]
|
|
758
|
-
}) : null, date_0.getUTCDate()]
|
|
759
|
-
}), !mini && items.length ? /* @__PURE__ */ jsx("span", {
|
|
760
|
-
className: "computer-calendar__event-indicator",
|
|
761
|
-
"data-kind": items.some(_temp) ? "scheduled" : "run"
|
|
762
|
-
}) : null]
|
|
763
|
-
}), !mini && items.length ? /* @__PURE__ */ jsxs("div", {
|
|
764
|
-
className: "computer-calendar__events",
|
|
765
|
-
children: [items.slice(0, items.length > 2 ? 1 : 2).map((entry_1) => /* @__PURE__ */ jsx(CalendarEvent, {
|
|
766
|
-
entry: entry_1,
|
|
767
|
-
onSelect: onSelectEvent,
|
|
768
|
-
onOpen
|
|
769
|
-
}, entry_1.key)), items.length > 2 ? /* @__PURE__ */ jsx(CalendarOverflow, {
|
|
770
|
-
day: day_1,
|
|
771
|
-
entries: items,
|
|
772
|
-
onSelect: onSelectEvent,
|
|
773
|
-
onOpen
|
|
774
|
-
}) : null]
|
|
775
|
-
}) : null]
|
|
776
|
-
}, day_1);
|
|
777
|
-
})
|
|
778
|
-
}, week))]
|
|
779
|
-
});
|
|
780
|
-
$[5] = clock;
|
|
781
|
-
$[6] = entries;
|
|
782
|
-
$[7] = mini;
|
|
783
|
-
$[8] = month;
|
|
784
|
-
$[9] = onOpen;
|
|
785
|
-
$[10] = onSelect;
|
|
786
|
-
$[11] = onSelectEvent;
|
|
787
|
-
$[12] = selected;
|
|
788
|
-
$[13] = t5;
|
|
789
|
-
} else t5 = $[13];
|
|
790
|
-
return t5;
|
|
791
|
-
}
|
|
792
|
-
function _temp(entry_0) {
|
|
793
|
-
return entry_0.kind === "scheduled";
|
|
794
|
-
}
|
|
795
|
-
/** Today's date on Calendar's paper, from the host's clock. */
|
|
796
|
-
function CalendarIcon() {
|
|
797
|
-
const $ = c(13);
|
|
798
|
-
const { clock } = useComputerAutomationsContext();
|
|
799
|
-
let t0;
|
|
800
|
-
if ($[0] !== clock.now || $[1] !== clock.timeZone) {
|
|
801
|
-
t0 = zonedFormat(clock.timeZone, { weekday: "short" }).format(clock.now);
|
|
802
|
-
$[0] = clock.now;
|
|
803
|
-
$[1] = clock.timeZone;
|
|
804
|
-
$[2] = t0;
|
|
805
|
-
} else t0 = $[2];
|
|
806
|
-
let t1;
|
|
807
|
-
if ($[3] !== t0) {
|
|
808
|
-
t1 = /* @__PURE__ */ jsx("span", { children: t0 });
|
|
809
|
-
$[3] = t0;
|
|
810
|
-
$[4] = t1;
|
|
811
|
-
} else t1 = $[4];
|
|
812
|
-
let t2;
|
|
813
|
-
if ($[5] !== clock.now || $[6] !== clock.timeZone) {
|
|
814
|
-
t2 = zonedFormat(clock.timeZone, { day: "numeric" }).format(clock.now);
|
|
815
|
-
$[5] = clock.now;
|
|
816
|
-
$[6] = clock.timeZone;
|
|
817
|
-
$[7] = t2;
|
|
818
|
-
} else t2 = $[7];
|
|
819
|
-
let t3;
|
|
820
|
-
if ($[8] !== t2) {
|
|
821
|
-
t3 = /* @__PURE__ */ jsx("strong", { children: t2 });
|
|
822
|
-
$[8] = t2;
|
|
823
|
-
$[9] = t3;
|
|
824
|
-
} else t3 = $[9];
|
|
825
|
-
let t4;
|
|
826
|
-
if ($[10] !== t1 || $[11] !== t3) {
|
|
827
|
-
t4 = /* @__PURE__ */ jsxs("span", {
|
|
828
|
-
className: "computer-app-calendar",
|
|
829
|
-
"aria-hidden": "true",
|
|
830
|
-
children: [t1, t3]
|
|
831
|
-
});
|
|
832
|
-
$[10] = t1;
|
|
833
|
-
$[11] = t3;
|
|
834
|
-
$[12] = t4;
|
|
835
|
-
} else t4 = $[12];
|
|
836
|
-
return t4;
|
|
837
|
-
}
|
|
838
|
-
/**
|
|
839
|
-
* Calendar: each schedule's confirmed next run and its retained runs on the
|
|
840
|
-
* employee's wall clock. Opening one shows it in Automations.
|
|
841
|
-
*/
|
|
842
|
-
function useCalendarModel() {
|
|
843
|
-
const $ = c(71);
|
|
844
|
-
const { host, clock: hostClock, calendar } = useComputerAutomationsContext();
|
|
845
|
-
const { openApp } = useAgentComputerActions();
|
|
846
|
-
let t0;
|
|
847
|
-
if ($[0] !== openApp) {
|
|
848
|
-
t0 = (shown) => void shown.then((ok) => {
|
|
849
|
-
if (ok) openApp(COMPUTER_APP_IDS.automations);
|
|
850
|
-
});
|
|
851
|
-
$[0] = openApp;
|
|
852
|
-
$[1] = t0;
|
|
853
|
-
} else t0 = $[1];
|
|
854
|
-
const showAutomations = t0;
|
|
855
|
-
let t1;
|
|
856
|
-
if ($[2] !== calendar || $[3] !== showAutomations) {
|
|
857
|
-
t1 = () => showAutomations(calendar.createSchedule());
|
|
858
|
-
$[2] = calendar;
|
|
859
|
-
$[3] = showAutomations;
|
|
860
|
-
$[4] = t1;
|
|
861
|
-
} else t1 = $[4];
|
|
862
|
-
const onCreateSchedule = t1;
|
|
863
|
-
const { schedules } = host;
|
|
864
|
-
const clock = calendarClock(hostClock.timeZone, hostClock.now);
|
|
865
|
-
const [t2, setDate] = useState({
|
|
866
|
-
selected: clock.today,
|
|
867
|
-
month: clock.today
|
|
868
|
-
});
|
|
869
|
-
const { selected, month } = t2;
|
|
870
|
-
const searchRef = useRef(null);
|
|
871
|
-
const [showScheduled, setShowScheduled] = useState(true);
|
|
872
|
-
const [showRuns, setShowRuns] = useState(true);
|
|
873
|
-
const [query, setQuery] = useState("");
|
|
874
|
-
let t3;
|
|
875
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
876
|
-
t3 = (day) => setDate({
|
|
877
|
-
selected: day,
|
|
878
|
-
month: day
|
|
879
|
-
});
|
|
880
|
-
$[5] = t3;
|
|
881
|
-
} else t3 = $[5];
|
|
882
|
-
const selectDate = t3;
|
|
883
|
-
let t4;
|
|
884
|
-
if ($[6] !== selectDate) {
|
|
885
|
-
t4 = (day_0) => {
|
|
886
|
-
setQuery("");
|
|
887
|
-
selectDate(day_0);
|
|
888
|
-
};
|
|
889
|
-
$[6] = selectDate;
|
|
890
|
-
$[7] = t4;
|
|
891
|
-
} else t4 = $[7];
|
|
892
|
-
const navigateDate = t4;
|
|
893
|
-
let t5;
|
|
894
|
-
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
895
|
-
t5 = (day_1) => setDate((current) => ({
|
|
896
|
-
...current,
|
|
897
|
-
selected: day_1
|
|
898
|
-
}));
|
|
899
|
-
$[8] = t5;
|
|
900
|
-
} else t5 = $[8];
|
|
901
|
-
const selectEvent = t5;
|
|
902
|
-
let t6;
|
|
903
|
-
if ($[9] !== month || $[10] !== navigateDate) {
|
|
904
|
-
t6 = (offset) => {
|
|
905
|
-
const day_2 = moveMonth(month, offset);
|
|
906
|
-
navigateDate(day_2);
|
|
907
|
-
};
|
|
908
|
-
$[9] = month;
|
|
909
|
-
$[10] = navigateDate;
|
|
910
|
-
$[11] = t6;
|
|
911
|
-
} else t6 = $[11];
|
|
912
|
-
const navigateMonth = t6;
|
|
913
|
-
let t7;
|
|
914
|
-
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
915
|
-
t7 = () => {
|
|
916
|
-
setQuery("");
|
|
917
|
-
searchRef.current?.focus({ preventScroll: true });
|
|
918
|
-
};
|
|
919
|
-
$[12] = t7;
|
|
920
|
-
} else t7 = $[12];
|
|
921
|
-
const clearSearch = t7;
|
|
922
|
-
let t8;
|
|
923
|
-
if ($[13] !== onCreateSchedule) {
|
|
924
|
-
t8 = () => onCreateSchedule();
|
|
925
|
-
$[13] = onCreateSchedule;
|
|
926
|
-
$[14] = t8;
|
|
927
|
-
} else t8 = $[14];
|
|
928
|
-
let t9;
|
|
929
|
-
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
930
|
-
t9 = /* @__PURE__ */ jsx(PlusIcon, {});
|
|
931
|
-
$[15] = t9;
|
|
932
|
-
} else t9 = $[15];
|
|
933
|
-
let t10;
|
|
934
|
-
if ($[16] !== t8) {
|
|
935
|
-
t10 = /* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
936
|
-
label: "New schedule",
|
|
937
|
-
onClick: t8,
|
|
938
|
-
children: t9
|
|
939
|
-
});
|
|
940
|
-
$[16] = t8;
|
|
941
|
-
$[17] = t10;
|
|
942
|
-
} else t10 = $[17];
|
|
943
|
-
const newSchedule = t10;
|
|
944
|
-
let t11;
|
|
945
|
-
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
946
|
-
t11 = /* @__PURE__ */ jsx(SearchField.Label, {
|
|
947
|
-
className: "sigvelo-visually-hidden",
|
|
948
|
-
children: "Search calendar"
|
|
949
|
-
});
|
|
950
|
-
$[18] = t11;
|
|
951
|
-
} else t11 = $[18];
|
|
952
|
-
let t12;
|
|
953
|
-
if ($[19] !== clearSearch || $[20] !== query) {
|
|
954
|
-
t12 = (event) => {
|
|
955
|
-
if (event.defaultPrevented || event.key !== "Escape" || event.nativeEvent.isComposing || !query) return;
|
|
956
|
-
event.preventDefault();
|
|
957
|
-
event.stopPropagation();
|
|
958
|
-
clearSearch();
|
|
959
|
-
};
|
|
960
|
-
$[19] = clearSearch;
|
|
961
|
-
$[20] = query;
|
|
962
|
-
$[21] = t12;
|
|
963
|
-
} else t12 = $[21];
|
|
964
|
-
let t13;
|
|
965
|
-
if ($[22] !== query || $[23] !== t12) {
|
|
966
|
-
t13 = /* @__PURE__ */ jsxs(SearchField.Root, {
|
|
967
|
-
className: "computer-calendar__search",
|
|
968
|
-
children: [t11, /* @__PURE__ */ jsx(SearchField.Control, {
|
|
969
|
-
ref: searchRef,
|
|
970
|
-
placeholder: "Search",
|
|
971
|
-
value: query,
|
|
972
|
-
onValueChange: setQuery,
|
|
973
|
-
onKeyDown: t12
|
|
974
|
-
})]
|
|
975
|
-
});
|
|
976
|
-
$[22] = query;
|
|
977
|
-
$[23] = t12;
|
|
978
|
-
$[24] = t13;
|
|
979
|
-
} else t13 = $[24];
|
|
980
|
-
const search = t13;
|
|
981
|
-
const titleId = useId();
|
|
982
|
-
const scheduledId = useId();
|
|
983
|
-
const runsId = useId();
|
|
984
|
-
const allEntries = calendarEntries(schedules, clock);
|
|
985
|
-
const term = query.trim().toLocaleLowerCase();
|
|
986
|
-
const entries = allEntries.filter((entry) => (entry.kind === "scheduled" ? showScheduled : showRuns) && (!term || `${entry.schedule.name} ${entry.schedule.owner.name} ${entryStatus(entry)}`.toLocaleLowerCase().includes(term)));
|
|
987
|
-
let t14;
|
|
988
|
-
if ($[25] !== selected) {
|
|
989
|
-
t14 = (entry_0) => entry_0.day === selected;
|
|
990
|
-
$[25] = selected;
|
|
991
|
-
$[26] = t14;
|
|
992
|
-
} else t14 = $[26];
|
|
993
|
-
const agenda = entries.filter(t14);
|
|
994
|
-
let t15;
|
|
995
|
-
if ($[27] !== month) {
|
|
996
|
-
t15 = new Date(month);
|
|
997
|
-
$[27] = month;
|
|
998
|
-
$[28] = t15;
|
|
999
|
-
} else t15 = $[28];
|
|
1000
|
-
const displayedMonth = t15;
|
|
1001
|
-
const searchDays = Map.groupBy(entries, _temp2);
|
|
1002
|
-
let t16;
|
|
1003
|
-
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1004
|
-
t16 = (event_0) => {
|
|
1005
|
-
if (event_0.defaultPrevented || event_0.nativeEvent.isComposing || event_0.altKey || event_0.shiftKey || !(event_0.metaKey || event_0.ctrlKey) || event_0.key.toLowerCase() !== "f") return;
|
|
1006
|
-
event_0.preventDefault();
|
|
1007
|
-
searchRef.current?.focus({ preventScroll: true });
|
|
1008
|
-
searchRef.current?.select();
|
|
1009
|
-
};
|
|
1010
|
-
$[29] = t16;
|
|
1011
|
-
} else t16 = $[29];
|
|
1012
|
-
let t17;
|
|
1013
|
-
if ($[30] !== newSchedule || $[31] !== search) {
|
|
1014
|
-
t17 = (t18) => {
|
|
1015
|
-
const { phone } = t18;
|
|
1016
|
-
return phone ? null : /* @__PURE__ */ jsxs(AppTopBar.Root, {
|
|
1017
|
-
className: "computer-calendar-toolbar",
|
|
1018
|
-
"aria-label": "Calendar controls",
|
|
1019
|
-
children: [/* @__PURE__ */ jsx(AppTopBar.Leading, { children: newSchedule }), /* @__PURE__ */ jsx(AppTopBar.Trailing, { children: search })]
|
|
1020
|
-
});
|
|
1021
|
-
};
|
|
1022
|
-
$[30] = newSchedule;
|
|
1023
|
-
$[31] = search;
|
|
1024
|
-
$[32] = t17;
|
|
1025
|
-
} else t17 = $[32];
|
|
1026
|
-
let t18;
|
|
1027
|
-
if ($[33] !== clock || $[34] !== navigateDate || $[35] !== navigateMonth || $[36] !== onCreateSchedule || $[37] !== setShowRuns || $[38] !== setShowScheduled || $[39] !== showRuns || $[40] !== showScheduled) {
|
|
1028
|
-
t18 = () => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Menubar.Menu, { children: [/* @__PURE__ */ jsx(Menubar.Trigger, { children: "File" }), /* @__PURE__ */ jsx(Menubar.Portal, { children: /* @__PURE__ */ jsx(Menubar.Positioner, {
|
|
1029
|
-
align: "start",
|
|
1030
|
-
sideOffset: 4,
|
|
1031
|
-
children: /* @__PURE__ */ jsx(Menubar.Popup, { children: /* @__PURE__ */ jsx(Menubar.Item, {
|
|
1032
|
-
onClick: () => onCreateSchedule(),
|
|
1033
|
-
children: "New Schedule"
|
|
1034
|
-
}) })
|
|
1035
|
-
}) })] }), /* @__PURE__ */ jsxs(Menubar.Menu, { children: [/* @__PURE__ */ jsx(Menubar.Trigger, { children: "View" }), /* @__PURE__ */ jsx(Menubar.Portal, { children: /* @__PURE__ */ jsx(Menubar.Positioner, {
|
|
1036
|
-
align: "start",
|
|
1037
|
-
sideOffset: 4,
|
|
1038
|
-
children: /* @__PURE__ */ jsxs(Menubar.Popup, { children: [
|
|
1039
|
-
/* @__PURE__ */ jsx(Menubar.Item, {
|
|
1040
|
-
onClick: () => navigateDate(clock.today),
|
|
1041
|
-
children: "Go to Today"
|
|
1042
|
-
}),
|
|
1043
|
-
/* @__PURE__ */ jsx(Menubar.Item, {
|
|
1044
|
-
onClick: () => navigateMonth(-1),
|
|
1045
|
-
children: "Previous Month"
|
|
1046
|
-
}),
|
|
1047
|
-
/* @__PURE__ */ jsx(Menubar.Item, {
|
|
1048
|
-
onClick: () => navigateMonth(1),
|
|
1049
|
-
children: "Next Month"
|
|
1050
|
-
}),
|
|
1051
|
-
/* @__PURE__ */ jsx(Menubar.Separator, {}),
|
|
1052
|
-
/* @__PURE__ */ jsxs(Menubar.CheckboxItem, {
|
|
1053
|
-
checked: showScheduled,
|
|
1054
|
-
onCheckedChange: setShowScheduled,
|
|
1055
|
-
children: [/* @__PURE__ */ jsx(Menubar.CheckboxItemIndicator, {}), "Scheduled work"]
|
|
1056
|
-
}),
|
|
1057
|
-
/* @__PURE__ */ jsxs(Menubar.CheckboxItem, {
|
|
1058
|
-
checked: showRuns,
|
|
1059
|
-
onCheckedChange: setShowRuns,
|
|
1060
|
-
children: [/* @__PURE__ */ jsx(Menubar.CheckboxItemIndicator, {}), "Run history"]
|
|
1061
|
-
})
|
|
1062
|
-
] })
|
|
1063
|
-
}) })] })] });
|
|
1064
|
-
$[33] = clock;
|
|
1065
|
-
$[34] = navigateDate;
|
|
1066
|
-
$[35] = navigateMonth;
|
|
1067
|
-
$[36] = onCreateSchedule;
|
|
1068
|
-
$[37] = setShowRuns;
|
|
1069
|
-
$[38] = setShowScheduled;
|
|
1070
|
-
$[39] = showRuns;
|
|
1071
|
-
$[40] = showScheduled;
|
|
1072
|
-
$[41] = t18;
|
|
1073
|
-
} else t18 = $[41];
|
|
1074
|
-
let t19;
|
|
1075
|
-
if ($[42] !== agenda || $[43] !== calendar || $[44] !== clearSearch || $[45] !== clock || $[46] !== displayedMonth || $[47] !== entries || $[48] !== month || $[49] !== navigateDate || $[50] !== navigateMonth || $[51] !== newSchedule || $[52] !== runsId || $[53] !== scheduledId || $[54] !== search || $[55] !== searchDays || $[56] !== selectDate || $[57] !== selectEvent || $[58] !== selected || $[59] !== setShowRuns || $[60] !== setShowScheduled || $[61] !== showAutomations || $[62] !== showRuns || $[63] !== showScheduled || $[64] !== term || $[65] !== titleId) {
|
|
1076
|
-
t19 = (t20) => {
|
|
1077
|
-
const { phone: phone_0 } = t20;
|
|
1078
|
-
const openEntry = (entry_2) => {
|
|
1079
|
-
showAutomations(entry_2.kind === "scheduled" ? calendar.openSchedule(entry_2.schedule.id) : calendar.openRun(entry_2.run));
|
|
1080
|
-
};
|
|
1081
|
-
return /* @__PURE__ */ jsx(CalendarClockContext, {
|
|
1082
|
-
value: clock,
|
|
1083
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
1084
|
-
className: "computer-calendar",
|
|
1085
|
-
children: /* @__PURE__ */ jsx(ResponsiveSidebarShell, {
|
|
1086
|
-
className: "computer-calendar__shell",
|
|
1087
|
-
sidebarLabel: "calendars",
|
|
1088
|
-
sidebarTogglePlacement: "sidebar",
|
|
1089
|
-
defaultSidebarWidth: 180,
|
|
1090
|
-
bar: phone_0 ? {
|
|
1091
|
-
label: "Calendar controls",
|
|
1092
|
-
title: term ? "Search" : "Month",
|
|
1093
|
-
leading: newSchedule,
|
|
1094
|
-
actions: search
|
|
1095
|
-
} : { hidden: true },
|
|
1096
|
-
sidebar: /* @__PURE__ */ jsxs("div", {
|
|
1097
|
-
className: "computer-calendar__sidebar",
|
|
1098
|
-
children: [/* @__PURE__ */ jsxs("fieldset", {
|
|
1099
|
-
className: "computer-calendar__sources",
|
|
1100
|
-
children: [
|
|
1101
|
-
/* @__PURE__ */ jsx("legend", { children: "Calendars" }),
|
|
1102
|
-
/* @__PURE__ */ jsxs("label", {
|
|
1103
|
-
className: "computer-calendar__source",
|
|
1104
|
-
"data-kind": "scheduled",
|
|
1105
|
-
htmlFor: scheduledId,
|
|
1106
|
-
children: [/* @__PURE__ */ jsx(Checkbox.Root, {
|
|
1107
|
-
id: scheduledId,
|
|
1108
|
-
checked: showScheduled,
|
|
1109
|
-
onCheckedChange: setShowScheduled,
|
|
1110
|
-
children: /* @__PURE__ */ jsx(Checkbox.Indicator, {})
|
|
1111
|
-
}), "Scheduled work"]
|
|
1112
|
-
}),
|
|
1113
|
-
/* @__PURE__ */ jsxs("label", {
|
|
1114
|
-
className: "computer-calendar__source",
|
|
1115
|
-
"data-kind": "run",
|
|
1116
|
-
htmlFor: runsId,
|
|
1117
|
-
children: [/* @__PURE__ */ jsx(Checkbox.Root, {
|
|
1118
|
-
id: runsId,
|
|
1119
|
-
className: "computer-calendar__history-checkbox",
|
|
1120
|
-
checked: showRuns,
|
|
1121
|
-
onCheckedChange: setShowRuns,
|
|
1122
|
-
children: /* @__PURE__ */ jsx(Checkbox.Indicator, { className: "computer-calendar__history-checkmark" })
|
|
1123
|
-
}), "Run history"]
|
|
1124
|
-
})
|
|
1125
|
-
]
|
|
1126
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
1127
|
-
className: "computer-calendar__mini",
|
|
1128
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
1129
|
-
className: "computer-calendar__mini-navigation",
|
|
1130
|
-
children: [
|
|
1131
|
-
/* @__PURE__ */ jsx(IconButton, {
|
|
1132
|
-
label: "Previous mini-calendar month",
|
|
1133
|
-
variant: "ghost",
|
|
1134
|
-
color: "neutral",
|
|
1135
|
-
size: "xs",
|
|
1136
|
-
onClick: () => navigateMonth(-1),
|
|
1137
|
-
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
1138
|
-
}),
|
|
1139
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
1140
|
-
monthFormat.format(month),
|
|
1141
|
-
" ",
|
|
1142
|
-
displayedMonth.getUTCFullYear()
|
|
1143
|
-
] }),
|
|
1144
|
-
/* @__PURE__ */ jsx(IconButton, {
|
|
1145
|
-
label: "Next mini-calendar month",
|
|
1146
|
-
variant: "ghost",
|
|
1147
|
-
color: "neutral",
|
|
1148
|
-
size: "xs",
|
|
1149
|
-
onClick: () => navigateMonth(1),
|
|
1150
|
-
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
1151
|
-
})
|
|
1152
|
-
]
|
|
1153
|
-
}), /* @__PURE__ */ jsx(CalendarMonth, {
|
|
1154
|
-
mini: true,
|
|
1155
|
-
entries,
|
|
1156
|
-
selected,
|
|
1157
|
-
month,
|
|
1158
|
-
onSelect: navigateDate,
|
|
1159
|
-
onSelectEvent: selectEvent,
|
|
1160
|
-
onOpen: openEntry
|
|
1161
|
-
})]
|
|
1162
|
-
})]
|
|
1163
|
-
}),
|
|
1164
|
-
children: /* @__PURE__ */ jsx("section", {
|
|
1165
|
-
className: "computer-calendar__canvas",
|
|
1166
|
-
"aria-labelledby": titleId,
|
|
1167
|
-
children: term ? /* @__PURE__ */ jsxs("div", {
|
|
1168
|
-
className: "computer-calendar__search-results",
|
|
1169
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
1170
|
-
className: "computer-calendar__search-heading",
|
|
1171
|
-
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h2", {
|
|
1172
|
-
id: titleId,
|
|
1173
|
-
children: "Search results"
|
|
1174
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
1175
|
-
role: "status",
|
|
1176
|
-
children: [
|
|
1177
|
-
entries.length,
|
|
1178
|
-
" ",
|
|
1179
|
-
entries.length === 1 ? "event" : "events",
|
|
1180
|
-
" in visible calendars"
|
|
1181
|
-
]
|
|
1182
|
-
})] }), /* @__PURE__ */ jsx(Button, {
|
|
1183
|
-
variant: "ghost",
|
|
1184
|
-
color: "neutral",
|
|
1185
|
-
size: "xs",
|
|
1186
|
-
onClick: clearSearch,
|
|
1187
|
-
children: "Done"
|
|
1188
|
-
})]
|
|
1189
|
-
}), entries.length ? /* @__PURE__ */ jsx("ol", {
|
|
1190
|
-
className: "computer-calendar__search-days",
|
|
1191
|
-
"aria-label": "Calendar search results",
|
|
1192
|
-
children: [...searchDays].map((t21) => {
|
|
1193
|
-
const [day_3, dayEntries] = t21;
|
|
1194
|
-
return /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsx("h3", { children: fullDate.format(day_3) }), /* @__PURE__ */ jsx("ol", {
|
|
1195
|
-
className: "computer-calendar__search-events",
|
|
1196
|
-
children: dayEntries.map((entry_3) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(CalendarEvent, {
|
|
1197
|
-
entry: entry_3,
|
|
1198
|
-
detailed: true,
|
|
1199
|
-
onSelect: selectDate,
|
|
1200
|
-
onOpen: openEntry
|
|
1201
|
-
}) }, entry_3.key))
|
|
1202
|
-
})] }, day_3);
|
|
1203
|
-
})
|
|
1204
|
-
}) : /* @__PURE__ */ jsx(EmptyState, {
|
|
1205
|
-
className: "computer-calendar__search-empty",
|
|
1206
|
-
title: /* @__PURE__ */ jsx("h3", { children: !showScheduled && !showRuns ? "Calendars are hidden" : "No matching events" }),
|
|
1207
|
-
description: !showScheduled && !showRuns ? "Show a calendar to search its events." : "Try a different name, owner, or run status."
|
|
1208
|
-
})]
|
|
1209
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1210
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1211
|
-
className: "computer-calendar__month-heading",
|
|
1212
|
-
children: [/* @__PURE__ */ jsxs("h2", {
|
|
1213
|
-
id: titleId,
|
|
1214
|
-
className: "computer-calendar__title",
|
|
1215
|
-
"aria-live": "polite",
|
|
1216
|
-
"aria-atomic": "true",
|
|
1217
|
-
children: [
|
|
1218
|
-
/* @__PURE__ */ jsx("strong", { children: monthFormat.format(month) }),
|
|
1219
|
-
" ",
|
|
1220
|
-
displayedMonth.getUTCFullYear()
|
|
1221
|
-
]
|
|
1222
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
1223
|
-
className: "computer-calendar__navigation",
|
|
1224
|
-
"aria-label": "Month navigation",
|
|
1225
|
-
children: [
|
|
1226
|
-
/* @__PURE__ */ jsx(IconButton, {
|
|
1227
|
-
label: "Previous month",
|
|
1228
|
-
variant: "ghost",
|
|
1229
|
-
color: "neutral",
|
|
1230
|
-
size: "xs",
|
|
1231
|
-
onClick: () => navigateMonth(-1),
|
|
1232
|
-
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
1233
|
-
}),
|
|
1234
|
-
/* @__PURE__ */ jsx(Button, {
|
|
1235
|
-
variant: "surface",
|
|
1236
|
-
color: "neutral",
|
|
1237
|
-
size: "xs",
|
|
1238
|
-
onClick: () => navigateDate(clock.today),
|
|
1239
|
-
children: "Today"
|
|
1240
|
-
}),
|
|
1241
|
-
/* @__PURE__ */ jsx(IconButton, {
|
|
1242
|
-
label: "Next month",
|
|
1243
|
-
variant: "ghost",
|
|
1244
|
-
color: "neutral",
|
|
1245
|
-
size: "xs",
|
|
1246
|
-
onClick: () => navigateMonth(1),
|
|
1247
|
-
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
1248
|
-
})
|
|
1249
|
-
]
|
|
1250
|
-
})]
|
|
1251
|
-
}),
|
|
1252
|
-
/* @__PURE__ */ jsx(CalendarMonth, {
|
|
1253
|
-
entries,
|
|
1254
|
-
selected,
|
|
1255
|
-
month,
|
|
1256
|
-
onSelect: navigateDate,
|
|
1257
|
-
onSelectEvent: selectEvent,
|
|
1258
|
-
onOpen: openEntry
|
|
1259
|
-
}),
|
|
1260
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1261
|
-
className: "computer-calendar__day-context",
|
|
1262
|
-
"aria-live": "polite",
|
|
1263
|
-
"aria-atomic": "true",
|
|
1264
|
-
children: [/* @__PURE__ */ jsx("h3", {
|
|
1265
|
-
className: "computer-calendar__day-heading",
|
|
1266
|
-
children: dayFormat.format(selected)
|
|
1267
|
-
}), /* @__PURE__ */ jsx("p", { children: !showScheduled && !showRuns ? "Calendars are hidden" : agenda.length ? `${agenda.length} ${agenda.length === 1 ? "event" : "events"}` : "No events on this day" })]
|
|
1268
|
-
}),
|
|
1269
|
-
agenda.length ? /* @__PURE__ */ jsx("ol", {
|
|
1270
|
-
className: "computer-calendar__phone-agenda",
|
|
1271
|
-
children: agenda.map((entry_4) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(CalendarEvent, {
|
|
1272
|
-
entry: entry_4,
|
|
1273
|
-
detailed: true,
|
|
1274
|
-
onSelect: selectEvent,
|
|
1275
|
-
onOpen: openEntry
|
|
1276
|
-
}) }, entry_4.key))
|
|
1277
|
-
}) : null
|
|
1278
|
-
] })
|
|
1279
|
-
})
|
|
1280
|
-
})
|
|
1281
|
-
})
|
|
1282
|
-
});
|
|
1283
|
-
};
|
|
1284
|
-
$[42] = agenda;
|
|
1285
|
-
$[43] = calendar;
|
|
1286
|
-
$[44] = clearSearch;
|
|
1287
|
-
$[45] = clock;
|
|
1288
|
-
$[46] = displayedMonth;
|
|
1289
|
-
$[47] = entries;
|
|
1290
|
-
$[48] = month;
|
|
1291
|
-
$[49] = navigateDate;
|
|
1292
|
-
$[50] = navigateMonth;
|
|
1293
|
-
$[51] = newSchedule;
|
|
1294
|
-
$[52] = runsId;
|
|
1295
|
-
$[53] = scheduledId;
|
|
1296
|
-
$[54] = search;
|
|
1297
|
-
$[55] = searchDays;
|
|
1298
|
-
$[56] = selectDate;
|
|
1299
|
-
$[57] = selectEvent;
|
|
1300
|
-
$[58] = selected;
|
|
1301
|
-
$[59] = setShowRuns;
|
|
1302
|
-
$[60] = setShowScheduled;
|
|
1303
|
-
$[61] = showAutomations;
|
|
1304
|
-
$[62] = showRuns;
|
|
1305
|
-
$[63] = showScheduled;
|
|
1306
|
-
$[64] = term;
|
|
1307
|
-
$[65] = titleId;
|
|
1308
|
-
$[66] = t19;
|
|
1309
|
-
} else t19 = $[66];
|
|
1310
|
-
let t20;
|
|
1311
|
-
if ($[67] !== t17 || $[68] !== t18 || $[69] !== t19) {
|
|
1312
|
-
t20 = {
|
|
1313
|
-
onKeyDown: t16,
|
|
1314
|
-
renderTitle: t17,
|
|
1315
|
-
renderMenus: t18,
|
|
1316
|
-
render: t19
|
|
1317
|
-
};
|
|
1318
|
-
$[67] = t17;
|
|
1319
|
-
$[68] = t18;
|
|
1320
|
-
$[69] = t19;
|
|
1321
|
-
$[70] = t20;
|
|
1322
|
-
} else t20 = $[70];
|
|
1323
|
-
return t20;
|
|
1324
|
-
}
|
|
1325
|
-
function _temp2(entry_1) {
|
|
1326
|
-
return entry_1.day;
|
|
1327
|
-
}
|
|
1328
|
-
/** Calendar in the Dock. It reads the schedules and runs `ComputerAutomations.Host` keeps. */
|
|
1329
|
-
const ComputerCalendar = { app: {
|
|
1330
|
-
id: COMPUTER_APP_IDS.calendar,
|
|
1331
|
-
label: "Calendar",
|
|
1332
|
-
launcher: "favorite",
|
|
1333
|
-
icon: /* @__PURE__ */ jsx(CalendarIcon, {}),
|
|
1334
|
-
defaultWindowSize: {
|
|
1335
|
-
width: 960,
|
|
1336
|
-
height: 640
|
|
1337
|
-
},
|
|
1338
|
-
titleBar: "unified",
|
|
1339
|
-
...computerAppParts(useCalendarModel, {
|
|
1340
|
-
title: true,
|
|
1341
|
-
menus: true
|
|
1342
|
-
})
|
|
1343
|
-
} };
|
|
1344
|
-
//#endregion
|
|
1
|
+
import { t as ComputerCalendar } from "../../ComputerCalendar-Z6k_DVJF.js";
|
|
1345
2
|
export { ComputerCalendar };
|