@terraware/web-components 4.2.25 → 4.2.26-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/_vendor/react-multi-carousel/index.js +13 -0
  2. package/_vendor/react-multi-carousel/lib/Arrows.js +13 -0
  3. package/_vendor/react-multi-carousel/lib/Carousel.js +19 -0
  4. package/_vendor/react-multi-carousel/lib/CarouselItems.js +14 -0
  5. package/_vendor/react-multi-carousel/lib/Dots.js +16 -0
  6. package/_vendor/react-multi-carousel/lib/index.js +13 -0
  7. package/_vendor/react-multi-carousel/lib/types.js +13 -0
  8. package/_vendor/react-multi-carousel/lib/utils/clones.js +14 -0
  9. package/_vendor/react-multi-carousel/lib/utils/common.js +13 -0
  10. package/_vendor/react-multi-carousel/lib/utils/dots.js +14 -0
  11. package/_vendor/react-multi-carousel/lib/utils/elementWidth.js +12 -0
  12. package/_vendor/react-multi-carousel/lib/utils/index.js +20 -0
  13. package/_vendor/react-multi-carousel/lib/utils/mouseOrTouchMove.js +14 -0
  14. package/_vendor/react-multi-carousel/lib/utils/next.js +13 -0
  15. package/_vendor/react-multi-carousel/lib/utils/previous.js +14 -0
  16. package/_vendor/react-multi-carousel/lib/utils/throttle.js +12 -0
  17. package/_vendor/react-multi-carousel/lib/utils/throwError.js +14 -0
  18. package/_virtual/Arrows.js +3 -0
  19. package/_virtual/Carousel.js +3 -0
  20. package/_virtual/CarouselItems.js +3 -0
  21. package/_virtual/Dots.js +3 -0
  22. package/_virtual/_commonjsHelpers.js +5 -0
  23. package/_virtual/clones.js +3 -0
  24. package/_virtual/common.js +3 -0
  25. package/_virtual/dots2.js +3 -0
  26. package/_virtual/elementWidth.js +3 -0
  27. package/_virtual/index.js +7 -0
  28. package/_virtual/index2.js +3 -0
  29. package/_virtual/index3.js +3 -0
  30. package/_virtual/mouseOrTouchMove.js +3 -0
  31. package/_virtual/next.js +3 -0
  32. package/_virtual/previous.js +3 -0
  33. package/_virtual/throttle.js +3 -0
  34. package/_virtual/throwError.js +3 -0
  35. package/_virtual/types.js +3 -0
  36. package/components/AntSwitch/index.js +6 -4
  37. package/components/Autocomplete/Autocomplete.js +19 -16
  38. package/components/Badge/index.js +8 -6
  39. package/components/BusySpinner/index.js +11 -8
  40. package/components/Button/Button.js +12 -9
  41. package/components/Checkbox.js +11 -8
  42. package/components/Confirm/index.js +14 -17
  43. package/components/DatePicker/DatePicker.js +19 -23
  44. package/components/DialogBox/DialogBox.js +25 -20
  45. package/components/Divisor.js +11 -8
  46. package/components/Dropdown.js +18 -15
  47. package/components/EditableTable/index.js +17 -14
  48. package/components/ErrorBox/ErrorBox.js +18 -15
  49. package/components/FileChooser/index.js +20 -15
  50. package/components/FormBottomBar/index.js +15 -12
  51. package/components/Icon/Icon.js +9 -6
  52. package/components/Icon/icons/index.js +252 -251
  53. package/components/IconTooltip/index.js +14 -9
  54. package/components/Map/MapBox.js +35 -32
  55. package/components/Map/MapContainer.js +10 -6
  56. package/components/Map/MapDateSliderControl.js +14 -12
  57. package/components/Map/MapDrawer.js +16 -12
  58. package/components/Map/MapLegend.js +32 -28
  59. package/components/Map/MapViewStyleControl.js +11 -9
  60. package/components/Map/ReactMapboxWrapper.js +1 -1
  61. package/components/Map/index.js +13 -11
  62. package/components/Map/types.js +5 -3
  63. package/components/Map/useMaintainLayerOrder.js +5 -2
  64. package/components/Markdown/index.js +6 -4
  65. package/components/Message/Message.js +25 -20
  66. package/components/MultiSelect/index.js +26 -23
  67. package/components/Navbar/NavFooter.js +8 -5
  68. package/components/Navbar/NavItem.js +14 -11
  69. package/components/Navbar/NavSection.js +10 -7
  70. package/components/Navbar/Navbar.js +16 -11
  71. package/components/Navbar/SubNavbar.js +8 -5
  72. package/components/Note.js +10 -7
  73. package/components/OverlayModal/OverlayModal.js +13 -11
  74. package/components/PageForm/index.js +15 -12
  75. package/components/PhotoChooser/index.js +30 -25
  76. package/components/PhotosCarousel/index.d.ts.map +1 -1
  77. package/components/PhotosCarousel/index.js +17 -13
  78. package/components/Pill/index.js +14 -11
  79. package/components/PillList/index.js +10 -7
  80. package/components/PlacementWrapper/index.js +8 -6
  81. package/components/PopoverMenu/Popover.js +12 -9
  82. package/components/PopoverMenu/index.js +14 -11
  83. package/components/PopoverMultiSelect/index.js +14 -11
  84. package/components/ProgressCircle/ProgressCircle.js +12 -9
  85. package/components/RadioButton.js +9 -6
  86. package/components/Select/Select.js +9 -6
  87. package/components/Select/SelectT.js +30 -26
  88. package/components/Separator/index.js +7 -5
  89. package/components/Size.js +1 -1
  90. package/components/Slider/index.js +9 -6
  91. package/components/SummaryBox.js +13 -10
  92. package/components/Tabs/index.js +22 -18
  93. package/components/TextTruncated/index.js +13 -20
  94. package/components/Textfield/Textfield.js +34 -28
  95. package/components/Textfield/TruncatedTextArea.js +12 -10
  96. package/components/TimelineSlider/TimelineMarker.js +8 -6
  97. package/components/TimelineSlider/TimelineRail.js +6 -4
  98. package/components/TimelineSlider/index.js +14 -12
  99. package/components/Tooltip/Tooltip.js +12 -7
  100. package/components/ViewPhotosDialog/index.js +14 -11
  101. package/components/VirtualWalkthrough/Annotation.js +10 -8
  102. package/components/VirtualWalkthrough/AnnotationEditPane.js +23 -21
  103. package/components/VirtualWalkthrough/AnnotationPanel.js +16 -14
  104. package/components/VirtualWalkthrough/Application.js +9 -7
  105. package/components/VirtualWalkthrough/AutoRotator.js +5 -3
  106. package/components/VirtualWalkthrough/BlockingSpinner.js +10 -7
  107. package/components/VirtualWalkthrough/BoundaryRing.js +8 -6
  108. package/components/VirtualWalkthrough/BoundaryWall.js +8 -6
  109. package/components/VirtualWalkthrough/CameraInfo.js +15 -13
  110. package/components/VirtualWalkthrough/ControlsInfoPane.js +59 -57
  111. package/components/VirtualWalkthrough/GradientSky.js +8 -6
  112. package/components/VirtualWalkthrough/SplatControls.js +37 -35
  113. package/components/VirtualWalkthrough/SplatCrop.js +6 -4
  114. package/components/VirtualWalkthrough/SplatFadeCrop.js +7 -5
  115. package/components/VirtualWalkthrough/SplatModel.js +17 -14
  116. package/components/VirtualWalkthrough/SplatRevealRain.js +6 -4
  117. package/components/VirtualWalkthrough/TfAnnotationManager.js +8 -5
  118. package/components/VirtualWalkthrough/TfXrNavigation.js +7 -5
  119. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.js +47 -45
  120. package/components/VirtualWalkthrough/VrAnnotationPanel.js +9 -7
  121. package/components/VirtualWalkthrough/XrAnnotationInteraction.js +9 -7
  122. package/components/VirtualWalkthrough/XrExitButton.js +9 -7
  123. package/components/VirtualWalkthrough/XrGazeDwell.js +9 -7
  124. package/components/VirtualWalkthrough/XrPointerRay.js +9 -7
  125. package/components/VirtualWalkthrough/boundary-ring.js +7 -5
  126. package/components/VirtualWalkthrough/boundary-wall.js +8 -6
  127. package/components/VirtualWalkthrough/groundPlane.js +6 -3
  128. package/components/VirtualWalkthrough/gsplat-fade-crop-effect.js +5 -2
  129. package/components/VirtualWalkthrough/splatFormat.js +6 -4
  130. package/components/VirtualWalkthrough/vr-annotation-panel-layout.js +4 -2
  131. package/components/VirtualWalkthrough/vr-annotation-panel.js +8 -5
  132. package/components/VirtualWalkthrough/walkthrough-camera.js +6 -4
  133. package/components/VirtualWalkthrough/xr-annotation-candidates.js +8 -6
  134. package/components/VirtualWalkthrough/xr-annotation-interaction.js +9 -6
  135. package/components/VirtualWalkthrough/xr-annotation-targeting.js +5 -2
  136. package/components/VirtualWalkthrough/xr-button-arming.js +4 -2
  137. package/components/VirtualWalkthrough/xr-button-hold.js +5 -3
  138. package/components/VirtualWalkthrough/xr-exit-button.js +10 -8
  139. package/components/VirtualWalkthrough/xr-face-buttons.js +6 -4
  140. package/components/VirtualWalkthrough/xr-gaze-dwell-state.js +5 -3
  141. package/components/VirtualWalkthrough/xr-gaze-dwell.js +9 -7
  142. package/components/VirtualWalkthrough/xr-interactive-ui.js +10 -8
  143. package/components/VirtualWalkthrough/xr-pointer-ray.js +5 -3
  144. package/components/VirtualWalkthrough/xr-progress-pie.js +4 -2
  145. package/components/VirtualWalkthrough/xr-ray-quad.js +5 -2
  146. package/components/VirtualWalkthrough/xr-scene-bounds.js +5 -3
  147. package/components/VirtualWalkthrough/xr-teleport-gesture.js +4 -2
  148. package/components/svg/BlobbyGrayIconImage.js +13 -11
  149. package/components/svg/BlobbyGrayIconImport.js +13 -11
  150. package/components/svg/BlobbyGrayIconUploadToTheCloud.js +13 -11
  151. package/components/svg/BlobbyIconCloudChecked.js +41 -39
  152. package/components/svg/BlobbyIconExportOrUploadPhoto.js +41 -39
  153. package/components/svg/BlobbyIconFolder.js +41 -39
  154. package/components/svg/BlobbyIconGraphReport.js +41 -39
  155. package/components/svg/BlobbyIconHappy.js +41 -39
  156. package/components/svg/BlobbyIconHeartMonitor.js +41 -39
  157. package/components/svg/BlobbyIconLeaf.js +41 -39
  158. package/components/svg/BlobbyIconLibrary.js +41 -39
  159. package/components/svg/BlobbyIconNursery.js +41 -39
  160. package/components/svg/BlobbyIconOrganization.js +41 -39
  161. package/components/svg/BlobbyIconParchment.js +41 -39
  162. package/components/svg/BlobbyIconPeople.js +41 -39
  163. package/components/svg/BlobbyIconSeedBank.js +41 -39
  164. package/components/svg/BlobbyIconSeedling.js +41 -39
  165. package/components/svg/BlobbyIconSeeds.js +41 -39
  166. package/components/svg/BlobbyIconSite.js +42 -40
  167. package/components/svg/BlobbyIconSparkles.js +41 -39
  168. package/components/svg/BlobbyIconWrench.js +41 -39
  169. package/components/svg/Bug.js +8 -6
  170. package/components/svg/Calendar.js +8 -6
  171. package/components/svg/CaretDown.js +8 -6
  172. package/components/svg/CaretLeft.js +8 -6
  173. package/components/svg/CaretRight.js +8 -6
  174. package/components/svg/CaretUp.js +8 -6
  175. package/components/svg/ChevronDown.js +8 -6
  176. package/components/svg/ChevronUp.js +8 -6
  177. package/components/svg/Close.js +8 -6
  178. package/components/svg/Critical.js +8 -6
  179. package/components/svg/Edit.js +41 -39
  180. package/components/svg/Error.js +8 -6
  181. package/components/svg/Filter.js +8 -6
  182. package/components/svg/Folder.js +8 -6
  183. package/components/svg/Help.js +8 -6
  184. package/components/svg/Home.js +8 -6
  185. package/components/svg/IconAdd.js +8 -6
  186. package/components/svg/IconArrowRight.js +8 -6
  187. package/components/svg/IconBusinessNetwork.js +8 -6
  188. package/components/svg/IconCalendar.js +8 -6
  189. package/components/svg/IconCancel.js +8 -6
  190. package/components/svg/IconChargingBattery.js +8 -6
  191. package/components/svg/IconChecklist.js +8 -6
  192. package/components/svg/IconCheckmark.js +8 -6
  193. package/components/svg/IconCoinInHand.js +8 -6
  194. package/components/svg/IconColumns.js +8 -6
  195. package/components/svg/IconComment.js +8 -6
  196. package/components/svg/IconDashboard.js +8 -6
  197. package/components/svg/IconDataMigration.js +8 -6
  198. package/components/svg/IconDocument.js +8 -6
  199. package/components/svg/IconDownloadFromTheCloud.js +8 -6
  200. package/components/svg/IconEdit.js +8 -6
  201. package/components/svg/IconExpand.js +8 -6
  202. package/components/svg/IconExport.js +8 -6
  203. package/components/svg/IconExternalLink.js +8 -6
  204. package/components/svg/IconEye.js +8 -6
  205. package/components/svg/IconEyeOff.js +8 -6
  206. package/components/svg/IconFile.js +8 -6
  207. package/components/svg/IconFolder.js +8 -6
  208. package/components/svg/IconFullScreen.js +8 -6
  209. package/components/svg/IconFutures.js +8 -6
  210. package/components/svg/IconGraphReport.js +8 -6
  211. package/components/svg/IconHeartMonitor.js +8 -6
  212. package/components/svg/IconHelp.js +8 -6
  213. package/components/svg/IconHistory.js +8 -6
  214. package/components/svg/IconImport.js +8 -6
  215. package/components/svg/IconIndex.js +8 -6
  216. package/components/svg/IconLayers.js +8 -6
  217. package/components/svg/IconLibrary.js +8 -6
  218. package/components/svg/IconList.js +8 -6
  219. package/components/svg/IconLivePlant.js +8 -6
  220. package/components/svg/IconLocations.js +8 -6
  221. package/components/svg/IconMail.js +8 -6
  222. package/components/svg/IconManager.js +8 -6
  223. package/components/svg/IconMarker.js +8 -6
  224. package/components/svg/IconMenu.js +8 -6
  225. package/components/svg/IconMenuHorizontal.js +8 -6
  226. package/components/svg/IconModule.js +8 -6
  227. package/components/svg/IconMyLocation.js +8 -6
  228. package/components/svg/IconNote.js +8 -6
  229. package/components/svg/IconNursery.js +8 -6
  230. package/components/svg/IconOrg.js +8 -6
  231. package/components/svg/IconParchment.js +8 -6
  232. package/components/svg/IconPhoto.js +8 -6
  233. package/components/svg/IconPlantsFilled.js +8 -6
  234. package/components/svg/IconRedo.js +8 -6
  235. package/components/svg/IconRestorationSite.js +8 -6
  236. package/components/svg/IconSeedBank.js +8 -6
  237. package/components/svg/IconSeedling.js +8 -6
  238. package/components/svg/IconSettings.js +8 -6
  239. package/components/svg/IconSlice.js +8 -6
  240. package/components/svg/IconSubmit.js +8 -6
  241. package/components/svg/IconSubtract.js +8 -6
  242. package/components/svg/IconSynced.js +8 -6
  243. package/components/svg/IconTrashCan.js +8 -6
  244. package/components/svg/IconTreasureMap.js +8 -6
  245. package/components/svg/IconUnavailable.js +8 -6
  246. package/components/svg/IconUndo.js +8 -6
  247. package/components/svg/IconVariable.js +8 -6
  248. package/components/svg/IconVideo.js +9 -7
  249. package/components/svg/IconWifi.js +8 -6
  250. package/components/svg/Info.js +8 -6
  251. package/components/svg/Key.js +8 -6
  252. package/components/svg/Leaf.js +8 -6
  253. package/components/svg/Lock.js +8 -6
  254. package/components/svg/Logo.js +16 -14
  255. package/components/svg/MenuVertical.js +8 -6
  256. package/components/svg/Notification.js +8 -6
  257. package/components/svg/Person.js +8 -6
  258. package/components/svg/Plus.js +8 -6
  259. package/components/svg/RestorationSite.js +8 -6
  260. package/components/svg/Search.js +8 -6
  261. package/components/svg/Seeds.js +8 -6
  262. package/components/svg/Site.js +8 -6
  263. package/components/svg/Sparkles.js +8 -6
  264. package/components/svg/Species.js +8 -6
  265. package/components/svg/Species2.js +41 -39
  266. package/components/svg/Spinner.js +16 -14
  267. package/components/svg/Star.js +8 -6
  268. package/components/svg/Success.js +8 -6
  269. package/components/svg/SuccessFilled.js +8 -6
  270. package/components/svg/TerrawareLogoDesktop.js +17 -15
  271. package/components/svg/TerrawareLogoMobile.js +9 -7
  272. package/components/svg/Touchscreen.js +8 -6
  273. package/components/svg/UploadCloud.js +41 -39
  274. package/components/svg/Warning.js +8 -6
  275. package/components/svg/WelcomeClipboard.js +32 -30
  276. package/components/svg/index.js +127 -127
  277. package/components/table/EnhancedTableToolbar.js +18 -15
  278. package/components/table/EnhancedTableToolbarV2.js +8 -6
  279. package/components/table/TableCellRenderer.js +37 -32
  280. package/components/table/TableHeader.js +17 -14
  281. package/components/table/TableHeaderItem.js +18 -15
  282. package/components/table/density.js +5 -3
  283. package/components/table/index.js +40 -37
  284. package/components/table/sort.js +6 -4
  285. package/components/table/types.js +1 -1
  286. package/components/types/index.js +1 -1
  287. package/hooks/useBoolean.js +4 -2
  288. package/hooks/useCameraPosition.js +5 -2
  289. package/hooks/useDevicePerformance.js +6 -3
  290. package/hooks/useXr.js +6 -4
  291. package/index.js +55 -58
  292. package/package.json +6 -2
  293. package/style-dictionary-dist/TerrawareTheme.js +2 -1
  294. package/theme.js +5 -2
  295. package/utils/color.js +5 -2
  296. package/utils/date.js +7 -6
  297. package/utils/index.js +4 -5
  298. package/utils/preventDefaultEvent.js +2 -1
  299. package/utils/text.js +3 -2
  300. package/utils/useDeviceInfo.js +2 -1
  301. package/virtualWalkthrough.js +23 -31
  302. package/components/Button/button.test.js +0 -23
  303. package/components/MultiSelect/MultiSelect.test.js +0 -73
  304. package/components/VirtualWalkthrough/TfXrNavigation.test.js +0 -110
  305. package/components/VirtualWalkthrough/boundary-ring.test.js +0 -109
  306. package/components/VirtualWalkthrough/boundary-wall.test.js +0 -203
  307. package/components/VirtualWalkthrough/groundPlane.test.js +0 -45
  308. package/components/VirtualWalkthrough/splatFormat.test.js +0 -51
  309. package/components/VirtualWalkthrough/vr-annotation-panel-layout.test.js +0 -26
  310. package/components/VirtualWalkthrough/xr-annotation-targeting.test.js +0 -66
  311. package/components/VirtualWalkthrough/xr-button-arming.test.js +0 -35
  312. package/components/VirtualWalkthrough/xr-button-hold.test.js +0 -57
  313. package/components/VirtualWalkthrough/xr-exit-button.test.js +0 -23
  314. package/components/VirtualWalkthrough/xr-face-buttons.test.js +0 -82
  315. package/components/VirtualWalkthrough/xr-gaze-dwell-state.test.js +0 -61
  316. package/components/VirtualWalkthrough/xr-interactive-ui.test.js +0 -165
  317. package/components/VirtualWalkthrough/xr-progress-pie.test.js +0 -79
  318. package/components/VirtualWalkthrough/xr-ray-quad.test.js +0 -37
  319. package/components/VirtualWalkthrough/xr-scene-bounds.test.js +0 -70
  320. package/components/VirtualWalkthrough/xr-teleport-gesture.test.js +0 -90
  321. package/components/table/sort.test.js +0 -35
  322. package/utils/date.test.js +0 -84
  323. package/utils/text.test.js +0 -21
