@burdenoff/microfe-timecampus 2026.1205.1 → 2026.1206.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.
Files changed (125) hide show
  1. package/dist/timecampus/components/DateFields.d.ts +53 -0
  2. package/dist/timecampus/components/DateFields.js +87 -0
  3. package/dist/timecampus/components/DateFields.js.map +1 -0
  4. package/dist/timecampus/components/ErrorBoundary.js +1 -1
  5. package/dist/timecampus/components/ErrorBoundary.js.map +1 -1
  6. package/dist/timecampus/components/StatusBadge.js +4 -4
  7. package/dist/timecampus/components/StatusBadge.js.map +1 -1
  8. package/dist/timecampus/components/Toast.js +4 -4
  9. package/dist/timecampus/components/Toast.js.map +1 -1
  10. package/dist/timecampus/components/dateFieldValues.d.ts +39 -0
  11. package/dist/timecampus/components/dateFieldValues.js +49 -0
  12. package/dist/timecampus/components/dateFieldValues.js.map +1 -0
  13. package/dist/timecampus/components/maps/LocationGeofenceMap.js +2 -2
  14. package/dist/timecampus/components/maps/LocationGeofenceMap.js.map +1 -1
  15. package/dist/timecampus/pages/HomePage.js +1 -1
  16. package/dist/timecampus/pages/HomePage.js.map +1 -1
  17. package/dist/timecampus/pages/admin/AdminPage.js +6 -6
  18. package/dist/timecampus/pages/admin/AdminPage.js.map +1 -1
  19. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js +5 -5
  20. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js.map +1 -1
  21. package/dist/timecampus/pages/channels/ChannelsPage.js +1 -1
  22. package/dist/timecampus/pages/channels/ChannelsPage.js.map +1 -1
  23. package/dist/timecampus/pages/client-portal/ClientPortalPage.js +4 -4
  24. package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
  25. package/dist/timecampus/pages/dashboard/AnalyticsPage.js +3 -3
  26. package/dist/timecampus/pages/dashboard/AnalyticsPage.js.map +1 -1
  27. package/dist/timecampus/pages/dashboard/ReportsPage.js +4 -4
  28. package/dist/timecampus/pages/dashboard/ReportsPage.js.map +1 -1
  29. package/dist/timecampus/pages/dashboard/ServerReportExports.js +1 -1
  30. package/dist/timecampus/pages/dashboard/ServerReportExports.js.map +1 -1
  31. package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js +121 -120
  32. package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js.map +1 -1
  33. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +71 -71
  34. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
  35. package/dist/timecampus/pages/extend/AppletDeveloperPage.js +1 -1
  36. package/dist/timecampus/pages/extend/AppletDeveloperPage.js.map +1 -1
  37. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js +1 -1
  38. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js.map +1 -1
  39. package/dist/timecampus/pages/extend/TimeTriggersPage.js +1 -1
  40. package/dist/timecampus/pages/extend/TimeTriggersPage.js.map +1 -1
  41. package/dist/timecampus/pages/focus/FocusProtectionPage.js +250 -253
  42. package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
  43. package/dist/timecampus/pages/focus-score/FocusScorePage.js +1 -1
  44. package/dist/timecampus/pages/focus-score/FocusScorePage.js.map +1 -1
  45. package/dist/timecampus/pages/geofencing/GeofencingPage.js +5 -5
  46. package/dist/timecampus/pages/geofencing/GeofencingPage.js.map +1 -1
  47. package/dist/timecampus/pages/invoicing/InvoicingPage.js +264 -263
  48. package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
  49. package/dist/timecampus/pages/lifetime/DeadTimeRadarPage.js +1 -1
  50. package/dist/timecampus/pages/lifetime/DeadTimeRadarPage.js.map +1 -1
  51. package/dist/timecampus/pages/lifetime/FiniteLifePage.js +103 -103
  52. package/dist/timecampus/pages/lifetime/FiniteLifePage.js.map +1 -1
  53. package/dist/timecampus/pages/lifetime/LifeBalancePage.js +1 -1
  54. package/dist/timecampus/pages/lifetime/LifeBalancePage.js.map +1 -1
  55. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +43 -43
  56. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
  57. package/dist/timecampus/pages/lifetime/PersonalCorporatePage.js +3 -3
  58. package/dist/timecampus/pages/lifetime/PersonalCorporatePage.js.map +1 -1
  59. package/dist/timecampus/pages/lifetime/RecommendationsPage.js +1 -1
  60. package/dist/timecampus/pages/lifetime/RecommendationsPage.js.map +1 -1
  61. package/dist/timecampus/pages/lifetime/TimeWellSpentPage.js +2 -2
  62. package/dist/timecampus/pages/lifetime/TimeWellSpentPage.js.map +1 -1
  63. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js +5 -5
  64. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js.map +1 -1
  65. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js +223 -221
  66. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js.map +1 -1
  67. package/dist/timecampus/pages/meetings/ActionItemFormModal.js +65 -64
  68. package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
  69. package/dist/timecampus/pages/meetings/MeetingAnalyticsPage.js +1 -1
  70. package/dist/timecampus/pages/meetings/MeetingAnalyticsPage.js.map +1 -1
  71. package/dist/timecampus/pages/meetings/MeetingCreatePage.js +55 -55
  72. package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
  73. package/dist/timecampus/pages/meetings/MeetingDetailPage.js +8 -8
  74. package/dist/timecampus/pages/meetings/MeetingDetailPage.js.map +1 -1
  75. package/dist/timecampus/pages/meetings/MeetingFormModal.js +99 -97
  76. package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
  77. package/dist/timecampus/pages/meetings/MeetingsPage.js +3 -3
  78. package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
  79. package/dist/timecampus/pages/meetings/ParticipantFormModal.js +1 -1
  80. package/dist/timecampus/pages/meetings/ParticipantFormModal.js.map +1 -1
  81. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js +1 -1
  82. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js.map +1 -1
  83. package/dist/timecampus/pages/mobile/MobileTimelinePage.js +4 -4
  84. package/dist/timecampus/pages/mobile/MobileTimelinePage.js.map +1 -1
  85. package/dist/timecampus/pages/mobile/MobileTimerPage.js +1 -1
  86. package/dist/timecampus/pages/mobile/MobileTimerPage.js.map +1 -1
  87. package/dist/timecampus/pages/pomodoro/PomodoroAnalyticsPage.js +2 -2
  88. package/dist/timecampus/pages/pomodoro/PomodoroAnalyticsPage.js.map +1 -1
  89. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +155 -154
  90. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  91. package/dist/timecampus/pages/pomodoro/PomodoroSettingsPage.js +1 -1
  92. package/dist/timecampus/pages/pomodoro/PomodoroSettingsPage.js.map +1 -1
  93. package/dist/timecampus/pages/projects/ProjectCreatePage.js +1 -1
  94. package/dist/timecampus/pages/projects/ProjectCreatePage.js.map +1 -1
  95. package/dist/timecampus/pages/projects/ProjectDetailPage.js +5 -5
  96. package/dist/timecampus/pages/projects/ProjectDetailPage.js.map +1 -1
  97. package/dist/timecampus/pages/projects/ProjectsPage.js +6 -6
  98. package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
  99. package/dist/timecampus/pages/projects/TasksPage.js +189 -188
  100. package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
  101. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +356 -361
  102. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
  103. package/dist/timecampus/pages/team/TeamAnalyticsPage.js +2 -2
  104. package/dist/timecampus/pages/team/TeamAnalyticsPage.js.map +1 -1
  105. package/dist/timecampus/pages/team/TeamMembersPage.js +3 -3
  106. package/dist/timecampus/pages/team/TeamMembersPage.js.map +1 -1
  107. package/dist/timecampus/pages/team/TeamPage.js +2 -2
  108. package/dist/timecampus/pages/team/TeamPage.js.map +1 -1
  109. package/dist/timecampus/pages/team-activity/TeamActivityPage.js +2 -2
  110. package/dist/timecampus/pages/team-activity/TeamActivityPage.js.map +1 -1
  111. package/dist/timecampus/pages/time/TimeEntriesPage.js +133 -131
  112. package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
  113. package/dist/timecampus/pages/time/TimeTrackingPage.js +1 -1
  114. package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
  115. package/dist/timecampus/pages/time/TimerPage.js +1 -1
  116. package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
  117. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js +47 -48
  118. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js.map +1 -1
  119. package/dist/timecampus/pages/time-approval/TimeApprovalPage.js +8 -8
  120. package/dist/timecampus/pages/time-approval/TimeApprovalPage.js.map +1 -1
  121. package/dist/timecampus/pages/timeline/TimelinePage.js +237 -237
  122. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  123. package/dist/timecampus/pages/work-patterns/SustainedLoadCard.js +3 -3
  124. package/dist/timecampus/pages/work-patterns/SustainedLoadCard.js.map +1 -1
  125. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"LocationGeofenceMap.js","names":["L","OSM_TILE_URL","OSM_ATTRIBUTION","buildGeofencePopup","wrap","title","fence","meta","statusText","formatRadius","addr","coords","formatCoordinates","buildLocationPopup","index","entry","sourceLabel","startDate","LocationGeofenceMap","containerRef","useRef","mapRef","tileLayerRef","geofenceLayerRef","locationLayerRef","draftLayerRef","hasAutoFittedRef","tileStatsRef","tileDegraded","setTileDegraded","useState","statusAnnouncement","setStatusAnnouncement","cursorCoords","setCursorCoords","onSelectGeofenceRef","onSelectGeofence","onSelectLocationRef","onSelectLocation","onDraftGeofenceChangeRef","onDraftGeofenceChange","onPickPointRef","onPickPoint","interactiveModeRef","interactiveMode","draftGeofenceRef","draftGeofence","validGeofences","invalidGeofences","useMemo","partitionValidGeofences","geofences","validLocations","invalidLocations","partitionValidLocationEntries","locationEntries","malformedCount","fitAllFeatures","useCallback","map","bounds","showGeofences","edge","computeCircleHandlePosition","isValidGeofenceGeometry","draftPoint","isValidCoordinate","announce","DEFAULT_MAP_CENTER","useEffect","el","tileLayer","roundCoordinate","event","mode","lat","lng","radius","clampGeofenceRadius","resizeObserver","timer","group","mutedStroke","resolveCssToken","primaryStroke","isSelected","selectedGeofenceId","tokenColor","zoneTokenForIndex","circle","centerMarker","pathColor","geofencedColor","manualColor","surfaceColor","showLocationPath","latLngs","selectedLocationId","fillColor","marker","primaryColor","draftCircle","centerIcon","handlePosition","handleIcon","handleMarker","pos","nextLat","nextLng","currentRadius","handlePos","centerPos","nextRadius","haversineDistanceMeters","pointIcon","target","f","handleZoomIn","handleZoomOut","handleRetryTiles","handleKeyDown","activeCoordsLabel","testId","cn","className","WifiOff","RefreshCw","AlertTriangle","ariaLabel","heightClassName","Plus","Minus","Crosshair"],"sources":["../../../../src/timecampus/components/maps/LocationGeofenceMap.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type KeyboardEvent,\n} from \"react\";\nimport L from \"leaflet\";\nimport {\n AlertTriangle,\n Crosshair,\n Minus,\n Plus,\n RefreshCw,\n WifiOff,\n} from \"lucide-react\";\nimport { cn } from \"../../utils/helpers\";\nimport {\n DEFAULT_GEOFENCE_RADIUS_METERS,\n DEFAULT_MAP_CENTER,\n DEFAULT_MAP_ZOOM,\n clampGeofenceRadius,\n computeCircleHandlePosition,\n formatCoordinates,\n formatRadius,\n haversineDistanceMeters,\n isValidCoordinate,\n isValidGeofenceGeometry,\n partitionValidGeofences,\n partitionValidLocationEntries,\n roundCoordinate,\n} from \"./locationGeometry\";\nimport {\n ensureLeafletStyles,\n resolveCssToken,\n zoneTokenForIndex,\n} from \"./mapTheme\";\n\nexport interface MapGeofenceItem {\n id: string;\n name: string;\n latitude: number;\n longitude: number;\n radius: number;\n isActive: boolean;\n trigger?: string | null;\n address?: string | null;\n eventsCount?: number;\n}\n\nexport interface MapLocationEntryItem {\n id: string;\n latitude: number;\n longitude: number;\n address?: string | null;\n startTime: string;\n endTime?: string | null;\n duration?: number | null;\n accuracy?: number | null;\n geofenceId?: string | null;\n}\n\nexport interface DraftGeofenceState {\n latitude: number;\n longitude: number;\n radius: number;\n name?: string;\n}\n\nexport interface DraftPointState {\n latitude: number;\n longitude: number;\n}\n\nexport type MapInteractiveMode = \"view\" | \"place-geofence\" | \"pick-point\";\n\nexport interface LocationGeofenceMapProps {\n geofences?: readonly MapGeofenceItem[];\n locationEntries?: readonly MapLocationEntryItem[];\n selectedGeofenceId?: string | null;\n selectedLocationId?: string | null;\n onSelectGeofence?: (id: string) => void;\n onSelectLocation?: (id: string) => void;\n draftGeofence?: DraftGeofenceState | null;\n draftPoint?: DraftPointState | null;\n interactiveMode?: MapInteractiveMode;\n onDraftGeofenceChange?: (next: {\n latitude: number;\n longitude: number;\n radius: number;\n }) => void;\n onPickPoint?: (coords: { latitude: number; longitude: number }) => void;\n showGeofences?: boolean;\n showLocationPath?: boolean;\n heightClassName?: string;\n ariaLabel?: string;\n testId?: string;\n className?: string;\n}\n\nconst OSM_TILE_URL = \"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\";\nconst OSM_ATTRIBUTION = \"&copy; OpenStreetMap contributors\";\n\nfunction buildGeofencePopup(fence: MapGeofenceItem): HTMLElement {\n const wrap = document.createElement(\"div\");\n const title = document.createElement(\"div\");\n title.style.fontWeight = \"600\";\n title.textContent = fence.name;\n wrap.appendChild(title);\n\n const meta = document.createElement(\"div\");\n meta.style.marginTop = \"2px\";\n meta.style.opacity = \"0.85\";\n const statusText = fence.isActive ? \"Active\" : \"Inactive\";\n meta.textContent = `${formatRadius(fence.radius)} radius · ${statusText}`;\n wrap.appendChild(meta);\n\n if (fence.address) {\n const addr = document.createElement(\"div\");\n addr.style.marginTop = \"2px\";\n addr.textContent = fence.address;\n wrap.appendChild(addr);\n }\n\n const coords = document.createElement(\"div\");\n coords.style.marginTop = \"4px\";\n coords.style.fontSize = \"11px\";\n coords.style.opacity = \"0.75\";\n coords.textContent = formatCoordinates(fence.latitude, fence.longitude);\n wrap.appendChild(coords);\n\n return wrap;\n}\n\nfunction buildLocationPopup(\n entry: MapLocationEntryItem,\n index: number,\n): HTMLElement {\n const wrap = document.createElement(\"div\");\n const title = document.createElement(\"div\");\n title.style.fontWeight = \"600\";\n title.textContent = `${index + 1}. ${entry.address?.trim() || \"Tracked location\"}`;\n wrap.appendChild(title);\n\n const meta = document.createElement(\"div\");\n meta.style.marginTop = \"2px\";\n meta.style.opacity = \"0.85\";\n const sourceLabel = entry.geofenceId ? \"Geofenced\" : \"Manual\";\n const startDate = new Date(entry.startTime);\n const timeText = Number.isFinite(startDate.getTime())\n ? startDate.toLocaleString()\n : entry.startTime;\n meta.textContent = `${sourceLabel} · ${timeText}`;\n wrap.appendChild(meta);\n\n const coords = document.createElement(\"div\");\n coords.style.marginTop = \"4px\";\n coords.style.fontSize = \"11px\";\n coords.style.opacity = \"0.75\";\n coords.textContent = formatCoordinates(entry.latitude, entry.longitude);\n wrap.appendChild(coords);\n\n return wrap;\n}\n\nexport function LocationGeofenceMap({\n geofences = [],\n locationEntries = [],\n selectedGeofenceId = null,\n selectedLocationId = null,\n onSelectGeofence,\n onSelectLocation,\n draftGeofence = null,\n draftPoint = null,\n interactiveMode = \"view\",\n onDraftGeofenceChange,\n onPickPoint,\n showGeofences = true,\n showLocationPath = true,\n heightClassName = \"h-[320px] sm:h-[420px] lg:h-[520px]\",\n ariaLabel = \"Interactive location and geofence map\",\n testId = \"location-geofence-map\",\n className,\n}: LocationGeofenceMapProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const mapRef = useRef<L.Map | null>(null);\n const tileLayerRef = useRef<L.TileLayer | null>(null);\n const geofenceLayerRef = useRef<L.LayerGroup | null>(null);\n const locationLayerRef = useRef<L.LayerGroup | null>(null);\n const draftLayerRef = useRef<L.LayerGroup | null>(null);\n const hasAutoFittedRef = useRef(false);\n const tileStatsRef = useRef({ loaded: 0, errors: 0 });\n\n const [tileDegraded, setTileDegraded] = useState(false);\n const [statusAnnouncement, setStatusAnnouncement] = useState(\"\");\n const [cursorCoords, setCursorCoords] = useState<{\n latitude: number;\n longitude: number;\n } | null>(null);\n\n const onSelectGeofenceRef = useRef(onSelectGeofence);\n const onSelectLocationRef = useRef(onSelectLocation);\n const onDraftGeofenceChangeRef = useRef(onDraftGeofenceChange);\n const onPickPointRef = useRef(onPickPoint);\n const interactiveModeRef = useRef(interactiveMode);\n const draftGeofenceRef = useRef(draftGeofence);\n\n useEffect(() => {\n onSelectGeofenceRef.current = onSelectGeofence;\n onSelectLocationRef.current = onSelectLocation;\n onDraftGeofenceChangeRef.current = onDraftGeofenceChange;\n onPickPointRef.current = onPickPoint;\n interactiveModeRef.current = interactiveMode;\n draftGeofenceRef.current = draftGeofence;\n }, [\n onSelectGeofence,\n onSelectLocation,\n onDraftGeofenceChange,\n onPickPoint,\n interactiveMode,\n draftGeofence,\n ]);\n\n const { valid: validGeofences, invalid: invalidGeofences } = useMemo(\n () => partitionValidGeofences(geofences),\n [geofences],\n );\n\n const { valid: validLocations, invalid: invalidLocations } = useMemo(\n () => partitionValidLocationEntries(locationEntries),\n [locationEntries],\n );\n\n const malformedCount = invalidGeofences.length + invalidLocations.length;\n\n const fitAllFeatures = useCallback(\n (announce = true) => {\n const map = mapRef.current;\n if (!map) return;\n\n const bounds = L.latLngBounds([]);\n if (showGeofences) {\n for (const fence of validGeofences) {\n const edge = computeCircleHandlePosition(\n fence.latitude,\n fence.longitude,\n fence.radius,\n );\n bounds.extend([fence.latitude, fence.longitude]);\n bounds.extend(edge);\n }\n }\n for (const entry of validLocations) {\n bounds.extend([entry.latitude, entry.longitude]);\n }\n if (draftGeofence && isValidGeofenceGeometry(draftGeofence)) {\n bounds.extend([draftGeofence.latitude, draftGeofence.longitude]);\n bounds.extend(\n computeCircleHandlePosition(\n draftGeofence.latitude,\n draftGeofence.longitude,\n draftGeofence.radius,\n ),\n );\n }\n if (\n draftPoint &&\n isValidCoordinate(draftPoint.latitude, draftPoint.longitude)\n ) {\n bounds.extend([draftPoint.latitude, draftPoint.longitude]);\n }\n\n if (bounds.isValid()) {\n map.fitBounds(bounds, { padding: [40, 40], maxZoom: 16 });\n if (announce) {\n setStatusAnnouncement(\"Map fitted to visible zones and locations.\");\n }\n } else {\n map.setView(\n [DEFAULT_MAP_CENTER[0], DEFAULT_MAP_CENTER[1]],\n DEFAULT_MAP_ZOOM,\n );\n if (announce) {\n setStatusAnnouncement(\"Map reset to default view.\");\n }\n }\n },\n [draftGeofence, draftPoint, showGeofences, validGeofences, validLocations],\n );\n\n // Initialize Leaflet instance once on mount.\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return undefined;\n\n ensureLeafletStyles();\n\n const map = L.map(el, {\n center: [DEFAULT_MAP_CENTER[0], DEFAULT_MAP_CENTER[1]],\n zoom: DEFAULT_MAP_ZOOM,\n zoomControl: false,\n scrollWheelZoom: true,\n keyboard: false,\n });\n mapRef.current = map;\n\n const tileLayer = L.tileLayer(OSM_TILE_URL, {\n attribution: OSM_ATTRIBUTION,\n maxZoom: 19,\n crossOrigin: true,\n });\n\n tileLayer.on(\"tileload\", () => {\n tileStatsRef.current.loaded += 1;\n setTileDegraded(false);\n });\n\n tileLayer.on(\"tileerror\", () => {\n tileStatsRef.current.errors += 1;\n if (\n tileStatsRef.current.loaded === 0 ||\n tileStatsRef.current.errors >= 3\n ) {\n setTileDegraded(true);\n }\n });\n\n tileLayer.addTo(map);\n tileLayerRef.current = tileLayer;\n L.control.scale({ imperial: false, position: \"bottomright\" }).addTo(map);\n\n geofenceLayerRef.current = L.layerGroup().addTo(map);\n locationLayerRef.current = L.layerGroup().addTo(map);\n draftLayerRef.current = L.layerGroup().addTo(map);\n\n map.on(\"mousemove\", (event: L.LeafletMouseEvent) => {\n setCursorCoords({\n latitude: roundCoordinate(event.latlng.lat),\n longitude: roundCoordinate(event.latlng.lng),\n });\n });\n\n map.on(\"mouseout\", () => {\n setCursorCoords(null);\n });\n\n map.on(\"click\", (event: L.LeafletMouseEvent) => {\n const mode = interactiveModeRef.current;\n const lat = roundCoordinate(event.latlng.lat);\n const lng = roundCoordinate(event.latlng.lng);\n if (!isValidCoordinate(lat, lng)) return;\n\n if (mode === \"place-geofence\") {\n const radius = clampGeofenceRadius(\n draftGeofenceRef.current?.radius ?? DEFAULT_GEOFENCE_RADIUS_METERS,\n );\n onDraftGeofenceChangeRef.current?.({\n latitude: lat,\n longitude: lng,\n radius,\n });\n setStatusAnnouncement(\n `Placed geofence center at ${formatCoordinates(lat, lng)} with ${formatRadius(radius)} radius.`,\n );\n } else if (mode === \"pick-point\") {\n onPickPointRef.current?.({ latitude: lat, longitude: lng });\n setStatusAnnouncement(\n `Selected coordinates ${formatCoordinates(lat, lng)}.`,\n );\n }\n });\n\n const resizeObserver =\n typeof ResizeObserver !== \"undefined\"\n ? new ResizeObserver(() => {\n map.invalidateSize();\n })\n : null;\n resizeObserver?.observe(el);\n\n const timer = window.setTimeout(() => map.invalidateSize(), 100);\n\n return () => {\n window.clearTimeout(timer);\n resizeObserver?.disconnect();\n map.remove();\n mapRef.current = null;\n tileLayerRef.current = null;\n geofenceLayerRef.current = null;\n locationLayerRef.current = null;\n draftLayerRef.current = null;\n hasAutoFittedRef.current = false;\n };\n }, []);\n\n // Render stored geofences.\n useEffect(() => {\n const group = geofenceLayerRef.current;\n if (!group) return;\n group.clearLayers();\n\n if (!showGeofences) return;\n\n const mutedStroke = resolveCssToken(\"--color-text-muted\");\n const primaryStroke = resolveCssToken(\"--color-action-primary-bg\");\n\n validGeofences.forEach((fence, index) => {\n const isSelected = fence.id === selectedGeofenceId;\n const tokenColor = fence.isActive\n ? isSelected\n ? primaryStroke\n : resolveCssToken(zoneTokenForIndex(index))\n : mutedStroke;\n\n const circle = L.circle([fence.latitude, fence.longitude], {\n radius: fence.radius,\n color: tokenColor,\n fillColor: tokenColor,\n fillOpacity: isSelected ? 0.28 : fence.isActive ? 0.16 : 0.08,\n weight: isSelected ? 3 : 2,\n dashArray: fence.isActive ? undefined : \"6 6\",\n });\n\n circle.bindTooltip(`${fence.name} (${formatRadius(fence.radius)})`, {\n direction: \"top\",\n sticky: true,\n });\n circle.bindPopup(buildGeofencePopup(fence));\n circle.on(\"click\", () => {\n if (interactiveModeRef.current === \"view\") {\n onSelectGeofenceRef.current?.(fence.id);\n }\n });\n circle.addTo(group);\n\n const centerMarker = L.circleMarker([fence.latitude, fence.longitude], {\n radius: isSelected ? 6 : 4,\n color: resolveCssToken(\"--color-bg-surface\"),\n fillColor: tokenColor,\n fillOpacity: 1,\n weight: 2,\n });\n centerMarker.on(\"click\", () => {\n if (interactiveModeRef.current === \"view\") {\n onSelectGeofenceRef.current?.(fence.id);\n }\n });\n centerMarker.addTo(group);\n });\n }, [selectedGeofenceId, showGeofences, validGeofences]);\n\n // Render location history points and chronological path.\n useEffect(() => {\n const group = locationLayerRef.current;\n if (!group) return;\n group.clearLayers();\n\n if (validLocations.length === 0) return;\n\n const pathColor = resolveCssToken(\"--color-chart-2\");\n const geofencedColor = resolveCssToken(\"--color-action-primary-bg\");\n const manualColor = resolveCssToken(\"--color-chart-4\");\n const surfaceColor = resolveCssToken(\"--color-bg-surface\");\n\n if (showLocationPath && validLocations.length >= 2) {\n const latLngs: L.LatLngExpression[] = validLocations.map((entry) => [\n entry.latitude,\n entry.longitude,\n ]);\n L.polyline(latLngs, {\n color: pathColor,\n weight: 2.5,\n opacity: 0.75,\n dashArray: \"6 6\",\n }).addTo(group);\n }\n\n validLocations.forEach((entry, index) => {\n const isSelected = entry.id === selectedLocationId;\n const fillColor = entry.geofenceId ? geofencedColor : manualColor;\n\n if (\n isSelected &&\n typeof entry.accuracy === \"number\" &&\n Number.isFinite(entry.accuracy) &&\n entry.accuracy > 0\n ) {\n L.circle([entry.latitude, entry.longitude], {\n radius: Math.min(entry.accuracy, 2000),\n color: fillColor,\n fillColor,\n fillOpacity: 0.1,\n weight: 1,\n dashArray: \"4 4\",\n }).addTo(group);\n }\n\n const marker = L.circleMarker([entry.latitude, entry.longitude], {\n radius: isSelected ? 8 : 5.5,\n color: surfaceColor,\n fillColor,\n fillOpacity: 0.95,\n weight: isSelected ? 2.5 : 1.5,\n });\n\n marker.bindTooltip(\n `${index + 1}. ${entry.address?.trim() || formatCoordinates(entry.latitude, entry.longitude)}`,\n { direction: \"top\" },\n );\n marker.bindPopup(buildLocationPopup(entry, index));\n marker.on(\"click\", () => {\n onSelectLocationRef.current?.(entry.id);\n });\n marker.addTo(group);\n });\n }, [selectedLocationId, showLocationPath, validLocations]);\n\n // Render interactive draft geofence (draggable center + radius handle) or draft point.\n useEffect(() => {\n const group = draftLayerRef.current;\n if (!group) return;\n group.clearLayers();\n\n const primaryColor = resolveCssToken(\"--color-action-primary-bg\");\n\n if (draftGeofence && isValidGeofenceGeometry(draftGeofence)) {\n const draftCircle = L.circle(\n [draftGeofence.latitude, draftGeofence.longitude],\n {\n radius: draftGeofence.radius,\n color: primaryColor,\n fillColor: primaryColor,\n fillOpacity: 0.22,\n weight: 2.5,\n dashArray: \"8 5\",\n },\n ).addTo(group);\n\n const centerIcon = L.divIcon({\n className: \"tc-map-dot-marker\",\n html: '<div class=\"tc-map-dot-inner--draft\" title=\"Drag to move geofence center\"></div>',\n iconSize: [18, 18],\n iconAnchor: [9, 9],\n });\n\n const handlePosition = computeCircleHandlePosition(\n draftGeofence.latitude,\n draftGeofence.longitude,\n draftGeofence.radius,\n );\n\n const handleIcon = L.divIcon({\n className: \"tc-map-dot-marker\",\n html: '<div class=\"tc-map-radius-handle\" title=\"Drag to resize geofence radius\"></div>',\n iconSize: [16, 16],\n iconAnchor: [8, 8],\n });\n\n const centerMarker = L.marker(\n [draftGeofence.latitude, draftGeofence.longitude],\n {\n icon: centerIcon,\n draggable: true,\n zIndexOffset: 500,\n },\n ).addTo(group);\n\n const handleMarker = L.marker(handlePosition, {\n icon: handleIcon,\n draggable: true,\n zIndexOffset: 510,\n }).addTo(group);\n\n centerMarker.on(\"drag\", () => {\n const pos = centerMarker.getLatLng();\n const nextLat = roundCoordinate(pos.lat);\n const nextLng = roundCoordinate(pos.lng);\n draftCircle.setLatLng([nextLat, nextLng]);\n const currentRadius = clampGeofenceRadius(\n draftGeofenceRef.current?.radius ?? draftGeofence.radius,\n );\n handleMarker.setLatLng(\n computeCircleHandlePosition(nextLat, nextLng, currentRadius),\n );\n });\n\n centerMarker.on(\"dragend\", () => {\n const pos = centerMarker.getLatLng();\n const nextLat = roundCoordinate(pos.lat);\n const nextLng = roundCoordinate(pos.lng);\n const currentRadius = clampGeofenceRadius(\n draftGeofenceRef.current?.radius ?? draftGeofence.radius,\n );\n if (isValidCoordinate(nextLat, nextLng)) {\n onDraftGeofenceChangeRef.current?.({\n latitude: nextLat,\n longitude: nextLng,\n radius: currentRadius,\n });\n setStatusAnnouncement(\n `Moved geofence center to ${formatCoordinates(nextLat, nextLng)}.`,\n );\n }\n });\n\n handleMarker.on(\"drag\", () => {\n const handlePos = handleMarker.getLatLng();\n const centerPos = centerMarker.getLatLng();\n const nextRadius = clampGeofenceRadius(\n haversineDistanceMeters(\n centerPos.lat,\n centerPos.lng,\n handlePos.lat,\n handlePos.lng,\n ),\n );\n draftCircle.setRadius(nextRadius);\n });\n\n handleMarker.on(\"dragend\", () => {\n const handlePos = handleMarker.getLatLng();\n const centerPos = centerMarker.getLatLng();\n const nextRadius = clampGeofenceRadius(\n haversineDistanceMeters(\n centerPos.lat,\n centerPos.lng,\n handlePos.lat,\n handlePos.lng,\n ),\n );\n onDraftGeofenceChangeRef.current?.({\n latitude: roundCoordinate(centerPos.lat),\n longitude: roundCoordinate(centerPos.lng),\n radius: nextRadius,\n });\n setStatusAnnouncement(\n `Resized geofence radius to ${formatRadius(nextRadius)}.`,\n );\n });\n\n return;\n }\n\n if (\n draftPoint &&\n isValidCoordinate(draftPoint.latitude, draftPoint.longitude)\n ) {\n const pointIcon = L.divIcon({\n className: \"tc-map-dot-marker\",\n html: '<div class=\"tc-map-dot-inner--draft\" title=\"Drag to adjust location\"></div>',\n iconSize: [18, 18],\n iconAnchor: [9, 9],\n });\n const marker = L.marker([draftPoint.latitude, draftPoint.longitude], {\n icon: pointIcon,\n draggable: true,\n zIndexOffset: 500,\n }).addTo(group);\n\n marker.on(\"dragend\", () => {\n const pos = marker.getLatLng();\n const nextLat = roundCoordinate(pos.lat);\n const nextLng = roundCoordinate(pos.lng);\n if (isValidCoordinate(nextLat, nextLng)) {\n onPickPointRef.current?.({ latitude: nextLat, longitude: nextLng });\n setStatusAnnouncement(\n `Moved location marker to ${formatCoordinates(nextLat, nextLng)}.`,\n );\n }\n });\n }\n }, [draftGeofence, draftPoint]);\n\n // Fit bounds once when initial data arrives.\n useEffect(() => {\n if (hasAutoFittedRef.current) return;\n if (\n validGeofences.length > 0 ||\n validLocations.length > 0 ||\n (draftGeofence && isValidGeofenceGeometry(draftGeofence)) ||\n (draftPoint &&\n isValidCoordinate(draftPoint.latitude, draftPoint.longitude))\n ) {\n hasAutoFittedRef.current = true;\n fitAllFeatures(false);\n }\n }, [\n draftGeofence,\n draftPoint,\n fitAllFeatures,\n validGeofences,\n validLocations,\n ]);\n\n // Focus selected geofence smoothly when selection changes.\n useEffect(() => {\n const map = mapRef.current;\n if (!map || !selectedGeofenceId) return;\n const target = validGeofences.find((f) => f.id === selectedGeofenceId);\n if (!target) return;\n const edge = computeCircleHandlePosition(\n target.latitude,\n target.longitude,\n target.radius,\n );\n const bounds = L.latLngBounds([[target.latitude, target.longitude], edge]);\n map.fitBounds(bounds, { padding: [64, 64], maxZoom: 16 });\n }, [selectedGeofenceId, validGeofences]);\n\n // Focus selected location entry smoothly when selection changes.\n useEffect(() => {\n const map = mapRef.current;\n if (!map || !selectedLocationId) return;\n const target = validLocations.find((e) => e.id === selectedLocationId);\n if (!target) return;\n map.setView(\n [target.latitude, target.longitude],\n Math.max(map.getZoom(), 15),\n );\n }, [selectedLocationId, validLocations]);\n\n const handleZoomIn = () => {\n mapRef.current?.zoomIn();\n setStatusAnnouncement(\"Zoomed in.\");\n };\n\n const handleZoomOut = () => {\n mapRef.current?.zoomOut();\n setStatusAnnouncement(\"Zoomed out.\");\n };\n\n const handleRetryTiles = () => {\n tileStatsRef.current = { loaded: 0, errors: 0 };\n setTileDegraded(false);\n tileLayerRef.current?.redraw();\n setStatusAnnouncement(\"Retrying map tiles.\");\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n const map = mapRef.current;\n if (!map) return;\n const PAN_PX = 80;\n switch (event.key) {\n case \"ArrowUp\":\n event.preventDefault();\n map.panBy([0, -PAN_PX]);\n break;\n case \"ArrowDown\":\n event.preventDefault();\n map.panBy([0, PAN_PX]);\n break;\n case \"ArrowLeft\":\n event.preventDefault();\n map.panBy([-PAN_PX, 0]);\n break;\n case \"ArrowRight\":\n event.preventDefault();\n map.panBy([PAN_PX, 0]);\n break;\n case \"+\":\n case \"=\":\n event.preventDefault();\n handleZoomIn();\n break;\n case \"-\":\n case \"_\":\n event.preventDefault();\n handleZoomOut();\n break;\n case \"0\":\n event.preventDefault();\n fitAllFeatures();\n break;\n default:\n break;\n }\n };\n\n const activeCoordsLabel = cursorCoords\n ? formatCoordinates(cursorCoords.latitude, cursorCoords.longitude)\n : draftGeofence && isValidGeofenceGeometry(draftGeofence)\n ? `${formatCoordinates(draftGeofence.latitude, draftGeofence.longitude)} · ${formatRadius(draftGeofence.radius)}`\n : draftPoint &&\n isValidCoordinate(draftPoint.latitude, draftPoint.longitude)\n ? formatCoordinates(draftPoint.latitude, draftPoint.longitude)\n : null;\n\n return (\n <div\n data-testid={testId}\n className={cn(\n \"relative w-full min-w-0 overflow-hidden rounded-xl border border-border-seam bg-bg-sunken\",\n className,\n )}\n >\n {tileDegraded && (\n <div\n role=\"status\"\n data-testid=\"map-tile-error-banner\"\n className=\"flex flex-wrap items-center justify-between gap-2 border-b border-border-subtle bg-status-warning-bg px-3 py-2 text-xs text-text-primary\"\n >\n <span className=\"flex items-center gap-2 font-medium\">\n <WifiOff className=\"h-3.5 w-3.5 shrink-0\" />\n Map tiles could not be loaded. Coordinate placement, geofence\n overlays, and controls remain available.\n </span>\n <button\n type=\"button\"\n onClick={handleRetryTiles}\n className=\"inline-flex items-center gap-1 rounded-md border border-border-default bg-bg-surface px-2 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus\"\n >\n <RefreshCw className=\"h-3 w-3\" />\n Retry tiles\n </button>\n </div>\n )}\n\n {malformedCount > 0 && (\n <div\n role=\"status\"\n data-testid=\"map-malformed-geometry-banner\"\n className=\"flex items-center gap-2 border-b border-border-subtle bg-status-warning-bg px-3 py-2 text-xs text-text-primary\"\n >\n <AlertTriangle className=\"h-3.5 w-3.5 shrink-0\" />\n <span>\n Skipped {malformedCount} record{malformedCount === 1 ? \"\" : \"s\"}{\" \"}\n with invalid coordinates or radius.\n </span>\n </div>\n )}\n\n <div\n role=\"region\"\n aria-label={ariaLabel}\n tabIndex={0}\n onKeyDown={handleKeyDown}\n className={cn(\n \"tc-map-canvas relative w-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-focus\",\n heightClassName,\n interactiveMode !== \"view\" && \"cursor-crosshair\",\n )}\n >\n <div\n ref={containerRef}\n className=\"h-full w-full\"\n data-testid={`${testId}-canvas`}\n />\n\n {/* Interactive mode helper badge */}\n {interactiveMode !== \"view\" && (\n <div className=\"pointer-events-none absolute start-3 top-3 z-[420] max-w-[calc(100%-5rem)] rounded-lg border border-border-default bg-bg-surface/95 px-3 py-1.5 text-xs font-medium text-text-primary shadow-sm backdrop-blur-sm\">\n {interactiveMode === \"place-geofence\"\n ? \"Click on the map to place the geofence center, then drag the pin or outer handle to adjust.\"\n : \"Click on the map to place or move the location pin.\"}\n </div>\n )}\n\n {/* Accessible zoom and fit controls */}\n <div\n className=\"absolute end-3 top-3 z-[420] flex flex-col overflow-hidden rounded-lg border border-border-default bg-bg-surface/95 shadow-sm backdrop-blur-sm\"\n role=\"group\"\n aria-label=\"Map navigation controls\"\n >\n <button\n type=\"button\"\n onClick={handleZoomIn}\n aria-label=\"Zoom in\"\n title=\"Zoom in (+)\"\n className=\"flex h-8 w-8 items-center justify-center border-b border-border-subtle text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-focus\"\n >\n <Plus className=\"h-4 w-4\" />\n </button>\n <button\n type=\"button\"\n onClick={handleZoomOut}\n aria-label=\"Zoom out\"\n title=\"Zoom out (-)\"\n className=\"flex h-8 w-8 items-center justify-center border-b border-border-subtle text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-focus\"\n >\n <Minus className=\"h-4 w-4\" />\n </button>\n <button\n type=\"button\"\n onClick={() => fitAllFeatures(true)}\n aria-label=\"Fit map to zones and points\"\n title=\"Fit all (0)\"\n className=\"flex h-8 w-8 items-center justify-center text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-focus\"\n >\n <Crosshair className=\"h-4 w-4\" />\n </button>\n </div>\n\n {/* Coordinate readout pill */}\n {activeCoordsLabel && (\n <div\n data-testid=\"map-coordinates-readout\"\n className=\"pointer-events-none absolute bottom-3 start-3 z-[420] rounded-md border border-border-subtle bg-bg-surface/90 px-2.5 py-1 font-mono text-[11px] text-text-secondary backdrop-blur-sm\"\n >\n {activeCoordsLabel}\n </div>\n )}\n\n <div className=\"sr-only\" aria-live=\"polite\">\n {statusAnnouncement}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAqGA,IAAMC,KAAe,sDACfC,KAAkB;AAExB,SAASC,GAAmB,GAAqC;CAC/D,IAAMC,IAAO,SAAS,cAAc,KAAK,GACnCC,IAAQ,SAAS,cAAc,KAAK;CAG1C,AAFA,EAAM,MAA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IAAD,EAAW,WAAU,UAAW,CAAA;OAC1B,CAAA;MACL;;KAGJX,KACC,kBAAC,OAAD;MACE,eAAY;MACZ,WAAU;MAET,UAAAA;KACE,CAAA;KAGP,kBAAC,OAAD;MAAK,WAAU;MAAU,aAAU;MAChC,UAAA1F;KACE,CAAA;IACF;;EACF;;AAET"}
