@burdenoff/microfe-calendar 2026.830.1 → 2026.830.2
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/CalendarRoot.d.ts.map +1 -1
- package/dist/CalendarRoot.js +35 -38
- package/dist/CalendarRoot.js.map +1 -1
- package/dist/CalendarRoutes.d.ts.map +1 -1
- package/dist/CalendarRoutes.js +35 -34
- package/dist/CalendarRoutes.js.map +1 -1
- package/dist/components/AgendaView.d.ts.map +1 -1
- package/dist/components/AgendaView.js +33 -36
- package/dist/components/AgendaView.js.map +1 -1
- package/dist/components/CalendarErrorState.d.ts.map +1 -1
- package/dist/components/CalendarErrorState.js +4 -7
- package/dist/components/CalendarErrorState.js.map +1 -1
- package/dist/components/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/ConfirmDialog.js +11 -14
- package/dist/components/ConfirmDialog.js.map +1 -1
- package/dist/components/DayView.d.ts.map +1 -1
- package/dist/components/DayView.js +21 -24
- package/dist/components/DayView.js.map +1 -1
- package/dist/components/EventFormModal.d.ts.map +1 -1
- package/dist/components/EventFormModal.js +184 -187
- package/dist/components/EventFormModal.js.map +1 -1
- package/dist/components/MiniCalendar.d.ts.map +1 -1
- package/dist/components/MiniCalendar.js +38 -37
- package/dist/components/MiniCalendar.js.map +1 -1
- package/dist/components/MonthView.d.ts.map +1 -1
- package/dist/components/MonthView.js +28 -31
- package/dist/components/MonthView.js.map +1 -1
- package/dist/components/TaskEventDetail.d.ts.map +1 -1
- package/dist/components/TaskEventDetail.js +28 -31
- package/dist/components/TaskEventDetail.js.map +1 -1
- package/dist/components/TimelineView.d.ts.map +1 -1
- package/dist/components/TimelineView.js +35 -38
- package/dist/components/TimelineView.js.map +1 -1
- package/dist/components/ViewSwitcher.d.ts.map +1 -1
- package/dist/components/ViewSwitcher.js +13 -16
- package/dist/components/ViewSwitcher.js.map +1 -1
- package/dist/components/WeekView.d.ts.map +1 -1
- package/dist/components/WeekView.js +24 -27
- package/dist/components/WeekView.js.map +1 -1
- package/dist/components/YearView.d.ts.map +1 -1
- package/dist/components/YearView.js +30 -33
- package/dist/components/YearView.js.map +1 -1
- package/dist/pages/CalendarPage.d.ts.map +1 -1
- package/dist/pages/CalendarPage.js +173 -176
- package/dist/pages/CalendarPage.js.map +1 -1
- package/dist/pages/EventDetailsPage.d.ts.map +1 -1
- package/dist/pages/EventDetailsPage.js +88 -85
- package/dist/pages/EventDetailsPage.js.map +1 -1
- package/dist/pages/ResourcesPage.d.ts.map +1 -1
- package/dist/pages/ResourcesPage.js +197 -200
- package/dist/pages/ResourcesPage.js.map +1 -1
- package/dist/pages/SettingsPage.d.ts.map +1 -1
- package/dist/pages/SettingsPage.js +213 -169
- package/dist/pages/SettingsPage.js.map +1 -1
- package/dist/pages/SubscriptionsPage.d.ts.map +1 -1
- package/dist/pages/SubscriptionsPage.js +37 -40
- package/dist/pages/SubscriptionsPage.js.map +1 -1
- package/dist/shared/hooks/useTr.d.ts +17 -0
- package/dist/shared/hooks/useTr.d.ts.map +1 -0
- package/dist/shared/hooks/useTr.js +14 -0
- package/dist/shared/hooks/useTr.js.map +1 -0
- package/dist/translations/en.d.ts +351 -0
- package/dist/translations/en.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarPage.js","names":[],"sources":["../../src/pages/CalendarPage.tsx"],"sourcesContent":["import { useParams } from 'react-router';\nimport { useEffect, useState } from 'react';\nimport {\n ChevronLeft,\n ChevronRight,\n Plus,\n PanelLeft,\n Search,\n Settings2,\n CalendarPlus,\n DoorOpen,\n Rss,\n} from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { AccessDenied } from '@burdenoff/fe-libs/shared/components';\nimport { AuroraBackground, GradientText, NextSteps, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useGetCalendarsQuery } from '../generated/wspace-operations';\nimport { useCalendar } from '../providers/CalendarProvider';\nimport { useCalendarStore } from '../store/calendarStore';\nimport { useSafePermissions } from '../hooks/useSafePermissions';\nimport type { CalendarViewType } from '../types';\nimport { formatDate } from '../utils/dateHelpers';\nimport { WeekView } from '../components/WeekView';\nimport { MonthView } from '../components/MonthView';\nimport { DayView } from '../components/DayView';\nimport { AgendaView } from '../components/AgendaView';\nimport { YearView } from '../components/YearView';\nimport { TimelineView } from '../components/TimelineView';\nimport { ViewSwitcher } from '../components/ViewSwitcher';\nimport { MiniCalendar } from '../components/MiniCalendar';\nimport { EventFormModal } from '../components/EventFormModal';\nimport { TaskEventDetail } from '../components/TaskEventDetail';\nimport { CALENDAR_PERMISSIONS } from '../constants/permissions';\n\n/**\n * Main calendar page with multiple view types and event creation\n */\nexport function CalendarPage() {\n const { viewType } = useParams<{ viewType: string }>();\n const { hasPermission, isLoading: permissionsLoading } = useSafePermissions();\n const { navigate, basePath, taskOverlay } = useCalendar();\n const currentView = useCalendarStore((state) => state.currentView);\n const currentDate = useCalendarStore((state) => state.currentDate);\n const setView = useCalendarStore((state) => state.setView);\n const navigateDate = useCalendarStore((state) => state.navigateDate);\n const miniCalendarVisible = useCalendarStore((state) => state.miniCalendarVisible);\n const toggleMiniCalendar = useCalendarStore((state) => state.toggleMiniCalendar);\n const visibleCalendars = useCalendarStore((state) => state.visibleCalendars);\n const setVisibleCalendars = useCalendarStore((state) => state.setVisibleCalendars);\n const eventFilter = useCalendarStore((state) => state.eventFilter);\n const updateEventFilter = useCalendarStore((state) => state.updateEventFilter);\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const value = t(key);\n return value === key ? fallback : value;\n };\n\n const [showCreateModal, setShowCreateModal] = useState(false);\n const [createSlot, setCreateSlot] = useState<{ date: Date; hour?: number } | null>(null);\n const canCreateEvents = hasPermission(CALENDAR_PERMISSIONS.CALENDAR_EVENT_CREATE);\n // Clicking an empty grid cell opens the create modal pre-filled with that\n // slot. Left undefined (so cells stay non-interactive) when the user can't\n // create events. Day-level cells (month view) pass no hour — default to 9am\n // so the event isn't created at 1am (midnight + 1) by accident.\n const DEFAULT_CREATE_HOUR = 9;\n const handleCreateSlot = canCreateEvents\n ? (date: Date, hour?: number) => {\n setCreateSlot({ date, hour: hour ?? DEFAULT_CREATE_HOUR });\n setShowCreateModal(true);\n }\n : undefined;\n const { data: calendarsData } = useGetCalendarsQuery({\n variables: { pagination: { limit: 50 } },\n skip: permissionsLoading,\n });\n const calendars =\n (calendarsData?.calendars?.calendars as Array<{\n id: string;\n name: string;\n color?: string | null;\n isDefault: boolean;\n }>) ?? [];\n const effectiveVisibleCalendars =\n visibleCalendars.size > 0\n ? visibleCalendars\n : new Set<string>(calendars.map((calendar) => calendar.id));\n\n const handleToggleCalendar = (calendarId: string) => {\n const nextVisibleCalendars = new Set<string>(effectiveVisibleCalendars);\n if (nextVisibleCalendars.has(calendarId)) {\n nextVisibleCalendars.delete(calendarId);\n } else {\n nextVisibleCalendars.add(calendarId);\n }\n setVisibleCalendars(Array.from(nextVisibleCalendars));\n };\n\n // Sync view type from URL params\n useEffect(() => {\n if (viewType && viewType !== currentView) {\n setView(viewType as CalendarViewType);\n }\n }, [viewType, currentView, setView]);\n\n if (permissionsLoading) {\n return (\n <div className=\"@container min-h-screen bg-bg-canvas flex items-center justify-center\">\n <p className=\"font-text-md text-text-secondary\">{tr('calendar.loading', 'Loading...')}</p>\n </div>\n );\n }\n\n if (!hasPermission(CALENDAR_PERMISSIONS.CALENDAR_READ)) {\n return (\n <AccessDenied\n title={tr('calendar.accessDenied', 'Access Denied')}\n description={tr(\n 'calendar.noPermissionViewCalendar',\n \"You don't have permission to view the calendar.\"\n )}\n />\n );\n }\n\n return (\n <div className=\"@container min-h-screen bg-bg-canvas\">\n {/* Header — primary MFE hero with a living aurora backdrop */}\n <header className=\"relative overflow-hidden border-b border-border-seam bg-bg-surface px-6 py-3\">\n <AuroraBackground intensity=\"subtle\" />\n <div className=\"flex flex-col @lg:flex-row @lg:items-center @lg:justify-between gap-4\">\n {/* Date navigation */}\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={toggleMiniCalendar}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.toggleSidebar', 'Toggle sidebar')}\n >\n <PanelLeft className=\"size-4\" />\n </button>\n\n <button\n type=\"button\"\n onClick={() => navigateDate('today')}\n className=\"px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated font-text-sm font-weight-medium text-text-primary transition-colors\"\n >\n {tr('calendar.today', 'Today')}\n </button>\n\n <div className=\"flex items-center gap-1.5\">\n <button\n type=\"button\"\n onClick={() => navigateDate('prev')}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.previous', 'Previous')}\n >\n <ChevronLeft className=\"size-4\" />\n </button>\n\n <button\n type=\"button\"\n onClick={() => navigateDate('next')}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.next', 'Next')}\n >\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n\n <h2 className=\"font-heading-md text-text-primary tabular-nums\">\n <GradientText>{formatDate(currentDate)}</GradientText>\n </h2>\n </div>\n\n {/* Right side: view switcher + create button */}\n <div className=\"flex items-center gap-2\">\n <ViewSwitcher />\n\n {canCreateEvents ? (\n <button\n type=\"button\"\n onClick={() => {\n setCreateSlot(null);\n setShowCreateModal(true);\n }}\n className=\"inline-flex items-center gap-1.5 px-3 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors\"\n >\n <Plus className=\"size-4\" />\n <span className=\"hidden @sm:inline\">\n {tr('calendar.createEvent', 'Create Event')}\n </span>\n </button>\n ) : null}\n </div>\n </div>\n\n <PagePurpose className=\"relative mt-3 max-w-3xl\">\n {tr(\n 'calendar.pagePurpose',\n 'Your shared schedule. See, create, and manage events across day, week, month, agenda, and timeline views — then toggle calendars, search, and overlay scheduled jobs from the sidebar so the whole team stays in sync.'\n )}\n </PagePurpose>\n </header>\n\n {/* Main content */}\n <div className=\"flex min-h-0 flex-1\">\n {/* Mini calendar sidebar (optional) */}\n {miniCalendarVisible && (\n <aside className=\"hidden @lg:block w-72 border-r border-border-seam bg-bg-surface p-4 space-y-5\">\n <MiniCalendar />\n\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Search className=\"size-4 text-text-secondary\" />\n <input\n type=\"search\"\n value={eventFilter.search ?? ''}\n onChange={(e) =>\n updateEventFilter({ search: e.target.value.trim() || undefined })\n }\n placeholder={tr('calendar.searchEvents', 'Search events, tags, or calendars')}\n aria-label={tr('calendar.searchEvents', 'Search events, tags, or calendars')}\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n />\n </div>\n\n <select\n value={eventFilter.status?.[0] ?? ''}\n onChange={(e) =>\n updateEventFilter({\n status: e.target.value\n ? [e.target.value as 'CONFIRMED' | 'TENTATIVE' | 'CANCELLED']\n : undefined,\n })\n }\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n >\n <option value=\"\">{tr('calendar.allStatuses', 'All statuses')}</option>\n <option value=\"CONFIRMED\">\n {tr('calendar.eventStatusConfirmed', 'Confirmed')}\n </option>\n <option value=\"TENTATIVE\">\n {tr('calendar.eventStatusTentative', 'Tentative')}\n </option>\n <option value=\"CANCELLED\">\n {tr('calendar.eventStatusCancelled', 'Cancelled')}\n </option>\n </select>\n </div>\n\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"font-text-sm font-weight-semibold text-text-primary\">\n {tr('calendar.visibleCalendars', 'Visible calendars')}\n </h3>\n <button\n type=\"button\"\n onClick={() => setVisibleCalendars([])}\n className=\"font-text-xs text-action-primary-bg hover:underline\"\n >\n {tr('calendar.showAll', 'Show all')}\n </button>\n </div>\n\n <div className=\"space-y-2 max-h-[280px] overflow-auto pr-1\">\n {calendars.map((calendar) => (\n <label\n key={calendar.id}\n className=\"flex items-center gap-3 rounded-radius-md border border-border-subtle px-3 py-2 hover:bg-bg-canvas\"\n >\n <input\n type=\"checkbox\"\n checked={effectiveVisibleCalendars.has(calendar.id)}\n onChange={() => handleToggleCalendar(calendar.id)}\n className=\"size-4 rounded border-border-default\"\n aria-label={calendar.name}\n />\n <span\n className=\"size-3 rounded-full shrink-0\"\n style={{\n backgroundColor: calendar.color ?? 'var(--color-action-primary-bg)',\n }}\n />\n <span className=\"min-w-0 flex-1 truncate font-text-sm text-text-primary\">\n {calendar.name}\n </span>\n </label>\n ))}\n </div>\n\n <div className=\"rounded-radius-md border border-border-subtle bg-bg-canvas px-3 py-2\">\n <p className=\"font-text-xs font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.schedulerOverlay', 'Scheduler overlay')}\n </p>\n <p className=\"font-text-xs text-text-secondary\">\n {tr(\n 'calendar.schedulerOverlayDescription',\n 'Scheduled jobs from scheduler are shown in calendar views and deep-link to /scheduler.'\n )}\n </p>\n </div>\n\n {taskOverlay && (\n <div className=\"space-y-2 rounded-radius-md border border-border-subtle px-3 py-2\">\n <p className=\"font-text-xs font-weight-semibold text-text-primary\">\n {tr('calendar.taskOverlay', 'Tasks & milestones')}\n </p>\n <label className=\"flex items-center gap-3 py-1\">\n <input\n type=\"checkbox\"\n checked={eventFilter.showTasks !== false}\n onChange={(e) => updateEventFilter({ showTasks: e.target.checked })}\n className=\"size-4 rounded border-border-default\"\n aria-label={tr('calendar.showTasks', 'Show tasks')}\n />\n <span\n className=\"size-3 rounded-full shrink-0\"\n style={{ backgroundColor: 'var(--color-accent-blue)' }}\n />\n <span className=\"min-w-0 flex-1 truncate font-text-sm text-text-primary\">\n {tr('calendar.showTasks', 'Show tasks')}\n </span>\n </label>\n <label className=\"flex items-center gap-3 py-1\">\n <input\n type=\"checkbox\"\n checked={eventFilter.showMilestones !== false}\n onChange={(e) => updateEventFilter({ showMilestones: e.target.checked })}\n className=\"size-4 rounded border-border-default\"\n aria-label={tr('calendar.showMilestones', 'Show milestones')}\n />\n <span\n className=\"size-3 rounded-full shrink-0\"\n style={{ backgroundColor: 'var(--color-accent-purple)' }}\n />\n <span className=\"min-w-0 flex-1 truncate font-text-sm text-text-primary\">\n {tr('calendar.showMilestones', 'Show milestones')}\n </span>\n </label>\n </div>\n )}\n </div>\n\n <div className=\"space-y-2 pt-2 border-t border-border-subtle\">\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/settings`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n <Settings2 className=\"size-4\" />\n {tr('calendar.manageCalendarSettings', 'Manage calendar settings')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/resources`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n {tr('calendar.openResources', 'Open resources')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/subscriptions`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n {tr('calendar.exportAndSubscriptions', 'Export and subscriptions')}\n </button>\n </div>\n </aside>\n )}\n\n {/* Calendar view — host shell already renders <main>, use a plain div */}\n <div className=\"min-w-0 flex-1 p-6\">\n <NextSteps\n storageKey=\"calendar-overview\"\n className=\"mb-4\"\n steps={[\n ...(canCreateEvents\n ? [\n {\n id: 'create-event',\n label: tr('calendar.nextStepCreateEvent', 'Create your first event'),\n description: tr(\n 'calendar.nextStepCreateEventDesc',\n 'Add a meeting, reminder, or all-day event to this calendar.'\n ),\n icon: <CalendarPlus className=\"size-4\" />,\n onClick: () => {\n setCreateSlot(null);\n setShowCreateModal(true);\n },\n },\n ]\n : []),\n {\n id: 'book-resources',\n label: tr('calendar.nextStepResources', 'Book rooms and resources'),\n description: tr(\n 'calendar.nextStepResourcesDesc',\n 'Reserve conference rooms, equipment, and desks for your events.'\n ),\n icon: <DoorOpen className=\"size-4\" />,\n onClick: () => navigate(`${basePath}/resources`),\n },\n {\n id: 'export-subscribe',\n label: tr('calendar.nextStepSubscriptions', 'Export or subscribe'),\n description: tr(\n 'calendar.nextStepSubscriptionsDesc',\n 'Download ICS files to sync with Google, Apple, or Outlook calendars.'\n ),\n icon: <Rss className=\"size-4\" />,\n onClick: () => navigate(`${basePath}/subscriptions`),\n },\n {\n id: 'tune-settings',\n label: tr('calendar.nextStepSettings', 'Tune your calendar settings'),\n description: tr(\n 'calendar.nextStepSettingsDesc',\n 'Set availability, sharing, booking pages, and default view.'\n ),\n icon: <Settings2 className=\"size-4\" />,\n onClick: () => navigate(`${basePath}/settings`),\n },\n ]}\n />\n {currentView === 'day' && <DayView onCreateSlot={handleCreateSlot} />}\n {currentView === 'week' && <WeekView onCreateSlot={handleCreateSlot} />}\n {currentView === 'month' && <MonthView onCreateSlot={handleCreateSlot} />}\n {currentView === 'year' && <YearView />}\n {currentView === 'agenda' && <AgendaView />}\n {currentView === 'timeline' && <TimelineView />}\n </div>\n </div>\n\n {/* Create Event Modal */}\n <EventFormModal\n open={showCreateModal}\n defaultDate={createSlot?.date ?? currentDate}\n defaultStartHour={createSlot?.hour}\n onClose={() => {\n setShowCreateModal(false);\n setCreateSlot(null);\n }}\n />\n\n {/* Read-only details for a clicked PlanMagnet task / milestone overlay */}\n <TaskEventDetail />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAgB,IAAe;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src/pages/CalendarPage.tsx"],"sourcesContent":["import { useParams } from 'react-router';\nimport { useEffect, useState } from 'react';\nimport {\n ChevronLeft,\n ChevronRight,\n Plus,\n PanelLeft,\n Search,\n Settings2,\n CalendarPlus,\n DoorOpen,\n Rss,\n} from 'lucide-react';\nimport { useTr } from '../shared/hooks/useTr';\nimport { AccessDenied } from '@burdenoff/fe-libs/shared/components';\nimport { AuroraBackground, GradientText, NextSteps, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useGetCalendarsQuery } from '../generated/wspace-operations';\nimport { useCalendar } from '../providers/CalendarProvider';\nimport { useCalendarStore } from '../store/calendarStore';\nimport { useSafePermissions } from '../hooks/useSafePermissions';\nimport type { CalendarViewType } from '../types';\nimport { formatDate } from '../utils/dateHelpers';\nimport { WeekView } from '../components/WeekView';\nimport { MonthView } from '../components/MonthView';\nimport { DayView } from '../components/DayView';\nimport { AgendaView } from '../components/AgendaView';\nimport { YearView } from '../components/YearView';\nimport { TimelineView } from '../components/TimelineView';\nimport { ViewSwitcher } from '../components/ViewSwitcher';\nimport { MiniCalendar } from '../components/MiniCalendar';\nimport { EventFormModal } from '../components/EventFormModal';\nimport { TaskEventDetail } from '../components/TaskEventDetail';\nimport { CALENDAR_PERMISSIONS } from '../constants/permissions';\n\n/**\n * Main calendar page with multiple view types and event creation\n */\nexport function CalendarPage() {\n const { viewType } = useParams<{ viewType: string }>();\n const { hasPermission, isLoading: permissionsLoading } = useSafePermissions();\n const { navigate, basePath, taskOverlay } = useCalendar();\n const currentView = useCalendarStore((state) => state.currentView);\n const currentDate = useCalendarStore((state) => state.currentDate);\n const setView = useCalendarStore((state) => state.setView);\n const navigateDate = useCalendarStore((state) => state.navigateDate);\n const miniCalendarVisible = useCalendarStore((state) => state.miniCalendarVisible);\n const toggleMiniCalendar = useCalendarStore((state) => state.toggleMiniCalendar);\n const visibleCalendars = useCalendarStore((state) => state.visibleCalendars);\n const setVisibleCalendars = useCalendarStore((state) => state.setVisibleCalendars);\n const eventFilter = useCalendarStore((state) => state.eventFilter);\n const updateEventFilter = useCalendarStore((state) => state.updateEventFilter);\n const tr = useTr();\n\n const [showCreateModal, setShowCreateModal] = useState(false);\n const [createSlot, setCreateSlot] = useState<{ date: Date; hour?: number } | null>(null);\n const canCreateEvents = hasPermission(CALENDAR_PERMISSIONS.CALENDAR_EVENT_CREATE);\n // Clicking an empty grid cell opens the create modal pre-filled with that\n // slot. Left undefined (so cells stay non-interactive) when the user can't\n // create events. Day-level cells (month view) pass no hour — default to 9am\n // so the event isn't created at 1am (midnight + 1) by accident.\n const DEFAULT_CREATE_HOUR = 9;\n const handleCreateSlot = canCreateEvents\n ? (date: Date, hour?: number) => {\n setCreateSlot({ date, hour: hour ?? DEFAULT_CREATE_HOUR });\n setShowCreateModal(true);\n }\n : undefined;\n const { data: calendarsData } = useGetCalendarsQuery({\n variables: { pagination: { limit: 50 } },\n skip: permissionsLoading,\n });\n const calendars =\n (calendarsData?.calendars?.calendars as Array<{\n id: string;\n name: string;\n color?: string | null;\n isDefault: boolean;\n }>) ?? [];\n const effectiveVisibleCalendars =\n visibleCalendars.size > 0\n ? visibleCalendars\n : new Set<string>(calendars.map((calendar) => calendar.id));\n\n const handleToggleCalendar = (calendarId: string) => {\n const nextVisibleCalendars = new Set<string>(effectiveVisibleCalendars);\n if (nextVisibleCalendars.has(calendarId)) {\n nextVisibleCalendars.delete(calendarId);\n } else {\n nextVisibleCalendars.add(calendarId);\n }\n setVisibleCalendars(Array.from(nextVisibleCalendars));\n };\n\n // Sync view type from URL params\n useEffect(() => {\n if (viewType && viewType !== currentView) {\n setView(viewType as CalendarViewType);\n }\n }, [viewType, currentView, setView]);\n\n if (permissionsLoading) {\n return (\n <div className=\"@container min-h-screen bg-bg-canvas flex items-center justify-center\">\n <p className=\"font-text-md text-text-secondary\">{tr('calendar.loading', 'Loading...')}</p>\n </div>\n );\n }\n\n if (!hasPermission(CALENDAR_PERMISSIONS.CALENDAR_READ)) {\n return (\n <AccessDenied\n title={tr('calendar.accessDenied', 'Access Denied')}\n description={tr(\n 'calendar.noPermissionViewCalendar',\n \"You don't have permission to view the calendar.\"\n )}\n />\n );\n }\n\n return (\n <div className=\"@container min-h-screen bg-bg-canvas\">\n {/* Header — primary MFE hero with a living aurora backdrop */}\n <header className=\"relative overflow-hidden border-b border-border-seam bg-bg-surface px-6 py-3\">\n <AuroraBackground intensity=\"subtle\" />\n <div className=\"flex flex-col @lg:flex-row @lg:items-center @lg:justify-between gap-4\">\n {/* Date navigation */}\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={toggleMiniCalendar}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.toggleSidebar', 'Toggle sidebar')}\n >\n <PanelLeft className=\"size-4\" />\n </button>\n\n <button\n type=\"button\"\n onClick={() => navigateDate('today')}\n className=\"px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated font-text-sm font-weight-medium text-text-primary transition-colors\"\n >\n {tr('calendar.today', 'Today')}\n </button>\n\n <div className=\"flex items-center gap-1.5\">\n <button\n type=\"button\"\n onClick={() => navigateDate('prev')}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.previous', 'Previous')}\n >\n <ChevronLeft className=\"size-4\" />\n </button>\n\n <button\n type=\"button\"\n onClick={() => navigateDate('next')}\n className=\"size-9 inline-flex items-center justify-center rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary transition-colors\"\n aria-label={tr('calendar.next', 'Next')}\n >\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n\n <h2 className=\"font-heading-md text-text-primary tabular-nums\">\n <GradientText>{formatDate(currentDate)}</GradientText>\n </h2>\n </div>\n\n {/* Right side: view switcher + create button */}\n <div className=\"flex items-center gap-2\">\n <ViewSwitcher />\n\n {canCreateEvents ? (\n <button\n type=\"button\"\n onClick={() => {\n setCreateSlot(null);\n setShowCreateModal(true);\n }}\n className=\"inline-flex items-center gap-1.5 px-3 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors\"\n >\n <Plus className=\"size-4\" />\n <span className=\"hidden @sm:inline\">\n {tr('calendar.createEvent', 'Create Event')}\n </span>\n </button>\n ) : null}\n </div>\n </div>\n\n <PagePurpose className=\"relative mt-3 max-w-3xl\">\n {tr(\n 'calendar.pagePurpose',\n 'Your shared schedule. See, create, and manage events across day, week, month, agenda, and timeline views — then toggle calendars, search, and overlay scheduled jobs from the sidebar so the whole team stays in sync.'\n )}\n </PagePurpose>\n </header>\n\n {/* Main content */}\n <div className=\"flex min-h-0 flex-1\">\n {/* Mini calendar sidebar (optional) */}\n {miniCalendarVisible && (\n <aside className=\"hidden @lg:block w-72 border-r border-border-seam bg-bg-surface p-4 space-y-5\">\n <MiniCalendar />\n\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Search className=\"size-4 text-text-secondary\" />\n <input\n type=\"search\"\n value={eventFilter.search ?? ''}\n onChange={(e) =>\n updateEventFilter({ search: e.target.value.trim() || undefined })\n }\n placeholder={tr('calendar.searchEvents', 'Search events, tags, or calendars')}\n aria-label={tr('calendar.searchEvents', 'Search events, tags, or calendars')}\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n />\n </div>\n\n <select\n value={eventFilter.status?.[0] ?? ''}\n onChange={(e) =>\n updateEventFilter({\n status: e.target.value\n ? [e.target.value as 'CONFIRMED' | 'TENTATIVE' | 'CANCELLED']\n : undefined,\n })\n }\n className=\"w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border\"\n >\n <option value=\"\">{tr('calendar.allStatuses', 'All statuses')}</option>\n <option value=\"CONFIRMED\">\n {tr('calendar.eventStatusConfirmed', 'Confirmed')}\n </option>\n <option value=\"TENTATIVE\">\n {tr('calendar.eventStatusTentative', 'Tentative')}\n </option>\n <option value=\"CANCELLED\">\n {tr('calendar.eventStatusCancelled', 'Cancelled')}\n </option>\n </select>\n </div>\n\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"font-text-sm font-weight-semibold text-text-primary\">\n {tr('calendar.visibleCalendars', 'Visible calendars')}\n </h3>\n <button\n type=\"button\"\n onClick={() => setVisibleCalendars([])}\n className=\"font-text-xs text-action-primary-bg hover:underline\"\n >\n {tr('calendar.showAll', 'Show all')}\n </button>\n </div>\n\n <div className=\"space-y-2 max-h-[280px] overflow-auto pr-1\">\n {calendars.map((calendar) => (\n <label\n key={calendar.id}\n className=\"flex items-center gap-3 rounded-radius-md border border-border-subtle px-3 py-2 hover:bg-bg-canvas\"\n >\n <input\n type=\"checkbox\"\n checked={effectiveVisibleCalendars.has(calendar.id)}\n onChange={() => handleToggleCalendar(calendar.id)}\n className=\"size-4 rounded border-border-default\"\n aria-label={calendar.name}\n />\n <span\n className=\"size-3 rounded-full shrink-0\"\n style={{\n backgroundColor: calendar.color ?? 'var(--color-action-primary-bg)',\n }}\n />\n <span className=\"min-w-0 flex-1 truncate font-text-sm text-text-primary\">\n {calendar.name}\n </span>\n </label>\n ))}\n </div>\n\n <div className=\"rounded-radius-md border border-border-subtle bg-bg-canvas px-3 py-2\">\n <p className=\"font-text-xs font-weight-semibold text-text-primary mb-1\">\n {tr('calendar.schedulerOverlay', 'Scheduler overlay')}\n </p>\n <p className=\"font-text-xs text-text-secondary\">\n {tr(\n 'calendar.schedulerOverlayDescription',\n 'Scheduled jobs from scheduler are shown in calendar views and deep-link to /scheduler.'\n )}\n </p>\n </div>\n\n {taskOverlay && (\n <div className=\"space-y-2 rounded-radius-md border border-border-subtle px-3 py-2\">\n <p className=\"font-text-xs font-weight-semibold text-text-primary\">\n {tr('calendar.taskOverlay', 'Tasks & milestones')}\n </p>\n <label className=\"flex items-center gap-3 py-1\">\n <input\n type=\"checkbox\"\n checked={eventFilter.showTasks !== false}\n onChange={(e) => updateEventFilter({ showTasks: e.target.checked })}\n className=\"size-4 rounded border-border-default\"\n aria-label={tr('calendar.showTasks', 'Show tasks')}\n />\n <span\n className=\"size-3 rounded-full shrink-0\"\n style={{ backgroundColor: 'var(--color-accent-blue)' }}\n />\n <span className=\"min-w-0 flex-1 truncate font-text-sm text-text-primary\">\n {tr('calendar.showTasks', 'Show tasks')}\n </span>\n </label>\n <label className=\"flex items-center gap-3 py-1\">\n <input\n type=\"checkbox\"\n checked={eventFilter.showMilestones !== false}\n onChange={(e) => updateEventFilter({ showMilestones: e.target.checked })}\n className=\"size-4 rounded border-border-default\"\n aria-label={tr('calendar.showMilestones', 'Show milestones')}\n />\n <span\n className=\"size-3 rounded-full shrink-0\"\n style={{ backgroundColor: 'var(--color-accent-purple)' }}\n />\n <span className=\"min-w-0 flex-1 truncate font-text-sm text-text-primary\">\n {tr('calendar.showMilestones', 'Show milestones')}\n </span>\n </label>\n </div>\n )}\n </div>\n\n <div className=\"space-y-2 pt-2 border-t border-border-subtle\">\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/settings`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n <Settings2 className=\"size-4\" />\n {tr('calendar.manageCalendarSettings', 'Manage calendar settings')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/resources`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n {tr('calendar.openResources', 'Open resources')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate(`${basePath}/subscriptions`)}\n className=\"w-full inline-flex items-center gap-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas hover:bg-bg-elevated text-text-primary font-text-sm\"\n >\n {tr('calendar.exportAndSubscriptions', 'Export and subscriptions')}\n </button>\n </div>\n </aside>\n )}\n\n {/* Calendar view — host shell already renders <main>, use a plain div */}\n <div className=\"min-w-0 flex-1 p-6\">\n <NextSteps\n storageKey=\"calendar-overview\"\n className=\"mb-4\"\n steps={[\n ...(canCreateEvents\n ? [\n {\n id: 'create-event',\n label: tr('calendar.nextStepCreateEvent', 'Create your first event'),\n description: tr(\n 'calendar.nextStepCreateEventDesc',\n 'Add a meeting, reminder, or all-day event to this calendar.'\n ),\n icon: <CalendarPlus className=\"size-4\" />,\n onClick: () => {\n setCreateSlot(null);\n setShowCreateModal(true);\n },\n },\n ]\n : []),\n {\n id: 'book-resources',\n label: tr('calendar.nextStepResources', 'Book rooms and resources'),\n description: tr(\n 'calendar.nextStepResourcesDesc',\n 'Reserve conference rooms, equipment, and desks for your events.'\n ),\n icon: <DoorOpen className=\"size-4\" />,\n onClick: () => navigate(`${basePath}/resources`),\n },\n {\n id: 'export-subscribe',\n label: tr('calendar.nextStepSubscriptions', 'Export or subscribe'),\n description: tr(\n 'calendar.nextStepSubscriptionsDesc',\n 'Download ICS files to sync with Google, Apple, or Outlook calendars.'\n ),\n icon: <Rss className=\"size-4\" />,\n onClick: () => navigate(`${basePath}/subscriptions`),\n },\n {\n id: 'tune-settings',\n label: tr('calendar.nextStepSettings', 'Tune your calendar settings'),\n description: tr(\n 'calendar.nextStepSettingsDesc',\n 'Set availability, sharing, booking pages, and default view.'\n ),\n icon: <Settings2 className=\"size-4\" />,\n onClick: () => navigate(`${basePath}/settings`),\n },\n ]}\n />\n {currentView === 'day' && <DayView onCreateSlot={handleCreateSlot} />}\n {currentView === 'week' && <WeekView onCreateSlot={handleCreateSlot} />}\n {currentView === 'month' && <MonthView onCreateSlot={handleCreateSlot} />}\n {currentView === 'year' && <YearView />}\n {currentView === 'agenda' && <AgendaView />}\n {currentView === 'timeline' && <TimelineView />}\n </div>\n </div>\n\n {/* Create Event Modal */}\n <EventFormModal\n open={showCreateModal}\n defaultDate={createSlot?.date ?? currentDate}\n defaultStartHour={createSlot?.hour}\n onClose={() => {\n setShowCreateModal(false);\n setCreateSlot(null);\n }}\n />\n\n {/* Read-only details for a clicked PlanMagnet task / milestone overlay */}\n <TaskEventDetail />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAgB,IAAe;CAC7B,IAAM,EAAE,gBAAa,IAAiC,EAChD,EAAE,kBAAe,WAAW,MAAuB,GAAoB,EACvE,EAAE,aAAU,aAAU,mBAAgB,GAAa,EACnD,IAAc,GAAkB,MAAU,EAAM,YAAY,EAC5D,IAAc,GAAkB,MAAU,EAAM,YAAY,EAC5D,IAAU,GAAkB,MAAU,EAAM,QAAQ,EACpD,IAAe,GAAkB,MAAU,EAAM,aAAa,EAC9D,KAAsB,GAAkB,MAAU,EAAM,oBAAoB,EAC5E,IAAqB,GAAkB,MAAU,EAAM,mBAAmB,EAC1E,IAAmB,GAAkB,MAAU,EAAM,iBAAiB,EACtE,IAAsB,GAAkB,MAAU,EAAM,oBAAoB,EAC5E,IAAc,GAAkB,MAAU,EAAM,YAAY,EAC5D,IAAoB,GAAkB,MAAU,EAAM,kBAAkB,EACxE,IAAK,GAAO,EAEZ,CAAC,GAAiB,KAAsB,EAAS,GAAM,EACvD,CAAC,GAAY,KAAiB,EAA+C,KAAK,EAClF,IAAkB,EAAc,EAAqB,sBAAsB,EAM3E,IAAmB,KACpB,GAAY,MAAkB;AAE7B,EADA,EAAc;GAAE;GAAM,MAAM,KAAQ;GAAqB,CAAC,EAC1D,EAAmB,GAAK;KAE1B,KAAA,GACE,EAAE,MAAM,OAAkB,EAAqB;EACnD,WAAW,EAAE,YAAY,EAAE,OAAO,IAAI,EAAE;EACxC,MAAM;EACP,CAAC,EACI,IACH,IAAe,WAAW,aAKpB,EAAE,EACL,IACJ,EAAiB,O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,EACzB,EAAc,KAAK;;IAErB,CAAA;GAGF,kBAAC,IAAD,EAAmB,CAAA;GACf;MA7UJ,kBAAC,GAAD;EACE,OAAO,EAAG,yBAAyB,gBAAgB;EACnD,aAAa,EACX,qCACA,kDACD;EACD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventDetailsPage.d.ts","sourceRoot":"","sources":["../../src/pages/EventDetailsPage.tsx"],"names":[],"mappings":"AA4JA;;;GAGG;AACH,wBAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"EventDetailsPage.d.ts","sourceRoot":"","sources":["../../src/pages/EventDetailsPage.tsx"],"names":[],"mappings":"AA4JA;;;GAGG;AACH,wBAAgB,gBAAgB,gCAouB/B"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useTr as e } from "../shared/hooks/useTr.js";
|
|
2
|
+
import { useCalendar as t } from "../providers/CalendarProvider.js";
|
|
3
|
+
import { useDeleteEventMutation as n, useGetEventQuery as ee } from "../generated/wspace-operations.js";
|
|
3
4
|
import { useSafePermissions as r } from "../hooks/useSafePermissions.js";
|
|
4
5
|
import { formatDateTime as i } from "../utils/dateHelpers.js";
|
|
5
|
-
import { ADD_ATTENDEE_MUTATION as
|
|
6
|
-
import { EventFormModal as
|
|
7
|
-
import { CALENDAR_PERMISSIONS as
|
|
8
|
-
import { useEventPermissions as
|
|
9
|
-
import { ConfirmDialog as
|
|
10
|
-
import { nativeConfirm as
|
|
11
|
-
import { useState as
|
|
12
|
-
import { AccessDenied as
|
|
13
|
-
import {
|
|
14
|
-
import { ArrowLeft as p, Bell as m, Clock as h, Edit as g, Link2 as oe, MapPin as _, Paperclip as se, Repeat as ce, Shield as v, Tag as y, Trash2 as le, Users as b, Video as ue } from "lucide-react";
|
|
6
|
+
import { ADD_ATTENDEE_MUTATION as a, CREATE_REMINDER_MUTATION as o, DELETE_REMINDER_MUTATION as s, REMOVE_ATTENDEE_MUTATION as te, RESPOND_TO_EVENT_MUTATION as ne } from "../graphql/calendarDocuments.js";
|
|
7
|
+
import { EventFormModal as re } from "../components/EventFormModal.js";
|
|
8
|
+
import { CALENDAR_PERMISSIONS as c } from "../constants/permissions.js";
|
|
9
|
+
import { useEventPermissions as ie } from "../hooks/useEventPermissions.js";
|
|
10
|
+
import { ConfirmDialog as l } from "../components/ConfirmDialog.js";
|
|
11
|
+
import { nativeConfirm as u, nativeNotify as d } from "../utils/nativeBridge.js";
|
|
12
|
+
import { useState as f } from "react";
|
|
13
|
+
import { AccessDenied as p } from "@burdenoff/fe-libs/shared/components";
|
|
14
|
+
import { ArrowLeft as m, Bell as h, Clock as g, Edit as _, Link2 as ae, MapPin as v, Paperclip as oe, Repeat as se, Shield as ce, Tag as y, Trash2 as le, Users as b, Video as ue } from "lucide-react";
|
|
15
15
|
import { useNavigate as de, useParams as fe } from "react-router";
|
|
16
16
|
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
17
|
-
import { CTAOverflowMenu as pe, GlassCard as me, GradientText as he, NextSteps as ge, PagePurpose as
|
|
18
|
-
import { useMutation as
|
|
17
|
+
import { CTAOverflowMenu as pe, GlassCard as me, GradientText as he, NextSteps as ge, PagePurpose as C } from "@burdenoff/fe-libs/ui";
|
|
18
|
+
import { useMutation as w } from "@apollo/client/react";
|
|
19
19
|
//#region src/pages/EventDetailsPage.tsx
|
|
20
|
-
function
|
|
20
|
+
function T(e) {
|
|
21
21
|
return e ? {
|
|
22
22
|
id: e.id,
|
|
23
23
|
calendarId: e.calendarId,
|
|
@@ -82,11 +82,8 @@ function w(e) {
|
|
|
82
82
|
updatedAt: new Date(e.updatedAt)
|
|
83
83
|
} : null;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
let { eventId:
|
|
87
|
-
let n = O(e);
|
|
88
|
-
return n === e ? t : n;
|
|
89
|
-
}, A = {
|
|
85
|
+
function E() {
|
|
86
|
+
let { eventId: E } = fe(), D = de(), { basePath: O } = t(), k = e(), A = {
|
|
90
87
|
ACCEPTED: k("calendar.attendeeStatusAccepted", "Accepted"),
|
|
91
88
|
DECLINED: k("calendar.attendeeStatusDeclined", "Declined"),
|
|
92
89
|
TENTATIVE: k("calendar.attendeeStatusTentative", "Tentative"),
|
|
@@ -99,40 +96,40 @@ function T() {
|
|
|
99
96
|
EMAIL: k("calendar.reminderMethodEmail", "email"),
|
|
100
97
|
NOTIFICATION: k("calendar.reminderMethodNotification", "notification"),
|
|
101
98
|
SMS: k("calendar.reminderMethodSms", "sms")
|
|
102
|
-
}, [N, P] =
|
|
103
|
-
variables: { id:
|
|
104
|
-
skip: !
|
|
99
|
+
}, [N, P] = f(!1), [F, I] = f(!1), [L, R] = f(""), [z, B] = f(""), [V, _e] = f("15"), [H, ve] = f("IN_APP"), { hasPermission: U, isLoading: W } = r(), ye = U(c.CALENDAR_EVENT_READ), { data: G, loading: be, error: K, refetch: q } = ee({
|
|
100
|
+
variables: { id: E ?? "" },
|
|
101
|
+
skip: !E || W || !ye,
|
|
105
102
|
fetchPolicy: "cache-and-network"
|
|
106
|
-
}), [xe, { loading: Se }] =
|
|
107
|
-
if (
|
|
103
|
+
}), [xe, { loading: Se }] = n(), [Ce, { loading: J }] = w(a), [we, { loading: Y }] = w(te), [Te] = w(ne), [Ee, { loading: X }] = w(o), [De, { loading: Oe }] = w(s), Z = T(G?.event ?? null), Q = ie(Z), $ = U, ke = async () => {
|
|
104
|
+
if (E && await u({
|
|
108
105
|
title: k("calendar.deleteEvent", "Delete Event"),
|
|
109
|
-
message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{title}\"? This action cannot be undone."
|
|
106
|
+
message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{{title}}\"? This action cannot be undone.", { title: Z?.title ?? "" }),
|
|
110
107
|
okButtonTitle: k("calendar.delete", "Delete")
|
|
111
108
|
}) !== !1) try {
|
|
112
|
-
await xe({ variables: { id:
|
|
109
|
+
await xe({ variables: { id: E } }), d("success"), I(!1), D(`${O}/view/week`);
|
|
113
110
|
} catch (e) {
|
|
114
|
-
throw
|
|
111
|
+
throw d("error"), e;
|
|
115
112
|
}
|
|
116
|
-
},
|
|
117
|
-
!
|
|
118
|
-
eventId:
|
|
113
|
+
}, Ae = async () => {
|
|
114
|
+
!E || !L.trim() || (await Ce({ variables: {
|
|
115
|
+
eventId: E,
|
|
119
116
|
email: L.trim(),
|
|
120
117
|
name: z.trim() || void 0
|
|
121
|
-
} }), R(""), B(""), await
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
eventId:
|
|
118
|
+
} }), R(""), B(""), await q());
|
|
119
|
+
}, je = async () => {
|
|
120
|
+
E && (await Ee({ variables: { input: {
|
|
121
|
+
eventId: E,
|
|
125
122
|
minutesBefore: parseInt(V, 10),
|
|
126
123
|
channel: H
|
|
127
|
-
} } }), await
|
|
124
|
+
} } }), await q());
|
|
128
125
|
};
|
|
129
|
-
return
|
|
126
|
+
return W || be && !G ? /* @__PURE__ */ x("div", {
|
|
130
127
|
className: "@container min-h-screen bg-bg-canvas flex items-center justify-center",
|
|
131
128
|
children: /* @__PURE__ */ x("p", {
|
|
132
129
|
className: "font-text-md text-text-secondary",
|
|
133
130
|
children: k("calendar.loading", "Loading...")
|
|
134
131
|
})
|
|
135
|
-
}) : $(
|
|
132
|
+
}) : $(c.CALENDAR_EVENT_READ) ? K ? /* @__PURE__ */ x("div", {
|
|
136
133
|
className: "@container min-h-screen bg-bg-canvas p-6",
|
|
137
134
|
children: /* @__PURE__ */ x("div", {
|
|
138
135
|
className: "max-w-3xl mx-auto",
|
|
@@ -143,11 +140,11 @@ function T() {
|
|
|
143
140
|
children: [
|
|
144
141
|
k("calendar.failedToLoadEvent", "Failed to load event:"),
|
|
145
142
|
" ",
|
|
146
|
-
|
|
143
|
+
K.message
|
|
147
144
|
]
|
|
148
145
|
}), /* @__PURE__ */ x("button", {
|
|
149
146
|
type: "button",
|
|
150
|
-
onClick: () =>
|
|
147
|
+
onClick: () => D(`${O}/view/week`),
|
|
151
148
|
className: "px-3 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors",
|
|
152
149
|
children: k("calendar.backToCalendar", "Back to Calendar")
|
|
153
150
|
})]
|
|
@@ -162,16 +159,16 @@ function T() {
|
|
|
162
159
|
className: "max-w-4xl mx-auto flex items-center justify-between gap-2",
|
|
163
160
|
children: [/* @__PURE__ */ S("button", {
|
|
164
161
|
type: "button",
|
|
165
|
-
onClick: () =>
|
|
162
|
+
onClick: () => D(-1),
|
|
166
163
|
className: "inline-flex items-center gap-1.5 text-text-secondary hover:text-text-primary font-text-sm font-weight-medium transition-colors",
|
|
167
|
-
children: [/* @__PURE__ */ x(
|
|
164
|
+
children: [/* @__PURE__ */ x(m, { className: "size-4" }), k("calendar.back", "Back")]
|
|
168
165
|
}), /* @__PURE__ */ x(pe, {
|
|
169
|
-
primary: $(
|
|
166
|
+
primary: $(c.CALENDAR_EVENT_UPDATE) && Q.canEdit ? {
|
|
170
167
|
label: k("calendar.edit", "Edit"),
|
|
171
|
-
icon: /* @__PURE__ */ x(
|
|
168
|
+
icon: /* @__PURE__ */ x(_, { className: "size-4" }),
|
|
172
169
|
onSelect: () => P(!0)
|
|
173
170
|
} : void 0,
|
|
174
|
-
actions: $(
|
|
171
|
+
actions: $(c.CALENDAR_EVENT_DELETE) && Q.canDelete ? [{
|
|
175
172
|
label: k("calendar.delete", "Delete"),
|
|
176
173
|
icon: /* @__PURE__ */ x(le, { className: "size-4" }),
|
|
177
174
|
intent: "destructive",
|
|
@@ -183,18 +180,18 @@ function T() {
|
|
|
183
180
|
/* @__PURE__ */ S("div", {
|
|
184
181
|
className: "max-w-4xl mx-auto p-6 space-y-section-gap",
|
|
185
182
|
children: [
|
|
186
|
-
/* @__PURE__ */ x(
|
|
183
|
+
/* @__PURE__ */ x(C, {
|
|
187
184
|
className: "max-w-3xl",
|
|
188
185
|
children: k("calendar.eventDetailsPagePurpose", "Everything about this event in one place — time, location, attendees, reminders, resources, and attachments. Invite people, set when you want to be reminded, RSVP, or edit the details; changes sync to everyone on the invite.")
|
|
189
186
|
}),
|
|
190
187
|
/* @__PURE__ */ x(ge, {
|
|
191
188
|
storageKey: "calendar-event-details",
|
|
192
189
|
steps: [
|
|
193
|
-
...$(
|
|
190
|
+
...$(c.CALENDAR_EVENT_UPDATE) && Q.canEdit ? [{
|
|
194
191
|
id: "edit-event",
|
|
195
192
|
label: k("calendar.nextStepEditEvent", "Edit event details"),
|
|
196
193
|
description: k("calendar.nextStepEditEventDesc", "Update the title, time, location, or recurrence."),
|
|
197
|
-
icon: /* @__PURE__ */ x(
|
|
194
|
+
icon: /* @__PURE__ */ x(_, { className: "size-4" }),
|
|
198
195
|
onClick: () => P(!0)
|
|
199
196
|
}] : [],
|
|
200
197
|
{
|
|
@@ -208,15 +205,15 @@ function T() {
|
|
|
208
205
|
id: "set-reminder",
|
|
209
206
|
label: k("calendar.nextStepReminder", "Set a reminder"),
|
|
210
207
|
description: k("calendar.nextStepReminderDesc", "Get notified by in-app, email, or SMS before the event starts."),
|
|
211
|
-
icon: /* @__PURE__ */ x(
|
|
208
|
+
icon: /* @__PURE__ */ x(h, { className: "size-4" }),
|
|
212
209
|
href: "#event-reminders"
|
|
213
210
|
},
|
|
214
211
|
{
|
|
215
212
|
id: "back-to-calendar",
|
|
216
213
|
label: k("calendar.nextStepBackToCalendar", "Back to your calendar"),
|
|
217
214
|
description: k("calendar.nextStepBackToCalendarDesc", "Return to the calendar grid to review the rest of your schedule."),
|
|
218
|
-
icon: /* @__PURE__ */ x(
|
|
219
|
-
onClick: () =>
|
|
215
|
+
icon: /* @__PURE__ */ x(m, { className: "size-4" }),
|
|
216
|
+
onClick: () => D(`${O}/view/week`)
|
|
220
217
|
}
|
|
221
218
|
]
|
|
222
219
|
}),
|
|
@@ -230,14 +227,14 @@ function T() {
|
|
|
230
227
|
children: /* @__PURE__ */ x(he, { children: Z.title })
|
|
231
228
|
}), /* @__PURE__ */ S("div", {
|
|
232
229
|
className: "flex items-center gap-2 text-text-secondary font-text-md",
|
|
233
|
-
children: [/* @__PURE__ */ x(
|
|
230
|
+
children: [/* @__PURE__ */ x(g, { className: "size-4" }), /* @__PURE__ */ x("span", { children: Z.isAllDay ? `${i(Z.startTime).split(",")[0]} (${k("calendar.allDay", "All day")})` : `${i(Z.startTime)} - ${i(Z.endTime)}` })]
|
|
234
231
|
})]
|
|
235
232
|
}), /* @__PURE__ */ S("div", {
|
|
236
233
|
className: "space-y-4",
|
|
237
234
|
children: [
|
|
238
235
|
Z.location && /* @__PURE__ */ S("div", {
|
|
239
236
|
className: "flex gap-2",
|
|
240
|
-
children: [/* @__PURE__ */ x(
|
|
237
|
+
children: [/* @__PURE__ */ x(v, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
241
238
|
className: "min-w-0 flex-1",
|
|
242
239
|
children: [/* @__PURE__ */ x("p", {
|
|
243
240
|
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
@@ -250,7 +247,7 @@ function T() {
|
|
|
250
247
|
}),
|
|
251
248
|
(Z.locationAddress || Z.locationUrl || Z.locationType) && /* @__PURE__ */ S("div", {
|
|
252
249
|
className: "flex gap-2",
|
|
253
|
-
children: [/* @__PURE__ */ x(
|
|
250
|
+
children: [/* @__PURE__ */ x(v, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
254
251
|
className: "min-w-0 flex-1 space-y-1",
|
|
255
252
|
children: [
|
|
256
253
|
/* @__PURE__ */ x("p", {
|
|
@@ -293,7 +290,7 @@ function T() {
|
|
|
293
290
|
}),
|
|
294
291
|
/* @__PURE__ */ S("div", {
|
|
295
292
|
className: "flex gap-2",
|
|
296
|
-
children: [/* @__PURE__ */ x(
|
|
293
|
+
children: [/* @__PURE__ */ x(ce, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
297
294
|
className: "min-w-0 flex-1 space-y-1",
|
|
298
295
|
children: [
|
|
299
296
|
/* @__PURE__ */ x("p", {
|
|
@@ -310,7 +307,10 @@ function T() {
|
|
|
310
307
|
}),
|
|
311
308
|
Z.maxAttendees ? /* @__PURE__ */ x("p", {
|
|
312
309
|
className: "font-text-sm text-text-secondary",
|
|
313
|
-
children: k("calendar.attendeeCapacity", "{current} / {max} attendees"
|
|
310
|
+
children: k("calendar.attendeeCapacity", "{{current}} / {{max}} attendees", {
|
|
311
|
+
current: Z.currentAttendeeCount ?? 0,
|
|
312
|
+
max: Z.maxAttendees
|
|
313
|
+
})
|
|
314
314
|
}) : null,
|
|
315
315
|
Z.checkInEnabled ? /* @__PURE__ */ x("p", {
|
|
316
316
|
className: "font-text-sm text-text-secondary",
|
|
@@ -347,13 +347,13 @@ function T() {
|
|
|
347
347
|
className: `font-text-xs px-2 py-0.5 rounded-radius-sm ${e.status === "ACCEPTED" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300" : e.status === "DECLINED" ? "bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300" : "bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400"}`,
|
|
348
348
|
children: A[e.status] ?? e.status
|
|
349
349
|
}),
|
|
350
|
-
$(
|
|
350
|
+
$(c.CALENDAR_ATTENDEE_DELETE) ? /* @__PURE__ */ x("button", {
|
|
351
351
|
type: "button",
|
|
352
352
|
onClick: async () => {
|
|
353
|
-
let t =
|
|
354
|
-
t && (await we({ variables: { attendeeId: t } }), await
|
|
353
|
+
let t = G?.event?.attendees?.find((t) => (t.email ?? t.userId) === (e.email || e.userId))?.id;
|
|
354
|
+
t && (await we({ variables: { attendeeId: t } }), await q());
|
|
355
355
|
},
|
|
356
|
-
disabled:
|
|
356
|
+
disabled: Y,
|
|
357
357
|
className: "ml-2 font-text-xs text-action-primary-bg hover:underline disabled:opacity-50",
|
|
358
358
|
children: k("calendar.remove", "Remove")
|
|
359
359
|
}) : null
|
|
@@ -382,10 +382,10 @@ function T() {
|
|
|
382
382
|
}),
|
|
383
383
|
/* @__PURE__ */ x("button", {
|
|
384
384
|
type: "button",
|
|
385
|
-
onClick:
|
|
386
|
-
disabled: !L.trim() ||
|
|
385
|
+
onClick: Ae,
|
|
386
|
+
disabled: !L.trim() || J,
|
|
387
387
|
className: "px-4 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover disabled:opacity-50",
|
|
388
|
-
children:
|
|
388
|
+
children: J ? k("calendar.adding", "Adding...") : k("calendar.addAttendee", "Add attendee")
|
|
389
389
|
})
|
|
390
390
|
]
|
|
391
391
|
}),
|
|
@@ -398,10 +398,10 @@ function T() {
|
|
|
398
398
|
].map((e) => /* @__PURE__ */ x("button", {
|
|
399
399
|
type: "button",
|
|
400
400
|
onClick: async () => {
|
|
401
|
-
|
|
402
|
-
eventId:
|
|
401
|
+
E && (await Te({ variables: {
|
|
402
|
+
eventId: E,
|
|
403
403
|
status: e
|
|
404
|
-
} }), await
|
|
404
|
+
} }), await q());
|
|
405
405
|
},
|
|
406
406
|
className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary font-text-sm",
|
|
407
407
|
children: A[e] ?? e
|
|
@@ -428,7 +428,7 @@ function T() {
|
|
|
428
428
|
}),
|
|
429
429
|
(Z.recurrence || Z.rrule) && /* @__PURE__ */ S("div", {
|
|
430
430
|
className: "flex gap-2",
|
|
431
|
-
children: [/* @__PURE__ */ x(
|
|
431
|
+
children: [/* @__PURE__ */ x(se, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
432
432
|
className: "min-w-0 flex-1",
|
|
433
433
|
children: [/* @__PURE__ */ x("p", {
|
|
434
434
|
className: "font-text-sm font-weight-semibold text-text-primary mb-1",
|
|
@@ -438,7 +438,7 @@ function T() {
|
|
|
438
438
|
children: [
|
|
439
439
|
Z.recurrence.pattern,
|
|
440
440
|
" (",
|
|
441
|
-
k("calendar.recurrenceEveryInterval", "every {
|
|
441
|
+
k("calendar.recurrenceEveryInterval", "every {{interval}}", { interval: Z.recurrence.interval }),
|
|
442
442
|
")"
|
|
443
443
|
]
|
|
444
444
|
}) : /* @__PURE__ */ x("p", {
|
|
@@ -450,7 +450,7 @@ function T() {
|
|
|
450
450
|
/* @__PURE__ */ S("div", {
|
|
451
451
|
id: "event-reminders",
|
|
452
452
|
className: "flex gap-2 scroll-mt-24",
|
|
453
|
-
children: [/* @__PURE__ */ x(
|
|
453
|
+
children: [/* @__PURE__ */ x(h, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
454
454
|
className: "min-w-0 flex-1",
|
|
455
455
|
children: [
|
|
456
456
|
/* @__PURE__ */ x("p", {
|
|
@@ -463,13 +463,16 @@ function T() {
|
|
|
463
463
|
className: "flex items-center justify-between gap-3",
|
|
464
464
|
children: [/* @__PURE__ */ x("p", {
|
|
465
465
|
className: "font-text-sm text-text-secondary",
|
|
466
|
-
children: k("calendar.reminderSummary", "{minutes} minutes before ({method})"
|
|
466
|
+
children: k("calendar.reminderSummary", "{{minutes}} minutes before ({{method}})", {
|
|
467
|
+
minutes: e.minutesBefore,
|
|
468
|
+
method: M[e.method] ?? e.method.toLowerCase()
|
|
469
|
+
})
|
|
467
470
|
}), /* @__PURE__ */ x("button", {
|
|
468
471
|
type: "button",
|
|
469
472
|
onClick: async () => {
|
|
470
|
-
e.id && (await
|
|
473
|
+
e.id && (await De({ variables: { id: e.id } }), await q());
|
|
471
474
|
},
|
|
472
|
-
disabled:
|
|
475
|
+
disabled: Oe,
|
|
473
476
|
className: "font-text-xs text-action-primary-bg hover:underline disabled:opacity-50",
|
|
474
477
|
children: k("calendar.delete", "Delete")
|
|
475
478
|
})]
|
|
@@ -485,13 +488,13 @@ function T() {
|
|
|
485
488
|
type: "number",
|
|
486
489
|
min: "1",
|
|
487
490
|
value: V,
|
|
488
|
-
onChange: (e) =>
|
|
491
|
+
onChange: (e) => _e(e.target.value),
|
|
489
492
|
className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
490
493
|
"aria-label": k("calendar.reminderMinutesBefore", "Minutes before event")
|
|
491
494
|
}),
|
|
492
495
|
/* @__PURE__ */ S("select", {
|
|
493
496
|
value: H,
|
|
494
|
-
onChange: (e) =>
|
|
497
|
+
onChange: (e) => ve(e.target.value),
|
|
495
498
|
className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
496
499
|
"aria-label": k("calendar.reminderChannel", "Reminder channel"),
|
|
497
500
|
children: [
|
|
@@ -505,13 +508,13 @@ function T() {
|
|
|
505
508
|
}),
|
|
506
509
|
/* @__PURE__ */ x("option", {
|
|
507
510
|
value: "SMS",
|
|
508
|
-
children: "SMS"
|
|
511
|
+
children: k("calendar.sms", "SMS")
|
|
509
512
|
})
|
|
510
513
|
]
|
|
511
514
|
}),
|
|
512
515
|
/* @__PURE__ */ x("button", {
|
|
513
516
|
type: "button",
|
|
514
|
-
onClick:
|
|
517
|
+
onClick: je,
|
|
515
518
|
disabled: X,
|
|
516
519
|
className: "px-4 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover disabled:opacity-50",
|
|
517
520
|
children: X ? k("calendar.adding", "Adding...") : k("calendar.addReminder", "Add reminder")
|
|
@@ -552,7 +555,7 @@ function T() {
|
|
|
552
555
|
}),
|
|
553
556
|
Z.attachments && Z.attachments.length > 0 && /* @__PURE__ */ S("div", {
|
|
554
557
|
className: "flex gap-2",
|
|
555
|
-
children: [/* @__PURE__ */ x(
|
|
558
|
+
children: [/* @__PURE__ */ x(oe, { className: "size-5 text-text-secondary shrink-0" }), /* @__PURE__ */ S("div", {
|
|
556
559
|
className: "min-w-0 flex-1",
|
|
557
560
|
children: [/* @__PURE__ */ x("p", {
|
|
558
561
|
className: "font-text-sm font-weight-semibold text-text-primary mb-2",
|
|
@@ -606,7 +609,7 @@ function T() {
|
|
|
606
609
|
className: "pt-4 border-t border-border-default",
|
|
607
610
|
children: [/* @__PURE__ */ S("div", {
|
|
608
611
|
className: "flex items-center gap-1.5 mb-2",
|
|
609
|
-
children: [/* @__PURE__ */ x(
|
|
612
|
+
children: [/* @__PURE__ */ x(ae, { className: "size-4 text-text-secondary" }), /* @__PURE__ */ x("p", {
|
|
610
613
|
className: "font-text-sm font-weight-semibold text-text-primary",
|
|
611
614
|
children: k("calendar.links", "Links")
|
|
612
615
|
})]
|
|
@@ -626,19 +629,19 @@ function T() {
|
|
|
626
629
|
})
|
|
627
630
|
]
|
|
628
631
|
}),
|
|
629
|
-
/* @__PURE__ */ x(
|
|
632
|
+
/* @__PURE__ */ x(re, {
|
|
630
633
|
open: N,
|
|
631
634
|
event: Z,
|
|
632
635
|
onClose: () => P(!1)
|
|
633
636
|
}),
|
|
634
|
-
/* @__PURE__ */ x(
|
|
637
|
+
/* @__PURE__ */ x(l, {
|
|
635
638
|
open: F,
|
|
636
639
|
title: k("calendar.deleteEvent", "Delete Event"),
|
|
637
|
-
message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{title}\"? This action cannot be undone."
|
|
640
|
+
message: k("calendar.deleteEventConfirmation", "Are you sure you want to delete \"{{title}}\"? This action cannot be undone.", { title: Z.title }),
|
|
638
641
|
confirmLabel: k("calendar.delete", "Delete"),
|
|
639
642
|
variant: "danger",
|
|
640
643
|
loading: Se,
|
|
641
|
-
onConfirm:
|
|
644
|
+
onConfirm: ke,
|
|
642
645
|
onCancel: () => I(!1)
|
|
643
646
|
})
|
|
644
647
|
]
|
|
@@ -653,18 +656,18 @@ function T() {
|
|
|
653
656
|
children: k("calendar.eventNotFound", "Event not found")
|
|
654
657
|
}), /* @__PURE__ */ x("button", {
|
|
655
658
|
type: "button",
|
|
656
|
-
onClick: () =>
|
|
659
|
+
onClick: () => D(`${O}/view/week`),
|
|
657
660
|
className: "mt-4 px-3 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors",
|
|
658
661
|
children: k("calendar.backToCalendar", "Back to Calendar")
|
|
659
662
|
})]
|
|
660
663
|
})
|
|
661
664
|
})
|
|
662
|
-
}) : /* @__PURE__ */ x(
|
|
665
|
+
}) : /* @__PURE__ */ x(p, {
|
|
663
666
|
title: k("calendar.accessDenied", "Access Denied"),
|
|
664
667
|
description: k("calendar.noPermissionViewEvent", "You don't have permission to view this event.")
|
|
665
668
|
});
|
|
666
669
|
}
|
|
667
670
|
//#endregion
|
|
668
|
-
export {
|
|
671
|
+
export { E as EventDetailsPage };
|
|
669
672
|
|
|
670
673
|
//# sourceMappingURL=EventDetailsPage.js.map
|