@burdenoff/microfe-calendar 2026.1124.1 → 2026.1124.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.
- package/dist/generated/wspace-operations.d.ts +658 -0
- package/dist/generated/wspace-operations.js +179 -6
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +1243 -10
- package/dist/hooks/useSafePermissions.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/pages/ResourcesPage.js.map +1 -1
- package/dist/providers/CalendarProvider.d.ts +3 -1
- package/dist/providers/CalendarProvider.js +12 -10
- package/dist/providers/CalendarProvider.js.map +1 -1
- package/dist/translations/en.d.ts +291 -1
- package/dist/types/index.d.ts +9 -0
- package/dist/v2/CalendarPageV2.js +44 -39
- package/dist/v2/CalendarPageV2.js.map +1 -1
- package/dist/v2/data/enums.d.ts +1 -0
- package/dist/v2/data/enums.js +6 -2
- package/dist/v2/data/enums.js.map +1 -1
- package/dist/v2/dialogs/CalendarDialogsV2.js +12 -9
- package/dist/v2/dialogs/CalendarDialogsV2.js.map +1 -1
- package/dist/v2/event/CustomRepeat.d.ts +5 -0
- package/dist/v2/event/CustomRepeat.js +246 -0
- package/dist/v2/event/CustomRepeat.js.map +1 -0
- package/dist/v2/event/EventDetailsTab.d.ts +6 -0
- package/dist/v2/event/EventDetailsTab.js +291 -0
- package/dist/v2/event/EventDetailsTab.js.map +1 -0
- package/dist/v2/event/EventDialog.d.ts +25 -0
- package/dist/v2/event/EventDialog.js +365 -0
- package/dist/v2/event/EventDialog.js.map +1 -0
- package/dist/v2/event/EventDialogs.d.ts +3 -0
- package/dist/v2/event/EventDialogs.js +111 -0
- package/dist/v2/event/EventDialogs.js.map +1 -0
- package/dist/v2/event/EventMoreTab.d.ts +4 -0
- package/dist/v2/event/EventMoreTab.js +214 -0
- package/dist/v2/event/EventMoreTab.js.map +1 -0
- package/dist/v2/event/EventPeopleTab.d.ts +8 -0
- package/dist/v2/event/EventPeopleTab.js +422 -0
- package/dist/v2/event/EventPeopleTab.js.map +1 -0
- package/dist/v2/event/EventPlaceTab.d.ts +6 -0
- package/dist/v2/event/EventPlaceTab.js +264 -0
- package/dist/v2/event/EventPlaceTab.js.map +1 -0
- package/dist/v2/event/FindTimeDialog.d.ts +26 -0
- package/dist/v2/event/FindTimeDialog.js +667 -0
- package/dist/v2/event/FindTimeDialog.js.map +1 -0
- package/dist/v2/event/RepeatField.d.ts +5 -0
- package/dist/v2/event/RepeatField.js +88 -0
- package/dist/v2/event/RepeatField.js.map +1 -0
- package/dist/v2/event/dialogLogic.d.ts +87 -0
- package/dist/v2/event/dialogLogic.js +117 -0
- package/dist/v2/event/dialogLogic.js.map +1 -0
- package/dist/v2/event/dialogModel.d.ts +48 -0
- package/dist/v2/event/dialogModel.js +13 -0
- package/dist/v2/event/dialogModel.js.map +1 -0
- package/dist/v2/event/eventForm.d.ts +209 -0
- package/dist/v2/event/eventForm.js +397 -0
- package/dist/v2/event/eventForm.js.map +1 -0
- package/dist/v2/event/findTime.d.ts +120 -0
- package/dist/v2/event/findTime.js +149 -0
- package/dist/v2/event/findTime.js.map +1 -0
- package/dist/v2/event/findTimeSource.d.ts +102 -0
- package/dist/v2/event/findTimeSource.js +107 -0
- package/dist/v2/event/findTimeSource.js.map +1 -0
- package/dist/v2/event/parts.d.ts +46 -0
- package/dist/v2/event/parts.js +124 -0
- package/dist/v2/event/parts.js.map +1 -0
- package/dist/v2/event/place.d.ts +64 -0
- package/dist/v2/event/place.js +48 -0
- package/dist/v2/event/place.js.map +1 -0
- package/dist/v2/event/repeatWords.d.ts +19 -0
- package/dist/v2/event/repeatWords.js +130 -0
- package/dist/v2/event/repeatWords.js.map +1 -0
- package/dist/v2/event/rrule.d.ts +90 -0
- package/dist/v2/event/rrule.js +368 -0
- package/dist/v2/event/rrule.js.map +1 -0
- package/dist/v2/event/savePlan.d.ts +50 -0
- package/dist/v2/event/savePlan.js +125 -0
- package/dist/v2/event/savePlan.js.map +1 -0
- package/dist/v2/event/useEventData.d.ts +91 -0
- package/dist/v2/event/useEventData.js +202 -0
- package/dist/v2/event/useEventData.js.map +1 -0
- package/dist/v2/event/useEventDialogModel.d.ts +37 -0
- package/dist/v2/event/useEventDialogModel.js +129 -0
- package/dist/v2/event/useEventDialogModel.js.map +1 -0
- package/dist/v2/event/useEventSave.d.ts +41 -0
- package/dist/v2/event/useEventSave.js +185 -0
- package/dist/v2/event/useEventSave.js.map +1 -0
- package/dist/v2/format.d.ts +2 -0
- package/dist/v2/format.js +4 -0
- package/dist/v2/format.js.map +1 -1
- package/dist/v2/grid/GridParts.js +100 -94
- package/dist/v2/grid/GridParts.js.map +1 -1
- package/dist/v2/grid/TimeGrid.js +98 -89
- package/dist/v2/grid/TimeGrid.js.map +1 -1
- package/dist/v2/list/ListViewV2.d.ts +6 -2
- package/dist/v2/list/ListViewV2.js +50 -44
- package/dist/v2/list/ListViewV2.js.map +1 -1
- package/dist/v2/month/MonthView.js +130 -126
- package/dist/v2/month/MonthView.js.map +1 -1
- package/dist/v2/peek/EventPeek.js.map +1 -1
- package/dist/v2/peek/PeekEvent.js.map +1 -1
- package/dist/v2/rail/CalendarRail.js +54 -80
- package/dist/v2/rail/CalendarRail.js.map +1 -1
- package/dist/v2/runs/RunPeek.d.ts +2 -0
- package/dist/v2/runs/RunPeek.js +382 -0
- package/dist/v2/runs/RunPeek.js.map +1 -0
- package/dist/v2/runs/RunPills.d.ts +28 -0
- package/dist/v2/runs/RunPills.js +179 -0
- package/dist/v2/runs/RunPills.js.map +1 -0
- package/dist/v2/runs/RunRows.d.ts +21 -0
- package/dist/v2/runs/RunRows.js +140 -0
- package/dist/v2/runs/RunRows.js.map +1 -0
- package/dist/v2/runs/RunsNotices.d.ts +1 -0
- package/dist/v2/runs/RunsNotices.js +37 -0
- package/dist/v2/runs/RunsNotices.js.map +1 -0
- package/dist/v2/runs/RunsSwitch.d.ts +1 -0
- package/dist/v2/runs/RunsSwitch.js +54 -0
- package/dist/v2/runs/RunsSwitch.js.map +1 -0
- package/dist/v2/runs/WorkflowRunsLayer.d.ts +4 -0
- package/dist/v2/runs/WorkflowRunsLayer.js +82 -0
- package/dist/v2/runs/WorkflowRunsLayer.js.map +1 -0
- package/dist/v2/runs/runAccess.d.ts +37 -0
- package/dist/v2/runs/runAccess.js +14 -0
- package/dist/v2/runs/runAccess.js.map +1 -0
- package/dist/v2/runs/runLayout.d.ts +76 -0
- package/dist/v2/runs/runLayout.js +129 -0
- package/dist/v2/runs/runLayout.js.map +1 -0
- package/dist/v2/runs/runLinks.d.ts +32 -0
- package/dist/v2/runs/runLinks.js +50 -0
- package/dist/v2/runs/runLinks.js.map +1 -0
- package/dist/v2/runs/runModel.d.ts +97 -0
- package/dist/v2/runs/runModel.js +132 -0
- package/dist/v2/runs/runModel.js.map +1 -0
- package/dist/v2/runs/runPeekState.d.ts +53 -0
- package/dist/v2/runs/runPeekState.js +62 -0
- package/dist/v2/runs/runPeekState.js.map +1 -0
- package/dist/v2/runs/runTypes.d.ts +60 -0
- package/dist/v2/runs/runWords.d.ts +23 -0
- package/dist/v2/runs/runWords.js +83 -0
- package/dist/v2/runs/runWords.js.map +1 -0
- package/dist/v2/runs/runsLayerContext.d.ts +26 -0
- package/dist/v2/runs/runsLayerContext.js +33 -0
- package/dist/v2/runs/runsLayerContext.js.map +1 -0
- package/dist/v2/runs/useRunHrefs.d.ts +10 -0
- package/dist/v2/runs/useRunHrefs.js +60 -0
- package/dist/v2/runs/useRunHrefs.js.map +1 -0
- package/dist/v2/runs/useRunLabels.d.ts +6 -0
- package/dist/v2/runs/useRunLabels.js +27 -0
- package/dist/v2/runs/useRunLabels.js.map +1 -0
- package/dist/v2/runs/useRunsAccess.d.ts +2 -0
- package/dist/v2/runs/useRunsAccess.js +14 -0
- package/dist/v2/runs/useRunsAccess.js.map +1 -0
- package/dist/v2/runs/useWorkflowRuns.d.ts +61 -0
- package/dist/v2/runs/useWorkflowRuns.js +119 -0
- package/dist/v2/runs/useWorkflowRuns.js.map +1 -0
- package/dist/v2/states/CalendarStates.js.map +1 -1
- package/dist/v2/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListViewV2.js","names":["DayHeading","useCalendarPage","isToday","date","today","relative","tr","addDays","cn","formatDay","format","DayGroups","label","groups","group","EventListRow","event","ListViewV2","page","days","eventsOnDay","events","timeZone","showEmpty","VIEW_PANEL","EmptyState","Button","day","start","Plus"],"sources":["../../../src/v2/list/ListViewV2.tsx"],"sourcesContent":["/**\n * The List view (BOFF-15698 A1): two weeks from its day, grouped by day, with Join on today's\n * calls and what waits on the person (invitations, maybes, rooms waiting). Days with nothing
|
|
1
|
+
{"version":3,"file":"ListViewV2.js","names":["DayHeading","useCalendarPage","isToday","date","today","relative","tr","addDays","cn","formatDay","format","DayGroups","label","groups","group","withRuns","DayRowsWithRuns","EventListRow","event","ListViewV2","page","runs","useWorkflowRunsLayer","days","eventsOnDay","events","timeZone","showEmpty","VIEW_PANEL","EmptyState","Button","day","start","Plus"],"sources":["../../../src/v2/list/ListViewV2.tsx"],"sourcesContent":["/**\n * The List view (BOFF-15698 A1): two weeks from its day, grouped by day, with Join on today's\n * calls and what waits on the person (invitations, maybes, rooms waiting), and the workflow\n * runs among the events when they show (B5). Days with nothing on them are left out; two weeks\n * with nothing say so.\n */\nimport { Plus } from 'lucide-react';\nimport { addDays, Button, EmptyState, type DateValue } from '@burdenoff/fe-libs/ui';\nimport { cn } from '@burdenoff/fe-libs/utils';\nimport { eventsOnDay } from '../events/eventModel';\nimport { formatDay } from '../format';\nimport { useCalendarPage } from '../page/CalendarPageContext';\nimport { DayRowsWithRuns } from '../runs/RunRows';\nimport { useWorkflowRunsLayer } from '../runs/runsLayerContext';\nimport { VIEW_PANEL } from '../styles';\nimport type { CalendarEventV2 } from '../types';\nimport { EventListRow } from './EventListRow';\n\nexport interface DayGroup {\n date: DateValue;\n events: CalendarEventV2[];\n}\n\n/** A day's heading in a list: the date large, its weekday, the month and \"Today\". */\nfunction DayHeading({ date }: { date: DateValue }) {\n const { tr, format, today } = useCalendarPage();\n const isToday = date === today;\n const relative = isToday\n ? tr('calendar.v2.today', 'Today')\n : date === addDays(today, 1)\n ? tr('calendar.v2.tomorrow', 'Tomorrow')\n : date === addDays(today, -1)\n ? tr('calendar.v2.yesterday', 'Yesterday')\n : null;\n return (\n <div className=\"flex w-[92px] shrink-0 flex-wrap content-start items-baseline gap-x-1.5 pt-2.5 max-md:w-auto max-md:pt-2\">\n <span\n className={cn(\n 'text-2xl font-semibold tabular-nums max-md:text-lg',\n isToday ? 'text-action-primary-bg' : 'text-text-primary'\n )}\n >\n {formatDay(date, format, 'dayNumber')}\n </span>\n <span\n className={cn(\n 'text-xs font-semibold uppercase',\n isToday ? 'text-action-primary-bg' : 'text-text-secondary'\n )}\n >\n {formatDay(date, format, 'weekday')}\n </span>\n <span\n className={cn(\n 'w-full text-xs text-text-muted max-md:w-auto',\n isToday && 'font-semibold text-action-primary-bg'\n )}\n >\n {formatDay(date, format, 'monthShort')}\n {relative ? ` · ${relative}` : ''}\n </span>\n </div>\n );\n}\n\n/**\n * Days and their events, each day's heading on the left (above on phones). `withRuns`: the\n * workflow runs among them (the List view; search lists events only).\n */\nexport function DayGroups({\n groups,\n label,\n withRuns = false,\n}: {\n groups: readonly DayGroup[];\n label: string;\n withRuns?: boolean;\n}) {\n const { format, today } = useCalendarPage();\n return (\n <ul className=\"min-h-0 flex-1 overflow-y-auto\" aria-label={label}>\n {groups.map((group) => (\n <li\n key={group.date}\n aria-label={formatDay(group.date, format, 'full')}\n className={cn(\n 'flex gap-4 border-b border-border-default px-4 py-2 last:border-b-0 max-md:flex-col max-md:gap-0 max-md:px-3',\n group.date < today && 'opacity-80'\n )}\n >\n <DayHeading date={group.date} />\n <div className=\"min-w-0 flex-1\">\n {withRuns ? (\n <DayRowsWithRuns events={group.events} day={group.date} />\n ) : (\n group.events.map((event) => (\n <EventListRow key={event.id} event={event} day={group.date} />\n ))\n )}\n </div>\n </li>\n ))}\n </ul>\n );\n}\n\nexport function ListViewV2() {\n const page = useCalendarPage();\n const { tr, timeZone, days, events } = page;\n const runs = useWorkflowRunsLayer();\n const groups = days\n .map((date) => ({ date, events: eventsOnDay(events, date, timeZone) }))\n .filter((group) => group.events.length > 0 || runs.runsOn(group.date) !== undefined);\n const showEmpty = page.state.kind === 'ready' && page.state.empty;\n\n return (\n <section className={VIEW_PANEL} aria-label={tr('calendar.v2.listLabel', 'List')}>\n {groups.length > 0 ? (\n <DayGroups groups={groups} label={tr('calendar.v2.listLabel', 'List')} withRuns />\n ) : showEmpty ? (\n <div className=\"grid flex-1 place-items-center p-6\">\n <EmptyState\n size=\"panel\"\n kind=\"first-use\"\n illustration=\"calendar\"\n title={tr('calendar.v2.emptyList', 'Nothing in these two weeks')}\n description={tr(\n 'calendar.v2.emptyListBody',\n 'New events and invitations show here, grouped by day.'\n )}\n action={\n <Button\n type=\"button\"\n onClick={() => {\n const day = page.days.includes(page.today)\n ? page.today\n : (page.days[0] ?? page.today);\n const start = page.workingHoursOn(day)?.start ?? 9 * 60;\n page.openEventDialog({\n date: day,\n start,\n end: start + page.prefs.defaultDuration,\n allDay: false,\n });\n }}\n >\n <Plus aria-hidden=\"true\" />\n {tr('calendar.v2.newEvent', 'New event')}\n </Button>\n }\n />\n </div>\n ) : page.state.kind === 'ready' ? (\n <p className=\"grid flex-1 place-items-center p-6 text-center text-sm text-text-secondary\">\n {tr('calendar.v2.partialNothing', 'Nothing to show from the calendars that loaded.')}\n </p>\n ) : null}\n </section>\n );\n}\n"],"mappings":"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"}
|
|
@@ -3,19 +3,22 @@ import { allDayItems as t, eventsOnDay as n, isAllDayRow as r } from "../events/
|
|
|
3
3
|
import { formatDay as i, formatInstantTime as a } from "../format.js";
|
|
4
4
|
import { EventListRow as o } from "../list/EventListRow.js";
|
|
5
5
|
import { useCalendarPage as s } from "../page/CalendarPageContext.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
6
|
+
import { MonthRunsBadge as c, PhoneRunDot as l } from "../runs/RunPills.js";
|
|
7
|
+
import { DayRowsWithRuns as u } from "../runs/RunRows.js";
|
|
8
|
+
import { useWorkflowRunsLayer as d } from "../runs/runsLayerContext.js";
|
|
9
|
+
import { eventDays as f, instantToZoned as p, isWeekendDay as m } from "../time/calendarTime.js";
|
|
10
|
+
import { EVENT_BORDER as h, EVENT_FILL as g, FOCUS_RING as _, ICON_BUTTON as v, VIEW_PANEL as y } from "../styles.js";
|
|
11
|
+
import { fitMonthWeek as b, monthLinesFor as x, weekRows as S } from "./monthLayout.js";
|
|
12
|
+
import { useEffect as C, useMemo as w, useRef as T, useState as E } from "react";
|
|
13
|
+
import { Plus as D, X as O } from "lucide-react";
|
|
14
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
15
|
+
import { Button as j, Popover as M, PopoverContent as N, PopoverTrigger as P, monthOf as F } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { cn as I } from "@burdenoff/fe-libs/utils";
|
|
14
17
|
// src/v2/month/MonthView.tsx
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
let t =
|
|
18
|
-
return
|
|
18
|
+
var L = (e) => e.id;
|
|
19
|
+
function R(e) {
|
|
20
|
+
let t = T(null), [n, r] = E(0);
|
|
21
|
+
return C(() => {
|
|
19
22
|
let n = t.current;
|
|
20
23
|
if (!n) return;
|
|
21
24
|
let i = () => r(n.clientHeight / Math.max(1, e));
|
|
@@ -27,25 +30,25 @@ function P(e) {
|
|
|
27
30
|
height: n
|
|
28
31
|
};
|
|
29
32
|
}
|
|
30
|
-
function
|
|
31
|
-
return s().compact ? /* @__PURE__ */
|
|
33
|
+
function z() {
|
|
34
|
+
return s().compact ? /* @__PURE__ */ k(G, {}) : /* @__PURE__ */ k(V, {});
|
|
32
35
|
}
|
|
33
|
-
function
|
|
36
|
+
function B({ week: e, short: t }) {
|
|
34
37
|
let { format: n } = s();
|
|
35
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ k("div", {
|
|
36
39
|
className: "grid grid-cols-7 border-b border-border-default",
|
|
37
|
-
children: e.map((e) => /* @__PURE__ */
|
|
38
|
-
className:
|
|
40
|
+
children: e.map((e) => /* @__PURE__ */ k("div", {
|
|
41
|
+
className: I("px-2 py-2 text-[11px] font-semibold uppercase tracking-[0.06em] text-text-secondary", t && "text-center", m(e) && "text-text-muted"),
|
|
39
42
|
children: i(e, n, "weekday")
|
|
40
43
|
}, e))
|
|
41
44
|
});
|
|
42
45
|
}
|
|
43
|
-
function
|
|
44
|
-
let n = s(), { format: a, timeZone: o, events:
|
|
45
|
-
let n = e[0] ??
|
|
46
|
-
for (let t of
|
|
46
|
+
function V() {
|
|
47
|
+
let n = s(), { format: a, timeZone: o, events: c, nav: l } = n, u = w(() => S(n.days), [n.days]), d = F(l.date), { ref: p, height: m } = R(u.length), v = x(m), C = w(() => u.map((e) => {
|
|
48
|
+
let n = e[0] ?? l.date, i = e[e.length - 1] ?? l.date, a = /* @__PURE__ */ new Map();
|
|
49
|
+
for (let t of c) {
|
|
47
50
|
if (r(t)) continue;
|
|
48
|
-
let n =
|
|
51
|
+
let n = f(t, o);
|
|
49
52
|
for (let r of e) {
|
|
50
53
|
if (r < n.start || r > n.end) continue;
|
|
51
54
|
let e = a.get(r);
|
|
@@ -53,14 +56,14 @@ function L() {
|
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
for (let e of a.values()) e.sort((e, t) => e.start.getTime() - t.start.getTime());
|
|
56
|
-
return
|
|
59
|
+
return b(e, t(c, n, i, o), a, v, L);
|
|
57
60
|
}), [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
c,
|
|
62
|
+
v,
|
|
63
|
+
l.date,
|
|
61
64
|
o,
|
|
62
|
-
|
|
63
|
-
]),
|
|
65
|
+
u
|
|
66
|
+
]), T = (e, t) => {
|
|
64
67
|
let r = n.workingHoursOn(e)?.start ?? 540;
|
|
65
68
|
n.closePeek(), n.openQuickCreate({
|
|
66
69
|
date: e,
|
|
@@ -70,22 +73,22 @@ function L() {
|
|
|
70
73
|
anchor: t
|
|
71
74
|
});
|
|
72
75
|
};
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
-
className:
|
|
75
|
-
"aria-label": i(`${
|
|
76
|
-
children: [/* @__PURE__ */
|
|
77
|
-
ref:
|
|
76
|
+
return /* @__PURE__ */ A("section", {
|
|
77
|
+
className: y,
|
|
78
|
+
"aria-label": i(`${d}-01`, a, "monthYear"),
|
|
79
|
+
children: [/* @__PURE__ */ k(B, { week: u[0] ?? [] }), /* @__PURE__ */ k("div", {
|
|
80
|
+
ref: p,
|
|
78
81
|
className: "grid min-h-0 flex-1",
|
|
79
|
-
style: { gridTemplateRows: `repeat(${
|
|
80
|
-
children:
|
|
81
|
-
let i =
|
|
82
|
-
return i ? /* @__PURE__ */
|
|
82
|
+
style: { gridTemplateRows: `repeat(${u.length}, minmax(0, 1fr))` },
|
|
83
|
+
children: u.map((t, r) => {
|
|
84
|
+
let i = C[r];
|
|
85
|
+
return i ? /* @__PURE__ */ A("div", {
|
|
83
86
|
className: "relative grid grid-cols-7 border-b border-border-subtle last:border-b-0",
|
|
84
|
-
children: [i.cells.map((e) => /* @__PURE__ */
|
|
87
|
+
children: [i.cells.map((e) => /* @__PURE__ */ k(H, {
|
|
85
88
|
cell: e,
|
|
86
|
-
month:
|
|
89
|
+
month: d,
|
|
87
90
|
laneCount: i.laneCount,
|
|
88
|
-
onAdd:
|
|
91
|
+
onAdd: T
|
|
89
92
|
}, e.date)), i.bars.map((t) => {
|
|
90
93
|
let r = n.lookOf(t.event), i = {
|
|
91
94
|
...e(n.hueOf(t.event.calendarId)),
|
|
@@ -94,15 +97,15 @@ function L() {
|
|
|
94
97
|
insetInlineStart: `calc(${t.firstIndex / 7 * 100}% + 3px)`,
|
|
95
98
|
width: `calc(${(t.lastIndex - t.firstIndex + 1) / 7 * 100}% - 6px)`
|
|
96
99
|
};
|
|
97
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ k("button", {
|
|
98
101
|
type: "button",
|
|
99
102
|
"data-event-id": t.event.id,
|
|
100
103
|
"aria-label": n.labelOf(t.event),
|
|
101
104
|
"aria-haspopup": "dialog",
|
|
102
105
|
style: i,
|
|
103
106
|
onClick: (e) => n.openPeek(t.event, e.currentTarget),
|
|
104
|
-
className:
|
|
105
|
-
children: /* @__PURE__ */
|
|
107
|
+
className: I("absolute z-[1] flex min-w-0 items-center rounded px-1.5 text-start text-[11px] font-semibold", h, g, _, r.faded && "opacity-60", t.continuesBefore && "rounded-s-none", t.continuesAfter && "rounded-e-none", l.eventId === t.event.id && "outline-2 outline-offset-1 outline-[var(--color-focus-ring)]"),
|
|
108
|
+
children: /* @__PURE__ */ k("span", {
|
|
106
109
|
className: "truncate",
|
|
107
110
|
children: r.title
|
|
108
111
|
})
|
|
@@ -113,37 +116,38 @@ function L() {
|
|
|
113
116
|
})]
|
|
114
117
|
});
|
|
115
118
|
}
|
|
116
|
-
function
|
|
117
|
-
let { tr: a, format: o, today:
|
|
118
|
-
return /* @__PURE__ */
|
|
119
|
+
function H({ cell: e, month: t, laneCount: n, onAdd: r }) {
|
|
120
|
+
let { tr: a, format: o, today: l, nav: u } = s(), d = F(e.date) !== t, f = e.date === l, p = e.date.endsWith("-01") ? `${i(e.date, o, "dayNumber")} ${i(e.date, o, "monthShort")}` : i(e.date, o, "dayNumber"), h = i(e.date, o, "full");
|
|
121
|
+
return /* @__PURE__ */ A("div", {
|
|
119
122
|
"data-month-day": e.date,
|
|
120
|
-
className:
|
|
123
|
+
className: I("relative min-w-0 overflow-hidden border-s border-border-subtle first:border-s-0", d && "bg-bg-sunken/50", m(e.date) && !d && "bg-bg-sunken/25"),
|
|
121
124
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ k("button", {
|
|
123
126
|
type: "button",
|
|
124
127
|
tabIndex: -1,
|
|
125
128
|
"aria-label": a("calendar.v2.addOnDay", "Add an event on {{day}}", { day: h }),
|
|
126
129
|
onClick: (t) => r(e.date, t.currentTarget),
|
|
127
130
|
className: "absolute inset-0 z-0 cursor-default focus-visible:outline-none"
|
|
128
131
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ k("button", {
|
|
130
133
|
type: "button",
|
|
131
|
-
onClick: () =>
|
|
134
|
+
onClick: () => u.goTo({
|
|
132
135
|
view: "day",
|
|
133
136
|
date: e.date
|
|
134
137
|
}),
|
|
135
138
|
"aria-current": f ? "date" : void 0,
|
|
136
139
|
"aria-label": a("calendar.v2.openDay", "{{day}}. Open the day", { day: h }),
|
|
137
|
-
className:
|
|
138
|
-
children:
|
|
140
|
+
className: I("relative z-[1] ms-1 mt-1 inline-grid h-5 min-w-5 place-items-center rounded-full px-1 text-xs font-semibold tabular-nums hover:bg-bg-sunken", _, f ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg" : d ? "text-text-muted" : "text-text-primary"),
|
|
141
|
+
children: p
|
|
139
142
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ k(c, { day: e.date }),
|
|
144
|
+
/* @__PURE__ */ A("div", {
|
|
141
145
|
className: "pointer-events-none relative z-[1] flex flex-col *:pointer-events-auto",
|
|
142
146
|
style: { marginTop: n * 18 },
|
|
143
|
-
children: [e.shown.map((t) => /* @__PURE__ */
|
|
147
|
+
children: [e.shown.map((t) => /* @__PURE__ */ k(U, {
|
|
144
148
|
event: t,
|
|
145
149
|
day: e.date
|
|
146
|
-
}, t.id)), e.more > 0 ? /* @__PURE__ */
|
|
150
|
+
}, t.id)), e.more > 0 ? /* @__PURE__ */ k(W, {
|
|
147
151
|
date: e.date,
|
|
148
152
|
count: e.more
|
|
149
153
|
}) : null]
|
|
@@ -151,9 +155,9 @@ function R({ cell: e, month: t, laneCount: n, onAdd: r }) {
|
|
|
151
155
|
]
|
|
152
156
|
});
|
|
153
157
|
}
|
|
154
|
-
function
|
|
155
|
-
let r = s(), i = r.lookOf(t), o =
|
|
156
|
-
return /* @__PURE__ */
|
|
158
|
+
function U({ event: t, day: n }) {
|
|
159
|
+
let r = s(), i = r.lookOf(t), o = p(t.start, r.timeZone).date < n;
|
|
160
|
+
return /* @__PURE__ */ A("button", {
|
|
157
161
|
type: "button",
|
|
158
162
|
"data-event-id": t.id,
|
|
159
163
|
"aria-label": r.labelOf(t),
|
|
@@ -163,52 +167,52 @@ function z({ event: t, day: n }) {
|
|
|
163
167
|
height: 18
|
|
164
168
|
},
|
|
165
169
|
onClick: (e) => r.openPeek(t, e.currentTarget),
|
|
166
|
-
className:
|
|
170
|
+
className: I("mx-1 flex min-w-0 items-center gap-1 rounded px-1 text-start text-[11px] leading-none hover:bg-bg-sunken", _, i.faded && "opacity-60", r.nav.eventId === t.id && "outline-2 outline-offset-1 outline-[var(--color-focus-ring)]"),
|
|
167
171
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ k("i", {
|
|
169
173
|
"aria-hidden": "true",
|
|
170
|
-
className:
|
|
174
|
+
className: I("size-[7px] shrink-0 rounded-full", i.invitation ? "border border-[var(--cal-hue)]" : i.busyOnly ? "bg-border-strong" : "bg-[var(--cal-hue)]")
|
|
171
175
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ k("time", {
|
|
173
177
|
className: "shrink-0 tabular-nums text-text-secondary",
|
|
174
178
|
children: o ? `– ${a(t.end, r.timeZone, r.format)}` : a(t.start, r.timeZone, r.format)
|
|
175
179
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
className:
|
|
180
|
+
/* @__PURE__ */ k("span", {
|
|
181
|
+
className: I("min-w-0 truncate text-text-primary", i.declined && "line-through"),
|
|
178
182
|
children: i.title
|
|
179
183
|
})
|
|
180
184
|
]
|
|
181
185
|
});
|
|
182
186
|
}
|
|
183
|
-
function
|
|
184
|
-
let r = s(), { tr: a, format: c, today: l, nav: u } = r, [d, f] =
|
|
185
|
-
return /* @__PURE__ */
|
|
187
|
+
function W({ date: e, count: t }) {
|
|
188
|
+
let r = s(), { tr: a, format: c, today: l, nav: u } = r, [d, f] = E(!1), p = n(r.events, e, r.timeZone);
|
|
189
|
+
return /* @__PURE__ */ A(M, {
|
|
186
190
|
open: d,
|
|
187
191
|
onOpenChange: f,
|
|
188
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ k(P, {
|
|
189
193
|
asChild: !0,
|
|
190
|
-
children: /* @__PURE__ */
|
|
194
|
+
children: /* @__PURE__ */ k("button", {
|
|
191
195
|
type: "button",
|
|
192
|
-
className:
|
|
196
|
+
className: I("mx-1 rounded px-1 text-start text-[11px] leading-[18px] font-semibold text-text-link hover:underline", _),
|
|
193
197
|
children: a("calendar.v2.moreCount", "+{{count}} more", { count: t })
|
|
194
198
|
})
|
|
195
|
-
}), /* @__PURE__ */
|
|
199
|
+
}), /* @__PURE__ */ A(N, {
|
|
196
200
|
align: "start",
|
|
197
201
|
className: "flex max-h-[min(480px,70vh)] w-[360px] flex-col p-0",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ A("div", {
|
|
199
203
|
className: "flex items-start gap-2 border-b border-border-subtle p-3",
|
|
200
204
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ A("div", {
|
|
202
206
|
className: "min-w-0 flex-1",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ k("h3", {
|
|
204
208
|
className: "text-base font-bold text-text-primary",
|
|
205
209
|
children: i(e, c, "long")
|
|
206
|
-
}), /* @__PURE__ */
|
|
210
|
+
}), /* @__PURE__ */ k("p", {
|
|
207
211
|
className: "text-xs text-text-secondary",
|
|
208
212
|
children: e === l ? a("calendar.v2.today", "Today") : i(e, c, "date")
|
|
209
213
|
})]
|
|
210
214
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ k(j, {
|
|
212
216
|
type: "button",
|
|
213
217
|
variant: "ghost",
|
|
214
218
|
size: "sm",
|
|
@@ -218,17 +222,17 @@ function B({ date: e, count: t }) {
|
|
|
218
222
|
}),
|
|
219
223
|
children: a("calendar.v2.openDayShort", "Open day")
|
|
220
224
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ k("button", {
|
|
222
226
|
type: "button",
|
|
223
|
-
className:
|
|
227
|
+
className: v,
|
|
224
228
|
"aria-label": a("calendar.v2.close", "Close"),
|
|
225
229
|
onClick: () => f(!1),
|
|
226
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ k(O, { "aria-hidden": "true" })
|
|
227
231
|
})
|
|
228
232
|
]
|
|
229
|
-
}), /* @__PURE__ */
|
|
233
|
+
}), /* @__PURE__ */ k("div", {
|
|
230
234
|
className: "min-h-0 overflow-y-auto px-3",
|
|
231
|
-
children:
|
|
235
|
+
children: p.map((t) => /* @__PURE__ */ k(o, {
|
|
232
236
|
event: t,
|
|
233
237
|
day: e,
|
|
234
238
|
dense: !0
|
|
@@ -237,81 +241,81 @@ function B({ date: e, count: t }) {
|
|
|
237
241
|
})]
|
|
238
242
|
});
|
|
239
243
|
}
|
|
240
|
-
function
|
|
241
|
-
let t = s(), { tr: r, format: a, timeZone:
|
|
242
|
-
return /* @__PURE__ */
|
|
244
|
+
function G() {
|
|
245
|
+
let t = s(), { tr: r, format: a, timeZone: o, events: c, today: f, nav: p } = t, m = w(() => S(t.days), [t.days]), h = F(p.date), [g, v] = E(null), b = g && t.days.includes(g) ? g : t.days.includes(f) && F(f) === h ? f : `${h}-01`, x = n(c, b, o), C = d().runsOn(b);
|
|
246
|
+
return /* @__PURE__ */ A("div", {
|
|
243
247
|
className: "flex min-h-0 flex-1 flex-col gap-2.5",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
245
|
-
className:
|
|
246
|
-
"aria-label": i(`${
|
|
247
|
-
children: [/* @__PURE__ */
|
|
248
|
-
week:
|
|
248
|
+
children: [/* @__PURE__ */ A("section", {
|
|
249
|
+
className: I(y, "flex-none"),
|
|
250
|
+
"aria-label": i(`${h}-01`, a, "monthYear"),
|
|
251
|
+
children: [/* @__PURE__ */ k(B, {
|
|
252
|
+
week: m[0] ?? [],
|
|
249
253
|
short: !0
|
|
250
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ k("div", {
|
|
251
255
|
className: "grid",
|
|
252
|
-
children:
|
|
256
|
+
children: m.map((s) => /* @__PURE__ */ k("div", {
|
|
253
257
|
className: "grid grid-cols-7 border-b border-border-subtle last:border-b-0",
|
|
254
|
-
children:
|
|
255
|
-
let
|
|
256
|
-
return /* @__PURE__ */
|
|
258
|
+
children: s.map((s) => {
|
|
259
|
+
let u = n(c, s, o), d = F(s) !== h;
|
|
260
|
+
return /* @__PURE__ */ A("button", {
|
|
257
261
|
type: "button",
|
|
258
|
-
"aria-pressed":
|
|
259
|
-
"aria-current":
|
|
262
|
+
"aria-pressed": b === s,
|
|
263
|
+
"aria-current": s === f ? "date" : void 0,
|
|
260
264
|
"aria-label": r("calendar.v2.dayEvents", "{{day}}: {{count}} events", {
|
|
261
|
-
day: i(
|
|
262
|
-
count:
|
|
265
|
+
day: i(s, a, "full"),
|
|
266
|
+
count: u.length
|
|
263
267
|
}),
|
|
264
|
-
onClick: () =>
|
|
265
|
-
className:
|
|
266
|
-
children: [/* @__PURE__ */
|
|
267
|
-
className:
|
|
268
|
-
children: i(
|
|
269
|
-
}), /* @__PURE__ */
|
|
268
|
+
onClick: () => v(s),
|
|
269
|
+
className: I("flex h-12 min-w-0 flex-col items-center justify-center gap-1 border-s border-border-subtle first:border-s-0", _, d && "bg-bg-sunken/50", b === s && "bg-accent-soft"),
|
|
270
|
+
children: [/* @__PURE__ */ k("span", {
|
|
271
|
+
className: I("grid h-6 min-w-6 place-items-center rounded-full text-sm font-semibold tabular-nums", s === f ? "bg-action-primary-bg text-action-primary-text" : d ? "text-text-muted" : "text-text-primary"),
|
|
272
|
+
children: i(s, a, "dayNumber")
|
|
273
|
+
}), /* @__PURE__ */ A("span", {
|
|
270
274
|
className: "flex h-1.5 gap-0.5",
|
|
271
275
|
"aria-hidden": "true",
|
|
272
|
-
children:
|
|
276
|
+
children: [u.slice(0, 3).map((n) => /* @__PURE__ */ k("i", {
|
|
273
277
|
className: "size-1.5 rounded-full bg-[var(--cal-hue)]",
|
|
274
278
|
style: e(t.hueOf(n.calendarId))
|
|
275
|
-
}, n.id))
|
|
279
|
+
}, n.id)), /* @__PURE__ */ k(l, { day: s })]
|
|
276
280
|
})]
|
|
277
|
-
},
|
|
281
|
+
}, s);
|
|
278
282
|
})
|
|
279
|
-
},
|
|
283
|
+
}, s[0]))
|
|
280
284
|
})]
|
|
281
|
-
}), /* @__PURE__ */
|
|
282
|
-
className:
|
|
283
|
-
"aria-label": i(
|
|
284
|
-
children: [/* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ A("section", {
|
|
286
|
+
className: I(y, "px-3"),
|
|
287
|
+
"aria-label": i(b, a, "full"),
|
|
288
|
+
children: [/* @__PURE__ */ A("div", {
|
|
285
289
|
className: "flex items-center gap-2 border-b border-border-subtle py-2.5",
|
|
286
290
|
children: [
|
|
287
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ k("b", {
|
|
288
292
|
className: "text-sm text-text-primary",
|
|
289
|
-
children: i(
|
|
293
|
+
children: i(b, a, "long")
|
|
290
294
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ k("span", { className: "flex-1" }),
|
|
296
|
+
/* @__PURE__ */ A(j, {
|
|
293
297
|
type: "button",
|
|
294
298
|
variant: "outline",
|
|
295
299
|
size: "sm",
|
|
296
300
|
onClick: () => {
|
|
297
|
-
let e = t.workingHoursOn(
|
|
301
|
+
let e = t.workingHoursOn(b)?.start ?? 540;
|
|
298
302
|
t.openEventDialog({
|
|
299
|
-
date:
|
|
303
|
+
date: b,
|
|
300
304
|
start: e,
|
|
301
305
|
end: e + t.prefs.defaultDuration,
|
|
302
306
|
allDay: !1
|
|
303
307
|
});
|
|
304
308
|
},
|
|
305
|
-
children: [/* @__PURE__ */
|
|
309
|
+
children: [/* @__PURE__ */ k(D, { "aria-hidden": "true" }), r("calendar.v2.add", "Add")]
|
|
306
310
|
})
|
|
307
311
|
]
|
|
308
|
-
}), /* @__PURE__ */
|
|
312
|
+
}), /* @__PURE__ */ k("div", {
|
|
309
313
|
className: "min-h-0 overflow-y-auto",
|
|
310
|
-
children: x.length > 0
|
|
311
|
-
|
|
312
|
-
day:
|
|
314
|
+
children: x.length > 0 || C ? /* @__PURE__ */ k(u, {
|
|
315
|
+
events: x,
|
|
316
|
+
day: b,
|
|
313
317
|
dense: !0
|
|
314
|
-
}
|
|
318
|
+
}) : /* @__PURE__ */ k("p", {
|
|
315
319
|
className: "py-3 text-sm text-text-secondary",
|
|
316
320
|
children: t.state.kind === "ready" && t.state.failedCalendarIds.length > 0 ? r("calendar.v2.partialNothing", "Nothing to show from the calendars that loaded.") : r("calendar.v2.nothingThisDay", "Nothing on this day.")
|
|
317
321
|
})
|
|
@@ -319,6 +323,6 @@ function V() {
|
|
|
319
323
|
})]
|
|
320
324
|
});
|
|
321
325
|
}
|
|
322
|
-
export {
|
|
326
|
+
export { z as MonthView };
|
|
323
327
|
|
|
324
328
|
//# sourceMappingURL=MonthView.js.map
|