1
+ {"version":3,"file":"LocationGeofenceMap.js","names":["L","OSM_TILE_URL","OSM_ATTRIBUTION","buildGeofencePopup","wrap","title","fence","meta","statusText","formatRadius","addr","coords","formatCoordinates","buildLocationPopup","index","entry","sourceLabel","startDate","LocationGeofenceMap","containerRef","useRef","mapRef","tileLayerRef","geofenceLayerRef","locationLayerRef","draftLayerRef","hasAutoFittedRef","tileStatsRef","tileDegraded","setTileDegraded","useState","statusAnnouncement","setStatusAnnouncement","cursorCoords","setCursorCoords","onSelectGeofenceRef","onSelectGeofence","onSelectLocationRef","onSelectLocation","onDraftGeofenceChangeRef","onDraftGeofenceChange","onPickPointRef","onPickPoint","interactiveModeRef","interactiveMode","draftGeofenceRef","draftGeofence","validGeofences","invalidGeofences","useMemo","partitionValidGeofences","geofences","validLocations","invalidLocations","partitionValidLocationEntries","locationEntries","malformedCount","fitAllFeatures","useCallback","map","bounds","showGeofences","edge","computeCircleHandlePosition","isValidGeofenceGeometry","draftPoint","isValidCoordinate","announce","DEFAULT_MAP_CENTER","useEffect","el","tileLayer","roundCoordinate","event","mode","lat","lng","radius","clampGeofenceRadius","resizeObserver","timer","group","mutedStroke","resolveCssToken","primaryStroke","isSelected","selectedGeofenceId","tokenColor","zoneTokenForIndex","circle","centerMarker","pathColor","geofencedColor","manualColor","surfaceColor","showLocationPath","latLngs","selectedLocationId","fillColor","marker","primaryColor","draftCircle","centerIcon","handlePosition","handleIcon","handleMarker","pos","nextLat","nextLng","currentRadius","handlePos","centerPos","nextRadius","haversineDistanceMeters","pointIcon","target","f","handleZoomIn","handleZoomOut","handleRetryTiles","handleKeyDown","activeCoordsLabel","testId","cn","className","WifiOff","RefreshCw","AlertTriangle","ariaLabel","heightClassName","Plus","Minus","Crosshair"],"sources":["../../../../src/timecampus/components/maps/LocationGeofenceMap.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type KeyboardEvent,\n} from \"react\";\nimport L from \"leaflet\";\nimport {\n AlertTriangle,\n Crosshair,\n Minus,\n Plus,\n RefreshCw,\n WifiOff,\n} from \"lucide-react\";\nimport { cn } from \"../../utils/helpers\";\nimport {\n DEFAULT_GEOFENCE_RADIUS_METERS,\n DEFAULT_MAP_CENTER,\n DEFAULT_MAP_ZOOM,\n clampGeofenceRadius,\n computeCircleHandlePosition,\n formatCoordinates,\n formatRadius,\n haversineDistanceMeters,\n isValidCoordinate,\n isValidGeofenceGeometry,\n partitionValidGeofences,\n partitionValidLocationEntries,\n roundCoordinate,\n} from \"./locationGeometry\";\nimport {\n ensureLeafletStyles,\n resolveCssToken,\n zoneTokenForIndex,\n} from \"./mapTheme\";\n\nexport interface MapGeofenceItem {\n id: string;\n name: string;\n latitude: number;\n longitude: number;\n radius: number;\n isActive: boolean;\n trigger?: string | null;\n address?: string | null;\n eventsCount?: number;\n}\n\nexport interface MapLocationEntryItem {\n id: string;\n latitude: number;\n longitude: number;\n address?: string | null;\n startTime: string;\n endTime?: string | null;\n duration?: number | null;\n accuracy?: number | null;\n geofenceId?: string | null;\n}\n\nexport interface DraftGeofenceState {\n latitude: number;\n longitude: number;\n radius: number;\n name?: string;\n}\n\nexport interface DraftPointState {\n latitude: number;\n longitude: number;\n}\n\nexport type MapInteractiveMode = \"view\" | \"place-geofence\" | \"pick-point\";\n\nexport interface LocationGeofenceMapProps {\n geofences?: readonly MapGeofenceItem[];\n locationEntries?: readonly MapLocationEntryItem[];\n selectedGeofenceId?: string | null;\n selectedLocationId?: string | null;\n onSelectGeofence?: (id: string) => void;\n onSelectLocation?: (id: string) => void;\n draftGeofence?: DraftGeofenceState | null;\n draftPoint?: DraftPointState | null;\n interactiveMode?: MapInteractiveMode;\n onDraftGeofenceChange?: (next: {\n latitude: number;\n longitude: number;\n radius: number;\n }) => void;\n onPickPoint?: (coords: { latitude: number; longitude: number }) => void;\n showGeofences?: boolean;\n showLocationPath?: boolean;\n heightClassName?: string;\n ariaLabel?: string;\n testId?: string;\n className?: string;\n}\n\nconst OSM_TILE_URL = \"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\";\nconst OSM_ATTRIBUTION = \"&copy; OpenStreetMap contributors\";\n\nfunction buildGeofencePopup(fence: MapGeofenceItem): HTMLElement {\n const wrap = document.createElement(\"div\");\n const title = document.createElement(\"div\");\n title.style.fontWeight = \"600\";\n title.textContent = fence.name;\n wrap.appendChild(title);\n\n const meta = document.createElement(\"div\");\n meta.style.marginTop = \"2px\";\n meta.style.opacity = \"0.85\";\n const statusText = fence.isActive ? \"Active\" : \"Inactive\";\n meta.textContent = `${formatRadius(fence.radius)} radius · ${statusText}`;\n wrap.appendChild(meta);\n\n if (fence.address) {\n const addr = document.createElement(\"div\");\n addr.style.marginTop = \"2px\";\n addr.textContent = fence.address;\n wrap.appendChild(addr);\n }\n\n const coords = document.createElement(\"div\");\n coords.style.marginTop = \"4px\";\n coords.style.fontSize = \"11px\";\n coords.style.opacity = \"0.75\";\n coords.textContent = formatCoordinates(fence.latitude, fence.longitude);\n wrap.appendChild(coords);\n\n return wrap;\n}\n\nfunction buildLocationPopup(\n entry: MapLocationEntryItem,\n index: number,\n): HTMLElement {\n const wrap = document.createElement(\"div\");\n const title = document.createElement(\"div\");\n title.style.fontWeight = \"600\";\n title.textContent = `${index + 1}. ${entry.address?.trim() || \"Tracked location\"}`;\n wrap.appendChild(title);\n\n const meta = document.createElement(\"div\");\n meta.style.marginTop = \"2px\";\n meta.style.opacity = \"0.85\";\n const sourceLabel = entry.geofenceId ? \"Geofenced\" : \"Manual\";\n const startDate = new Date(entry.startTime);\n const timeText = Number.isFinite(startDate.getTime())\n ? startDate.toLocaleString()\n : entry.startTime;\n meta.textContent = `${sourceLabel} · ${timeText}`;\n wrap.appendChild(meta);\n\n const coords = document.createElement(\"div\");\n coords.style.marginTop = \"4px\";\n coords.style.fontSize = \"11px\";\n coords.style.opacity = \"0.75\";\n coords.textContent = formatCoordinates(entry.latitude, entry.longitude);\n wrap.appendChild(coords);\n\n return wrap;\n}\n\nexport function LocationGeofenceMap({\n geofences = [],\n locationEntries = [],\n selectedGeofenceId = null,\n selectedLocationId = null,\n onSelectGeofence,\n onSelectLocation,\n draftGeofence = null,\n draftPoint = null,\n interactiveMode = \"view\",\n onDraftGeofenceChange,\n onPickPoint,\n showGeofences = true,\n showLocationPath = true,\n heightClassName = \"h-[320px] sm:h-[420px] lg:h-[520px]\",\n ariaLabel = \"Interactive location and geofence map\",\n testId = \"location-geofence-map\",\n className,\n}: LocationGeofenceMapProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const mapRef = useRef<L.Map | null>(null);\n const tileLayerRef = useRef<L.TileLayer | null>(null);\n const geofenceLayerRef = useRef<L.LayerGroup | null>(null);\n const locationLayerRef = useRef<L.LayerGroup | null>(null);\n const draftLayerRef = useRef<L.LayerGroup | null>(null);\n const hasAutoFittedRef = useRef(false);\n const tileStatsRef = useRef({ loaded: 0, errors: 0 });\n\n const [tileDegraded, setTileDegraded] = useState(false);\n const [statusAnnouncement, setStatusAnnouncement] = useState(\"\");\n const [cursorCoords, setCursorCoords] = useState<{\n latitude: number;\n longitude: number;\n } | null>(null);\n\n const onSelectGeofenceRef = useRef(onSelectGeofence);\n const onSelectLocationRef = useRef(onSelectLocation);\n const onDraftGeofenceChangeRef = useRef(onDraftGeofenceChange);\n const onPickPointRef = useRef(onPickPoint);\n const interactiveModeRef = useRef(interactiveMode);\n const draftGeofenceRef = useRef(draftGeofence);\n\n useEffect(() => {\n onSelectGeofenceRef.current = onSelectGeofence;\n onSelectLocationRef.current = onSelectLocation;\n onDraftGeofenceChangeRef.current = onDraftGeofenceChange;\n onPickPointRef.current = onPickPoint;\n interactiveModeRef.current = interactiveMode;\n draftGeofenceRef.current = draftGeofence;\n }, [\n onSelectGeofence,\n onSelectLocation,\n onDraftGeofenceChange,\n onPickPoint,\n interactiveMode,\n draftGeofence,\n ]);\n\n const { valid: validGeofences, invalid: invalidGeofences } = useMemo(\n () => partitionValidGeofences(geofences),\n [geofences],\n );\n\n const { valid: validLocations, invalid: invalidLocations } = useMemo(\n () => partitionValidLocationEntries(locationEntries),\n [locationEntries],\n );\n\n const malformedCount = invalidGeofences.length + invalidLocations.length;\n\n const fitAllFeatures = useCallback(\n (announce = true) => {\n const map = mapRef.current;\n if (!map) return;\n\n const bounds = L.latLngBounds([]);\n if (showGeofences) {\n for (const fence of validGeofences) {\n const edge = computeCircleHandlePosition(\n fence.latitude,\n fence.longitude,\n fence.radius,\n );\n bounds.extend([fence.latitude, fence.longitude]);\n bounds.extend(edge);\n }\n }\n for (const entry of validLocations) {\n bounds.extend([entry.latitude, entry.longitude]);\n }\n if (draftGeofence && isValidGeofenceGeometry(draftGeofence)) {\n bounds.extend([draftGeofence.latitude, draftGeofence.longitude]);\n bounds.extend(\n computeCircleHandlePosition(\n draftGeofence.latitude,\n draftGeofence.longitude,\n draftGeofence.radius,\n ),\n );\n }\n if (\n draftPoint &&\n isValidCoordinate(draftPoint.latitude, draftPoint.longitude)\n ) {\n bounds.extend([draftPoint.latitude, draftPoint.longitude]);\n }\n\n if (bounds.isValid()) {\n map.fitBounds(bounds, { padding: [40, 40], maxZoom: 16 });\n if (announce) {\n setStatusAnnouncement(\"Map fitted to visible zones and locations.\");\n }\n } else {\n map.setView(\n [DEFAULT_MAP_CENTER[0], DEFAULT_MAP_CENTER[1]],\n DEFAULT_MAP_ZOOM,\n );\n if (announce) {\n setStatusAnnouncement(\"Map reset to default view.\");\n }\n }\n },\n [draftGeofence, draftPoint, showGeofences, validGeofences, validLocations],\n );\n\n // Initialize Leaflet instance once on mount.\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return undefined;\n\n ensureLeafletStyles();\n\n const map = L.map(el, {\n center: [DEFAULT_MAP_CENTER[0], DEFAULT_MAP_CENTER[1]],\n zoom: DEFAULT_MAP_ZOOM,\n zoomControl: false,\n scrollWheelZoom: true,\n keyboard: false,\n });\n mapRef.current = map;\n\n const tileLayer = L.tileLayer(OSM_TILE_URL, {\n attribution: OSM_ATTRIBUTION,\n maxZoom: 19,\n crossOrigin: true,\n });\n\n tileLayer.on(\"tileload\", () => {\n tileStatsRef.current.loaded += 1;\n setTileDegraded(false);\n });\n\n tileLayer.on(\"tileerror\", () => {\n tileStatsRef.current.errors += 1;\n if (\n tileStatsRef.current.loaded === 0 ||\n tileStatsRef.current.errors >= 3\n ) {\n setTileDegraded(true);\n }\n });\n\n tileLayer.addTo(map);\n tileLayerRef.current = tileLayer;\n L.control.scale({ imperial: false, position: \"bottomright\" }).addTo(map);\n\n geofenceLayerRef.current = L.layerGroup().addTo(map);\n locationLayerRef.current = L.layerGroup().addTo(map);\n draftLayerRef.current = L.layerGroup().addTo(map);\n\n map.on(\"mousemove\", (event: L.LeafletMouseEvent) => {\n setCursorCoords({\n latitude: roundCoordinate(event.latlng.lat),\n longitude: roundCoordinate(event.latlng.lng),\n });\n });\n\n map.on(\"mouseout\", () => {\n setCursorCoords(null);\n });\n\n map.on(\"click\", (event: L.LeafletMouseEvent) => {\n const mode = interactiveModeRef.current;\n const lat = roundCoordinate(event.latlng.lat);\n const lng = roundCoordinate(event.latlng.lng);\n if (!isValidCoordinate(lat, lng)) return;\n\n if (mode === \"place-geofence\") {\n const radius = clampGeofenceRadius(\n draftGeofenceRef.current?.radius ?? DEFAULT_GEOFENCE_RADIUS_METERS,\n );\n onDraftGeofenceChangeRef.current?.({\n latitude: lat,\n longitude: lng,\n radius,\n });\n setStatusAnnouncement(\n `Placed geofence center at ${formatCoordinates(lat, lng)} with ${formatRadius(radius)} radius.`,\n );\n } else if (mode === \"pick-point\") {\n onPickPointRef.current?.({ latitude: lat, longitude: lng });\n setStatusAnnouncement(\n `Selected coordinates ${formatCoordinates(lat, lng)}.`,\n );\n }\n });\n\n const resizeObserver =\n typeof ResizeObserver !== \"undefined\"\n ? new ResizeObserver(() => {\n map.invalidateSize();\n })\n : null;\n resizeObserver?.observe(el);\n\n const timer = window.setTimeout(() => map.invalidateSize(), 100);\n\n return () => {\n window.clearTimeout(timer);\n resizeObserver?.disconnect();\n map.remove();\n mapRef.current = null;\n tileLayerRef.current = null;\n geofenceLayerRef.current = null;\n locationLayerRef.current = null;\n draftLayerRef.current = null;\n hasAutoFittedRef.current = false;\n };\n }, []);\n\n // Render stored geofences.\n useEffect(() => {\n const group = geofenceLayerRef.current;\n if (!group) return;\n group.clearLayers();\n\n if (!showGeofences) return;\n\n const mutedStroke = resolveCssToken(\"--color-text-muted\");\n const primaryStroke = resolveCssToken(\"--color-action-primary-bg\");\n\n validGeofences.forEach((fence, index) => {\n const isSelected = fence.id === selectedGeofenceId;\n const tokenColor = fence.isActive\n ? isSelected\n ? primaryStroke\n : resolveCssToken(zoneTokenForIndex(index))\n : mutedStroke;\n\n const circle = L.circle([fence.latitude, fence.longitude], {\n radius: fence.radius,\n color: tokenColor,\n fillColor: tokenColor,\n fillOpacity: isSelected ? 0.28 : fence.isActive ? 0.16 : 0.08,\n weight: isSelected ? 3 : 2,\n dashArray: fence.isActive ? undefined : \"6 6\",\n });\n\n circle.bindTooltip(`${fence.name} (${formatRadius(fence.radius)})`, {\n direction: \"top\",\n sticky: true,\n });\n circle.bindPopup(buildGeofencePopup(fence));\n circle.on(\"click\", () => {\n if (interactiveModeRef.current === \"view\") {\n onSelectGeofenceRef.current?.(fence.id);\n }\n });\n circle.addTo(group);\n\n const centerMarker = L.circleMarker([fence.latitude, fence.longitude], {\n radius: isSelected ? 6 : 4,\n color: resolveCssToken(\"--color-bg-surface\"),\n fillColor: tokenColor,\n fillOpacity: 1,\n weight: 2,\n });\n centerMarker.on(\"click\", () => {\n if (interactiveModeRef.current === \"view\") {\n onSelectGeofenceRef.current?.(fence.id);\n }\n });\n centerMarker.addTo(group);\n });\n }, [selectedGeofenceId, showGeofences, validGeofences]);\n\n // Render location history points and chronological path.\n useEffect(() => {\n const group = locationLayerRef.current;\n if (!group) return;\n group.clearLayers();\n\n if (validLocations.length === 0) return;\n\n const pathColor = resolveCssToken(\"--color-chart-2\");\n const geofencedColor = resolveCssToken(\"--color-action-primary-bg\");\n const manualColor = resolveCssToken(\"--color-chart-4\");\n const surfaceColor = resolveCssToken(\"--color-bg-surface\");\n\n if (showLocationPath && validLocations.length >= 2) {\n const latLngs: L.LatLngExpression[] = validLocations.map((entry) => [\n entry.latitude,\n entry.longitude,\n ]);\n L.polyline(latLngs, {\n color: pathColor,\n weight: 2.5,\n opacity: 0.75,\n dashArray: \"6 6\",\n }).addTo(group);\n }\n\n validLocations.forEach((entry, index) => {\n const isSelected = entry.id === selectedLocationId;\n const fillColor = entry.geofenceId ? geofencedColor : manualColor;\n\n if (\n isSelected &&\n typeof entry.accuracy === \"number\" &&\n Number.isFinite(entry.accuracy) &&\n entry.accuracy > 0\n ) {\n L.circle([entry.latitude, entry.longitude], {\n radius: Math.min(entry.accuracy, 2000),\n color: fillColor,\n fillColor,\n fillOpacity: 0.1,\n weight: 1,\n dashArray: \"4 4\",\n }).addTo(group);\n }\n\n const marker = L.circleMarker([entry.latitude, entry.longitude], {\n radius: isSelected ? 8 : 5.5,\n color: surfaceColor,\n fillColor,\n fillOpacity: 0.95,\n weight: isSelected ? 2.5 : 1.5,\n });\n\n marker.bindTooltip(\n `${index + 1}. ${entry.address?.trim() || formatCoordinates(entry.latitude, entry.longitude)}`,\n { direction: \"top\" },\n );\n marker.bindPopup(buildLocationPopup(entry, index));\n marker.on(\"click\", () => {\n onSelectLocationRef.current?.(entry.id);\n });\n marker.addTo(group);\n });\n }, [selectedLocationId, showLocationPath, validLocations]);\n\n // Render interactive draft geofence (draggable center + radius handle) or draft point.\n useEffect(() => {\n const group = draftLayerRef.current;\n if (!group) return;\n group.clearLayers();\n\n const primaryColor = resolveCssToken(\"--color-action-primary-bg\");\n\n if (draftGeofence && isValidGeofenceGeometry(draftGeofence)) {\n const draftCircle = L.circle(\n [draftGeofence.latitude, draftGeofence.longitude],\n {\n radius: draftGeofence.radius,\n color: primaryColor,\n fillColor: primaryColor,\n fillOpacity: 0.22,\n weight: 2.5,\n dashArray: \"8 5\",\n },\n ).addTo(group);\n\n const centerIcon = L.divIcon({\n className: \"tc-map-dot-marker\",\n html: '<div class=\"tc-map-dot-inner--draft\" title=\"Drag to move geofence center\"></div>',\n iconSize: [18, 18],\n iconAnchor: [9, 9],\n });\n\n const handlePosition = computeCircleHandlePosition(\n draftGeofence.latitude,\n draftGeofence.longitude,\n draftGeofence.radius,\n );\n\n const handleIcon = L.divIcon({\n className: \"tc-map-dot-marker\",\n html: '<div class=\"tc-map-radius-handle\" title=\"Drag to resize geofence radius\"></div>',\n iconSize: [16, 16],\n iconAnchor: [8, 8],\n });\n\n const centerMarker = L.marker(\n [draftGeofence.latitude, draftGeofence.longitude],\n {\n icon: centerIcon,\n draggable: true,\n zIndexOffset: 500,\n },\n ).addTo(group);\n\n const handleMarker = L.marker(handlePosition, {\n icon: handleIcon,\n draggable: true,\n zIndexOffset: 510,\n }).addTo(group);\n\n centerMarker.on(\"drag\", () => {\n const pos = centerMarker.getLatLng();\n const nextLat = roundCoordinate(pos.lat);\n const nextLng = roundCoordinate(pos.lng);\n draftCircle.setLatLng([nextLat, nextLng]);\n const currentRadius = clampGeofenceRadius(\n draftGeofenceRef.current?.radius ?? draftGeofence.radius,\n );\n handleMarker.setLatLng(\n computeCircleHandlePosition(nextLat, nextLng, currentRadius),\n );\n });\n\n centerMarker.on(\"dragend\", () => {\n const pos = centerMarker.getLatLng();\n const nextLat = roundCoordinate(pos.lat);\n const nextLng = roundCoordinate(pos.lng);\n const currentRadius = clampGeofenceRadius(\n draftGeofenceRef.current?.radius ?? draftGeofence.radius,\n );\n if (isValidCoordinate(nextLat, nextLng)) {\n onDraftGeofenceChangeRef.current?.({\n latitude: nextLat,\n longitude: nextLng,\n radius: currentRadius,\n });\n setStatusAnnouncement(\n `Moved geofence center to ${formatCoordinates(nextLat, nextLng)}.`,\n );\n }\n });\n\n handleMarker.on(\"drag\", () => {\n const handlePos = handleMarker.getLatLng();\n const centerPos = centerMarker.getLatLng();\n const nextRadius = clampGeofenceRadius(\n haversineDistanceMeters(\n centerPos.lat,\n centerPos.lng,\n handlePos.lat,\n handlePos.lng,\n ),\n );\n draftCircle.setRadius(nextRadius);\n });\n\n handleMarker.on(\"dragend\", () => {\n const handlePos = handleMarker.getLatLng();\n const centerPos = centerMarker.getLatLng();\n const nextRadius = clampGeofenceRadius(\n haversineDistanceMeters(\n centerPos.lat,\n centerPos.lng,\n handlePos.lat,\n handlePos.lng,\n ),\n );\n onDraftGeofenceChangeRef.current?.({\n latitude: roundCoordinate(centerPos.lat),\n longitude: roundCoordinate(centerPos.lng),\n radius: nextRadius,\n });\n setStatusAnnouncement(\n `Resized geofence radius to ${formatRadius(nextRadius)}.`,\n );\n });\n\n return;\n }\n\n if (\n draftPoint &&\n isValidCoordinate(draftPoint.latitude, draftPoint.longitude)\n ) {\n const pointIcon = L.divIcon({\n className: \"tc-map-dot-marker\",\n html: '<div class=\"tc-map-dot-inner--draft\" title=\"Drag to adjust location\"></div>',\n iconSize: [18, 18],\n iconAnchor: [9, 9],\n });\n const marker = L.marker([draftPoint.latitude, draftPoint.longitude], {\n icon: pointIcon,\n draggable: true,\n zIndexOffset: 500,\n }).addTo(group);\n\n marker.on(\"dragend\", () => {\n const pos = marker.getLatLng();\n const nextLat = roundCoordinate(pos.lat);\n const nextLng = roundCoordinate(pos.lng);\n if (isValidCoordinate(nextLat, nextLng)) {\n onPickPointRef.current?.({ latitude: nextLat, longitude: nextLng });\n setStatusAnnouncement(\n `Moved location marker to ${formatCoordinates(nextLat, nextLng)}.`,\n );\n }\n });\n }\n }, [draftGeofence, draftPoint]);\n\n // Fit bounds once when initial data arrives.\n useEffect(() => {\n if (hasAutoFittedRef.current) return;\n if (\n validGeofences.length > 0 ||\n validLocations.length > 0 ||\n (draftGeofence && isValidGeofenceGeometry(draftGeofence)) ||\n (draftPoint &&\n isValidCoordinate(draftPoint.latitude, draftPoint.longitude))\n ) {\n hasAutoFittedRef.current = true;\n fitAllFeatures(false);\n }\n }, [\n draftGeofence,\n draftPoint,\n fitAllFeatures,\n validGeofences,\n validLocations,\n ]);\n\n // Focus selected geofence smoothly when selection changes.\n useEffect(() => {\n const map = mapRef.current;\n if (!map || !selectedGeofenceId) return;\n const target = validGeofences.find((f) => f.id === selectedGeofenceId);\n if (!target) return;\n const edge = computeCircleHandlePosition(\n target.latitude,\n target.longitude,\n target.radius,\n );\n const bounds = L.latLngBounds([[target.latitude, target.longitude], edge]);\n map.fitBounds(bounds, { padding: [64, 64], maxZoom: 16 });\n }, [selectedGeofenceId, validGeofences]);\n\n // Focus selected location entry smoothly when selection changes.\n useEffect(() => {\n const map = mapRef.current;\n if (!map || !selectedLocationId) return;\n const target = validLocations.find((e) => e.id === selectedLocationId);\n if (!target) return;\n map.setView(\n [target.latitude, target.longitude],\n Math.max(map.getZoom(), 15),\n );\n }, [selectedLocationId, validLocations]);\n\n const handleZoomIn = () => {\n mapRef.current?.zoomIn();\n setStatusAnnouncement(\"Zoomed in.\");\n };\n\n const handleZoomOut = () => {\n mapRef.current?.zoomOut();\n setStatusAnnouncement(\"Zoomed out.\");\n };\n\n const handleRetryTiles = () => {\n tileStatsRef.current = { loaded: 0, errors: 0 };\n setTileDegraded(false);\n tileLayerRef.current?.redraw();\n setStatusAnnouncement(\"Retrying map tiles.\");\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n const map = mapRef.current;\n if (!map) return;\n const PAN_PX = 80;\n switch (event.key) {\n case \"ArrowUp\":\n event.preventDefault();\n map.panBy([0, -PAN_PX]);\n break;\n case \"ArrowDown\":\n event.preventDefault();\n map.panBy([0, PAN_PX]);\n break;\n case \"ArrowLeft\":\n event.preventDefault();\n map.panBy([-PAN_PX, 0]);\n break;\n case \"ArrowRight\":\n event.preventDefault();\n map.panBy([PAN_PX, 0]);\n break;\n case \"+\":\n case \"=\":\n event.preventDefault();\n handleZoomIn();\n break;\n case \"-\":\n case \"_\":\n event.preventDefault();\n handleZoomOut();\n break;\n case \"0\":\n event.preventDefault();\n fitAllFeatures();\n break;\n default:\n break;\n }\n };\n\n const activeCoordsLabel = cursorCoords\n ? formatCoordinates(cursorCoords.latitude, cursorCoords.longitude)\n : draftGeofence && isValidGeofenceGeometry(draftGeofence)\n ? `${formatCoordinates(draftGeofence.latitude, draftGeofence.longitude)} · ${formatRadius(draftGeofence.radius)}`\n : draftPoint &&\n isValidCoordinate(draftPoint.latitude, draftPoint.longitude)\n ? formatCoordinates(draftPoint.latitude, draftPoint.longitude)\n : null;\n\n return (\n <div\n data-testid={testId}\n className={cn(\n \"relative w-full min-w-0 overflow-hidden rounded-xl border border-border-seam bg-bg-sunken\",\n className,\n )}\n >\n {tileDegraded && (\n <div\n role=\"status\"\n data-testid=\"map-tile-error-banner\"\n className=\"flex flex-wrap items-center justify-between gap-2 border-b border-border-subtle bg-status-warning-bgSubtle px-3 py-2 text-xs text-text-primary\"\n >\n <span className=\"flex items-center gap-2 font-medium\">\n <WifiOff className=\"h-3.5 w-3.5 shrink-0\" />\n Map tiles could not be loaded. Coordinate placement, geofence\n overlays, and controls remain available.\n </span>\n <button\n type=\"button\"\n onClick={handleRetryTiles}\n className=\"inline-flex items-center gap-1 rounded-md border border-border-default bg-bg-surface px-2 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus\"\n >\n <RefreshCw className=\"h-3 w-3\" />\n Retry tiles\n </button>\n </div>\n )}\n\n {malformedCount > 0 && (\n <div\n role=\"status\"\n data-testid=\"map-malformed-geometry-banner\"\n className=\"flex items-center gap-2 border-b border-border-subtle bg-status-warning-bgSubtle px-3 py-2 text-xs text-text-primary\"\n >\n <AlertTriangle className=\"h-3.5 w-3.5 shrink-0\" />\n <span>\n Skipped {malformedCount} record{malformedCount === 1 ? \"\" : \"s\"}{\" \"}\n with invalid coordinates or radius.\n </span>\n </div>\n )}\n\n <div\n role=\"region\"\n aria-label={ariaLabel}\n tabIndex={0}\n onKeyDown={handleKeyDown}\n className={cn(\n \"tc-map-canvas relative w-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-focus\",\n heightClassName,\n interactiveMode !== \"view\" && \"cursor-crosshair\",\n )}\n >\n <div\n ref={containerRef}\n className=\"h-full w-full\"\n data-testid={`${testId}-canvas`}\n />\n\n {/* Interactive mode helper badge */}\n {interactiveMode !== \"view\" && (\n <div className=\"pointer-events-none absolute start-3 top-3 z-[420] max-w-[calc(100%-5rem)] rounded-lg border border-border-default bg-bg-surface/95 px-3 py-1.5 text-xs font-medium text-text-primary shadow-sm backdrop-blur-sm\">\n {interactiveMode === \"place-geofence\"\n ? \"Click on the map to place the geofence center, then drag the pin or outer handle to adjust.\"\n : \"Click on the map to place or move the location pin.\"}\n </div>\n )}\n\n {/* Accessible zoom and fit controls */}\n <div\n className=\"absolute end-3 top-3 z-[420] flex flex-col overflow-hidden rounded-lg border border-border-default bg-bg-surface/95 shadow-sm backdrop-blur-sm\"\n role=\"group\"\n aria-label=\"Map navigation controls\"\n >\n <button\n type=\"button\"\n onClick={handleZoomIn}\n aria-label=\"Zoom in\"\n title=\"Zoom in (+)\"\n className=\"flex h-8 w-8 items-center justify-center border-b border-border-subtle text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-focus\"\n >\n <Plus className=\"h-4 w-4\" />\n </button>\n <button\n type=\"button\"\n onClick={handleZoomOut}\n aria-label=\"Zoom out\"\n title=\"Zoom out (-)\"\n className=\"flex h-8 w-8 items-center justify-center border-b border-border-subtle text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-focus\"\n >\n <Minus className=\"h-4 w-4\" />\n </button>\n <button\n type=\"button\"\n onClick={() => fitAllFeatures(true)}\n aria-label=\"Fit map to zones and points\"\n title=\"Fit all (0)\"\n className=\"flex h-8 w-8 items-center justify-center text-text-primary hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-focus\"\n >\n <Crosshair className=\"h-4 w-4\" />\n </button>\n </div>\n\n {/* Coordinate readout pill */}\n {activeCoordsLabel && (\n <div\n data-testid=\"map-coordinates-readout\"\n className=\"pointer-events-none absolute bottom-3 start-3 z-[420] rounded-md border border-border-subtle bg-bg-surface/90 px-2.5 py-1 font-mono text-[11px] text-text-secondary backdrop-blur-sm\"\n >\n {activeCoordsLabel}\n </div>\n )}\n\n <div className=\"sr-only\" aria-live=\"polite\">\n {statusAnnouncement}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAqGA,IAAMC,KAAe,sDACfC,KAAkB;AAExB,SAASC,GAAmB,GAAqC;CAC/D,IAAMC,IAAO,SAAS,cAAc,KAAK,GACnCC,IAAQ,SAAS,cAAc,KAAK;CAG1C,AAFA,EAAM,MAAM,aAAa,OACzB,EAAM,cAAcC,EAAM,MAC1BF,EAAK,YAAYC,CAAK;CAEtB,IAAME,IAAO,SAAS,cAAc,KAAK;CAEzC,AADA,EAAK,MAAM,YAAY,OACvB,EAAK,MAAM,UAAU;CACrB,IAAMC,IAAaF,EAAM,WAAW,WAAW;CAI/C,IAHA,EAAK,cAAc,GAAGG,EAAaH,EAAM,MAAM,EAAE,YAAYE,KAC7DJ,EAAK,YAAYG,CAAI,GAEjBD,EAAM,SAAS;EACjB,IAAMI,IAAO,SAAS,cAAc,KAAK;EAGzC,AAFA,EAAK,MAAM,YAAY,OACvB,EAAK,cAAcJ,EAAM,SACzBF,EAAK,YAAYM,CAAI;CACvB;CAEA,IAAMC,IAAS,SAAS,cAAc,KAAK;CAO3C,OANA,EAAO,MAAM,YAAY,OACzB,EAAO,MAAM,WAAW,QACxB,EAAO,MAA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U;IACV,WAAWR;IACX,WAAWG,EACT,0IACAM,IACArF,MAAoB,UAAU,kBAChC;IATF,UAAA;KAWE,kBAAC,OAAD;MACE,KAAKzB;MACL,WAAU;MACV,eAAa,GAAGuG,EAAO;KACxB,CAAA;KAGA9E,MAAoB,UACnB,kBAAC,OAAD;MAAK,WAAU;MACZ,UAAAA,MAAoB,mBACjB,gGACA;KACD,CAAA;KAIP,kBAAC,OAAD;MACE,WAAU;MACV,MAAK;MACL,cAAW;MAHb,UAAA;OAKE,kBAAC,UAAD;QACE,MAAK;QACL,SAASyE;QACT,cAAW;QACX,OAAM;QACN,WAAU;QAEV,UAAA,kBAACa,IAAD,EAAM,WAAU,UAAW,CAAA;OACrB,CAAA;OACR,kBAAC,UAAD;QACE,MAAK;QACL,SAASZ;QACT,cAAW;QACX,OAAM;QACN,WAAU;QAEV,UAAA,kBAACa,IAAD,EAAO,WAAU,UAAW,CAAA;OACtB,CAAA;OACR,kBAAC,UAAD;QACE,MAAK;QACL,eAAe1E,EAAe,EAAI;QAClC,cAAW;QACX,OAAM;QACN,WAAU;QAEV,UAAA,kBAAC2E,IAAD,EAAW,WAAU,UAAW,CAAA;OAC1B,CAAA;MACL;;KAGJX,KACC,kBAAC,OAAD;MACE,eAAY;MACZ,WAAU;MAET,UAAAA;KACE,CAAA;KAGP,kBAAC,OAAD;MAAK,WAAU;MAAU,aAAU;MAChC,UAAA1F;KACE,CAAA;IACF;;EACF;;AAET"}
@@ -148,7 +148,7 @@ var E = () => {
148
148
  className: "font-mono text-sm font-medium tabular-nums text-text-primary",
149
149
  children: i((e.duration ?? 0) / 3600)
150
150
  }), /* @__PURE__ */ b("span", {
151
- className: r("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium", e.isRunning ? "bg-status-info-bg text-status-info-text" : "bg-status-success-bg text-status-success-text"),
151
+ className: r("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium", e.isRunning ? "bg-status-info-bgSubtle text-status-info-text" : "bg-status-success-bgSubtle text-status-success-text"),
152
152
  children: [e.isRunning && /* @__PURE__ */ y("span", { className: "h-1.5 w-1.5 rounded-full bg-status-info-text motion-safe:animate-vc-glow-pulse" }), e.isRunning ? E("timecampus.home.recentEntries.status.running", "running") : E("timecampus.home.recentEntries.status.completed", "completed")]
153
153
  })]