@@ -1,14 +1,16 @@
1
- import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
- import { FullscreenControl, Layer, Marker, NavigationControl, Source } from 'react-map-gl/mapbox';
3
- import { Box, useTheme } from '@mui/material';
1
+ import { useRef, useState, useCallback, useMemo, useEffect } from 'react';
2
+ import ReactMapbox, { Layer, Marker, FullscreenControl, NavigationControl, Source } from 'react-map-gl/mapbox';
3
+ import { useTheme, Box } from '@mui/material';
4
4
  import 'mapbox-gl/dist/mapbox-gl.css';
5
- import { useDeviceInfo } from '../../utils';
6
- import Icon from '../Icon/Icon';
7
- import MapViewStyleControl from './MapViewStyleControl';
8
- import ReactMapbox from './ReactMapboxWrapper';
9
- import { stylesUrl } from './types';
10
- import { useMaintainLayerOrder } from './useMaintainLayerOrder';
11
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
5
+ import 'lodash';
6
+ import 'luxon';
7
+ import useDeviceInfo from '../../utils/useDeviceInfo.js';
8
+ import Icon from '../Icon/Icon.js';
9
+ import MapViewStyleControl from './MapViewStyleControl.js';
10
+ import { stylesUrl } from './types.js';
11
+ import { useMaintainLayerOrder } from './useMaintainLayerOrder.js';
12
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
+
12
14
  const MapBox = props => {
13
15
  const {
14
16
  clusterRadius,
@@ -133,7 +135,7 @@ const MapBox = props => {
133
135
  textLayers
134
136
  } = useMemo(() => {
135
137
  const _borderLayers = featureGroups?.map(group => {
136
- return /*#__PURE__*/_jsx(Layer, {
138
+ return /*#__PURE__*/jsx(Layer, {
137
139
  id: `${group.layerId}-border`,
138
140
  source: 'mapData',
139
141
  type: "line",
@@ -155,8 +157,8 @@ const MapBox = props => {
155
157
  const notSelectedFilter = ['==', ['get', 'selected'], false];
156
158
  const hoverFilter = ['==', ['get', 'id'], hoverFeatureId ?? null];
157
159
  const notHoverFilter = ['!=', ['get', 'id'], hoverFeatureId ?? null];
158
- return /*#__PURE__*/_jsxs(_Fragment, {
159
- children: [/*#__PURE__*/_jsx(Layer, {
160
+ return /*#__PURE__*/jsxs(Fragment, {
161
+ children: [/*#__PURE__*/jsx(Layer, {
160
162
  id: group.layerId,
161
163
  source: 'mapData',
162
164
  type: 'fill',
@@ -164,7 +166,7 @@ const MapBox = props => {
164
166
  'fill-opacity': 0
165
167
  },
166
168
  filter: ['all', groupFilter, clickableFilter]
167
- }, group.layerId), /*#__PURE__*/_jsx(Layer, {
169
+ }, group.layerId), /*#__PURE__*/jsx(Layer, {
168
170
  id: `${group.layerId}-unselected`,
169
171
  source: 'mapData',
170
172
  type: 'fill',
@@ -176,7 +178,7 @@ const MapBox = props => {
176
178
  'fill-opacity': opacity
177
179
  },
178
180
  filter: ['all', groupFilter, notSelectedFilter, notHoverFilter]
179
- }, `${group.layerId}-unselected`), /*#__PURE__*/_jsx(Layer, {
181
+ }, `${group.layerId}-unselected`), /*#__PURE__*/jsx(Layer, {
180
182
  id: `${group.layerId}-selected`,
181
183
  slot: 'bottom',
182
184
  source: 'mapData',
@@ -189,7 +191,7 @@ const MapBox = props => {
189
191
  'fill-opacity': selectedOpacity
190
192
  },
191
193
  filter: ['all', groupFilter, selectedFilter, notHoverFilter]
192
- }, `${group.layerId}-selected`), /*#__PURE__*/_jsx(Layer, {
194
+ }, `${group.layerId}-selected`), /*#__PURE__*/jsx(Layer, {
193
195
  id: `${group.layerId}-hover`,
194
196
  source: 'mapData',
195
197
  type: 'fill',
@@ -201,7 +203,7 @@ const MapBox = props => {
201
203
  'fill-opacity': hoverOpacity
202
204
  },
203
205
  filter: ['all', groupFilter, hoverFilter, notSelectedFilter]
204
- }, `${group.layerId}-hover`), /*#__PURE__*/_jsx(Layer, {
206
+ }, `${group.layerId}-hover`), /*#__PURE__*/jsx(Layer, {
205
207
  id: `${group.layerId}-selected-hover`,
206
208
  source: 'mapData',
207
209
  type: 'fill',
@@ -219,7 +221,7 @@ const MapBox = props => {
219
221
  const _textLayers = featureGroups?.map(group => {
220
222
  const groupFilter = ['==', ['get', 'layerId'], group.layerId];
221
223
  const labelFilter = ['has', 'label'];
222
- return /*#__PURE__*/_jsx(Layer, {
224
+ return /*#__PURE__*/jsx(Layer, {
223
225
  id: `${group.layerId}-label`,
224
226
  source: 'mapData',
225
227
  type: 'symbol',
@@ -250,7 +252,7 @@ const MapBox = props => {
250
252
  layerId,
251
253
  featureId
252
254
  }) => `${layerId}/${featureId}`);
253
- return /*#__PURE__*/_jsx(Layer, {
255
+ return /*#__PURE__*/jsx(Layer, {
254
256
  id: `highlight-${group.highlightId}-${index}`,
255
257
  source: 'mapData',
256
258
  type: 'fill',
@@ -273,7 +275,7 @@ const MapBox = props => {
273
275
  return clusteredMarkers.map((markers, i) => {
274
276
  if (markers.length === 1) {
275
277
  const marker = markers[0];
276
- return /*#__PURE__*/_jsx(Marker, {
278
+ return /*#__PURE__*/jsx(Marker, {
277
279
  className: "map-marker",
278
280
  longitude: marker.longitude,
279
281
  latitude: marker.latitude,
@@ -285,7 +287,7 @@ const MapBox = props => {
285
287
  style: {
286
288
  backgroundColor: marker.selected ? markerGroup.style.iconColor : theme.palette.TwClrBg
287
289
  },
288
- children: /*#__PURE__*/_jsx(Icon, {
290
+ children: /*#__PURE__*/jsx(Icon, {
289
291
  fillColor: marker.selected ? theme.palette.TwClrBg : markerGroup.style.iconColor,
290
292
  name: markerGroup.style.iconName,
291
293
  size: 'small'
@@ -297,7 +299,7 @@ const MapBox = props => {
297
299
  const latAvg = latSum / markers.length;
298
300
  const lngAvg = lngSum / markers.length;
299
301
  const selected = markers.some(marker => marker.selected);
300
- return /*#__PURE__*/_jsxs(Marker, {
302
+ return /*#__PURE__*/jsxs(Marker, {
301
303
  className: "map-marker map-marker--cluster",
302
304
  longitude: lngAvg,
303
305
  latitude: latAvg,
@@ -316,10 +318,10 @@ const MapBox = props => {
316
318
  style: {
317
319
  backgroundColor: selected ? markerGroup.style.iconColor : theme.palette.TwClrBg
318
320
  },
319
- children: [/*#__PURE__*/_jsx("p", {
321
+ children: [/*#__PURE__*/jsx("p", {
320
322
  className: "count",
321
323
  children: markers.length
322
- }), /*#__PURE__*/_jsx(Icon, {
324
+ }), /*#__PURE__*/jsx(Icon, {
323
325
  fillColor: selected ? theme.palette.TwClrBg : markerGroup.style.iconColor,
324
326
  name: markerGroup.style.iconName,
325
327
  size: 'small'
@@ -391,7 +393,7 @@ const MapBox = props => {
391
393
  return [...fillLayers.map(layer => layer.props.id), ...highlightLayers.map(layer => layer.props.id), ...borderLayers.map(layer => layer.props.id), ...textLayers.map(layer => layer.props.id)];
392
394
  }, [borderLayers, fillLayers, highlightLayers, textLayers]);
393
395
  useMaintainLayerOrder(mapRef, orderedLayerIds);
394
- return /*#__PURE__*/_jsxs(ReactMapbox, {
396
+ return /*#__PURE__*/jsxs(ReactMapbox, {
395
397
  attributionControl: false,
396
398
  cursor: cursor,
397
399
  doubleClickZoom: !disableZoom && !disableDoubleClickZoom,
@@ -413,21 +415,21 @@ const MapBox = props => {
413
415
  onMouseOver: onMouseOver,
414
416
  onMouseOut: onMouseOut,
415
417
  onMouseMove: onMouseMove,
416
- children: [isDesktop && !hideFullScreenControl && /*#__PURE__*/_jsx(FullscreenControl, {
418
+ children: [isDesktop && !hideFullScreenControl && /*#__PURE__*/jsx(FullscreenControl, {
417
419
  position: "top-left",
418
420
  containerId: containerId
419
- }), !hideZoomControl && /*#__PURE__*/_jsx(NavigationControl, {
421
+ }), !hideZoomControl && /*#__PURE__*/jsx(NavigationControl, {
420
422
  showCompass: false,
421
423
  style: {
422
424
  marginRight: theme.spacing(2),
423
425
  marginBottom: theme.spacing(2)
424
426
  },
425
427
  position: "bottom-right"
426
- }), !hideMapViewStyleControl && /*#__PURE__*/_jsx(MapViewStyleControl, {
428
+ }), !hideMapViewStyleControl && /*#__PURE__*/jsx(MapViewStyleControl, {
427
429
  containerId: containerId,
428
430
  mapViewStyle: mapViewStyle,
429
431
  setMapViewStyle: setMapViewStyle
430
- }), controlTopRight && /*#__PURE__*/_jsx(Box, {
432
+ }), controlTopRight && /*#__PURE__*/jsx(Box, {
431
433
  sx: {
432
434
  height: 'max-content',
433
435
  position: 'absolute',
@@ -437,7 +439,7 @@ const MapBox = props => {
437
439
  zIndex: 1000
438
440
  },
439
441
  children: controlTopRight
440
- }), controlBottomLeft && /*#__PURE__*/_jsx(Box, {
442
+ }), controlBottomLeft && /*#__PURE__*/jsx(Box, {
441
443
  style: {
442
444
  height: 'max-content',
443
445
  position: 'absolute',
@@ -447,7 +449,7 @@ const MapBox = props => {
447
449
  zIndex: 1000
448
450
  },
449
451
  children: controlBottomLeft
450
- }), geojson && /*#__PURE__*/_jsxs(Source, {
452
+ }), geojson && /*#__PURE__*/jsxs(Source, {
451
453
  id: "mapData",
452
454
  type: "geojson",
453
455
  data: geojson,
@@ -455,4 +457,5 @@ const MapBox = props => {
455
457
  }), markersComponents]
456
458
  }, mapId);
457
459
  };
458
- export default MapBox;
460
+
461
+ export { MapBox as default };
@@ -1,7 +1,10 @@
1
- import React, { useMemo } from 'react';
2
- import { useDeviceInfo } from '../../utils';
1
+ import { useMemo } from 'react';
2
+ import 'lodash';
3
+ import 'luxon';
4
+ import useDeviceInfo from '../../utils/useDeviceInfo.js';
3
5
  import './styles.scss';
4
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
+
5
8
  const MapContainer = props => {
6
9
  const {
7
10
  containerId,
@@ -14,13 +17,14 @@ const MapContainer = props => {
14
17
  isDesktop
15
18
  } = useDeviceInfo();
16
19
  const drawerOnly = useMemo(() => !isDesktop && drawerOpen, [drawerOpen, isDesktop]);
17
- return /*#__PURE__*/_jsxs("div", {
20
+ return /*#__PURE__*/jsxs("div", {
18
21
  id: containerId,
19
22
  className: `map-container map-container${isDesktop ? '--desktop' : `--mobile${drawerOpen ? '-drawer-open' : ''}`}`,
20
- children: [/*#__PURE__*/_jsx("div", {
23
+ children: [/*#__PURE__*/jsx("div", {
21
24
  className: `map-holder${drawerOnly ? ' map-holder--hidden' : ''}`,
22
25
  children: map
23
26
  }), drawerOpen && drawer, !drawerOnly && legend]
24
27
  });
25
28
  };
26
- export default MapContainer;
29
+
30
+ export { MapContainer as default };
@@ -1,9 +1,10 @@
1
- import React, { useMemo } from 'react';
2
- import { Box, Card, Typography, useTheme } from '@mui/material';
1
+ import { useMemo } from 'react';
2
+ import { useTheme, Card, Typography, Box } from '@mui/material';
3
3
  import { DateTime } from 'luxon';
4
- import { getShortDate } from '../../utils/date';
5
- import Slider from '../Slider';
6
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
4
+ import { getShortDate } from '../../utils/date.js';
5
+ import Slider from '../Slider/index.js';
6
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
+
7
8
  const MapDateSliderControl = ({
8
9
  dates,
9
10
  selectedDate,
@@ -26,11 +27,11 @@ const MapDateSliderControl = ({
26
27
  }));
27
28
  }, [dates]);
28
29
  const getDateString = date => getShortDate(date);
29
- const getDateLabel = date => /*#__PURE__*/_jsx(Typography, {
30
+ const getDateLabel = date => /*#__PURE__*/jsx(Typography, {
30
31
  fontSize: "12px",
31
32
  children: getDateString(date)
32
33
  });
33
- return /*#__PURE__*/_jsxs(Card, {
34
+ return /*#__PURE__*/jsxs(Card, {
34
35
  style: {
35
36
  border: `1px solid ${theme.palette.TwClrBrdrTertiary}`,
36
37
  borderRadius: '8px',
@@ -40,20 +41,20 @@ const MapDateSliderControl = ({
40
41
  maxWidth: '270px',
41
42
  width: dates.length > 1 ? '270px' : undefined
42
43
  },
43
- children: [selectedDate && /*#__PURE__*/_jsx(Typography, {
44
+ children: [selectedDate && /*#__PURE__*/jsx(Typography, {
44
45
  fontSize: "14px",
45
46
  fontWeight: 600,
46
47
  textAlign: "right",
47
48
  children: getDateString(selectedDate)
48
- }), dates.length > 1 && /*#__PURE__*/_jsxs(_Fragment, {
49
- children: [/*#__PURE__*/_jsx(Slider, {
49
+ }), dates.length > 1 && /*#__PURE__*/jsxs(Fragment, {
50
+ children: [/*#__PURE__*/jsx(Slider, {
50
51
  value: selectedDate.valueOf(),
51
52
  min: earliestDate.valueOf(),
52
53
  max: latestDate.valueOf(),
53
54
  marks: marks,
54
55
  valueLabelDisplay: "off",
55
56
  onChange: value => onChange(DateTime.fromMillis(value))
56
- }), /*#__PURE__*/_jsxs(Box, {
57
+ }), /*#__PURE__*/jsxs(Box, {
57
58
  display: "flex",
58
59
  justifyContent: "space-between",
59
60
  children: [getDateLabel(earliestDate), getDateLabel(latestDate)]
@@ -61,4 +62,5 @@ const MapDateSliderControl = ({
61
62
  })]
62
63
  });
63
64
  };
64
- export default MapDateSliderControl;
65
+
66
+ export { MapDateSliderControl as default };
@@ -1,9 +1,12 @@
1
- import React from 'react';
2
- import { Box, IconButton, useTheme } from '@mui/material';
3
- import { useDeviceInfo } from '../../utils';
4
- import Icon from '../Icon/Icon';
1
+ import 'react';
2
+ import { useTheme, Box, IconButton } from '@mui/material';
3
+ import 'lodash';
4
+ import 'luxon';
5
+ import useDeviceInfo from '../../utils/useDeviceInfo.js';
6
+ import Icon from '../Icon/Icon.js';
5
7
  import './styles.scss';
6
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
+
7
10
  const MapDrawer = props => {
8
11
  const {
9
12
  children,
@@ -17,28 +20,29 @@ const MapDrawer = props => {
17
20
  const {
18
21
  isDesktop
19
22
  } = useDeviceInfo();
20
- return open ? /*#__PURE__*/_jsxs(Box, {
23
+ return open ? /*#__PURE__*/jsxs(Box, {
21
24
  className: `map-drawer map-drawer${isDesktop ? `--${size}` : '--mobile'}`,
22
25
  borderLeft: isDesktop ? `1px solid ${theme.palette.TwClrBrdrTertiary}` : undefined,
23
26
  borderRight: isDesktop ? `1px solid ${theme.palette.TwClrBrdrTertiary}` : undefined,
24
27
  style: style,
25
- children: [/*#__PURE__*/_jsxs(Box, {
28
+ children: [/*#__PURE__*/jsxs(Box, {
26
29
  className: "map-drawer--header",
27
- children: [/*#__PURE__*/_jsx("p", {
30
+ children: [/*#__PURE__*/jsx("p", {
28
31
  className: "title",
29
32
  children: title
30
- }), /*#__PURE__*/_jsx(IconButton, {
33
+ }), /*#__PURE__*/jsx(IconButton, {
31
34
  onClick: onClose,
32
35
  size: "small",
33
- children: /*#__PURE__*/_jsx(Icon, {
36
+ children: /*#__PURE__*/jsx(Icon, {
34
37
  name: "close",
35
38
  className: "icon-close"
36
39
  })
37
40
  })]
38
- }), /*#__PURE__*/_jsx(Box, {
41
+ }), /*#__PURE__*/jsx(Box, {
39
42
  className: 'map-drawer--body',
40
43
  children: children
41
44
  })]
42
45
  }) : null;
43
46
  };
44
- export default MapDrawer;
47
+
48
+ export { MapDrawer as default };
@@ -1,9 +1,12 @@
1
- import React from 'react';
2
- import { Box, Tooltip, Typography, useTheme } from '@mui/material';
3
- import { useDeviceInfo } from '../../utils';
4
- import AntSwitch from '../AntSwitch';
5
- import Icon from '../Icon/Icon';
6
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import 'react';
2
+ import { useTheme, Typography, Tooltip, Box } from '@mui/material';
3
+ import 'lodash';
4
+ import 'luxon';
5
+ import useDeviceInfo from '../../utils/useDeviceInfo.js';
6
+ import AntSwitch from '../AntSwitch/index.js';
7
+ import Icon from '../Icon/Icon.js';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+
7
10
  const MapLegend = ({
8
11
  legends
9
12
  }) => {
@@ -15,27 +18,27 @@ const MapLegend = ({
15
18
  const legendComponents = legends.map((legend, index) => {
16
19
  const isFirst = index === 0;
17
20
  const isLast = index === legends.length - 1;
18
- const switchComponent = legend.type === 'highlight' ? /*#__PURE__*/_jsx(AntSwitch, {
21
+ const switchComponent = legend.type === 'highlight' ? /*#__PURE__*/jsx(AntSwitch, {
19
22
  disabled: legend.disabled,
20
23
  checked: legend.visible,
21
24
  onChange: legend.setVisible
22
25
  }) : undefined;
23
- const titleComponent = /*#__PURE__*/_jsxs(Typography, {
26
+ const titleComponent = /*#__PURE__*/jsxs(Typography, {
24
27
  fontSize: "16px",
25
28
  fontWeight: 600,
26
29
  width: isMobile ? '100%' : undefined,
27
30
  marginRight: isMobile ? 0 : theme.spacing(4),
28
31
  paddingLeft: switchComponent ? theme.spacing(1) : theme.spacing(0),
29
- children: [legend.title, legend.tooltip && /*#__PURE__*/_jsx(Tooltip, {
32
+ children: [legend.title, legend.tooltip && /*#__PURE__*/jsx(Tooltip, {
30
33
  title: legend.tooltip,
31
34
  sx: {
32
35
  display: 'inline-block',
33
36
  verticalAlign: 'text-top',
34
37
  marginLeft: theme.spacing(1)
35
38
  },
36
- children: /*#__PURE__*/_jsx(Box, {
39
+ children: /*#__PURE__*/jsx(Box, {
37
40
  display: "flex",
38
- children: /*#__PURE__*/_jsx(Icon, {
41
+ children: /*#__PURE__*/jsx(Icon, {
39
42
  fillColor: theme.palette.TwClrIcnInfo,
40
43
  name: "info",
41
44
  size: "small"
@@ -49,7 +52,7 @@ const MapLegend = ({
49
52
  const selected = legend.type === 'layer' ? item.id === legend.selectedLayer : legend.type === 'marker' ? item.visible : false;
50
53
  const logoComponent = () => {
51
54
  if (item.style.type === 'icon') {
52
- return /*#__PURE__*/_jsx(Icon, {
55
+ return /*#__PURE__*/jsx(Icon, {
53
56
  name: item.style.iconName,
54
57
  fillColor: item.style.iconColor,
55
58
  style: {
@@ -58,7 +61,7 @@ const MapLegend = ({
58
61
  size: 'small'
59
62
  });
60
63
  } else {
61
- return /*#__PURE__*/_jsx(Box, {
64
+ return /*#__PURE__*/jsx(Box, {
62
65
  display: 'flex',
63
66
  sx: {
64
67
  border: `2px solid ${item.style.borderColor ?? theme.palette.TwClrBaseGreen300}`,
@@ -68,7 +71,7 @@ const MapLegend = ({
68
71
  minWidth: '24px',
69
72
  marginRight: theme.spacing(1)
70
73
  },
71
- children: /*#__PURE__*/_jsx(Box, {
74
+ children: /*#__PURE__*/jsx(Box, {
72
75
  height: '16px',
73
76
  width: '24px',
74
77
  sx: {
@@ -85,23 +88,23 @@ const MapLegend = ({
85
88
  switch (legend.type) {
86
89
  case 'marker':
87
90
  const featureItem = item;
88
- const visibleIcon = featureItem.visible ? /*#__PURE__*/_jsx(Icon, {
91
+ const visibleIcon = featureItem.visible ? /*#__PURE__*/jsx(Icon, {
89
92
  name: "iconEye"
90
- }) : /*#__PURE__*/_jsx(Icon, {
93
+ }) : /*#__PURE__*/jsx(Icon, {
91
94
  name: "iconEyeOff"
92
95
  });
93
- return /*#__PURE__*/_jsx(Box, {
96
+ return /*#__PURE__*/jsx(Box, {
94
97
  display: "flex",
95
98
  children: visibleIcon
96
99
  });
97
100
  case 'layer':
98
101
  const layerItem = item;
99
- return /*#__PURE__*/_jsx(Box, {
102
+ return /*#__PURE__*/jsx(Box, {
100
103
  display: "flex",
101
104
  sx: {
102
105
  visibility: layerItem.id === legend.selectedLayer ? 'visible' : 'hidden'
103
106
  },
104
- children: /*#__PURE__*/_jsx(Icon, {
107
+ children: /*#__PURE__*/jsx(Icon, {
105
108
  name: "checkmark",
106
109
  style: {
107
110
  marginRight: theme.spacing(1)
@@ -112,7 +115,7 @@ const MapLegend = ({
112
115
  return undefined;
113
116
  }
114
117
  };
115
- return /*#__PURE__*/_jsxs(Box, {
118
+ return /*#__PURE__*/jsxs(Box, {
116
119
  onClick: onClick,
117
120
  display: "flex",
118
121
  alignItems: "center",
@@ -124,31 +127,31 @@ const MapLegend = ({
124
127
  opacity: disabled ? '0.5' : 1
125
128
  },
126
129
  justifyContent: 'space-between',
127
- children: [/*#__PURE__*/_jsxs(Box, {
130
+ children: [/*#__PURE__*/jsxs(Box, {
128
131
  display: "flex",
129
132
  alignItems: "center",
130
133
  paddingRight: theme.spacing(1),
131
- children: [logoComponent(), /*#__PURE__*/_jsx(Typography, {
134
+ children: [logoComponent(), /*#__PURE__*/jsx(Typography, {
132
135
  fontSize: "14px",
133
136
  fontWeight: 400,
134
137
  children: item.label
135
138
  })]
136
- }), /*#__PURE__*/_jsx(Box, {
139
+ }), /*#__PURE__*/jsx(Box, {
137
140
  display: "flex",
138
141
  children: visibleComponent()
139
142
  })]
140
143
  }, `${index}-${itemIndex}`);
141
144
  });
142
- return /*#__PURE__*/_jsx(Box, {
145
+ return /*#__PURE__*/jsx(Box, {
143
146
  sx: {
144
147
  opacity: legend.disabled ? 0.7 : 1
145
148
  },
146
149
  borderBottom: isLast ? 'none' : `1px solid ${theme.palette.TwClrBrdrTertiary}`,
147
- children: /*#__PURE__*/_jsxs(Box, {
150
+ children: /*#__PURE__*/jsxs(Box, {
148
151
  paddingBottom: 2,
149
152
  paddingTop: isFirst ? 0 : 2,
150
153
  flexDirection: 'column',
151
- children: [/*#__PURE__*/_jsxs(Box, {
154
+ children: [/*#__PURE__*/jsxs(Box, {
152
155
  display: "flex",
153
156
  alignItems: 'center',
154
157
  paddingLeft: theme.spacing(1),
@@ -157,7 +160,7 @@ const MapLegend = ({
157
160
  })
158
161
  }, legend.title);
159
162
  });
160
- return /*#__PURE__*/_jsx(Box, {
163
+ return /*#__PURE__*/jsx(Box, {
161
164
  bgcolor: theme.palette.TwClrBaseWhite,
162
165
  display: "flex",
163
166
  justifyItems: "flex-start",
@@ -171,4 +174,5 @@ const MapLegend = ({
171
174
  children: legendComponents
172
175
  });
173
176
  };
174
- export default MapLegend;
177
+
178
+ export { MapLegend as default };
@@ -1,8 +1,9 @@
1
- import React, { useCallback, useMemo } from 'react';
2
- import { Box, useTheme } from '@mui/material';
3
- import PopoverMenu from '../PopoverMenu';
4
- import { MapViewStyles } from './types';
5
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { useMemo, useCallback } from 'react';
2
+ import { useTheme, Box } from '@mui/material';
3
+ import PopoverMenu from '../PopoverMenu/index.js';
4
+ import { MapViewStyles } from './types.js';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
6
7
  const MapViewStyleControl = ({
7
8
  containerId,
8
9
  mapViewStyle,
@@ -24,7 +25,7 @@ const MapViewStyleControl = ({
24
25
  return document.getElementById(containerId);
25
26
  }
26
27
  }, [containerId]);
27
- return /*#__PURE__*/_jsx(Box, {
28
+ return /*#__PURE__*/jsx(Box, {
28
29
  sx: {
29
30
  position: 'absolute',
30
31
  top: '10px',
@@ -45,8 +46,8 @@ const MapViewStyleControl = ({
45
46
  marginLeft: 0
46
47
  }
47
48
  },
48
- children: /*#__PURE__*/_jsx(PopoverMenu, {
49
- anchor: /*#__PURE__*/_jsx(Box, {
49
+ children: /*#__PURE__*/jsx(PopoverMenu, {
50
+ anchor: /*#__PURE__*/jsx(Box, {
50
51
  component: "span",
51
52
  sx: {
52
53
  fontSize: '12px',
@@ -61,4 +62,5 @@ const MapViewStyleControl = ({
61
62
  })
62
63
  });
63
64
  };
64
- export default MapViewStyleControl;
65
+
66
+ export { MapViewStyleControl as default };
@@ -1,2 +1,2 @@
1
1
  import ReactMapbox from 'react-map-gl/mapbox';
2
- export default ReactMapbox;
2
+ export { default } from 'react-map-gl/mapbox';
@@ -1,9 +1,10 @@
1
- import React, { useCallback, useMemo, useState } from 'react';
2
- import MapBox from './MapBox';
3
- import MapContainer from './MapContainer';
4
- import MapDrawer from './MapDrawer';
5
- import MapLegend from './MapLegend';
6
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { useState, useCallback, useMemo } from 'react';
2
+ import MapBox from './MapBox.js';
3
+ import MapContainer from './MapContainer.js';
4
+ import MapDrawer from './MapDrawer.js';
5
+ import MapLegend from './MapLegend.js';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
7
8
  const MapComponent = props => {
8
9
  const {
9
10
  clusterRadius,
@@ -138,9 +139,9 @@ const MapComponent = props => {
138
139
  highlightImageUrls.forEach(url => imageUrls.add(url));
139
140
  return Array.from(imageUrls);
140
141
  }, [features]);
141
- return /*#__PURE__*/_jsx(MapContainer, {
142
+ return /*#__PURE__*/jsx(MapContainer, {
142
143
  containerId: mapContainerId ?? 'map-container',
143
- map: /*#__PURE__*/_jsx(MapBox, {
144
+ map: /*#__PURE__*/jsx(MapBox, {
144
145
  clusterRadius: clusterRadius,
145
146
  containerId: mapContainerId ?? 'map-container',
146
147
  controlBottomLeft: controlBottomLeft,
@@ -164,7 +165,7 @@ const MapComponent = props => {
164
165
  setMapViewStyle: setMapViewStyle,
165
166
  token: token
166
167
  }),
167
- drawer: /*#__PURE__*/_jsx(MapDrawer, {
168
+ drawer: /*#__PURE__*/jsx(MapDrawer, {
168
169
  open: drawerOpen ?? false,
169
170
  onClose: () => setDrawerOpen?.(false),
170
171
  size: drawerSize ?? 'small',
@@ -172,9 +173,10 @@ const MapComponent = props => {
172
173
  children: drawerChildren
173
174
  }),
174
175
  drawerOpen: drawerOpen,
175
- legend: !hideLegend && legends && /*#__PURE__*/_jsx(MapLegend, {
176
+ legend: !hideLegend && legends && /*#__PURE__*/jsx(MapLegend, {
176
177
  legends: legends
177
178
  })
178
179
  });
179
180
  };
180
- export default MapComponent;
181
+
182
+ export { MapComponent as default };
@@ -8,11 +8,13 @@
8
8
 
9
9
  // Additional shading/annotations for map entities
10
10
 
11
- export const MapViewStyles = ['Outdoors', 'Satellite', 'Light', 'Dark', 'Streets'];
12
- export const stylesUrl = {
11
+ const MapViewStyles = ['Outdoors', 'Satellite', 'Light', 'Dark', 'Streets'];
12
+ const stylesUrl = {
13
13
  Outdoors: 'mapbox://styles/mapbox/outdoors-v12?optimize=true',
14
14
  Satellite: 'mapbox://styles/mapbox/satellite-streets-v12?optimize=true',
15
15
  Streets: 'mapbox://styles/mapbox/streets-v12?optimize=true',
16
16
  Light: 'mapbox://styles/mapbox/light-v11?optimize=true',
17
17
  Dark: 'mapbox://styles/mapbox/dark-v11?optimize=true'
18
- };
18
+ };
19
+
20
+ export { MapViewStyles, stylesUrl };
@@ -1,8 +1,9 @@
1
1
  import { useEffect } from 'react';
2
+
2
3
  /**
3
4
  * Ensures that all given layers maintain strict order in the Mapbox layer stack.
4
5
  */
5
- export const useMaintainLayerOrder = (mapRef, orderedLayerIds) => {
6
+ const useMaintainLayerOrder = (mapRef, orderedLayerIds) => {
6
7
  useEffect(() => {
7
8
  const map = mapRef.current;
8
9
  if (!map) {
@@ -22,4 +23,6 @@ export const useMaintainLayerOrder = (mapRef, orderedLayerIds) => {
22
23
  }
23
24
  }
24
25
  }, [mapRef, orderedLayerIds]);
25
- };
26
+ };
27
+
28
+ export { useMaintainLayerOrder };