154
154
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"HomePage.js","names":["_Fragment","HomePage","t","useTr","navigate","useTimeCampusNavigate","statsData","statsLoading","useGetTimeEntryStatsQuery","entriesData","entriesLoading","useListTimeEntriesQuery","stats","recentEntries","isNewUser","headerActions","CTAOverflowMenu","Play","FolderOpen","BarChart3","renderHeader","AuroraBackground","GradientText","LoadingSkeleton","EmptyState","StatCard","formatHours","Clock","TrendingUp","Fragment","GlassCard","ArrowRight","entry","cn","EmphasisPanel","Users","CheckCircle","Icon","route","label","description"],"sources":["../../../src/timecampus/pages/HomePage.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport {\n Clock,\n FolderOpen,\n Users,\n TrendingUp,\n CheckCircle,\n BarChart3,\n Play,\n ArrowRight,\n} from \"lucide-react\";\nimport {\n GlassCard,\n EmphasisPanel,\n AuroraBackground,\n GradientText,\n CTAOverflowMenu,\n} from \"@burdenoff/fe-libs/ui\";\nimport { StatCard } from \"../components/StatCard\";\nimport { LoadingSkeleton } from \"../components/LoadingSkeleton\";\nimport { EmptyState } from \"../components/EmptyState\";\nimport { cn, formatHours } from \"../utils/helpers\";\nimport { useTimeCampusNavigate } from \"../providers/TimeCampusProvider\";\nimport {\n useGetTimeEntryStatsQuery,\n useListTimeEntriesQuery,\n type TimeEntryFieldsFragment,\n} from \"@/generated/wspace-operations\";\nimport { usePageViewed } from \"../analytics\";\nimport { useTr } from \"../hooks\";\n\nexport const HomePage: FC = () => {\n usePageViewed(\"dashboard\");\n const t = useTr();\n const navigate = useTimeCampusNavigate();\n\n const { data: statsData, loading: statsLoading } =\n useGetTimeEntryStatsQuery();\n const { data: entriesData, loading: entriesLoading } =\n useListTimeEntriesQuery({\n variables: { pagination: { limit: 4 } },\n });\n\n const stats = statsData?.timeEntryStats;\n const recentEntries = entriesData?.timeEntries?.items ?? [];\n\n // No time entries at all yet — a genuinely new user, not just a quiet day.\n // Swap the stat grid (which would otherwise read as four confusing zeroes)\n // for a single, honest explanation of the core loop before anything else.\n const isNewUser =\n !statsLoading && !entriesLoading && (stats?.totalEntries ?? 0) === 0;\n\n const headerActions = (\n <CTAOverflowMenu\n primary={{\n label: t(\"timecampus.home.actions.startTimer\", \"Start Timer\"),\n onSelect: () => navigate(\"/time/timer\"),\n icon: <Play className=\"h-4 w-4\" />,\n }}\n actions={[\n {\n label: t(\n \"timecampus.home.quickActions.viewProjects.label\",\n \"View Projects\",\n ),\n onSelect: () => navigate(\"/projects\"),\n icon: <FolderOpen className=\"h-4 w-4\" />,\n },\n {\n label: t(\"timecampus.home.quickActions.reports.label\", \"Reports\"),\n onSelect: () => navigate(\"/reports\"),\n icon: <BarChart3 className=\"h-4 w-4\" />,\n },\n ]}\n />\n );\n\n const renderHeader = () => (\n <div className=\"relative overflow-hidden rounded-2xl border border-border-seam bg-gloss-card p-5 sm:p-6\">\n <AuroraBackground intensity=\"subtle\" />\n <div className=\"relative flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"min-w-0\">\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>\n {t(\"timecampus.home.title\", \"Dashboard\")}\n </GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {t(\n \"timecampus.home.description\",\n \"Overview of your time tracking and productivity\",\n )}\n </p>\n </div>\n {headerActions}\n </div>\n </div>\n );\n\n if (statsLoading && entriesLoading) {\n return (\n <div className=\"min-h-full space-y-6 p-4 sm:p-6\">\n {renderHeader()}\n <LoadingSkeleton variant=\"card\" count={4} />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-full space-y-6 p-4 sm:p-6\">\n {renderHeader()}\n\n {/* Hero metric + supporting metrics — or, for a genuinely new user with\n no time entries yet, a single honest explanation of the core loop\n instead of a grid of confusing zeroes. */}\n {isNewUser ? (\n <div className=\"flex flex-col items-center gap-3\">\n <EmptyState\n illustration=\"empty-data\"\n title={t(\n \"timecampus.home.gettingStarted.title\",\n \"Let's get you started\",\n )}\n description={t(\n \"timecampus.home.gettingStarted.description\",\n \"TimeCampus tracks your time when you start a timer — stop it when you're done, and everything else (your Timeline, Focus Score, and Reports) fills in automatically from what you track. No extra setup needed.\",\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigate(\"/time/timer\")}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n >\n <Play className=\"h-4 w-4\" />\n {t(\n \"timecampus.home.gettingStarted.action\",\n \"Start your first timer\",\n )}\n </button>\n }\n />\n <p className=\"max-w-md text-center text-xs text-text-secondary\">\n {t(\n \"timecampus.home.gettingStarted.footnote\",\n \"That's the only thing to set up. Pomodoro, Life tracking, reports and everything else in the sidebar are there whenever you're curious — nothing else needs configuring first.\",\n )}\n </p>\n </div>\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4\">\n <StatCard\n featured\n title={t(\"timecampus.home.stats.today\", \"Today\")}\n value={formatHours(stats?.totalHours ?? 0)}\n icon={<Clock className=\"h-5 w-5\" />}\n trend={{\n value: 12.5,\n label: t(\"timecampus.home.stats.vsYesterday\", \"vs yesterday\"),\n }}\n />\n <StatCard\n title={t(\"timecampus.home.stats.billable\", \"Billable\")}\n value={formatHours(stats?.billableHours ?? 0)}\n icon={<TrendingUp className=\"h-5 w-5\" />}\n description={`${stats?.totalEntries ?? 0} ${t(\"timecampus.home.stats.entries\", \"entries\")}`}\n />\n <StatCard\n title={t(\"timecampus.home.stats.activeTimers\", \"Active Timers\")}\n value={stats?.activeTimers ?? 0}\n icon={<FolderOpen className=\"h-5 w-5\" />}\n description={t(\n \"timecampus.home.stats.currentlyRunning\",\n \"Currently running\",\n )}\n />\n <StatCard\n title={t(\"timecampus.home.stats.totalEntries\", \"Entries\")}\n value={stats?.totalEntries ?? 0}\n icon={<BarChart3 className=\"h-5 w-5\" />}\n description={t(\n \"timecampus.home.stats.totalEntriesDescription\",\n \"Total time entries\",\n )}\n />\n </div>\n )}\n\n {/* Everything below is exploration/secondary surface — Recent Entries,\n Quick Summary, and the 6-button Quick Actions grid (which includes\n Team Activity and Approvals, not relevant before someone has\n tracked anything). Showing it alongside the single-CTA getting-\n started card undercuts \"just do this one thing\"; hold it back\n until the user has a first entry, then it appears exactly as\n before — same order, same content, no other pages changed. */}\n {!isNewUser && (\n <>\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Recent Time Entries */}\n <GlassCard\n treatment=\"plain\"\n className=\"border-border-seam p-6 lg:col-span-2\"\n >\n <div className=\"mb-4 flex items-center justify-between\">\n <div>\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\n \"timecampus.home.recentEntries.title\",\n \"Recent Time Entries\",\n )}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.recentEntries.description\",\n \"Your latest tracked activities\",\n )}\n </p>\n </div>\n <button\n onClick={() => navigate(\"/time/entries\")}\n className=\"inline-flex min-h-[2.75rem] items-center gap-1 rounded-md px-2 text-xs font-medium text-primary transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border\"\n >\n {t(\"timecampus.home.recentEntries.viewAll\", \"View all\")}{\" \"}\n <ArrowRight className=\"h-3 w-3\" />\n </button>\n </div>\n {entriesLoading ? (\n <LoadingSkeleton variant=\"list\" count={4} />\n ) : (\n <div className=\"flex flex-col gap-3\">\n {recentEntries.map((entry: TimeEntryFieldsFragment) => (\n <div\n key={entry.id}\n className=\"flex items-center justify-between rounded-lg border border-border-seam p-3 transition-colors hover:bg-bg-sunken/50\"\n >\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium text-text-primary\">\n {entry.project?.name ??\n t(\n \"timecampus.home.recentEntries.noProject\",\n \"No Project\",\n )}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {entry.description ??\n t(\n \"timecampus.home.recentEntries.noDescription\",\n \"No description\",\n )}\n </p>\n </div>\n <div className=\"ms-4 text-end\">\n <p className=\"font-mono text-sm font-medium tabular-nums text-text-primary\">\n {formatHours((entry.duration ?? 0) / 3600)}\n </p>\n <span\n className={cn(\n \"inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium\",\n entry.isRunning\n ? \"bg-status-info-bg text-status-info-text\"\n : \"bg-status-success-bg text-status-success-text\",\n )}\n >\n {entry.isRunning && (\n <span className=\"h-1.5 w-1.5 rounded-full bg-status-info-text motion-safe:animate-vc-glow-pulse\" />\n )}\n {entry.isRunning\n ? t(\n \"timecampus.home.recentEntries.status.running\",\n \"running\",\n )\n : t(\n \"timecampus.home.recentEntries.status.completed\",\n \"completed\",\n )}\n </span>\n </div>\n </div>\n ))}\n {recentEntries.length === 0 && (\n <p className=\"py-4 text-center text-sm text-text-secondary\">\n {t(\n \"timecampus.home.recentEntries.empty\",\n \"No time entries yet\",\n )}\n </p>\n )}\n </div>\n )}\n </GlassCard>\n\n {/* Quick Summary — the one emphasis zone */}\n <EmphasisPanel className=\"p-6\">\n <div className=\"mb-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\"timecampus.home.summary.title\", \"Quick Summary\")}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.summary.description\",\n \"Time tracking overview\",\n )}\n </p>\n </div>\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\"timecampus.home.summary.totalHours\", \"Total Hours\")}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {formatHours(stats?.totalHours ?? 0)}\n </p>\n </div>\n <Clock className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\n \"timecampus.home.summary.billableHours\",\n \"Billable Hours\",\n )}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {formatHours(stats?.billableHours ?? 0)}\n </p>\n </div>\n <TrendingUp className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\n \"timecampus.home.summary.activeTimers\",\n \"Active Timers\",\n )}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {stats?.activeTimers ?? 0}\n </p>\n </div>\n <Users className=\"h-5 w-5 text-text-secondary\" />\n </div>\n </div>\n </EmphasisPanel>\n </div>\n\n {/* Quick Actions */}\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-6\">\n <div className=\"mb-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\"timecampus.home.quickActions.title\", \"Quick Actions\")}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.quickActions.description\",\n \"Frequently used features\",\n )}\n </p>\n </div>\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6\">\n {[\n {\n label: t(\n \"timecampus.home.quickActions.startTimer.label\",\n \"Start Timer\",\n ),\n icon: Play,\n route: \"/time/timer\",\n description: t(\n \"timecampus.home.quickActions.startTimer.description\",\n \"Track your time\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.viewProjects.label\",\n \"View Projects\",\n ),\n icon: FolderOpen,\n route: \"/projects\",\n description: t(\n \"timecampus.home.quickActions.viewProjects.description\",\n \"Manage projects\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.timeEntries.label\",\n \"Time Entries\",\n ),\n icon: Clock,\n route: \"/time/entries\",\n description: t(\n \"timecampus.home.quickActions.timeEntries.description\",\n \"View all entries\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.teamActivity.label\",\n \"Team Activity\",\n ),\n icon: Users,\n route: \"/team-activity\",\n description: t(\n \"timecampus.home.quickActions.teamActivity.description\",\n \"See team status\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.reports.label\",\n \"Reports\",\n ),\n icon: BarChart3,\n route: \"/reports\",\n description: t(\n \"timecampus.home.quickActions.reports.description\",\n \"Generate reports\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.approvals.label\",\n \"Approvals\",\n ),\n icon: CheckCircle,\n route: \"/time-approval\",\n description: t(\n \"timecampus.home.quickActions.approvals.description\",\n \"Review timesheets\",\n ),\n },\n ].map(({ label, icon: Icon, description, route }) => (\n <button\n key={label}\n onClick={() => navigate(route)}\n className=\"flex min-h-[2.75rem] flex-col items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-center transition-colors hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border\"\n >\n <div className=\"rounded-full bg-action-primary-bg/10 p-3\">\n <Icon className=\"h-5 w-5 text-primary\" />\n </div>\n <span className=\"text-sm font-medium text-text-primary\">\n {label}\n </span>\n <span className=\"text-xs text-text-secondary\">\n {description}\n </span>\n </button>\n ))}\n </div>\n </GlassCard>\n </>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AA+BA,IAAaC,UAAqB;CAChC,EAAc,WAAW;CACzB,IAAMC,IAAIC,EAAM,GACVC,IAAWC,EAAsB,GAEjC,EAAE,MAAMC,GAAW,SAASC,MAChCC,EAA0B,GACtB,EAAE,MAAMC,GAAa,SAASC,MAClCC,EAAwB,EACtB,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EACxC,CAAC,GAEGC,IAAQN,GAAW,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AAD;QAAM,WAAU;QACb,UAAAE;OACG,CAAA;OACN,kBAAC,QAAD;QAAM,WAAU;QACb,UAAAC;OACG,CAAA;MACA;KAbD,GAAAD,CAaC,CACT;IACE,CAAA,CACI;GACX,CAAA,CAAA,EAAA,CAAA;EAED;;AAET"}
1
+ {"version":3,"file":"HomePage.js","names":["_Fragment","HomePage","t","useTr","navigate","useTimeCampusNavigate","statsData","statsLoading","useGetTimeEntryStatsQuery","entriesData","entriesLoading","useListTimeEntriesQuery","stats","recentEntries","isNewUser","headerActions","CTAOverflowMenu","Play","FolderOpen","BarChart3","renderHeader","AuroraBackground","GradientText","LoadingSkeleton","EmptyState","StatCard","formatHours","Clock","TrendingUp","Fragment","GlassCard","ArrowRight","entry","cn","EmphasisPanel","Users","CheckCircle","Icon","route","label","description"],"sources":["../../../src/timecampus/pages/HomePage.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport {\n Clock,\n FolderOpen,\n Users,\n TrendingUp,\n CheckCircle,\n BarChart3,\n Play,\n ArrowRight,\n} from \"lucide-react\";\nimport {\n GlassCard,\n EmphasisPanel,\n AuroraBackground,\n GradientText,\n CTAOverflowMenu,\n} from \"@burdenoff/fe-libs/ui\";\nimport { StatCard } from \"../components/StatCard\";\nimport { LoadingSkeleton } from \"../components/LoadingSkeleton\";\nimport { EmptyState } from \"../components/EmptyState\";\nimport { cn, formatHours } from \"../utils/helpers\";\nimport { useTimeCampusNavigate } from \"../providers/TimeCampusProvider\";\nimport {\n useGetTimeEntryStatsQuery,\n useListTimeEntriesQuery,\n type TimeEntryFieldsFragment,\n} from \"@/generated/wspace-operations\";\nimport { usePageViewed } from \"../analytics\";\nimport { useTr } from \"../hooks\";\n\nexport const HomePage: FC = () => {\n usePageViewed(\"dashboard\");\n const t = useTr();\n const navigate = useTimeCampusNavigate();\n\n const { data: statsData, loading: statsLoading } =\n useGetTimeEntryStatsQuery();\n const { data: entriesData, loading: entriesLoading } =\n useListTimeEntriesQuery({\n variables: { pagination: { limit: 4 } },\n });\n\n const stats = statsData?.timeEntryStats;\n const recentEntries = entriesData?.timeEntries?.items ?? [];\n\n // No time entries at all yet — a genuinely new user, not just a quiet day.\n // Swap the stat grid (which would otherwise read as four confusing zeroes)\n // for a single, honest explanation of the core loop before anything else.\n const isNewUser =\n !statsLoading && !entriesLoading && (stats?.totalEntries ?? 0) === 0;\n\n const headerActions = (\n <CTAOverflowMenu\n primary={{\n label: t(\"timecampus.home.actions.startTimer\", \"Start Timer\"),\n onSelect: () => navigate(\"/time/timer\"),\n icon: <Play className=\"h-4 w-4\" />,\n }}\n actions={[\n {\n label: t(\n \"timecampus.home.quickActions.viewProjects.label\",\n \"View Projects\",\n ),\n onSelect: () => navigate(\"/projects\"),\n icon: <FolderOpen className=\"h-4 w-4\" />,\n },\n {\n label: t(\"timecampus.home.quickActions.reports.label\", \"Reports\"),\n onSelect: () => navigate(\"/reports\"),\n icon: <BarChart3 className=\"h-4 w-4\" />,\n },\n ]}\n />\n );\n\n const renderHeader = () => (\n <div className=\"relative overflow-hidden rounded-2xl border border-border-seam bg-gloss-card p-5 sm:p-6\">\n <AuroraBackground intensity=\"subtle\" />\n <div className=\"relative flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"min-w-0\">\n <h1 className=\"text-2xl font-bold text-text-primary\">\n <GradientText>\n {t(\"timecampus.home.title\", \"Dashboard\")}\n </GradientText>\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {t(\n \"timecampus.home.description\",\n \"Overview of your time tracking and productivity\",\n )}\n </p>\n </div>\n {headerActions}\n </div>\n </div>\n );\n\n if (statsLoading && entriesLoading) {\n return (\n <div className=\"min-h-full space-y-6 p-4 sm:p-6\">\n {renderHeader()}\n <LoadingSkeleton variant=\"card\" count={4} />\n </div>\n );\n }\n\n return (\n <div className=\"min-h-full space-y-6 p-4 sm:p-6\">\n {renderHeader()}\n\n {/* Hero metric + supporting metrics — or, for a genuinely new user with\n no time entries yet, a single honest explanation of the core loop\n instead of a grid of confusing zeroes. */}\n {isNewUser ? (\n <div className=\"flex flex-col items-center gap-3\">\n <EmptyState\n illustration=\"empty-data\"\n title={t(\n \"timecampus.home.gettingStarted.title\",\n \"Let's get you started\",\n )}\n description={t(\n \"timecampus.home.gettingStarted.description\",\n \"TimeCampus tracks your time when you start a timer — stop it when you're done, and everything else (your Timeline, Focus Score, and Reports) fills in automatically from what you track. No extra setup needed.\",\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigate(\"/time/timer\")}\n className=\"inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n >\n <Play className=\"h-4 w-4\" />\n {t(\n \"timecampus.home.gettingStarted.action\",\n \"Start your first timer\",\n )}\n </button>\n }\n />\n <p className=\"max-w-md text-center text-xs text-text-secondary\">\n {t(\n \"timecampus.home.gettingStarted.footnote\",\n \"That's the only thing to set up. Pomodoro, Life tracking, reports and everything else in the sidebar are there whenever you're curious — nothing else needs configuring first.\",\n )}\n </p>\n </div>\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4\">\n <StatCard\n featured\n title={t(\"timecampus.home.stats.today\", \"Today\")}\n value={formatHours(stats?.totalHours ?? 0)}\n icon={<Clock className=\"h-5 w-5\" />}\n trend={{\n value: 12.5,\n label: t(\"timecampus.home.stats.vsYesterday\", \"vs yesterday\"),\n }}\n />\n <StatCard\n title={t(\"timecampus.home.stats.billable\", \"Billable\")}\n value={formatHours(stats?.billableHours ?? 0)}\n icon={<TrendingUp className=\"h-5 w-5\" />}\n description={`${stats?.totalEntries ?? 0} ${t(\"timecampus.home.stats.entries\", \"entries\")}`}\n />\n <StatCard\n title={t(\"timecampus.home.stats.activeTimers\", \"Active Timers\")}\n value={stats?.activeTimers ?? 0}\n icon={<FolderOpen className=\"h-5 w-5\" />}\n description={t(\n \"timecampus.home.stats.currentlyRunning\",\n \"Currently running\",\n )}\n />\n <StatCard\n title={t(\"timecampus.home.stats.totalEntries\", \"Entries\")}\n value={stats?.totalEntries ?? 0}\n icon={<BarChart3 className=\"h-5 w-5\" />}\n description={t(\n \"timecampus.home.stats.totalEntriesDescription\",\n \"Total time entries\",\n )}\n />\n </div>\n )}\n\n {/* Everything below is exploration/secondary surface — Recent Entries,\n Quick Summary, and the 6-button Quick Actions grid (which includes\n Team Activity and Approvals, not relevant before someone has\n tracked anything). Showing it alongside the single-CTA getting-\n started card undercuts \"just do this one thing\"; hold it back\n until the user has a first entry, then it appears exactly as\n before — same order, same content, no other pages changed. */}\n {!isNewUser && (\n <>\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Recent Time Entries */}\n <GlassCard\n treatment=\"plain\"\n className=\"border-border-seam p-6 lg:col-span-2\"\n >\n <div className=\"mb-4 flex items-center justify-between\">\n <div>\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\n \"timecampus.home.recentEntries.title\",\n \"Recent Time Entries\",\n )}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.recentEntries.description\",\n \"Your latest tracked activities\",\n )}\n </p>\n </div>\n <button\n onClick={() => navigate(\"/time/entries\")}\n className=\"inline-flex min-h-[2.75rem] items-center gap-1 rounded-md px-2 text-xs font-medium text-primary transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border\"\n >\n {t(\"timecampus.home.recentEntries.viewAll\", \"View all\")}{\" \"}\n <ArrowRight className=\"h-3 w-3\" />\n </button>\n </div>\n {entriesLoading ? (\n <LoadingSkeleton variant=\"list\" count={4} />\n ) : (\n <div className=\"flex flex-col gap-3\">\n {recentEntries.map((entry: TimeEntryFieldsFragment) => (\n <div\n key={entry.id}\n className=\"flex items-center justify-between rounded-lg border border-border-seam p-3 transition-colors hover:bg-bg-sunken/50\"\n >\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-medium text-text-primary\">\n {entry.project?.name ??\n t(\n \"timecampus.home.recentEntries.noProject\",\n \"No Project\",\n )}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {entry.description ??\n t(\n \"timecampus.home.recentEntries.noDescription\",\n \"No description\",\n )}\n </p>\n </div>\n <div className=\"ms-4 text-end\">\n <p className=\"font-mono text-sm font-medium tabular-nums text-text-primary\">\n {formatHours((entry.duration ?? 0) / 3600)}\n </p>\n <span\n className={cn(\n \"inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium\",\n entry.isRunning\n ? \"bg-status-info-bgSubtle text-status-info-text\"\n : \"bg-status-success-bgSubtle text-status-success-text\",\n )}\n >\n {entry.isRunning && (\n <span className=\"h-1.5 w-1.5 rounded-full bg-status-info-text motion-safe:animate-vc-glow-pulse\" />\n )}\n {entry.isRunning\n ? t(\n \"timecampus.home.recentEntries.status.running\",\n \"running\",\n )\n : t(\n \"timecampus.home.recentEntries.status.completed\",\n \"completed\",\n )}\n </span>\n </div>\n </div>\n ))}\n {recentEntries.length === 0 && (\n <p className=\"py-4 text-center text-sm text-text-secondary\">\n {t(\n \"timecampus.home.recentEntries.empty\",\n \"No time entries yet\",\n )}\n </p>\n )}\n </div>\n )}\n </GlassCard>\n\n {/* Quick Summary — the one emphasis zone */}\n <EmphasisPanel className=\"p-6\">\n <div className=\"mb-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\"timecampus.home.summary.title\", \"Quick Summary\")}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.summary.description\",\n \"Time tracking overview\",\n )}\n </p>\n </div>\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\"timecampus.home.summary.totalHours\", \"Total Hours\")}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {formatHours(stats?.totalHours ?? 0)}\n </p>\n </div>\n <Clock className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\n \"timecampus.home.summary.billableHours\",\n \"Billable Hours\",\n )}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {formatHours(stats?.billableHours ?? 0)}\n </p>\n </div>\n <TrendingUp className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <div className=\"flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface/40 p-3\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary\">\n {t(\n \"timecampus.home.summary.activeTimers\",\n \"Active Timers\",\n )}\n </p>\n <p className=\"mt-1 text-xl font-bold tabular-nums text-text-primary\">\n {stats?.activeTimers ?? 0}\n </p>\n </div>\n <Users className=\"h-5 w-5 text-text-secondary\" />\n </div>\n </div>\n </EmphasisPanel>\n </div>\n\n {/* Quick Actions */}\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-6\">\n <div className=\"mb-4\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {t(\"timecampus.home.quickActions.title\", \"Quick Actions\")}\n </h3>\n <p className=\"text-xs text-text-secondary\">\n {t(\n \"timecampus.home.quickActions.description\",\n \"Frequently used features\",\n )}\n </p>\n </div>\n <div className=\"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6\">\n {[\n {\n label: t(\n \"timecampus.home.quickActions.startTimer.label\",\n \"Start Timer\",\n ),\n icon: Play,\n route: \"/time/timer\",\n description: t(\n \"timecampus.home.quickActions.startTimer.description\",\n \"Track your time\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.viewProjects.label\",\n \"View Projects\",\n ),\n icon: FolderOpen,\n route: \"/projects\",\n description: t(\n \"timecampus.home.quickActions.viewProjects.description\",\n \"Manage projects\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.timeEntries.label\",\n \"Time Entries\",\n ),\n icon: Clock,\n route: \"/time/entries\",\n description: t(\n \"timecampus.home.quickActions.timeEntries.description\",\n \"View all entries\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.teamActivity.label\",\n \"Team Activity\",\n ),\n icon: Users,\n route: \"/team-activity\",\n description: t(\n \"timecampus.home.quickActions.teamActivity.description\",\n \"See team status\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.reports.label\",\n \"Reports\",\n ),\n icon: BarChart3,\n route: \"/reports\",\n description: t(\n \"timecampus.home.quickActions.reports.description\",\n \"Generate reports\",\n ),\n },\n {\n label: t(\n \"timecampus.home.quickActions.approvals.label\",\n \"Approvals\",\n ),\n icon: CheckCircle,\n route: \"/time-approval\",\n description: t(\n \"timecampus.home.quickActions.approvals.description\",\n \"Review timesheets\",\n ),\n },\n ].map(({ label, icon: Icon, description, route }) => (\n <button\n key={label}\n onClick={() => navigate(route)}\n className=\"flex min-h-[2.75rem] flex-col items-center gap-2 rounded-lg border border-border-seam bg-bg-surface p-4 text-center transition-colors hover:bg-bg-sunken/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border\"\n >\n <div className=\"rounded-full bg-action-primary-bg/10 p-3\">\n <Icon className=\"h-5 w-5 text-primary\" />\n </div>\n <span className=\"text-sm font-medium text-text-primary\">\n {label}\n </span>\n <span className=\"text-xs text-text-secondary\">\n {description}\n </span>\n </button>\n ))}\n </div>\n </GlassCard>\n </>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AA+BA,IAAaC,UAAqB;CAChC,EAAc,WAAW;CACzB,IAAMC,IAAIC,EAAM,GACVC,IAAWC,EAAsB,GAEjC,EAAE,MAAMC,GAAW,SAASC,MAChCC,EAA0B,GACtB,EAAE,MAAMC,GAAa,SAASC,MAClCC,EAAwB,EACtB,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EACxC,CAAC,GAEGC,IAAQN,GAAW,gBACnBO,IAAgBJ,GAAa,aAAa,SAAS,CA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;OACN,kBAAC,QAAD;QAAM,WAAU;QACb,UAAAC;OACG,CAAA;MACA;KAbD,GAAAD,CAaC,CACT;IACE,CAAA,CACI;GACX,CAAA,CAAA,EAAA,CAAA;EAED;;AAET"}
@@ -172,7 +172,7 @@ var P = () => {
172
172
  }) : void 0,
173
173
  children: [
174
174
  I && /* @__PURE__ */ w("div", {
175
- className: "mb-4 rounded-md bg-status-info-bg px-4 py-3 text-sm text-status-info-text",
175
+ className: "mb-4 rounded-md bg-status-info-bgSubtle px-4 py-3 text-sm text-status-info-text",
176
176
  children: [I, /* @__PURE__ */ C("button", {
177
177
  type: "button",
178
178
  onClick: () => L(null),
@@ -181,7 +181,7 @@ var P = () => {
181
181
  })]
182
182
  }),
183
183
  $.length > 0 && /* @__PURE__ */ w("div", {
184
- className: "mb-4 rounded-md bg-status-error-bg px-4 py-3 text-sm text-status-error-text",
184
+ className: "mb-4 rounded-md bg-status-error-bgSubtle px-4 py-3 text-sm text-status-error-text",
185
185
  children: ["Failed to load admin data. ", $.map((e) => e?.message).join("; ")]
186
186
  }),
187
187
  /* @__PURE__ */ w("section", {
@@ -288,7 +288,7 @@ var P = () => {
288
288
  /* @__PURE__ */ C("td", {
289
289
  className: "px-4 py-3",
290
290
  children: /* @__PURE__ */ C("span", {
291
- className: `inline-flex rounded-full px-2 py-1 text-xs font-medium ${e.value ? "bg-status-success-bg text-status-success-text" : "bg-status-error-bg text-status-error-text"}`,
291
+ className: `inline-flex rounded-full px-2 py-1 text-xs font-medium ${e.value ? "bg-status-success-bgSubtle text-status-success-text" : "bg-status-error-bgSubtle text-status-error-text"}`,
292
292
  children: e.value ? "Enabled" : "Disabled"
293
293
  })
294
294
  })
@@ -340,7 +340,7 @@ var P = () => {
340
340
  type: "button",
341
341
  onClick: Je,
342
342
  disabled: Ie,
343
- className: "inline-flex items-center gap-2 rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50",
343
+ className: "inline-flex items-center gap-2 rounded-md bg-status-error-bgSubtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bgSubtle/70 disabled:opacity-50",
344
344
  children: [/* @__PURE__ */ C(g, { className: "h-4 w-4" }), "Remove Override"]
345
345
  })
346
346
  ]
@@ -493,7 +493,7 @@ var P = () => {
493
493
  type: "button",
494
494
  onClick: Ze,
495
495
  disabled: He,
496
- className: "inline-flex items-center gap-2 rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50",
496
+ className: "inline-flex items-center gap-2 rounded-md bg-status-error-bgSubtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bgSubtle/70 disabled:opacity-50",
497
497
  children: [/* @__PURE__ */ C(v, { className: "h-4 w-4" }), "Request Erasure"]
498
498
  })
499
499
  ]
@@ -652,7 +652,7 @@ var P = () => {
652
652
  type: "button",
653
653
  onClick: Ke,
654
654
  disabled: Me,
655
- className: "inline-flex items-center gap-2 rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50",
655
+ className: "inline-flex items-center gap-2 rounded-md bg-status-error-bgSubtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bgSubtle/70 disabled:opacity-50",
656
656
  children: [/* @__PURE__ */ C(g, { className: "h-4 w-4" }), "Reset Demo Data"]
657
657
  })]
658
658
  })] })